mirror of
https://github.com/marian-m12l/game-and-watch-zelda3.git
synced 2025-12-17 07:16:05 +01:00
27 lines
488 B
C
27 lines
488 B
C
#pragma once
|
|
#ifndef BQ24072_H
|
|
#define BQ24072_H
|
|
|
|
#include <stdint.h>
|
|
|
|
enum {
|
|
BQ24072_STATE_MISSING,
|
|
BQ24072_STATE_CHARGING,
|
|
BQ24072_STATE_DISCHARGING,
|
|
BQ24072_STATE_FULL,
|
|
};
|
|
typedef uint8_t bq24072_state_t;
|
|
|
|
int32_t bq24072_init(void);
|
|
|
|
void bq24072_handle_power_good(void);
|
|
void bq24072_handle_charging(void);
|
|
|
|
bq24072_state_t bq24072_get_state(void);
|
|
int bq24072_get_percent(void);
|
|
int bq24072_get_percent_filtered(void);
|
|
|
|
void bq24072_poll(void);
|
|
|
|
#endif // BQ24072_H
|