diff --git a/tinyusb/osal/osal_freeRTOS.h b/tinyusb/osal/osal_freeRTOS.h index b0a99ad38..211072331 100644 --- a/tinyusb/osal/osal_freeRTOS.h +++ b/tinyusb/osal/osal_freeRTOS.h @@ -132,10 +132,10 @@ static inline void osal_semaphore_wait(osal_semaphore_t sem_hdl, uint32_t msec, (*p_error) = (xSemaphoreTake(sem_hdl, ticks) ? TUSB_ERROR_NONE : TUSB_ERROR_OSAL_TIMEOUT); } +// TODO remove static inline void osal_semaphore_reset(osal_semaphore_t const sem_hdl) { - tusb_error_t err; - osal_semaphore_wait(sem_hdl, 0, &err); + xSemaphoreTakeFromISR(sem_hdl, NULL); } //--------------------------------------------------------------------+ @@ -156,13 +156,6 @@ static inline void osal_mutex_wait(osal_mutex_t mutex_hdl, uint32_t msec, tusb_e (*p_error) = (xSemaphoreTake(mutex_hdl, ticks) ? TUSB_ERROR_NONE : TUSB_ERROR_OSAL_TIMEOUT); } -// TOOD remove -static inline void osal_mutex_reset(osal_mutex_t mutex_hdl) -{ - xSemaphoreGive(mutex_hdl); -} - - #ifdef __cplusplus } diff --git a/tinyusb/osal/osal_none.h b/tinyusb/osal/osal_none.h index 5325fd29e..9cdfdcb2f 100644 --- a/tinyusb/osal/osal_none.h +++ b/tinyusb/osal/osal_none.h @@ -241,12 +241,6 @@ static inline bool osal_mutex_release(osal_mutex_t mutex_hdl) return osal_semaphore_post(mutex_hdl); } -// TOOD remove -static inline void osal_mutex_reset(osal_mutex_t mutex_hdl) -{ - osal_semaphore_reset(mutex_hdl); -} - #define osal_mutex_wait osal_semaphore_wait