#include <modm/driver/radio/sx1276.hpp>
|
enum | Sx1276Register : uint8_t |
| Definitions of all the Registers of the modem in LoRa mode.
|
|
enum | OpModeRegister : uint8_t |
| Operation mode register.
|
|
enum | ModemMode : uint8_t |
| Modem operation modes.
|
|
enum | Interrupts : uint8_t |
| Available interrupts with their positions in the flag and mask register.
|
|
enum | ModemConfig1 : uint8_t |
| Operation mode register.
|
|
enum | Bandwidth : uint8_t |
| LoRa Bandwidth Modes.
|
|
enum | CodingRate : uint8_t |
| LoRa Coding Rate.
|
|
enum | ModemConfig2 : uint8_t |
|
enum | ModemConfig3 : uint8_t |
|
enum | SpreadingFactor : uint8_t |
| Available Spreading Factors.
|
|
|
static constexpr int16_t | rssiOffsetLF = -164 |
|
|
bool | acquireMaster () |
|
bool | releaseMaster () |
|
template<typename SpiMaster, typename Cs>
struct modm::Sx1276< SpiMaster, Cs >
- Template Parameters
-
- Author
- Benjamin Carrick
template<typename SpiMaster , typename Cs >
int16_t modm::Sx1276< SpiMaster, Cs >::getCurrentRssi |
( |
| ) |
|
Get the current recieved signal strength indicator (RSSI)
- Returns
- The RSSI value of the last received packet
template<typename SpiMaster , typename Cs >
int16_t modm::Sx1276< SpiMaster, Cs >::getPacketRssi |
( |
| ) |
|
Get the recieved signal strength indicator (RSSI) of the last received packet.
- Returns
- The RSSI value of the last received packet
template<typename SpiMaster , typename Cs >
Get the signal to noise ratio for the last received packet.
- Returns
- The raw signal to noise ratio in dB (has to be divided by 4 for the actual value)
template<typename SpiMaster , typename Cs >
uint8_t modm::Sx1276< SpiMaster, Cs >::readPacket |
( |
uint8_t * |
data, |
|
|
uint8_t |
maxLength |
|
) |
| |
Reads a package from the modem if one is available. The return value indicates how many bytes have been read from the last received package. If the return value is 0 no package has been received, is it larger than the max length parameter, the package was bigger than the buffer provided and got discarded.
- Parameters
-
data | A pointer to a buffer where received data will be stored |
maxLength | The maximum amount of bytes that can be read |
- Returns
- The amount of bytes in the last package
template<typename SpiMaster , typename Cs >
void modm::Sx1276< SpiMaster, Cs >::setCarrierFrequency |
( |
frequency_t |
freq | ) |
|
Set the carrier frequency of the Modem.
- Parameters
-
freq | The Carrier frequency the modem will be tuned to |
template<typename SpiMaster , typename Cs >
Setup the modem parameters.
- Parameters
-
bw | The Bandwidth of the LoRa Transmission |
sf | The Spreading factor for each symbol |
cr | The Coding rate for the symbols |
implicitHeader | Run the modem in implicit header mode |
payloadCrc | Append CRC checksums to validate the packages |
template<typename SpiMaster , typename Cs >
void modm::Sx1276< SpiMaster, Cs >::setSyncWord |
( |
uint8_t |
syncWord | ) |
|
Set the sync word for the LoRa packages.
- Parameters
-
syncWord | The new sync word of upcoming lora packages |
template<typename SpiMaster , typename Cs >
bool modm::Sx1276< SpiMaster, Cs >::transmit |
( |
uint8_t * |
data, |
|
|
uint8_t |
length |
|
) |
| |
Transmit a single package.
- Parameters
-
data | A pointer to the payload data of the Package |
length | The length of the payload data in bytes |
- Returns
- Returns true if transmission has started. False if the buffer was already sending
The documentation for this struct was generated from the following files:
- sx1276.hpp
- sx1276_definitions.hpp