Switch to weak default implementation.

This commit is contained in:
HiFiPhile 2024-05-09 18:07:22 +02:00
parent 6c286e3b02
commit c8beaad2b1
2 changed files with 6 additions and 2 deletions

View File

@ -56,6 +56,10 @@ TU_ATTR_WEAK void tud_event_hook_cb(uint8_t rhport, uint32_t eventid, bool in_is
(void)in_isr; (void)in_isr;
} }
TU_ATTR_WEAK void tud_sof_cb(uint32_t frame_count) {
(void)frame_count;
}
//--------------------------------------------------------------------+ //--------------------------------------------------------------------+
// Device Data // Device Data
//--------------------------------------------------------------------+ //--------------------------------------------------------------------+
@ -637,7 +641,7 @@ void tud_task_ext(uint32_t timeout_ms, bool in_isr) {
if ( _usbd_sof.cb_en) if ( _usbd_sof.cb_en)
{ {
TU_LOG_USBD("\r\n"); TU_LOG_USBD("\r\n");
if ( tud_sof_cb ) tud_sof_cb(event.sof.frame_count); tud_sof_cb(event.sof.frame_count);
} }
break; break;

View File

@ -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); void tud_event_hook_cb(uint8_t rhport, uint32_t eventid, bool in_isr);
// Invoked when a new (micro) frame started // 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 // 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); TU_ATTR_WEAK bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t const * request);