digiisolator2 2.1.0.0
|
API for configuring and manipulating DIGI Isolator 2 Click driver. More...
Topics | |
DIGI Isolator 2 Registers List | |
List of registers of DIGI Isolator 2 Click driver. | |
DIGI Isolator 2 Registers Settings | |
Settings for registers of DIGI Isolator 2 Click driver. | |
DIGI Isolator 2 MikroBUS Map | |
MikroBUS pin mapping of DIGI Isolator 2 Click driver. | |
Functions | |
void | digiisolator2_cfg_setup (digiisolator2_cfg_t *cfg) |
DIGI Isolator 2 configuration object setup function. | |
void | digiisolator2_drv_interface_sel (digiisolator2_cfg_t *cfg, digiisolator2_drv_t drv_sel) |
DIGI Isolator 2 driver interface setup function. | |
err_t | digiisolator2_init (digiisolator2_t *ctx, digiisolator2_cfg_t *cfg) |
DIGI Isolator 2 initialization function. | |
err_t | digiisolator2_spi_write (digiisolator2_t *ctx, uint8_t reg, uint8_t data_in) |
DIGI Isolator 2 SPI writing function. | |
err_t | digiisolator2_spi_read (digiisolator2_t *ctx, uint8_t reg, uint8_t *data_out) |
DIGI Isolator 2 SPI reading function. | |
void | digiisolator2_set_rst_pin (digiisolator2_t *ctx, uint8_t state) |
DIGI Isolator 2 set rst pin function. | |
uint8_t | digiisolator2_get_int_pin (digiisolator2_t *ctx) |
DIGI Isolator 2 get int pin function. | |
uint8_t | digiisolator2_get_sync_pin (digiisolator2_t *ctx) |
DIGI Isolator 2 get sync pin function. | |
err_t | digiisolator2_read_inputs (digiisolator2_t *ctx, uint8_t *data_out) |
DIGI Isolator 2 read inputs function. | |
uint8_t | digiisolator2_get_out1_pin (digiisolator2_t *ctx) |
DIGI Isolator 2 get out1 pin function. | |
uint8_t | digiisolator2_get_out2_pin (digiisolator2_t *ctx) |
DIGI Isolator 2 get out2 pin function. | |
uint8_t | digiisolator2_get_out3_pin (digiisolator2_t *ctx) |
DIGI Isolator 2 get out3 pin function. | |
uint8_t | digiisolator2_get_out4_pin (digiisolator2_t *ctx) |
DIGI Isolator 2 get out4 pin function. | |
uint8_t | digiisolator2_get_out5_pin (digiisolator2_t *ctx) |
DIGI Isolator 2 get out5 pin function. | |
uint8_t | digiisolator2_get_out6_pin (digiisolator2_t *ctx) |
DIGI Isolator 2 get out6 pin function. | |
uint8_t | digiisolator2_get_out8_pin (digiisolator2_t *ctx) |
DIGI Isolator 2 get out8 pin function. | |
void | digiisolator2_enable_output (digiisolator2_t *ctx) |
DIGI Isolator 2 enable output function. | |
void | digiisolator2_disable_output (digiisolator2_t *ctx) |
DIGI Isolator 2 disable output function. | |
API for configuring and manipulating DIGI 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.
void digiisolator2_cfg_setup | ( | digiisolator2_cfg_t * | cfg | ) |
DIGI Isolator 2 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See digiisolator2_cfg_t object definition for detailed explanation. |
void digiisolator2_disable_output | ( | digiisolator2_t * | ctx | ) |
DIGI Isolator 2 disable output function.
This function disables output by setting the EN pin to low state.
[in] | ctx | : Click context object. See digiisolator2_t object definition for detailed explanation. |
void digiisolator2_drv_interface_sel | ( | digiisolator2_cfg_t * | cfg, |
digiisolator2_drv_t | drv_sel ) |
DIGI Isolator 2 driver interface setup function.
This function sets a serial driver interface which will be used further in the click driver.
[out] | cfg | : Click configuration structure. See digiisolator2_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See digiisolator2_drv_t object definition for detailed explanation. |
void digiisolator2_enable_output | ( | digiisolator2_t * | ctx | ) |
DIGI Isolator 2 enable output function.
This function enables output by setting the EN pin to high state.
[in] | ctx | : Click context object. See digiisolator2_t object definition for detailed explanation. |
uint8_t digiisolator2_get_int_pin | ( | digiisolator2_t * | ctx | ) |
DIGI Isolator 2 get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See digiisolator2_t object definition for detailed explanation. |
uint8_t digiisolator2_get_out1_pin | ( | digiisolator2_t * | ctx | ) |
DIGI Isolator 2 get out1 pin function.
This function returns the OUT1 pin logic state.
[in] | ctx | : Click context object. See digiisolator2_t object definition for detailed explanation. |
uint8_t digiisolator2_get_out2_pin | ( | digiisolator2_t * | ctx | ) |
DIGI Isolator 2 get out2 pin function.
This function returns the OUT2 pin logic state.
[in] | ctx | : Click context object. See digiisolator2_t object definition for detailed explanation. |
uint8_t digiisolator2_get_out3_pin | ( | digiisolator2_t * | ctx | ) |
DIGI Isolator 2 get out3 pin function.
This function returns the OUT3 pin logic state.
[in] | ctx | : Click context object. See digiisolator2_t object definition for detailed explanation. |
uint8_t digiisolator2_get_out4_pin | ( | digiisolator2_t * | ctx | ) |
DIGI Isolator 2 get out4 pin function.
This function returns the OUT4 pin logic state.
[in] | ctx | : Click context object. See digiisolator2_t object definition for detailed explanation. |
uint8_t digiisolator2_get_out5_pin | ( | digiisolator2_t * | ctx | ) |
DIGI Isolator 2 get out5 pin function.
This function returns the OUT5 pin logic state.
[in] | ctx | : Click context object. See digiisolator2_t object definition for detailed explanation. |
uint8_t digiisolator2_get_out6_pin | ( | digiisolator2_t * | ctx | ) |
DIGI Isolator 2 get out6 pin function.
This function returns the OUT6 pin logic state.
[in] | ctx | : Click context object. See digiisolator2_t object definition for detailed explanation. |
uint8_t digiisolator2_get_out8_pin | ( | digiisolator2_t * | ctx | ) |
DIGI Isolator 2 get out8 pin function.
This function returns the OUT8 pin logic state.
[in] | ctx | : Click context object. See digiisolator2_t object definition for detailed explanation. |
uint8_t digiisolator2_get_sync_pin | ( | digiisolator2_t * | ctx | ) |
DIGI Isolator 2 get sync pin function.
This function returns the SYNC pin logic state.
[in] | ctx | : Click context object. See digiisolator2_t object definition for detailed explanation. |
err_t digiisolator2_init | ( | digiisolator2_t * | ctx, |
digiisolator2_cfg_t * | cfg ) |
DIGI Isolator 2 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See digiisolator2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See digiisolator2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t digiisolator2_read_inputs | ( | digiisolator2_t * | ctx, |
uint8_t * | data_out ) |
DIGI Isolator 2 read inputs function.
This function reads all inputs state via the selected driver interface.
[in] | ctx | : Click context object. See digiisolator2_t object definition for detailed explanation. |
[out] | data_out | : Inputs state read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void digiisolator2_set_rst_pin | ( | digiisolator2_t * | ctx, |
uint8_t | state ) |
DIGI Isolator 2 set rst pin function.
This function sets the RST pin logic state.
[in] | ctx | : Click context object. See digiisolator2_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t digiisolator2_spi_read | ( | digiisolator2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
DIGI Isolator 2 SPI reading function.
This function reads data from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See digiisolator2_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t digiisolator2_spi_write | ( | digiisolator2_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
DIGI Isolator 2 SPI writing function.
This function writes data to the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See digiisolator2_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.