Defining gcc specific macros in seperate header

This commit is contained in:
Billy Kozak 2015-06-22 09:48:39 -06:00
parent aecb591d12
commit 8e5f0bc36a
7 changed files with 61 additions and 35 deletions

View file

@ -39,6 +39,7 @@
#include "contiki-conf.h"
#include "sys/process.h"
#include "sys/clock.h"
#include "sys/cc.h"
#include "sys/etimer.h"
#include "net/netstack.h"
#include "net/linkaddr.h"
@ -53,12 +54,6 @@
#include <stdbool.h>
#include <stdio.h>
/*---------------------------------------------------------------------------*/
#ifdef __GNUC__
#define CC_ALIGN_ATTR(n) __attribute__ ((aligned(n)))
#else
#define CC_ALIGN_ATTR(n)
#endif
/*---------------------------------------------------------------------------*/
#define DEBUG 0
#if DEBUG
#define PRINTF(...) printf(__VA_ARGS__)
@ -79,7 +74,7 @@
#define BLE_ADV_PAYLOAD_BUF_LEN 64
#define BLE_UUID_SIZE 16
/*---------------------------------------------------------------------------*/
static unsigned char ble_params_buf[32] CC_ALIGN_ATTR(4);
static unsigned char ble_params_buf[32] CC_ALIGN(4);
static uint8_t ble_mode_on = RF_BLE_IDLE;
static struct etimer ble_adv_et;
static uint8_t payload[BLE_ADV_PAYLOAD_BUF_LEN];