summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-06-22 16:01:55 +0700
committerhathach <[email protected]>2018-06-22 16:01:55 +0700
commitd438000b99a5dbd5357d042fa48d0d87f180f032 (patch)
tree618e74d9e6667846a2b0419e273a5769985a9538 /src/device
parente3591ac682b403c1a3a7c4426056c9c37b1a9088 (diff)
clean up
Diffstat (limited to 'src/device')
-rw-r--r--src/device/usbd.c8
-rw-r--r--src/device/usbd_pvt.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c
index 4332c2925..0f6cebc6c 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -182,7 +182,7 @@ typedef struct ATTR_ALIGNED(4)
// USBD_EVT_FUNC_CALL
struct {
- void (*func)(void*);
+ osal_task_func_t func;
void* param;
}func_call;
};
@@ -308,6 +308,10 @@ static tusb_error_t usbd_main_st(void)
}
}
}
+ else if ( USBD_EVT_FUNC_CALL == event.event_id )
+ {
+ if ( event.func_call.func ) event.func_call.func(event.func_call.param);
+ }
else
{
STASK_ASSERT(false);
@@ -631,7 +635,7 @@ tusb_error_t usbd_open_edpt_pair(uint8_t rhport, tusb_desc_endpoint_t const* p_d
return TUSB_ERROR_NONE;
}
-void usbd_defer_func(void (*func)(void*), void* param, bool isr )
+void usbd_defer_func(osal_task_func_t func, void* param, bool isr )
{
usbd_task_event_t event =
{
diff --git a/src/device/usbd_pvt.h b/src/device/usbd_pvt.h
index 4632fc52b..8189d5811 100644
--- a/src/device/usbd_pvt.h
+++ b/src/device/usbd_pvt.h
@@ -76,7 +76,7 @@ tusb_error_t usbd_open_edpt_pair(uint8_t rhport, tusb_desc_endpoint_t const* p_d
/*------------------------------------------------------------------*/
/* Other Helpers
*------------------------------------------------------------------*/
-void usbd_defer_func( void (*func)(void*), void* param, bool isr );
+void usbd_defer_func( osal_task_func_t func, void* param, bool isr );
#ifdef __cplusplus