spiisolator 2.0.0.0

Functions

void spiisolator_cfg_setup (spiisolator_cfg_t *cfg)
 Config Object Initialization function.
 
SPIISOLATOR_RETVAL spiisolator_init (spiisolator_t *ctx, spiisolator_cfg_t *cfg)
 Initialization function.
 
void spiisolator_generic_transfer (spiisolator_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
void spiisolator_write_cmd (spiisolator_t *ctx, uint8_t cmd, uint8_t tx_data)
 
void spiisolator_write_byte (spiisolator_t *ctx, uint8_t reg_address, uint8_t write_cmd, uint8_t write_data)
 Write the byte of data function.
 
uint8_t spiisolator_read_byte (spiisolator_t *ctx, uint8_t reg_address, uint8_t read_cmd)
 Read the byte of data function.
 
void spiisolator_write_data (spiisolator_t *ctx, uint8_t reg_address, uint8_t write_cmd, uint16_t write_data)
 Write 16-bit data function.
 
uint16_t spiisolator_read_data (spiisolator_t *ctx, uint8_t reg_address, uint8_t read_cmd)
 Read 16-bit data function.
 
void spiisolator_write_bytes (spiisolator_t *ctx, uint8_t reg_address, uint8_t write_cmd, uint8_t *write_data, uint16_t n_bytes)
 Sequential write function.
 
void spiisolator_read_bytes (spiisolator_t *ctx, uint8_t reg_address, uint8_t read_cmd, uint8_t *read_data, uint16_t n_bytes)
 Sequential read function.
 

Detailed Description

Function Documentation

◆ spiisolator_cfg_setup()

void spiisolator_cfg_setup ( spiisolator_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.

◆ spiisolator_generic_transfer()

void spiisolator_generic_transfer ( spiisolator_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

◆ spiisolator_init()

SPIISOLATOR_RETVAL spiisolator_init ( spiisolator_t * ctx,
spiisolator_cfg_t * cfg )

Initialization function.

Parameters
spiisolatorClick object.
cfgClick configuration structure.

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

◆ spiisolator_read_byte()

uint8_t spiisolator_read_byte ( spiisolator_t * ctx,
uint8_t reg_address,
uint8_t read_cmd )

Read the byte of data function.

Parameters
ctxClick object.
reg_address8-bit register address
read_cmdread command
Returns
8-bit read data

@description Function reads the byte of data from the targeted 8-bit register address of connected random I2C click which is wired to the SPI Isolator Click board

◆ spiisolator_read_bytes()

void spiisolator_read_bytes ( spiisolator_t * ctx,
uint8_t reg_address,
uint8_t read_cmd,
uint8_t * read_data,
uint16_t n_bytes )

Sequential read function.

Parameters
reg_address8-bit register address
read_cmdread command
read_datapointer to the memory location where data be stored
n_bytesnumber of bytes to be written

@description Function read a sequential data starting from the targeted 8-bit register address of connected random I2C click which is wired to the SPI Isolator Click board

◆ spiisolator_read_data()

uint16_t spiisolator_read_data ( spiisolator_t * ctx,
uint8_t reg_address,
uint8_t read_cmd )

Read 16-bit data function.

Parameters
reg_address8-bit register address
read_cmdread command
Returns
16-bit read data

@description Function reads the 16-bit data from the targeted 8-bit register address of connected random I2C click which is wired to the SPI Isolator Click board

◆ spiisolator_write_byte()

void spiisolator_write_byte ( spiisolator_t * ctx,
uint8_t reg_address,
uint8_t write_cmd,
uint8_t write_data )

Write the byte of data function.

Parameters
ctxClick object.
reg_address8-bit register address
write_cmdwrite comman
write_dataByte of data to write

@description Function writes the byte of data to the targeted 8-bit register address of connected random I2C click which is wired to the SPI Isolator Click board

◆ spiisolator_write_bytes()

void spiisolator_write_bytes ( spiisolator_t * ctx,
uint8_t reg_address,
uint8_t write_cmd,
uint8_t * write_data,
uint16_t n_bytes )

Sequential write function.

Parameters
reg_address8-bit register address
write_cmdwrite command
write_datapointer to the data to be written
n_bytesnumber of bytes to be written

@description function writes a sequential data starting from the targeted 8-bit register address of connected random I2C click which is wired to the SPI Isolator Click board

◆ spiisolator_write_cmd()

void spiisolator_write_cmd ( spiisolator_t * ctx,
uint8_t cmd,
uint8_t tx_data )

◆ spiisolator_write_data()

void spiisolator_write_data ( spiisolator_t * ctx,
uint8_t reg_address,
uint8_t write_cmd,
uint16_t write_data )

Write 16-bit data function.

Parameters
reg_address8-bit register address
write_cmdwrite command
write_data16-bit data to write

@description Function writes the 16-bit data to the targeted 8-bit register address of connected random I2C click which is wired to the SPI Isolator Click board