mirror of
https://github.com/sakumisu/CherryUSB.git
synced 2025-05-09 00:21:44 +08:00
fix usb_osal_sem_take return val in rt-thread port
This commit is contained in:
parent
66db88b7cd
commit
582eb2a7ac
@ -32,9 +32,9 @@ int usb_osal_sem_take(usb_osal_sem_t sem, uint32_t timeout)
|
||||
rt_err_t result = RT_EOK;
|
||||
|
||||
result = rt_sem_take((rt_sem_t)sem, rt_tick_from_millisecond(timeout));
|
||||
if (result == RT_ETIMEOUT) {
|
||||
if (result == -RT_ETIMEOUT) {
|
||||
ret = -ETIMEDOUT;
|
||||
} else if (result == RT_ERROR) {
|
||||
} else if (result == -RT_ERROR) {
|
||||
ret = -EINVAL;
|
||||
} else {
|
||||
ret = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user