L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
Loading...
Searching...
No Matches
radio_board_if.h
Go to the documentation of this file.
1/* USER CODE BEGIN Header */
2/**
3 ******************************************************************************
4 * @file radio_board_if.h
5 * @author MCD Application Team
6 * @brief Header for Radio interface configuration
7 ******************************************************************************
8 * @attention
9 *
10 * Copyright (c) 2026 STMicroelectronics.
11 * All rights reserved.
12 *
13 * This software is licensed under terms that can be found in the LICENSE file
14 * in the root directory of this software component.
15 * If no LICENSE file comes with this software, it is provided AS-IS.
16 *
17 ******************************************************************************
18 */
19/* USER CODE END Header */
20
21/* Define to prevent recursive inclusion -------------------------------------*/
22#ifndef RADIO_BOARD_IF_H
23#define RADIO_BOARD_IF_H
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29/* Includes ------------------------------------------------------------------*/
30#include "platform.h"
31/* USER CODE BEGIN include */
32
33/* USER CODE END include */
34
35/* Exported defines ----------------------------------------------------------*/
36#if defined(USE_BSP_DRIVER)
37/* code generated by STM32CubeMX does not support BSP */
38/* In order to use BSP driver, add the correspondent files in the IDE workspace */
39/* and define USE_BSP_DRIVER in the preprocessor definitions or in platform.h */
40#define RBI_CONF_RFO_LP_HP RADIO_CONF_RFO_LP_HP
41#define RBI_CONF_RFO_LP RADIO_CONF_RFO_LP
42#define RBI_CONF_RFO_HP RADIO_CONF_RFO_HP
43#else
44/* USER CODE BEGIN Board Definition */
45
46/* USER CODE END Board Definition */
47#define RBI_CONF_RFO_LP_HP 0
48#define RBI_CONF_RFO_LP 1
49#define RBI_CONF_RFO_HP 2
50/* USER CODE BEGIN Board Definition_2 */
51
52/* USER CODE END Board Definition_2 */
53#endif /* USE_BSP_DRIVER */
54
55#if defined(USE_BSP_DRIVER)
56/* code generated by STM32CubeMX does not support BSP */
57/* In order to use BSP driver, add the correspondent files in the IDE workspace */
58/* and define USE_BSP_DRIVER in the preprocessor definitions or in platform.h */
59
60#else
61/* USER CODE BEGIN Exported Parameters */
62
63/* USER CODE END Exported Parameters */
64/* Indicates the type of switch between the ones proposed by CONFIG Constants
65 */
66#define RBI_CONF_RFO RBI_CONF_RFO_HP
67
68/* Indicates whether or not TCXO is supported by the board
69 * 0: TCXO not supported
70 * 1: TCXO supported
71 */
72#define IS_TCXO_SUPPORTED 0U
73
74/* Indicates whether or not DCDC is supported by the board
75 * 0: DCDC not supported
76 * 1: DCDC supported
77 */
78#define IS_DCDC_SUPPORTED 1U
79
80/* USER CODE BEGIN Exported Parameters_2 */
81
82/* USER CODE END Exported Parameters_2 */
83#endif /* USE_BSP_DRIVER */
84
85#if defined(USE_BSP_DRIVER)
86/* code generated by STM32CubeMX does not support BSP */
87/* In order to use BSP driver, add the correspondent files in the IDE workspace */
88/* and define USE_BSP_DRIVER in the preprocessor definitions or in platform.h */
89
90#else
91/* USER CODE BEGIN Exported PinMapping */
92#define RF_SW_CTRL1_PIN GPIO_PIN_8
93#define RF_SW_CTRL1_GPIO_PORT GPIOB
94#define RF_SW_CTRL1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
95#define RF_SW_RX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()
96
97#define RF_SW_CTRL2_PIN GPIO_PIN_13
98#define RF_SW_CTRL2_GPIO_PORT GPIOC
99#define RF_SW_CTRL2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
100#define RF_SW_CTRL2_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
101
102
103/* USER CODE END Exported PinMapping */
104#endif /* USE_BSP_DRIVER */
105
106/* USER CODE BEGIN ED */
107
108/* USER CODE END ED */
109
110/* Exported types ------------------------------------------------------------*/
111
112#if defined(USE_BSP_DRIVER)
113/* code generated by STM32CubeMX does not support BSP */
114/* In order to use BSP driver, add the correspondent files in the IDE workspace */
115/* and define USE_BSP_DRIVER in the preprocessor definitions or in platform.h */
116typedef enum
117{
118 RBI_SWITCH_OFF = RADIO_SWITCH_OFF,
119 RBI_SWITCH_RX = RADIO_SWITCH_RX,
120 RBI_SWITCH_RFO_LP = RADIO_SWITCH_RFO_LP,
121 RBI_SWITCH_RFO_HP = RADIO_SWITCH_RFO_HP,
123
124typedef enum
125{
126 RBI_RFO_LP_MAXPOWER = RADIO_RFO_LP_MAXPOWER,
127 RBI_RFO_HP_MAXPOWER = RADIO_RFO_HP_MAXPOWER,
129
130#else
131/* USER CODE BEGIN Exported Types */
132
133/* USER CODE END Exported Types */
141
147/* USER CODE BEGIN Exported Types_2 */
148
149/* USER CODE END Exported Types_2 */
150#endif /* USE_BSP_DRIVER */
151
152/* USER CODE BEGIN ET */
153
154/* USER CODE END ET */
155
156/* Exported constants --------------------------------------------------------*/
157/* USER CODE BEGIN EC */
158
159/* USER CODE END EC */
160
161/* External variables --------------------------------------------------------*/
162/* USER CODE BEGIN EV */
163
164/* USER CODE END EV */
165
166/* Exported macro ------------------------------------------------------------*/
167/* USER CODE BEGIN EM */
168
169/* USER CODE END EM */
170
171/* Exported functions ------------------------------------------------------- */
172/**
173 * @brief Init Radio Switch
174 * @return BSP status
175 */
176int32_t RBI_Init(void);
177
178/**
179 * @brief DeInit Radio Switch
180 * @return BSP status
181 */
182int32_t RBI_DeInit(void);
183
184/**
185 * @brief Configure Radio Switch.
186 * @param Config: Specifies the Radio RF switch path to be set.
187 * This parameter can be one of following parameters:
188 * @arg RADIO_SWITCH_OFF
189 * @arg RADIO_SWITCH_RX
190 * @arg RADIO_SWITCH_RFO_LP
191 * @arg RADIO_SWITCH_RFO_HP
192 * @return BSP status
193 */
195
196/**
197 * @brief Return Board Configuration
198 * @retval RBI_CONF_RFO_LP_HP
199 * @retval RBI_CONF_RFO_LP
200 * @retval RBI_CONF_RFO_HP
201 */
202int32_t RBI_GetTxConfig(void);
203
204/**
205 * @brief Get If TCXO is to be present on board
206 * @note never remove called by MW,
207 * @retval return 1 if present, 0 if not present
208 */
209int32_t RBI_IsTCXO(void);
210
211/**
212 * @brief Get If DCDC is to be present on board
213 * @note never remove called by MW,
214 * @retval return 1 if present, 0 if not present
215 */
216int32_t RBI_IsDCDC(void);
217
218/**
219 * @brief Return RF Output Max Power Configuration of matching circuit
220 * @note never remove called by MW,
221 * @retval return Max Power configuration of matching circuit for Low Power or High Power mode in dBm
222 */
224
225/* USER CODE BEGIN EFP */
226
227/* USER CODE END EFP */
228
229#ifdef __cplusplus
230}
231#endif
232
233#endif /* RADIO_BOARD_IF_H */
Header for General HW instances configuration.
int32_t RBI_GetTxConfig(void)
Return Board Configuration.
int32_t RBI_DeInit(void)
DeInit Radio Switch.
int32_t RBI_IsDCDC(void)
Get If DCDC is to be present on board.
RBI_RFOMaxPowerConfig_TypeDef
@ RBI_RFO_LP_MAXPOWER
@ RBI_RFO_HP_MAXPOWER
int32_t RBI_ConfigRFSwitch(RBI_Switch_TypeDef Config)
Configure Radio Switch.
int32_t RBI_IsTCXO(void)
Get If TCXO is to be present on board.
int32_t RBI_GetRFOMaxPowerConfig(RBI_RFOMaxPowerConfig_TypeDef Config)
Return RF Output Max Power Configuration of matching circuit.
RBI_Switch_TypeDef
@ RBI_SWITCH_RFO_HP
@ RBI_SWITCH_RX
@ RBI_SWITCH_OFF
@ RBI_SWITCH_RFO_LP
int32_t RBI_Init(void)
Init Radio Switch.