board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Freie Universität Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
22 #include "board_nucleo.h"
23 
24 /* Required for `nucleo_wl55jc_sx126x_set_rf_mode` */
25 #if IS_USED(MODULE_SX126X_STM32WL)
26 #include "sx126x.h"
27 #endif
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
37 #define SX126X_PARAM_SPI (SPI_DEV(0))
38 
39 #if IS_USED(MODULE_SX126X_STM32WL)
40 extern void nucleo_wl55jc_sx126x_set_rf_mode(sx126x_t *dev, sx126x_rf_mode_t rf_mode);
41 #define SX126X_PARAM_SET_RF_MODE_CB nucleo_wl55jc_sx126x_set_rf_mode
42 #define SX126X_PARAM_TYPE SX126X_TYPE_STM32WL
43 #endif
50 #define LED0_PIN_NUM 15
51 #define LED0_PORT GPIO_PORT_B
52 #define LED0_PORT_NUM PORT_B
53 
54 #define LED1_PIN_NUM 9
55 #define LED1_PORT GPIO_PORT_B
56 #define LED1_PORT_NUM PORT_B
57 
58 #define LED2_PIN_NUM 11
59 #define LED2_PORT GPIO_PORT_B
60 #define LED2_PORT_NUM PORT_B
67 #define BTN0_PIN GPIO_PIN(PORT_A, 0)
68 #define BTN0_MODE GPIO_IN_PU
69 #define BTN1_PIN GPIO_PIN(PORT_A, 1)
70 #define BTN1_MODE GPIO_IN_PU
71 #define BTN2_PIN GPIO_PIN(PORT_C, 6)
72 #define BTN2_MODE GPIO_IN_PU
81 #define FE_CTRL1 GPIO_PIN(PORT_C, 4)
82 #define FE_CTRL2 GPIO_PIN(PORT_C, 5)
83 #define FE_CTRL3 GPIO_PIN(PORT_C, 3)
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #include "stm32_leds.h"
91 
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