SX1272 LoRa device driver. More...
Data Structures | |
struct | SX1272_Packet |
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 | |
SX1272_t | SX1272_init (SX1272_t *, SPI_t *, GPIOpin_t, SX1272_Bandwidth, SX1272_SpreadingFactor, SX1272_CodingRate) |
Initializes the LoRa module with specified configuration parameters. | |
void | SX1272_enableBoost (SX1272_t *, bool) |
Enables/disables power amplifier boost. | |
void | SX1272_standby (SX1272_t *) |
Sets the operational mode of the LoRa module to standby. | |
void | SX1272_transmit (SX1272_t *, uint8_t *) |
Transmits data using the SX1272. | |
void | SX1272_startReceive (SX1272_t *) |
Begins continuous receive on the SX1272. | |
bool | SX1272_readReceive (SX1272_t *, uint8_t *, uint8_t) |
Reads contents of received packet to local buffer from the SX1272. | |
void | SX1272_clearIRQ (SX1272_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. | |
void | _SX1272_setMode (SX1272_t *, SX1272_Mode) |
Sets the operational mode of the LoRa module. | |
SX1272 LoRa device driver.
struct SX1272_Packet |
struct SX1272_t |
Struct definition for SX1272. Provides the interface for API consumers to interact with the SX1272 LoRa transceiver.
Data Fields | ||
---|---|---|
SPI_t * | base | Parent SPI interface. |
GPIOpin_t | cs | Chip select GPIO. |
SX1272_Mode | currentMode | Current operating mode. |
void(*)(struct SX1272 *, bool) | enableBoost |
Power amp boost toggle method.
|
void(*)(struct SX1272 *) | standby |
SX1272 standby method.
|
void(*)(struct SX1272 *, uint8_t *) | transmit |
SX1272 LoRa transmit method.
|
void(*)(struct SX1272 *) | startReceive |
SX1272 LoRa continuous receive method.
|
bool(*)(struct SX1272 *, uint8_t *, uint8_t) | readReceive |
SX1272 LoRa receive buffer read method.
|
void(*)(struct SX1272 *, uint8_t) | clearIRQ |
SX1272 LoRa IRQ flag clear method.
|
enum SX1272_Bandwidth |
enum SX1272_CodingRate |
enum SX1272_Mode |
SX1272_t SX1272_init | ( | SX1272_t * | lora, |
SPI_t * | spi, | ||
GPIOpin_t | cs, | ||
SX1272_Bandwidth | bw, | ||
SX1272_SpreadingFactor | sf, | ||
SX1272_CodingRate | cr ) |
Initializes the LoRa module with specified configuration parameters.
*lora | Pointer to LoRa struct to be initialised. |
*spi | Pointer to SPI peripheral struct. |
cs | Device chip select GPIO. |
bw | Bandwidth setting for the LoRa module. |
sf | Spreading factor for the LoRa module. |
cr | Coding rate for the LoRa module. |
void SX1272_enableBoost | ( | SX1272_t * | lora, |
bool | enable ) |
void SX1272_standby | ( | SX1272_t * | lora | ) |
void SX1272_transmit | ( | SX1272_t * | lora, |
uint8_t * | pointerdata ) |
void SX1272_startReceive | ( | SX1272_t * | lora | ) |
bool SX1272_readReceive | ( | SX1272_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_clearIRQ | ( | SX1272_t * | lora, |
uint8_t | flags ) |
void _SX1272_setMode | ( | SX1272_t * | lora, |
SX1272_Mode | mode ) |