Defining gcc specific macros in seperate header
This commit is contained in:
parent
aecb591d12
commit
8e5f0bc36a
7 changed files with 61 additions and 35 deletions
|
@ -75,12 +75,6 @@
|
|||
#include <stdio.h>
|
||||
#include <stdbool.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__)
|
||||
|
@ -202,7 +196,7 @@ const output_config_t *tx_power_current = &output_power[0];
|
|||
* A buffer to send a CMD_IEEE_RX and to subsequently monitor its status
|
||||
* Do not use this buffer for any commands other than CMD_IEEE_RX
|
||||
*/
|
||||
static uint8_t cmd_ieee_rx_buf[RF_CMD_BUFFER_SIZE] CC_ALIGN_ATTR(4);
|
||||
static uint8_t cmd_ieee_rx_buf[RF_CMD_BUFFER_SIZE] CC_ALIGN(4);
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define DATA_ENTRY_LENSZ_NONE 0
|
||||
#define DATA_ENTRY_LENSZ_BYTE 1
|
||||
|
@ -210,10 +204,10 @@ static uint8_t cmd_ieee_rx_buf[RF_CMD_BUFFER_SIZE] CC_ALIGN_ATTR(4);
|
|||
|
||||
#define RX_BUF_SIZE 140
|
||||
/* Four receive buffers entries with room for 1 IEEE802.15.4 frame in each */
|
||||
static uint8_t rx_buf_0[RX_BUF_SIZE] CC_ALIGN_ATTR(4);
|
||||
static uint8_t rx_buf_1[RX_BUF_SIZE] CC_ALIGN_ATTR(4);
|
||||
static uint8_t rx_buf_2[RX_BUF_SIZE] CC_ALIGN_ATTR(4);
|
||||
static uint8_t rx_buf_3[RX_BUF_SIZE] CC_ALIGN_ATTR(4);
|
||||
static uint8_t rx_buf_0[RX_BUF_SIZE] CC_ALIGN(4);
|
||||
static uint8_t rx_buf_1[RX_BUF_SIZE] CC_ALIGN(4);
|
||||
static uint8_t rx_buf_2[RX_BUF_SIZE] CC_ALIGN(4);
|
||||
static uint8_t rx_buf_3[RX_BUF_SIZE] CC_ALIGN(4);
|
||||
|
||||
/* The RX Data Queue */
|
||||
static dataQueue_t rx_data_queue = { 0 };
|
||||
|
@ -225,7 +219,7 @@ volatile static uint8_t *rx_read_entry;
|
|||
#define TX_BUF_PAYLOAD_LEN 180
|
||||
#define TX_BUF_HDR_LEN 2
|
||||
|
||||
static uint8_t tx_buf[TX_BUF_HDR_LEN + TX_BUF_PAYLOAD_LEN] CC_ALIGN_ATTR(4);
|
||||
static uint8_t tx_buf[TX_BUF_HDR_LEN + TX_BUF_PAYLOAD_LEN] CC_ALIGN(4);
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Overrides for IEEE 802.15.4, differential mode */
|
||||
static uint32_t ieee_overrides[] = {
|
||||
|
|
|
@ -80,12 +80,6 @@
|
|||
#include <stdio.h>
|
||||
#include <stdbool.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__)
|
||||
|
@ -241,8 +235,8 @@ const output_config_t *tx_power_current = &output_power[1];
|
|||
|
||||
#define RX_BUF_SIZE 140
|
||||
/* Receive buffers: 1 frame in each */
|
||||
static uint8_t rx_buf_0[RX_BUF_SIZE] CC_ALIGN_ATTR(4);
|
||||
static uint8_t rx_buf_1[RX_BUF_SIZE] CC_ALIGN_ATTR(4);
|
||||
static uint8_t rx_buf_0[RX_BUF_SIZE] CC_ALIGN(4);
|
||||
static uint8_t rx_buf_1[RX_BUF_SIZE] CC_ALIGN(4);
|
||||
|
||||
/* The RX Data Queue */
|
||||
static dataQueue_t rx_data_queue = { 0 };
|
||||
|
@ -254,7 +248,7 @@ volatile static uint8_t *rx_read_entry;
|
|||
#define TX_BUF_PAYLOAD_LEN 180
|
||||
#define TX_BUF_HDR_LEN 2
|
||||
|
||||
static uint8_t tx_buf[TX_BUF_HDR_LEN + TX_BUF_PAYLOAD_LEN] CC_ALIGN_ATTR(4);
|
||||
static uint8_t tx_buf[TX_BUF_HDR_LEN + TX_BUF_PAYLOAD_LEN] CC_ALIGN(4);
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static uint8_t
|
||||
rf_is_on(void)
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "dev/watchdog.h"
|
||||
#include "sys/process.h"
|
||||
#include "sys/energest.h"
|
||||
#include "sys/cc.h"
|
||||
#include "net/netstack.h"
|
||||
#include "net/packetbuf.h"
|
||||
#include "net/rime/rimestats.h"
|
||||
|
@ -73,12 +74,6 @@
|
|||
#define PRINTF(...)
|
||||
#endif
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#ifdef __GNUC__
|
||||
#define CC_ALIGN_ATTR(n) __attribute__ ((aligned(n)))
|
||||
#else
|
||||
#define CC_ALIGN_ATTR(n)
|
||||
#endif
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#ifdef RF_CORE_CONF_DEBUG_CRC
|
||||
#define RF_CORE_DEBUG_CRC RF_CORE_CONF_DEBUG_CRC
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue