board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Loci Controls Inc.
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
18 #ifndef BOARD_H
19 #define BOARD_H
20 
21 #include "cpu.h"
22 #include "periph/gpio.h"
23 #include "cc2538_eui_primary.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #define LED0_PIN GPIO_PIN(2, 0)
34 #define LED1_PIN GPIO_PIN(2, 1)
35 #define LED2_PIN GPIO_PIN(2, 2)
36 #define LED3_PIN GPIO_PIN(2, 3)
37 
38 #define LED_PORT GPIO_C
39 #define LED0_BIT (1 << 0)
40 #define LED1_BIT (1 << 1)
41 #define LED2_BIT (1 << 2)
42 #define LED3_BIT (1 << 3)
44 #define LED0_ON (LED_PORT->DATA |= LED0_BIT)
45 #define LED0_OFF (LED_PORT->DATA &= ~LED0_BIT)
46 #define LED0_TOGGLE (LED_PORT->DATA ^= LED0_BIT)
47 
48 #define LED1_ON (LED_PORT->DATA |= LED1_BIT)
49 #define LED1_OFF (LED_PORT->DATA &= ~LED1_BIT)
50 #define LED1_TOGGLE (LED_PORT->DATA ^= LED1_BIT)
51 
52 #define LED2_ON (LED_PORT->DATA |= LED2_BIT)
53 #define LED2_OFF (LED_PORT->DATA &= ~LED2_BIT)
54 #define LED2_TOGGLE (LED_PORT->DATA ^= LED2_BIT)
55 
56 #define LED3_ON (LED_PORT->DATA |= LED3_BIT)
57 #define LED3_OFF (LED_PORT->DATA &= ~LED3_BIT)
58 #define LED3_TOGGLE (LED_PORT->DATA ^= LED3_BIT)
59 
65 #ifndef UPDATE_CCA
66 #define UPDATE_CCA 1
67 #endif
68 
69 #define CCA_BACKDOOR_ENABLE 1
70 #define CCA_BACKDOOR_PORT_A_PIN 3
71 #define CCA_BACKDOOR_ACTIVE_LEVEL 0
78 #define XTIMER_WIDTH (16)
79 #define XTIMER_BACKOFF (50)
80 #define XTIMER_ISR_BACKOFF (40)
81 
86 void board_init(void);
87 
88 #ifdef __cplusplus
89 } /* end extern "C" */
90 #endif
91 
92 #endif /* BOARD_H */
93 
gpio.h
Low-level GPIO peripheral driver interface definitions.
cc2538_eui_primary.h
CC2538 EUI-64 provider.
board_init
void board_init(void)
Board level initialization.