diff options
| author | HiFiPhile <[email protected]> | 2024-05-09 18:07:22 +0200 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2024-05-09 18:07:22 +0200 |
| commit | c8beaad2b18b4417ec763fc3dc85476a6480a2f4 (patch) | |
| tree | 1754c7eea720e59febd6d216b5a84612905a72c2 /src/device | |
| parent | 6c286e3b027a4873ba70961f48c52f61d3367187 (diff) | |
Switch to weak default implementation.
Diffstat (limited to 'src/device')
| -rw-r--r-- | src/device/usbd.c | 6 | ||||
| -rw-r--r-- | src/device/usbd.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c index a3f9126de..f638eb619 100644 --- a/src/device/usbd.c +++ b/src/device/usbd.c @@ -56,6 +56,10 @@ TU_ATTR_WEAK void tud_event_hook_cb(uint8_t rhport, uint32_t eventid, bool in_is (void)in_isr; } +TU_ATTR_WEAK void tud_sof_cb(uint32_t frame_count) { + (void)frame_count; +} + //--------------------------------------------------------------------+ // Device Data //--------------------------------------------------------------------+ @@ -637,7 +641,7 @@ void tud_task_ext(uint32_t timeout_ms, bool in_isr) { if ( _usbd_sof.cb_en) { TU_LOG_USBD("\r\n"); - if ( tud_sof_cb ) tud_sof_cb(event.sof.frame_count); + tud_sof_cb(event.sof.frame_count); } break; diff --git a/src/device/usbd.h b/src/device/usbd.h index ee83ddc32..cba94fdae 100644 --- a/src/device/usbd.h +++ b/src/device/usbd.h @@ -156,7 +156,7 @@ TU_ATTR_WEAK void tud_resume_cb(void); void tud_event_hook_cb(uint8_t rhport, uint32_t eventid, bool in_isr); // Invoked when a new (micro) frame started -TU_ATTR_WEAK void tud_sof_cb(uint32_t frame_count); +void tud_sof_cb(uint32_t frame_count); // Invoked when received control request with VENDOR TYPE TU_ATTR_WEAK bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t const * request); |
