uva
2.0.0.0
|
API for configuring and manipulating UVA Click driver. More...
Modules | |
UVA Registers List | |
List of registers of UVA Click driver. | |
UVA Registers Settings | |
Settings for registers of UVA Click driver. | |
UVA MikroBUS Map | |
MikroBUS pin mapping of UVA Click driver. | |
Functions | |
void | uva_cfg_setup (uva_cfg_t *cfg) |
UVA configuration object setup function. More... | |
err_t | uva_init (uva_t *ctx, uva_cfg_t *cfg) |
UVA initialization function. More... | |
err_t | uva_default_cfg (uva_t *ctx) |
UVA default configuration function. More... | |
err_t | uva_generic_write (uva_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
UVA I2C writing function. More... | |
err_t | uva_generic_read (uva_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
UVA I2C reading function. More... | |
err_t | uva_write_register (uva_t *ctx, uint8_t reg, uint8_t data_in) |
UVA write register function. More... | |
err_t | uva_read_register (uva_t *ctx, uint8_t reg, uint8_t *data_out) |
UVA read register function. More... | |
err_t | uva_check_communication (uva_t *ctx) |
UVA check communication function. More... | |
err_t | uva_read_data (uva_t *ctx, uint16_t *uva_data) |
UVA read data function. More... | |
err_t | uva_soft_reset (uva_t *ctx) |
UVA soft reset function. More... | |
API for configuring and manipulating UVA Click driver.
void uva_cfg_setup | ( | uva_cfg_t * | cfg | ) |
UVA configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See uva_cfg_t object definition for detailed explanation. |
err_t uva_check_communication | ( | uva_t * | ctx | ) |
UVA check communication function.
This function checks the communication by reading and verifying the chip ID.
[in] | ctx | : Click context object. See uva_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t uva_default_cfg | ( | uva_t * | ctx | ) |
UVA default configuration function.
This function executes a default configuration of UVA click board.
[in] | ctx | : Click context object. See uva_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t uva_generic_read | ( | uva_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len | ||
) |
UVA I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See uva_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | rx_buf | : Output read data. |
[in] | rx_len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t uva_generic_write | ( | uva_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len | ||
) |
UVA I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See uva_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_buf | : Data to be written. |
[in] | tx_len | : Number of bytes to be written. |
0
- Success, -1
- Error.UVA initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See uva_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See uva_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t uva_read_data | ( | uva_t * | ctx, |
uint16_t * | uva_data | ||
) |
UVA read data function.
This function reads the raw UVA data from registers.
[in] | ctx | : Click context object. See uva_t object definition for detailed explanation. |
[out] | uva_data | : UVA data read. |
0
- Success, -1
- Error.err_t uva_read_register | ( | uva_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out | ||
) |
UVA read register function.
This function reads a data byte from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See uva_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error.err_t uva_soft_reset | ( | uva_t * | ctx | ) |
UVA soft reset function.
This function executes the soft reset command.
[in] | ctx | : Click context object. See uva_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t uva_write_register | ( | uva_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in | ||
) |
UVA write register function.
This function writes a data byte to the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See uva_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error.