diff options
| author | hathach <[email protected]> | 2013-07-05 20:21:24 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-07-05 20:21:24 +0700 |
| commit | e4ae45359d41cd035818c96d2d68208576f938cf (patch) | |
| tree | fd0bc6100ea7ee1538ce40208ae4483e2c1bb100 /tinyusb/osal | |
| parent | 355fd7e64867093ee5974056c7735a60dd0f64e7 (diff) | |
fix bug with RNDIS class open using non-static variable p_cdc
fix bug with SUBTASK_EXIT with single if (add do while wrapper)
add payloay message
able to send initialize & wait on notification pipe & get initialize cmpt
Diffstat (limited to 'tinyusb/osal')
| -rw-r--r-- | tinyusb/osal/osal_none.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/tinyusb/osal/osal_none.h b/tinyusb/osal/osal_none.h index 79acb8a8e..4eddffd1e 100644 --- a/tinyusb/osal/osal_none.h +++ b/tinyusb/osal/osal_none.h @@ -123,21 +123,23 @@ static inline volatile uint32_t osal_tick_get(void) //--------------------------------------------------------------------+ //------------- Sub Task -------------// #define OSAL_SUBTASK_INVOKED_AND_WAIT(subtask, status) \ - do {\ - state = __LINE__; case __LINE__:\ - {\ - status = subtask; /* invoke sub task */\ - if (TUSB_ERROR_OSAL_WAITING == status) /* sub task not finished -> continue waiting */\ - return TUSB_ERROR_OSAL_WAITING;\ - }\ - }while(0) + do {\ + state = __LINE__; case __LINE__:\ + {\ + status = subtask; /* invoke sub task */\ + if (TUSB_ERROR_OSAL_WAITING == status) /* sub task not finished -> continue waiting */\ + return TUSB_ERROR_OSAL_WAITING;\ + }\ + }while(0) #define OSAL_SUBTASK_BEGIN OSAL_TASK_LOOP_BEGIN #define OSAL_SUBTASK_END OSAL_TASK_LOOP_END //------------- Sub Task Assert -------------// #define SUBTASK_EXIT(error) \ - TASK_RESTART; return error + do {\ + TASK_RESTART; return error;\ + }while(0) #define _SUBTASK_ASSERT_ERROR_HANDLER(error, func_call) \ func_call; TASK_RESTART; return error |
