From 80398cb4cb5c6dffa69578ba6b83d80a75d01cb4 Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 12 Mar 2018 22:37:12 +0700 Subject: more hcd clean up --- tinyusb/common/tusb_errors.h | 1 + tinyusb/common/tusb_types.h | 2 +- tinyusb/common/verify.h | 14 +++++++------- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'tinyusb/common') diff --git a/tinyusb/common/tusb_errors.h b/tinyusb/common/tusb_errors.h index 3b33d4a9f..0406530b5 100644 --- a/tinyusb/common/tusb_errors.h +++ b/tinyusb/common/tusb_errors.h @@ -86,6 +86,7 @@ ENTRY(TUSB_ERROR_DCD_CONTROL_REQUEST_NOT_SUPPORT )\ ENTRY(TUSB_ERROR_DCD_NOT_ENOUGH_QTD )\ ENTRY(TUSB_ERROR_DCD_OPEN_PIPE_FAILED )\ + ENTRY(TUSB_ERROR_DCD_EDPT_XFER )\ ENTRY(TUSB_ERROR_NOT_SUPPORTED_YET )\ ENTRY(TUSB_ERROR_USBD_DEVICE_NOT_CONFIGURED )\ ENTRY(TUSB_ERROR_NOT_ENOUGH_MEMORY )\ diff --git a/tinyusb/common/tusb_types.h b/tinyusb/common/tusb_types.h index 876c0d9e3..c8dd849e0 100644 --- a/tinyusb/common/tusb_types.h +++ b/tinyusb/common/tusb_types.h @@ -88,7 +88,7 @@ typedef enum TUSB_DESC_DEBUG = 0x0A , TUSB_DESC_INTERFACE_ASSOCIATION = 0x0B , TUSB_DESC_CLASS_SPECIFIC = 0x24 -}tusb_std_descriptor_type_t; +}tusb_desc_type_t; typedef enum { diff --git a/tinyusb/common/verify.h b/tinyusb/common/verify.h index 50915cf9c..f43e0f0a4 100644 --- a/tinyusb/common/verify.h +++ b/tinyusb/common/verify.h @@ -60,11 +60,11 @@ // VERIFY Helper //--------------------------------------------------------------------+ #if TUSB_CFG_DEBUG >= 1 -// #define VERIFY_MESS(format, ...) cprintf("[%08ld] %s: %d: verify failed\n", get_millis(), __func__, __LINE__) - #define VERIFY_MESS(_status) printf("%s: %d: verify failed, error = %s\n", __PRETTY_FUNCTION__, __LINE__, TUSB_ErrorStr[_status]); +// #define _VERIFY_MESS(format, ...) cprintf("[%08ld] %s: %d: verify failed\n", get_millis(), __func__, __LINE__) + #define _VERIFY_MESS(_status) printf("%s: %d: verify failed, error = %s\n", __PRETTY_FUNCTION__, __LINE__, TUSB_ErrorStr[_status]); #define _ASSERT_MESS() printf("%s: %d: assert failed\n", __PRETTY_FUNCTION__, __LINE__); #else - #define VERIFY_MESS(_status) + #define _VERIFY_MESS(_status) #define _ASSERT_MESS() #endif @@ -82,13 +82,13 @@ #define VERIFY_STS_1ARGS(sts) \ do { \ uint32_t _status = (uint32_t)(sts); \ - if ( 0 != _status ) { VERIFY_MESS(_status) return _status; } \ + if ( 0 != _status ) { _VERIFY_MESS(_status) return _status; } \ } while(0) #define VERIFY_STS_2ARGS(sts, _error) \ do { \ uint32_t _status = (uint32_t)(sts); \ - if ( 0 != _status ) { VERIFY_MESS(_status) return _error; }\ + if ( 0 != _status ) { _VERIFY_MESS(_status) return _error; }\ } while(0) /** @@ -106,13 +106,13 @@ #define VERIFY_STS_HDLR_2ARGS(sts, _handler) \ do { \ uint32_t _status = (uint32_t)(sts); \ - if ( 0 != _status ) { VERIFY_MESS(_status) _handler; return _status; }\ + if ( 0 != _status ) { _VERIFY_MESS(_status) _handler; return _status; }\ } while(0) #define VERIFY_STS_HDLR_3ARGS(sts, _handler, _error) \ do { \ uint32_t _status = (uint32_t)(sts); \ - if ( 0 != _status ) { VERIFY_MESS(_status) _handler; return _error; }\ + if ( 0 != _status ) { _VERIFY_MESS(_status) _handler; return _error; }\ } while(0) #define VERIFY_STATUS_HDLR(...) GET_4TH_ARG(__VA_ARGS__, VERIFY_STS_HDLR_3ARGS, VERIFY_STS_HDLR_2ARGS)(__VA_ARGS__) -- cgit v1.3.1