summaryrefslogtreecommitdiffstats
path: root/quantum/fauxclicky.h
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/fauxclicky.h')
-rw-r--r--quantum/fauxclicky.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/quantum/fauxclicky.h b/quantum/fauxclicky.h
index 6cfc291c0..109bd0d83 100644
--- a/quantum/fauxclicky.h
+++ b/quantum/fauxclicky.h
@@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif
#include "musical_notes.h"
+#include "stdbool.h"
__attribute__ ((weak))
float fauxclicky_pressed_note[2];
@@ -26,6 +27,8 @@ float fauxclicky_released_note[2];
__attribute__ ((weak))
float fauxclicky_beep_note[2];
+bool fauxclicky_enabled;
+
//
// tempo in BPM
//
@@ -52,6 +55,15 @@ float fauxclicky_beep_note[2];
fauxclicky_stop(); \
} while (0)
+// toggle
+#define FAUXCLICKY_TOGGLE do { \
+ if (fauxclicky_enabled) { \
+ FAUXCLICKY_OFF; \
+ } else { \
+ FAUXCLICKY_ON; \
+ } \
+} while (0)
+
//
// pin configuration
//