From 9e4122f2a0012d4aa69200540545e4e4d0d1b6c4 Mon Sep 17 00:00:00 2001 From: sakumisu <1203593632@qq.com> Date: Sun, 27 Jul 2025 21:22:18 +0800 Subject: [PATCH] fix(osal/idf): fix esp timer handle Signed-off-by: sakumisu <1203593632@qq.com> --- osal/idf/usb_osal_idf.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/osal/idf/usb_osal_idf.c b/osal/idf/usb_osal_idf.c index 954ca8d8..77bccfb3 100644 --- a/osal/idf/usb_osal_idf.c +++ b/osal/idf/usb_osal_idf.c @@ -156,7 +156,6 @@ static void usb_timeout(void *arg) struct usb_osal_timer *usb_osal_timer_create(const char *name, uint32_t timeout_ms, usb_timer_handler_t handler, void *argument, bool is_period) { struct usb_osal_timer *timer; - esp_timer_handle_t timer_handle; timer = pvPortMalloc(sizeof(struct usb_osal_timer)); @@ -178,9 +177,7 @@ struct usb_osal_timer *usb_osal_timer_create(const char *name, uint32_t timeout_ timer->is_period = is_period; timer->timeout_ms = timeout_ms; - timer_handle = (esp_timer_handle_t)timer->timer; - - if (esp_timer_create(&timer_args, &timer_handle) != ESP_OK) { + if (esp_timer_create(&timer_args, (esp_timer_handle_t *)&timer->timer) != ESP_OK) { vPortFree(timer); return NULL; }