spiisolator3 2.0.0.0
SPI Isolator 3 Click Driver

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

Topics

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

Functions

void spiisolator3_cfg_setup (spiisolator3_cfg_t *cfg)
 SPI Isolator 3 configuration object setup function.
 
err_t spiisolator3_init (spiisolator3_t *ctx, spiisolator3_cfg_t *cfg)
 SPI Isolator 3 initialization function.
 
err_t spiisolator3_default_cfg (spiisolator3_t *ctx)
 SPI Isolator 3 default configuration function.
 
err_t spiisolator3_generic_write (spiisolator3_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 SPI Isolator 3 data writing function.
 
err_t spiisolator3_generic_read (spiisolator3_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 SPI Isolator 3 data reading function.
 
void spiisolator3_set_side_a_active (spiisolator3_t *ctx, uint8_t saa_state)
 SPI Isolator 3 set side A active function.
 
void spiisolator3_set_sdo_enable (spiisolator3_t *ctx, uint8_t sdo_state)
 SPI Isolator 3 set SDO enable function.
 
void spiisolator3_set_aux (spiisolator3_t *ctx, uint8_t aux_state)
 SPI Isolator 3 set AUX function.
 
uint8_t spiisolator3_get_fault (spiisolator3_t *ctx)
 SPI Isolator 3 get fault state function.
 

Detailed Description

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

◆ spiisolator3_cfg_setup()

void spiisolator3_cfg_setup ( spiisolator3_cfg_t * cfg)

SPI Isolator 3 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ spiisolator3_default_cfg()

err_t spiisolator3_default_cfg ( spiisolator3_t * ctx)

SPI Isolator 3 default configuration function.

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

Parameters
[in]ctx: Click context object. See spiisolator3_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.

◆ spiisolator3_generic_read()

err_t spiisolator3_generic_read ( spiisolator3_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

SPI Isolator 3 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 spiisolator3_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.

◆ spiisolator3_generic_write()

err_t spiisolator3_generic_write ( spiisolator3_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

SPI Isolator 3 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 spiisolator3_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.

◆ spiisolator3_get_fault()

uint8_t spiisolator3_get_fault ( spiisolator3_t * ctx)

SPI Isolator 3 get fault state function.

This function get fault state of the SPI Isolator 3 click board™.

Parameters
[in]ctx: Click context object. See spiisolator3_t object definition for detailed explanation.
Returns
  • 0 - Low pin state,
  • 1 - High pin state.
Note
None.

◆ spiisolator3_init()

err_t spiisolator3_init ( spiisolator3_t * ctx,
spiisolator3_cfg_t * cfg )

SPI Isolator 3 initialization function.

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

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

◆ spiisolator3_set_aux()

void spiisolator3_set_aux ( spiisolator3_t * ctx,
uint8_t aux_state )

SPI Isolator 3 set AUX function.

This function set state of the AUX by set state of the AUX ( PWM ) pin of the SPI Isolator 3 click board™.

Parameters
[in]ctx: Click context object. See spiisolator3_t object definition for detailed explanation.
[in]sdo_state: OEN pin state.
Returns
Nothing.
Note
None.

◆ spiisolator3_set_sdo_enable()

void spiisolator3_set_sdo_enable ( spiisolator3_t * ctx,
uint8_t sdo_state )

SPI Isolator 3 set SDO enable function.

This function set state of the SDO enable by set state of the OEN ( RST ) pin of the SPI Isolator 3 click board™.

Parameters
[in]ctx: Click context object. See spiisolator3_t object definition for detailed explanation.
[in]sdo_state: OEN pin state.
Returns
Nothing.
Note
None.

◆ spiisolator3_set_side_a_active()

void spiisolator3_set_side_a_active ( spiisolator3_t * ctx,
uint8_t saa_state )

SPI Isolator 3 set side A active function.

This function set state of the side A by set state of the SAA ( AN ) pin of the SPI Isolator 3 click board™.

Parameters
[in]ctx: Click context object. See spiisolator3_t object definition for detailed explanation.
[in]saa_state: SAA pin state.
Returns
Nothing.
Note
None.