- add tud_cdc_n_ready() though not used
- usbd now change _usbd_dev.cfg_num before calling driver's open()
This commit is contained in:
		| @@ -56,8 +56,8 @@ | ||||
|  *   #define TU_VERIFY(cond)                  if(cond) return false; | ||||
|  *   #define TU_VERIFY(cond,ret)              if(cond) return ret; | ||||
|  * | ||||
|  *   #define TU_ASSERT(cond)                  if(cond) {_MESS_FAILED(); TU_BREAKPOINT(), return false;} | ||||
|  *   #define TU_ASSERT(cond,ret)              if(cond) {_MESS_FAILED(); TU_BREAKPOINT(), return ret;} | ||||
|  *   #define TU_ASSERT(cond)                  if(cond) {TU_MESS_FAILED(); TU_BREAKPOINT(), return false;} | ||||
|  *   #define TU_ASSERT(cond,ret)              if(cond) {TU_MESS_FAILED(); TU_BREAKPOINT(), return ret;} | ||||
|  *------------------------------------------------------------------*/ | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| @@ -70,9 +70,9 @@ | ||||
|  | ||||
| #if CFG_TUSB_DEBUG | ||||
|   #include <stdio.h> | ||||
|   #define _MESS_FAILED()    tu_printf("%s %d: ASSERT FAILED\r\n", __func__, __LINE__) | ||||
|   #define TU_MESS_FAILED()    tu_printf("%s %d: ASSERT FAILED\r\n", __func__, __LINE__) | ||||
| #else | ||||
|   #define _MESS_FAILED() do {} while (0) | ||||
|   #define TU_MESS_FAILED() do {} while (0) | ||||
| #endif | ||||
|  | ||||
| // Halt CPU (breakpoint) when hitting error, only apply for Cortex M3, M4, M7, M33. M55 | ||||
| @@ -119,7 +119,7 @@ | ||||
|  *------------------------------------------------------------------*/ | ||||
| #define TU_ASSERT_DEFINE(_cond, _ret)                                 \ | ||||
|   do {                                                                \ | ||||
|     if ( !(_cond) ) { _MESS_FAILED(); TU_BREAKPOINT(); return _ret; } \ | ||||
|     if ( !(_cond) ) { TU_MESS_FAILED(); TU_BREAKPOINT(); return _ret; } \ | ||||
|   } while(0) | ||||
|  | ||||
| #define TU_ASSERT_1ARGS(_cond)         TU_ASSERT_DEFINE(_cond, false) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 hathach
					hathach