Skip to content

Commit 2d4c307

Browse files
committed
Restore readLDOreg() and add USE_FASTCHG_TO_KICK_WATCHDOG to ensure Arduino_BHY2 compatibility
1 parent 135119e commit 2d4c307

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

libraries/Nicla_System/src/Nicla_System.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ bool nicla::enterShipMode()
9999
_pmic.writeByte(BQ25120A_ADDRESS, BQ25120A_STATUS, status_reg);
100100
}
101101

102+
uint8_t nicla::readLDOreg()
103+
{
104+
return _pmic.readByte(BQ25120A_ADDRESS, BQ25120A_LDO_CTRL);
105+
}
106+
102107
bool nicla::enableCharge(uint8_t mA)
103108
{
104109
digitalWrite(p25, LOW);

libraries/Nicla_System/src/Nicla_System.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include <mbed.h>
99
#include <I2C.h>
1010

11+
#define USE_FASTCHG_TO_KICK_WATCHDOG 1
12+
1113
class nicla {
1214

1315
public:
@@ -16,6 +18,7 @@ class nicla {
1618
static bool enable1V8LDO();
1719
static bool disableLDO();
1820
static bool enterShipMode();
21+
static uint8_t readLDOreg();
1922
static bool enableCharge(uint8_t mA = 20);
2023

2124
static RGBled leds;

0 commit comments

Comments
 (0)