rename VERIFY to TU_VERIFY to avoid conflict with application

This commit is contained in:
hathach
2018-08-13 18:10:23 +07:00
parent b07124c623
commit e07b1acbed
29 changed files with 119 additions and 119 deletions

View File

@@ -64,7 +64,7 @@ CFG_TUSB_ATTR_USBRAM STATIC_VAR ehci_data_t ehci_data;
CFG_TUSB_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
VERIFY_STATIC( ALIGN_OF(period_frame_list0) == 4096, "Period Framelist must be 4k alginment"); // validation
TU_VERIFY_STATIC( ALIGN_OF(period_frame_list0) == 4096, "Period Framelist must be 4k alginment"); // validation
#endif
#endif
@@ -72,7 +72,7 @@ CFG_TUSB_ATTR_USBRAM STATIC_VAR ehci_data_t ehci_data;
CFG_TUSB_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
VERIFY_STATIC( ALIGN_OF(period_frame_list1) == 4096, "Period Framelist must be 4k alginment"); // validation
TU_VERIFY_STATIC( ALIGN_OF(period_frame_list1) == 4096, "Period Framelist must be 4k alginment"); // validation
#endif
#endif
#endif

View File

@@ -81,7 +81,7 @@ enum {
};
//------------- Validation -------------//
VERIFY_STATIC(EHCI_CFG_FRAMELIST_SIZE_BITS <= 7, "incorrect value");
TU_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)
VERIFY_STATIC( sizeof(ehci_qtd_t) == 32, "size is not correct" );
TU_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;
VERIFY_STATIC( sizeof(ehci_qhd_t) == 64, "size is not correct" );
TU_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;
VERIFY_STATIC( sizeof(ehci_itd_t) == 64, "size is not correct" );
TU_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;
VERIFY_STATIC( sizeof(ehci_sitd_t) == 32, "size is not correct" );
TU_VERIFY_STATIC( sizeof(ehci_sitd_t) == 32, "size is not correct" );
//--------------------------------------------------------------------+
// EHCI Operational Register

View File

@@ -104,7 +104,7 @@ typedef struct ATTR_PACKED{
uint8_t PortPwrCtrlMask; // just for compatibility, should be 0xff
} descriptor_hub_desc_t;
VERIFY_STATIC( sizeof(descriptor_hub_desc_t) == 9, "size is not correct");
TU_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;
VERIFY_STATIC( sizeof(hub_status_response_t) == 4, "size is not correct");
TU_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;
VERIFY_STATIC( sizeof(hub_port_status_response_t) == 4, "size is not correct");
TU_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);

View File

@@ -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)
VERIFY_STATIC( sizeof(ohci_hcca_t) == 256, "size is not correct" );
TU_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;
VERIFY_STATIC( sizeof(ohci_gtd_t) == 16, "size is not correct" );
TU_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;
VERIFY_STATIC( sizeof(ohci_ed_t) == 16, "size is not correct" );
TU_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;
VERIFY_STATIC( sizeof(ochi_itd_t) == 32, "size is not correct" );
TU_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;
VERIFY_STATIC( sizeof(ohci_registers_t) == 0x5c, "size is not correct");
TU_VERIFY_STATIC( sizeof(ohci_registers_t) == 0x5c, "size is not correct");
#ifdef __cplusplus
}