diff options
| author | hathach <[email protected]> | 2014-03-12 16:34:05 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2014-03-12 16:34:05 +0700 |
| commit | 13dd843a9f38736b5407787c6fec2d63a6915841 (patch) | |
| tree | b256ce0090cd6fb94d507cec07764b95c79d9d31 /tinyusb | |
| parent | 1ad138e322073dd47d1401f084035edf32509624 (diff) | |
fix IAR alignment OHCI hcca will occupies the whole 256 (instead of just 252 like the specs)
Diffstat (limited to 'tinyusb')
| -rw-r--r-- | tinyusb/host/ohci/ohci.c | 2 | ||||
| -rw-r--r-- | tinyusb/host/ohci/ohci.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tinyusb/host/ohci/ohci.c b/tinyusb/host/ohci/ohci.c index ab27c6e5a..197f3fb02 100644 --- a/tinyusb/host/ohci/ohci.c +++ b/tinyusb/host/ohci/ohci.c @@ -135,7 +135,7 @@ enum { //--------------------------------------------------------------------+
// INTERNAL OBJECT & FUNCTION DECLARATION
//--------------------------------------------------------------------+
-TUSB_CFG_ATTR_USBRAM STATIC_VAR ohci_data_t ohci_data;
+TUSB_CFG_ATTR_USBRAM ATTR_ALIGNED(256) STATIC_VAR ohci_data_t ohci_data;
static ohci_ed_t * const p_ed_head[] =
{
diff --git a/tinyusb/host/ohci/ohci.h b/tinyusb/host/ohci/ohci.h index 43875dcb3..f03ef94b9 100644 --- a/tinyusb/host/ohci/ohci.h +++ b/tinyusb/host/ohci/ohci.h @@ -77,9 +77,11 @@ typedef struct { volatile uint16_t frame_number;
volatile uint16_t frame_pad;
volatile uint32_t done_head;
- uint8_t reserved[116]; // TODO try to make use of this area if possible
+ 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" );
+
typedef struct {
uint32_t reserved[2];
volatile uint32_t next_td;
|
