board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Freie Universität Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser General
5  * Public License v2.1. See the file LICENSE in the top level directory for more
6  * details.
7  */
8 
19 #ifndef BOARD_H
20 #define BOARD_H
21 
22 #include "cpu.h"
23 #include "periph/gpio.h"
24 #include "cc2538_eui_primary.h"
25 
26 #ifdef __cplusplus
27  extern "C" {
28 #endif
29 
34 #define LED0_PIN GPIO_PIN(2, 4)
35 #define LED1_PIN GPIO_PIN(2, 7)
36 #define LED2_PIN GPIO_PIN(2, 6)
37 #define LED3_PIN GPIO_PIN(2, 5)
38 
39 #define LED_PORT GPIO_C
40 #define LED0_MASK (1 << 4)
41 #define LED1_MASK (1 << 7)
42 #define LED2_MASK (1 << 6)
43 #define LED3_MASK (1 << 5)
44 
45 #define LED0_ON (LED_PORT->DATA |= LED0_MASK)
46 #define LED0_OFF (LED_PORT->DATA &= ~LED0_MASK)
47 #define LED0_TOGGLE (LED_PORT->DATA ^= LED0_MASK)
48 
49 #define LED1_ON (LED_PORT->DATA |= LED1_MASK)
50 #define LED1_OFF (LED_PORT->DATA &= ~LED1_MASK)
51 #define LED1_TOGGLE (LED_PORT->DATA ^= LED1_MASK)
52 
53 #define LED2_ON (LED_PORT->DATA |= LED2_MASK)
54 #define LED2_OFF (LED_PORT->DATA &= ~LED2_MASK)
55 #define LED2_TOGGLE (LED_PORT->DATA ^= LED2_MASK)
56 
57 #define LED3_ON (LED_PORT->DATA |= LED3_MASK)
58 #define LED3_OFF (LED_PORT->DATA &= ~LED3_MASK)
59 #define LED3_TOGGLE (LED_PORT->DATA ^= LED3_MASK)
60 
66 #define XTIMER_WIDTH (16)
67 #define XTIMER_BACKOFF (50)
68 #define XTIMER_ISR_BACKOFF (40)
69 
75 #ifndef UPDATE_CCA
76 #define UPDATE_CCA (1)
77 #endif
78 
79 #define CCA_BACKDOOR_ENABLE (1)
80 #define CCA_BACKDOOR_PORT_A_PIN (6)
81 #define CCA_BACKDOOR_ACTIVE_LEVEL (0)
88 #define CONFIG_CC2538_RF_OBS_SIG_0_PCX 5 /* PC5 */
89 #define CONFIG_CC2538_RF_OBS_SIG_1_PCX 6 /* PC6 */
90 #define CONFIG_CC2538_RF_OBS_SIG_2_PCX 7 /* PC7 */
91 
96 void board_init(void);
97 
98 #ifdef __cplusplus
99 } /* end extern "C" */
100 #endif
101 
102 #endif /* BOARD_H */
103 
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.