add TU_ prefix to compiler ATTR to prevent name conflict with application

This commit is contained in:
hathach
2019-06-06 10:39:37 +07:00
parent 90fea785c6
commit 13e01c7dca
41 changed files with 131 additions and 130 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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