diff options
Diffstat (limited to 'users/xulkal')
| -rw-r--r-- | users/xulkal/custom_tap_dance.c | 1 | ||||
| -rw-r--r-- | users/xulkal/layouts.h | 2 | ||||
| -rw-r--r-- | users/xulkal/process_records.c | 3 | ||||
| -rw-r--r-- | users/xulkal/rules.mk | 3 | ||||
| -rw-r--r-- | users/xulkal/timer_utils.c | 12 | ||||
| -rw-r--r-- | users/xulkal/timer_utils.h | 6 | ||||
| -rw-r--r-- | users/xulkal/xulkal.h | 1 |
7 files changed, 3 insertions, 25 deletions
diff --git a/users/xulkal/custom_tap_dance.c b/users/xulkal/custom_tap_dance.c index e0f90ea11..2c5d145f1 100644 --- a/users/xulkal/custom_tap_dance.c +++ b/users/xulkal/custom_tap_dance.c | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | #include "custom_tap_dance.h" | 1 | #include "custom_tap_dance.h" |
| 2 | #include "custom_keycodes.h" | 2 | #include "custom_keycodes.h" |
| 3 | #include "timer_utils.h" | ||
| 4 | 3 | ||
| 5 | #ifdef TAP_DANCE_ENABLE | 4 | #ifdef TAP_DANCE_ENABLE |
| 6 | 5 | ||
diff --git a/users/xulkal/layouts.h b/users/xulkal/layouts.h index 89bdfb60d..d4b708418 100644 --- a/users/xulkal/layouts.h +++ b/users/xulkal/layouts.h | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | #define _________________QWERTY_L2_________________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T | 18 | #define _________________QWERTY_L2_________________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T |
| 19 | #define _________________QWERTY_L3_________________ RIS_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G | 19 | #define _________________QWERTY_L3_________________ RIS_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G |
| 20 | #define _________________QWERTY_L4_________________ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B | 20 | #define _________________QWERTY_L4_________________ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B |
| 21 | #define _________________QWERTY_L5_________________ KC_LCPO, KC_LGUI, LOWER, RAISE, KC_LALT, KC_SPC | 21 | #define _________________QWERTY_L5_________________ KC_LCPO, KC_LGUI, KC_LALT, LOWER, RAISE, KC_SPC |
| 22 | 22 | ||
| 23 | #define _________________QWERTY_R1_________________ KC_6, KC_7, KC_8, KC_9, KC_0, TD_BSPC | 23 | #define _________________QWERTY_R1_________________ KC_6, KC_7, KC_8, KC_9, KC_0, TD_BSPC |
| 24 | #define _________________QWERTY_R2_________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS | 24 | #define _________________QWERTY_R2_________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS |
diff --git a/users/xulkal/process_records.c b/users/xulkal/process_records.c index 245d4955f..9c0274823 100644 --- a/users/xulkal/process_records.c +++ b/users/xulkal/process_records.c | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | #include "process_records.h" | 1 | #include "process_records.h" |
| 2 | #include "custom_keycodes.h" | 2 | #include "custom_keycodes.h" |
| 3 | #include "timer_utils.h" | ||
| 4 | 3 | ||
| 5 | #ifdef RGB_ENABLE | 4 | #ifdef RGB_ENABLE |
| 6 | #include "custom_rgb.h" | 5 | #include "custom_rgb.h" |
| @@ -34,7 +33,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) | |||
| 34 | { | 33 | { |
| 35 | if (record->event.pressed) | 34 | if (record->event.pressed) |
| 36 | reset_timer = timer_read() + 500; | 35 | reset_timer = timer_read() + 500; |
| 37 | else if (timer_expired(reset_timer)) | 36 | else if (timer_expired(timer_read(), reset_timer)) |
| 38 | reset_keyboard(); | 37 | reset_keyboard(); |
| 39 | } | 38 | } |
| 40 | return false; | 39 | return false; |
diff --git a/users/xulkal/rules.mk b/users/xulkal/rules.mk index c3834ff5f..8f8365ea7 100644 --- a/users/xulkal/rules.mk +++ b/users/xulkal/rules.mk | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | SRC += xulkal.c \ | 1 | SRC += xulkal.c \ |
| 2 | process_records.c \ | 2 | process_records.c \ |
| 3 | custom_tap_dance.c \ | 3 | custom_tap_dance.c |
| 4 | timer_utils.c | ||
| 5 | 4 | ||
| 6 | # Some usual defaults | 5 | # Some usual defaults |
| 7 | MOUSEKEY_ENABLE = no # Mouse keys (+4700) | 6 | MOUSEKEY_ENABLE = no # Mouse keys (+4700) |
diff --git a/users/xulkal/timer_utils.c b/users/xulkal/timer_utils.c deleted file mode 100644 index 5f5d9a1eb..000000000 --- a/users/xulkal/timer_utils.c +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | #include "timer_utils.h" | ||
| 2 | |||
| 3 | bool timer_expired(uint16_t last) | ||
| 4 | { | ||
| 5 | return timer_read() - last < 0x8000; | ||
| 6 | } | ||
| 7 | |||
| 8 | bool timer_expired32(uint32_t last) | ||
| 9 | { | ||
| 10 | return timer_read32() - last < 0x80000000; | ||
| 11 | } | ||
| 12 | |||
diff --git a/users/xulkal/timer_utils.h b/users/xulkal/timer_utils.h deleted file mode 100644 index 7e2a0b74d..000000000 --- a/users/xulkal/timer_utils.h +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | #pragma once | ||
| 2 | #include "timer.h" | ||
| 3 | #include <stdbool.h> | ||
| 4 | |||
| 5 | bool timer_expired(uint16_t last); | ||
| 6 | bool timer_expired32(uint32_t last); | ||
diff --git a/users/xulkal/xulkal.h b/users/xulkal/xulkal.h index 9bc83b7de..32df8df0c 100644 --- a/users/xulkal/xulkal.h +++ b/users/xulkal/xulkal.h | |||
| @@ -2,6 +2,5 @@ | |||
| 2 | 2 | ||
| 3 | #include "process_records.h" | 3 | #include "process_records.h" |
| 4 | #include "layouts.h" | 4 | #include "layouts.h" |
| 5 | #include "timer_utils.h" | ||
| 6 | #include "custom_keycodes.h" | 5 | #include "custom_keycodes.h" |
| 7 | #include "custom_tap_dance.h" | 6 | #include "custom_tap_dance.h" |
