From bbfa85aa08d19f57f6e1c8bb0040839e38d9a01c Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 24 Sep 2013 18:23:34 +0700 Subject: allow a limited model to deal with stalled pipe/transaction added stall clear & able to mount the stupid toshiba thumb drive add HCD pipe API - bool hcd_pipe_is_busy(pipe_handle_t pipe_hdl); - bool hcd_pipe_is_stalled(pipe_handle_t pipe_hdl); - uint8_t hcd_pipe_get_endpoint_addr(pipe_handle_t pipe_hdl); - tusb_error_t hcd_pipe_clear_stall(pipe_handle_t pipe_hdl); remove tusbh_device_mount_failed_cb (not neccessary for user) --- tinyusb/osal/osal.h | 14 +++++++++----- tinyusb/osal/osal_none.h | 3 +++ 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'tinyusb/osal') diff --git a/tinyusb/osal/osal.h b/tinyusb/osal/osal.h index d2287b3a5..d23cb518c 100644 --- a/tinyusb/osal/osal.h +++ b/tinyusb/osal/osal.h @@ -68,16 +68,20 @@ #if TUSB_CFG_OS == TUSB_OS_NONE #include "osal_none.h" -#elif TUSB_CFG_OS == TUSB_OS_FREERTOS - #include "osal_freeRTOS.h" -#elif TUSB_CFG_OS == TUSB_OS_CMSIS_RTX - #include "osal_cmsis_rtx.h" #else - #error TUSB_CFG_OS is not defined or OS is not supported yet + #define OSAL_VAR + #if TUSB_CFG_OS == TUSB_OS_FREERTOS + #include "osal_freeRTOS.h" + #elif TUSB_CFG_OS == TUSB_OS_CMSIS_RTX + #include "osal_cmsis_rtx.h" + #else + #error TUSB_CFG_OS is not defined or OS is not supported yet + #endif #endif #else // OSAL API for cmock +#define OSAL_VAR #include "osal_common.h" //------------- Tick -------------// diff --git a/tinyusb/osal/osal_none.h b/tinyusb/osal/osal_none.h index 853f33e67..775febc3f 100644 --- a/tinyusb/osal/osal_none.h +++ b/tinyusb/osal/osal_none.h @@ -58,6 +58,9 @@ extern "C" { #endif +// variable that retains value after OSAL blocking service need to declare with OSAL_VAR +#define OSAL_VAR static + //--------------------------------------------------------------------+ // TICK API //--------------------------------------------------------------------+ -- cgit v1.3.1