lriot 2.1.0.0
|
Radio driver definition for LR1110. More...
#include "transceiver/lr1110_radio_types.h"
#include "common/lr1110_types.h"
#include "common/lr1110_hal.h"
Go to the source code of this file.
Macros | |
#define | LR1110_RADIO_GFSK_SYNC_WORD_LENGTH 8 |
Length in byte of the GFSK sync word. | |
#define | LR11110_RADIO_GFSK_SYNC_WORD_DEFAULT |
Default GFSK sync word value. | |
Functions | |
err_t | lr1110_radio_reset_stats (lriot_t *ctx) |
Reset internal statistics of the received packets. | |
err_t | lr1110_radio_get_gfsk_stats (lriot_t *ctx, lr1110_radio_stats_gfsk_t *stats) |
Get the internal statistics of the GFSK received packets. | |
err_t | lr1110_radio_get_lora_stats (lriot_t *ctx, lr1110_radio_stats_lora_t *stats) |
Get the internal statistics of the LoRa received packets. | |
err_t | lr1110_radio_get_pkt_type (lriot_t *ctx, uint8_t *pkt_type) |
Get the packet type currently configured. | |
err_t | lr1110_radio_get_rx_buffer_status (lriot_t *ctx, lr1110_radio_rx_buffer_status_t *rx_buffer_status) |
Get the length of last received packet, and the offset in the RX internal buffer of the first byte of the received payload. | |
err_t | lr1110_radio_get_gfsk_pkt_status (lriot_t *ctx, lr1110_radio_pkt_status_gfsk_t *pkt_status) |
Get the status of last GFSK received packet. | |
err_t | lr1110_radio_get_lora_pkt_status (lriot_t *ctx, lr1110_radio_pkt_status_lora_t *pkt_status) |
Get the status of last LoRa received packet. | |
err_t | lr1110_radio_get_rssi_inst (lriot_t *ctx, int8_t *rssi_in_dbm) |
Get the instantaneous RSSI. | |
err_t | lr1110_radio_set_gfsk_sync_word (lriot_t *ctx, uint8_t gfsk_sync_word[LR1110_RADIO_GFSK_SYNC_WORD_LENGTH]) |
Set the GFSK modem sync word. | |
err_t | lr1110_radio_set_lora_sync_word (lriot_t *ctx, uint8_t sync_word) |
Set the LoRa modem sync word. | |
err_t | lr1110_radio_set_lora_public_network (lriot_t *ctx, lr1110_radio_lora_network_type_t network_type) |
Set the LoRa modem sync word to private / public. | |
err_t | lr1110_radio_set_rx (lriot_t *ctx, uint32_t timeout_in_ms) |
Start RX operations. | |
err_t | lr1110_radio_set_rx_with_timeout_in_rtc_step (lriot_t *ctx, uint32_t timeout_in_rtc_step) |
Start RX operations. | |
err_t | lr1110_radio_set_tx (lriot_t *ctx, uint32_t timeout_in_ms) |
Start TX operations. | |
err_t | lr1110_radio_set_tx_with_timeout_in_rtc_step (lriot_t *ctx, uint32_t timeout_in_rtc_step) |
Start TX operations. | |
err_t | lr1110_radio_set_rf_freq (lriot_t *ctx, uint32_t freq_in_hz) |
Set the frequency for future radio operations. | |
err_t | lr1110_radio_auto_tx_rx (lriot_t *ctx, uint32_t delay, lr1110_radio_intermediary_mode_t intermediary_mode, uint32_t timeout) |
Configure automatic TX after RX or automatic RX after TX. | |
err_t | lr1110_radio_set_cad_params (lriot_t *ctx, lr1110_radio_cad_params_t *cad_params) |
Set Channel Activity Detection configuration. | |
err_t | lr1110_radio_set_pkt_type (lriot_t *ctx, uint8_t pkt_type) |
Set the packet type. | |
err_t | lr1110_radio_set_gfsk_mod_params (lriot_t *ctx, lr1110_radio_mod_params_gfsk_t *mod_params) |
Set the modulation parameters for GFSK packets. | |
err_t | lr1110_radio_set_lora_mod_params (lriot_t *ctx, lr1110_radio_mod_params_lora_t *mod_params) |
Set the modulation parameters for LoRa packets. | |
err_t | lr1110_radio_set_gfsk_pkt_params (lriot_t *ctx, lr1110_radio_pkt_params_gfsk_t *pkt_params) |
Set the packet parameters for GFSK packets. | |
err_t | lr1110_radio_set_lora_pkt_params (lriot_t *ctx, lr1110_radio_pkt_params_lora_t *pkt_params) |
Set the packet parameters for LoRa packets. | |
err_t | lr1110_radio_set_tx_params (lriot_t *ctx, int8_t pwr_in_dbm, lr1110_radio_ramp_time_t ramp_time) |
Set the parameters for TX power and power amplifier ramp time. | |
err_t | lr1110_radio_set_pkt_address (lriot_t *ctx, uint8_t node_address, uint8_t broadcast_address) |
Sets the Node and Broadcast address used for GFSK. | |
err_t | lr1110_radio_set_rx_tx_fallback_mode (lriot_t *ctx, lr1110_radio_fallback_modes_t fallback_mode) |
Alter the chip mode after successfull transmission or reception operation. | |
err_t | lr1110_radio_set_rx_duty_cycle (lriot_t *ctx, uint32_t rx_period_in_ms, uint32_t sleep_period_in_ms, lr1110_radio_rx_duty_cycle_mode_t mode) |
Configure and start a Rx Duty Cycle operation. | |
err_t | lr1110_radio_set_rx_duty_cycle_with_timings_in_rtc_step (lriot_t *ctx, uint32_t rx_period_in_rtc_step, uint32_t sleep_period_in_rtc_step, lr1110_radio_rx_duty_cycle_mode_t mode) |
Configure and start a Rx Duty Cycle operation. | |
err_t | lr1110_radio_set_pa_cfg (lriot_t *ctx, lr1110_radio_pa_cfg_t *pa_cfg) |
Set the Power Amplifier configuration. | |
err_t | lr1110_radio_stop_timeout_on_preamble (lriot_t *ctx, bool stop_timeout_on_preamble) |
Define on which event the Rx timeout shall be stopped. | |
err_t | lr1110_radio_set_cad (lriot_t *ctx) |
Start the CAD mode. | |
err_t | lr1110_radio_set_tx_cw (lriot_t *ctx) |
Set the device into Tx continuous wave (RF tone). | |
err_t | lr1110_radio_set_tx_infinite_preamble (lriot_t *ctx) |
Set the device into Tx continuous preamble (modulated signal). | |
err_t | lr1110_radio_set_lora_sync_timeout (lriot_t *ctx, uint8_t nb_symbol) |
Configure the LoRa modem to issue a RX timeout after an exact number of symbols given in parameter if no LoRa modulation is detected. | |
err_t | lr1110_radio_set_gfsk_crc_params (lriot_t *ctx, uint32_t seed, uint32_t polynomial) |
Configure the seed and the polynomial used to compute CRC in GFSK packet. | |
err_t | lr1110_radio_set_gfsk_whitening_seed (lriot_t *ctx, uint16_t seed) |
Configure the whitening seed used in GFSK packet. | |
err_t | lr1110_radio_cfg_rx_boosted (lriot_t *ctx, bool enable_boost_mode) |
Configure the boost mode in reception. | |
err_t | lr1110_radio_get_gfsk_rx_bandwidth (uint32_t bw_in_hz, lr1110_radio_gfsk_bw_t *bw_parameter) |
Gets the radio bw parameter for a given bandwidth in Hz. | |
uint32_t | lr1110_radio_get_lora_time_on_air_numerator (lr1110_radio_pkt_params_lora_t *pkt_p, lr1110_radio_mod_params_lora_t *mod_p) |
Compute the numerator for LoRa time-on-air computation. | |
uint32_t | lr1110_radio_get_lora_bw_in_hz (lr1110_radio_lora_bw_t bw) |
Get the actual value in Hertz of a given LoRa bandwidth. | |
uint32_t | lr1110_radio_get_lora_time_on_air_in_ms (lr1110_radio_pkt_params_lora_t *pkt_p, lr1110_radio_mod_params_lora_t *mod_p) |
Get the time on air in ms for LoRa transmission. | |
uint32_t | lr1110_radio_get_gfsk_time_on_air_numerator (lr1110_radio_pkt_params_gfsk_t *pkt_p) |
Compute the numerator for GFSK time-on-air computation. | |
uint32_t | lr1110_radio_get_gfsk_time_on_air_in_ms (lr1110_radio_pkt_params_gfsk_t *pkt_p, lr1110_radio_mod_params_gfsk_t *mod_p) |
Get the time on air in ms for GFSK transmission. | |
uint32_t | lr1110_radio_convert_time_in_ms_to_rtc_step (uint32_t time_in_ms) |
Get the number of RTC steps for a given time in millisecond. | |
err_t | lr1110_radio_get_lora_rx_info (lriot_t *ctx, bool *is_crc_present, uint8_t *cr) |
Get the information from the last received LoRa packet header (if LR1110_RADIO_LORA_PKT_EXPLICIT) or the locally configured settings (if LR1110_RADIO_LORA_PKT_IMPLICIT) | |
Radio driver definition for LR1110.
The Clear BSD License Copyright Semtech Corporation 2021. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define LR1110_RADIO_GFSK_SYNC_WORD_LENGTH 8 |
Length in byte of the GFSK sync word.
#define LR11110_RADIO_GFSK_SYNC_WORD_DEFAULT |
Default GFSK sync word value.
err_t lr1110_radio_auto_tx_rx | ( | lriot_t * | ctx, |
uint32_t | delay, | ||
lr1110_radio_intermediary_mode_t | intermediary_mode, | ||
uint32_t | timeout ) |
Configure automatic TX after RX or automatic RX after TX.
After issuing this command, using the command SetTx will make the LR1110 doing the following:
Similarly, after a SetRx command, the LR1110 will do the following:
In case delay is 0, the LR1110 does not enter Intermediary mode and directly enter the following mode.
To disable this behavior, use this function with delay set to 0xFFFFFFFF.
[in] | ctx | Chip implementation context |
[in] | delay | Time to spend in Intermediary mode expressed as steps of steps. |
[in] | intermediary_mode | The mode the LR1110 enters after first mode completion during delay time |
[in] | timeout | The timeout duration of the automatic RX or TX, expressed as steps of |
err_t lr1110_radio_cfg_rx_boosted | ( | lriot_t * | ctx, |
bool | enable_boost_mode ) |
Configure the boost mode in reception.
[in] | ctx | Chip implementation context |
[in] | enable_boost_mode | Boost mode activation |
uint32_t lr1110_radio_convert_time_in_ms_to_rtc_step | ( | uint32_t | time_in_ms | ) |
Get the number of RTC steps for a given time in millisecond.
[in] | time_in_ms | Timeout in millisecond |
err_t lr1110_radio_get_gfsk_pkt_status | ( | lriot_t * | ctx, |
lr1110_radio_pkt_status_gfsk_t * | pkt_status ) |
Get the status of last GFSK received packet.
The value depends on the received packet type
[in] | ctx | Chip implementation context |
[out] | pkt_status | The last received packet status |
err_t lr1110_radio_get_gfsk_rx_bandwidth | ( | uint32_t | bw_in_hz, |
lr1110_radio_gfsk_bw_t * | bw_parameter ) |
Gets the radio bw parameter for a given bandwidth in Hz.
[in] | bw_in_hz | Requested GFSK Rx bandwidth |
[out] | bw_parameter | Radio parameter immediately above requested bw_in_hz |
err_t lr1110_radio_get_gfsk_stats | ( | lriot_t * | ctx, |
lr1110_radio_stats_gfsk_t * | stats ) |
Get the internal statistics of the GFSK received packets.
Internal statistics are reset on Power on Reset, by entering sleep mode without memory retention, or by calling lr1110_radio_reset_stats.
[in] | ctx | Chip implementation context |
[out] | stats | The statistics structure of the received packets |
uint32_t lr1110_radio_get_gfsk_time_on_air_in_ms | ( | lr1110_radio_pkt_params_gfsk_t * | pkt_p, |
lr1110_radio_mod_params_gfsk_t * | mod_p ) |
Get the time on air in ms for GFSK transmission.
[in] | pkt_p | Pointer to a structure holding the GFSK packet parameters |
[in] | mod_p | Pointer to a structure holding the GFSK modulation parameters |
uint32_t lr1110_radio_get_gfsk_time_on_air_numerator | ( | lr1110_radio_pkt_params_gfsk_t * | pkt_p | ) |
Compute the numerator for GFSK time-on-air computation.
[in] | pkt_p | Pointer to the structure holding the GFSK packet parameters |
uint32_t lr1110_radio_get_lora_bw_in_hz | ( | lr1110_radio_lora_bw_t | bw | ) |
Get the actual value in Hertz of a given LoRa bandwidth.
[in] | bw | LoRa bandwidth parameter |
err_t lr1110_radio_get_lora_pkt_status | ( | lriot_t * | ctx, |
lr1110_radio_pkt_status_lora_t * | pkt_status ) |
Get the status of last LoRa received packet.
The value depends on the received packet type
[in] | ctx | Chip implementation context |
[out] | pkt_status | The last received packet status |
err_t lr1110_radio_get_lora_rx_info | ( | lriot_t * | ctx, |
bool * | is_crc_present, | ||
uint8_t * | cr ) |
Get the information from the last received LoRa packet header (if LR1110_RADIO_LORA_PKT_EXPLICIT) or the locally configured settings (if LR1110_RADIO_LORA_PKT_IMPLICIT)
[in] | ctx | Chip implementation context |
[out] | is_crc_present | CRC configuration |
[out] | cr | LoRa coding rate |
err_t lr1110_radio_get_lora_stats | ( | lriot_t * | ctx, |
lr1110_radio_stats_lora_t * | stats ) |
Get the internal statistics of the LoRa received packets.
Internal statistics are reset on Power on Reset, by entering sleep mode without memory retention, or by calling lr1110_radio_reset_stats.
[in] | ctx | Chip implementation context |
[out] | stats | The statistics structure of the received packets |
uint32_t lr1110_radio_get_lora_time_on_air_in_ms | ( | lr1110_radio_pkt_params_lora_t * | pkt_p, |
lr1110_radio_mod_params_lora_t * | mod_p ) |
Get the time on air in ms for LoRa transmission.
[in] | pkt_p | Pointer to a structure holding the LoRa packet parameters |
[in] | mod_p | Pointer to a structure holding the LoRa modulation parameters |
uint32_t lr1110_radio_get_lora_time_on_air_numerator | ( | lr1110_radio_pkt_params_lora_t * | pkt_p, |
lr1110_radio_mod_params_lora_t * | mod_p ) |
Compute the numerator for LoRa time-on-air computation.
[in] | pkt_p | Pointer to the structure holding the LoRa packet parameters |
[in] | mod_p | Pointer to the structure holding the LoRa modulation parameters |
err_t lr1110_radio_get_pkt_type | ( | lriot_t * | ctx, |
uint8_t * | pkt_type ) |
Get the packet type currently configured.
[in] | ctx | Chip implementation context |
[out] | pkt_type | The packet type currently configured |
err_t lr1110_radio_get_rssi_inst | ( | lriot_t * | ctx, |
int8_t * | rssi_in_dbm ) |
Get the instantaneous RSSI.
This command can be used during reception of a packet
[in] | ctx | Chip implementation context |
[out] | rssi_in_dbm | Instantaneous RSSI. |
err_t lr1110_radio_get_rx_buffer_status | ( | lriot_t * | ctx, |
lr1110_radio_rx_buffer_status_t * | rx_buffer_status ) |
Get the length of last received packet, and the offset in the RX internal buffer of the first byte of the received payload.
[in] | ctx | Chip implementation context |
[out] | rx_buffer_status | The structure of RX buffer status |
err_t lr1110_radio_reset_stats | ( | lriot_t * | ctx | ) |
Reset internal statistics of the received packets.
[in] | ctx | Chip implementation context |
err_t lr1110_radio_set_cad | ( | lriot_t * | ctx | ) |
Start the CAD mode.
The LoRa packet type shall be selected before this function is called. The fallback mode is configured with lr1110_radio_set_cad_params.
[in] | ctx | Chip implementation context |
err_t lr1110_radio_set_cad_params | ( | lriot_t * | ctx, |
lr1110_radio_cad_params_t * | cad_params ) |
Set Channel Activity Detection configuration.
[in] | ctx | Chip implementation context |
[in] | cad_params | The structure defining CAD configuration |
err_t lr1110_radio_set_gfsk_crc_params | ( | lriot_t * | ctx, |
uint32_t | seed, | ||
uint32_t | polynomial ) |
Configure the seed and the polynomial used to compute CRC in GFSK packet.
[in] | ctx | Chip implementation context |
[in] | seed | Seed used to compute the CRC value |
[in] | polynomial | Polynomial used to compute the CRC value |
err_t lr1110_radio_set_gfsk_mod_params | ( | lriot_t * | ctx, |
lr1110_radio_mod_params_gfsk_t * | mod_params ) |
Set the modulation parameters for GFSK packets.
The command lr1110_radio_set_pkt_type must be called prior this one.
[in] | ctx | Chip implementation context |
[in] | mod_params | The structure of modulation configuration |
err_t lr1110_radio_set_gfsk_pkt_params | ( | lriot_t * | ctx, |
lr1110_radio_pkt_params_gfsk_t * | pkt_params ) |
Set the packet parameters for GFSK packets.
The command lr1110_radio_set_pkt_type must be called prior this one.
[in] | ctx | Chip implementation context |
[in] | pkt_params | The structure of packet configuration |
err_t lr1110_radio_set_gfsk_sync_word | ( | lriot_t * | ctx, |
uint8_t | gfsk_sync_word[LR1110_RADIO_GFSK_SYNC_WORD_LENGTH] ) |
Set the GFSK modem sync word.
This command is used to set the GFSK nodem sync word. This command expects a 8-byte long array to be passed as sync word parameter. By default, the value is 0x9723522556536564.
[in] | ctx | Chip implementation context |
[in] | gfsk_sync_word | The sync word to be configured |
err_t lr1110_radio_set_gfsk_whitening_seed | ( | lriot_t * | ctx, |
uint16_t | seed ) |
Configure the whitening seed used in GFSK packet.
[in] | ctx | Chip implementation context |
[in] | seed | Whitening seed value |
err_t lr1110_radio_set_lora_mod_params | ( | lriot_t * | ctx, |
lr1110_radio_mod_params_lora_t * | mod_params ) |
Set the modulation parameters for LoRa packets.
The command lr1110_radio_set_pkt_type must be called prior this one.
[in] | ctx | Chip implementation context |
[in] | mod_params | The structure of modulation configuration |
err_t lr1110_radio_set_lora_pkt_params | ( | lriot_t * | ctx, |
lr1110_radio_pkt_params_lora_t * | pkt_params ) |
Set the packet parameters for LoRa packets.
The command lr1110_radio_set_pkt_type must be called prior this one.
[in] | ctx | Chip implementation context |
[in] | pkt_params | The structure of packet configuration |
err_t lr1110_radio_set_lora_public_network | ( | lriot_t * | ctx, |
lr1110_radio_lora_network_type_t | network_type ) |
Set the LoRa modem sync word to private / public.
This command is used to select which LoRa network is selected
[in] | ctx | Chip implementation context |
[in] | network_type | The network type to be configured |
err_t lr1110_radio_set_lora_sync_timeout | ( | lriot_t * | ctx, |
uint8_t | nb_symbol ) |
Configure the LoRa modem to issue a RX timeout after an exact number of symbols given in parameter if no LoRa modulation is detected.
[in] | ctx | Chip implementation context |
[in] | nb_symbol | number of symbols to compute the timeout |
err_t lr1110_radio_set_lora_sync_word | ( | lriot_t * | ctx, |
uint8_t | sync_word ) |
Set the LoRa modem sync word.
[in] | ctx | Chip implementation context |
[in] | sync_word | The sync word to be configured |
err_t lr1110_radio_set_pa_cfg | ( | lriot_t * | ctx, |
lr1110_radio_pa_cfg_t * | pa_cfg ) |
Set the Power Amplifier configuration.
It must be called prior using lr1110_radio_set_tx_params.
[in] | ctx | Chip implementation context |
[in] | pa_cfg | The structure for PA configuration |
err_t lr1110_radio_set_pkt_address | ( | lriot_t * | ctx, |
uint8_t | node_address, | ||
uint8_t | broadcast_address ) |
Sets the Node and Broadcast address used for GFSK.
This setting is used only when filtering is enabled.
[in] | ctx | Chip implementation context |
[in] | node_address | The node address used as filter |
[in] | broadcast_address | The broadcast address used as filter |
err_t lr1110_radio_set_pkt_type | ( | lriot_t * | ctx, |
uint8_t | pkt_type ) |
Set the packet type.
[in] | ctx | Chip implementation context |
[in] | pkt_type | Packet type to set |
err_t lr1110_radio_set_rf_freq | ( | lriot_t * | ctx, |
uint32_t | freq_in_hz ) |
Set the frequency for future radio operations.
This commands does not set frequency for Wi-Fi and GNSS scan operations.
[in] | ctx | Chip implementation context |
[in] | freq_in_hz | The frequency in Hz to set for radio operations |
err_t lr1110_radio_set_rx | ( | lriot_t * | ctx, |
uint32_t | timeout_in_ms ) |
Start RX operations.
This command sets the LR1110 to RX mode. The radio must have been configured before using this command with lr1110_radio_set_pkt_type
By default, the timeout parameter allows to return automatically to standby RC mode if no packets have been received after a certain amount of time. This behavior can be altered by lr1110_radio_set_rx_tx_fallback_mode and lr1110_radio_auto_tx_rx.
[in] | ctx | Chip implementation context |
[in] | timeout_in_ms | The timeout configuration for RX operation |
err_t lr1110_radio_set_rx_duty_cycle | ( | lriot_t * | ctx, |
uint32_t | rx_period_in_ms, | ||
uint32_t | sleep_period_in_ms, | ||
lr1110_radio_rx_duty_cycle_mode_t | mode ) |
Configure and start a Rx Duty Cycle operation.
It executes the following steps:
[in] | ctx | Chip implementation context |
[in] | rx_period_in_ms | The length of Rx period |
[in] | sleep_period_in_ms | The length of sleep period |
[in] | mode | The operation mode during Rx phase |
err_t lr1110_radio_set_rx_duty_cycle_with_timings_in_rtc_step | ( | lriot_t * | ctx, |
uint32_t | rx_period_in_rtc_step, | ||
uint32_t | sleep_period_in_rtc_step, | ||
lr1110_radio_rx_duty_cycle_mode_t | mode ) |
Configure and start a Rx Duty Cycle operation.
It executes the following steps:
[in] | ctx | Chip implementation context |
[in] | rx_period_in_rtc_step | The length of Rx period |
[in] | sleep_period_in_rtc_step | The length of sleep period |
[in] | mode | The operation mode during Rx phase |
err_t lr1110_radio_set_rx_tx_fallback_mode | ( | lriot_t * | ctx, |
lr1110_radio_fallback_modes_t | fallback_mode ) |
Alter the chip mode after successfull transmission or reception operation.
This setting is not used during Rx Duty Cycle mode or Auto Tx Rx.
[in] | ctx | Chip implementation context |
[in] | fallback_mode | The chip mode to enter after successfull transmission or reception. |
err_t lr1110_radio_set_rx_with_timeout_in_rtc_step | ( | lriot_t * | ctx, |
uint32_t | timeout_in_rtc_step ) |
Start RX operations.
This command sets the LR1110 to RX mode. The radio must have been configured before using this command with lr1110_radio_set_pkt_type
By default, the timeout parameter allows to return automatically to standby RC mode if no packets have been received after a certain amount of time. This behavior can be altered by lr1110_radio_set_rx_tx_fallback_mode and lr1110_radio_auto_tx_rx.
The timeout duration is obtained by:
Maximal timeout value is 0xFFFFFF, which gives a maximal timeout of 511 seconds.
The timeout argument can also have the following special values:
Special values | Meaning |
---|---|
0x000000 | RX single: LR1110 stays in RX mode until a packet is received, then switch to standby RC mode |
0xFFFFFF | RX continuous: LR1110 stays in RX mode even after reception of a packet |
[in] | ctx | Chip implementation context |
[in] | timeout_in_rtc_step | The timeout configuration for RX operation |
err_t lr1110_radio_set_tx | ( | lriot_t * | ctx, |
uint32_t | timeout_in_ms ) |
Start TX operations.
This command sets the LR1110 to TX mode. The radio must have been configured before using this command with lr1110_radio_set_pkt_type
By default, the timeout parameter allows to return automatically to standby RC mode if the packet has not been completely transmitted after a certain amount of time. This behavior can be altered by lr1110_radio_set_rx_tx_fallback_mode and lr1110_radio_auto_tx_rx.
[in] | ctx | Chip implementation context |
[in] | timeout_in_ms | The timeout configuration for TX operation |
err_t lr1110_radio_set_tx_cw | ( | lriot_t * | ctx | ) |
Set the device into Tx continuous wave (RF tone).
A packet type shall be selected before this function is called.
[in] | ctx | Chip implementation context |
err_t lr1110_radio_set_tx_infinite_preamble | ( | lriot_t * | ctx | ) |
Set the device into Tx continuous preamble (modulated signal).
[in] | ctx | Chip implementation context |
err_t lr1110_radio_set_tx_params | ( | lriot_t * | ctx, |
int8_t | pwr_in_dbm, | ||
lr1110_radio_ramp_time_t | ramp_time ) |
Set the parameters for TX power and power amplifier ramp time.
The command lr1110_radio_set_pa_cfg must be called prior calling lr1110_radio_set_tx_params.
The range of possible TX output power values depends on PA selected with lr1110_radio_set_pa_cfg :
Moreover, to use TX output power value higher than +10dBm, the REGPASUPPLY_VBAT supply must have been selected with lr1110_radio_set_pa_cfg.
[in] | ctx | Chip implementation context |
[in] | pwr_in_dbm | The TX output power in dBm |
[in] | ramp_time | The ramping time configuration for the PA |
err_t lr1110_radio_set_tx_with_timeout_in_rtc_step | ( | lriot_t * | ctx, |
uint32_t | timeout_in_rtc_step ) |
Start TX operations.
This command sets the LR1110 to TX mode. The radio must have been configured before using this command with lr1110_radio_set_pkt_type
By default, the timeout parameter allows to return automatically to standby RC mode if the packet has not been completely transmitted after a certain amount of time. This behavior can be altered by lr1110_radio_set_rx_tx_fallback_mode and lr1110_radio_auto_tx_rx.
The timeout duration is obtained by:
Maximal value is 0xFFFFFF.
If the timeout argument is 0, then no timeout is used.
[in] | ctx | Chip implementation context |
[in] | timeout_in_rtc_step | The timeout configuration for TX operation |
err_t lr1110_radio_stop_timeout_on_preamble | ( | lriot_t * | ctx, |
bool | stop_timeout_on_preamble ) |
Define on which event the Rx timeout shall be stopped.
The two options are:
[in] | ctx | Chip implementation context |
[in] | stop_timeout_on_preamble | The choice of the event to be taken into account |