uvb
2.0.0.0
|
API for configuring and manipulating UVB Click driver. More...
Modules | |
UVB Registers List | |
List of registers of UVB Click driver. | |
UVB Registers Settings | |
Settings for registers of UVB Click driver. | |
UVB MikroBUS Map | |
MikroBUS pin mapping of UVB Click driver. | |
Functions | |
void | uvb_cfg_setup (uvb_cfg_t *cfg) |
UVB configuration object setup function. More... | |
err_t | uvb_init (uvb_t *ctx, uvb_cfg_t *cfg) |
UVB initialization function. More... | |
err_t | uvb_default_cfg (uvb_t *ctx) |
UVB default configuration function. More... | |
err_t | uvb_generic_write (uvb_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
UVB I2C writing function. More... | |
err_t | uvb_generic_read (uvb_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
UVB I2C reading function. More... | |
void | uvb_configuration (uvb_t *ctx, uint8_t reg, uint8_t cfg) |
Configuration register. More... | |
uint8_t | uvb_read_byte (uvb_t *ctx, uint8_t reg) |
Read one byte data from register. More... | |
err_t | uvb_check_communication (uvb_t *ctx) |
Check communication. More... | |
uint16_t | uvb_get_uv_data (uvb_t *ctx) |
Get UVB data. More... | |
API for configuring and manipulating UVB Click driver.
void uvb_cfg_setup | ( | uvb_cfg_t * | cfg | ) |
UVB configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See uvb_cfg_t object definition for detailed explanation. |
err_t uvb_check_communication | ( | uvb_t * | ctx | ) |
Check communication.
This function checks communication.
[in] | ctx | : Click context object. See uvb_t object definition for detailed explanation. |
0
- Success, -1
- Error.void uvb_configuration | ( | uvb_t * | ctx, |
uint8_t | reg, | ||
uint8_t | cfg | ||
) |
Configuration register.
This function configure register.
[in] | ctx | : Click context object. See uvb_t object definition for detailed explanation. |
[in] | reg | : Register Address. |
[in] | cfg | : Config data. |
err_t uvb_default_cfg | ( | uvb_t * | ctx | ) |
UVB default configuration function.
This function executes a default configuration of UVB click board.
[in] | ctx | : Click context object. See uvb_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t uvb_generic_read | ( | uvb_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len | ||
) |
UVB 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 uvb_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 uvb_generic_write | ( | uvb_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len | ||
) |
UVB 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 uvb_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.uint16_t uvb_get_uv_data | ( | uvb_t * | ctx | ) |
Get UVB data.
This function gets UVB data.
[in] | ctx | : Click context object. See uvb_t object definition for detailed explanation. |
UVB initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See uvb_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See uvb_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.