board.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2021 Lokotius Filzer
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
23 #include "cpu.h"
24 #include "periph/gpio.h"
25 #include "periph/pm.h"
26 
27 #ifdef __cplusplus
28 extern "C"
29 {
30 #endif
31 
36 #define SX127X_PARAM_SPI (SPI_DEV(1))
37 #define SX127X_PARAM_SPI_NSS GPIO_PIN(PB, 31) /* D10 */
38 #define SX127X_PARAM_RESET GPIO_PIN(PB, 15) /* A0 */
39 #define SX127X_PARAM_DIO0 GPIO_PIN(PB, 16) /* D2 */
40 #define SX127X_PARAM_DIO1 GPIO_PIN(PA, 11) /* D3 */
41 #define SX127X_PARAM_DIO2 GPIO_PIN(PA, 12) /* D4 */
42 #define SX127X_PARAM_DIO3 GPIO_PIN(PB, 17) /* D5 */
43 #define SX127X_PARAM_PASELECT (SX127X_PA_RFO)
50 #define TCXO_PWR_PIN GPIO_PIN(PB, 3)
51 #define TX_OUTPUT_SEL_PIN GPIO_PIN(PA, 13)
52 #define TX_SWITCH_PWR_PIN GPIO_PIN(PA, 28)
59 #define LED_PORT PORT->Group[0]
60 #define LED0_PIN GPIO_PIN(PA, 22)
61 #define LED0_MASK (1 << 22)
62 #define LED0_ON (LED_PORT.OUTCLR.reg = LED0_MASK)
63 #define LED0_OFF (LED_PORT.OUTSET.reg = LED0_MASK)
64 #define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
67 #ifdef __cplusplus
68 }
69 #endif
70 
Low-level GPIO peripheral driver interface definitions.
Power management interface.