Files
ESP32Marauder/esp32_marauder/BatteryInterface.h
tracedgod f3349766ed Add XIAO-ESP32-S3 Board Support (WIP)
looking to cleanup certain things with config to allow easier customization of the build when used with the flipper zero
2023-06-10 00:22:19 -04:00

33 lines
520 B
C++

#ifndef BatteryInterface_h
#define BatteryInterface_h
#include <Arduino.h>
#include "configs.h"
#ifndef MARAUDER_FLIPPER || XIAO_ESP32_S3
#include <Wire.h>
#endif
#define I2C_SDA 33
#define I2C_SCL 22
#define IP5306_ADDR 0x75
class BatteryInterface {
private:
uint32_t initTime = 0;
public:
int8_t battery_level = 0;
int8_t old_level = 0;
bool i2c_supported = false;
BatteryInterface();
void RunSetup();
void main(uint32_t currentTime);
int8_t getBatteryLevel();
};
#endif