Skip to content

Commit 6dbb8ed

Browse files
Merge pull request #24 from cristidragomir97/master
Added modifications to make this library compatible with the Arduino_PowerManagement library
2 parents 31a691b + 052a2bd commit 6dbb8ed

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

src/PF1550.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ void PF1550::configCharger(IFastCharge const i_fast_charge,
178178
_control.setInputCurrentLimit (i_input_current_limit);
179179
}
180180

181+
PF1550_Control * PF1550::getControlPointer(){
182+
return &this -> _control;
183+
}
184+
181185
/******************************************************************************
182186
EXTERN DEFINITION
183187
******************************************************************************/

src/PF1550.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ class PF1550
9595
/* Actual PMIC event ISR handler with access to member variables */
9696
inline void onPMICEvent() { _control.onPMICEvent(); }
9797

98+
PF1550_Control * getControlPointer();
99+
98100

99101
private:
100102
PF1550_Control _control;

src/PF1550/PF1550_Control.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ void PF1550_Control::setBit(Register const reg, uint8_t const bit_pos)
5656
_io.setBit(reg, bit_pos);
5757
}
5858

59+
void PF1550_Control::clrBit(Register const reg, uint8_t const bit_pos)
60+
{
61+
_io.clrBit(reg, bit_pos);
62+
}
63+
5964
void PF1550_Control::writeReg(Register const reg_addr, uint8_t const val)
6065
{
6166
if (_debug) {

src/PF1550/PF1550_Control.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class PF1550_Control
4949
void debug(Stream& stream);
5050

5151
void setBit (Register const reg, uint8_t const bit_pos);
52+
void clrBit(Register const reg, uint8_t const bit_pos);
5253
void writeReg(Register const reg_addr, uint8_t const val);
5354
void readReg (Register const reg_addr, uint8_t * data);
5455

0 commit comments

Comments
 (0)