File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
libraries/Nicla_System/src Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 10
10
// When VIN > VUVLO this enables charging.
11
11
static mbed::DigitalOut cd (p25, 0 );
12
12
13
- uint8_t BQ25120A::getStatus ()
13
+ uint8_t BQ25120A::getStatusRegister ()
14
14
{
15
- uint8_t c = readByte (BQ25120A_ADDRESS, BQ25120A_STATUS); // Read PRODUCT_ID register for BQ25120A
16
- return c;
15
+ return readByte (BQ25120A_ADDRESS, BQ25120A_STATUS);
17
16
}
18
17
19
18
void BQ25120A::writeByte (uint8_t address, uint8_t subAddress, uint8_t data)
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class BQ25120A
25
25
public:
26
26
BQ25120A () {};
27
27
28
- uint8_t getStatus ();
28
+ uint8_t getStatusRegister ();
29
29
void writeByte (uint8_t address, uint8_t subAddress, uint8_t data);
30
30
uint8_t readByte (uint8_t address, uint8_t subAddress);
31
31
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ bool nicla::enterShipMode()
98
98
// | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 |
99
99
// | RO | RO | EN_SHIPMODE | RO | RO | RO | RO | RO |
100
100
101
- uint8_t status_reg = _pmic.getStatus ();
101
+ uint8_t status_reg = _pmic.getStatusRegister ();
102
102
status_reg |= 0x20 ;
103
103
_pmic.writeByte (BQ25120A_ADDRESS, BQ25120A_STATUS, status_reg);
104
104
}
@@ -322,7 +322,7 @@ uint8_t nicla::getBatteryTemperature() {
322
322
323
323
OperatingStatus nicla::getOperatingStatus () {
324
324
// Extract bits 6 and 7
325
- uint8_t status = _pmic.getStatus () >> 6 & 0b11 ;
325
+ uint8_t status = _pmic.getStatusRegister () >> 6 & 0b11 ;
326
326
return static_cast <OperatingStatus>(status);
327
327
}
328
328
You can’t perform that action at this time.
0 commit comments