@@ -84,6 +84,76 @@ typedef enum
8484 LR11XX_HW_API_FEM_GNSS ,
8585} LR11XX_HW_API_FEM_t ;
8686
87+ /*!******************************************************************
88+ * \enum LR11XX_HW_API_tcxo_ctrl_t
89+ * \brief TCXO voltage configuration
90+ *******************************************************************/
91+ typedef enum
92+ {
93+ LR11XX_HW_API_TCXO_CTRL_1_6V = 0x00 ,
94+ LR11XX_HW_API_TCXO_CTRL_1_7V ,
95+ LR11XX_HW_API_TCXO_CTRL_1_8V ,
96+ LR11XX_HW_API_TCXO_CTRL_2_2V ,
97+ LR11XX_HW_API_TCXO_CTRL_2_4V ,
98+ LR11XX_HW_API_TCXO_CTRL_2_7V ,
99+ LR11XX_HW_API_TCXO_CTRL_3_0V ,
100+ LR11XX_HW_API_TCXO_CTRL_3_3V ,
101+ LR11XX_HW_API_TCXO_CTRL_LAST ,
102+ } LR11XX_HW_API_tcxo_supply_voltage_t ;
103+
104+ /*!******************************************************************
105+ * \enum LR11XX_HW_API_radio_pa_selection_t
106+ * \brief Power Amplifier Selection values
107+ * \brief - Low-power Power Amplifier can reach up to 14dBm
108+ * \brief - High-power Power Amplifier can reach up to 22 dBm
109+ *******************************************************************/
110+ typedef enum
111+ {
112+ LR11XX_HW_API_RADIO_PA_SEL_LP = 0x00 , //!< Low-power Power Amplifier
113+ LR11XX_HW_API_RADIO_PA_SEL_HP = 0x01 , //!< High-power Power Amplifier
114+ LR11XX_HW_API_RADIO_PA_SEL_HF = 0x02 , //!< High-frequency Power Amplifier
115+ } LR11XX_HW_API_radio_pa_selection_t ;
116+
117+ /*!
118+ * \enum LR11XX_HW_API_radio_pa_reg_supply_t
119+ * @brief Select power amplifier supply source
120+ */
121+ typedef enum
122+ {
123+ LR11XX_HW_API_RADIO_PA_REG_SUPPLY_VREG = 0x00 , //!< Power amplifier supplied by the main regulator
124+ LR11XX_HW_API_RADIO_PA_REG_SUPPLY_VBAT = 0x01 //!< Power amplifier supplied by the battery
125+ } LR11XX_HW_API_radio_pa_reg_supply_t ;
126+
127+ /*!******************************************************************
128+ * \struct LR11XX_HW_API_oscillator_type_t
129+ * \brief LR11XX oscillator configuration.
130+ *******************************************************************/
131+ typedef struct {
132+ sfx_u8 has_tcxo ;
133+ LR11XX_HW_API_tcxo_supply_voltage_t tcxo_supply_voltage ;
134+ sfx_u32 startup_time_in_tick ;
135+ } LR11XX_HW_API_xosc_cfg_t ;
136+
137+ /*!******************************************************************
138+ * \struct LR11XX_HW_API_pa_cfg_t
139+ * \brief Configuration of Power Amplifier
140+ *******************************************************************/
141+ typedef struct {
142+ LR11XX_HW_API_radio_pa_selection_t pa_sel ; //!< Power Amplifier selection
143+ LR11XX_HW_API_radio_pa_reg_supply_t pa_reg_supply ; //!< Power Amplifier regulator supply source
144+ sfx_u8 pa_duty_cycle ; //!< Power Amplifier duty cycle (Default 0x04)
145+ sfx_u8 pa_hp_sel ; //!< Number of slices for HPA (Default 0x07)
146+ } LR11XX_HW_API_pa_cfg_t ;
147+
148+ /*!******************************************************************
149+ * \struct LR11XX_HW_API_pa_pwr_cfg_t
150+ * \brief TODO
151+ *******************************************************************/
152+ typedef struct {
153+ sfx_s8 power ;
154+ LR11XX_HW_API_pa_cfg_t pa_config ;
155+ }LR11XX_HW_API_pa_pwr_cfg_t ;
156+
87157#if (defined TIMER_REQUIRED ) && (defined LATENCY_COMPENSATION )
88158/*!******************************************************************
89159 * \enum LR11XX_HW_API_latency_t
@@ -135,8 +205,8 @@ LR11XX_HW_API_status_t LR11XX_HW_API_delayMs(unsigned short delay_ms);
135205
136206 * \fn LR11XX_HW_API_status_t LR11XX_HW_API_get_fem_mask(LR11XX_HW_API_FEM_t fem, sfx_u8 *rfsw_dio_mask);
137207 * \brief Lock configuration of several pins for a dedicated port.
138- * \param[in] fem front end module or switch configuration.
139- * \param[out] rfsw_dio_mask This parameter can be a combination of the following values:
208+ * \param[in] fem: front end module or switch configuration.
209+ * \param[out] rfsw_dio_mask: This parameter can be a combination of the following values:
140210 * \arg \ref LR11XX_HW_API_RFSW0_DIO5
141211 * \arg \ref LR11XX_HW_API_RFSW1_DIO6
142212 * \arg \ref LR11XX_HW_API_RFSW2_DIO7
@@ -146,6 +216,24 @@ LR11XX_HW_API_status_t LR11XX_HW_API_delayMs(unsigned short delay_ms);
146216 *******************************************************************/
147217LR11XX_HW_API_status_t LR11XX_HW_API_get_fem_mask (LR11XX_HW_API_FEM_t fem , sfx_u8 * rfsw_dio_mask );
148218
219+ /*!******************************************************************
220+ * \fn LR11XX_HW_API_status_t LR11XX_HW_API_get_xosc_cfg(LR11XX_HW_API_xosc_cfg_t *xosc_cfg);
221+ * \brief Get oscillator configuration according to hardware matching. For more informations see LR11XX User Manual (chapter 6.3.2).
222+ * \param[out] xosc_cfg: Pointer to oscillator structure configuration compatible with the hardware.
223+ * \retval Function execution status.
224+ *******************************************************************/
225+ LR11XX_HW_API_status_t LR11XX_HW_API_get_xosc_cfg (LR11XX_HW_API_xosc_cfg_t * xosc_cfg );
226+
227+ /*!******************************************************************
228+ * \fn LR11XX_HW_API_status_t LR11XX_HW_API_get_pa_pwr_cfg(LR11XX_HW_API_pa_pwr_cfg_t *pa_pwr_cfg, sfx_u32 rf_freq_in_hz, sfx_s8 expected_output_pwr_in_dbm);
229+ * \brief Get the LR11XX PA power and configuration according to hardware matching. For more informations see LR11XX User Manual (chapter 9.5.1 / 9.5.2) or contact Semtech.
230+ * \param[in] rf_freq_in_hz: RF frequence in Hz
231+ * \param[in] expected_output_pwr_in_dbm: TX output power in dBm
232+ * \param[out] pa_pwr_cfg: Pointer to PA power configuration structure
233+ * \retval Function execution status.
234+ *******************************************************************/
235+ LR11XX_HW_API_status_t LR11XX_HW_API_get_pa_pwr_cfg (LR11XX_HW_API_pa_pwr_cfg_t * pa_pwr_cfg , sfx_u32 rf_freq_in_hz , sfx_s8 expected_output_pwr_in_dbm );
236+
149237/*!******************************************************************
150238 * \fn LR11XX_HW_API_status_t LR11XX_HW_API_tx_on(void);
151239 * \brief Radio chipset will be start the TX.
0 commit comments