From 93269b034396673062ec79e69673e95d47f29438 Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 4 Feb 2013 20:54:52 +0700 Subject: 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 --- tinyusb/osal/osal_none.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tinyusb/osal') 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) -- cgit v1.3.1