charger19 2.1.0.0
|
API for configuring and manipulating Charger 19 Click driver. More...
Topics | |
Charger 19 Registers Settings | |
Settings for registers of Charger 19 Click driver. | |
Charger 19 MikroBUS Map | |
MikroBUS pin mapping of Charger 19 Click driver. | |
Functions | |
void | charger19_cfg_setup (charger19_cfg_t *cfg) |
Charger 19 configuration object setup function. | |
err_t | charger19_init (charger19_t *ctx, charger19_cfg_t *cfg) |
Charger 19 initialization function. | |
err_t | charger19_default_cfg (charger19_t *ctx) |
Charger 19 default configuration function. | |
err_t | charger19_read_an_pin_value (charger19_t *ctx, uint16_t *data_out) |
Charger 19 read AN pin value function. | |
err_t | charger19_read_an_pin_voltage (charger19_t *ctx, float *data_out) |
Charger 19 read AN pin voltage level function. | |
err_t | charger19_set_vout (charger19_t *ctx, uint8_t vout_sel) |
Charger 19 set output voltage function. | |
void | charger19_set_ship_mode (charger19_t *ctx, uint8_t ship_sel) |
Charger 19 set Ship mode function. | |
err_t | charger19_get_vbat (charger19_t *ctx, float *vbat) |
Charger 19 get battery voltage function. | |
API for configuring and manipulating Charger 19 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void charger19_cfg_setup | ( | charger19_cfg_t * | cfg | ) |
Charger 19 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See charger19_cfg_t object definition for detailed explanation. |
err_t charger19_default_cfg | ( | charger19_t * | ctx | ) |
Charger 19 default configuration function.
This function executes a default configuration of Charger 19 click board.
[in] | ctx | : Click context object. See charger19_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t charger19_get_vbat | ( | charger19_t * | ctx, |
float * | vbat ) |
Charger 19 get battery voltage function.
This function is used to get battery voltage.
[in] | ctx | : Click context object. See charger19_t object definition for detailed explanation. |
[out] | vbat | : Battery voltage. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t charger19_init | ( | charger19_t * | ctx, |
charger19_cfg_t * | cfg ) |
Charger 19 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See charger19_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See charger19_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t charger19_read_an_pin_value | ( | charger19_t * | ctx, |
uint16_t * | data_out ) |
Charger 19 read AN pin value function.
This function reads results of AD conversion of the AN pin.
[in] | ctx | : Click context object. See charger19_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t charger19_read_an_pin_voltage | ( | charger19_t * | ctx, |
float * | data_out ) |
Charger 19 read AN pin voltage level function.
This function reads results of AD conversion of the AN pin and converts them to proportional voltage level.
[in] | ctx | : Click context object. See charger19_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void charger19_set_ship_mode | ( | charger19_t * | ctx, |
uint8_t | ship_sel ) |
Charger 19 set Ship mode function.
This function is used to enable ship mode.
[in] | ctx | : Click context object. See charger19_t object definition for detailed explanation. |
[in] | ship_sel | : Ship mode selection. |
err_t charger19_set_vout | ( | charger19_t * | ctx, |
uint8_t | vout_sel ) |
Charger 19 set output voltage function.
This function is used to set voltage output.
[in] | ctx | : Click context object. See charger19_t object definition for detailed explanation. |
[in] | vout_sel | : Output voltage selection. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.