battman3 2.0.0.0
|
BATT-MAN3 Click example. More...
Macros | |
#define | LOG_THRESHOLD_1SEC 10 |
BATT-MAN 3 Click LOG delay. | |
#define | LOG_THRESHOLD_3SEC 30 |
#define | LOG_THRESHOLD_5SEC 50 |
Functions | |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
BATT-MAN3 Click example.
This example showcases ability of device to charge battery, and outputs and supply 4 different devices with 3 LDO's and 1 boost channel.
The demo application is composed of two sections :
Initialization of the communication modules(UART, I2C) and 3 additional input pins(power good, battery ok, and interrupt). Configures device to enable charging, battery voltage monitoring, sets charging termination to 3.7V, charging threshold to 3.1V and dead battery to 2.5V. Enables all 3 LDO's( channel 1 -> 3.3V, channel 2 -> 1.5V, and channel 3 -> 2.5V ).
Reads battery voltage level and logs it. Besides that reads status and logs every change on charging and battery status. If power good flag occurs(PGD pin goes low) disables LDO's, and reenables them when battery is full(when battery reaches charging termination voltage).
#define LOG_THRESHOLD_1SEC 10 |
BATT-MAN 3 Click LOG delay.
Macro that specifies delay between logs of battery voltage.
#define LOG_THRESHOLD_3SEC 30 |
#define LOG_THRESHOLD_5SEC 50 |
void application_init | ( | void | ) |
< Logger config object.
< Click config object.
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | void | ) |
int main | ( | void | ) |