charger23 2.1.0.0
|
API for configuring and manipulating Charger 23 Click driver. More...
Topics | |
Charger 23 Settings | |
Settings of Charger 23 Click driver. | |
Charger 23 MikroBUS Map | |
MikroBUS pin mapping of Charger 23 Click driver. | |
Functions | |
void | charger23_cfg_setup (charger23_cfg_t *cfg) |
Charger 23 configuration object setup function. | |
err_t | charger23_init (charger23_t *ctx, charger23_cfg_t *cfg) |
Charger 23 initialization function. | |
void | charger23_enable_device (charger23_t *ctx) |
Charger 23 enable device function. | |
void | charger23_disable_device (charger23_t *ctx) |
Charger 23 disable device function. | |
uint8_t | charger23_get_status_pin (charger23_t *ctx) |
Charger 23 get status pin function. | |
uint8_t | charger23_get_fault_pin (charger23_t *ctx) |
Charger 23 get fault pin function. | |
uint8_t | charger23_get_charger_state (charger23_t *ctx) |
Charger 23 get charger state function. | |
API for configuring and manipulating Charger 23 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void charger23_cfg_setup | ( | charger23_cfg_t * | cfg | ) |
Charger 23 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See charger23_cfg_t object definition for detailed explanation. |
void charger23_disable_device | ( | charger23_t * | ctx | ) |
Charger 23 disable device function.
This function disables the device by setting the EN pin to LOW logic state.
[in] | ctx | : Click context object. See charger23_t object definition for detailed explanation. |
void charger23_enable_device | ( | charger23_t * | ctx | ) |
Charger 23 enable device function.
This function enables the device by setting the EN pin to HIGH logic state.
[in] | ctx | : Click context object. See charger23_t object definition for detailed explanation. |
uint8_t charger23_get_charger_state | ( | charger23_t * | ctx | ) |
Charger 23 get charger state function.
This function returns the charger state.
[in] | ctx | : Click context object. See charger23_t object definition for detailed explanation. |
0
- Unknown state, 1
- Fault, 2
- Charging in one of the three modes, 3
- Charge completed with no fault (Inhibit) or Standby. uint8_t charger23_get_fault_pin | ( | charger23_t * | ctx | ) |
Charger 23 get fault pin function.
This function returns the FAULT pin logic state. The FAULT pin is pulled LOW under any fault conditions.
[in] | ctx | : Click context object. See charger23_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. uint8_t charger23_get_status_pin | ( | charger23_t * | ctx | ) |
Charger 23 get status pin function.
This function returns the STATUS pin logic state. The STATUS pin is pulled LOW when the charger is charging a battery.
[in] | ctx | : Click context object. See charger23_t object definition for detailed explanation. |
0
- Low pin state, 1
- High pin state. err_t charger23_init | ( | charger23_t * | ctx, |
charger23_cfg_t * | cfg ) |
Charger 23 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See charger23_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See charger23_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.