Zephyr USB CDC: Interrupt on DTR change?

Hello,

I have an application, where once in a while an USB cable might be attached for charging the battery of the device. While that happens, once in a while, someone might attach the USB cable to a PC and start a terminal emulation and start a service dialog with the device.

I'm able to detect this situation, by polling the DTR (device terminal ready) "line" of the USB CDC device. However polling has the disadvantage of consuming CPU power, while 99.9% of the time, nothing interesting happens. I've observed the calls to the callback, that can be installed using the `usb_enable()` function. That CB does not get called when the DTR line changes.

Is there a way to trigger a CB call or interrupt, when the DTR line changes?

Parents Reply Children
No Data
Related