summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2020-11-23 23:25:55 +0700
committerGitHub <[email protected]>2020-11-23 23:25:55 +0700
commit308028e17cb4ba5e93413431a51bbe94d2afcc53 (patch)
tree79ac511381d953b0ef35e70924da375b4bb0320b /src/common
parent339b1a772350321d0f9d4f84e93c5360247e3f17 (diff)
parentb870d932e5e1c6ece4227a5d49cc71e53a744149 (diff)
Merge branch 'master' into cdc_without_dtr
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_error.h1
-rw-r--r--src/common/tusb_types.h11
2 files changed, 11 insertions, 1 deletions
diff --git a/src/common/tusb_error.h b/src/common/tusb_error.h
index f600c4ae3..d7ad8c318 100644
--- a/src/common/tusb_error.h
+++ b/src/common/tusb_error.h
@@ -54,6 +54,7 @@
ENTRY(TUSB_ERROR_FAILED )\
/// \brief Error Code returned
+/// TODO obsolete and to be remove
typedef enum
{
ERROR_TABLE(ERROR_ENUM)
diff --git a/src/common/tusb_types.h b/src/common/tusb_types.h
index 70d0db942..5ab15aa3c 100644
--- a/src/common/tusb_types.h
+++ b/src/common/tusb_types.h
@@ -250,6 +250,13 @@ typedef enum
MS_OS_20_FEATURE_VENDOR_REVISION = 0x08
} microsoft_os_20_type_t;
+enum
+{
+ CONTROL_STAGE_SETUP,
+ CONTROL_STAGE_DATA,
+ CONTROL_STAGE_ACK
+};
+
//--------------------------------------------------------------------+
// USB Descriptors
//--------------------------------------------------------------------+
@@ -276,6 +283,8 @@ typedef struct TU_ATTR_PACKED
uint8_t bNumConfigurations ; ///< Number of possible configurations.
} tusb_desc_device_t;
+TU_VERIFY_STATIC( sizeof(tusb_desc_device_t) == 18, "size is not correct");
+
// USB Binary Device Object Store (BOS) Descriptor
typedef struct TU_ATTR_PACKED
{
@@ -431,7 +440,7 @@ typedef struct TU_ATTR_PACKED{
uint16_t wLength;
} tusb_control_request_t;
-TU_VERIFY_STATIC( sizeof(tusb_control_request_t) == 8, "mostly compiler option issue");
+TU_VERIFY_STATIC( sizeof(tusb_control_request_t) == 8, "size is not correct");
// TODO move to somewhere suitable
static inline uint8_t bm_request_type(uint8_t direction, uint8_t type, uint8_t recipient)