Semtech SX127X internal functions. More...

Detailed Description

Semtech SX127X internal functions.

Author
Eugene P. ep@un.nosp@m.wds..nosp@m.com
José Ignacio Alamos jose..nosp@m.alam.nosp@m.os@in.nosp@m.ria..nosp@m.cl
Alexandre Abadie alexa.nosp@m.ndre.nosp@m..abad.nosp@m.ie@i.nosp@m.nria..nosp@m.fr

Definition in file sx127x_internal.h.

#include <inttypes.h>
#include "sx127x.h"
+ Include dependency graph for sx127x_internal.h:

Go to the source code of this file.

Macros

Constant values used to compute RSSI
#define SX127X_RSSI_OFFSET_LF   (-164)
 
#define SX127X_RSSI_OFFSET_HF   (-157)
 

Functions

bool sx127x_test (const sx127x_t *dev)
 Tests the transceiver version type. More...
 
void sx127x_reg_write (const sx127x_t *dev, uint8_t addr, uint8_t data)
 Writes the radio register at specified address. More...
 
uint8_t sx127x_reg_read (const sx127x_t *dev, uint8_t addr)
 Reads the radio register at specified address. More...
 
void sx127x_reg_write_burst (const sx127x_t *dev, uint8_t addr, uint8_t *buffer, uint8_t size)
 Writes multiple radio registers starting at address (burst-mode). More...
 
void sx127x_reg_read_burst (const sx127x_t *dev, uint8_t addr, uint8_t *buffer, uint8_t size)
 Reads multiple radio registers starting at address. More...
 
void sx127x_write_fifo (const sx127x_t *dev, uint8_t *buffer, uint8_t size)
 Writes the buffer contents to the SX1276 FIFO. More...
 
void sx127x_read_fifo (const sx127x_t *dev, uint8_t *buffer, uint8_t size)
 Reads the contents of the SX1276 FIFO. More...
 
void sx127x_rx_chain_calibration (sx127x_t *dev)
 Performs the Rx chain calibration for LF and HF bands. More...
 
int16_t sx127x_read_rssi (const sx127x_t *dev)
 Reads the current RSSI value. More...
 

Function Documentation

◆ sx127x_read_fifo()

void sx127x_read_fifo ( const sx127x_t dev,
uint8_t *  buffer,
uint8_t  size 
)

Reads the contents of the SX1276 FIFO.

Parameters
[in]devThe sx127x device structure pointer
[in]sizeSize Number of bytes to be read from the FIFO
[out]bufferBuffer Buffer where to copy the FIFO read data.

◆ sx127x_read_rssi()

int16_t sx127x_read_rssi ( const sx127x_t dev)

Reads the current RSSI value.

Parameters
[in]devThe sx127x device descriptor
Returns
current value of RSSI in [dBm]

◆ sx127x_reg_read()

uint8_t sx127x_reg_read ( const sx127x_t dev,
uint8_t  addr 
)

Reads the radio register at specified address.

Parameters
[in]devThe sx127x device structure pointer
[in]addrRegister address
Returns
Register value

◆ sx127x_reg_read_burst()

void sx127x_reg_read_burst ( const sx127x_t dev,
uint8_t  addr,
uint8_t *  buffer,
uint8_t  size 
)

Reads multiple radio registers starting at address.

Parameters
[in]devThe sx127x device structure pointer
[in]addrFirst radio register address
[in]sizeNumber of registers to be read
[out]bufferBuffer where to copy registers data

◆ sx127x_reg_write()

void sx127x_reg_write ( const sx127x_t dev,
uint8_t  addr,
uint8_t  data 
)

Writes the radio register at specified address.

Parameters
[in]devThe sx127x device structure pointer
[in]addrRegister address
[in]dataNew register value

◆ sx127x_reg_write_burst()

void sx127x_reg_write_burst ( const sx127x_t dev,
uint8_t  addr,
uint8_t *  buffer,
uint8_t  size 
)

Writes multiple radio registers starting at address (burst-mode).

Parameters
[in]devThe sx127x device structure pointer
[in]addrFirst radio register address
[in]bufferBuffer containing the new register's values
[in]sizeNumber of registers to be written

◆ sx127x_rx_chain_calibration()

void sx127x_rx_chain_calibration ( sx127x_t dev)

Performs the Rx chain calibration for LF and HF bands.

Must be called just after the reset so all registers are at their default values

Parameters
[in]devThe sx127x device structure pointer

◆ sx127x_test()

bool sx127x_test ( const sx127x_t dev)

Tests the transceiver version type.

Parameters
[in]devThe sx127x device descriptor
Returns
true if test passed, false otherwise

◆ sx127x_write_fifo()

void sx127x_write_fifo ( const sx127x_t dev,
uint8_t *  buffer,
uint8_t  size 
)

Writes the buffer contents to the SX1276 FIFO.

Parameters
[in]devThe sx127x device structure pointer
[in]bufferBuffer Buffer containing data to be put on the FIFO.
[in]sizeSize Number of bytes to be written to the FIFO