I2C improvements and fixes (#201)
- Show I2C device name in I2C Scanner app - Register various I2C devices from board implementations - Fix M5Stack Core2 power status - Fix pre-allocation issue in `hal::Device`
This commit is contained in:
committed by
GitHub
parent
2e61aea93c
commit
c0f4738abe
@@ -7,12 +7,11 @@
|
||||
/**
|
||||
* Easy access to GPIO pins
|
||||
*/
|
||||
class UnPhoneFeatures {
|
||||
class UnPhoneFeatures final {
|
||||
|
||||
private:
|
||||
|
||||
esp_io_expander_handle_t ioExpander = nullptr;
|
||||
Bq24295 batteryManagement = Bq24295(I2C_NUM_0);
|
||||
tt::Thread buttonHandlingThread;
|
||||
bool buttonHandlingThreadInterruptRequest = false;
|
||||
|
||||
@@ -21,9 +20,14 @@ private:
|
||||
static bool initPowerSwitch();
|
||||
bool initGpioExpander();
|
||||
|
||||
std::shared_ptr<Bq24295> batteryManagement;
|
||||
|
||||
public:
|
||||
|
||||
UnPhoneFeatures() = default;
|
||||
explicit UnPhoneFeatures(std::shared_ptr<Bq24295> bq24295) : batteryManagement(std::move(bq24295)) {
|
||||
assert(batteryManagement != nullptr);
|
||||
}
|
||||
|
||||
~UnPhoneFeatures();
|
||||
|
||||
bool init();
|
||||
|
||||
Reference in New Issue
Block a user