From a98b21992263584ebced348b49f082c69171f0ff Mon Sep 17 00:00:00 2001 From: Rocky04 Date: Tue, 8 Aug 2023 18:14:00 +0000 Subject: [PATCH] Remove port from SOF callback --- src/device/usbd.c | 3 ++- src/device/usbd.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/device/usbd.c b/src/device/usbd.c index 3437159fb..15ceec878 100644 --- a/src/device/usbd.c +++ b/src/device/usbd.c @@ -1,3 +1,4 @@ + /* * The MIT License (MIT) * @@ -598,7 +599,7 @@ void tud_task_ext(uint32_t timeout_ms, bool in_isr) case DCD_EVENT_SOF: TU_LOG_USBD("\r\n"); - if ( tud_sof_cb ) tud_sof_cb(event->rhport, event->sof.frame_count); + if ( tud_sof_cb ) tud_sof_cb(event->sof.frame_count); break; default: diff --git a/src/device/usbd.h b/src/device/usbd.h index db439e518..423cd7053 100644 --- a/src/device/usbd.h +++ b/src/device/usbd.h @@ -149,7 +149,7 @@ TU_ATTR_WEAK void tud_suspend_cb(bool remote_wakeup_en); TU_ATTR_WEAK void tud_resume_cb(void); // Invoked when a new (micro) frame started -TU_ATTR_WEAK void tud_sof_cb(uint8_t rhport, uint32_t frame_count); +TU_ATTR_WEAK 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);