charger27 2.1.0.0
|
API for configuring and manipulating Charger 27 Click driver. More...
Topics | |
Charger 27 MikroBUS Map | |
MikroBUS pin mapping of Charger 27 Click driver. | |
Charger27_set | |
Functions | |
void | charger27_cfg_setup (charger27_cfg_t *cfg) |
Charger 27 configuration object setup function. | |
err_t | charger27_init (charger27_t *ctx, charger27_cfg_t *cfg) |
Charger 27 initialization function. | |
uint8_t | charger27_check_input_supply (charger27_t *ctx) |
Charger 27 checks valid input supply indicator function. | |
err_t | charger27_set_mode (charger27_t *ctx, uint8_t mode) |
Charger 27 sets the operating mode function. | |
uint8_t | charger27_check_chg_completion (charger27_t *ctx) |
Charger 27 checks charging completion indicator function. | |
API for configuring and manipulating Charger 27 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void charger27_cfg_setup | ( | charger27_cfg_t * | cfg | ) |
Charger 27 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See charger27_cfg_t object definition for detailed explanation. |
uint8_t charger27_check_chg_completion | ( | charger27_t * | ctx | ) |
Charger 27 checks charging completion indicator function.
This function checks the charging completion indicator state of the MP2639B, 1S Cell Li-ion or Li-polymer Switching Charger Compatible with Wide Input Range and Integrated Programmable OTG on the Charger 27 click board.
[in] | ctx | : Click context object. See charger27_t object definition for detailed explanation. |
0
- Charge mode, 1
- Charging has completed or is suspended. uint8_t charger27_check_input_supply | ( | charger27_t * | ctx | ) |
Charger 27 checks valid input supply indicator function.
This function checks valid input supply indicator state of the MP2639B, 1S Cell Li-ion or Li-polymer Switching Charger Compatible with Wide Input Range and Integrated Programmable OTG on the Charger 27 click board.
[in] | ctx | : Click context object. See charger27_t object definition for detailed explanation. |
0
- The input voltage error, 1
- The input voltage is recognized as a good source. err_t charger27_init | ( | charger27_t * | ctx, |
charger27_cfg_t * | cfg ) |
Charger 27 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See charger27_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See charger27_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t charger27_set_mode | ( | charger27_t * | ctx, |
uint8_t | mode ) |
Charger 27 sets the operating mode function.
This function is used for the charge or discharge mode selection of the MP2639B, 1S Cell Li-ion or Li-polymer Switching Charger Compatible with Wide Input Range and Integrated Programmable OTG on the Charger 27 click board.
[in] | ctx | : Click context object. See charger27_t object definition for detailed explanation. |
[in] | mode | : Charge or discharge mode selection [0-1]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.