summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2025-07-27 21:22:18 +0800
committersakumisu <[email protected]>2025-07-27 21:22:18 +0800
commit9e4122f2a0012d4aa69200540545e4e4d0d1b6c4 (patch)
tree3c4f41608d1ee592c1ae2aecabf1c73932f36935
parent083ec5738406ff6b025941da5fc3ae17c90d40a3 (diff)
fix(osal/idf): fix esp timer handle
Signed-off-by: sakumisu <[email protected]>
-rw-r--r--osal/idf/usb_osal_idf.c5
1 files changed, 1 insertions, 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;
}