summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-06-06 10:39:37 +0700
committerhathach <[email protected]>2019-06-06 10:39:37 +0700
commit13e01c7dca1e72097be1723676b086be29d0e622 (patch)
tree699e883134aae84d54fe592346b2bb4eb92acb7c /src/device
parent90fea785c6aa60fdfd398fee262bb06c69a010b7 (diff)
add TU_ prefix to compiler ATTR to prevent name conflict with application
Diffstat (limited to 'src/device')
-rw-r--r--src/device/dcd.h2
-rw-r--r--src/device/usbd.c2
-rw-r--r--src/device/usbd.h8
3 files changed, 6 insertions, 6 deletions
diff --git a/src/device/dcd.h b/src/device/dcd.h
index bd7088fe4..0ed4a77d9 100644
--- a/src/device/dcd.h
+++ b/src/device/dcd.h
@@ -52,7 +52,7 @@ typedef enum
USBD_EVENT_FUNC_CALL
} dcd_eventid_t;
-typedef struct ATTR_ALIGNED(4)
+typedef struct TU_ATTR_ALIGNED(4)
{
uint8_t rhport;
uint8_t event_id;
diff --git a/src/device/usbd.c b/src/device/usbd.c
index e22de4728..38838b61f 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -40,7 +40,7 @@
// Device Data
//--------------------------------------------------------------------+
typedef struct {
- struct ATTR_PACKED
+ struct TU_ATTR_PACKED
{
volatile uint8_t connected : 1;
volatile uint8_t configured : 1;
diff --git a/src/device/usbd.h b/src/device/usbd.h
index 46143a215..4b10f1a0e 100644
--- a/src/device/usbd.h
+++ b/src/device/usbd.h
@@ -76,17 +76,17 @@ uint8_t const * tud_descriptor_configuration_cb(uint8_t index);
uint16_t const* tud_descriptor_string_cb(uint8_t index);
// Invoked when device is mounted (configured)
-ATTR_WEAK void tud_mount_cb(void);
+TU_ATTR_WEAK void tud_mount_cb(void);
// Invoked when device is unmounted
-ATTR_WEAK void tud_umount_cb(void);
+TU_ATTR_WEAK void tud_umount_cb(void);
// Invoked when usb bus is suspended
// Within 7ms, device must draw an average of current less than 2.5 mA from bus
-ATTR_WEAK void tud_suspend_cb(bool remote_wakeup_en);
+TU_ATTR_WEAK void tud_suspend_cb(bool remote_wakeup_en);
// Invoked when usb bus is resumed
-ATTR_WEAK void tud_resume_cb(void);
+TU_ATTR_WEAK void tud_resume_cb(void);
//--------------------------------------------------------------------+
// Interface Descriptor Template