llcspi 2.0.0.0
Public function

Functions

void llcspi_cfg_setup (llcspi_cfg_t *cfg)
 Config Object Initialization function.
 
LLCSPI_RETVAL llcspi_init (llcspi_t *ctx, llcspi_cfg_t *cfg)
 Initialization function.
 
void llcspi_generic_transfer (llcspi_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
void llcspi_set_cs_pin (llcspi_t *ctx, uint8_t state)
 Function for set CS pin state.
 
void llcspi_generic_write (llcspi_t *ctx, uint8_t *p_buf, uint16_t n_bytes)
 LLC SPI write.
 
void llcspi_generic_read (llcspi_t *ctx, uint8_t *p_buf, uint16_t n_bytes)
 LLC SPI read.
 

Detailed Description

Function Documentation

◆ llcspi_cfg_setup()

void llcspi_cfg_setup ( llcspi_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ llcspi_generic_read()

void llcspi_generic_read ( llcspi_t * ctx,
uint8_t * p_buf,
uint16_t n_bytes )

LLC SPI read.

Parameters
ctxClick object.
p_bufpointer to data buffer
n_bytesnumber of bytes for writing

@description Function executes read sequence of n bytes.

Note
This function should not use CS pin.

◆ llcspi_generic_transfer()

void llcspi_generic_transfer ( llcspi_t * ctx,
uint8_t * wr_buf,
uint16_t wr_len,
uint8_t * rd_buf,
uint16_t rd_len )

Generic transfer function.

Parameters
ctxClick object.
wr_bufWrite data buffer
wr_lenNumber of byte in write data buffer
rd_bufRead data buffer
rd_lenNumber of byte in read data buffer

@description Generic SPI transfer, for sending and receiving packages

◆ llcspi_generic_write()

void llcspi_generic_write ( llcspi_t * ctx,
uint8_t * p_buf,
uint16_t n_bytes )

LLC SPI write.

Parameters
ctxClick object.
p_bufpointer to data buffer
n_bytesnumber of bytes for writing

@description Function executes write sequence of n bytes.

Note
This function have not using CS pin.

◆ llcspi_init()

LLCSPI_RETVAL llcspi_init ( llcspi_t * ctx,
llcspi_cfg_t * cfg )

Initialization function.

Parameters
llcspiClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ llcspi_set_cs_pin()

void llcspi_set_cs_pin ( llcspi_t * ctx,
uint8_t state )

Function for set CS pin state.

Parameters
ctxClick object.
stateCS pin state