diff options
Diffstat (limited to 'quantum/quantum.h')
-rw-r--r-- | quantum/quantum.h | 57 |
1 files changed, 18 insertions, 39 deletions
diff --git a/quantum/quantum.h b/quantum/quantum.h index 7795294d5..ad180c71f 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h | |||
@@ -10,15 +10,6 @@ | |||
10 | #ifdef RGBLIGHT_ENABLE | 10 | #ifdef RGBLIGHT_ENABLE |
11 | #include "rgblight.h" | 11 | #include "rgblight.h" |
12 | #endif | 12 | #endif |
13 | #ifdef AUDIO_ENABLE | ||
14 | #include "audio.h" | ||
15 | #endif | ||
16 | #ifdef MIDI_ENABLE | ||
17 | #include <lufa.h> | ||
18 | #endif | ||
19 | #ifdef UNICODE_ENABLE | ||
20 | #include "unicode.h" | ||
21 | #endif | ||
22 | 13 | ||
23 | #include "action_layer.h" | 14 | #include "action_layer.h" |
24 | #include "eeconfig.h" | 15 | #include "eeconfig.h" |
@@ -32,42 +23,38 @@ | |||
32 | #include "led.h" | 23 | #include "led.h" |
33 | #include "action_util.h" | 24 | #include "action_util.h" |
34 | 25 | ||
26 | |||
35 | extern uint32_t default_layer_state; | 27 | extern uint32_t default_layer_state; |
36 | 28 | ||
37 | #ifndef NO_ACTION_LAYER | 29 | #ifndef NO_ACTION_LAYER |
38 | extern uint32_t layer_state; | 30 | extern uint32_t layer_state; |
39 | #endif | 31 | #endif |
40 | 32 | ||
33 | #ifdef MIDI_ENABLE | ||
34 | #include <lufa.h> | ||
35 | #include "process_midi.h" | ||
36 | #endif | ||
37 | |||
41 | #ifdef AUDIO_ENABLE | 38 | #ifdef AUDIO_ENABLE |
42 | bool music_activated; | 39 | #include "audio.h" |
40 | #include "process_music.h" | ||
43 | #endif | 41 | #endif |
44 | 42 | ||
45 | #ifdef UNICODE_ENABLE | 43 | #ifndef DISABLE_LEADER |
46 | #define UC_OSX 0 | 44 | #include "process_leader.h" |
47 | #define UC_LNX 1 | 45 | #endif |
48 | #define UC_WIN 2 | ||
49 | #define UC_BSD 3 | ||
50 | 46 | ||
51 | void set_unicode_input_mode(uint8_t os_target); | 47 | #define DISABLE_CHORDING |
48 | #ifndef DISABLE_CHORDING | ||
49 | #include "process_chording.h" | ||
52 | #endif | 50 | #endif |
53 | 51 | ||
54 | #ifndef DISABLE_LEADER | 52 | #ifdef UNICODE_ENABLE |
55 | void leader_start(void); | 53 | #include "process_unicode.h" |
56 | void leader_end(void); | ||
57 | |||
58 | #ifndef LEADER_TIMEOUT | ||
59 | #define LEADER_TIMEOUT 200 | ||
60 | #endif | ||
61 | #define SEQ_ONE_KEY(key) if (leader_sequence[0] == (key) && leader_sequence[1] == 0 && leader_sequence[2] == 0 && leader_sequence[3] == 0 && leader_sequence[4] == 0) | ||
62 | #define SEQ_TWO_KEYS(key1, key2) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == 0 && leader_sequence[3] == 0 && leader_sequence[4] == 0) | ||
63 | #define SEQ_THREE_KEYS(key1, key2, key3) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == (key3) && leader_sequence[3] == 0 && leader_sequence[4] == 0) | ||
64 | #define SEQ_FOUR_KEYS(key1, key2, key3, key4) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == (key3) && leader_sequence[3] == (key4) && leader_sequence[4] == 0) | ||
65 | #define SEQ_FIVE_KEYS(key1, key2, key3, key4, key5) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == (key3) && leader_sequence[3] == (key4) && leader_sequence[4] == (key5)) | ||
66 | |||
67 | #define LEADER_EXTERNS() extern bool leading; extern uint16_t leader_time; extern uint16_t leader_sequence[5]; extern uint8_t leader_sequence_size | ||
68 | #define LEADER_DICTIONARY() if (leading && timer_elapsed(leader_time) > LEADER_TIMEOUT) | ||
69 | #endif | 54 | #endif |
70 | 55 | ||
56 | #include "process_tap_dance.h" | ||
57 | |||
71 | #define SEND_STRING(str) send_string(PSTR(str)) | 58 | #define SEND_STRING(str) send_string(PSTR(str)) |
72 | void send_string(const char *str); | 59 | void send_string(const char *str); |
73 | 60 | ||
@@ -84,16 +71,8 @@ bool process_action_kb(keyrecord_t *record); | |||
84 | bool process_record_kb(uint16_t keycode, keyrecord_t *record); | 71 | bool process_record_kb(uint16_t keycode, keyrecord_t *record); |
85 | bool process_record_user(uint16_t keycode, keyrecord_t *record); | 72 | bool process_record_user(uint16_t keycode, keyrecord_t *record); |
86 | 73 | ||
87 | bool is_music_on(void); | ||
88 | void music_toggle(void); | ||
89 | void music_on(void); | ||
90 | void music_off(void); | ||
91 | |||
92 | void startup_user(void); | 74 | void startup_user(void); |
93 | void shutdown_user(void); | 75 | void shutdown_user(void); |
94 | void audio_on_user(void); | ||
95 | void music_on_user(void); | ||
96 | void music_scale_user(void); | ||
97 | 76 | ||
98 | #ifdef BACKLIGHT_ENABLE | 77 | #ifdef BACKLIGHT_ENABLE |
99 | void backlight_init_ports(void); | 78 | void backlight_init_ports(void); |