hathach 4 лет назад
Родитель
Сommit
4e50ceba48
4 измененных файлов с 18 добавлено и 18 удалено
  1. 10 10
      src/class/cdc/cdc.h
  2. 4 4
      src/common/tusb_compiler.h
  3. 2 2
      src/common/tusb_types.h
  4. 2 2
      src/portable/renesas/usba/dcd_usba.c

+ 10 - 10
src/class/cdc/cdc.h

@@ -215,7 +215,7 @@ typedef enum
 // Class Specific Functional Descriptor (Communication Interface)
 // Class Specific Functional Descriptor (Communication Interface)
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 
 
-TU_PACK_STRUCT_BEGIN  // Start of definition of packed structs (used by the CCRX toolchain)
+TU_ATTR_PACKED_BEGIN  // Start of definition of packed structs (used by the CCRX toolchain)
 
 
 /// Header Functional Descriptor (Communication Interface)
 /// Header Functional Descriptor (Communication Interface)
 typedef struct TU_ATTR_PACKED
 typedef struct TU_ATTR_PACKED
@@ -236,10 +236,10 @@ typedef struct TU_ATTR_PACKED
   uint8_t bSubordinateInterface    ; ///< Array of Interface number of Data Interface
   uint8_t bSubordinateInterface    ; ///< Array of Interface number of Data Interface
 }cdc_desc_func_union_t;
 }cdc_desc_func_union_t;
 
 
-TU_PACK_STRUCT_END  // End of definition of packed structs (used by the CCRX toolchain)
+TU_ATTR_PACKED_END  // End of definition of packed structs (used by the CCRX toolchain)
 
 
 #define cdc_desc_func_union_n_t(no_slave)\
 #define cdc_desc_func_union_n_t(no_slave)\
- TU_PACK_STRUCT_BEGIN                      \
+ TU_ATTR_PACKED_BEGIN                      \
  struct TU_ATTR_PACKED {                   \
  struct TU_ATTR_PACKED {                   \
   uint8_t bLength                         ;\
   uint8_t bLength                         ;\
   uint8_t bDescriptorType                 ;\
   uint8_t bDescriptorType                 ;\
@@ -247,10 +247,10 @@ TU_PACK_STRUCT_END  // End of definition of packed structs (used by the CCRX too
   uint8_t bControlInterface               ;\
   uint8_t bControlInterface               ;\
   uint8_t bSubordinateInterface[no_slave] ;\
   uint8_t bSubordinateInterface[no_slave] ;\
 }                                          \
 }                                          \
-TU_PACK_STRUCT_END
+TU_ATTR_PACKED_END
 
 
 
 
-TU_PACK_STRUCT_BEGIN  // Start of definition of packed structs (used by the CCRX toolchain)
+TU_ATTR_PACKED_BEGIN  // Start of definition of packed structs (used by the CCRX toolchain)
 
 
 /// Country Selection Functional Descriptor (Communication Interface)
 /// Country Selection Functional Descriptor (Communication Interface)
 typedef struct TU_ATTR_PACKED
 typedef struct TU_ATTR_PACKED
@@ -262,10 +262,10 @@ typedef struct TU_ATTR_PACKED
   uint16_t wCountryCode       ; ///< Country code in the format as defined in [ISO3166], release date as specified inoffset 3 for the first supported country.
   uint16_t wCountryCode       ; ///< Country code in the format as defined in [ISO3166], release date as specified inoffset 3 for the first supported country.
 }cdc_desc_func_country_selection_t;
 }cdc_desc_func_country_selection_t;
 
 
-TU_PACK_STRUCT_END  // End of definition of packed structs (used by the CCRX toolchain)
+TU_ATTR_PACKED_END  // End of definition of packed structs (used by the CCRX toolchain)
 
 
 #define cdc_desc_func_country_selection_n_t(no_country) \
 #define cdc_desc_func_country_selection_n_t(no_country) \
-  TU_PACK_STRUCT_BEGIN               \
+  TU_ATTR_PACKED_BEGIN               \
   struct TU_ATTR_PACKED {            \
   struct TU_ATTR_PACKED {            \
   uint8_t bLength                   ;\
   uint8_t bLength                   ;\
   uint8_t bDescriptorType           ;\
   uint8_t bDescriptorType           ;\
@@ -273,13 +273,13 @@ TU_PACK_STRUCT_END  // End of definition of packed structs (used by the CCRX too
   uint8_t iCountryCodeRelDate       ;\
   uint8_t iCountryCodeRelDate       ;\
   uint16_t wCountryCode[no_country] ;\
   uint16_t wCountryCode[no_country] ;\
 }                                    \
 }                                    \
-TU_PACK_STRUCT_END
+TU_ATTR_PACKED_END
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // PUBLIC SWITCHED TELEPHONE NETWORK (PSTN) SUBCLASS
 // PUBLIC SWITCHED TELEPHONE NETWORK (PSTN) SUBCLASS
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 
 
-TU_PACK_STRUCT_BEGIN  // Start of definition of packed structs (used by the CCRX toolchain)
+TU_ATTR_PACKED_BEGIN  // Start of definition of packed structs (used by the CCRX toolchain)
 
 
 /// \brief Call Management Functional Descriptor
 /// \brief Call Management Functional Descriptor
 /// \details This functional descriptor describes the processing of calls for the Communications Class interface.
 /// \details This functional descriptor describes the processing of calls for the Communications Class interface.
