ppr1: add crude version of charge controller driver

This commit is contained in:
Kevin Hester
2020-10-24 18:40:47 +08:00
parent f0eeaf01d4
commit 1a8891c33d
6 changed files with 146 additions and 12 deletions

22
src/nrf52/BQ25713.h Normal file
View File

@@ -0,0 +1,22 @@
#pragma once
#include <Arduino.h>
/**
* Driver class to control/monitor BQ25713 charge controller
*/
class BQ25713 {
static const uint8_t devAddr;
public:
/// Return true for success
bool setup();
private:
uint16_t readReg(uint8_t reg);
/// Return true for success
bool writeReg(uint8_t reg, uint16_t v);
};