charger3 2.0.0.0
main.c File Reference

Charger3 Click example. More...

#include "board.h"
#include "log.h"
#include "charger3.h"

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

Charger3 Click example.

Description

This example demonstrates the utilization of Charger 3 click.

The demo application is composed of two sections :

Application Init

The application init sets up the UART LOG and I2C communication drivers. The default configuration disables write protection and sets the operation mode to charging.

Application Task

Task consists of two operations. First, the desired battery charging current is set by the user. Since setting the current doesn't implicitly reveals the resistance, the value of AD5175 digipot is directly read from the RDAC register, calculated and displayed on the uart log.

note: While the resistance of the AD5175 can be directly set and read, the total resistance value on the PROG pin should be accounted for ( this means an additional 1kohm in series ) setting of the battery charging current.

Author
Stefan Nikolic

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 )

◆ main()

int main ( void )