summaryrefslogtreecommitdiff
path: root/tinyusb/host
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-03-04 15:01:33 +0700
committerhathach <[email protected]>2013-03-04 15:01:33 +0700
commit656da2992ded914c70da849f9f7a1571dd2b91f4 (patch)
tree3e00db7c1c2cf57276fd61ae833e54ff1ea67364 /tinyusb/host
parent5207875addf972f8323b51318975c6c6f3861dd4 (diff)
add alignof to compilier specific
add static_assert support for IAR (built-in support)
Diffstat (limited to 'tinyusb/host')
-rw-r--r--tinyusb/host/ehci/ehci.c6
-rw-r--r--tinyusb/host/ehci/ehci.h5
2 files changed, 11 insertions, 0 deletions
diff --git a/tinyusb/host/ehci/ehci.c b/tinyusb/host/ehci/ehci.c
index 64c56f341..961dc6517 100644
--- a/tinyusb/host/ehci/ehci.c
+++ b/tinyusb/host/ehci/ehci.c
@@ -59,6 +59,12 @@ STATIC_ ehci_link_t period_frame_list0[EHCI_FRAMELIST_SIZE] ATTR_ALIGNED(4096) T
STATIC_ ehci_link_t period_frame_list1[EHCI_FRAMELIST_SIZE] ATTR_ALIGNED(4096) TUSB_CFG_ATTR_USBRAM;
#endif
+//------------- Validation -------------//
+STATIC_ASSERT( ALIGN_OF(period_frame_list0) == 4096, "Period Framelist must be 4k alginment");
+#if TUSB_CFG_HOST_CONTROLLER_NUM > 1
+STATIC_ASSERT( ALIGN_OF(period_frame_list1) == 4096, "Period Framelist must be 4k alginment");
+#endif
+
//--------------------------------------------------------------------+
// IMPLEMENTATION
//--------------------------------------------------------------------+
diff --git a/tinyusb/host/ehci/ehci.h b/tinyusb/host/ehci/ehci.h
index a0b1e635b..7f528eb06 100644
--- a/tinyusb/host/ehci/ehci.h
+++ b/tinyusb/host/ehci/ehci.h
@@ -92,6 +92,11 @@
#endif
//--------------------------------------------------------------------+
+// USBH-HCD API
+//--------------------------------------------------------------------+
+void hcd_isr(uint8_t hostid);
+
+//--------------------------------------------------------------------+
// EHCI Data Structure
//--------------------------------------------------------------------+
enum ehci_queue_element_type_{