board.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2021 Freie Universität Berlin
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
19 #include "board_nucleo.h"
20 
21 /* Required for `nucleo_wl55jc_sx126x_set_rf_mode` */
22 #if IS_USED(MODULE_SX126X_STM32WL)
23 #include "sx126x.h"
24 #endif
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
34 #define SX126X_PARAM_SPI (SPI_DEV(0))
35 
36 #if IS_USED(MODULE_SX126X_STM32WL)
37 extern void nucleo_wl55jc_sx126x_set_rf_mode(sx126x_t *dev, sx126x_rf_mode_t rf_mode);
38 #define SX126X_PARAM_SET_RF_MODE_CB nucleo_wl55jc_sx126x_set_rf_mode
39 #define SX126X_PARAM_TYPE SX126X_TYPE_STM32WL
40 #endif
47 #define LED0_PIN_NUM 15
48 #define LED0_PORT GPIO_PORT_B
49 #define LED0_PORT_NUM PORT_B
50 
51 #define LED1_PIN_NUM 9
52 #define LED1_PORT GPIO_PORT_B
53 #define LED1_PORT_NUM PORT_B
54 
55 #define LED2_PIN_NUM 11
56 #define LED2_PORT GPIO_PORT_B
57 #define LED2_PORT_NUM PORT_B
64 #define BTN0_PIN GPIO_PIN(PORT_A, 0)
65 #define BTN0_MODE GPIO_IN_PU
66 #define BTN1_PIN GPIO_PIN(PORT_A, 1)
67 #define BTN1_MODE GPIO_IN_PU
68 #define BTN2_PIN GPIO_PIN(PORT_C, 6)
69 #define BTN2_MODE GPIO_IN_PU
78 #define FE_CTRL1 GPIO_PIN(PORT_C, 4)
79 #define FE_CTRL2 GPIO_PIN(PORT_C, 5)
80 #define FE_CTRL3 GPIO_PIN(PORT_C, 3)
83 #ifdef __cplusplus
84 }
85 #endif
86 
87 #include "stm32_leds.h"
88 
Global common Nucleo board configuration.
sx126x_rf_mode_t
RF switch states.
Definition: sx126x.h:44
Common LED macros.
Device descriptor for the driver.
Definition: sx126x.h:104