Skip to content

Commit e52e68d

Browse files
committed
Const-correctness.
1 parent e42eb9f commit e52e68d

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/PF1550.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ void PF1550::debug(Stream& stream)
5656
_control.debug(stream);
5757
}
5858

59-
void PF1550::setPMICbit(Register const reg_addr, uint8_t posBit)
59+
void PF1550::setPMICbit(Register const reg_addr, uint8_t const posBit)
6060
{
6161
_control.setBit(reg_addr, posBit);
6262
}
6363

64-
void PF1550::writePMICreg(Register const reg_addr, uint8_t val)
64+
void PF1550::writePMICreg(Register const reg_addr, uint8_t const val)
6565
{
6666
if (_debug) {
6767
_debug->print("PF1550::writePMICreg at address=");
@@ -146,9 +146,9 @@ void PF1550::configSw2(Sw2Voltage const sw2_volt,
146146
}
147147

148148
void PF1550::configCharger(IFastCharge const i_fast_charge,
149-
VFastCharge const v_fast_charge,
150-
IEndOfCharge const i_end_of_charge,
151-
IInputCurrentLimit const i_input_current_limit)
149+
VFastCharge const v_fast_charge,
150+
IEndOfCharge const i_end_of_charge,
151+
IInputCurrentLimit const i_input_current_limit)
152152
{
153153
_control.setFastChargeCurrent (i_fast_charge);
154154
_control.setFastChargeVoltage (v_fast_charge);

src/PF1550.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
/******************************************************************************
2525
INCLUDE
2626
******************************************************************************/
27-
#include "Arduino.h"
27+
28+
#include <Arduino.h>
29+
2830
#include "PF1550/PF1550_IO.h"
2931
#include "PF1550/PF1550_Types.h"
3032
#include "PF1550/PF1550_Control.h"
@@ -34,7 +36,7 @@
3436
EXTERN DECLARATION
3537
******************************************************************************/
3638

37-
class PF1550; /* Forward declaration of class PF1550 */
39+
class PF1550;
3840
extern PF1550 PMIC;
3941

4042
/******************************************************************************
@@ -51,8 +53,8 @@ class PF1550
5153

5254
void debug(Stream& stream);
5355

54-
void setPMICbit(Register const reg_addr, uint8_t posBit);
55-
void writePMICreg(Register const reg_addr, uint8_t val);
56+
void setPMICbit(Register const reg_addr, uint8_t const posBit);
57+
void writePMICreg(Register const reg_addr, uint8_t const val);
5658
uint8_t readPMICreg(Register const reg_addr);
5759

5860
void configLDO1(Ldo1Voltage const ldo_1_volt, bool const enable, bool const enable_in_standby, bool const enable_in_sleep);
@@ -77,12 +79,10 @@ class PF1550
7779
/* Actual PMIC event ISR handler with access to member variables */
7880
inline void onPMICEvent() { _control.onPMICEvent(); }
7981

80-
private:
8182

83+
private:
8284
PF1550_Control _control;
83-
8485
Stream* _debug;
85-
8686
};
8787

8888
#endif /* ARDUINO_PF1550_H_ */

0 commit comments

Comments
 (0)