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 | ) |
This function sets the receive frequency of the transceiver while hopping in FHSS.
- | none |
References _RadioCallbackMask_t::BitMask, _RadioConfiguration_t::frequencyHopPeriod, RADIO_FHSS_NEXT_FREQ_CALLBACK, RADIO_RegisterRead(), RADIO_RegisterWrite(), Radio_WriteFrequency(), _RadioConfiguration_t::radioCallback, _RadioCallbackMask_t::_BitMask_::radioFhssfreqCallback, REG_LORA_IRQFLAGS, and SHIFT1.
RadioError_t Radio_ReadFSKRssi | ( | int16_t * | rssi | ) |
This function reads the RSSI value for FSK.
rssi | - The RSSI measured in the channel. |
References ERR_NONE, RADIO_RegisterRead(), and REG_FSK_RSSIVALUE.
RadioError_t Radio_ReadLoraRssi | ( | int16_t * | rssi | ) |
This function reads the RSSI value for LoRa.
rssi | - The RSSI measured in the channel. |
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 | ) |
This function generates random number using the transceiver and returns it.
- | none |
References i, MODE_RXCONT, MODE_SLEEP, MODULATION_LORA, Radio_DisableRfControl(), Radio_EnableRfControl(), RADIO_RegisterRead(), RADIO_RegisterWrite(), Radio_ResetClockInput(), RADIO_RFCTRL_RX, Radio_SetClockInput(), Radio_WriteMode(), REG_LORA_IRQFLAGS, REG_LORA_IRQFLAGSMASK, REG_LORA_RSSIWIDEBAND, SHIFT1, and SystemBlockingWaitMs().
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.
newMode | - Sets the transceiver mode. |
newModulation | - Sets the modulation. |
blocking | - Sets if its blocking call or not. |
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 |