diff options
| author | hathach <[email protected]> | 2018-03-28 14:16:14 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-03-28 14:23:38 +0700 |
| commit | 43ac71179564fc021c2b77408b7f6ba594626007 (patch) | |
| tree | 562ea32e78e5af065a823786f57d6326c2c9b97a /tinyusb/host | |
| parent | 9cacb93bd829bfd3bca0cf7668e0c63053261fe7 (diff) | |
rename STATIC_ASSERT to VERIFY_STATIC to avoid name conflict with other codes
Diffstat (limited to 'tinyusb/host')
| -rw-r--r-- | tinyusb/host/ehci/ehci.c | 4 | ||||
| -rw-r--r-- | tinyusb/host/ehci/ehci.h | 10 | ||||
| -rw-r--r-- | tinyusb/host/hub.h | 6 | ||||
| -rw-r--r-- | tinyusb/host/ohci/ohci.h | 10 |
4 files changed, 15 insertions, 15 deletions
diff --git a/tinyusb/host/ehci/ehci.c b/tinyusb/host/ehci/ehci.c index e0abeb331..6ace7c76a 100644 --- a/tinyusb/host/ehci/ehci.c +++ b/tinyusb/host/ehci/ehci.c @@ -65,7 +65,7 @@ TUSB_CFG_ATTR_USBRAM STATIC_VAR ehci_data_t ehci_data; TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(4096) STATIC_VAR ehci_link_t period_frame_list0[EHCI_FRAMELIST_SIZE];
#ifndef __ICCARM__ // IAR cannot able to determine the alignment with datalignment pragma
- STATIC_ASSERT( ALIGN_OF(period_frame_list0) == 4096, "Period Framelist must be 4k alginment"); // validation
+ VERIFY_STATIC( ALIGN_OF(period_frame_list0) == 4096, "Period Framelist must be 4k alginment"); // validation
#endif
#endif
@@ -73,7 +73,7 @@ TUSB_CFG_ATTR_USBRAM STATIC_VAR ehci_data_t ehci_data; TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(4096) STATIC_VAR ehci_link_t period_frame_list1[EHCI_FRAMELIST_SIZE];
#ifndef __ICCARM__ // IAR cannot able to determine the alignment with datalignment pragma
- STATIC_ASSERT( ALIGN_OF(period_frame_list1) == 4096, "Period Framelist must be 4k alginment"); // validation
+ VERIFY_STATIC( ALIGN_OF(period_frame_list1) == 4096, "Period Framelist must be 4k alginment"); // validation
#endif
#endif
#endif
diff --git a/tinyusb/host/ehci/ehci.h b/tinyusb/host/ehci/ehci.h index aa91d629a..5b1cc7987 100644 --- a/tinyusb/host/ehci/ehci.h +++ b/tinyusb/host/ehci/ehci.h @@ -81,7 +81,7 @@ enum { }; //------------- Validation -------------// -STATIC_ASSERT(EHCI_CFG_FRAMELIST_SIZE_BITS <= 7, "incorrect value"); +VERIFY_STATIC(EHCI_CFG_FRAMELIST_SIZE_BITS <= 7, "incorrect value"); //--------------------------------------------------------------------+ // EHCI Data Structure @@ -150,7 +150,7 @@ typedef struct { uint32_t buffer[5]; } ehci_qtd_t; // XXX qtd is used to declare overlay in ehci_qhd_t -> cannot be declared with ATTR_ALIGNED(32) -STATIC_ASSERT( sizeof(ehci_qtd_t) == 32, "size is not correct" ); +VERIFY_STATIC( sizeof(ehci_qtd_t) == 32, "size is not correct" ); /// Queue Head (section 3.6) typedef struct ATTR_ALIGNED(32) { @@ -202,7 +202,7 @@ typedef struct ATTR_ALIGNED(32) { ehci_qtd_t * volatile p_qtd_list_tail; // tail of the scheduled TD list } ehci_qhd_t; -STATIC_ASSERT( sizeof(ehci_qhd_t) == 64, "size is not correct" ); +VERIFY_STATIC( sizeof(ehci_qhd_t) == 64, "size is not correct" ); /// Highspeed Isochronous Transfer Descriptor (section 3.3) typedef struct ATTR_ALIGNED(32) { @@ -234,7 +234,7 @@ typedef struct ATTR_ALIGNED(32) { // uint32_t reserved[6]; } ehci_itd_t; -STATIC_ASSERT( sizeof(ehci_itd_t) == 64, "size is not correct" ); +VERIFY_STATIC( sizeof(ehci_itd_t) == 64, "size is not correct" ); /// Split (Full-Speed) Isochronous Transfer Descriptor typedef struct ATTR_ALIGNED(32) { @@ -298,7 +298,7 @@ typedef struct ATTR_ALIGNED(32) { uint8_t reserved2[2]; } ehci_sitd_t; -STATIC_ASSERT( sizeof(ehci_sitd_t) == 32, "size is not correct" ); +VERIFY_STATIC( sizeof(ehci_sitd_t) == 32, "size is not correct" ); //--------------------------------------------------------------------+ // EHCI Operational Register diff --git a/tinyusb/host/hub.h b/tinyusb/host/hub.h index fb7c74e3d..b8499275c 100644 --- a/tinyusb/host/hub.h +++ b/tinyusb/host/hub.h @@ -104,7 +104,7 @@ typedef struct ATTR_PACKED{ uint8_t PortPwrCtrlMask; // just for compatibility, should be 0xff
} descriptor_hub_desc_t;
-STATIC_ASSERT( sizeof(descriptor_hub_desc_t) == 9, "size is not correct");
+VERIFY_STATIC( sizeof(descriptor_hub_desc_t) == 9, "size is not correct");
enum {
HUB_REQUEST_GET_STATUS = 0 ,
@@ -157,7 +157,7 @@ typedef struct { } status, status_change;
} hub_status_response_t;
-STATIC_ASSERT( sizeof(hub_status_response_t) == 4, "size is not correct");
+VERIFY_STATIC( sizeof(hub_status_response_t) == 4, "size is not correct");
// data in response of HUB_REQUEST_GET_STATUS, wIndex = Port num
typedef struct {
@@ -182,7 +182,7 @@ typedef struct { } status_current, status_change;
} hub_port_status_response_t;
-STATIC_ASSERT( sizeof(hub_port_status_response_t) == 4, "size is not correct");
+VERIFY_STATIC( sizeof(hub_port_status_response_t) == 4, "size is not correct");
tusb_error_t hub_port_reset_subtask(uint8_t hub_addr, uint8_t hub_port);
tusb_error_t hub_port_clear_feature_subtask(uint8_t hub_addr, uint8_t hub_port, uint8_t feature);
diff --git a/tinyusb/host/ohci/ohci.h b/tinyusb/host/ohci/ohci.h index 6c73326af..96ee6f90c 100644 --- a/tinyusb/host/ohci/ohci.h +++ b/tinyusb/host/ohci/ohci.h @@ -79,7 +79,7 @@ typedef struct { uint8_t reserved[116+4]; // TODO try to make use of this area if possible, extra 4 byte to make the whole struct size = 256
}ohci_hcca_t; // ATTR_ALIGNED(256)
-STATIC_ASSERT( sizeof(ohci_hcca_t) == 256, "size is not correct" );
+VERIFY_STATIC( sizeof(ohci_hcca_t) == 256, "size is not correct" );
typedef struct {
uint32_t reserved[2];
@@ -112,7 +112,7 @@ typedef struct ATTR_ALIGNED(16) { uint8_t* buffer_end;
} ohci_gtd_t;
-STATIC_ASSERT( sizeof(ohci_gtd_t) == 16, "size is not correct" );
+VERIFY_STATIC( sizeof(ohci_gtd_t) == 16, "size is not correct" );
typedef struct ATTR_ALIGNED(16) {
//------------- Word 0 -------------//
@@ -153,7 +153,7 @@ typedef struct ATTR_ALIGNED(16) { uint32_t next_ed; // 4 lsb bits are free to use
} ohci_ed_t;
-STATIC_ASSERT( sizeof(ohci_ed_t) == 16, "size is not correct" );
+VERIFY_STATIC( sizeof(ohci_ed_t) == 16, "size is not correct" );
typedef struct ATTR_ALIGNED(32) {
/*---------- Word 1 ----------*/
@@ -178,7 +178,7 @@ typedef struct ATTR_ALIGNED(32) { volatile uint16_t offset_packetstatus[8];
} ochi_itd_t;
-STATIC_ASSERT( sizeof(ochi_itd_t) == 32, "size is not correct" );
+VERIFY_STATIC( sizeof(ochi_itd_t) == 32, "size is not correct" );
// structure with member alignment required from large to small
typedef struct ATTR_ALIGNED(256) {
@@ -298,7 +298,7 @@ typedef volatile struct };
}ohci_registers_t;
-STATIC_ASSERT( sizeof(ohci_registers_t) == 0x5c, "size is not correct");
+VERIFY_STATIC( sizeof(ohci_registers_t) == 0x5c, "size is not correct");
#ifdef __cplusplus
}
|
