Mesh4all
May the mesh be with you
board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Freie Universität Berlin
3  * Copyright (C) 2021 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  */
21 #ifndef BOARD_H
22 #define BOARD_H
23 
24 #include "cpu.h"
25 #include "periph_conf.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 #define XTIMER_DEV TIMER_DEV(1)
36 #define XTIMER_CHAN (0)
43 #define CONFIG_ZTIMER_USEC_TYPE ZTIMER_TYPE_PERIPH_TIMER
44 #define CONFIG_ZTIMER_USEC_DEV TIMER_DEV(1)
48 #define CONFIG_ZTIMER_USEC_MIN (10)
55 #define AT86RF2XX_PARAM_CS GPIO_PIN(PB, 31)
56 #define AT86RF2XX_PARAM_INT GPIO_PIN(PB, 0)
57 #define AT86RF2XX_PARAM_SLEEP GPIO_PIN(PA, 20)
58 #define AT86RF2XX_PARAM_RESET GPIO_PIN(PB, 15)
65 #define LED0_PIN GPIO_PIN(0, 19)
66 #define LED_PORT PORT->Group[0]
67 #define LED0_MASK (1 << 19)
68 #define LED0_ON (LED_PORT.OUTCLR.reg = LED0_MASK)
69 #define LED0_OFF (LED_PORT.OUTSET.reg = LED0_MASK)
70 #define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
77 #define BTN0_PORT PORT->Group[0]
78 #define BTN0_PIN GPIO_PIN(0, 28)
79 #define BTN0_MODE GPIO_IN_PU
86 #define RFCTL1_PIN GPIO_PIN(0, 9)
87 #define RFCTL2_PIN GPIO_PIN(0, 12)
96 enum {
97  RFCTL_ANTENNA_BOARD,
98  RFCTL_ANTENNA_EXT,
99 };
100 
105 #ifndef RFCTL_ANTENNA_DEFAULT
109 #define RFCTL_ANTENNA_DEFAULT RFCTL_ANTENNA_BOARD
110 #endif
116 void board_init(void);
117 
128 void board_antenna_config(uint8_t antenna);
129 
130 #ifdef __cplusplus
131 }
132 #endif
133 
134 #endif /* BOARD_H */
void board_antenna_config(uint8_t antenna)
Set antenna switch.
void board_init(void)
Initialize board specific hardware, including clock, LEDs and std-IO.
Peripheral MCU configuration for the VS203 board.