vcpmonitor4 2.0.0.0
|
API for configuring and manipulating VCP Monitor 4 Click driver. More...
Topics | |
VCP Monitor 4 Registers List | |
List of registers of VCP Monitor 4 Click driver. | |
VCP Monitor 4 Registers Settings | |
Settings for registers of VCP Monitor 4 Click driver. | |
VCP Monitor 4 MikroBUS Map | |
MikroBUS pin mapping of VCP Monitor 4 Click driver. | |
Functions | |
void | vcpmonitor4_cfg_setup (vcpmonitor4_cfg_t *cfg) |
VCP Monitor 4 configuration object setup function. | |
err_t | vcpmonitor4_init (vcpmonitor4_t *ctx, vcpmonitor4_cfg_t *cfg) |
VCP Monitor 4 initialization function. | |
err_t | vcpmonitor4_default_cfg (vcpmonitor4_t *ctx) |
VCP Monitor 4 default configuration function. | |
err_t | vcpmonitor4_generic_write (vcpmonitor4_t *ctx, uint8_t reg, uint16_t data_in) |
VCP Monitor 4 data writing function. | |
err_t | vcpmonitor4_generic_read (vcpmonitor4_t *ctx, uint8_t reg, uint32_t *data_out) |
VCP Monitor 4 data reading function. | |
uint8_t | vcpmonitor4_get_alert (vcpmonitor4_t *ctx) |
Get alert pin state. | |
err_t | vcpmonitor4_get_temperature (vcpmonitor4_t *ctx, float *temperature) |
Get device temperature. | |
err_t | vcpmonitor4_get_vbus (vcpmonitor4_t *ctx, float *vbus) |
Get BUS voltage. | |
err_t | vcpmonitor4_get_vshunt (vcpmonitor4_t *ctx, float *vshunt) |
Get Shunt voltage. | |
err_t | vcpmonitor4_get_current (vcpmonitor4_t *ctx, float *current) |
Get Current. | |
err_t | vcpmonitor4_get_power (vcpmonitor4_t *ctx, float *power) |
Get Shunt voltage. | |
API for configuring and manipulating VCP Monitor 4 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void vcpmonitor4_cfg_setup | ( | vcpmonitor4_cfg_t * | cfg | ) |
VCP Monitor 4 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See vcpmonitor4_cfg_t object definition for detailed explanation. |
err_t vcpmonitor4_default_cfg | ( | vcpmonitor4_t * | ctx | ) |
VCP Monitor 4 default configuration function.
This function executes a default configuration of VCP Monitor 4 click board.
[in] | ctx | : Click context object. See vcpmonitor4_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t vcpmonitor4_generic_read | ( | vcpmonitor4_t * | ctx, |
uint8_t | reg, | ||
uint32_t * | data_out ) |
VCP Monitor 4 data reading function.
This function reads a data from the selected register.
[in] | ctx | : Click context object. See vcpmonitor4_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error.err_t vcpmonitor4_generic_write | ( | vcpmonitor4_t * | ctx, |
uint8_t | reg, | ||
uint16_t | data_in ) |
VCP Monitor 4 data writing function.
This function writes a data to the selected register.
[in] | ctx | : Click context object. See vcpmonitor4_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error.uint8_t vcpmonitor4_get_alert | ( | vcpmonitor4_t * | ctx | ) |
Get alert pin state.
[in] | ctx | : Click context object. See vcpmonitor4_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t vcpmonitor4_get_current | ( | vcpmonitor4_t * | ctx, |
float * | current ) |
Get Current.
This function reads a ADC data for device current and calculates real value in A.
[in] | ctx | : Click context object. See vcpmonitor4_t object definition for detailed explanation. |
[out] | current | : Output data. |
0
- Success, -1
- Error.err_t vcpmonitor4_get_power | ( | vcpmonitor4_t * | ctx, |
float * | power ) |
Get Shunt voltage.
This function reads a ADC data for device power and calculates real value in W.
[in] | ctx | : Click context object. See vcpmonitor4_t object definition for detailed explanation. |
[out] | power | : Output data. |
0
- Success, -1
- Error.err_t vcpmonitor4_get_temperature | ( | vcpmonitor4_t * | ctx, |
float * | temperature ) |
Get device temperature.
This function reads a ADC data for temperature and calculates real value in degrees C.
[in] | ctx | : Click context object. See vcpmonitor4_t object definition for detailed explanation. |
[out] | temperature | : Output data. |
0
- Success, -1
- Error.err_t vcpmonitor4_get_vbus | ( | vcpmonitor4_t * | ctx, |
float * | vbus ) |
Get BUS voltage.
This function reads a ADC data for vbus voltage and calculates real value in V.
[in] | ctx | : Click context object. See vcpmonitor4_t object definition for detailed explanation. |
[out] | vbus | : Output data. |
0
- Success, -1
- Error.err_t vcpmonitor4_get_vshunt | ( | vcpmonitor4_t * | ctx, |
float * | vshunt ) |
Get Shunt voltage.
This function reads a ADC data for shunt voltage and calculates real value in mV.
[in] | ctx | : Click context object. See vcpmonitor4_t object definition for detailed explanation. |
[out] | vshunt | : Output data. |
0
- Success, -1
- Error.err_t vcpmonitor4_init | ( | vcpmonitor4_t * | ctx, |
vcpmonitor4_cfg_t * | cfg ) |
VCP Monitor 4 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See vcpmonitor4_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See vcpmonitor4_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.