26 #include "platform/Callback.h" 454 virtual void radio_reset() = 0;
459 virtual void sleep(
void) = 0;
464 virtual void standby(
void) = 0;
502 uint32_t
datarate, uint8_t coderate,
504 uint16_t symb_timeout,
bool fix_len,
506 bool crc_on,
bool freq_hop_on, uint8_t hop_period,
539 uint32_t bandwidth, uint32_t datarate,
540 uint8_t coderate, uint16_t preamble_len,
541 bool fix_len,
bool crc_on,
bool freq_hop_on,
542 uint8_t hop_period,
bool iq_inverted, uint32_t timeout) = 0;
552 virtual void send(uint8_t *buffer, uint8_t size) = 0;
559 virtual void receive(
void) = 0;
566 virtual void set_channel(uint32_t freq) = 0;
577 virtual uint32_t random(
void) = 0;
584 virtual uint8_t get_status(
void) = 0;
592 virtual void set_max_payload_length(
radio_modems_t modem, uint8_t max) = 0;
601 virtual void set_public_network(
bool enable) = 0;
612 virtual uint32_t time_on_air(
radio_modems_t modem, uint8_t pkt_len) = 0;
631 int16_t rssi_threshold,
632 uint32_t max_carrier_sense_time) = 0;
638 virtual void start_cad(
void) = 0;
645 virtual bool check_rf_frequency(uint32_t frequency) = 0;
653 virtual void set_tx_continuous_wave(uint32_t freq, int8_t power, uint16_t time) = 0;
658 virtual void lock(
void) = 0;
663 virtual void unlock(
void) = 0;
666 #endif // LORARADIO_H_ int16_t rssi_value
RSSI value in dBm for the received packet.
uint32_t rx_single_timeout
Timeout value in symbols (symb) after which the radio driver reports a timeout if the radio did not r...
radio_lora_packet_handler_t lora_packet_handler
LoRa packet and metadata.
bool rx_continuous
Turn continuous reception mode (such as Class C mode) on/off.
PinName rf_switch_ctl1
TX latch switch pin.
uint8_t hop_period
Number of symbols between two frequency hops.
struct radio_fsk_settings radio_fsk_settings_t
FSK modem parameters.
enum modem_type radio_modems_t
Type of modem.
radio_state
Radio driver internal state.
Structure to hold RF controls for LoRa Radio.
uint32_t tx_timeout
Timeout value in milliseconds (ms) after which the radio driver reports a timeout if the radio was un...
uint32_t f_dev
Frequency deviation.
struct radio_lora_packet_handler radio_lora_packet_handler_t
LoRa packet Contains information about a LoRa packet.
uint16_t preamble_len
Preamble length in symbols.
struct radio_lora_settings radio_lora_settings_t
LoRa modem parameters.
int8_t snr_value
Signal-to-noise ratio of a received packet.
uint32_t bandwidth_afc
Automated frequency correction bandwidth.
uint8_t preamble_detected
Set to true (1) when a Preamble is detected, otherwise false (0).
uint8_t coderate
Error correction code rate.
uint8_t rx_gain
LNA gain value (dbm).
uint16_t preamble_len
Expected preamble length.
struct radio_events radio_events_t
Reporting functions for upper layers.
enum radio_state radio_state_t
Radio driver internal state.
uint8_t payload_len
Size of outgoing data.
uint8_t modem
Current modem operation, such as MODEM_LORA.
uint32_t channel
Current channel of operation.
PinName ant_switch
Transceiver switch pin.
PinName rf_switch_ctl2
RX latch switch pin.
uint32_t datarate
Data rate (SF).
uint32_t bandwidth
Modulation bandwidth.
bool freq_hop_on
Turn frequency hopping on/off.
bool public_network
Change the network mode to Public or Private.
uint8_t fifo_thresh
Stores the FIFO threshold value.
uint8_t chunk_size
Defines the size of a chunk of outgoing buffer written to the FIFO at a unit time.
radio_fsk_settings_t fsk
Settings for FSK modem part.
radio_lora_settings_t lora
Settings for LoRa modem part.
int8_t power
Transmit power.
Reporting functions for upper layers.
LoRa packet Contains information about a LoRa packet.
bool rx_continuous
Turn continuous reception mode (such as in Class C) on/off.
bool crc_on
Turn CRC on/off.
bool iq_inverted
Turn IQ inversion on/off.
uint8_t sync_word_detected
Set to true (1) when a SyncWord is detected, otherwise false (0).
uint32_t bandwidth
Modulation bandwidth.
PinName pwr_amp_ctl
Power amplifier control pin.
int32_t afc_value
Automated frequency correction value.
bool fix_len
Set to true if the outgoing payload length is fixed.
bool crc_on
Turn CRC on/off.
struct radio_settings radio_settings_t
Global radio settings.
mbed::Callback< void(bool channel_busy)> cad_done
CAD Done callback prototype.
mbed::Callback< void()> tx_done
Callback when Transmission is done.
uint16_t nb_bytes
Keeps track of number of bytes already read from the RX FIFO.
mbed::Callback< void()> tx_timeout
Callback when Transmission is timed out.
uint32_t tx_timeout
Timeout in milliseconds (ms) after which the radio driver reports an error if the radio was unable to...
mbed::Callback< void()> rx_timeout
Callback when Reception is timed out.
PinName tcxo
TCXO crystal control pin.
uint16_t size
Size of the received data in bytes.
struct radio_fsk_packet_handler radio_fsk_packet_handler_t
FSK packet handle.
PinName rxctl
RX control pin for transceiver packaged as a module.
mbed::Callback< void()> rx_error
Callback when Reception ends up in error.
radio_fsk_packet_handler_t fsk_packet_handler
FSK packet and meta data.
Interface for the radios, containing the main functions that a radio needs, and five callback functio...
bool fix_len
This flag turns on if the TX data size is fixed.
mbed::Callback< void(uint8_t current_channel)> fhss_change_channel
FHSS Change Channel callback prototype.
int8_t power
Transmit power.
bool low_datarate_optimize
Turn low data rate optimization on/off.
uint8_t state
Current state of the radio, such as RF_IDLE.
mbed::Callback< void(const uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr)> rx_done
Rx Done callback prototype.
PinName txctl
TX control pin for transceiver packaged as a module.
static void sleep(void)
Send the microcontroller to sleep.
uint8_t payload_len
Size of outgoing payload.
uint8_t size
Size of the transmitted or received packet.
uint32_t datarate
Data rate (SF).
int16_t rssi_value
Storage for RSSI value of the received signal.