board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Inria
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 "kernel_defines.h"
23 #if IS_USED(MODULE_SX126X_STM32WL)
24 #include "sx126x.h"
25 #endif
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 #define SX126X_PARAM_SPI (SPI_DEV(0))
36 #define SX126X_PARAM_TX_PA_MODE SX126X_RF_MODE_TX_HPA
37 #if IS_USED(MODULE_SX126X_STM32WL)
38 extern void lora_e5_dev_sx126x_set_rf_mode(sx126x_t *dev, sx126x_rf_mode_t rf_mode);
39 #define SX126X_PARAM_SET_RF_MODE_CB lora_e5_dev_sx126x_set_rf_mode
40 #define SX126X_PARAM_TYPE SX126X_TYPE_STM32WL
41 #endif
48 #define LED0_PORT GPIO_PORT_B
49 #define LED0_PORT_NUM PORT_B
50 #define LED0_PIN_NUM 5
57 #define BTN0_PIN GPIO_PIN(PORT_B, 13)
58 #define BTN0_MODE GPIO_IN_PU
59 #define BTN1_PIN GPIO_PIN(PORT_A, 0)
60 #define BTN1_MODE GPIO_IN_PU
69 #define FE_CTRL1 GPIO_PIN(PORT_A, 4)
70 #define FE_CTRL2 GPIO_PIN(PORT_A, 5)
76 #ifndef CONFIG_LORA_E5_DEV_ENABLE_3P3V
77 #define CONFIG_LORA_E5_DEV_ENABLE_3P3V 1
78 #endif
82 #ifndef CONFIG_LORA_E5_DEV_ENABLE_5V
83 #define CONFIG_LORA_E5_DEV_ENABLE_5V 1
84 #endif
88 #define LORA_E5_DEV_3P3V_ENABLE_PIN GPIO_PIN(PORT_A, 9)
92 #define LORA_E5_DEV_5V_ENABLE_PIN GPIO_PIN(PORT_B, 10)
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #include "stm32_leds.h"
99 
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:104