9 years, 8 months ago.

Work with individual interface even many are present in the same code.(serial, USBhid, ethernet)

I am using Serial and USB hid interfaces in the same code. I need to choose amoung the serial and usb hid to work with on runtime. But when the usb hid library is included into the code, the execution is not started until it detects the USB hid device. Is there any way to bypass the usb hid detection at start and enable later if we need in the execution.

if(connect) { USBDevice::connect(); } This code in USBhid.cpp is actually blocking the code execution. I have commented this. But couldn't enable this from the code in main block. Please help me out how to enable this at a later stage.

I tried this way "USBHID::USBHID(64, 64, 0x04B4, 0x900D):USBDevice(0x04B4, 0x900D):USBDevice::connect();" but not working.

Be the first to answer this question.