Semtech SX127X internal functions.  
More...
#include <inttypes.h>
#include "sx127x.h"
 
Go to the source code of this file.
 | 
| int  | sx127x_check_version (const sx127x_t *dev) | 
|   | Check the transceiver version.  
  | 
|   | 
| void  | sx127x_reg_write (const sx127x_t *dev, uint8_t addr, uint8_t data) | 
|   | Writes the radio register at specified address.  
  | 
|   | 
| uint8_t  | sx127x_reg_read (const sx127x_t *dev, uint8_t addr) | 
|   | Reads the radio register at specified address.  
  | 
|   | 
| 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).  
  | 
|   | 
| 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.  
  | 
|   | 
| void  | sx127x_write_fifo (const sx127x_t *dev, uint8_t *buffer, uint8_t size) | 
|   | Writes the buffer contents to the SX1276 FIFO.  
  | 
|   | 
| void  | sx127x_read_fifo (const sx127x_t *dev, uint8_t *buffer, uint8_t size) | 
|   | Reads the contents of the SX1276 FIFO.  
  | 
|   | 
| int16_t  | sx127x_read_rssi (const sx127x_t *dev) | 
|   | Reads the current RSSI value.  
  | 
|   | 
◆ SX127X_POR_ACTIVE_LOGIC_LEVEL
      
        
          | #define SX127X_POR_ACTIVE_LOGIC_LEVEL   (0) | 
        
      
 
 
◆ SX127X_RSSI_OFFSET_HF
      
        
          | #define SX127X_RSSI_OFFSET_HF   (-157) | 
        
      
 
 
◆ SX127X_RSSI_OFFSET_LF
      
        
          | #define SX127X_RSSI_OFFSET_LF   (-164) | 
        
      
 
 
◆ sx127x_check_version()
      
        
          | int sx127x_check_version  | 
          ( | 
          const sx127x_t * |           dev | ) | 
           | 
        
      
 
Check the transceiver version. 
- Parameters
 - 
  
    | [in] | dev | The 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] | dev | The sx127x device structure pointer  | 
    | [in] | size | Size Number of bytes to be read from the FIFO  | 
    | [out] | buffer | Buffer 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] | dev | The 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] | dev | The sx127x device structure pointer  | 
    | [in] | addr | Register 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] | dev | The sx127x device structure pointer  | 
    | [in] | addr | First radio register address  | 
    | [in] | size | Number of registers to be read  | 
    | [out] | buffer | Buffer 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] | dev | The sx127x device structure pointer  | 
    | [in] | addr | Register address  | 
    | [in] | data | New 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] | dev | The sx127x device structure pointer  | 
    | [in] | addr | First radio register address  | 
    | [in] | buffer | Buffer containing the new register's values  | 
    | [in] | size | Number 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] | dev | The sx127x device structure pointer  | 
    | [in] | buffer | Buffer Buffer containing data to be put on the FIFO.  | 
    | [in] | size | Size Number of bytes to be written to the FIFO  |