Mesh4all
May the mesh be with you
board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Loci Controls Inc.
3  * Copyright (C) 2022 Mesh4all mesh4all.org
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
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(PORT_C, 5)
34 #define LED0_ON gpio_set(LED0_PIN)
35 #define LED0_OFF gpio_clear(LED0_PIN)
36 #define LED0_TOGGLE gpio_toggle(LED0_PIN)
38 #define LED1_PIN GPIO_PIN(PORT_C, 4)
39 #define LED1_ON gpio_set(LED1_PIN)
40 #define LED1_OFF gpio_clear(LED1_PIN)
41 #define LED1_TOGGLE gpio_toggle(LED1_PIN)
43 #define LED2_PIN GPIO_PIN(PORT_C, 1)
44 #define LED2_ON gpio_set(LED2_PIN)
45 #define LED2_OFF gpio_clear(LED2_PIN)
46 #define LED2_TOGGLE gpio_toggle(LED2_PIN)
48 #define LED3_PIN GPIO_PIN(PORT_C, 0)
49 #define LED3_ON gpio_set(LED3_PIN)
50 #define LED3_OFF gpio_clear(LED3_PIN)
51 #define LED3_TOGGLE gpio_toggle(LED3_PIN)
58 #define BTN0_PIN GPIO_PIN(PORT_C, 7)
59 #define BTN0_MODE GPIO_IN_PU
66 #define BTN1_PIN GPIO_PIN(PORT_C, 6)
67 #define BTN1_MODE GPIO_IN_PU
74 #ifndef UPDATE_CCA
75 #define UPDATE_CCA 1
76 #endif
77 
78 #define CCA_BACKDOOR_ENABLE 1
79 #define CCA_BACKDOOR_PORT_A_PIN 3
80 #define CCA_BACKDOOR_ACTIVE_LEVEL 0
87 #define XTIMER_WIDTH (16)
88 #define XTIMER_BACKOFF (50)
89 #define XTIMER_ISR_BACKOFF (40)
105 #define CONFIG_CC2538_RF_OBS_SIG_0_PCX 3
106 #define CONFIG_CC2538_RF_OBS_SIG_1_PCX 2
107 #define CONFIG_CC2538_RF_OBS_SIG_2_PCX 0
109 #define HGM_PIN GPIO_PIN(PORT_D, 2)
110 #define HGM_ON gpio_set(HGM_PIN)
111 #define HGM_OFF gpio_clear(HGM_PIN)
112 #define HGM_TOGGLE gpio_toggle(HGM_PIN)
118 void board_init(void);
119 
120 #ifdef __cplusplus
121 }
122 #endif
123 
124 #endif /* BOARD_H */
void board_init(void)
Initialize board specific hardware, including clock, LEDs and std-IO.