@@ -419,7 +419,7 @@ typedef struct TU_ATTR_PACKED
 } cdc_line_control_state_t;
 } cdc_line_control_state_t;
 TU_BIT_FIELD_ORDER_END
 TU_BIT_FIELD_ORDER_END
 
 
-TU_PACK_STRUCT_END  // End of definition of packed structs (used by the CCRX toolchain)
+TU_ATTR_PACKED_END  // End of definition of packed structs (used by the CCRX toolchain)
 
 
 
 
 TU_VERIFY_STATIC(sizeof(cdc_line_control_state_t) == 2, "size is not correct");
 TU_VERIFY_STATIC(sizeof(cdc_line_control_state_t) == 2, "size is not correct");

+ 4 - 4
src/common/tusb_compiler.h

@@ -79,8 +79,8 @@
   #define TU_ATTR_UNUSED                __attribute__ ((unused))           // Function/Variable is meant to be possibly unused
   #define TU_ATTR_UNUSED                __attribute__ ((unused))           // Function/Variable is meant to be possibly unused
   #define TU_ATTR_USED                  __attribute__ ((used))             // Function/Variable is meant to be used
   #define TU_ATTR_USED                  __attribute__ ((used))             // Function/Variable is meant to be used
 
 
-  #define TU_PACK_STRUCT_BEGIN
-  #define TU_PACK_STRUCT_END
+  #define TU_ATTR_PACKED_BEGIN
+  #define TU_ATTR_PACKED_END
 
 
   #define TU_BIT_FIELD_ORDER_BEGIN
   #define TU_BIT_FIELD_ORDER_BEGIN
   #define TU_BIT_FIELD_ORDER_END
   #define TU_BIT_FIELD_ORDER_END
@@ -150,8 +150,8 @@
   #define TU_ATTR_UNUSED
   #define TU_ATTR_UNUSED
   #define TU_ATTR_USED
   #define TU_ATTR_USED
 
 
-  #define TU_PACK_STRUCT_BEGIN _Pragma("pack")
-  #define TU_PACK_STRUCT_END _Pragma("packoption")
+  #define TU_ATTR_PACKED_BEGIN _Pragma("pack")
+  #define TU_ATTR_PACKED_END _Pragma("packoption")
 
 
   #define TU_BIT_FIELD_ORDER_BEGIN _Pragma("bit_order right")
   #define TU_BIT_FIELD_ORDER_BEGIN _Pragma("bit_order right")
   #define TU_BIT_FIELD_ORDER_END _Pragma("bit_order")
   #define TU_BIT_FIELD_ORDER_END _Pragma("bit_order")

+ 2 - 2
src/common/tusb_types.h

@@ -262,7 +262,7 @@ enum
 // USB Descriptors
 // USB Descriptors
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 
 
-TU_PACK_STRUCT_BEGIN  // Start of definition of packed structs (used by the CCRX toolchain)
+TU_ATTR_PACKED_BEGIN  // Start of definition of packed structs (used by the CCRX toolchain)
 
 
 /// USB Device Descriptor
 /// USB Device Descriptor
 typedef struct TU_ATTR_PACKED
 typedef struct TU_ATTR_PACKED
@@ -479,7 +479,7 @@ typedef struct TU_ATTR_PACKED{
 } tusb_control_request_t;
 } tusb_control_request_t;
 TU_BIT_FIELD_ORDER_END
 TU_BIT_FIELD_ORDER_END
 
 
-TU_PACK_STRUCT_END  // End of definition of packed structs (used by the CCRX toolchain)
+TU_ATTR_PACKED_END  // End of definition of packed structs (used by the CCRX toolchain)
 
 
 TU_VERIFY_STATIC( sizeof(tusb_control_request_t) == 8, "size is not correct");
 TU_VERIFY_STATIC( sizeof(tusb_control_request_t) == 8, "size is not correct");
 
 

+ 2 - 2
src/portable/renesas/usba/dcd_usba.c

@@ -120,7 +120,7 @@ typedef union {
 } hw_fifo_t;
 } hw_fifo_t;
 TU_BIT_FIELD_ORDER_END
 TU_BIT_FIELD_ORDER_END
 
 
-TU_PACK_STRUCT_BEGIN  // Start of definition of packed structs (used by the CCRX toolchain)
+TU_ATTR_PACKED_BEGIN  // Start of definition of packed structs (used by the CCRX toolchain)
 
 
 TU_BIT_FIELD_ORDER_BEGIN
 TU_BIT_FIELD_ORDER_BEGIN
 typedef struct TU_ATTR_PACKED
 typedef struct TU_ATTR_PACKED
@@ -135,7 +135,7 @@ typedef struct TU_ATTR_PACKED
 } pipe_state_t;
 } pipe_state_t;
 TU_BIT_FIELD_ORDER_END
 TU_BIT_FIELD_ORDER_END
 
 
-TU_PACK_STRUCT_END  // End of definition of packed structs (used by the CCRX toolchain)
+TU_ATTR_PACKED_END  // End of definition of packed structs (used by the CCRX toolchain)
 
 
 typedef struct
 typedef struct
 {
 {