Wirepas SDK
wms_radio_config.h
Go to the documentation of this file.
1 /* Copyright 2020 Wirepas Ltd. All Rights Reserved.
2  *
3  * See file LICENSE.txt for full license details.
4  *
5  */
6 
17 #ifndef APP_LIB_RADIO_CONFIG_H_
18 #define APP_LIB_RADIO_CONFIG_H_
19 
20 #include <stdlib.h>
21 #include <stdint.h>
22 #include <stdbool.h>
23 
24 #include "wms_app.h"
25 
27 #define APP_LIB_RADIO_CFG_NAME 0x6e080bb7
28 
29 
30 #define APP_LIB_RADIO_CFG_VERSION 0x200
31 
33 #define APP_LIB_RADIO_CFG_POWER_MAX_CNT 10
34 
50 typedef enum
51 {
63 
79 typedef struct
80 {
86  uint32_t pd_to_sby;
92  uint32_t sby_to_tx;
98  uint32_t sby_to_rx;
103 
121 typedef void (*app_lib_radio_cfg_fem_set_power_cb_f)(uint8_t power_index);
122 
137 typedef void (*app_lib_radio_cfg_fem_cmd_cb_f)(uint8_t femcmd);
138 
144 typedef struct
145 {
153 
163 typedef struct
164 {
166  uint32_t tx_power_raw;
170  uint8_t value_set;
172  uint16_t tx_current;
174 
184 typedef struct
185 {
187  uint16_t rx_current;
189  int8_t rx_gain_dbm;
191  uint8_t power_count;
200 
208  (const app_lib_radio_cfg_fem_t * fem_cfg);
209 
217  (const app_lib_radio_cfg_power_t * power_cfg);
218 
229 typedef app_res_e (*app_lib_radio_cfg_pa_setup_f) (const void * pa_cfg);
230 
234 typedef struct
235 {
247 
248 #endif /* APP_LIB_RADIO_CONFIG_H_ */
app_lib_radio_cfg_fem_cmd_cb_f
void(* app_lib_radio_cfg_fem_cmd_cb_f)(uint8_t femcmd)
Callback function to control FEM state.
Definition: wms_radio_config.h:137
app_lib_radio_cfg_fem_timings_t::sby_to_tx
uint32_t sby_to_tx
Definition: wms_radio_config.h:92
app_lib_radio_cfg_fem_timings_t::pd_to_sby
uint32_t pd_to_sby
Definition: wms_radio_config.h:86
app_lib_radio_cfg_t::femSetup
app_lib_radio_cfg_fem_setup_f femSetup
Definition: wms_radio_config.h:238
app_lib_radio_cfg_fem_timings_t::delay_values_set
bool delay_values_set
Definition: wms_radio_config.h:101
APP_LIB_RADIO_CFG_FEM_PWR_OFF
@ APP_LIB_RADIO_CFG_FEM_PWR_OFF
Definition: wms_radio_config.h:61
APP_LIB_RADIO_CFG_FEM_STANDBY
@ APP_LIB_RADIO_CFG_FEM_STANDBY
Definition: wms_radio_config.h:57
app_lib_radio_cfg_pa_setup_f
app_res_e(* app_lib_radio_cfg_pa_setup_f)(const void *pa_cfg)
Setup radio PA configuration, relevant only for platforms that require PA configuration (e....
Definition: wms_radio_config.h:229
app_lib_radio_cfg_fem_t::setPower
app_lib_radio_cfg_fem_set_power_cb_f setPower
Definition: wms_radio_config.h:147
app_res_e
app_res_e
Definition: wms_app.h:201
app_lib_radio_cfg_fem_t
Radio FEM configuration structure from application to firmware.
Definition: wms_radio_config.h:144
app_lib_radio_cfg_tx_pwr_lvl_t::tx_current
uint16_t tx_current
Definition: wms_radio_config.h:172
app_lib_radio_cfg_power_t::rx_gain_dbm
int8_t rx_gain_dbm
Definition: wms_radio_config.h:189
app_lib_radio_cfg_tx_pwr_lvl_t::tx_output_dbm
int8_t tx_output_dbm
Definition: wms_radio_config.h:168
app_lib_radio_cfg_fem_t::femCmd
app_lib_radio_cfg_fem_cmd_cb_f femCmd
Definition: wms_radio_config.h:149
app_lib_radio_cfg_fem_t::femTimings
app_lib_radio_cfg_fem_timings_t femTimings
Definition: wms_radio_config.h:151
wms_app.h
APP_LIB_RADIO_CFG_FEM_PWR_ON
@ APP_LIB_RADIO_CFG_FEM_PWR_ON
Definition: wms_radio_config.h:59
APP_LIB_RADIO_CFG_FEM_RX_ON
@ APP_LIB_RADIO_CFG_FEM_RX_ON
Definition: wms_radio_config.h:53
app_lib_radio_cfg_fem_timings_t::sby_to_rx
uint32_t sby_to_rx
Definition: wms_radio_config.h:98
APP_LIB_RADIO_CFG_POWER_MAX_CNT
#define APP_LIB_RADIO_CFG_POWER_MAX_CNT
Maximum amount of configurable power levels.
Definition: wms_radio_config.h:33
app_lib_radio_cfg_power_setup_f
app_res_e(* app_lib_radio_cfg_power_setup_f)(const app_lib_radio_cfg_power_t *power_cfg)
Setup radio configuration / power level settings.
Definition: wms_radio_config.h:217
app_lib_radio_cfg_power_t::power_count
uint8_t power_count
Definition: wms_radio_config.h:191
app_lib_radio_cfg_fem_timings_t
FEM state transition delays.
Definition: wms_radio_config.h:79
app_lib_radio_cfg_tx_pwr_lvl_t::tx_power_raw
uint32_t tx_power_raw
Definition: wms_radio_config.h:166
app_lib_radio_cfg_fem_setup_f
app_res_e(* app_lib_radio_cfg_fem_setup_f)(const app_lib_radio_cfg_fem_t *fem_cfg)
Setup FEM control.
Definition: wms_radio_config.h:208
app_lib_radio_cfg_power_t
Radio FEM configuration structure from application to firmware.
Definition: wms_radio_config.h:184
APP_LIB_RADIO_CFG_FEM_TX_ON
@ APP_LIB_RADIO_CFG_FEM_TX_ON
Definition: wms_radio_config.h:55
app_lib_radio_cfg_t::powerSetup
app_lib_radio_cfg_power_setup_f powerSetup
Definition: wms_radio_config.h:241
app_lib_radio_cfg_tx_pwr_lvl_t
Definition for single TX power level.
Definition: wms_radio_config.h:163
app_lib_radio_cfg_femcmd_e
app_lib_radio_cfg_femcmd_e
FEM control command from firmware to application.
Definition: wms_radio_config.h:50
app_lib_radio_cfg_tx_pwr_lvl_t::value_set
uint8_t value_set
Definition: wms_radio_config.h:170
app_lib_radio_cfg_t::paSetup
app_lib_radio_cfg_pa_setup_f paSetup
Definition: wms_radio_config.h:245
app_lib_radio_cfg_power_t::rx_current
uint16_t rx_current
Definition: wms_radio_config.h:187
app_lib_radio_cfg_t
List of library functions.
Definition: wms_radio_config.h:234
app_lib_radio_cfg_fem_set_power_cb_f
void(* app_lib_radio_cfg_fem_set_power_cb_f)(uint8_t power_index)
Callback function to set radio TX power.
Definition: wms_radio_config.h:121