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. | |
void spiisolator_cfg_setup | ( | spiisolator_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
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.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
SPIISOLATOR_RETVAL spiisolator_init | ( | spiisolator_t * | ctx, |
spiisolator_cfg_t * | cfg ) |
Initialization function.
spiisolator | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t spiisolator_read_byte | ( | spiisolator_t * | ctx, |
uint8_t | reg_address, | ||
uint8_t | read_cmd ) |
Read the byte of data function.
ctx | Click object. |
reg_address | 8-bit register address |
read_cmd | read command |
@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
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.
reg_address | 8-bit register address |
read_cmd | read command |
read_data | pointer to the memory location where data be stored |
n_bytes | number 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
uint16_t spiisolator_read_data | ( | spiisolator_t * | ctx, |
uint8_t | reg_address, | ||
uint8_t | read_cmd ) |
Read 16-bit data function.
reg_address | 8-bit register address |
read_cmd | read command |
@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
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.
ctx | Click object. |
reg_address | 8-bit register address |
write_cmd | write comman |
write_data | Byte 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
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.
reg_address | 8-bit register address |
write_cmd | write command |
write_data | pointer to the data to be written |
n_bytes | number 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
void spiisolator_write_cmd | ( | spiisolator_t * | ctx, |
uint8_t | cmd, | ||
uint8_t | tx_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.
reg_address | 8-bit register address |
write_cmd | write command |
write_data | 16-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