charger27  2.1.0.0
Modules | Functions
Charger 27 Click Driver

API for configuring and manipulating Charger 27 Click driver. More...

Modules

 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. More...
 
err_t charger27_init (charger27_t *ctx, charger27_cfg_t *cfg)
 Charger 27 initialization function. More...
 
uint8_t charger27_check_input_supply (charger27_t *ctx)
 Charger 27 checks valid input supply indicator function. More...
 
err_t charger27_set_mode (charger27_t *ctx, uint8_t mode)
 Charger 27 sets the operating mode function. More...
 
uint8_t charger27_check_chg_completion (charger27_t *ctx)
 Charger 27 checks charging completion indicator function. More...
 

Detailed Description

API for configuring and manipulating Charger 27 Click driver.

Function Documentation

◆ charger27_cfg_setup()

void charger27_cfg_setup ( charger27_cfg_t cfg)

Charger 27 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ charger27_check_chg_completion()

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.

Parameters
[in]ctx: Click context object. See charger27_t object definition for detailed explanation.
Returns
Valid input supply indicator state:
  • 0 - Charge mode,
  • 1 - Charging has completed or is suspended.
Note
None.

◆ charger27_check_input_supply()

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.

Parameters
[in]ctx: Click context object. See charger27_t object definition for detailed explanation.
Returns
Valid input supply indicator state:
  • 0 - The input voltage error,
  • 1 - The input voltage is recognized as a good source.
Note
None.

◆ charger27_init()

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.

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

◆ charger27_set_mode()

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.

Parameters
[in]ctx: Click context object. See charger27_t object definition for detailed explanation.
[in]mode: Charge or discharge mode selection [0-1].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.