aboutsummaryrefslogtreecommitdiff
path: root/quantum/fauxclicky.h
diff options
context:
space:
mode:
authorPriyadi Iman Nurcahyo <priyadi@priyadi.net>2017-02-13 14:55:35 +0700
committerPriyadi Iman Nurcahyo <priyadi@priyadi.net>2017-02-13 14:55:35 +0700
commit8c93c5d9ab8a0a69d84f707db71f417b66402693 (patch)
tree47f9577431d21f7c54ed8ff0d68e77f4a42123a9 /quantum/fauxclicky.h
parentc68e596f32c5d450a714627871408407e9988ef7 (diff)
downloadqmk_firmware-8c93c5d9ab8a0a69d84f707db71f417b66402693.tar.gz
qmk_firmware-8c93c5d9ab8a0a69d84f707db71f417b66402693.zip
Add keycodes to turn on, turn off and toggle faux clicky
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/>.
18#endif 18#endif
19 19
20#include "musical_notes.h" 20#include "musical_notes.h"
21#include "stdbool.h"
21 22
22__attribute__ ((weak)) 23__attribute__ ((weak))
23float fauxclicky_pressed_note[2]; 24float fauxclicky_pressed_note[2];
@@ -26,6 +27,8 @@ float fauxclicky_released_note[2];
26__attribute__ ((weak)) 27__attribute__ ((weak))
27float fauxclicky_beep_note[2]; 28float fauxclicky_beep_note[2];
28 29
30bool fauxclicky_enabled;
31
29// 32//
30// tempo in BPM 33// tempo in BPM
31// 34//
@@ -52,6 +55,15 @@ float fauxclicky_beep_note[2];
52 fauxclicky_stop(); \ 55 fauxclicky_stop(); \
53} while (0) 56} while (0)
54 57
58// toggle
59#define FAUXCLICKY_TOGGLE do { \
60 if (fauxclicky_enabled) { \
61 FAUXCLICKY_OFF; \
62 } else { \
63 FAUXCLICKY_ON; \
64 } \
65} while (0)
66
55// 67//
56// pin configuration 68// pin configuration
57// 69//