digiio
2.1.0.0
|
API for configuring and manipulating DIGI IO Click driver. More...
Modules | |
DIGI IO Registers List | |
List of registers of DIGI IO Click driver. | |
DIGI IO Registers Settings | |
Settings for registers of DIGI IO Click driver. | |
DIGI IO MikroBUS Map | |
MikroBUS pin mapping of DIGI IO Click driver. | |
Functions | |
void | digiio_cfg_setup (digiio_cfg_t *cfg) |
DIGI IO configuration object setup function. More... | |
err_t | digiio_init (digiio_t *ctx, digiio_cfg_t *cfg) |
DIGI IO initialization function. More... | |
err_t | digiio_default_cfg (digiio_t *ctx) |
DIGI IO default configuration function. More... | |
void | digiio_set_address (digiio_t *ctx, uint8_t device_address) |
DIGI IO set address function. More... | |
err_t | digiio_write_reg (digiio_t *ctx, uint8_t reg, uint8_t data_in) |
DIGI IO write reg function. More... | |
err_t | digiio_read_reg (digiio_t *ctx, uint8_t reg, uint8_t *data_out) |
DIGI IO read reg function. More... | |
void | digiio_enable_output (digiio_t *ctx) |
DIGI IO enable output function. More... | |
void | digiio_disable_output (digiio_t *ctx) |
DIGI IO disable output function. More... | |
void | digiio_sync_io (digiio_t *ctx) |
DIGI IO sync io function. More... | |
void | digiio_set_sync_pin (digiio_t *ctx, uint8_t state) |
DIGI IO set sync pin function. More... | |
uint8_t | digiio_get_ready_pin (digiio_t *ctx) |
DIGI IO get ready pin function. More... | |
uint8_t | digiio_get_fault_pin (digiio_t *ctx) |
DIGI IO get fault pin function. More... | |
API for configuring and manipulating DIGI IO Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void digiio_cfg_setup | ( | digiio_cfg_t * | cfg | ) |
DIGI IO configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See digiio_cfg_t object definition for detailed explanation. |
err_t digiio_default_cfg | ( | digiio_t * | ctx | ) |
DIGI IO default configuration function.
This function executes a default configuration of DIGI IO click board.
[in] | ctx | : Click context object. See digiio_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void digiio_disable_output | ( | digiio_t * | ctx | ) |
DIGI IO disable output function.
This function disables output by setting the EN pin to low logic state.
[in] | ctx | : Click context object. See digiio_t object definition for detailed explanation. |
void digiio_enable_output | ( | digiio_t * | ctx | ) |
DIGI IO enable output function.
This function enables output by setting the EN pin to high logic state.
[in] | ctx | : Click context object. See digiio_t object definition for detailed explanation. |
uint8_t digiio_get_fault_pin | ( | digiio_t * | ctx | ) |
DIGI IO get fault pin function.
This function returns the FAULT pin logic state.
[in] | ctx | : Click context object. See digiio_t object definition for detailed explanation. |
uint8_t digiio_get_ready_pin | ( | digiio_t * | ctx | ) |
DIGI IO get ready pin function.
This function returns the READY pin logic state.
[in] | ctx | : Click context object. See digiio_t object definition for detailed explanation. |
err_t digiio_init | ( | digiio_t * | ctx, |
digiio_cfg_t * | cfg | ||
) |
DIGI IO initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See digiio_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See digiio_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t digiio_read_reg | ( | digiio_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
DIGI IO read reg function.
This function reads data from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See digiio_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. void digiio_set_address | ( | digiio_t * | ctx, |
uint8_t | device_address | ||
) |
DIGI IO set address function.
This function sets the device address.
[in] | ctx | : Click context object. See digiio_t object definition for detailed explanation. |
[in] | device_address | : Selected device address. |
void digiio_set_sync_pin | ( | digiio_t * | ctx, |
uint8_t | state | ||
) |
DIGI IO set sync pin function.
This function sets the SYNC pin logic state.
[in] | ctx | : Click context object. See digiio_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
void digiio_sync_io | ( | digiio_t * | ctx | ) |
DIGI IO sync io function.
This function synchronizes registers by toggling the SYNC pin logic state.
[in] | ctx | : Click context object. See digiio_t object definition for detailed explanation. |
err_t digiio_write_reg | ( | digiio_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
DIGI IO write reg function.
This function writes data to the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See digiio_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.