summaryrefslogtreecommitdiff
path: root/src/device/usbd.c
diff options
context:
space:
mode:
authorRocky04 <[email protected]>2023-08-08 17:48:45 +0000
committerRocky04 <[email protected]>2023-08-08 17:48:45 +0000
commit0161955c22eccea62a783368073042154b3e5976 (patch)
tree2bb70c4f320753621b813b6effb3caa2cad8e643 /src/device/usbd.c
parent51a0889b75fc2da6675530d68f3ae765c44849f4 (diff)
Adding support for a SOF callback
Diffstat (limited to 'src/device/usbd.c')
-rw-r--r--src/device/usbd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c
index 9429cf664..3437159fb 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -597,6 +597,10 @@ void tud_task_ext(uint32_t timeout_ms, bool in_isr)
break;
case DCD_EVENT_SOF:
+ TU_LOG_USBD("\r\n");
+ if ( tud_sof_cb ) tud_sof_cb(event->rhport, event->sof.frame_count);
+ break;
+
default:
TU_BREAKPOINT();
break;