Hello,
Does anyone have any good examples of using RL-USB (Host) with RTX?
I have a working application right now but for it to work "in a comparable way" to RL-USB Host without RTX the USB task must have a high priority and use minimal delays. (by comparible way I mean delay until device is recognized, disconnected...)
This leads to the USB task taking up much of the execution time even when no device is connected.
Ideally I would like a method that would have the task wait until a 'connected' event of a device.
Anyway this is the simple task I'm using and if anyone has any suggestions it would be much appreciated:
__task void task_usb_host (void) { while (1) { usbh_engine(0); os_dly_wait (2); } }
You should put usbh_engine function into a separate task that has same priority as other tasks do and in round robin all tasks of same priority that are ready will get their timeslice for execution.