SX1272 LoRa device driver. More...
Data Structures | |
struct | SX1272_Config |
SX1272 LoRa configuration struct. More... | |
struct | SX1272_t |
Struct definition for SX1272. Provides the interface for API consumers to interact with the SX1272 LoRa transceiver. More... | |
Enumerations | |
enum | SX1272_Bandwidth |
SX1272 bandwidth enum. More... | |
enum | SX1272_CodingRate |
SX1272 coding rate enum. More... | |
enum | SX1272_SpreadingFactor |
SX1272 spreading factor enum. More... | |
enum | SX1272_Mode |
SX1272 operating mode enum. More... | |
Functions | |
bool | SX1272_init (SX1272_t *lora, SPI_t *spi, GPIOpin_t cs, SX1272_Config *config) |
Initializes the LoRa module with specified configuration parameters. | |
bool | SX1272_updateConfig (SX1272_t *lora, SX1272_Config *config) |
Update SX1272 configuration. | |
void | SX1272_transmit (LoRa_t *lora, uint8_t *data, uint8_t length) |
Transmits data using the SX1272. | |
void | SX1272_startReceive (LoRa_t *lora) |
Begins continuous receive on the SX1272. | |
uint8_t | SX1272_readReceive (LoRa_t *lora, uint8_t *data, uint8_t byffSize) |
Reads contents of received packet to local buffer from the SX1272. | |
void | SX1272_standby (SX1272_t *) |
Sets the operational mode of the LoRa module to standby. | |
void | SX1272_clearIRQ (LoRa_t *, uint8_t) |
Sets the value of RegIrqFlags in the SX1272 to the provided argument value. Writing a 1 to a bit in the register will clear the associated flag. | |
SX1272 LoRa device driver.
struct SX1272_Config |
SX1272 LoRa configuration struct.
Describes the configuration of SX1272 LoRa parameters.
Data Fields | ||
---|---|---|
float | freq | SX1272 LoRa carrier frequency. |
SX1272_SpreadingFactor | sf | SX1272 LoRa modem spreading factor. |
SX1272_Bandwidth | bw | SX1272 LoRa modem bandwidth. |
SX1272_CodingRate | cr | SX1272 LoRa modem coding rate. |
bool | implicitHeader | SX1272 LoRa modem implicit header enable. |
bool | crc | SX1272 LoRa modem CRC enable. |
bool | paSelect | SX1272 LoRa modem power amp output select. |
uint8_t | outputPower | SX1272 LoRa modem power amp output power. |
bool | ocp | SX1272 LoRa modem overcurrent protection enable. |
uint8_t | ocpTrim | SX1272 LoRa modem overcurrent protection trim. |
uint8_t | rxFifoBaseAddr | Base address for RX fifo. |
uint8_t | txFifoBaseAddr | Base address for TX fifo. |
uint8_t | maxPayloadLength | Maximum allowed length of payload. |
struct SX1272_t |
Struct definition for SX1272. Provides the interface for API consumers to interact with the SX1272 LoRa transceiver.
Data Fields | ||
---|---|---|
LoRa_t | base | Base LoRa API. |
SX1272_Config | config | Configuration parameters for the SX1272 driver. |
SPI_t * | spi | Parent SPI interface. |
GPIOpin_t | cs | Chip select GPIO. |
SX1272_Mode | currentMode | Current operating mode. |
void(*)(struct SX1272 *) | standby |
SX1272 standby method.
|
bool(*)(struct SX1272 *, SX1272_Config *) | updateConfig |
SX1272 configuration update method.
|
enum SX1272_Bandwidth |
enum SX1272_CodingRate |
enum SX1272_Mode |
bool SX1272_init | ( | SX1272_t * | lora, |
SPI_t * | spi, | ||
GPIOpin_t | cs, | ||
SX1272_Config * | config ) |
bool SX1272_updateConfig | ( | SX1272_t * | lora, |
SX1272_Config * | config ) |
void SX1272_transmit | ( | LoRa_t * | lora, |
uint8_t * | pointerdata, | ||
uint8_t | length ) |
void SX1272_startReceive | ( | LoRa_t * | lora | ) |
uint8_t SX1272_readReceive | ( | LoRa_t * | lora, |
uint8_t * | buffer, | ||
uint8_t | buffSize ) |
Reads contents of received packet to local buffer from the SX1272.
lora | Pointer to SX1272 struct. |
buffer | Pointer to the buffer to store received data. |
buffSize | Integer representing the size of the buffer to to fill. |
void SX1272_standby | ( | SX1272_t * | lora | ) |
void SX1272_clearIRQ | ( | LoRa_t * | lora, |
uint8_t | flags ) |