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.

Functions

int sx127x_check_version (const sx127x_t *dev)
 Check the transceiver version. 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...
 
int16_t sx127x_read_rssi (const sx127x_t *dev)
 Reads the current RSSI value. More...
 

Constant values used to compute RSSI

#define SX127X_RSSI_OFFSET_LF   (-164)
 
#define SX127X_RSSI_OFFSET_HF   (-157)
 

Device specific logic level to indicate POR-cycle is active

#define SX127X_POR_ACTIVE_LOGIC_LEVEL   (0)
 

Function Documentation

◆ sx127x_check_version()

int sx127x_check_version ( const sx127x_t dev)

Check the transceiver version.

Parameters
[in]devThe sx127x device descriptor
Returns
0 when a valid device version is found
-1 when no valid device version is found

◆ 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_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