spiisolator3 2.0.0.0
|
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. | |
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.
void spiisolator3_cfg_setup | ( | spiisolator3_cfg_t * | cfg | ) |
SPI Isolator 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See spiisolator3_cfg_t object definition for detailed explanation. |
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.
[in] | ctx | : Click context object. See spiisolator3_t object definition for detailed explanation. |
0
- Success, -1
- Error.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.
[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. |
0
- Success, -1
- Error.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.
[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. |
0
- Success, -1
- Error.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™.
[in] | ctx | : Click context object. See spiisolator3_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state.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.
[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. |
0
- Success, -1
- Error.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™.
[in] | ctx | : Click context object. See spiisolator3_t object definition for detailed explanation. |
[in] | sdo_state | : OEN pin state. |
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™.
[in] | ctx | : Click context object. See spiisolator3_t object definition for detailed explanation. |
[in] | sdo_state | : OEN pin state. |
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™.
[in] | ctx | : Click context object. See spiisolator3_t object definition for detailed explanation. |
[in] | saa_state | : SAA pin state. |