The friendly Operating System for the Internet of Things
openmote-cc2538/include/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 
21 #ifndef BOARD_H
22 #define BOARD_H
23 
24 #include "cpu.h"
25 #include "periph/gpio.h"
26 
27 #ifdef __cplusplus
28  extern "C" {
29 #endif
30 
35 #define LED0_PIN GPIO_PIN(2, 4)
36 #define LED1_PIN GPIO_PIN(2, 7)
37 #define LED2_PIN GPIO_PIN(2, 6)
38 #define LED3_PIN GPIO_PIN(2, 5)
39 
40 #define LED_PORT GPIO_C
41 #define LED0_MASK (1 << 4)
42 #define LED1_MASK (1 << 7)
43 #define LED2_MASK (1 << 6)
44 #define LED3_MASK (1 << 5)
45 
46 #define LED0_ON (LED_PORT->DATA |= LED0_MASK)
47 #define LED0_OFF (LED_PORT->DATA &= ~LED0_MASK)
48 #define LED0_TOGGLE (LED_PORT->DATA ^= LED0_MASK)
49 
50 #define LED1_ON (LED_PORT->DATA |= LED1_MASK)
51 #define LED1_OFF (LED_PORT->DATA &= ~LED1_MASK)
52 #define LED1_TOGGLE (LED_PORT->DATA ^= LED1_MASK)
53 
54 #define LED2_ON (LED_PORT->DATA |= LED2_MASK)
55 #define LED2_OFF (LED_PORT->DATA &= ~LED2_MASK)
56 #define LED2_TOGGLE (LED_PORT->DATA ^= LED2_MASK)
57 
58 #define LED3_ON (LED_PORT->DATA |= LED3_MASK)
59 #define LED3_OFF (LED_PORT->DATA &= ~LED3_MASK)
60 #define LED3_TOGGLE (LED_PORT->DATA ^= LED3_MASK)
61 
67 #define XTIMER_DEV (0)
68 #define XTIMER_CHAN (0)
69 #define XTIMER_WIDTH (16)
70 #define XTIMER_SHIFT (0)
71 #define XTIMER_HZ (1000000UL)
72 #define XTIMER_BACKOFF (50)
73 #define XTIMER_ISR_BACKOFF (40)
74 
80 #ifndef UPDATE_CCA
81 #define UPDATE_CCA (1)
82 #endif
83 
84 #define CCA_BACKDOOR_ENABLE (1)
85 #define CCA_BACKDOOR_PORT_A_PIN (6)
86 #define CCA_BACKDOOR_ACTIVE_LEVEL (0)
92 void board_init(void);
93 
94 #ifdef __cplusplus
95 } /* end extern "C" */
96 #endif
97 
98 #endif /* BOARD_H */
99 
Low-level GPIO peripheral driver interface definitions.