summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorReinhard Panhuber <[email protected]>2022-03-16 07:13:38 +0100
committerReinhard Panhuber <[email protected]>2022-03-16 07:13:38 +0100
commit92ac041869b79aba6948e6440bbfc51ba77130ac (patch)
tree02972648b29d53313a941a842978ac6cfcbc48a8 /src/device
parent90502739c34b8cbcf37229031eb4f575c33311fa (diff)
Add todos and comments
Diffstat (limited to 'src/device')
-rw-r--r--src/device/usbd.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c
index 6170c2bda..96ac19c8d 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -587,11 +587,12 @@ void tud_task (void)
case DCD_EVENT_SOF:
TU_LOG2("\r\n");
- for ( uint8_t i = 0; i < TOTAL_DRIVER_COUNT; i++ )
- {
- usbd_class_driver_t const * driver = get_driver(i);
- if ( driver->sof ) driver->sof(event.rhport, event.sof.frame_count);
- }
+ // TODO: Should this really be done here in the queue? How to distinguish the calls here from those SOF events which should be handled directly in the ISR routine? If we do it like this, the SOF routines get called two time right now, once in the ISR context and once again here
+// for ( uint8_t i = 0; i < TOTAL_DRIVER_COUNT; i++ )
+// {
+// usbd_class_driver_t const * driver = get_driver(i);
+// if ( driver->sof ) driver->sof(event.rhport, event.sof.frame_count);
+// }
break;
case USBD_EVENT_FUNC_CALL:
@@ -1410,6 +1411,7 @@ void usbd_edpt_close(uint8_t rhport, uint8_t ep_addr)
void usbd_sof_enable(uint8_t rhport, bool en)
{
+ // TODO: Check needed if all drivers including the user sof_cb does not need an active SOF ISR any more. Only if all drivers switched off SOF calls the SOF interrupt may be disabled
dcd_sof_enable(rhport, en);
}