]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - quantum/fauxclicky.h
Move Atreus50 to hardwired directory and update README
[qmk_firmware.git] / quantum / fauxclicky.h
index 6cfc291c051915e016ff0b01bcb88c840a769bb3..109bd0d83eb83621f297b1210571c12038e2cbb8 100644 (file)
@@ -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
 //