Mesh4all
May the mesh be with you
board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Travis Griggs <travisgriggs@gmail.com>
3  * Copyright (C) 2017 Dan Evans <photonthunder@gmail.com>
4  * Copyright (C) 2021 Mesh4all <mesh4all.org>
5  *
6  * This file is subject to the terms and conditions of the GNU Lesser
7  * General Public License v2.1. See the file LICENSE in the top level
8  * directory for more details.
9  */
10 
18 #ifndef BOARD_H
19 #define BOARD_H
20 
21 #include "cpu.h"
22 #include "periph_conf.h"
23 
24 #ifdef __cplusplus
25 extern "C"
26 {
27 #endif
28 
33 #define XTIMER_DEV TIMER_DEV(1)
34 #define XTIMER_CHAN (0)
41 #define LED_PORT PORT->Group[PB]
48 #define LED0_PIN GPIO_PIN(PB, 30)
49 #define LED0_MASK (1 << 30)
50 #define LED0_ON (LED_PORT.OUTCLR.reg = LED0_MASK)
51 #define LED0_OFF (LED_PORT.OUTSET.reg = LED0_MASK)
52 #define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
59 #define LED1_PIN GPIO_PIN(PB, 7)
60 #define LED1_MASK (1 << 7)
61 #define LED1_ON (LED_PORT.OUTCLR.reg = LED1_MASK)
62 #define LED1_OFF (LED_PORT.OUTSET.reg = LED1_MASK)
63 #define LED1_TOGGLE (LED_PORT.OUTTGL.reg = LED1_MASK)
70 #define LED2_PIN GPIO_PIN(PB, 6)
71 #define LED2_MASK (1 << 6)
72 #define LED2_ON (LED_PORT.OUTCLR.reg = LED2_MASK)
73 #define LED2_OFF (LED_PORT.OUTSET.reg = LED2_MASK)
74 #define LED2_TOGGLE (LED_PORT.OUTTGL.reg = LED2_MASK)
81 #define BTN0_PORT PORT->Group[PA]
82 #define BTN0_PIN GPIO_PIN(PA, 15)
83 #define BTN0_MODE GPIO_IN_PU
90 #define AT86RF215_PARAM_SPI SPI_DEV(0)
91 #define AT86RF215_PARAM_CS GPIO_PIN(PA, 5)
92 #define AT86RF215_PARAM_INT GPIO_PIN(PB, 4)
93 #define AT86RF215_PARAM_RESET GPIO_PIN(PB, 2)
99 void board_init(void);
100 
101 #ifdef __cplusplus
102 }
103 #endif
104 
105 #endif /* BOARD_H */
void board_init(void)
Initialize board specific hardware, including clock, LEDs and std-IO.
Peripheral MCU configuration for the VS203 board.