spiisolator4 2.0.0.0
SPI Isolator 4 Click Driver

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

Topics

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

Functions

void spiisolator4_cfg_setup (spiisolator4_cfg_t *cfg)
 SPI Isolator 4 configuration object setup function.
 
err_t spiisolator4_init (spiisolator4_t *ctx, spiisolator4_cfg_t *cfg)
 SPI Isolator 4 initialization function.
 
err_t spiisolator4_default_cfg (spiisolator4_t *ctx)
 SPI Isolator 4 default configuration function.
 
err_t spiisolator4_generic_write (spiisolator4_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 SPI Isolator 4 data writing function.
 
err_t spiisolator4_generic_read (spiisolator4_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 SPI Isolator 4 data reading function.
 
err_t spiisolator4_set_enable (spiisolator4_t *ctx, spiisolator4_enable_mode_t en_mode)
 SPI Isolator 4 enable isolator function.
 

Detailed Description

API for configuring and manipulating SPI Isolator 4 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

◆ spiisolator4_cfg_setup()

void spiisolator4_cfg_setup ( spiisolator4_cfg_t * cfg)

SPI Isolator 4 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ spiisolator4_default_cfg()

err_t spiisolator4_default_cfg ( spiisolator4_t * ctx)

SPI Isolator 4 default configuration function.

This function executes a default configuration of SPI Isolator 4 click board.

Parameters
[in]ctx: Click context object. See spiisolator4_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ spiisolator4_generic_read()

err_t spiisolator4_generic_read ( spiisolator4_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

SPI Isolator 4 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 spiisolator4_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.

◆ spiisolator4_generic_write()

err_t spiisolator4_generic_write ( spiisolator4_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

SPI Isolator 4 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 spiisolator4_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.

◆ spiisolator4_init()

err_t spiisolator4_init ( spiisolator4_t * ctx,
spiisolator4_cfg_t * cfg )

SPI Isolator 4 initialization function.

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

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

◆ spiisolator4_set_enable()

err_t spiisolator4_set_enable ( spiisolator4_t * ctx,
spiisolator4_enable_mode_t en_mode )

SPI Isolator 4 enable isolator function.

This function enable or disable ADuM341E quad-channel digital isolators on the SPI Isolator 4 click boardâ„¢.

Parameters
[in]ctx: Click context object. See spiisolator4_t object definition for detailed explanation.
[in]en_mode
  • 0 ( SPIISOLATOR4_DISABLE )- Disable isolator,
  • 1 ( SPIISOLATOR4_ENABLE )- Enable isolator.
Returns
  • 0 - Success.
Note
None.