1. support for iar in situation of usb host application
This commit is contained in:
@@ -44,12 +44,12 @@
|
||||
#ifndef __ALIGNED
|
||||
#define __ALIGNED(x) __attribute__((aligned(x)))
|
||||
#endif
|
||||
#elif defined(__ICCARM__)
|
||||
#elif defined(__ICCARM__) || defined(__ICCRX__)
|
||||
#ifndef __USED
|
||||
#if __ICCARM_V8
|
||||
#define __USED __attribute__((used))
|
||||
#else
|
||||
#define __USED _Pragma("__root")
|
||||
#define __USED __root
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -689,6 +689,11 @@ int usbh_initialize(void)
|
||||
extern uint32_t __usbh_class_info_end__;
|
||||
usbh_class_info_table_begin = (struct usbh_class_info *)&__usbh_class_info_start__;
|
||||
usbh_class_info_table_end = (struct usbh_class_info *)&__usbh_class_info_end__;
|
||||
#elif defined(__ICCARM__) || defined(__ICCRX__)
|
||||
extern uint32_t __usbh_class_info_start__;
|
||||
extern uint32_t __usbh_class_info_end__;
|
||||
usbh_class_info_table_begin = (struct usbh_class_info *)__section_begin("usbh_class_info");
|
||||
usbh_class_info_table_end = (struct usbh_class_info *)__section_end("usbh_class_info");
|
||||
#endif
|
||||
|
||||
/* devaddr 1 is for roothub */
|
||||
|
||||
@@ -39,6 +39,9 @@ extern "C" {
|
||||
#define CLASS_INFO_DEFINE __attribute__((section("usbh_class_info"))) __USED __ALIGNED(1)
|
||||
#elif defined(__GNUC__)
|
||||
#define CLASS_INFO_DEFINE __attribute__((section(".usbh_class_info"))) __USED __ALIGNED(1)
|
||||
#elif defined(__ICCARM__) || defined(__ICCRX__)
|
||||
#pragma section="usbh_class_info"
|
||||
#define CLASS_INFO_DEFINE __attribute__((section("usbh_class_info"))) __USED __ALIGNED(1)
|
||||
#endif
|
||||
|
||||
static inline void usbh_control_urb_fill(struct usbh_urb *urb,
|
||||
|
||||
Reference in New Issue
Block a user