uv5 2.1.0.0
|
API for configuring and manipulating UV 5 Click driver. More...
Topics | |
UV 5 Registers List | |
List of registers of UV 5 Click driver. | |
UV 5 Registers Settings | |
Settings for registers of UV 5 Click driver. | |
UV 5 MikroBUS Map | |
MikroBUS pin mapping of UV 5 Click driver. | |
Functions | |
void | uv5_cfg_setup (uv5_cfg_t *cfg) |
UV 5 configuration object setup function. | |
err_t | uv5_init (uv5_t *ctx, uv5_cfg_t *cfg) |
UV 5 initialization function. | |
err_t | uv5_default_cfg (uv5_t *ctx) |
UV 5 default configuration function. | |
err_t | uv5_generic_write (uv5_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
UV 5 I2C writing function. | |
err_t | uv5_generic_read (uv5_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
UV 5 I2C reading function. | |
err_t | uv5_write_cfg_reg (uv5_t *ctx, uint8_t reg, uint8_t data_in) |
UV 5 configuration mode register write function. | |
err_t | uv5_write_measu_reg (uv5_t *ctx, uint8_t reg, uint8_t *data_in) |
UV 5 measurement mode register write function. | |
err_t | uv5_read_cfg_reg (uv5_t *ctx, uint8_t reg, uint8_t *data_out) |
UV 5 configuration mode register reading function. | |
err_t | uv5_read_measu_reg (uv5_t *ctx, uint8_t reg, uint8_t *data_out) |
UV 5 measurement mode register reading function. | |
void | uv5_set_syn_pin (uv5_t *ctx, uint8_t pin_state) |
UV 5 set SYN pin state function. | |
uint8_t | uv5_get_rdy_pin (uv5_t *ctx) |
UV 5 get READY pin state function. | |
err_t | uv5_sw_reset (uv5_t *ctx) |
UV 5 software reset function. | |
err_t | uv5_temperature_read (uv5_t *ctx, float *temp_data) |
UV 5 read temperature function. | |
err_t | uv5_channel_uva_read (uv5_t *ctx, uint16_t *uva_data) |
UV 5 read raw UVA data function. | |
err_t | uv5_channel_uvb_read (uv5_t *ctx, uint16_t *uvb_data) |
UV 5 read raw UVB data function. | |
err_t | uv5_channel_uvc_read (uv5_t *ctx, uint16_t *uvc_data) |
UV 5 read raw UVC data function. | |
API for configuring and manipulating UV 5 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void uv5_cfg_setup | ( | uv5_cfg_t * | cfg | ) |
UV 5 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See uv5_cfg_t object definition for detailed explanation. |
err_t uv5_channel_uva_read | ( | uv5_t * | ctx, |
uint16_t * | uva_data ) |
UV 5 read raw UVA data function.
This function is used to read raw UVA data.
[in] | ctx | : Click context object. See uv5_t object definition for detailed explanation. |
[out] | uva_data | : Read raw UVA data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t uv5_channel_uvb_read | ( | uv5_t * | ctx, |
uint16_t * | uvb_data ) |
UV 5 read raw UVB data function.
This function is used to read raw UVB data.
[in] | ctx | : Click context object. See uv5_t object definition for detailed explanation. |
[out] | uva_data | : Read raw UVB data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t uv5_channel_uvc_read | ( | uv5_t * | ctx, |
uint16_t * | uvc_data ) |
UV 5 read raw UVC data function.
This function is used to read raw UVC data.
[in] | ctx | : Click context object. See uv5_t object definition for detailed explanation. |
[out] | uva_data | : Read raw UVC data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t uv5_default_cfg | ( | uv5_t * | ctx | ) |
UV 5 default configuration function.
This function executes a default configuration of UV 5 click board.
[in] | ctx | : Click context object. See uv5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t uv5_generic_read | ( | uv5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
UV 5 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 uv5_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. See #err_t definition for detailed explanation. err_t uv5_generic_write | ( | uv5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
UV 5 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 uv5_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. See #err_t definition for detailed explanation. uint8_t uv5_get_rdy_pin | ( | uv5_t * | ctx | ) |
UV 5 get READY pin state function.
This function is used to get state of the READY pin.
[in] | ctx | : Click context object. See uv5_t object definition for detailed explanation. |
0
- Pin state low, 1
- Pin state high. UV 5 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See uv5_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See uv5_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t uv5_read_cfg_reg | ( | uv5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
UV 5 configuration mode register reading function.
This function reads bytes of data starting from the selected register in configuration mode by using I2C serial interface.
[in] | ctx | : Click context object. See uv5_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t uv5_read_measu_reg | ( | uv5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
UV 5 measurement mode register reading function.
This function reads bytes of data starting from the selected register in measurement mode by using I2C serial interface.
[in] | ctx | : Click context object. See uv5_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void uv5_set_syn_pin | ( | uv5_t * | ctx, |
uint8_t | pin_state ) |
UV 5 set SYN pin state function.
This function is used to set state of the SYN pin.
[in] | ctx | : Click context object. See uv5_t object definition for detailed explanation. |
[in] | pin_state | : SYN pin state. |
err_t uv5_sw_reset | ( | uv5_t * | ctx | ) |
UV 5 software reset function.
This function is used to perform software reset.
[in] | ctx | : Click context object. See uv5_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t uv5_temperature_read | ( | uv5_t * | ctx, |
float * | temp_data ) |
UV 5 read temperature function.
This function is used to read temperature.
[in] | ctx | : Click context object. See uv5_t object definition for detailed explanation. |
[out] | temp_data | : Read temperature in degrees celsius. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t uv5_write_cfg_reg | ( | uv5_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
UV 5 configuration mode register write function.
This function writes a bytes of data starting from the selected register, when device is in configuration mode.
[in] | ctx | : Click context object. See uv5_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t uv5_write_measu_reg | ( | uv5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in ) |
UV 5 measurement mode register write function.
This function writes a bytes of data starting from the selected register, when device is in measurement mode.
[in] | ctx | : Click context object. See uv5_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.