arduino/ArduinoCore-avr

-DCDC_DISABLED not working

Phoen11xx opened this issue · 6 comments

Hello. I am trying to create a usb device and I need to disable the CDC so that only the hid device works.
To install the code, I use usbasp. After enabling the -DC DC_DISABLED parameter or adding define, the CRC still works and I get a hid device plus a non-working device.
Does anyone know the solution to this problem?

Hi @Phoen11xx. Thanks for your report. I know there has been a recent discussion about the use of this macro on Arduino Forum:

https://forum.arduino.cc/t/remove-serial-port/1123859

Is that you? I ask because that discussion contains valuable information about how the users are setting the macro (via the boards definition instead of trying to do it via the sketch code).

These not my forum thread. but i have exactly the same problem.

The issue is very likely due to how Windows caches the USB descriptors; you can try changing the productVersion field here , replacing 0x100 with any other number, to check if it forgets the previous association.

I recorded a video showing this problem:
https://www.youtube.com/watch?v=9o1CELyCOsc
It doesn't look like the problem is in the cache. digitalWrite still working but mouse.move not working with CDC_DISABLED define

@facchinm I was wrong about the cache. I change 0x100 to 0x101 and it worked

Maybe replace this number with a timestamp or compilation number? there is no information about possible caching in the comments to this option