diff options
| author | hathach <[email protected]> | 2018-03-22 14:15:16 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-03-22 14:15:16 +0700 |
| commit | ce2fc0470cbdbd64faa7b4460d3745d78722d49f (patch) | |
| tree | 326ea97e071159c3a0bdb04adca454507172f908 /tinyusb/osal/osal_none.h | |
| parent | 17a227ca90ff05f0929cff339cee30d69878c149 (diff) | |
improve usbd control transfer
Diffstat (limited to 'tinyusb/osal/osal_none.h')
| -rw-r--r-- | tinyusb/osal/osal_none.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tinyusb/osal/osal_none.h b/tinyusb/osal/osal_none.h index f2f3dcefc..9bf7367ec 100644 --- a/tinyusb/osal/osal_none.h +++ b/tinyusb/osal/osal_none.h @@ -107,19 +107,19 @@ static inline osal_task_t osal_task_create(osal_func_t code, const char* name, u // SUBTASK (a sub function that uses OS blocking services & called by a task
//--------------------------------------------------------------------+
#define OSAL_SUBTASK_BEGIN OSAL_TASK_BEGIN
-#define OSAL_SUBTASK_END \
- default: TASK_RESTART; break; \
- }}\
+
+#define OSAL_SUBTASK_END \
+ default: TASK_RESTART; break; \
+ }} \
return TUSB_ERROR_NONE;
-#define SUBTASK_INVOKE(_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;\
- }\
+#define SUBTASK_INVOKE(_subtask, _status) \
+ do { \
+ _state = __LINE__; case __LINE__: \
+ { \
+ (_status) = _subtask; /* invoke sub task */ \
+ if (TUSB_ERROR_OSAL_WAITING == (_status)) return TUSB_ERROR_OSAL_WAITING; \
+ } \
}while(0)
//------------- Sub Task Assert -------------//
|
