CC110X SPI functions. More...

Detailed Description

#include <stdint.h>
+ Include dependency graph for cc110x-spi.h:

Go to the source code of this file.

Functions

void cc110x_writeburst_reg (cc110x_t *dev, uint8_t addr, const char *buffer, uint8_t count)
 Write a set of bytes using burst mode (if available) More...
 
void cc110x_readburst_reg (cc110x_t *dev, uint8_t addr, char *buffer, uint8_t count)
 Read a set of bytes using burst mode (if available) More...
 
void cc110x_write_reg (cc110x_t *dev, uint8_t addr, uint8_t value)
 Write one byte to a register. More...
 
uint8_t cc110x_read_reg (cc110x_t *dev, uint8_t addr)
 Read a byte from register. More...
 
uint8_t cc110x_get_reg_robust (cc110x_t *dev, uint8_t addr)
 Read a byte from register, robust version. More...
 
uint8_t cc110x_read_status (cc110x_t *dev, uint8_t addr)
 Read state of a register. More...
 
uint8_t cc110x_strobe (cc110x_t *dev, uint8_t c)
 Sends a command strobe. More...
 
void cc110x_cs (cc110x_t *dev)
 Pull CS to low and wait for CC110x stabilization. More...
 

Function Documentation

◆ cc110x_cs()

void cc110x_cs ( cc110x_t dev)

Pull CS to low and wait for CC110x stabilization.

Parameters
devDevice to work on

◆ cc110x_get_reg_robust()

uint8_t cc110x_get_reg_robust ( cc110x_t dev,
uint8_t  addr 
)

Read a byte from register, robust version.

Datasheet states some registered should be read twice until it returns the same value.

Parameters
devDevice to work on
addrSource register
Returns
Read state and value of register

◆ cc110x_read_reg()

uint8_t cc110x_read_reg ( cc110x_t dev,
uint8_t  addr 
)

Read a byte from register.

Parameters
devDevice to work on
addrSource register
Returns
Read state and value of register

◆ cc110x_read_status()

uint8_t cc110x_read_status ( cc110x_t dev,
uint8_t  addr 
)

Read state of a register.

Parameters
devDevice to work on
addrSource register
Returns
State of register

◆ cc110x_readburst_reg()

void cc110x_readburst_reg ( cc110x_t dev,
uint8_t  addr,
char *  buffer,
uint8_t  count 
)

Read a set of bytes using burst mode (if available)

Parameters
devDevice to work on
addrSource register
bufferBuffer to store read data
countSize of data to be read

◆ cc110x_strobe()

uint8_t cc110x_strobe ( cc110x_t dev,
uint8_t  c 
)

Sends a command strobe.

Parameters
devDevice to work on
cCommand code
Returns
Command response

◆ cc110x_write_reg()

void cc110x_write_reg ( cc110x_t dev,
uint8_t  addr,
uint8_t  value 
)

Write one byte to a register.

Parameters
devDevice to work on
addrDestinatoin register
valueNew value

◆ cc110x_writeburst_reg()

void cc110x_writeburst_reg ( cc110x_t dev,
uint8_t  addr,
const char *  buffer,
uint8_t  count 
)

Write a set of bytes using burst mode (if available)

Parameters
devDevice to work on
addrDestination register
bufferData to be written
countSize of data