Skip to content

Commit f7f6a29

Browse files
authored
Add files via upload
1 parent 0edf680 commit f7f6a29

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

avdweb_Switch.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ WEBSITE: http://www.avdweb.nl/arduino/hardware-interfacing/simple-switch-debounc
2121
1.2.1 30-11-2018 bugfix. Initialize time variables in the constructor. Fixes false event if first call to poll was delayed
2222
1.2.2 18-10-2019 beep when a switch is pressed with using a setBeepAllCallback function
2323
1.2.3 03-04-2020 made public: deglitchPeriod, debouncePeriod, longPressPeriod, doubleClickPeriod
24+
1.2.4 14-07-2021 "static switchCallback_t _beepAllCallback = nullptr;" gives error with SAMD21, removed "= nullptr;"
2425
2526
..........................................DEGLITCHING..............................
2627

avdweb_Switch.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,16 @@ class Switch
5858
switchCallback_t _longPressCallback = nullptr;
5959
switchCallback_t _doubleClickCallback = nullptr;
6060
switchCallback_t _singleClickCallback = nullptr;
61-
static switchCallback_t _beepAllCallback = nullptr; // static function pointer, can be used by all objects
61+
static switchCallback_t _beepAllCallback; // static function pointer, can be used by all objects
62+
//static switchCallback_t _beepAllCallback = nullptr; // gives error with SAMD21
6263
//static void(*_beepAllCallback)(void*) = nullptr; // static function pointer without typedef
6364

6465
void* _pushedCallbackParam = nullptr;
6566
void* _releasedCallbackParam = nullptr;
6667
void* _longPressCallbackParam = nullptr;
6768
void* _doubleClickCallbackParam = nullptr;
6869
void* _singleClickCallbackParam = nullptr;
69-
static void* _beepAllCallbackParam = nullptr; // can be used by all objects
70+
static void* _beepAllCallbackParam; // can be used by all objects
71+
//static void* _beepAllCallbackParam = nullptr; // gives error with SAMD21
7072
};
7173
#endif

0 commit comments

Comments
 (0)