mirror of
https://github.com/sakumisu/CherryUSB.git
synced 2025-05-09 00:21:44 +08:00
Revert "reset sem before taking"
This reverts commit b5f0c043e7a54706cbe48db4189be1c44ceddfaf.
This commit is contained in:
parent
82cd79989c
commit
11e389f922
@ -35,7 +35,6 @@ void usb_osal_sem_delete(usb_osal_sem_t sem)
|
||||
|
||||
int usb_osal_sem_take(usb_osal_sem_t sem, uint32_t timeout)
|
||||
{
|
||||
xQueueReset((QueueHandle_t)sem);
|
||||
if (timeout == USB_OSAL_WAITING_FOREVER) {
|
||||
return (xSemaphoreTake((SemaphoreHandle_t)sem, portMAX_DELAY) == pdPASS) ? 0 : -ETIMEDOUT;
|
||||
} else {
|
||||
|
@ -40,7 +40,6 @@ int usb_osal_sem_take(usb_osal_sem_t sem, uint32_t timeout)
|
||||
int ret = 0;
|
||||
rt_err_t result = RT_EOK;
|
||||
|
||||
rt_sem_control((rt_sem_t)sem, RT_IPC_CMD_RESET, (void *)0);
|
||||
if (timeout == USB_OSAL_WAITING_FOREVER) {
|
||||
result = rt_sem_take((rt_sem_t)sem, RT_WAITING_FOREVER);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user