Device driver interface for the BQ2429x Single-Cell USB Charger. More...
Device driver interface for the BQ2429x Single-Cell USB Charger.
Definition in file bq2429x.h.
#include <stdint.h>#include <stdbool.h>#include "kernel_defines.h"#include "periph/i2c.h"#include "periph/gpio.h"
Include dependency graph for bq2429x.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | bq2429x_status_t |
| Device status. More... | |
| struct | bq2429x_fault_t |
| Device faults. More... | |
| struct | bq2429x_params_t |
| BQ2429x device parameters. More... | |
| struct | bq2429x_t |
| BQ2429x device descriptor. More... | |
Typedefs | |
| typedef void(* | bq2429x_int_cb_t) (void *) |
| Callback function for BQ2429x interrupts. | |
Functions | |
| int | bq2429x_init (bq2429x_t *dev, const bq2429x_params_t *params) |
| Initialize device. | |
| int | bq2429x_init_int (bq2429x_t *dev, bq2429x_int_cb_t cb, void *arg) |
| Initialize interrupt support for the device. | |
| int | bq2429x_get_status (const bq2429x_t *dev, bq2429x_status_t *status) |
| Get device status. | |
| int | bq2429x_get_fault (const bq2429x_t *dev, bq2429x_fault_t *fault) |
| Get device faults. | |
| int | bq2429x_enable_otg (const bq2429x_t *dev) |
| Enable OTG. | |
| int | bq2429x_disable_otg (const bq2429x_t *dev) |
| Disable OTG. | |
| int | bq2429x_enable_charge (const bq2429x_t *dev) |
| Enable battery charging. | |
| int | bq2429x_disable_charge (const bq2429x_t *dev) |
| Disable battery charging. | |
| int | bq2429x_set_vlim (bq2429x_t *dev, bq2429x_input_voltage_limit_t vlim) |
| Set Input Voltage Limit. | |
| int | bq2429x_get_vlim (const bq2429x_t *dev, bq2429x_input_voltage_limit_t *vlim) |
| Get Input Voltage Limit. | |
| int | bq2429x_set_ilim (bq2429x_t *dev, bq2429x_input_current_limit_t ilim) |
| Set Input Current Limit. | |
| int | bq2429x_get_ilim (const bq2429x_t *dev, bq2429x_input_current_limit_t *ilim) |
| Get Input Current Limit. | |
| int | bq2429x_set_ichg (bq2429x_t *dev, bq2429x_charge_current_t ichg) |
| Set Charge Current. | |
| int | bq2429x_get_ichg (const bq2429x_t *dev, bq2429x_charge_current_t *ichg) |
| Get Charge Current. | |
| int | bq2429x_set_vreg (bq2429x_t *dev, bq2429x_charge_voltage_limit_t vreg) |
| Set Charge Voltage Limit. | |
| int | bq2429x_get_vreg (const bq2429x_t *dev, bq2429x_charge_voltage_limit_t *vreg) |
| Get Charge Voltage Limit. | |