remove mutex reset

This commit is contained in:
hathach 2018-03-30 16:23:50 +07:00
parent 82da013dad
commit 9f1f7958ec
2 changed files with 2 additions and 15 deletions

View File

@ -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
}

View File

@ -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