diff options
| author | hathach <[email protected]> | 2013-02-04 20:54:52 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-02-04 20:54:52 +0700 |
| commit | 93269b034396673062ec79e69673e95d47f29438 (patch) | |
| tree | 65c28d1881bebd59240ad4a50ec2432df27c085f /tinyusb/osal | |
| parent | f88e9d045d70f4fbee24d92963cf39118deb7df9 (diff) | |
fix osal_semaphore_wait & osal_queue_receive of osal_none's bug
- not assign error to TUSB_ERROR_NON if succeed
add code up to set device address for enumeration
Diffstat (limited to 'tinyusb/osal')
| -rw-r--r-- | tinyusb/osal/osal_none.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tinyusb/osal/osal_none.h b/tinyusb/osal/osal_none.h index fafaadc3f..93f77d593 100644 --- a/tinyusb/osal/osal_none.h +++ b/tinyusb/osal/osal_none.h @@ -133,8 +133,10 @@ static inline tusb_error_t osal_semaphore_post(osal_semaphore_handle_t const se *(p_error) = TUSB_ERROR_OSAL_TIMEOUT;\ else\ return;\ - } else\ + } else{\ (*(sem_hdl))--; /*TODO mutex hal_interrupt_disable consideration*/\ + *(p_error) = TUSB_ERROR_NONE;\ + }\ }while(0) //--------------------------------------------------------------------+ @@ -202,6 +204,7 @@ static inline tusb_error_t osal_queue_send(osal_queue_handle_t const queue_hdl, queue_hdl->rd_idx = (queue_hdl->rd_idx + 1) % queue_hdl->depth;\ queue_hdl->count--;\ /*TODO mutex unlock hal_interrupt_enable */\ + *(p_error) = TUSB_ERROR_NONE;\ }\ }while(0) |
