charger23 2.1.0.0
Charger 23 Click Driver

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.
 

Detailed Description

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.

Function Documentation

◆ charger23_cfg_setup()

void charger23_cfg_setup ( charger23_cfg_t * cfg)

Charger 23 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See charger23_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ charger23_disable_device()

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.

Parameters
[in]ctx: Click context object. See charger23_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ charger23_enable_device()

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.

Parameters
[in]ctx: Click context object. See charger23_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ charger23_get_charger_state()

uint8_t charger23_get_charger_state ( charger23_t * ctx)

Charger 23 get charger state function.

This function returns the charger state.

Parameters
[in]ctx: Click context object. See charger23_t object definition for detailed explanation.
Returns
  • 0 - Unknown state,
  • 1 - Fault,
  • 2 - Charging in one of the three modes,
  • 3 - Charge completed with no fault (Inhibit) or Standby.
Note
None.

◆ charger23_get_fault_pin()

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.

Parameters
[in]ctx: Click context object. See charger23_t object definition for detailed explanation.
Returns
  • 0 - Low pin state,
  • 1 - High pin state.
Note
None.

◆ charger23_get_status_pin()

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.

Parameters
[in]ctx: Click context object. See charger23_t object definition for detailed explanation.
Returns
  • 0 - Low pin state,
  • 1 - High pin state.
Note
None.

◆ charger23_init()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.