diff options
Diffstat (limited to 'keyboards')
356 files changed, 6087 insertions, 6497 deletions
diff --git a/keyboards/40percentclub/25/rules.mk b/keyboards/40percentclub/25/rules.mk index d018039571..8d32d2c3fb 100644 --- a/keyboards/40percentclub/25/rules.mk +++ b/keyboards/40percentclub/25/rules.mk @@ -32,5 +32,3 @@ AUDIO_ENABLE = no # Audio output on port C6 # Enable generic behavior for split boards SPLIT_KEYBOARD = yes - -LAYOUTS = ortho_5x5 ortho_5x10 diff --git a/keyboards/40percentclub/4x4/rules.mk b/keyboards/40percentclub/4x4/rules.mk index 91b609103e..f51e98ff3b 100644 --- a/keyboards/40percentclub/4x4/rules.mk +++ b/keyboards/40percentclub/4x4/rules.mk @@ -29,7 +29,7 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -LAYOUTS = ortho_4x4 ortho_4x8 ortho_4x12 ortho_4x16 +LAYOUTS = ortho_4x4 ortho_4x12 # Disable unsupported hardware RGBLIGHT_SUPPORTED = no diff --git a/keyboards/40percentclub/5x5/rules.mk b/keyboards/40percentclub/5x5/rules.mk index ae36f660e9..97c63a856b 100644 --- a/keyboards/40percentclub/5x5/rules.mk +++ b/keyboards/40percentclub/5x5/rules.mk @@ -29,4 +29,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -LAYOUTS = ortho_5x5 ortho_5x10 ortho_5x15 +LAYOUTS = ortho_5x15 diff --git a/keyboards/40percentclub/nori/rules.mk b/keyboards/40percentclub/nori/rules.mk index 1b9766581a..3056c606c8 100644 --- a/keyboards/40percentclub/nori/rules.mk +++ b/keyboards/40percentclub/nori/rules.mk @@ -30,7 +30,7 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -LAYOUTS = ortho_4x4 ortho_4x8 ortho_4x12 +LAYOUTS = ortho_4x4 ortho_4x12 # Disable unsupported hardware AUDIO_SUPPORTED = no diff --git a/keyboards/9key/rules.mk b/keyboards/9key/rules.mk index b6c0c73be9..d16c096768 100644 --- a/keyboards/9key/rules.mk +++ b/keyboards/9key/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = yes TAP_DANCE_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/abacus/keymaps/unicodemap/keymap.c b/keyboards/abacus/keymaps/unicodemap/keymap.c index 8a2a33889b..c31b268ca2 100644 --- a/keyboards/abacus/keymaps/unicodemap/keymap.c +++ b/keyboards/abacus/keymaps/unicodemap/keymap.c @@ -108,7 +108,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if(active) { @@ -125,6 +125,7 @@ void dip_switch_update_user(uint8_t index, bool active) { } } } + return true; } diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/keymap.c b/keyboards/anavi/macropad8/keymaps/default/config.h index 037f59af85..dd687cad58 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/default/config.h @@ -1,4 +1,4 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> +/* Copyright 2021 QMK * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,4 +14,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -// placeholder +#pragma once + +#define LAYER_STATE_8BIT diff --git a/keyboards/barracuda/rules.mk b/keyboards/barracuda/rules.mk index 7233e7c00f..09a21e9e0b 100644 --- a/keyboards/barracuda/rules.mk +++ b/keyboards/barracuda/rules.mk @@ -20,5 +20,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output - -LAYOUTS = ortho_3x11 diff --git a/keyboards/basekeys/trifecta/config.h b/keyboards/basekeys/trifecta/config.h index 8a95291260..28c9c18fb2 100644 --- a/keyboards/basekeys/trifecta/config.h +++ b/keyboards/basekeys/trifecta/config.h @@ -80,11 +80,11 @@ # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -//# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +//# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. # define RGB_MATRIX_HUE_STEP 8 # define RGB_MATRIX_SAT_STEP 8 # define RGB_MATRIX_VAL_STEP 8 diff --git a/keyboards/bm40hsrgb/config.h b/keyboards/bm40hsrgb/config.h index 167a5667a4..8ef9a78c7d 100755 --- a/keyboards/bm40hsrgb/config.h +++ b/keyboards/bm40hsrgb/config.h @@ -50,6 +50,6 @@ #ifdef RGB_DI_PIN #define RGB_MATRIX_KEYPRESSES // reacts to keypresses #endif -#ifndef RGB_DISABLE_WHEN_USB_SUSPENDED -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#ifdef RGB_MATRIX_ENABLE +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #endif diff --git a/keyboards/bm68rgb/keymaps/peepeetee/config.h b/keyboards/bm68rgb/keymaps/peepeetee/config.h index 53eebce7f2..aada255cd7 100644 --- a/keyboards/bm68rgb/keymaps/peepeetee/config.h +++ b/keyboards/bm68rgb/keymaps/peepeetee/config.h @@ -64,7 +64,7 @@ // #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation // #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended // #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) // #define RGBLIGHT_ANIMATIONS // Run RGB animations diff --git a/keyboards/boardsource/the_mark/config.h b/keyboards/boardsource/the_mark/config.h index 5888452ce4..9ca598b40e 100644 --- a/keyboards/boardsource/the_mark/config.h +++ b/keyboards/boardsource/the_mark/config.h @@ -59,7 +59,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DRIVER_LED_TOTAL 24 // Number of LEDs #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # ifndef RGB_DISABLE_WHEN_USB_SUSPENDED -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # endif #endif diff --git a/keyboards/bpiphany/frosty_flake/frosty_flake.h b/keyboards/bpiphany/frosty_flake/frosty_flake.h index cc870c277e..f4f69f1a3d 100644 --- a/keyboards/bpiphany/frosty_flake/frosty_flake.h +++ b/keyboards/bpiphany/frosty_flake/frosty_flake.h @@ -111,12 +111,26 @@ KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ -) LAYOUT_tkl( \ - KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ - KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ - KN2, KC_NO, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ - KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ -) +) \ +{ \ +/* 0 1 2 3 4 5 6 7 */ \ +/* A */ { KC_NO, KA1, KC_NO, KC_NO, KA4, KA5, KC_NO, KA7, }, \ +/* B */ { KB0, KB1, KB2, KB3, KB4, KC_NO, KB6, KB7, }, \ +/* C */ { KC0, KC_NO, KC_NO, KC_NO, KC_NO, KC5, KC6, KC7, }, \ +/* D */ { KD0, KD1, KD2, KD3, KD4, KD5, KC_NO, KD7, }, \ +/* E */ { KC_NO, KE1, KE2, KE3, KE4, KE5, KE6, KE7, }, \ +/* F */ { KF0, KF1, KF2, KF3, KF4, KF5, KF6, KF7, }, \ +/* G */ { KG0, KG1, KG2, KG3, KG4, KG5, KG6, KG7, }, \ +/* H */ { KC_NO, KH1, KH2, KH3, KH4, KH5, KH6, KH7, }, \ +/* I */ { KC_NO, KI1, KI2, KI3, KI4, KI5, KC_NO, KI7, }, \ +/* J */ { KC_NO, KJ1, KJ2, KJ3, KJ4, KJ5, KJ6, KJ7, }, \ +/* K */ { KK0, KC_NO, KC_NO, KC_NO, KK4, KC_NO, KK6, KC_NO, }, \ +/* L */ { KL0, KC_NO, KC_NO, KC_NO, KL4, KC_NO, KC_NO, KC_NO, }, \ +/* M */ { KC_NO, KC_NO, KC_NO, KM3, KC_NO, KC_NO, KC_NO, KC_NO, }, \ +/* N */ { KC_NO, KC_NO, KN2, KN3, KC_NO, KC_NO, KC_NO, KC_NO, }, \ +/* O */ { KO0, KC_NO, KC_NO, KC_NO, KO4, KC_NO, KO6, KO7, }, \ +/* P */ { KC_NO, KC_NO, KP2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, \ +/* Q */ { KC_NO, KC_NO, KC_NO, KC_NO, KQ4, KC_NO, KC_NO, KQ7, }, \ +/* R */ { KR0, KC_NO, KR2, KR3, KR4, KR5, KR6, KR7, }, \ +} diff --git a/keyboards/bpiphany/pegasushoof/2013/2013.h b/keyboards/bpiphany/pegasushoof/2013/2013.h index b3e911ab41..7a4d7f0b58 100644 --- a/keyboards/bpiphany/pegasushoof/2013/2013.h +++ b/keyboards/bpiphany/pegasushoof/2013/2013.h @@ -45,14 +45,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ KB2, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0 \ - ) LAYOUT( \ - KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ - KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ - KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ - KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ - KB2,KC_NO,KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ - KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0 \ - ) + ) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \ + /* 0 */ { KC_NO , KC_NO , KC0 , KC_NO , KC_NO , KF0 , KC_NO , KC_NO , KC_NO , KJ0 , KK0 , KC_NO , KM0 , KN0 , KO0 , KC_NO , KQ0 , KR0 }, \ + /* 1 */ { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KG1 , KH1 , KI1 , KJ1 , KK1 , KL1 , KM1 , KC_NO , KO1 , KP1 , KC_NO , KC_NO }, \ + /* 2 */ { KC_NO , KB2 , KC_NO , KD2 , KC_NO , KF2 , KG2 , KH2 , KI2 , KJ2 , KK2 , KL2 , KM2 , KC_NO , KO2 , KC_NO , KC_NO , KC_NO }, \ + /* 3 */ { KA3 , KB3 , KC_NO , KC_NO , KC_NO , KF3 , KG3 , KH3 , KI3 , KJ3 , KK3 , KL3 , KM3 , KC_NO , KO3 , KC_NO , KC_NO , KC_NO }, \ + /* 4 */ { KC_NO , KC_NO , KC4 , KC_NO , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , KM4 , KC_NO , KO4 , KP4 , KQ4 , KR4 }, \ + /* 5 */ { KC_NO , KC_NO , KC5 , KC_NO , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , KK5 , KL5 , KM5 , KN5 , KO5 , KP5 , KC_NO , KC_NO }, \ + /* 6 */ { KC_NO , KC_NO , KC6 , KC_NO , KC_NO , KF6 , KG6 , KC_NO , KI6 , KJ6 , KK6 , KL6 , KC_NO , KN6 , KO6 , KC_NO , KQ6 , KC_NO }, \ + /* 7 */ { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KF7 , KG7 , KH7 , KI7 , KJ7 , KK7 , KL7 , KM7 , KN7 , KC_NO , KP7 , KC_NO , KC_NO } \ + } #define LAYOUT_tkl_jis( \ KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ diff --git a/keyboards/bpiphany/pegasushoof/2015/2015.h b/keyboards/bpiphany/pegasushoof/2015/2015.h index 8a0084d405..418772aa28 100644 --- a/keyboards/bpiphany/pegasushoof/2015/2015.h +++ b/keyboards/bpiphany/pegasushoof/2015/2015.h @@ -47,14 +47,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ - ) LAYOUT( \ - KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ - KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ - KN2,KC_NO,KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ - KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ - ) + ) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \ + /* 0 */ { ___ , KB0 , KC0 , KD0 , ___ , KF0 , KG0 , ___ , ___ , ___ , KK0 , KL0 , ___ , ___ , KO0 , ___ , ___ , KR0 }, \ + /* 1 */ { KA1 , KB1 , ___ , KD1 , KE1 , KF1 , KG1 , KH1 , KI1 , KJ1 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ }, \ + /* 2 */ { ___ , KB2 , ___ , KD2 , KE2 , KF2 , KG2 , KH2 , KI2 , KJ2 , ___ , ___ , ___ , KN2 , ___ , KP2 , ___ , KR2 }, \ + /* 3 */ { ___ , KB3 , ___ , KD3 , KE3 , KF3 , KG3 , KH3 , KI3 , KJ3 , ___ , ___ , KM3 , KN3 , ___ , ___ , ___ , KR3 }, \ + /* 4 */ { KA4 , KB4 , ___ , KD4 , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , ___ , ___ , KO4 , ___ , KQ4 , KR4 }, \ + /* 5 */ { KA5 , ___ , KC5 , KD5 , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , KR5 }, \ + /* 6 */ { ___ , KB6 , KC6 , ___ , KE6 , KF6 , KG6 , KH6 , ___ , KJ6 , KK6 , ___ , ___ , ___ , KO6 , ___ , ___ , KR6 }, \ + /* 7 */ { KA7 , KB7 , KC7 , KD7 , KE7 , KF7 , KG7 , KH7 , KI7 , KJ7 , ___ , ___ , ___ , ___ , KO7 , ___ , KQ7 , KR7 } \ + } #define LAYOUT_tkl_iso( \ KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ @@ -63,14 +65,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB3, KB1, \ KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ - ) LAYOUT( \ - KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ - KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ - KN2, KI6 ,KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ - KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ - ) + ) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \ + /* 0 */ { ___ , KB0 , KC0 , KD0 , ___ , KF0 , KG0 , ___ , ___ , ___ , KK0 , KL0 , ___ , ___ , KO0 , ___ , ___ , KR0 }, \ + /* 1 */ { KA1 , KB1 , ___ , KD1 , KE1 , KF1 , KG1 , KH1 , KI1 , KJ1 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ }, \ + /* 2 */ { ___ , KB2 , ___ , KD2 , KE2 , KF2 , KG2 , KH2 , KI2 , KJ2 , ___ , ___ , ___ , KN2 , ___ , KP2 , ___ , KR2 }, \ + /* 3 */ { ___ , KB3 , ___ , KD3 , KE3 , KF3 , KG3 , KH3 , KI3 , KJ3 , ___ , ___ , KM3 , KN3 , ___ , ___ , ___ , KR3 }, \ + /* 4 */ { KA4 , KB4 , ___ , KD4 , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , ___ , ___ , KO4 , ___ , KQ4 , KR4 }, \ + /* 5 */ { KA5 , ___ , KC5 , KD5 , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , KR5 }, \ + /* 6 */ { ___ , KB6 , KC6 , ___ , KE6 , KF6 , KG6 , KH6 , KI6 , KJ6 , KK6 , ___ , ___ , ___ , KO6 , ___ , ___ , KR6 }, \ + /* 7 */ { KA7 , KB7 , KC7 , KD7 , KE7 , KF7 , KG7 , KH7 , KI7 , KJ7 , ___ , ___ , ___ , ___ , KO7 , ___ , KQ7 , KR7 } \ + } #define LAYOUT_tkl_jis( \ KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ diff --git a/keyboards/checkerboards/nop60/info.json b/keyboards/checkerboards/nop60/info.json index 82ff7229fa..66e7706349 100644 --- a/keyboards/checkerboards/nop60/info.json +++ b/keyboards/checkerboards/nop60/info.json @@ -1,15 +1,143 @@ { "keyboard_name": "nop60", - "url": "", "maintainer": "nasp", - "width": 15, "height": 5, + "width": 15, + "url": "", "layouts": { "LAYOUT": { - "2x3u": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Bksp", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":3}, {"x":7, "y":4}, {"x":8, "y":4, "w":3}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "!", "x": 1, "y": 0 }, + { "label": "@", "x": 2, "y": 0 }, + { "label": "#", "x": 3, "y": 0 }, + { "label": "$", "x": 4, "y": 0 }, + { "label": "%", "x": 5, "y": 0 }, + { "label": "^", "x": 6, "y": 0 }, + { "label": "&", "x": 7, "y": 0 }, + { "label": "*", "x": 8, "y": 0 }, + { "label": "(", "x": 9, "y": 0 }, + { "label": ")", "x": 10, "y": 0 }, + { "label": "_", "x": 11, "y": 0 }, + { "label": "+", "x": 12, "y": 0 }, + { "label": "~", "x": 13, "y": 0 }, + { "label": "Bksp", "x": 14, "y": 0 }, + { "label": "Tab", "w": 1.5, "x": 0, "y": 1 }, + { "label": "Q", "x": 1.5, "y": 1 }, + { "label": "W", "x": 2.5, "y": 1 }, + { "label": "E", "x": 3.5, "y": 1 }, + { "label": "R", "x": 4.5, "y": 1 }, + { "label": "T", "x": 5.5, "y": 1 }, + { "label": "Y", "x": 6.5, "y": 1 }, + { "label": "U", "x": 7.5, "y": 1 }, + { "label": "I", "x": 8.5, "y": 1 }, + { "label": "O", "x": 9.5, "y": 1 }, + { "label": "P", "x": 10.5, "y": 1 }, + { "label": "{", "x": 11.5, "y": 1 }, + { "label": "}", "x": 12.5, "y": 1 }, + { "label": "|", "w": 1.5, "x": 13.5, "y": 1 }, + { "label": "Caps Lock", "w": 1.75, "x": 0, "y": 2 }, + { "label": "A", "x": 1.75, "y": 2 }, + { "label": "S", "x": 2.75, "y": 2 }, + { "label": "D", "x": 3.75, "y": 2 }, + { "label": "F", "x": 4.75, "y": 2 }, + { "label": "G", "x": 5.75, "y": 2 }, + { "label": "H", "x": 6.75, "y": 2 }, + { "label": "J", "x": 7.75, "y": 2 }, + { "label": "K", "x": 8.75, "y": 2 }, + { "label": "L", "x": 9.75, "y": 2 }, + { "label": ":", "x": 10.75, "y": 2 }, + { "label": "\"", "x": 11.75, "y": 2 }, + { "label": "Enter", "w": 2.25, "x": 12.75, "y": 2 }, + { "label": "Shift", "w": 2.25, "x": 0, "y": 3 }, + { "label": "Z", "x": 2.25, "y": 3 }, + { "label": "X", "x": 3.25, "y": 3 }, + { "label": "C", "x": 4.25, "y": 3 }, + { "label": "V", "x": 5.25, "y": 3 }, + { "label": "B", "x": 6.25, "y": 3 }, + { "label": "N", "x": 7.25, "y": 3 }, + { "label": "M", "x": 8.25, "y": 3 }, + { "label": "<", "x": 9.25, "y": 3 }, + { "label": ">", "x": 10.25, "y": 3 }, + { "label": "?", "x": 11.25, "y": 3 }, + { "label": "Shift", "w": 1.75, "x": 12.25, "y": 3 }, + { "label": "Fn", "x": 14, "y": 3 }, + { "label": "Ctrl", "w": 1.5, "x": 0, "y": 4 }, + { "label": "Win", "x": 1.5, "y": 4 }, + { "label": "Alt", "w": 1.5, "x": 2.5, "y": 4 }, + { "w": 7, "x": 4, "y": 4 }, + { "label": "Alt", "w": 1.5, "x": 11, "y": 4 }, + { "label": "Win", "x": 12.5, "y": 4 }, + { "label": "Ctrl", "w": 1.5, "x": 13.5, "y": 4 } + ] }, - "LAYOUT": { - "7u": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Bksp", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + "LAYOUT_2x3u": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "!", "x": 1, "y": 0 }, + { "label": "@", "x": 2, "y": 0 }, + { "label": "#", "x": 3, "y": 0 }, + { "label": "$", "x": 4, "y": 0 }, + { "label": "%", "x": 5, "y": 0 }, + { "label": "^", "x": 6, "y": 0 }, + { "label": "&", "x": 7, "y": 0 }, + { "label": "*", "x": 8, "y": 0 }, + { "label": "(", "x": 9, "y": 0 }, + { "label": ")", "x": 10, "y": 0 }, + { "label": "_", "x": 11, "y": 0 }, + { "label": "+", "x": 12, "y": 0 }, + { "label": "~", "x": 13, "y": 0 }, + { "label": "Bksp", "x": 14, "y": 0 }, + { "label": "Tab", "w": 1.5, "x": 0, "y": 1 }, + { "label": "Q", "x": 1.5, "y": 1 }, + { "label": "W", "x": 2.5, "y": 1 }, + { "label": "E", "x": 3.5, "y": 1 }, + { "label": "R", "x": 4.5, "y": 1 }, + { "label": "T", "x": 5.5, "y": 1 }, + { "label": "Y", "x": 6.5, "y": 1 }, + { "label": "U", "x": 7.5, "y": 1 }, + { "label": "I", "x": 8.5, "y": 1 }, + { "label": "O", "x": 9.5, "y": 1 }, + { "label": "P", "x": 10.5, "y": 1 }, + { "label": "{", "x": 11.5, "y": 1 }, + { "label": "}", "x": 12.5, "y": 1 }, + { "label": "|", "w": 1.5, "x": 13.5, "y": 1 }, + { "label": "Caps Lock", "w": 1.75, "x": 0, "y": 2 }, + { "label": "A", "x": 1.75, "y": 2 }, + { "label": "S", "x": 2.75, "y": 2 }, + { "label": "D", "x": 3.75, "y": 2 }, + { "label": "F", "x": 4.75, "y": 2 }, + { "label": "G", "x": 5.75, "y": 2 }, + { "label": "H", "x": 6.75, "y": 2 }, + { "label": "J", "x": 7.75, "y": 2 }, + { "label": "K", "x": 8.75, "y": 2 }, + { "label": "L", "x": 9.75, "y": 2 }, + { "label": ":", "x": 10.75, "y": 2 }, + { "label": "\"", "x": 11.75, "y": 2 }, + { "label": "Enter", "w": 2.25, "x": 12.75, "y": 2 }, + { "label": "Shift", "w": 2.25, "x": 0, "y": 3 }, + { "label": "Z", "x": 2.25, "y": 3 }, + { "label": "X", "x": 3.25, "y": 3 }, + { "label": "C", "x": 4.25, "y": 3 }, + { "label": "V", "x": 5.25, "y": 3 }, + { "label": "B", "x": 6.25, "y": 3 }, + { "label": "N", "x": 7.25, "y": 3 }, + { "label": "M", "x": 8.25, "y": 3 }, + { "label": "<", "x": 9.25, "y": 3 }, + { "label": ">", "x": 10.25, "y": 3 }, + { "label": "?", "x": 11.25, "y": 3 }, + { "label": "Shift", "w": 1.75, "x": 12.25, "y": 3 }, + { "label": "Fn", "x": 14, "y": 3 }, + { "label": "Ctrl", "w": 1.5, "x": 0, "y": 4 }, + { "label": "Win", "x": 1.5, "y": 4 }, + { "label": "Alt", "w": 1.5, "x": 2.5, "y": 4 }, + { "w": 3, "x": 4, "y": 4 }, + { "x": 7, "y": 4 }, + { "w": 3, "x": 8, "y": 4 }, + { "label": "Alt", "w": 1.5, "x": 11, "y": 4 }, + { "label": "Win", "x": 12.5, "y": 4 }, + { "label": "Ctrl", "w": 1.5, "x": 13.5, "y": 4 } + ] } } } diff --git a/keyboards/christmas_tree/rules.mk b/keyboards/christmas_tree/rules.mk index da85eb3728..5e8cf32552 100644 --- a/keyboards/christmas_tree/rules.mk +++ b/keyboards/christmas_tree/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/converter/hp_46010a/rules.mk b/keyboards/converter/hp_46010a/rules.mk index b7199d7f90..e154e380bc 100644 --- a/keyboards/converter/hp_46010a/rules.mk +++ b/keyboards/converter/hp_46010a/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no SPLIT_KEYBOARD = no WAIT_FOR_USB = yes LAYOUTS_HAS_RGB = no diff --git a/keyboards/converter/ibm_5291/rules.mk b/keyboards/converter/ibm_5291/rules.mk index 0b53753ebc..ba59d2ae9e 100644 --- a/keyboards/converter/ibm_5291/rules.mk +++ b/keyboards/converter/ibm_5291/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no SPLIT_KEYBOARD = no WAIT_FOR_USB = yes LAYOUTS_HAS_RGB = no diff --git a/keyboards/converter/ibm_terminal/keymaps/default/rules.mk b/keyboards/converter/ibm_terminal/keymaps/default/rules.mk index 749b93312c..01664a445b 100644 --- a/keyboards/converter/ibm_terminal/keymaps/default/rules.mk +++ b/keyboards/converter/ibm_terminal/keymaps/default/rules.mk @@ -15,7 +15,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_USE_USART = yes -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk b/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk index 76d349920f..15ff28f350 100644 --- a/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk +++ b/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk @@ -16,7 +16,6 @@ UNICODEMAP_ENABLE = yes BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_USE_USART = yes -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/converter/ibm_terminal/rules.mk b/keyboards/converter/ibm_terminal/rules.mk index 059d7b303e..8e30f5be5b 100644 --- a/keyboards/converter/ibm_terminal/rules.mk +++ b/keyboards/converter/ibm_terminal/rules.mk @@ -28,7 +28,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_USE_USART = yes -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes diff --git a/keyboards/converter/usb_usb/usb_usb.h b/keyboards/converter/usb_usb/usb_usb.h index e0c7c9c0d4..1d1b6770d1 100644 --- a/keyboards/converter/usb_usb/usb_usb.h +++ b/keyboards/converter/usb_usb/usb_usb.h @@ -127,15 +127,40 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, K28, K5C,K5D,K5E,K57, \ KE1,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, KE5, K52, K59,K5A,K5B, \ KE0,KE3,KE2, K2C, KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58 \ -) LAYOUT_all( \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - K29, K3A, K3B, K3C, K3D, K3E, K3F, K40, K41, K42, K43, K44, K45, K46, K47, K48, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - K35, K1E, K1F, K20, K21, K22, K23, K24, K25, K26, K27, K2D, K2E, KC_NO, K2A, K49, K4A, K4B, K53, K54, K55, K56, KC_NO, KC_NO, \ - K2B, K14, K1A, K08, K15, K17, K1C, K18, K0C, K12, K13, K2F, K30, K31, K4C, K4D, K4E, K5F, K60, K61, K57, KC_NO, KC_NO, \ - K39, K04, K16, K07, K09, K0A, K0B, K0D, K0E, K0F, K33, K34, KC_NO, K28, K5C, K5D, K5E, KC_NO, KC_NO, KC_NO, \ - KE1, KC_NO, K1D, K1B, K06, K19, K05, K11, K10, K36, K37, K38, KC_NO, KE5, K52, K59, K5A, K5B, KC_NO, KC_NO, KC_NO, \ - KE0, KE3, KE2, KC_NO, KC_NO, K2C, KC_NO, KC_NO, KC_NO, KE6, KE7, K65, KE4, K50, K51, K4F, K62, K63, K58, KC_NO, KC_NO \ -) +) { \ + { KC_NO, KC_NO, KC_NO, KC_NO, K04, K05, K06, K07, /* 00-07 */ \ + K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, /* 08-0F */ \ + { K10, K11, K12, K13, K14, K15, K16, K17, /* 10-17 */ \ + K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, /* 18-1F */ \ + { K20, K21, K22, K23, K24, K25, K26, K27, /* 20-27 */ \ + K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, /* 28-2F */ \ + { K30, K31, KC_NO, K33, K34, K35, K36, K37, /* 30-37 */ \ + K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, /* 38-3F */ \ + { K40, K41, K42, K43, K44, K45, K46, K47, /* 40-47 */ \ + K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, /* 48-4F */ \ + { K50, K51, K52, K53, K54, K55, K56, K57, /* 50-57 */ \ + K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, /* 58-5F */ \ + { K60, K61, K62, K63, KC_NO, K65, KC_NO, KC_NO, /* 60-67 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 68-6F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 70-77 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 78-7F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 80-87 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 90-97 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* A0-A7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* B0-B7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* C0-C7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* D0-D7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \ + { KE0, KE1, KE2, KE3, KE4, KE5, KE6, KE7, /* E0-E7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* F0-F7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \ +} /* ,---. ,---------------. ,---------------. ,---------------. ,-----------. * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| @@ -159,15 +184,40 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34,K32, K5C,K5D,K5E, \ KE1,K64,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, KE5, K52, K59,K5A,K5B,K58, \ KE0,KE3,KE2, K2C, KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63 \ -) LAYOUT_all( \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - K29, K3A, K3B, K3C, K3D, K3E, K3F, K40, K41, K42, K43, K44, K45, K46, K47, K48, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - K35, K1E, K1F, K20, K21, K22, K23, K24, K25, K26, K27, K2D, K2E, KC_NO, K2A, K49, K4A, K4B, K53, K54, K55, K56, KC_NO, KC_NO, \ - K2B, K14, K1A, K08, K15, K17, K1C, K18, K0C, K12, K13, K2F, K30, K32, K4C, K4D, K4E, K5F, K60, K61, K57, KC_NO, KC_NO, \ - K39, K04, K16, K07, K09, K0A, K0B, K0D, K0E, K0F, K33, K34, K32, K28, K5C, K5D, K5E, KC_NO, KC_NO, KC_NO, \ - KE1, K64, K1D, K1B, K06, K19, K05, K11, K10, K36, K37, K38, KC_NO, KE5, K52, K59, K5A, K5B, KC_NO, KC_NO, KC_NO, \ - KE0, KE3, KE2, KC_NO, KC_NO, K2C, KC_NO, KC_NO, KC_NO, KE6, KE7, K65, KE4, K50, K51, K4F, K62, K63, K58, KC_NO, KC_NO \ -) +) { \ + { KC_NO, KC_NO, KC_NO, KC_NO, K04, K05, K06, K07, /* 00-07 */ \ + K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, /* 08-0F */ \ + { K10, K11, K12, K13, K14, K15, K16, K17, /* 10-17 */ \ + K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, /* 18-1F */ \ + { K20, K21, K22, K23, K24, K25, K26, K27, /* 20-27 */ \ + K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, /* 28-2F */ \ + { K30, K31, K32, K33, K34, K35, K36, K37, /* 30-37 */ \ + K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, /* 38-3F */ \ + { K40, K41, K42, K43, K44, K45, K46, K47, /* 40-47 */ \ + K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, /* 48-4F */ \ + { K50, K51, K52, K53, K54, K55, K56, K57, /* 50-57 */ \ + K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, /* 58-5F */ \ + { K60, K61, K62, K63, K64, K65, KC_NO, KC_NO, /* 60-67 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 68-6F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 70-77 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 78-7F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 80-87 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 90-97 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* A0-A7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* B0-B7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* C0-C7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* D0-D7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \ + { KE0, KE1, KE2, KE3, KE4, KE5, KE6, KE7, /* E0-E7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* F0-F7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \ +} /* ,---. ,---------------. ,---------------. ,---------------. ,-----------. * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| @@ -191,13 +241,38 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34,K32, K5C,K5D,K5E, \ KE1,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, K87,KE5, K52, K59,K5A,K5B,K58, \ KE0,KE3,KE2,K8B, K2C, K8A,K88,KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63 \ -) LAYOUT_all( \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - K29, K3A, K3B, K3C, K3D, K3E, K3F, K40, K41, K42, K43, K44, K45, K46, K47, K48, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - K35, K1E, K1F, K20, K21, K22, K23, K24, K25, K26, K27, K2D, K2E, K89, K2A, K49, K4A, K4B, K53, K54, K55, K56, KC_NO, KC_NO, \ - K2B, K14, K1A, K08, K15, K17, K1C, K18, K0C, K12, K13, K2F, K30, K32, K4C, K4D, K4E, K5F, K60, K61, K57, KC_NO, KC_NO, \ - K39, K04, K16, K07, K09, K0A, K0B, K0D, K0E, K0F, K33, K34, K32, K28, K5C, K5D, K5E, KC_NO, KC_NO, KC_NO, \ - KE1, KC_NO, K1D, K1B, K06, K19, K05, K11, K10, K36, K37, K38, K87, KE5, K52, K59, K5A, K5B, KC_NO, KC_NO, KC_NO, \ - KE0, KE3, KE2, K8B, KC_NO, K2C, KC_NO, K8A, K88, KE6, KE7, K65, KE4, K50, K51, K4F, K62, K63, K58, KC_NO, KC_NO \ -) +) { \ + { KC_NO, KC_NO, KC_NO, KC_NO, K04, K05, K06, K07, /* 00-07 */ \ + K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, /* 08-0F */ \ + { K10, K11, K12, K13, K14, K15, K16, K17, /* 10-17 */ \ + K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, /* 18-1F */ \ + { K20, K21, K22, K23, K24, K25, K26, K27, /* 20-27 */ \ + K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, /* 28-2F */ \ + { K30, K31, K32, K33, K34, K35, K36, K37, /* 30-37 */ \ + K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, /* 38-3F */ \ + { K40, K41, K42, K43, K44, K45, K46, K47, /* 40-47 */ \ + K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, /* 48-4F */ \ + { K50, K51, K52, K53, K54, K55, K56, K57, /* 50-57 */ \ + K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, /* 58-5F */ \ + { K60, K61, K62, K63, K64, K65, KC_NO, KC_NO, /* 60-67 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 68-6F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 70-77 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 78-7F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K87, /* 80-87 */ \ + K88, K89, K8A, K8B, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 90-97 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* A0-A7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* B0-B7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* C0-C7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* D0-D7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \ + { KE0, KE1, KE2, KE3, KE4, KE5, KE6, KE7, /* E0-E7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* F0-F7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \ +} #endif diff --git a/keyboards/crkbd/keymaps/devdev/config.h b/keyboards/crkbd/keymaps/devdev/config.h index 793c7b020b..c858f8f2d0 100644 --- a/keyboards/crkbd/keymaps/devdev/config.h +++ b/keyboards/crkbd/keymaps/devdev/config.h @@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define CUSTOM_FONT -#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding +#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding #define TAPPING_FORCE_HOLD #define TAPPING_TERM 200 @@ -43,7 +43,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifdef RGBLIGHT_ENABLE #undef RGBLED_NUM - + //#define RGBLIGHT_ANIMATIONS #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD @@ -55,11 +55,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define RGBLIGHT_EFFECT_RGB_TEST //#define RGBLIGHT_EFFECT_ALTERNATING //#define RGBLIGHT_EFFECT_TWINKLE - + //#define RGBLED_NUM 54 //#define RGBLED_SPLIT 27 - //#define RGBLED_SPLIT { 27, 27 } // haven't figured out how to use this yet - + //#define RGBLED_SPLIT { 27, 27 } // haven't figured out how to use this yet + #define RGBLED_NUM 27 #define RGBLIGHT_LIMIT_VAL 120 #define RGBLIGHT_HUE_STEP 10 @@ -71,11 +71,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT diff --git a/keyboards/crkbd/keymaps/gotham/config.h b/keyboards/crkbd/keymaps/gotham/config.h index dd58a0fe05..05b04e0aa3 100644 --- a/keyboards/crkbd/keymaps/gotham/config.h +++ b/keyboards/crkbd/keymaps/gotham/config.h @@ -39,7 +39,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_KEYPRESSES // reacts to keypresses -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. # define RGB_MATRIX_HUE_STEP 32 # define RGB_MATRIX_SAT_STEP 64 diff --git a/keyboards/crkbd/keymaps/kidbrazil/config.h b/keyboards/crkbd/keymaps/kidbrazil/config.h index be1777e575..752ea862e0 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/config.h +++ b/keyboards/crkbd/keymaps/kidbrazil/config.h @@ -56,7 +56,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //# define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects - #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended + #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) diff --git a/keyboards/crkbd/keymaps/rpbaptist/config.h b/keyboards/crkbd/keymaps/rpbaptist/config.h index 6bd16725f5..9e5f75c362 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/config.h +++ b/keyboards/crkbd/keymaps/rpbaptist/config.h @@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define NO_ACTION_ONESHOT #ifdef RGB_MATRIX_ENABLE -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 # define RGB_MATRIX_HUE_STEP 8 diff --git a/keyboards/crkbd/keymaps/soundmonster/config.h b/keyboards/crkbd/keymaps/soundmonster/config.h index 1e58af3abe..8235b48697 100644 --- a/keyboards/crkbd/keymaps/soundmonster/config.h +++ b/keyboards/crkbd/keymaps/soundmonster/config.h @@ -59,11 +59,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. # define RGB_MATRIX_HUE_STEP 8 # define RGB_MATRIX_SAT_STEP 8 # define RGB_MATRIX_VAL_STEP 8 diff --git a/keyboards/crkbd/readme.md b/keyboards/crkbd/readme.md index 1e5bfb39ab..f0b5672cf6 100644 --- a/keyboards/crkbd/readme.md +++ b/keyboards/crkbd/readme.md @@ -38,7 +38,7 @@ And in your `config.h` file, add the following: # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) diff --git a/keyboards/draculad/config.h b/keyboards/draculad/config.h index 8a27fdea4d..d8a9fbd37c 100644 --- a/keyboards/draculad/config.h +++ b/keyboards/draculad/config.h @@ -65,3 +65,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define UNUSED_PINS #define EE_HANDS + +#define LAYER_STATE_8BIT
\ No newline at end of file diff --git a/keyboards/draculad/keymaps/pimoroni/keymap.c b/keyboards/draculad/keymaps/pimoroni/keymap.c index 87cbe3cd3a..762ae26c70 100644 --- a/keyboards/draculad/keymaps/pimoroni/keymap.c +++ b/keyboards/draculad/keymaps/pimoroni/keymap.c @@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include QMK_KEYBOARD_H -#include "pimoroni_trackball.h" +#include "drivers/sensors/pimoroni_trackball.h" #include "pointing_device.h" diff --git a/keyboards/draculad/keymaps/pimoroni/pimoroni_trackball.c b/keyboards/draculad/keymaps/pimoroni/pimoroni_trackball.c deleted file mode 100644 index c4f4a0441a..0000000000 --- a/keyboards/draculad/keymaps/pimoroni/pimoroni_trackball.c +++ /dev/null @@ -1,177 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "pimoroni_trackball.h" -#include "i2c_master.h" - -static uint8_t scrolling = 0; -static int16_t x_offset = 0; -static int16_t y_offset = 0; -static int16_t h_offset = 0; -static int16_t v_offset = 0; -static float precisionSpeed = 1; - -static uint16_t i2c_timeout_timer; - -#ifndef I2C_TIMEOUT -# define I2C_TIMEOUT 100 -#endif -#ifndef I2C_WAITCHECK -# define I2C_WAITCHECK 1000 -#endif -#ifndef MOUSE_DEBOUNCE -# define MOUSE_DEBOUNCE 5 -#endif - -void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white) { - uint8_t data[] = {0x00, red, green, blue, white}; - i2c_transmit(TRACKBALL_WRITE, data, sizeof(data), I2C_TIMEOUT); -} - -int16_t mouse_offset(uint8_t positive, uint8_t negative, int16_t scale) { - int16_t offset = (int16_t)positive - (int16_t)negative; - int16_t magnitude = (int16_t)(scale * offset * offset * precisionSpeed); - return offset < 0 ? -magnitude : magnitude; -} - -void update_member(int8_t* member, int16_t* offset) { - if (*offset > 127) { - *member = 127; - *offset -= 127; - } else if (*offset < -127) { - *member = -127; - *offset += 127; - } else { - *member = *offset; - *offset = 0; - } -} - -__attribute__((weak)) void trackball_check_click(bool pressed, report_mouse_t* mouse) { - if (pressed) { - mouse->buttons |= MOUSE_BTN1; - } else { - mouse->buttons &= ~MOUSE_BTN1; - } -} - -bool process_record_kb(uint16_t keycode, keyrecord_t* record) { - if (true) { - xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); - } - - - if (!process_record_user(keycode, record)) { return false; } - -/* If Mousekeys is disabled, then use handle the mouse button - * keycodes. This makes things simpler, and allows usage of - * the keycodes in a consistent manner. But only do this if - * Mousekeys is not enable, so it's not handled twice. - */ -#ifndef MOUSEKEY_ENABLE - if (IS_MOUSEKEY_BUTTON(keycode)) { - report_mouse_t currentReport = pointing_device_get_report(); - if (record->event.pressed) { - currentReport.buttons |= 1 << (keycode - KC_MS_BTN1); - } else { - currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1)); - } - pointing_device_set_report(currentReport); - pointing_device_send(); - } -#endif - - return true; -} - -void trackball_register_button(bool pressed, enum mouse_buttons button) { - report_mouse_t currentReport = pointing_device_get_report(); - if (pressed) { - currentReport.buttons |= button; - } else { - currentReport.buttons &= ~button; - } - pointing_device_set_report(currentReport); -} - -float trackball_get_precision(void) { return precisionSpeed; } -void trackball_set_precision(float precision) { precisionSpeed = precision; } -bool trackball_is_scrolling(void) { return scrolling; } -void trackball_set_scrolling(bool scroll) { scrolling = scroll; } - - -__attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x80, 0x00, 0x00, 0x00); } - -void pointing_device_task(void) { - static bool debounce; - static uint16_t debounce_timer; - uint8_t state[5] = {}; - if (timer_elapsed(i2c_timeout_timer) > I2C_WAITCHECK) { - if (i2c_readReg(TRACKBALL_WRITE, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) { - if (!state[4] && !debounce) { - if (scrolling) { -#ifdef PIMORONI_TRACKBALL_INVERT_X - h_offset += mouse_offset(state[2], state[3], 1); -#else - h_offset -= mouse_offset(state[2], state[3], 1); -#endif -#ifdef PIMORONI_TRACKBALL_INVERT_Y - v_offset += mouse_offset(state[1], state[0], 1); -#else - v_offset -= mouse_offset(state[1], state[0], 1); -#endif - } else { -#ifdef PIMORONI_TRACKBALL_INVERT_X - x_offset -= mouse_offset(state[2], state[3], 5); -#else - x_offset += mouse_offset(state[2], state[3], 5); -#endif -#ifdef PIMORONI_TRACKBALL_INVERT_Y - y_offset -= mouse_offset(state[1], state[0], 5); -#else - y_offset += mouse_offset(state[1], state[0], 5); -#endif - } - } else { - if (state[4]) { - debounce = true; - debounce_timer = timer_read(); - } - } - } else { - i2c_timeout_timer = timer_read(); - } - } - - if (timer_elapsed(debounce_timer) > MOUSE_DEBOUNCE) debounce = false; - - report_mouse_t mouse = pointing_device_get_report(); - // trackball_check_click(state[4] & (1 << 7), &mouse); - -#ifndef PIMORONI_TRACKBALL_ROTATE - update_member(&mouse.x, &x_offset); - update_member(&mouse.y, &y_offset); - update_member(&mouse.h, &h_offset); - update_member(&mouse.v, &v_offset); -#else - update_member(&mouse.x, &y_offset); - update_member(&mouse.y, &x_offset); - update_member(&mouse.h, &v_offset); - update_member(&mouse.v, &h_offset); -#endif - pointing_device_set_report(mouse); - pointing_device_send(); -} diff --git a/keyboards/draculad/keymaps/pimoroni/rules.mk b/keyboards/draculad/keymaps/pimoroni/rules.mk index 547a02f26f..d8dc92fbfc 100644 --- a/keyboards/draculad/keymaps/pimoroni/rules.mk +++ b/keyboards/draculad/keymaps/pimoroni/rules.mk @@ -1,6 +1,6 @@ # only uncomment on the side you have your trackball on POINTING_DEVICE_ENABLE = yes -SRC += pimoroni_trackball.c +SRC += drivers/sensors/pimoroni_trackball.c QUANTUM_LIB_SRC += i2c_master.c OLED_DRIVER_ENABLE = yes MOUSEKEY_ENABLE = no diff --git a/keyboards/dztech/dz60rgb/v1/config.h b/keyboards/dztech/dz60rgb/v1/config.h index 6e5b3da6ff..f6ee7c4e2f 100644 --- a/keyboards/dztech/dz60rgb/v1/config.h +++ b/keyboards/dztech/dz60rgb/v1/config.h @@ -37,7 +37,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_LED_PROCESS_LIMIT 4 # define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/dztech/dz60rgb/v2/config.h b/keyboards/dztech/dz60rgb/v2/config.h index df84fff59a..6108e99034 100644 --- a/keyboards/dztech/dz60rgb/v2/config.h +++ b/keyboards/dztech/dz60rgb/v2/config.h @@ -37,7 +37,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/dztech/dz60rgb_ansi/v1/config.h b/keyboards/dztech/dz60rgb_ansi/v1/config.h index 8710f8d07b..dc2a6f4bc0 100644 --- a/keyboards/dztech/dz60rgb_ansi/v1/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v1/config.h @@ -37,7 +37,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_LED_PROCESS_LIMIT 4 # define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/dztech/dz60rgb_ansi/v2/config.h b/keyboards/dztech/dz60rgb_ansi/v2/config.h index f3c9b73fb4..6c1e006821 100644 --- a/keyboards/dztech/dz60rgb_ansi/v2/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v2/config.h @@ -37,7 +37,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/dztech/dz60rgb_wkl/v1/config.h b/keyboards/dztech/dz60rgb_wkl/v1/config.h index 9c630c75be..12317c2d35 100644 --- a/keyboards/dztech/dz60rgb_wkl/v1/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v1/config.h @@ -37,7 +37,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_LED_PROCESS_LIMIT 4 # define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/dztech/dz60rgb_wkl/v2/config.h b/keyboards/dztech/dz60rgb_wkl/v2/config.h index a6145c2749..945b591ce6 100644 --- a/keyboards/dztech/dz60rgb_wkl/v2/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v2/config.h @@ -37,7 +37,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/dztech/dz65rgb/v1/config.h b/keyboards/dztech/dz65rgb/v1/config.h index adfa934b04..1ecd9002cb 100644 --- a/keyboards/dztech/dz65rgb/v1/config.h +++ b/keyboards/dztech/dz65rgb/v1/config.h @@ -51,9 +51,9 @@ # define RGB_MATRIX_LED_FLUSH_LIMIT 26 # define DEBOUNCE 3 # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN # define DISABLE_RGB_MATRIX_BAND_SAT # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT # define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT diff --git a/keyboards/dztech/dz65rgb/v2/config.h b/keyboards/dztech/dz65rgb/v2/config.h index f86d65cd06..1e1e21f5e9 100644 --- a/keyboards/dztech/dz65rgb/v2/config.h +++ b/keyboards/dztech/dz65rgb/v2/config.h @@ -51,7 +51,7 @@ # define RGB_MATRIX_LED_FLUSH_LIMIT 26 # define DEBOUNCE 3 # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN # define DISABLE_RGB_MATRIX_BAND_SAT diff --git a/keyboards/eco/rules.mk b/keyboards/eco/rules.mk index 078131da7c..c0541a7bb3 100644 --- a/keyboards/eco/rules.mk +++ b/keyboards/eco/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/ergo42/rules.mk b/keyboards/ergo42/rules.mk index b593de2be3..29e7cf2b76 100644 --- a/keyboards/ergo42/rules.mk +++ b/keyboards/ergo42/rules.mk @@ -31,6 +31,4 @@ AUDIO_ENABLE = no # Audio output on port C6 SPLIT_KEYBOARD = yes -LAYOUTS = ortho_4x14 - DEFAULT_FOLDER = ergo42/rev1 diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index bc63f6108f..9dcfc341e1 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -129,7 +129,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_MATRIX_LED_PROCESS_LIMIT 5 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED // #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF /* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */ diff --git a/keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk b/keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk index 6d20fcf762..3a1ee27ff8 100755 --- a/keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk +++ b/keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk @@ -10,6 +10,5 @@ CONSOLE_ENABLE = yes # Console for debug BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration UNICODE_ENABLE = no SLEEP_LED_ENABLE = no -API_SYSEX_ENABLE = no RGBLIGHT_ENABLE = no RGBLIGHT_ANIMATION = no diff --git a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/rules.mk b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/rules.mk index 6ed55e72b4..9c2dc61710 100644 --- a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/rules.mk +++ b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/rules.mk @@ -10,6 +10,5 @@ CONSOLE_ENABLE = yes # Console for debug BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration UNICODE_ENABLE = no SLEEP_LED_ENABLE = no -API_SYSEX_ENABLE = no RGBLIGHT_ENABLE = no RGBLIGHT_ANIMATION = no diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h index a0ba655ede..da20820787 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h @@ -14,7 +14,7 @@ #undef IGNORE_MOD_TAP_INTERRUPT #define IGNORE_MOD_TAP_INTERRUPT -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #undef FORCE_NKRO #define FORCE_NKRO diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk b/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk index 184a90228e..c4091010ff 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk @@ -22,7 +22,6 @@ SWAP_HANDS_ENABLE = no # Allow swapping hands of keyboard. # KEY_LOCK_ENABLE = no # (+1730b) # CONSOLE_ENABLE = no # Console for debug(+400b) # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000b) -# API_SYSEX_ENABLE = no # MIDI_ENABLE = no # BLUETOOTH_ENABLE = no # AUDIO_ENABLE = no diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk index 1000ef7863..7b189be456 100644 --- a/keyboards/ergodox_ez/rules.mk +++ b/keyboards/ergodox_ez/rules.mk @@ -29,7 +29,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: ht UNICODE_ENABLE = yes # Unicode SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard SLEEP_LED_ENABLE = no -API_SYSEX_ENABLE = no RGB_MATRIX_ENABLE = no # enable later RGB_MATRIX_DRIVER = IS31FL3731 diff --git a/keyboards/ergodox_infinity/config.h b/keyboards/ergodox_infinity/config.h index a64f3f4a13..a00c593eeb 100644 --- a/keyboards/ergodox_infinity/config.h +++ b/keyboards/ergodox_infinity/config.h @@ -62,6 +62,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LED_BRIGHTNESS_LO 100 #define LED_BRIGHTNESS_HI 255 +/* LED matrix driver */ +#define LED_DRIVER_ADDR_1 0x74 +#define LED_DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL 76 +#define LED_MATRIX_SPLIT { 38, 38 } +#define LED_DISABLE_WHEN_USB_SUSPENDED + +/* i2c (for LED matrix) */ +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 +#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 +#define I2C1_BANK GPIOB +#define I2C1_SCL 0 +#define I2C1_SDA 1 + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/ergodox_infinity/ergodox_infinity.c b/keyboards/ergodox_infinity/ergodox_infinity.c index 97b628470b..da8ea311ad 100644 --- a/keyboards/ergodox_infinity/ergodox_infinity.c +++ b/keyboards/ergodox_infinity/ergodox_infinity.c @@ -1,20 +1,45 @@ #include QMK_KEYBOARD_H #include <ch.h> #include <hal.h> +#include <string.h> +#include "eeconfig.h" #include "serial_link/system/serial_link.h" #ifdef VISUALIZER_ENABLE -#include "lcd_backlight.h" +# include "lcd_backlight.h" #endif -#ifdef WPM_ENABLE -# include "serial_link/protocol/transport.h" -# include "wpm.h" +#if (defined(LED_MATRIX_ENABLE) || defined(WPM_ENABLE)) +# include "serial_link/protocol/transport.h" + +# ifdef LED_MATRIX_ENABLE +MASTER_TO_ALL_SLAVES_OBJECT(led_matrix, led_eeconfig_t); +MASTER_TO_ALL_SLAVES_OBJECT(led_suspend_state, bool); +static led_eeconfig_t last_sent_led_matrix; +static uint16_t led_matrix_sent_timer = 0; + +void send_led_suspend_state(void) { + if (is_serial_link_master()) { + *begin_write_led_suspend_state() = led_matrix_get_suspend_state(); + end_write_led_suspend_state(); + } +} +# endif +# ifdef WPM_ENABLE +# include "wpm.h" MASTER_TO_ALL_SLAVES_OBJECT(current_wpm, uint8_t); -static remote_object_t* remote_objects[] = { +static uint8_t last_sent_wpm = 0; +# endif + +static remote_object_t *remote_objects[] = { +# ifdef LED_MATRIX_ENABLE + REMOTE_OBJECT(led_matrix), + REMOTE_OBJECT(led_suspend_state), +# endif +# ifdef WPM_ENABLE REMOTE_OBJECT(current_wpm), +# endif }; -static uint8_t last_sent_wpm = 0; #endif void init_serial_link_hal(void) { @@ -52,7 +77,7 @@ void init_serial_link_hal(void) { void lcd_backlight_hal_init(void) { // Setup Backlight SIM->SCGC6 |= SIM_SCGC6_FTM0; - FTM0->CNT = 0; // Reset counter + FTM0->CNT = 0; // Reset counter // PWM Period // 16-bit maximum @@ -60,25 +85,25 @@ void lcd_backlight_hal_init(void) { // Set FTM to PWM output - Edge Aligned, Low-true pulses #define CNSC_MODE FTM_SC_CPWMS | FTM_SC_PS(4) | FTM_SC_CLKS(0) - CHANNEL_RED.CnSC = CNSC_MODE; + CHANNEL_RED.CnSC = CNSC_MODE; CHANNEL_GREEN.CnSC = CNSC_MODE; - CHANNEL_BLUE.CnSC = CNSC_MODE; + CHANNEL_BLUE.CnSC = CNSC_MODE; // System clock, /w prescalar setting FTM0->SC = FTM_SC_CLKS(1) | FTM_SC_PS(PRESCALAR_DEFINE); - CHANNEL_RED.CnV = 0; + CHANNEL_RED.CnV = 0; CHANNEL_GREEN.CnV = 0; - CHANNEL_BLUE.CnV = 0; + CHANNEL_BLUE.CnV = 0; RGB_PORT_GPIO->PDDR |= (1 << RED_PIN); RGB_PORT_GPIO->PDDR |= (1 << GREEN_PIN); RGB_PORT_GPIO->PDDR |= (1 << BLUE_PIN); #define RGB_MODE PORTx_PCRn_SRE | PORTx_PCRn_DSE | PORTx_PCRn_MUX(4) - RGB_PORT->PCR[RED_PIN] = RGB_MODE; + RGB_PORT->PCR[RED_PIN] = RGB_MODE; RGB_PORT->PCR[GREEN_PIN] = RGB_MODE; - RGB_PORT->PCR[BLUE_PIN] = RGB_MODE; + RGB_PORT->PCR[BLUE_PIN] = RGB_MODE; } static uint16_t cie_lightness(uint16_t v) { @@ -89,12 +114,11 @@ static uint16_t cie_lightness(uint16_t v) { // Y = (L* / 902.3) if L* <= 8 // Y = ((L* + 16) / 116)^3 if L* > 8 - float l = 100.0f * (v / 65535.0f); + float l = 100.0f * (v / 65535.0f); float y = 0.0f; if (l <= 8.0f) { - y = l / 902.3; - } - else { + y = l / 902.3; + } else { y = ((l + 16.0f) / 116.0f); y = y * y * y; if (y > 1.0f) { @@ -105,31 +129,48 @@ static uint16_t cie_lightness(uint16_t v) { } void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b) { - CHANNEL_RED.CnV = cie_lightness(r); + CHANNEL_RED.CnV = cie_lightness(r); CHANNEL_GREEN.CnV = cie_lightness(g); - CHANNEL_BLUE.CnV = cie_lightness(b); + CHANNEL_BLUE.CnV = cie_lightness(b); } -__attribute__ ((weak)) -void matrix_init_user(void) { -} +__attribute__ ((weak)) void matrix_init_user(void) {} + +__attribute__ ((weak)) void matrix_scan_user(void) {} -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +void keyboard_pre_init_kb() { +#ifdef LED_MATRIX_ENABLE + // Turn on LED controller + setPinOutput(B16); + writePinHigh(B16); +#endif + keyboard_pre_init_user(); +} void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up +#ifdef LED_MATRIX_ENABLE + /* + * Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c), + * and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot. + */ +# if !defined(LED_MATRIX_STARTUP_SPD) +# define LED_MATRIX_STARTUP_SPD UINT8_MAX / 2 +# endif + led_matrix_set_speed(LED_MATRIX_STARTUP_SPD); + led_matrix_set_flags(LED_FLAG_ALL); +#endif + matrix_init_user(); // The backlight always has to be initialized, otherwise it will stay lit #ifndef VISUALIZER_ENABLE lcd_backlight_hal_init(); #endif -#ifdef WPM_ENABLE - add_remote_objects(remote_objects, sizeof(remote_objects) / sizeof(remote_object_t*)); +#if (defined(LED_MATRIX_ENABLE) || defined(WPM_ENABLE)) + add_remote_objects(remote_objects, sizeof(remote_objects) / sizeof(remote_object_t *)); #endif } @@ -137,6 +178,30 @@ void matrix_scan_kb(void) { // put your looping keyboard code here // runs every cycle (a lot) +#ifdef LED_MATRIX_ENABLE + if (is_serial_link_master()) { + if (!led_matrix_get_suspend_state()) { + if (timer_elapsed(led_matrix_sent_timer) >= 5000 || memcmp((void *)&last_sent_led_matrix, (void *)&led_matrix_eeconfig, sizeof(last_sent_led_matrix))) { + led_matrix_sent_timer = timer_read(); + memcpy((void *)&last_sent_led_matrix, (void *)&led_matrix_eeconfig, sizeof(last_sent_led_matrix)); + *begin_write_led_matrix() = last_sent_led_matrix; + end_write_led_matrix(); + } + } + } else if (is_serial_link_connected()) { + bool *new_led_suspend_state = read_led_suspend_state(); + if (new_led_suspend_state) { + led_matrix_set_suspend_state(*new_led_suspend_state); + } + if (!led_matrix_get_suspend_state()) { + led_eeconfig_t *new_led_matrix = read_led_matrix(); + if (new_led_matrix) { + memcpy((void *)&led_matrix_eeconfig, (void *)new_led_matrix, sizeof(last_sent_led_matrix)); + } + } + } +#endif + #ifdef WPM_ENABLE if (is_serial_link_master()) { uint8_t current_wpm = get_current_wpm(); @@ -146,67 +211,68 @@ void matrix_scan_kb(void) { last_sent_wpm = current_wpm; } } else if (is_serial_link_connected()) { - uint8_t* new_wpm = read_current_wpm(); + uint8_t *new_wpm = read_current_wpm(); if (new_wpm) { set_current_wpm(*new_wpm); } } #endif + matrix_scan_user(); } -bool is_keyboard_master(void) { - return is_serial_link_master(); -} +bool is_keyboard_master(void) { return is_serial_link_master(); } -__attribute__ ((weak)) -void ergodox_board_led_on(void){ +bool is_keyboard_left(void) { +#if defined(EE_HANDS) + return eeconfig_read_handedness(); +#elif defined(MASTER_IS_ON_RIGHT) + return !is_keyboard_master(); +#else + return is_keyboard_master(); +#endif } -__attribute__ ((weak)) -void ergodox_right_led_1_on(void){ -} +__attribute__ ((weak)) void ergodox_board_led_on(void) {} -__attribute__ ((weak)) -void ergodox_right_led_2_on(void){ -} +__attribute__ ((weak)) void ergodox_right_led_1_on(void) {} -__attribute__ ((weak)) -void ergodox_right_led_3_on(void){ -} +__attribute__ ((weak)) void ergodox_right_led_2_on(void) {} -__attribute__ ((weak)) -void ergodox_board_led_off(void){ -} +__attribute__ ((weak)) void ergodox_right_led_3_on(void) {} -__attribute__ ((weak)) -void ergodox_right_led_1_off(void){ -} +__attribute__ ((weak)) void ergodox_board_led_off(void) {} -__attribute__ ((weak)) -void ergodox_right_led_2_off(void){ -} +__attribute__ ((weak)) void ergodox_right_led_1_off(void) {} -__attribute__ ((weak)) -void ergodox_right_led_3_off(void){ -} +__attribute__ ((weak)) void ergodox_right_led_2_off(void) {} -__attribute__ ((weak)) -void ergodox_right_led_1_set(uint8_t n) { -} +__attribute__ ((weak)) void ergodox_right_led_3_off(void) {} -__attribute__ ((weak)) -void ergodox_right_led_2_set(uint8_t n) { +__attribute__ ((weak)) void ergodox_right_led_1_set(uint8_t n) {} + +__attribute__ ((weak)) void ergodox_right_led_2_set(uint8_t n) {} + +__attribute__ ((weak)) void ergodox_right_led_3_set(uint8_t n) {} + +void suspend_power_down_kb(void) { +#ifdef LED_MATRIX_ENABLE + send_led_suspend_state(); +#endif + suspend_power_down_user(); } -__attribute__ ((weak)) -void ergodox_right_led_3_set(uint8_t n) { +void suspend_wakeup_init_kb(void) { +#ifdef LED_MATRIX_ENABLE + send_led_suspend_state(); +#endif + suspend_wakeup_init_user(); } #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { - {{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}}, + {{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}}, {{0, 10}, {1, 10}, {2, 10}, {3, 10}, {4, 10}}, {{0, 11}, {1, 11}, {2, 11}, {3, 11}, {4, 11}}, {{0, 12}, {1, 12}, {2, 12}, {3, 12}, {4, 12}}, @@ -226,3 +292,115 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 8}}, }; #endif + +#ifdef LED_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +// The numbers in the comments are the led numbers DXX on the PCB +/* Refer to IS31 manual for these locations + * driver + * | LED address + * | | */ +// Left half +// 45 44 43 42 41 40 39 + { 0, C2_2 }, { 0, C1_2 }, { 0, C5_1 }, { 0, C4_1 }, { 0, C3_1 }, { 0, C2_1 }, { 0, C1_1 }, +// 52 51 50 49 48 47 46 + { 0, C4_3 }, { 0, C3_3 }, { 0, C2_3 }, { 0, C1_3 }, { 0, C5_2 }, { 0, C4_2 }, { 0, C3_2 }, +// 58 57 56 55 54 53 + { 0, C5_4 }, { 0, C4_4 }, { 0, C3_4 }, { 0, C2_4 }, { 0, C1_4 }, { 0, C5_3 }, +// 67 66 65 64 63 62 61 + { 0, C4_6 }, { 0, C3_6 }, { 0, C2_6 }, { 0, C1_6 }, { 0, C5_5 }, { 0, C4_5 }, { 0, C3_5 }, +// 76 75 74 73 72 + { 0, C4_8 }, { 0, C3_8 }, { 0, C2_8 }, { 0, C1_8 }, { 0, C4_7 }, +// 60 59 + { 0, C2_5 }, { 0, C1_5 }, +// 68 + { 0, C5_6 }, +// 71 70 69 + { 0, C3_7 }, { 0, C2_7 }, { 0, C1_7 }, +// Right half (mirrored) +// Due to how LED_MATRIX_SPLIT is implemented, only the first half of g_is31_leds is actually used. +// Luckily, the right half has the same LED pinouts, just mirrored. +// 45 44 43 42 41 40 39 + { 0, C2_2 }, { 0, C1_2 }, { 0, C5_1 }, { 0, C4_1 }, { 0, C3_1 }, { 0, C2_1 }, { 0, C1_1 }, +// 52 51 50 49 48 47 46 + { 0, C4_3 }, { 0, C3_3 }, { 0, C2_3 }, { 0, C1_3 }, { 0, C5_2 }, { 0, C4_2 }, { 0, C3_2 }, +// 58 57 56 55 54 53 + { 0, C5_4 }, { 0, C4_4 }, { 0, C3_4 }, { 0, C2_4 }, { 0, C1_4 }, { 0, C5_3 }, +// 67 66 65 64 63 62 61 + { 0, C4_6 }, { 0, C3_6 }, { 0, C2_6 }, { 0, C1_6 }, { 0, C5_5 }, { 0, C4_5 }, { 0, C3_5 }, +// 76 75 74 73 72 + { 0, C4_8 }, { 0, C3_8 }, { 0, C2_8 }, { 0, C1_8 }, { 0, C4_7 }, +// 60 59 + { 0, C2_5 }, { 0, C1_5 }, +// 68 + { 0, C5_6 }, +// 71 70 69 + { 0, C3_7 }, { 0, C2_7 }, { 0, C1_7 }, +}; + +led_config_t g_led_config = { + { + // Key Matrix to LED Index + // Left half + { NO_LED, NO_LED, NO_LED, 33, 34 }, + { NO_LED, NO_LED, NO_LED, 32, 37 }, + { 6, 13, NO_LED, 26, 36 }, + { 5, 12, 19, 25, 35 }, + { 4, 11, 18, 24, 31 }, + { 3, 10, 17, 23, 30 }, + { 2, 9, 16, 22, 29 }, + { 1, 8, 15, 21, 28 }, + { 0, 7, 14, 20, 27 }, + // Right half + { NO_LED, NO_LED, NO_LED, 71, 72 }, + { NO_LED, NO_LED, NO_LED, 70, 75 }, + { 44, 51, NO_LED, 64, 74 }, + { 43, 50, 57, 63, 73 }, + { 42, 49, 56, 62, 69 }, + { 41, 48, 55, 61, 68 }, + { 40, 47, 54, 60, 67 }, + { 39, 46, 53, 59, 66 }, + { 38, 45, 52, 58, 65 }, + }, { + // LED Index to Physical Position (assumes a reasonable gap between halves) + // Left half + { 0, 3 }, { 15, 3 }, { 27, 1 }, { 39, 0 }, { 51, 1 }, { 63, 2 }, { 75, 2 }, + { 0, 13 }, { 15, 13 }, { 27, 11 }, { 39, 10 }, { 51, 11 }, { 63, 12 }, { 78, 17 }, + { 0, 23 }, { 15, 23 }, { 27, 21 }, { 39, 20 }, { 51, 21 }, { 63, 22 }, + { 0, 33 }, { 15, 33 }, { 27, 31 }, { 39, 30 }, { 51, 31 }, { 63, 32 }, { 78, 32 }, + { 4, 43 }, { 15, 43 }, { 27, 41 }, { 39, 40 }, { 51, 41 }, + { 89, 41 }, { 100, 46 }, + { 95, 55 }, + { 72, 54 }, { 83, 59 }, { 90, 64 }, + // Right half (mirrored) + { 224, 3 }, { 209, 3 }, { 197, 1 }, { 185, 0 }, { 173, 1 }, { 161, 2 }, { 149, 2 }, + { 224, 13 }, { 209, 13 }, { 197, 11 }, { 185, 10 }, { 173, 11 }, { 161, 12 }, { 146, 17 }, + { 224, 23 }, { 209, 23 }, { 197, 21 }, { 185, 20 }, { 173, 21 }, { 161, 22 }, + { 224, 33 }, { 209, 33 }, { 197, 31 }, { 185, 30 }, { 173, 31 }, { 161, 32 }, { 146, 32 }, + { 220, 43 }, { 209, 43 }, { 197, 41 }, { 185, 40 }, { 173, 41 }, + { 135, 41 }, { 124, 46 }, + { 129, 55 }, + { 152, 54 }, { 141, 59 }, { 134, 64 }, + }, { + // LED Index to Flag + // Left half + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, + 1, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, + 1, 1, + 1, + 1, 1, 1, + // Right half (mirrored) + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, + 1, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, + 1, 1, + 1, + 1, 1, 1, + } +}; +#endif diff --git a/keyboards/ergodox_infinity/matrix.c b/keyboards/ergodox_infinity/matrix.c index 7baacd24d0..0fca56a979 100644 --- a/keyboards/ergodox_infinity/matrix.c +++ b/keyboards/ergodox_infinity/matrix.c @@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "print.h" #include "debug.h" #include "matrix.h" -#include "eeconfig.h" +#include "keyboard.h" #include "serial_link/system/serial_link.h" @@ -119,15 +119,9 @@ uint8_t matrix_scan(void) } uint8_t offset = 0; -#if (defined(EE_HANDS) || defined(MASTER_IS_ON_RIGHT)) -#ifdef EE_HANDS - if (is_serial_link_master() && !eeconfig_read_handedness()) { -#else - if (is_serial_link_master()) { -#endif + if (is_serial_link_master() && !is_keyboard_left()) { offset = MATRIX_ROWS - LOCAL_MATRIX_ROWS; } -#endif if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { for (int row = 0; row < LOCAL_MATRIX_ROWS; row++) { @@ -167,17 +161,11 @@ void matrix_print(void) void matrix_set_remote(matrix_row_t* rows, uint8_t index) { uint8_t offset = 0; -#ifdef EE_HANDS - if (eeconfig_read_handedness()) { + if (is_keyboard_left()) { offset = LOCAL_MATRIX_ROWS * (index + 1); } else { offset = MATRIX_ROWS - LOCAL_MATRIX_ROWS * (index + 2); } -#elif defined(MASTER_IS_ON_RIGHT) - offset = MATRIX_ROWS - LOCAL_MATRIX_ROWS * (index + 2); -#else - offset = LOCAL_MATRIX_ROWS * (index + 1); -#endif for (int row = 0; row < LOCAL_MATRIX_ROWS; row++) { matrix[offset + row] = rows[row]; } diff --git a/keyboards/ergodox_infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk index b9ead9e87c..70bcabe80e 100644 --- a/keyboards/ergodox_infinity/rules.mk +++ b/keyboards/ergodox_infinity/rules.mk @@ -22,8 +22,6 @@ CUSTOM_MATRIX = yes # Custom matrix file SERIAL_LINK_ENABLE = yes VISUALIZER_ENABLE = yes LCD_ENABLE = yes -BACKLIGHT_ENABLE = yes -BACKLIGHT_DRIVER = custom LCD_BACKLIGHT_ENABLE = yes MIDI_ENABLE = no RGBLIGHT_ENABLE = no @@ -32,9 +30,8 @@ LCD_DRIVER = st7565 LCD_WIDTH = 128 LCD_HEIGHT = 32 -LED_DRIVER = is31fl3731c -LED_WIDTH = 7 -LED_HEIGHT = 7 +LED_MATRIX_ENABLE = yes +LED_MATRIX_DRIVER = IS31FL3731 # project specific files SRC = matrix.c \ diff --git a/keyboards/evil80/rules.mk b/keyboards/evil80/rules.mk index 46b76962b6..ebf0156df1 100644 --- a/keyboards/evil80/rules.mk +++ b/keyboards/evil80/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/geekboards/macropad_v2/config.h b/keyboards/geekboards/macropad_v2/config.h index 5f11cdddb0..d0e208f9b9 100644 --- a/keyboards/geekboards/macropad_v2/config.h +++ b/keyboards/geekboards/macropad_v2/config.h @@ -41,7 +41,7 @@ #define WS2812_DMA_CHANNEL 3 #ifdef RGB_MATRIX_ENABLE -#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define DISABLE_RGB_MATRIX_ALPHAS_MODS #define DISABLE_RGB_MATRIX_BAND_SAT @@ -67,7 +67,7 @@ #define RGB_MATRIX_STARTUP_SPD 30 #endif //RGB_MATRIX_ENABLE -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define WAIT_FOR_USB /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/geekboards/tester/config.h b/keyboards/geekboards/tester/config.h index 4f072c0ee6..3e3daccd57 100644 --- a/keyboards/geekboards/tester/config.h +++ b/keyboards/geekboards/tester/config.h @@ -24,7 +24,7 @@ #define DEBOUNCE 3 #ifdef RGB_MATRIX_ENABLE #define RGB_DISABLE_AFTER_TIMEOUT 0 -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_KEYPRESSES #define DISABLE_RGB_MATRIX_SPLASH #define DISABLE_RGB_MATRIX_MULTISPLASH @@ -36,4 +36,4 @@ #define DRIVER_1_LED_TOTAL 8 #define DRIVER_2_LED_TOTAL 0 #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -#endif
\ No newline at end of file +#endif diff --git a/keyboards/gh60/satan/keymaps/addcninblue/rules.mk b/keyboards/gh60/satan/keymaps/addcninblue/rules.mk index fd7f34300b..2193708706 100644 --- a/keyboards/gh60/satan/keymaps/addcninblue/rules.mk +++ b/keyboards/gh60/satan/keymaps/addcninblue/rules.mk @@ -18,4 +18,3 @@ UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings diff --git a/keyboards/gh60/satan/keymaps/admiralStrokers/rules.mk b/keyboards/gh60/satan/keymaps/admiralStrokers/rules.mk index 7c3f5bd90b..b409d10bd6 100644 --- a/keyboards/gh60/satan/keymaps/admiralStrokers/rules.mk +++ b/keyboards/gh60/satan/keymaps/admiralStrokers/rules.mk @@ -18,5 +18,3 @@ UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose for detai BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no# Breathing sleep LED during USB suspend -API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings - diff --git a/keyboards/gmmk/pro/config.h b/keyboards/gmmk/pro/config.h index ab3c7a7a21..64062becea 100644 --- a/keyboards/gmmk/pro/config.h +++ b/keyboards/gmmk/pro/config.h @@ -46,3 +46,20 @@ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE + +/* SPI Config for LED Driver */ +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A5 +#define SPI_MOSI_PIN A6 +#define SPI_MISO_PIN A7 + +#define DRIVER_1_CS B13 +#define DRIVER_2_CS B14 +#define DRIVER_1_EN C13 +#define DRIVER_2_EN C13 + +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 66 +#define DRIVER_2_LED_TOTAL 32 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) + diff --git a/keyboards/gmmk/pro/halconf.h b/keyboards/gmmk/pro/halconf.h new file mode 100644 index 0000000000..23ecb202a1 --- /dev/null +++ b/keyboards/gmmk/pro/halconf.h @@ -0,0 +1,7 @@ +#pragma once + +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + +#include_next <halconf.h> diff --git a/keyboards/gmmk/pro/mcuconf.h b/keyboards/gmmk/pro/mcuconf.h new file mode 100644 index 0000000000..bb1c0acde2 --- /dev/null +++ b/keyboards/gmmk/pro/mcuconf.h @@ -0,0 +1,6 @@ +#pragma once + +#include_next <mcuconf.h> + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE diff --git a/keyboards/gmmk/pro/pro.c b/keyboards/gmmk/pro/pro.c index 816d089a58..9ed7ac8865 100644 --- a/keyboards/gmmk/pro/pro.c +++ b/keyboards/gmmk/pro/pro.c @@ -14,3 +14,225 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "pro.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + { 4, NO_LED, NO_LED, 95, 65, 79, 5, 28 }, + { 8, 2, 9, 0, 10, 75, 1, 7 }, + { 14, 3, 15, NO_LED, 16, 86, 6, 13 }, + { 20, 18, 21, 23, 22, 94, 12, 19 }, + { 25, 30, 26, 31, 27, 32, 29, 24 }, + { 41, 36, 42, 37, 43, 38, 35, 40 }, + { 46, 89, 47, 34, 48, 72, 78, 45 }, + { 52, 39, 53, 97, 54, 82, 44, 51 }, + { 58, 63, 59, 64, NO_LED, 60, 62, 57 }, + { 11, 90, 55, 17, 33, 49, NO_LED, 69 }, + { NO_LED, 85, 93, 61, 96, 66, 50, 56 } +}, { + { 0, 0 }, // 0, ESC, k13 + { 0, 15 }, // 1, ~, k16 + { 4, 26 }, // 2, Tab, k11 + { 5, 38 }, // 3, Caps, k21 + { 9, 49 }, // 4, Sh_L, k00 + { 2, 61 }, // 5, Ct_L, k06 + { 18, 0 }, // 6, F1, k26 + { 14, 15 }, // 7, 1, k17 + { 22, 26 }, // 8, Q, k10 + { 25, 38 }, // 9, A, k12 + { 33, 49 }, // 10, Z, k14 + { 20, 61 }, // 11, Win_L, k90 + { 33, 0 }, // 12, F2, k36 + { 29, 15 }, // 13, 2, k27 + { 36, 26 }, // 14, W, k20 + { 40, 38 }, // 15, S, k22 + { 47, 49 }, // 16, X, k24 + { 38, 61 }, // 17, Alt_L, k93 + { 47, 0 }, // 18, F3, k31 + { 43, 15 }, // 19, 3, k37 + { 51, 26 }, // 20, E, k30 + { 54, 38 }, // 21, D, k32 + { 61, 49 }, // 22, C, k34 + { 61, 0 }, // 23, F4, k33 + { 58, 15 }, // 24, 4, k47 + { 65, 26 }, // 25, R, k40 + { 69, 38 }, // 26, F, k42 + { 76, 49 }, // 27, V, k44 + { 79, 0 }, // 28, F5, k07 + { 72, 15 }, // 29, 5, k46 + { 79, 26 }, // 30, T, k41 + { 83, 38 }, // 31, G, k43 + { 90, 49 }, // 32, B, k45 + { 92, 61 }, // 33, SPACE, k94 + { 94, 0 }, // 34, F6, k63 + { 87, 15 }, // 35, 6, k56 + { 94, 26 }, // 36, Y, k51 + { 98, 38 }, // 37, H, k53 + { 105, 49 }, // 38, N, k55 + { 108, 0 }, // 39, F7, k71 + { 101, 15 }, // 40, 7, k57 + { 108, 26 }, // 41, U, k50 + { 112, 38 }, // 42, J, k52 + { 119, 49 }, // 43, M, k54 + { 123, 0 }, // 44, F8, k76 + { 116, 15 }, // 45, 8, k67 + { 123, 26 }, // 46, I, k60 + { 126, 38 }, // 47, K, k62 + { 134, 49 }, // 48, ,, k64 + { 145, 61 }, // 49, Alt_R, k95 + { 141, 0 }, // 50, F9, ka6 + { 130, 15 }, // 51, 9, k77 + { 137, 26 }, // 52, O, k70 + { 141, 38 }, // 53, L, k72 + { 148, 49 }, // 54, ., k74 + { 159, 61 }, // 55, FN, k92 + { 155, 0 }, // 56, F10, ka7 + { 145, 15 }, // 57, 0, k87 + { 152, 26 }, // 58, P, k80 + { 155, 38 }, // 59, ;, k82 + { 163, 49 }, // 60, ?, k85 + { 170, 0 }, // 61, F11, ka3 + { 159, 15 }, // 62, -, k86 + { 166, 26 }, // 63, [, k81 + { 170, 38 }, // 64, ", k83 + { 173, 61 }, // 65, Ct_R, k04 + { 184, 0 }, // 66, F12, ka5 + { 0, 8 }, // 67, LED, l01 + { 224, 8 }, // 68, LED, l11 + { 202, 0 }, // 69, Prt, k97 + { 0, 15 }, // 70, LED, l02 + { 224, 15 }, // 71, LED, l12 + { 224, 15 }, // 72, Del, k65 + { 0, 21 }, // 73, LED, l03 + { 224, 21 }, // 74, LED, l13 + { 224, 26 }, // 75, PgUp, k15 + { 0, 28 }, // 76, LED, l04 + { 224, 28 }, // 77, LED, l14 + { 173, 15 }, // 78, =, k66 + { 220, 64 }, // 79, Right, k05 + { 0, 35 }, // 80, LED, l05 + { 224, 35 }, // 81, LED, l15 + { 224, 49 }, // 82, End, k75 + { 0, 42 }, // 83, LED, l06 + { 224, 42 }, // 84, LED, l16 + { 195, 15 }, // 85, BSpc, ka1 + { 224, 38 }, // 86, PgDn, k25 + { 0, 48 }, // 87, LED, l07 + { 224, 48 }, // 88, LED, l17 + { 181, 26 }, // 89, ], k61 + { 182, 49 }, // 90, Sh_R, k91 + { 0, 55 }, // 91, LED, l08 + { 224, 55 }, // 92, LED, l18 + { 199, 26 }, // 93, \, ka2 + { 206, 52 }, // 94, Up, k35 + { 191, 64 }, // 95, Left, k03 + { 193, 38 }, // 96, Enter, ka4 + { 206, 64 } // 97, Down, k73 +}, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 4, 2, 2, 4, 2, 2, + 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4 +} }; + +const aw_led g_aw_leds[DRIVER_LED_TOTAL] = { + { 0, CS1_SW1, CS2_SW1, CS3_SW1 }, // 0, ESC, k13 + { 0, CS4_SW1, CS5_SW1, CS6_SW1 }, // 1, ~, k16 + { 0, CS7_SW1, CS8_SW1, CS9_SW1 }, // 2, Tab, k11 + { 0, CS10_SW1, CS11_SW1, CS12_SW1 }, // 3, Caps, k21 + { 0, CS13_SW1, CS14_SW1, CS15_SW1 }, // 4, Sh_L, k00 + { 0, CS16_SW1, CS17_SW1, CS18_SW1 }, // 5, Ct_L, k06 + { 0, CS1_SW2, CS2_SW2, CS3_SW2 }, // 6, F1, k26 + { 0, CS4_SW2, CS5_SW2, CS6_SW2 }, // 7, 1, k17 + { 0, CS7_SW2, CS8_SW2, CS9_SW2 }, // 8, Q, k10 + { 0, CS10_SW2, CS11_SW2, CS12_SW2 }, // 9, A, k12 + { 0, CS13_SW2, CS14_SW2, CS15_SW2 }, // 10, Z, k14 + { 0, CS16_SW2, CS17_SW2, CS18_SW2 }, // 11, Win_L, k90 + { 0, CS1_SW3, CS2_SW3, CS3_SW3 }, // 12, F2, k36 + { 0, CS4_SW3, CS5_SW3, CS6_SW3 }, // 13, 2, k27 + { 0, CS7_SW3, CS8_SW3, CS9_SW3 }, // 14, W, k20 + { 0, CS10_SW3, CS11_SW3, CS12_SW3 }, // 15, S, k22 + { 0, CS13_SW3, CS14_SW3, CS15_SW3 }, // 16, X, k24 + { 0, CS16_SW3, CS17_SW3, CS18_SW3 }, // 17, Alt_L, k93 + { 0, CS1_SW4, CS2_SW4, CS3_SW4 }, // 18, F3, k31 + { 0, CS4_SW4, CS5_SW4, CS6_SW4 }, // 19, 3, k37 + { 0, CS7_SW4, CS8_SW4, CS9_SW4 }, // 20, E, k30 + { 0, CS10_SW4, CS11_SW4, CS12_SW4 }, // 21, D, k32 + { 0, CS13_SW4, CS14_SW4, CS15_SW4 }, // 22, C, k34 + { 0, CS1_SW5, CS2_SW5, CS3_SW5 }, // 23, F4, k33 + { 0, CS4_SW5, CS5_SW5, CS6_SW5 }, // 24, 4, k47 + { 0, CS7_SW5, CS8_SW5, CS9_SW5 }, // 25, R, k40 + { 0, CS10_SW5, CS11_SW5, CS12_SW5 }, // 26, F, k42 + { 0, CS13_SW5, CS14_SW5, CS15_SW5 }, // 27, V, k44 + { 0, CS1_SW6, CS2_SW6, CS3_SW6 }, // 28, F5, k07 + { 0, CS4_SW6, CS5_SW6, CS6_SW6 }, // 29, 5, k46 + { 0, CS7_SW6, CS8_SW6, CS9_SW6 }, // 30, T, k41 + { 0, CS10_SW6, CS11_SW6, CS12_SW6 }, // 31, G, k43 + { 0, CS13_SW6, CS14_SW6, CS15_SW6 }, // 32, B, k45 + { 0, CS16_SW6, CS17_SW6, CS18_SW6 }, // 33, SPACE, k94 + { 0, CS1_SW7, CS2_SW7, CS3_SW7 }, // 34, F6, k63 + { 0, CS4_SW7, CS5_SW7, CS6_SW7 }, // 35, 6, k56 + { 0, CS7_SW7, CS8_SW7, CS9_SW7 }, // 36, Y, k51 + { 0, CS10_SW7, CS11_SW7, CS12_SW7 }, // 37, H, k53 + { 0, CS13_SW7, CS14_SW7, CS15_SW7 }, // 38, N, k55 + { 0, CS1_SW8, CS2_SW8, CS3_SW8 }, // 39, F7, k71 + { 0, CS4_SW8, CS5_SW8, CS6_SW8 }, // 40, 7, k57 + { 0, CS7_SW8, CS8_SW8, CS9_SW8 }, // 41, U, k50 + { 0, CS10_SW8, CS11_SW8, CS12_SW8 }, // 42, J, k52 + { 0, CS13_SW8, CS14_SW8, CS15_SW8 }, // 43, M, k54 + { 0, CS1_SW9, CS2_SW9, CS3_SW9 }, // 44, F8, k76 + { 0, CS4_SW9, CS5_SW9, CS6_SW9 }, // 45, 8, k67 + { 0, CS7_SW9, CS8_SW9, CS9_SW9 }, // 46, I, k60 + { 0, CS10_SW9, CS11_SW9, CS12_SW9 }, // 47, K, k62 + { 0, CS13_SW9, CS14_SW9, CS15_SW9 }, // 48, ,, k64 + { 0, CS16_SW9, CS17_SW9, CS18_SW9 }, // 49, Alt_R, k95 + { 0, CS1_SW10, CS2_SW10, CS3_SW10 }, // 50, F9, ka6 + { 0, CS4_SW10, CS5_SW10, CS6_SW10 }, // 51, 9, k77 + { 0, CS7_SW10, CS8_SW10, CS9_SW10 }, // 52, O, k70 + { 0, CS10_SW10, CS11_SW10, CS12_SW10 }, // 53, L, k72 + { 0, CS13_SW10, CS14_SW10, CS15_SW10 }, // 54, ., k74 + { 0, CS16_SW10, CS17_SW10, CS18_SW10 }, // 55, FN, k92 + { 0, CS1_SW11, CS2_SW11, CS3_SW11 }, // 56, F10, ka7 + { 0, CS4_SW11, CS5_SW11, CS6_SW11 }, // 57, 0, k87 + { 0, CS7_SW11, CS8_SW11, CS9_SW11 }, // 58, P, k80 + { 0, CS10_SW11, CS11_SW11, CS12_SW11 }, // 59, ;, k82 + { 0, CS13_SW11, CS14_SW11, CS15_SW11 }, // 60, ?, k85 + { 0, CS1_SW12, CS2_SW12, CS3_SW12 }, // 61, F11, ka3 + { 0, CS4_SW12, CS5_SW12, CS6_SW12 }, // 62, -, k86 + { 0, CS7_SW12, CS8_SW12, CS9_SW12 }, // 63, [, k81 + { 0, CS10_SW12, CS11_SW12, CS12_SW12 }, // 64, ", k83 + { 0, CS16_SW12, CS17_SW12, CS18_SW12 }, // 65, Ct_R, k04 + + { 1, CS1_SW1, CS2_SW1, CS3_SW1 }, // 66, F12, ka5 + { 1, CS13_SW1, CS14_SW1, CS15_SW1 }, // 67, LED, l01 + { 1, CS16_SW1, CS17_SW1, CS18_SW1 }, // 68, LED, l11 + { 1, CS4_SW2, CS5_SW2, CS6_SW2 }, // 69, Prt, k97 + { 1, CS13_SW2, CS14_SW2, CS15_SW2 }, // 70, LED, l02 + { 1, CS16_SW2, CS17_SW2, CS18_SW2 }, // 71, LED, l12 + { 1, CS4_SW3, CS5_SW3, CS6_SW3 }, // 72, Del, k65 + { 1, CS13_SW3, CS14_SW3, CS15_SW3 }, // 73, LED, l03 + { 1, CS16_SW3, CS17_SW3, CS18_SW3 }, // 74, LED, l13 + { 1, CS4_SW4, CS5_SW4, CS6_SW4 }, // 75, PgUp, k15 + { 1, CS13_SW4, CS14_SW4, CS15_SW4 }, // 76, LED, l04 + { 1, CS16_SW4, CS17_SW4, CS18_SW4 }, // 77, LED, l14 + { 1, CS1_SW5, CS2_SW5, CS3_SW5 }, // 78, =, k66 + { 1, CS10_SW5, CS11_SW5, CS12_SW5 }, // 79, Right, k05 + { 1, CS13_SW5, CS14_SW5, CS15_SW5 }, // 80, LED, l05 + { 1, CS16_SW5, CS17_SW5, CS18_SW5 }, // 81, LED, l15 + { 1, CS4_SW6, CS5_SW6, CS6_SW6 }, // 82, End, k75 + { 1, CS13_SW6, CS14_SW6, CS15_SW6 }, // 83, LED, l06 + { 1, CS16_SW6, CS17_SW6, CS18_SW6 }, // 84, LED, l16 + { 1, CS1_SW7, CS2_SW7, CS3_SW7 }, // 85, BSpc, ka1 + { 1, CS4_SW7, CS5_SW7, CS6_SW7 }, // 86, PgDn, k25 + { 1, CS13_SW7, CS14_SW7, CS15_SW7 }, // 87, LED, l07 + { 1, CS16_SW7, CS17_SW7, CS18_SW7 }, // 88, LED, l17 + { 1, CS1_SW8, CS2_SW8, CS3_SW8 }, // 89, ], k61 + { 1, CS4_SW8, CS5_SW8, CS6_SW8 }, // 90, Sh_R, k91 + { 1, CS13_SW8, CS14_SW8, CS15_SW8 }, // 91, LED, l08 + { 1, CS16_SW8, CS17_SW8, CS18_SW8 }, // 92, LED, l18 + { 1, CS1_SW9, CS2_SW9, CS3_SW9 }, // 93, \, ka2 + { 1, CS4_SW9, CS5_SW9, CS6_SW9 }, // 94, Up, k35 + { 1, CS4_SW10, CS5_SW10, CS6_SW10 }, // 95, Left, k03 + { 1, CS1_SW11, CS2_SW11, CS3_SW11 }, // 96, Enter, ka4 + { 1, CS4_SW11, CS5_SW11, CS6_SW11 }, // 97, Down, k73 +}; +#endif diff --git a/keyboards/gmmk/pro/rules.mk b/keyboards/gmmk/pro/rules.mk index b12d055a3d..6221d64082 100644 --- a/keyboards/gmmk/pro/rules.mk +++ b/keyboards/gmmk/pro/rules.mk @@ -21,3 +21,5 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = AW20216 diff --git a/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk b/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk index 6151bcf231..3880c80669 100644 --- a/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk +++ b/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk @@ -18,7 +18,6 @@ UNICODEMAP_ENABLE = no # Enable extended unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 #VARIABLE_TRACE = no # Use this to debug changes to variable values -API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings KEY_LOCK_ENABLE = no # This enables key lock SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common TAP_DANCE_ENABLE = no # Enable TapDance functionality diff --git a/keyboards/hadron/ver2/rules.mk b/keyboards/hadron/ver2/rules.mk index 7e2ebf5671..a142b92703 100644 --- a/keyboards/hadron/ver2/rules.mk +++ b/keyboards/hadron/ver2/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = yes SWAP_HANDS_ENABLE = no # Enable one-hand typing # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/handwired/412_64/rules.mk b/keyboards/handwired/412_64/rules.mk index 044a6d01e9..bf8ddad456 100644 --- a/keyboards/handwired/412_64/rules.mk +++ b/keyboards/handwired/412_64/rules.mk @@ -28,5 +28,3 @@ MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 - -LAYOUTS = ortho_4x16 diff --git a/keyboards/handwired/6key/keymaps/default/keymap.c b/keyboards/handwired/6key/keymaps/default/keymap.c index 509d999e54..ad73597bab 100644 --- a/keyboards/handwired/6key/keymaps/default/keymap.c +++ b/keyboards/handwired/6key/keymaps/default/keymap.c @@ -1,17 +1,17 @@ - /* Copyright 2020 Bratzworth - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + /* Copyright 2020 Bratzworth + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include QMK_KEYBOARD_H @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { if (active) { @@ -43,4 +43,5 @@ void dip_switch_update_user(uint8_t index, bool active) { } } } -}
\ No newline at end of file + return true; +} diff --git a/keyboards/handwired/colorlice/config.h b/keyboards/handwired/colorlice/config.h index 206a4004ea..0148817f3f 100644 --- a/keyboards/handwired/colorlice/config.h +++ b/keyboards/handwired/colorlice/config.h @@ -49,7 +49,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* RGB LEDs */ #define RGB_DI_PIN B1 #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_LED_PROCESS_LIMIT 4 diff --git a/keyboards/handwired/dactyl/rules.mk b/keyboards/handwired/dactyl/rules.mk index 2e740e3847..202882c720 100644 --- a/keyboards/handwired/dactyl/rules.mk +++ b/keyboards/handwired/dactyl/rules.mk @@ -26,7 +26,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover UNICODE_ENABLE = yes # Unicode SWAP_HANDS_ENABLE = yes # Allow swapping hands of keyboard SLEEP_LED_ENABLE = no -API_SYSEX_ENABLE = no RGBLIGHT_ENABLE = no # project specific files diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/rules.mk b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/rules.mk deleted file mode 100644 index 457cda5b0a..0000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -USER_NAME := drashna -SRC += ../drashna/keymap.c - -include $(KEYBOARD_PATH_1)/keymaps/drashna/rules.mk diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.c b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.c deleted file mode 100644 index 59e3495127..0000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.c +++ /dev/null @@ -1,221 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> - * Copyright 2019 Sunjun Kim - * Copyright 2020 Ploopy Corporation - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#ifdef POINTING_DEVICE_ENABLE - -#include "wait.h" -#include "debug.h" -#include "print.h" -#include "pmw3360.h" -#include "pmw3360_firmware.h" - -bool _inBurst = false; - -#ifndef PMW_CPI -# define PMW_CPI 1600 -#endif -#ifndef SPI_DIVISOR -# define SPI_DIVISOR 2 -#endif -#ifndef ROTATIONAL_TRANSFORM_ANGLE -# define ROTATIONAL_TRANSFORM_ANGLE 0x00 -#endif - -void print_byte(uint8_t byte) { dprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); } - -bool spi_start_adv(void) { - bool status = spi_start(SPI_SS_PIN, false, 3, SPI_DIVISOR); - wait_us(1); - return status; -} - -void spi_stop_adv(void) { - wait_us(1); - spi_stop(); -} - -spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data) { - if (reg_addr != REG_Motion_Burst) { - _inBurst = false; - } - - spi_start_adv(); - // send address of the register, with MSBit = 1 to indicate it's a write - spi_status_t status = spi_write(reg_addr | 0x80); - status = spi_write(data); - - // tSCLK-NCS for write operation - wait_us(20); - - // tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound - wait_us(100); - spi_stop(); - return status; -} - -uint8_t spi_read_adv(uint8_t reg_addr) { - spi_start_adv(); - // send adress of the register, with MSBit = 0 to indicate it's a read - spi_write(reg_addr & 0x7f); - - uint8_t data = spi_read(); - - // tSCLK-NCS for read operation is 120ns - wait_us(1); - - // tSRW/tSRR (=20us) minus tSCLK-NCS - wait_us(19); - - spi_stop(); - return data; -} - -void pmw_set_cpi(uint16_t cpi) { - int cpival = constrain((cpi / 100) - 1, 0, 0x77); // limits to 0--119 - - spi_start_adv(); - spi_write_adv(REG_Config1, cpival); - spi_stop(); -} - -bool pmw_spi_init(void) { - spi_init(); - _inBurst = false; - - spi_stop(); - spi_start_adv(); - spi_stop(); - - spi_write_adv(REG_Shutdown, 0xb6); // Shutdown first - wait_ms(300); - - spi_start_adv(); - wait_us(40); - spi_stop_adv(); - wait_us(40); - - spi_write_adv(REG_Power_Up_Reset, 0x5a); - wait_ms(50); - - spi_read_adv(REG_Motion); - spi_read_adv(REG_Delta_X_L); - spi_read_adv(REG_Delta_X_H); - spi_read_adv(REG_Delta_Y_L); - spi_read_adv(REG_Delta_Y_H); - - pmw_upload_firmware(); - - spi_stop_adv(); - - wait_ms(10); - pmw_set_cpi(PMW_CPI); - - wait_ms(1); - - return pmw_check_signature(); -} - -void pmw_upload_firmware(void) { - spi_write_adv(REG_Config2, 0x00); - - spi_write_adv(REG_Angle_Tune, constrain(ROTATIONAL_TRANSFORM_ANGLE, -30, 30)); - - spi_write_adv(REG_SROM_Enable, 0x1d); - - wait_ms(10); - - spi_write_adv(REG_SROM_Enable, 0x18); - - spi_start_adv(); - spi_write(REG_SROM_Load_Burst | 0x80); - wait_us(15); - - unsigned char c; - for (int i = 0; i < firmware_length; i++) { - c = (unsigned char)pgm_read_byte(firmware_data + i); - spi_write(c); - wait_us(15); - } - wait_us(200); - - spi_read_adv(REG_SROM_ID); - - spi_write_adv(REG_Config2, 0x00); - - spi_stop(); - wait_ms(10); -} - -bool pmw_check_signature(void) { - uint8_t pid = spi_read_adv(REG_Product_ID); - uint8_t iv_pid = spi_read_adv(REG_Inverse_Product_ID); - uint8_t SROM_ver = spi_read_adv(REG_SROM_ID); - return (pid == 0x42 && iv_pid == 0xBD && SROM_ver == 0x04); // signature for SROM 0x04 -} - -report_pmw_t pmw_read_burst(void) { - if (!_inBurst) { - dprintf("burst on"); - spi_write_adv(REG_Motion_Burst, 0x00); - _inBurst = true; - } - - spi_start_adv(); - spi_write(REG_Motion_Burst); - wait_us(35); // waits for tSRAD - - report_pmw_t data; - data.motion = 0; - data.dx = 0; - data.mdx = 0; - data.dy = 0; - data.mdx = 0; - - data.motion = spi_read(); - spi_write(0x00); // skip Observation - data.dx = spi_read(); - data.mdx = spi_read(); - data.dy = spi_read(); - data.mdy = spi_read(); - - spi_stop(); - - print_byte(data.motion); - print_byte(data.dx); - print_byte(data.mdx); - print_byte(data.dy); - print_byte(data.mdy); - dprintf("\n"); - - data.isMotion = (data.motion & 0x80) != 0; - data.isOnSurface = (data.motion & 0x08) == 0; - data.dx |= (data.mdx << 8); - data.dx = data.dx * -1; - data.dy |= (data.mdy << 8); - data.dy = data.dy * -1; - - spi_stop(); - - if (data.motion & 0b111) { // panic recovery, sometimes burst mode works weird. - _inBurst = false; - } - - return data; -} - -#endif diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.h b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.h deleted file mode 100644 index c1d5e3badb..0000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.h +++ /dev/null @@ -1,103 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> - * Copyright 2019 Sunjun Kim - * Copyright 2020 Ploopy Corporation - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#include "spi_master.h" - -// Registers -#define REG_Product_ID 0x00 -#define REG_Revision_ID 0x01 -#define REG_Motion 0x02 -#define REG_Delta_X_L 0x03 -#define REG_Delta_X_H 0x04 -#define REG_Delta_Y_L 0x05 -#define REG_Delta_Y_H 0x06 -#define REG_SQUAL 0x07 -#define REG_Raw_Data_Sum 0x08 -#define REG_Maximum_Raw_data 0x09 -#define REG_Minimum_Raw_data 0x0A -#define REG_Shutter_Lower 0x0B -#define REG_Shutter_Upper 0x0C -#define REG_Control 0x0D -#define REG_Config1 0x0F -#define REG_Config2 0x10 -#define REG_Angle_Tune 0x11 -#define REG_Frame_Capture 0x12 -#define REG_SROM_Enable 0x13 -#define REG_Run_Downshift 0x14 -#define REG_Rest1_Rate_Lower 0x15 -#define REG_Rest1_Rate_Upper 0x16 -#define REG_Rest1_Downshift 0x17 -#define REG_Rest2_Rate_Lower 0x18 -#define REG_Rest2_Rate_Upper 0x19 -#define REG_Rest2_Downshift 0x1A -#define REG_Rest3_Rate_Lower 0x1B -#define REG_Rest3_Rate_Upper 0x1C -#define REG_Observation 0x24 -#define REG_Data_Out_Lower 0x25 -#define REG_Data_Out_Upper 0x26 -#define REG_Raw_Data_Dump 0x29 -#define REG_SROM_ID 0x2A -#define REG_Min_SQ_Run 0x2B -#define REG_Raw_Data_Threshold 0x2C -#define REG_Config5 0x2F -#define REG_Power_Up_Reset 0x3A -#define REG_Shutdown 0x3B -#define REG_Inverse_Product_ID 0x3F -#define REG_LiftCutoff_Tune3 0x41 -#define REG_Angle_Snap 0x42 -#define REG_LiftCutoff_Tune1 0x4A -#define REG_Motion_Burst 0x50 -#define REG_LiftCutoff_Tune_Timeout 0x58 -#define REG_LiftCutoff_Tune_Min_Length 0x5A -#define REG_SROM_Load_Burst 0x62 -#define REG_Lift_Config 0x63 -#define REG_Raw_Data_Burst 0x64 -#define REG_LiftCutoff_Tune2 0x65 - -#ifdef CONSOLE_ENABLE -void print_byte(uint8_t byte); -#endif - -typedef struct { - int8_t motion; - bool isMotion; // True if a motion is detected. - bool isOnSurface; // True when a chip is on a surface - int16_t dx; // displacement on x directions. Unit: Count. (CPI * Count = Inch value) - int8_t mdx; - int16_t dy; // displacement on y directions. - int8_t mdy; -} report_pmw_t; - - - -bool spi_start_adv(void); -void spi_stop_adv(void); -spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data); -uint8_t spi_read_adv(uint8_t reg_addr); -bool pmw_spi_init(void); -void pmw_set_cpi(uint16_t cpi); -void pmw_upload_firmware(void); -bool pmw_check_signature(void); -report_pmw_t pmw_read_burst(void); - - -#define degToRad(angleInDegrees) ((angleInDegrees)*M_PI / 180.0) -#define radToDeg(angleInRadians) ((angleInRadians)*180.0 / M_PI) -#define constrain(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt))) diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360_firmware.h b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360_firmware.h deleted file mode 100644 index cca5a6a4d8..0000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360_firmware.h +++ /dev/null @@ -1,300 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> - * Copyright 2019 Sunjun Kim - * Copyright 2020 Ploopy Corporation - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -// clang-format off -// Firmware Blob foor PMW3360 -const uint16_t firmware_length = 4094; -// clang-format off -const uint8_t firmware_data[] PROGMEM = { // SROM 0x04 -0x01, 0x04, 0x8e, 0x96, 0x6e, 0x77, 0x3e, 0xfe, 0x7e, 0x5f, 0x1d, 0xb8, 0xf2, 0x66, 0x4e, -0xff, 0x5d, 0x19, 0xb0, 0xc2, 0x04, 0x69, 0x54, 0x2a, 0xd6, 0x2e, 0xbf, 0xdd, 0x19, 0xb0, -0xc3, 0xe5, 0x29, 0xb1, 0xe0, 0x23, 0xa5, 0xa9, 0xb1, 0xc1, 0x00, 0x82, 0x67, 0x4c, 0x1a, -0x97, 0x8d, 0x79, 0x51, 0x20, 0xc7, 0x06, 0x8e, 0x7c, 0x7c, 0x7a, 0x76, 0x4f, 0xfd, 0x59, -0x30, 0xe2, 0x46, 0x0e, 0x9e, 0xbe, 0xdf, 0x1d, 0x99, 0x91, 0xa0, 0xa5, 0xa1, 0xa9, 0xd0, -0x22, 0xc6, 0xef, 0x5c, 0x1b, 0x95, 0x89, 0x90, 0xa2, 0xa7, 0xcc, 0xfb, 0x55, 0x28, 0xb3, -0xe4, 0x4a, 0xf7, 0x6c, 0x3b, 0xf4, 0x6a, 0x56, 0x2e, 0xde, 0x1f, 0x9d, 0xb8, 0xd3, 0x05, -0x88, 0x92, 0xa6, 0xce, 0x1e, 0xbe, 0xdf, 0x1d, 0x99, 0xb0, 0xe2, 0x46, 0xef, 0x5c, 0x07, -0x11, 0x5d, 0x98, 0x0b, 0x9d, 0x94, 0x97, 0xee, 0x4e, 0x45, 0x33, 0x6b, 0x44, 0xc7, 0x29, -0x56, 0x27, 0x30, 0xc6, 0xa7, 0xd5, 0xf2, 0x56, 0xdf, 0xb4, 0x38, 0x62, 0xcb, 0xa0, 0xb6, -0xe3, 0x0f, 0x84, 0x06, 0x24, 0x05, 0x65, 0x6f, 0x76, 0x89, 0xb5, 0x77, 0x41, 0x27, 0x82, -0x66, 0x65, 0x82, 0xcc, 0xd5, 0xe6, 0x20, 0xd5, 0x27, 0x17, 0xc5, 0xf8, 0x03, 0x23, 0x7c, -0x5f, 0x64, 0xa5, 0x1d, 0xc1, 0xd6, 0x36, 0xcb, 0x4c, 0xd4, 0xdb, 0x66, 0xd7, 0x8b, 0xb1, -0x99, 0x7e, 0x6f, 0x4c, 0x36, 0x40, 0x06, 0xd6, 0xeb, 0xd7, 0xa2, 0xe4, 0xf4, 0x95, 0x51, -0x5a, 0x54, 0x96, 0xd5, 0x53, 0x44, 0xd7, 0x8c, 0xe0, 0xb9, 0x40, 0x68, 0xd2, 0x18, 0xe9, -0xdd, 0x9a, 0x23, 0x92, 0x48, 0xee, 0x7f, 0x43, 0xaf, 0xea, 0x77, 0x38, 0x84, 0x8c, 0x0a, -0x72, 0xaf, 0x69, 0xf8, 0xdd, 0xf1, 0x24, 0x83, 0xa3, 0xf8, 0x4a, 0xbf, 0xf5, 0x94, 0x13, -0xdb, 0xbb, 0xd8, 0xb4, 0xb3, 0xa0, 0xfb, 0x45, 0x50, 0x60, 0x30, 0x59, 0x12, 0x31, 0x71, -0xa2, 0xd3, 0x13, 0xe7, 0xfa, 0xe7, 0xce, 0x0f, 0x63, 0x15, 0x0b, 0x6b, 0x94, 0xbb, 0x37, -0x83, 0x26, 0x05, 0x9d, 0xfb, 0x46, 0x92, 0xfc, 0x0a, 0x15, 0xd1, 0x0d, 0x73, 0x92, 0xd6, -0x8c, 0x1b, 0x8c, 0xb8, 0x55, 0x8a, 0xce, 0xbd, 0xfe, 0x8e, 0xfc, 0xed, 0x09, 0x12, 0x83, -0x91, 0x82, 0x51, 0x31, 0x23, 0xfb, 0xb4, 0x0c, 0x76, 0xad, 0x7c, 0xd9, 0xb4, 0x4b, 0xb2, -0x67, 0x14, 0x09, 0x9c, 0x7f, 0x0c, 0x18, 0xba, 0x3b, 0xd6, 0x8e, 0x14, 0x2a, 0xe4, 0x1b, -0x52, 0x9f, 0x2b, 0x7d, 0xe1, 0xfb, 0x6a, 0x33, 0x02, 0xfa, 0xac, 0x5a, 0xf2, 0x3e, 0x88, -0x7e, 0xae, 0xd1, 0xf3, 0x78, 0xe8, 0x05, 0xd1, 0xe3, 0xdc, 0x21, 0xf6, 0xe1, 0x9a, 0xbd, -0x17, 0x0e, 0xd9, 0x46, 0x9b, 0x88, 0x03, 0xea, 0xf6, 0x66, 0xbe, 0x0e, 0x1b, 0x50, 0x49, -0x96, 0x40, 0x97, 0xf1, 0xf1, 0xe4, 0x80, 0xa6, 0x6e, 0xe8, 0x77, 0x34, 0xbf, 0x29, 0x40, -0x44, 0xc2, 0xff, 0x4e, 0x98, 0xd3, 0x9c, 0xa3, 0x32, 0x2b, 0x76, 0x51, 0x04, 0x09, 0xe7, -0xa9, 0xd1, 0xa6, 0x32, 0xb1, 0x23, 0x53, 0xe2, 0x47, 0xab, 0xd6, 0xf5, 0x69, 0x5c, 0x3e, -0x5f, 0xfa, 0xae, 0x45, 0x20, 0xe5, 0xd2, 0x44, 0xff, 0x39, 0x32, 0x6d, 0xfd, 0x27, 0x57, -0x5c, 0xfd, 0xf0, 0xde, 0xc1, 0xb5, 0x99, 0xe5, 0xf5, 0x1c, 0x77, 0x01, 0x75, 0xc5, 0x6d, -0x58, 0x92, 0xf2, 0xb2, 0x47, 0x00, 0x01, 0x26, 0x96, 0x7a, 0x30, 0xff, 0xb7, 0xf0, 0xef, -0x77, 0xc1, 0x8a, 0x5d, 0xdc, 0xc0, 0xd1, 0x29, 0x30, 0x1e, 0x77, 0x38, 0x7a, 0x94, 0xf1, -0xb8, 0x7a, 0x7e, 0xef, 0xa4, 0xd1, 0xac, 0x31, 0x4a, 0xf2, 0x5d, 0x64, 0x3d, 0xb2, 0xe2, -0xf0, 0x08, 0x99, 0xfc, 0x70, 0xee, 0x24, 0xa7, 0x7e, 0xee, 0x1e, 0x20, 0x69, 0x7d, 0x44, -0xbf, 0x87, 0x42, 0xdf, 0x88, 0x3b, 0x0c, 0xda, 0x42, 0xc9, 0x04, 0xf9, 0x45, 0x50, 0xfc, -0x83, 0x8f, 0x11, 0x6a, 0x72, 0xbc, 0x99, 0x95, 0xf0, 0xac, 0x3d, 0xa7, 0x3b, 0xcd, 0x1c, -0xe2, 0x88, 0x79, 0x37, 0x11, 0x5f, 0x39, 0x89, 0x95, 0x0a, 0x16, 0x84, 0x7a, 0xf6, 0x8a, -0xa4, 0x28, 0xe4, 0xed, 0x83, 0x80, 0x3b, 0xb1, 0x23, 0xa5, 0x03, 0x10, 0xf4, 0x66, 0xea, -0xbb, 0x0c, 0x0f, 0xc5, 0xec, 0x6c, 0x69, 0xc5, 0xd3, 0x24, 0xab, 0xd4, 0x2a, 0xb7, 0x99, -0x88, 0x76, 0x08, 0xa0, 0xa8, 0x95, 0x7c, 0xd8, 0x38, 0x6d, 0xcd, 0x59, 0x02, 0x51, 0x4b, -0xf1, 0xb5, 0x2b, 0x50, 0xe3, 0xb6, 0xbd, 0xd0, 0x72, 0xcf, 0x9e, 0xfd, 0x6e, 0xbb, 0x44, -0xc8, 0x24, 0x8a, 0x77, 0x18, 0x8a, 0x13, 0x06, 0xef, 0x97, 0x7d, 0xfa, 0x81, 0xf0, 0x31, -0xe6, 0xfa, 0x77, 0xed, 0x31, 0x06, 0x31, 0x5b, 0x54, 0x8a, 0x9f, 0x30, 0x68, 0xdb, 0xe2, -0x40, 0xf8, 0x4e, 0x73, 0xfa, 0xab, 0x74, 0x8b, 0x10, 0x58, 0x13, 0xdc, 0xd2, 0xe6, 0x78, -0xd1, 0x32, 0x2e, 0x8a, 0x9f, 0x2c, 0x58, 0x06, 0x48, 0x27, 0xc5, 0xa9, 0x5e, 0x81, 0x47, -0x89, 0x46, 0x21, 0x91, 0x03, 0x70, 0xa4, 0x3e, 0x88, 0x9c, 0xda, 0x33, 0x0a, 0xce, 0xbc, -0x8b, 0x8e, 0xcf, 0x9f, 0xd3, 0x71, 0x80, 0x43, 0xcf, 0x6b, 0xa9, 0x51, 0x83, 0x76, 0x30, -0x82, 0xc5, 0x6a, 0x85, 0x39, 0x11, 0x50, 0x1a, 0x82, 0xdc, 0x1e, 0x1c, 0xd5, 0x7d, 0xa9, -0x71, 0x99, 0x33, 0x47, 0x19, 0x97, 0xb3, 0x5a, 0xb1, 0xdf, 0xed, 0xa4, 0xf2, 0xe6, 0x26, -0x84, 0xa2, 0x28, 0x9a, 0x9e, 0xdf, 0xa6, 0x6a, 0xf4, 0xd6, 0xfc, 0x2e, 0x5b, 0x9d, 0x1a, -0x2a, 0x27, 0x68, 0xfb, 0xc1, 0x83, 0x21, 0x4b, 0x90, 0xe0, 0x36, 0xdd, 0x5b, 0x31, 0x42, -0x55, 0xa0, 0x13, 0xf7, 0xd0, 0x89, 0x53, 0x71, 0x99, 0x57, 0x09, 0x29, 0xc5, 0xf3, 0x21, -0xf8, 0x37, 0x2f, 0x40, 0xf3, 0xd4, 0xaf, 0x16, 0x08, 0x36, 0x02, 0xfc, 0x77, 0xc5, 0x8b, -0x04, 0x90, 0x56, 0xb9, 0xc9, 0x67, 0x9a, 0x99, 0xe8, 0x00, 0xd3, 0x86, 0xff, 0x97, 0x2d, -0x08, 0xe9, 0xb7, 0xb3, 0x91, 0xbc, 0xdf, 0x45, 0xc6, 0xed, 0x0f, 0x8c, 0x4c, 0x1e, 0xe6, -0x5b, 0x6e, 0x38, 0x30, 0xe4, 0xaa, 0xe3, 0x95, 0xde, 0xb9, 0xe4, 0x9a, 0xf5, 0xb2, 0x55, -0x9a, 0x87, 0x9b, 0xf6, 0x6a, 0xb2, 0xf2, 0x77, 0x9a, 0x31, 0xf4, 0x7a, 0x31, 0xd1, 0x1d, -0x04, 0xc0, 0x7c, 0x32, 0xa2, 0x9e, 0x9a, 0xf5, 0x62, 0xf8, 0x27, 0x8d, 0xbf, 0x51, 0xff, -0xd3, 0xdf, 0x64, 0x37, 0x3f, 0x2a, 0x6f, 0x76, 0x3a, 0x7d, 0x77, 0x06, 0x9e, 0x77, 0x7f, -0x5e, 0xeb, 0x32, 0x51, 0xf9, 0x16, 0x66, 0x9a, 0x09, 0xf3, 0xb0, 0x08, 0xa4, 0x70, 0x96, -0x46, 0x30, 0xff, 0xda, 0x4f, 0xe9, 0x1b, 0xed, 0x8d, 0xf8, 0x74, 0x1f, 0x31, 0x92, 0xb3, -0x73, 0x17, 0x36, 0xdb, 0x91, 0x30, 0xd6, 0x88, 0x55, 0x6b, 0x34, 0x77, 0x87, 0x7a, 0xe7, -0xee, 0x06, 0xc6, 0x1c, 0x8c, 0x19, 0x0c, 0x48, 0x46, 0x23, 0x5e, 0x9c, 0x07, 0x5c, 0xbf, -0xb4, 0x7e, 0xd6, 0x4f, 0x74, 0x9c, 0xe2, 0xc5, 0x50, 0x8b, 0xc5, 0x8b, 0x15, 0x90, 0x60, -0x62, 0x57, 0x29, 0xd0, 0x13, 0x43, 0xa1, 0x80, 0x88, 0x91, 0x00, 0x44, 0xc7, 0x4d, 0x19, -0x86, 0xcc, 0x2f, 0x2a, 0x75, 0x5a, 0xfc, 0xeb, 0x97, 0x2a, 0x70, 0xe3, 0x78, 0xd8, 0x91, -0xb0, 0x4f, 0x99, 0x07, 0xa3, 0x95, 0xea, 0x24, 0x21, 0xd5, 0xde, 0x51, 0x20, 0x93, 0x27, -0x0a, 0x30, 0x73, 0xa8, 0xff, 0x8a, 0x97, 0xe9, 0xa7, 0x6a, 0x8e, 0x0d, 0xe8, 0xf0, 0xdf, -0xec, 0xea, 0xb4, 0x6c, 0x1d, 0x39, 0x2a, 0x62, 0x2d, 0x3d, 0x5a, 0x8b, 0x65, 0xf8, 0x90, -0x05, 0x2e, 0x7e, 0x91, 0x2c, 0x78, 0xef, 0x8e, 0x7a, 0xc1, 0x2f, 0xac, 0x78, 0xee, 0xaf, -0x28, 0x45, 0x06, 0x4c, 0x26, 0xaf, 0x3b, 0xa2, 0xdb, 0xa3, 0x93, 0x06, 0xb5, 0x3c, 0xa5, -0xd8, 0xee, 0x8f, 0xaf, 0x25, 0xcc, 0x3f, 0x85, 0x68, 0x48, 0xa9, 0x62, 0xcc, 0x97, 0x8f, -0x7f, 0x2a, 0xea, 0xe0, 0x15, 0x0a, 0xad, 0x62, 0x07, 0xbd, 0x45, 0xf8, 0x41, 0xd8, 0x36, -0xcb, 0x4c, 0xdb, 0x6e, 0xe6, 0x3a, 0xe7, 0xda, 0x15, 0xe9, 0x29, 0x1e, 0x12, 0x10, 0xa0, -0x14, 0x2c, 0x0e, 0x3d, 0xf4, 0xbf, 0x39, 0x41, 0x92, 0x75, 0x0b, 0x25, 0x7b, 0xa3, 0xce, -0x39, 0x9c, 0x15, 0x64, 0xc8, 0xfa, 0x3d, 0xef, 0x73, 0x27, 0xfe, 0x26, 0x2e, 0xce, 0xda, -0x6e, 0xfd, 0x71, 0x8e, 0xdd, 0xfe, 0x76, 0xee, 0xdc, 0x12, 0x5c, 0x02, 0xc5, 0x3a, 0x4e, -0x4e, 0x4f, 0xbf, 0xca, 0x40, 0x15, 0xc7, 0x6e, 0x8d, 0x41, 0xf1, 0x10, 0xe0, 0x4f, 0x7e, -0x97, 0x7f, 0x1c, 0xae, 0x47, 0x8e, 0x6b, 0xb1, 0x25, 0x31, 0xb0, 0x73, 0xc7, 0x1b, 0x97, -0x79, 0xf9, 0x80, 0xd3, 0x66, 0x22, 0x30, 0x07, 0x74, 0x1e, 0xe4, 0xd0, 0x80, 0x21, 0xd6, -0xee, 0x6b, 0x6c, 0x4f, 0xbf, 0xf5, 0xb7, 0xd9, 0x09, 0x87, 0x2f, 0xa9, 0x14, 0xbe, 0x27, -0xd9, 0x72, 0x50, 0x01, 0xd4, 0x13, 0x73, 0xa6, 0xa7, 0x51, 0x02, 0x75, 0x25, 0xe1, 0xb3, -0x45, 0x34, 0x7d, 0xa8, 0x8e, 0xeb, 0xf3, 0x16, 0x49, 0xcb, 0x4f, 0x8c, 0xa1, 0xb9, 0x36, -0x85, 0x39, 0x75, 0x5d, 0x08, 0x00, 0xae, 0xeb, 0xf6, 0xea, 0xd7, 0x13, 0x3a, 0x21, 0x5a, -0x5f, 0x30, 0x84, 0x52, 0x26, 0x95, 0xc9, 0x14, 0xf2, 0x57, 0x55, 0x6b, 0xb1, 0x10, 0xc2, -0xe1, 0xbd, 0x3b, 0x51, 0xc0, 0xb7, 0x55, 0x4c, 0x71, 0x12, 0x26, 0xc7, 0x0d, 0xf9, 0x51, -0xa4, 0x38, 0x02, 0x05, 0x7f, 0xb8, 0xf1, 0x72, 0x4b, 0xbf, 0x71, 0x89, 0x14, 0xf3, 0x77, -0x38, 0xd9, 0x71, 0x24, 0xf3, 0x00, 0x11, 0xa1, 0xd8, 0xd4, 0x69, 0x27, 0x08, 0x37, 0x35, -0xc9, 0x11, 0x9d, 0x90, 0x1c, 0x0e, 0xe7, 0x1c, 0xff, 0x2d, 0x1e, 0xe8, 0x92, 0xe1, 0x18, -0x10, 0x95, 0x7c, 0xe0, 0x80, 0xf4, 0x96, 0x43, 0x21, 0xf9, 0x75, 0x21, 0x64, 0x38, 0xdd, -0x9f, 0x1e, 0x95, 0x16, 0xda, 0x56, 0x1d, 0x4f, 0x9a, 0x53, 0xb2, 0xe2, 0xe4, 0x18, 0xcb, -0x6b, 0x1a, 0x65, 0xeb, 0x56, 0xc6, 0x3b, 0xe5, 0xfe, 0xd8, 0x26, 0x3f, 0x3a, 0x84, 0x59, -0x72, 0x66, 0xa2, 0xf3, 0x75, 0xff, 0xfb, 0x60, 0xb3, 0x22, 0xad, 0x3f, 0x2d, 0x6b, 0xf9, -0xeb, 0xea, 0x05, 0x7c, 0xd8, 0x8f, 0x6d, 0x2c, 0x98, 0x9e, 0x2b, 0x93, 0xf1, 0x5e, 0x46, -0xf0, 0x87, 0x49, 0x29, 0x73, 0x68, 0xd7, 0x7f, 0xf9, 0xf0, 0xe5, 0x7d, 0xdb, 0x1d, 0x75, -0x19, 0xf3, 0xc4, 0x58, 0x9b, 0x17, 0x88, 0xa8, 0x92, 0xe0, 0xbe, 0xbd, 0x8b, 0x1d, 0x8d, -0x9f, 0x56, 0x76, 0xad, 0xaf, 0x29, 0xe2, 0xd9, 0xd5, 0x52, 0xf6, 0xb5, 0x56, 0x35, 0x57, -0x3a, 0xc8, 0xe1, 0x56, 0x43, 0x19, 0x94, 0xd3, 0x04, 0x9b, 0x6d, 0x35, 0xd8, 0x0b, 0x5f, -0x4d, 0x19, 0x8e, 0xec, 0xfa, 0x64, 0x91, 0x0a, 0x72, 0x20, 0x2b, 0xbc, 0x1a, 0x4a, 0xfe, -0x8b, 0xfd, 0xbb, 0xed, 0x1b, 0x23, 0xea, 0xad, 0x72, 0x82, 0xa1, 0x29, 0x99, 0x71, 0xbd, -0xf0, 0x95, 0xc1, 0x03, 0xdd, 0x7b, 0xc2, 0xb2, 0x3c, 0x28, 0x54, 0xd3, 0x68, 0xa4, 0x72, -0xc8, 0x66, 0x96, 0xe0, 0xd1, 0xd8, 0x7f, 0xf8, 0xd1, 0x26, 0x2b, 0xf7, 0xad, 0xba, 0x55, -0xca, 0x15, 0xb9, 0x32, 0xc3, 0xe5, 0x88, 0x97, 0x8e, 0x5c, 0xfb, 0x92, 0x25, 0x8b, 0xbf, -0xa2, 0x45, 0x55, 0x7a, 0xa7, 0x6f, 0x8b, 0x57, 0x5b, 0xcf, 0x0e, 0xcb, 0x1d, 0xfb, 0x20, -0x82, 0x77, 0xa8, 0x8c, 0xcc, 0x16, 0xce, 0x1d, 0xfa, 0xde, 0xcc, 0x0b, 0x62, 0xfe, 0xcc, -0xe1, 0xb7, 0xf0, 0xc3, 0x81, 0x64, 0x73, 0x40, 0xa0, 0xc2, 0x4d, 0x89, 0x11, 0x75, 0x33, -0x55, 0x33, 0x8d, 0xe8, 0x4a, 0xfd, 0xea, 0x6e, 0x30, 0x0b, 0xd7, 0x31, 0x2c, 0xde, 0x47, -0xe3, 0xbf, 0xf8, 0x55, 0x42, 0xe2, 0x7f, 0x59, 0xe5, 0x17, 0xef, 0x99, 0x34, 0x69, 0x91, -0xb1, 0x23, 0x8e, 0x20, 0x87, 0x2d, 0xa8, 0xfe, 0xd5, 0x8a, 0xf3, 0x84, 0x3a, 0xf0, 0x37, -0xe4, 0x09, 0x00, 0x54, 0xee, 0x67, 0x49, 0x93, 0xe4, 0x81, 0x70, 0xe3, 0x90, 0x4d, 0xef, -0xfe, 0x41, 0xb7, 0x99, 0x7b, 0xc1, 0x83, 0xba, 0x62, 0x12, 0x6f, 0x7d, 0xde, 0x6b, 0xaf, -0xda, 0x16, 0xf9, 0x55, 0x51, 0xee, 0xa6, 0x0c, 0x2b, 0x02, 0xa3, 0xfd, 0x8d, 0xfb, 0x30, -0x17, 0xe4, 0x6f, 0xdf, 0x36, 0x71, 0xc4, 0xca, 0x87, 0x25, 0x48, 0xb0, 0x47, 0xec, 0xea, -0xb4, 0xbf, 0xa5, 0x4d, 0x9b, 0x9f, 0x02, 0x93, 0xc4, 0xe3, 0xe4, 0xe8, 0x42, 0x2d, 0x68, -0x81, 0x15, 0x0a, 0xeb, 0x84, 0x5b, 0xd6, 0xa8, 0x74, 0xfb, 0x7d, 0x1d, 0xcb, 0x2c, 0xda, -0x46, 0x2a, 0x76, 0x62, 0xce, 0xbc, 0x5c, 0x9e, 0x8b, 0xe7, 0xcf, 0xbe, 0x78, 0xf5, 0x7c, -0xeb, 0xb3, 0x3a, 0x9c, 0xaa, 0x6f, 0xcc, 0x72, 0xd1, 0x59, 0xf2, 0x11, 0x23, 0xd6, 0x3f, -0x48, 0xd1, 0xb7, 0xce, 0xb0, 0xbf, 0xcb, 0xea, 0x80, 0xde, 0x57, 0xd4, 0x5e, 0x97, 0x2f, -0x75, 0xd1, 0x50, 0x8e, 0x80, 0x2c, 0x66, 0x79, 0xbf, 0x72, 0x4b, 0xbd, 0x8a, 0x81, 0x6c, -0xd3, 0xe1, 0x01, 0xdc, 0xd2, 0x15, 0x26, 0xc5, 0x36, 0xda, 0x2c, 0x1a, 0xc0, 0x27, 0x94, -0xed, 0xb7, 0x9b, 0x85, 0x0b, 0x5e, 0x80, 0x97, 0xc5, 0xec, 0x4f, 0xec, 0x88, 0x5d, 0x50, -0x07, 0x35, 0x47, 0xdc, 0x0b, 0x3b, 0x3d, 0xdd, 0x60, 0xaf, 0xa8, 0x5d, 0x81, 0x38, 0x24, -0x25, 0x5d, 0x5c, 0x15, 0xd1, 0xde, 0xb3, 0xab, 0xec, 0x05, 0x69, 0xef, 0x83, 0xed, 0x57, -0x54, 0xb8, 0x64, 0x64, 0x11, 0x16, 0x32, 0x69, 0xda, 0x9f, 0x2d, 0x7f, 0x36, 0xbb, 0x44, -0x5a, 0x34, 0xe8, 0x7f, 0xbf, 0x03, 0xeb, 0x00, 0x7f, 0x59, 0x68, 0x22, 0x79, 0xcf, 0x73, -0x6c, 0x2c, 0x29, 0xa7, 0xa1, 0x5f, 0x38, 0xa1, 0x1d, 0xf0, 0x20, 0x53, 0xe0, 0x1a, 0x63, -0x14, 0x58, 0x71, 0x10, 0xaa, 0x08, 0x0c, 0x3e, 0x16, 0x1a, 0x60, 0x22, 0x82, 0x7f, 0xba, -0xa4, 0x43, 0xa0, 0xd0, 0xac, 0x1b, 0xd5, 0x6b, 0x64, 0xb5, 0x14, 0x93, 0x31, 0x9e, 0x53, -0x50, 0xd0, 0x57, 0x66, 0xee, 0x5a, 0x4f, 0xfb, 0x03, 0x2a, 0x69, 0x58, 0x76, 0xf1, 0x83, -0xf7, 0x4e, 0xba, 0x8c, 0x42, 0x06, 0x60, 0x5d, 0x6d, 0xce, 0x60, 0x88, 0xae, 0xa4, 0xc3, -0xf1, 0x03, 0xa5, 0x4b, 0x98, 0xa1, 0xff, 0x67, 0xe1, 0xac, 0xa2, 0xb8, 0x62, 0xd7, 0x6f, -0xa0, 0x31, 0xb4, 0xd2, 0x77, 0xaf, 0x21, 0x10, 0x06, 0xc6, 0x9a, 0xff, 0x1d, 0x09, 0x17, -0x0e, 0x5f, 0xf1, 0xaa, 0x54, 0x34, 0x4b, 0x45, 0x8a, 0x87, 0x63, 0xa6, 0xdc, 0xf9, 0x24, -0x30, 0x67, 0xc6, 0xb2, 0xd6, 0x61, 0x33, 0x69, 0xee, 0x50, 0x61, 0x57, 0x28, 0xe7, 0x7e, -0xee, 0xec, 0x3a, 0x5a, 0x73, 0x4e, 0xa8, 0x8d, 0xe4, 0x18, 0xea, 0xec, 0x41, 0x64, 0xc8, -0xe2, 0xe8, 0x66, 0xb6, 0x2d, 0xb6, 0xfb, 0x6a, 0x6c, 0x16, 0xb3, 0xdd, 0x46, 0x43, 0xb9, -0x73, 0x00, 0x6a, 0x71, 0xed, 0x4e, 0x9d, 0x25, 0x1a, 0xc3, 0x3c, 0x4a, 0x95, 0x15, 0x99, -0x35, 0x81, 0x14, 0x02, 0xd6, 0x98, 0x9b, 0xec, 0xd8, 0x23, 0x3b, 0x84, 0x29, 0xaf, 0x0c, -0x99, 0x83, 0xa6, 0x9a, 0x34, 0x4f, 0xfa, 0xe8, 0xd0, 0x3c, 0x4b, 0xd0, 0xfb, 0xb6, 0x68, -0xb8, 0x9e, 0x8f, 0xcd, 0xf7, 0x60, 0x2d, 0x7a, 0x22, 0xe5, 0x7d, 0xab, 0x65, 0x1b, 0x95, -0xa7, 0xa8, 0x7f, 0xb6, 0x77, 0x47, 0x7b, 0x5f, 0x8b, 0x12, 0x72, 0xd0, 0xd4, 0x91, 0xef, -0xde, 0x19, 0x50, 0x3c, 0xa7, 0x8b, 0xc4, 0xa9, 0xb3, 0x23, 0xcb, 0x76, 0xe6, 0x81, 0xf0, -0xc1, 0x04, 0x8f, 0xa3, 0xb8, 0x54, 0x5b, 0x97, 0xac, 0x19, 0xff, 0x3f, 0x55, 0x27, 0x2f, -0xe0, 0x1d, 0x42, 0x9b, 0x57, 0xfc, 0x4b, 0x4e, 0x0f, 0xce, 0x98, 0xa9, 0x43, 0x57, 0x03, -0xbd, 0xe7, 0xc8, 0x94, 0xdf, 0x6e, 0x36, 0x73, 0x32, 0xb4, 0xef, 0x2e, 0x85, 0x7a, 0x6e, -0xfc, 0x6c, 0x18, 0x82, 0x75, 0x35, 0x90, 0x07, 0xf3, 0xe4, 0x9f, 0x3e, 0xdc, 0x68, 0xf3, -0xb5, 0xf3, 0x19, 0x80, 0x92, 0x06, 0x99, 0xa2, 0xe8, 0x6f, 0xff, 0x2e, 0x7f, 0xae, 0x42, -0xa4, 0x5f, 0xfb, 0xd4, 0x0e, 0x81, 0x2b, 0xc3, 0x04, 0xff, 0x2b, 0xb3, 0x74, 0x4e, 0x36, -0x5b, 0x9c, 0x15, 0x00, 0xc6, 0x47, 0x2b, 0xe8, 0x8b, 0x3d, 0xf1, 0x9c, 0x03, 0x9a, 0x58, -0x7f, 0x9b, 0x9c, 0xbf, 0x85, 0x49, 0x79, 0x35, 0x2e, 0x56, 0x7b, 0x41, 0x14, 0x39, 0x47, -0x83, 0x26, 0xaa, 0x07, 0x89, 0x98, 0x11, 0x1b, 0x86, 0xe7, 0x73, 0x7a, 0xd8, 0x7d, 0x78, -0x61, 0x53, 0xe9, 0x79, 0xf5, 0x36, 0x8d, 0x44, 0x92, 0x84, 0xf9, 0x13, 0x50, 0x58, 0x3b, -0xa4, 0x6a, 0x36, 0x65, 0x49, 0x8e, 0x3c, 0x0e, 0xf1, 0x6f, 0xd2, 0x84, 0xc4, 0x7e, 0x8e, -0x3f, 0x39, 0xae, 0x7c, 0x84, 0xf1, 0x63, 0x37, 0x8e, 0x3c, 0xcc, 0x3e, 0x44, 0x81, 0x45, -0xf1, 0x4b, 0xb9, 0xed, 0x6b, 0x36, 0x5d, 0xbb, 0x20, 0x60, 0x1a, 0x0f, 0xa3, 0xaa, 0x55, -0x77, 0x3a, 0xa9, 0xae, 0x37, 0x4d, 0xba, 0xb8, 0x86, 0x6b, 0xbc, 0x08, 0x50, 0xf6, 0xcc, -0xa4, 0xbd, 0x1d, 0x40, 0x72, 0xa5, 0x86, 0xfa, 0xe2, 0x10, 0xae, 0x3d, 0x58, 0x4b, 0x97, -0xf3, 0x43, 0x74, 0xa9, 0x9e, 0xeb, 0x21, 0xb7, 0x01, 0xa4, 0x86, 0x93, 0x97, 0xee, 0x2f, -0x4f, 0x3b, 0x86, 0xa1, 0x41, 0x6f, 0x41, 0x26, 0x90, 0x78, 0x5c, 0x7f, 0x30, 0x38, 0x4b, -0x3f, 0xaa, 0xec, 0xed, 0x5c, 0x6f, 0x0e, 0xad, 0x43, 0x87, 0xfd, 0x93, 0x35, 0xe6, 0x01, -0xef, 0x41, 0x26, 0x90, 0x99, 0x9e, 0xfb, 0x19, 0x5b, 0xad, 0xd2, 0x91, 0x8a, 0xe0, 0x46, -0xaf, 0x65, 0xfa, 0x4f, 0x84, 0xc1, 0xa1, 0x2d, 0xcf, 0x45, 0x8b, 0xd3, 0x85, 0x50, 0x55, -0x7c, 0xf9, 0x67, 0x88, 0xd4, 0x4e, 0xe9, 0xd7, 0x6b, 0x61, 0x54, 0xa1, 0xa4, 0xa6, 0xa2, -0xc2, 0xbf, 0x30, 0x9c, 0x40, 0x9f, 0x5f, 0xd7, 0x69, 0x2b, 0x24, 0x82, 0x5e, 0xd9, 0xd6, -0xa7, 0x12, 0x54, 0x1a, 0xf7, 0x55, 0x9f, 0x76, 0x50, 0xa9, 0x95, 0x84, 0xe6, 0x6b, 0x6d, -0xb5, 0x96, 0x54, 0xd6, 0xcd, 0xb3, 0xa1, 0x9b, 0x46, 0xa7, 0x94, 0x4d, 0xc4, 0x94, 0xb4, -0x98, 0xe3, 0xe1, 0xe2, 0x34, 0xd5, 0x33, 0x16, 0x07, 0x54, 0xcd, 0xb7, 0x77, 0x53, 0xdb, -0x4f, 0x4d, 0x46, 0x9d, 0xe9, 0xd4, 0x9c, 0x8a, 0x36, 0xb6, 0xb8, 0x38, 0x26, 0x6c, 0x0e, -0xff, 0x9c, 0x1b, 0x43, 0x8b, 0x80, 0xcc, 0xb9, 0x3d, 0xda, 0xc7, 0xf1, 0x8a, 0xf2, 0x6d, -0xb8, 0xd7, 0x74, 0x2f, 0x7e, 0x1e, 0xb7, 0xd3, 0x4a, 0xb4, 0xac, 0xfc, 0x79, 0x48, 0x6c, -0xbc, 0x96, 0xb6, 0x94, 0x46, 0x57, 0x2d, 0xb0, 0xa3, 0xfc, 0x1e, 0xb9, 0x52, 0x60, 0x85, -0x2d, 0x41, 0xd0, 0x43, 0x01, 0x1e, 0x1c, 0xd5, 0x7d, 0xfc, 0xf3, 0x96, 0x0d, 0xc7, 0xcb, -0x2a, 0x29, 0x9a, 0x93, 0xdd, 0x88, 0x2d, 0x37, 0x5d, 0xaa, 0xfb, 0x49, 0x68, 0xa0, 0x9c, -0x50, 0x86, 0x7f, 0x68, 0x56, 0x57, 0xf9, 0x79, 0x18, 0x39, 0xd4, 0xe0, 0x01, 0x84, 0x33, -0x61, 0xca, 0xa5, 0xd2, 0xd6, 0xe4, 0xc9, 0x8a, 0x4a, 0x23, 0x44, 0x4e, 0xbc, 0xf0, 0xdc, -0x24, 0xa1, 0xa0, 0xc4, 0xe2, 0x07, 0x3c, 0x10, 0xc4, 0xb5, 0x25, 0x4b, 0x65, 0x63, 0xf4, -0x80, 0xe7, 0xcf, 0x61, 0xb1, 0x71, 0x82, 0x21, 0x87, 0x2c, 0xf5, 0x91, 0x00, 0x32, 0x0c, -0xec, 0xa9, 0xb5, 0x9a, 0x74, 0x85, 0xe3, 0x36, 0x8f, 0x76, 0x4f, 0x9c, 0x6d, 0xce, 0xbc, -0xad, 0x0a, 0x4b, 0xed, 0x76, 0x04, 0xcb, 0xc3, 0xb9, 0x33, 0x9e, 0x01, 0x93, 0x96, 0x69, -0x7d, 0xc5, 0xa2, 0x45, 0x79, 0x9b, 0x04, 0x5c, 0x84, 0x09, 0xed, 0x88, 0x43, 0xc7, 0xab, -0x93, 0x14, 0x26, 0xa1, 0x40, 0xb5, 0xce, 0x4e, 0xbf, 0x2a, 0x42, 0x85, 0x3e, 0x2c, 0x3b, -0x54, 0xe8, 0x12, 0x1f, 0x0e, 0x97, 0x59, 0xb2, 0x27, 0x89, 0xfa, 0xf2, 0xdf, 0x8e, 0x68, -0x59, 0xdc, 0x06, 0xbc, 0xb6, 0x85, 0x0d, 0x06, 0x22, 0xec, 0xb1, 0xcb, 0xe5, 0x04, 0xe6, -0x3d, 0xb3, 0xb0, 0x41, 0x73, 0x08, 0x3f, 0x3c, 0x58, 0x86, 0x63, 0xeb, 0x50, 0xee, 0x1d, -0x2c, 0x37, 0x74, 0xa9, 0xd3, 0x18, 0xa3, 0x47, 0x6e, 0x93, 0x54, 0xad, 0x0a, 0x5d, 0xb8, -0x2a, 0x55, 0x5d, 0x78, 0xf6, 0xee, 0xbe, 0x8e, 0x3c, 0x76, 0x69, 0xb9, 0x40, 0xc2, 0x34, -0xec, 0x2a, 0xb9, 0xed, 0x7e, 0x20, 0xe4, 0x8d, 0x00, 0x38, 0xc7, 0xe6, 0x8f, 0x44, 0xa8, -0x86, 0xce, 0xeb, 0x2a, 0xe9, 0x90, 0xf1, 0x4c, 0xdf, 0x32, 0xfb, 0x73, 0x1b, 0x6d, 0x92, -0x1e, 0x95, 0xfe, 0xb4, 0xdb, 0x65, 0xdf, 0x4d, 0x23, 0x54, 0x89, 0x48, 0xbf, 0x4a, 0x2e, -0x70, 0xd6, 0xd7, 0x62, 0xb4, 0x33, 0x29, 0xb1, 0x3a, 0x33, 0x4c, 0x23, 0x6d, 0xa6, 0x76, -0xa5, 0x21, 0x63, 0x48, 0xe6, 0x90, 0x5d, 0xed, 0x90, 0x95, 0x0b, 0x7a, 0x84, 0xbe, 0xb8, -0x0d, 0x5e, 0x63, 0x0c, 0x62, 0x26, 0x4c, 0x14, 0x5a, 0xb3, 0xac, 0x23, 0xa4, 0x74, 0xa7, -0x6f, 0x33, 0x30, 0x05, 0x60, 0x01, 0x42, 0xa0, 0x28, 0xb7, 0xee, 0x19, 0x38, 0xf1, 0x64, -0x80, 0x82, 0x43, 0xe1, 0x41, 0x27, 0x1f, 0x1f, 0x90, 0x54, 0x7a, 0xd5, 0x23, 0x2e, 0xd1, -0x3d, 0xcb, 0x28, 0xba, 0x58, 0x7f, 0xdc, 0x7c, 0x91, 0x24, 0xe9, 0x28, 0x51, 0x83, 0x6e, -0xc5, 0x56, 0x21, 0x42, 0xed, 0xa0, 0x56, 0x22, 0xa1, 0x40, 0x80, 0x6b, 0xa8, 0xf7, 0x94, -0xca, 0x13, 0x6b, 0x0c, 0x39, 0xd9, 0xfd, 0xe9, 0xf3, 0x6f, 0xa6, 0x9e, 0xfc, 0x70, 0x8a, -0xb3, 0xbc, 0x59, 0x3c, 0x1e, 0x1d, 0x6c, 0xf9, 0x7c, 0xaf, 0xf9, 0x88, 0x71, 0x95, 0xeb, -0x57, 0x00, 0xbd, 0x9f, 0x8c, 0x4f, 0xe1, 0x24, 0x83, 0xc5, 0x22, 0xea, 0xfd, 0xd3, 0x0c, -0xe2, 0x17, 0x18, 0x7c, 0x6a, 0x4c, 0xde, 0x77, 0xb4, 0x53, 0x9b, 0x4c, 0x81, 0xcd, 0x23, -0x60, 0xaa, 0x0e, 0x25, 0x73, 0x9c, 0x02, 0x79, 0x32, 0x30, 0xdf, 0x74, 0xdf, 0x75, 0x19, -0xf4, 0xa5, 0x14, 0x5c, 0xf7, 0x7a, 0xa8, 0xa5, 0x91, 0x84, 0x7c, 0x60, 0x03, 0x06, 0x3b, -0xcd, 0x50, 0xb6, 0x27, 0x9c, 0xfe, 0xb1, 0xdd, 0xcc, 0xd3, 0xb0, 0x59, 0x24, 0xb2, 0xca, -0xe2, 0x1c, 0x81, 0x22, 0x9d, 0x07, 0x8f, 0x8e, 0xb9, 0xbe, 0x4e, 0xfa, 0xfc, 0x39, 0x65, -0xba, 0xbf, 0x9d, 0x12, 0x37, 0x5e, 0x97, 0x7e, 0xf3, 0x89, 0xf5, 0x5d, 0xf5, 0xe3, 0x09, -0x8c, 0x62, 0xb5, 0x20, 0x9d, 0x0c, 0x53, 0x8a, 0x68, 0x1b, 0xd2, 0x8f, 0x75, 0x17, 0x5d, -0xd4, 0xe5, 0xda, 0x75, 0x62, 0x19, 0x14, 0x6a, 0x26, 0x2d, 0xeb, 0xf8, 0xaf, 0x37, 0xf0, -0x6c, 0xa4, 0x55, 0xb1, 0xbc, 0xe2, 0x33, 0xc0, 0x9a, 0xca, 0xb0, 0x11, 0x49, 0x4f, 0x68, -0x9b, 0x3b, 0x6b, 0x3c, 0xcc, 0x13, 0xf6, 0xc7, 0x85, 0x61, 0x68, 0x42, 0xae, 0xbb, 0xdd, -0xcd, 0x45, 0x16, 0x29, 0x1d, 0xea, 0xdb, 0xc8, 0x03, 0x94, 0x3c, 0xee, 0x4f, 0x82, 0x11, -0xc3, 0xec, 0x28, 0xbd, 0x97, 0x05, 0x99, 0xde, 0xd7, 0xbb, 0x5e, 0x22, 0x1f, 0xd4, 0xeb, -0x64, 0xd9, 0x92, 0xd9, 0x85, 0xb7, 0x6a, 0x05, 0x6a, 0xe4, 0x24, 0x41, 0xf1, 0xcd, 0xf0, -0xd8, 0x3f, 0xf8, 0x9e, 0x0e, 0xcd, 0x0b, 0x7a, 0x70, 0x6b, 0x5a, 0x75, 0x0a, 0x6a, 0x33, -0x88, 0xec, 0x17, 0x75, 0x08, 0x70, 0x10, 0x2f, 0x24, 0xcf, 0xc4, 0xe9, 0x42, 0x00, 0x61, -0x94, 0xca, 0x1f, 0x3a, 0x76, 0x06, 0xfa, 0xd2, 0x48, 0x81, 0xf0, 0x77, 0x60, 0x03, 0x45, -0xd9, 0x61, 0xf4, 0xa4, 0x6f, 0x3d, 0xd9, 0x30, 0xc3, 0x04, 0x6b, 0x54, 0x2a, 0xb7, 0xec, -0x3b, 0xf4, 0x4b, 0xf5, 0x68, 0x52, 0x26, 0xce, 0xff, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xa5, -0xa9, 0xb1, 0xe0, 0x23, 0xc4, 0x0a, 0x77, 0x4d, 0xf9, 0x51, 0x20, 0xa3, 0xa5, 0xa9, 0xb1, -0xc1, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xc4, 0xeb, 0x54, 0x0b, -0x75, 0x68, 0x52, 0x07, 0x8c, 0x9a, 0x97, 0x8d, 0x79, 0x70, 0x62, 0x46, 0xef, 0x5c, 0x1b, -0x95, 0x89, 0x71, 0x41, 0xe1, 0x21, 0xa1, 0xa1, 0xa1, 0xc0, 0x02, 0x67, 0x4c, 0x1a, 0xb6, -0xcf, 0xfd, 0x78, 0x53, 0x24, 0xab, 0xb5, 0xc9, 0xf1, 0x60, 0x23, 0xa5, 0xc8, 0x12, 0x87, -0x6d, 0x58, 0x13, 0x85, 0x88, 0x92, 0x87, 0x6d, 0x58, 0x32, 0xc7, 0x0c, 0x9a, 0x97, 0xac, -0xda, 0x36, 0xee, 0x5e, 0x3e, 0xdf, 0x1d, 0xb8, 0xf2, 0x66, 0x2f, 0xbd, 0xf8, 0x72, 0x47, -0xed, 0x58, 0x13, 0x85, 0x88, 0x92, 0x87, 0x8c, 0x7b, 0x55, 0x09, 0x90, 0xa2, 0xc6, 0xef, -0x3d, 0xf8, 0x53, 0x24, 0xab, 0xd4, 0x2a, 0xb7, 0xec, 0x5a, 0x36, 0xee, 0x5e, 0x3e, 0xdf, -0x3c, 0xfa, 0x76, 0x4f, 0xfd, 0x59, 0x30, 0xe2, 0x46, 0xef, 0x3d, 0xf8, 0x53, 0x05, 0x69, -0x31, 0xc1, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, 0x19, 0xb0, 0xe2, 0x27, 0xcc, 0xfb, 0x74, -0x4b, 0x14, 0x8b, 0x94, 0x8b, 0x75, 0x68, 0x33, 0xc5, 0x08, 0x92, 0x87, 0x8c, 0x9a, 0xb6, -0xcf, 0x1c, 0xba, 0xd7, 0x0d, 0x98, 0xb2, 0xe6, 0x2f, 0xdc, 0x1b, 0x95, 0x89, 0x71, 0x60, -0x23, 0xc4, 0x0a, 0x96, 0x8f, 0x9c, 0xba, 0xf6, 0x6e, 0x3f, 0xfc, 0x5b, 0x15, 0xa8, 0xd2, -0x26, 0xaf, 0xbd, 0xf8, 0x72, 0x66, 0x2f, 0xdc, 0x1b, 0xb4, 0xcb, 0x14, 0x8b, 0x94, 0xaa, -0xb7, 0xcd, 0xf9, 0x51, 0x01, 0x80, 0x82, 0x86, 0x6f, 0x3d, 0xd9, 0x30, 0xe2, 0x27, 0xcc, -0xfb, 0x74, 0x4b, 0x14, 0xaa, 0xb7, 0xcd, 0xf9, 0x70, 0x43, 0x04, 0x6b, 0x35, 0xc9, 0xf1, -0x60, 0x23, 0xa5, 0xc8, 0xf3, 0x45, 0x08, 0x92, 0x87, 0x6d, 0x58, 0x32, 0xe6, 0x2f, 0xbd, -0xf8, 0x72, 0x66, 0x4e, 0x1e, 0xbe, 0xfe, 0x7e, 0x7e, 0x7e, 0x5f, 0x1d, 0x99, 0x91, 0xa0, -0xa3, 0xc4, 0x0a, 0x77, 0x4d, 0x18, 0x93, 0xa4, 0xab, 0xd4, 0x0b, 0x75, 0x49, 0x10, 0xa2, -0xc6, 0xef, 0x3d, 0xf8, 0x53, 0x24, 0xab, 0xb5, 0xe8, 0x33, 0xe4, 0x4a, 0x16, 0xae, 0xde, -0x1f, 0xbc, 0xdb, 0x15, 0xa8, 0xb3, 0xc5, 0x08, 0x73, 0x45, 0xe9, 0x31, 0xc1, 0xe1, 0x21, -0xa1, 0xa1, 0xa1, 0xc0, 0x02, 0x86, 0x6f, 0x5c, 0x3a, 0xd7, 0x0d, 0x98, 0x93, 0xa4, 0xca, -0x16, 0xae, 0xde, 0x1f, 0x9d, 0x99, 0xb0, 0xe2, 0x46, 0xef, 0x3d, 0xf8, 0x72, 0x47, 0x0c, -0x9a, 0xb6, 0xcf, 0xfd, 0x59, 0x11, 0xa0, 0xa3, 0xa5, 0xc8, 0xf3, 0x45, 0x08, 0x92, 0x87, -0x6d, 0x39, 0xf0, 0x43, 0x04, 0x8a, 0x96, 0xae, 0xde, 0x3e, 0xdf, 0x1d, 0x99, 0x91, 0xa0, -0xc2, 0x06, 0x6f, 0x3d, 0xf8, 0x72, 0x47, 0x0c, 0x9a, 0x97, 0x8d, 0x98, 0x93, 0x85, 0x88, -0x73, 0x45, 0xe9, 0x31, 0xe0, 0x23, 0xa5, 0xa9, 0xd0, 0x03, 0x84, 0x8a, 0x96, 0xae, 0xde, -0x1f, 0xbc, 0xdb, 0x15, 0xa8, 0xd2, 0x26, 0xce, 0xff, 0x5d, 0x19, 0x91, 0x81, 0x80, 0x82, -0x67, 0x2d, 0xd8, 0x13, 0xa4, 0xab, 0xd4, 0x0b, 0x94, 0xaa, 0xb7, 0xcd, 0xf9, 0x51, 0x20, -0xa3, 0xa5, 0xc8, 0xf3, 0x45, 0xe9, 0x50, 0x22, 0xc6, 0xef, 0x5c, 0x3a, 0xd7, 0x0d, 0x98, -0x93, 0x85, 0x88, 0x73, 0x64, 0x4a, 0xf7, 0x4d, 0xf9, 0x51, 0x20, 0xa3, 0xc4, 0x0a, 0x96, -0xae, 0xde, 0x3e, 0xfe, 0x7e, 0x7e, 0x7e, 0x5f, 0x3c, 0xfa, 0x76, 0x4f, 0xfd, 0x78, 0x72, -0x66, 0x2f, 0xbd, 0xd9, 0x30, 0xc3, 0xe5, 0x48, 0x12, 0x87, 0x8c, 0x7b, 0x55, 0x28, 0xd2, -0x07, 0x8c, 0x9a, 0x97, 0xac, 0xda, 0x17, 0x8d, 0x79, 0x51, 0x20, 0xa3, 0xc4, 0xeb, 0x54, -0x0b, 0x94, 0x8b, 0x94, 0xaa, 0xd6, 0x2e, 0xbf, 0xfc, 0x5b, 0x15, 0xa8, 0xd2, 0x26, 0xaf, -0xdc, 0x1b, 0xb4, 0xea, 0x37, 0xec, 0x3b, 0xf4, 0x6a, 0x37, 0xcd, 0x18, 0x93, 0x85, 0x69, -0x31, 0xc1, 0xe1, 0x40, 0xe3, 0x25, 0xc8, 0x12, 0x87, 0x8c, 0x9a, 0xb6, 0xcf, 0xfd, 0x59, -0x11, 0xa0, 0xc2, 0x06, 0x8e, 0x7f, 0x5d, 0x38, 0xf2, 0x47, 0x0c, 0x7b, 0x74, 0x6a, 0x37, -0xec, 0x5a, 0x36, 0xee, 0x3f, 0xfc, 0x7a, 0x76, 0x4f, 0x1c, 0x9b, 0x95, 0x89, 0x71, 0x41, -0x00, 0x63, 0x44, 0xeb, 0x54, 0x2a, 0xd6, 0x0f, 0x9c, 0xba, 0xd7, 0x0d, 0x98, 0x93, 0x85, -0x69, 0x31, 0xc1, 0x00, 0x82, 0x86, 0x8e, 0x9e, 0xbe, 0xdf, 0x3c, 0xfa, 0x57, 0x2c, 0xda, -0x36, 0xee, 0x3f, 0xfc, 0x5b, 0x15, 0x89, 0x71, 0x41, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, -0x38, 0xf2, 0x47, 0xed, 0x58, 0x13, 0xa4, 0xca, 0xf7, 0x4d, 0xf9, 0x51, 0x01, 0x80, 0x63, -0x44, 0xeb, 0x54, 0x2a, 0xd6, 0x2e, 0xbf, 0xdd, 0x19, 0x91, 0xa0, 0xa3, 0xa5, 0xa9, 0xb1, -0xe0, 0x42, 0x06, 0x8e, 0x7f, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xc4, 0x0a, 0x96, 0x8f, 0x7d, -0x78, 0x72, 0x47, 0x0c, 0x7b, 0x74, 0x6a, 0x56, 0x2e, 0xde, 0x1f, 0xbc, 0xfa, 0x57, 0x0d, -0x79, 0x51, 0x01, 0x61, 0x21, 0xa1, 0xc0, 0xe3, 0x25, 0xa9, 0xb1, 0xc1, 0xe1, 0x40, 0x02, -0x67, 0x4c, 0x1a, 0x97, 0x8d, 0x98, 0x93, 0xa4, 0xab, 0xd4, 0x2a, 0xd6, 0x0f, 0x9c, 0x9b, -0xb4, 0xcb, 0x14, 0xaa, 0xb7, 0xcd, 0xf9, 0x51, 0x20, 0xa3, 0xc4, 0xeb, 0x35, 0xc9, 0xf1, -0x60, 0x42, 0x06, 0x8e, 0x7f, 0x7c, 0x7a, 0x76, 0x6e, 0x3f, 0xfc, 0x7a, 0x76, 0x6e, 0x5e, -0x3e, 0xfe, 0x7e, 0x5f, 0x3c, 0xdb, 0x15, 0x89, 0x71, 0x41, 0xe1, 0x21, 0xc0, 0xe3, 0x44, -0xeb, 0x54, 0x2a, 0xb7, 0xcd, 0xf9, 0x70, 0x62, 0x27, 0xad, 0xd8, 0x32, 0xc7, 0x0c, 0x7b, -0x74, 0x4b, 0x14, 0xaa, 0xb7, 0xec, 0x3b, 0xd5, 0x28, 0xd2, 0x07, 0x6d, 0x39, 0xd1, 0x20, -0xc2, 0xe7, 0x4c, 0x1a, 0x97, 0x8d, 0x98, 0xb2, 0xc7, 0x0c, 0x59, 0x28, 0xf3, 0x9b }; - -// clang-format off diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pointer_transport.c b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pointer_transport.c deleted file mode 100644 index 1a9aeb2e32..0000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pointer_transport.c +++ /dev/null @@ -1,616 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include <string.h> -#include <stddef.h> - -#include "matrix.h" -#include QMK_KEYBOARD_H - -#define ROWS_PER_HAND (MATRIX_ROWS / 2) -#define SYNC_TIMER_OFFSET 2 - -#ifdef RGBLIGHT_ENABLE -# include "rgblight.h" -#endif - -#ifdef BACKLIGHT_ENABLE -# include "backlight.h" -#endif - -#ifdef ENCODER_ENABLE -# include "encoder.h" -static pin_t encoders_pad[] = ENCODERS_PAD_A; -# define NUMBER_OF_ENCODERS (sizeof(encoders_pad) / sizeof(pin_t)) -#endif - -#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) -# include "led_matrix.h" -#endif -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) -# include "rgb_matrix.h" -#endif - -#ifdef POINTING_DEVICE_ENABLE -static uint16_t device_cpi = 0; -static int8_t split_mouse_x = 0, split_mouse_y = 0; -#endif - -#ifdef OLED_DRIVER_ENABLE -# include "oled_driver.h" -#endif - -#if defined(USE_I2C) - -# include "i2c_master.h" -# include "i2c_slave.h" - -typedef struct _I2C_slave_buffer_t { -# ifndef DISABLE_SYNC_TIMER - uint32_t sync_timer; -# endif -# ifdef SPLIT_TRANSPORT_MIRROR - matrix_row_t mmatrix[ROWS_PER_HAND]; -# endif - matrix_row_t smatrix[ROWS_PER_HAND]; -# ifdef SPLIT_MODS_ENABLE - uint8_t real_mods; - uint8_t weak_mods; -# ifndef NO_ACTION_ONESHOT - uint8_t oneshot_mods; -# endif -# endif -# ifdef BACKLIGHT_ENABLE - uint8_t backlight_level; -# endif -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - rgblight_syncinfo_t rgblight_sync; -# endif -# ifdef ENCODER_ENABLE - uint8_t encoder_state[NUMBER_OF_ENCODERS]; -# endif -# ifdef WPM_ENABLE - uint8_t current_wpm; -# endif - int8_t mouse_x; - int8_t mouse_y; - uint16_t device_cpi; - bool oled_on; - layer_state_t t_layer_state; - layer_state_t t_default_layer_state; -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - led_eeconfig_t led_matrix; - bool led_suspend_state; -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - rgb_config_t rgb_matrix; - bool rgb_suspend_state; -# endif -} __attribute__((packed)) I2C_slave_buffer_t; - -static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg; - -# define I2C_BACKLIGHT_START offsetof(I2C_slave_buffer_t, backlight_level) -# define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync) -# define I2C_KEYMAP_MASTER_START offsetof(I2C_slave_buffer_t, mmatrix) -# define I2C_KEYMAP_SLAVE_START offsetof(I2C_slave_buffer_t, smatrix) -# define I2C_SYNC_TIME_START offsetof(I2C_slave_buffer_t, sync_timer) -# define I2C_REAL_MODS_START offsetof(I2C_slave_buffer_t, real_mods) -# define I2C_WEAK_MODS_START offsetof(I2C_slave_buffer_t, weak_mods) -# define I2C_ONESHOT_MODS_START offsetof(I2C_slave_buffer_t, oneshot_mods) -# define I2C_ENCODER_START offsetof(I2C_slave_buffer_t, encoder_state) -# define I2C_WPM_START offsetof(I2C_slave_buffer_t, current_wpm) -# define I2C_MOUSE_X_START offsetof(I2C_slave_buffer_t, mouse_x) -# define I2C_MOUSE_Y_START offsetof(I2C_slave_buffer_t, mouse_y) -# define I2C_MOUSE_DPI_START offsetof(I2C_slave_buffer_t, device_cpi) -# define I2C_OLED_ON_START offsetof(I2C_slave_buffer_t, oled_on) -# define I2C_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_layer_state) -# define I2C_DEFAULT_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_default_layer_state) -# define I2C_LED_MATRIX_START offsetof(I2C_slave_buffer_t, led_matrix) -# define I2C_LED_SUSPEND_START offsetof(I2C_slave_buffer_t, led_suspend_state) -# define I2C_RGB_MATRIX_START offsetof(I2C_slave_buffer_t, rgb_matrix) -# define I2C_RGB_SUSPEND_START offsetof(I2C_slave_buffer_t, rgb_suspend_state) - -# define TIMEOUT 100 - -# ifndef SLAVE_I2C_ADDRESS -# define SLAVE_I2C_ADDRESS 0x32 -# endif - -// Get rows from other half over i2c -bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { - i2c_readReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_SLAVE_START, (void *)slave_matrix, sizeof(i2c_buffer->smatrix), TIMEOUT); -# ifdef SPLIT_TRANSPORT_MIRROR - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_MASTER_START, (void *)master_matrix, sizeof(i2c_buffer->mmatrix), TIMEOUT); -# endif - // write backlight info -# ifdef BACKLIGHT_ENABLE - uint8_t level = is_backlight_enabled() ? get_backlight_level() : 0; - if (level != i2c_buffer->backlight_level) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIGHT_START, (void *)&level, sizeof(level), TIMEOUT) >= 0) { - i2c_buffer->backlight_level = level; - } - } -# endif - -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - if (rgblight_get_change_flags()) { - rgblight_syncinfo_t rgblight_sync; - rgblight_get_syncinfo(&rgblight_sync); - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_START, (void *)&rgblight_sync, sizeof(rgblight_sync), TIMEOUT) >= 0) { - rgblight_clear_change_flags(); - } - } -# endif - -# ifdef ENCODER_ENABLE - i2c_readReg(SLAVE_I2C_ADDRESS, I2C_ENCODER_START, (void *)i2c_buffer->encoder_state, sizeof(i2c_buffer->encoder_state), TIMEOUT); - encoder_update_raw(i2c_buffer->encoder_state); -# endif - -# ifdef WPM_ENABLE - uint8_t current_wpm = get_current_wpm(); - if (current_wpm != i2c_buffer->current_wpm) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WPM_START, (void *)¤t_wpm, sizeof(current_wpm), TIMEOUT) >= 0) { - i2c_buffer->current_wpm = current_wpm; - } - } -# endif - -# ifdef POINTING_DEVICE_ENABLE - if (is_keyboard_left()) { - report_mouse_t temp_report = pointing_device_get_report(); - i2c_readReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_X_START, (void *)&i2c_buffer->mouse_x, sizeof(i2c_buffer->mouse_x), TIMEOUT); - temp_report.x = i2c_buffer->mouse_x; - i2c_readReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_Y_START, (void *)&i2c_buffer->mouse_y, sizeof(i2c_buffer->mouse_y), TIMEOUT); - temp_report.y = i2c_buffer->mouse_y; - pointing_device_set_report(temp_report); - - if (device_cpi != i2c_buffer->device_cpi) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_DPI_START, (void *)&device_cpi, sizeof(device_cpi), TIMEOUT) >= 0) { - i2c_buffer->device_cpi = device_cpi - } - } - } -# endif - -# ifdef SPLIT_MODS_ENABLE - uint8_t real_mods = get_mods(); - if (real_mods != i2c_buffer->real_mods) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_REAL_MODS_START, (void *)&real_mods, sizeof(real_mods), TIMEOUT) >= 0) { - i2c_buffer->real_mods = real_mods; - } - } - - uint8_t weak_mods = get_weak_mods(); - if (weak_mods != i2c_buffer->weak_mods) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WEAK_MODS_START, (void *)&weak_mods, sizeof(weak_mods), TIMEOUT) >= 0) { - i2c_buffer->weak_mods = weak_mods; - } - } - -# ifndef NO_ACTION_ONESHOT - uint8_t oneshot_mods = get_oneshot_mods(); - if (oneshot_mods != i2c_buffer->oneshot_mods) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_ONESHOT_MODS_START, (void *)&oneshot_mods, sizeof(oneshot_mods), TIMEOUT) >= 0) { - i2c_buffer->oneshot_mods = oneshot_mods; - } - } -# endif -# endif - - if (layer_state != i2c_buffer->t_layer_state) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&layer_state, sizeof(layer_state), TIMEOUT) >= 0) { - i2c_buffer->t_layer_state = layer_state; - } - } - - if (default_layer_state != i2c_buffer->t_default_layer_state) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_DEFAULT_LAYER_STATE_START, (void *)&default_layer_state, sizeof(default_layer_state), TIMEOUT) >= 0) { - i2c_buffer->t_default_layer_state = default_layer_state; - } - } - -# ifdef OLED_DRIVER_ENABLE - bool is_oled_on = is_oled_on(); - if (is_oled_on != i2c_buffer->oled_on) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&is_oled_on, sizeof(is_oled_on), TIMEOUT) >= 0) { - i2c_buffer->oled_on = is_oled_on; - } - } -# endif - -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_MATRIX_START, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix), TIMEOUT); - bool suspend_state = led_matrix_get_suspend_state(); - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->led_suspend_state), TIMEOUT); -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_START, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix), TIMEOUT); - bool suspend_state = rgb_matrix_get_suspend_state(); - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->rgb_suspend_state), TIMEOUT); -# endif - -# ifndef DISABLE_SYNC_TIMER - i2c_buffer->sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_SYNC_TIME_START, (void *)&i2c_buffer->sync_timer, sizeof(i2c_buffer->sync_timer), TIMEOUT); -# endif - - return true; -} - -void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { -# ifndef DISABLE_SYNC_TIMER - sync_timer_update(i2c_buffer->sync_timer); -# endif - // Copy matrix to I2C buffer - memcpy((void *)i2c_buffer->smatrix, (void *)slave_matrix, sizeof(i2c_buffer->smatrix)); -# ifdef SPLIT_TRANSPORT_MIRROR - memcpy((void *)master_matrix, (void *)i2c_buffer->mmatrix, sizeof(i2c_buffer->mmatrix)); -# endif - -// Read Backlight Info -# ifdef BACKLIGHT_ENABLE - backlight_set(i2c_buffer->backlight_level); -# endif - -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - // Update the RGB with the new data - if (i2c_buffer->rgblight_sync.status.change_flags != 0) { - rgblight_update_sync(&i2c_buffer->rgblight_sync, false); - i2c_buffer->rgblight_sync.status.change_flags = 0; - } -# endif - -# ifdef ENCODER_ENABLE - encoder_state_raw(i2c_buffer->encoder_state); -# endif - -# ifdef WPM_ENABLE - set_current_wpm(i2c_buffer->current_wpm); -# endif - -# ifdef POINTING_DEVICE_ENABLE - if (!is_keyboard_left()) { - static uint16_t cpi; - if (cpi != i2c_buffer->device_cpi) { - cpi = i2c_buffer->device_cpi; - pmw_set_cpi(cpi); - } - i2c_buffer->mouse_x = split_mouse_x; - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_X_START, (void *)&i2c_buffer->mouse_x, sizeof(i2c_buffer->mouse_x), TIMEOUT); - i2c_buffer->mouse_y = split_mouse_y; - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_Y_START, (void *)&i2c_buffer->mouse_y, sizeof(i2c_buffer->mouse_y), TIMEOUT); - } - -# endif - -# ifdef SPLIT_MODS_ENABLE - set_mods(i2c_buffer->real_mods); - set_weak_mods(i2c_buffer->weak_mods); -# ifndef NO_ACTION_ONESHOT - set_oneshot_mods(i2c_buffer->oneshot_mods); -# endif -# endif - - if (layer_state != i2c_buffer->t_layer_state) { - layer_state = i2c_buffer->t_layer_state; - } - if (default_layer_state != i2c_buffer->t_default_layer_state) { - default_layer_state = i2c_buffer->t_default_layer_state; - } - -# ifdef OLED_DRIVER_ENABLE - if (i2c_buffer->oled_on) { - oled_on(); - } else { - oled_off(); - } -# endif - -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - memcpy((void *)i2c_buffer->led_matrix, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix)); - led_matrix_set_suspend_state(i2c_buffer->led_suspend_state); -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - memcpy((void *)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix)); - rgb_matrix_set_suspend_state(i2c_buffer->rgb_suspend_state); -# endif -} - -void transport_master_init(void) { i2c_init(); } - -void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); } - -#else // USE_SERIAL - -# include "serial.h" - -typedef struct _Serial_s2m_buffer_t { - // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack - matrix_row_t smatrix[ROWS_PER_HAND]; -# ifdef ENCODER_ENABLE - uint8_t encoder_state[NUMBER_OF_ENCODERS]; -# endif - int8_t mouse_x; - int8_t mouse_y; -} __attribute__((packed)) Serial_s2m_buffer_t; - -typedef struct _Serial_m2s_buffer_t { -# ifdef SPLIT_MODS_ENABLE - uint8_t real_mods; - uint8_t weak_mods; -# ifndef NO_ACTION_ONESHOT - uint8_t oneshot_mods; -# endif -# endif -# ifndef DISABLE_SYNC_TIMER - uint32_t sync_timer; -# endif -# ifdef SPLIT_TRANSPORT_MIRROR - matrix_row_t mmatrix[ROWS_PER_HAND]; -# endif -# ifdef BACKLIGHT_ENABLE - uint8_t backlight_level; -# endif -# ifdef WPM_ENABLE - uint8_t current_wpm; -# endif - uint16_t device_cpi; - bool oled_on; - layer_state_t t_layer_state; - layer_state_t t_default_layer_state; -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - led_eeconfig_t led_matrix; - bool led_suspend_state; -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - rgb_config_t rgb_matrix; - bool rgb_suspend_state; -# endif -} __attribute__((packed)) Serial_m2s_buffer_t; - -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) -// When MCUs on both sides drive their respective RGB LED chains, -// it is necessary to synchronize, so it is necessary to communicate RGB -// information. In that case, define RGBLIGHT_SPLIT with info on the number -// of LEDs on each half. -// -// Otherwise, if the master side MCU drives both sides RGB LED chains, -// there is no need to communicate. - -typedef struct _Serial_rgblight_t { - rgblight_syncinfo_t rgblight_sync; -} Serial_rgblight_t; - -volatile Serial_rgblight_t serial_rgblight = {}; -uint8_t volatile status_rgblight = 0; -# endif - -volatile Serial_s2m_buffer_t serial_s2m_buffer = {}; -volatile Serial_m2s_buffer_t serial_m2s_buffer = {}; -uint8_t volatile status0 = 0; - -enum serial_transaction_id { - GET_SLAVE_MATRIX = 0, -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - PUT_RGBLIGHT, -# endif -}; - -SSTD_t transactions[] = { - [GET_SLAVE_MATRIX] = - { - (uint8_t *)&status0, - sizeof(serial_m2s_buffer), - (uint8_t *)&serial_m2s_buffer, - sizeof(serial_s2m_buffer), - (uint8_t *)&serial_s2m_buffer, - }, -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - [PUT_RGBLIGHT] = - { - (uint8_t *)&status_rgblight, sizeof(serial_rgblight), (uint8_t *)&serial_rgblight, 0, NULL // no slave to master transfer - }, -# endif -}; - -void transport_master_init(void) { soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } - -void transport_slave_init(void) { soft_serial_target_init(transactions, TID_LIMIT(transactions)); } - -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - -// rgblight synchronization information communication. - -void transport_rgblight_master(void) { - if (rgblight_get_change_flags()) { - rgblight_get_syncinfo((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync); - if (soft_serial_transaction(PUT_RGBLIGHT) == TRANSACTION_END) { - rgblight_clear_change_flags(); - } - } -} - -void transport_rgblight_slave(void) { - if (status_rgblight == TRANSACTION_ACCEPTED) { - rgblight_update_sync((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync, false); - status_rgblight = TRANSACTION_END; - } -} - -# else -# define transport_rgblight_master() -# define transport_rgblight_slave() -# endif - -bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { -# ifndef SERIAL_USE_MULTI_TRANSACTION - if (soft_serial_transaction() != TRANSACTION_END) { - return false; - } -# else - transport_rgblight_master(); - if (soft_serial_transaction(GET_SLAVE_MATRIX) != TRANSACTION_END) { - return false; - } -# endif - - // TODO: if MATRIX_COLS > 8 change to unpack() - for (int i = 0; i < ROWS_PER_HAND; ++i) { - slave_matrix[i] = serial_s2m_buffer.smatrix[i]; -# ifdef SPLIT_TRANSPORT_MIRROR - serial_m2s_buffer.mmatrix[i] = master_matrix[i]; -# endif - } - -# ifdef BACKLIGHT_ENABLE - // Write backlight level for slave to read - serial_m2s_buffer.backlight_level = is_backlight_enabled() ? get_backlight_level() : 0; -# endif - -# ifdef ENCODER_ENABLE - encoder_update_raw((uint8_t *)serial_s2m_buffer.encoder_state); -# endif - -# ifdef WPM_ENABLE - // Write wpm to slave - serial_m2s_buffer.current_wpm = get_current_wpm(); -# endif - -# ifdef SPLIT_MODS_ENABLE - serial_m2s_buffer.real_mods = get_mods(); - serial_m2s_buffer.weak_mods = get_weak_mods(); -# ifndef NO_ACTION_ONESHOT - serial_m2s_buffer.oneshot_mods = get_oneshot_mods(); -# endif -# endif - -# ifdef POINTING_DEVICE_ENABLE - if (is_keyboard_left()) { - report_mouse_t temp_report = pointing_device_get_report(); - temp_report.x = serial_s2m_buffer.mouse_x; - temp_report.y = serial_s2m_buffer.mouse_y; - pointing_device_set_report(temp_report); - serial_m2s_buffer.device_cpi = device_cpi; - } -# endif - - serial_m2s_buffer.t_layer_state = layer_state; - serial_m2s_buffer.t_default_layer_state = default_layer_state; -# ifdef OLED_DRIVER_ENABLE - serial_m2s_buffer.oled_on = is_oled_on(); -# endif - -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - serial_m2s_buffer.led_matrix = led_matrix_eeconfig; - serial_m2s_buffer.led_suspend_state = led_matrix_get_suspend_state(); -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - serial_m2s_buffer.rgb_matrix = rgb_matrix_config; - serial_m2s_buffer.rgb_suspend_state = rgb_matrix_get_suspend_state(); -# endif -# ifndef DISABLE_SYNC_TIMER - serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; -# endif - return true; -} - -void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { - transport_rgblight_slave(); -# ifndef DISABLE_SYNC_TIMER - sync_timer_update(serial_m2s_buffer.sync_timer); -# endif - - // TODO: if MATRIX_COLS > 8 change to pack() - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_s2m_buffer.smatrix[i] = slave_matrix[i]; -# ifdef SPLIT_TRANSPORT_MIRROR - master_matrix[i] = serial_m2s_buffer.mmatrix[i]; -# endif - } - -# ifdef BACKLIGHT_ENABLE - backlight_set(serial_m2s_buffer.backlight_level); -# endif - -# ifdef ENCODER_ENABLE - encoder_state_raw((uint8_t *)serial_s2m_buffer.encoder_state); -# endif - -# ifdef WPM_ENABLE - set_current_wpm(serial_m2s_buffer.current_wpm); -# endif - -# ifdef SPLIT_MODS_ENABLE - set_mods(serial_m2s_buffer.real_mods); - set_weak_mods(serial_m2s_buffer.weak_mods); -# ifndef NO_ACTION_ONESHOT - set_oneshot_mods(serial_m2s_buffer.oneshot_mods); -# endif -# endif - -# ifdef POINTING_DEVICE_ENABLE - if (!is_keyboard_left()) { - static uint16_t cpi; - if (cpi != serial_m2s_buffer.device_cpi) { - cpi = serial_m2s_buffer.device_cpi; - pmw_set_cpi(cpi); - } - serial_s2m_buffer.mouse_x = split_mouse_x; - serial_s2m_buffer.mouse_y = split_mouse_y; - } -# endif - - if (layer_state != serial_m2s_buffer.t_layer_state) { - layer_state = serial_m2s_buffer.t_layer_state; - } - if (default_layer_state != serial_m2s_buffer.t_default_layer_state) { - default_layer_state = serial_m2s_buffer.t_default_layer_state; - } -# ifdef OLED_DRIVER_ENABLE - if (serial_m2s_buffer.oled_on) { - oled_on(); - } else { - oled_off(); - } -# endif - -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - led_matrix_eeconfig = serial_m2s_buffer.led_matrix; - led_matrix_set_suspend_state(serial_m2s_buffer.led_suspend_state); -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - rgb_matrix_config = serial_m2s_buffer.rgb_matrix; - rgb_matrix_set_suspend_state(serial_m2s_buffer.rgb_suspend_state); -# endif -} - -#endif - -#ifdef POINTING_DEVICE_ENABLE -void master_mouse_send(int8_t x, int8_t y) { - split_mouse_x = x; - split_mouse_y = y; -} -void trackball_set_cpi(uint16_t cpi) { - if (!is_keyboard_left()) { - pmw_set_cpi(cpi); - } else { - device_cpi = cpi; - } -} -#endif diff --git a/keyboards/handwired/dactyl_manuform/dactyl_manuform.h b/keyboards/handwired/dactyl_manuform/dactyl_manuform.h index 1b6b105ece..f0a7ee2f3b 100644 --- a/keyboards/handwired/dactyl_manuform/dactyl_manuform.h +++ b/keyboards/handwired/dactyl_manuform/dactyl_manuform.h @@ -16,8 +16,6 @@ #include "6x6.h" #elif KEYBOARD_handwired_dactyl_manuform_dmote_62key #include "62key.h" -#elif KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball -# include "5x6_right_trackball.h" #endif #include "quantum.h" diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/config.h b/keyboards/handwired/frankie_macropad/keymaps/default/config.h index 5bad6bcab3..dd687cad58 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/config.h +++ b/keyboards/handwired/frankie_macropad/keymaps/default/config.h @@ -1,4 +1,4 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> +/* Copyright 2021 QMK * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,9 +14,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ - - #pragma once - -#include "../drashna/config.h" +#define LAYER_STATE_8BIT diff --git a/keyboards/handwired/frenchdev/rules.mk b/keyboards/handwired/frenchdev/rules.mk index abf4e62c4b..a77baaa9a7 100644 --- a/keyboards/handwired/frenchdev/rules.mk +++ b/keyboards/handwired/frenchdev/rules.mk @@ -29,7 +29,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 RGBLIGHT_ENABLE = no -API_SYSEX_ENABLE = no # project specific files SRC = i2c_master.c \ diff --git a/keyboards/handwired/freoduo/rules.mk b/keyboards/handwired/freoduo/rules.mk index e3da3753e4..d8923557d6 100644 --- a/keyboards/handwired/freoduo/rules.mk +++ b/keyboards/handwired/freoduo/rules.mk @@ -11,7 +11,7 @@ BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work @@ -21,4 +21,4 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output VELOCIKEY_ENABLE = yes -SPLIT_KEYBOARD = yes
\ No newline at end of file +SPLIT_KEYBOARD = yes diff --git a/keyboards/handwired/hnah40rgb/config.h b/keyboards/handwired/hnah40rgb/config.h index e6271738c0..3d558f97fc 100644 --- a/keyboards/handwired/hnah40rgb/config.h +++ b/keyboards/handwired/hnah40rgb/config.h @@ -60,7 +60,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set diff --git a/keyboards/handwired/jot50/rules.mk b/keyboards/handwired/jot50/rules.mk index d01dfefa5e..bc18e18601 100644 --- a/keyboards/handwired/jot50/rules.mk +++ b/keyboards/handwired/jot50/rules.mk @@ -28,7 +28,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/jotanck/rules.mk b/keyboards/handwired/jotanck/rules.mk index 2a233cccd0..6f9f693f5c 100644 --- a/keyboards/handwired/jotanck/rules.mk +++ b/keyboards/handwired/jotanck/rules.mk @@ -28,7 +28,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/jotpad16/rules.mk b/keyboards/handwired/jotpad16/rules.mk index 79c32c5c35..73e87b906c 100644 --- a/keyboards/handwired/jotpad16/rules.mk +++ b/keyboards/handwired/jotpad16/rules.mk @@ -28,7 +28,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/p1800fl/rules.mk b/keyboards/handwired/p1800fl/rules.mk deleted file mode 100644 index cde197a0db..0000000000 --- a/keyboards/handwired/p1800fl/rules.mk +++ /dev/null @@ -1,30 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = qmk-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/p65rgb/config.h b/keyboards/handwired/p65rgb/config.h index c50fc2826a..142d3c03ea 100644 --- a/keyboards/handwired/p65rgb/config.h +++ b/keyboards/handwired/p65rgb/config.h @@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_DI_PIN B4 #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_LED_PROCESS_LIMIT 4 diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk index 4b96e2f691..52caf4b594 100644 --- a/keyboards/handwired/promethium/rules.mk +++ b/keyboards/handwired/promethium/rules.mk @@ -33,7 +33,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_MOUSE_ENABLE = yes PS2_USE_INT = yes -API_SYSEX_ENABLE = no CUSTOM_MATRIX = yes BLUETOOTH = AdafruitBLE diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.c b/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.c new file mode 100644 index 0000000000..7ea4d97472 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.c @@ -0,0 +1,67 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "4x6_right.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + { 24, 23, 18, 17, 10, 9 }, + { 25, 22, 19, 16, 11, 8 }, + { 26, 21, 20, 15, 12, 7 }, + { NO_LED, NO_LED, NO_LED, 14, 13, 6 }, + { NO_LED, NO_LED, NO_LED, 14, 13, 6 }, + { 51, 50, 45, 44, 37, 36 }, + { 52, 49, 46, 43, 38, 35 }, + { 53, 48, 47, 42, 39, 34 }, + { NO_LED, NO_LED, NO_LED, 41, 40, 33 }, + { NO_LED, NO_LED, NO_LED, 41, 40, 33 } +}, { + { 85, 16 }, { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, + { 85, 39 }, { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, + { 60, 55 }, { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, + { 16, 42 }, { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }, { 139, 16 }, + { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, { 139, 39 }, + { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, { 164, 55 }, + { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, { 208, 42 }, + { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 } +}, { + 2, 2, 2, 2, 2, 2, 1, + 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 1, 4, + 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, + 4, 4, 1, 1, 1 +} }; +#endif + +#ifdef SWAP_HANDS_ENABLE +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}, + {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}}, + {{5, 7}, {4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}}, + {{5, 8}, {4, 8}, {3, 8}, {2, 8}, {1, 8}, {0, 8}}, + {{5, 9}, {4, 9}, {3, 9}, {2, 9}, {1, 9}, {0, 9}}, + /* Right hand, matrix positions */ + {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, + {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, + {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, + {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, + {{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}} +}; +#endif diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.h b/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.h new file mode 100644 index 0000000000..66b5880785 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.h @@ -0,0 +1,47 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "tractyl_manuform.h" +#include "quantum.h" + +#define ___ KC_NO + +// clang-format off +#define LAYOUT_4x6_right(\ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L32, L33, R32, R33, \ + L34, L35, R31, \ + L44, L45, R41, \ + L42, L43, R42, R43 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { ___, ___, L32, L33, L34, L35 }, \ + { ___, ___, L42, L43, L44, L45 }, \ + \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { ___, R31, R32, R33, ___, ___ }, \ + { ___, R41, R42, R43, ___, ___ } \ +} +// clang-format on diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/config.h b/keyboards/handwired/tractyl_manuform/4x6_right/config.h new file mode 100644 index 0000000000..05a1c5f3be --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/4x6_right/config.h @@ -0,0 +1,91 @@ +/* +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +#define PRODUCT_ID 0x3537 +#define DEVICE_VER 0x0001 +#define PRODUCT Tractyl Manuform(4x6) + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_COL_PINS { C0, C1, C2, C3, C4, C5 } +#define MATRIX_ROW_PINS { A0, A1, A2, A3, A4 } + +#define DIODE_DIRECTION COL2ROW + +// WS2812 RGB LED strip input and number of LEDs +#define RGB_DI_PIN E7 +#define DRIVER_LED_TOTAL 62 +#define RGB_MATRIX_SPLIT { 32, 30 } +#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_MATRIX_KEYPRESSES +// #define RGB_MATRIX_KEYRELEASES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 80 + +#define SPLIT_TRANSPORT_MIRROR +#define SPLIT_HAND_PIN A6 + + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +// #define DEBUG_LED_PIN D6 + +#define ROTATIONAL_TRANSFORM_ANGLE -25 + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 +#define BOOTMAGIC_LITE_ROW_RIGHT 4 +#define BOOTMAGIC_LITE_COLUMN_RIGHT 5 + +#define AUDIO_PIN C6 +#define AUDIO_PIN_ALT B7 + +#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095 +#define DYNAMIC_KEYMAP_LAYER_COUNT 16 +#define LAYER_STATE_16BIT + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D3 +#define EE_HANDS + + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#define SERIAL_USE_MULTI_TRANSACTION +#define SPLIT_TRANSACTION_IDS_KB RPC_ID_STATE_SYNC, RPC_ID_SLAVE_STATE diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/info.json b/keyboards/handwired/tractyl_manuform/4x6_right/info.json index 8a413ec44f..03a570730f 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/info.json +++ b/keyboards/handwired/tractyl_manuform/4x6_right/info.json @@ -1,11 +1,11 @@ { - "keyboard_name": "Dactyl Manuform 5x6", + "keyboard_name": "Tractyl Manuform 4x6", "url": "", - "maintainer": "qmk", + "maintainer": "drashna", "width": 17, "height": 8, "layouts": { - "LAYOUT_5x6_right_trackball": { + "LAYOUT_5x6_right": { "layout": [ {"label":"L00", "x":0, "y":0}, {"label":"L01", "x":1, "y":0}, diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/default/keymap.c b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/default/keymap.c new file mode 100644 index 0000000000..d79f60b12c --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/default/keymap.c @@ -0,0 +1,62 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +enum custom_layers { + _QWERTY, + _LOWER, + _RAISE, +}; + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_4x6_right( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_BSLASH, + KC_LBRC,KC_RBRC, KC_PLUS, KC_EQL, + RAISE, KC_SPC, LOWER, + KC_TAB, KC_HOME, KC_ENT, + KC_BSPC,KC_GRV, KC_LGUI,KC_DEL +), + +[_LOWER] = LAYOUT_4x6_right( + _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC, KC_P7, KC_P8, KC_P9, RESET, KC_PLUS, + _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4, KC_P5, KC_P6, KC_MINS,KC_PIPE, + _______,_______,_______,_______,_______,_______, _______, KC_P1, KC_P2, KC_P3, KC_EQL, KC_UNDS, + _______,KC_PSCR, _______, KC_P0, + _______,_______, _______, + _______,_______, _______, + _______,_______, _______,_______ +), + +[_RAISE] = LAYOUT_4x6_right( + _______,RESET, _______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS, KC_SLCK,KC_MUTE, + _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD, + _______,_______, KC_EQL ,_______, + _______,_______, _______, + _______,_______, _______, + _______,_______, _______,_______ +), +}; diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/config.h b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/config.h index dedd1f5fe2..21bc8e616a 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/config.h +++ b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/config.h @@ -17,13 +17,12 @@ #pragma once // #define USE_I2C -#define SELECT_SOFT_SERIAL_SPEED 0 +// #define SELECT_SOFT_SERIAL_SPEED 1 // #define SERIAL_USE_MULTI_TRANSACTION #define SPLIT_MODS_ENABLE #define EE_HANDS -#define TRACKBALL_DPI_OPTIONS \ - { 1200, 1800, 2600, 3400 } +#define TRACKBALL_DPI_OPTIONS { 1200, 1800, 2600, 3400 } #define RGBLIGHT_MAX_BRIGHTNESS 60 @@ -35,5 +34,3 @@ #define OLED_DISPLAY_128X64 #define OLED_BRIGHTNESS 50 - -#define MK_KINETIC_SPEED diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c new file mode 100644 index 0000000000..7e3c356bd9 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c @@ -0,0 +1,243 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "drashna.h" + +// clang-format off +#define LAYOUT_4x6_right_wrapper(...) LAYOUT_4x6_right(__VA_ARGS__) +#define LAYOUT_4x6_right_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_4x6_right_wrapper( \ + SH_TT, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, SH_TT, \ + LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \ + OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ + OS_LGUI, OS_LALT, OS_RGUI, OS_RALT, \ + KC_PSCR, KC_GRV, MEH_T(KC_BTN3), \ + KC_SPC, OS_LGUI, KC_ENT, \ + BK_LWER, TT(_MOUSE), TT(_MOUSE), DL_RAIS \ + ) +#define LAYOUT_4x6_right_base_wrapper(...) LAYOUT_4x6_right_base(__VA_ARGS__) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_4x6_right_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_COLEMAK] = LAYOUT_4x6_right_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_4x6_right_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_WORKMAN] = LAYOUT_4x6_right_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + + [_NORMAN] = LAYOUT_4x6_right_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_4x6_right_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_4x6_right_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_4x6_right_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + + [_MOUSE] = LAYOUT_4x6_right( + _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, DPI_CONFIG, _______, + _______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6, _______, + _______, _______, _______, _______, _______, _______, KC_BTN7, KC_BTN4, KC_BTN5, KC_BTN8, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______, _______ + ), + [_GAMEPAD] = LAYOUT_4x6_right( + KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______, + KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______, + KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_H, _______, _______, _______, _______, _______, _______, + KC_I, KC_T, TG_GAME, KC_NO, + KC_V, KC_O, _______, + KC_SPC, KC_P, _______, + KC_H, KC_LGUI, _______, _______ + ), + [_DIABLO] = LAYOUT_4x6_right( + KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, _______, _______, _______, _______, _______, _______, + KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, _______, _______, _______, _______, _______, _______, + KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, _______, _______, _______, _______, _______, _______, + KC_F, KC_L, KC_NO, TG_DBLO, + KC_DIABLO_CLEAR, KC_F, _______, + SFT_T(KC_SPC), KC_J, _______, + ALT_T(KC_Q), KC_LGUI, _______, _______ + ), + [_LOWER] = LAYOUT_4x6_right_wrapper( + KC_F12, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11, + _______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, + _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______, _______ + ), + [_RAISE] = LAYOUT_4x6_right_wrapper( + KC_F12, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_F11, + _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______, _______ + ), + [_ADJUST] = LAYOUT_4x6_right_wrapper( + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, + VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, + UC_MOD, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, + HPT_DWLI, HPT_DWLD, TG_GAME, TG_DBLO, + HPT_TOG, HPT_BUZ, KC_NUKE, + _______, _______, _______, + _______, _______, KC_NUKE, _______ + ), +}; +// clang-format on + +#ifdef POINTING_DEVICE_ENABLE +static uint16_t mouse_timer = 0; +static uint16_t mouse_debounce_timer = 0; +static uint8_t mouse_keycode_tracker = 0; +bool tap_toggling = false; + +void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { + if ((x || y) && timer_elapsed(mouse_timer) > 125) { + mouse_timer = timer_read(); + if (!layer_state_is(_MOUSE) && !(layer_state_is(_GAMEPAD) || layer_state_is(_DIABLO)) && timer_elapsed(mouse_debounce_timer) > 125) { + layer_on(_MOUSE); + } + } + +# ifdef TAPPING_TERM_PER_KEY + if (timer_elapsed(mouse_debounce_timer) > get_tapping_term(KC_BTN1, NULL) +# else + if (timer_elapsed(mouse_debounce_timer) > TAPPING_TERM +# endif + || (layer_state_is(_GAMEPAD) || layer_state_is(_DIABLO))) { + mouse_report->x = x; + mouse_report->y = y; + } +# ifdef OLED_DRIVER_ENABLE + if (x || y) oled_timer = timer_read32(); +# endif +} + +void matrix_scan_keymap(void) { + if (timer_elapsed(mouse_timer) > 650 && layer_state_is(_MOUSE) && !mouse_keycode_tracker && !tap_toggling) { + layer_off(_MOUSE); + } + if (tap_toggling) { + if (!layer_state_is(_MOUSE)) { + layer_on(_MOUSE); + } + } +} + +bool process_record_keymap(uint16_t keycode, keyrecord_t* record) { + switch (keycode) { + case TT(_MOUSE): { + if (record->event.pressed) { + mouse_keycode_tracker++; + } else { +# if TAPPING_TOGGLE != 0 + if (record->tap.count == TAPPING_TOGGLE) { + tap_toggling ^= 1; +# if TAPPING_TOGGLE == 1 + if (!tap_toggling) mouse_keycode_tracker -= record->tap.count + 1; +# else + if (!tap_toggling) mouse_keycode_tracker -= record->tap.count; +# endif + } else { + mouse_keycode_tracker--; + } +# endif + } + mouse_timer = timer_read(); + break; + } + case MO(_MOUSE): + case DPI_CONFIG: + case KC_MS_UP ... KC_MS_WH_RIGHT: + record->event.pressed ? mouse_keycode_tracker++ : mouse_keycode_tracker--; + mouse_timer = timer_read(); + break; + default: + if (layer_state_is(_MOUSE) && !mouse_keycode_tracker) { + layer_off(_MOUSE); + } + mouse_keycode_tracker = 0; + mouse_debounce_timer = timer_read(); + break; + } + return true; +} + +layer_state_t layer_state_set_keymap(layer_state_t state) { + if (layer_state_cmp(state, _GAMEPAD) || layer_state_cmp(state, _DIABLO)) { + state |= (1UL << _MOUSE); + } + return state; +} +#endif + +void matrix_init_keymap(void) { +#ifdef AUDIO_ENABLE + extern audio_config_t audio_config; + + if (!is_keyboard_master()) { + audio_stop_all(); + audio_config.enable = false; + } +#endif +} + +void keyboard_post_init_keymap(void) { + matrix_init_keymap(); +} diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/rules.mk b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/rules.mk index 754f0e45de..d658d45bfc 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/rules.mk +++ b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/rules.mk @@ -1,6 +1,7 @@ RGBLIGHT_STARTUP_ANIMATION = yes -COMMAND_ENABLE = no AUDIO_ENABLE = yes +HAPTIC_ENABLE = no +COMMAND_ENABLE = no TAP_DANCE_ENABLE = yes UNICODE_ENABLE = yes OLED_DRIVER_ENABLE = yes diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/readme.md b/keyboards/handwired/tractyl_manuform/4x6_right/readme.md index b6e38dc845..b6e38dc845 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/readme.md +++ b/keyboards/handwired/tractyl_manuform/4x6_right/readme.md diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/rules.mk b/keyboards/handwired/tractyl_manuform/4x6_right/rules.mk new file mode 100644 index 0000000000..6be8a89f6d --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/4x6_right/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = at90usb1286 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = no +RGB_MATRIX_DRIVER = WS2812 + + +POINTING_DEVICE_ENABLE = yes +MOUSE_SHARED_EP = no + +SPLIT_KEYBOARD = yes + +SRC += drivers/sensors/pmw3360.c +QUANTUM_LIB_SRC += spi_master.c tm_sync.c diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.c b/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.c new file mode 100644 index 0000000000..1766312e1b --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "5x6_right.h" + +#ifdef SWAP_HANDS_ENABLE +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}}, + {{5, 7}, {4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}}, + {{5, 8}, {4, 8}, {3, 8}, {2, 8}, {1, 8}, {0, 8}}, + {{5, 9}, {4, 9}, {3, 9}, {2, 9}, {1, 9}, {0, 9}}, + {{5, 10}, {4, 10}, {3, 10}, {2, 10}, {1, 10}, {0, 10}}, + {{5, 11}, {4, 11}, {3, 11}, {2, 11}, {1, 11}, {0, 11}}, + /* Right hand, matrix positions */ + {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, + {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, + {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, + {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, + {{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}}, + {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}}; +#endif diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.h b/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.h index c8650f73d3..90dc46d7e2 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.h @@ -16,16 +16,13 @@ #pragma once -#include "dactyl_manuform.h" +#include "tractyl_manuform.h" #include "quantum.h" -#include "spi_master.h" -#include "pmw3360.h" -#include "pointing_device.h" - #define ___ KC_NO -#define LAYOUT_5x6_right_trackball(\ +// clang-format off +#define LAYOUT_5x6_right(\ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ @@ -50,24 +47,4 @@ { ___, R41, R42, R43, ___, ___ }, \ { ___, R51, R52, R53, ___, ___ } \ } - - -void process_wheel(report_mouse_t* mouse_report); -void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v); - -typedef union { - uint32_t raw; - struct { - uint8_t dpi_config; - }; -} keyboard_config_t; - -extern keyboard_config_t keyboard_config; - -enum ploopy_keycodes { - DPI_CONFIG = SAFE_RANGE, - KEYMAP_SAFE_RANGE, -}; - -void master_mouse_send(int8_t x, int8_t y); -void trackball_set_cpi(uint16_t cpi); +// clang-format on diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/config.h index bc6d66bb9d..9dc46f2e60 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/config.h @@ -20,9 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -#define PRODUCT_ID 0x3536 -#define DEVICE_VER 0x0001 -#define PRODUCT Tractyl-Manuform (5x6 with right side Trackball) +#define PRODUCT_ID 0x3536 +#define DEVICE_VER 0x0001 +#define PRODUCT Tractyl Manuform(5x6) /* key matrix size */ // Rows are doubled-up @@ -36,37 +36,53 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIODE_DIRECTION COL2ROW // WS2812 RGB LED strip input and number of LEDs -#define RGB_DI_PIN E7 -#define RGBLED_NUM 58 +#define RGB_DI_PIN E7 +#define RGBLED_NUM 58 #define RGBLIGHT_SPLIT -#define RGBLED_SPLIT { 30 , 28 } +#define RGBLED_SPLIT { 30, 28 } #define RGBLIGHT_SLEEP // #define RGBW -#define RGBLIGHT_LIMIT_VAL 100 +#define RGBLIGHT_LIMIT_VAL 50 /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST /* number of backlight levels */ // #define BACKLIGHT_LEVELS 3 -#define DEBUG_LED_PIN D6 +#define DEBUG_LED_PIN D6 -#define USB_POLLING_INTERVAL_MS 1 - -#define ROTATIONAL_TRANSFORM_ANGLE -25 +#define ROTATIONAL_TRANSFORM_ANGLE -25 /* Bootmagic Lite key configuration */ -#define BOOTMAGIC_LITE_ROW 0 -#define BOOTMAGIC_LITE_COLUMN 0 -#define BOOTMAGIC_LITE_ROW_RIGHT 6 -#define BOOTMAGIC_LITE_COLUMN_RIGHT 5 +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 +#define BOOTMAGIC_LITE_ROW_RIGHT 6 +#define BOOTMAGIC_LITE_COLUMN_RIGHT 5 -#define AUDIO_PIN C6 -#define AUDIO_PIN_ALT B7 +#define AUDIO_PIN C6 +#define AUDIO_PIN_ALT B7 #define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095 -#define DYNAMIC_KEYMAP_LAYER_COUNT 16 +#define DYNAMIC_KEYMAP_LAYER_COUNT 16 +#define LAYER_STATE_16BIT /* serial.c configuration for split keyboard */ -#undef SOFT_SERIAL_PIN #define SOFT_SERIAL_PIN D2 +#define EE_HANDS + +#define ENCODERS_PAD_A { D5 } +#define ENCODERS_PAD_B { D6 } +#define ENCODER_RESOLUTION 1 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#define SERIAL_USE_MULTI_TRANSACTION +#define SPLIT_TRANSACTION_IDS_KB RPC_ID_STATE_SYNC, RPC_ID_SLAVE_STATE diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/info.json b/keyboards/handwired/tractyl_manuform/5x6_right/info.json new file mode 100644 index 0000000000..b6d4db4e7b --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/info.json @@ -0,0 +1,75 @@ +{ + "keyboard_name": "Tractyl Manuform 5x6", + "url": "", + "maintainer": "drashna", + "width": 17, + "height": 8, + "layouts": { + "LAYOUT_5x6_right": { + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"L05", "x":5, "y":0}, + {"label":"R00", "x":11, "y":0}, + {"label":"R01", "x":12, "y":0}, + {"label":"R02", "x":13, "y":0}, + {"label":"R03", "x":14, "y":0}, + {"label":"R04", "x":15, "y":0}, + {"label":"R05", "x":16, "y":0}, + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"L15", "x":5, "y":1}, + {"label":"R10", "x":11, "y":1}, + {"label":"R11", "x":12, "y":1}, + {"label":"R12", "x":13, "y":1}, + {"label":"R13", "x":14, "y":1}, + {"label":"R14", "x":15, "y":1}, + {"label":"R15", "x":16, "y":1}, + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"L25", "x":5, "y":2}, + {"label":"R20", "x":11, "y":2}, + {"label":"R21", "x":12, "y":2}, + {"label":"R22", "x":13, "y":2}, + {"label":"R23", "x":14, "y":2}, + {"label":"R24", "x":15, "y":2}, + {"label":"R25", "x":16, "y":2}, + {"label":"L30", "x":0, "y":3}, + {"label":"L31", "x":1, "y":3}, + {"label":"L32", "x":2, "y":3}, + {"label":"L33", "x":3, "y":3}, + {"label":"L34", "x":4, "y":3}, + {"label":"L35", "x":5, "y":3}, + {"label":"R30", "x":11, "y":3}, + {"label":"R31", "x":12, "y":3}, + {"label":"R32", "x":13, "y":3}, + {"label":"R33", "x":14, "y":3}, + {"label":"R34", "x":15, "y":3}, + {"label":"R35", "x":16, "y":3}, + {"label":"L42", "x":2, "y":4}, + {"label":"L43", "x":3, "y":4}, + {"label":"R42", "x":13, "y":4}, + {"label":"R43", "x":14, "y":4}, + {"label":"L44", "x":4, "y":5}, + {"label":"L45", "x":5, "y":5}, + {"label":"R41", "x":12, "y":5}, + {"label":"L54", "x":6, "y":6}, + {"label":"L55", "x":7, "y":6}, + {"label":"R51", "x":10, "y":6}, + {"label":"L52", "x":6, "y":7}, + {"label":"L53", "x":7, "y":7}, + {"label":"R52", "x":9, "y":7}, + {"label":"R53", "x":10, "y":7} + ] + } + } +} diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/default/keymap.c b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/default/keymap.c new file mode 100644 index 0000000000..30dafdf516 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/default/keymap.c @@ -0,0 +1,63 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +enum custom_layers { + _QWERTY, + _LOWER, + _RAISE, +}; + + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_5x6_right( + KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_MINS, + KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, + KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_BSLASH, + KC_LBRC,KC_RBRC, KC_PLUS, KC_EQL, + RAISE,KC_SPC, LOWER, + KC_TAB,KC_HOME, KC_DEL, + KC_BSPC, KC_GRV, KC_LGUI, KC_ENT + ), + + [_LOWER] = LAYOUT_5x6_right( + KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL, + _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC, KC_P7 , KC_P8 , KC_P9 ,_______,KC_PLUS, + _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 ,KC_MINS,KC_PIPE, + _______,_______,_______,_______,_______,_______, _______, KC_P1 , KC_P2 , KC_P3 ,KC_EQL ,KC_UNDS, + _______,KC_PSCR, _______, KC_P0, + _______,_______, _______, + _______,_______, _______, + _______,_______, _______,_______ + + ), + + [_RAISE] = LAYOUT_5x6_right( + KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 , + _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS ,KC_SLCK,KC_MUTE, + _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD, + _______,_______, KC_EQL ,_______, + _______,_______, _______, + _______,_______, _______, + _______,_______, _______,_______ + ), +}; diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/post_config.h b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h index 40f1029b5d..21bc8e616a 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/post_config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h @@ -16,18 +16,21 @@ #pragma once -#ifndef MOUSEKEY_WHEEL_DELTA -# define MOUSEKEY_WHEEL_DELTA 1 -#endif -#ifndef MOUSEKEY_WHEEL_DELAY -# define MOUSEKEY_WHEEL_DELAY 200 -#endif -#ifndef MOUSEKEY_WHEEL_INTERVAL -# define MOUSEKEY_WHEEL_INTERVAL 50 -#endif -#ifndef MOUSEKEY_WHEEL_MAX_SPEED -# define MOUSEKEY_WHEEL_MAX_SPEED 8 -#endif -#ifndef MOUSEKEY_WHEEL_TIME_TO_MAX -# define MOUSEKEY_WHEEL_TIME_TO_MAX 80 -#endif +// #define USE_I2C +// #define SELECT_SOFT_SERIAL_SPEED 1 +// #define SERIAL_USE_MULTI_TRANSACTION +#define SPLIT_MODS_ENABLE +#define EE_HANDS + +#define TRACKBALL_DPI_OPTIONS { 1200, 1800, 2600, 3400 } + +#define RGBLIGHT_MAX_BRIGHTNESS 60 + +#undef DEBOUNCE +#define DEBOUNCE 10 + +#define SOLENOID_PIN F1 +#define SOLENOID_DEFAULT_DWELL 8 + +#define OLED_DISPLAY_128X64 +#define OLED_BRIGHTNESS 50 diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/keymap.c b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c index b3300daa9c..6b6d1ab83c 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/keymap.c +++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c @@ -17,75 +17,75 @@ #include "drashna.h" // clang-format off -#define LAYOUT_5x6_right_trackball_wrapper(...) LAYOUT_5x6_right_trackball(__VA_ARGS__) -#define LAYOUT_5x6_right_trackball_base( \ +#define LAYOUT_5x6_right_wrapper(...) LAYOUT_5x6_right(__VA_ARGS__) +#define LAYOUT_5x6_right_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ ) \ - LAYOUT_5x6_right_trackball_wrapper( \ - KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \ + LAYOUT_5x6_right_wrapper( \ + KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, UC_IRNY, \ SH_TT, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, SH_TT, \ LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ - OS_LALT, OS_LGUI, TG_GAME, TG_DBLO, \ - OS_LGUI, KC_GRV, OS_RGUI, \ + OS_LGUI, OS_LALT, OS_RGUI, OS_RALT, \ + KC_PSCR, KC_GRV, MEH_T(KC_BTN3), \ KC_SPC, OS_LGUI, KC_ENT, \ BK_LWER, TT(_MOUSE), TT(_MOUSE), DL_RAIS \ ) -#define LAYOUT_5x6_right_trackball_base_wrapper(...) LAYOUT_5x6_right_trackball_base(__VA_ARGS__) +#define LAYOUT_5x6_right_base_wrapper(...) LAYOUT_5x6_right_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_5x6_right_trackball_base_wrapper( + [_QWERTY] = LAYOUT_5x6_right_base_wrapper( _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ ), - [_COLEMAK] = LAYOUT_5x6_right_trackball_base_wrapper( + [_COLEMAK] = LAYOUT_5x6_right_base_wrapper( _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ ), - [_DVORAK] = LAYOUT_5x6_right_trackball_base_wrapper( + [_DVORAK] = LAYOUT_5x6_right_base_wrapper( _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ ), - [_WORKMAN] = LAYOUT_5x6_right_trackball_base_wrapper( + [_WORKMAN] = LAYOUT_5x6_right_base_wrapper( _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ ), - [_NORMAN] = LAYOUT_5x6_right_trackball_base_wrapper( + [_NORMAN] = LAYOUT_5x6_right_base_wrapper( _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ ), - [_MALTRON] = LAYOUT_5x6_right_trackball_base_wrapper( + [_MALTRON] = LAYOUT_5x6_right_base_wrapper( _________________MALTRON_L1________________, _________________MALTRON_R1________________, _________________MALTRON_L2________________, _________________MALTRON_R2________________, _________________MALTRON_L3________________, _________________MALTRON_R3________________ ), - [_EUCALYN] = LAYOUT_5x6_right_trackball_base_wrapper( + [_EUCALYN] = LAYOUT_5x6_right_base_wrapper( _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ ), - [_CARPLAX] = LAYOUT_5x6_right_trackball_base_wrapper( + [_CARPLAX] = LAYOUT_5x6_right_base_wrapper( _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ ), - [_MOUSE] = LAYOUT_5x6_right_trackball( + [_MOUSE] = LAYOUT_5x6_right( _______, _______, _______, _______, _______, _______, DPI_CONFIG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6, _______, @@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______ ), - [_GAMEPAD] = LAYOUT_5x6_right_trackball( + [_GAMEPAD] = LAYOUT_5x6_right( KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, DPI_CONFIG, _______, _______, _______, _______, _______, KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______, KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______, @@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SPC, KC_P, _______, KC_H, KC_LGUI, _______, _______ ), - [_DIABLO] = LAYOUT_5x6_right_trackball( + [_DIABLO] = LAYOUT_5x6_right( KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, _______, _______, _______, _______, _______, _______, KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, _______, _______, _______, _______, _______, _______, @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { SFT_T(KC_SPC), KC_J, _______, ALT_T(KC_Q), KC_LGUI, _______, _______ ), - [_LOWER] = LAYOUT_5x6_right_trackball_wrapper( + [_LOWER] = LAYOUT_5x6_right_wrapper( KC_F12, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, KC_F11, _______, _________________LOWER_L1__________________, _________________LOWER_R1__________________, _______, _______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, @@ -125,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______ ), - [_RAISE] = LAYOUT_5x6_right_trackball_wrapper( + [_RAISE] = LAYOUT_5x6_right_wrapper( KC_F12, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, KC_F11, KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______, _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, @@ -135,12 +135,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______ ), - [_ADJUST] = LAYOUT_5x6_right_trackball_wrapper( + [_ADJUST] = LAYOUT_5x6_right_wrapper( KC_MAKE, ___________________BLANK___________________, _________________ADJUST_R1_________________, KC_RST, VRSN, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, EEP_RST, - _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, TG_MODS, + UC_MOD, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, TG_MODS, _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, KC_MPLY, - HPT_DWLI, HPT_DWLD, _______, _______, + HPT_DWLI, HPT_DWLD, TG_GAME, TG_DBLO, HPT_TOG, HPT_BUZ, KC_NUKE, _______, _______, _______, _______, _______, KC_NUKE, _______ diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk new file mode 100644 index 0000000000..7e0eee8bdc --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk @@ -0,0 +1,11 @@ +RGBLIGHT_ENABLE = yes +RGBLIGHT_STARTUP_ANIMATION = yes +AUDIO_ENABLE = yes +HAPTIC_ENABLE = no +COMMAND_ENABLE = no +TAP_DANCE_ENABLE = yes +UNICODE_ENABLE = yes +OLED_DRIVER_ENABLE = yes +WPM_ENABLE = yes +ENCODER_ENABLE = yes +# DEBOUNCE_TYPE = sym_eager_pk diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/readme.md b/keyboards/handwired/tractyl_manuform/5x6_right/readme.md new file mode 100644 index 0000000000..b6e38dc845 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/readme.md @@ -0,0 +1,21 @@ +# Drashna's Dactyl Manuform (5x6) with a right side trackball + +![](https://preview.redd.it/zwt91036m3y51.jpg?width=960&crop=smart&auto=webp&s=e030deb7d8285c95a1a30c69a7e7a71f750e87bb) + +It's a Dactyl Manuform with an integrated thumb based trackball, using the pmw3360 optical sensor. + +It's powered by 2x Teensy++ 2.0's, using Drashna's [Teensy VBUS Hack](https://docs.qmk.fm/#/feature_split_keyboard?id=hardware-considerations-and-mods) for better detection. + + +* Keyboard Maintainer: [Drashna Jael're](https://github.com/drashna) +* Hardware Supported: [Design files](https://gitlab.com/keyboards1/dm_r_track/-/tree/master/boolean), [Teensy++ 2.0 (2x)](https://www.pjrc.com/store/teensypp.html), [PMW3360 Optical Sensor](https://www.tindie.com/products/jkicklighter/pmw3360-motion-sensor/) + +Make example for this keyboard (after setting up your build environment): + + make handwired/dactyl_manuform/5x6_right_trackball:default + +Flashing example for this keyboard: + + make handwired/dactyl_manuform/5x6_right_trackball:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/rules.mk index 3fb9ab2a84..a71929a543 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/rules.mk +++ b/keyboards/handwired/tractyl_manuform/5x6_right/rules.mk @@ -11,21 +11,21 @@ BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output SWAP_HANDS_ENABLE = yes + POINTING_DEVICE_ENABLE = yes MOUSE_SHARED_EP = no SPLIT_KEYBOARD = yes -SPLIT_TRANSPORT = custom -SRC += pmw3360.c -QUANTUM_LIB_SRC += pointer_transport.c serial.c i2c_master.c i2c_slave.c spi_master.c +SRC += drivers/sensors/pmw3360.c +QUANTUM_LIB_SRC += spi_master.c tm_sync.c diff --git a/keyboards/handwired/tractyl_manuform/config.h b/keyboards/handwired/tractyl_manuform/config.h new file mode 100644 index 0000000000..e6ab57da9e --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/config.h @@ -0,0 +1,43 @@ +/* +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x44DD +#define MANUFACTURER Drashna + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define USB_POLLING_INTERVAL_MS 1 + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/handwired/tractyl_manuform/post_config.h b/keyboards/handwired/tractyl_manuform/post_config.h new file mode 100644 index 0000000000..147e928735 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/post_config.h @@ -0,0 +1,96 @@ +/* +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +// mouse config +# ifndef MOUSEKEY_MOVE_DELTA +# ifndef MK_KINETIC_SPEED +# define MOUSEKEY_MOVE_DELTA 5 +# else +# define MOUSEKEY_MOVE_DELTA 25 +# endif +# endif +# ifndef MOUSEKEY_DELAY +# ifndef MK_KINETIC_SPEED +# define MOUSEKEY_DELAY 300 +# else +# define MOUSEKEY_DELAY 8 +# endif +# endif +# ifndef MOUSEKEY_INTERVAL +# ifndef MK_KINETIC_SPEED +# define MOUSEKEY_INTERVAL 50 +# else +# define MOUSEKEY_INTERVAL 20 +# endif +# endif +# ifndef MOUSEKEY_MAX_SPEED +# define MOUSEKEY_MAX_SPEED 7 +# endif +# ifndef MOUSEKEY_TIME_TO_MAX +# define MOUSEKEY_TIME_TO_MAX 60 +# endif +# ifndef MOUSEKEY_INITIAL_SPEED +# define MOUSEKEY_INITIAL_SPEED 100 +# endif +# ifndef MOUSEKEY_BASE_SPEED +# define MOUSEKEY_BASE_SPEED 1000 +# endif +# ifndef MOUSEKEY_DECELERATED_SPEED +# define MOUSEKEY_DECELERATED_SPEED 400 +# endif +# ifndef MOUSEKEY_ACCELERATED_SPEED +# define MOUSEKEY_ACCELERATED_SPEED 3000 +# endif + + +// mouse scroll config +# ifndef MOUSEKEY_WHEEL_DELAY +# define MOUSEKEY_WHEEL_DELAY 15 +# endif +# ifndef MOUSEKEY_WHEEL_DELTA +# define MOUSEKEY_WHEEL_DELTA 1 +# endif +# ifndef MOUSEKEY_WHEEL_INTERVAL +# define MOUSEKEY_WHEEL_INTERVAL 50 +# endif +# ifndef MOUSEKEY_WHEEL_MAX_SPEED +# define MOUSEKEY_WHEEL_MAX_SPEED 8 +# endif +# ifndef MOUSEKEY_WHEEL_TIME_TO_MAX +# define MOUSEKEY_WHEEL_TIME_TO_MAX 80 +# endif + +# ifndef MOUSEKEY_WHEEL_INITIAL_MOVEMENTS +# define MOUSEKEY_WHEEL_INITIAL_MOVEMENTS 8 +# endif +# ifndef MOUSEKEY_WHEEL_BASE_MOVEMENTS +# define MOUSEKEY_WHEEL_BASE_MOVEMENTS 48 +# endif +# ifndef MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS +# define MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS 48 +# endif +# ifndef MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS +# define MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS 8 +# endif + + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif diff --git a/keyboards/handwired/tractyl_manuform/readme.md b/keyboards/handwired/tractyl_manuform/readme.md new file mode 100644 index 0000000000..3221da0e9d --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/readme.md @@ -0,0 +1,159 @@ +Dactyl Manuform (4x5, 5x6, 5x7, 6x6) +====== +the [Dactyl-Manuform](https://github.com/tshort/dactyl-keyboard) is a split curved keyboard based on the design of [adereth dactyl](https://github.com/adereth/dactyl-keyboard) and thumb cluster design of the [manuform](https://geekhack.org/index.php?topic=46015.0) keyboard, the hardware is similar to the let's split keyboard. all information needed for making one is in the first link. +![Imgur](https://i.imgur.com/7y0Vbyd.jpg) + + +## First Time Setup + +Download or clone the `qmk_firmware` repo and navigate to its top level directory. Once your build environment is setup, you'll be able to generate the default .hex using: + +Depending on your Layout chose one of the follwing commands: + +``` +$ make handwired/dactyl_manuform/YOUR_LAYOUT:YOUR_KEYMAP_NAME +``` + +example: +``` +$ make handwired/dactyl_manuform/4x5:default +``` + +If everything worked correctly you will see a file: + +``` +dactyl_manuform_YOUR_LAYOUT_YOUR_KEYMAP_NAME.hex +``` + +For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/docs/faq_keymap.md) in the main readme.md. + + +## Keymaps + +### [Keymaps 4x5](/keyboards/handwired/dactyl_manuform/4x5/keymaps/) + +#### Default +Simple QWERTY layout with 3 Layers. +#### Dvorak + +### [Keymaps 5x6](/keyboards/handwired/dactyl_manuform/5x6/keymaps/) + +#### Default +Just a copy of the Impstyle keymap. Feel free to adjust it. + +#### Impstyle +A simple QWERTY keymap with 3 Layers. Both sides are connected via serial and the Left ist the master. + +### [Keymaps 5x7 aka almost Ergodox](/keyboards/handwired/dactyl_manuform/5x7/keymaps/) +#### Default +Keymap of Loligagger from geekhack. + +### [Keymaps 6x6](/keyboards/handwired/dactyl_manuform/6x6/keymaps/) + +#### Default +Simple QWERTY layout with 3 Layers. + +## Required Hardware + +Apart from diodes and key switches for the keyboard matrix in each half, you +will need: + +* 2 Arduino Pro Micros. You can find these on AliExpress for ≈3.50USD each. +* 2 TRRS sockets and 1 TRRS cable, or 2 TRS sockets and 1 TRS cable + +Alternatively, you can use any sort of cable and socket that has at least 3 +wires. If you want to use I2C to communicate between halves, you will need a +cable with at least 4 wires and 2x 4.7kΩ pull-up resistors + +## Optional Hardware +A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and turned on via `AUDIO_ENABLE`. + +## Wiring + +The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and digital pin 3 (i.e. +PD0 on the ATmega32u4) between the two Pro Micros. + +Next, wire your key matrix to any of the remaining 17 IO pins of the pro micro +and modify the `matrix.c` accordingly. + +The wiring for serial: + +![serial wiring](https://i.imgur.com/C3D1GAQ.png) + +The wiring for i2c: + +![i2c wiring](https://i.imgur.com/Hbzhc6E.png) + +The pull-up resistors may be placed on either half. It is also possible +to use 4 resistors and have the pull-ups in both halves, but this is +unnecessary in simple use cases. + +You can change your configuration between serial and i2c by modifying your `config.h` file. + +## Notes on Software Configuration + +the keymaps in here are for the 4x5 layout of the keyboard only. + +## Flashing + +To flash your firmware take a look at: [Flashing Instructions and Bootloader Information](https://docs.qmk.fm/#/flashing) + + +## Choosing which board to plug the USB cable into (choosing Master) + +Because the two boards are identical, the firmware has logic to differentiate the left and right board. + +It uses two strategies to figure things out: looking at the EEPROM (memory on the chip) or looking if the current board has the usb cable. + +The EEPROM approach requires additional setup (flashing the eeprom) but allows you to swap the usb cable to either side. + +The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. + +### Setting the left hand as master + +If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set. + +### Setting the right hand as master + +If you always plug the usb cable into the right board, add an extra flag to your `config.h` +``` + #define MASTER_RIGHT +``` + +### Setting EE_hands to use either hands as master + +If you define `EE_HANDS` in your `config.h`, you will need to set the +EEPROM for the left and right halves. + +The EEPROM is used to store whether the +half is left handed or right handed. This makes it so that the same firmware +file will run on both hands instead of having to flash left and right handed +versions of the firmware to each half. To flash the EEPROM file for the left +half run: +``` +make handwired/dactyl_promicro:default:dfu-split-left +make handwired/dactyl_promicro:default:dfu-split-right +``` + +After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. + +Note that you need to program both halves, but you have the option of using +different keymaps for each half. You could program the left half with a QWERTY +layout and the right half with a Colemak layout using bootmagic's default layout option. +Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the +right half is connected. + + +Notes on Using Pro Micro 3.3V +----------------------------- + +Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects +the frequency on the 3.3V board. + +Also, if the slave board is producing weird characters in certain columns, +update the following line in `matrix.c` to the following: + +``` +// wait_us(30); // without this wait read unstable value. +wait_us(300); // without this wait read unstable value. +``` diff --git a/keyboards/handwired/tractyl_manuform/tm_sync.c b/keyboards/handwired/tractyl_manuform/tm_sync.c new file mode 100644 index 0000000000..f0a611206d --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/tm_sync.c @@ -0,0 +1,132 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifdef SPLIT_TRANSACTION_IDS_KB + +# include "tractyl_manuform.h" +# include "transactions.h" +# include <string.h> +# include "drivers/sensors/pmw3360.h" + +kb_runtime_config_t kb_state; +kb_slave_data_t kb_slave; + +void slave_state_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { + if (target2initiator_buffer_size == sizeof(kb_slave)) { + memcpy(target2initiator_buffer, &kb_slave, sizeof(kb_slave)); + if (kb_slave.mouse_x > 127) { + kb_slave.mouse_x -= 127; + } else if (kb_slave.mouse_x < -127) { + kb_slave.mouse_x += 127; + } else { + kb_slave.mouse_x = 0; + } + + if (kb_slave.mouse_y > 127) { + kb_slave.mouse_y -= 127; + } else if (kb_slave.mouse_y < -127) { + kb_slave.mouse_y += 127; + } else { + kb_slave.mouse_y = 0; + } + } +} + +void pointer_state_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { + if (initiator2target_buffer_size == sizeof(kb_state)) { + memcpy(&kb_state, initiator2target_buffer, sizeof(kb_state)); + } +} + +void keyboard_post_init_kb(void) { + // Register keyboard state sync split transaction + transaction_register_rpc(RPC_ID_STATE_SYNC, pointer_state_sync); + transaction_register_rpc(RPC_ID_SLAVE_STATE, slave_state_sync); + + keyboard_post_init_user(); +} + +void kb_state_update(void) { +# ifdef POINTING_DEVICE_ENABLE + if (is_keyboard_master() && !is_keyboard_left()) { + static uint16_t cpi = 0; + if (cpi != kb_state.device_cpi) { + cpi = kb_state.device_cpi; + pmw_set_cpi(cpi); + } + } +# endif +} + +void kb_post_state_update(void) { +# ifdef POINTING_DEVICE_ENABLE + if (is_keyboard_master() && is_keyboard_left()) { + report_mouse_t temp_report = pointing_device_get_report(); + temp_report.x = kb_slave.mouse_x; + temp_report.y = kb_slave.mouse_y; + pointing_device_set_report(temp_report); + } +# endif +} + +void kb_state_sync(void) { + if (is_keyboard_master()) { + // Keep track of the last state, so that we can tell if we need to propagate to slave + static kb_runtime_config_t last_kb_state; + static uint32_t last_sync = 0; + static uint32_t mouse_sync = 0; + bool needs_sync = false; + + // Check if the state values are different + if (memcmp(&kb_state, &last_kb_state, sizeof(kb_runtime_config_t))) { + needs_sync = true; + memcpy(&last_kb_state, &kb_state, sizeof(kb_runtime_config_t)); + } + // Send to slave every 500ms regardless of state change + if (timer_elapsed32(last_sync) > 500) { + needs_sync = true; + } + + // Perform the sync if requested + if (needs_sync) { + if (transaction_rpc_send(RPC_ID_STATE_SYNC, sizeof(kb_runtime_config_t), &kb_state)) { + last_sync = timer_read32(); + } + } + + if (is_keyboard_left()) { + if (timer_elapsed32(mouse_sync) >= 5) { + // always sync slave data, since it may contain device reports. + if (transaction_rpc_recv(RPC_ID_SLAVE_STATE, sizeof(kb_slave_data_t), &kb_slave)) { + if (kb_slave.mouse_x >= -127 && kb_slave.mouse_x <= 127 && kb_slave.mouse_y >= -127 && kb_slave.mouse_y <= 127) { + mouse_sync = timer_read32(); + } + } + } + } + } +} + +void housekeeping_task_kb(void) { + // Update kb_state so we can send to slave + kb_state_update(); + + // Data sync from master to slave + kb_state_sync(); + + kb_post_state_update(); +} +#endif diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c index 4048fb233c..49a8336829 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c +++ b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c @@ -1,4 +1,4 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> +/* Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,10 +14,14 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "5x6_right_trackball.h" +#include "tractyl_manuform.h" +#include "transactions.h" +#include <string.h> +#include "drivers/sensors/pmw3360.h" #ifndef TRACKBALL_DPI_OPTIONS -# define TRACKBALL_DPI_OPTIONS { 1200, 1600, 2400 } +# define TRACKBALL_DPI_OPTIONS \ + { 1200, 1600, 2400 } # ifndef TRACKBALL_DPI_DEFAULT # define TRACKBALL_DPI_DEFAULT 1 # endif @@ -26,12 +30,15 @@ # define TRACKBALL_DPI_DEFAULT 0 #endif +extern kb_runtime_config_t kb_state; +extern kb_slave_data_t kb_slave; + keyboard_config_t keyboard_config; -uint16_t dpi_array[] = TRACKBALL_DPI_OPTIONS; +uint16_t dpi_array[] = TRACKBALL_DPI_OPTIONS; #define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t)) -bool BurstState = false; // init burst state for Trackball module -uint16_t MotionStart = 0; // Timer for accel, 0 is resting state +bool BurstState = false; // init burst state for Trackball module +uint16_t MotionStart = 0; // Timer for accel, 0 is resting state __attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { mouse_report->x = x; @@ -53,12 +60,8 @@ __attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) { MotionStart = timer_read(); } - if (debug_mouse) { - dprintf("Delt] d: %d t: %u\n", abs(data.dx) + abs(data.dy), MotionStart); - } - if (debug_mouse) { - dprintf("Pre ] X: %d, Y: %d\n", data.dx, data.dy); - } + if (debug_mouse) { dprintf("Delt] d: %d t: %u\n", abs(data.dx) + abs(data.dy), MotionStart); } + if (debug_mouse) { dprintf("Pre ] X: %d, Y: %d\n", data.dx, data.dy); } #if defined(PROFILE_LINEAR) float scale = float(timer_elaspsed(MotionStart)) / 1000.0; data.dx *= scale; @@ -85,7 +88,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { #ifdef POINTING_DEVICE_ENABLE if (keycode == DPI_CONFIG && record->event.pressed) { - if ((get_mods()|get_oneshot_mods()) & MOD_MASK_SHIFT) { + if ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) { keyboard_config.dpi_config = (keyboard_config.dpi_config - 1) % DPI_OPTION_SIZE; } else { keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE; @@ -146,19 +149,11 @@ void pointing_device_init(void) { trackball_set_cpi(dpi_array[keyboard_config.dpi_config]); } -static bool has_report_changed(report_mouse_t new, report_mouse_t old) { - return (new.buttons != old.buttons) || - (new.x && new.x != old.x) || - (new.y && new.y != old.y) || - (new.h && new.h != old.h) || - (new.v && new.v != old.v); -} +static bool has_report_changed(report_mouse_t new, report_mouse_t old) { return (new.buttons != old.buttons) || (new.x&& new.x != old.x) || (new.y&& new.y != old.y) || (new.h&& new.h != old.h) || (new.v&& new.v != old.v); } void pointing_device_task(void) { report_mouse_t mouse_report = pointing_device_get_report(); - if (!is_keyboard_left()) { - process_mouse(&mouse_report); - } + if (!is_keyboard_left()) { process_mouse(&mouse_report); } pointing_device_set_report(mouse_report); pointing_device_send(); @@ -178,24 +173,20 @@ void matrix_init_kb(void) { // is safe to just read DPI setting since matrix init // comes before pointing device init. keyboard_config.raw = eeconfig_read_kb(); - if (keyboard_config.dpi_config > DPI_OPTION_SIZE) { - eeconfig_init_kb(); - } + if (keyboard_config.dpi_config > DPI_OPTION_SIZE) { eeconfig_init_kb(); } matrix_init_user(); } #ifdef POINTING_DEVICE_ENABLE void pointing_device_send(void) { - static report_mouse_t old_report = {}; - report_mouse_t mouseReport = pointing_device_get_report(); + static report_mouse_t old_report = {}; + report_mouse_t mouseReport = pointing_device_get_report(); if (is_keyboard_master()) { int8_t x = mouseReport.x, y = mouseReport.y; mouseReport.x = 0; mouseReport.y = 0; process_mouse_user(&mouseReport, x, y); - if (has_report_changed(mouseReport, old_report)) { - host_mouse_send(&mouseReport); - } + if (has_report_changed(mouseReport, old_report)) { host_mouse_send(&mouseReport); } } else { master_mouse_send(mouseReport.x, mouseReport.y); } @@ -203,26 +194,25 @@ void pointing_device_send(void) { mouseReport.y = 0; mouseReport.v = 0; mouseReport.h = 0; - old_report = mouseReport; + old_report = mouseReport; pointing_device_set_report(mouseReport); } #endif -#ifdef SWAP_HANDS_ENABLE -const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { - /* Left hand, matrix positions */ - {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}}, - {{5, 7}, {4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}}, - {{5, 8}, {4, 8}, {3, 8}, {2, 8}, {1, 8}, {0, 8}}, - {{5, 9}, {4, 9}, {3, 9}, {2, 9}, {1, 9}, {0, 9}}, - {{5, 10}, {4, 10}, {3, 10}, {2, 10}, {1, 10}, {0, 10}}, - {{5, 11}, {4, 11}, {3, 11}, {2, 11}, {1, 11}, {0, 11}}, - /* Right hand, matrix positions */ - {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, - {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, - {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, - {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, - {{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}}, - {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}} -}; +#ifdef POINTING_DEVICE_ENABLE +void master_mouse_send(int8_t x, int8_t y) { +#ifdef SPLIT_TRANSACTION_IDS_KB + kb_slave.mouse_x += x; + kb_slave.mouse_y += y; +#endif +} +void trackball_set_cpi(uint16_t cpi) { + if (!is_keyboard_left()) { + pmw_set_cpi(cpi); + } else { +#ifdef SPLIT_TRANSACTION_IDS_KB + kb_state.device_cpi = cpi; +#endif + } +} #endif diff --git a/keyboards/draculad/keymaps/pimoroni/pimoroni_trackball.h b/keyboards/handwired/tractyl_manuform/tractyl_manuform.h index cfcd5a47a1..151e496fc6 100644 --- a/keyboards/draculad/keymaps/pimoroni/pimoroni_trackball.h +++ b/keyboards/handwired/tractyl_manuform/tractyl_manuform.h @@ -19,17 +19,37 @@ #include "quantum.h" #include "pointing_device.h" -#ifndef TRACKBALL_ADDRESS -# define TRACKBALL_ADDRESS 0x0A +#if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right) +# include "5x6_right.h" +#elif defined(KEYBOARD_handwired_tractyl_manuform_4x6_right) +# include "4x6_right.h" #endif -#define TRACKBALL_WRITE ((TRACKBALL_ADDRESS << 1) | I2C_WRITE) -#define TRACKBALL_READ ((TRACKBALL_ADDRESS << 1) | I2C_READ) -void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white); -void trackball_check_click(bool pressed, report_mouse_t *mouse); -void trackball_register_button(bool pressed, enum mouse_buttons button); +void process_mouse(report_mouse_t* mouse_report); +void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y); -float trackball_get_precision(void); -void trackball_set_precision(float precision); -bool trackball_is_scrolling(void); -void trackball_set_scrolling(bool scroll);
\ No newline at end of file +typedef union { + uint32_t raw; + struct { + uint8_t dpi_config; + }; +} keyboard_config_t; + +extern keyboard_config_t keyboard_config; + +enum ploopy_keycodes { + DPI_CONFIG = SAFE_RANGE, + KEYMAP_SAFE_RANGE, +}; + +void master_mouse_send(int8_t x, int8_t y); +void trackball_set_cpi(uint16_t cpi); + +typedef struct { + uint16_t device_cpi; +} kb_runtime_config_t; + +typedef struct { + int16_t mouse_x; + int16_t mouse_y; +} kb_slave_data_t; diff --git a/keyboards/handwired/tritium_numpad/rules.mk b/keyboards/handwired/tritium_numpad/rules.mk index 42dfc5cbec..ddb43bdb56 100644 --- a/keyboards/handwired/tritium_numpad/rules.mk +++ b/keyboards/handwired/tritium_numpad/rules.mk @@ -27,4 +27,4 @@ AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -LAYOUTS = numpad_6x4 ortho_6x4 nontra_6x4 +LAYOUTS = numpad_6x4 ortho_6x4 diff --git a/keyboards/handwired/xealous/rules.mk b/keyboards/handwired/xealous/rules.mk index 2d816ab7ce..93dd6cf232 100644 --- a/keyboards/handwired/xealous/rules.mk +++ b/keyboards/handwired/xealous/rules.mk @@ -36,6 +36,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SRC += matrix.c DEBOUNCE_TYPE = eager_pk -LAYOUTS = split60 - DEFAULT_FOLDER = handwired/xealous/rev1 diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index 206e836ec0..c16f3e2b87 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/keymaps/default/rules.mk @@ -5,7 +5,7 @@ # See TOP/keyboards/helix/rules.mk for a list of options that can be set. # See TOP/docs/config_options.md for more information. # -LTO_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = yes # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 7 Variables diff --git a/keyboards/helix/rev3_4rows/config.h b/keyboards/helix/rev3_4rows/config.h index 9102104bfc..95eb8bf0cf 100644 --- a/keyboards/helix/rev3_4rows/config.h +++ b/keyboards/helix/rev3_4rows/config.h @@ -68,7 +68,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) diff --git a/keyboards/helix/rev3_4rows/rev3_4rows.c b/keyboards/helix/rev3_4rows/rev3_4rows.c index c034c83381..884c244e30 100644 --- a/keyboards/helix/rev3_4rows/rev3_4rows.c +++ b/keyboards/helix/rev3_4rows/rev3_4rows.c @@ -30,7 +30,7 @@ void set_mac_mode(bool macmode) { eeconfig_update_keymap(keymap_config.raw); } -void dip_switch_update_kb(uint8_t index, bool active) { +bool dip_switch_update_kb(uint8_t index, bool active) { switch (index) { case 0: if(active) { // Left no.1 Helix rev3 common @@ -43,4 +43,5 @@ void dip_switch_update_kb(uint8_t index, bool active) { dip_switch_update_user(index, active); break; } + return true; } diff --git a/keyboards/helix/rev3_5rows/config.h b/keyboards/helix/rev3_5rows/config.h index 4dda76206b..a373de7d12 100644 --- a/keyboards/helix/rev3_5rows/config.h +++ b/keyboards/helix/rev3_5rows/config.h @@ -68,7 +68,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) diff --git a/keyboards/helix/rev3_5rows/rev3_5rows.c b/keyboards/helix/rev3_5rows/rev3_5rows.c index c034c83381..884c244e30 100644 --- a/keyboards/helix/rev3_5rows/rev3_5rows.c +++ b/keyboards/helix/rev3_5rows/rev3_5rows.c @@ -30,7 +30,7 @@ void set_mac_mode(bool macmode) { eeconfig_update_keymap(keymap_config.raw); } -void dip_switch_update_kb(uint8_t index, bool active) { +bool dip_switch_update_kb(uint8_t index, bool active) { switch (index) { case 0: if(active) { // Left no.1 Helix rev3 common @@ -43,4 +43,5 @@ void dip_switch_update_kb(uint8_t index, bool active) { dip_switch_update_user(index, active); break; } + return true; } diff --git a/keyboards/hineybush/h87a/keymaps/gam3cat/rules.mk b/keyboards/hineybush/h87a/keymaps/gam3cat/rules.mk index 8ac43eadbc..a54fb01f97 100644 --- a/keyboards/hineybush/h87a/keymaps/gam3cat/rules.mk +++ b/keyboards/hineybush/h87a/keymaps/gam3cat/rules.mk @@ -18,6 +18,5 @@ UNICODEMAP_ENABLE = no # Enable extended unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 #VARIABLE_TRACE = no # Use this to debug changes to variable values -API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) KEY_LOCK_ENABLE = no # This enables key lock(+260) SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common diff --git a/keyboards/hs60/v1/config.h b/keyboards/hs60/v1/config.h index 68c75b2af0..41246b6ee8 100644 --- a/keyboards/hs60/v1/config.h +++ b/keyboards/hs60/v1/config.h @@ -118,7 +118,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 215 #define DRIVER_ADDR_1 0b1110100 diff --git a/keyboards/ivy/rules.mk b/keyboards/ivy/rules.mk index 97c9aa1364..e3499b6306 100644 --- a/keyboards/ivy/rules.mk +++ b/keyboards/ivy/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk b/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk index aaffae573b..e0bce1611d 100644 --- a/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk +++ b/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk @@ -17,6 +17,5 @@ UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = no # Enable extended unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6#VARIABLE_TRACE = no # Use this to debug changes to variable values -API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) KEY_LOCK_ENABLE = no # This enables key lock(+260) SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common diff --git a/keyboards/kbdfans/bella/rgb/config.h b/keyboards/kbdfans/bella/rgb/config.h index f56049690b..07594a34ab 100644 --- a/keyboards/kbdfans/bella/rgb/config.h +++ b/keyboards/kbdfans/bella/rgb/config.h @@ -37,7 +37,7 @@ /* disable these deprecated features by default */ #ifdef RGB_MATRIX_ENABLE #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_LED_PROCESS_LIMIT 4 diff --git a/keyboards/kbdfans/bella/rgb_iso/config.h b/keyboards/kbdfans/bella/rgb_iso/config.h index fc7a9d7c08..4fda998677 100644 --- a/keyboards/kbdfans/bella/rgb_iso/config.h +++ b/keyboards/kbdfans/bella/rgb_iso/config.h @@ -37,7 +37,7 @@ /* disable these deprecated features by default */ #ifdef RGB_MATRIX_ENABLE #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_LED_PROCESS_LIMIT 4 diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h index a832110d3c..b0b7e1dad2 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h @@ -16,9 +16,9 @@ #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define DEBOUNCE 3 #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN #define DISABLE_RGB_MATRIX_BAND_SAT #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h index 1ac9c770db..51e732f101 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h @@ -16,10 +16,10 @@ #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define DEBOUNCE 3 #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN #define DISABLE_RGB_MATRIX_BAND_SAT #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h b/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h index a3ed4f762a..90fb10ebbe 100644 --- a/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h @@ -16,4 +16,4 @@ #pragma once -// place overrides here +#define LAYER_STATE_8BIT diff --git a/keyboards/kbdfans/kbd67/rev2/info.json b/keyboards/kbdfans/kbd67/rev2/info.json index b5cc796544..208a13c586 100644 --- a/keyboards/kbdfans/kbd67/rev2/info.json +++ b/keyboards/kbdfans/kbd67/rev2/info.json @@ -235,7 +235,7 @@ {"x":14, "y":4}, {"x":15, "y":4}] }, - "LAYOUT_65_ansi_blocker_splitbs": { + "LAYOUT_65_ansi_blocker_split_bs": { "layout": [ {"x":0, "y":0}, {"x":1, "y":0}, diff --git a/keyboards/kbdfans/kbdmini/config.h b/keyboards/kbdfans/kbdmini/config.h index 5a36e983d1..fc65f43411 100644 --- a/keyboards/kbdfans/kbdmini/config.h +++ b/keyboards/kbdfans/kbdmini/config.h @@ -35,7 +35,7 @@ #ifdef RGB_MATRIX_ENABLE #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/kbdfans/maja/config.h b/keyboards/kbdfans/maja/config.h index d8553766bb..3722c8381d 100755 --- a/keyboards/kbdfans/maja/config.h +++ b/keyboards/kbdfans/maja/config.h @@ -18,9 +18,9 @@ #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define DEBOUNCE 3 #define RGB_DISABLE_AFTER_TIMEOUT 0 -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_KEYPRESSES -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN #define DISABLE_RGB_MATRIX_BAND_SAT #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT diff --git a/keyboards/keebio/iris/rev2/rules.mk b/keyboards/keebio/iris/rev2/rules.mk index 765fa7f07a..197bad4764 100644 --- a/keyboards/keebio/iris/rev2/rules.mk +++ b/keyboards/keebio/iris/rev2/rules.mk @@ -32,3 +32,5 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes + +LTO_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/keebio/iris/rev3/rules.mk b/keyboards/keebio/iris/rev3/rules.mk index ea92bc98f5..b64eab5a4b 100644 --- a/keyboards/keebio/iris/rev3/rules.mk +++ b/keyboards/keebio/iris/rev3/rules.mk @@ -33,3 +33,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes ENCODER_ENABLE = yes +LTO_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/keebio/iris/rev4/rules.mk b/keyboards/keebio/iris/rev4/rules.mk index ea92bc98f5..9bf5688da0 100644 --- a/keyboards/keebio/iris/rev4/rules.mk +++ b/keyboards/keebio/iris/rev4/rules.mk @@ -33,3 +33,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes ENCODER_ENABLE = yes + +LTO_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/keebio/nyquist/nyquist.h b/keyboards/keebio/nyquist/nyquist.h index 25da44172b..63d7680f06 100644 --- a/keyboards/keebio/nyquist/nyquist.h +++ b/keyboards/keebio/nyquist/nyquist.h @@ -11,17 +11,3 @@ #endif #include "quantum.h" - -#define LAYOUT_ortho_4x12( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ - ) \ - LAYOUT_ortho_5x12( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ - ) diff --git a/keyboards/keebio/nyquist/rev1/rev1.h b/keyboards/keebio/nyquist/rev1/rev1.h index 20f53b3b44..5896a826cc 100644 --- a/keyboards/keebio/nyquist/rev1/rev1.h +++ b/keyboards/keebio/nyquist/rev1/rev1.h @@ -34,6 +34,22 @@ { R35, R34, R33, R32, R31, R30 }, \ { R45, R44, R43, R42, R41, R40 } \ } +#define LAYOUT_ortho_4x12( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 } \ + } #else // Keymap with right side flipped // (TRRS jack on both halves are to the right) @@ -56,6 +72,22 @@ { R30, R31, R32, R33, R34, R35 }, \ { R40, R41, R42, R43, R44, R45 } \ } +#define LAYOUT_ortho_4x12( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 } \ + } #endif #define LAYOUT_ortho_5x12 LAYOUT diff --git a/keyboards/keebio/nyquist/rev2/rev2.h b/keyboards/keebio/nyquist/rev2/rev2.h index 20f53b3b44..5896a826cc 100644 --- a/keyboards/keebio/nyquist/rev2/rev2.h +++ b/keyboards/keebio/nyquist/rev2/rev2.h @@ -34,6 +34,22 @@ { R35, R34, R33, R32, R31, R30 }, \ { R45, R44, R43, R42, R41, R40 } \ } +#define LAYOUT_ortho_4x12( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 } \ + } #else // Keymap with right side flipped // (TRRS jack on both halves are to the right) @@ -56,6 +72,22 @@ { R30, R31, R32, R33, R34, R35 }, \ { R40, R41, R42, R43, R44, R45 } \ } +#define LAYOUT_ortho_4x12( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 } \ + } #endif #define LAYOUT_ortho_5x12 LAYOUT diff --git a/keyboards/keebio/nyquist/rev3/rev3.h b/keyboards/keebio/nyquist/rev3/rev3.h index 274b83926b..506fcc6e36 100644 --- a/keyboards/keebio/nyquist/rev3/rev3.h +++ b/keyboards/keebio/nyquist/rev3/rev3.h @@ -31,4 +31,21 @@ { R40, R41, R42, R43, R44, R45 } \ } +#define LAYOUT_ortho_4x12( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 } \ + } + #define LAYOUT_ortho_5x12 LAYOUT diff --git a/keyboards/keebio/quefrency/rules.mk b/keyboards/keebio/quefrency/rules.mk index 2c5ad0c36b..c674e10162 100644 --- a/keyboards/keebio/quefrency/rules.mk +++ b/keyboards/keebio/quefrency/rules.mk @@ -19,3 +19,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes DEFAULT_FOLDER = keebio/quefrency/rev1 +LTO_ENABLE = yes diff --git a/keyboards/keebio/viterbi/rev2/rules.mk b/keyboards/keebio/viterbi/rev2/rules.mk index f95e7ae6a4..829d6a56e0 100644 --- a/keyboards/keebio/viterbi/rev2/rules.mk +++ b/keyboards/keebio/viterbi/rev2/rules.mk @@ -1,3 +1,5 @@ BACKLIGHT_ENABLE = yes LAYOUTS = ortho_5x14 + +LTO_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/keebio/viterbi/rules.mk b/keyboards/keebio/viterbi/rules.mk index 0b746d1720..92576d33e8 100644 --- a/keyboards/keebio/viterbi/rules.mk +++ b/keyboards/keebio/viterbi/rules.mk @@ -19,16 +19,16 @@ BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration +COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes diff --git a/keyboards/kindakeyboards/conone65/rules.mk b/keyboards/kindakeyboards/conone65/rules.mk index 7210ffcf0f..10b93d7b43 100644 --- a/keyboards/kindakeyboards/conone65/rules.mk +++ b/keyboards/kindakeyboards/conone65/rules.mk @@ -21,4 +21,4 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -LAYOUTS = 65_ansi 65_ansi_split_bs 65_iso 65_iso_split_bs
\ No newline at end of file +LAYOUTS = 65_ansi 65_ansi_split_bs 65_iso diff --git a/keyboards/kinesis/kinesis.h b/keyboards/kinesis/kinesis.h index 0833992b81..1635c34436 100644 --- a/keyboards/kinesis/kinesis.h +++ b/keyboards/kinesis/kinesis.h @@ -16,6 +16,9 @@ #ifdef KEYBOARD_kinesis_kint36 #include "kint36.h" #endif +#ifdef KEYBOARD_kinesis_kint41 + #include "kint41.h" +#endif #include "quantum.h" diff --git a/keyboards/kinesis/kint36/config.h b/keyboards/kinesis/kint36/config.h index 17a2b715f0..ab34daa7b8 100644 --- a/keyboards/kinesis/kint36/config.h +++ b/keyboards/kinesis/kint36/config.h @@ -68,3 +68,5 @@ #define LED_CAPS_LOCK_PIN C7 #define LED_SCROLL_LOCK_PIN A5 #define LED_COMPOSE_PIN E26 + +#define EEPROM_SIZE 4096 diff --git a/keyboards/kinesis/kint41/chconf.h b/keyboards/kinesis/kint41/chconf.h new file mode 100644 index 0000000000..0cd253b95d --- /dev/null +++ b/keyboards/kinesis/kint41/chconf.h @@ -0,0 +1,33 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/kinesis/kint36/chconf.h -r platforms/chibios/common/configs/chconf.h` + */ + +#pragma once + +#define CH_CFG_ST_TIMEDELTA 0 + +#define CH_CFG_TIME_QUANTUM 20 + +// One tick (minimum sleep interval) will be 100 μs. This value cannot be +// increased arbitrarily: chSysTimerHandlerI() must be executed in less than one +// tick as per http://forum.chibios.org/viewtopic.php?t=3712#p27851 +#define CH_CFG_ST_FREQUENCY 10000 + +#include_next <chconf.h> diff --git a/keyboards/kinesis/kint41/config.h b/keyboards/kinesis/kint41/config.h new file mode 100644 index 0000000000..c041bbeec4 --- /dev/null +++ b/keyboards/kinesis/kint41/config.h @@ -0,0 +1,105 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +/* USB Device descriptor parameter */ +#undef VENDOR_ID +#define VENDOR_ID 0x1209 +#undef PRODUCT_ID +#define PRODUCT_ID 0x345C +#undef DEVICE_VER +#define DEVICE_VER 0x0001 +#undef MANUFACTURER +#define MANUFACTURER "https://github.com/stapelberg" +#undef PRODUCT +#define PRODUCT "kinT (kint41)" + +/* key matrix size */ +#define MATRIX_ROWS 15 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { \ + LINE_PIN8, /* ROW_EQL */ \ + LINE_PIN9, /* ROW_1 */ \ + LINE_PIN10, /* ROW_2 */ \ + LINE_PIN11, /* ROW_3 */ \ + LINE_PIN7, /* ROW_4 */ \ + LINE_PIN16, /* ROW_5 */ \ + LINE_PIN5, /* ROW_6 */ \ + LINE_PIN3, /* ROW_7 */ \ + LINE_PIN4, /* ROW_8 */ \ + LINE_PIN1, /* ROW_9 */ \ + LINE_PIN0, /* ROW_0 */ \ + LINE_PIN2, /* ROW_MIN */ \ + LINE_PIN17, /* ROW_ESC */ \ + LINE_PIN23, /* ROW_F1 */ \ + LINE_PIN21, /* ROW_F2 */ \ + } + +#define MATRIX_COL_PINS \ + { \ + LINE_PIN18, /* COL_0 */ \ + LINE_PIN14, /* COL_1 */ \ + LINE_PIN15, /* COL_2 */ \ + LINE_PIN20, /* COL_3 */ \ + LINE_PIN22, /* COL_4 */ \ + LINE_PIN19, /* COL_5 */ \ + LINE_PIN6 /* COL_6 */ \ + } + +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Well-worn Cherry MX key switches can bounce for up to 20ms, despite the + * Cherry data sheet specifying 5ms. Because we use the sym_eager_pk debounce + * algorithm, this debounce latency only affects key releases (not key + * presses). */ +#undef DEBOUNCE +#define DEBOUNCE 20 + +#define IGNORE_MOD_TAP_INTERRUPT + +// Reduce input latency by lowering the USB polling interval +// from its 10ms default to the 125μs minimum that USB 2.x (High Speed) allows: +#define USB_POLLING_INTERVAL_MS 1 + +/* We use the i.MX RT1060 high-speed GPIOs (GPIO6-9) which are connected to the + * AHB bus (AHB_CLK_ROOT), which runs at the same speed as the ARM Core Clock, + * i.e. 600 MHz. See MIMXRT1062, page 949, 12.1 Chip-specific GPIO information. + * No additional delay is necessary. */ + +// in clock cycles +#define GPIO_INPUT_PIN_DELAY 0 + +#define LED_PIN_ON_STATE 0 +#define LED_NUM_LOCK_PIN LINE_PIN26 +#define LED_CAPS_LOCK_PIN LINE_PIN12 +#define LED_SCROLL_LOCK_PIN LINE_PIN25 +#define LED_COMPOSE_PIN LINE_PIN24 diff --git a/keyboards/kinesis/kint41/kint41.c b/keyboards/kinesis/kint41/kint41.c new file mode 100644 index 0000000000..e23a639f9f --- /dev/null +++ b/keyboards/kinesis/kint41/kint41.c @@ -0,0 +1,52 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "kint41.h" + +void matrix_init_kb(void) { + matrix_init_user(); + +// Turn on the Teensy 4.x Power LED: +#define LED_POWER LINE_PIN13 + setPinOutput(LED_POWER); + writePinHigh(LED_POWER); +} + +// delay_inline sleeps for |cycles| (e.g. sleeping for F_CPU will sleep 1s). +// delay_inline assumes the cycle counter has already been initialized and +// should not be modified, i.e. it is safe to call during keyboard matrix scan. +// +// ChibiOS enables the cycle counter in chcore_v7m.c: +// https://github.com/ChibiOS/ChibiOS/blob/b63023915c304092acb9f33bbab40f3ec07a7f0e/os/common/ports/ARMCMx/chcore_v7m.c#L263 +static void delay_inline(const uint32_t cycles) { + const uint32_t start = DWT->CYCCNT; + while ((DWT->CYCCNT - start) < cycles) { + // busy-loop until time has passed + } +} + +void matrix_output_unselect_delay(void) { + // Use the cycle counter to do precise timing in microseconds. The ChibiOS + // thread sleep functions only allow sleep durations starting at 1 tick, which + // is 100μs in our configuration. + + // Empirically: e.g. 5μs is not enough, will result in keys that don’t work + // and ghost key presses. 10μs seems to work well. + + // 600 cycles at 0.6 cycles/ns == 1μs + const uint32_t cycles_per_us = 600; + delay_inline(10 * cycles_per_us); +} diff --git a/keyboards/kinesis/kint41/kint41.h b/keyboards/kinesis/kint41/kint41.h new file mode 100644 index 0000000000..d427a1c2d6 --- /dev/null +++ b/keyboards/kinesis/kint41/kint41.h @@ -0,0 +1,92 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments as on the physical keyboard +// The second converts the arguments into the 2-D scanned array + +#define LAYOUT( \ + kC0, kD0, kE0, kC1, kD1, kE1, kC2, kD2, kE2, \ + k00, k10, k20, k30, k40, k50, \ + k01, k11, k21, k31, k41, k51, \ + k02, k12, k22, k32, k42, k52, \ + k03, k13, k23, k33, k43, k53, \ + k14, k24, k34, k54, \ + k56, k55, \ + k35, \ + k36, k46, k25, \ + \ + kC3, kD3, kE3, kC4, kD4, kE4, kC5, kE5, kD5, \ + k60, k70, k80, k90, kA0, kB0, \ + k61, k71, k81, k91, kA1, kB1, \ + k62, k72, k82, k92, kA2, kB2, \ + k63, k73, k83, k93, kA3, kB3, \ + k64, k84, k94, kA4, \ + k96, k85, \ + k86, \ + k66, k75, k65 \ +) { \ + { k00, k01, k02, k03, ___, ___, ___ }, \ + { k10, k11, k12, k13, k14, ___, ___ }, \ + { k20, k21, k22, k23, k24, k25, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36 }, \ + { k40, k41, k42, k43, ___, ___, k46 }, \ + { k50, k51, k52, k53, k54, k55, k56 }, \ + { k60, k61, k62, k63, k64, k65, k66 }, \ + { k70, k71, k72, k73, ___, k75, ___ }, \ + { k80, k81, k82, k83, k84, k85, k86 }, \ + { k90, k91, k92, k93, k94, ___, k96 }, \ + { kA0, kA1, kA2, kA3, kA4, ___, ___ }, \ + { kB0, kB1, kB2, kB3, ___, ___, ___ }, \ + { kC0, kC1, kC2, kC3, kC4, kC5, ___ }, \ + { kD0, kD1, kD2, kD3, kD4, kD5, ___ }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, ___ }, \ +} + +/* ---------------- LEFT HAND ----------------- ---------------- RIGHT HAND ---------------- */ +#define LAYOUT_pretty( \ + kC0, kD0, kE0, kC1, kD1, kE1, kC2, kD2, kE2, kC3, kD3, kE3, kC4, kD4, kE4, kC5, kE5, kD5, \ + k00, k10, k20, k30, k40, k50, k60, k70, k80, k90, kA0, kB0, \ + k01, k11, k21, k31, k41, k51, k61, k71, k81, k91, kA1, kB1, \ + k02, k12, k22, k32, k42, k52, k62, k72, k82, k92, kA2, kB2, \ + k03, k13, k23, k33, k43, k53, k63, k73, k83, k93, kA3, kB3, \ + k14, k24, k34, k54, k64, k84, k94, kA4, \ + k56, k55, k96, k85, \ + k35, k86, \ + k36, k46, k25, k66, k75, k65 \ +) { \ + { k00, k01, k02, k03, ___, ___, ___ }, \ + { k10, k11, k12, k13, k14, ___, ___ }, \ + { k20, k21, k22, k23, k24, k25, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36 }, \ + { k40, k41, k42, k43, ___, ___, k46 }, \ + { k50, k51, k52, k53, k54, k55, k56 }, \ + { k60, k61, k62, k63, k64, k65, k66 }, \ + { k70, k71, k72, k73, ___, k75, ___ }, \ + { k80, k81, k82, k83, k84, k85, k86 }, \ + { k90, k91, k92, k93, k94, ___, k96 }, \ + { kA0, kA1, kA2, kA3, kA4, ___, ___ }, \ + { kB0, kB1, kB2, kB3, ___, ___, ___ }, \ + { kC0, kC1, kC2, kC3, kC4, kC5, ___ }, \ + { kD0, kD1, kD2, kD3, kD4, kD5, ___ }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, ___ } \ +} diff --git a/keyboards/kinesis/kint41/mcuconf.h b/keyboards/kinesis/kint41/mcuconf.h new file mode 100644 index 0000000000..1ab5054ff3 --- /dev/null +++ b/keyboards/kinesis/kint41/mcuconf.h @@ -0,0 +1,22 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +#define MIMXRT1062_MCUCONF + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/kinesis/kint41/readme.md b/keyboards/kinesis/kint41/readme.md new file mode 100644 index 0000000000..90781dc97d --- /dev/null +++ b/keyboards/kinesis/kint41/readme.md @@ -0,0 +1,3 @@ +# kinesis_kint41 keyboard firmware + +Please see https://github.com/kinx-project/kint for details. diff --git a/keyboards/kinesis/kint41/rules.mk b/keyboards/kinesis/kint41/rules.mk new file mode 100644 index 0000000000..4d77da4271 --- /dev/null +++ b/keyboards/kinesis/kint41/rules.mk @@ -0,0 +1,12 @@ +MCU_FAMILY = MIMXRT1062 +MCU_SERIES = MIMXRT1062 +MCU_LDSCRIPT = MIMXRT1062 +MCU_STARTUP = MIMXRT1062 +BOARD = IC_TEENSY_4_1 +MCU = cortex-m4 +ARMV = 7 + +# Debounce eagerly (report change immediately), keep per-key timers. We can use +# this because the Cherry MX keyswitches on the Kinesis only produce noise while +# pressed. +DEBOUNCE_TYPE = sym_eager_pk diff --git a/keyboards/kyria/keymaps/drashna/keymap.c b/keyboards/kyria/keymaps/drashna/keymap.c index 4563a3c622..14287d0ec6 100644 --- a/keyboards/kyria/keymaps/drashna/keymap.c +++ b/keyboards/kyria/keymaps/drashna/keymap.c @@ -131,7 +131,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // clang-format on #ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } +oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return OLED_ROTATION_180; } #endif #ifdef ENCODER_ENABLE diff --git a/keyboards/kyria/keymaps/drashna/rules.mk b/keyboards/kyria/keymaps/drashna/rules.mk index fb3c1cf843..4036f91453 100644 --- a/keyboards/kyria/keymaps/drashna/rules.mk +++ b/keyboards/kyria/keymaps/drashna/rules.mk @@ -3,19 +3,13 @@ ENCODER_ENABLE = yes # ENables the use of one or more encoders RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow RGBLIGHT_STARTUP_ANIMATION = no -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 +NKRO_ENABLE = yes # USB Nkey Rollover +UNICODE_ENABLE = yes # Unicode BOOTLOADER = atmel-dfu -# SPLIT_TRANSPORT = mirror - # TAP_DANCE_ENABLE = yes diff --git a/keyboards/latin17rgb/config.h b/keyboards/latin17rgb/config.h index 013899f600..6a7ea8e781 100644 --- a/keyboards/latin17rgb/config.h +++ b/keyboards/latin17rgb/config.h @@ -1,18 +1,18 @@ /* Copyright 2021 18438880 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ #pragma once @@ -56,7 +56,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN @@ -100,5 +100,3 @@ #define RGBLIGHT_VAL_STEP 5 #define RGBLIGHT_SLEEP #endif - - diff --git a/keyboards/latin60rgb/config.h b/keyboards/latin60rgb/config.h index bbe502054a..97b4812910 100644 --- a/keyboards/latin60rgb/config.h +++ b/keyboards/latin60rgb/config.h @@ -1,18 +1,18 @@ /* Copyright 2021 latincompass - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ #pragma once /* USB Device descriptor parameter */ @@ -53,7 +53,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN @@ -77,4 +77,3 @@ # define DRIVER_1_LED_TOTAL 60 # define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL #endif - diff --git a/keyboards/latinpadble/rules.mk b/keyboards/latinpadble/rules.mk index cb9789acaa..7754e3e013 100644 --- a/keyboards/latinpadble/rules.mk +++ b/keyboards/latinpadble/rules.mk @@ -37,7 +37,6 @@ MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode AUDIO_ENABLE = no # Audio output on port C6 BLUETOOTH = AdafruitBLE -LAYOUTS = pad RGBLIGHT_ENABLE = yes OLED_DRIVER_ENABLE = yes ENCODER_ENABLE = yes diff --git a/keyboards/launchpad/rules.mk b/keyboards/launchpad/rules.mk index 2b115b1e1e..9396f5e3a6 100644 --- a/keyboards/launchpad/rules.mk +++ b/keyboards/launchpad/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/le_chiffre/config.h b/keyboards/le_chiffre/config.h index e14b4665f2..af4d1e49cf 100644 --- a/keyboards/le_chiffre/config.h +++ b/keyboards/le_chiffre/config.h @@ -69,7 +69,7 @@ #ifdef RGB_MATRIX_ENABLE #define RGB_MATRIX_KEYPRESSES // reacts to keypresses -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. #define RGB_MATRIX_HUE_STEP 8 diff --git a/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk b/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk index 377a0ded11..c4994dc94a 100755 --- a/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk +++ b/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk @@ -15,7 +15,5 @@ SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. NKRO_ENABLE = no # Default is 6KRO which is plenty MIDI_ENABLE = no # Untested feature KEY_LOCK_ENABLE = no # Allows locking any key. Not used -API_SYSEX_ENABLE = no # Allows OS to send signals. -KEY_LOCK_ENABLE = no # Allows locking any key. Not used UNICODE_ENABLE = no # Used for unicode character emulation EXTRAKEY_ENABLE = no # OS signals like volume control diff --git a/keyboards/lets_split_eh/rules.mk b/keyboards/lets_split_eh/rules.mk index fe3face86b..9f1e01772e 100644 --- a/keyboards/lets_split_eh/rules.mk +++ b/keyboards/lets_split_eh/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no SPLIT_KEYBOARD = yes diff --git a/keyboards/m10a/keymaps/gam3cat/rules.mk b/keyboards/m10a/keymaps/gam3cat/rules.mk index 374f522425..7b387d27c4 100644 --- a/keyboards/m10a/keymaps/gam3cat/rules.mk +++ b/keyboards/m10a/keymaps/gam3cat/rules.mk @@ -18,6 +18,5 @@ UNICODEMAP_ENABLE = no # Enable extended unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 #VARIABLE_TRACE = no # Use this to debug changes to variable values -API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) KEY_LOCK_ENABLE = no # This enables key lock(+260) SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common diff --git a/keyboards/m10a/rules.mk b/keyboards/m10a/rules.mk index 0f8368e637..27bf6d0113 100644 --- a/keyboards/m10a/rules.mk +++ b/keyboards/m10a/rules.mk @@ -22,4 +22,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = yes # Unicode -API_SYSEX_ENABLE = yes diff --git a/keyboards/manyboard/macro/config.h b/keyboards/manyboard/macro/config.h new file mode 100644 index 0000000000..d7a950f2e6 --- /dev/null +++ b/keyboards/manyboard/macro/config.h @@ -0,0 +1,53 @@ +/* +Copyright 2020 William Ehman + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4D42 // MB +#define PRODUCT_ID 0x0015 // 15 keys +#define DEVICE_VER 0x0103 +#define MANUFACTURER Manyboard +#define PRODUCT MB_Macro + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, D1, D2, D3 } +#define MATRIX_COL_PINS { D4, D5, D6, D7 } +#define UNUSED_PINS + +/*Encoder Pins*/ +#define ENCODERS_PAD_A { C6 } +#define ENCODERS_PAD_B { C7 } + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* RGB Pins */ +#define RGB_DI_PIN B6 +#define RGBLED_NUM 2 +#define RGBLIGHT_LIMIT_VAL 10 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/manyboard/macro/info.json b/keyboards/manyboard/macro/info.json new file mode 100644 index 0000000000..8155672a7e --- /dev/null +++ b/keyboards/manyboard/macro/info.json @@ -0,0 +1,29 @@ +{ + "keyboard_name": "manyboard_macro", + "url": "https://github.com/WillEhman/qmk_firmware/tree/dev_create_mb_macro", + "maintainer": "William Ehman", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x4": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 0, "y": 3}, + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + {"x": 3, "y": 3} + ] + } + } +} diff --git a/keyboards/manyboard/macro/keymaps/default/keymap.c b/keyboards/manyboard/macro/keymaps/default/keymap.c new file mode 100644 index 0000000000..4feda50808 --- /dev/null +++ b/keyboards/manyboard/macro/keymaps/default/keymap.c @@ -0,0 +1,73 @@ +/* Copyright 2020 William Ehman + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x4( + KC_F1, KC_F2, KC_F3, KC_F4, + KC_F5, KC_F6, KC_F7, KC_F8, + KC_F9, KC_F10, KC_F11, KC_F12, + KC_F13, KC_F14, KC_F15, TO(1) + ), + [1] = LAYOUT_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, TO(2) + ), + [2] = LAYOUT_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, TO(0) + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case 0: + sethsv(HSV_WHITE, (LED_TYPE *)&led[0]); + rgblight_set(); + break; + case 1: + sethsv(HSV_GREEN, (LED_TYPE *)&led[0]); + rgblight_set(); + break; + case 2: + sethsv(HSV_BLUE, (LED_TYPE *)&led[0]); + rgblight_set(); + break; + } + return state; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + /* With an if statement we can check which encoder was turned. */ + if (index == 0) { /* First encoder */ + /* And with another if statement we can check the direction. */ + if (clockwise) { + /* This is where the actual magic happens: this bit of code taps on the + Page Down key. You can do anything QMK allows you to do here. + You'll want to replace these lines with the things you want your + encoders to do. */ + tap_code(KC_AUDIO_VOL_UP); + } else { + /* And likewise for the other direction, this time Vol Down is pressed. */ + tap_code(KC_AUDIO_VOL_DOWN); + } + } +} diff --git a/keyboards/manyboard/macro/keymaps/via/keymap.c b/keyboards/manyboard/macro/keymaps/via/keymap.c new file mode 100644 index 0000000000..ce32d6d242 --- /dev/null +++ b/keyboards/manyboard/macro/keymaps/via/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2020 William Ehman + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x4( + KC_F1, KC_F2, KC_F3, KC_F4, + KC_F5, KC_F6, KC_F7, KC_F8, + KC_F9, KC_F10, KC_F11, KC_F12, + KC_F13, KC_F14, KC_F15, TO(1) + ), + [1] = LAYOUT_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, TO(2) + ), + [2] = LAYOUT_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, TO(0) + ), +}; +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case 0: + sethsv(HSV_WHITE, (LED_TYPE *)&led[0]); + rgblight_set(); + break; + case 1: + sethsv(HSV_GREEN, (LED_TYPE *)&led[0]); + rgblight_set(); + break; + case 2: + sethsv(HSV_BLUE, (LED_TYPE *)&led[0]); + rgblight_set(); + break; + } + return state; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + /* With an if statement we can check which encoder was turned. */ + if (index == 0) { /* First encoder */ + /* And with another if statement we can check the direction. */ + if (clockwise) { + /* This is where the actual magic happens: this bit of code taps on the + Page Down key. You can do anything QMK allows you to do here. + You'll want to replace these lines with the things you want your + encoders to do. */ + tap_code(KC_AUDIO_VOL_UP); + } else { + /* And likewise for the other direction, this time Vol Down is pressed. */ + tap_code(KC_AUDIO_VOL_DOWN); + } + } +} diff --git a/keyboards/manyboard/macro/keymaps/via/rules.mk b/keyboards/manyboard/macro/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/manyboard/macro/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/manyboard/macro/macro.c b/keyboards/manyboard/macro/macro.c new file mode 100644 index 0000000000..eb8a188f3c --- /dev/null +++ b/keyboards/manyboard/macro/macro.c @@ -0,0 +1,17 @@ +/* Copyright 2020 WillEhman + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "macro.h" diff --git a/keyboards/oddball/adns/adns.h b/keyboards/manyboard/macro/macro.h index 2f50b8f1be..0dccdbebfb 100644 --- a/keyboards/oddball/adns/adns.h +++ b/keyboards/manyboard/macro/macro.h @@ -1,4 +1,4 @@ -/* Copyright 2020 Alexander Tulloh +/* Copyright 2020 WillEhman * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,20 +16,16 @@ #pragma once -#include <stdint.h> +#include "quantum.h" -typedef struct { - /* 200 - 8200 CPI supported */ - uint16_t cpi; -} config_adns_t; - -typedef struct { - int16_t x; - int16_t y; -} report_adns_t; - -void adns_init(void); -config_adns_t adns_get_config(void); -void adns_set_config(config_adns_t); -/* Reads and clears the current delta values on the ADNS sensor */ -report_adns_t adns_get_report(void); +#define LAYOUT_ortho_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} diff --git a/keyboards/manyboard/macro/readme.md b/keyboards/manyboard/macro/readme.md new file mode 100644 index 0000000000..ca400b30e7 --- /dev/null +++ b/keyboards/manyboard/macro/readme.md @@ -0,0 +1,15 @@ +# manyboard_macro + +* Keyboard Maintainer: [WillEhman](https://github.com/WillEhman) +* Hardware Supported: The Manyboard Family of keyboards +* Hardware Availability: TBA + +Make example for this keyboard (after setting up your build environment): + + make manyboard/macro:default + +Flashing example for this keyboard: + + make manyboard/macro:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/manyboard/macro/rules.mk b/keyboards/manyboard/macro/rules.mk new file mode 100644 index 0000000000..fd709670b6 --- /dev/null +++ b/keyboards/manyboard/macro/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes # Encoder Input diff --git a/keyboards/marksard/rhymestone/rev1/config.h b/keyboards/marksard/rhymestone/rev1/config.h index 9a1bf0a1d8..9833925110 100644 --- a/keyboards/marksard/rhymestone/rev1/config.h +++ b/keyboards/marksard/rhymestone/rev1/config.h @@ -93,7 +93,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_MATRIX_KEYPRESSES // reacts to keypresses // #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects - #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended + #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended // #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 diff --git a/keyboards/massdrop/alt/keymaps/pregame/config.h b/keyboards/massdrop/alt/keymaps/pregame/config.h index acd041ce14..32dee56d30 100644 --- a/keyboards/massdrop/alt/keymaps/pregame/config.h +++ b/keyboards/massdrop/alt/keymaps/pregame/config.h @@ -89,7 +89,7 @@ // #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation // #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended // #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGBLIGHT_ANIMATIONS // Run RGB animations @@ -103,7 +103,7 @@ // #define RGBLIGHT_EFFECT_RGB_TEST // Enable RGB test animation mode. // #define RGBLIGHT_EFFECT_SNAKE // Enable snake animation mode. // #define RGBLIGHT_EFFECT_STATIC_GRADIENT // Enable static gradient mode. - + // #define RGBLIGHT_EFFECT_BREATHE_CENTER // If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 // #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // The maximum brightness for the breathing mode. Valid values are 1 to 255 // #define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 // How long to wait between light changes for the "Christmas" animation, in milliseconds diff --git a/keyboards/massdrop/alt/keymaps/urbanvanilla/config.h b/keyboards/massdrop/alt/keymaps/urbanvanilla/config.h index 0f2740013d..f2a7e50386 100644 --- a/keyboards/massdrop/alt/keymaps/urbanvanilla/config.h +++ b/keyboards/massdrop/alt/keymaps/urbanvanilla/config.h @@ -24,4 +24,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_MATRIX_LED_PROCESS_LIMIT 15 #define RGB_MATRIX_LED_FLUSH_LIMIT 10 -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/config.h b/keyboards/massdrop/ctrl/keymaps/endgame/config.h index 0ef485591f..ad738347ab 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/config.h +++ b/keyboards/massdrop/ctrl/keymaps/endgame/config.h @@ -49,7 +49,7 @@ // #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation // #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended // #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) // #define RGBLIGHT_ANIMATIONS // Run RGB animations diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h index 6e16c3a5f9..89c129c58e 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h @@ -67,7 +67,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation // #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended // #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) // #define RGBLIGHT_ANIMATIONS // Run RGB animations diff --git a/keyboards/masterworks/classy_tkl/rev_a/rules.mk b/keyboards/masterworks/classy_tkl/rev_a/rules.mk index 68d6bc50c1..ba09a6cb6a 100644 --- a/keyboards/masterworks/classy_tkl/rev_a/rules.mk +++ b/keyboards/masterworks/classy_tkl/rev_a/rules.mk @@ -21,6 +21,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output - -# Supported layouts -LAYOUTS = tkl_ansi_wkl tkl_iso_wkl diff --git a/keyboards/maxr1998/phoebe/rules.mk b/keyboards/maxr1998/phoebe/rules.mk index f60274e515..16d797d41b 100644 --- a/keyboards/maxr1998/phoebe/rules.mk +++ b/keyboards/maxr1998/phoebe/rules.mk @@ -30,5 +30,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. KEY_LOCK_ENABLE = yes LEADER_ENABLE = yes # Enable leader key -API_SYSEX_ENABLE = no SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/maxr1998/pulse4k/rules.mk b/keyboards/maxr1998/pulse4k/rules.mk index 71d9b5debf..084db7fee8 100644 --- a/keyboards/maxr1998/pulse4k/rules.mk +++ b/keyboards/maxr1998/pulse4k/rules.mk @@ -29,5 +29,4 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h index 1ba7d27dff..d75cbd3f2a 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h @@ -13,7 +13,7 @@ #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 220 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
\ No newline at end of file +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h index 38ffdd40ae..c830edce26 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h @@ -1,7 +1,7 @@ #pragma once #define PRODUCT_ID 0xAEC2 -#define PRODUCT Adelais En Ciel Rev2 +#define PRODUCT Adelais En Ciel Rev2 #define MATRIX_ROW_PINS { B1, A0, C13, A1, A2} #define MATRIX_COL_PINS { A10, A9, A8, B15, B14, B13, B12, B11, B10, B8, B4, B5, B3, C14, A7 } @@ -31,7 +31,7 @@ #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set @@ -42,4 +42,4 @@ #define ENCODERS_PAD_B { A3 } #define ENCODER_RESOLUTION 4 -#define TAP_CODE_DELAY 10
\ No newline at end of file +#define TAP_CODE_DELAY 10 diff --git a/keyboards/mechlovin/delphine/rgb_led/config.h b/keyboards/mechlovin/delphine/rgb_led/config.h index 4d5c853d0c..9a653d7595 100644 --- a/keyboards/mechlovin/delphine/rgb_led/config.h +++ b/keyboards/mechlovin/delphine/rgb_led/config.h @@ -24,7 +24,7 @@ // #define RGBLIGHT_EFFECT_RGB_TEST // #define RGBLIGHT_EFFECT_ALTERNATING #endif - + //rgb matrix setting// This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) // The address will vary depending on your wiring: @@ -41,7 +41,7 @@ #define RGB_MATRIX_KEYPRESSES // reacts to keypresses #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set diff --git a/keyboards/mechlovin/hannah60rgb/rev1/config.h b/keyboards/mechlovin/hannah60rgb/rev1/config.h index 20873e7161..fd45ecca6c 100644 --- a/keyboards/mechlovin/hannah60rgb/rev1/config.h +++ b/keyboards/mechlovin/hannah60rgb/rev1/config.h @@ -11,8 +11,8 @@ # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set -#endif
\ No newline at end of file +#endif diff --git a/keyboards/mechlovin/hannah60rgb/rev2/config.h b/keyboards/mechlovin/hannah60rgb/rev2/config.h index 2bcffbc856..5e57f985d3 100644 --- a/keyboards/mechlovin/hannah60rgb/rev2/config.h +++ b/keyboards/mechlovin/hannah60rgb/rev2/config.h @@ -30,11 +30,11 @@ #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set #if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) # define RGB_MATRIX_DISABLE_KEYCODES -#endif
\ No newline at end of file +#endif diff --git a/keyboards/mechlovin/infinity87/rgb_rev1/config.h b/keyboards/mechlovin/infinity87/rgb_rev1/config.h index 0c16c684cf..76c6e0db73 100644 --- a/keyboards/mechlovin/infinity87/rgb_rev1/config.h +++ b/keyboards/mechlovin/infinity87/rgb_rev1/config.h @@ -35,7 +35,7 @@ // 0b0110001 AD <-> SCL // 0b0110010 AD <-> SDA #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define DISABLE_RGB_MATRIX_SPLASH #define DISABLE_RGB_MATRIX_MULTISPLASH diff --git a/keyboards/meira/meira.h b/keyboards/meira/meira.h index cad590477c..d968394400 100644 --- a/keyboards/meira/meira.h +++ b/keyboards/meira/meira.h @@ -25,7 +25,7 @@ void reset_keyboard_kb(void); // The following is an example using the Planck MIT layout // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -#define LAYOUT( \ +#define LAYOUT_ortho_4x12( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ @@ -38,7 +38,7 @@ void reset_keyboard_kb(void); { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ } -#define LAYOUT_ortho_4x12 LAYOUT +#define LAYOUT LAYOUT_ortho_4x12 #endif diff --git a/keyboards/melgeek/mj61/config.h b/keyboards/melgeek/mj61/config.h index 164c04fb50..6ba19dd757 100644 --- a/keyboards/melgeek/mj61/config.h +++ b/keyboards/melgeek/mj61/config.h @@ -37,7 +37,7 @@ #define NO_ACTION_FUNCTION #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/melgeek/mj63/config.h b/keyboards/melgeek/mj63/config.h index 47ad2f96cf..46d3b0fb7b 100644 --- a/keyboards/melgeek/mj63/config.h +++ b/keyboards/melgeek/mj63/config.h @@ -37,7 +37,7 @@ #define NO_ACTION_FUNCTION #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/melgeek/mj64/config.h b/keyboards/melgeek/mj64/config.h index 29cb95f171..920d34acd5 100644 --- a/keyboards/melgeek/mj64/config.h +++ b/keyboards/melgeek/mj64/config.h @@ -37,7 +37,7 @@ #define NO_ACTION_FUNCTION #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/melgeek/mj65/config.h b/keyboards/melgeek/mj65/config.h index 12a7c7ce18..399c243ac6 100644 --- a/keyboards/melgeek/mj65/config.h +++ b/keyboards/melgeek/mj65/config.h @@ -37,7 +37,7 @@ #define NO_ACTION_FUNCTION #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/melgeek/mojo75/config.h b/keyboards/melgeek/mojo75/config.h index c1a8083f1c..d5bb4b4547 100644 --- a/keyboards/melgeek/mojo75/config.h +++ b/keyboards/melgeek/mojo75/config.h @@ -37,7 +37,7 @@ #define NO_ACTION_FUNCTION #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/melgeek/z70ultra/config.h b/keyboards/melgeek/z70ultra/config.h index d5a9d0a894..e4530e2eaa 100644 --- a/keyboards/melgeek/z70ultra/config.h +++ b/keyboards/melgeek/z70ultra/config.h @@ -36,7 +36,7 @@ #define NO_ACTION_FUNCTION #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/miller/gm862/config.h b/keyboards/miller/gm862/config.h index 2b084efc25..e6e1b4c1df 100644 --- a/keyboards/miller/gm862/config.h +++ b/keyboards/miller/gm862/config.h @@ -36,10 +36,10 @@ #define DEBOUNCE 3 #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN # define DISABLE_RGB_MATRIX_BAND_SAT # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT # define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT diff --git a/keyboards/mitosis/keymaps/mjt/rules.mk b/keyboards/mitosis/keymaps/mjt/rules.mk index 0259657677..5279bcf6bb 100644 --- a/keyboards/mitosis/keymaps/mjt/rules.mk +++ b/keyboards/mitosis/keymaps/mjt/rules.mk @@ -10,5 +10,3 @@ AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no - diff --git a/keyboards/monstargear/xo87/rgb/config.h b/keyboards/monstargear/xo87/rgb/config.h index 83eee83492..5ed0ed445d 100644 --- a/keyboards/monstargear/xo87/rgb/config.h +++ b/keyboards/monstargear/xo87/rgb/config.h @@ -36,7 +36,7 @@ #define DIODE_DIRECTION ROW2COL #define RGB_DI_PIN D7 #define DRIVER_LED_TOTAL 110 -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 100 // limits maximum brightness of LEDs to 100 out of 255. #define RGBLIGHT_LIMIT_VAL 100 // limits maximum brightness of LEDs to 100 out of 255. diff --git a/keyboards/moonlander/config.h b/keyboards/moonlander/config.h index c88feea3d0..c1a139dc77 100644 --- a/keyboards/moonlander/config.h +++ b/keyboards/moonlander/config.h @@ -91,7 +91,7 @@ #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 175 #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_KEYPRESSES -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define MUSIC_MAP diff --git a/keyboards/mt84/keymaps/default/config.h b/keyboards/mt84/keymaps/default/config.h new file mode 100644 index 0000000000..dd687cad58 --- /dev/null +++ b/keyboards/mt84/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#define LAYER_STATE_8BIT diff --git a/keyboards/mxss/rules.mk b/keyboards/mxss/rules.mk index 7dc98d4739..40de15828a 100644 --- a/keyboards/mxss/rules.mk +++ b/keyboards/mxss/rules.mk @@ -2,39 +2,31 @@ MCU = atmega32u4 # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output SRC += mxss_frontled.c # Remove the common RGB light code and use my iteration instead +COMMON_VPATH += $(QUANTUM_DIR)/rgblight OPT_DEFS += -DRGBLIGHT_ENABLE -SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c SRC += rgblight.c -SRC += color.c -SRC += ws2812.c +SRC += $(QUANTUM_DIR)/color.c +WS2812_DRIVER_REQUIRED = yes CIE1931_CURVE = yes +RGB_KEYCODES_ENABLE = yes diff --git a/keyboards/naked48/keymaps/salicylic/config.h b/keyboards/naked48/keymaps/salicylic/config.h index b6372db3b9..71a43e208c 100644 --- a/keyboards/naked48/keymaps/salicylic/config.h +++ b/keyboards/naked48/keymaps/salicylic/config.h @@ -31,7 +31,7 @@ # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) // # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 @@ -41,4 +41,3 @@ # define RGB_MATRIX_VAL_STEP 5 # define RGB_MATRIX_SPD_STEP 10 #endif - diff --git a/keyboards/ncc1701kb/rules.mk b/keyboards/ncc1701kb/rules.mk index 791d82b401..35228c5019 100644 --- a/keyboards/ncc1701kb/rules.mk +++ b/keyboards/ncc1701kb/rules.mk @@ -29,6 +29,5 @@ MIDI_ENABLE = no # MIDI controls BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode -API_SYSEX_ENABLE = yes TAP_DANCE_ENABLE = no ENCODER_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/niu_mini/rules.mk b/keyboards/niu_mini/rules.mk index 1059ed2f70..7467bf81b0 100644 --- a/keyboards/niu_mini/rules.mk +++ b/keyboards/niu_mini/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/nopunin10did/jabberwocky/config.h b/keyboards/nopunin10did/jabberwocky/config.h index b49a98ba80..84c3cec451 100644 --- a/keyboards/nopunin10did/jabberwocky/config.h +++ b/keyboards/nopunin10did/jabberwocky/config.h @@ -22,7 +22,6 @@ #define VENDOR_ID 0x4E50 // "NP" #define PRODUCT_ID 0x4A57 // "JW" #define DEVICE_VER 0x0001 -#define MANUFACTURER NoPunIn10Did #define PRODUCT Jabberwocky /* key matrix size */ diff --git a/keyboards/oddball/adns/adns.c b/keyboards/oddball/adns/adns.c deleted file mode 100644 index 9338808ff7..0000000000 --- a/keyboards/oddball/adns/adns.c +++ /dev/null @@ -1,219 +0,0 @@ -/* Copyright 2020 Alexander Tulloh - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "spi_master.h" -#include "quantum.h" -#include "adns9800_srom_A6.h" -#include "adns.h" - -// registers -#define REG_Product_ID 0x00 -#define REG_Revision_ID 0x01 -#define REG_Motion 0x02 -#define REG_Delta_X_L 0x03 -#define REG_Delta_X_H 0x04 -#define REG_Delta_Y_L 0x05 -#define REG_Delta_Y_H 0x06 -#define REG_SQUAL 0x07 -#define REG_Pixel_Sum 0x08 -#define REG_Maximum_Pixel 0x09 -#define REG_Minimum_Pixel 0x0a -#define REG_Shutter_Lower 0x0b -#define REG_Shutter_Upper 0x0c -#define REG_Frame_Period_Lower 0x0d -#define REG_Frame_Period_Upper 0x0e -#define REG_Configuration_I 0x0f -#define REG_Configuration_II 0x10 -#define REG_Frame_Capture 0x12 -#define REG_SROM_Enable 0x13 -#define REG_Run_Downshift 0x14 -#define REG_Rest1_Rate 0x15 -#define REG_Rest1_Downshift 0x16 -#define REG_Rest2_Rate 0x17 -#define REG_Rest2_Downshift 0x18 -#define REG_Rest3_Rate 0x19 -#define REG_Frame_Period_Max_Bound_Lower 0x1a -#define REG_Frame_Period_Max_Bound_Upper 0x1b -#define REG_Frame_Period_Min_Bound_Lower 0x1c -#define REG_Frame_Period_Min_Bound_Upper 0x1d -#define REG_Shutter_Max_Bound_Lower 0x1e -#define REG_Shutter_Max_Bound_Upper 0x1f -#define REG_LASER_CTRL0 0x20 -#define REG_Observation 0x24 -#define REG_Data_Out_Lower 0x25 -#define REG_Data_Out_Upper 0x26 -#define REG_SROM_ID 0x2a -#define REG_Lift_Detection_Thr 0x2e -#define REG_Configuration_V 0x2f -#define REG_Configuration_IV 0x39 -#define REG_Power_Up_Reset 0x3a -#define REG_Shutdown 0x3b -#define REG_Inverse_Product_ID 0x3f -#define REG_Motion_Burst 0x50 -#define REG_SROM_Load_Burst 0x62 -#define REG_Pixel_Burst 0x64 - -#define ADNS_CLOCK_SPEED 2000000 -#define MIN_CPI 200 -#define MAX_CPI 8200 -#define CPI_STEP 200 -#define CLAMP_CPI(value) value < MIN_CPI ? MIN_CPI : value > MAX_CPI ? MAX_CPI : value -#define SPI_MODE 3 -#define SPI_DIVISOR (F_CPU / ADNS_CLOCK_SPEED) -#define US_BETWEEN_WRITES 120 -#define US_BETWEEN_READS 20 -#define US_BEFORE_MOTION 100 -#define MSB1 0x80 - -extern const uint16_t adns_firmware_length; -extern const uint8_t adns_firmware_data[]; - -void adns_spi_start(void){ - spi_start(SPI_SS_PIN, false, SPI_MODE, SPI_DIVISOR); -} - -void adns_write(uint8_t reg_addr, uint8_t data){ - - adns_spi_start(); - spi_write(reg_addr | MSB1); - spi_write(data); - spi_stop(); - wait_us(US_BETWEEN_WRITES); -} - -uint8_t adns_read(uint8_t reg_addr){ - - adns_spi_start(); - spi_write(reg_addr & 0x7f ); - uint8_t data = spi_read(); - spi_stop(); - wait_us(US_BETWEEN_READS); - - return data; -} - -void adns_init() { - - setPinOutput(SPI_SS_PIN); - - spi_init(); - - // reboot - adns_write(REG_Power_Up_Reset, 0x5a); - wait_ms(50); - - // read registers and discard - adns_read(REG_Motion); - adns_read(REG_Delta_X_L); - adns_read(REG_Delta_X_H); - adns_read(REG_Delta_Y_L); - adns_read(REG_Delta_Y_H); - - // upload firmware - - // 3k firmware mode - adns_write(REG_Configuration_IV, 0x02); - - // enable initialisation - adns_write(REG_SROM_Enable, 0x1d); - - // wait a frame - wait_ms(10); - - // start SROM download - adns_write(REG_SROM_Enable, 0x18); - - // write the SROM file - - adns_spi_start(); - - spi_write(REG_SROM_Load_Burst | 0x80); - wait_us(15); - - // send all bytes of the firmware - unsigned char c; - for(int i = 0; i < adns_firmware_length; i++){ - c = (unsigned char)pgm_read_byte(adns_firmware_data + i); - spi_write(c); - wait_us(15); - } - - spi_stop(); - - wait_ms(10); - - // enable laser - uint8_t laser_ctrl0 = adns_read(REG_LASER_CTRL0); - adns_write(REG_LASER_CTRL0, laser_ctrl0 & 0xf0); -} - -config_adns_t adns_get_config(void) { - uint8_t config_1 = adns_read(REG_Configuration_I); - return (config_adns_t){ (config_1 & 0xFF) * CPI_STEP }; -} - -void adns_set_config(config_adns_t config) { - uint8_t config_1 = (CLAMP_CPI(config.cpi) / CPI_STEP) & 0xFF; - adns_write(REG_Configuration_I, config_1); -} - -static int16_t convertDeltaToInt(uint8_t high, uint8_t low){ - - // join bytes into twos compliment - uint16_t twos_comp = (high << 8) | low; - - // convert twos comp to int - if (twos_comp & 0x8000) - return -1 * (~twos_comp + 1); - - return twos_comp; -} - -report_adns_t adns_get_report(void) { - - report_adns_t report = {0, 0}; - - adns_spi_start(); - - // start burst mode - spi_write(REG_Motion_Burst & 0x7f); - - wait_us(US_BEFORE_MOTION); - - uint8_t motion = spi_read(); - - if(motion & 0x80) { - - // clear observation register - spi_read(); - - // delta registers - uint8_t delta_x_l = spi_read(); - uint8_t delta_x_h = spi_read(); - uint8_t delta_y_l = spi_read(); - uint8_t delta_y_h = spi_read(); - - report.x = convertDeltaToInt(delta_x_h, delta_x_l); - report.y = convertDeltaToInt(delta_y_h, delta_y_l); - } - - // clear residual motion - spi_write(REG_Motion & 0x7f); - - spi_stop(); - - return report; -} diff --git a/keyboards/oddball/adns/adns9800_srom_A6.h b/keyboards/oddball/adns/adns9800_srom_A6.h deleted file mode 100644 index f5b3abeb62..0000000000 --- a/keyboards/oddball/adns/adns9800_srom_A6.h +++ /dev/null @@ -1,3078 +0,0 @@ -#pragma once - -#include "progmem.h" - -const uint16_t adns_firmware_length = 3070; - -const uint8_t adns_firmware_data[] PROGMEM = { -0x03, -0xa6, -0x68, -0x1e, -0x7d, -0x10, -0x7e, -0x7e, -0x5f, -0x1c, -0xb8, -0xf2, -0x47, -0x0c, -0x7b, -0x74, -0x4b, -0x14, -0x8b, -0x75, -0x66, -0x51, -0x0b, -0x8c, -0x76, -0x74, -0x4b, -0x14, -0xaa, -0xd6, -0x0f, -0x9c, -0xba, -0xf6, -0x6e, -0x3f, -0xdd, -0x38, -0xd5, -0x02, -0x80, -0x9b, -0x82, -0x6d, -0x58, -0x13, -0xa4, -0xab, -0xb5, -0xc9, -0x10, -0xa2, -0xc6, -0x0a, -0x7f, -0x5d, -0x19, -0x91, -0xa0, -0xa3, -0xce, -0xeb, -0x3e, -0xc9, -0xf1, -0x60, -0x42, -0xe7, -0x4c, -0xfb, -0x74, -0x6a, -0x56, -0x2e, -0xbf, -0xdd, -0x38, -0xd3, -0x05, -0x88, -0x92, -0xa6, -0xce, -0xff, -0x5d, -0x38, -0xd1, -0xcf, -0xef, -0x58, -0xcb, -0x65, -0x48, -0xf0, -0x35, -0x85, -0xa9, -0xb2, -0x8f, -0x5e, -0xf3, -0x80, -0x94, -0x97, -0x7e, -0x75, -0x97, -0x87, -0x73, -0x13, -0xb0, -0x8a, -0x69, -0xd4, -0x0a, -0xde, -0xc1, -0x79, -0x59, -0x36, -0xdb, -0x9d, -0xd6, -0xb8, -0x15, -0x6f, -0xce, -0x3c, -0x72, -0x32, -0x45, -0x88, -0xdf, -0x6c, -0xa5, -0x6d, -0xe8, -0x76, -0x96, -0x14, -0x74, -0x20, -0xdc, -0xf4, -0xfa, -0x37, -0x6a, -0x27, -0x32, -0xe3, -0x29, -0xbf, -0xc4, -0xc7, -0x06, -0x9d, -0x58, -0xe7, -0x87, -0x7c, -0x2e, -0x9f, -0x6e, -0x49, -0x07, -0x5d, -0x23, -0x64, -0x54, -0x83, -0x6e, -0xcb, -0xb7, -0x77, -0xf7, -0x2b, -0x6e, -0x0f, -0x2e, -0x66, -0x12, -0x60, -0x55, -0x65, -0xfc, -0x43, -0xb3, -0x58, -0x73, -0x5b, -0xe8, -0x67, -0x04, -0x43, -0x02, -0xde, -0xb3, -0x89, -0xa0, -0x6d, -0x3a, -0x27, -0x79, -0x64, -0x5b, -0x0c, -0x16, -0x9e, -0x66, -0xb1, -0x8b, -0x87, -0x0c, -0x5d, -0xf2, -0xb6, -0x3d, -0x71, -0xdf, -0x42, -0x03, -0x8a, -0x06, -0x8d, -0xef, -0x1d, -0xa8, -0x96, -0x5c, -0xed, -0x31, -0x61, -0x5c, -0xa1, -0x34, -0xf6, -0x8c, -0x08, -0x60, -0x33, -0x07, -0x00, -0x3e, -0x79, -0x95, -0x1b, -0x43, -0x7f, -0xfe, -0xb6, -0xa6, -0xd4, -0x9d, -0x76, -0x72, -0xbf, -0xad, -0xc0, -0x15, -0xe8, -0x37, -0x31, -0xa3, -0x72, -0x63, -0x52, -0x1d, -0x1c, -0x5d, -0x51, -0x1b, -0xe1, -0xa9, -0xed, -0x60, -0x32, -0x3e, -0xa9, -0x50, -0x28, -0x53, -0x06, -0x59, -0xe2, -0xfc, -0xe7, -0x02, -0x64, -0x39, -0x21, -0x56, -0x4a, -0xa5, -0x40, -0x80, -0x81, -0xd5, -0x5a, -0x60, -0x7b, -0x68, -0x84, -0xf1, -0xe0, -0xb1, -0xb6, -0x5b, -0xdf, -0xa8, -0x1d, -0x6d, -0x65, -0x20, -0xc0, -0xa2, -0xb9, -0xd9, -0xbb, -0x00, -0xa6, -0xdb, -0x8b, -0x01, -0x53, -0x91, -0xfe, -0xc4, -0x51, -0x85, -0xb0, -0x96, -0x7f, -0xfd, -0x51, -0xdd, -0x14, -0x03, -0x67, -0x2e, -0x75, -0x1c, -0x76, -0xd3, -0x6e, -0xdd, -0x99, -0x55, -0x76, -0xe5, -0xab, -0x23, -0xfc, -0x4a, -0xd5, -0xc6, -0xe8, -0x2e, -0xca, -0x8a, -0xb3, -0xf6, -0x8c, -0x6c, -0xb0, -0xe9, -0xf2, -0xe7, -0x9e, -0x69, -0x41, -0xed, -0xf1, -0x6d, -0xd2, -0x86, -0xd8, -0x7e, -0xcb, -0x5d, -0x47, -0x6c, -0x85, -0x6a, -0x23, -0xed, -0x20, -0x40, -0x93, -0xb4, -0x20, -0xc7, -0xa5, -0xc9, -0xaf, -0x03, -0x15, -0xac, -0x19, -0xe5, -0x2a, -0x36, -0xdf, -0x6d, -0xc5, -0x8c, -0x80, -0x07, -0xce, -0x92, -0x0c, -0xd8, -0x06, -0x62, -0x0f, -0xdd, -0x48, -0x46, -0x1a, -0x53, -0xc7, -0x8a, -0x8c, -0x5d, -0x5d, -0xb4, -0xa1, -0x02, -0xd3, -0xa9, -0xb8, -0xf3, -0x94, -0x8f, -0x3f, -0xe5, -0x54, -0xd4, -0x11, -0x65, -0xb2, -0x5e, -0x09, -0x0b, -0x81, -0xe3, -0x75, -0xa7, -0x89, -0x81, -0x39, -0x6c, -0x46, -0xf6, -0x06, -0x9f, -0x27, -0x3b, -0xb6, -0x2d, -0x5f, -0x1d, -0x4b, -0xd4, -0x7b, -0x1d, -0x61, -0x74, -0x89, -0xe4, -0xe3, -0xbd, -0x98, -0x1b, -0xc4, -0x51, -0x3b, -0xa4, -0xfa, -0xe0, -0x92, -0xf7, -0xbe, -0xf2, -0x4d, -0xbb, -0xff, -0xad, -0x4f, -0x6d, -0x68, -0xc2, -0x79, -0x40, -0xaa, -0x9b, -0x8f, -0x0c, -0x32, -0x4b, -0x5f, -0x3e, -0xab, -0x59, -0x98, -0xb3, -0xf5, -0x1d, -0xac, -0x5e, -0xbc, -0x78, -0xd3, -0x01, -0x6c, -0x64, -0x15, -0x2f, -0xd8, -0x71, -0xa6, -0x2d, -0x45, -0xe1, -0x22, -0x42, -0xe4, -0x4e, -0x04, -0x3c, -0x7d, -0xf4, -0x40, -0x21, -0xb4, -0x67, -0x05, -0xa8, -0xe2, -0xf3, -0x72, -0x87, -0x4c, -0x7d, -0xd9, -0x1b, -0x65, -0x97, -0xf3, -0xc2, -0xe3, -0xe4, -0xc8, -0xd2, -0xde, -0xf6, -0xef, -0xdc, -0xbb, -0x44, -0x08, -0x5e, -0xe2, -0x45, -0x27, -0x01, -0xb0, -0xf6, -0x43, -0xe7, -0x3a, -0xf6, -0xdc, -0x9d, -0xed, -0xf3, -0xc5, -0x0c, -0xb8, -0x9c, -0x98, -0x3a, -0xd8, -0x36, -0xee, -0x96, -0x72, -0x67, -0xe7, -0x81, -0x91, -0xd5, -0x05, -0x0a, -0xe0, -0x82, -0xd5, -0x8f, -0xe8, -0xf9, -0xb0, -0xc9, -0xcf, -0x93, -0xe7, -0x04, -0xc5, -0xbc, -0x2b, -0x43, -0x56, -0x7e, -0xe8, -0x67, -0x7c, -0xe5, -0xfb, -0x49, -0xad, -0x5e, -0x9f, -0x25, -0x13, -0xde, -0x6e, -0x6e, -0xe9, -0xf1, -0xec, -0x87, -0x0b, -0x59, -0x81, -0x76, -0x84, -0x76, -0xb3, -0x24, -0xaf, -0x30, -0xfd, -0x27, -0x8b, -0xab, -0xd8, -0x00, -0x8b, -0x9b, -0x0c, -0xd2, -0xb2, -0x4e, -0x5e, -0x9d, -0x1d, -0x96, -0x01, -0x00, -0x67, -0xc1, -0x5f, -0x02, -0x20, -0xfd, -0x45, -0x6a, -0x01, -0x60, -0x58, -0x45, -0xca, -0x47, -0x21, -0x90, -0x5a, -0xc4, -0x43, -0x26, -0x1a, -0xd7, -0xa5, -0x4a, -0xb2, -0x5d, -0x2b, -0x35, -0x49, -0xfb, -0xa5, -0x17, -0x92, -0x21, -0x1e, -0x93, -0x96, -0x67, -0xa2, -0x7e, -0x36, -0x7a, -0xde, -0x5f, -0xbe, -0x7a, -0x58, -0x9d, -0xf8, -0x78, -0xa3, -0xfa, -0xc8, -0xd5, -0x17, -0xf0, -0x21, -0x97, -0x8c, -0x80, -0xb5, -0x4b, -0x3b, -0xbd, -0xbb, -0x41, -0x21, -0xa8, -0x50, -0x67, -0xf7, -0xe7, -0x19, -0x80, -0x10, -0x8e, -0xce, -0x04, -0x18, -0x3f, -0x51, -0x6b, -0x77, -0xd8, -0x9e, -0x16, -0xaf, -0xec, -0xef, -0x48, -0x16, -0x4d, -0x9e, -0x85, -0x38, -0x18, -0x3e, -0xd4, -0x28, -0x87, -0x60, -0x2a, -0xf6, -0x7f, -0x09, -0x86, -0x6f, -0x9c, -0x3c, -0x3a, -0xff, -0xab, -0xd0, -0x61, -0xa2, -0x97, -0x0d, -0x71, -0x94, -0x7e, -0xfd, -0xb9, -0x80, -0x02, -0x89, -0x6a, -0xb3, -0x84, -0x6c, -0x2a, -0x77, -0x62, -0xbe, -0x0b, -0xf4, -0xaf, -0xac, -0x7b, -0x7c, -0x8e, -0xca, -0x01, -0xba, -0x71, -0x78, -0x94, -0xfd, -0xb5, -0x39, -0xa4, -0x4d, -0x2f, -0x78, -0xcf, -0xca, -0x92, -0x0c, -0x1a, -0x99, -0x48, -0x4c, -0x11, -0x96, -0xb5, -0x4e, -0x41, -0x28, -0xe4, -0xa6, -0xfe, -0x4b, -0x72, -0x91, -0xe7, -0xd4, -0xdd, -0x9f, -0x12, -0xe6, -0x29, -0x38, -0xce, -0x45, -0xae, -0x02, -0xb8, -0x24, -0xae, -0xbd, -0xe9, -0x66, -0x08, -0x62, -0xa2, -0x2c, -0x2b, -0x00, -0xe2, -0x23, -0xd9, -0xc4, -0x48, -0xe4, -0xd3, -0xac, -0xbb, -0x34, -0xc7, -0xf0, -0xe3, -0x4f, -0xb9, -0x30, -0xea, -0xa2, -0x12, -0xf1, -0x30, -0x2c, -0x36, -0xde, -0x48, -0xf2, -0xb0, -0x4c, -0x43, -0x3f, -0x2e, -0x58, -0xe4, -0x20, -0xe3, -0x58, -0xcd, -0x31, -0x22, -0xf0, -0xa2, -0x2a, -0xe6, -0x19, -0x90, -0x55, -0x86, -0xf6, -0x55, -0x79, -0xd1, -0xd7, -0x46, -0x2f, -0xc0, -0xdc, -0x99, -0xe8, -0xf3, -0x6a, -0xdf, -0x7f, -0xeb, -0x24, -0x4a, -0x1e, -0x5a, -0x75, -0xde, -0x2f, -0x5c, -0x19, -0x61, -0x03, -0x53, -0x54, -0x6a, -0x3b, -0x18, -0x70, -0xb6, -0x4f, -0xf1, -0x9c, -0x0a, -0x59, -0x9d, -0x19, -0x92, -0x65, -0x8c, -0x83, -0x14, -0x2d, -0x44, -0x8a, -0x75, -0xa9, -0xf5, -0x90, -0xd2, -0x66, -0x4e, -0xfa, -0x69, -0x0f, -0x5b, -0x0b, -0x98, -0x65, -0xc8, -0x11, -0x42, -0x59, -0x7f, -0xdd, -0x1b, -0x75, -0x17, -0x31, -0x4c, -0x75, -0x58, -0xeb, -0x58, -0x63, -0x7d, -0xf2, -0xa6, -0xc2, -0x6e, -0xb7, -0x3f, -0x3e, -0x5e, -0x47, -0xad, -0xb7, -0x04, -0xe8, -0x05, -0xf8, -0xb2, -0xcf, -0x19, -0xf3, -0xd2, -0x85, -0xfe, -0x3e, -0x3e, -0xb1, -0x62, -0x08, -0x2c, -0x10, -0x07, -0x0d, -0x73, -0x90, -0x17, -0xfa, -0x9b, -0x56, -0x02, -0x75, -0xf9, -0x51, -0xe0, -0xe9, -0x1a, -0x7b, -0x9f, -0xb3, -0xf3, -0x98, -0xb8, -0x1c, -0x9c, -0xe1, -0xd5, -0x35, -0xae, -0xc8, -0x60, -0x48, -0x11, -0x09, -0x94, -0x6b, -0xd0, -0x8b, -0x15, -0xbc, -0x05, -0x68, -0xd3, -0x54, -0x8a, -0x51, -0x39, -0x5c, -0x42, -0x76, -0xce, -0xd8, -0xad, -0x89, -0x30, -0xc9, -0x05, -0x1c, -0xcc, -0x94, -0x3f, -0x0f, -0x90, -0x6f, -0x72, -0x2d, -0x85, -0x64, -0x9a, -0xb9, -0x23, -0xf9, -0x0b, -0xc3, -0x7c, -0x39, -0x0f, -0x97, -0x07, -0x97, -0xda, -0x58, -0x48, -0x33, -0x05, -0x23, -0xb8, -0x82, -0xe8, -0xd3, -0x53, -0x89, -0xaf, -0x33, -0x80, -0x22, -0x84, -0x0c, -0x95, -0x5c, -0x67, -0xb8, -0x77, -0x0c, -0x5c, -0xa2, -0x5f, -0x3d, -0x58, -0x0f, -0x27, -0xf3, -0x2f, -0xae, -0x48, -0xbd, -0x0b, -0x6f, -0x54, -0xfb, -0x67, -0x4c, -0xea, -0x32, -0x27, -0xf1, -0xfa, -0xe2, -0xb0, -0xec, -0x0b, -0x15, -0xb4, -0x70, -0xf6, -0x5c, -0xdd, -0x71, -0x60, -0xc3, -0xc1, -0xa8, -0x32, -0x65, -0xac, -0x7a, -0x77, -0x41, -0xe5, -0xa9, -0x6b, -0x11, -0x81, -0xfa, -0x34, -0x8d, -0xfb, -0xc1, -0x80, -0x6e, -0xc4, -0x60, -0x30, -0x07, -0xd4, -0x8b, -0x67, -0xbd, -0xaa, -0x8c, -0x9c, -0x64, -0xac, -0xdb, -0x0b, -0x24, -0x8b, -0x63, -0x6f, -0xe6, -0xbc, -0xe7, -0x33, -0xa4, -0x4a, -0x4c, -0xa7, -0x9f, -0x43, -0x53, -0xd2, -0xbb, -0x8f, -0x43, -0xc7, -0x3d, -0x78, -0x68, -0x3f, -0xa5, -0x3d, -0xca, -0x69, -0x84, -0xa6, -0x97, -0x2d, -0xc0, -0x7d, -0x31, -0x34, -0x55, -0x1d, -0x07, -0xb1, -0x5f, -0x40, -0x5c, -0x93, -0xb0, -0xbc, -0x7c, -0xb0, -0xbc, -0xe7, -0x12, -0xee, -0x6b, -0x2b, -0xd3, -0x4d, -0x67, -0x70, -0x3a, -0x9a, -0xf2, -0x3c, -0x7c, -0x81, -0xfa, -0xd7, -0xd9, -0x90, -0x91, -0x81, -0xb8, -0xb1, -0xf3, -0x48, -0x6a, -0x26, -0x4f, -0x0c, -0xce, -0xb0, -0x9e, -0xfd, -0x4a, -0x3a, -0xaf, -0xac, -0x5b, -0x3f, -0xbf, -0x44, -0x5a, -0xa3, -0x19, -0x1e, -0x4b, -0xe7, -0x36, -0x6a, -0xd7, -0x20, -0xae, -0xd7, -0x7d, -0x3b, -0xe7, -0xff, -0x3a, -0x86, -0x2e, -0xd0, -0x4a, -0x3e, -0xaf, -0x9f, -0x8e, -0x01, -0xbf, -0xf8, -0x4f, -0xc1, -0xe8, -0x6f, -0x74, -0xe1, -0x45, -0xd3, -0xf7, -0x04, -0x6a, -0x4b, -0x9d, -0xec, -0x33, -0x27, -0x76, -0xd7, -0xc5, -0xe1, -0xb0, -0x3b, -0x0e, -0x23, -0xec, -0xf0, -0x86, -0xd2, -0x1a, -0xbf, -0x3d, -0x04, -0x62, -0xb3, -0x6c, -0xb2, -0xeb, -0x17, -0x05, -0xa6, -0x0a, -0x8a, -0x7e, -0x83, -0x1c, -0xb6, -0x37, -0x09, -0xc6, -0x0b, -0x70, -0x3c, -0xb5, -0x93, -0x81, -0xd8, -0x93, -0xa0, -0x5f, -0x1e, -0x08, -0xe2, -0xc6, -0xe5, -0xc9, -0x72, -0xf1, -0xf1, -0xc1, -0xed, -0xd5, -0x58, -0x93, -0x83, -0xf8, -0x65, -0x67, -0x2e, -0x0d, -0xa9, -0xf1, -0x64, -0x12, -0xe6, -0x4c, -0xea, -0x15, -0x3f, -0x8c, -0x1a, -0xb6, -0xbf, -0xf6, -0xb9, -0x52, -0x35, -0x09, -0xb0, -0xe6, -0xf7, -0xcd, -0xf1, -0xa5, -0xaa, -0x81, -0xd1, -0x81, -0x6f, -0xb4, -0xa9, -0x66, -0x1f, -0xfc, -0x48, -0xc0, -0xb6, -0xd1, -0x8b, -0x06, -0x2f, -0xf6, -0xef, -0x1f, -0x0a, -0xe6, -0xce, -0x3a, -0x4a, -0x55, -0xbf, -0x6d, -0xf9, -0x4d, -0xd4, -0x08, -0x45, -0x4b, -0xc3, -0x66, -0x19, -0x92, -0x10, -0xe1, -0x17, -0x8e, -0x28, -0x91, -0x16, -0xbf, -0x3c, -0xee, -0xa3, -0xa6, -0x99, -0x92, -0x10, -0xe1, -0xf6, -0xcc, -0xac, -0xb8, -0x65, -0x0b, -0x43, -0x66, -0xf8, -0xe3, -0xe5, -0x3f, -0x24, -0x89, -0x47, -0x5d, -0x78, -0x43, -0xd0, -0x61, -0x17, -0xbd, -0x5b, -0x64, -0x54, -0x08, -0x45, -0x59, -0x93, -0xf6, -0x95, -0x8a, -0x41, -0x51, -0x62, -0x4b, -0x51, -0x02, -0x30, -0x73, -0xc7, -0x87, -0xc5, -0x4b, -0xa2, -0x97, -0x0f, -0xe8, -0x46, -0x5f, -0x7e, -0x2a, -0xe1, -0x30, -0x20, -0xb0, -0xfa, -0xe7, -0xce, -0x61, -0x42, -0x57, -0x6e, -0x21, -0xf3, -0x7a, -0xec, -0xe3, -0x25, -0xc7, -0x25, -0xf3, -0x67, -0xa7, -0x57, -0x40, -0x00, -0x02, -0xcf, -0x1c, -0x80, -0x77, -0x67, -0xbd, -0x70, -0xa1, -0x19, -0x92, -0x31, -0x75, -0x93, -0x27, -0x27, -0xb6, -0x82, -0xe4, -0xeb, -0x1d, -0x78, -0x48, -0xe7, -0xa5, -0x5e, -0x57, -0xef, -0x64, -0x28, -0x64, -0x1b, -0xf6, -0x11, -0xb2, -0x03, -0x9d, -0xb9, -0x18, -0x02, -0x27, -0xf7, -0xbe, -0x9d, -0x55, -0xfc, -0x00, -0xd2, -0xc7, -0xae, -0xad, -0x0b, -0xc5, -0xe9, -0x42, -0x41, -0x48, -0xd8, -0x32, -0xcf, -0xf6, -0x0f, -0xf5, -0xbc, -0x97, -0xc6, -0x99, -0x47, -0x76, -0xbd, -0x89, -0x06, -0x0f, -0x63, -0x0c, -0x51, -0xd4, -0x5e, -0xea, -0x48, -0xa8, -0xa2, -0x56, -0x1c, -0x79, -0x84, -0x86, -0x40, -0x88, -0x41, -0x76, -0x55, -0xfc, -0xc2, -0xd7, -0xfd, -0xc9, -0xc7, -0x80, -0x61, -0x35, -0xa7, -0x43, -0x20, -0xf7, -0xeb, -0x6c, -0x66, -0x13, -0xb0, -0xec, -0x02, -0x75, -0x3e, -0x4b, -0xaf, -0xb9, -0x5d, -0x40, -0xda, -0xd6, -0x6e, -0x2d, -0x39, -0x54, -0xc2, -0x95, -0x35, -0x54, -0x25, -0x72, -0xe1, -0x78, -0xb8, -0xeb, -0xc1, -0x16, -0x58, -0x0f, -0x9c, -0x9b, -0xb4, -0xea, -0x37, -0xec, -0x3b, -0x11, -0xba, -0xd5, -0x8a, -0xa9, -0xe3, -0x98, -0x00, -0x51, -0x1c, -0x14, -0xe0, -0x40, -0x96, -0xe5, -0xe9, -0xf2, -0x21, -0x22, -0xb1, -0x23, -0x60, -0x78, -0xd3, -0x17, -0xf8, -0x7a, -0xa5, -0xa8, -0xba, -0x20, -0xd3, -0x15, -0x1e, -0x32, -0xe4, -0x5e, -0x15, -0x48, -0xae, -0xa9, -0xe5, -0xb8, -0x33, -0xec, -0xe8, -0xa2, -0x42, -0xac, -0xbf, -0x10, -0x84, -0x53, -0x87, -0x19, -0xb4, -0x5f, -0x76, -0x4d, -0x01, -0x9d, -0x56, -0x74, -0xd9, -0x5c, -0x97, -0xe7, -0x88, -0xea, -0x3a, -0xbf, -0xdc, -0x4c, -0x33, -0x8a, -0x16, -0xb9, -0x5b, -0xfa, -0xd8, -0x42, -0xa7, -0xbb, -0x3c, -0x04, -0x27, -0x78, -0x49, -0x81, -0x2a, -0x5a, -0x7d, -0x7c, -0x23, -0xa8, -0xba, -0xf7, -0x9a, -0x9f, -0xd2, -0x66, -0x3e, -0x38, -0x3c, -0x75, -0xf9, -0xd1, -0x30, -0x26, -0x30, -0x6e, -0x5a, -0x6e, -0xdc, -0x6a, -0x69, -0x32, -0x50, -0x33, -0x47, -0x9e, -0xa4, -0xa8, -0x64, -0x66, -0xf0, -0x8a, -0xe4, -0xfd, -0x27, -0x6f, -0x51, -0x25, -0x8b, -0x43, -0x74, -0xc9, -0x8e, -0xbd, -0x88, -0x31, -0xbe, -0xec, -0x65, -0xd2, -0xcb, -0x8d, -0x5a, -0x13, -0x48, -0x16, -0x8c, -0x61, -0x0b, -0x11, -0xf6, -0xc6, -0x66, -0xae, -0xc3, -0xcc, -0x0c, -0xd2, -0xe1, -0x9f, -0x82, -0x41, -0x3f, -0x56, -0xf9, -0x73, -0xef, -0xdc, -0x30, -0x50, -0xcf, -0xb6, -0x7f, -0xbc, -0xd0, -0xb3, -0x10, -0xab, -0x24, -0xe4, -0xec, -0xad, -0x18, -0x8c, -0x39, -0x2d, -0x30, -0x4c, -0xc5, -0x40, -0x0d, -0xf6, -0xac, -0xd6, -0x18, -0x5d, -0x96, -0xbf, -0x5f, -0x71, -0x75, -0x96, -0x22, -0x97, -0x0f, -0x02, -0x94, -0x6e, -0xa6, -0xae, -0x6d, -0x8f, -0x1e, -0xca, -0x12, -0x9b, -0x2a, -0x1c, -0xce, -0xa9, -0xee, -0xfd, -0x12, -0x8e, -0xfc, -0xed, -0x09, -0x33, -0xba, -0xf4, -0x1a, -0x15, -0xf6, -0x9d, -0x87, -0x16, -0x43, -0x7c, -0x78, -0x57, -0xe1, -0x44, -0xc9, -0xeb, -0x1f, -0x58, -0x4d, -0xc1, -0x49, -0x11, -0x5c, -0xb2, -0x11, -0xa8, -0x55, -0x16, -0xf1, -0xc6, -0x50, -0xe9, -0x87, -0x89, -0xf6, -0xcf, -0xd8, -0x9c, -0x51, -0xa7, -0xbc, -0x5b, -0x31, -0x6d, -0x4d, -0x51, -0xd0, -0x4c, -0xbc, -0x0d, -0x58, -0x2d, -0x7b, -0x88, -0x7a, -0xf9, -0x8e, -0xd6, -0x40, -0x4d, -0xbb, -0xbe, -0xc4, -0xe5, -0x07, -0xfc, -0xd9, -0x7b, -0x6d, -0xa6, -0x42, -0x57, -0x8f, -0x02, -0x94, -0x4f, -0xe4, -0x2a, -0x65, -0xe2, -0x19, -0x5a, -0x50, -0xe1, -0x25, -0x65, -0x4a, -0x60, -0xc2, -0xcd, -0xa8, -0xec, -0x05, -0x2e, -0x87, -0x7b, -0x95, -0xb7, -0x4f, -0xa0, -0x0b, -0x1b, -0x4a, -0x7f, -0x92, -0xc8, -0x90, -0xee, -0x89, -0x1e, -0x10, -0xd2, -0x85, -0xe4, -0x9f, -0x63, -0xc8, -0x12, -0xbb, -0x4e, -0xb8, -0xcf, -0x0a, -0xec, -0x18, -0x4e, -0xe6, -0x7c, -0xb3, -0x33, -0x26, -0xc7, -0x1f, -0xd2, -0x04, -0x23, -0xea, -0x07, -0x0c, -0x5f, -0x90, -0xbd, -0xa7, -0x6a, -0x0f, -0x4a, -0xd6, -0x10, -0x01, -0x3c, -0x12, -0x29, -0x2e, -0x96, -0xc0, -0x4d, -0xbb, -0xbe, -0xe5, -0xa7, -0x83, -0xd5, -0x6a, -0x3c, -0xe3, -0x5b, -0xb8, -0xf2, -0x5c, -0x6d, -0x1f, -0xa6, -0xf3, -0x12, -0x24, -0xf6, -0xd6, -0x3b, -0x10, -0x14, -0x09, -0x07, -0x82, -0xe8, -0x30, -0x6a, -0x99, -0xdc, -0x95, -0x01, -0x9c, -0xd4, -0x68, -0x3b, -0xca, -0x98, -0x12, -0xab, -0x77, -0x25, -0x15, -0x7d, -0x10, -0x32, -0x45, -0x98, -0xcd, -0x7a, -0xdf, -0x71, -0x8a, -0x75, -0xc1, -0x1c, -0xd4, -0x68, -0x25, -0xeb, -0xbb, -0x54, -0x27, -0x6f, -0x2a, -0xf7, -0xb9, -0x98, -0x03, -0x27, -0xde, -0x24, -0xa8, -0xbb, -0x98, -0xc2, -0x84, -0xff, -0x9b, -0x51, -0xd8, -0x53, -0x50, -0xda, -0xf5, -0x88, -0xaa, -0x87, -0x2f, -0xae, -0xd6, -0xea, -0x6b, -0xde, -0xc8, -0xd7, -0xa7, -0x28, -0x65, -0x81, -0xe8, -0xb2, -0x3b, -0x1d, -0x4f, -0x75, -0x8f, -0x9f, -0x7a, -0x74, -0x8e, -0xc1, -0x5f, -0x9a, -0xa8, -0x9d, -0xfa, -0x03, -0xa3, -0x71, -0x9b, -0x37, -0x6d, -0xd5, -0x0b, -0xf5, -0xe1, -0xa1, -0x1b, -0x01, -0x6a, -0xc6, -0x67, -0xaa, -0xea, -0x2c, -0x9d, -0xa4, -0xd2, -0x6e, -0xfc, -0xde, -0x2e, -0x7f, -0x94, -0x69, -0xe5, -0x4a, -0xe0, -0x01, -0x48, -0x3c, -0x6b, -0xf7, -0x1e, -0xb6, -0x0b, -0x5f, -0xf9, -0x2e, -0x07, -0xc5, -0xe8, -0xae, -0x37, -0x1b, -0xbc, -0x3c, -0xd8, -0xd5, -0x0b, -0x91, -0x9e, -0x80, -0x24, -0xf5, -0x06, -0x0c, -0x0e, -0x98, -0x07, -0x96, -0x2d, -0x19, -0xdc, -0x58, -0x93, -0xcc, -0xfb, -0x4e, -0xeb, -0xbd, -0x0f, -0xf5, -0xaf, -0x01, -0xfa, -0xf1, -0x7c, -0x43, -0x8c, -0xb8, -0x56, -0x3e, -0xbe, -0x77, -0x4e, -0x2b, -0xf7, -0xbb, -0xb7, -0x45, -0x47, -0xcd, -0xcc, -0xa6, -0x4c, -0x72, -0x7b, -0x6a, -0x2a, -0x70, -0x13, -0x07, -0xfd, -0xb8, -0x9c, -0x98, -0x3a, -0xd8, -0x23, -0x67, -0x5b, -0x34, -0xd5, -0x14, -0x0c, -0xab, -0x77, -0x1f, -0xf8, -0x3d, -0x5a, -0x9f, -0x92, -0xb7, -0x2c, -0xad, -0x31, -0xde, -0x61, -0x07, -0xb3, -0x6b, -0xf7, -0x38, -0x15, -0x95, -0x46, -0x14, -0x48, -0x53, -0x69, -0x52, -0x66, -0x07, -0x6d, -0x83, -0x71, -0x8a, -0x67, -0x25, -0x20, -0x0f, -0xfe, -0xd7, -0x02, -0xd7, -0x6e, -0x2c, -0xd2, -0x1a, -0x0a, -0x5d, -0xfd, -0x0f, -0x74, -0xe3, -0xa4, -0x36, -0x07, -0x9a, -0xdf, -0xd4, -0x79, -0xbf, -0xef, -0x59, -0xc0, -0x44, -0x52, -0x87, -0x9a, -0x6e, -0x1d, -0x0e, -0xee, -0xde, -0x2e, -0x1a, -0xa9, -0x8f, -0x3a, -0xc9, -0xba, -0xec, -0x99, -0x78, -0x2d, -0x55, -0x6b, -0x14, -0xc2, -0x06, -0xd5, -0xfc, -0x93, -0x53, -0x4d, -0x11, -0x8c, -0xf8, -0xfa, -0x79, -0x7c, -0xa6, -0x64, -0xae, -0x61, -0xb8, -0x7b, -0x94, -0x56, -0xa6, -0x39, -0x78, -0x9a, -0xe5, -0xc7, -0xdf, -0x18, -0x63, -0x23, -0x9c, -0xfa, -0x66, -0xbb, -0xb7, -0x5a, -0x27, -0x4c, -0xd1, -0xa1, -0x83, -0x22, -0xb3, -0x52, -0x49, -0x35, -0xb0, -0x22, -0x83, -0x59, -0x12, -0x00, -0x16, -0x98, -0xdd, -0xad, -0xc2, -0x94, -0xf9, -0xd3, -0x7b, -0x64, -0x7f, -0x44, -0x3e, -0x3c, -0x8b, -0x9a, -0x83, -0x9c, -0x69, -0x6b, -0xe4, -0xdf, -0x9f, -0xed, -0x54, -0x1f, -0xe5, -0x5d, -0x7a, -0x05, -0x82, -0xb3, -0xdd, -0xef, -0xfc, -0x53, -0x96, -0xb0, -0x2c, -0x5a, -0xf8, -0xdf, -0x9c, -0x8b, -0x16, -0x4e, -0xdf, -0xda, -0x4d, -0x09, -0x09, -0x69, -0x50, -0x03, -0x65, -0xd8, -0x73, -0x70, -0xe8, -0x86, -0xbf, -0xbb, -0x35, -0xce, -0xb2, -0x46, -0xcb, -0x02, -0x00, -0x5b, -0xb4, -0xe2, -0xc6, -0x8f, -0x2f, -0x98, -0xaf, -0x87, -0x4b, -0x48, -0x45, -0xed, -0xcc, -0x1d, -0xe6, -0x58, -0xd6, -0xf2, -0x50, -0x25, -0x9f, -0x52, -0xc7, -0xcb, -0x8a, -0x17, -0x9d, -0x5b, -0xe5, -0xc8, -0xd7, -0x72, -0xb7, -0x52, -0xb2, -0xc4, -0x98, -0xe3, -0x7a, -0x17, -0x3e, -0xc6, -0x60, -0xa7, -0x97, -0xb0, -0xcf, -0x18, -0x81, -0x53, -0x84, -0x4c, -0xd5, -0x17, -0x32, -0x03, -0x13, -0x39, -0x51, -0x09, -0x10, -0xe3, -0x77, -0x49, -0x4f, -0x62, -0x01, -0xbf, -0x8c, -0x9a, -0xe0, -0x41, -0x9e, -0x89, -0x74, -0x36, -0xf9, -0x96, -0x86, -0x2e, -0x96, -0x1c, -0x4a, -0xb7, -0x2b, -0x4a, -0x97, -0xbc, -0x99, -0x40, -0xa3, -0xe0, -0x3d, -0xc8, -0xad, -0x2f, -0xdf, -0x4f, -0x2c, -0xc4, -0x69, -0x82, -0x9f, -0x9b, -0x81, -0x0c, -0x61, -0x5c, -0xa5, -0x9d, -0x8c, -0x89, -0xc0, -0x2c, -0xb4, -0x4a, -0x33, -0x4e, -0xeb, -0xa2, -0x56, -0x40, -0xc0, -0xc2, -0x46, -0xaf, -0x6a, -0xfc, -0x67, -0xd1, -0x80, -0x5e, -0xc5, -0x6d, -0x84, -0x43, -0x27, -0x3f, -0x55, -0x15, -0x96, -0x6a, -0xa0, -0xa5, -0xda, -0xb7, -0xff, -0xb7, -0x75, -0x6e, -0x4c, -0x49, -0x91, -0x9d, -0x22, -0xa3, -0x46, -0xea, -0xed, -0x9a, -0x00, -0xe2, -0x32, -0xc3, -0xd6, -0xa9, -0x71, -0x20, -0x55, -0xa3, -0x19, -0xed, -0xf8, -0x4f, -0xa7, -0x12, -0x9c, -0x66, -0x87, -0xaf, -0x4e, -0xb7, -0xf0, -0xdb, -0xbf, -0xef, -0xf0, -0xf6, -0xaf, -0xea, -0xda, -0x09, -0xfe, -0xde, -0x38, -0x5c, -0xa5, -0xa2, -0xdf, -0x99, -0x45, -0xa8, -0xe4, -0xe7, -0x92, -0xac, -0x67, -0xaa, -0x4f, -0xbf, -0x77, -0x3e, -0xa2, -0x40, -0x49, -0x22, -0x4a, -0x1e, -0x3b, -0xaa, -0x70, -0x7f, -0x95, -0xaf, -0x37, -0x4b, -0xfc, -0x99, -0xe2, -0xe0, -0xba, -0xd7, -0x34, -0xce, -0x55, -0x88, -0x5b, -0x84, -0x1b, -0x57, -0xc4, -0x80, -0x03, -0x53, -0xc9, -0x2f, -0x93, -0x04, -0x4d, -0xd5, -0x96, -0xe5, -0x70, -0xa6, -0x6e, -0x63, -0x5d, -0x9d, -0x6c, -0xdb, -0x02, -0x0a, -0xa9, -0xda, -0x8b, -0x53, -0xdc, -0xd9, -0x9a, -0xc5, -0x94, -0x2c, -0x91, -0x92, -0x2a, -0xde, -0xbb, -0x8b, -0x13, -0xb9, -0x19, -0x96, -0x64, -0xcc, -0xf2, -0x64, -0x39, -0xb7, -0x75, -0x49, -0xe9, -0x86, -0xc2, -0x86, -0x62, -0xd9, -0x24, -0xd3, -0x81, -0x35, -0x49, -0xfc, -0xa0, -0xa5, -0xa0, -0x93, -0x05, -0x64, -0xb4, -0x1a, -0x57, -0xce, -0x0c, -0x90, -0x02, -0x27, -0xc5, -0x7a, -0x2b, -0x5d, -0xae, -0x3e, -0xd5, -0xdd, -0x10, -0x7c, -0x14, -0xea, -0x3a, -0x08, -0xac, -0x72, -0x4e, -0x90, -0x3d, -0x3b, -0x7c, -0x86, -0x2e, -0xeb, -0xd4, -0x06, -0x70, -0xe6, -0xc7, -0xfb, -0x5f, -0xbd, -0x18, -0xf4, -0x11, -0xa4, -0x1a, -0x93, -0xc3, -0xbe, -0xd9, -0xfb, -0x26, -0x48, -0x2f, -0x37, -0x3c, -0xd0, -0x03, -0x47, -0x1a, -0xf7, -0x62, -0x19, -0x24, -0x5c, -0xf4, -0xa8, -0x92, -0x20, -0x7a, -0xf2, -0x9e, -0x2a, -0xc5, -0x95, -0xa2, -0xfb, -0xa4, -0xea, -0x85, -0xd8, -0x56, -0xb7, -0x70, -0xd1, -0x60, -0x30, -0xa5, -0x30, -0x82, -0x70, -0xdc, -0x7a, -0x65, -0x8a, -0x36, -0x3f, -0x5b, -0x0c, -0xae, -0x54, -0x7c, -0xd3, -0x57, -0x84, -0x7b, -0x3a, -0x65, -0x18, -0x81, -0xee, -0x05, -0x9b, -0x44, -0x4d, -0xb8, -0xda, -0xa2, -0xa1, -0xc9, -0x15, -0xd3, -0x73, -0x03, -0x0e, -0x43, -0xe9, -0x8e, -0x15, -0xf9, -0xbe, -0xc6, -0xc5, -0x8a, -0xe5, -0xc0, -0x1e, -0xc2, -0x37, -0x9e, -0x2a, -0x26, -0xa5, -0xa0, -0xbd, -0x24, -0x5f, -0xb9, -0xc1, -0xab, -0x34, -0x48, -0xb9, -0x5d, -0x98, -0xb4, -0x65, -0x18, -0xf3, -0x63, -0x19, -0x44, -0x1b, -0x11, -0x16, -0xff, -0xdc, -0xf1, -0x79, -0x08, -0x86, -0x0f, -0x52, -0x98, -0x73, -0xc4, -0x92, -0x90, -0x2b, -0x47, -0x09, -0xd0, -0x43, -0x6c, -0x2f, -0x20, -0xeb, -0xdc, -0xda, -0xc5, -0x08, -0x7b, -0x94, -0x42, -0x30, -0x6a, -0xc7, -0xda, -0x8c, -0xc3, -0x76, -0xa7, -0xa5, -0xcc, -0x62, -0x13, -0x00, -0x60, -0x31, -0x58, -0x44, -0x9b, -0xf5, -0x64, -0x14, -0xf5, -0x11, -0xc5, -0x54, -0x52, -0x83, -0xd4, -0x73, -0x01, -0x16, -0x0e, -0xb3, -0x7a, -0x29, -0x69, -0x35, -0x56, -0xd4, -0xee, -0x8a, -0x17, -0xa2, -0x99, -0x24, -0x9c, -0xd7, -0x8f, -0xdb, -0x55, -0xb5, -0x3e -}; diff --git a/keyboards/oddball/optical_sensor/optical_sensor.h b/keyboards/oddball/optical_sensor/optical_sensor.h index a152d02cf1..00955209e2 100644 --- a/keyboards/oddball/optical_sensor/optical_sensor.h +++ b/keyboards/oddball/optical_sensor/optical_sensor.h @@ -17,7 +17,7 @@ /* common interface for opitcal sensors */ #if defined ADNS_9800 - #include "../adns/adns.h" + #include "drivers/sensors/adns9800.h" #define config_optical_sensor_t config_adns_t #define report_optical_sensor_t report_adns_t #define optical_sensor_init adns_init diff --git a/keyboards/oddball/rules.mk b/keyboards/oddball/rules.mk index e9e540c3ca..8fc86b570d 100644 --- a/keyboards/oddball/rules.mk +++ b/keyboards/oddball/rules.mk @@ -25,5 +25,5 @@ POINTING_DEVICE_ENABLE = yes DEFAULT_FOLDER = oddball/v1 SRC += spi_master.c -SRC += adns/adns.c +SRC += drivers/sensors/adns9800.c SRC += pmw/pmw.c diff --git a/keyboards/ok60/rules.mk b/keyboards/ok60/rules.mk index f2801c9459..e664640bac 100644 --- a/keyboards/ok60/rules.mk +++ b/keyboards/ok60/rules.mk @@ -27,4 +27,4 @@ RGBLIGHT_ENABLE = yes # Enable the RGB backlight # UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID -LAYOUTS = 60_ansi 60_ansi_split_bksp_rshift 60_iso 60_hhkb +LAYOUTS = 60_ansi 60_iso 60_hhkb diff --git a/keyboards/opendeck/32/rev1/config.h b/keyboards/opendeck/32/rev1/config.h index 9f8ed74278..8b25ab2564 100644 --- a/keyboards/opendeck/32/rev1/config.h +++ b/keyboards/opendeck/32/rev1/config.h @@ -38,7 +38,7 @@ #define DRIVER_COUNT 1 #define DRIVER_1_LED_TOTAL (4 * 8 * 3) #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL) -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_SPIRAL #define RGB_MATRIX_DISABLE_KEYCODES diff --git a/keyboards/pandora/keymaps/default/keymap.c b/keyboards/pandora/keymaps/default/keymap.c index eea641d195..1878f078ce 100644 --- a/keyboards/pandora/keymaps/default/keymap.c +++ b/keyboards/pandora/keymaps/default/keymap.c @@ -30,7 +30,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } // Encoder click function -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { /* First encoder */ case 0: @@ -39,4 +39,5 @@ void dip_switch_update_user(uint8_t index, bool active) { } break; } + return true; } diff --git a/keyboards/pandora/keymaps/via/keymap.c b/keyboards/pandora/keymaps/via/keymap.c index ae97463f61..eb2007447b 100644 --- a/keyboards/pandora/keymaps/via/keymap.c +++ b/keyboards/pandora/keymaps/via/keymap.c @@ -45,7 +45,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } // Encoder click function -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { /* First encoder */ case 0: @@ -54,4 +54,5 @@ void dip_switch_update_user(uint8_t index, bool active) { } break; } + return true; } diff --git a/keyboards/percent/canoe_gen2/config.h b/keyboards/percent/canoe_gen2/config.h index bac5ebb3f3..6409371d40 100644 --- a/keyboards/percent/canoe_gen2/config.h +++ b/keyboards/percent/canoe_gen2/config.h @@ -64,4 +64,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_MATRIX_STARTUP_SAT 255 #define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS #define RGB_MATRIX_STARTUP_SPD 127 -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED diff --git a/keyboards/phase_studio/titan65/config.h b/keyboards/phase_studio/titan65/config.h index 4104c2ec2c..66ae4f20be 100644 --- a/keyboards/phase_studio/titan65/config.h +++ b/keyboards/phase_studio/titan65/config.h @@ -47,5 +47,5 @@ #define RGB_DI_PIN E6 #define DRIVER_LED_TOTAL 67 #define RGB_MATRIX_KEYPRESSES // reacts to keypresses -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 diff --git a/keyboards/pisces/rules.mk b/keyboards/pisces/rules.mk index 156ace1ff0..567b20b1c9 100644 --- a/keyboards/pisces/rules.mk +++ b/keyboards/pisces/rules.mk @@ -23,5 +23,3 @@ AUDIO_ENABLE = no # Audio output # Enable generic behavior for split boards SPLIT_KEYBOARD = yes - -LAYOUTS = split_3x6_1 # total 38 diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h index 7f88764963..5317a51568 100644 --- a/keyboards/planck/ez/config.h +++ b/keyboards/planck/ez/config.h @@ -147,7 +147,7 @@ #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_LED_PROCESS_LIMIT 5 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/planck/ez/ez.h b/keyboards/planck/ez/ez.h index d11929d3ef..14506dd727 100644 --- a/keyboards/planck/ez/ez.h +++ b/keyboards/planck/ez/ez.h @@ -39,17 +39,21 @@ } #define LAYOUT_ortho_4x12( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b \ -) \ -LAYOUT_planck_1x2uC( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ -) + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k3a, k3b, k36 }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k37, k38, k39, k33, k34, k35 } \ +} #define LAYOUT_planck_mit LAYOUT_planck_1x2uC #define LAYOUT_planck_grid LAYOUT_ortho_4x12 diff --git a/keyboards/planck/ez/rules.mk b/keyboards/planck/ez/rules.mk index 8d221767e9..0f7161d3cf 100644 --- a/keyboards/planck/ez/rules.mk +++ b/keyboards/planck/ez/rules.mk @@ -21,7 +21,6 @@ AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/keymaps/abishalom/keymap.c b/keyboards/planck/keymaps/abishalom/keymap.c index bd53cfb7af..e2ca81cc06 100644 --- a/keyboards/planck/keymaps/abishalom/keymap.c +++ b/keyboards/planck/keymaps/abishalom/keymap.c @@ -254,7 +254,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -283,6 +283,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/atreus/keymap.c b/keyboards/planck/keymaps/atreus/keymap.c index c9a721a1fa..ce3d254d42 100644 --- a/keyboards/planck/keymaps/atreus/keymap.c +++ b/keyboards/planck/keymaps/atreus/keymap.c @@ -177,7 +177,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -206,6 +206,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/cbbrowne/rules.mk b/keyboards/planck/keymaps/cbbrowne/rules.mk index 45d6837399..906ece8344 100644 --- a/keyboards/planck/keymaps/cbbrowne/rules.mk +++ b/keyboards/planck/keymaps/cbbrowne/rules.mk @@ -14,7 +14,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Enable SYSEX API (+5390) # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/keymaps/corvec/rules.mk b/keyboards/planck/keymaps/corvec/rules.mk index c17a31a233..4398ea5452 100644 --- a/keyboards/planck/keymaps/corvec/rules.mk +++ b/keyboards/planck/keymaps/corvec/rules.mk @@ -1,5 +1,4 @@ AUTO_SHIFT_ENABLE = yes TAP_DANCE_ENABLE = yes -API_SYSEX_ENABLE = no CONSOLE_ENABLE = no EXTRAKEY_ENABLE = no diff --git a/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c b/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c index aec7bcdd7d..d83df6d4b1 100644 --- a/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c +++ b/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c @@ -296,7 +296,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -325,6 +325,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index 304d320b69..644dae6b99 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c @@ -289,7 +289,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -318,6 +318,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/dvorak2space/rules.mk b/keyboards/planck/keymaps/dvorak2space/rules.mk index 59f9f1dff2..b17bae4d2a 100644 --- a/keyboards/planck/keymaps/dvorak2space/rules.mk +++ b/keyboards/planck/keymaps/dvorak2space/rules.mk @@ -11,7 +11,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no TAP_DANCE_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/planck/keymaps/gitdrik/keymap.c b/keyboards/planck/keymaps/gitdrik/keymap.c index 9cc5f7517f..e3e03929a1 100644 --- a/keyboards/planck/keymaps/gitdrik/keymap.c +++ b/keyboards/planck/keymaps/gitdrik/keymap.c @@ -170,7 +170,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -199,6 +199,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/grant24/keymap.c b/keyboards/planck/keymaps/grant24/keymap.c index 7ed9a794e4..469cf08c70 100644 --- a/keyboards/planck/keymaps/grant24/keymap.c +++ b/keyboards/planck/keymaps/grant24/keymap.c @@ -312,7 +312,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -341,6 +341,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/hvp/keymap.c b/keyboards/planck/keymaps/hvp/keymap.c index 1af3771ae0..c8325b6468 100644 --- a/keyboards/planck/keymaps/hvp/keymap.c +++ b/keyboards/planck/keymaps/hvp/keymap.c @@ -122,7 +122,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -151,6 +151,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/jdelkins/keymap.c b/keyboards/planck/keymaps/jdelkins/keymap.c index 3d109e9e8c..620c36129f 100644 --- a/keyboards/planck/keymaps/jdelkins/keymap.c +++ b/keyboards/planck/keymaps/jdelkins/keymap.c @@ -291,7 +291,7 @@ void encoder_update(bool clockwise) { } } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -320,6 +320,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void keyboard_post_init_keymap(void) { diff --git a/keyboards/planck/keymaps/lja83/keymap.c b/keyboards/planck/keymaps/lja83/keymap.c index d42c5b645e..2b4b9adcc2 100644 --- a/keyboards/planck/keymaps/lja83/keymap.c +++ b/keyboards/planck/keymaps/lja83/keymap.c @@ -299,7 +299,7 @@ bool encoder_update_user(uint16_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -328,6 +328,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/mjuma/keymap.c b/keyboards/planck/keymaps/mjuma/keymap.c index 2204fb2881..8aaa05864f 100644 --- a/keyboards/planck/keymaps/mjuma/keymap.c +++ b/keyboards/planck/keymaps/mjuma/keymap.c @@ -190,7 +190,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 1: if (active) { @@ -199,6 +199,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/priyadi/rules.mk b/keyboards/planck/keymaps/priyadi/rules.mk index 1ce96968bc..b2abe4f076 100644 --- a/keyboards/planck/keymaps/priyadi/rules.mk +++ b/keyboards/planck/keymaps/priyadi/rules.mk @@ -13,7 +13,6 @@ UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes # Unicode map BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no ifeq ($(strip $(KEYBOARD)), planck/rev4) BACKLIGHT_ENABLE = yes diff --git a/keyboards/planck/keymaps/rjhilgefort/keymap.c b/keyboards/planck/keymaps/rjhilgefort/keymap.c index d832e70515..9eb178823c 100644 --- a/keyboards/planck/keymaps/rjhilgefort/keymap.c +++ b/keyboards/planck/keymaps/rjhilgefort/keymap.c @@ -187,7 +187,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -216,6 +216,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/rodhaene/rules.mk b/keyboards/planck/keymaps/rodhaene/rules.mk index 7db994581a..a754257523 100644 --- a/keyboards/planck/keymaps/rodhaene/rules.mk +++ b/keyboards/planck/keymaps/rodhaene/rules.mk @@ -14,7 +14,6 @@ AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
\ No newline at end of file diff --git a/keyboards/planck/keymaps/sgoodwin/rules.mk b/keyboards/planck/keymaps/sgoodwin/rules.mk index cdcb4a887d..1e877943d9 100644 --- a/keyboards/planck/keymaps/sgoodwin/rules.mk +++ b/keyboards/planck/keymaps/sgoodwin/rules.mk @@ -14,7 +14,6 @@ AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Disable extra stuff for ergodoxen # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
\ No newline at end of file diff --git a/keyboards/planck/keymaps/vifon/rules.mk b/keyboards/planck/keymaps/vifon/rules.mk index 3f9b4544e1..654667eb69 100644 --- a/keyboards/planck/keymaps/vifon/rules.mk +++ b/keyboards/planck/keymaps/vifon/rules.mk @@ -16,7 +16,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # https://www.reddit.com/r/olkb/comments/5swhij/_/ddie6zq/ KEY_LOCK_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/planck/light/rules.mk b/keyboards/planck/light/rules.mk index fc6243c3fb..78314b3e84 100644 --- a/keyboards/planck/light/rules.mk +++ b/keyboards/planck/light/rules.mk @@ -29,7 +29,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = IS31FL3731 -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/rev1/rules.mk b/keyboards/planck/rev1/rules.mk index 98ae26cbed..afc369a7d9 100644 --- a/keyboards/planck/rev1/rules.mk +++ b/keyboards/planck/rev1/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/rev2/rules.mk b/keyboards/planck/rev2/rules.mk index 98ae26cbed..afc369a7d9 100644 --- a/keyboards/planck/rev2/rules.mk +++ b/keyboards/planck/rev2/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/rev3/rules.mk b/keyboards/planck/rev3/rules.mk index 98ae26cbed..afc369a7d9 100644 --- a/keyboards/planck/rev3/rules.mk +++ b/keyboards/planck/rev3/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/rev4/rules.mk b/keyboards/planck/rev4/rules.mk index 8454ea0e72..6212437180 100644 --- a/keyboards/planck/rev4/rules.mk +++ b/keyboards/planck/rev4/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/rev5/rules.mk b/keyboards/planck/rev5/rules.mk index 4958572545..492c70b65f 100644 --- a/keyboards/planck/rev5/rules.mk +++ b/keyboards/planck/rev5/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h index 4bc8a509f6..18bb740968 100644 --- a/keyboards/planck/rev6/config.h +++ b/keyboards/planck/rev6/config.h @@ -141,7 +141,7 @@ #define WS2812_DMA_CHANNEL 2 #ifndef RGB_DISABLE_WHEN_USB_SUSPENDED -# define RGB_DISABLE_WHEN_USB_SUSPENDED true +# define RGB_DISABLE_WHEN_USB_SUSPENDED #endif #endif diff --git a/keyboards/planck/rev6/rev6.c b/keyboards/planck/rev6/rev6.c index 4f2ff86812..e6c49ae1c8 100644 --- a/keyboards/planck/rev6/rev6.c +++ b/keyboards/planck/rev6/rev6.c @@ -61,10 +61,10 @@ void matrix_scan_kb(void) { #ifdef DIP_SWITCH_ENABLE __attribute__((weak)) -void dip_update(uint8_t index, bool active) {} +bool dip_update(uint8_t index, bool active) { return true; } __attribute__((weak)) -void dip_switch_update_user(uint8_t index, bool active) { - dip_update(index, active); +bool dip_switch_update_user(uint8_t index, bool active) { + return dip_update(index, active); } #endif diff --git a/keyboards/planck/rev6/rules.mk b/keyboards/planck/rev6/rules.mk index 7760353e33..a26fbc1477 100644 --- a/keyboards/planck/rev6/rules.mk +++ b/keyboards/planck/rev6/rules.mk @@ -22,7 +22,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. WS2812_DRIVER = pwm -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/thk/info.json b/keyboards/planck/thk/info.json index cffc9fd364..558597b4d8 100644 --- a/keyboards/planck/thk/info.json +++ b/keyboards/planck/thk/info.json @@ -1,53 +1,13 @@ { - "manufacturer": "OLKB", "keyboard_name": "Planck THK", "maintainer": "Erovia", - "height": 4, - "width": 12, - "bootloader": "USBasp", - "debounce": 5, - "diode_direction": "COL2ROW", - "features": { - "audio": false, - "backlight": false, - "bluetooth": false, - "bootmagic_lite": true, - "command": false, - "console": false, - "dip_switch": true, - "encoder": true, - "extrakey": true, - "mousekey": true, - "nkro": false, - "rgblight": false, - "sleep_led": false - }, - "matrix_pins": { - "cols": ["D7", "C2", "C3", "C4", "C5", "C6", "C7", "A3", "A2", "A1", "A0", "B0"], - "rows": ["A7", "A6", "A5", "A4"] - }, - "processor": "atmega32a", - "qmk_lufa_bootloader": { - "esc_input": "D5", - "esc_output": "F1", - "led": "E6", - "speaker": "C6" - }, "url": "https://olkb.com/planck", - "usb": { - "device_ver": "0x0000", - "pid": "0x25A7", - "vid": "0x03A8" - }, - "community_layouts": ["ortho_4x12", "planck_mit"], "layout_aliases": { "LAYOUT_planck_grid": "LAYOUT_ortho_4x12", "LAYOUT_planck_mit": "LAYOUT_planck_1x2uC" }, "layouts": { "LAYOUT_ortho_4x12": { - "c_macro": true, - "filename": "keyboards/planck/thk/thk.h", "key_count": 48, "layout": [ { "label": "k00", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 }, @@ -101,8 +61,6 @@ ] }, "LAYOUT_planck_1x2uC": { - "c_macro": true, - "filename": "keyboards/planck/thk/thk.h", "key_count": 47, "layout": [ { "label": "k00", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 }, diff --git a/keyboards/planck/thk/keymaps/thk/keymap.c b/keyboards/planck/thk/keymaps/thk/keymap.c index 948393b532..ae2420250e 100644 --- a/keyboards/planck/thk/keymaps/thk/keymap.c +++ b/keyboards/planck/thk/keymaps/thk/keymap.c @@ -213,7 +213,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { if (active) { @@ -237,4 +237,5 @@ void dip_switch_update_user(uint8_t index, bool active) { SEND_STRING("This is a Planck THK"); break; } + return true; } diff --git a/keyboards/ploopyco/adns5050.c b/keyboards/ploopyco/adns5050.c deleted file mode 100644 index e12e56f20c..0000000000 --- a/keyboards/ploopyco/adns5050.c +++ /dev/null @@ -1,197 +0,0 @@ -/* Copyright 2021 Colin Lam (Ploopy Corporation) - * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> - * Copyright 2019 Sunjun Kim - * Copyright 2019 Hiroyuki Okada - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - - -#include "adns5050.h" -#include "quantum.h" -#include "wait.h" - -#ifdef CONSOLE_ENABLE -# include "print.h" -#endif - -#ifndef OPTIC_ROTATED -# define OPTIC_ROTATED false -#endif - -// Definitions for the ADNS serial line. -// These really ought to be defined in your config.h, but defaults are -// here if you're really lazy. -#ifndef ADNS_SCLK_PIN -# define ADNS_SCLK_PIN B7 -#endif - -#ifndef ADNS_SDIO_PIN -# define ADNS_SDIO_PIN C6 -#endif - -#ifndef ADNS_CS_PIN -# define ADNS_CS_PIN B4 -#endif - -#ifdef CONSOLE_ENABLE -void print_byte(uint8_t byte) { dprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); } -#endif - -// Initialize the ADNS serial pins. -void adns_init(void) { - setPinOutput(ADNS_SCLK_PIN); - setPinOutput(ADNS_SDIO_PIN); - setPinOutput(ADNS_CS_PIN); -} - -// Perform a synchronization with the ADNS. -// Just as with the serial protocol, this is used by the slave to send a -// synchronization signal to the master. -void adns_sync(void) { - writePinLow(ADNS_CS_PIN); - wait_us(1); - writePinHigh(ADNS_CS_PIN); -} - -void adns_cs_select(void) { - writePinLow(ADNS_CS_PIN); -} - -void adns_cs_deselect(void) { - writePinHigh(ADNS_CS_PIN); -} - -uint8_t adns_serial_read(void) { - setPinInput(ADNS_SDIO_PIN); - uint8_t byte = 0; - - for (uint8_t i = 0; i < 8; ++i) { - writePinLow(ADNS_SCLK_PIN); - wait_us(1); - - byte = (byte << 1) | readPin(ADNS_SDIO_PIN); - - writePinHigh(ADNS_SCLK_PIN); - wait_us(1); - } - - return byte; -} - -void adns_serial_write(uint8_t data) { - setPinOutput(ADNS_SDIO_PIN); - - for (int8_t b = 7; b >= 0; b--) { - writePinLow(ADNS_SCLK_PIN); - - if (data & (1 << b)) - writePinHigh(ADNS_SDIO_PIN); - else - writePinLow(ADNS_SDIO_PIN); - - wait_us(2); - - writePinHigh(ADNS_SCLK_PIN); - } - - // tSWR. See page 15 of the ADNS spec sheet. - // Technically, this is only necessary if the next operation is an SDIO - // read. This is not guaranteed to be the case, but we're being lazy. - wait_us(4); - - // Note that tSWW is never necessary. All write operations require at - // least 32us, which exceeds tSWW, so there's never a need to wait for it. -} - -// Read a byte of data from a register on the ADNS. -// Don't forget to use the register map (as defined in the header file). -uint8_t adns_read_reg(uint8_t reg_addr) { - adns_cs_select(); - - adns_serial_write(reg_addr); - - // We don't need a minimum tSRAD here. That's because a 4ms wait time is - // already included in adns_serial_write(), so we're good. - // See page 10 and 15 of the ADNS spec sheet. - //wait_us(4); - - uint8_t byte = adns_serial_read(); - - // tSRW & tSRR. See page 15 of the ADNS spec sheet. - // Technically, this is only necessary if the next operation is an SDIO - // read or write. This is not guaranteed to be the case. - // Honestly, this wait could probably be removed. - wait_us(1); - - adns_cs_deselect(); - - return byte; -} - -void adns_write_reg(uint8_t reg_addr, uint8_t data) { - adns_cs_select(); - adns_serial_write( 0b10000000 | reg_addr ); - adns_serial_write(data); - adns_cs_deselect(); -} - -report_adns_t adns_read_burst(void) { - adns_cs_select(); - - report_adns_t data; - data.dx = 0; - data.dy = 0; - - adns_serial_write(REG_MOTION_BURST); - - // We don't need a minimum tSRAD here. That's because a 4ms wait time is - // already included in adns_serial_write(), so we're good. - // See page 10 and 15 of the ADNS spec sheet. - //wait_us(4); - - uint8_t x = adns_serial_read(); - uint8_t y = adns_serial_read(); - - // Burst mode returns a bunch of other shit that we don't really need. - // Setting CS to high ends burst mode early. - adns_cs_deselect(); - - data.dx = convert_twoscomp(x); - data.dy = convert_twoscomp(y); - - return data; -} - -// Convert a two's complement byte from an unsigned data type into a signed -// data type. -int8_t convert_twoscomp(uint8_t data) { - if ((data & 0x80) == 0x80) - return -128 + (data & 0x7F); - else - return data; -} - -// Don't forget to use the definitions for CPI in the header file. -void adns_set_cpi(uint8_t cpi) { - adns_write_reg(REG_MOUSE_CONTROL2, cpi); -} - -bool adns_check_signature(void) { - uint8_t pid = adns_read_reg(REG_PRODUCT_ID); - uint8_t rid = adns_read_reg(REG_REVISION_ID); - uint8_t pid2 = adns_read_reg(REG_PRODUCT_ID2); - - return (pid == 0x12 && rid == 0x01 && pid2 == 0x26); -} diff --git a/keyboards/ploopyco/adns5050.h b/keyboards/ploopyco/adns5050.h deleted file mode 100644 index ff8e8f78e9..0000000000 --- a/keyboards/ploopyco/adns5050.h +++ /dev/null @@ -1,79 +0,0 @@ -/* Copyright 2021 Colin Lam (Ploopy Corporation) - * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> - * Copyright 2019 Sunjun Kim - * Copyright 2019 Hiroyuki Okada - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#include <stdbool.h> - -// Registers -#define REG_PRODUCT_ID 0x00 -#define REG_REVISION_ID 0x01 -#define REG_MOTION 0x02 -#define REG_DELTA_X 0x03 -#define REG_DELTA_Y 0x04 -#define REG_SQUAL 0x05 -#define REG_SHUTTER_UPPER 0x06 -#define REG_SHUTTER_LOWER 0x07 -#define REG_MAXIMUM_PIXEL 0x08 -#define REG_PIXEL_SUM 0x09 -#define REG_MINIMUM_PIXEL 0x0a -#define REG_PIXEL_GRAB 0x0b -#define REG_MOUSE_CONTROL 0x0d -#define REG_MOUSE_CONTROL2 0x19 -#define REG_LED_DC_MODE 0x22 -#define REG_CHIP_RESET 0x3a -#define REG_PRODUCT_ID2 0x3e -#define REG_INV_REV_ID 0x3f -#define REG_MOTION_BURST 0x63 - -// CPI values -#define CPI125 0x11 -#define CPI250 0x12 -#define CPI375 0x13 -#define CPI500 0x14 -#define CPI625 0x15 -#define CPI750 0x16 -#define CPI875 0x17 -#define CPI1000 0x18 -#define CPI1125 0x19 -#define CPI1250 0x1a -#define CPI1375 0x1b - -#ifdef CONSOLE_ENABLE -void print_byte(uint8_t byte); -#endif - -typedef struct { - int8_t dx; - int8_t dy; -} report_adns_t; - -// A bunch of functions to implement the ADNS5050-specific serial protocol. -// Note that the "serial.h" driver is insufficient, because it does not -// manually manipulate a serial clock signal. -void adns_init(void); -void adns_sync(void); -uint8_t adns_serial_read(void); -void adns_serial_write(uint8_t data); -uint8_t adns_read_reg(uint8_t reg_addr); -void adns_write_reg(uint8_t reg_addr, uint8_t data); -report_adns_t adns_read_burst(void); -int8_t convert_twoscomp(uint8_t data); -void adns_set_cpi(uint8_t cpi); -bool adns_check_signature(void); diff --git a/keyboards/ploopyco/mouse/mouse.h b/keyboards/ploopyco/mouse/mouse.h index 5d49d2f2d2..d11aa5e9a4 100644 --- a/keyboards/ploopyco/mouse/mouse.h +++ b/keyboards/ploopyco/mouse/mouse.h @@ -20,7 +20,7 @@ #include "quantum.h" #include "spi_master.h" -#include "pmw3360.h" +#include "drivers/sensors/pmw3360.h" #include "analog.h" #include "opt_encoder.h" #include "pointing_device.h" diff --git a/keyboards/ploopyco/mouse/rules.mk b/keyboards/ploopyco/mouse/rules.mk index f998672f14..17aac98016 100644 --- a/keyboards/ploopyco/mouse/rules.mk +++ b/keyboards/ploopyco/mouse/rules.mk @@ -27,4 +27,4 @@ POINTING_DEVICE_ENABLE = yes MOUSEKEY_ENABLE = yes # Mouse keys QUANTUM_LIB_SRC += analog.c spi_master.c -SRC += pmw3360.c opt_encoder.c +SRC += drivers/sensors/pmw3360.c opt_encoder.c diff --git a/keyboards/ploopyco/pmw3360.c b/keyboards/ploopyco/pmw3360.c deleted file mode 100644 index 5f9f72a9ec..0000000000 --- a/keyboards/ploopyco/pmw3360.c +++ /dev/null @@ -1,218 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> - * Copyright 2019 Sunjun Kim - * Copyright 2020 Ploopy Corporation - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "wait.h" -#include "debug.h" -#include "print.h" -#include "pmw3360.h" -#include "pmw3360_firmware.h" - -bool _inBurst = false; - -#ifndef PMW_CPI -# define PMW_CPI 1600 -#endif -#ifndef SPI_DIVISOR -# define SPI_DIVISOR 2 -#endif -#ifndef ROTATIONAL_TRANSFORM_ANGLE -# define ROTATIONAL_TRANSFORM_ANGLE 0x00 -#endif - -void print_byte(uint8_t byte) { dprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); } - - -bool spi_start_adv(void) { - bool status = spi_start(SPI_SS_PIN, false, 3, SPI_DIVISOR); - wait_us(1); - return status; -} - -void spi_stop_adv(void) { - wait_us(1); - spi_stop(); -} - -spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data) { - if (reg_addr != REG_Motion_Burst) { - _inBurst = false; - } - - spi_start_adv(); - // send address of the register, with MSBit = 1 to indicate it's a write - spi_status_t status = spi_write(reg_addr | 0x80); - status = spi_write(data); - - // tSCLK-NCS for write operation - wait_us(20); - - // tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound - wait_us(100); - spi_stop(); - return status; -} - -uint8_t spi_read_adv(uint8_t reg_addr) { - spi_start_adv(); - // send adress of the register, with MSBit = 0 to indicate it's a read - spi_write(reg_addr & 0x7f); - - uint8_t data = spi_read(); - - // tSCLK-NCS for read operation is 120ns - wait_us(1); - - // tSRW/tSRR (=20us) minus tSCLK-NCS - wait_us(19); - - spi_stop(); - return data; -} - -void pmw_set_cpi(uint16_t cpi) { - int cpival = constrain((cpi / 100) - 1, 0, 0x77); // limits to 0--119 - - spi_start_adv(); - spi_write_adv(REG_Config1, cpival); - spi_stop(); -} - -bool pmw_spi_init(void) { - spi_init(); - _inBurst = false; - - spi_stop(); - spi_start_adv(); - spi_stop(); - - spi_write_adv(REG_Shutdown, 0xb6); // Shutdown first - wait_ms(300); - - spi_start_adv(); - wait_us(40); - spi_stop_adv(); - wait_us(40); - - spi_write_adv(REG_Power_Up_Reset, 0x5a); - wait_ms(50); - - spi_read_adv(REG_Motion); - spi_read_adv(REG_Delta_X_L); - spi_read_adv(REG_Delta_X_H); - spi_read_adv(REG_Delta_Y_L); - spi_read_adv(REG_Delta_Y_H); - - pmw_upload_firmware(); - - spi_stop_adv(); - - wait_ms(10); - pmw_set_cpi(PMW_CPI); - - wait_ms(1); - - return pmw_check_signature(); -} - -void pmw_upload_firmware(void) { - spi_write_adv(REG_Config2, 0x00); - - spi_write_adv(REG_Angle_Tune, constrain(ROTATIONAL_TRANSFORM_ANGLE, -30, 30)); - - spi_write_adv(REG_SROM_Enable, 0x1d); - - wait_ms(10); - - spi_write_adv(REG_SROM_Enable, 0x18); - - spi_start_adv(); - spi_write(REG_SROM_Load_Burst | 0x80); - wait_us(15); - - unsigned char c; - for (int i = 0; i < firmware_length; i++) { - c = (unsigned char)pgm_read_byte(firmware_data + i); - spi_write(c); - wait_us(15); - } - wait_us(200); - - spi_read_adv(REG_SROM_ID); - - spi_write_adv(REG_Config2, 0x00); - - spi_stop(); - wait_ms(10); -} - -bool pmw_check_signature(void) { - uint8_t pid = spi_read_adv(REG_Product_ID); - uint8_t iv_pid = spi_read_adv(REG_Inverse_Product_ID); - uint8_t SROM_ver = spi_read_adv(REG_SROM_ID); - return (pid == 0x42 && iv_pid == 0xBD && SROM_ver == 0x04); // signature for SROM 0x04 -} - -report_pmw_t pmw_read_burst(void) { - if (!_inBurst) { - dprintf("burst on"); - spi_write_adv(REG_Motion_Burst, 0x00); - _inBurst = true; - } - - spi_start_adv(); - spi_write(REG_Motion_Burst); - wait_us(35); // waits for tSRAD - - report_pmw_t data; - data.motion = 0; - data.dx = 0; - data.mdx = 0; - data.dy = 0; - data.mdx = 0; - - data.motion = spi_read(); - spi_write(0x00); // skip Observation - data.dx = spi_read(); - data.mdx = spi_read(); - data.dy = spi_read(); - data.mdy = spi_read(); - - spi_stop(); - - print_byte(data.motion); - print_byte(data.dx); - print_byte(data.mdx); - print_byte(data.dy); - print_byte(data.mdy); - dprintf("\n"); - - data.isMotion = (data.motion & 0x80) != 0; - data.isOnSurface = (data.motion & 0x08) == 0; - data.dx |= (data.mdx << 8); - data.dx = data.dx * -1; - data.dy |= (data.mdy << 8); - data.dy = data.dy * -1; - - spi_stop(); - - if (data.motion & 0b111) { // panic recovery, sometimes burst mode works weird. - _inBurst = false; - } - - return data; -} diff --git a/keyboards/ploopyco/pmw3360.h b/keyboards/ploopyco/pmw3360.h deleted file mode 100644 index c1d5e3badb..0000000000 --- a/keyboards/ploopyco/pmw3360.h +++ /dev/null @@ -1,103 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> - * Copyright 2019 Sunjun Kim - * Copyright 2020 Ploopy Corporation - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -#include "spi_master.h" - -// Registers -#define REG_Product_ID 0x00 -#define REG_Revision_ID 0x01 -#define REG_Motion 0x02 -#define REG_Delta_X_L 0x03 -#define REG_Delta_X_H 0x04 -#define REG_Delta_Y_L 0x05 -#define REG_Delta_Y_H 0x06 -#define REG_SQUAL 0x07 -#define REG_Raw_Data_Sum 0x08 -#define REG_Maximum_Raw_data 0x09 -#define REG_Minimum_Raw_data 0x0A -#define REG_Shutter_Lower 0x0B -#define REG_Shutter_Upper 0x0C -#define REG_Control 0x0D -#define REG_Config1 0x0F -#define REG_Config2 0x10 -#define REG_Angle_Tune 0x11 -#define REG_Frame_Capture 0x12 -#define REG_SROM_Enable 0x13 -#define REG_Run_Downshift 0x14 -#define REG_Rest1_Rate_Lower 0x15 -#define REG_Rest1_Rate_Upper 0x16 -#define REG_Rest1_Downshift 0x17 -#define REG_Rest2_Rate_Lower 0x18 -#define REG_Rest2_Rate_Upper 0x19 -#define REG_Rest2_Downshift 0x1A -#define REG_Rest3_Rate_Lower 0x1B -#define REG_Rest3_Rate_Upper 0x1C -#define REG_Observation 0x24 -#define REG_Data_Out_Lower 0x25 -#define REG_Data_Out_Upper 0x26 -#define REG_Raw_Data_Dump 0x29 -#define REG_SROM_ID 0x2A -#define REG_Min_SQ_Run 0x2B -#define REG_Raw_Data_Threshold 0x2C -#define REG_Config5 0x2F -#define REG_Power_Up_Reset 0x3A -#define REG_Shutdown 0x3B -#define REG_Inverse_Product_ID 0x3F -#define REG_LiftCutoff_Tune3 0x41 -#define REG_Angle_Snap 0x42 -#define REG_LiftCutoff_Tune1 0x4A -#define REG_Motion_Burst 0x50 -#define REG_LiftCutoff_Tune_Timeout 0x58 -#define REG_LiftCutoff_Tune_Min_Length 0x5A -#define REG_SROM_Load_Burst 0x62 -#define REG_Lift_Config 0x63 -#define REG_Raw_Data_Burst 0x64 -#define REG_LiftCutoff_Tune2 0x65 - -#ifdef CONSOLE_ENABLE -void print_byte(uint8_t byte); -#endif - -typedef struct { - int8_t motion; - bool isMotion; // True if a motion is detected. - bool isOnSurface; // True when a chip is on a surface - int16_t dx; // displacement on x directions. Unit: Count. (CPI * Count = Inch value) - int8_t mdx; - int16_t dy; // displacement on y directions. - int8_t mdy; -} report_pmw_t; - - - -bool spi_start_adv(void); -void spi_stop_adv(void); -spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data); -uint8_t spi_read_adv(uint8_t reg_addr); -bool pmw_spi_init(void); -void pmw_set_cpi(uint16_t cpi); -void pmw_upload_firmware(void); -bool pmw_check_signature(void); -report_pmw_t pmw_read_burst(void); - - -#define degToRad(angleInDegrees) ((angleInDegrees)*M_PI / 180.0) -#define radToDeg(angleInRadians) ((angleInRadians)*180.0 / M_PI) -#define constrain(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt))) diff --git a/keyboards/ploopyco/pmw3360_firmware.h b/keyboards/ploopyco/pmw3360_firmware.h deleted file mode 100644 index cca5a6a4d8..0000000000 --- a/keyboards/ploopyco/pmw3360_firmware.h +++ /dev/null @@ -1,300 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> - * Copyright 2019 Sunjun Kim - * Copyright 2020 Ploopy Corporation - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -// clang-format off -// Firmware Blob foor PMW3360 -const uint16_t firmware_length = 4094; -// clang-format off -const uint8_t firmware_data[] PROGMEM = { // SROM 0x04 -0x01, 0x04, 0x8e, 0x96, 0x6e, 0x77, 0x3e, 0xfe, 0x7e, 0x5f, 0x1d, 0xb8, 0xf2, 0x66, 0x4e, -0xff, 0x5d, 0x19, 0xb0, 0xc2, 0x04, 0x69, 0x54, 0x2a, 0xd6, 0x2e, 0xbf, 0xdd, 0x19, 0xb0, -0xc3, 0xe5, 0x29, 0xb1, 0xe0, 0x23, 0xa5, 0xa9, 0xb1, 0xc1, 0x00, 0x82, 0x67, 0x4c, 0x1a, -0x97, 0x8d, 0x79, 0x51, 0x20, 0xc7, 0x06, 0x8e, 0x7c, 0x7c, 0x7a, 0x76, 0x4f, 0xfd, 0x59, -0x30, 0xe2, 0x46, 0x0e, 0x9e, 0xbe, 0xdf, 0x1d, 0x99, 0x91, 0xa0, 0xa5, 0xa1, 0xa9, 0xd0, -0x22, 0xc6, 0xef, 0x5c, 0x1b, 0x95, 0x89, 0x90, 0xa2, 0xa7, 0xcc, 0xfb, 0x55, 0x28, 0xb3, -0xe4, 0x4a, 0xf7, 0x6c, 0x3b, 0xf4, 0x6a, 0x56, 0x2e, 0xde, 0x1f, 0x9d, 0xb8, 0xd3, 0x05, -0x88, 0x92, 0xa6, 0xce, 0x1e, 0xbe, 0xdf, 0x1d, 0x99, 0xb0, 0xe2, 0x46, 0xef, 0x5c, 0x07, -0x11, 0x5d, 0x98, 0x0b, 0x9d, 0x94, 0x97, 0xee, 0x4e, 0x45, 0x33, 0x6b, 0x44, 0xc7, 0x29, -0x56, 0x27, 0x30, 0xc6, 0xa7, 0xd5, 0xf2, 0x56, 0xdf, 0xb4, 0x38, 0x62, 0xcb, 0xa0, 0xb6, -0xe3, 0x0f, 0x84, 0x06, 0x24, 0x05, 0x65, 0x6f, 0x76, 0x89, 0xb5, 0x77, 0x41, 0x27, 0x82, -0x66, 0x65, 0x82, 0xcc, 0xd5, 0xe6, 0x20, 0xd5, 0x27, 0x17, 0xc5, 0xf8, 0x03, 0x23, 0x7c, -0x5f, 0x64, 0xa5, 0x1d, 0xc1, 0xd6, 0x36, 0xcb, 0x4c, 0xd4, 0xdb, 0x66, 0xd7, 0x8b, 0xb1, -0x99, 0x7e, 0x6f, 0x4c, 0x36, 0x40, 0x06, 0xd6, 0xeb, 0xd7, 0xa2, 0xe4, 0xf4, 0x95, 0x51, -0x5a, 0x54, 0x96, 0xd5, 0x53, 0x44, 0xd7, 0x8c, 0xe0, 0xb9, 0x40, 0x68, 0xd2, 0x18, 0xe9, -0xdd, 0x9a, 0x23, 0x92, 0x48, 0xee, 0x7f, 0x43, 0xaf, 0xea, 0x77, 0x38, 0x84, 0x8c, 0x0a, -0x72, 0xaf, 0x69, 0xf8, 0xdd, 0xf1, 0x24, 0x83, 0xa3, 0xf8, 0x4a, 0xbf, 0xf5, 0x94, 0x13, -0xdb, 0xbb, 0xd8, 0xb4, 0xb3, 0xa0, 0xfb, 0x45, 0x50, 0x60, 0x30, 0x59, 0x12, 0x31, 0x71, -0xa2, 0xd3, 0x13, 0xe7, 0xfa, 0xe7, 0xce, 0x0f, 0x63, 0x15, 0x0b, 0x6b, 0x94, 0xbb, 0x37, -0x83, 0x26, 0x05, 0x9d, 0xfb, 0x46, 0x92, 0xfc, 0x0a, 0x15, 0xd1, 0x0d, 0x73, 0x92, 0xd6, -0x8c, 0x1b, 0x8c, 0xb8, 0x55, 0x8a, 0xce, 0xbd, 0xfe, 0x8e, 0xfc, 0xed, 0x09, 0x12, 0x83, -0x91, 0x82, 0x51, 0x31, 0x23, 0xfb, 0xb4, 0x0c, 0x76, 0xad, 0x7c, 0xd9, 0xb4, 0x4b, 0xb2, -0x67, 0x14, 0x09, 0x9c, 0x7f, 0x0c, 0x18, 0xba, 0x3b, 0xd6, 0x8e, 0x14, 0x2a, 0xe4, 0x1b, -0x52, 0x9f, 0x2b, 0x7d, 0xe1, 0xfb, 0x6a, 0x33, 0x02, 0xfa, 0xac, 0x5a, 0xf2, 0x3e, 0x88, -0x7e, 0xae, 0xd1, 0xf3, 0x78, 0xe8, 0x05, 0xd1, 0xe3, 0xdc, 0x21, 0xf6, 0xe1, 0x9a, 0xbd, -0x17, 0x0e, 0xd9, 0x46, 0x9b, 0x88, 0x03, 0xea, 0xf6, 0x66, 0xbe, 0x0e, 0x1b, 0x50, 0x49, -0x96, 0x40, 0x97, 0xf1, 0xf1, 0xe4, 0x80, 0xa6, 0x6e, 0xe8, 0x77, 0x34, 0xbf, 0x29, 0x40, -0x44, 0xc2, 0xff, 0x4e, 0x98, 0xd3, 0x9c, 0xa3, 0x32, 0x2b, 0x76, 0x51, 0x04, 0x09, 0xe7, -0xa9, 0xd1, 0xa6, 0x32, 0xb1, 0x23, 0x53, 0xe2, 0x47, 0xab, 0xd6, 0xf5, 0x69, 0x5c, 0x3e, -0x5f, 0xfa, 0xae, 0x45, 0x20, 0xe5, 0xd2, 0x44, 0xff, 0x39, 0x32, 0x6d, 0xfd, 0x27, 0x57, -0x5c, 0xfd, 0xf0, 0xde, 0xc1, 0xb5, 0x99, 0xe5, 0xf5, 0x1c, 0x77, 0x01, 0x75, 0xc5, 0x6d, -0x58, 0x92, 0xf2, 0xb2, 0x47, 0x00, 0x01, 0x26, 0x96, 0x7a, 0x30, 0xff, 0xb7, 0xf0, 0xef, -0x77, 0xc1, 0x8a, 0x5d, 0xdc, 0xc0, 0xd1, 0x29, 0x30, 0x1e, 0x77, 0x38, 0x7a, 0x94, 0xf1, -0xb8, 0x7a, 0x7e, 0xef, 0xa4, 0xd1, 0xac, 0x31, 0x4a, 0xf2, 0x5d, 0x64, 0x3d, 0xb2, 0xe2, -0xf0, 0x08, 0x99, 0xfc, 0x70, 0xee, 0x24, 0xa7, 0x7e, 0xee, 0x1e, 0x20, 0x69, 0x7d, 0x44, -0xbf, 0x87, 0x42, 0xdf, 0x88, 0x3b, 0x0c, 0xda, 0x42, 0xc9, 0x04, 0xf9, 0x45, 0x50, 0xfc, -0x83, 0x8f, 0x11, 0x6a, 0x72, 0xbc, 0x99, 0x95, 0xf0, 0xac, 0x3d, 0xa7, 0x3b, 0xcd, 0x1c, -0xe2, 0x88, 0x79, 0x37, 0x11, 0x5f, 0x39, 0x89, 0x95, 0x0a, 0x16, 0x84, 0x7a, 0xf6, 0x8a, -0xa4, 0x28, 0xe4, 0xed, 0x83, 0x80, 0x3b, 0xb1, 0x23, 0xa5, 0x03, 0x10, 0xf4, 0x66, 0xea, -0xbb, 0x0c, 0x0f, 0xc5, 0xec, 0x6c, 0x69, 0xc5, 0xd3, 0x24, 0xab, 0xd4, 0x2a, 0xb7, 0x99, -0x88, 0x76, 0x08, 0xa0, 0xa8, 0x95, 0x7c, 0xd8, 0x38, 0x6d, 0xcd, 0x59, 0x02, 0x51, 0x4b, -0xf1, 0xb5, 0x2b, 0x50, 0xe3, 0xb6, 0xbd, 0xd0, 0x72, 0xcf, 0x9e, 0xfd, 0x6e, 0xbb, 0x44, -0xc8, 0x24, 0x8a, 0x77, 0x18, 0x8a, 0x13, 0x06, 0xef, 0x97, 0x7d, 0xfa, 0x81, 0xf0, 0x31, -0xe6, 0xfa, 0x77, 0xed, 0x31, 0x06, 0x31, 0x5b, 0x54, 0x8a, 0x9f, 0x30, 0x68, 0xdb, 0xe2, -0x40, 0xf8, 0x4e, 0x73, 0xfa, 0xab, 0x74, 0x8b, 0x10, 0x58, 0x13, 0xdc, 0xd2, 0xe6, 0x78, -0xd1, 0x32, 0x2e, 0x8a, 0x9f, 0x2c, 0x58, 0x06, 0x48, 0x27, 0xc5, 0xa9, 0x5e, 0x81, 0x47, -0x89, 0x46, 0x21, 0x91, 0x03, 0x70, 0xa4, 0x3e, 0x88, 0x9c, 0xda, 0x33, 0x0a, 0xce, 0xbc, -0x8b, 0x8e, 0xcf, 0x9f, 0xd3, 0x71, 0x80, 0x43, 0xcf, 0x6b, 0xa9, 0x51, 0x83, 0x76, 0x30, -0x82, 0xc5, 0x6a, 0x85, 0x39, 0x11, 0x50, 0x1a, 0x82, 0xdc, 0x1e, 0x1c, 0xd5, 0x7d, 0xa9, -0x71, 0x99, 0x33, 0x47, 0x19, 0x97, 0xb3, 0x5a, 0xb1, 0xdf, 0xed, 0xa4, 0xf2, 0xe6, 0x26, -0x84, 0xa2, 0x28, 0x9a, 0x9e, 0xdf, 0xa6, 0x6a, 0xf4, 0xd6, 0xfc, 0x2e, 0x5b, 0x9d, 0x1a, -0x2a, 0x27, 0x68, 0xfb, 0xc1, 0x83, 0x21, 0x4b, 0x90, 0xe0, 0x36, 0xdd, 0x5b, 0x31, 0x42, -0x55, 0xa0, 0x13, 0xf7, 0xd0, 0x89, 0x53, 0x71, 0x99, 0x57, 0x09, 0x29, 0xc5, 0xf3, 0x21, -0xf8, 0x37, 0x2f, 0x40, 0xf3, 0xd4, 0xaf, 0x16, 0x08, 0x36, 0x02, 0xfc, 0x77, 0xc5, 0x8b, -0x04, 0x90, 0x56, 0xb9, 0xc9, 0x67, 0x9a, 0x99, 0xe8, 0x00, 0xd3, 0x86, 0xff, 0x97, 0x2d, -0x08, 0xe9, 0xb7, 0xb3, 0x91, 0xbc, 0xdf, 0x45, 0xc6, 0xed, 0x0f, 0x8c, 0x4c, 0x1e, 0xe6, -0x5b, 0x6e, 0x38, 0x30, 0xe4, 0xaa, 0xe3, 0x95, 0xde, 0xb9, 0xe4, 0x9a, 0xf5, 0xb2, 0x55, -0x9a, 0x87, 0x9b, 0xf6, 0x6a, 0xb2, 0xf2, 0x77, 0x9a, 0x31, 0xf4, 0x7a, 0x31, 0xd1, 0x1d, -0x04, 0xc0, 0x7c, 0x32, 0xa2, 0x9e, 0x9a, 0xf5, 0x62, 0xf8, 0x27, 0x8d, 0xbf, 0x51, 0xff, -0xd3, 0xdf, 0x64, 0x37, 0x3f, 0x2a, 0x6f, 0x76, 0x3a, 0x7d, 0x77, 0x06, 0x9e, 0x77, 0x7f, -0x5e, 0xeb, 0x32, 0x51, 0xf9, 0x16, 0x66, 0x9a, 0x09, 0xf3, 0xb0, 0x08, 0xa4, 0x70, 0x96, -0x46, 0x30, 0xff, 0xda, 0x4f, 0xe9, 0x1b, 0xed, 0x8d, 0xf8, 0x74, 0x1f, 0x31, 0x92, 0xb3, -0x73, 0x17, 0x36, 0xdb, 0x91, 0x30, 0xd6, 0x88, 0x55, 0x6b, 0x34, 0x77, 0x87, 0x7a, 0xe7, -0xee, 0x06, 0xc6, 0x1c, 0x8c, 0x19, 0x0c, 0x48, 0x46, 0x23, 0x5e, 0x9c, 0x07, 0x5c, 0xbf, -0xb4, 0x7e, 0xd6, 0x4f, 0x74, 0x9c, 0xe2, 0xc5, 0x50, 0x8b, 0xc5, 0x8b, 0x15, 0x90, 0x60, -0x62, 0x57, 0x29, 0xd0, 0x13, 0x43, 0xa1, 0x80, 0x88, 0x91, 0x00, 0x44, 0xc7, 0x4d, 0x19, -0x86, 0xcc, 0x2f, 0x2a, 0x75, 0x5a, 0xfc, 0xeb, 0x97, 0x2a, 0x70, 0xe3, 0x78, 0xd8, 0x91, -0xb0, 0x4f, 0x99, 0x07, 0xa3, 0x95, 0xea, 0x24, 0x21, 0xd5, 0xde, 0x51, 0x20, 0x93, 0x27, -0x0a, 0x30, 0x73, 0xa8, 0xff, 0x8a, 0x97, 0xe9, 0xa7, 0x6a, 0x8e, 0x0d, 0xe8, 0xf0, 0xdf, -0xec, 0xea, 0xb4, 0x6c, 0x1d, 0x39, 0x2a, 0x62, 0x2d, 0x3d, 0x5a, 0x8b, 0x65, 0xf8, 0x90, -0x05, 0x2e, 0x7e, 0x91, 0x2c, 0x78, 0xef, 0x8e, 0x7a, 0xc1, 0x2f, 0xac, 0x78, 0xee, 0xaf, -0x28, 0x45, 0x06, 0x4c, 0x26, 0xaf, 0x3b, 0xa2, 0xdb, 0xa3, 0x93, 0x06, 0xb5, 0x3c, 0xa5, -0xd8, 0xee, 0x8f, 0xaf, 0x25, 0xcc, 0x3f, 0x85, 0x68, 0x48, 0xa9, 0x62, 0xcc, 0x97, 0x8f, -0x7f, 0x2a, 0xea, 0xe0, 0x15, 0x0a, 0xad, 0x62, 0x07, 0xbd, 0x45, 0xf8, 0x41, 0xd8, 0x36, -0xcb, 0x4c, 0xdb, 0x6e, 0xe6, 0x3a, 0xe7, 0xda, 0x15, 0xe9, 0x29, 0x1e, 0x12, 0x10, 0xa0, -0x14, 0x2c, 0x0e, 0x3d, 0xf4, 0xbf, 0x39, 0x41, 0x92, 0x75, 0x0b, 0x25, 0x7b, 0xa3, 0xce, -0x39, 0x9c, 0x15, 0x64, 0xc8, 0xfa, 0x3d, 0xef, 0x73, 0x27, 0xfe, 0x26, 0x2e, 0xce, 0xda, -0x6e, 0xfd, 0x71, 0x8e, 0xdd, 0xfe, 0x76, 0xee, 0xdc, 0x12, 0x5c, 0x02, 0xc5, 0x3a, 0x4e, -0x4e, 0x4f, 0xbf, 0xca, 0x40, 0x15, 0xc7, 0x6e, 0x8d, 0x41, 0xf1, 0x10, 0xe0, 0x4f, 0x7e, -0x97, 0x7f, 0x1c, 0xae, 0x47, 0x8e, 0x6b, 0xb1, 0x25, 0x31, 0xb0, 0x73, 0xc7, 0x1b, 0x97, -0x79, 0xf9, 0x80, 0xd3, 0x66, 0x22, 0x30, 0x07, 0x74, 0x1e, 0xe4, 0xd0, 0x80, 0x21, 0xd6, -0xee, 0x6b, 0x6c, 0x4f, 0xbf, 0xf5, 0xb7, 0xd9, 0x09, 0x87, 0x2f, 0xa9, 0x14, 0xbe, 0x27, -0xd9, 0x72, 0x50, 0x01, 0xd4, 0x13, 0x73, 0xa6, 0xa7, 0x51, 0x02, 0x75, 0x25, 0xe1, 0xb3, -0x45, 0x34, 0x7d, 0xa8, 0x8e, 0xeb, 0xf3, 0x16, 0x49, 0xcb, 0x4f, 0x8c, 0xa1, 0xb9, 0x36, -0x85, 0x39, 0x75, 0x5d, 0x08, 0x00, 0xae, 0xeb, 0xf6, 0xea, 0xd7, 0x13, 0x3a, 0x21, 0x5a, -0x5f, 0x30, 0x84, 0x52, 0x26, 0x95, 0xc9, 0x14, 0xf2, 0x57, 0x55, 0x6b, 0xb1, 0x10, 0xc2, -0xe1, 0xbd, 0x3b, 0x51, 0xc0, 0xb7, 0x55, 0x4c, 0x71, 0x12, 0x26, 0xc7, 0x0d, 0xf9, 0x51, -0xa4, 0x38, 0x02, 0x05, 0x7f, 0xb8, 0xf1, 0x72, 0x4b, 0xbf, 0x71, 0x89, 0x14, 0xf3, 0x77, -0x38, 0xd9, 0x71, 0x24, 0xf3, 0x00, 0x11, 0xa1, 0xd8, 0xd4, 0x69, 0x27, 0x08, 0x37, 0x35, -0xc9, 0x11, 0x9d, 0x90, 0x1c, 0x0e, 0xe7, 0x1c, 0xff, 0x2d, 0x1e, 0xe8, 0x92, 0xe1, 0x18, -0x10, 0x95, 0x7c, 0xe0, 0x80, 0xf4, 0x96, 0x43, 0x21, 0xf9, 0x75, 0x21, 0x64, 0x38, 0xdd, -0x9f, 0x1e, 0x95, 0x16, 0xda, 0x56, 0x1d, 0x4f, 0x9a, 0x53, 0xb2, 0xe2, 0xe4, 0x18, 0xcb, -0x6b, 0x1a, 0x65, 0xeb, 0x56, 0xc6, 0x3b, 0xe5, 0xfe, 0xd8, 0x26, 0x3f, 0x3a, 0x84, 0x59, -0x72, 0x66, 0xa2, 0xf3, 0x75, 0xff, 0xfb, 0x60, 0xb3, 0x22, 0xad, 0x3f, 0x2d, 0x6b, 0xf9, -0xeb, 0xea, 0x05, 0x7c, 0xd8, 0x8f, 0x6d, 0x2c, 0x98, 0x9e, 0x2b, 0x93, 0xf1, 0x5e, 0x46, -0xf0, 0x87, 0x49, 0x29, 0x73, 0x68, 0xd7, 0x7f, 0xf9, 0xf0, 0xe5, 0x7d, 0xdb, 0x1d, 0x75, -0x19, 0xf3, 0xc4, 0x58, 0x9b, 0x17, 0x88, 0xa8, 0x92, 0xe0, 0xbe, 0xbd, 0x8b, 0x1d, 0x8d, -0x9f, 0x56, 0x76, 0xad, 0xaf, 0x29, 0xe2, 0xd9, 0xd5, 0x52, 0xf6, 0xb5, 0x56, 0x35, 0x57, -0x3a, 0xc8, 0xe1, 0x56, 0x43, 0x19, 0x94, 0xd3, 0x04, 0x9b, 0x6d, 0x35, 0xd8, 0x0b, 0x5f, -0x4d, 0x19, 0x8e, 0xec, 0xfa, 0x64, 0x91, 0x0a, 0x72, 0x20, 0x2b, 0xbc, 0x1a, 0x4a, 0xfe, -0x8b, 0xfd, 0xbb, 0xed, 0x1b, 0x23, 0xea, 0xad, 0x72, 0x82, 0xa1, 0x29, 0x99, 0x71, 0xbd, -0xf0, 0x95, 0xc1, 0x03, 0xdd, 0x7b, 0xc2, 0xb2, 0x3c, 0x28, 0x54, 0xd3, 0x68, 0xa4, 0x72, -0xc8, 0x66, 0x96, 0xe0, 0xd1, 0xd8, 0x7f, 0xf8, 0xd1, 0x26, 0x2b, 0xf7, 0xad, 0xba, 0x55, -0xca, 0x15, 0xb9, 0x32, 0xc3, 0xe5, 0x88, 0x97, 0x8e, 0x5c, 0xfb, 0x92, 0x25, 0x8b, 0xbf, -0xa2, 0x45, 0x55, 0x7a, 0xa7, 0x6f, 0x8b, 0x57, 0x5b, 0xcf, 0x0e, 0xcb, 0x1d, 0xfb, 0x20, -0x82, 0x77, 0xa8, 0x8c, 0xcc, 0x16, 0xce, 0x1d, 0xfa, 0xde, 0xcc, 0x0b, 0x62, 0xfe, 0xcc, -0xe1, 0xb7, 0xf0, 0xc3, 0x81, 0x64, 0x73, 0x40, 0xa0, 0xc2, 0x4d, 0x89, 0x11, 0x75, 0x33, -0x55, 0x33, 0x8d, 0xe8, 0x4a, 0xfd, 0xea, 0x6e, 0x30, 0x0b, 0xd7, 0x31, 0x2c, 0xde, 0x47, -0xe3, 0xbf, 0xf8, 0x55, 0x42, 0xe2, 0x7f, 0x59, 0xe5, 0x17, 0xef, 0x99, 0x34, 0x69, 0x91, -0xb1, 0x23, 0x8e, 0x20, 0x87, 0x2d, 0xa8, 0xfe, 0xd5, 0x8a, 0xf3, 0x84, 0x3a, 0xf0, 0x37, -0xe4, 0x09, 0x00, 0x54, 0xee, 0x67, 0x49, 0x93, 0xe4, 0x81, 0x70, 0xe3, 0x90, 0x4d, 0xef, -0xfe, 0x41, 0xb7, 0x99, 0x7b, 0xc1, 0x83, 0xba, 0x62, 0x12, 0x6f, 0x7d, 0xde, 0x6b, 0xaf, -0xda, 0x16, 0xf9, 0x55, 0x51, 0xee, 0xa6, 0x0c, 0x2b, 0x02, 0xa3, 0xfd, 0x8d, 0xfb, 0x30, -0x17, 0xe4, 0x6f, 0xdf, 0x36, 0x71, 0xc4, 0xca, 0x87, 0x25, 0x48, 0xb0, 0x47, 0xec, 0xea, -0xb4, 0xbf, 0xa5, 0x4d, 0x9b, 0x9f, 0x02, 0x93, 0xc4, 0xe3, 0xe4, 0xe8, 0x42, 0x2d, 0x68, -0x81, 0x15, 0x0a, 0xeb, 0x84, 0x5b, 0xd6, 0xa8, 0x74, 0xfb, 0x7d, 0x1d, 0xcb, 0x2c, 0xda, -0x46, 0x2a, 0x76, 0x62, 0xce, 0xbc, 0x5c, 0x9e, 0x8b, 0xe7, 0xcf, 0xbe, 0x78, 0xf5, 0x7c, -0xeb, 0xb3, 0x3a, 0x9c, 0xaa, 0x6f, 0xcc, 0x72, 0xd1, 0x59, 0xf2, 0x11, 0x23, 0xd6, 0x3f, -0x48, 0xd1, 0xb7, 0xce, 0xb0, 0xbf, 0xcb, 0xea, 0x80, 0xde, 0x57, 0xd4, 0x5e, 0x97, 0x2f, -0x75, 0xd1, 0x50, 0x8e, 0x80, 0x2c, 0x66, 0x79, 0xbf, 0x72, 0x4b, 0xbd, 0x8a, 0x81, 0x6c, -0xd3, 0xe1, 0x01, 0xdc, 0xd2, 0x15, 0x26, 0xc5, 0x36, 0xda, 0x2c, 0x1a, 0xc0, 0x27, 0x94, -0xed, 0xb7, 0x9b, 0x85, 0x0b, 0x5e, 0x80, 0x97, 0xc5, 0xec, 0x4f, 0xec, 0x88, 0x5d, 0x50, -0x07, 0x35, 0x47, 0xdc, 0x0b, 0x3b, 0x3d, 0xdd, 0x60, 0xaf, 0xa8, 0x5d, 0x81, 0x38, 0x24, -0x25, 0x5d, 0x5c, 0x15, 0xd1, 0xde, 0xb3, 0xab, 0xec, 0x05, 0x69, 0xef, 0x83, 0xed, 0x57, -0x54, 0xb8, 0x64, 0x64, 0x11, 0x16, 0x32, 0x69, 0xda, 0x9f, 0x2d, 0x7f, 0x36, 0xbb, 0x44, -0x5a, 0x34, 0xe8, 0x7f, 0xbf, 0x03, 0xeb, 0x00, 0x7f, 0x59, 0x68, 0x22, 0x79, 0xcf, 0x73, -0x6c, 0x2c, 0x29, 0xa7, 0xa1, 0x5f, 0x38, 0xa1, 0x1d, 0xf0, 0x20, 0x53, 0xe0, 0x1a, 0x63, -0x14, 0x58, 0x71, 0x10, 0xaa, 0x08, 0x0c, 0x3e, 0x16, 0x1a, 0x60, 0x22, 0x82, 0x7f, 0xba, -0xa4, 0x43, 0xa0, 0xd0, 0xac, 0x1b, 0xd5, 0x6b, 0x64, 0xb5, 0x14, 0x93, 0x31, 0x9e, 0x53, -0x50, 0xd0, 0x57, 0x66, 0xee, 0x5a, 0x4f, 0xfb, 0x03, 0x2a, 0x69, 0x58, 0x76, 0xf1, 0x83, -0xf7, 0x4e, 0xba, 0x8c, 0x42, 0x06, 0x60, 0x5d, 0x6d, 0xce, 0x60, 0x88, 0xae, 0xa4, 0xc3, -0xf1, 0x03, 0xa5, 0x4b, 0x98, 0xa1, 0xff, 0x67, 0xe1, 0xac, 0xa2, 0xb8, 0x62, 0xd7, 0x6f, -0xa0, 0x31, 0xb4, 0xd2, 0x77, 0xaf, 0x21, 0x10, 0x06, 0xc6, 0x9a, 0xff, 0x1d, 0x09, 0x17, -0x0e, 0x5f, 0xf1, 0xaa, 0x54, 0x34, 0x4b, 0x45, 0x8a, 0x87, 0x63, 0xa6, 0xdc, 0xf9, 0x24, -0x30, 0x67, 0xc6, 0xb2, 0xd6, 0x61, 0x33, 0x69, 0xee, 0x50, 0x61, 0x57, 0x28, 0xe7, 0x7e, -0xee, 0xec, 0x3a, 0x5a, 0x73, 0x4e, 0xa8, 0x8d, 0xe4, 0x18, 0xea, 0xec, 0x41, 0x64, 0xc8, -0xe2, 0xe8, 0x66, 0xb6, 0x2d, 0xb6, 0xfb, 0x6a, 0x6c, 0x16, 0xb3, 0xdd, 0x46, 0x43, 0xb9, -0x73, 0x00, 0x6a, 0x71, 0xed, 0x4e, 0x9d, 0x25, 0x1a, 0xc3, 0x3c, 0x4a, 0x95, 0x15, 0x99, -0x35, 0x81, 0x14, 0x02, 0xd6, 0x98, 0x9b, 0xec, 0xd8, 0x23, 0x3b, 0x84, 0x29, 0xaf, 0x0c, -0x99, 0x83, 0xa6, 0x9a, 0x34, 0x4f, 0xfa, 0xe8, 0xd0, 0x3c, 0x4b, 0xd0, 0xfb, 0xb6, 0x68, -0xb8, 0x9e, 0x8f, 0xcd, 0xf7, 0x60, 0x2d, 0x7a, 0x22, 0xe5, 0x7d, 0xab, 0x65, 0x1b, 0x95, -0xa7, 0xa8, 0x7f, 0xb6, 0x77, 0x47, 0x7b, 0x5f, 0x8b, 0x12, 0x72, 0xd0, 0xd4, 0x91, 0xef, -0xde, 0x19, 0x50, 0x3c, 0xa7, 0x8b, 0xc4, 0xa9, 0xb3, 0x23, 0xcb, 0x76, 0xe6, 0x81, 0xf0, -0xc1, 0x04, 0x8f, 0xa3, 0xb8, 0x54, 0x5b, 0x97, 0xac, 0x19, 0xff, 0x3f, 0x55, 0x27, 0x2f, -0xe0, 0x1d, 0x42, 0x9b, 0x57, 0xfc, 0x4b, 0x4e, 0x0f, 0xce, 0x98, 0xa9, 0x43, 0x57, 0x03, -0xbd, 0xe7, 0xc8, 0x94, 0xdf, 0x6e, 0x36, 0x73, 0x32, 0xb4, 0xef, 0x2e, 0x85, 0x7a, 0x6e, -0xfc, 0x6c, 0x18, 0x82, 0x75, 0x35, 0x90, 0x07, 0xf3, 0xe4, 0x9f, 0x3e, 0xdc, 0x68, 0xf3, -0xb5, 0xf3, 0x19, 0x80, 0x92, 0x06, 0x99, 0xa2, 0xe8, 0x6f, 0xff, 0x2e, 0x7f, 0xae, 0x42, -0xa4, 0x5f, 0xfb, 0xd4, 0x0e, 0x81, 0x2b, 0xc3, 0x04, 0xff, 0x2b, 0xb3, 0x74, 0x4e, 0x36, -0x5b, 0x9c, 0x15, 0x00, 0xc6, 0x47, 0x2b, 0xe8, 0x8b, 0x3d, 0xf1, 0x9c, 0x03, 0x9a, 0x58, -0x7f, 0x9b, 0x9c, 0xbf, 0x85, 0x49, 0x79, 0x35, 0x2e, 0x56, 0x7b, 0x41, 0x14, 0x39, 0x47, -0x83, 0x26, 0xaa, 0x07, 0x89, 0x98, 0x11, 0x1b, 0x86, 0xe7, 0x73, 0x7a, 0xd8, 0x7d, 0x78, -0x61, 0x53, 0xe9, 0x79, 0xf5, 0x36, 0x8d, 0x44, 0x92, 0x84, 0xf9, 0x13, 0x50, 0x58, 0x3b, -0xa4, 0x6a, 0x36, 0x65, 0x49, 0x8e, 0x3c, 0x0e, 0xf1, 0x6f, 0xd2, 0x84, 0xc4, 0x7e, 0x8e, -0x3f, 0x39, 0xae, 0x7c, 0x84, 0xf1, 0x63, 0x37, 0x8e, 0x3c, 0xcc, 0x3e, 0x44, 0x81, 0x45, -0xf1, 0x4b, 0xb9, 0xed, 0x6b, 0x36, 0x5d, 0xbb, 0x20, 0x60, 0x1a, 0x0f, 0xa3, 0xaa, 0x55, -0x77, 0x3a, 0xa9, 0xae, 0x37, 0x4d, 0xba, 0xb8, 0x86, 0x6b, 0xbc, 0x08, 0x50, 0xf6, 0xcc, -0xa4, 0xbd, 0x1d, 0x40, 0x72, 0xa5, 0x86, 0xfa, 0xe2, 0x10, 0xae, 0x3d, 0x58, 0x4b, 0x97, -0xf3, 0x43, 0x74, 0xa9, 0x9e, 0xeb, 0x21, 0xb7, 0x01, 0xa4, 0x86, 0x93, 0x97, 0xee, 0x2f, -0x4f, 0x3b, 0x86, 0xa1, 0x41, 0x6f, 0x41, 0x26, 0x90, 0x78, 0x5c, 0x7f, 0x30, 0x38, 0x4b, -0x3f, 0xaa, 0xec, 0xed, 0x5c, 0x6f, 0x0e, 0xad, 0x43, 0x87, 0xfd, 0x93, 0x35, 0xe6, 0x01, -0xef, 0x41, 0x26, 0x90, 0x99, 0x9e, 0xfb, 0x19, 0x5b, 0xad, 0xd2, 0x91, 0x8a, 0xe0, 0x46, -0xaf, 0x65, 0xfa, 0x4f, 0x84, 0xc1, 0xa1, 0x2d, 0xcf, 0x45, 0x8b, 0xd3, 0x85, 0x50, 0x55, -0x7c, 0xf9, 0x67, 0x88, 0xd4, 0x4e, 0xe9, 0xd7, 0x6b, 0x61, 0x54, 0xa1, 0xa4, 0xa6, 0xa2, -0xc2, 0xbf, 0x30, 0x9c, 0x40, 0x9f, 0x5f, 0xd7, 0x69, 0x2b, 0x24, 0x82, 0x5e, 0xd9, 0xd6, -0xa7, 0x12, 0x54, 0x1a, 0xf7, 0x55, 0x9f, 0x76, 0x50, 0xa9, 0x95, 0x84, 0xe6, 0x6b, 0x6d, -0xb5, 0x96, 0x54, 0xd6, 0xcd, 0xb3, 0xa1, 0x9b, 0x46, 0xa7, 0x94, 0x4d, 0xc4, 0x94, 0xb4, -0x98, 0xe3, 0xe1, 0xe2, 0x34, 0xd5, 0x33, 0x16, 0x07, 0x54, 0xcd, 0xb7, 0x77, 0x53, 0xdb, -0x4f, 0x4d, 0x46, 0x9d, 0xe9, 0xd4, 0x9c, 0x8a, 0x36, 0xb6, 0xb8, 0x38, 0x26, 0x6c, 0x0e, -0xff, 0x9c, 0x1b, 0x43, 0x8b, 0x80, 0xcc, 0xb9, 0x3d, 0xda, 0xc7, 0xf1, 0x8a, 0xf2, 0x6d, -0xb8, 0xd7, 0x74, 0x2f, 0x7e, 0x1e, 0xb7, 0xd3, 0x4a, 0xb4, 0xac, 0xfc, 0x79, 0x48, 0x6c, -0xbc, 0x96, 0xb6, 0x94, 0x46, 0x57, 0x2d, 0xb0, 0xa3, 0xfc, 0x1e, 0xb9, 0x52, 0x60, 0x85, -0x2d, 0x41, 0xd0, 0x43, 0x01, 0x1e, 0x1c, 0xd5, 0x7d, 0xfc, 0xf3, 0x96, 0x0d, 0xc7, 0xcb, -0x2a, 0x29, 0x9a, 0x93, 0xdd, 0x88, 0x2d, 0x37, 0x5d, 0xaa, 0xfb, 0x49, 0x68, 0xa0, 0x9c, -0x50, 0x86, 0x7f, 0x68, 0x56, 0x57, 0xf9, 0x79, 0x18, 0x39, 0xd4, 0xe0, 0x01, 0x84, 0x33, -0x61, 0xca, 0xa5, 0xd2, 0xd6, 0xe4, 0xc9, 0x8a, 0x4a, 0x23, 0x44, 0x4e, 0xbc, 0xf0, 0xdc, -0x24, 0xa1, 0xa0, 0xc4, 0xe2, 0x07, 0x3c, 0x10, 0xc4, 0xb5, 0x25, 0x4b, 0x65, 0x63, 0xf4, -0x80, 0xe7, 0xcf, 0x61, 0xb1, 0x71, 0x82, 0x21, 0x87, 0x2c, 0xf5, 0x91, 0x00, 0x32, 0x0c, -0xec, 0xa9, 0xb5, 0x9a, 0x74, 0x85, 0xe3, 0x36, 0x8f, 0x76, 0x4f, 0x9c, 0x6d, 0xce, 0xbc, -0xad, 0x0a, 0x4b, 0xed, 0x76, 0x04, 0xcb, 0xc3, 0xb9, 0x33, 0x9e, 0x01, 0x93, 0x96, 0x69, -0x7d, 0xc5, 0xa2, 0x45, 0x79, 0x9b, 0x04, 0x5c, 0x84, 0x09, 0xed, 0x88, 0x43, 0xc7, 0xab, -0x93, 0x14, 0x26, 0xa1, 0x40, 0xb5, 0xce, 0x4e, 0xbf, 0x2a, 0x42, 0x85, 0x3e, 0x2c, 0x3b, -0x54, 0xe8, 0x12, 0x1f, 0x0e, 0x97, 0x59, 0xb2, 0x27, 0x89, 0xfa, 0xf2, 0xdf, 0x8e, 0x68, -0x59, 0xdc, 0x06, 0xbc, 0xb6, 0x85, 0x0d, 0x06, 0x22, 0xec, 0xb1, 0xcb, 0xe5, 0x04, 0xe6, -0x3d, 0xb3, 0xb0, 0x41, 0x73, 0x08, 0x3f, 0x3c, 0x58, 0x86, 0x63, 0xeb, 0x50, 0xee, 0x1d, -0x2c, 0x37, 0x74, 0xa9, 0xd3, 0x18, 0xa3, 0x47, 0x6e, 0x93, 0x54, 0xad, 0x0a, 0x5d, 0xb8, -0x2a, 0x55, 0x5d, 0x78, 0xf6, 0xee, 0xbe, 0x8e, 0x3c, 0x76, 0x69, 0xb9, 0x40, 0xc2, 0x34, -0xec, 0x2a, 0xb9, 0xed, 0x7e, 0x20, 0xe4, 0x8d, 0x00, 0x38, 0xc7, 0xe6, 0x8f, 0x44, 0xa8, -0x86, 0xce, 0xeb, 0x2a, 0xe9, 0x90, 0xf1, 0x4c, 0xdf, 0x32, 0xfb, 0x73, 0x1b, 0x6d, 0x92, -0x1e, 0x95, 0xfe, 0xb4, 0xdb, 0x65, 0xdf, 0x4d, 0x23, 0x54, 0x89, 0x48, 0xbf, 0x4a, 0x2e, -0x70, 0xd6, 0xd7, 0x62, 0xb4, 0x33, 0x29, 0xb1, 0x3a, 0x33, 0x4c, 0x23, 0x6d, 0xa6, 0x76, -0xa5, 0x21, 0x63, 0x48, 0xe6, 0x90, 0x5d, 0xed, 0x90, 0x95, 0x0b, 0x7a, 0x84, 0xbe, 0xb8, -0x0d, 0x5e, 0x63, 0x0c, 0x62, 0x26, 0x4c, 0x14, 0x5a, 0xb3, 0xac, 0x23, 0xa4, 0x74, 0xa7, -0x6f, 0x33, 0x30, 0x05, 0x60, 0x01, 0x42, 0xa0, 0x28, 0xb7, 0xee, 0x19, 0x38, 0xf1, 0x64, -0x80, 0x82, 0x43, 0xe1, 0x41, 0x27, 0x1f, 0x1f, 0x90, 0x54, 0x7a, 0xd5, 0x23, 0x2e, 0xd1, -0x3d, 0xcb, 0x28, 0xba, 0x58, 0x7f, 0xdc, 0x7c, 0x91, 0x24, 0xe9, 0x28, 0x51, 0x83, 0x6e, -0xc5, 0x56, 0x21, 0x42, 0xed, 0xa0, 0x56, 0x22, 0xa1, 0x40, 0x80, 0x6b, 0xa8, 0xf7, 0x94, -0xca, 0x13, 0x6b, 0x0c, 0x39, 0xd9, 0xfd, 0xe9, 0xf3, 0x6f, 0xa6, 0x9e, 0xfc, 0x70, 0x8a, -0xb3, 0xbc, 0x59, 0x3c, 0x1e, 0x1d, 0x6c, 0xf9, 0x7c, 0xaf, 0xf9, 0x88, 0x71, 0x95, 0xeb, -0x57, 0x00, 0xbd, 0x9f, 0x8c, 0x4f, 0xe1, 0x24, 0x83, 0xc5, 0x22, 0xea, 0xfd, 0xd3, 0x0c, -0xe2, 0x17, 0x18, 0x7c, 0x6a, 0x4c, 0xde, 0x77, 0xb4, 0x53, 0x9b, 0x4c, 0x81, 0xcd, 0x23, -0x60, 0xaa, 0x0e, 0x25, 0x73, 0x9c, 0x02, 0x79, 0x32, 0x30, 0xdf, 0x74, 0xdf, 0x75, 0x19, -0xf4, 0xa5, 0x14, 0x5c, 0xf7, 0x7a, 0xa8, 0xa5, 0x91, 0x84, 0x7c, 0x60, 0x03, 0x06, 0x3b, -0xcd, 0x50, 0xb6, 0x27, 0x9c, 0xfe, 0xb1, 0xdd, 0xcc, 0xd3, 0xb0, 0x59, 0x24, 0xb2, 0xca, -0xe2, 0x1c, 0x81, 0x22, 0x9d, 0x07, 0x8f, 0x8e, 0xb9, 0xbe, 0x4e, 0xfa, 0xfc, 0x39, 0x65, -0xba, 0xbf, 0x9d, 0x12, 0x37, 0x5e, 0x97, 0x7e, 0xf3, 0x89, 0xf5, 0x5d, 0xf5, 0xe3, 0x09, -0x8c, 0x62, 0xb5, 0x20, 0x9d, 0x0c, 0x53, 0x8a, 0x68, 0x1b, 0xd2, 0x8f, 0x75, 0x17, 0x5d, -0xd4, 0xe5, 0xda, 0x75, 0x62, 0x19, 0x14, 0x6a, 0x26, 0x2d, 0xeb, 0xf8, 0xaf, 0x37, 0xf0, -0x6c, 0xa4, 0x55, 0xb1, 0xbc, 0xe2, 0x33, 0xc0, 0x9a, 0xca, 0xb0, 0x11, 0x49, 0x4f, 0x68, -0x9b, 0x3b, 0x6b, 0x3c, 0xcc, 0x13, 0xf6, 0xc7, 0x85, 0x61, 0x68, 0x42, 0xae, 0xbb, 0xdd, -0xcd, 0x45, 0x16, 0x29, 0x1d, 0xea, 0xdb, 0xc8, 0x03, 0x94, 0x3c, 0xee, 0x4f, 0x82, 0x11, -0xc3, 0xec, 0x28, 0xbd, 0x97, 0x05, 0x99, 0xde, 0xd7, 0xbb, 0x5e, 0x22, 0x1f, 0xd4, 0xeb, -0x64, 0xd9, 0x92, 0xd9, 0x85, 0xb7, 0x6a, 0x05, 0x6a, 0xe4, 0x24, 0x41, 0xf1, 0xcd, 0xf0, -0xd8, 0x3f, 0xf8, 0x9e, 0x0e, 0xcd, 0x0b, 0x7a, 0x70, 0x6b, 0x5a, 0x75, 0x0a, 0x6a, 0x33, -0x88, 0xec, 0x17, 0x75, 0x08, 0x70, 0x10, 0x2f, 0x24, 0xcf, 0xc4, 0xe9, 0x42, 0x00, 0x61, -0x94, 0xca, 0x1f, 0x3a, 0x76, 0x06, 0xfa, 0xd2, 0x48, 0x81, 0xf0, 0x77, 0x60, 0x03, 0x45, -0xd9, 0x61, 0xf4, 0xa4, 0x6f, 0x3d, 0xd9, 0x30, 0xc3, 0x04, 0x6b, 0x54, 0x2a, 0xb7, 0xec, -0x3b, 0xf4, 0x4b, 0xf5, 0x68, 0x52, 0x26, 0xce, 0xff, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xa5, -0xa9, 0xb1, 0xe0, 0x23, 0xc4, 0x0a, 0x77, 0x4d, 0xf9, 0x51, 0x20, 0xa3, 0xa5, 0xa9, 0xb1, -0xc1, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xc4, 0xeb, 0x54, 0x0b, -0x75, 0x68, 0x52, 0x07, 0x8c, 0x9a, 0x97, 0x8d, 0x79, 0x70, 0x62, 0x46, 0xef, 0x5c, 0x1b, -0x95, 0x89, 0x71, 0x41, 0xe1, 0x21, 0xa1, 0xa1, 0xa1, 0xc0, 0x02, 0x67, 0x4c, 0x1a, 0xb6, -0xcf, 0xfd, 0x78, 0x53, 0x24, 0xab, 0xb5, 0xc9, 0xf1, 0x60, 0x23, 0xa5, 0xc8, 0x12, 0x87, -0x6d, 0x58, 0x13, 0x85, 0x88, 0x92, 0x87, 0x6d, 0x58, 0x32, 0xc7, 0x0c, 0x9a, 0x97, 0xac, -0xda, 0x36, 0xee, 0x5e, 0x3e, 0xdf, 0x1d, 0xb8, 0xf2, 0x66, 0x2f, 0xbd, 0xf8, 0x72, 0x47, -0xed, 0x58, 0x13, 0x85, 0x88, 0x92, 0x87, 0x8c, 0x7b, 0x55, 0x09, 0x90, 0xa2, 0xc6, 0xef, -0x3d, 0xf8, 0x53, 0x24, 0xab, 0xd4, 0x2a, 0xb7, 0xec, 0x5a, 0x36, 0xee, 0x5e, 0x3e, 0xdf, -0x3c, 0xfa, 0x76, 0x4f, 0xfd, 0x59, 0x30, 0xe2, 0x46, 0xef, 0x3d, 0xf8, 0x53, 0x05, 0x69, -0x31, 0xc1, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, 0x19, 0xb0, 0xe2, 0x27, 0xcc, 0xfb, 0x74, -0x4b, 0x14, 0x8b, 0x94, 0x8b, 0x75, 0x68, 0x33, 0xc5, 0x08, 0x92, 0x87, 0x8c, 0x9a, 0xb6, -0xcf, 0x1c, 0xba, 0xd7, 0x0d, 0x98, 0xb2, 0xe6, 0x2f, 0xdc, 0x1b, 0x95, 0x89, 0x71, 0x60, -0x23, 0xc4, 0x0a, 0x96, 0x8f, 0x9c, 0xba, 0xf6, 0x6e, 0x3f, 0xfc, 0x5b, 0x15, 0xa8, 0xd2, -0x26, 0xaf, 0xbd, 0xf8, 0x72, 0x66, 0x2f, 0xdc, 0x1b, 0xb4, 0xcb, 0x14, 0x8b, 0x94, 0xaa, -0xb7, 0xcd, 0xf9, 0x51, 0x01, 0x80, 0x82, 0x86, 0x6f, 0x3d, 0xd9, 0x30, 0xe2, 0x27, 0xcc, -0xfb, 0x74, 0x4b, 0x14, 0xaa, 0xb7, 0xcd, 0xf9, 0x70, 0x43, 0x04, 0x6b, 0x35, 0xc9, 0xf1, -0x60, 0x23, 0xa5, 0xc8, 0xf3, 0x45, 0x08, 0x92, 0x87, 0x6d, 0x58, 0x32, 0xe6, 0x2f, 0xbd, -0xf8, 0x72, 0x66, 0x4e, 0x1e, 0xbe, 0xfe, 0x7e, 0x7e, 0x7e, 0x5f, 0x1d, 0x99, 0x91, 0xa0, -0xa3, 0xc4, 0x0a, 0x77, 0x4d, 0x18, 0x93, 0xa4, 0xab, 0xd4, 0x0b, 0x75, 0x49, 0x10, 0xa2, -0xc6, 0xef, 0x3d, 0xf8, 0x53, 0x24, 0xab, 0xb5, 0xe8, 0x33, 0xe4, 0x4a, 0x16, 0xae, 0xde, -0x1f, 0xbc, 0xdb, 0x15, 0xa8, 0xb3, 0xc5, 0x08, 0x73, 0x45, 0xe9, 0x31, 0xc1, 0xe1, 0x21, -0xa1, 0xa1, 0xa1, 0xc0, 0x02, 0x86, 0x6f, 0x5c, 0x3a, 0xd7, 0x0d, 0x98, 0x93, 0xa4, 0xca, -0x16, 0xae, 0xde, 0x1f, 0x9d, 0x99, 0xb0, 0xe2, 0x46, 0xef, 0x3d, 0xf8, 0x72, 0x47, 0x0c, -0x9a, 0xb6, 0xcf, 0xfd, 0x59, 0x11, 0xa0, 0xa3, 0xa5, 0xc8, 0xf3, 0x45, 0x08, 0x92, 0x87, -0x6d, 0x39, 0xf0, 0x43, 0x04, 0x8a, 0x96, 0xae, 0xde, 0x3e, 0xdf, 0x1d, 0x99, 0x91, 0xa0, -0xc2, 0x06, 0x6f, 0x3d, 0xf8, 0x72, 0x47, 0x0c, 0x9a, 0x97, 0x8d, 0x98, 0x93, 0x85, 0x88, -0x73, 0x45, 0xe9, 0x31, 0xe0, 0x23, 0xa5, 0xa9, 0xd0, 0x03, 0x84, 0x8a, 0x96, 0xae, 0xde, -0x1f, 0xbc, 0xdb, 0x15, 0xa8, 0xd2, 0x26, 0xce, 0xff, 0x5d, 0x19, 0x91, 0x81, 0x80, 0x82, -0x67, 0x2d, 0xd8, 0x13, 0xa4, 0xab, 0xd4, 0x0b, 0x94, 0xaa, 0xb7, 0xcd, 0xf9, 0x51, 0x20, -0xa3, 0xa5, 0xc8, 0xf3, 0x45, 0xe9, 0x50, 0x22, 0xc6, 0xef, 0x5c, 0x3a, 0xd7, 0x0d, 0x98, -0x93, 0x85, 0x88, 0x73, 0x64, 0x4a, 0xf7, 0x4d, 0xf9, 0x51, 0x20, 0xa3, 0xc4, 0x0a, 0x96, -0xae, 0xde, 0x3e, 0xfe, 0x7e, 0x7e, 0x7e, 0x5f, 0x3c, 0xfa, 0x76, 0x4f, 0xfd, 0x78, 0x72, -0x66, 0x2f, 0xbd, 0xd9, 0x30, 0xc3, 0xe5, 0x48, 0x12, 0x87, 0x8c, 0x7b, 0x55, 0x28, 0xd2, -0x07, 0x8c, 0x9a, 0x97, 0xac, 0xda, 0x17, 0x8d, 0x79, 0x51, 0x20, 0xa3, 0xc4, 0xeb, 0x54, -0x0b, 0x94, 0x8b, 0x94, 0xaa, 0xd6, 0x2e, 0xbf, 0xfc, 0x5b, 0x15, 0xa8, 0xd2, 0x26, 0xaf, -0xdc, 0x1b, 0xb4, 0xea, 0x37, 0xec, 0x3b, 0xf4, 0x6a, 0x37, 0xcd, 0x18, 0x93, 0x85, 0x69, -0x31, 0xc1, 0xe1, 0x40, 0xe3, 0x25, 0xc8, 0x12, 0x87, 0x8c, 0x9a, 0xb6, 0xcf, 0xfd, 0x59, -0x11, 0xa0, 0xc2, 0x06, 0x8e, 0x7f, 0x5d, 0x38, 0xf2, 0x47, 0x0c, 0x7b, 0x74, 0x6a, 0x37, -0xec, 0x5a, 0x36, 0xee, 0x3f, 0xfc, 0x7a, 0x76, 0x4f, 0x1c, 0x9b, 0x95, 0x89, 0x71, 0x41, -0x00, 0x63, 0x44, 0xeb, 0x54, 0x2a, 0xd6, 0x0f, 0x9c, 0xba, 0xd7, 0x0d, 0x98, 0x93, 0x85, -0x69, 0x31, 0xc1, 0x00, 0x82, 0x86, 0x8e, 0x9e, 0xbe, 0xdf, 0x3c, 0xfa, 0x57, 0x2c, 0xda, -0x36, 0xee, 0x3f, 0xfc, 0x5b, 0x15, 0x89, 0x71, 0x41, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, -0x38, 0xf2, 0x47, 0xed, 0x58, 0x13, 0xa4, 0xca, 0xf7, 0x4d, 0xf9, 0x51, 0x01, 0x80, 0x63, -0x44, 0xeb, 0x54, 0x2a, 0xd6, 0x2e, 0xbf, 0xdd, 0x19, 0x91, 0xa0, 0xa3, 0xa5, 0xa9, 0xb1, -0xe0, 0x42, 0x06, 0x8e, 0x7f, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xc4, 0x0a, 0x96, 0x8f, 0x7d, -0x78, 0x72, 0x47, 0x0c, 0x7b, 0x74, 0x6a, 0x56, 0x2e, 0xde, 0x1f, 0xbc, 0xfa, 0x57, 0x0d, -0x79, 0x51, 0x01, 0x61, 0x21, 0xa1, 0xc0, 0xe3, 0x25, 0xa9, 0xb1, 0xc1, 0xe1, 0x40, 0x02, -0x67, 0x4c, 0x1a, 0x97, 0x8d, 0x98, 0x93, 0xa4, 0xab, 0xd4, 0x2a, 0xd6, 0x0f, 0x9c, 0x9b, -0xb4, 0xcb, 0x14, 0xaa, 0xb7, 0xcd, 0xf9, 0x51, 0x20, 0xa3, 0xc4, 0xeb, 0x35, 0xc9, 0xf1, -0x60, 0x42, 0x06, 0x8e, 0x7f, 0x7c, 0x7a, 0x76, 0x6e, 0x3f, 0xfc, 0x7a, 0x76, 0x6e, 0x5e, -0x3e, 0xfe, 0x7e, 0x5f, 0x3c, 0xdb, 0x15, 0x89, 0x71, 0x41, 0xe1, 0x21, 0xc0, 0xe3, 0x44, -0xeb, 0x54, 0x2a, 0xb7, 0xcd, 0xf9, 0x70, 0x62, 0x27, 0xad, 0xd8, 0x32, 0xc7, 0x0c, 0x7b, -0x74, 0x4b, 0x14, 0xaa, 0xb7, 0xec, 0x3b, 0xd5, 0x28, 0xd2, 0x07, 0x6d, 0x39, 0xd1, 0x20, -0xc2, 0xe7, 0x4c, 0x1a, 0x97, 0x8d, 0x98, 0xb2, 0xc7, 0x0c, 0x59, 0x28, 0xf3, 0x9b }; - -// clang-format off diff --git a/keyboards/ploopyco/trackball/rules.mk b/keyboards/ploopyco/trackball/rules.mk index e1eb998fe0..4ac92ebf64 100644 --- a/keyboards/ploopyco/trackball/rules.mk +++ b/keyboards/ploopyco/trackball/rules.mk @@ -24,6 +24,6 @@ POINTING_DEVICE_ENABLE = yes MOUSEKEY_ENABLE = yes # Mouse keys QUANTUM_LIB_SRC += analog.c spi_master.c -SRC += pmw3360.c opt_encoder.c +SRC += drivers/sensors/pmw3360.c opt_encoder.c DEFAULT_FOLDER = ploopyco/trackball/rev1_005 diff --git a/keyboards/ploopyco/trackball/trackball.h b/keyboards/ploopyco/trackball/trackball.h index fd2bf465a5..70f5d83b11 100644 --- a/keyboards/ploopyco/trackball/trackball.h +++ b/keyboards/ploopyco/trackball/trackball.h @@ -20,7 +20,7 @@ #include "quantum.h" #include "spi_master.h" -#include "pmw3360.h" +#include "drivers/sensors/pmw3360.h" #include "analog.h" #include "opt_encoder.h" #include "pointing_device.h" diff --git a/keyboards/ploopyco/trackball_mini/rules.mk b/keyboards/ploopyco/trackball_mini/rules.mk index 58fad239f4..22c5e3c062 100644 --- a/keyboards/ploopyco/trackball_mini/rules.mk +++ b/keyboards/ploopyco/trackball_mini/rules.mk @@ -27,6 +27,6 @@ POINTING_DEVICE_ENABLE = yes MOUSEKEY_ENABLE = no # Mouse keys QUANTUM_LIB_SRC += analog.c -SRC += adns5050.c opt_encoder.c +SRC += drivers/sensors/adns5050.c opt_encoder.c DEFAULT_FOLDER = ploopyco/trackball_mini/rev1_001 diff --git a/keyboards/ploopyco/trackball_mini/trackball_mini.h b/keyboards/ploopyco/trackball_mini/trackball_mini.h index a12d12a0c8..7bcb02a940 100644 --- a/keyboards/ploopyco/trackball_mini/trackball_mini.h +++ b/keyboards/ploopyco/trackball_mini/trackball_mini.h @@ -20,7 +20,7 @@ #pragma once #include "quantum.h" -#include "adns5050.h" +#include "drivers/sensors/adns5050.h" #include "analog.h" #include "opt_encoder.h" #include "pointing_device.h" diff --git a/keyboards/ploopyco/trackball_nano/rules.mk b/keyboards/ploopyco/trackball_nano/rules.mk index 0286194b9f..f47c316153 100644 --- a/keyboards/ploopyco/trackball_nano/rules.mk +++ b/keyboards/ploopyco/trackball_nano/rules.mk @@ -27,6 +27,6 @@ POINTING_DEVICE_ENABLE = yes MOUSEKEY_ENABLE = no # Mouse keys QUANTUM_LIB_SRC += analog.c -SRC += adns5050.c opt_encoder.c +SRC += drivers/sensors/adns5050.c opt_encoder.c DEFAULT_FOLDER = ploopyco/trackball_nano/rev1_001 diff --git a/keyboards/ploopyco/trackball_nano/trackball_nano.h b/keyboards/ploopyco/trackball_nano/trackball_nano.h index 5692383b1e..6c8ecace7d 100644 --- a/keyboards/ploopyco/trackball_nano/trackball_nano.h +++ b/keyboards/ploopyco/trackball_nano/trackball_nano.h @@ -20,7 +20,7 @@ #pragma once #include "quantum.h" -#include "adns5050.h" +#include "drivers/sensors/adns5050.h" #include "analog.h" #include "opt_encoder.h" #include "pointing_device.h" diff --git a/keyboards/preonic/keymaps/AlexDaigre/keymap.c b/keyboards/preonic/keymaps/AlexDaigre/keymap.c index 3ea61a26ee..ef4707f64b 100644 --- a/keyboards/preonic/keymaps/AlexDaigre/keymap.c +++ b/keyboards/preonic/keymaps/AlexDaigre/keymap.c @@ -276,7 +276,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -292,6 +292,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index b70aa31c14..3a82f7151b 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c @@ -263,7 +263,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -279,6 +279,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/drasbeck/keymap.c b/keyboards/preonic/keymaps/drasbeck/keymap.c index 909e86a97d..ae4804ce3f 100644 --- a/keyboards/preonic/keymaps/drasbeck/keymap.c +++ b/keyboards/preonic/keymaps/drasbeck/keymap.c @@ -190,7 +190,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -206,6 +206,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/elisiano/keymap.c b/keyboards/preonic/keymaps/elisiano/keymap.c index 8d3898922f..d885d1f028 100644 --- a/keyboards/preonic/keymaps/elisiano/keymap.c +++ b/keyboards/preonic/keymaps/elisiano/keymap.c @@ -257,7 +257,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -273,6 +273,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/keelhauler/keymap.c b/keyboards/preonic/keymaps/keelhauler/keymap.c index c7e0766920..dc0cffe094 100644 --- a/keyboards/preonic/keymaps/keelhauler/keymap.c +++ b/keyboards/preonic/keymaps/keelhauler/keymap.c @@ -264,7 +264,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -280,6 +280,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/kjwon15/keymap.c b/keyboards/preonic/keymaps/kjwon15/keymap.c index 6f1d5f30af..2f25cdfa85 100644 --- a/keyboards/preonic/keymaps/kjwon15/keymap.c +++ b/keyboards/preonic/keymaps/kjwon15/keymap.c @@ -327,7 +327,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -343,6 +343,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/preonic/keymaps/laurentlaurent/keymap.c b/keyboards/preonic/keymaps/laurentlaurent/keymap.c index b1a73035b3..62943a420c 100644 --- a/keyboards/preonic/keymaps/laurentlaurent/keymap.c +++ b/keyboards/preonic/keymaps/laurentlaurent/keymap.c @@ -554,7 +554,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -570,6 +570,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/preonic/keymaps/mguterl/keymap.c b/keyboards/preonic/keymaps/mguterl/keymap.c index 4e8738be2d..87a9cd32b3 100644 --- a/keyboards/preonic/keymaps/mguterl/keymap.c +++ b/keyboards/preonic/keymaps/mguterl/keymap.c @@ -273,7 +273,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -289,6 +289,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/mverteuil/keymap.c b/keyboards/preonic/keymaps/mverteuil/keymap.c index 60677701c7..ef01851690 100644 --- a/keyboards/preonic/keymaps/mverteuil/keymap.c +++ b/keyboards/preonic/keymaps/mverteuil/keymap.c @@ -459,7 +459,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -475,6 +475,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c b/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c index 290ea16387..4b28058540 100644 --- a/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c +++ b/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c @@ -395,7 +395,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -411,4 +411,5 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/pezhore/keymap.c b/keyboards/preonic/keymaps/pezhore/keymap.c index 71d9306dc5..c41fb4500f 100644 --- a/keyboards/preonic/keymaps/pezhore/keymap.c +++ b/keyboards/preonic/keymaps/pezhore/keymap.c @@ -257,7 +257,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -273,6 +273,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/senseored/keymap.c b/keyboards/preonic/keymaps/senseored/keymap.c index c78528d8c3..cf354eed12 100644 --- a/keyboards/preonic/keymaps/senseored/keymap.c +++ b/keyboards/preonic/keymaps/senseored/keymap.c @@ -345,7 +345,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -361,6 +361,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/via/keymap.c b/keyboards/preonic/keymaps/via/keymap.c index 5df57fd3d2..fe62441049 100644 --- a/keyboards/preonic/keymaps/via/keymap.c +++ b/keyboards/preonic/keymaps/via/keymap.c @@ -147,7 +147,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -163,6 +163,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/rev1/rules.mk b/keyboards/preonic/rev1/rules.mk index dea2bbbca9..d6c61f2868 100644 --- a/keyboards/preonic/rev1/rules.mk +++ b/keyboards/preonic/rev1/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = yes # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/preonic/rev2/rules.mk b/keyboards/preonic/rev2/rules.mk index 1b72a622a2..677a0700b8 100644 --- a/keyboards/preonic/rev2/rules.mk +++ b/keyboards/preonic/rev2/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = yes # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/preonic/rev3/rev3.c b/keyboards/preonic/rev3/rev3.c index ec8a56108e..0410d9a298 100644 --- a/keyboards/preonic/rev3/rev3.c +++ b/keyboards/preonic/rev3/rev3.c @@ -53,11 +53,11 @@ void matrix_scan_kb(void) { #ifdef DIP_SWITCH_ENABLE __attribute__((weak)) -void dip_update(uint8_t index, bool active) {} +bool dip_update(uint8_t index, bool active) { return true;} __attribute__((weak)) -void dip_switch_update_user(uint8_t index, bool active) { - dip_update(index, active); +bool dip_switch_update_user(uint8_t index, bool active) { + return dip_update(index, active); } #endif diff --git a/keyboards/preonic/rev3/rules.mk b/keyboards/preonic/rev3/rules.mk index 034ace02ad..3c330d02dd 100644 --- a/keyboards/preonic/rev3/rules.mk +++ b/keyboards/preonic/rev3/rules.mk @@ -22,7 +22,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. WS2812_DRIVER = pwm -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/primekb/prime_m/rules.mk b/keyboards/primekb/prime_m/rules.mk index a2e427b671..6988d7e996 100644 --- a/keyboards/primekb/prime_m/rules.mk +++ b/keyboards/primekb/prime_m/rules.mk @@ -30,4 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -LAYOUTS = ortho_5x6 numpad_5x6 +LAYOUTS = numpad_5x6 diff --git a/keyboards/rgbkb/common/common_oled.c b/keyboards/rgbkb/common/common_oled.c new file mode 100644 index 0000000000..b6ea6b20af --- /dev/null +++ b/keyboards/rgbkb/common/common_oled.c @@ -0,0 +1,101 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/Legonut> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#include "common_oled.h" +#include "oled_driver.h" +#include "rgb_matrix.h" + +// for memcpy +#include <string.h> +#include <transactions.h> + +typedef struct { + bool selecting; + uint8_t selection; +} kb_menu_status_t; + +static kb_menu_status_t rgb_menu = { false, 4 }; +static bool rgb_menu_changed = false; + +void render_logo(void) { + static const char PROGMEM font_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + oled_write_P(font_logo, false); +} + +void render_icon(void) { + static const char PROGMEM font_icon[] = { + 0x9b,0x9c,0x9d,0x9e,0x9f, + 0xbb,0xbc,0xbd,0xbe,0xbf, + 0xdb,0xdc,0xdd,0xde,0xdf,0 + }; + oled_write_P(font_icon, false); +} + +#define RGB_FUNCTION_COUNT 6 +typedef void (*rgb_matrix_f)(void); +const rgb_matrix_f rgb_matrix_functions[RGB_FUNCTION_COUNT][2] = { + { rgb_matrix_increase_hue, rgb_matrix_decrease_hue }, + { rgb_matrix_increase_sat, rgb_matrix_decrease_sat }, + { rgb_matrix_increase_val, rgb_matrix_decrease_val }, + { rgb_matrix_increase_speed, rgb_matrix_decrease_speed }, + { rgb_matrix_step, rgb_matrix_step_reverse }, + { rgb_matrix_toggle, rgb_matrix_toggle } +}; + +void render_rgb_menu(void) { + static char buffer[63] = {0}; + snprintf(buffer, sizeof(buffer), "Hue %3dSatrn %3dValue %3dSpeed %3dMode %3dEnbld %3d", + rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, rgb_matrix_config.speed, rgb_matrix_config.mode, rgb_matrix_config.enable); + + if (rgb_menu.selecting) { + buffer[5 + rgb_menu.selection * 10] = '*'; + } + else { + buffer[5 + rgb_menu.selection * 10] = '>'; + } + oled_write(buffer, false); +} + +void rgb_menu_selection(void) { + if (!is_keyboard_master()) return; + rgb_menu.selecting = !rgb_menu.selecting; + rgb_menu_changed = true; +} + +void rgb_menu_action(bool clockwise) { + if (!is_keyboard_master()) return; + if (rgb_menu.selecting) { + if (!clockwise) { + rgb_menu.selection = (rgb_menu.selection - 1); + if (rgb_menu.selection >= RGB_FUNCTION_COUNT) + rgb_menu.selection = RGB_FUNCTION_COUNT - 1; + } + else { + rgb_menu.selection = (rgb_menu.selection + 1) % RGB_FUNCTION_COUNT; + } + } + else { + (*rgb_matrix_functions[rgb_menu.selection][clockwise])(); + } + rgb_menu_changed = true; +} + +void rgb_menu_update(int8_t transaction_id) { + if (!is_keyboard_master()) return; + if (!rgb_menu_changed) return; + rgb_menu_changed = false; + transaction_rpc_send(transaction_id, sizeof(kb_menu_status_t), &rgb_menu); +} + +void rgb_menu_slave_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { + memcpy(&rgb_menu, initiator2target_buffer, sizeof(kb_menu_status_t)); +}
\ No newline at end of file diff --git a/keyboards/rgbkb/common/common_oled.h b/keyboards/rgbkb/common/common_oled.h new file mode 100644 index 0000000000..a99988b2a8 --- /dev/null +++ b/keyboards/rgbkb/common/common_oled.h @@ -0,0 +1,21 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/Legonut> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#include <stdint.h> +#include <stdbool.h> + +void render_logo(void); +void render_icon(void); +void render_rgb_menu(void); +void rgb_menu_selection(void); +void rgb_menu_action(bool clockwise); +void rgb_menu_update(int8_t transaction_id); +void rgb_menu_slave_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer);
\ No newline at end of file diff --git a/keyboards/rgbkb/common/glcdfont.c b/keyboards/rgbkb/common/glcdfont.c new file mode 100644 index 0000000000..320925a8f7 --- /dev/null +++ b/keyboards/rgbkb/common/glcdfont.c @@ -0,0 +1,240 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/Legonut> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#include "progmem.h" + +// Helidox 8x6 font with RGBKB SOL Logo +// Online editor: http://teripom.x0.com/ + +static const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x0C, 0x90, + 0xB0, 0xE0, 0x72, 0x31, 0x9B, 0xDE, + 0xCE, 0xEC, 0xEE, 0xE9, 0xE9, 0xEC, + 0xCF, 0xDA, 0x99, 0x3E, 0x62, 0xE4, + 0xC4, 0x70, 0x10, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, + 0xC0, 0xC0, 0x80, 0x80, 0x02, 0x85, + 0x85, 0x87, 0x85, 0x89, 0x89, 0x92, + 0xEA, 0xC6, 0xC4, 0x48, 0x50, 0x60, + 0x40, 0x40, 0x40, 0x40, 0xC0, 0xE0, + 0x50, 0x28, 0x10, 0x10, 0x60, 0xC0, + 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, + 0x80, 0x80, 0x80, 0xE0, 0xF8, 0xFC, + 0xF8, 0xF0, 0x00, 0x00, 0x00, 0x00, + 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, + 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, + 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, + 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, + 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, + 0x00, 0x00, 0xF0, 0xF4, 0xEC, 0xDE, + 0xDE, 0xBE, 0x3E, 0x3E, 0x3F, 0x3F, + 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x3F, + 0x3F, 0x3E, 0x3E, 0xBE, 0xDE, 0xDE, + 0xEC, 0xF4, 0xF0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7F, 0x80, 0x80, + 0x80, 0x70, 0x0F, 0x00, 0x00, 0x80, + 0x7F, 0x00, 0x00, 0x7F, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x7F, + 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x21, 0x33, 0x3B, 0x7B, + 0xFF, 0x00, 0x7C, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0x01, + 0xFF, 0xDE, 0x8C, 0x04, 0x0C, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x7F, 0x80, + 0x80, 0xBE, 0xBE, 0x80, 0x80, 0x80, + 0xC1, 0xFF, 0x80, 0x04, 0x32, 0x5E, + 0x1C, 0x3D, 0x26, 0x10, 0xC1, 0xFF, + 0x3E, 0x00, 0x00, 0x08, 0x36, 0xC1, + 0x08, 0x08, 0x14, 0x77, 0x94, 0x94, + 0x94, 0xF7, 0x94, 0xF7, 0x9C, 0x9C, + 0xFF, 0xFF, 0x1E, 0x00, 0x00, 0x00, + 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, + 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, + 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, + 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, + 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, + 0x00, 0x00, 0x01, 0x0F, 0x3F, 0xFF, + 0xFF, 0xFF, 0xFC, 0xE0, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0xE0, 0xFC, 0xFF, 0xFF, 0xFF, + 0x3F, 0x0F, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x02, 0x06, + 0x4D, 0x4F, 0x8C, 0xF9, 0x73, 0x37, + 0x27, 0x2F, 0x2F, 0xAF, 0xEF, 0x6F, + 0x77, 0x17, 0x33, 0x79, 0xCC, 0x1F, + 0x31, 0x20, 0x21, 0x02, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0xE0, + 0xA0, 0xA0, 0xD0, 0x90, 0x48, 0x48, + 0x25, 0x2B, 0x11, 0x09, 0x05, 0x03, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x03, 0x02, 0x04, 0x03, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F, + 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, + 0xFE, 0xFC, 0x00, 0xFC, 0xFE, 0x7F, + 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/keyboards/rgbkb/common/touch_encoder.c b/keyboards/rgbkb/common/touch_encoder.c new file mode 100644 index 0000000000..6293739ec9 --- /dev/null +++ b/keyboards/rgbkb/common/touch_encoder.c @@ -0,0 +1,310 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/XScorpion2> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. Ryan Caltabiano + * ---------------------------------------------------------------------------- + */ + +#include "i2c_master.h" +#include "keyboard.h" +#include "touch_encoder.h" +#include "print.h" +#include "wait.h" +#include "timer.h" + +// for memcpy +#include <string.h> +#include <transactions.h> + +#define I2C_ADDRESS 0x1C +#define CALIBRATION_BIT 0x80 +#define OVERFLOW_BIT 0x40 +#define SLIDER_BIT 0x02 + +#ifndef TOUCH_UPDATE_INTERVAL +# define TOUCH_UPDATE_INTERVAL 33 +#endif + +enum { // QT2120 registers + QT_CHIP_ID = 0, + QT_FIRMWARE_VERSION, + QT_DETECTION_STATUS, + QT_KEY_STATUS, + QT_SLIDER_POSITION = 5, + QT_CALIBRATE, + QT_RESET, + QT_LP, + QT_TTD, + QT_ATD, + QT_DI, + QT_TRD, + QT_DHT, + QT_SLIDER_OPTION, + QT_CHARDE_TIME, + QT_KEY0_DTHR, + QT_KEY1_DTHR, + QT_KEY2_DTHR, + QT_KEY3_DTHR, + QT_KEY4_DTHR, + QT_KEY5_DTHR, + QT_KEY6_DTHR, + QT_KEY7_DTHR, + QT_KEY8_DTHR, + QT_KEY9_DTHR, + QT_KEY10_DTHR, + QT_KEY11_DTHR, + QT_KEY0_CTRL, + QT_KEY1_CTRL, + QT_KEY2_CTRL, + QT_KEY3_CTRL, + QT_KEY4_CTRL, + QT_KEY5_CTRL, + QT_KEY6_CTRL, + QT_KEY7_CTRL, + QT_KEY8_CTRL, + QT_KEY9_CTRL, + QT_KEY10_CTRL, + QT_KEY11_CTRL, + QT_KEY0_PULSE_SCALE, + QT_KEY1_PULSE_SCALE, + QT_KEY2_PULSE_SCALE, + QT_KEY3_PULSE_SCALE, + QT_KEY4_PULSE_SCALE, + QT_KEY5_PULSE_SCALE, + QT_KEY6_PULSE_SCALE, + QT_KEY7_PULSE_SCALE, + QT_KEY8_PULSE_SCALE, + QT_KEY9_PULSE_SCALE, + QT_KEY10_PULSE_SCALE, + QT_KEY11_PULSE_SCALE, + QT_KEY0_SIGNAL, + QT_KEY1_SIGNAL = 54, + QT_KEY2_SIGNAL = 56, + QT_KEY3_SIGNAL = 58, + QT_KEY4_SIGNAL = 60, + QT_KEY5_SIGNAL = 62, + QT_KEY6_SIGNAL = 64, + QT_KEY7_SIGNAL = 66, + QT_KEY8_SIGNAL = 68, + QT_KEY9_SIGNAL = 70, + QT_KEY10_SIGNAL = 72, + QT_KEY11_SIGNAL = 74, + QT_KEY0_REFERENCE = 76, + QT_KEY1_REFERENCE = 78, + QT_KEY2_REFERENCE = 80, + QT_KEY3_REFERENCE = 82, + QT_KEY4_REFERENCE = 84, + QT_KEY5_REFERENCE = 86, + QT_KEY6_REFERENCE = 88, + QT_KEY7_REFERENCE = 90, + QT_KEY8_REFERENCE = 92, + QT_KEY9_REFERENCE = 94, + QT_KEY10_REFERENCE = 96, + QT_KEY11_REFERENCE = 98, +}; + +bool touch_initialized = false; +bool touch_disabled = false; +uint8_t touch_handness = 0; +// touch_raw & touch_processed store the Detection Status, Key Status (x2), and Slider Position values +uint8_t touch_raw[4] = { 0 }; +uint8_t touch_processed[4] = { 0 }; + +uint16_t touch_timer = 0; +uint16_t touch_update_timer = 0; + +// For split transport only +typedef struct { + uint8_t position; + uint8_t taps; +} slave_touch_status_t; + +bool touch_slave_init = false; +slave_touch_status_t touch_slave_state = { 0, 0 }; + +static bool write_register8(uint8_t address, uint8_t data) { + i2c_status_t status = i2c_writeReg((I2C_ADDRESS << 1), address, &data, sizeof(data), I2C_TIMEOUT); + if (status != I2C_STATUS_SUCCESS) { + xprintf("write_register8 %d failed %d\n", address, status); + } + return status == I2C_STATUS_SUCCESS; +} + +static bool read_register(uint8_t address, uint8_t* data, uint16_t length) { + i2c_status_t status = i2c_readReg((I2C_ADDRESS << 1), address, data, length, I2C_TIMEOUT); + if (status != I2C_STATUS_SUCCESS) { + xprintf("read_register %d failed %d\n", address, status); + return false; + } + return true; +} + +void touch_encoder_init(void) { + i2c_init(); + + touch_handness = is_keyboard_left() ? 0 : 1; + + // Set QT to slider mode + touch_initialized = write_register8(QT_SLIDER_OPTION, 0x80); + touch_initialized &= write_register8(QT_TTD, 4); // Toward Drift - 20 @ 3.2s + touch_initialized &= write_register8(QT_ATD, 1); // Away Drift - 5 @ 0.8s + touch_initialized &= write_register8(QT_DI, 4); // Detection Integrator - 4 + touch_initialized &= write_register8(QT_TRD, 0); // Touch Recall - 48 + touch_encoder_calibrate(); +} + +__attribute__((weak)) bool touch_encoder_tapped_kb(uint8_t index, uint8_t section) { return touch_encoder_tapped_user(index, section); } +__attribute__((weak)) bool touch_encoder_update_kb(uint8_t index, bool clockwise) { return touch_encoder_update_user(index, clockwise); } + +__attribute__((weak)) bool touch_encoder_tapped_user(uint8_t index, uint8_t section) { return true; } +__attribute__((weak)) bool touch_encoder_update_user(uint8_t index, bool clockwise) { return true; } + +static void touch_encoder_update_tapped(void) { + // Started touching, being counter for TOUCH_TERM + if (touch_processed[0] & SLIDER_BIT) { + touch_timer = timer_read() + TOUCH_TERM; + return; + } + + // Touch held too long, bail + if (timer_expired(timer_read(), touch_timer)) return; + + uint8_t section = touch_processed[3] / (UINT8_MAX / TOUCH_SEGMENTS + 1); + xprintf("tap %d %d\n", touch_handness, section); + if (is_keyboard_master()) { + if (!touch_disabled) { + touch_encoder_tapped_kb(touch_handness, section); + } + } + else { + touch_slave_state.taps ^= (1 << section); + } +} + +static void touch_encoder_update_position_common(uint8_t* position, uint8_t raw, uint8_t index) { + int8_t delta = (*position - raw) / TOUCH_RESOLUTION; + bool clockwise = raw > *position; + if (delta == 0) return; + + // Don't store raw directly, as we want to ensure any remainder is kept and used next time this is called + *position -= delta * TOUCH_RESOLUTION; + xprintf("pos %d %d\n", index, raw); + //uint8_t u_delta = delta < 0 ? -delta : delta; + if (!touch_disabled) { + //for (uint8_t i = 0; i < u_delta; i++) + touch_encoder_update_kb(index, clockwise); + } +} + +static void touch_encoder_update_position(void) { + // If the user touchs and moves enough, expire touch_timer faster and do encoder position logic instead + if (!timer_expired(timer_read(), touch_timer)) { + if ((uint8_t)(touch_raw[3] - touch_processed[3]) <= TOUCH_DEADZONE) return; + touch_timer = timer_read(); + } + + if (is_keyboard_master()) { + touch_encoder_update_position_common(&touch_processed[3], touch_raw[3], touch_handness); + } + else { + touch_slave_state.position = touch_raw[3]; + } +} + +void touch_encoder_update_slave(slave_touch_status_t slave_state) { + if (!touch_slave_init) { + touch_slave_state = slave_state; + touch_slave_init = true; + return; + } + + if (touch_slave_state.position != slave_state.position) { + // Did a new slide event start? + uint8_t mask = (1 << 7); + if ((touch_slave_state.taps & mask) != (slave_state.taps & mask)) { + touch_slave_state.position = slave_state.position; + } + touch_encoder_update_position_common(&touch_slave_state.position, slave_state.position, !touch_handness); + } + + if (touch_slave_state.taps != slave_state.taps) { + if (!touch_disabled) { + for (uint8_t section = 0; section < TOUCH_SEGMENTS; section++) { + uint8_t mask = (1 << section); + if ((touch_slave_state.taps & mask) != (slave_state.taps & mask)) { + xprintf("tap %d %d\n", !touch_handness, section); + touch_encoder_tapped_kb(!touch_handness, section); + } + } + } + touch_slave_state.taps = slave_state.taps; + } +} + +void touch_encoder_update(int8_t transaction_id) { + if (!touch_initialized) return; +#if TOUCH_UPDATE_INTERVAL > 0 + if (!timer_expired(timer_read(), touch_update_timer)) return; + touch_update_timer = timer_read() + TOUCH_UPDATE_INTERVAL; +#endif + + read_register(QT_DETECTION_STATUS, &touch_raw[0], sizeof(touch_raw)); + touch_processed[1] = touch_raw[1]; + touch_processed[2] = touch_raw[2]; + + if (touch_raw[0] != touch_processed[0]) { + uint8_t delta = touch_raw[0] ^ touch_processed[0]; + touch_processed[0] = touch_raw[0]; + // When calibrating, normal sensor behavior is supended + if (delta & CALIBRATION_BIT) { + xprintf("calibration %d\n", touch_processed[0] >> 7 & 1); + } + if (delta & OVERFLOW_BIT) { + xprintf("overflow %d\n", touch_processed[0] >> 6 & 1); + } + if (delta & SLIDER_BIT) { + touch_processed[3] = touch_raw[3]; + if (!is_keyboard_master()) { + touch_slave_state.position = touch_raw[3]; + touch_slave_state.taps ^= (1 << 7); + } + touch_encoder_update_tapped(); + } + } + + if ((touch_raw[0] & SLIDER_BIT) && touch_processed[3] != touch_raw[3]) { + touch_encoder_update_position(); + } + + if (is_keyboard_master()) { + slave_touch_status_t slave_state; + if (transaction_rpc_exec(transaction_id, sizeof(bool), &touch_disabled, sizeof(slave_touch_status_t), &slave_state)) { + if (memcmp(&touch_slave_state, &slave_state, sizeof(slave_touch_status_t))) + touch_encoder_update_slave(slave_state); + } + } +} + +void touch_encoder_calibrate(void) { + if (!touch_initialized) return; + write_register8(QT_CALIBRATE, 0x01); +} + +bool touch_encoder_calibrating(void) { + return touch_raw[0] & CALIBRATION_BIT; +} + +void touch_encoder_toggle(void) { + touch_disabled = !touch_disabled; +} + +bool touch_encoder_toggled(void) { + return touch_disabled; +} + +void touch_encoder_slave_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { + touch_disabled = *(bool*)initiator2target_buffer; + memcpy(target2initiator_buffer, &touch_slave_state, sizeof(slave_touch_status_t)); +} diff --git a/keyboards/rgbkb/common/touch_encoder.h b/keyboards/rgbkb/common/touch_encoder.h new file mode 100644 index 0000000000..022f619063 --- /dev/null +++ b/keyboards/rgbkb/common/touch_encoder.h @@ -0,0 +1,54 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/XScorpion2> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. Ryan Caltabiano + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#include <stdint.h> +#include <stdbool.h> + +#ifndef TOUCH_TERM +# define TOUCH_TERM 350 +#endif + +#ifndef TOUCH_SEGMENTS +# define TOUCH_SEGMENTS 3 +#elif TOUCH_SEGMENTS < 1 || TOUCH_SEGMENTS > 5 +# error TOUCH_SEGMENTS must be between 1 and 5. +#endif + +#ifndef TOUCH_DEADZONE +# define TOUCH_DEADZONE 50 +#endif + +#ifndef TOUCH_RESOLUTION +# define TOUCH_RESOLUTION 25 +#endif + +void touch_encoder_init(void); +void touch_encoder_update(int8_t transaction_id); + +void touch_encoder_calibrate(void); +bool touch_encoder_calibrating(void); + +void touch_encoder_toggle(void); +bool touch_encoder_toggled(void); + +// Called when touch encoder is tapped, weak function overridable by the kb +bool touch_encoder_tapped_kb(uint8_t index, uint8_t section); + +// Called when touch encoder is slid, weak function overridable by the kb +bool touch_encoder_update_kb(uint8_t index, bool clockwise); + +// Called when touch encoder is tapped, weak function overridable by the user +bool touch_encoder_tapped_user(uint8_t index, uint8_t section); + +// Called when touch encoder is slid, weak function overridable by the user +bool touch_encoder_update_user(uint8_t index, bool clockwise); + +void touch_encoder_slave_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer); diff --git a/keyboards/rgbkb/mun/.noci b/keyboards/rgbkb/mun/.noci new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/rgbkb/mun/.noci diff --git a/keyboards/rgbkb/mun/config.h b/keyboards/rgbkb/mun/config.h new file mode 100644 index 0000000000..802672e14d --- /dev/null +++ b/keyboards/rgbkb/mun/config.h @@ -0,0 +1,106 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/Legonut> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x3535 +#define PRODUCT_ID 0x3505 +#define MANUFACTURER RGBKB +#define PRODUCT Mün + +#define USB_POLLING_INTERVAL_MS 1 + +/* Matrix Configuration - Rows are doubled up */ +#define MATRIX_ROWS 14 +// B1, A2 reserved for encoder / touch encoder support +#define MATRIX_ROW_PINS { A1, A3, B3, A13, B15, B1, A2 } +#define MATRIX_COLS 7 +#define MATRIX_COL_PINS { A0, B11, B0, B10, B12, B2, A8 } +#define MATRIX_IO_DELAY 5 + +#define BUSY_WAIT +#define BUSY_WAIT_INSTRUCTIONS 35 // Increase if two rows are pressed at the same time. +#define GPIO_INPUT_PIN_DELAY 10 + +/* Touchbar adjustments */ +#define TOUCH_DEADZONE 50 // width of a "button", wider inputs will be interpreted as a swipe +#define TOUCH_TERM 350 // time of a "button" touch, longer inputs will be a swipe +#define TOUCH_RESOLUTION 25 // sensitivity of swipes, lower=faster + +/* Encoder Configuration */ +#define ENCODERS_PAD_A { B8, B9 } +#define ENCODERS_PAD_B { A14, A15 } +#define TOUCH_SEGMENTS 3 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* CRC Configuration */ +#define CRC8_OPTIMIZE_SPEED +#define CRC8_USE_TABLE + +/* Split Keyboard Configuration */ +#define EE_HANDS +#define SPLIT_USB_DETECT +// also handles the SERIAL_USART_TX_PIN define +#define SOFT_SERIAL_PIN A9 +#define SERIAL_USART_TX_PAL_MODE 7 +#define SERIAL_USART_TIMEOUT 5 +#define SERIAL_USART_DRIVER SD1 +//#define SERIAL_USART_FULL_DUPLEX - Waiting on reunification pr +#if SERIAL_USART_FULL_DUPLEX + #define SERIAL_USART_RX_PIN A10 + #define SERIAL_USART_RX_PAL_MODE 7 + // Mun connects TX to TX and RX to RX as we were planning on i2c split, so we need pin swap for full duplex + #define SERIAL_USART_PIN_SWAP + #define SERIAL_USART_SPEED (2 * 1024 * 1024) +#else + #define SERIAL_USART_SPEED (1 * 1024 * 1024) +#endif + +/* Split Transport Features */ +#define SPLIT_TRANSPORT_MIRROR +#define SPLIT_LAYER_STATE_ENABLE +#define SPLIT_LED_STATE_ENABLE +#define SPLIT_TRANSACTION_IDS_KB TOUCH_ENCODER_SYNC, RGB_MENU_SYNC + +/* RGB LED Configuration */ +#define RGB_DI_PIN B5 +#define RGBLED_NUM 98 +#define RGBLED_SPLIT { 49, 49 } +#define RGBLIGHT_ANIMATIONS + +#define DRIVER_LED_TOTAL RGBLED_NUM +#define RGB_MATRIX_SPLIT RGBLED_SPLIT +#define RGB_MATRIX_CENTER { 128, 34 } +#define RGB_MATRIX_LED_FLUSH_LIMIT 33 +#define RGB_MATRIX_LED_PROCESS_LIMIT 10 +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_DISABLE_WHEN_USB_SUSPENDED true + +#if RGB_UNLIMITED_POWER + #define RGBLIGHT_LIMIT_VAL 255 +#else + #define RGBLIGHT_LIMIT_VAL 127 +#endif +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS RGBLIGHT_LIMIT_VAL + +#define WS2812_PWM_DRIVER PWMD3 +#define WS2812_PWM_CHANNEL 2 +#define WS2812_PWM_PAL_MODE 2 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_DMA_CHANNEL 3 + +#define TOUCH_UPDATE_INTERVAL 33 +#define OLED_UPDATE_INTERVAL 33 +#define TAP_CODE_DELAY 5 diff --git a/keyboards/rgbkb/mun/halconf.h b/keyboards/rgbkb/mun/halconf.h new file mode 100644 index 0000000000..c8d832a81d --- /dev/null +++ b/keyboards/rgbkb/mun/halconf.h @@ -0,0 +1,24 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/Legonut> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +//#define HAL_USE_DAC TRUE + +//#define HAL_USE_GPT TRUE + +#define HAL_USE_I2C TRUE + +#define HAL_USE_PWM TRUE + +#define HAL_USE_SERIAL TRUE + +#define HAL_USE_SERIAL_USB TRUE + +#include_next <halconf.h> diff --git a/keyboards/rgbkb/mun/keymaps/default/config.h b/keyboards/rgbkb/mun/keymaps/default/config.h new file mode 100644 index 0000000000..3d9aff94a6 --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/default/config.h @@ -0,0 +1,32 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/Legonut> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +// No need for the single versions when multi performance isn't a problem =D +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_SOLID_SPLASH + +// 20m timeout (20m * 60s * 1000mil) +// #define RGB_DISABLE_TIMEOUT 1200000 +#define RGB_DISABLE_WHEN_USB_SUSPENDED true + + +#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 +// 224B per layer right now +#define DYNAMIC_KEYMAP_LAYER_COUNT 8 +#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047 + +#define VIA_QMK_RGBLIGHT_ENABLE + +#define STM32_ONBOARD_EEPROM_SIZE 2048 + diff --git a/keyboards/rgbkb/mun/keymaps/default/keymap.c b/keyboards/rgbkb/mun/keymaps/default/keymap.c new file mode 100644 index 0000000000..b120c3a37a --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/default/keymap.c @@ -0,0 +1,252 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/Legonut> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#include QMK_KEYBOARD_H +#include "common_oled.h" + +enum keymap_layers { + _QWERTY, + _COLEMAK, + _GAME, + _FN, + _ADJUST, + _VIA1, + _VIA2, + _VIA3 +}; + +enum keymap_keycodes { + // Disables touch processing + TCH_TOG = SAFE_RANGE, + MENU_BTN, + MENU_UP, + MENU_DN +}; + +// Default Layers +#define QWERTY DF(_QWERTY) +#define COLEMAK DF(_COLEMAK) +#define GAME DF(_GAME) + +// Momentary Layers +#define FN MO(_FN) +#define ADJUST MO(_ADJUST) + +#define FN_CAPS LT(_FN, KC_CAPS) +#define FN_ESC LT(_FN, KC_ESC) + +/* This keyboard is enabled with an RGB Menu Control system. +This functionality is enabled, but still requires a little configuration based on your exact setup. +The RGB Menu will appear on the Right Half's OLED and can be controlled by the MENU keycodes: +MENU_BTN - Triggers a button action for the menu +MENU_UP - Triggers an increase action for the menu +MENU_DN - Triggers a decrease action for the menu + +To finish configuration for your board, you will want to change the default keycodes for an encoder on the right half. +Encoder press keycode should be set to MENU_BTN, Clockwise should be MENU_UP, and Counter Clockwise should be MENU_DN. +Depending on where you add an encoder to the right half will determin in the default keymap where you should put those keycodes. +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* QWERTY + * .--------------------------------------------------------------. .--------------------------------------------------------------. + * | `~/ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | Bckspc | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | FN/Caps| A | S | D | F | G | ( | | ) | H | J | K | L | : | ' | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Shift | Z | X | C | V | B | { | | } | N | M | , | . | / |Shft/Ent| + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Ctrl | Win | Alt | RGBTOG | Adjust | Space | Bksp | | Enter | Space | Left | Down | Up | Right | Ctrl | + * '--------+--------+--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------' + * Encoder 1 Encoder 2 Encoder 3 Encoder 4 + * .-----------------------------------. .-----------------------------------. + * | VolUp | VolDn | VolUp | VolDn | | PgUp | PgDn | PgUp | PgDn | + * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------| + * | VolDn | VolUp | Next | Play | Prev | Touch Encoder Touch Encoder | RgbHuI | RgbHuD | RgbMdD | RgbTog | RgbMdI | + * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------' + */ + [_QWERTY] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJUST, KC_SPC, KC_DEL, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_RCTL, + + KC_VOLU, KC_VOLD, KC_VOLU, KC_VOLD, KC_PGDN, KC_PGUP, KC_PGDN, KC_PGUP, + KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_MPRV, RGB_HUI, RGB_HUD, RGB_RMOD,RGB_TOG, RGB_MOD + ), + + [_COLEMAK] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, + _______, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_GAME] = LAYOUT( + _______, _______, _______, _______, _______, _______, KC_F1, KC_F5, _______, _______, _______, _______, _______, _______, + _______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_F2, KC_F6, KC_Y, KC_U, KC_I, KC_O, KC_P, _______, + _______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F3, KC_F7, KC_H, KC_J, KC_K, KC_L, KC_SCLN, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F4, KC_F8, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, KC_PGUP, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_PGDN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, TCH_TOG, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, + _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, + _______, RGB_SPD, _______, RGB_SPI, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, GAME, + _______, RGB_RMOD,_______, RGB_MOD, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_NLCK, QWERTY, COLEMAK, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_VIA1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_VIA2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_VIA3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) + { + case MENU_BTN: + if (record->event.pressed) { + rgb_menu_selection(); + } + return false; + case MENU_UP: + if (record->event.pressed) { + rgb_menu_action(true); + } + return false; + case MENU_DN: + if (record->event.pressed) { + rgb_menu_action(false); + } + return false; + case TCH_TOG: + if (record->event.pressed) { + touch_encoder_toggle(); + } + return false; // Skip all further processing of this key + default: + return true; + } +} + +static void render_layer(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer"), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("QWRTY"), false); + break; + case _COLEMAK: + oled_write_ln_P(PSTR("Colemk"), false); + break; + case _GAME: + oled_write_ln_P(PSTR("Game "), false); + break; + case _FN: + oled_write_ln_P(PSTR("FN "), false); + break; + case _ADJUST: + oled_write_ln_P(PSTR("Adjst"), false); + break; + default: + oled_write_ln_P(PSTR("Undef"), false); + } +} + +static void render_leds(void) +{ + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUMLK") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPLK") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCRLK") : PSTR(" "), false); +} + +static void render_touch(void) +{ + // Host Touch LED Status + oled_write_P(!touch_encoder_toggled() ? PSTR("TOUCH") : PSTR(" "), false); + oled_write_P(touch_encoder_calibrating() ? PSTR("CLBRT") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_left()) { + render_icon(); + oled_write_P(PSTR(" "), false); + render_layer(); + oled_write_P(PSTR(" "), false); + render_leds(); + oled_write_P(PSTR(" "), false); + render_touch(); + } + else { + render_icon(); + oled_write_P(PSTR(" "), false); + render_rgb_menu(); + } +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_270; +} diff --git a/keyboards/tokyo60/keymaps/via/rules.mk b/keyboards/rgbkb/mun/keymaps/default/rules.mk index 1e5b99807c..1e5b99807c 100644 --- a/keyboards/tokyo60/keymaps/via/rules.mk +++ b/keyboards/rgbkb/mun/keymaps/default/rules.mk diff --git a/keyboards/rgbkb/mun/keymaps/xulkal2/config.h b/keyboards/rgbkb/mun/keymaps/xulkal2/config.h new file mode 100644 index 0000000000..f78d0103c1 --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/xulkal2/config.h @@ -0,0 +1,42 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/Legonut> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +// Xulkal custom stuff +#undef TAPPING_FORCE_HOLD + +#undef TAPPING_TERM +#define TAPPING_TERM 175 + +#define SPACE_CADET_MODIFIER_CARRYOVER +#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_LBRC +#define RSPC_KEYS KC_RSFT, KC_TRNS, KC_RBRC +#define LCPO_KEYS KC_LCTL, KC_TRNS, KC_MINS +#define RCPC_KEYS KC_RCTL, KC_TRNS, KC_EQL + +// No need for the single versions when multi performance isn't a problem =D +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_SOLID_SPLASH + +// 20m timeout (20m * 60s * 1000mil) +// #define RGB_DISABLE_TIMEOUT 1200000 +#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define OLED_SCROLL_TIMEOUT 20000 +#define ONESHOT_TAP_TOGGLE 2 + +#define RGB_MATRIX_HUE_STEP 8 +#define RGB_MATRIX_SAT_STEP 8 +#define RGB_MATRIX_VAL_STEP 8 +#define RGB_MATRIX_SPD_STEP 8 + +#define ENCODER_RESOLUTION 2
\ No newline at end of file diff --git a/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c b/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c new file mode 100644 index 0000000000..2de5888f17 --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c @@ -0,0 +1,246 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/Legonut> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#include QMK_KEYBOARD_H +#include "common_oled.h" + +enum keymap_layers { + _QWERTY, + _FUNCTION, + _ADJUST +}; + +enum keymap_keycodes { + // Disables touch processing + TCH_TOG = SAFE_RANGE, + MENU_BTN, + MENU_UP, + MENU_DN, + RGB_RST +}; + +// Default Layers +#define QWERTY DF(_QWERTY) + +// Momentary Layers +#define FN OSL(_FUNCTION) +#define ADJ OSL(_ADJUST) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* QWERTY + * .--------------------------------------------------------------. .--------------------------------------------------------------. + * | `~/ESC | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | Bckspc | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | \ | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Caps | A | S | D | F | G | Play | | MN BTN | H | J | K | L | : | Enter | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Shft[ | Z | X | C | V | B | { | | } | N | M | , | . | / | Shft] | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Ctrl- | Win | Alt | Del | Space | | ADJ | | FN | | Space | '" | Alt | App | Ctrl= | + * '--------+--------+--------+--------|--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------' + * Encoder 1 Encoder 2 Encoder 3 Encoder 4 + * .-----------------------------------. .-----------------------------------. + * | VolUp | VolDn | VolUp | VolDn | | PgUp | PgDn | PgUp | PgDn | + * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------| + * | VolDn | VolUp | Next | Play | Prev | Touch Encoder Touch Encoder | RgbHuI | RgbHuD | RgbMdD | RgbTog | RgbMdI | + * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------' + */ + [_QWERTY] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_MPLY, MENU_BTN,KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LCPO, KC_LGUI, KC_LALT, KC_DEL, KC_SPC, KC_NO, ADJ, FN, KC_NO, KC_SPC, KC_QUOTE,KC_RALT, KC_APP, KC_RCPC, + + KC_VOLU, KC_VOLD, KC_VOLU, KC_VOLD, MENU_DN, MENU_UP, MENU_DN, MENU_UP, + KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_MPRV, RGB_HUI, RGB_HUD, RGB_RMOD,RGB_TOG, RGB_MOD + ), + + /* Function + * .--------------------------------------------------------------. .--------------------------------------------------------------. + * | F12 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | SPDI | SAI | VAI | HUI | RGBMD | | | | | | PrtScr | ScrLck | PseBrk | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | SPDD | SAD | VAD | HUD | RGBRMD | | | | | | Ins | Home | PgUp | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | RGBRST | | | | RGBTOG | | | | | | Del | End | PgDn | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | Play | Prev | Next | VolUp | VolDn | + * '--------+--------+--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------' + * Encoder 1 Encoder 2 Encoder 3 Encoder 4 + * .-----------------------------------. .-----------------------------------. + * | | | | | | | | | | + * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------| + * | | | | | | Touch Encoder Touch Encoder | | | | | | + * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------' + */ + [_FUNCTION] = LAYOUT( + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, RGB_MOD, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, RGB_SPD, RGB_SAD, RGB_VAD, RGB_HUD, RGB_RMOD,_______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, + _______, RGB_RST, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLU, KC_VOLD, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Adjust + * .--------------------------------------------------------------. .--------------------------------------------------------------. + * | | | | | | | | | | | NumLck | / | * | - | Del | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | Home | Up | End | Reset | T_TOG | | | | | 7 | 8 | 9 | + | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | Left | Down | Right | | | | | | | 4 | 5 | 6 | + | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | | | | | EepRst | | | | | 1 | 2 | 3 | Enter | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | 0 | . | Enter | | + * '--------+--------+--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------' + * Encoder 1 Encoder 2 Encoder 3 Encoder 4 + * .-----------------------------------. .-----------------------------------. + * | | | | | | | | | | + * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------| + * | | | | | | Touch Encoder Touch Encoder | | | | | | + * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------' + */ + [_ADJUST] = LAYOUT( + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_DEL, + _______, KC_HOME, KC_UP, KC_END, RESET, TCH_TOG, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, _______, + _______, KC_LEFT, KC_DOWN, KC_RIGHT,_______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, + _______, _______, _______, _______, _______, EEP_RST, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_PDOT, KC_PENT, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; +// clang-format on + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) + { + case MENU_BTN: + if (record->event.pressed) { + rgb_menu_selection(); + } + return false; + case MENU_UP: + if (record->event.pressed) { + rgb_menu_action(true); + } + return false; + case MENU_DN: + if (record->event.pressed) { + rgb_menu_action(false); + } + return false; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgb_matrix_default(); + } + return false; + case TCH_TOG: + if (record->event.pressed) { + touch_encoder_toggle(); + } + return false; // Skip all further processing of this key + default: + return true; + } +} + +static void render_layer(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer"), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("BASE "), false); + break; + case _FUNCTION: + oled_write_ln_P(PSTR("FUNC "), false); + break; + case _ADJUST: + oled_write_ln_P(PSTR("ADJS "), false); + break; + } +} + +static void render_leds(void) +{ + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUMLK") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPLK") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCRLK") : PSTR(" "), false); +} + +static void render_touch(void) +{ + // Host Touch LED Status + oled_write_P(!touch_encoder_toggled() ? PSTR("TOUCH") : PSTR(" "), false); + oled_write_P(touch_encoder_calibrating() ? PSTR("CLBRT") : PSTR(" "), false); +} + +/*static uint32_t scan_counter = 0; +static uint32_t scan_value = 0; +static uint16_t scan_timer = 1000; + +void do_counters(void) { + scan_counter++; + uint16_t now = sync_timer_read(); + if (timer_expired(now, scan_timer)) + { + scan_timer += 1000; + scan_value = (scan_value + scan_counter) / 2; + scan_counter = 0; + } +} + +void matrix_scan_user(void) { + do_counters(); +} + +void matrix_slave_scan_user(void) { + do_counters(); +} + +void render_debug_scan(void) { + static char buffer[6] = {0}; + snprintf(buffer, sizeof(buffer), "%5d", scan_value); + oled_write_ln_P(buffer, false); +}*/ + +void oled_task_user(void) { + if (is_keyboard_left()) { + render_layer(); + oled_write_P(PSTR(" "), false); + render_leds(); + oled_write_P(PSTR(" "), false); + render_touch(); + //oled_write_P(PSTR(" "), false); + //render_debug_scan(); + oled_set_cursor(0, 12); + render_icon(); + } + else { + render_rgb_menu(); + //oled_write_P(PSTR(" "), false); + //render_debug_scan(); + oled_set_cursor(0, 12); + render_icon(); + } +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_270; +}
\ No newline at end of file diff --git a/keyboards/rgbkb/mun/keymaps/xulkal2/rules.mk b/keyboards/rgbkb/mun/keymaps/xulkal2/rules.mk new file mode 100644 index 0000000000..b626305163 --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/xulkal2/rules.mk @@ -0,0 +1,4 @@ +MOUSEKEY_ENABLE = yes # using for mouse wheel up and down, more granular than page up/down + +OPT_DEFS += -DRGB_UNLIMITED_POWER +DEBOUNCE_TYPE = sym_eager_pk
\ No newline at end of file diff --git a/keyboards/rgbkb/mun/matrix.c b/keyboards/rgbkb/mun/matrix.c new file mode 100644 index 0000000000..a0cb7df512 --- /dev/null +++ b/keyboards/rgbkb/mun/matrix.c @@ -0,0 +1,156 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/KarlK90> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. KarlK90 + * ---------------------------------------------------------------------------- + */ + +#include <stdint.h> +#include <stdbool.h> +#include <string.h> +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" +#include "split_util.h" +#include "config.h" +#include "transactions.h" + +#define ERROR_DISCONNECT_COUNT 5 +#define ROWS_PER_HAND (MATRIX_ROWS / 2) + +static const pin_t row_pins[ROWS_PER_HAND] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values + +// row offsets for each hand +uint8_t thisHand, thatHand; + +// user-defined overridable functions +__attribute__((weak)) void matrix_slave_scan_kb(void) { matrix_slave_scan_user(); } +__attribute__((weak)) void matrix_slave_scan_user(void) {} + +static void init_pins(void) { + for (size_t i = 0; i < MATRIX_COLS; i++) { + setPinInputHigh(col_pins[i]); + } + for (size_t i = 0; i < ROWS_PER_HAND; i++) { + setPinOutput(row_pins[i]); + writePinHigh(row_pins[i]); + } +} + +void matrix_init(void) { + split_pre_init(); + + thisHand = isLeftHand ? 0 : (ROWS_PER_HAND); + thatHand = ROWS_PER_HAND - thisHand; + + // initialize key pins + init_pins(); + + // initialize matrix state: all keys off + memset(raw_matrix, 0, sizeof(raw_matrix)); + memset(matrix, 0, sizeof(matrix)); + + debounce_init(ROWS_PER_HAND); + + matrix_init_quantum(); + + split_post_init(); +} + +bool matrix_post_scan(void) { + bool changed = false; + if (is_keyboard_master()) { + static uint8_t error_count; + + matrix_row_t slave_matrix[ROWS_PER_HAND] = {0}; + if (!transport_master(matrix + thisHand, slave_matrix)) { + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + memset(&matrix[thatHand], 0, sizeof(slave_matrix)); + memset(slave_matrix, 0, sizeof(slave_matrix)); + + changed = true; + } + } else { + error_count = 0; + + if (memcmp(&matrix[thatHand], slave_matrix, sizeof(slave_matrix)) != 0) { + memcpy(&matrix[thatHand], slave_matrix, sizeof(slave_matrix)); + changed = true; + } + } + + matrix_scan_quantum(); + } else { + transport_slave(matrix + thatHand, matrix + thisHand); + + matrix_slave_scan_kb(); + } + + return changed; +} + +uint8_t matrix_scan(void) { + bool local_changed = false; + matrix_row_t current_matrix[ROWS_PER_HAND]; + + for (size_t row_idx = 0; row_idx < ROWS_PER_HAND; row_idx++) { + /* Drive row pin low. */ + ATOMIC_BLOCK_FORCEON { writePinLow(row_pins[row_idx]); } + matrix_output_select_delay(); + + /* Read all columns in one go, aka port scanning. */ + uint16_t porta = palReadPort(GPIOA); + uint16_t portb = palReadPort(GPIOB); + + /* Order of pins on the mun is: A0, B11, B0, B10, B12, B2, A8 + Pin is active low, therefore we have to invert the result. */ + matrix_row_t cols = ~(((porta & (0x1 << 0)) >> 0) // A0 (0) + | ((portb & (0x1 << 11)) >> 10) // B11 (1) + | ((portb & (0x1 << 0)) << 2) // B0 (2) + | ((portb & (0x1 << 10)) >> 7) // B10 (3) + | ((portb & (0x1 << 12)) >> 8) // B12 (4) + | ((portb & (0x1 << 2)) << 3) // B2 (5) + | ((porta & (0x1 << 8)) >> 2)); // A8 (6) + + /* Reverse the order of columns for left hand as the board is flipped. */ + // if (isLeftHand) { + // #if defined(__arm__) + // /* rbit assembly reverses bit order of 32bit registers. */ + // uint32_t temp = cols; + // __asm__("rbit %0, %1" : "=r"(temp) : "r"(temp)); + // cols = temp >> 24; + // #else + // /* RISC-V bit manipulation extension not present. Use bit-hack. + // https://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith32Bits */ + // cols = (matrix_row_t)(((cols * 0x0802LU & 0x22110LU) | (cols * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16); + // #endif + // } + + current_matrix[row_idx] = cols; + + /* Drive row pin high again. */ + ATOMIC_BLOCK_FORCEON { writePinHigh(row_pins[row_idx]); } + matrix_output_unselect_delay(); + } + + if (memcmp(raw_matrix, current_matrix, sizeof(current_matrix)) != 0) { + memcpy(raw_matrix, current_matrix, sizeof(current_matrix)); + local_changed = true; + } + + debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, local_changed); + + bool remote_changed = matrix_post_scan(); + return (uint8_t)(local_changed || remote_changed); +}
\ No newline at end of file diff --git a/keyboards/rgbkb/mun/mcuconf.h b/keyboards/rgbkb/mun/mcuconf.h new file mode 100644 index 0000000000..acc083d8a5 --- /dev/null +++ b/keyboards/rgbkb/mun/mcuconf.h @@ -0,0 +1,42 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/Legonut> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#include_next <mcuconf.h> + +#undef STM32_DAC_USE_DAC1_CH1 +#define STM32_DAC_USE_DAC1_CH1 TRUE + +#undef STM32_DAC_USE_DAC1_CH2 +#define STM32_DAC_USE_DAC1_CH2 TRUE + +#undef STM32_GPT_USE_TIM6 +#define STM32_GPT_USE_TIM6 TRUE + +#undef STM32_GPT_USE_TIM7 +#define STM32_GPT_USE_TIM7 TRUE + +#undef STM32_GPT_USE_TIM8 +#define STM32_GPT_USE_TIM8 TRUE + +#undef STM32_GPT_USE_TIM15 +#define STM32_GPT_USE_TIM15 TRUE + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 TRUE + +#undef STM32_PWM_USE_TIM4 +#define STM32_PWM_USE_TIM4 TRUE + +#undef STM32_SERIAL_USE_USART1 +#define STM32_SERIAL_USE_USART1 TRUE
\ No newline at end of file diff --git a/keyboards/rgbkb/mun/mun.c b/keyboards/rgbkb/mun/mun.c new file mode 100644 index 0000000000..5dabecc134 --- /dev/null +++ b/keyboards/rgbkb/mun/mun.c @@ -0,0 +1,35 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/Legonut> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#include "mun.h" +#include "touch_encoder.h" +#include "common_oled.h" +#include <transactions.h> + +void keyboard_post_init_kb(void) +{ + touch_encoder_init(); + transaction_register_rpc(TOUCH_ENCODER_SYNC, touch_encoder_slave_sync); + transaction_register_rpc(RGB_MENU_SYNC, rgb_menu_slave_sync); + keyboard_post_init_user(); +} + +void housekeeping_task_kb(void) +{ + touch_encoder_update(TOUCH_ENCODER_SYNC); + rgb_menu_update(RGB_MENU_SYNC); +} + +#if defined(BUSY_WAIT) +void matrix_output_unselect_delay(void) { + for (int32_t i = 0; i < BUSY_WAIT_INSTRUCTIONS; i++) { + __asm__ volatile("nop" ::: "memory"); + } +} +#endif
\ No newline at end of file diff --git a/keyboards/rgbkb/mun/mun.h b/keyboards/rgbkb/mun/mun.h new file mode 100644 index 0000000000..beb132f0ec --- /dev/null +++ b/keyboards/rgbkb/mun/mun.h @@ -0,0 +1,16 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/Legonut> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#if defined(KEYBOARD_rgbkb_mun_rev1) +# include "rev1.h" +#endif + +#include "quantum.h"
\ No newline at end of file diff --git a/keyboards/rgbkb/mun/readme.md b/keyboards/rgbkb/mun/readme.md new file mode 100644 index 0000000000..6a18611539 --- /dev/null +++ b/keyboards/rgbkb/mun/readme.md @@ -0,0 +1,15 @@ +# Mün + +![Mün](https://i.redd.it/zw534js2o5861.jpg) + +Mün is powered by STM32 with full QMK support. Each key has super-bright RGB backlighting and MX Kailh hotswap sockets. No soldering is required to get a fully functioning keyboard. There are an additional 14 rear-facing RGB LEDs on each side. Each half can be configured to run as master or slave with the two USB-C ports. They also support up to two rotary encoders and one OLED panel per half. + +Keyboard Maintainer: [Legonut](https://github.com/Legonut) +Hardware Supported: Mün PCB R1.0, R1.1, R1.2 +Hardware Availability: [RGBKB](https://www.rgbkb.net) + +Make example for this keyboard (after setting up your build environment): + + make rgbkb/mun:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/rgbkb/mun/rev1/config.h b/keyboards/rgbkb/mun/rev1/config.h new file mode 100644 index 0000000000..7ff0b54903 --- /dev/null +++ b/keyboards/rgbkb/mun/rev1/config.h @@ -0,0 +1,12 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/Legonut> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#define DEVICE_VER 0x0001 diff --git a/keyboards/rgbkb/mun/rev1/info.json b/keyboards/rgbkb/mun/rev1/info.json new file mode 100644 index 0000000000..c644b9bdc8 --- /dev/null +++ b/keyboards/rgbkb/mun/rev1/info.json @@ -0,0 +1,101 @@ +{ + "keyboard_name": "Mun", + "url": "https://www.rgbkb.net/products/mun", + "maintainer": "Legonut", + "width": 13.5, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"L05", "x":5, "y":0}, + {"label":"L06", "x":6, "y":0}, + {"label":"R00", "x":7.5, "y":0}, + {"label":"R01", "x":8.5, "y":0}, + {"label":"R02", "x":9.5, "y":0}, + {"label":"R03", "x":10.5, "y":0}, + {"label":"R04", "x":11.5, "y":0}, + {"label":"R05", "x":12.5, "y":0}, + {"label":"R06", "x":13.5, "y":0}, + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"L15", "x":5, "y":1}, + {"label":"L16", "x":6, "y":1}, + {"label":"R10", "x":7.5, "y":1}, + {"label":"R11", "x":8.5, "y":1}, + {"label":"R12", "x":9.5, "y":1}, + {"label":"R13", "x":10.5, "y":1}, + {"label":"R14", "x":11.5, "y":1}, + {"label":"R15", "x":12.5, "y":1}, + {"label":"R16", "x":13.5, "y":1}, + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"L25", "x":5, "y":2}, + {"label":"L26", "x":6, "y":2}, + {"label":"R20", "x":7.5, "y":2}, + {"label":"R21", "x":8.5, "y":2}, + {"label":"R22", "x":9.5, "y":2}, + {"label":"R23", "x":10.5, "y":2}, + {"label":"R24", "x":11.5, "y":2}, + {"label":"R25", "x":12.5, "y":2}, + {"label":"R26", "x":13.5, "y":2}, + {"label":"L30", "x":0, "y":3}, + {"label":"L31", "x":1, "y":3}, + {"label":"L32", "x":2, "y":3}, + {"label":"L33", "x":3, "y":3}, + {"label":"L34", "x":4, "y":3}, + {"label":"L35", "x":5, "y":3}, + {"label":"L36", "x":6, "y":3}, + {"label":"R30", "x":7.5, "y":3}, + {"label":"R21", "x":8.5, "y":3}, + {"label":"R32", "x":9.5, "y":3}, + {"label":"R33", "x":10.5, "y":3}, + {"label":"R34", "x":11.5, "y":3}, + {"label":"R35", "x":12.5, "y":3}, + {"label":"R36", "x":13.5, "y":3}, + {"label":"L40", "x":0, "y":4}, + {"label":"L41", "x":1, "y":4}, + {"label":"L42", "x":2, "y":4}, + {"label":"L43", "x":3, "y":4}, + {"label":"L44", "x":4, "y":4}, + {"label":"L45", "x":5, "y":4}, + {"label":"L46", "x":6, "y":4}, + {"label":"R40", "x":7.5, "y":4}, + {"label":"R41", "x":8.5, "y":4}, + {"label":"R42", "x":9.5, "y":4}, + {"label":"R43", "x":10.5, "y":4}, + {"label":"R44", "x":11.5, "y":4}, + {"label":"R45", "x":12.5, "y":4}, + {"label":"R46", "x":13.5, "y":4}, + {"label":"E00", "x":0, "y":5.5}, + {"label":"E01", "x":1, "y":5.5}, + {"label":"E10", "x":2, "y":5.5}, + {"label":"E11", "x":3, "y":5.5}, + {"label":"E20", "x":10.5, "y":5.5}, + {"label":"E21", "x":11.5, "y":5.5}, + {"label":"E30", "x":12.5, "y":5.5}, + {"label":"E31", "x":13.5, "y":5.5}, + {"label":"T00", "x":0, "y":6.5}, + {"label":"T01", "x":1, "y":6.5}, + {"label":"T02", "x":2, "y":6.5}, + {"label":"T03", "x":3, "y":6.5}, + {"label":"T04", "x":4, "y":6.5}, + {"label":"T10", "x":9.5, "y":6.5}, + {"label":"T11", "x":10.5, "y":6.5}, + {"label":"T12", "x":11.5, "y":6.5}, + {"label":"T13", "x":12.5, "y":6.5}, + {"label":"T14", "x":13.5, "y":6.5} + ] + } + } +} diff --git a/keyboards/rgbkb/mun/rev1/readme.md b/keyboards/rgbkb/mun/rev1/readme.md new file mode 100644 index 0000000000..6a18611539 --- /dev/null +++ b/keyboards/rgbkb/mun/rev1/readme.md @@ -0,0 +1,15 @@ +# Mün + +![Mün](https://i.redd.it/zw534js2o5861.jpg) + +Mün is powered by STM32 with full QMK support. Each key has super-bright RGB backlighting and MX Kailh hotswap sockets. No soldering is required to get a fully functioning keyboard. There are an additional 14 rear-facing RGB LEDs on each side. Each half can be configured to run as master or slave with the two USB-C ports. They also support up to two rotary encoders and one OLED panel per half. + +Keyboard Maintainer: [Legonut](https://github.com/Legonut) +Hardware Supported: Mün PCB R1.0, R1.1, R1.2 +Hardware Availability: [RGBKB](https://www.rgbkb.net) + +Make example for this keyboard (after setting up your build environment): + + make rgbkb/mun:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/rgbkb/mun/rev1/rev1.c b/keyboards/rgbkb/mun/rev1/rev1.c new file mode 100644 index 0000000000..28ad843b52 --- /dev/null +++ b/keyboards/rgbkb/mun/rev1/rev1.c @@ -0,0 +1,122 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/Legonut> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#include "rev1.h" + +#define NUMBER_OF_TOUCH_ENCODERS 2 +#define TOUCH_ENCODER_OPTIONS TOUCH_SEGMENTS + 2 + +#define NUMBER_OF_ENCODERS 4 +#define ENCODER_OPTIONS 2 + +typedef struct PACKED { + uint8_t r; + uint8_t c; +} encodermap_t; + +// this maps encoders and then touch encoders to their respective electrical matrix entry +// mapping is row (y) then column (x) when looking at the electrical layout +const encodermap_t encoder_map[NUMBER_OF_ENCODERS][ENCODER_OPTIONS] = +{ + { { 5, 0 }, { 5, 1 } }, // Encoder 1 matrix entries + { { 5, 2 }, { 5, 3 } }, // Encoder 2 matrix entries + { { 12, 0 }, { 12, 1 } }, // Encoder 3 matrix entries + { { 12, 2 }, { 12, 3 } }, // Encoder 4 matrix entries +}; + +const encodermap_t touch_encoder_map[NUMBER_OF_TOUCH_ENCODERS][TOUCH_ENCODER_OPTIONS] = +{ + { { 6, 0 }, { 6, 1 }, { 6, 2 }, { 6, 3 }, { 6, 4 } }, // Touch Encoder 1 matrix entries + { { 13, 0 }, { 13, 1 }, { 13, 2 }, { 13, 3 }, { 13, 4 } } // Touch Encoder 2 matrix entries +}; + +static void process_encoder_matrix(encodermap_t pos) { + action_exec((keyevent_t){ + .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = true, .time = (timer_read() | 1) /* time should not be 0 */ + }); +#if TAP_CODE_DELAY > 0 + wait_ms(TAP_CODE_DELAY); +#endif + action_exec((keyevent_t){ + .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = false, .time = (timer_read() | 1) /* time should not be 0 */ + }); +} + +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) + return false; + + // Mapping clockwise (typically increase) to zero, and counter clockwise (decrease) to 1 + process_encoder_matrix(encoder_map[index][clockwise ? 0 : 1]); + return false; +} + +bool touch_encoder_update_kb(uint8_t index, bool clockwise) { + if (!touch_encoder_update_user(index, clockwise)) + return false; + + // Mapping clockwise (typically increase) to zero, and counter clockwise (decrease) to 1 + process_encoder_matrix(touch_encoder_map[index][clockwise ? 0 : 1]); + return false; +} + +bool touch_encoder_tapped_kb(uint8_t index, uint8_t section) { + if (!touch_encoder_tapped_user(index, section)) + return false; + + process_encoder_matrix(touch_encoder_map[index][section + 2]); + return false; +} + +#ifdef RGB_MATRIX_ENABLE +// clang-format off +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6 }, + { 13, 12, 11, 10, 9, 8, 7 }, + { 14, 15, 16, 17, 18, 19, 20 }, + { 27, 26, 25, 24, 23, 22, 21 }, + { 28, 29, 30, 31, 32, 33, 34 }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { 49, 50, 51, 52, 53, 54, 55 }, + { 62, 61, 60, 59, 58, 57, 56 }, + { 63, 64, 65, 66, 67, 68, 69 }, + { 76, 75, 74, 73, 72, 71, 70 }, + { 77, 78, 79, 80, 81, 82, 83 }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED } +}, { + { 16, 16},{ 34, 16},{ 49, 16},{ 64, 16},{ 79, 16},{ 94, 16},{ 109, 16}, + { 109, 31},{ 94, 31},{ 79, 31},{ 64, 31},{ 49, 31},{ 34, 31},{ 16, 31}, + { 16, 46},{ 34, 46},{ 49, 46},{ 64, 46},{ 79, 46},{ 94, 46},{ 109, 46}, + { 109, 61},{ 94, 61},{ 79, 61},{ 64, 61},{ 49, 61},{ 34, 61},{ 16, 61}, + { 16, 76},{ 34, 76},{ 49, 76},{ 64, 76},{ 83, 72},{ 98, 72},{ 113, 72}, + { 97, 5},{ 91, 5},{ 86, 5},{ 80, 5},{ 75, 5},{ 69, 5},{ 63, 5},{ 58, 5},{ 52, 5},{ 46, 5},{ 41, 5},{ 35, 5},{ 30, 5},{ 24, 5}, + { 240, 16},{ 222, 16},{ 207, 16},{ 192, 16},{ 177, 16},{ 162, 16},{ 147, 16}, + { 147, 31},{ 162, 31},{ 177, 31},{ 192, 31},{ 207, 31},{ 222, 31},{ 240, 31}, + { 240, 46},{ 222, 46},{ 207, 46},{ 192, 46},{ 177, 46},{ 162, 46},{ 147, 46}, + { 147, 61},{ 162, 61},{ 177, 61},{ 192, 61},{ 207, 61},{ 222, 61},{ 240, 61}, + { 240, 76},{ 222, 76},{ 207, 76},{ 192, 76},{ 180, 72},{ 165, 72},{ 150, 72}, + { 159, 5},{ 164, 5},{ 170, 5},{ 176, 5},{ 181, 5},{ 187, 5},{ 192, 5},{ 198, 5},{ 204, 5},{ 209, 5},{ 215, 5},{ 221, 5},{ 226, 5},{ 232, 5}, +}, { + 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 +} }; +// clang-format on +#endif diff --git a/keyboards/rgbkb/mun/rev1/rev1.h b/keyboards/rgbkb/mun/rev1/rev1.h new file mode 100644 index 0000000000..8e7b65f45c --- /dev/null +++ b/keyboards/rgbkb/mun/rev1/rev1.h @@ -0,0 +1,43 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * <https://github.com/Legonut> wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#include "mun.h" +#include "touch_encoder.h" + +// clang-format off +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46, \ + E00, E01, E10, E11, E20, E21, E30, E31, \ + T00, T01, T02, T03, T04, T10, T11, T12, T13, T14 \ +) \ +{ \ + /* Left Half */ \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { E00, E01, E10, E11, KC_NO, KC_NO, KC_NO }, \ + { T00, T01, T02, T03, T04, KC_NO, KC_NO }, \ + /* Right Half */ \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { R46, R45, R44, R43, R42, R41, R40 }, \ + { E20, E21, E30, E31, KC_NO, KC_NO, KC_NO }, \ + { T10, T11, T12, T13, T14, KC_NO, KC_NO } \ +} +// clang-format on diff --git a/keyboards/rgbkb/mun/rev1/rgbkb_mun_rev1_default.json b/keyboards/rgbkb/mun/rev1/rgbkb_mun_rev1_default.json new file mode 100644 index 0000000000..ccf70ef5f9 --- /dev/null +++ b/keyboards/rgbkb/mun/rev1/rgbkb_mun_rev1_default.json @@ -0,0 +1,13 @@ +{ + "keyboard": "rgbkb/mun/rev1", + "keymap": "default", + "commit": "xxxxxxxxxxxxxxxxxxxxx", + "layout": "LAYOUT", + "layers": [ + ["KC_GESC","KC_1","KC_2","KC_3","KC_4","KC_5","KC_MINS","KC_EQL","KC_6","KC_7","KC_8","KC_9","KC_0","KC_BSPC","KC_TAB","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_LBRC","KC_RBRC","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_BSLS","LT(3,KC_CAPS)","KC_A","KC_S","KC_D","KC_F","KC_G","KC_LPRN","KC_RPRN","KC_H","KC_J","KC_K","KC_L","KC_SCLN","KC_QUOT","KC_LSFT","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_LCBR","KC_RCBR","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_SFTENT","KC_LCTL","KC_LGUI","KC_LALT","RGB_TOG","MO(4)","KC_SPC","KC_BSPC","KC_ENT","KC_SPC","KC_LEFT","KC_DOWN","KC_UP","KC_RGHT","KC_RCTL","KC_VOLU","KC_VOLD","KC_VOLU","KC_VOLD","KC_PGUP","KC_PGDN","KC_PGUP","KC_PGDN","KC_VOLD","KC_VOLU","KC_MRWD","KC_MPLY","KC_MFFD","RGB_HUI","RGB_HUD","RGB_RMOD","RGB_TOG","RGB_MOD"], + ["KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_Q","KC_W","KC_F","KC_P","KC_G","KC_TRNS","KC_TRNS","KC_J","KC_L","KC_U","KC_Y","KC_SCLN","KC_TRNS","KC_TRNS","KC_A","KC_R","KC_S","KC_T","KC_D","KC_TRNS","KC_TRNS","KC_H","KC_N","KC_E","KC_I","KC_O","KC_TRNS","KC_TRNS","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_TRNS","KC_TRNS","KC_K","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS"], + ["KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_F1","KC_F5","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_F2","KC_F6","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_TRNS","KC_TRNS","KC_A","KC_S","KC_D","KC_F","KC_G","KC_F3","KC_F7","KC_H","KC_J","KC_K","KC_L","KC_SCLN","KC_TRNS","KC_TRNS","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_F4","KC_F8","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_TRNS","KC_TRNS","KC_NO","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS"], + ["KC_TRNS","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_F11","KC_F12","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_TRNS","KC_TRNS","KC_HOME","KC_UP","KC_END","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_HOME","KC_UP","KC_END","KC_PSCR","KC_PGUP","KC_TRNS","KC_LEFT","KC_DOWN","KC_RGHT","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_LEFT","KC_DOWN","KC_RGHT","KC_INS","KC_PGDN","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","ANY(TCH_TOG)","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_MPLY","KC_MNXT","KC_MUTE","KC_VOLD","KC_VOLU","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS"], + ["KC_TRNS","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_F11","KC_F12","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_P7","KC_P8","KC_P9","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_P4","KC_P5","KC_P6","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_P1","KC_P2","KC_P3","KC_TRNS","DF(2)","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_P0","KC_PDOT","KC_NLCK","DF(0)","DF(1)","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS"] + ] +}
\ No newline at end of file diff --git a/keyboards/rgbkb/mun/rev1/rules.mk b/keyboards/rgbkb/mun/rev1/rules.mk new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/rgbkb/mun/rev1/rules.mk diff --git a/keyboards/rgbkb/mun/rules.mk b/keyboards/rgbkb/mun/rules.mk new file mode 100644 index 0000000000..f016c6c710 --- /dev/null +++ b/keyboards/rgbkb/mun/rules.mk @@ -0,0 +1,46 @@ +# MCU name +MCU = STM32F303 + +# Touch encoder needs +SRC += ../common/touch_encoder.c +SRC += ../common/common_oled.c +QUANTUM_LIB_SRC += i2c_master.c + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +WS2812_DRIVER = pwm +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +OLED_DRIVER_ENABLE = yes # Enable the OLED Driver + +ENCODER_ENABLE = yes + +SPLIT_KEYBOARD = yes +SERIAL_DRIVER = usart +LTO_ENABLE = yes +OPT = 3 + +OPT_DEFS += -DOLED_FONT_H=\"../common/glcdfont.c\" +OPT_DEFS += -Ikeyboards/rgbkb/common + +CUSTOM_MATRIX = yes +SRC += matrix.c matrix_common.c + +DEFAULT_FOLDER = rgbkb/mun/rev1
\ No newline at end of file diff --git a/keyboards/rgbkb/sol/rev2/config.h b/keyboards/rgbkb/sol/rev2/config.h index 6613b447b2..360ccbc762 100644 --- a/keyboards/rgbkb/sol/rev2/config.h +++ b/keyboards/rgbkb/sol/rev2/config.h @@ -28,23 +28,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* ws2812 RGB LED */ #define RGB_DI_PIN B7 -#define BACKLIGHT_LEDS 124 - +// Underglow / DIY Tent Glow are parallel to the top row leds, no separate define #ifdef FULLHAND_ENABLE - #define FULLHAND_LEDS 24 + #ifdef LED_MIRRORED + #define RGBLED_NUM 74 + #else + #define RGBLED_NUM 148 + #endif #elif SF_ENABLE - #define FULLHAND_LEDS 38 + #ifdef LED_MIRRORED + #define RGBLED_NUM 81 + #else + #define RGBLED_NUM 162 + #endif #else - #define FULLHAND_LEDS 0 + #define RGBLED_NUM 0 #endif -// Underglow / DIY Tent Glow are parallel to the top row leds, no separate define - -#ifdef LED_MIRRORED - #define RGBLED_NUM ((BACKLIGHT_LEDS + FULLHAND_LEDS) / 2) -#else - #define RGBLED_NUM (BACKLIGHT_LEDS + FULLHAND_LEDS) -#endif #define DRIVER_LED_TOTAL RGBLED_NUM #define RGB_MATRIX_CENTER { 112, 37 } diff --git a/keyboards/sendyyeah/75pixels/info.json b/keyboards/sendyyeah/75pixels/info.json index 20d158cf74..d952cac134 100644 --- a/keyboards/sendyyeah/75pixels/info.json +++ b/keyboards/sendyyeah/75pixels/info.json @@ -7,7 +7,7 @@ "layouts": { "LAYOUT_ortho_5x15": { "layout": [ - {"label": "Esc", "X": 0, "y": 0}, + {"label": "Esc", "x": 0, "y": 0}, {"label": "1", "x": 1, "y": 0}, {"label": "2", "x": 2, "y": 0}, {"label": "3", "x": 3, "y": 0}, @@ -22,21 +22,21 @@ {"label": "NumLock", "x": 12, "y": 0}, {"label": "/", "x": 13, "y": 0}, {"label": "*", "x": 14, "y": 0}, - {"label": "Tab", "X": 0, "y": 1}, - {"label": "Q", "X": 1, "y": 1}, - {"label": "W", "X": 2, "y": 1}, - {"label": "E", "X": 3, "y": 1}, - {"label": "R", "X": 4, "y": 1}, - {"label": "T", "X": 5, "y": 1}, - {"label": "Y", "X": 6, "y": 1}, - {"label": "U", "X": 7, "y": 1}, - {"label": "I", "X": 8, "y": 1}, - {"label": "O", "X": 9, "y": 1}, - {"label": "P", "X": 10, "y": 1}, - {"label": "|\n\\", "X": 11, "y": 1}, - {"label": "7\nHome", "X": 12, "y": 1}, - {"label": "8\nUp", "X": 13, "y": 1}, - {"label": "9\nPgUp", "X": 14, "y": 1}, + {"label": "Tab", "x": 0, "y": 1}, + {"label": "Q", "x": 1, "y": 1}, + {"label": "W", "x": 2, "y": 1}, + {"label": "E", "x": 3, "y": 1}, + {"label": "R", "x": 4, "y": 1}, + {"label": "T", "x": 5, "y": 1}, + {"label": "Y", "x": 6, "y": 1}, + {"label": "U", "x": 7, "y": 1}, + {"label": "I", "x": 8, "y": 1}, + {"label": "O", "x": 9, "y": 1}, + {"label": "P", "x": 10, "y": 1}, + {"label": "|\n\\", "x": 11, "y": 1}, + {"label": "7\nHome", "x": 12, "y": 1}, + {"label": "8\nUp", "x": 13, "y": 1}, + {"label": "9\nPgUp", "x": 14, "y": 1}, {"label": "Caps", "x": 0, "y": 2}, {"label": "A", "x": 1, "y": 2}, {"label": "S", "x": 2, "y": 2}, @@ -67,21 +67,21 @@ {"label": "1\nEnd", "x": 12, "y": 3}, {"label": "2\nDown", "x": 13, "y": 3}, {"label": "3\nPgDn", "x": 14, "y": 3}, - {"label": "Ctrl", "X": 0, "y": 4}, - {"label": "Win", "X": 1, "y": 4}, - {"label": "Alt", "X": 2, "y": 4}, - {"label": "Fn", "X": 3, "y": 4}, - {"label": "Lower", "X": 4, "y": 4}, - {"label": "Space", "X": 5, "y": 4}, - {"label": "Space", "X": 6, "y": 4}, - {"label": "Raise", "X": 7, "y": 4}, - {"label": "Alt", "X": 8, "y": 4}, - {"label": "Win", "X": 9, "y": 4}, - {"label": "Menu", "X": 10, "y": 4}, - {"label": "Ctrl", "X": 11, "y": 4}, - {"label": "0\nIns", "X": 12, "y": 4}, - {"label": ".\nDel", "X": 13, "y": 4}, - {"label": "Enter", "X": 14, "y": 4} + {"label": "Ctrl", "x": 0, "y": 4}, + {"label": "Win", "x": 1, "y": 4}, + {"label": "Alt", "x": 2, "y": 4}, + {"label": "Fn", "x": 3, "y": 4}, + {"label": "Lower", "x": 4, "y": 4}, + {"label": "Space", "x": 5, "y": 4}, + {"label": "Space", "x": 6, "y": 4}, + {"label": "Raise", "x": 7, "y": 4}, + {"label": "Alt", "x": 8, "y": 4}, + {"label": "Win", "x": 9, "y": 4}, + {"label": "Menu", "x": 10, "y": 4}, + {"label": "Ctrl", "x": 11, "y": 4}, + {"label": "0\nIns", "x": 12, "y": 4}, + {"label": ".\nDel", "x": 13, "y": 4}, + {"label": "Enter", "x": 14, "y": 4} ] } } diff --git a/keyboards/setta21/keymaps/salicylic/config.h b/keyboards/setta21/keymaps/salicylic/config.h index 44b34aa2fd..06e23ba7a3 100644 --- a/keyboards/setta21/keymaps/salicylic/config.h +++ b/keyboards/setta21/keymaps/salicylic/config.h @@ -27,7 +27,7 @@ # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) // # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 @@ -37,4 +37,3 @@ # define RGB_MATRIX_VAL_STEP 5 # define RGB_MATRIX_SPD_STEP 10 #endif - diff --git a/keyboards/shk9/rules.mk b/keyboards/shk9/rules.mk index 8d356cbd1a..5f1b6954ee 100644 --- a/keyboards/shk9/rules.mk +++ b/keyboards/shk9/rules.mk @@ -20,5 +20,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output - -LAYOUTS = ortho_3x3
\ No newline at end of file diff --git a/keyboards/sofle/keymaps/devdev/config.h b/keyboards/sofle/keymaps/devdev/config.h index 7d597d991a..32d0717352 100644 --- a/keyboards/sofle/keymaps/devdev/config.h +++ b/keyboards/sofle/keymaps/devdev/config.h @@ -1,18 +1,18 @@ /* Copyright 2021 Dane Evans - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ #pragma once @@ -29,7 +29,7 @@ #define CUSTOM_FONT -#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding +#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding #define TAPPING_FORCE_HOLD @@ -56,7 +56,7 @@ #ifdef RGBLIGHT_ENABLE #undef RGBLED_NUM - + //#define RGBLIGHT_ANIMATIONS //#define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD @@ -68,11 +68,11 @@ //#define RGBLIGHT_EFFECT_RGB_TEST //#define RGBLIGHT_EFFECT_ALTERNATING //#define RGBLIGHT_EFFECT_TWINKLE - + #define RGBLED_NUM 70 //#define RGBLED_SPLIT - #define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet - + #define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet + //#define RGBLED_NUM 30 #define RGBLIGHT_LIMIT_VAL 120 #define RGBLIGHT_HUE_STEP 10 @@ -84,11 +84,11 @@ # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT @@ -127,4 +127,4 @@ // # define DISABLE_RGB_MATRIX_MULTISPLASH // # define DISABLE_RGB_MATRIX_SOLID_SPLASH // # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#endif
\ No newline at end of file +#endif diff --git a/keyboards/sofle/keymaps/killmaster/config.h b/keyboards/sofle/keymaps/killmaster/config.h new file mode 100644 index 0000000000..2e6abe84e3 --- /dev/null +++ b/keyboards/sofle/keymaps/killmaster/config.h @@ -0,0 +1,64 @@ +/* Copyright 2021 Carlos Martins + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +/* The way how "handedness" is decided (which half is which), +see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness +for more options. +*/ + +#define RGB_DI_PIN D3 + +#ifdef RGB_MATRIX_ENABLE + +#define RGBLED_NUM 72 +#define DRIVER_LED_TOTAL RGBLED_NUM +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +#define RGB_MATRIX_HUE_STEP 8 +#define RGB_MATRIX_SAT_STEP 8 +#define RGB_MATRIX_VAL_STEP 8 +#define RGB_MATRIX_SPD_STEP 10 +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_SPLIT {36,36} +#define SPLIT_TRANSPORT_MIRROR + +#endif + +#ifdef RGBLIGHT_ENABLE +#define RGBLIGHT_SPLIT +#define RGBLED_NUM 70 +#define RGB_SPLIT {36,36} +#define RGBLIGHT_LIMIT_VAL 120 +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING + //#define RGBLIGHT_EFFECT_RAINBOW_MOOD + //#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +#define MEDIA_KEY_DELAY 2 + +#define USB_POLLING_INTERVAL_MS 1 +#define QMK_KEYS_PER_SCAN 12 diff --git a/keyboards/sofle/keymaps/killmaster/keymap.c b/keyboards/sofle/keymaps/killmaster/keymap.c new file mode 100644 index 0000000000..950dee36b1 --- /dev/null +++ b/keyboards/sofle/keymaps/killmaster/keymap.c @@ -0,0 +1,403 @@ +/* Copyright 2021 Carlos Martins + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H +#include <stdio.h> + +enum sofle_layers { + /* _M_XYZ = Mac Os, _W_XYZ = Win/Linux */ + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + KC_QWERTY = SAFE_RANGE, + KC_LOWER, + KC_RAISE, + KC_ADJUST, + KC_PRVWD, + KC_NXTWD, + KC_LSTRT, + KC_LEND, + KC_DLINE +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Space / \Enter \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + +[_QWERTY] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, KC_MPLY,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LGUI,KC_LALT,KC_LCTRL, KC_LOWER, KC_SPC, KC_ENT, KC_RAISE, KC_RCTRL, KC_RALT, KC_RGUI +), +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | | | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * | Shift| = | - | + | { | } |-------| |-------| [ | ] | ; | : | \ | Shift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ +[_LOWER] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, + _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +/* RAISE + * ,----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | Ins | Pscr | Menu | |RGBTog| | | PWrd | Up | NWrd | DLine| Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | LAt | LCtl |LShift| | Caps |-------. ,-------| | Left | Down | Rigth| Del | Bspc | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * |Shift | Undo | Cut | Copy | Paste| |-------| |-------| | LStr | | LEnd | | Shift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ +[_RAISE] = LAYOUT( + _______, _______ , _______ , _______ , RGB_RMOD , RGB_MOD, _______, _______ , _______, _______ , _______ ,_______, + _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, RGB_TOG, KC_PGUP, KC_PRVWD, KC_UP, KC_NXTWD,KC_DLINE, KC_BSPC, + _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, + _______,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, KC_LSTRT, XXXXXXX, KC_LEND, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +/* ADJUST + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | RESET| |QWERTY|COLEMAK| | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | |MACWIN| | | |-------. ,-------| | VOLDO| MUTE | VOLUP| | | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | PREV | PLAY | NEXT | | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + [_ADJUST] = LAYOUT( + XXXXXXX , XXXXXXX, XXXXXXX , XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RESET , XXXXXXX, KC_QWERTY, XXXXXXX , CG_TOGG,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX , XXXXXXX,CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, + XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +#ifdef OLED_DRIVER_ENABLE + +static void render_logo(void) { + static const char PROGMEM bananas_logo[] = { + // 'killmaster_bananas', 128x32px + 0x00, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xe0, 0x02, 0x0e, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0x00, 0x00, 0x80, 0xc0, 0x40, 0x00, 0x00, 0x00, 0x40, 0x40, 0xd8, 0xc8, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x08, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf8, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xc0, 0x40, 0x40, 0xc0, 0x80, 0x40, 0xc0, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0xc0, 0x40, 0x00, 0x00, 0x40, 0x40, 0xf0, + 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x00, + 0x40, 0xc0, 0x80, 0x40, 0x40, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x0f, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xf0, + 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, + 0x02, 0x07, 0x0d, 0x10, 0x20, 0x20, 0x00, 0x00, 0x20, 0x20, 0x3f, 0x3f, 0x20, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x1f, 0x3f, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x3f, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x1c, 0x36, 0x22, 0x22, 0x22, + 0x1f, 0x20, 0x00, 0x00, 0x10, 0x23, 0x22, 0x22, 0x26, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x1f, + 0x30, 0x20, 0x20, 0x20, 0x00, 0x00, 0x0f, 0x1f, 0x32, 0x22, 0x22, 0x32, 0x23, 0x00, 0x00, 0x00, + 0x20, 0x3f, 0x21, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, + 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3e, 0x3e, 0x1c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + oled_write_raw_P(bananas_logo, sizeof(bananas_logo)); +} + +static void print_status_narrow(void) { + // Print current mode + oled_write_P(PSTR("Sofle"), false); + oled_write_P(PSTR("\n\n\n"), false); + switch (get_highest_layer(default_layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("QWERT"), false); + break; + default: + oled_write_P(PSTR("Undef"), false); + } + oled_write_P(PSTR("\n\n"), false); + // Print current layer + oled_write_ln_P(PSTR("Layer"), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Base\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("Raise"), false); + break; + case _LOWER: + oled_write_P(PSTR("Lower"), false); + break; + case _ADJUST: + oled_write_P(PSTR("Adj\n"), false); + break; + default: + oled_write_ln_P(PSTR("Undef"), false); + } + oled_write_P(PSTR("\n\n"), false); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) { + return OLED_ROTATION_270; + } + else { + return OLED_ROTATION_180; + } + return rotation; +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + print_status_narrow(); + } else { + render_logo(); + } +} + + + +#endif // OLED_DRIVER_ENABLE + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case KC_LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case KC_RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case KC_ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + case KC_PRVWD: + if (record->event.pressed) { + if (keymap_config.swap_lctl_lgui) { + register_mods(mod_config(MOD_LALT)); + register_code(KC_LEFT); + } else { + register_mods(mod_config(MOD_LCTL)); + register_code(KC_LEFT); + } + } else { + if (keymap_config.swap_lctl_lgui) { + unregister_mods(mod_config(MOD_LALT)); + unregister_code(KC_LEFT); + } else { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_LEFT); + } + } + break; + case KC_NXTWD: + if (record->event.pressed) { + if (keymap_config.swap_lctl_lgui) { + register_mods(mod_config(MOD_LALT)); + register_code(KC_RIGHT); + } else { + register_mods(mod_config(MOD_LCTL)); + register_code(KC_RIGHT); + } + } else { + if (keymap_config.swap_lctl_lgui) { + unregister_mods(mod_config(MOD_LALT)); + unregister_code(KC_RIGHT); + } else { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_RIGHT); + } + } + break; + case KC_LSTRT: + if (record->event.pressed) { + if (keymap_config.swap_lctl_lgui) { + //CMD-arrow on Mac, but we have CTL and GUI swapped + register_mods(mod_config(MOD_LCTL)); + register_code(KC_LEFT); + } else { + register_code(KC_HOME); + } + } else { + if (keymap_config.swap_lctl_lgui) { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_LEFT); + } else { + unregister_code(KC_HOME); + } + } + break; + case KC_LEND: + if (record->event.pressed) { + if (keymap_config.swap_lctl_lgui) { + //CMD-arrow on Mac, but we have CTL and GUI swapped + register_mods(mod_config(MOD_LCTL)); + register_code(KC_RIGHT); + } else { + register_code(KC_END); + } + } else { + if (keymap_config.swap_lctl_lgui) { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_RIGHT); + } else { + unregister_code(KC_END); + } + } + break; + case KC_DLINE: + if (record->event.pressed) { + register_mods(mod_config(MOD_LCTL)); + register_code(KC_BSPC); + } else { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_BSPC); + } + break; + } + return true; +} + +#ifdef ENCODER_ENABLE + +bool encoder_update_user(uint8_t index, bool clockwise) { + uint8_t temp_mod = get_mods(); + uint8_t temp_osm = get_oneshot_mods(); + bool is_ctrl = (temp_mod | temp_osm) & MOD_MASK_CTRL; + bool is_shift = (temp_mod | temp_osm) & MOD_MASK_SHIFT; + + if (is_shift) { + if (index == 0) { /* First encoder */ + if (clockwise) { + rgb_matrix_increase_hue(); + } else { + rgb_matrix_decrease_hue(); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + rgb_matrix_decrease_sat(); + } else { + rgb_matrix_increase_sat(); + } + } + } else if (is_ctrl) { + if (index == 0) { /* First encoder */ + if (clockwise) { + rgb_matrix_increase_val(); + } else { + rgb_matrix_decrease_val(); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + rgb_matrix_increase_speed(); + } else { + rgb_matrix_decrease_speed(); + } + } + } else { + if (index == 1) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGUP); + // tap_code(KC_MS_WH_UP); + } else { + tap_code(KC_PGDOWN); + // tap_code(KC_MS_WH_DOWN); + } + } else if (index == 0) { /* Second encoder */ + uint16_t mapped_code = 0; + if (clockwise) { + mapped_code = KC_VOLD; + } else { + mapped_code = KC_VOLU; + } + tap_code_delay(mapped_code, MEDIA_KEY_DELAY); + } + } + return true; +} + +#endif diff --git a/keyboards/sofle/keymaps/killmaster/readme.md b/keyboards/sofle/keymaps/killmaster/readme.md new file mode 100644 index 0000000000..6d6dea228c --- /dev/null +++ b/keyboards/sofle/keymaps/killmaster/readme.md @@ -0,0 +1,19 @@ +![SofleKeyboard default keymap](https://github.com/josefadamcik/SofleKeyboard/raw/master/Images/soflekeyboard.png) +![SofleKeyboard adjust layer](https://github.com/josefadamcik/SofleKeyboard/raw/master/Images/soflekeyboard_layout_adjust.png) + + +# Default keymap for Sofle Keyboard + +Layout in [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/#/gists/76efb423a46cbbea75465cb468eef7ff) and [adjust layer](http://www.keyboard-layout-editor.com/#/gists/4bcf66f922cfd54da20ba04905d56bd4) + + +Features: + +- Symmetric modifiers (CMD/Super, Alt/Opt, Ctrl, Shift) +- Various modes, can be switched (using Adjust layer and the selected one is stored in EEPROM. +- Modes for Qwerty and Colemak support +- Modes for Mac vs Linux/Win support -> different order of modifiers and different action shortcuts on the "UPPER" layer (the red one in the image). Designed to simplify transtions when switching between operating systems often. +- The OLED on master half shows selected mode and caps lock state and is rotated. +- Left encoder controls volume up/down/mute. Right encoder PGUP/PGDOWN. + + diff --git a/keyboards/sofle/keymaps/killmaster/rules.mk b/keyboards/sofle/keymaps/killmaster/rules.mk new file mode 100644 index 0000000000..38d6114506 --- /dev/null +++ b/keyboards/sofle/keymaps/killmaster/rules.mk @@ -0,0 +1,4 @@ +EXTRAKEY_ENABLE = yes +LTO_ENABLE = yes +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 diff --git a/keyboards/sofle/keymaps/rgb_default/config.h b/keyboards/sofle/keymaps/rgb_default/config.h index 7d597d991a..32d0717352 100644 --- a/keyboards/sofle/keymaps/rgb_default/config.h +++ b/keyboards/sofle/keymaps/rgb_default/config.h @@ -1,18 +1,18 @@ /* Copyright 2021 Dane Evans - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ #pragma once @@ -29,7 +29,7 @@ #define CUSTOM_FONT -#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding +#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding #define TAPPING_FORCE_HOLD @@ -56,7 +56,7 @@ #ifdef RGBLIGHT_ENABLE #undef RGBLED_NUM - + //#define RGBLIGHT_ANIMATIONS //#define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD @@ -68,11 +68,11 @@ //#define RGBLIGHT_EFFECT_RGB_TEST //#define RGBLIGHT_EFFECT_ALTERNATING //#define RGBLIGHT_EFFECT_TWINKLE - + #define RGBLED_NUM 70 //#define RGBLED_SPLIT - #define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet - + #define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet + //#define RGBLED_NUM 30 #define RGBLIGHT_LIMIT_VAL 120 #define RGBLIGHT_HUE_STEP 10 @@ -84,11 +84,11 @@ # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT @@ -127,4 +127,4 @@ // # define DISABLE_RGB_MATRIX_MULTISPLASH // # define DISABLE_RGB_MATRIX_SOLID_SPLASH // # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#endif
\ No newline at end of file +#endif diff --git a/keyboards/sofle/rev1/readme.md b/keyboards/sofle/rev1/readme.md new file mode 100644 index 0000000000..629d568e60 --- /dev/null +++ b/keyboards/sofle/rev1/readme.md @@ -0,0 +1,27 @@ +# Sofle Keyboard + +![SofleKeyboard version 1](https://raw.githubusercontent.com/josefadamcik/SofleKeyboard/master/Images/IMG_20200126_114622.jpg) + +Sofle is 6×4+5 keys column-staggered split keyboard. Based on Lily58, Corne and Helix keyboards. + +More details about the keyboard on my blog: [Let me introduce you SofleKeyboard - a split keyboard based on Lily58 and Crkbd](https://josef-adamcik.cz/electronics/let-me-introduce-you-sofle-keyboard-split-keyboard-based-on-lily58.html) + +The current (temporary) build guide and a build log is available here: [SofleKeyboard build log/guide](https://josef-adamcik.cz/electronics/soflekeyboard-build-log-and-build-guide.html) + +* Keyboard Maintainer: [Josef Adamcik](https://josef-adamcik.cz) [Twitter:@josefadamcik](https://twitter.com/josefadamcik) +* Hardware Supported: SofleKeyboard PCB, ProMicro +* Hardware Availability: [PCB & Case Data](https://github.com/josefadamcik/SofleKeyboard) + +Make example for this keyboard (after setting up your build environment): + + make sofle:default + +Flashing example for this keyboard: + + make sofle:default:flash + +Press reset button on he keyboard when asked. + +Disconnect the first half, connect the second one and repeat the process. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/sofle/rev1/rev1.c b/keyboards/sofle/rev1/rev1.c index bbb014c4df..88a28e6a40 100644 --- a/keyboards/sofle/rev1/rev1.c +++ b/keyboards/sofle/rev1/rev1.c @@ -1 +1,87 @@ +/* Copyright 2021 Carlos Martins + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + #include "sofle.h" + +#ifdef RGB_MATRIX_ENABLE + // Physical Layout + // Columns + // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 + // ROWS + // 12 13 22 23 32 33 33 32 23 22 13 12 0 + // 02 03 04 04 03 02 + // 11 14 21 24 31 34 34 31 24 21 14 11 1 + // 01 01 + // 10 15 20 25 30 35 35 30 25 20 15 10 2 + // + // 09 16 19 26 29 36 36 29 26 19 16 09 3 + // + // 08 17 18 27 28 28 27 18 17 08 4 + // 07 06 05 05 06 07 + +led_config_t g_led_config = { + { + { 11, 12, 21, 22, 31, 32 }, + { 10, 13, 20, 23, 30, 33 }, + { 9, 14, 19, 24, 29, 34}, + { 8, 15, 18, 25, 28, 35}, + { 7, 16, 17, 26, 27, NO_LED }, + { 47, 48, 57, 58, 67, 68}, + { 46, 49, 56, 59, 66, 69}, + { 45, 50, 55, 60, 65, 70}, + { 44, 51, 54, 61, 64, 71}, + { 43, 52, 53, 62, 63, NO_LED } + }, + { + // Left side underglow + {96, 40}, {16, 20}, {48, 10}, {80, 18}, {88, 60}, {56, 57}, {24,60}, + // Left side Matrix + {32, 57}, { 0, 48}, { 0, 36}, { 0, 24}, { 0, 12}, + {16, 12}, {16, 24}, {16, 36}, {16, 48}, {48, 55}, + {64, 57}, {32, 45}, {32, 33}, {32, 21}, {32, 9}, + {48, 7}, {48, 19}, {48, 31}, {48, 43}, {80, 59}, + {96, 64}, {64, 45}, {64, 33}, {64, 21}, {64, 9}, + {80, 10}, {80, 22}, {80, 34}, {80, 47}, + + + // Right side underglow + {128, 40}, {208, 20}, {176, 10}, {144, 18}, {136, 60}, {168, 57}, {200,60}, + // Right side Matrix + {192, 57}, {224, 48}, {224, 36}, {224, 24}, {224, 12}, + {208, 12}, {208, 24}, {208, 36}, {208, 48}, {176, 55}, + {160, 57}, {192, 45}, {192, 33}, {192, 21}, {192, 9}, + {176, 7}, {176, 19}, {176, 31}, {176, 43}, {144, 59}, + {128, 64}, {160, 45}, {160, 33}, {160, 21}, {160, 9}, + {144, 10}, {144, 22}, {144, 34}, {144, 47}, + }, + { + LED_FLAG_NONE, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_NONE, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT + } +}; +#endif diff --git a/keyboards/sowbug/68keys/config.h b/keyboards/sowbug/68keys/config.h index 92d8397288..21e3043354 100644 --- a/keyboards/sowbug/68keys/config.h +++ b/keyboards/sowbug/68keys/config.h @@ -48,7 +48,7 @@ // // #define BACKLIGHT_PIN rgb_matrix #define RGB_MATRIX_KEYPRESSES -#define DRIVER_LED_TOTAL 68 -#define RGBLED_NUM DRIVER_LED_TOTAL +#define RGBLED_NUM 68 +#define DRIVER_LED_TOTAL RGBLED_NUM #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 128 diff --git a/keyboards/sowbug/ansi_tkl/config.h b/keyboards/sowbug/ansi_tkl/config.h index e2ed0edd87..8e77245400 100644 --- a/keyboards/sowbug/ansi_tkl/config.h +++ b/keyboards/sowbug/ansi_tkl/config.h @@ -44,8 +44,8 @@ #define RGB_DI_PIN B9 #define RGB_MATRIX_KEYPRESSES -#define DRIVER_LED_TOTAL (87) -#define RGBLED_NUM (DRIVER_LED_TOTAL) +#define RGBLED_NUM 87 +#define DRIVER_LED_TOTAL RGBLED_NUM #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 128 diff --git a/keyboards/subatomic/rules.mk b/keyboards/subatomic/rules.mk index 0d77351f32..19c2ed15a1 100644 --- a/keyboards/subatomic/rules.mk +++ b/keyboards/subatomic/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/p1800fl/config.h b/keyboards/team0110/p1800fl/config.h index 793d8f19c3..75e63c75ce 100644 --- a/keyboards/handwired/p1800fl/config.h +++ b/keyboards/team0110/p1800fl/config.h @@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x3EAE #define DEVICE_VER 0x0001 -#define MANUFACTURER marhalloweenvt +#define MANUFACTURER team0110 #define PRODUCT p1800fl /* key matrix size */ @@ -51,6 +51,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 5 +/* RGB Lighting */ +#define RGB_DI_PIN C6 +#ifdef RGB_DI_PIN +# define RGBLIGHT_ANIMATIONS +# define RGBLED_NUM 8 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 255 +# define RGBLIGHT_SLEEP +#endif + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 @@ -66,6 +78,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* QMK DFU key configuration */ -#define QMK_ESC_OUTPUT C7 // usually COL -#define QMK_ESC_INPUT B6 // usually ROW
\ No newline at end of file +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0
\ No newline at end of file diff --git a/keyboards/handwired/p1800fl/info.json b/keyboards/team0110/p1800fl/info.json index 93f4e8aaeb..164f921dea 100644 --- a/keyboards/handwired/p1800fl/info.json +++ b/keyboards/team0110/p1800fl/info.json @@ -1,7 +1,7 @@ { "keyboard_name": "p1800fl", - "url": "", - "maintainer": "marhalloweenvt", + "url": "http://team0110.store/", + "maintainer": "team0110", "width": 19.5, "height": 5.25, "layouts": { diff --git a/keyboards/handwired/p1800fl/keymaps/default/keymap.c b/keyboards/team0110/p1800fl/keymaps/default/keymap.c index 03b6a1efd0..e0a3ad35c1 100644 --- a/keyboards/handwired/p1800fl/keymaps/default/keymap.c +++ b/keyboards/team0110/p1800fl/keymaps/default/keymap.c @@ -15,27 +15,20 @@ */ #include QMK_KEYBOARD_H -// Defines names for use in layer keycodes and the keymap -enum layer_names { - _BASE, - _FN -}; - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ - [_BASE] = LAYOUT( + [0] = LAYOUT( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PEQL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT ), - [_FN] = LAYOUT( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, BL_TOGG, BL_INC, KC_PAST, RESET, - _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, BL_BRTG, BL_DEC, _______, EEP_RST, - _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, _______, _______, _______, _______, + [1] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_INS, KC_HOME, KC_PGUP, _______, + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDOWN, _______, + _______, _______, BL_TOGG, BL_BRTG, BL_INC, BL_DEC, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______ - ) + ), }; diff --git a/keyboards/handwired/p1800fl/keymaps/default/readme.md b/keyboards/team0110/p1800fl/keymaps/default/readme.md index 268d399224..268d399224 100644 --- a/keyboards/handwired/p1800fl/keymaps/default/readme.md +++ b/keyboards/team0110/p1800fl/keymaps/default/readme.md diff --git a/keyboards/team0110/p1800fl/keymaps/via/keymap.c b/keyboards/team0110/p1800fl/keymaps/via/keymap.c new file mode 100644 index 0000000000..9cd55ff54c --- /dev/null +++ b/keyboards/team0110/p1800fl/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 marhalloweenvt + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PEQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_INS, KC_HOME, KC_PGUP, _______, + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDOWN, _______, + _______, _______, BL_TOGG, BL_BRTG, BL_INC, BL_DEC, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/team0110/p1800fl/keymaps/via/readme.md b/keyboards/team0110/p1800fl/keymaps/via/readme.md new file mode 100644 index 0000000000..fabc3229f3 --- /dev/null +++ b/keyboards/team0110/p1800fl/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default VIA keymap for p1800fl diff --git a/keyboards/team0110/p1800fl/keymaps/via/rules.mk b/keyboards/team0110/p1800fl/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/team0110/p1800fl/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/handwired/p1800fl/p1800fl.c b/keyboards/team0110/p1800fl/p1800fl.c index e0fc16a5e7..e0fc16a5e7 100644 --- a/keyboards/handwired/p1800fl/p1800fl.c +++ b/keyboards/team0110/p1800fl/p1800fl.c diff --git a/keyboards/handwired/p1800fl/p1800fl.h b/keyboards/team0110/p1800fl/p1800fl.h index 7b8f3dcffd..7b8f3dcffd 100644 --- a/keyboards/handwired/p1800fl/p1800fl.h +++ b/keyboards/team0110/p1800fl/p1800fl.h diff --git a/keyboards/handwired/p1800fl/readme.md b/keyboards/team0110/p1800fl/readme.md index 545bd691a4..a9f50ddb76 100644 --- a/keyboards/handwired/p1800fl/readme.md +++ b/keyboards/team0110/p1800fl/readme.md @@ -1,15 +1,15 @@ # p1800fl -![p1800fl](https://i.imgur.com/GQd28rN.jpg) +![p1800fl](https://i.imgur.com/GQd28rNh.jpg) -A 1800 Frow-less keyboard project from our local makers. +A 1800 Frow-less keyboard project from our team. -* Keyboard Maintainer: [marhalloweenvt](https://github.com/marhalloweenvt) -* Hardware Supported: p1800fl -* Hardware Availability: p1800fl +* Keyboard Maintainer: [team0110](https://github.com/team0110) +* Hardware Supported: p1800fl PCB +* Hardware Availability: http://team0110.store/ Make example for this keyboard (after setting up your build environment): - make handwired/p1800fl:default + make team0110/p1800fl:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/team0110/p1800fl/rules.mk b/keyboards/team0110/p1800fl/rules.mk new file mode 100644 index 0000000000..e2f9c83102 --- /dev/null +++ b/keyboards/team0110/p1800fl/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/terrazzo/config.h b/keyboards/terrazzo/config.h index 985110d16b..907c94ff52 100644 --- a/keyboards/terrazzo/config.h +++ b/keyboards/terrazzo/config.h @@ -83,13 +83,13 @@ so there is only one configuration. */ #ifdef LED_MATRIX_ENABLE -#define LED_DRIVER_ADDR_1 0x74 +#define LED_DRIVER_ADDR_1 0x74 #define LED_DRIVER_COUNT 1 #define DRIVER_LED_TOTAL 105 #define LED_MATRIX_ROWS 15 #define LED_MATRIX_COLS 7 #define LED_MATRIX_MAXIMUM_BRIGHTNESS 20 -#define LED_DISABLE_WHEN_USB_SUSPENDED true +#define LED_DISABLE_WHEN_USB_SUSPENDED #define DISABLE_LED_MATRIX_ALPHAS_MODS #define DISABLE_LED_MATRIX_BREATHING diff --git a/keyboards/themadnoodle/ncc1701kb/v2/rules.mk b/keyboards/themadnoodle/ncc1701kb/v2/rules.mk index 960f1d7a64..a56d969aea 100644 --- a/keyboards/themadnoodle/ncc1701kb/v2/rules.mk +++ b/keyboards/themadnoodle/ncc1701kb/v2/rules.mk @@ -29,6 +29,5 @@ MIDI_ENABLE = no # MIDI controls BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode -API_SYSEX_ENABLE = yes TAP_DANCE_ENABLE = no ENCODER_ENABLE = yes diff --git a/keyboards/themadnoodle/noodlepad/rules.mk b/keyboards/themadnoodle/noodlepad/rules.mk index 960f1d7a64..a56d969aea 100644 --- a/keyboards/themadnoodle/noodlepad/rules.mk +++ b/keyboards/themadnoodle/noodlepad/rules.mk @@ -29,6 +29,5 @@ MIDI_ENABLE = no # MIDI controls BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode -API_SYSEX_ENABLE = yes TAP_DANCE_ENABLE = no ENCODER_ENABLE = yes diff --git a/keyboards/tkc/portico/config.h b/keyboards/tkc/portico/config.h index 4a7da833f7..ef6e46658a 100644 --- a/keyboards/tkc/portico/config.h +++ b/keyboards/tkc/portico/config.h @@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # define RGB_MATRIX_LED_FLUSH_LIMIT 26 # define DEBOUNCE 3 # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN # define DISABLE_RGB_MATRIX_BAND_SAT diff --git a/keyboards/tokyo60/config.h b/keyboards/tokyokeyboard/tokyo60/config.h index 03dee74e9b..03dee74e9b 100644 --- a/keyboards/tokyo60/config.h +++ b/keyboards/tokyokeyboard/tokyo60/config.h diff --git a/keyboards/tokyo60/info.json b/keyboards/tokyokeyboard/tokyo60/info.json index 10d1bf093f..10d1bf093f 100644 --- a/keyboards/tokyo60/info.json +++ b/keyboards/tokyokeyboard/tokyo60/info.json diff --git a/keyboards/tokyo60/keymaps/default/config.h b/keyboards/tokyokeyboard/tokyo60/keymaps/default/config.h index 271f48d001..271f48d001 100644 --- a/keyboards/tokyo60/keymaps/default/config.h +++ b/keyboards/tokyokeyboard/tokyo60/keymaps/default/config.h diff --git a/keyboards/tokyo60/keymaps/default/keymap.c b/keyboards/tokyokeyboard/tokyo60/keymaps/default/keymap.c index 9139d15bc4..9139d15bc4 100644 --- a/keyboards/tokyo60/keymaps/default/keymap.c +++ b/keyboards/tokyokeyboard/tokyo60/keymaps/default/keymap.c diff --git a/keyboards/tokyo60/keymaps/swappedBottomRow/config.h b/keyboards/tokyokeyboard/tokyo60/keymaps/swappedBottomRow/config.h index 271f48d001..271f48d001 100644 --- a/keyboards/tokyo60/keymaps/swappedBottomRow/config.h +++ b/keyboards/tokyokeyboard/tokyo60/keymaps/swappedBottomRow/config.h diff --git a/keyboards/tokyo60/keymaps/swappedBottomRow/keymap.c b/keyboards/tokyokeyboard/tokyo60/keymaps/swappedBottomRow/keymap.c index 54b68f5825..54b68f5825 100644 --- a/keyboards/tokyo60/keymaps/swappedBottomRow/keymap.c +++ b/keyboards/tokyokeyboard/tokyo60/keymaps/swappedBottomRow/keymap.c diff --git a/keyboards/tokyo60/keymaps/via/keymap.c b/keyboards/tokyokeyboard/tokyo60/keymaps/via/keymap.c index ffef9af795..ffef9af795 100644 --- a/keyboards/tokyo60/keymaps/via/keymap.c +++ b/keyboards/tokyokeyboard/tokyo60/keymaps/via/keymap.c diff --git a/keyboards/tokyokeyboard/tokyo60/keymaps/via/rules.mk b/keyboards/tokyokeyboard/tokyo60/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/tokyokeyboard/tokyo60/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/tokyo60/readme.md b/keyboards/tokyokeyboard/tokyo60/readme.md index 11d4d353c3..4d4f53ef04 100644 --- a/keyboards/tokyo60/readme.md +++ b/keyboards/tokyokeyboard/tokyo60/readme.md @@ -1,15 +1,15 @@ # Tokyo60 -![Tokyo60](http://tokyokeyboard.com/wp-content/uploads/2018/02/AI7B4543_copy_page_20180215141449-1200x800.jpg) +![Tokyo60](https://i2.wp.com/tokyokeyboard.com/wp-content/uploads/2018/02/AI7B4543_copy_page_20180215141449-1200x800.jpg) Minimal hacker style mechanical keyboard designed in Tokyo. Full aluminum hi-pro construction with integrated top-plate. Cherry MX compatible. More Info at [Tokyo Keyboard](http://tokyokeyboard.com). -* Keyboard Maintainer: [Tokyo Keyboard](http://tokyokeyboard.com) -* Hardware Supported: Tokyo60 Rev.1 +* Keyboard Maintainer: [Tokyo Keyboard](https://tokyokeyboard.com) +* Hardware Supported: Tokyo60 Rev.1 - 4 * Hardware Availability: [Drop](https://drop.com/buy/massdrop-x-tokyo-keyboard-tokyo60-keyboard-kit?mode=guest_open) Make example for this keyboard (after setting up your build environment): - make tokyo60:default + make tokyokeyboard/tokyo60:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/tokyo60/rules.mk b/keyboards/tokyokeyboard/tokyo60/rules.mk index fa639b1cab..fa639b1cab 100644 --- a/keyboards/tokyo60/rules.mk +++ b/keyboards/tokyokeyboard/tokyo60/rules.mk diff --git a/keyboards/tokyo60/tokyo60.c b/keyboards/tokyokeyboard/tokyo60/tokyo60.c index 2126bb612d..2126bb612d 100644 --- a/keyboards/tokyo60/tokyo60.c +++ b/keyboards/tokyokeyboard/tokyo60/tokyo60.c diff --git a/keyboards/tokyo60/tokyo60.h b/keyboards/tokyokeyboard/tokyo60/tokyo60.h index 9eb5f3e624..9eb5f3e624 100644 --- a/keyboards/tokyo60/tokyo60.h +++ b/keyboards/tokyokeyboard/tokyo60/tokyo60.h diff --git a/keyboards/torn/rules.mk b/keyboards/torn/rules.mk index 62f9d83932..0e0914d6a4 100644 --- a/keyboards/torn/rules.mk +++ b/keyboards/torn/rules.mk @@ -21,8 +21,6 @@ OLED_DRIVER_ENABLE = yes WPM_ENABLE = yes CUSTOM_MATRIX = lite -LAYOUTS = split_3x6_4 - SRC += matrix.c \ bongocat.c \ mcp23018.c \ diff --git a/keyboards/touchpad/rules.mk b/keyboards/touchpad/rules.mk index 14aac23d49..ce30311796 100644 --- a/keyboards/touchpad/rules.mk +++ b/keyboards/touchpad/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no CUSTOM_MATRIX = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/waldo/rules.mk b/keyboards/waldo/rules.mk index db9db239d3..eae81d9bbc 100644 --- a/keyboards/waldo/rules.mk +++ b/keyboards/waldo/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/whitefox/config.h b/keyboards/whitefox/config.h index 4d7a460d26..1cdac01d07 100644 --- a/keyboards/whitefox/config.h +++ b/keyboards/whitefox/config.h @@ -62,6 +62,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LED_BRIGHTNESS_LO 100 #define LED_BRIGHTNESS_HI 255 +/* LED matrix driver */ +#define LED_DRIVER_ADDR_1 0x74 +#define LED_DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL 71 +#define LED_DISABLE_WHEN_USB_SUSPENDED + +/* i2c (for LED matrix) */ +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 +#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 +#define I2C1_BANK GPIOB +#define I2C1_SCL 0 +#define I2C1_SDA 1 + /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. * This is useful for the Windows task manager shortcut (ctrl+shift+esc). */ diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk index 771804369c..7c1d0c3def 100644 --- a/keyboards/whitefox/rules.mk +++ b/keyboards/whitefox/rules.mk @@ -25,16 +25,12 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -BACKLIGHT_DRIVER = custom -VISUALIZER_ENABLE = yes -LED_DRIVER = is31fl3731c -LED_WIDTH = 16 -LED_HEIGHT = 5 +LED_MATRIX_ENABLE = yes +LED_MATRIX_DRIVER = IS31FL3731 LAYOUTS = 65_ansi 65_ansi_blocker 65_ansi_blocker_split_bs 65_iso 65_iso_blocker 65_iso_blocker_split_bs diff --git a/keyboards/whitefox/whitefox.c b/keyboards/whitefox/whitefox.c index ea083c6e09..f10f0fd5c4 100644 --- a/keyboards/whitefox/whitefox.c +++ b/keyboards/whitefox/whitefox.c @@ -16,3 +16,79 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "whitefox.h" + +#ifdef LED_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +// The numbers in the comments are the led numbers DXX on the PCB +/* Refer to IS31 manual for these locations + * driver + * | LED address + * | | */ +// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + { 0, C1_1 }, { 0, C1_2 }, { 0, C1_3 }, { 0, C1_4 }, { 0, C1_5 }, { 0, C1_6 }, { 0, C1_7 }, { 0, C1_8 }, { 0, C2_1 }, { 0, C2_2 }, { 0, C2_3 }, { 0, C2_4 }, { 0, C2_5 }, { 0, C2_6 }, { 0, C2_7 }, { 0, C2_8 }, +// 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 + { 0, C3_1 }, { 0, C3_2 }, { 0, C3_3 }, { 0, C3_4 }, { 0, C3_5 }, { 0, C3_6 }, { 0, C3_7 }, { 0, C3_8 }, { 0, C4_1 }, { 0, C4_2 }, { 0, C4_3 }, { 0, C4_4 }, { 0, C4_5 }, { 0, C4_6 }, { 0, C4_7 }, +// 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 + { 0, C4_8 }, { 0, C5_1 }, { 0, C5_2 }, { 0, C5_3 }, { 0, C5_4 }, { 0, C5_5 }, { 0, C5_6 }, { 0, C5_7 }, { 0, C5_8 }, { 0, C6_1 }, { 0, C6_2 }, { 0, C6_3 }, { 0, C6_4 }, { 0, C6_5 }, { 0, C6_6 }, +// 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 + { 0, C6_7 }, { 0, C6_8 }, { 0, C7_1 }, { 0, C7_2 }, { 0, C7_3 }, { 0, C7_4 }, { 0, C7_5 }, { 0, C7_6 }, { 0, C7_7 }, { 0, C7_8 }, { 0, C8_1 }, { 0, C8_2 }, { 0, C8_3 }, { 0, C8_4 }, { 0, C8_5 }, +// 62 63 64 65 66 67 68 69 70 71 + { 0, C8_6 }, { 0, C8_7 }, { 0, C8_8 }, { 0, C9_1 }, { 0, C9_2 }, { 0, C9_3 }, { 0, C9_4 }, { 0, C9_5 }, { 0, C9_6 }, { 0, C9_7 }, +}; + +led_config_t g_led_config = { + { + // Key Matrix to LED Index + { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, + { 9, 10, 11, 12, 13, 14, 15, 16, 17 }, + { 18, 19, 20, 21, 22, 23, 24, 25, 26 }, + { 27, 28, 29, 30, 31, 32, 33, 34, 35 }, + { 36, 37, 38, 39, 40, 41, 42, 43, 44 }, + { 45, 46, 47, 48, 49, 50, 51, 52, 53 }, + { 54, 55, 56, 57, 58, 59, 60, 61, 62 }, + { 63, 64, 65, 66, 67, 68, 69, 70, NO_LED }, + }, { + // LED Index to Physical Position + { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 119, 0 }, { 134, 0 }, { 149, 0 }, { 164, 0 }, { 179, 0 }, { 194, 0 }, { 209, 0 }, { 224, 0 }, + { 4, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 205, 16 }, { 224, 16 }, + { 6, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 175, 32 }, { 190, 32 }, { 207, 32 }, { 224, 32 }, + { 2, 48 }, { 19, 48 }, { 34, 48 }, { 49, 48 }, { 63, 48 }, { 78, 48 }, { 93, 48 }, { 108, 48 }, { 123, 48 }, { 138, 48 }, { 153, 48 }, { 168, 48 }, { 189, 48 }, { 209, 48 }, { 224, 48 }, + { 2, 64 }, { 21, 64 }, { 39, 64 }, { 95, 64 }, { 149, 64 }, { 164, 64 }, { 179, 64 }, { 194, 64 }, { 209, 64 }, { 224, 64 } + }, { + // LED Index to Flag + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + } +}; +#endif + +void keyboard_pre_init_kb(void) { +#ifdef LED_MATRIX_ENABLE + // Turn on LED controller + setPinOutput(B16); + writePinHigh(B16); +#endif + keyboard_pre_init_user(); +} + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + +#ifdef LED_MATRIX_ENABLE + /* + * Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c), + * and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot. + */ +# if !defined(LED_MATRIX_STARTUP_SPD) +# define LED_MATRIX_STARTUP_SPD UINT8_MAX / 2 +# endif + led_matrix_set_speed(LED_MATRIX_STARTUP_SPD), + led_matrix_set_flags(LED_FLAG_ALL); +#endif + + matrix_init_user(); +} diff --git a/keyboards/xbows/nature/config.h b/keyboards/xbows/nature/config.h index c1ff793352..e321f7ee1e 100644 --- a/keyboards/xbows/nature/config.h +++ b/keyboards/xbows/nature/config.h @@ -35,7 +35,7 @@ # define RGB_MATRIX_LED_PROCESS_LIMIT 18 # define RGB_MATRIX_LED_FLUSH_LIMIT 16 # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/xbows/woody/config.h b/keyboards/xbows/woody/config.h index 7f396d0008..ea27508da8 100644 --- a/keyboards/xbows/woody/config.h +++ b/keyboards/xbows/woody/config.h @@ -16,10 +16,10 @@ #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define DEBOUNCE 3 #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN #define DISABLE_RGB_MATRIX_BAND_SAT #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT @@ -40,4 +40,4 @@ #define DRIVER_1_LED_TOTAL 35 #define DRIVER_2_LED_TOTAL 32 #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -#endif
\ No newline at end of file +#endif diff --git a/keyboards/xd75/keymaps/cbbrowne/rules.mk b/keyboards/xd75/keymaps/cbbrowne/rules.mk index eb2f870634..ca52524894 100644 --- a/keyboards/xd75/keymaps/cbbrowne/rules.mk +++ b/keyboards/xd75/keymaps/cbbrowne/rules.mk @@ -14,7 +14,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -API_SYSEX_ENABLE = no # Enable SYSEX API (+5390) # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/xw60/rules.mk b/keyboards/xw60/rules.mk index b8629daeb8..7486c74c36 100644 --- a/keyboards/xw60/rules.mk +++ b/keyboards/xw60/rules.mk @@ -27,7 +27,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no HAPTIC_ENABLE += SOLENOID # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/ymdk/np24/u4rgb6/rules.mk b/keyboards/ymdk/np24/u4rgb6/rules.mk index 625a433f92..d05a2a589b 100644 --- a/keyboards/ymdk/np24/u4rgb6/rules.mk +++ b/keyboards/ymdk/np24/u4rgb6/rules.mk @@ -21,4 +21,4 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -LAYOUTS = ortho_6x4 numpad_6x4 ortho_4x6 +LAYOUTS = ortho_6x4 numpad_6x4 diff --git a/keyboards/yncognito/batpad/config.h b/keyboards/yncognito/batpad/config.h index 02c84a514a..7ca4072e07 100644 --- a/keyboards/yncognito/batpad/config.h +++ b/keyboards/yncognito/batpad/config.h @@ -47,13 +47,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_DI_PIN B5 #define DRIVER_LED_TOTAL 8 -#define RGB_MATRIX_KEYPRESSES -#define RGB_MATRIX_KEYRELEASES +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_KEYRELEASES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_DISABLE_AFTER_TIMEOUT 0 -#define RGB_DISABLE_WHEN_USB_SUSPENDED false -#define RGB_MATRIX_LED_FLUSH_LIMIT 16 -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 +#define RGB_DISABLE_AFTER_TIMEOUT 0 +// #define RGB_DISABLE_WHEN_USB_SUSPENDED +#define RGB_MATRIX_LED_FLUSH_LIMIT 16 +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL - - |