charger6 2.0.0.0
main.c File Reference

Charger6 Click example. More...

#include "board.h"
#include "log.h"
#include "charger6.h"

Functions

void display_chrg_status (void)
 
void display_power_good_status (void)
 
void display_vsys_status (void)
 
void display_bat_status (void)
 
void display_chrg_fault_status (void)
 
void application_init (void)
 
void application_task (void)
 
int main (void)
 

Variables

charger6_status_t chg_status
 

Detailed Description

Charger6 Click example.

Description

This library contains API for the Charger 6 Click driver. The library contains drivers to enable/disable battery charging, set current limit, set system min voltage, set fast charge current, set charge voltage, etc.

The demo application is composed of two sections :

Application Init

Initializes I2C driver and set default configuration: input current limit set to 500 mA, system minimum voltage to 3500 mV, fast charge current set to 360 mA, charge voltage to 4112 mV and enable battery charging.

Application Task

This example monitors the operation of the Charger 6 Click and all its charging states. The user can observe information such as charging status, selected mode, charging current value, and the momentary value of the supply voltage relative to the battery voltage. Results are being sent to the Usart Terminal where you can track their changes.

Author
Nenad Filipovic

Function Documentation

◆ application_init()

void application_init ( void )

< Logger config object.

< Click config object.

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ display_bat_status()

void display_bat_status ( void )

◆ display_chrg_fault_status()

void display_chrg_fault_status ( void )

◆ display_chrg_status()

void display_chrg_status ( void )

◆ display_power_good_status()

void display_power_good_status ( void )

◆ display_vsys_status()

void display_vsys_status ( void )

◆ main()

int main ( void )

Variable Documentation

◆ chg_status

charger6_status_t chg_status