a fix to IAR's incapability to force struct's member on specified alignment

This commit is contained in:
hathach
2014-03-12 14:28:43 +07:00
parent 9ba209cda0
commit b6e4c0d348
3 changed files with 303 additions and 293 deletions

View File

@@ -53,7 +53,17 @@
//--------------------------------------------------------------------+
typedef struct {
ATTR_USB_MIN_ALIGNMENT msc_cmd_block_wrapper_t cbw;
#if defined (__ICCARM__) && (TUSB_CFG_MCU == MCU_LPC11UXX || TUSB_CFG_MCU == MCU_LPC13UXX)
uint8_t padding1[64-sizeof(msc_cmd_block_wrapper_t)]; // IAR cannot align struct's member
#endif
ATTR_USB_MIN_ALIGNMENT msc_cmd_status_wrapper_t csw;
#if defined (__ICCARM__) && (TUSB_CFG_MCU == MCU_LPC11UXX || TUSB_CFG_MCU == MCU_LPC13UXX)
uint8_t padding2[64-sizeof(msc_cmd_status_wrapper_t)]; // IAR cannot align struct's member
#endif
ATTR_USB_MIN_ALIGNMENT uint8_t max_lun; // can STALL for one LUN
uint8_t interface_number;