File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ void setup () {
10
10
if (!OPAMP.begin (OPAMP_SPEED_HIGHSPEED)) {
11
11
Serial.println (" Failed to start OPAMP!" );
12
12
}
13
- bool isRunning = OPAMP.isRunning (0 );
13
+ bool const isRunning = OPAMP.isRunning (0 );
14
14
if (isRunning) {
15
15
Serial.println (" OPAMP running on channel 0!" );
16
16
} else {
Original file line number Diff line number Diff line change @@ -81,11 +81,13 @@ bool OpampClass::begin() {
81
81
return this ->begin (OPAMP_SPEED_HIGHSPEED);
82
82
}
83
83
84
- bool OpampClass::begin (OpampSpeedMode speed) {
84
+ bool OpampClass::begin (OpampSpeedMode const speed) {
85
+
85
86
return this ->begin (1u << ARDUINO_UNO_R4_DEFAULT_OPAMP_CHANNEL, speed);
86
87
}
87
88
88
- bool OpampClass::begin (uint8_t const channel_mask, OpampSpeedMode speed) {
89
+ bool OpampClass::begin (uint8_t const channel_mask, OpampSpeedMode const speed) {
90
+
89
91
if (!initPins (channel_mask)) {
90
92
return false ;
91
93
}
Original file line number Diff line number Diff line change @@ -33,9 +33,11 @@ class OpampClass {
33
33
/* startup the OPAMP on channel 0 in high-speed mode */
34
34
bool begin ();
35
35
/* startup the OPAMP on channel 0 with specific mode */
36
- bool begin (OpampSpeedMode speed);
36
+ bool begin (OpampSpeedMode const speed);
37
+
37
38
/* startup the OPAMP with arbitrary channel mask */
38
- bool begin (uint8_t const channel_mask, OpampSpeedMode speed);
39
+ bool begin (uint8_t const channel_mask, OpampSpeedMode const speed);
40
+
39
41
/* stop all OPAMP channels */
40
42
void end ();
41
43
/* stop specific OPAMP channel(s) */
@@ -46,7 +48,8 @@ class OpampClass {
46
48
/* initializes OPAMP pins for given channel(s) */
47
49
bool initPins (uint8_t const channel_mask);
48
50
/* activates OPAMP for given speed and channel(s) */
49
- void initOpamp (OpampSpeedMode speed, uint8_t const channel_mask);
51
+ void initOpamp (OpampSpeedMode const speed, uint8_t const channel_mask);
52
+
50
53
};
51
54
52
55
extern OpampClass OPAMP;
You can’t perform that action at this time.
0 commit comments