diff --git a/targets/TARGET_Maxim/USBPhyHw.h b/targets/TARGET_Maxim/USBPhyHw.h index 1476fa7..15a71f4 100644 --- a/targets/TARGET_Maxim/USBPhyHw.h +++ b/targets/TARGET_Maxim/USBPhyHw.h @@ -18,7 +18,6 @@ #ifndef USBPHYHW_H #define USBPHYHW_H -#include "mbed.h" #include "USBPhy.h" diff --git a/targets/TARGET_Maxim/USBPhy_Maxim.cpp b/targets/TARGET_Maxim/USBPhy_Maxim.cpp index be1f8da..e2fbd79 100644 --- a/targets/TARGET_Maxim/USBPhy_Maxim.cpp +++ b/targets/TARGET_Maxim/USBPhy_Maxim.cpp @@ -18,6 +18,7 @@ #if defined(DEVICE_USBDEVICE) && (DEVICE_USBDEVICE) && \ (defined(TARGET_MAX32620) || defined(TARGET_MAX32625) || defined(TARGET_MAX32630)) +#include "mbed.h" #include "USBPhyHw.h" #include "usb_phy_api.h" #include "USBEndpoints_Maxim.h" @@ -57,19 +58,11 @@ } control_state; // Static storage for endpoint buffer descriptor table. Must be 512 byte aligned for DMA. -#ifdef __IAR_SYSTEMS_ICC__ -#pragma data_alignment = 512 -#else -__attribute__ ((aligned (512))) -#endif +MBED_ALIGN(512) ep_buffer_descriptor_t ep_buffer_descriptor; // static storage for temporary data buffers. Must be 32 byte aligned. -#ifdef __IAR_SYSTEMS_ICC__ -#pragma data_alignment = 4 -#else -__attribute__ ((aligned (4))) -#endif +MBED_ALIGN(4) static uint8_t aligned_buffer[NUMBER_OF_LOGICAL_ENDPOINTS][MXC_USB_MAX_PACKET]; static uint8_t* read_buf_addr[NUMBER_OF_LOGICAL_ENDPOINTS]; diff --git a/targets/targets.json b/targets/targets.json index 835ab32..81c4b8d 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -5094,7 +5094,7 @@ "STDIO_MESSAGES", "USTICKER", "MPU", - "SLEEP" + "SLEEP", "USBDEVICE" ], "release_versions": [