spiisolator2 2.0.0.0
SPI Isolator 2 Click Driver

API for configuring and manipulating SPI Isolator 2 Click driver. More...

Topics

 SPI Isolator 2 Registers List
 List of registers of SPI Isolator 2 Click driver.
 
 SPI Isolator 2 Registers Settings
 Settings for registers of SPI Isolator 2 Click driver.
 
 SPI Isolator 2 MikroBUS Map
 MikroBUS pin mapping of SPI Isolator 2 Click driver.
 

Functions

void spiisolator2_cfg_setup (spiisolator2_cfg_t *cfg)
 SPI Isolator 2 configuration object setup function.
 
err_t spiisolator2_init (spiisolator2_t *ctx, spiisolator2_cfg_t *cfg)
 SPI Isolator 2 initialization function.
 
err_t spiisolator2_generic_write (spiisolator2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 SPI Isolator 2 data writing function.
 
err_t spiisolator2_generic_read (spiisolator2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 SPI Isolator 2 data reading function.
 
void spiisolator2_output_enable (spiisolator2_t *ctx, uint8_t en_out)
 SPI Isolator 2 output enable function.
 
void spiisolator2_set_cmd (spiisolator2_t *ctx, uint8_t cmd)
 SPI Isolator 2 send command function.
 
void spiisolator2_write_byte (spiisolator2_t *ctx, uint8_t reg, uint8_t tx_data)
 SPI Isolator 2 write the byte of data function.
 
uint8_t spiisolator2_read_byte (spiisolator2_t *ctx, uint8_t reg)
 SPI Isolator 2 read the byte of data function.
 
void spiisolator2_burst_write (spiisolator2_t *ctx, uint8_t reg, uint8_t *p_tx_data, uint8_t n_bytes)
 SPI Isolator 2 burst write function.
 
void spiisolator2_burst_read (spiisolator2_t *ctx, uint8_t reg, uint8_t *p_rx_data, uint8_t n_bytes)
 SPI Isolator 2 burst read function.
 
void spiisolator2_multi_write (spiisolator2_t *ctx, uint32_t addr, uint8_t addr_n_bytes, uint8_t *p_tx_data, uint8_t tx_data_n_bytes)
 SPI Isolator 2 multi write function.
 
void spiisolator2_multi_read (spiisolator2_t *ctx, uint32_t addr, uint8_t addr_n_bytes, uint8_t *p_rx_data, uint8_t tx_data_n_bytes)
 SPI Isolator 2 multi read function.
 

Detailed Description

API for configuring and manipulating SPI Isolator 2 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ spiisolator2_burst_read()

void spiisolator2_burst_read ( spiisolator2_t * ctx,
uint8_t reg,
uint8_t * p_rx_data,
uint8_t n_bytes )

SPI Isolator 2 burst read function.

The function read sequential data starting from the targeted 8-bit register address of the ISO7741DWR High-Speed, Robust-EMC Reinforced and Basic Quad-Channel Digital Isolators on SPI Isolator 2 click board.

Parameters
[in]ctx: Click context object. See spiisolator2_t object definition for detailed explanation.
[in]reg: 8-bit register address.
[in]p_rx_data: 8-bit data to be written.
[in]n_bytes: number of bytes to be written.
Returns
Nothing.
Note
None.

◆ spiisolator2_burst_write()

void spiisolator2_burst_write ( spiisolator2_t * ctx,
uint8_t reg,
uint8_t * p_tx_data,
uint8_t n_bytes )

SPI Isolator 2 burst write function.

The function writes sequential data starting to the targeted 8-bit register address of the ISO7741DWR High-Speed, Robust-EMC Reinforced and Basic Quad-Channel Digital Isolators on SPI Isolator 2 click board.

Parameters
[in]ctx: Click context object. See spiisolator2_t object definition for detailed explanation.
[in]reg: 8-bit register address.
[in]p_tx_data: 8-bit data to be written.
[in]n_bytes: number of bytes to be written.
Returns
Nothing.
Note
None.

◆ spiisolator2_cfg_setup()

void spiisolator2_cfg_setup ( spiisolator2_cfg_t * cfg)

SPI Isolator 2 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See spiisolator2_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ spiisolator2_generic_read()

err_t spiisolator2_generic_read ( spiisolator2_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

SPI Isolator 2 data reading function.

This function reads a desired number of data bytes starting from the selected register by using SPI serial interface.

Parameters
[in]ctx: Click context object. See spiisolator2_t object definition for detailed explanation.
[in]reg: Start register address.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ spiisolator2_generic_write()

err_t spiisolator2_generic_write ( spiisolator2_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

SPI Isolator 2 data writing function.

This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.

Parameters
[in]ctx: Click context object. See spiisolator2_t object definition for detailed explanation.
[in]reg: Start register address.
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ spiisolator2_init()

err_t spiisolator2_init ( spiisolator2_t * ctx,
spiisolator2_cfg_t * cfg )

SPI Isolator 2 initialization function.

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

Parameters
[out]ctx: Click context object. See spiisolator2_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See spiisolator2_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ spiisolator2_multi_read()

void spiisolator2_multi_read ( spiisolator2_t * ctx,
uint32_t addr,
uint8_t addr_n_bytes,
uint8_t * p_rx_data,
uint8_t tx_data_n_bytes )

SPI Isolator 2 multi read function.

The function read sequential data starting from the targeted (selected) 8-bit, 16-bit, 24-bit, or 32-bit register address of the ISO7741DWR High-Speed, Robust-EMC Reinforced and Basic Quad-Channel Digital Isolators on SPI Isolator 2 click board.

Parameters
[in]ctx: Click context object. See spiisolator2_t object definition for detailed explanation.
[in]addr: 8-bit register address.
[in]addr_n_bytes: The number of bytes of the registry address.
[in]p_rx_data: Pointer to the memory location where data be stored.
[in]tx_data_n_bytes: Number of bytes to be read.
Returns
Nothing.
Note
None.

◆ spiisolator2_multi_write()

void spiisolator2_multi_write ( spiisolator2_t * ctx,
uint32_t addr,
uint8_t addr_n_bytes,
uint8_t * p_tx_data,
uint8_t tx_data_n_bytes )

SPI Isolator 2 multi write function.

The function writes sequential data starting of the targeted (selected) 8-bit, 16-bit, 24-bit, or 32-bit register address of the ISO7741DWR High-Speed, Robust-EMC Reinforced and Basic Quad-Channel Digital Isolators on SPI Isolator 2 click board.

Parameters
[in]ctx: Click context object. See spiisolator2_t object definition for detailed explanation.
[in]addr: 8-bit register address.
[in]addr_n_bytes: The number of bytes of the registry address.
[in]p_tx_data: 8-bit data to be written.
[in]tx_data_n_bytes: Pointer to the data to be written.
Returns
Nothing.
Note
None.

◆ spiisolator2_output_enable()

void spiisolator2_output_enable ( spiisolator2_t * ctx,
uint8_t en_out )

SPI Isolator 2 output enable function.

The function enable or disable output ( isolation ) of the ISO7741DWR High-Speed, Robust-EMC Reinforced and Basic Quad-Channel Digital Isolators on SPI Isolator 2 click board.

Parameters
[in]ctx: Click context object. See spiisolator2_t object definition for detailed explanation.
[in]en_out: Enable/disable pin.
Returns
Nothing.
Note
None.

◆ spiisolator2_read_byte()

uint8_t spiisolator2_read_byte ( spiisolator2_t * ctx,
uint8_t reg )

SPI Isolator 2 read the byte of data function.

The function read a the byte of data from the targeted 8-bit register address of the ISO7741DWR High-Speed, Robust-EMC Reinforced and Basic Quad-Channel Digital Isolators on SPI Isolator 2 click board.

Parameters
[in]ctx: Click context object. See spiisolator2_t object definition for detailed explanation.
[in]reg: 8-bit register address.
Returns
8-bit read data.
Note
None.

◆ spiisolator2_set_cmd()

void spiisolator2_set_cmd ( spiisolator2_t * ctx,
uint8_t cmd )

SPI Isolator 2 send command function.

The function sends the desired command to the ISO7741DWR High-Speed, Robust-EMC Reinforced and Basic Quad-Channel Digital Isolators on SPI Isolator 2 click board.

Parameters
[in]ctx: Click context object. See spiisolator2_t object definition for detailed explanation.
[in]cmd: 8-bit commands instruction.
Returns
Nothing.
Note
None.

◆ spiisolator2_write_byte()

void spiisolator2_write_byte ( spiisolator2_t * ctx,
uint8_t reg,
uint8_t tx_data )

SPI Isolator 2 write the byte of data function.

The function writes the byte of data to the targeted 8-bit register address of the ISO7741DWR High-Speed, Robust-EMC Reinforced and Basic Quad-Channel Digital Isolators on SPI Isolator 2 click board.

Parameters
[in]ctx: Click context object. See spiisolator2_t object definition for detailed explanation.
[in]reg: 8-bit register address.
[in]tx_data: 8-bit data to be written.
Returns
Nothing.
Note
None.