charger8 2.0.0.0
|
This file contains API for Charger 8 Click driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
Go to the source code of this file.
Data Structures | |
struct | charger8_t |
Click ctx object definition. More... | |
struct | charger8_cfg_t |
Click configuration structure definition. More... | |
Functions | |
void | charger8_cfg_setup (charger8_cfg_t *cfg) |
Config Object Initialization function. | |
CHARGER8_RETVAL | charger8_init (charger8_t *ctx, charger8_cfg_t *cfg) |
Initialization function. | |
void | charger8_default_cfg (charger8_t *ctx) |
Click Default Configuration function. | |
void | charger8_generic_write (charger8_t *ctx, uint8_t reg, uint16_t data_wr) |
Generic write function. | |
uint16_t | charger8_generic_read (charger8_t *ctx, uint8_t reg) |
Generic read function. | |
void | charger8_enable (charger8_t *ctx, uint8_t enable) |
Functions for enable or disable device. | |
float | charger8_get_temperature (charger8_t *ctx) |
Functions for read Temperature of the chip. | |
float | charger8_get_current (charger8_t *ctx) |
Functions for reading the current charging battery. | |
float | charger8_get_voltage (charger8_t *ctx) |
Functions for reading the voltage of the battery. | |
uint8_t | charger8_get_soc (charger8_t *ctx) |
Function for reads the percentage of the battery charge. | |
uint16_t | charger8_get_capacity (charger8_t *ctx) |
Function for reads the current capacity of the battery. | |
float | charger8_get_time_to_empty (charger8_t *ctx) |
Function for reads the Time to Empty data. | |
float | charger8_get_time_to_full (charger8_t *ctx) |
Function for reads the Time to Full data. | |
uint16_t | charger8_get_status (charger8_t *ctx) |
Function for reads the Status register. | |
void | charger8_reset (charger8_t *ctx) |
General reset procedure. | |
uint8_t | charger8_get_fault_output (charger8_t *ctx) |
Function for reads FAULT pin state. | |
void | charger8_set_usb_suspend (charger8_t *ctx, uint8_t mode) |
Function for set USB Suspand pin. | |
void | charger8_set_alert (charger8_t *ctx, uint8_t state) |
Function for set Alert pin state. | |
uint8_t | charger8_get_dc_power_ok (charger8_t *ctx) |
Function for reads DC power pin state. | |
void | charger8_set_max_battery_capacity (charger8_t *ctx, uint16_t capacity) |
Function for set Max battery capacity in [mAh]. | |
This file contains API for Charger 8 Click driver.