battmon2 2.0.0.0
|
This file contains API for BATT-MON 2 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 | battmon2_t |
BATT-MON 2 Click context object. More... | |
struct | battmon2_cfg_t |
BATT-MON 2 Click configuration object. More... | |
Enumerations | |
enum | battmon2_return_value_t { BATTMON2_OK = 0 , BATTMON2_ERROR = -1 } |
BATT-MON 2 Click return value data. More... | |
Functions | |
void | battmon2_cfg_setup (battmon2_cfg_t *cfg) |
BATT-MON 2 configuration object setup function. | |
err_t | battmon2_init (battmon2_t *ctx, battmon2_cfg_t *cfg) |
BATT-MON 2 initialization function. | |
err_t | battmon2_generic_write (battmon2_t *ctx, uint8_t reg, uint16_t *tx_buf, uint8_t tx_len) |
BATT-MON 2 I2C writing function. | |
err_t | battmon2_generic_read (battmon2_t *ctx, uint8_t reg, uint16_t *rx_buf, uint8_t rx_len) |
BATT-MON 2 I2C reading function. | |
err_t | battmon2_write_register (battmon2_t *ctx, uint8_t reg, uint16_t data_in) |
BATT-MON 2 write register function. | |
err_t | battmon2_read_register (battmon2_t *ctx, uint8_t reg, uint16_t *data_out) |
BATT-MON 2 read register function. | |
err_t | battmon2_check_communication (battmon2_t *ctx) |
BATT-MON 2 check communication function. | |
uint8_t | battmon2_get_alert_pin (battmon2_t *ctx) |
BATT-MON 2 get alert pin function. | |
err_t | battmon2_get_die_temperature (battmon2_t *ctx, float *temperature) |
BATT-MON 2 get die temperature function. | |
err_t | battmon2_get_battery_capacity (battmon2_t *ctx, float *capacity) |
BATT-MON 2 get battery capacity function. | |
err_t | battmon2_get_battery_percentage (battmon2_t *ctx, float *percentage) |
BATT-MON 2 get battery percentage function. | |
err_t | battmon2_get_battery_voltage (battmon2_t *ctx, float *voltage) |
BATT-MON 2 get battery voltage function. | |
err_t | battmon2_get_battery_current (battmon2_t *ctx, float *current) |
BATT-MON 2 get battery current function. | |
err_t | battmon2_get_battery_tte (battmon2_t *ctx, uint32_t *time_to_empty) |
BATT-MON 2 get battery tte function. | |
err_t | battmon2_get_battery_ttf (battmon2_t *ctx, uint32_t *time_to_full) |
BATT-MON 2 get battery ttf function. | |
This file contains API for BATT-MON 2 Click Driver.