diff --git a/src/PF1550.cpp b/src/PF1550.cpp index 57392b6..14e7568 100644 --- a/src/PF1550.cpp +++ b/src/PF1550.cpp @@ -178,6 +178,10 @@ void PF1550::configCharger(IFastCharge const i_fast_charge, _control.setInputCurrentLimit (i_input_current_limit); } +PF1550_Control * PF1550::getControlPointer(){ + return &this -> _control; +} + /****************************************************************************** EXTERN DEFINITION ******************************************************************************/ diff --git a/src/PF1550.h b/src/PF1550.h index c6b10d9..70c53d3 100644 --- a/src/PF1550.h +++ b/src/PF1550.h @@ -95,6 +95,8 @@ class PF1550 /* Actual PMIC event ISR handler with access to member variables */ inline void onPMICEvent() { _control.onPMICEvent(); } + PF1550_Control * getControlPointer(); + private: PF1550_Control _control; diff --git a/src/PF1550/PF1550_Control.cpp b/src/PF1550/PF1550_Control.cpp index dec157b..4a56f7c 100644 --- a/src/PF1550/PF1550_Control.cpp +++ b/src/PF1550/PF1550_Control.cpp @@ -56,6 +56,11 @@ void PF1550_Control::setBit(Register const reg, uint8_t const bit_pos) _io.setBit(reg, bit_pos); } +void PF1550_Control::clrBit(Register const reg, uint8_t const bit_pos) +{ + _io.clrBit(reg, bit_pos); +} + void PF1550_Control::writeReg(Register const reg_addr, uint8_t const val) { if (_debug) { diff --git a/src/PF1550/PF1550_Control.h b/src/PF1550/PF1550_Control.h index 81a36ae..05b6082 100644 --- a/src/PF1550/PF1550_Control.h +++ b/src/PF1550/PF1550_Control.h @@ -49,6 +49,7 @@ class PF1550_Control void debug(Stream& stream); void setBit (Register const reg, uint8_t const bit_pos); + void clrBit(Register const reg, uint8_t const bit_pos); void writeReg(Register const reg_addr, uint8_t const val); void readReg (Register const reg_addr, uint8_t * data);