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 <contact@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 
20 #ifndef BOARD_H
21 #define BOARD_H
22 
23 #include "cpu.h"
24 #include "periph/gpio.h"
25 #include "cc2538_eui_primary.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 #define LED0_PIN GPIO_PIN(PORT_B, 1)
36 #define LED0_ON gpio_set(LED0_PIN)
37 #define LED0_OFF gpio_clear(LED0_PIN)
38 #define LED0_TOGGLE gpio_toggle(LED0_PIN)
40 #define LED1_PIN GPIO_PIN(PORT_B, 2)
41 #define LED1_ON gpio_set(LED1_PIN)
42 #define LED1_OFF gpio_clear(LED1_PIN)
43 #define LED1_TOGGLE gpio_toggle(LED1_PIN)
45 #define LED2_PIN GPIO_PIN(PORT_B, 3)
46 #define LED2_ON gpio_set(LED2_PIN)
47 #define LED2_OFF gpio_clear(LED2_PIN)
48 #define LED2_TOGGLE gpio_toggle(LED2_PIN)
50 #define LED3_PIN GPIO_PIN(PORT_B, 4)
51 #define LED3_ON gpio_set(LED3_PIN)
52 #define LED3_OFF gpio_clear(LED3_PIN)
53 #define LED3_TOGGLE gpio_toggle(LED3_PIN)
60 #define BTN0_PIN GPIO_PIN(PORT_C, 7)
61 #define BTN0_MODE GPIO_IN_PU
68 #ifndef UPDATE_CCA
69 #define UPDATE_CCA 1
70 #endif
71 
72 #define CCA_BACKDOOR_ENABLE 1
73 #define CCA_BACKDOOR_PORT_A_PIN 7
74 #define CCA_BACKDOOR_ACTIVE_LEVEL 0
81 #define XTIMER_WIDTH (16)
82 #define XTIMER_BACKOFF (50)
83 #define XTIMER_ISR_BACKOFF (40)
100 #define CONFIG_CC2538_RF_OBS_SIG_0_PCX 3
101 #define CONFIG_CC2538_RF_OBS_SIG_1_PCX 2
102 #define CONFIG_CC2538_RF_OBS_SIG_2_PCX 0
104 #define HGM_PIN GPIO_PIN(PORT_D, 2)
105 #define HGM_ON gpio_set(HGM_PIN)
106 #define HGM_OFF gpio_clear(HGM_PIN)
107 #define HGM_TOGGLE gpio_toggle(HGM_PIN)
113 void board_init(void);
114 
115 #ifdef __cplusplus
116 }
117 #endif
118 
119 #endif /* BOARD_H */
void board_init(void)
Initialize board specific hardware, including clock, LEDs and std-IO.