diff options
Diffstat (limited to 'tinyusb')
| -rw-r--r-- | tinyusb/osal/osal_freeRTOS.h | 4 | ||||
| -rw-r--r-- | tinyusb/osal/osal_none.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tinyusb/osal/osal_freeRTOS.h b/tinyusb/osal/osal_freeRTOS.h index 6d091ed29..c54bb2ead 100644 --- a/tinyusb/osal/osal_freeRTOS.h +++ b/tinyusb/osal/osal_freeRTOS.h @@ -186,8 +186,8 @@ static inline void osal_queue_receive (osal_queue_handle_t const queue_hdl, void (*p_error) = ( xQueueReceive(queue_hdl, p_data, osal_tick_from_msec(msec)) == pdPASS ) ? TUSB_ERROR_NONE : TUSB_ERROR_OSAL_TIMEOUT; } -static inline tusb_error_t osal_queue_send(osal_queue_handle_t const queue_hdl, const void * data) ATTR_ALWAYS_INLINE; -static inline tusb_error_t osal_queue_send(osal_queue_handle_t const queue_hdl, const void * data) +static inline tusb_error_t osal_queue_send(osal_queue_handle_t const queue_hdl, void const * data) ATTR_ALWAYS_INLINE; +static inline tusb_error_t osal_queue_send(osal_queue_handle_t const queue_hdl, void const * data) { portBASE_TYPE taskWaken; return ( xQueueSendFromISR(queue_hdl, data, &taskWaken) == pdTRUE ) ? TUSB_ERROR_NONE : TUSB_ERROR_OSAL_QUEUE_FAILED; diff --git a/tinyusb/osal/osal_none.h b/tinyusb/osal/osal_none.h index 9661278f7..a5635efd6 100644 --- a/tinyusb/osal/osal_none.h +++ b/tinyusb/osal/osal_none.h @@ -112,7 +112,7 @@ static inline volatile uint32_t osal_tick_get(void) do {\ timeout = osal_tick_get();\ state = __LINE__; case __LINE__:\ - if ( timeout + osal_tick_from_msec(msec) < osal_tick_get() ) /* time out */ \ + if ( timeout + osal_tick_from_msec(msec) > osal_tick_get() ) /* time out */ \ return TUSB_ERROR_OSAL_WAITING;\ }while(0) @@ -230,8 +230,8 @@ static inline osal_queue_handle_t osal_queue_create(osal_queue_t * const p_queue } // when queue is full, it will overwrite the oldest data in the queue -static inline tusb_error_t osal_queue_send(osal_queue_handle_t const queue_hdl, const void * data) ATTR_ALWAYS_INLINE; -static inline tusb_error_t osal_queue_send(osal_queue_handle_t const queue_hdl, const void * data) +static inline tusb_error_t osal_queue_send(osal_queue_handle_t const queue_hdl, void const * data) ATTR_ALWAYS_INLINE; +static inline tusb_error_t osal_queue_send(osal_queue_handle_t const queue_hdl, void const * data) { //TODO mutex lock hal_interrupt_disable |
