Microchip® Advanced Software Framework

radio_driver_SX1276.c File Reference

This is the Radio drivers SX1276 source file which contains LoRa-specific Radio drivers functions declarations and defines for SX1276.

Copyright (c) 2019 Microchip Technology Inc. and its subsidiaries.

#include "radio_interface.h"
#include "radio_registers_SX1276.h"
#include "radio_driver_SX1276.h"
#include "radio_driver_hal.h"
#include "radio_get_set.h"
#include "radio_transaction.h"
#include "sw_timer.h"
#include "sys.h"
#include "stdint.h"
#include "string.h"

Functions

void RADIO_FHSSChangeChannel (void)
 This function sets the receive frequency of the transceiver while hopping in FHSS. More...
 
RadioError_t Radio_ReadFSKRssi (int16_t *rssi)
 This function reads the RSSI value for FSK. More...
 
RadioError_t Radio_ReadLoraRssi (int16_t *rssi)
 This function reads the RSSI value for LoRa. More...
 
uint16_t RADIO_ReadRandom (void)
 This function generates random number using the transceiver and returns it. More...
 
void Radio_WriteMode (RadioMode_t newMode, RadioModulation_t newModulation, uint8_t blocking)
 This function sets the radioMode and modulation in order to set the transceiver to transmit and receive at a set modulation. More...
 

Variables

volatile RadioCallbackMask_t radioCallbackMask
 
RadioConfiguration_t radioConfiguration
 

void RADIO_FHSSChangeChannel ( void  )
RadioError_t Radio_ReadFSKRssi ( int16_t *  rssi)

This function reads the RSSI value for FSK.

Parameters
rssi- The RSSI measured in the channel.
Returns
- ERR_NONE. Other types are not used now.

References ERR_NONE, RADIO_RegisterRead(), and REG_FSK_RSSIVALUE.

RadioError_t Radio_ReadLoraRssi ( int16_t *  rssi)

This function reads the RSSI value for LoRa.

Parameters
rssi- The RSSI measured in the channel.
Returns
- ERR_NONE. Other types are not used now.

References ERR_NONE, _RadioConfiguration_t::frequency, HF_FREQ_HZ, RADIO_RegisterRead(), REG_LORA_RSSIVALUE, RSSI_HF_OFFSET, and RSSI_LF_OFFSET.

uint16_t RADIO_ReadRandom ( void  )
void Radio_WriteMode ( RadioMode_t  newMode,
RadioModulation_t  newModulation,
uint8_t  blocking 
)

This function sets the radioMode and modulation in order to set the transceiver to transmit and receive at a set modulation.

Parameters
newMode- Sets the transceiver mode.
newModulation- Sets the modulation.
blocking- Sets if its blocking call or not.
Returns
- none.

References delay_ms, MODE_CAD, MODE_RXSINGLE, MODE_SLEEP, MODULATION_FSK, MODULATION_LORA, RADIO_RegisterRead(), RADIO_RegisterWrite(), REG_DIOMAPPING2, REG_OPMODE, and SystemBlockingWaitMs().

Referenced by RADIO_ReadRandom().

volatile RadioCallbackMask_t radioCallbackMask
RadioConfiguration_t radioConfiguration