Skip to content

Commit cd52924

Browse files
MiKfbraghiroli
authored andcommitted
Used a more sme conformed function to check if the button is pressed
1 parent 6dcf8f0 commit cd52924

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

hardware/AMEL/samd/libraries/SME_basic/examples/userButton/userButton.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ void setup() {
2222
// the loop function runs over and over again forever
2323
void loop() {
2424

25-
if (button1IsPressed()) {
25+
if (isButtonOnePressed()) {
2626
ledBlueLight(HIGH);
2727
} else {
2828
ledBlueLight(LOW);
2929
}
3030

31-
if (button2IsPressed()) {
31+
if (isButtonTwoPressed()) {
3232
ledRedLight(HIGH);
3333
} else {
3434
ledRedLight(LOW);

hardware/AMEL/samd/variants/AMEL_SmartEverything/variant.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,12 +333,12 @@ void ledBlueLight(uint32_t value) {
333333
}
334334
}
335335

336-
int button1IsPressed(void) {
336+
int isButtonOnePressed(void) {
337337
return !digitalRead(PIN_SME_BUTTON1);
338338
}
339339

340340

341-
int button2IsPressed(void) {
341+
int isButtonTwoPressed(void) {
342342
return !digitalRead(PIN_SME_BUTTON2);
343343
}
344344

hardware/AMEL/samd/variants/AMEL_SmartEverything/variant.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ void ledYellowTwoLight(uint32_t value);
218218
1 = button PRESSED
219219
0 = button RELEASED
220220
*/
221-
int button1IsPressed(void);
222-
int button2IsPressed(void);
221+
int isButtonOnePressed(void);
222+
int isButtonTwoPressed(void);
223223

224224

225225
/*

0 commit comments

Comments
 (0)