diff options
Diffstat (limited to 'keyboards/input_club')
-rw-r--r-- | keyboards/input_club/ergodox_infinity/config.h | 4 | ||||
-rw-r--r-- | keyboards/input_club/ergodox_infinity/info.json | 3 | ||||
-rw-r--r-- | keyboards/input_club/infinity60/led.c | 52 | ||||
-rw-r--r-- | keyboards/input_club/infinity60/led_controller.c | 5 | ||||
-rw-r--r-- | keyboards/input_club/infinity60/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/input_club/k_type/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/input_club/whitefox/rules.mk | 2 |
7 files changed, 34 insertions, 36 deletions
diff --git a/keyboards/input_club/ergodox_infinity/config.h b/keyboards/input_club/ergodox_infinity/config.h index 6d642e5d45..7db6119a1c 100644 --- a/keyboards/input_club/ergodox_infinity/config.h +++ b/keyboards/input_club/ergodox_infinity/config.h @@ -23,10 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MOUSEKEY_MAX_SPEED 7 #define MOUSEKEY_WHEEL_DELAY 0 -#define TAPPING_TOGGLE 1 - -#define TAPPING_TERM 200 - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/input_club/ergodox_infinity/info.json b/keyboards/input_club/ergodox_infinity/info.json index ca6aa92b5d..e3e0399bed 100644 --- a/keyboards/input_club/ergodox_infinity/info.json +++ b/keyboards/input_club/ergodox_infinity/info.json @@ -17,6 +17,9 @@ "processor": "MK20DX256", "bootloader": "kiibohd", "board": "IC_TEENSY_3_1", + "tapping": { + "toggle": 1 + }, "community_layouts": ["ergodox"], "layouts": { "LAYOUT_ergodox": { diff --git a/keyboards/input_club/infinity60/led.c b/keyboards/input_club/infinity60/led.c index 8effcea81a..33871bcc49 100644 --- a/keyboards/input_club/infinity60/led.c +++ b/keyboards/input_club/infinity60/led.c @@ -26,29 +26,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * both regular threads and ISRs, unlocked (during resume-from-sleep). * In particular, I2C functions (interrupt-driven) should NOT be called from here. */ -void led_set(uint8_t usb_led) { - msg_t msg; - - if (usb_led & (1<<USB_LED_NUM_LOCK)) { - chSysUnconditionalLock(); - msg=(1 << 8) | TOGGLE_NUM_LOCK; - chMBPostI(&led_mailbox, msg); - chSysUnconditionalUnlock(); - } else { - chSysUnconditionalLock(); - msg=(0 << 8) | TOGGLE_NUM_LOCK; - chMBPostI(&led_mailbox, msg); - chSysUnconditionalUnlock(); - } - if (usb_led & (1<<USB_LED_CAPS_LOCK)) { - chSysUnconditionalLock(); - msg=(1 << 8) | TOGGLE_CAPS_LOCK; - chMBPostI(&led_mailbox, msg); - chSysUnconditionalUnlock(); - } else { - chSysUnconditionalLock(); - msg=(0 << 8) | TOGGLE_CAPS_LOCK; - chMBPostI(&led_mailbox, msg); - chSysUnconditionalUnlock(); +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + msg_t msg; + + if (led_state.num_lock) { + chSysUnconditionalLock(); + msg=(1 << 8) | TOGGLE_NUM_LOCK; + chMBPostI(&led_mailbox, msg); + chSysUnconditionalUnlock(); + } else { + chSysUnconditionalLock(); + msg=(0 << 8) | TOGGLE_NUM_LOCK; + chMBPostI(&led_mailbox, msg); + chSysUnconditionalUnlock(); + } + if (led_state.caps_lock) { + chSysUnconditionalLock(); + msg=(1 << 8) | TOGGLE_CAPS_LOCK; + chMBPostI(&led_mailbox, msg); + chSysUnconditionalUnlock(); + } else { + chSysUnconditionalLock(); + msg=(0 << 8) | TOGGLE_CAPS_LOCK; + chMBPostI(&led_mailbox, msg); + chSysUnconditionalUnlock(); + } } + return false; } diff --git a/keyboards/input_club/infinity60/led_controller.c b/keyboards/input_club/infinity60/led_controller.c index cf3edf20dd..5ea0ae804c 100644 --- a/keyboards/input_club/infinity60/led_controller.c +++ b/keyboards/input_club/infinity60/led_controller.c @@ -187,8 +187,9 @@ static THD_FUNCTION(LEDthread, arg) { // initialize persistent variables pwm_step_status = 4; //full brightness page_status = 0; //start frame 0 (all off/on) - numlock_status = (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? 1 : 0; - capslock_status = (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? 1 : 0; + led_t led_state = host_keyboard_led_state(); + numlock_status = led_state.num_lock ? 1 : 0; + capslock_status = led_state.caps_lock ? 1 : 0; while(true) { // wait for a message (asynchronous) diff --git a/keyboards/input_club/infinity60/rules.mk b/keyboards/input_club/infinity60/rules.mk index e47069dac9..5f885e1194 100644 --- a/keyboards/input_club/infinity60/rules.mk +++ b/keyboards/input_club/infinity60/rules.mk @@ -13,5 +13,3 @@ AUDIO_ENABLE = no # Audio output DEFAULT_FOLDER = input_club/infinity60/led -# Enter lower-power sleep mode when on the ChibiOS idle thread -OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/input_club/k_type/rules.mk b/keyboards/input_club/k_type/rules.mk index 450eb9a023..d7776bb755 100644 --- a/keyboards/input_club/k_type/rules.mk +++ b/keyboards/input_club/k_type/rules.mk @@ -18,5 +18,3 @@ RGB_MATRIX_ENABLE = no SRC += k_type-rgbdriver.c QUANTUM_LIB_SRC += i2c_master.c is31fl3733-dual.c -# Enter lower-power sleep mode when on the ChibiOS idle thread -OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/input_club/whitefox/rules.mk b/keyboards/input_club/whitefox/rules.mk index 9b9b2ed739..821041ea83 100644 --- a/keyboards/input_club/whitefox/rules.mk +++ b/keyboards/input_club/whitefox/rules.mk @@ -12,5 +12,3 @@ AUDIO_ENABLE = no # Audio output LED_MATRIX_ENABLE = yes -# Enter lower-power sleep mode when on the ChibiOS idle thread -OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE |