board.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2021 Inria
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
19 #include "kernel_defines.h"
20 #if IS_USED(MODULE_SX126X_STM32WL)
21 #include "sx126x.h"
22 #endif
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
32 #define SX126X_PARAM_SPI (SPI_DEV(0))
33 #define SX126X_PARAM_TX_PA_MODE SX126X_RF_MODE_TX_HPA
34 #if IS_USED(MODULE_SX126X_STM32WL)
35 extern void lora_e5_dev_sx126x_set_rf_mode(sx126x_t *dev, sx126x_rf_mode_t rf_mode);
36 #define SX126X_PARAM_SET_RF_MODE_CB lora_e5_dev_sx126x_set_rf_mode
37 #define SX126X_PARAM_TYPE SX126X_TYPE_STM32WL
38 #endif
45 #define LED0_PORT GPIO_PORT_B
46 #define LED0_PORT_NUM PORT_B
47 #define LED0_PIN_NUM 5
54 #define BTN0_PIN GPIO_PIN(PORT_B, 13)
55 #define BTN0_MODE GPIO_IN_PU
56 #define BTN1_PIN GPIO_PIN(PORT_A, 0)
57 #define BTN1_MODE GPIO_IN_PU
66 #define FE_CTRL1 GPIO_PIN(PORT_A, 4)
67 #define FE_CTRL2 GPIO_PIN(PORT_A, 5)
73 #ifndef CONFIG_LORA_E5_DEV_ENABLE_3P3V
74 #define CONFIG_LORA_E5_DEV_ENABLE_3P3V 1
75 #endif
79 #ifndef CONFIG_LORA_E5_DEV_ENABLE_5V
80 #define CONFIG_LORA_E5_DEV_ENABLE_5V 1
81 #endif
85 #define LORA_E5_DEV_3P3V_ENABLE_PIN GPIO_PIN(PORT_A, 9)
89 #define LORA_E5_DEV_5V_ENABLE_PIN GPIO_PIN(PORT_B, 10)
90 
91 #ifdef __cplusplus
92 }
93 #endif
94 
95 #include "stm32_leds.h"
96 
sx126x_rf_mode_t
RF switch states.
Definition: sx126x.h:44
Common macros and compiler attributes/pragmas configuration.
Common LED macros.
Device descriptor for the driver.
Definition: sx126x.h:142