From 7e34950b24d7e6bb75c03c90883546acbe94ad60 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Sat, 13 Oct 2012 17:01:42 -0700 Subject: [PATCH] Relocate compiler #defines for PACKED, ALIGNED, SECTION. --- firmware/usb_performance/usb.h | 3 --- firmware/usb_performance/usb_type.h | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/firmware/usb_performance/usb.h b/firmware/usb_performance/usb.h index 7b9c9390..a2ab9fb1 100644 --- a/firmware/usb_performance/usb.h +++ b/firmware/usb_performance/usb.h @@ -28,9 +28,6 @@ #include "usb_type.h" -#define ATTR_ALIGNED(x) __attribute__ ((aligned(x))) -#define ATTR_SECTION(x) __attribute__ ((section(x))) - extern bool usb_set_configuration( usb_device_t* const device, const uint_fast8_t configuration_number diff --git a/firmware/usb_performance/usb_type.h b/firmware/usb_performance/usb_type.h index 54287fd5..1bfb3205 100644 --- a/firmware/usb_performance/usb_type.h +++ b/firmware/usb_performance/usb_type.h @@ -25,6 +25,11 @@ #include #include +// TODO: Move this to some common compiler-tricks location. +#define ATTR_PACKED __attribute__((packed)) +#define ATTR_ALIGNED(x) __attribute__ ((aligned(x))) +#define ATTR_SECTION(x) __attribute__ ((section(x))) + typedef struct { uint8_t request_type; uint8_t request;