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 () {
1010 if (!OPAMP.begin (OPAMP_SPEED_HIGHSPEED)) {
1111 Serial.println (" Failed to start OPAMP!" );
1212 }
13- bool isRunning = OPAMP.isRunning (0 );
13+ bool const isRunning = OPAMP.isRunning (0 );
1414 if (isRunning) {
1515 Serial.println (" OPAMP running on channel 0!" );
1616 } else {
Original file line number Diff line number Diff line change @@ -81,11 +81,13 @@ bool OpampClass::begin() {
8181 return this ->begin (OPAMP_SPEED_HIGHSPEED);
8282}
8383
84- bool OpampClass::begin (OpampSpeedMode speed) {
84+ bool OpampClass::begin (OpampSpeedMode const speed) {
85+
8586 return this ->begin (1u << ARDUINO_UNO_R4_DEFAULT_OPAMP_CHANNEL, speed);
8687}
8788
88- bool OpampClass::begin (uint8_t const channel_mask, OpampSpeedMode speed) {
89+ bool OpampClass::begin (uint8_t const channel_mask, OpampSpeedMode const speed) {
90+
8991 if (!initPins (channel_mask)) {
9092 return false ;
9193 }
Original file line number Diff line number Diff line change @@ -33,9 +33,11 @@ class OpampClass {
3333 /* startup the OPAMP on channel 0 in high-speed mode */
3434 bool begin ();
3535 /* startup the OPAMP on channel 0 with specific mode */
36- bool begin (OpampSpeedMode speed);
36+ bool begin (OpampSpeedMode const speed);
37+
3738 /* 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+
3941 /* stop all OPAMP channels */
4042 void end ();
4143 /* stop specific OPAMP channel(s) */
@@ -46,7 +48,8 @@ class OpampClass {
4648 /* initializes OPAMP pins for given channel(s) */
4749 bool initPins (uint8_t const channel_mask);
4850 /* 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+
5053};
5154
5255extern OpampClass OPAMP;
You can’t perform that action at this time.
0 commit comments