balancer5 2.0.0.0
|
This file contains API for Balancer 5 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 | balancer5_t |
Click ctx object definition. More... | |
struct | balancer5_cfg_t |
Click configuration structure definition. More... | |
Functions | |
void | balancer5_cfg_setup (balancer5_cfg_t *cfg) |
Config Object Initialization function. | |
BALANCER5_RETVAL | balancer5_init (balancer5_t *ctx, balancer5_cfg_t *cfg) |
Initialization function. | |
void | balancer5_default_cfg (balancer5_t *ctx) |
Click Default Configuration function. | |
void | balancer5_generic_write (balancer5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | balancer5_generic_read (balancer5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | balancer5_read_data (balancer5_t *ctx, uint8_t reg_addr) |
Generic function for reading one Byte data from registar. | |
void | balancer5_write_data (balancer5_t *ctx, uint8_t reg_addr, uint8_t write_data) |
Generic function for writing one Byte data to registar. | |
void | balancer5_charge (balancer5_t *ctx, uint8_t state) |
Function for setting charging status. | |
uint8_t | balancer5_get_int_status (balancer5_t *ctx) |
Gets state of the int pin. | |
uint8_t | balancer5_get_power_good_status (balancer5_t *ctx) |
Gets state of the pg pin on an. | |
uint8_t | balancer5_get_power_source_status (balancer5_t *ctx) |
Gets state of the psel pin on rst. | |
uint8_t | balancer5_check_id (balancer5_t *ctx) |
Checks if device ID is good. | |
This file contains API for Balancer 5 Click driver.
#define BALANCER5_ADC_CTRL_12BIT_RES 0x30 |
#define BALANCER5_ADC_CTRL_13BIT_RES 0x20 |
#define BALANCER5_ADC_CTRL_14BIT_RES 0x10 |
#define BALANCER5_ADC_CTRL_15BIT_RES 0x00 |
#define BALANCER5_ADC_CTRL_CONT_CONV 0x00 |
#define BALANCER5_ADC_CTRL_DISABLE 0x00 |
#define BALANCER5_ADC_CTRL_ENABLE 0x80 |
#define BALANCER5_ADC_CTRL_ONE_SHOT_CONV 0x40 |
#define BALANCER5_CS1_CHARGE_TERMINATION 0x06 |
#define BALANCER5_CS1_FAST_CHARGE 0x03 |
#define BALANCER5_CS1_IC_IN_THERMAL_REGULATION 0x10 |
#define BALANCER5_CS1_IC_NORMAL 0x00 |
#define BALANCER5_CS1_IINDPM_IN_REGULATION 0x40 |
#define BALANCER5_CS1_IINDPM_NORMAL 0x00 |
#define BALANCER5_CS1_NOT_CHARGING 0x00 |
#define BALANCER5_CS1_PRE_CHARGE 0x02 |
#define BALANCER5_CS1_TAPER_CHARGE 0x04 |
#define BALANCER5_CS1_TOP_OFF_TIMER_CHARGE 0x05 |
#define BALANCER5_CS1_TRICKLE_CHARGE 0x01 |
#define BALANCER5_CS1_VINDPM_IN_REGULATION 0x20 |
#define BALANCER5_CS1_VINDPM_NORMAL 0x00 |
#define BALANCER5_CS1_WD_NORMAL 0x00 |
#define BALANCER5_CS1_WD_TIMER_EXPIRED 0x08 |
#define BALANCER5_CS2_ADAPTER 0x30 |
#define BALANCER5_CS2_ICO_DISABLED 0x00 |
#define BALANCER5_CS2_ICO_OPTIMIZATION_IN_PROGRESS 0x02 |
#define BALANCER5_CS2_MAX_INPUT 0x04 |
#define BALANCER5_CS2_NO_INPUT 0x00 |
#define BALANCER5_CS2_NON_STANDARD_ADAPTER 0x60 |
#define BALANCER5_CS2_POORSRC 0x40 |
#define BALANCER5_CS2_POWER_GOOD 0x80 |
#define BALANCER5_CS2_POWER_NOT_GOOD 0x00 |
#define BALANCER5_CS2_UNKNOWN_ADAPTER 0x50 |
#define BALANCER5_CS2_USB_CDP 0x20 |
#define BALANCER5_CS2_USB_HOST_SDP 0x10 |
#define BALANCER5_SLAVE_ADDRESS 0x6A |