cc2538dk/include/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 
20 #ifndef BOARD_H
21 #define BOARD_H
22 
23 #include "cpu.h"
24 #include "periph/gpio.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
34 #define LED0_PIN GPIO_PIN(2, 0)
35 #define LED1_PIN GPIO_PIN(2, 1)
36 #define LED2_PIN GPIO_PIN(2, 2)
37 #define LED3_PIN GPIO_PIN(2, 3)
38 
39 #define LED_PORT GPIO_C
40 #define LED0_BIT (1 << 0)
41 #define LED1_BIT (1 << 1)
42 #define LED2_BIT (1 << 2)
43 #define LED3_BIT (1 << 3)
45 #define LED0_ON (LED_PORT->DATA |= LED0_BIT)
46 #define LED0_OFF (LED_PORT->DATA &= ~LED0_BIT)
47 #define LED0_TOGGLE (LED_PORT->DATA ^= LED0_BIT)
48 
49 #define LED1_ON (LED_PORT->DATA |= LED1_BIT)
50 #define LED1_OFF (LED_PORT->DATA &= ~LED1_BIT)
51 #define LED1_TOGGLE (LED_PORT->DATA ^= LED1_BIT)
52 
53 #define LED2_ON (LED_PORT->DATA |= LED2_BIT)
54 #define LED2_OFF (LED_PORT->DATA &= ~LED2_BIT)
55 #define LED2_TOGGLE (LED_PORT->DATA ^= LED2_BIT)
56 
57 #define LED3_ON (LED_PORT->DATA |= LED3_BIT)
58 #define LED3_OFF (LED_PORT->DATA &= ~LED3_BIT)
59 #define LED3_TOGGLE (LED_PORT->DATA ^= LED3_BIT)
60 
66 #ifndef UPDATE_CCA
67 #define UPDATE_CCA 1
68 #endif
69 
70 #define CCA_BACKDOOR_ENABLE 1
71 #define CCA_BACKDOOR_PORT_A_PIN 3
72 #define CCA_BACKDOOR_ACTIVE_LEVEL 0
79 #define XTIMER_DEV (0)
80 #define XTIMER_CHAN (0)
81 #define XTIMER_WIDTH (16)
82 #define XTIMER_SHIFT (0)
83 #define XTIMER_HZ (1000000UL)
84 #define XTIMER_BACKOFF (50)
85 #define XTIMER_ISR_BACKOFF (40)
86 
91 void board_init(void);
92 
93 #ifdef __cplusplus
94 } /* end extern "C" */
95 #endif
96 
97 #endif /* BOARD_H */
98 
void board_init(void)
Initialize board specific hardware, including clock, LEDs and std-IO.
Low-level GPIO peripheral driver interface definitions.