charger18 2.0.0.0
Charger 18 Click Driver

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

Topics

 Charger 18 Settings
 Settings for Charger 18 Click driver.
 
 Charger 18 MikroBUS Map
 MikroBUS pin mapping of Charger 18 Click driver.
 

Functions

void charger18_cfg_setup (charger18_cfg_t *cfg)
 Charger 18 configuration object setup function.
 
err_t charger18_init (charger18_t *ctx, charger18_cfg_t *cfg)
 Charger 18 initialization function.
 
void charger18_buck_control (charger18_t *ctx, uint8_t state)
 Charger 18 buck control function.
 
void charger18_ldo_control (charger18_t *ctx, uint8_t state)
 Charger 18 ldo control function.
 
void charger18_suspend_control (charger18_t *ctx, uint8_t state)
 Charger 18 suspend control function.
 
void charger18_power_control (charger18_t *ctx, uint8_t state)
 Charger 18 power control function.
 
uint8_t charger18_get_sta_pin (charger18_t *ctx)
 Charger 18 get STA pin function.
 

Detailed Description

API for configuring and manipulating Charger 18 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

◆ charger18_buck_control()

void charger18_buck_control ( charger18_t * ctx,
uint8_t state )

Charger 18 buck control function.

This function controls the buck regulator enable state of Charger 18 click board.

Parameters
[in]ctx: Click context object. See charger18_t object definition for detailed explanation.
[in]state:
  • 0 - Disable,
  • 1 - Enable.
Returns
None.
Note
The buck regulator is specified to 1.2V 200mA.

◆ charger18_cfg_setup()

void charger18_cfg_setup ( charger18_cfg_t * cfg)

Charger 18 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ charger18_get_sta_pin()

uint8_t charger18_get_sta_pin ( charger18_t * ctx)

Charger 18 get STA pin function.

This function returns the pushbutton status (STA) pin logic state.

Parameters
[in]ctx: Click context object. See charger18_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ charger18_init()

err_t charger18_init ( charger18_t * ctx,
charger18_cfg_t * cfg )

Charger 18 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See charger18_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See charger18_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ charger18_ldo_control()

void charger18_ldo_control ( charger18_t * ctx,
uint8_t state )

Charger 18 ldo control function.

This function controls the low dropout (LDO) regulator enable state of Charger 18 click board.

Parameters
[in]ctx: Click context object. See charger18_t object definition for detailed explanation.
[in]state:
  • 0 - Disable,
  • 1 - Enable.
Returns
None.
Note
The LDO regulator is specified to 3.3V 150mA.

◆ charger18_power_control()

void charger18_power_control ( charger18_t * ctx,
uint8_t state )

Charger 18 power control function.

This function controls the chip power state of Charger 18 click board.

Parameters
[in]ctx: Click context object. See charger18_t object definition for detailed explanation.
[in]state:
  • 0 - Disable,
  • 1 - Enable.
Returns
None.
Note
None.

◆ charger18_suspend_control()

void charger18_suspend_control ( charger18_t * ctx,
uint8_t state )

Charger 18 suspend control function.

This function controls the suspend charging mode state of Charger 18 click board.

Parameters
[in]ctx: Click context object. See charger18_t object definition for detailed explanation.
[in]state:
  • 0 - Disable,
  • 1 - Enable.
Returns
None.
Note
None.