summaryrefslogtreecommitdiff
path: root/tinyusb
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-03-30 16:23:50 +0700
committerhathach <[email protected]>2018-03-30 16:23:50 +0700
commit9f1f7958ec9310a34fbf94359ee0b3dd0dd86925 (patch)
tree87f3343550340cc5133a71d32e4e031d44b06892 /tinyusb
parent82da013dadf2b2f69f362702ca40708fdec52df4 (diff)
remove mutex reset
Diffstat (limited to 'tinyusb')
-rw-r--r--tinyusb/osal/osal_freeRTOS.h11
-rw-r--r--tinyusb/osal/osal_none.h6
2 files changed, 2 insertions, 15 deletions
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