diff options
Diffstat (limited to 'keyboards')
953 files changed, 11040 insertions, 8728 deletions
diff --git a/keyboards/0xcb/1337/keymaps/conor/keymap.c b/keyboards/0xcb/1337/keymaps/conor/keymap.c index 63c3ea9f58..615ca7baf8 100644 --- a/keyboards/0xcb/1337/keymaps/conor/keymap.c +++ b/keyboards/0xcb/1337/keymaps/conor/keymap.c @@ -168,7 +168,7 @@ static void render_rgbled_status(bool) { oled_write_ln_P(PSTR("\n"), false); } } -void oled_task_user(void) { +bool oled_task_user(void) { static bool finished_timer = false; if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) { render_logo(); @@ -181,5 +181,6 @@ void oled_task_user(void) { render_rgbled_status(true); render_logo_font(); } + return false; } #endif diff --git a/keyboards/0xcb/1337/keymaps/default/keymap.c b/keyboards/0xcb/1337/keymaps/default/keymap.c index b79ecb767e..751af6f4f7 100644 --- a/keyboards/0xcb/1337/keymaps/default/keymap.c +++ b/keyboards/0xcb/1337/keymaps/default/keymap.c @@ -159,7 +159,7 @@ static void render_rgbled_status(void) { oled_write_ln_P(PSTR("\n"), false); } } -void oled_task_user(void) { +bool oled_task_user(void) { static bool finished_timer = false; if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) { render_logo(); @@ -172,5 +172,6 @@ void oled_task_user(void) { render_rgbled_status(); render_logo_font(); } + return false; } #endif diff --git a/keyboards/0xcb/1337/keymaps/jakob/keymap.c b/keyboards/0xcb/1337/keymaps/jakob/keymap.c index 190fee21c6..f4a075844f 100644 --- a/keyboards/0xcb/1337/keymaps/jakob/keymap.c +++ b/keyboards/0xcb/1337/keymaps/jakob/keymap.c @@ -168,7 +168,7 @@ static void render_rgbled_status(bool) { oled_write_ln_P(PSTR("\n"), false); } } -void oled_task_user(void) { +bool oled_task_user(void) { static bool finished_timer = false; if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) { render_logo(); @@ -181,5 +181,6 @@ void oled_task_user(void) { render_rgbled_status(true); render_logo_font(); } + return false; } #endif diff --git a/keyboards/0xcb/1337/keymaps/via/keymap.c b/keyboards/0xcb/1337/keymaps/via/keymap.c index eefa67ddb6..a85670e06e 100644 --- a/keyboards/0xcb/1337/keymaps/via/keymap.c +++ b/keyboards/0xcb/1337/keymaps/via/keymap.c @@ -168,7 +168,7 @@ static void render_rgbled_status(void) { oled_write_ln_P(PSTR("\n"), false); } } -void oled_task_user(void) { +bool oled_task_user(void) { static bool finished_timer = false; if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) { render_logo(); @@ -181,5 +181,6 @@ void oled_task_user(void) { render_rgbled_status(); render_logo_font(); } + return false; } #endif diff --git a/keyboards/0xcb/static/keymaps/bongocat/keymap.c b/keyboards/0xcb/static/keymaps/bongocat/keymap.c index d7f6db08cc..acdc521847 100644 --- a/keyboards/0xcb/static/keymaps/bongocat/keymap.c +++ b/keyboards/0xcb/static/keymaps/bongocat/keymap.c @@ -262,7 +262,7 @@ static void render_cat(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { static bool finished_timer = false; if (!finished_timer && (timer_elapsed(startup_timer) < 3000)) { render_logo(); @@ -286,6 +286,7 @@ void oled_task_user(void) { render_layer(); } } + return false; } #endif diff --git a/keyboards/0xcb/static/keymaps/default/keymap.c b/keyboards/0xcb/static/keymaps/default/keymap.c index 139c257e66..4d0d14ff7e 100644 --- a/keyboards/0xcb/static/keymaps/default/keymap.c +++ b/keyboards/0xcb/static/keymaps/default/keymap.c @@ -175,7 +175,7 @@ static void render_layer(void) { oled_write_P(logo[3][2], false); } -void oled_task_user(void) { +bool oled_task_user(void) { static bool finished_timer = false; if (!finished_timer && (timer_elapsed(startup_timer) < 3000)) { render_logo(); @@ -186,5 +186,6 @@ void oled_task_user(void) { } render_layer(); } + return false; } #endif diff --git a/keyboards/0xcb/static/keymaps/via/keymap.c b/keyboards/0xcb/static/keymaps/via/keymap.c index 6bb24c1fad..62fcca1f3c 100644 --- a/keyboards/0xcb/static/keymaps/via/keymap.c +++ b/keyboards/0xcb/static/keymaps/via/keymap.c @@ -175,7 +175,7 @@ static void render_layer(void) { oled_write_P(logo[3][2], false); } -void oled_task_user(void) { +bool oled_task_user(void) { static bool finished_timer = false; if (!finished_timer && (timer_elapsed(startup_timer) < 3000)) { render_logo(); @@ -186,6 +186,7 @@ void oled_task_user(void) { } render_layer(); } + return false; } #endif diff --git a/keyboards/10bleoledhub/keymaps/default/keymap.c b/keyboards/10bleoledhub/keymaps/default/keymap.c index 84c1f10680..806d913128 100644 --- a/keyboards/10bleoledhub/keymaps/default/keymap.c +++ b/keyboards/10bleoledhub/keymaps/default/keymap.c @@ -55,7 +55,10 @@ static void render_logo(void) { } #ifdef OLED_ENABLE -void oled_task_user(void) { render_logo(); } +bool oled_task_user(void) { + render_logo(); + return false; +} #endif bool encoder_update_user(uint8_t index, bool clockwise) { diff --git a/keyboards/10bleoledhub/keymaps/via/keymap.c b/keyboards/10bleoledhub/keymaps/via/keymap.c index df7130e80b..316819acf5 100644 --- a/keyboards/10bleoledhub/keymaps/via/keymap.c +++ b/keyboards/10bleoledhub/keymaps/via/keymap.c @@ -55,7 +55,10 @@ static void render_logo(void) { } #ifdef OLED_ENABLE -void oled_task_user(void) { render_logo(); } +bool oled_task_user(void) { + render_logo(); + return false; +} #endif bool encoder_update_user(uint8_t index, bool clockwise) { diff --git a/keyboards/10bleoledhub/rules.mk b/keyboards/10bleoledhub/rules.mk index 1e036e660c..700f7e8f77 100644 --- a/keyboards/10bleoledhub/rules.mk +++ b/keyboards/10bleoledhub/rules.mk @@ -21,9 +21,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # 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 -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE OLED_ENABLE = yes OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes diff --git a/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk b/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk index 2a4ff658cf..160b3684b3 100644 --- a/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk +++ b/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk @@ -4,5 +4,6 @@ F_CPU = 8000000 # Build Options # change yes to no to disable # -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE BACKLIGHT_ENABLE = no diff --git a/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c b/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c index 77fa5b4017..ae8ad3e378 100644 --- a/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c +++ b/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c @@ -43,8 +43,8 @@ LAYOUT( ), LAYOUT( - KC_FN6, KC_FN7, KC_FN8, KC_FN9, KC_FN10, KC_FN11, KC_FN12, KC_FN13, KC_FN14, KC_FN15, KC_FN16, KC_DELETE, - _______, _______, _______, _______, _______, _______, _______, KC_FN17, KC_FN18, KC_FN19, KC_FN20, KC_FN21, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DELETE, + _______, _______, _______, _______, _______, _______, _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), diff --git a/keyboards/40percentclub/ut47/post_rules.mk b/keyboards/40percentclub/ut47/post_rules.mk new file mode 100644 index 0000000000..7051ee413d --- /dev/null +++ b/keyboards/40percentclub/ut47/post_rules.mk @@ -0,0 +1,4 @@ +ifeq ($(strip $(LED_ENABLE)), yes) + OPT_DEFS += -DLED_ENABLE + SRC += led.c +endif diff --git a/keyboards/40percentclub/ut47/rules.mk b/keyboards/40percentclub/ut47/rules.mk index 5253dcbdbd..f0c4e8e3a9 100644 --- a/keyboards/40percentclub/ut47/rules.mk +++ b/keyboards/40percentclub/ut47/rules.mk @@ -22,8 +22,3 @@ AUDIO_ENABLE = no # Audio output # custom matrix setup CUSTOM_MATRIX = yes SRC += matrix.c protocol/serial_uart.c - -ifeq ($(strip $(LED_ENABLE)), yes) - OPT_DEFS += -DLED_ENABLE - SRC += led.c -endif diff --git a/keyboards/6ball/6ball.h b/keyboards/6ball/6ball.h index 234235341d..ef73a72053 100644 --- a/keyboards/6ball/6ball.h +++ b/keyboards/6ball/6ball.h @@ -1,14 +1,10 @@ -#ifndef SIXBALL_H -#define SIXBALL_H +#pragma once #include "quantum.h" #define LAYOUT( \ - k01, k02, k03, \ - k04, k05, k06 \ -) \ -{ \ - { k02, k03, k06, k05, k04, k01 } \ -} - -#endif + k05, k00, k01, \ + k04, k03, k02 \ +) { \ + { k00, k01, k02, k03, k04, k05 } \ +} diff --git a/keyboards/6ball/config.h b/keyboards/6ball/config.h index c7d4d3354a..cc496d675a 100644 --- a/keyboards/6ball/config.h +++ b/keyboards/6ball/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -46,5 +45,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIODE_DIRECTION COL2ROW #define TAPPING_TERM 200 - -#endif diff --git a/keyboards/9key/9key.h b/keyboards/9key/9key.h index b60dc53c00..ad809da4b8 100644 --- a/keyboards/9key/9key.h +++ b/keyboards/9key/9key.h @@ -1,17 +1,13 @@ -#ifndef NINEKEY_H -#define NINEKEY_H +#pragma once #include "quantum.h" #define LAYOUT( \ - k00, k01, k02, \ - k10, k11, k12, \ - k20, k21, k22 \ -) \ -{ \ + k00, k01, k02, \ + k10, k11, k12, \ + k20, k21, k22 \ +) { \ { k00, k01, k02 }, \ { k10, k11, k12 }, \ { k20, k21, k22 } \ -} - -#endif +} diff --git a/keyboards/9key/config.h b/keyboards/9key/config.h index 3c7b4e0ad6..b0462eb50f 100644 --- a/keyboards/9key/config.h +++ b/keyboards/9key/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -45,5 +44,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIODE_DIRECTION COL2ROW #define TAPPING_TERM 200 - -#endif diff --git a/keyboards/aeboards/constellation/rev2/config.h b/keyboards/aeboards/constellation/rev2/config.h index 0780c9bf93..de42885b47 100755 --- a/keyboards/aeboards/constellation/rev2/config.h +++ b/keyboards/aeboards/constellation/rev2/config.h @@ -47,8 +47,8 @@ #define LOCKING_RESYNC_ENABLE // I2C setup -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_SCL_PAL_MODE 4 #define I2C1_SDA_PAL_MODE 4 #define I2C1_TIMINGR_PRESC 0U diff --git a/keyboards/aeboards/ext65/keymaps/default/keymap.c b/keyboards/aeboards/ext65/keymaps/default/keymap.c index 466b34539f..1f933ca1ca 100644 --- a/keyboards/aeboards/ext65/keymaps/default/keymap.c +++ b/keyboards/aeboards/ext65/keymaps/default/keymap.c @@ -89,10 +89,11 @@ void render_mod_status(uint8_t modifiers) { oled_write_ln(PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { render_layer_state(); render_keylock_status(host_keyboard_led_state()); render_mod_status(get_mods()|get_oneshot_mods()); + return false; } #endif diff --git a/keyboards/aeboards/ext65/keymaps/via/keymap.c b/keyboards/aeboards/ext65/keymaps/via/keymap.c index 466b34539f..1f933ca1ca 100644 --- a/keyboards/aeboards/ext65/keymaps/via/keymap.c +++ b/keyboards/aeboards/ext65/keymaps/via/keymap.c @@ -89,10 +89,11 @@ void render_mod_status(uint8_t modifiers) { oled_write_ln(PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { render_layer_state(); render_keylock_status(host_keyboard_led_state()); render_mod_status(get_mods()|get_oneshot_mods()); + return false; } #endif diff --git a/keyboards/aeboards/ext65/rev2/config.h b/keyboards/aeboards/ext65/rev2/config.h index 778fc3ea6c..498e345ad7 100644 --- a/keyboards/aeboards/ext65/rev2/config.h +++ b/keyboards/aeboards/ext65/rev2/config.h @@ -56,8 +56,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define WS2812_EXTERNAL_PULLUP // I2C OLED defines -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_SCL_PAL_MODE 1 #define I2C1_SDA_PAL_MODE 1 diff --git a/keyboards/aeboards/ext65/rev2/rev2.c b/keyboards/aeboards/ext65/rev2/rev2.c index ce16eb4c48..f303a122e9 100644 --- a/keyboards/aeboards/ext65/rev2/rev2.c +++ b/keyboards/aeboards/ext65/rev2/rev2.c @@ -9,7 +9,7 @@ void board_init(void) { SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); } -oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_90; // rotates the display 90 degrees } diff --git a/keyboards/ai03/orbit/orbit.h b/keyboards/ai03/orbit/orbit.h index 2ada881f3f..39f1ebb0e3 100644 --- a/keyboards/ai03/orbit/orbit.h +++ b/keyboards/ai03/orbit/orbit.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ORBIT_H -#define ORBIT_H + +#pragma once #include "quantum.h" @@ -35,29 +35,27 @@ #endif #endif +#define XXX KC_NO #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, \ + 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, \ L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45 \ -) \ -{ \ - { 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 }, \ - { KC_NO, L41, L42, L43, L44, L45, L46 }, \ - { R00, R01, R02, R03, R04, R05, R06 }, \ - { R10, R11, R12, R13, R14, R15, R16 }, \ - { R20, R21, R22, R23, R24, R25, R26 }, \ - { R30, R31, R32, R33, R34, R35, R36 }, \ - { R40, R41, R42, R43, R44, R45, KC_NO } \ +) { \ + { 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 }, \ + { XXX, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25, R26 }, \ + { R30, R31, R32, R33, R34, R35, R36 }, \ + { R40, R41, R42, R43, R44, R45, XXX } \ } extern void led_toggle(int id, bool on); void set_all_leds(bool leds[6]); extern void set_layer_indicators(uint8_t layer); - -#endif diff --git a/keyboards/aleblazer/zodiark/keymaps/default/keymap.c b/keyboards/aleblazer/zodiark/keymaps/default/keymap.c index 84953ec582..c6a81c67f9 100644 --- a/keyboards/aleblazer/zodiark/keymaps/default/keymap.c +++ b/keyboards/aleblazer/zodiark/keymaps/default/keymap.c @@ -135,12 +135,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c b/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c index 99c5c5e4ee..ca8f91f1df 100644 --- a/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c +++ b/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c @@ -138,12 +138,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/aleblazer/zodiark/keymaps/via/oled.c b/keyboards/aleblazer/zodiark/keymaps/via/oled.c index 5e4959ab2e..8642bacb05 100644 --- a/keyboards/aleblazer/zodiark/keymaps/via/oled.c +++ b/keyboards/aleblazer/zodiark/keymaps/via/oled.c @@ -67,12 +67,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/alf/dc60/dc60.h b/keyboards/alf/dc60/dc60.h index db5154a28c..710ae703ed 100644 --- a/keyboards/alf/dc60/dc60.h +++ b/keyboards/alf/dc60/dc60.h @@ -13,11 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef DC60_H -#define DC60_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The following is an example using the Planck MIT layout // The first section contains all of the arguments representing the physical @@ -25,18 +27,15 @@ // The second converts the arguments into a two-dimensional array which // represents the switch matrix. #define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KOD, KOE, \ - K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K42, K43, K45, K47, K48, K4A, K4B, K4C, K4D, K4E \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KOD, KOE }, \ - { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, KC_NO, K42, K43, KC_NO, K45, KC_NO, K47, K48, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k42, k43, k45, k47, k48, k4A, k4B, k4C, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, XXX, k42, k43, XXX, k45, XXX, k47, k48, XXX, k4A, k4B, k4C, k4D, k4E } \ } - -#endif diff --git a/keyboards/alf/x2/config.h b/keyboards/alf/x2/config.h index 2e545f1a5b..a6f4958b05 100644 --- a/keyboards/alf/x2/config.h +++ b/keyboards/alf/x2/config.h @@ -19,31 +19,33 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER ALF -#define PRODUCT X2 +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ALF +#define PRODUCT X2 /* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 /* key matrix pins */ -#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } -#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 } +#define MATRIX_ROW_PINS \ + { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS \ + { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 } #define UNUSED_PINS /* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW +#define DIODE_DIRECTION COL2ROW #define LED_CAPS_LOCK_PIN B2 -#define LED_PIN_ON_STATE 0 +#define LED_PIN_ON_STATE 0 /* number of backlight levels */ -#define BACKLIGHT_PIN B6 +#define BACKLIGHT_PIN B6 #ifdef BACKLIGHT_PIN -#define BACKLIGHT_LEVELS 3 +# define BACKLIGHT_LEVELS 3 #endif /* Set 0 if debouncing isn't needed */ @@ -57,9 +59,9 @@ #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 4 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_ANIMATIONS +# define RGBLED_NUM 4 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 #endif diff --git a/keyboards/alpha/alpha.h b/keyboards/alpha/alpha.h index 025a3ac5fb..204e03822b 100755 --- a/keyboards/alpha/alpha.h +++ b/keyboards/alpha/alpha.h @@ -1,16 +1,15 @@ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, \ - K200, K201, K202, K203, K205, K207, K208, K209 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ + k20, k21, k22, k23, k25, k27, k28, k29 \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109 }, \ - { K200, K201, K202, K203, KC_NO, K205, KC_NO, K207, K208, K209 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, XXX, k25, XXX, k27, k28, k29 } \ } - -#endif diff --git a/keyboards/alpha/config.h b/keyboards/alpha/config.h index 8c7edd5798..ae1c69656b 100755 --- a/keyboards/alpha/config.h +++ b/keyboards/alpha/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -45,5 +44,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/amj96/amj96.h b/keyboards/amj96/amj96.h index 9fcd07d5de..bd4e688360 100644 --- a/keyboards/amj96/amj96.h +++ b/keyboards/amj96/amj96.h @@ -34,5 +34,5 @@ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \ { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \ - { K60, K61, K62, K63, K64, K65, K66, XXX, K68, K69, K6A, K6B, K6C, K6D, K6E, K6F } \ + { K60, K61, K62, K63, K64, K65, K66, XXX, K68, K69, K6A, K6B, K6C, K6D, K6E, K6F } \ } diff --git a/keyboards/amjpad/amjpad.h b/keyboards/amjpad/amjpad.h index d9a0516215..976a7ab041 100644 --- a/keyboards/amjpad/amjpad.h +++ b/keyboards/amjpad/amjpad.h @@ -1,5 +1,4 @@ -#ifndef AMJPAD_H -#define ADMJPAD_H +#pragma once #include "quantum.h" @@ -24,40 +23,36 @@ // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT_numpad_6x4( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, \ - k30, k31, k32, k23, \ - k40, k41, k42, \ - k50, k52, k43 \ -) \ -{ \ - {k00, k01, k02, k03}, \ - {k10, k11, k12, k13}, \ - {k20, k21, k22, k23}, \ - {k30, k31, k32, XXX}, \ - {k40, k41, k42, k43}, \ - {k50, XXX, k52, XXX} \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k23, \ + k40, k41, k42, \ + k50, k52, k43 \ +) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, XXX }, \ + { k40, k41, k42, k43 }, \ + { k50, XXX, k52, XXX } \ } #define LAYOUT_ortho_6x4( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, k23, \ - k30, k31, k32, k33, \ - k40, k41, k42, k43, \ - k50, k51, k52, k53 \ -) \ -{ \ - {k00, k01, k02, k03}, \ - {k10, k11, k12, k13}, \ - {k20, k21, k22, k23}, \ - {k30, k31, k32, k33}, \ - {k40, k41, k42, k43}, \ - {k50, k51, k52, k53} \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43, \ + k50, k51, k52, k53 \ +) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 }, \ + { k40, k41, k42, k43 }, \ + { k50, k51, k52, k53 } \ } void matrix_init_user(void); void matrix_scan_user(void); - -#endif diff --git a/keyboards/amjpad/config.h b/keyboards/amjpad/config.h index 6bac897e73..f1d57592b5 100644 --- a/keyboards/amjpad/config.h +++ b/keyboards/amjpad/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -87,5 +86,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/anavi/macropad8/keymaps/default/keymap.c b/keyboards/anavi/macropad8/keymaps/default/keymap.c index 5b69532e1b..84be7f3c68 100644 --- a/keyboards/anavi/macropad8/keymaps/default/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/default/keymap.c @@ -22,7 +22,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_P(PSTR("Active layer: "), false); @@ -57,5 +57,6 @@ void oled_task_user(void) { snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); oled_write_ln(rgbStatusLine2, false); #endif + return false; } #endif diff --git a/keyboards/anavi/macropad8/keymaps/git/keymap.c b/keyboards/anavi/macropad8/keymaps/git/keymap.c index c1f1681ec0..9b7afb5d69 100644 --- a/keyboards/anavi/macropad8/keymaps/git/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/git/keymap.c @@ -105,7 +105,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_P(PSTR("Active layer: "), false); @@ -140,5 +140,6 @@ void oled_task_user(void) { snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); oled_write_ln(rgbStatusLine2, false); #endif + return false; } #endif diff --git a/keyboards/anavi/macropad8/keymaps/kicad/keymap.c b/keyboards/anavi/macropad8/keymaps/kicad/keymap.c index ba47550347..e75d588478 100644 --- a/keyboards/anavi/macropad8/keymaps/kicad/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/kicad/keymap.c @@ -75,7 +75,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_P(PSTR("Layer: "), false); @@ -113,5 +113,6 @@ void oled_task_user(void) { snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); oled_write_ln(rgbStatusLine2, false); #endif + return false; } #endif diff --git a/keyboards/anavi/macropad8/keymaps/kodi/keymap.c b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c index 61cedc8109..f99a22d723 100644 --- a/keyboards/anavi/macropad8/keymaps/kodi/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c @@ -41,7 +41,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_P(PSTR("Active layer: "), false); @@ -76,5 +76,6 @@ void oled_task_user(void) { snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); oled_write_ln(rgbStatusLine2, false); #endif + return false; } #endif diff --git a/keyboards/anavi/macropad8/keymaps/obs/keymap.c b/keyboards/anavi/macropad8/keymaps/obs/keymap.c index e740482bbd..1d9fd38eed 100644 --- a/keyboards/anavi/macropad8/keymaps/obs/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/obs/keymap.c @@ -58,7 +58,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_P(PSTR("Active layer: "), false); @@ -93,5 +93,6 @@ void oled_task_user(void) { snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); oled_write_ln(rgbStatusLine2, false); #endif + return false; } #endif diff --git a/keyboards/anavi/macropad8/keymaps/zoom/keymap.c b/keyboards/anavi/macropad8/keymaps/zoom/keymap.c index ef47102fa5..965bbec429 100644 --- a/keyboards/anavi/macropad8/keymaps/zoom/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/zoom/keymap.c @@ -57,7 +57,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_P(PSTR("Active layer: "), false); @@ -92,5 +92,6 @@ void oled_task_user(void) { snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); oled_write_ln(rgbStatusLine2, false); #endif + return false; } #endif diff --git a/keyboards/angel64/alpha/keymaps/default/keymap.c b/keyboards/angel64/alpha/keymaps/default/keymap.c index 802ff138bb..0f2a8dada1 100644 --- a/keyboards/angel64/alpha/keymaps/default/keymap.c +++ b/keyboards/angel64/alpha/keymaps/default/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("Layer: "), false); switch (biton32(layer_state)) { case BASE: @@ -56,5 +56,6 @@ void oled_task_user(void) { oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/angel64/rev1/keymaps/default/keymap.c b/keyboards/angel64/rev1/keymaps/default/keymap.c index ff06e418c1..7ad3964e24 100644 --- a/keyboards/angel64/rev1/keymaps/default/keymap.c +++ b/keyboards/angel64/rev1/keymaps/default/keymap.c @@ -25,10 +25,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard LED Status oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/angel64/rev1/keymaps/kakunpc/keymap.c b/keyboards/angel64/rev1/keymaps/kakunpc/keymap.c index 3780c5e745..6c5184c1b3 100644 --- a/keyboards/angel64/rev1/keymaps/kakunpc/keymap.c +++ b/keyboards/angel64/rev1/keymaps/kakunpc/keymap.c @@ -173,7 +173,7 @@ void matrix_scan_user(void) { } #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("Layer: "), false); switch (biton32(layer_state)) { case BASE: @@ -191,5 +191,6 @@ void oled_task_user(void) { oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/aplyard/aplx6/rev2/keymaps/default/keymap.c b/keyboards/aplyard/aplx6/rev2/keymaps/default/keymap.c index 5f3ec5b5dd..9c8ac545b2 100644 --- a/keyboards/aplyard/aplx6/rev2/keymaps/default/keymap.c +++ b/keyboards/aplyard/aplx6/rev2/keymaps/default/keymap.c @@ -113,8 +113,9 @@ static void render_logo(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { render_logo(); + return false; } #endif diff --git a/keyboards/arabica37/keymaps/default/keymap.c b/keyboards/arabica37/keymaps/default/keymap.c index 5a363152d7..5a7a3c2738 100644 --- a/keyboards/arabica37/keymaps/default/keymap.c +++ b/keyboards/arabica37/keymaps/default/keymap.c @@ -149,7 +149,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { void render_status(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -195,5 +195,6 @@ void oled_task_user(void) { } else { render_logo(); // Renders a static logo } + return false; } #endif diff --git a/keyboards/arch_36/keymaps/default/keymap.c b/keyboards/arch_36/keymaps/default/keymap.c index 5dff792067..797ca8798f 100644 --- a/keyboards/arch_36/keymaps/default/keymap.c +++ b/keyboards/arch_36/keymaps/default/keymap.c @@ -298,12 +298,13 @@ static void render_logo(void) { oled_write_raw_P(logo, 1024); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_logo(); } + return false; } #endif diff --git a/keyboards/arch_36/keymaps/obosob/keymap.c b/keyboards/arch_36/keymaps/obosob/keymap.c index 00e1a837ba..104ee378f5 100644 --- a/keyboards/arch_36/keymaps/obosob/keymap.c +++ b/keyboards/arch_36/keymaps/obosob/keymap.c @@ -807,12 +807,13 @@ static void render_logo(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_logo(); } + return false; } #endif diff --git a/keyboards/atreus/feather/rules.mk b/keyboards/atreus/feather/rules.mk index 35d7431539..ad0b4a5046 100644 --- a/keyboards/atreus/feather/rules.mk +++ b/keyboards/atreus/feather/rules.mk @@ -10,5 +10,6 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE CONSOLE_ENABLE = no diff --git a/keyboards/atreus62/config.h b/keyboards/atreus62/config.h index 2d4ab99c62..31baef145f 100644 --- a/keyboards/atreus62/config.h +++ b/keyboards/atreus62/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -71,5 +70,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/baguette/baguette.h b/keyboards/baguette/baguette.h index e3945bea7e..70440f7627 100644 --- a/keyboards/baguette/baguette.h +++ b/keyboards/baguette/baguette.h @@ -13,11 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef BAGUETTE_H -#define BAGUETTE_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + /* This a shortcut to help you visually see your layout. * * The first section contains all of the arguments representing the physical @@ -27,33 +29,29 @@ * represents the switch matrix. */ #define LAYOUT_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K42, K43, K47, K4B, K4C, K4D, K4E, K4F \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO }, \ - { KC_NO, KC_NO, K42, K43, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, KC_NO, K4B, K4C, K4D, K4E, K4F } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k42, k43, k47, k4B, k4C, k4D, k4E, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, XXX }, \ + { XXX, XXX, k42, k43, XXX, XXX, XXX, k47, XXX, XXX, XXX, k4B, k4C, k4D, k4E, k4F } \ } #define LAYOUT_iso( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K42, K43, K47, K4B, K4C, K4D, K4E, K4F \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, KC_NO, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, K2D, KC_NO, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO }, \ - { KC_NO, KC_NO, K42, K43, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, KC_NO, K4B, K4C, K4D, K4E, K4F } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k42, k43, k47, k4B, k4C, k4D, k4E, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, XXX, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2D, XXX, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, XXX }, \ + { XXX, XXX, k42, k43, XXX, XXX, XXX, k47, XXX, XXX, XXX, k4B, k4C, k4D, k4E, k4F } \ } - -#endif diff --git a/keyboards/bandominedoni/rgb_matrix_user.inc b/keyboards/bandominedoni/rgb_matrix_user.inc index 72f5b4f664..77ad22c1ce 100644 --- a/keyboards/bandominedoni/rgb_matrix_user.inc +++ b/keyboards/bandominedoni/rgb_matrix_user.inc @@ -9,8 +9,8 @@ bool my_party_rocks(effect_params_t* params) { RGB rgb = rgb_matrix_hsv_to_rgb(hsv); // rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); rgb_matrix_set_color_all(rgb.r, rgb.g, rgb.b); - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // RGB_MATRIX_KEYREACTIVE_ENABLED +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/keyboards/bantam44/bantam44.h b/keyboards/bantam44/bantam44.h index 38afbbdde7..f680f9eac2 100644 --- a/keyboards/bantam44/bantam44.h +++ b/keyboards/bantam44/bantam44.h @@ -1,23 +1,21 @@ -#ifndef BANTAM44_H -#define BANTAM44_H +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The following is an example using the Planck MIT layout // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38 \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, K2A }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ - { K30, K31, K32, KC_NO, K33, KC_NO, K34, KC_NO, K35, K36, K37, K38 } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k34, k36, k38, k39, k3A, k3B \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, XXX, k1B }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, XXX, k34, XXX, k36, XXX, k38, k39, k3A, k3B } \ } - -#endif diff --git a/keyboards/bantam44/config.h b/keyboards/bantam44/config.h index b468b28ccb..6cff8b2899 100644 --- a/keyboards/bantam44/config.h +++ b/keyboards/bantam44/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -72,5 +71,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/basekeys/slice/keymaps/default/keymap.c b/keyboards/basekeys/slice/keymaps/default/keymap.c index ad5e9d9ffe..c7fc3fed51 100644 --- a/keyboards/basekeys/slice/keymaps/default/keymap.c +++ b/keyboards/basekeys/slice/keymaps/default/keymap.c @@ -118,7 +118,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -142,5 +142,6 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif diff --git a/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c b/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c index 54d41cc382..203bd0804c 100644 --- a/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c +++ b/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c @@ -118,7 +118,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -142,5 +142,6 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif diff --git a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c index 55d914cbc9..375daaca95 100644 --- a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c +++ b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c @@ -202,7 +202,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -232,5 +232,6 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif diff --git a/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c b/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c index d0893ae862..fa5abd90a5 100644 --- a/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c +++ b/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c @@ -99,7 +99,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -123,5 +123,6 @@ void oled_task_user(void) { } else { render_qmk_logo(); } + return false; } #endif diff --git a/keyboards/bfake/bfake.h b/keyboards/bfake/bfake.h index 599ea0f870..59a40de2f8 100644 --- a/keyboards/bfake/bfake.h +++ b/keyboards/bfake/bfake.h @@ -15,43 +15,42 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef BFAKE_H -#define BFAKE_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT_all( \ - K61, K71, K72, K73, K74, K64, K65, K75, K76, K77, K78, K68, K66, K10, K60,\ - K11, K01, K02, K03, K04, K14, K15, K05, K06, K07, K08, K18, K16, K20, \ - K12, K21, K22, K23, K24, K34, K35, K25, K26, K27, K28, K38, K40, \ - K19, K13, K41, K42, K43, K44, K54, K55, K45, K46, K47, K58, K49, K50,\ - K09, K00, K39, K30, K59, K69, K57, K29\ -){ \ - { KC_NO, K01, K02, K03, K04, K05, K06, K07, K08, K09, K00}, \ - { KC_NO, K11, K12, K13, K14, K15, K16, KC_NO, K18, K19, K10}, \ - { KC_NO, K21, K22, K23, K24, K25, K26, K27, K28, K29, K20}, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K34, K35, KC_NO, KC_NO, K38, K39, K30}, \ - { KC_NO, K41, K42, K43, K44, K45, K46, K47, KC_NO, K49, K40}, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K54, K55, KC_NO, K57, K58, K59, K50}, \ - { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, KC_NO, K68, K69, K60}, \ - { KC_NO, K71, K72, K73, K74, K75, K76, K77, K78, KC_NO, KC_NO}, \ + k61, k71, k72, k73, k74, k64, k65, k75, k76, k77, k78, k68, k66, k1A, k6A,\ + k11, k01, k02, k03, k04, k14, k15, k05, k06, k07, k08, k18, k16, k2A, \ + k12, k21, k22, k23, k24, k34, k35, k25, k26, k27, k28, k38, k4A, \ + k19, k13, k41, k42, k43, k44, k54, k55, k45, k46, k47, k58, k49, k5A, \ + k09, k0A, k39, k3A, k59, k69, k57, k29 \ +) { \ + { XXX, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { XXX, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1A }, \ + { XXX, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A }, \ + { XXX, XXX, XXX, XXX, k34, k35, XXX, XXX, k38, k39, k3A }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47, XXX, k49, k4A }, \ + { XXX, XXX, XXX, XXX, k54, k55, XXX, k57, k58, k59, k5A }, \ + { XXX, k61, XXX, XXX, k64, k65, k66, XXX, k68, k69, k6A }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77, k78, XXX, XXX } \ } #define LAYOUT_60_ansi( \ - K61, K71, K72, K73, K74, K64, K65, K75, K76, K77, K78, K68, K66, K60,\ - K11, K01, K02, K03, K04, K14, K15, K05, K06, K07, K08, K18, K16, K20, \ - K12, K21, K22, K23, K24, K34, K35, K25, K26, K27, K28, K38, K40, \ - K19, K41, K42, K43, K44, K54, K55, K45, K46, K47, K58, K49, \ - K09, K00, K39, K30, K59, K69, K57, K29\ -){ \ - { KC_NO, K01, K02, K03, K04, K05, K06, K07, K08, K09, K00}, \ - { KC_NO, K11, K12, KC_NO, K14, K15, K16, KC_NO, K18, K19, KC_NO}, \ - { KC_NO, K21, K22, K23, K24, K25, K26, K27, K28, K29, K20}, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K34, K35, KC_NO, KC_NO, K38, K39, K30}, \ - { KC_NO, K41, K42, K43, K44, K45, K46, K47, KC_NO, K49, K40}, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K54, K55, KC_NO, K57, K58, K59, KC_NO}, \ - { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, KC_NO, K68, K69, K60}, \ - { KC_NO, K71, K72, K73, K74, K75, K76, K77, K78, KC_NO, KC_NO}, \ + k61, k71, k72, k73, k74, k64, k65, k75, k76, k77, k78, k68, k66, k6A, \ + k11, k01, k02, k03, k04, k14, k15, k05, k06, k07, k08, k18, k16, k2A, \ + k12, k21, k22, k23, k24, k34, k35, k25, k26, k27, k28, k38, k4A, \ + k19, k41, k42, k43, k44, k54, k55, k45, k46, k47, k58, k49, \ + k09, k0A, k39, k3A, k59, k69, k57, k29 \ +) { \ + { XXX, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { XXX, k11, k12, XXX, k14, k15, k16, XXX, k18, k19, XXX }, \ + { XXX, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A }, \ + { XXX, XXX, XXX, XXX, k34, k35, XXX, XXX, k38, k39, k3A }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47, XXX, k49, k4A }, \ + { XXX, XXX, XXX, XXX, k54, k55, XXX, k57, k58, k59, XXX }, \ + { XXX, k61, XXX, XXX, k64, k65, k66, XXX, k68, k69, k6A }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77, k78, XXX, XXX } \ } - -#endif diff --git a/keyboards/bigseries/1key/1key.h b/keyboards/bigseries/1key/1key.h index 3441407798..6e5ddcc760 100755 --- a/keyboards/bigseries/1key/1key.h +++ b/keyboards/bigseries/1key/1key.h @@ -14,15 +14,13 @@ 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/>. */ -#ifndef BIGSWITCH_H -#define BIGSWITCH_H + +#pragma once #include "quantum.h" #define LAYOUT( \ - K00 \ + k00 \ ) { \ - { K00 } \ + { k00 } \ } - -#endif diff --git a/keyboards/bigseries/1key/config.h b/keyboards/bigseries/1key/config.h index f26b242128..f31a7fc057 100755 --- a/keyboards/bigseries/1key/config.h +++ b/keyboards/bigseries/1key/config.h @@ -14,8 +14,8 @@ 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/>. */ -#ifndef CONFIG_H -#define CONFIG_H + +#pragma once #include "config_common.h" @@ -55,5 +55,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #endif #define RGBLIGHT_LIMIT_VAL 128 #endif - -#endif diff --git a/keyboards/bigseries/2key/2key.h b/keyboards/bigseries/2key/2key.h index dcbf2f764c..eff82fef93 100755 --- a/keyboards/bigseries/2key/2key.h +++ b/keyboards/bigseries/2key/2key.h @@ -14,15 +14,13 @@ 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/>. */ -#ifndef BIGSWITCH_H -#define BIGSWITCH_H + +#pragma once #include "quantum.h" #define LAYOUT( \ - K00, K01 \ + k00, k01 \ ) { \ - { K00, K01 } \ + { k00, k01 } \ } - -#endif diff --git a/keyboards/bigseries/2key/config.h b/keyboards/bigseries/2key/config.h index 4f75e28470..53866a15d1 100755 --- a/keyboards/bigseries/2key/config.h +++ b/keyboards/bigseries/2key/config.h @@ -14,8 +14,8 @@ 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/>. */ -#ifndef CONFIG_H -#define CONFIG_H + +#pragma once #include "config_common.h" @@ -55,5 +55,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #endif #define RGBLIGHT_LIMIT_VAL 128 #endif - -#endif diff --git a/keyboards/bigseries/3key/3key.h b/keyboards/bigseries/3key/3key.h index 6aa843c263..caee1e4551 100755 --- a/keyboards/bigseries/3key/3key.h +++ b/keyboards/bigseries/3key/3key.h @@ -14,15 +14,13 @@ 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/>. */ -#ifndef BIGSWITCH_H -#define BIGSWITCH_H + +#pragma once #include "quantum.h" #define LAYOUT( \ - K00, K01, K02 \ + k00, k01, k02 \ ) { \ - { K00, K01, K02 } \ + { k00, k01, k02 } \ } - -#endif diff --git a/keyboards/bigseries/3key/config.h b/keyboards/bigseries/3key/config.h index a4a3694542..4a474cc3d1 100755 --- a/keyboards/bigseries/3key/config.h +++ b/keyboards/bigseries/3key/config.h @@ -14,8 +14,8 @@ 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/>. */ -#ifndef CONFIG_H -#define CONFIG_H + +#pragma once #include "config_common.h" @@ -55,5 +55,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #endif #define RGBLIGHT_LIMIT_VAL 128 #endif - -#endif diff --git a/keyboards/bigseries/4key/4key.h b/keyboards/bigseries/4key/4key.h index 21373fdeda..7e9ff7a793 100755 --- a/keyboards/bigseries/4key/4key.h +++ b/keyboards/bigseries/4key/4key.h @@ -14,17 +14,15 @@ 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/>. */ -#ifndef BIGSWITCH_H -#define BIGSWITCH_H + +#pragma once #include "quantum.h" #define LAYOUT( \ - K00, K01, \ - K10, K11 \ + k00, k01, \ + k10, k11 \ ) { \ - { K00, K01 }, \ - { K10, K11 } \ + { k00, k01 }, \ + { k10, k11 } \ } - -#endif diff --git a/keyboards/bigseries/4key/config.h b/keyboards/bigseries/4key/config.h index 3e96535799..c1635022de 100755 --- a/keyboards/bigseries/4key/config.h +++ b/keyboards/bigseries/4key/config.h @@ -14,8 +14,8 @@ 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/>. */ -#ifndef CONFIG_H -#define CONFIG_H + +#pragma once #include "config_common.h" @@ -55,5 +55,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #endif #define RGBLIGHT_LIMIT_VAL 128 #endif - -#endif diff --git a/keyboards/blockey/blockey.h b/keyboards/blockey/blockey.h index fa7624be76..7b007a2e97 100644 --- a/keyboards/blockey/blockey.h +++ b/keyboards/blockey/blockey.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef BLOCKEY_H -#define BLOCKEY_H + +#pragma once #include "quantum.h" @@ -26,23 +26,20 @@ // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, \ - k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, \ - k29, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, \ - k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, \ - k55, k56, k57, k58, k59, k60, k61, k62 \ -) \ -{ \ - { k01, k02, k03, k04, k05, k06, k07 }, \ - { k15, k16, k17, k18, k19, k20, k21 }, \ - { k29, k30, k31, k32, k33, k34, k35 }, \ - { k42, k43, k44, k45, k46, k47, k48 }, \ - { k55, k56, k57, k58, XXX, XXX, k59 }, \ - { k08, k09, k10, k11, k12, k13, k14 }, \ - { k22, k23, k24, k25, k26, k27, k28 }, \ - { k36, k37, k38, k39, k40, k41, XXX }, \ - { k49, k50, k51, k52, k53, k54, XXX }, \ - { XXX, XXX, XXX, k60, k61, k62, XXX }, \ + k00, k01, k02, k03, k04, k05, k06, k50, k51, k52, k53, k54, k55, k56, \ + k10, k11, k12, k13, k14, k15, k16, k60, k61, k62, k63, k64, k65, k66, \ + k20, k21, k22, k23, k24, k25, k26, k70, k71, k72, k73, k74, k75, \ + k30, k31, k32, k33, k34, k35, k36, k80, k81, k82, k83, k84, k85, \ + k40, k41, k42, k43, k46, k93, k94, k95 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06 }, \ + { k10, k11, k12, k13, k14, k15, k16 }, \ + { k20, k21, k22, k23, k24, k25, k26 }, \ + { k30, k31, k32, k33, k34, k35, k36 }, \ + { k40, k41, k42, k43, XXX, XXX, k46 }, \ + { k50, k51, k52, k53, k54, k55, k56 }, \ + { k60, k61, k62, k63, k64, k65, k66 }, \ + { k70, k71, k72, k73, k74, k75, XXX }, \ + { k80, k81, k82, k83, k84, k85, XXX }, \ + { XXX, XXX, XXX, k93, k94, k95, XXX } \ } - -#endif diff --git a/keyboards/blockey/config.h b/keyboards/blockey/config.h index 61a7b96c24..7ad3311c71 100644 --- a/keyboards/blockey/config.h +++ b/keyboards/blockey/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -113,5 +112,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c b/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c index a9065fdfa2..eb56d11735 100644 --- a/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c +++ b/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c @@ -71,8 +71,9 @@ static void render_RIP(void) { oled_write_raw_P(my_logo, sizeof(my_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { render_RIP(); + return false; } #endif diff --git a/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c b/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c index c50e0b4b3f..f8cac50875 100644 --- a/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c +++ b/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c @@ -71,8 +71,9 @@ static void render_RIP(void) { oled_write_raw_P(my_logo, sizeof(my_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { render_RIP(); + return false; } #endif diff --git a/keyboards/boardsource/microdox/keymaps/cole/keymap.c b/keyboards/boardsource/microdox/keymaps/cole/keymap.c index 8ea96e8f91..8ff5707478 100644 --- a/keyboards/boardsource/microdox/keymaps/cole/keymap.c +++ b/keyboards/boardsource/microdox/keymaps/cole/keymap.c @@ -104,13 +104,14 @@ static void render_status(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); oled_scroll_left(); } + return false; } #endif diff --git a/keyboards/boardsource/microdox/keymaps/via/keymap.c b/keyboards/boardsource/microdox/keymaps/via/keymap.c index 96e0a024f0..e02fb0b6ee 100644 --- a/keyboards/boardsource/microdox/keymaps/via/keymap.c +++ b/keyboards/boardsource/microdox/keymaps/via/keymap.c @@ -92,13 +92,14 @@ static void render_status(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); oled_scroll_left(); } + return false; } #endif diff --git a/keyboards/boston_meetup/2019/2019.c b/keyboards/boston_meetup/2019/2019.c index fd283b087a..e558048f6a 100644 --- a/keyboards/boston_meetup/2019/2019.c +++ b/keyboards/boston_meetup/2019/2019.c @@ -14,9 +14,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "2019.h" -#include "qwiic.h" -#include "action_layer.h" -#include "haptic.h" #ifdef RGB_MATRIX_ENABLE #include "rgb_matrix.h" @@ -33,184 +30,69 @@ led_config_t g_led_config = { { } }; #endif -uint8_t *o_fb; +#ifdef OLED_ENABLE +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; } -uint16_t counterst = 0; - - - -#ifdef QWIIC_MICRO_OLED_ENABLE - -/* screen off after this many milliseconds */ -#include "timer.h" -#define ScreenOffInterval 60000 /* milliseconds */ -static uint16_t last_flush; - -volatile uint8_t led_numlock = false; -volatile uint8_t led_capslock = false; -volatile uint8_t led_scrolllock = false; - -static uint8_t layer; -static bool queue_for_send = false; -static uint8_t encoder_value = 32; - -__attribute__ ((weak)) -void draw_ui(void) { - clear_buffer(); - last_flush = timer_read(); - send_command(DISPLAYON); - -/* Boston MK title is 55 x 10 pixels */ -#define NAME_X 0 -#define NAME_Y 0 - - draw_string(NAME_X + 1, NAME_Y + 2, "BOSTON MK", PIXEL_ON, NORM, 0); - -/* Layer indicator is 41 x 10 pixels */ -#define LAYER_INDICATOR_X 60 -#define LAYER_INDICATOR_Y 0 - - draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0); - draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM); - draw_char(LAYER_INDICATOR_X + 34, LAYER_INDICATOR_Y + 2, layer + 0x30, PIXEL_ON, XOR, 0); +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + oled_write_P(PSTR("BOSTON MK LAYER"), false); + oled_advance_char(); + oled_write_char(get_highest_layer(layer_state) + 0x30, true); + + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(18, 0); + oled_write_P(PSTR("NUM"), led_state.num_lock); + oled_set_cursor(18, 1); + oled_write_P(PSTR("CAP"), led_state.caps_lock); + oled_set_cursor(18, 2); + oled_write_P(PSTR("SCR"), led_state.scroll_lock); + + uint8_t mod_state = get_mods(); + oled_set_cursor(10, 3); + oled_write_P(PSTR("S"), mod_state & MOD_MASK_SHIFT); + oled_advance_char(); + oled_write_P(PSTR("C"), mod_state & MOD_MASK_CTRL); + oled_advance_char(); + oled_write_P(PSTR("A"), mod_state & MOD_MASK_ALT); + oled_advance_char(); + oled_write_P(PSTR("G"), mod_state & MOD_MASK_GUI); + oled_advance_char(); /* Matrix display is 12 x 12 pixels */ #define MATRIX_DISPLAY_X 8 #define MATRIX_DISPLAY_Y 16 - for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - for (uint8_t y = 0; y < MATRIX_COLS; y++) { - draw_pixel(MATRIX_DISPLAY_X + y + y + 2, MATRIX_DISPLAY_Y + x + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM); - draw_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM); - draw_pixel(MATRIX_DISPLAY_X + y + y + 2, MATRIX_DISPLAY_Y + x + x + 3,(matrix_get_row(x) & (1 << y)) > 0, NORM); - draw_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 3,(matrix_get_row(x) & (1 << y)) > 0, NORM); - - } - } - draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 12, 12, PIXEL_ON, NORM); - /* hadron oled location on thumbnail */ - draw_rect_filled_soft(MATRIX_DISPLAY_X + 5, MATRIX_DISPLAY_Y + 2, 6, 2, PIXEL_ON, NORM); -/* - draw_rect_soft(0, 13, 64, 6, PIXEL_ON, NORM); - draw_line_vert(encoder_value, 13, 6, PIXEL_ON, NORM); - -*/ - -/* Mod display is 41 x 16 pixels */ -#define MOD_DISPLAY_X 60 -#define MOD_DISPLAY_Y 20 - - uint8_t mods = get_mods(); - if (mods & MOD_LSFT) { - draw_rect_filled_soft(MOD_DISPLAY_X + 0, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LCTL) { - draw_rect_filled_soft(MOD_DISPLAY_X + 10, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LALT) { - draw_rect_filled_soft(MOD_DISPLAY_X + 20, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LGUI) { - draw_rect_filled_soft(MOD_DISPLAY_X + 30, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_ON, NORM, 0); - } + // matrix + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + for (uint8_t y = 0; y < MATRIX_COLS; y++) { + bool on = (matrix_get_row(x) & (1 << y)) > 0; -/* Lock display is 23 x 32 */ -#define LOCK_DISPLAY_X 104 -#define LOCK_DISPLAY_Y 0 + // force on for oled location + if((x == 0) && (y >= (MATRIX_COLS - 2))) on = 1; - if (led_numlock == true) { - draw_rect_filled_soft(LOCK_DISPLAY_X, LOCK_DISPLAY_Y, 5 + (3 * 6), 9, PIXEL_ON, NORM); - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 1, "NUM", PIXEL_OFF, NORM, 0); - } else if (led_numlock == false) { - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 1, "NUM", PIXEL_ON, NORM, 0); - } - if (led_capslock == true) { - draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y + 11, 5 + (3 * 6), 9, PIXEL_ON, NORM); - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "CAP", PIXEL_OFF, NORM, 0); - } else if (led_capslock == false) { - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "CAP", PIXEL_ON, NORM, 0); - } - - if (led_scrolllock == true) { - draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y + 22, 5 + (3 * 6), 9, PIXEL_ON, NORM); - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 22 +1, "SCR", PIXEL_OFF, NORM, 0); - } else if (led_scrolllock == false) { - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 22 +1, "SCR", PIXEL_ON, NORM, 0); - } - send_buffer(); -} - -void led_set_user(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - if (led_numlock == false){led_numlock = true;} - } else { - if (led_numlock == true){led_numlock = false;} + oled_write_pixel(MATRIX_DISPLAY_X + y + y + 2, MATRIX_DISPLAY_Y + x + x + 2, on); + oled_write_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 2, on); + oled_write_pixel(MATRIX_DISPLAY_X + y + y + 2, MATRIX_DISPLAY_Y + x + x + 3, on); + oled_write_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 3, on); + } } - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - if (led_capslock == false){led_capslock = true;} - } else { - if (led_capslock == true){led_capslock = false;} + + // outline + for (uint8_t x = 0; x < 12; x++) { + oled_write_pixel(MATRIX_DISPLAY_X + x, MATRIX_DISPLAY_Y, true); + oled_write_pixel(MATRIX_DISPLAY_X + x, MATRIX_DISPLAY_Y + 12, true); } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - if (led_scrolllock == false){led_scrolllock = true;} - } else { - if (led_scrolllock == true){led_scrolllock = false;} + for (uint8_t y = 0; y < 12; y++) { + oled_write_pixel(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y+y, true); + oled_write_pixel(MATRIX_DISPLAY_X + 12, MATRIX_DISPLAY_Y+y, true); } -} - -uint32_t layer_state_set_kb(uint32_t state) { - state = layer_state_set_user(state); - layer = biton32(state); - queue_for_send = true; - return state; -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - queue_for_send = true; - return process_record_user(keycode, record); -} -bool encoder_update_kb(uint8_t index, bool clockwise) { - encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64; - queue_for_send = true; - return true; -} - -#endif - -void matrix_init_kb(void) { - queue_for_send = true; - matrix_init_user(); + // bodge for layer number left hand side + for (uint8_t y = 0; y < 8; y++) { + oled_write_pixel(95, 0 + y, true); + } + return false; } - -void matrix_scan_kb(void) { -if (queue_for_send) { -#ifdef QWIIC_MICRO_OLED_ENABLE - draw_ui(); #endif - queue_for_send = false; - } -#ifdef QWIIC_MICRO_OLED_ENABLE - if (timer_elapsed(last_flush) > ScreenOffInterval) { - send_command(DISPLAYOFF); /* 0xAE */ - } -#endif - if (counterst == 0) { - //testPatternFB(o_fb); - } - counterst = (counterst + 1) % 1024; - //rgblight_task(); - matrix_scan_user(); -} diff --git a/keyboards/boston_meetup/2019/config.h b/keyboards/boston_meetup/2019/config.h index a1f4fc456d..80896242e0 100644 --- a/keyboards/boston_meetup/2019/config.h +++ b/keyboards/boston_meetup/2019/config.h @@ -46,16 +46,9 @@ #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f #endif -//configure qwiic micro_oled driver for the 128x32 oled -#ifdef QWIIC_MICRO_OLED_ENABLE +// configure oled driver for the 128x32 oled +#define OLED_UPDATE_INTERVAL 33 // ~30fps -#undef I2C_ADDRESS_SA0_1 -#define I2C_ADDRESS_SA0_1 0b0111100 -#define LCDWIDTH 128 -#define LCDHEIGHT 32 -#define micro_oled_rotate_180 - -#endif /* * Keyboard Matrix Assignments * diff --git a/keyboards/boston_meetup/2019/keymaps/default/keymap.c b/keyboards/boston_meetup/2019/keymaps/default/keymap.c index 6375599455..666624b18c 100644 --- a/keyboards/boston_meetup/2019/keymaps/default/keymap.c +++ b/keyboards/boston_meetup/2019/keymaps/default/keymap.c @@ -13,10 +13,8 @@ enum custom_layers { }; enum custom_keycodes { - BASE = SAFE_RANGE, - LOWER, + LOWER = SAFE_RANGE, RAISE, - KC_DEMOMACRO }; // Custom macros @@ -27,7 +25,6 @@ enum custom_keycodes { // Requires KC_TRNS/_______ for the trigger key in the destination layer #define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor #define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise -#define DEMOMACRO KC_DEMOMACRO // Sample for macros const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -115,14 +112,6 @@ layer_state_t layer_state_set_user(layer_state_t state) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case KC_DEMOMACRO: - if (record->event.pressed) { - // when keycode KC_DEMOMACRO is pressed - SEND_STRING("QMK is the best thing ever!"); - } else { - // when keycode KC_DEMOMACRO is released - } - break; case LOWER: if (record->event.pressed) { //not sure how to have keyboard check mode and set it to a variable, so my work around diff --git a/keyboards/boston_meetup/2019/keymaps/readme.md b/keyboards/boston_meetup/2019/keymaps/readme.md deleted file mode 100644 index c10a49f7d0..0000000000 --- a/keyboards/boston_meetup/2019/keymaps/readme.md +++ /dev/null @@ -1,22 +0,0 @@ -# How to add your own keymap - -Folders can be named however you'd like (will be approved upon merging), or should follow the format with a preceding `_`: - - _[ISO 3166-1 alpha-2 code*]_[layout variant]_[layout name/author] - -\* See full list: https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements - -and contain the following files: - -* `keymap.c` -* `readme.md` *recommended* -* `config.h` *optional*, found automatically when compiling -* `Makefile` *optional*, found automatically when compling - -When adding your keymap to this list, keep it organised alphabetically (select list, edit->sort lines), and use this format: - - * **folder_name** description - -# List of 2019 keymaps - -* **default** default 2019 macropad layout
\ No newline at end of file diff --git a/keyboards/boston_meetup/2019/rules.mk b/keyboards/boston_meetup/2019/rules.mk index 236f28c4e5..6468f47b7d 100644 --- a/keyboards/boston_meetup/2019/rules.mk +++ b/keyboards/boston_meetup/2019/rules.mk @@ -8,19 +8,21 @@ BOOTLOADER = stm32-dfu # Build Options # comment out to disable the options. # -BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -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 -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover -CUSTOM_MATRIX = no # Custom matrix file -AUDIO_ENABLE = yes +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +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 +AUDIO_ENABLE = yes # Audio output RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = no RGB_MATRIX_DRIVER = WS2812 -HAPTIC_ENABLE += DRV2605L -QWIIC_ENABLE = yes -QWIIC_DRIVERS += MICRO_OLED +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = DRV2605L +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/bpiphany/frosty_flake/config.h b/keyboards/bpiphany/frosty_flake/config.h index bcd34b022c..1a337b111f 100644 --- a/keyboards/bpiphany/frosty_flake/config.h +++ b/keyboards/bpiphany/frosty_flake/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -94,5 +93,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/bpiphany/kitten_paw/config.h b/keyboards/bpiphany/kitten_paw/config.h index 5aebe080ef..7dbf027699 100644 --- a/keyboards/bpiphany/kitten_paw/config.h +++ b/keyboards/bpiphany/kitten_paw/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -108,5 +107,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/bpiphany/kitten_paw/kitten_paw.h b/keyboards/bpiphany/kitten_paw/kitten_paw.h index 38b2a94334..d4a9a16656 100644 --- a/keyboards/bpiphany/kitten_paw/kitten_paw.h +++ b/keyboards/bpiphany/kitten_paw/kitten_paw.h @@ -1,8 +1,9 @@ -#ifndef KITTEN_PAW_H -#define KITTEN_PAW_H +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array @@ -26,41 +27,37 @@ */ #define 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, KK1, KL1, KQ1, KQ0, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ - KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ - KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ -) \ -{ \ - {KC_NO, KB0, KC0, KD0,KC_NO, KF0, KG0,KC_NO,KC_NO,KC_NO, KK0, KL0,KC_NO,KC_NO, KO0,KC_NO, KQ0, KR0}, \ - { KA1, KB1,KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1,KC_NO,KC_NO,KC_NO,KC_NO, KQ1,KC_NO}, \ - {KC_NO, KB2,KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2,KC_NO, KN2,KC_NO, KP2, KQ2, KR2}, \ - {KC_NO, KB3,KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3,KC_NO, KQ3, KR3}, \ - { KA4, KB4,KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4,KC_NO,KC_NO, KO4,KC_NO, KQ4, KR4}, \ - { KA5,KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5,KC_NO,KC_NO, KO5,KC_NO, KQ5, KR5}, \ - {KC_NO, KB6, KC6,KC_NO, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6,KC_NO,KC_NO, KO6,KC_NO, KQ6, KR6}, \ - { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7,KC_NO,KC_NO,KC_NO,KC_NO, KO7,KC_NO, KQ7, KR7} \ + 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, KK1, KL1, KQ1, KQ0, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ + KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ +) { \ + { XXX, KB0, KC0, KD0, XXX, KF0, KG0, XXX, XXX, XXX, KK0, KL0, XXX, XXX, KO0, XXX, KQ0, KR0 }, \ + { KA1, KB1, XXX, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, XXX, XXX, XXX, XXX, KQ1, XXX }, \ + { XXX, KB2, XXX, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, XXX, KN2, XXX, KP2, KQ2, KR2 }, \ + { XXX, KB3, XXX, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, XXX, KQ3, KR3 }, \ + { KA4, KB4, XXX, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, XXX, XXX, KO4, XXX, KQ4, KR4 }, \ + { KA5, XXX, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, XXX, XXX, KO5, XXX, KQ5, KR5 }, \ + { XXX, KB6, KC6, XXX, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, XXX, XXX, KO6, XXX, KQ6, KR6 }, \ + { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, XXX, XXX, XXX, XXX, KO7, XXX, KQ7, KR7 } \ } #define LAYOUT_fullsize_ansi( \ - 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, KK1, KL1, KQ1, KQ0, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ - KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ - KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ -) \ -{ \ - {KC_NO, KB0, KC0, KD0,KC_NO, KF0, KG0,KC_NO,KC_NO,KC_NO, KK0, KL0,KC_NO,KC_NO, KO0,KC_NO, KQ0, KR0}, \ - { KA1, KB1,KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1,KC_NO,KC_NO,KC_NO,KC_NO, KQ1,KC_NO}, \ - {KC_NO, KB2,KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2,KC_NO, KN2,KC_NO, KP2, KQ2, KR2}, \ - {KC_NO, KB3,KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3,KC_NO, KQ3, KR3}, \ - { KA4, KB4,KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4,KC_NO,KC_NO, KO4,KC_NO, KQ4, KR4}, \ - { KA5,KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5,KC_NO,KC_NO, KO5,KC_NO, KQ5, KR5}, \ - {KC_NO, KB6, KC6,KC_NO, KE6, KF6, KG6, KH6, KC_NO,KJ6, KK6, KL6,KC_NO,KC_NO, KO6,KC_NO, KQ6, KR6}, \ - { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7,KC_NO,KC_NO,KC_NO,KC_NO, KO7,KC_NO, KQ7, KR7} \ + 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, KK1, KL1, KQ1, KQ0, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ + KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ +) { \ + { XXX, KB0, KC0, KD0, XXX, KF0, KG0, XXX, XXX, XXX, KK0, KL0, XXX, XXX, KO0, XXX, KQ0, KR0 }, \ + { KA1, KB1, XXX, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, XXX, XXX, XXX, XXX, KQ1, XXX }, \ + { XXX, KB2, XXX, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, XXX, KN2, XXX, KP2, KQ2, KR2 }, \ + { XXX, KB3, XXX, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, XXX, KQ3, KR3 }, \ + { KA4, KB4, XXX, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, XXX, XXX, KO4, XXX, KQ4, KR4 }, \ + { KA5, XXX, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, XXX, XXX, KO5, XXX, KQ5, KR5 }, \ + { XXX, KB6, KC6, XXX, KE6, KF6, KG6, KH6, XXX, KJ6, KK6, KL6, XXX, XXX, KO6, XXX, KQ6, KR6 }, \ + { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, XXX, XXX, XXX, XXX, KO7, XXX, KQ7, KR7 } \ } - -#endif diff --git a/keyboards/bpiphany/sixshooter/sixshooter.h b/keyboards/bpiphany/sixshooter/sixshooter.h index e8fc68f5c9..33ac9335e6 100644 --- a/keyboards/bpiphany/sixshooter/sixshooter.h +++ b/keyboards/bpiphany/sixshooter/sixshooter.h @@ -1,15 +1,13 @@ -#ifndef SIXSHOOTER_H -#define SIXSHOOTER_H +#pragma once #include "quantum.h" #define LAYOUT( \ - K00, K01, K02, \ - K03, K04, K05 \ -) \ -{ \ - { K00, K01, K02 }, \ - { K03, K04, K05 } \ + k00, k01, k02, \ + k10, k11, k12 \ +) { \ + { k00, k01, k02 }, \ + { k10, k11, k12 } \ } inline void sixshooter_led_0_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); } @@ -42,5 +40,3 @@ inline void sixshooter_led_all_off(void) { sixshooter_led_4_off(); sixshooter_led_5_off(); } - -#endif diff --git a/keyboards/bpiphany/tiger_lily/config.h b/keyboards/bpiphany/tiger_lily/config.h index bedbd9ea74..54a1c2e7f4 100644 --- a/keyboards/bpiphany/tiger_lily/config.h +++ b/keyboards/bpiphany/tiger_lily/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -99,5 +98,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/bpiphany/tiger_lily/tiger_lily.h b/keyboards/bpiphany/tiger_lily/tiger_lily.h index 65e4d91564..b1a872e215 100644 --- a/keyboards/bpiphany/tiger_lily/tiger_lily.h +++ b/keyboards/bpiphany/tiger_lily/tiger_lily.h @@ -1,8 +1,9 @@ -#ifndef TIGER_LILY_H -#define TIGER_LILY_H +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The following is an example using the Planck MIT layout // The first section contains all of the arguements @@ -27,45 +28,37 @@ `-------------------------------------------------------------------------' `--------------' `-------------------' */ #define 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, KK1, KL1, KQ1, KQ0, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ - KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ - KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ -) \ -{ \ -/* Columns and rows need to be swapped in the below definition */ \ -/* A B C D E F G H I J K L M N O P Q R */ \ -/* 0 */ { KC_NO, KB0, KC0, KD0, KC_NO, KF0, KG0, KC_NO, KC_NO, KC_NO, KK0, KL0, KC_NO, KC_NO, KO0, KC_NO, KQ0, KR0 }, \ -/* 1 */ { KA1, KB1, KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, KC_NO, KC_NO, KC_NO, KC_NO, KQ1, KC_NO }, \ -/* 2 */ { KC_NO, KB2, KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KC_NO, KN2, KC_NO, KP2, KQ2, KR2 }, \ -/* 3 */ { KC_NO, KB3, KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KQ3, KR3 }, \ -/* 4 */ { KA4, KB4, KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KC_NO, KC_NO, KO4, KC_NO, KQ4, KR4 }, \ -/* 5 */ { KA5, KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KC_NO, KC_NO, KO5, KC_NO, KQ5, KR5 }, \ -/* 6 */ { KC_NO, KB6, KC6, KC_NO, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, KC_NO, KC_NO, KO6, KC_NO, KQ6, KR6 }, \ -/* 7 */ { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, KC_NO, KC_NO, KC_NO, KC_NO, KO7, KC_NO, KQ7, KR7 } \ + 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, KK1, KL1, KQ1, KQ0, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ + KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ +) { \ + { XXX, KB0, KC0, KD0, XXX, KF0, KG0, XXX, XXX, XXX, KK0, KL0, XXX, XXX, KO0, XXX, KQ0, KR0 }, \ + { KA1, KB1, XXX, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, XXX, XXX, XXX, XXX, KQ1, XXX }, \ + { XXX, KB2, XXX, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, XXX, KN2, XXX, KP2, KQ2, KR2 }, \ + { XXX, KB3, XXX, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, XXX, KQ3, KR3 }, \ + { KA4, KB4, XXX, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, XXX, XXX, KO4, XXX, KQ4, KR4 }, \ + { KA5, XXX, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, XXX, XXX, KO5, XXX, KQ5, KR5 }, \ + { XXX, KB6, KC6, XXX, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, XXX, XXX, KO6, XXX, KQ6, KR6 }, \ + { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, XXX, XXX, XXX, XXX, KO7, XXX, KQ7, KR7 } \ } #define LAYOUT_fullsize_ansi( \ - 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, KK1, KL1, KQ1, KQ0, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ - KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ - KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ -) \ -{ \ -/* Columns and rows need to be swapped in the below definition */ \ -/* A B C D E F G H I J K L M N O P Q R */ \ -/* 0 */ { KC_NO, KB0, KC0, KD0, KC_NO, KF0, KG0, KC_NO, KC_NO, KC_NO, KK0, KL0, KC_NO, KC_NO, KO0, KC_NO, KQ0, KR0 }, \ -/* 1 */ { KA1, KB1, KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, KC_NO, KC_NO, KC_NO, KC_NO, KQ1, KC_NO }, \ -/* 2 */ { KC_NO, KB2, KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KC_NO, KN2, KC_NO, KP2, KQ2, KR2 }, \ -/* 3 */ { KC_NO, KB3, KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KQ3, KR3 }, \ -/* 4 */ { KA4, KB4, KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KC_NO, KC_NO, KO4, KC_NO, KQ4, KR4 }, \ -/* 5 */ { KA5, KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KC_NO, KC_NO, KO5, KC_NO, KQ5, KR5 }, \ -/* 6 */ { KC_NO, KB6, KC6, KC_NO, KE6, KF6, KG6, KH6, KC_NO, KJ6, KK6, KL6, KC_NO, KC_NO, KO6, KC_NO, KQ6, KR6 }, \ -/* 7 */ { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, KC_NO, KC_NO, KC_NO, KC_NO, KO7, KC_NO, KQ7, KR7 } \ + 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, KK1, KL1, KQ1, KQ0, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ + KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ +) { \ + { XXX, KB0, KC0, KD0, XXX, KF0, KG0, XXX, XXX, XXX, KK0, KL0, XXX, XXX, KO0, XXX, KQ0, KR0 }, \ + { KA1, KB1, XXX, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, XXX, XXX, XXX, XXX, KQ1, XXX }, \ + { XXX, KB2, XXX, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, XXX, KN2, XXX, KP2, KQ2, KR2 }, \ + { XXX, KB3, XXX, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, XXX, KQ3, KR3 }, \ + { KA4, KB4, XXX, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, XXX, XXX, KO4, XXX, KQ4, KR4 }, \ + { KA5, XXX, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, XXX, XXX, KO5, XXX, KQ5, KR5 }, \ + { XXX, KB6, KC6, XXX, KE6, KF6, KG6, KH6, XXX, KJ6, KK6, KL6, XXX, XXX, KO6, XXX, KQ6, KR6 }, \ + { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, XXX, XXX, XXX, XXX, KO7, XXX, KQ7, KR7 } \ } - -#endif diff --git a/keyboards/bpiphany/unloved_bastard/config.h b/keyboards/bpiphany/unloved_bastard/config.h index ab8f178a9d..a6589be4a1 100644 --- a/keyboards/bpiphany/unloved_bastard/config.h +++ b/keyboards/bpiphany/unloved_bastard/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -92,5 +91,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/bpiphany/unloved_bastard/unloved_bastard.h b/keyboards/bpiphany/unloved_bastard/unloved_bastard.h index d444fd0d8a..26fce8749a 100644 --- a/keyboards/bpiphany/unloved_bastard/unloved_bastard.h +++ b/keyboards/bpiphany/unloved_bastard/unloved_bastard.h @@ -13,74 +13,65 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef UNLOVED_BASTARD_H -#define UNLOVED_BASTARD_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT_all( \ - 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, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ - KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ -) \ -{ \ -/* Columns and rows need to be swapped in the below definition */ \ -/* A B C D E F G H I J K L M N O P Q 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, KC_NO, KC_NO, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KN2, KO2, KC_NO, KC_NO, KC_NO }, \ -/* 3 */ { KC_NO, KB3, KC_NO, KC_NO, KC_NO, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, 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, KH6, 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 } \ + 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, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ + KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ +) { \ + { XXX, XXX, KC0, XXX, XXX, KF0, XXX, XXX, XXX, KJ0, KK0, XXX, KM0, KN0, KO0, XXX, KQ0, KR0 }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, XXX, KO1, KP1, XXX, XXX }, \ + { XXX, KB2, XXX, XXX, XXX, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KN2, KO2, XXX, XXX, XXX }, \ + { XXX, KB3, XXX, XXX, XXX, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, XXX, XXX, XXX }, \ + { XXX, XXX, KC4, XXX, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, XXX, KO4, KP4, KQ4, KR4 }, \ + { XXX, XXX, KC5, XXX, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, XXX, XXX }, \ + { XXX, XXX, KC6, XXX, XXX, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, XXX, KN6, KO6, XXX, KQ6, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KM7, KN7, XXX, KP7, XXX, XXX } \ } #define LAYOUT_tkl_ansi( \ - 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, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ - KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ -) \ -{ \ -/* Columns and rows need to be swapped in the below definition */ \ -/* A B C D E F G H I J K L M N O P Q 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, KC_NO, KC_NO, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KN2, KO2, KC_NO, KC_NO, KC_NO }, \ -/* 3 */ { KC_NO, KB3, KC_NO, KC_NO, KC_NO, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, 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 } \ + 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, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ + KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ +) { \ + { XXX, XXX, KC0, XXX, XXX, KF0, XXX, XXX, XXX, KJ0, KK0, XXX, KM0, KN0, KO0, XXX, KQ0, KR0 }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, XXX, KO1, KP1, XXX, XXX }, \ + { XXX, KB2, XXX, XXX, XXX, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KN2, KO2, XXX, XXX, XXX }, \ + { XXX, KB3, XXX, XXX, XXX, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, XXX, XXX, XXX }, \ + { XXX, XXX, KC4, XXX, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, XXX, KO4, KP4, KQ4, KR4 }, \ + { XXX, XXX, KC5, XXX, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, XXX, XXX }, \ + { XXX, XXX, KC6, XXX, XXX, KF6, KG6, XXX, KI6, KJ6, KK6, KL6, XXX, KN6, KO6, XXX, KQ6, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KM7, KN7, XXX, KP7, XXX, XXX } \ } #define LAYOUT_tkl_iso( \ - 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, KQ4, KC5, KE5, \ - KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO3, KO1, \ - KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ - KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ -) \ -{ \ -/* Columns and rows need to be swapped in the below definition */ \ -/* A B C D E F G H I J K L M N O P Q 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, KC_NO, KC_NO, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KN2, KO2, KC_NO, KC_NO, KC_NO }, \ -/* 3 */ { KC_NO, KB3, KC_NO, KC_NO, KC_NO, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, 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, KH6, 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 } \ + 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, KQ4, KC5, KE5, \ + KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO3, KO1, \ + KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ + KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ +) { \ + { XXX, XXX, KC0, XXX, XXX, KF0, XXX, XXX, XXX, KJ0, KK0, XXX, KM0, KN0, KO0, XXX, KQ0, KR0 }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, XXX, KO1, KP1, XXX, XXX }, \ + { XXX, KB2, XXX, XXX, XXX, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KN2, KO2, XXX, XXX, XXX }, \ + { XXX, KB3, XXX, XXX, XXX, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, XXX, XXX, XXX }, \ + { XXX, XXX, KC4, XXX, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, XXX, KO4, KP4, KQ4, KR4 }, \ + { XXX, XXX, KC5, XXX, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, XXX, XXX }, \ + { XXX, XXX, KC6, XXX, XXX, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, XXX, KN6, KO6, XXX, KQ6, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KM7, KN7, XXX, KP7, XXX, XXX } \ } #define LAYOUT LAYOUT_all - -#endif diff --git a/keyboards/bthlabs/geekpad/geekpad.h b/keyboards/bthlabs/geekpad/geekpad.h index c9f1ac9d4f..4dc6800fe5 100644 --- a/keyboards/bthlabs/geekpad/geekpad.h +++ b/keyboards/bthlabs/geekpad/geekpad.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GEEKPAD_H -#define GEEKPAD_H + +#pragma once #include "quantum.h" @@ -27,14 +27,11 @@ * represents the switch matrix. */ #define LAYOUT( \ - K00, K01, K02, \ - K10, K11, K12, \ - K20, K21, K22 \ -) \ -{ \ - { K00, K01, K02 }, \ - { K10, K11, K12 }, \ - { K20, K21, K22 } \ + k00, k01, k02, \ + k10, k11, k12, \ + k20, k21, k22 \ +) { \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ + { k20, k21, k22 } \ } - -#endif diff --git a/keyboards/business_card/alpha/keymaps/default/keymap.c b/keyboards/business_card/alpha/keymaps/default/keymap.c index 6bf201655d..64070d23d2 100644 --- a/keyboards/business_card/alpha/keymaps/default/keymap.c +++ b/keyboards/business_card/alpha/keymaps/default/keymap.c @@ -39,5 +39,8 @@ static void render_logo(void) { oled_write_P(qmk_logo, false); } -void oled_task_user(void) { render_logo(); } +bool oled_task_user(void) { + render_logo(); + return false; +} #endif diff --git a/keyboards/business_card/beta/keymaps/default/keymap.c b/keyboards/business_card/beta/keymaps/default/keymap.c index beff48d984..8d2413477e 100644 --- a/keyboards/business_card/beta/keymaps/default/keymap.c +++ b/keyboards/business_card/beta/keymaps/default/keymap.c @@ -38,5 +38,8 @@ static void render_logo(void) { oled_write_P(qmk_logo, false); } -void oled_task_user(void) { render_logo(); } +bool oled_task_user(void) { + render_logo(); + return false; +} #endif diff --git a/keyboards/c39/keymaps/drashna/rules.mk b/keyboards/c39/keymaps/drashna/rules.mk index c05f6a4be4..0e5a4cbebd 100644 --- a/keyboards/c39/keymaps/drashna/rules.mk +++ b/keyboards/c39/keymaps/drashna/rules.mk @@ -13,6 +13,7 @@ COMMAND_ENABLE = yes NKRO_ENABLE = yes AUDIO_ENABLE = yes UNICODE_ENABLE = yes -HAPTIC_ENABLE = SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID RGBLIGHT_STARTUP_ANIMATION = yes diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h index e100cc99b1..53e4c18e5e 100644 --- a/keyboards/cannonkeys/satisfaction75/config.h +++ b/keyboards/cannonkeys/satisfaction75/config.h @@ -53,9 +53,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // I2C config #define I2C_DRIVER I2CD1 -#define I2C1_SCL_BANK GPIOB -#define I2C1_SCL 6 -#define I2C1_SDA 7 +#define I2C1_SCL_PIN B6 +#define I2C1_SDA_PIN B7 #define I2C1_SCL_PAL_MODE 1 #define I2C1_SDA_PAL_MODE 1 #define I2C1_TIMINGR_PRESC 0x00U @@ -72,14 +71,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#ifdef QWIIC_MICRO_OLED_ENABLE +// configure oled driver for the 128x32 oled +#define OLED_UPDATE_INTERVAL 66 // ~15fps -#undef I2C_ADDRESS_SA0_1 -#define I2C_ADDRESS_SA0_1 0b0111100 -#define LCDWIDTH 128 -#define LCDHEIGHT 32 +// OLED_TIMEOUT is incompatible with the OLED_OFF mode +#define OLED_TIMEOUT 0 -#endif +// OLED timeout reimplemented in the keyboard-specific code +#define CUSTOM_OLED_TIMEOUT 60000 // Custom config starts after VIA's EEPROM usage, // dynamic keymaps start after this. diff --git a/keyboards/cannonkeys/satisfaction75/rules.mk b/keyboards/cannonkeys/satisfaction75/rules.mk index 3f0f8cda7c..51f1dc52f5 100644 --- a/keyboards/cannonkeys/satisfaction75/rules.mk +++ b/keyboards/cannonkeys/satisfaction75/rules.mk @@ -23,10 +23,9 @@ CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover -CUSTOM_MATRIX = no # Custom matrix file ENCODER_ENABLE = yes -QWIIC_ENABLE = yes -QWIIC_DRIVERS += MICRO_OLED +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 #BACKLIGHT_ENABLE = yes DEFAULT_FOLDER = cannonkeys/satisfaction75/rev1 diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c index 682805f321..8b5016437c 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction75.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c @@ -5,11 +5,6 @@ #include <ch.h> #include <hal.h> -#ifdef QWIIC_MICRO_OLED_ENABLE -#include "micro_oled.h" -#include "qwiic.h" -#endif - #include "timer.h" #include "raw_hid.h" @@ -20,18 +15,17 @@ /* Artificial delay added to get media keys to work in the encoder*/ #define MEDIA_KEY_DELAY 10 -uint16_t last_flush; - volatile uint8_t led_numlock = false; volatile uint8_t led_capslock = false; volatile uint8_t led_scrolllock = false; uint8_t layer; -bool queue_for_send = false; bool clock_set_mode = false; uint8_t oled_mode = OLED_DEFAULT; -bool oled_sleeping = false; +bool oled_repaint_requested = false; +bool oled_wakeup_requested = false; +uint32_t oled_sleep_timer; uint8_t encoder_value = 32; uint8_t encoder_mode = ENC_MODE_VOLUME; @@ -167,7 +161,7 @@ void raw_hid_receive_kb( uint8_t *data, uint8_t length ) case id_oled_mode: { oled_mode = command_data[1]; - draw_ui(); + oled_request_wakeup(); break; } case id_encoder_modes: @@ -247,18 +241,17 @@ void read_host_led_state(void) { layer_state_t layer_state_set_kb(layer_state_t state) { state = layer_state_set_user(state); layer = biton32(state); - queue_for_send = true; + oled_request_wakeup(); return state; } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - queue_for_send = true; + oled_request_wakeup(); switch (keycode) { case OLED_TOGG: if(!clock_set_mode){ if (record->event.pressed) { oled_mode = (oled_mode + 1) % _NUM_OLED_MODES; - draw_ui(); } } return false; @@ -302,8 +295,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) return false; + oled_request_wakeup(); encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64; - queue_for_send = true; if (index == 0) { if (layer == 0){ uint16_t mapped_code = 0; @@ -376,9 +369,9 @@ void matrix_init_kb(void) #endif // VIA_ENABLE rtcGetTime(&RTCD1, &last_timespec); - queue_for_send = true; backlight_init_ports(); matrix_init_user(); + oled_request_wakeup(); } @@ -388,22 +381,8 @@ void housekeeping_task_kb(void) { if (minutes_since_midnight != last_minute){ last_minute = minutes_since_midnight; - if(!oled_sleeping){ - queue_for_send = true; - } + oled_request_repaint(); } -#ifdef QWIIC_MICRO_OLED_ENABLE - if (queue_for_send && oled_mode != OLED_OFF) { - oled_sleeping = false; - read_host_led_state(); - draw_ui(); - queue_for_send = false; - } - if (timer_elapsed(last_flush) > ScreenOffInterval && !oled_sleeping) { - send_command(DISPLAYOFF); /* 0xAE */ - oled_sleeping = true; - } -#endif } // diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.h b/keyboards/cannonkeys/satisfaction75/satisfaction75.h index 13aaf68882..c6dbc31f1b 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction75.h +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.h @@ -14,9 +14,6 @@ #define EEPROM_DEFAULT_OLED (VIA_EEPROM_CUSTOM_CONFIG_ADDR+2) #define EEPROM_CUSTOM_ENCODER (VIA_EEPROM_CUSTOM_CONFIG_ADDR+3) -/* screen off after this many milliseconds */ -#define ScreenOffInterval 60000 /* milliseconds */ - typedef union { uint8_t raw; struct { @@ -74,10 +71,10 @@ extern volatile uint8_t led_scrolllock; extern uint8_t layer; // OLED Behavior -extern uint16_t last_flush; -extern bool queue_for_send; extern uint8_t oled_mode; -extern bool oled_sleeping; +extern bool oled_repaint_requested; +extern bool oled_wakeup_requested; +extern uint32_t oled_sleep_timer; // Encoder Behavior extern uint8_t encoder_value; @@ -113,10 +110,9 @@ void set_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior, uint16_t n void update_time_config(int8_t increment); -__attribute__ ((weak)) -void draw_ui(void); -void draw_default(void); -void draw_clock(void); +void oled_request_wakeup(void); +void oled_request_repaint(void); +bool oled_task_needs_to_repaint(void); void backlight_init_ports(void); void backlight_set(uint8_t level); diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c index 8fcd720e2f..cefdbc5f9c 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c @@ -125,7 +125,6 @@ uint16_t handle_encoder_clockwise(){ #endif case ENC_MODE_CLOCK_SET: update_time_config(1); - queue_for_send = true; break; } return mapped_code; @@ -171,7 +170,6 @@ uint16_t handle_encoder_ccw(){ case ENC_MODE_CLOCK_SET: update_time_config(-1); - queue_for_send = true; break; } return mapped_code; diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c index 6553bd1300..fff8b65bd7 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c @@ -1,271 +1,267 @@ #include "satisfaction75.h" -#include "micro_oled.h" - -__attribute__ ((weak)) -void draw_ui() { -#ifdef QWIIC_MICRO_OLED_ENABLE - clear_buffer(); - last_flush = timer_read(); - send_command(DISPLAYON); - if(clock_set_mode){ - draw_clock(); - return; - } - switch (oled_mode){ - default: - case OLED_DEFAULT: - draw_default(); - break; - case OLED_TIME: - draw_clock(); - break; - case OLED_OFF: - send_command(DISPLAYOFF); - break; - } -#endif + +void draw_default(void); +void draw_clock(void); + +#ifdef OLED_ENABLE + +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_0; } + +bool oled_task_kb(void) { + if (!oled_task_user()) { return false; } + if (!oled_task_needs_to_repaint()) { + return false; + } + oled_clear(); + if (clock_set_mode) { + draw_clock(); + return false;; + } + switch (oled_mode) { + default: + case OLED_DEFAULT: + draw_default(); + break; + case OLED_TIME: + draw_clock(); + break; + } + return false; } -void draw_encoder(int8_t startX, int8_t startY, bool show_legend){ - if(show_legend){ - draw_string(startX + 1, startY + 2, "ENC", PIXEL_ON, NORM, 0); - } else { - startX -= 22; - } - draw_rect_filled_soft(startX + 22, startY + 1, 3 + (3 * 6), 9, PIXEL_ON, NORM); - char* mode_string = ""; - switch(encoder_mode){ - default: - case ENC_MODE_VOLUME: - mode_string = "VOL"; - break; - case ENC_MODE_MEDIA: - mode_string = "MED"; - break; - case ENC_MODE_SCROLL: - mode_string = "SCR"; - break; - case ENC_MODE_BRIGHTNESS: - mode_string = "BRT"; - break; - case ENC_MODE_BACKLIGHT: - mode_string = "BKL"; - break; - case ENC_MODE_CLOCK_SET: - mode_string = "CLK"; - break; - case ENC_MODE_CUSTOM0: - mode_string = "CS0"; - break; - case ENC_MODE_CUSTOM1: - mode_string = "CS1"; - break; - case ENC_MODE_CUSTOM2: - mode_string = "CS2"; - break; - } - draw_string(startX + 24, startY + 2, mode_string, PIXEL_ON, XOR, 0); +// Request a repaint of the OLED image without resetting the OLED sleep timer. +// Used for things like clock updates that should not keep the OLED turned on +// if there is no other activity. +void oled_request_repaint(void) { + if (is_oled_on()) { + oled_repaint_requested = true; + } } -void draw_layer_section(int8_t startX, int8_t startY, bool show_legend){ - if(show_legend){ - draw_string(startX + 1, startY + 2, "LAYER", PIXEL_ON, NORM, 0); - } else { - startX -= 32; - } - draw_rect_filled_soft(startX + 32, startY + 1, 9, 9, PIXEL_ON, NORM); - draw_char(startX + 34, startY + 2, layer + 0x30, PIXEL_ON, XOR, 0); +// Request a repaint of the OLED image and reset the OLED sleep timer. +// Needs to be called after any activity that should keep the OLED turned on. +void oled_request_wakeup(void) { + oled_wakeup_requested = true; } -void draw_default(){ - uint8_t hour = last_minute / 60; - uint16_t minute = last_minute % 60; +// Check whether oled_task_user() needs to repaint the OLED image. This +// function should be called at the start of oled_task_user(); it also handles +// the OLED sleep timer and the OLED_OFF mode. +bool oled_task_needs_to_repaint(void) { + // In the OLED_OFF mode the OLED is kept turned off; any wakeup requests + // are ignored. + if ((oled_mode == OLED_OFF) && !clock_set_mode) { + oled_wakeup_requested = false; + oled_repaint_requested = false; + oled_off(); + return false; + } - if(encoder_mode == ENC_MODE_CLOCK_SET){ - hour = hour_config; - minute = minute_config; - } + // If OLED wakeup was requested, reset the sleep timer and do a repaint. + if (oled_wakeup_requested) { + oled_wakeup_requested = false; + oled_repaint_requested = false; + oled_sleep_timer = timer_read32() + CUSTOM_OLED_TIMEOUT; + oled_on(); + return true; + } - bool is_pm = (hour / 12) > 0; - hour = hour % 12; - if (hour == 0){ - hour = 12; - } - char hour_str[3] = ""; - char min_str[3] = ""; + // If OLED repaint was requested, just do a repaint without touching the + // sleep timer. + if (oled_repaint_requested) { + oled_repaint_requested = false; + return true; + } - sprintf(hour_str, "%02d", hour); - sprintf(min_str, "%02d", minute); + // If the OLED is currently off, skip the repaint (which would turn the + // OLED on if the image is changed in any way). + if (!is_oled_on()) { + return false; + } - uint8_t mods = get_mods(); + // If the sleep timer has expired while the OLED was on, turn the OLED off. + if (timer_expired32(timer_read32(), oled_sleep_timer)) { + oled_off(); + return false; + } -/* Layer indicator is 41 x 10 pixels */ - draw_layer_section(0,0,true); + // Always perform a repaint if the OLED is currently on. (This can + // potentially be optimized to avoid unneeded repaints if all possible + // state changes are covered by oled_request_repaint() or + // oled_request_wakeup(), but then any missed calls to these functions + // would result in displaying a stale image.) + return true; +} -#define ENCODER_INDICATOR_X 45 -#define ENCODER_INDICATOR_Y 0 - draw_encoder(ENCODER_INDICATOR_X, ENCODER_INDICATOR_Y, true); -/* Matrix display is 19 x 9 pixels */ -#define MATRIX_DISPLAY_X 0 -#define MATRIX_DISPLAY_Y 18 - for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - for (uint8_t y = 0; y < MATRIX_COLS; y++) { - draw_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM); +static void draw_line_h(uint8_t x, uint8_t y, uint8_t len) { + for (uint8_t i = 0; i < len; i++) { + oled_write_pixel(i + x, y, true); } - } - draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 19, 9, PIXEL_ON, NORM); - /* hadron oled location on thumbnail */ - draw_rect_filled_soft(MATRIX_DISPLAY_X + 14, MATRIX_DISPLAY_Y + 2, 3, 1, PIXEL_ON, NORM); - -/* Mod display is 41 x 16 pixels */ -#define MOD_DISPLAY_X 30 -#define MOD_DISPLAY_Y 18 - - if (mods & MOD_LSFT) { - draw_rect_filled_soft(MOD_DISPLAY_X + 0, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LCTL) { - draw_rect_filled_soft(MOD_DISPLAY_X + 10, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LALT) { - draw_rect_filled_soft(MOD_DISPLAY_X + 20, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LGUI) { - draw_rect_filled_soft(MOD_DISPLAY_X + 30, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_ON, NORM, 0); - } - -/* Lock display is 23 x 21 */ -#define LOCK_DISPLAY_X 100 -#define LOCK_DISPLAY_Y 0 - - if (led_capslock == true) { - draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y, 5 + (3 * 6), 9, PIXEL_ON, NORM); - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y +1, "CAP", PIXEL_OFF, NORM, 0); - } else if (led_capslock == false) { - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y +1, "CAP", PIXEL_ON, NORM, 0); - } - - if (led_scrolllock == true) { - draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y + 11, 5 + (3 * 6), 9, PIXEL_ON, NORM); - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "SCR", PIXEL_OFF, NORM, 0); - } else if (led_scrolllock == false) { - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "SCR", PIXEL_ON, NORM, 0); - } - -#define TIME_DISPLAY_X 82 -#define TIME_DISPLAY_Y 22 - draw_string(TIME_DISPLAY_X, TIME_DISPLAY_Y, hour_str, PIXEL_ON, NORM, 0); - draw_string(TIME_DISPLAY_X + 11, TIME_DISPLAY_Y, ":", PIXEL_ON, NORM, 0); - draw_string(TIME_DISPLAY_X + 15, TIME_DISPLAY_Y, min_str, PIXEL_ON, NORM, 0); - if(is_pm){ - draw_string(TIME_DISPLAY_X + 27, TIME_DISPLAY_Y, "pm", PIXEL_ON, NORM, 0); - } else{ - draw_string(TIME_DISPLAY_X + 27, TIME_DISPLAY_Y, "am", PIXEL_ON, NORM, 0); - } - - send_buffer(); } -void draw_clock(){ - int8_t hour = last_minute / 60; - int16_t minute = last_minute % 60; - int16_t year = last_timespec.year + 1980; - int8_t month = last_timespec.month; - int8_t day = last_timespec.day; - - if(encoder_mode == ENC_MODE_CLOCK_SET){ - hour = hour_config; - minute = minute_config; - year = year_config + 1980; - month = month_config; - day = day_config; - } - - bool is_pm = (hour / 12) > 0; - hour = hour % 12; - if (hour == 0){ - hour = 12; - } - char hour_str[3] = ""; - char min_str[3] = ""; - char year_str[5] = ""; - char month_str[3] = ""; - char day_str[3] = ""; - - sprintf(hour_str, "%02d", hour); - sprintf(min_str, "%02d", minute); - sprintf(year_str, "%d", year); - sprintf(month_str, "%02d", month); - sprintf(day_str, "%02d", day); - - -#define DATE_DISPLAY_X 6 -#define DATE_DISPLAY_Y 0 - draw_string(DATE_DISPLAY_X, DATE_DISPLAY_Y, year_str, PIXEL_ON, NORM, 0); - draw_string(DATE_DISPLAY_X + 25, DATE_DISPLAY_Y, "-", PIXEL_ON, NORM, 0); - draw_string(DATE_DISPLAY_X + 31, DATE_DISPLAY_Y, month_str, PIXEL_ON, NORM, 0); - draw_string(DATE_DISPLAY_X + 44, DATE_DISPLAY_Y, "-", PIXEL_ON, NORM, 0); - draw_string(DATE_DISPLAY_X + 50, DATE_DISPLAY_Y, day_str, PIXEL_ON, NORM, 0); - -#define CLOCK_DISPLAY_X 6 -#define CLOCK_DISPLAY_Y 14 - draw_string(CLOCK_DISPLAY_X, CLOCK_DISPLAY_Y, hour_str, PIXEL_ON, NORM, 1); - draw_string(CLOCK_DISPLAY_X + 17, CLOCK_DISPLAY_Y, ":", PIXEL_ON, NORM, 1); - draw_string(CLOCK_DISPLAY_X + 25, CLOCK_DISPLAY_Y, min_str, PIXEL_ON, NORM, 1); - if(is_pm){ - draw_string(CLOCK_DISPLAY_X + 41, CLOCK_DISPLAY_Y, "pm", PIXEL_ON, NORM, 1); - } else{ - draw_string(CLOCK_DISPLAY_X + 41, CLOCK_DISPLAY_Y, "am", PIXEL_ON, NORM, 1); - } - - if(clock_set_mode){ - switch(time_config_idx){ - case 0: // hour - default: - draw_line(CLOCK_DISPLAY_X, CLOCK_DISPLAY_Y + 17, CLOCK_DISPLAY_X + 16, CLOCK_DISPLAY_Y + 17, PIXEL_ON, NORM); - break; - case 1: // minute - draw_line(CLOCK_DISPLAY_X + 25, CLOCK_DISPLAY_Y + 17, CLOCK_DISPLAY_X + 41, CLOCK_DISPLAY_Y + 17, PIXEL_ON, NORM); - break; - case 2: // year - draw_line(DATE_DISPLAY_X, DATE_DISPLAY_Y + 9, DATE_DISPLAY_X + 23, DATE_DISPLAY_Y + 9, PIXEL_ON, NORM); - break; - case 3: // month - draw_line(DATE_DISPLAY_X + 31, DATE_DISPLAY_Y + 9, DATE_DISPLAY_X + 43, DATE_DISPLAY_Y + 9, PIXEL_ON, NORM); - break; - case 4: //day - draw_line(DATE_DISPLAY_X + 50, DATE_DISPLAY_Y + 9, DATE_DISPLAY_X + 61, DATE_DISPLAY_Y + 9,PIXEL_ON, NORM); - break; +static void draw_line_v(uint8_t x, uint8_t y, uint8_t len) { + for (uint8_t i = 0; i < len; i++) { + oled_write_pixel(x, i + y, true); } - } +} - draw_encoder(80, 0, true); - draw_layer_section(80, 11, true); +static char* get_enc_mode(void) { + switch (encoder_mode) { + default: + case ENC_MODE_VOLUME: + return "VOL"; + case ENC_MODE_MEDIA: + return "MED"; + case ENC_MODE_SCROLL: + return "SCR"; + case ENC_MODE_BRIGHTNESS: + return "BRT"; + case ENC_MODE_BACKLIGHT: + return "BKL"; + case ENC_MODE_CLOCK_SET: + return "CLK"; + case ENC_MODE_CUSTOM0: + return "CS0"; + case ENC_MODE_CUSTOM1: + return "CS1"; + case ENC_MODE_CUSTOM2: + return "CS2"; + } +} -#define CAPS_DISPLAY_X 86 -#define CAPS_DISPLAY_Y 22 +static char* get_time(void) { + uint8_t hour = last_minute / 60; + uint16_t minute = last_minute % 60; - if (led_capslock == true) { - draw_rect_filled_soft(CAPS_DISPLAY_X, CAPS_DISPLAY_Y, 5 + (4 * 6), 9, PIXEL_ON, NORM); - draw_string(CAPS_DISPLAY_X + 3, CAPS_DISPLAY_Y +1, "CAPS", PIXEL_OFF, NORM, 0); - } else if (led_capslock == false) { - draw_string(CAPS_DISPLAY_X + 3, CAPS_DISPLAY_Y +1, "CAPS", PIXEL_ON, NORM, 0); - } + if (encoder_mode == ENC_MODE_CLOCK_SET) { + hour = hour_config; + minute = minute_config; + } + bool is_pm = (hour / 12) > 0; + hour = hour % 12; + if (hour == 0) { + hour = 12; + } - send_buffer(); + static char time_str[8] = ""; + sprintf(time_str, "%02d:%02d%s", hour, minute, is_pm ? "pm" : "am"); + return time_str; } + +static char* get_date(void) { + int16_t year = last_timespec.year + 1980; + int8_t month = last_timespec.month; + int8_t day = last_timespec.day; + + if (encoder_mode == ENC_MODE_CLOCK_SET) { + year = year_config + 1980; + month = month_config; + day = day_config; + } + + static char date_str[11] = ""; + sprintf(date_str, "%04d-%02d-%02d", year, month, day); + + return date_str; +} + +void draw_default() { + oled_write_P(PSTR("LAYER "), false); + oled_write_char(get_highest_layer(layer_state) + 0x30, true); + + oled_write_P(PSTR(" ENC "), false); + oled_write(get_enc_mode(), true); + + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(18, 0); + oled_write_P(PSTR("CAP"), led_state.caps_lock); + oled_set_cursor(18, 1); + oled_write_P(PSTR("SCR"), led_state.scroll_lock); + + uint8_t mod_state = get_mods(); + oled_set_cursor(6, 3); + oled_write_P(PSTR("S"), mod_state & MOD_MASK_SHIFT); + oled_advance_char(); + oled_write_P(PSTR("C"), mod_state & MOD_MASK_CTRL); + oled_advance_char(); + oled_write_P(PSTR("A"), mod_state & MOD_MASK_ALT); + oled_advance_char(); + oled_write_P(PSTR("G"), mod_state & MOD_MASK_GUI); + oled_advance_char(); + + oled_write(get_time(), false); + +/* Matrix display is 12 x 12 pixels */ +#define MATRIX_DISPLAY_X 0 +#define MATRIX_DISPLAY_Y 18 + + // matrix + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + for (uint8_t y = 0; y < MATRIX_COLS; y++) { + bool on = (matrix_get_row(x) & (1 << y)) > 0; + oled_write_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2, on); + } + } + + // outline + draw_line_h(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 19); + draw_line_h(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y + 9, 19); + draw_line_v(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 9); + draw_line_v(MATRIX_DISPLAY_X + 19, MATRIX_DISPLAY_Y, 9); + + // oled location + draw_line_h(MATRIX_DISPLAY_X + 14, MATRIX_DISPLAY_Y + 2, 3); + + // bodge extra lines for invert layer and enc mode + draw_line_v(35, 0, 8); + draw_line_v(71, 0, 8); +} + +void draw_clock() { + oled_set_cursor(0, 0); + oled_write(get_date(), false); + oled_set_cursor(0, 2); + oled_write(get_time(), false); + + oled_set_cursor(12, 0); + oled_write_P(PSTR(" ENC "), false); + oled_write(get_enc_mode(), true); + + oled_set_cursor(13, 1); + oled_write_P(PSTR("LAYER "), false); + oled_write_char(get_highest_layer(layer_state) + 0x30, true); + + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(15, 3); + oled_write_P(PSTR("CAPS"), led_state.caps_lock); + + if (clock_set_mode) { + switch (time_config_idx) { + case 0: // hour + default: + draw_line_h(0, 25, 10); + break; + case 1: // minute + draw_line_h(18, 25, 10); + break; + case 2: // year + draw_line_h(0, 9, 24); + break; + case 3: // month + draw_line_h(30, 9, 10); + break; + case 4: // day + draw_line_h(48, 9, 10); + break; + } + } + + // bodge extra lines for invert layer and enc mode + draw_line_v(101, 0, 8); + draw_line_v(113, 8, 8); +} + +#endif diff --git a/keyboards/cassette42/keymaps/default/keymap.c b/keyboards/cassette42/keymaps/default/keymap.c index b678ccf9b5..4943be9c7b 100644 --- a/keyboards/cassette42/keymaps/default/keymap.c +++ b/keyboards/cassette42/keymaps/default/keymap.c @@ -101,12 +101,13 @@ void render_status(void) { RENDER_LED_STATUS(); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/chidori/keymaps/oled_sample/keymap.c b/keyboards/chidori/keymaps/oled_sample/keymap.c index a3bb7c2807..78107a18ec 100644 --- a/keyboards/chidori/keymaps/oled_sample/keymap.c +++ b/keyboards/chidori/keymaps/oled_sample/keymap.c @@ -210,8 +210,9 @@ void oled_write_layer_state(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { // If you want to change the display of OLED, you need to change here oled_write_layer_state(); + return false; } #endif diff --git a/keyboards/chimera_ergo/chimera_ergo.h b/keyboards/chimera_ergo/chimera_ergo.h index 32d02886c4..b8897ac14e 100644 --- a/keyboards/chimera_ergo/chimera_ergo.h +++ b/keyboards/chimera_ergo/chimera_ergo.h @@ -1,5 +1,4 @@ -#ifndef CHIMERA_ERGO_H -#define CHIMERA_ERGO_H +#pragma once #include "quantum.h" @@ -43,22 +42,21 @@ #define set_led_white PORTF |= (1<<LED_B) | (1<<LED_R) | (1<<LED_G) */ +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, \ - k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, \ - k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, \ - k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, \ - k48, k49, k50, k51 \ -) \ -{ \ - { KC_NO, KC_NO, k26, k15, k28, k01, k42, k31, k20, k33, KC_NO, KC_NO }, \ - { k00, KC_NO, k14, k27, k16, k36, k47, k19, k32, k21, KC_NO, k11 }, \ - { k12, k25, k02, k39, k17, k49, k50, k18, k44, k09, k34, k23 }, \ - { k24, k13, k38, k04, k05, k48, k51, k06, k07, k45, k22, k35 }, \ - { k29, k41, k03, k40, k37, KC_NO, k30, k43, k08, k10, k46, KC_NO }, \ + k10, k05, k22, k42, k33, k34, k37, k38, k48, k29, k49, k1B, \ + k20, k31, k12, k03, k14, k24, k27, k17, k08, k19, k3A, k2B, \ + k30, k21, k02, k13, k04, k40, k46, k07, k18, k09, k2A, k3B, \ + k15, k44, k32, k23, k43, k41, k06, k47, k28, k39, k4A, k16, \ + k35, k25, k26, k36 \ +) { \ + { XXX, XXX, k02, k03, k04, k05, k06, k07, k08, k09, XXX, XXX }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, XXX, k1B }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B }, \ + { k40, k41, k42, k43, k44, XXX, k46, k47, k48, k49, k4A, XXX } \ } - -#endif diff --git a/keyboards/chimera_ergo/config.h b/keyboards/chimera_ergo/config.h index 4021cdcd50..0767a218b5 100644 --- a/keyboards/chimera_ergo/config.h +++ b/keyboards/chimera_ergo/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -66,5 +65,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ /* 8-bit data */ \ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); - -#endif diff --git a/keyboards/chimera_ls/chimera_ls.h b/keyboards/chimera_ls/chimera_ls.h index 45c91acc3d..7d67d573db 100644 --- a/keyboards/chimera_ls/chimera_ls.h +++ b/keyboards/chimera_ls/chimera_ls.h @@ -1,5 +1,4 @@ -#ifndef CHIMERA_LETS_SPLIT_H -#define CHIMERA_LETS_SPLIT_H +#pragma once #include "quantum.h" @@ -43,22 +42,21 @@ #define set_led_white PORTF |= (1<<LED_B) | (1<<LED_R) | (1<<LED_G) */ +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array #define LAYOUT_ortho_4x12( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, \ - k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, \ - k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, \ - k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47 \ - ) { \ - { k43, k45, k34, k11, k23, k40, k38, k25, k00, k12 }, \ - { k31, k44, k46, k35, k22, k28, k39, k37, k24, k13 }, \ - { k30, k32, k33, k47, k09, k29, k27, k26, k36, k02 }, \ - { k19, k20, k21, k42, k18, k16, k15, k14, k41, k17 }, \ - { k06, k07, k08, k10, KC_NO, k05, k04, k03, k01, KC_NO } \ + k08, k48, k29, k47, k46, k45, k40, k41, k42, k24, k43, k03, \ + k09, k19, k37, k36, k35, k39, k34, k30, k31, k32, k14, k04, \ + k18, k07, k27, k26, k15, k25, k20, k10, k21, k22, k02, k13, \ + k28, k17, k06, k16, k05, k38, k33, k00, k11, k01, k12, k23 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 }, \ + { k40, k41, k42, k43, XXX, k45, k46, k47, k48, XXX } \ } - - -#endif diff --git a/keyboards/chimera_ls/config.h b/keyboards/chimera_ls/config.h index d9c14a3fce..2eb028471d 100644 --- a/keyboards/chimera_ls/config.h +++ b/keyboards/chimera_ls/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -66,5 +65,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ /* 8-bit data */ \ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); - -#endif diff --git a/keyboards/chimera_ortho/chimera_ortho.h b/keyboards/chimera_ortho/chimera_ortho.h index ec893990a3..03384c9b28 100644 --- a/keyboards/chimera_ortho/chimera_ortho.h +++ b/keyboards/chimera_ortho/chimera_ortho.h @@ -1,5 +1,4 @@ -#ifndef CHIMERA_ORTHO_H -#define CHIMERA_ORTHO_H +#pragma once #include "quantum.h" @@ -43,21 +42,20 @@ #define set_led_white PORTF |= (1<<LED_B) | (1<<LED_R) | (1<<LED_G) */ +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, \ - k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, \ - k28, k29, k31, k32, k33, k34, k35, k36, k37, k38, k41, k42, k43, k44, \ - k45, k46, k47, k48 \ -) \ -{ \ - { k01, k02, k03, k04, k05, k08, k09, k10, k11, k12 }, \ - { k15, k16, k17, k18, k19, k22, k23, k24, k25, k26 }, \ - { k29, k31, k32, k33, k34, k37, k38, k41, k42, k43 }, \ - { KC_NO, k06, k20, k35, k46, k47, k36, k21, k07, KC_NO }, \ - { KC_NO, k28, k14, k00, k45, k48, k13, k27, k44, KC_NO } \ + k43, k00, k01, k02, k03, k04, k31, k38, k05, k06, k07, k08, k09, k46, \ + k42, k10, k11, k12, k13, k14, k32, k37, k15, k16, k17, k18, k19, k47, \ + k41, k20, k21, k22, k23, k24, k33, k36, k25, k26, k27, k28, k29, k48, \ + k44, k34, k35, k45 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { XXX, k31, k32, k33, k34, k35, k36, k37, k38, XXX }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47, k48, XXX } \ } - -#endif diff --git a/keyboards/chimera_ortho/config.h b/keyboards/chimera_ortho/config.h index b103589879..974502525c 100644 --- a/keyboards/chimera_ortho/config.h +++ b/keyboards/chimera_ortho/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -66,5 +65,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ /* 8-bit data */ \ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); - -#endif diff --git a/keyboards/christmas_tree/V2017/V2017.h b/keyboards/christmas_tree/V2017/V2017.h index a82a1e82f4..f779c0ed47 100644 --- a/keyboards/christmas_tree/V2017/V2017.h +++ b/keyboards/christmas_tree/V2017/V2017.h @@ -1,6 +1,3 @@ -#ifndef V2017_H -#define V2017_H +#pragma once #include "christmas_tree.h" - -#endif
\ No newline at end of file diff --git a/keyboards/christmas_tree/V2017/config.h b/keyboards/christmas_tree/V2017/config.h index ebe3d3bf1e..abc94749a8 100644 --- a/keyboards/christmas_tree/V2017/config.h +++ b/keyboards/christmas_tree/V2017/config.h @@ -1,8 +1,5 @@ -#ifndef V2017_CONFIG_H -#define V2017_CONFIG_H +#pragma once #include "config_common.h" #define DEVICE_VER 0x2017 - -#endif
\ No newline at end of file diff --git a/keyboards/christmas_tree/christmas_tree.h b/keyboards/christmas_tree/christmas_tree.h index 11063c9152..68eefca6a8 100644 --- a/keyboards/christmas_tree/christmas_tree.h +++ b/keyboards/christmas_tree/christmas_tree.h @@ -1,20 +1,14 @@ -#ifndef CHRISTMAS_TREE_H -#define CHRISTMAS_TREE_H -#include "quantum.h" +#pragma once +#include "quantum.h" #define LAYOUT( \ - k00, k01, k02, k03, k04, k05 \ -) \ -{ \ - { k00 }, \ - { k01 }, \ - { k02 }, \ - { k03 }, \ - { k04 }, \ - { k05 } \ + k00, k10, k20, k30, k40, k50 \ +) { \ + { k00 }, \ + { k10 }, \ + { k20 }, \ + { k30 }, \ + { k40 }, \ + { k50 } \ } - - - -#endif diff --git a/keyboards/christmas_tree/config.h b/keyboards/christmas_tree/config.h index 05e5bdb2b4..531c5996d2 100644 --- a/keyboards/christmas_tree/config.h +++ b/keyboards/christmas_tree/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -53,5 +52,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#endif diff --git a/keyboards/ckeys/nakey/config.h b/keyboards/ckeys/nakey/config.h index 728eb8f132..26ba86e146 100644 --- a/keyboards/ckeys/nakey/config.h +++ b/keyboards/ckeys/nakey/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -108,5 +107,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/ckeys/nakey/nakey.h b/keyboards/ckeys/nakey/nakey.h index bbf531fb68..bdb26afa26 100644 --- a/keyboards/ckeys/nakey/nakey.h +++ b/keyboards/ckeys/nakey/nakey.h @@ -13,27 +13,27 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NAKEY_H -#define NAKEY_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // 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_numpad_5x4( \ k00, k01, k02, k03, \ - k10, k11, k12, \ + k10, k11, k12, \ k20, k21, k22, k13, \ - k30, k31, k32, \ - k40, k41, k33 \ + k30, k31, k32, \ + k40, k41, k33 \ ) { \ - { k00, k01, k02, k03 }, \ - { k10, k11, k12, k13 }, \ - { k20, k21, k22, KC_NO }, \ - { k30, k31, k32, k33 }, \ - { k40, KC_NO, k41, KC_NO }, \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, XXX }, \ + { k30, k31, k32, k33 }, \ + { k40, XXX, k41, XXX } \ } - -#endif diff --git a/keyboards/ckeys/obelus/config.h b/keyboards/ckeys/obelus/config.h index 45bbd27ecc..00e224c206 100644 --- a/keyboards/ckeys/obelus/config.h +++ b/keyboards/ckeys/obelus/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -109,5 +108,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define AUDIO_PIN C6 #define STARTUP_SONG SONG(STARTUP_SOUND) #endif - -#endif diff --git a/keyboards/ckeys/obelus/obelus.h b/keyboards/ckeys/obelus/obelus.h index 371b79df20..76ff4f1a9f 100644 --- a/keyboards/ckeys/obelus/obelus.h +++ b/keyboards/ckeys/obelus/obelus.h @@ -1,5 +1,4 @@ -#ifndef OBELUS_H -#define OBELUS_H +#pragma once #include "quantum.h" @@ -12,12 +11,9 @@ 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 } \ } - -#endif diff --git a/keyboards/ckeys/washington/keymaps/default/keymap.c b/keyboards/ckeys/washington/keymaps/default/keymap.c index a83a28e955..771905814a 100644 --- a/keyboards/ckeys/washington/keymaps/default/keymap.c +++ b/keyboards/ckeys/washington/keymaps/default/keymap.c @@ -59,7 +59,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); switch (biton32(layer_state)) { @@ -79,5 +79,6 @@ void oled_task_user(void) { oled_write_P(IS_LED_ON(usb_led, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); oled_write_P(IS_LED_ON(usb_led, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/claw44/keymaps/oled/keymap.c b/keyboards/claw44/keymaps/oled/keymap.c index 07cb581712..1778ac6167 100644 --- a/keyboards/claw44/keymaps/oled/keymap.c +++ b/keyboards/claw44/keymaps/oled/keymap.c @@ -140,7 +140,7 @@ void set_keylog(uint16_t keycode, keyrecord_t *record) { const char *read_keylog(void) { return keylog_str; } const char *read_keylogs(void) { return keylogs_str; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_layer_state(); oled_write_ln(read_keylog(), false); @@ -148,6 +148,7 @@ void oled_task_user(void) { } else { render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/clueboard/17/17.h b/keyboards/clueboard/17/17.h index ebf2083862..ef5b3f3e04 100644 --- a/keyboards/clueboard/17/17.h +++ b/keyboards/clueboard/17/17.h @@ -1,6 +1,3 @@ -#ifndef CLUEPAD_H -#define CLUEPAD_H +#pragma once #include "quantum.h" - -#endif diff --git a/keyboards/clueboard/17/config.h b/keyboards/clueboard/17/config.h index 877f478690..e2d0d1a23e 100644 --- a/keyboards/clueboard/17/config.h +++ b/keyboards/clueboard/17/config.h @@ -15,12 +15,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" /* Number of backlighting levels */ #define BACKLIGHT_LEVELS 3 - -#endif diff --git a/keyboards/clueboard/2x1800/2018/2018.h b/keyboards/clueboard/2x1800/2018/2018.h index c6e152ad44..6e2d3b3831 100644 --- a/keyboards/clueboard/2x1800/2018/2018.h +++ b/keyboards/clueboard/2x1800/2018/2018.h @@ -13,9 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TWOX1800_H -#define TWOX1800_H -#include "quantum.h" +#pragma once -#endif +#include "quantum.h" diff --git a/keyboards/clueboard/60/60.h b/keyboards/clueboard/60/60.h index 0345f419fa..9a019ccf6d 100644 --- a/keyboards/clueboard/60/60.h +++ b/keyboards/clueboard/60/60.h @@ -13,9 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CLUEBOARD60_H -#define CLUEBOARD60_H -#include "quantum.h" +#pragma once -#endif +#include "quantum.h" diff --git a/keyboards/clueboard/66_hotswap/gen1/config.h b/keyboards/clueboard/66_hotswap/gen1/config.h index 7e53e0a011..a6205b27bb 100644 --- a/keyboards/clueboard/66_hotswap/gen1/config.h +++ b/keyboards/clueboard/66_hotswap/gen1/config.h @@ -77,8 +77,8 @@ // 0b1110101 AD <-> SCL // 0b1110110 AD <-> SDA #define LED_DRIVER_ADDR_1 0b1110100 -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define LED_DRIVER_COUNT 1 #define DRIVER_LED_TOTAL 71 diff --git a/keyboards/coarse/vinta/vinta.h b/keyboards/coarse/vinta/vinta.h index 03a815c065..18f51cd434 100644 --- a/keyboards/coarse/vinta/vinta.h +++ b/keyboards/coarse/vinta/vinta.h @@ -1,55 +1,49 @@ -#ifndef VINTA_H -#define VINTA_H - -#define XXX KC_NO +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. #define LAYOUT_69_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, K2F, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3E, K3F, \ - K40, K41, K42, K45, K49, K4A, K4C, K4D, K4E, K4F \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, XXX, K2E, K2F }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, XXX, K3E, K3F }, \ - { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, XXX, K4C, K4D, K4E, K4F } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2E, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3C, k3E, k3F, \ + k40, k41, k42, k45, k49, k4A, k4C, k4D, k4E, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, XXX, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, XXX, k3C, XXX, k3E, k3F }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4A, XXX, k4C, k4D, k4E, k4F } \ } #define LAYOUT_68_tada( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, K2F, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3E, K3F, \ - K40, K41, K42, K45, K49, K4A, K4C, K4D, K4E, K4F \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, XXX, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, XXX, K2E, K2F }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, XXX, K3E, K3F }, \ - { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, XXX, XXX, K4D, K4E, K4F } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2E, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3C, k3E, k3F, \ + k40, k41, k42, k45, k49, k4A, k4C, k4D, k4E, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, XXX, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, XXX, k3C, XXX, k3E, k3F }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4A, XXX, XXX, k4D, k4E, k4F } \ } #define LAYOUT_65_ansi_blocker( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, K2F, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3E, K3F, \ - K40, K41, K42, K45, K49, K4A, K4D, K4E, K4F \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, XXX, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, XXX, K2E, K2F }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, XXX, K3E, K3F }, \ - { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, XXX, XXX, K4D, K4E, K4F } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2E, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3C, k3E, k3F, \ + k40, k41, k42, k45, k49, k4A, k4D, k4E, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, XXX, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, XXX, k3C, XXX, k3E, k3F }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4A, XXX, XXX, k4D, k4E, k4F } \ } - -#endif diff --git a/keyboards/comet46/comet46.h b/keyboards/comet46/comet46.h index c108d4193b..094d960e20 100644 --- a/keyboards/comet46/comet46.h +++ b/keyboards/comet46/comet46.h @@ -1,22 +1,21 @@ -#ifndef COMET46_H -#define COMET46_H +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11,\ - k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25,\ - k26, k27, k28, k29, k31, k32, k33, k34, k35, k36, k37, k38, k41, k42,\ - k43, k44, k45, k46, k47, k48 \ -) \ -{ \ - { k13, k01, k26, k12, k00, k11, k25, k42, k10, k24}, \ - { k03, k28, k14, k02, k27, k41, k09, k23, k38, k08}, \ - { k31, k16, k04, k29, k15, k22, k37, k07, k21, k36}, \ - { KC_NO, k32, k17, k05, k43, k48, k06, k20, k35, KC_NO }, \ - { KC_NO, k45, k33, k18, k44, k47, k19, k34, k46, KC_NO }, \ + k04, k01, k13, k10, k22, k33, k36, k27, k19, k16, k08, k05, \ + k03, k00, k12, k24, k21, k32, k43, k46, k37, k28, k25, k17, k09, k06, \ + k02, k14, k11, k23, k20, k31, k42, k47, k38, k29, k26, k18, k15, k07, \ + k34, k44, k41, k48, k45, k35 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { XXX, k31, k32, k33, k34, k35, k36, k37, k38, XXX }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47, k48, XXX } \ } -#endif diff --git a/keyboards/comet46/config.h b/keyboards/comet46/config.h index 5ae026f923..067dabb103 100644 --- a/keyboards/comet46/config.h +++ b/keyboards/comet46/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -72,5 +71,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ /* 8-bit data */ \ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); - -#endif diff --git a/keyboards/comet46/i2c.h b/keyboards/comet46/i2c.h index 47cf6bd1b2..710662c7ab 100644 --- a/keyboards/comet46/i2c.h +++ b/keyboards/comet46/i2c.h @@ -1,5 +1,4 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include <stdint.h> @@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void); extern unsigned char i2c_read(unsigned char ack); #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/contra/config.h b/keyboards/contra/config.h index 8dc565546b..499517f984 100755 --- a/keyboards/contra/config.h +++ b/keyboards/contra/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -44,5 +43,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/contra/contra.h b/keyboards/contra/contra.h index 74aad77d0b..27a8dd2956 100755 --- a/keyboards/contra/contra.h +++ b/keyboards/contra/contra.h @@ -1,30 +1,27 @@ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" #define LAYOUT_ortho_4x12( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \ + 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, k36, k37, k38, k39, k3A, k3B \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \ + { 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, k36, k37, k38, k39, k3A, k3B } \ } #define LAYOUT_planck_mit( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311 \ + 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 \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, K303, K304, K305, K305, K307, K308, K309, K310, K311 } \ + { 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, k35, k37, k38, k39, k3A, k3B } \ } - -#endif diff --git a/keyboards/converter/adb_usb/adb.c b/keyboards/converter/adb_usb/adb.c new file mode 100644 index 0000000000..28f14c9fe8 --- /dev/null +++ b/keyboards/converter/adb_usb/adb.c @@ -0,0 +1,531 @@ +/* +Copyright 2011-19 Jun WAKO <wakojun@gmail.com> +Copyright 2013 Shay Green <gblargg@gmail.com> + +This software is licensed with a Modified BSD License. +All of this is supposed to be Free Software, Open Source, DFSG-free, +GPL-compatible, and OK to use in both free and proprietary applications. +Additions and corrections to this file are welcome. + + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +* Neither the name of the copyright holders nor the names of + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +*/ + +#include <stdbool.h> +#include <util/delay.h> +#include <avr/io.h> +#include <avr/interrupt.h> +#include "adb.h" +#include "print.h" + +// GCC doesn't inline functions normally +#define data_lo() (ADB_DDR |= (1 << ADB_DATA_BIT)) +#define data_hi() (ADB_DDR &= ~(1 << ADB_DATA_BIT)) +#define data_in() (ADB_PIN & (1 << ADB_DATA_BIT)) + +#ifdef ADB_PSW_BIT +static inline void psw_lo(void); +static inline void psw_hi(void); +static inline bool psw_in(void); +#endif + +static inline void attention(void); +static inline void place_bit0(void); +static inline void place_bit1(void); +static inline void send_byte(uint8_t data); +static inline uint16_t wait_data_lo(uint16_t us); +static inline uint16_t wait_data_hi(uint16_t us); + +void adb_host_init(void) { + ADB_PORT &= ~(1 << ADB_DATA_BIT); + data_hi(); +#ifdef ADB_PSW_BIT + psw_hi(); +#endif +} + +#ifdef ADB_PSW_BIT +bool adb_host_psw(void) { return psw_in(); } +#endif + +/* + * Don't call this in a row without the delay, otherwise it makes some of poor controllers + * overloaded and misses strokes. Recommended interval is 12ms. + * + * Thanks a lot, blargg! + * <http://geekhack.org/index.php?topic=14290.msg1068919#msg1068919> + * <http://geekhack.org/index.php?topic=14290.msg1070139#msg1070139> + */ +uint16_t adb_host_kbd_recv(void) { return adb_host_talk(ADB_ADDR_KEYBOARD, ADB_REG_0); } + +#ifdef ADB_MOUSE_ENABLE +uint16_t adb_host_mouse_recv(void) { return adb_host_talk(ADB_ADDR_MOUSE, ADB_REG_0); } +#endif + +// This sends Talk command to read data from register and returns length of the data. +uint8_t adb_host_talk_buf(uint8_t addr, uint8_t reg, uint8_t *buf, uint8_t len) { + for (int8_t i = 0; i < len; i++) buf[i] = 0; + + cli(); + attention(); + send_byte((addr << 4) | ADB_CMD_TALK | reg); + place_bit0(); // Stopbit(0) + // TODO: Service Request(Srq): + // Device holds low part of comannd stopbit for 140-260us + // + // Command: + // ......._ ______________________ ___ ............_ ------- + // | | | | | | | + // Command | | | | | Data bytes | | + // ........|___| | 140-260 |__| |_............|___| + // |stop0 | Tlt Stop-to-Start |start1| |stop0 | + // + // Command without data: + // ......._ __________________________ + // | | + // Command | | + // ........|___| | 140-260 | + // |stop0 | Tlt Stop-to-Start | + // + // Service Request: + // ......._ ______ ___ ............_ ------- + // | 140-260 | | | | | | + // Command | Service Request | | | | Data bytes | | + // ........|___________________| |__| |_............|___| + // |stop0 | |start1| |stop0 | + // ......._ __________ + // | 140-260 | + // Command | Service Request | + // ........|___________________| + // |stop0 | + // This can be happened? + // ......._ ______________________ ___ ............_ ----- + // | | | | | | 140-260 | + // Command | | | | | Data bytes | Service Request | + // ........|___| | 140-260 |__| |_............|_________________| + // |stop0 | Tlt Stop-to-Start |start1| |stop0 | + // + // "Service requests are issued by the devices during a very specific time at the + // end of the reception of the command packet. + // If a device in need of service issues a service request, it must do so within + // the 65 µs of the Stop Bit’s low time and maintain the line low for a total of 300 µs." + // + // "A device sends a Service Request signal by holding the bus low during the low + // portion of the stop bit of any command or data transaction. The device must lengthen + // the stop by a minimum of 140 J.lS beyond its normal duration, as shown in Figure 8-15." + // http://ww1.microchip.com/downloads/en/AppNotes/00591b.pdf + if (!wait_data_hi(500)) { // Service Request(310us Adjustable Keyboard): just ignored + xprintf("R"); + sei(); + return 0; + } + if (!wait_data_lo(500)) { // Tlt/Stop to Start(140-260us) + sei(); + return 0; // No data from device(not error); + } + + // start bit(1) + if (!wait_data_hi(40)) { + xprintf("S"); + sei(); + return 0; + } + if (!wait_data_lo(100)) { + xprintf("s"); + sei(); + return 0; + } + + uint8_t n = 0; // bit count + do { + // + // |<- bit_cell_max(130) ->| + // | |<- lo ->| + // | | |<-hi->| + // _______ + // | | | + // | 130-lo | lo-hi | + // |________| | + // + uint8_t lo = (uint8_t)wait_data_hi(130); + if (!lo) goto error; // no more bit or after stop bit + + uint8_t hi = (uint8_t)wait_data_lo(lo); + if (!hi) goto error; // stop bit extedned by Srq? + + if (n / 8 >= len) continue; // can't store in buf + + buf[n / 8] <<= 1; + if ((130 - lo) < (lo - hi)) { + buf[n / 8] |= 1; + } + } while (++n); + +error: + sei(); + return n / 8; +} + +uint16_t adb_host_talk(uint8_t addr, uint8_t reg) { + uint8_t len; + uint8_t buf[8]; + len = adb_host_talk_buf(addr, reg, buf, 8); + if (len != 2) return 0; + return (buf[0] << 8 | buf[1]); +} + +void adb_host_listen_buf(uint8_t addr, uint8_t reg, uint8_t *buf, uint8_t len) { + cli(); + attention(); + send_byte((addr << 4) | ADB_CMD_LISTEN | reg); + place_bit0(); // Stopbit(0) + // TODO: Service Request + _delay_us(200); // Tlt/Stop to Start + place_bit1(); // Startbit(1) + for (int8_t i = 0; i < len; i++) { + send_byte(buf[i]); + // xprintf("%02X ", buf[i]); + } + place_bit0(); // Stopbit(0); + sei(); +} + +void adb_host_listen(uint8_t addr, uint8_t reg, uint8_t data_h, uint8_t data_l) { + uint8_t buf[2] = {data_h, data_l}; + adb_host_listen_buf(addr, reg, buf, 2); +} + +void adb_host_flush(uint8_t addr) { + cli(); + attention(); + send_byte((addr << 4) | ADB_CMD_FLUSH); + place_bit0(); // Stopbit(0) + _delay_us(200); // Tlt/Stop to Start + sei(); +} + +// send state of LEDs +void adb_host_kbd_led(uint8_t led) { + // Listen Register2 + // upper byte: not used + // lower byte: bit2=ScrollLock, bit1=CapsLock, bit0=NumLock + adb_host_listen(ADB_ADDR_KEYBOARD, ADB_REG_2, 0, led & 0x07); +} + +#ifdef ADB_PSW_BIT +static inline void psw_lo() { + ADB_DDR |= (1 << ADB_PSW_BIT); + ADB_PORT &= ~(1 << ADB_PSW_BIT); +} +static inline void psw_hi() { + ADB_PORT |= (1 << ADB_PSW_BIT); + ADB_DDR &= ~(1 << ADB_PSW_BIT); +} +static inline bool psw_in() { + ADB_PORT |= (1 << ADB_PSW_BIT); + ADB_DDR &= ~(1 << ADB_PSW_BIT); + return ADB_PIN & (1 << ADB_PSW_BIT); +} +#endif + +static inline void attention(void) { + data_lo(); + _delay_us(800 - 35); // bit1 holds lo for 35 more + place_bit1(); +} + +static inline void place_bit0(void) { + data_lo(); + _delay_us(65); + data_hi(); + _delay_us(35); +} + +static inline void place_bit1(void) { + data_lo(); + _delay_us(35); + data_hi(); + _delay_us(65); +} + +static inline void send_byte(uint8_t data) { + for (int i = 0; i < 8; i++) { + if (data & (0x80 >> i)) + place_bit1(); + else + place_bit0(); + } +} + +// These are carefully coded to take 6 cycles of overhead. +// inline asm approach became too convoluted +static inline uint16_t wait_data_lo(uint16_t us) { + do { + if (!data_in()) break; + _delay_us(1 - (6 * 1000000.0 / F_CPU)); + } while (--us); + return us; +} + +static inline uint16_t wait_data_hi(uint16_t us) { + do { + if (data_in()) break; + _delay_us(1 - (6 * 1000000.0 / F_CPU)); + } while (--us); + return us; +} + +/* +ADB Protocol +============ + +Resources +--------- +ADB - The Untold Story: Space Aliens Ate My Mouse + http://developer.apple.com/legacy/mac/library/#technotes/hw/hw_01.html +ADB Manager + http://developer.apple.com/legacy/mac/library/documentation/mac/pdf/Devices/ADB_Manager.pdf + Service request(5-17) +Apple IIgs Hardware Reference Second Edition [Chapter6 p121] + ftp://ftp.apple.asimov.net/pub/apple_II/documentation/Apple%20IIgs%20Hardware%20Reference.pdf +ADB Keycode + http://72.0.193.250/Documentation/macppc/adbkeycodes/ + http://m0115.web.fc2.com/m0115.jpg + [Inside Macintosh volume V, pages 191-192] + http://www.opensource.apple.com/source/IOHIDFamily/IOHIDFamily-421.18.3/IOHIDFamily/Cosmo_USB2ADB.c +ADB Signaling + http://kbdbabel.sourceforge.net/doc/kbd_signaling_pcxt_ps2_adb.pdf +ADB Overview & History + http://en.wikipedia.org/wiki/Apple_Desktop_Bus +Microchip Application Note: ADB device(with code for PIC16C) + http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en011062 +AVR ATtiny2131 ADB to PS/2 converter(Japanese) + http://hp.vector.co.jp/authors/VA000177/html/KeyBoardA5DEA5CBA5A2II.html + + +Pinouts +------- + ADB female socket from the front: + __________ + | | <--- top + | 4o o3 | + |2o o1| + | == | + |________| <--- bottom + | | <--- 4pins + + + ADB female socket from bottom: + + ========== <--- front + | | + | | + |2o o1| + |4o o3| + ---------- <--- back + + 1: Data + 2: Power SW(low when press Power key) + 3: Vcc(5V) + 4: GND + + +Commands +-------- + ADB command is 1byte and consists of 4bit-address, 2bit-command + type and 2bit-register. The commands are always sent by Host. + + Command format: + 7 6 5 4 3 2 1 0 + | | | |------------ address + | |-------- command type + | |---- register + + bits commands + ------------------------------------------------------ + - - - - 0 0 0 0 Send Reset(reset all devices) + A A A A 0 0 0 1 Flush(reset a device) + - - - - 0 0 1 0 Reserved + - - - - 0 0 1 1 Reserved + - - - - 0 1 - - Reserved + A A A A 1 0 R R Listen(write to a device) + A A A A 1 1 R R Talk(read from a device) + + The command to read keycodes from keyboard is 0x2C which + consist of keyboard address 2 and Talk against register 0. + + Address: + 2: keyboard + 3: mice + + Registers: + 0: application(keyboard uses this to store its data.) + 1: application + 2: application(keyboard uses this for LEDs and state of modifiers) + 3: status and command + + +Communication +------------- + This is a minimum information for keyboard communication. + See "Resources" for detail. + + Signaling: + + ~~~~____________~~||||||||||||__~~~~~_~~|||||||||||||||__~~~~ + + |800us | |7 Command 0| | | |15-64 Data 0|Stopbit(0) + +Attention | | | +Startbit(1) + +Startbit(1) | +Tlt(140-260us) + +stopbit(0) + + Bit cells: + + bit0: ______~~~ + 65 :35us + + bit1: ___~~~~~~ + 35 :65us + + bit0 low time: 60-70% of bit cell(42-91us) + bit1 low time: 30-40% of bit cell(21-52us) + bit cell time: 70-130us + [from Apple IIgs Hardware Reference Second Edition] + + Criterion for bit0/1: + After 55us if line is low/high then bit is 0/1. + + Attention & start bit: + Host asserts low in 560-1040us then places start bit(1). + + Tlt(Stop to Start): + Bus stays high in 140-260us then device places start bit(1). + + Global reset: + Host asserts low in 2.8-5.2ms. All devices are forced to reset. + + Service request from device(Srq): + Device can request to send at commad(Global only?) stop bit. + Requesting device keeps low for 140-260us at stop bit of command. + + +Keyboard Data(Register0) + This 16bit data can contains two keycodes and two released flags. + First keycode is palced in upper byte. When one keyocode is sent, + lower byte is 0xFF. + Release flag is 1 when key is released. + + 1514 . . . . . 8 7 6 . . . . . 0 + | | | | | | | | | +-+-+-+-+-+-+- Keycode2 + | | | | | | | | +--------------- Released2(1 when the key is released) + | +-+-+-+-+-+-+----------------- Keycode1 + +------------------------------- Released1(1 when the key is released) + + Keycodes: + Scancode consists of 7bit keycode and 1bit release flag. + Device can send two keycodes at once. If just one keycode is sent + keycode1 contains it and keyocode2 is 0xFF. + + Power switch: + You can read the state from PSW line(active low) however + the switch has a special scancode 0x7F7F, so you can + also read from Data line. It uses 0xFFFF for release scancode. + +Keyboard LEDs & state of keys(Register2) + This register hold current state of three LEDs and nine keys. + The state of LEDs can be changed by sending Listen command. + + 1514 . . . . . . 7 6 5 . 3 2 1 0 + | | | | | | | | | | | | | | | +- LED1(NumLock) + | | | | | | | | | | | | | | +--- LED2(CapsLock) + | | | | | | | | | | | | | +----- LED3(ScrollLock) + | | | | | | | | | | +-+-+------- Reserved + | | | | | | | | | +------------- ScrollLock + | | | | | | | | +--------------- NumLock + | | | | | | | +----------------- Apple/Command + | | | | | | +------------------- Option + | | | | | +--------------------- Shift + | | | | +----------------------- Control + | | | +------------------------- Reset/Power + | | +--------------------------- CapsLock + | +----------------------------- Delete + +------------------------------- Reserved + +Address, Handler ID and bits(Register3) + 1514131211 . . 8 7 . . . . . . 0 + | | | | | | | | | | | | | | | | + | | | | | | | | +-+-+-+-+-+-+-+- Handler ID + | | | | +-+-+-+----------------- Address + | | | +------------------------- 0 + | | +--------------------------- Service request enable(1 = enabled) + | +----------------------------- Exceptional event(alwyas 1 if not used) + +------------------------------- 0 + +ADB Bit Cells + bit cell time: 70-130us + low part of bit0: 60-70% of bit cell + low part of bit1: 30-40% of bit cell + + bit cell time 70us 130us + -------------------------------------------- + low part of bit0 42-49 78-91 + high part of bit0 21-28 39-52 + low part of bit1 21-28 39-52 + high part of bit1 42-49 78-91 + + + bit0: + 70us bit cell: + ____________~~~~~~ + 42-49 21-28 + + 130us bit cell: + ____________~~~~~~ + 78-91 39-52 + + bit1: + 70us bit cell: + ______~~~~~~~~~~~~ + 21-28 42-49 + + 130us bit cell: + ______~~~~~~~~~~~~ + 39-52 78-91 + + [from Apple IIgs Hardware Reference Second Edition] + +Keyboard Handle ID + Apple Standard Keyboard M0116: 0x01 + Apple Extended Keyboard M0115: 0x02 + Apple Extended Keyboard II M3501: 0x02 + Apple Adjustable Keybaord: 0x10 + + http://lxr.free-electrons.com/source/drivers/macintosh/adbhid.c?v=4.4#L802 + +END_OF_ADB +*/ diff --git a/keyboards/converter/adb_usb/adb.h b/keyboards/converter/adb_usb/adb.h new file mode 100644 index 0000000000..fe8becc2d5 --- /dev/null +++ b/keyboards/converter/adb_usb/adb.h @@ -0,0 +1,106 @@ +/* +Copyright 2011-19 Jun WAKO <wakojun@gmail.com> + +This software is licensed with a Modified BSD License. +All of this is supposed to be Free Software, Open Source, DFSG-free, +GPL-compatible, and OK to use in both free and proprietary applications. +Additions and corrections to this file are welcome. + + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +* Neither the name of the copyright holders nor the names of + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +*/ + +#pragma once + +#include <stdint.h> +#include <stdbool.h> + +#if !(defined(ADB_PORT) && defined(ADB_PIN) && defined(ADB_DDR) && defined(ADB_DATA_BIT)) +# error "ADB port setting is required in config.h" +#endif + +#define ADB_POWER 0x7F +#define ADB_CAPS 0x39 + +/* ADB commands */ +// Default Address +#define ADB_ADDR_0 0 +#define ADB_ADDR_DONGLE 1 +#define ADB_ADDR_KEYBOARD 2 +#define ADB_ADDR_MOUSE 3 +#define ADB_ADDR_TABLET 4 +#define ADB_ADDR_APPLIANCE 7 +#define ADB_ADDR_8 8 +#define ADB_ADDR_9 9 +#define ADB_ADDR_10 10 +#define ADB_ADDR_11 11 +#define ADB_ADDR_12 12 +#define ADB_ADDR_13 13 +#define ADB_ADDR_14 14 +#define ADB_ADDR_15 15 +// for temporary purpose, do not use for polling +#define ADB_ADDR_TMP 15 +#define ADB_ADDR_MOUSE_POLL 10 +// Command Type +#define ADB_CMD_RESET 0 +#define ADB_CMD_FLUSH 1 +#define ADB_CMD_LISTEN 8 +#define ADB_CMD_TALK 12 +// Register +#define ADB_REG_0 0 +#define ADB_REG_1 1 +#define ADB_REG_2 2 +#define ADB_REG_3 3 + +/* ADB keyboard handler id */ +#define ADB_HANDLER_STD 0x01 /* IIGS, M0116 */ +#define ADB_HANDLER_AEK 0x02 /* M0115, M3501 */ +#define ADB_HANDLER_AEK_RMOD 0x03 /* M0115, M3501, alternate mode enableing right modifiers */ +#define ADB_HANDLER_STD_ISO 0x04 /* M0118, ISO swapping keys */ +#define ADB_HANDLER_AEK_ISO 0x05 /* M0115, M3501, ISO swapping keys */ +#define ADB_HANDLER_M1242_ANSI 0x10 /* Adjustable keyboard */ +#define ADB_HANDLER_CLASSIC1_MOUSE 0x01 +#define ADB_HANDLER_CLASSIC2_MOUSE 0x02 +#define ADB_HANDLER_EXTENDED_MOUSE 0x04 +#define ADB_HANDLER_TURBO_MOUSE 0x32 + +// ADB host +void adb_host_init(void); +bool adb_host_psw(void); +uint16_t adb_host_talk(uint8_t addr, uint8_t reg); +uint8_t adb_host_talk_buf(uint8_t addr, uint8_t reg, uint8_t *buf, uint8_t len); +void adb_host_listen(uint8_t addr, uint8_t reg, uint8_t data_h, uint8_t data_l); +void adb_host_listen_buf(uint8_t addr, uint8_t reg, uint8_t *buf, uint8_t len); +void adb_host_flush(uint8_t addr); +void adb_host_kbd_led(uint8_t led); +uint16_t adb_host_kbd_recv(void); +uint16_t adb_host_mouse_recv(void); + +// ADB Mouse +void adb_mouse_task(void); +void adb_mouse_init(void); diff --git a/keyboards/converter/adb_usb/adb_usb.h b/keyboards/converter/adb_usb/adb_usb.h index 3db303b039..ddbbd71564 100644 --- a/keyboards/converter/adb_usb/adb_usb.h +++ b/keyboards/converter/adb_usb/adb_usb.h @@ -17,11 +17,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. Ported to QMK by Peter Roe <pete@13bit.me> */ -#ifndef ADB_USB_H -#define ADB_USB_H +#pragma once #include "quantum.h" +#define XXX KC_NO + /* M0115/M3501 Apple Extended Keyboard ANSI * ,---. ,---------------. ,---------------. ,---------------. ,-----------. ,---. * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |Pwr| @@ -39,29 +40,29 @@ Ported to QMK by Peter Roe <pete@13bit.me> * `-----------------------------------------------------------' `-----------' `---------------' */ #define LAYOUT_ext_ansi( \ - K35, K7A,K78,K63,K76,K60,K61,K62,K64,K65,K6D,K67,K6F, K69,K6B,K71, K7F, \ - K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K72,K73,K74, K47,K51,K4B,K43, \ - K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E,K2A, K75,K77,K79, K59,K5B,K5C,K4E, \ - K39,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27, K24, K56,K57,K58,K45, \ - K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C, K7B, K3E, K53,K54,K55, \ - K36,K3A,K37, K31, K7C,K7D, K3B,K3D,K3C, K52, K41,K4C \ + k35, k7A, k78, k63, k76, k60, k61, k62, k64, k65, k6D, k67, k6F, k69, k6B, k71, k7F, \ + k32, k12, k13, k14, k15, k17, k16, k1A, k1C, k19, k1D, k1B, k18, k33, k72, k73, k74, k47, k51, k4B, k43, \ + k30, k0C, k0D, k0E, k0F, k11, k10, k20, k22, k1F, k23, k21, k1E, k2A, k75, k77, k79, k59, k5B, k5C, k4E, \ + k39, k00, k01, k02, k03, k05, k04, k26, k28, k25, k29, k27, k24, k56, k57, k58, k45, \ + k38, k06, k07, k08, k09, k0B, k2D, k2E, k2B, k2F, k2C, k7B, k3E, k53, k54, k55,\ + k36, k3A, k37, k31, k7C, k7D, k3B, k3D, k3C, k52, k41, k4C \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K08, K09, KC_NO, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27 }, \ - { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, K31, K32, K33, KC_NO, K35, K36, K37 }, \ - { K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO, }, \ - { KC_NO, K41, KC_NO, K43, KC_NO, K45, KC_NO, K47 }, \ - { KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, K4E, KC_NO, }, \ - { KC_NO, K51, K52, K53, K54, K55, K56, K57 }, \ - { K58, K59, KC_NO, K5B, K5C, KC_NO, KC_NO, KC_NO, }, \ - { K60, K61, K62, K63, K64, K65, KC_NO, K67 }, \ - { KC_NO, K69, KC_NO, K6B, KC_NO, K6D, KC_NO, K6F }, \ - { KC_NO, K71, K72, K73, K74, K75, K76, K77 }, \ - { K78, K79, K7A, K7B, K7C, K7D, KC_NO, K7F } \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k08, k09, XXX, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, XXX, k35, k36, k37 }, \ + { k38, k39, k3A, k3B, k3C, k3D, k3E, XXX }, \ + { XXX, k41, XXX, k43, XXX, k45, XXX, k47 }, \ + { XXX, XXX, XXX, k4B, k4C, XXX, k4E, XXX }, \ + { XXX, k51, k52, k53, k54, k55, k56, k57 }, \ + { k58, k59, XXX, k5B, k5C, XXX, XXX, XXX }, \ + { k60, k61, k62, k63, k64, k65, XXX, k67 }, \ + { XXX, k69, XXX, k6B, XXX, k6D, XXX, k6F }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77 }, \ + { k78, k79, k7A, k7B, k7C, k7D, XXX, k7F } \ } /* M0116 Apple Standard Keyboard ANSI @@ -81,29 +82,27 @@ Ported to QMK by Peter Roe <pete@13bit.me> * +---------------------------------------------------------+ +-------+---+---+ */ #define LAYOUT_m0116_ansi( \ - K7F, \ - K35,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K47,K51,K4B,K43, \ - K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E, K59,K5B,K5C,K45, \ - K36,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27, K24, K56,K57,K58,K4E, \ - K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C, K7B, K53,K54,K55, \ - K39,K3A,K37,K32, K31, K2A,K3B,K3C,K3D,K3E, K52, K41,K4C \ + k7F, \ + k35, k12, k13, k14, k15, k17, k16, k1A, k1C, k19, k1D, k1B, k18, k33, k47, k51, k4B, k43, \ + k30, k0C, k0D, k0E, k0F, k11, k10, k20, k22, k1F, k23, k21, k1E, k59, k5B, k5C, k45, \ + k36, k00, k01, k02, k03, k05, k04, k26, k28, k25, k29, k27, k24, k56, k57, k58, k4E, \ + k38, k06, k07, k08, k09, k0B, k2D, k2E, k2B, k2F, k2C, k7B, k53, k54, k55, \ + k39, k3A, k37, k32, k31, k2A, k3B, k3C, k3D, k3E, k52, k41, k4C \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K08, K09, KC_NO, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27 }, \ - { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, K31, K32, K33, KC_NO, K35, K36, K37 }, \ - { K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO }, \ - { KC_NO, K41, KC_NO, K43, KC_NO, K45, KC_NO, K47 }, \ - { KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, K4E, KC_NO }, \ - { KC_NO, K51, K52, K53, K54, K55, K56, K57 }, \ - { K58, K59, KC_NO, K5B, K5C, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, K7B, KC_NO, KC_NO, KC_NO, K7F } \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k08, k09, XXX, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, XXX, k35, k36, k37 }, \ + { k38, k39, k3A, k3B, k3C, k3D, k3E, XXX }, \ + { XXX, k41, XXX, k43, XXX, k45, XXX, k47 }, \ + { XXX, XXX, XXX, k4B, k4C, XXX, k4E, XXX }, \ + { XXX, k51, k52, k53, k54, k55, k56, k57 }, \ + { k58, k59, XXX, k5B, k5C, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, k7B, XXX, XXX, XXX, k7F } \ } - -#endif diff --git a/keyboards/converter/adb_usb/matrix.c b/keyboards/converter/adb_usb/matrix.c index 9e5399de5d..e6a4921960 100644 --- a/keyboards/converter/adb_usb/matrix.c +++ b/keyboards/converter/adb_usb/matrix.c @@ -31,6 +31,10 @@ Ported to QMK by Peter Roe <pete@13bit.me> #include "led.h" #include "timer.h" +#ifndef ADB_MOUSE_MAXACC +# define ADB_MOUSE_MAXACC 8 +#endif + static bool is_iso_layout = false; // matrix state buffer(1:on, 0:off) @@ -84,6 +88,10 @@ void matrix_init(void) static report_mouse_t mouse_report = {}; +void housekeeping_task_kb(void) { + adb_mouse_task(); +} + void adb_mouse_task(void) { uint16_t codes; diff --git a/keyboards/converter/adb_usb/rules.mk b/keyboards/converter/adb_usb/rules.mk index 56967770b3..8f4649f556 100644 --- a/keyboards/converter/adb_usb/rules.mk +++ b/keyboards/converter/adb_usb/rules.mk @@ -16,7 +16,9 @@ NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA EXTRAKEY_ENABLE = yes USB_HID_ENABLE = yes BACKLIGHT_ENABLE = no -#BLUETOOTH = AdafruitBLE # For Adafruit Feather 32U4 BLE support, uncomment this line CUSTOM_MATRIX = yes SRC = matrix.c adb.c led.c + +# ADB_MOUSE_ENABLE +# OPT_DEFS += -DADB_MOUSE_ENABLE -DMOUSE_ENABLE diff --git a/keyboards/converter/ibm_terminal/config.h b/keyboards/converter/ibm_terminal/config.h index 5d8e5f8135..2cd36c5fb0 100644 --- a/keyboards/converter/ibm_terminal/config.h +++ b/keyboards/converter/ibm_terminal/config.h @@ -16,9 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H - +#pragma once #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6535 @@ -47,15 +45,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifdef PS2_USE_USART /* XCK for clock line */ -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 5 -/* RXD for data line */ -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 2 +#define PS2_CLOCK_PIN D5 +#define PS2_DATA_PIN D2 /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ /* set DDR of CLOCK as input to be slave */ @@ -95,15 +86,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifdef PS2_USE_INT /* uses INT1 for clock line(ATMega32U4) */ -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 1 - -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 0 +#define PS2_CLOCK_PIN D1 +#define PS2_DATA_PIN D0 #define PS2_INT_INIT() do { \ EICRA |= ((1<<ISC11) | \ @@ -123,15 +107,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * PS/2 Busywait configuration */ #ifdef PS2_USE_BUSYWAIT -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 1 - -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 0 -#endif - +#define PS2_CLOCK_PIN D1 +#define PS2_DATA_PIN D0 #endif diff --git a/keyboards/converter/ibm_terminal/ibm_terminal.h b/keyboards/converter/ibm_terminal/ibm_terminal.h index adf048206e..ce50e5f437 100644 --- a/keyboards/converter/ibm_terminal/ibm_terminal.h +++ b/keyboards/converter/ibm_terminal/ibm_terminal.h @@ -1,8 +1,9 @@ -#ifndef IBM_TERMINAL_H -#define IBM_TERMINAL_H +#pragma once #include "quantum.h" +#define XXX KC_NO + void matrix_init_user(void); /* @@ -20,63 +21,61 @@ void matrix_init_user(void); * +---------+ */ #define LAYOUT( \ - K08,K10,K18,K20,K28,K30,K38,K40,K48,K50,K57,K5F, \ - K07,K0F,K17,K1F,K27,K2F,K37,K3F,K47,K4F,K56,K5E, \ - \ - K05,K06, K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K5D,K66, K67,K6E,K6F, K76,K77,K7E,K84, \ - K04,K0C, K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B, K5C, K64,K65,K6D, K6C,K75,K7D,K7C, \ - K03,K0B, K14,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K53,K5A, K63, K6B,K73,K74,K7B, \ - K83,K0A, K12,K13,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K51,K59, K61,K62,K6A, K69,K72,K7A,K79, \ - K01,K09, K11, K19, K29, K39, K58, K60, K68,K70,K71,K78 \ + k08, k10, k18, k20, k28, k30, k38, k40, k48, k50, k57, k5F, \ + k07, k0F, k17, k1F, k27, k2F, k37, k3F, k47, k4F, k56, k5E, \ +\ + k05, k06, k0E, k16, k1E, k26, k25, k2E, k36, k3D, k3E, k46, k45, k4E, k55, k5D, k66, k67, k6E, k6F, k76, k77, k7E, k84, \ + k04, k0C, k0D, k15, k1D, k24, k2D, k2C, k35, k3C, k43, k44, k4D, k54, k5B, k5C, k64, k65, k6D, k6C, k75, k7D, k7C, \ + k03, k0B, k14, k1C, k1B, k23, k2B, k34, k33, k3B, k42, k4B, k4C, k52, k53, k5A, k63, k6B, k73, k74, k7B, \ + k83, k0A, k12, k13, k1A, k22, k21, k2A, k32, k31, k3A, k41, k49, k4A, k51, k59, k61, k62, k6A, k69, k72, k7A, k79, \ + k01, k09, k11, k19, k29, k39, k58, k60, k68, k70, k71, k78 \ ) { \ - { KC_NO, K01, KC_NO, K03, K04, K05, K06, K07 }, \ - { K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27 }, \ - { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ - { K40, K41, K42, K43, K44, K45, K46, K47 }, \ - { K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \ - { K70, K71, K72, K73, K74, K75, K76, K77 }, \ - { K78, K79, K7A, K7B, K7C, K7D, K7E, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, K83, K84, KC_NO, KC_NO, KC_NO } \ + { XXX, k01, XXX, k03, k04, k05, k06, k07 }, \ + { k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k48, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k58, k59, k5A, k5B, k5C, k5D, k5E, k5F }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k68, k69, k6A, k6B, k6C, k6D, k6E, k6F }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 }, \ + { k78, k79, k7A, k7B, k7C, k7D, k7E, XXX }, \ + { XXX, XXX, XXX, k83, k84, XXX, XXX, XXX } \ } /* * IBM Terminal keyboard 1399625, 101-key */ #define LAYOUT_101( \ - K08, K07,K0F,K17,K1F,K27,K2F,K37,K3F,K47,K4F,K56,K5E, K57,K5F,K62, \ - \ - K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, K67,K6E,K6F, K76,K77,K7E,K84, \ - K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5C, K64,K65,K6D, K6C,K75,K7D, \ - K14,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K5A, K6B,K73,K74,K7C, \ - K12, K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K59, K63, K69,K72,K7A, \ - K11, K19, K29, K39, K58, K61,K60,K6A, K70, K71,K79 \ + k08, k07, k0F, k17, k1F, k27, k2F, k37, k3F, k47, k4F, k56, k5E, k57, k5F, k62, \ +\ + k0E, k16, k1E, k26, k25, k2E, k36, k3D, k3E, k46, k45, k4E, k55, k66, k67, k6E, k6F, k76, k77, k7E, k84, \ + k0D, k15, k1D, k24, k2D, k2C, k35, k3C, k43, k44, k4D, k54, k5B, k5C, k64, k65, k6D, k6C, k75, k7D, \ + k14, k1C, k1B, k23, k2B, k34, k33, k3B, k42, k4B, k4C, k52, k5A, k6B, k73, k74, k7C, \ + k12, k1A, k22, k21, k2A, k32, k31, k3A, k41, k49, k4A, k59, k63, k69, k72, k7A, \ + k11, k19, k29, k39, k58, k61, k60, k6A, k70, k71, k79 \ ) { \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K07 }, \ - { K08, KC_NO, KC_NO, KC_NO, KC_NO, K0D, K0E, K0F }, \ - { KC_NO, K11, K12, KC_NO, K14, K15, K16, K17 }, \ - { KC_NO, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ - { KC_NO, K21, K22, K23, K24, K25, K26, K27 }, \ - { KC_NO, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { KC_NO, K31, K32, K33, K34, K35, K36, K37 }, \ - { KC_NO, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ - { KC_NO, K41, K42, K43, K44, K45, K46, K47 }, \ - { KC_NO, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \ - { KC_NO, KC_NO, K52, KC_NO, K54, K55, K56, K57 }, \ - { K58, K59, K5A, K5B, K5C, KC_NO, K5E, K5F }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { KC_NO, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \ - { K70, K71, K72, K73, K74, K75, K76, K77 }, \ - { KC_NO, K79, K7A, KC_NO, K7C, K7D, K7E, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K84, KC_NO, KC_NO, KC_NO } \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, k07 }, \ + { k08, XXX, XXX, XXX, XXX, k0D, k0E, k0F }, \ + { XXX, k11, k12, XXX, k14, k15, k16, k17 }, \ + { XXX, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { XXX, k21, k22, k23, k24, k25, k26, k27 }, \ + { XXX, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { XXX, k31, k32, k33, k34, k35, k36, k37 }, \ + { XXX, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47 }, \ + { XXX, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ + { XXX, XXX, k52, XXX, k54, k55, k56, k57 }, \ + { k58, k59, k5A, k5B, k5C, XXX, k5E, k5F }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { XXX, k69, k6A, k6B, k6C, k6D, k6E, k6F }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 }, \ + { XXX, k79, k7A, XXX, k7C, k7D, k7E, XXX }, \ + { XXX, XXX, XXX, XXX, k84, XXX, XXX, XXX } \ } - -#endif diff --git a/keyboards/converter/m0110_usb/m0110.c b/keyboards/converter/m0110_usb/m0110.c new file mode 100644 index 0000000000..64f2fa50ab --- /dev/null +++ b/keyboards/converter/m0110_usb/m0110.c @@ -0,0 +1,583 @@ +/* +Copyright 2011,2012 Jun WAKO <wakojun@gmail.com> + +This software is licensed with a Modified BSD License. +All of this is supposed to be Free Software, Open Source, DFSG-free, +GPL-compatible, and OK to use in both free and proprietary applications. +Additions and corrections to this file are welcome. + + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +* Neither the name of the copyright holders nor the names of + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +*/ +/* M0110A Support was contributed by skagon@github */ + +#include <stdbool.h> +#include <avr/io.h> +#include <avr/interrupt.h> +#include <util/delay.h> +#include "m0110.h" +#include "debug.h" + +static inline uint8_t raw2scan(uint8_t raw); +static inline uint8_t inquiry(void); +static inline uint8_t instant(void); +static inline void clock_lo(void); +static inline void clock_hi(void); +static inline bool clock_in(void); +static inline void data_lo(void); +static inline void data_hi(void); +static inline bool data_in(void); +static inline uint16_t wait_clock_lo(uint16_t us); +static inline uint16_t wait_clock_hi(uint16_t us); +static inline uint16_t wait_data_lo(uint16_t us); +static inline uint16_t wait_data_hi(uint16_t us); +static inline void idle(void); +static inline void request(void); + +#define WAIT_US(stat, us, err) \ + do { \ + if (!wait_##stat(us)) { \ + m0110_error = err; \ + goto ERROR; \ + } \ + } while (0) + +#define WAIT_MS(stat, ms, err) \ + do { \ + uint16_t _ms = ms; \ + while (_ms) { \ + if (wait_##stat(1000)) { \ + break; \ + } \ + _ms--; \ + } \ + if (_ms == 0) { \ + m0110_error = err; \ + goto ERROR; \ + } \ + } while (0) + +#define KEY(raw) ((raw)&0x7f) +#define IS_BREAK(raw) (((raw)&0x80) == 0x80) + +uint8_t m0110_error = 0; + +void m0110_init(void) { + idle(); + _delay_ms(1000); + + /* Not needed to initialize in fact. + uint8_t data; + m0110_send(M0110_MODEL); + data = m0110_recv(); + print("m0110_init model: "); print_hex8(data); print("\n"); + + m0110_send(M0110_TEST); + data = m0110_recv(); + print("m0110_init test: "); print_hex8(data); print("\n"); + */ +} + +uint8_t m0110_send(uint8_t data) { + m0110_error = 0; + + request(); + WAIT_MS(clock_lo, 250, 1); // keyboard may block long time + for (uint8_t bit = 0x80; bit; bit >>= 1) { + WAIT_US(clock_lo, 250, 3); + if (data & bit) { + data_hi(); + } else { + data_lo(); + } + WAIT_US(clock_hi, 200, 4); + } + _delay_us(100); // hold last bit for 80us + idle(); + return 1; +ERROR: + print("m0110_send err: "); + print_hex8(m0110_error); + print("\n"); + _delay_ms(500); + idle(); + return 0; +} + +uint8_t m0110_recv(void) { + uint8_t data = 0; + m0110_error = 0; + + WAIT_MS(clock_lo, 250, 1); // keyboard may block long time + for (uint8_t i = 0; i < 8; i++) { + data <<= 1; + WAIT_US(clock_lo, 200, 2); + WAIT_US(clock_hi, 200, 3); + if (data_in()) { + data |= 1; + } + } + idle(); + return data; +ERROR: + print("m0110_recv err: "); + print_hex8(m0110_error); + print("\n"); + _delay_ms(500); + idle(); + return 0xFF; +} + +/* +Handling for exceptional case of key combinations for M0110A + +Shift and Calc/Arrow key could be operated simultaneously: + + Case Shift Arrow Events Interpret + ------------------------------------------------------------------- + 1 Down Down 71, 79, DD Calc(d)*a *b + 2 Down Up 71, 79, UU Arrow&Calc(u)*a + 3 Up Down F1, 79, DD Shift(u) *c + 4 Up Up F1, 79, UU Shift(u) and Arrow&Calc(u)*a + + Case Shift Calc Events Interpret + ------------------------------------------------------------------- + 5(1) Down Down 71, 71, 79, DD Shift(d) and Cacl(d) + 6(2) Down Up F1, 71, 79, UU Shift(u) and Arrow&Calc(u)*a + 7(1) Up Down F1, 71, 79, DD Shift(u) and Calc(d) + 8(4) Up Up F1, F1, 79, UU Shift(ux2) and Arrow&Calc(u)*a + +During Calc key is hold: + Case Shift Arrow Events Interpret + ------------------------------------------------------------------- + A(3) ---- Down F1, 79, DD Shift(u) *c + B ---- Up 79, UU Arrow&Calc(u)*a + C Down ---- F1, 71 Shift(u) and Shift(d) + D Up ---- F1 Shift(u) + E Hold Down 79, DD Normal + F Hold Up 79, UU Arrow&Calc(u)*a + G(1) Down Down F1, 71, 79, DD Shift(u)*b and Calc(d)*a + H(2) Down Up F1, 71, 79, UU Shift(u) and Arrow&Calc(u)*a + I(3) Up Down F1, F1, 79, DD Shift(ux2) *c + J(4) Up Up F1, 79, UU Shift(u) and Arrow&Calc(u)*a + + Case Shift Calc Events Interpret + ------------------------------------------------------------------- + K(1) ---- Down 71, 79, DD Calc(d)*a + L(4) ---- Up F1, 79, UU Shift(u) and Arrow&Calc(u)*a + M(1) Hold Down 71, 79, DD Calc(d)*a + N Hold Up 79, UU Arrow&Calc(u)*a + + Where DD/UU indicates part of Keypad Down/Up event. + *a: Impossible to distinguish btween Arrow and Calc event. + *b: Shift(d) event is ignored. + *c: Arrow/Calc(d) event is ignored. +*/ +uint8_t m0110_recv_key(void) { + static uint8_t keybuf = 0x00; + static uint8_t keybuf2 = 0x00; + static uint8_t rawbuf = 0x00; + uint8_t raw, raw2, raw3; + + if (keybuf) { + raw = keybuf; + keybuf = 0x00; + return raw; + } + if (keybuf2) { + raw = keybuf2; + keybuf2 = 0x00; + return raw; + } + + if (rawbuf) { + raw = rawbuf; + rawbuf = 0x00; + } else { + raw = instant(); // Use INSTANT for better response. Should be INQUIRY ? + } + switch (KEY(raw)) { + case M0110_KEYPAD: + raw2 = instant(); + switch (KEY(raw2)) { + case M0110_ARROW_UP: + case M0110_ARROW_DOWN: + case M0110_ARROW_LEFT: + case M0110_ARROW_RIGHT: + if (IS_BREAK(raw2)) { + // Case B,F,N: + keybuf = (raw2scan(raw2) | M0110_CALC_OFFSET); // Calc(u) + return (raw2scan(raw2) | M0110_KEYPAD_OFFSET); // Arrow(u) + } + break; + } + // Keypad or Arrow + return (raw2scan(raw2) | M0110_KEYPAD_OFFSET); + break; + case M0110_SHIFT: + raw2 = instant(); + switch (KEY(raw2)) { + case M0110_SHIFT: + // Case: 5-8,C,G,H + rawbuf = raw2; + return raw2scan(raw); // Shift(d/u) + break; + case M0110_KEYPAD: + // Shift + Arrow, Calc, or etc. + raw3 = instant(); + switch (KEY(raw3)) { + case M0110_ARROW_UP: + case M0110_ARROW_DOWN: + case M0110_ARROW_LEFT: + case M0110_ARROW_RIGHT: + if (IS_BREAK(raw)) { + if (IS_BREAK(raw3)) { + // Case 4: + print("(4)\n"); + keybuf2 = raw2scan(raw); // Shift(u) + keybuf = (raw2scan(raw3) | M0110_CALC_OFFSET); // Calc(u) + return (raw2scan(raw3) | M0110_KEYPAD_OFFSET); // Arrow(u) + } else { + // Case 3: + print("(3)\n"); + return (raw2scan(raw)); // Shift(u) + } + } else { + if (IS_BREAK(raw3)) { + // Case 2: + print("(2)\n"); + keybuf = (raw2scan(raw3) | M0110_CALC_OFFSET); // Calc(u) + return (raw2scan(raw3) | M0110_KEYPAD_OFFSET); // Arrow(u) + } else { + // Case 1: + print("(1)\n"); + return (raw2scan(raw3) | M0110_CALC_OFFSET); // Calc(d) + } + } + break; + default: + // Shift + Keypad + keybuf = (raw2scan(raw3) | M0110_KEYPAD_OFFSET); + return raw2scan(raw); // Shift(d/u) + break; + } + break; + default: + // Shift + Normal keys + keybuf = raw2scan(raw2); + return raw2scan(raw); // Shift(d/u) + break; + } + break; + default: + // Normal keys + return raw2scan(raw); + break; + } +} + +static inline uint8_t raw2scan(uint8_t raw) { return (raw == M0110_NULL) ? M0110_NULL : ((raw == M0110_ERROR) ? M0110_ERROR : (((raw & 0x80) | ((raw & 0x7F) >> 1)))); } + +static inline uint8_t inquiry(void) { + m0110_send(M0110_INQUIRY); + return m0110_recv(); +} + +static inline uint8_t instant(void) { + m0110_send(M0110_INSTANT); + uint8_t data = m0110_recv(); + if (data != M0110_NULL) { + debug_hex(data); + debug(" "); + } + return data; +} + +static inline void clock_lo() { + M0110_CLOCK_PORT &= ~(1 << M0110_CLOCK_BIT); + M0110_CLOCK_DDR |= (1 << M0110_CLOCK_BIT); +} +static inline void clock_hi() { + /* input with pull up */ + M0110_CLOCK_DDR &= ~(1 << M0110_CLOCK_BIT); + M0110_CLOCK_PORT |= (1 << M0110_CLOCK_BIT); +} +static inline bool clock_in() { + M0110_CLOCK_DDR &= ~(1 << M0110_CLOCK_BIT); + M0110_CLOCK_PORT |= (1 << M0110_CLOCK_BIT); + _delay_us(1); + return M0110_CLOCK_PIN & (1 << M0110_CLOCK_BIT); +} +static inline void data_lo() { + M0110_DATA_PORT &= ~(1 << M0110_DATA_BIT); + M0110_DATA_DDR |= (1 << M0110_DATA_BIT); +} +static inline void data_hi() { + /* input with pull up */ + M0110_DATA_DDR &= ~(1 << M0110_DATA_BIT); + M0110_DATA_PORT |= (1 << M0110_DATA_BIT); +} +static inline bool data_in() { + M0110_DATA_DDR &= ~(1 << M0110_DATA_BIT); + M0110_DATA_PORT |= (1 << M0110_DATA_BIT); + _delay_us(1); + return M0110_DATA_PIN & (1 << M0110_DATA_BIT); +} + +static inline uint16_t wait_clock_lo(uint16_t us) { + while (clock_in() && us) { + asm(""); + _delay_us(1); + us--; + } + return us; +} +static inline uint16_t wait_clock_hi(uint16_t us) { + while (!clock_in() && us) { + asm(""); + _delay_us(1); + us--; + } + return us; +} +static inline uint16_t wait_data_lo(uint16_t us) { + while (data_in() && us) { + asm(""); + _delay_us(1); + us--; + } + return us; +} +static inline uint16_t wait_data_hi(uint16_t us) { + while (!data_in() && us) { + asm(""); + _delay_us(1); + us--; + } + return us; +} + +static inline void idle(void) { + clock_hi(); + data_hi(); +} + +static inline void request(void) { + clock_hi(); + data_lo(); +} + +/* +Primitive M0110 Library for AVR +============================== + + +Signaling +--------- +CLOCK is always from KEYBOARD. DATA are sent with MSB first. + +1) IDLE: both lines are high. + CLOCK ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + DATA ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +2) KEYBOARD->HOST: HOST reads bit on rising edge. + CLOCK ~~~~~~~~~~~~|__|~~~|__|~~~|__|~~~|__|~~~|__|~~~|__|~~~|__|~~~|__|~~~~~~~~~~~ + DATA ~~~~~~~~~~~~X777777X666666X555555X444444X333333X222222X111111X000000X~~~~~~~ + <--> 160us(clock low) + <---> 180us(clock high) + +3) HOST->KEYBOARD: HOST asserts bit on falling edge. + CLOCK ~~~~~~~~~~~~|__|~~~|__|~~~|__|~~~|__|~~~|__|~~~|__|~~~|__|~~~|__|~~~~~~~~~~~ + DATA ~~~~~~|_____X777777X666666X555555X444444X333333X222222X111111X000000X~~~~~~~ + <----> 840us(request to send by host) <---> 80us(hold DATA) + <--> 180us(clock low) + <---> 220us(clock high) + + +Protocol +-------- +COMMAND: + Inquiry 0x10 get key event with block + Instant 0x12 get key event + Model 0x14 get model number(M0110 responds with 0x09) + bit 7 1 if another device connected(used when keypad exists?) + bit4-6 next device model number + bit1-3 keyboard model number + bit 0 always 1 + Test 0x16 test(ACK:0x7D/NAK:0x77) + +KEY EVENT: + bit 7 key state(0:press 1:release) + bit 6-1 scan code(see below) + bit 0 always 1 + To get scan code use this: ((bits&(1<<7)) | ((bits&0x7F))>>1). + + Note: On the M0110A, Keypad keys and Arrow keys are preceded by 0x79. + Moreover, some Keypad keys(=, /, * and +) are preceded by 0x71 on press and 0xF1 on release. + +ARROW KEYS: + Arrow keys and Calc keys(+,*,/,= on keypad) share same byte sequence and preceding byte of + Calc keys(0x71 and 0xF1) means press and release event of SHIFT. This causes a very confusing situation, + it is difficult or impossible to tell Calc key from Arrow key plus SHIFT in some cases. + + Raw key events: + press release + ---------------- ---------------- + Left: 0x79, 0x0D 0x79, 0x8D + Right: 0x79, 0x05 0x79, 0x85 + Up: 0x79, 0x1B 0x79, 0x9B + Down: 0x79, 0x11 0x79, 0x91 + Pad+: 0x71, 0x79, 0x0D 0xF1, 0x79, 0x8D + Pad*: 0x71, 0x79, 0x05 0xF1, 0x79, 0x85 + Pad/: 0x71, 0x79, 0x1B 0xF1, 0x79, 0x9B + Pad=: 0x71, 0x79, 0x11 0xF1, 0x79, 0x91 + + +RAW CODE: + M0110A + ,---------------------------------------------------------. ,---------------. + | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Bcksp| |Clr| =| /| *| + |---------------------------------------------------------| |---------------| + |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7| 8| 9| -| + |-----------------------------------------------------' | |---------------| + |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| +| + |---------------------------------------------------------| |---------------| + |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft|Up | | 1| 2| 3| | + |---------------------------------------------------------' |-----------|Ent| + |Optio|Mac | Space | \|Lft|Rgt|Dn | | 0| .| | + `---------------------------------------------------------' `---------------' + ,---------------------------------------------------------. ,---------------. + | 65| 25| 27| 29| 2B| 2F| 2D| 35| 39| 33| 3B| 37| 31| 67| |+0F|*11|*1B|*05| + |---------------------------------------------------------| |---------------| + | 61| 19| 1B| 1D| 1F| 23| 21| 41| 45| 3F| 47| 43| 3D| | |+33|+37|+39|+1D| + |-----------------------------------------------------' | |---------------| + | 73| 01| 03| 05| 07| 0B| 09| 4D| 51| 4B| 53| 4F| 49| |+2D|+2F|+31|*0D| + |---------------------------------------------------------| |---------------| + | 71| 0D| 0F| 11| 13| 17| 5B| 5D| 27| 5F| 59| 71|+1B| |+27|+29|+2B| | + |---------------------------------------------------------' |-----------|+19| + | 75| 6F| 63 | 55|+0D|+05|+11| | +25|+03| | + `---------------------------------------------------------' `---------------' + + 0x79, 0xDD / 0xF1, 0xUU + * 0x71, 0x79,DD / 0xF1, 0x79, 0xUU + + +MODEL NUMBER: + M0110: 0x09 00001001 : model number 4 (100) + M0110A: 0x0B 00001011 : model number 5 (101) + M0110 & M0120: ??? + + +Scan Code +--------- + m0110_recv_key() function returns following scan codes instead of M0110 raw codes. + Scan codes are 1 byte size and MSB(bit7) is set when key is released. + + scancode = ((raw&0x80) | ((raw&0x7F)>>1)) + + M0110 M0120 + ,---------------------------------------------------------. ,---------------. + | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Clr| -|Lft|Rgt| + |---------------------------------------------------------| |---------------| + |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | 7| 8| 9|Up | + |---------------------------------------------------------| |---------------| + |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6|Dn | + |---------------------------------------------------------| |---------------| + |Shift | Z| X| C| V| B| N| M| ,| ,| /| | | 1| 2| 3| | + `---------------------------------------------------------' |-----------|Ent| + |Opt|Mac | Space |Enter|Opt| | 0| .| | + `------------------------------------------------' `---------------' + ,---------------------------------------------------------. ,---------------. + | 32| 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18| 33| | 47| 4E| 46| 42| + |---------------------------------------------------------| |---------------| + | 30| 0C| 0D| 0E| 0F| 10| 11| 20| 22| 1F| 23| 21| 1E| 2A| | 59| 5B| 5C| 4D| + |---------------------------------------------------------| |---------------| + | 39| 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27| 24| | 56| 57| 58| 48| + |---------------------------------------------------------| |---------------| + | 38| 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C| 38| | 53| 54| 55| | + `---------------------------------------------------------' |-----------| 4C| + | 3A| 37| 31 | 34| 3A| | 52| 41| | + `------------------------------------------------' `---------------' + + International keyboard(See page 22 of "Technical Info for 128K/512K") + ,---------------------------------------------------------. + | 32| 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18| 33| + |---------------------------------------------------------| + | 30| 0C| 0D| 0E| 0F| 10| 11| 20| 22| 1F| 23| 21| 1E| 2A| + |------------------------------------------------------ | + | 39| 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27| 24| | + |---------------------------------------------------------| + | 38| 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C| 0A| 38| + `---------------------------------------------------------' + | 3A| 37| 34 | 31| 3A| + `------------------------------------------------' + + M0110A + ,---------------------------------------------------------. ,---------------. + | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Bcksp| |Clr| =| /| *| + |---------------------------------------------------------| |---------------| + |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7| 8| 9| -| + |-----------------------------------------------------' | |---------------| + |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| +| + |---------------------------------------------------------| |---------------| + |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft|Up | | 1| 2| 3| | + |---------------------------------------------------------' |-----------|Ent| + |Optio|Mac | Space | \|Lft|Rgt|Dn | | 0| .| | + `---------------------------------------------------------' `---------------' + ,---------------------------------------------------------. ,---------------. + | 32| 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18| 33| | 47| 68| 6D| 62| + |---------------------------------------------------------| |---------------| + | 30| 0C| 0D| 0E| 0F| 10| 11| 20| 22| 1F| 23| 21| 1E| | | 59| 5B| 5C| 4E| + |-----------------------------------------------------' | |---------------| + | 39| 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27| 24| | 56| 57| 58| 66| + |---------------------------------------------------------| |---------------| + | 38| 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C| 38| 4D| | 53| 54| 55| | + |---------------------------------------------------------' |-----------| 4C| + | 3A| 37| 31 | 2A| 46| 42| 48| | 52| 41| | + `---------------------------------------------------------' `---------------' + + +References +---------- +Technical Info for 128K/512K and Plus + ftp://ftp.apple.asimov.net/pub/apple_II/documentation/macintosh/Mac%20Hardware%20Info%20-%20Mac%20128K.pdf + ftp://ftp.apple.asimov.net/pub/apple_II/documentation/macintosh/Mac%20Hardware%20Info%20-%20Mac%20Plus.pdf +Protocol: + Page 20 of Tech Info for 128K/512K + http://www.mac.linux-m68k.org/devel/plushw.php +Connector: + Page 20 of Tech Info for 128K/512K + http://www.kbdbabel.org/conn/kbd_connector_macplus.png +Signaling: + http://www.kbdbabel.org/signaling/kbd_signaling_mac.png + http://typematic.blog.shinobi.jp/Entry/14/ +M0110 raw scan codes: + Page 22 of Tech Info for 128K/512K + Page 07 of Tech Info for Plus + http://m0115.web.fc2.com/m0110.jpg + http://m0115.web.fc2.com/m0110a.jpg +*/ diff --git a/keyboards/converter/m0110_usb/m0110.h b/keyboards/converter/m0110_usb/m0110.h new file mode 100644 index 0000000000..63ff3e90ec --- /dev/null +++ b/keyboards/converter/m0110_usb/m0110.h @@ -0,0 +1,81 @@ +/* +Copyright 2011,2012 Jun WAKO <wakojun@gmail.com> + +This software is licensed with a Modified BSD License. +All of this is supposed to be Free Software, Open Source, DFSG-free, +GPL-compatible, and OK to use in both free and proprietary applications. +Additions and corrections to this file are welcome. + + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +* Neither the name of the copyright holders nor the names of + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +*/ + +#pragma once + +/* port settings for clock and data line */ +#if !(defined(M0110_CLOCK_PORT) && defined(M0110_CLOCK_PIN) && defined(M0110_CLOCK_DDR) && defined(M0110_CLOCK_BIT)) +# error "M0110 clock port setting is required in config.h" +#endif + +#if !(defined(M0110_DATA_PORT) && defined(M0110_DATA_PIN) && defined(M0110_DATA_DDR) && defined(M0110_DATA_BIT)) +# error "M0110 data port setting is required in config.h" +#endif + +/* Commands */ +#define M0110_INQUIRY 0x10 +#define M0110_INSTANT 0x14 +#define M0110_MODEL 0x16 +#define M0110_TEST 0x36 + +/* Response(raw byte from M0110) */ +#define M0110_NULL 0x7B +#define M0110_KEYPAD 0x79 +#define M0110_TEST_ACK 0x7D +#define M0110_TEST_NAK 0x77 +#define M0110_SHIFT 0x71 +#define M0110_ARROW_UP 0x1B +#define M0110_ARROW_DOWN 0x11 +#define M0110_ARROW_LEFT 0x0D +#define M0110_ARROW_RIGHT 0x05 + +/* This inidcates no response. */ +#define M0110_ERROR 0xFF + +/* scan code offset for keypad and arrow keys */ +#define M0110_KEYPAD_OFFSET 0x40 +#define M0110_CALC_OFFSET 0x60 + +extern uint8_t m0110_error; + +/* host role */ +void m0110_init(void); +uint8_t m0110_send(uint8_t data); +uint8_t m0110_recv(void); +uint8_t m0110_recv_key(void); +uint8_t m0110_inquiry(void); +uint8_t m0110_instant(void); diff --git a/keyboards/converter/m0110_usb/m0110_usb.h b/keyboards/converter/m0110_usb/m0110_usb.h index 88e74024fc..944296afdc 100644 --- a/keyboards/converter/m0110_usb/m0110_usb.h +++ b/keyboards/converter/m0110_usb/m0110_usb.h @@ -16,12 +16,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. Ported to QMK by Techsock <info@techsock.com> */ -#ifndef M0110_USB_H -#define M0110_USB_H -#endif +#pragma once #include "quantum.h" +#define XXX KC_NO + /* Common layout for M0110 and M0110A * This keymap works with both keyboards. As you can see, the M0110A is * a superset of M0110 keyboard, only one exception is 'Enter'(34) of M0110 @@ -67,26 +67,26 @@ Ported to QMK by Techsock <info@techsock.com> * Two right and left keys of 38 and 3A are identical, you cannot discriminate those two. */ #define LAYOUT_ansi( \ - K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K47,K68,K6D,K62, \ - K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E, K59,K5B,K5C,K4E, \ - K39,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27, K24, K56,K57,K58,K66, \ - K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C, K4D, K53,K54,K55,K4C, \ - K3A,K37, K31, K34,K2A,K46,K42,K48, K52, K41 \ + K32, K12, K13, K14, K15, K17, K16, K1A, K1C, K19, K1D, K1B, K18, K33, K47, K68, K6D, K62, \ + K30, K0C, K0D, K0E, K0F, K11, K10, K20, K22, K1F, K23, K21, K1E, K59, K5B, K5C, K4E, \ + K39, K00, K01, K02, K03, K05, K04, K26, K28, K25, K29, K27, K24, K56, K57, K58, K66, \ + K38, K06, K07, K08, K09, K0B, K2D, K2E, K2B, K2F, K2C, K4D, K53, K54, K55, K4C, \ + K3A, K37, K31, K34, K2A, K46, K42, K48, K52, K41 \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K08, K09, KC_NO, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27 }, \ - { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, K31, K32, K33, K34, KC_NO, KC_NO, K37 }, \ - { K38, K39, K3A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, K46, K47 }, \ - { K48, KC_NO, KC_NO, KC_NO, K4C, K4D, K4E, KC_NO }, \ - { KC_NO, KC_NO, K52, K53, K54, K55, K56, K57 }, \ - { K58, K59, KC_NO, K5B, K5C, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, K62, KC_NO, KC_NO, KC_NO, K66, KC_NO }, \ - { K68, KC_NO, KC_NO, KC_NO, KC_NO, K6D, KC_NO, KC_NO }, \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K08, K09, XXX, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, XXX, XXX, K37 }, \ + { K38, K39, K3A, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, K41, K42, XXX, XXX, XXX, K46, K47 }, \ + { K48, XXX, XXX, XXX, K4C, K4D, K4E, XXX }, \ + { XXX, XXX, K52, K53, K54, K55, K56, K57 }, \ + { K58, K59, XXX, K5B, K5C, XXX, XXX, XXX }, \ + { XXX, XXX, K62, XXX, XXX, XXX, K66, XXX }, \ + { K68, XXX, XXX, XXX, XXX, K6D, XXX, XXX } \ } /* International keyboard layout for M0110 + M0120 @@ -108,24 +108,24 @@ Ported to QMK by Techsock <info@techsock.com> * Two right and left keys of 38 and 3A are identical, you cannot discriminate those two. */ #define LAYOUT_iso( \ - K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K47,K68,K6D,K62, \ - K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E,K2A, K59,K5B,K5C,K4E, \ - K39,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27,K24, K56,K57,K58,K66, \ - K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C,K0A, K53,K54,K55,K4C, \ - K3A,K37, K34, K31, K52, K41 \ + K32, K12, K13, K14, K15, K17, K16, K1A, K1C, K19, K1D, K1B, K18, K33, K47, K68, K6D, K62, \ + K30, K0C, K0D, K0E, K0F, K11, K10, K20, K22, K1F, K23, K21, K1E, K2A, K59, K5B, K5C, K4E, \ + K39, K00, K01, K02, K03, K05, K04, K26, K28, K25, K29, K27, K24, K56, K57, K58, K66, \ + K38, K06, K07, K08, K09, K0B, K2D, K2E, K2B, K2F, K2C, K0A, K53, K54, K55, K4C, \ + K3A, K37, K34, K31, K52, K41 \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27 }, \ - { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, K31, K32, K33, K34, KC_NO, KC_NO, K37 }, \ - { K38, K39, K3A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, K41, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K47 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K4C, KC_NO, K4E, KC_NO }, \ - { KC_NO, KC_NO, K52, K53, K54, K55, K56, K57 }, \ - { K58, K59, KC_NO, K5B, K5C, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, K62, KC_NO, KC_NO, KC_NO, K66, KC_NO }, \ - { K68, KC_NO, KC_NO, KC_NO, KC_NO, K6D, KC_NO, KC_NO }, \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, XXX, XXX, K37 }, \ + { K38, K39, K3A, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, K41, XXX, XXX, XXX, XXX, XXX, K47 }, \ + { XXX, XXX, XXX, XXX, K4C, XXX, K4E, XXX }, \ + { XXX, XXX, K52, K53, K54, K55, K56, K57 }, \ + { K58, K59, XXX, K5B, K5C, XXX, XXX, XXX }, \ + { XXX, XXX, K62, XXX, XXX, XXX, K66, XXX }, \ + { K68, XXX, XXX, XXX, XXX, K6D, XXX, XXX } \ } diff --git a/keyboards/converter/m0110_usb/rules.mk b/keyboards/converter/m0110_usb/rules.mk index f59530ce46..288b1729f0 100644 --- a/keyboards/converter/m0110_usb/rules.mk +++ b/keyboards/converter/m0110_usb/rules.mk @@ -19,7 +19,6 @@ NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA EXTRAKEY_ENABLE = yes USB_HID_ENABLE = yes BACKLIGHT_ENABLE = no -#BLUETOOTH = AdafruitBLE # For Adafruit Feather 32U4 BLE support, uncomment this line CUSTOM_MATRIX = yes SRC = matrix.c m0110.c diff --git a/keyboards/converter/palm_usb/post_rules.mk b/keyboards/converter/palm_usb/post_rules.mk new file mode 100644 index 0000000000..9c11076701 --- /dev/null +++ b/keyboards/converter/palm_usb/post_rules.mk @@ -0,0 +1,7 @@ +ifdef HARDWARE_SERIAL + # Untested with palm_usb + SRC += protocol/serial_uart.c + OPT_DEFS += -DHARDWARE_SERIAL +else + SRC += protocol/serial_soft.c +endif diff --git a/keyboards/converter/palm_usb/rules.mk b/keyboards/converter/palm_usb/rules.mk index e7bedd4add..f83a18afd6 100644 --- a/keyboards/converter/palm_usb/rules.mk +++ b/keyboards/converter/palm_usb/rules.mk @@ -23,12 +23,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes SRC += matrix.c -ifdef HARDWARE_SERIAL - # Untested with palm_usb - SRC += protocol/serial_uart.c - OPT_DEFS += -DHARDWARE_SERIAL -else - SRC += protocol/serial_soft.c -endif DEFAULT_FOLDER = converter/palm_usb/stowaway diff --git a/keyboards/converter/sun_usb/config.h b/keyboards/converter/sun_usb/config.h index f073e61e44..c67ae5ebae 100644 --- a/keyboards/converter/sun_usb/config.h +++ b/keyboards/converter/sun_usb/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x3333 @@ -81,5 +80,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* idle */ \ SERIAL_SOFT_TXD_ON(); \ } while (0) - -#endif diff --git a/keyboards/converter/sun_usb/post_rules.mk b/keyboards/converter/sun_usb/post_rules.mk new file mode 100644 index 0000000000..2ea1f0a5bf --- /dev/null +++ b/keyboards/converter/sun_usb/post_rules.mk @@ -0,0 +1,6 @@ +ifdef HARDWARE_SERIAL + SRC += protocol/serial_uart.c + OPT_DEFS += -DHARDWARE_SERIAL +else + SRC += protocol/serial_soft.c +endif diff --git a/keyboards/converter/sun_usb/rules.mk b/keyboards/converter/sun_usb/rules.mk index 1decefe519..0f53fde80e 100644 --- a/keyboards/converter/sun_usb/rules.mk +++ b/keyboards/converter/sun_usb/rules.mk @@ -23,11 +23,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes SRC += matrix.c led.c -ifdef HARDWARE_SERIAL - SRC += protocol/serial_uart.c - OPT_DEFS += -DHARDWARE_SERIAL -else - SRC += protocol/serial_soft.c -endif DEFAULT_FOLDER = converter/sun_usb/type5 diff --git a/keyboards/converter/sun_usb/type3/type3.h b/keyboards/converter/sun_usb/type3/type3.h index f6f14f4eff..b84a703d6b 100644 --- a/keyboards/converter/sun_usb/type3/type3.h +++ b/keyboards/converter/sun_usb/type3/type3.h @@ -15,11 +15,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TYPE3_H -#define TYPE3_H +#pragma once #include "quantum.h" +#define XXX KC_NO + /* Sun type 3 keyboard ,-------. ,-----------------------------------------------------------. ,-----------. | 01| 03| | 05| 06| 08| 0A| 0C| 0E| 10| 11| 12| 2B| | 15| 16| 17| @@ -35,32 +36,28 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | 77 | 78 | 79 | 7A | 13 | `-----------------------------------------------------------' */ - - -#define LAYOUT( \ - K01,K03, K05,K06, K08, K0A, K0C, K0E, K10,K11,K12,K2B, K15,K16,K17, \ - K19,K1A, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A, K2D,K2E,K2F, \ - K31,K33, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K42, K44,K45,K46, \ - K48,K49, K4C, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, K5B,K5C,K5D, \ - K5F,K61, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E,K6F, K70,K71,K72, \ - K77,K78, K79, K7A,K13 \ +#define LAYOUT( \ + k01, k03, k05, k06, k08, k0A, k0C, k0E, k10, k11, k12, k2B, k15, k16, k17, \ + k19, k1A, k1D, k1E, k1F, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k58, k2A, k2D, k2E, k2F, \ + k31, k33, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k40, k41, k42, k44, k45, k46, \ + k48, k49, k4C, k4D, k4E, k4F, k50, k51, k52, k53, k54, k55, k56, k57, k59, k5B, k5C, k5D, \ + k5F, k61, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E, k6F, k70, k71, k72, \ + k77, k78, k79, k7A, k13 \ ) { \ - { KC_NO, K01 , KC_NO, K03 , KC_NO, K05 , K06 , KC_NO }, \ - { K08 , KC_NO, K0A , KC_NO, K0C , KC_NO, K0E , KC_NO }, \ - { K10 , K11 , K12 , K13 , KC_NO, K15 , K16 , K17 }, \ - { KC_NO, K19 , K1A , KC_NO, KC_NO, K1D , K1E , K1F }, \ - { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \ - { K28 , K29 , K2A , K2B , KC_NO, K2D , K2E , K2F }, \ - { KC_NO, K31 , KC_NO, K33 , KC_NO, K35 , K36 , K37 }, \ - { K38 , K39 , K3A , K3B , K3C , K3D , K3E , K3F }, \ - { K40 , K41 , K42 , KC_NO, K44 , K45 , K46 , KC_NO }, \ - { K48 , K49 , KC_NO, KC_NO, K4C , K4D , K4E , K4F }, \ - { K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \ - { K58 , K59 , KC_NO, K5B , K5C , K5D , KC_NO, K5F }, \ - { KC_NO, K61 , KC_NO, K63 , K64 , K65 , K66 , K67 }, \ - { K68 , K69 , K6A , K6B , K6C , K6D , K6E , K6F }, \ - { K70 , K71 , K72 , KC_NO, KC_NO, KC_NO, KC_NO, K77 }, \ - { K78 , K79 , K7A , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + { XXX, k01, XXX, k03, XXX, k05, k06, XXX }, \ + { k08, XXX, k0A, XXX, k0C, XXX, k0E, XXX }, \ + { k10, k11, k12, k13, XXX, k15, k16, k17 }, \ + { XXX, k19, k1A, XXX, XXX, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k28, k29, k2A, k2B, XXX, k2D, k2E, k2F }, \ + { XXX, k31, XXX, k33, XXX, k35, k36, k37 }, \ + { k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, XXX, k44, k45, k46, XXX }, \ + { k48, k49, XXX, XXX, k4C, k4D, k4E, k4F }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k58, k59, XXX, k5B, k5C, k5D, XXX, k5F }, \ + { XXX, k61, XXX, k63, k64, k65, k66, k67 }, \ + { k68, k69, k6A, k6B, k6C, k6D, k6E, k6F }, \ + { k70, k71, k72, XXX, XXX, XXX, XXX, k77 }, \ + { k78, k79, k7A, XXX, XXX, XXX, XXX, XXX } \ } - -#endif diff --git a/keyboards/converter/sun_usb/type5/type5.h b/keyboards/converter/sun_usb/type5/type5.h index da66d80abc..d4c9cc267c 100644 --- a/keyboards/converter/sun_usb/type5/type5.h +++ b/keyboards/converter/sun_usb/type5/type5.h @@ -15,11 +15,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TYPE5_H -#define TYPE5_H +#pragma once #include "quantum.h" +#define XXX KC_NO + /* sun type 5 keyboard, JP Unix-style ,-------. ,---, ,---------------. ,---------------. ,---------------. ,-----------. ,---------------. | 76 | | 0F| | 05| 06| 08| 0A| | 0C| 0E| 10| 11| | 12| 07| 09| 0B| | 16| 17| 15| | 2D| 02| 04| 30| @@ -36,30 +37,30 @@ | 5F| 61| | 77 | 13| 78 |*73 | 79 |*74 |*75| 7A | 43| 0D| | 18| 1B| 1C| | 5E | 32| | `-------' `-----------------------------------------------------------' `-----------' `---------------' */ -#define LAYOUT_jp_unix( \ - K76, K0F, K05,K06,K08,K0A, K0C,K0E,K10,K11, K12,K07,K09,K0B, K16,K17,K15, K2D,K02,K04,K30, \ - K01,K03, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A, K2C,K34,K60, K62,K2E,K2F,K47, \ - K19,K1A, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K2B, K42,K4A,K7B, K44,K45,K46,K7D, \ - K31,K33, K4C, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, K5B,K5C,K5D, \ - K48,K49, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E, K14, K70,K71,K72,K5A, \ - K5F,K61, K77,K13, K78, K73, K79, K74, K75, K7A, K43, K0D, K18,K1B,K1C, K5E, K32 \ +#define LAYOUT_jp_unix( \ + K76, K0F, K05, K06, K08, K0A, K0C, K0E, K10, K11, K12, K07, K09, K0B, K16, K17, K15, K2D, K02, K04, K30, \ + K01, K03, K1D, K1E, K1F, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K58, K2A, K2C, K34, K60, K62, K2E, K2F, K47, \ + K19, K1A, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K40, K41, K2B, K42, K4A, K7B, K44, K45, K46, K7D, \ + K31, K33, K4C, K4D, K4E, K4F, K50, K51, K52, K53, K54, K55, K56, K57, K59, K5B, K5C, K5D, \ + K48, K49, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K14, K70, K71, K72, K5A, \ + K5F, K61, K77, K13, K78, K73, K79, K74, K75, K7A, K43, K0D, K18, K1B, K1C, K5E, K32 \ ) { \ - { KC_NO, K01 , K02 , K03 , K04 , K05 , K06 , K07 }, \ - { K08 , K09 , K0A , K0B , K0C , K0D , K0E , K0F ,}, \ - { K10 , K11 , K12 , K13 , K14 , K15 , K16 , K17 }, \ - { K18 , K19 , K1A , K1B , K1C , K1D , K1E , K1F }, \ - { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \ - { K28 , K29 , K2A , K2B , K2C , K2D , K2E , K2F }, \ - { K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 }, \ - { K38 , K39 , K3A , K3B , K3C , K3D , K3E , K3F }, \ - { K40 , K41 , K42 , K43 , K44 , K45 , K46 , K47 }, \ - { K48 , K49 , K4A , KC_NO, K4C , K4D , K4E , K4F }, \ - { K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \ - { K58 , K59 , K5A , K5B , K5C , K5D , K5E , K5F }, \ - { K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 }, \ - { K68 , K69 , K6A , K6B , K6C , K6D , K6E , KC_NO }, \ - { K70 , K71 , K72 , K73 , K74 , K75 , K76 , K77 }, \ - { K78 , K79 , K7A , K7B , KC_NO, K7D , KC_NO, KC_NO } \ + { XXX, K01, K02, K03, K04, K05, K06, K07 }, \ + { K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ + { K40, K41, K42, K43, K44, K45, K46, K47 }, \ + { K48, K49, K4A, XXX, K4C, K4D, K4E, K4F }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K68, K69, K6A, K6B, K6C, K6D, K6E, XXX }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 }, \ + { K78, K79, K7A, K7B, XXX, K7D, XXX, XXX } \ } /* Sun type 5 keyboard, US Unix-style @@ -78,30 +79,30 @@ | 5F| 61| | 77 | 13| 78 | 79 | 7A | 43| 0D| | 18| 1B| 1C| | 5E | 32| | `-------' `-----------------------------------------------------------' `-----------' `---------------' */ -#define LAYOUT_us_unix( \ - K76, K0F, K05,K06,K08,K0A, K0C,K0E,K10,K11, K12,K07,K09,K0B, K16,K17,K15, K2D,K02,K04,K30, \ - K01,K03, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A, K2C,K34,K60, K62,K2E,K2F,K47, \ - K19,K1A, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K2B, K42,K4A,K7B, K44,K45,K46,K7D, \ - K31,K33, K4C, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, K5B,K5C,K5D, \ - K48,K49, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E, K14, K70,K71,K72,K5A, \ - K5F,K61, K77,K13, K78, K79, K7A, K43, K0D, K18,K1B,K1C, K5E, K32 \ +#define LAYOUT_us_unix( \ + K76, K0F, K05, K06, K08, K0A, K0C, K0E, K10, K11, K12, K07, K09, K0B, K16, K17, K15, K2D, K02, K04, K30, \ + K01, K03, K1D, K1E, K1F, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K58, K2A, K2C, K34, K60, K62, K2E, K2F, K47, \ + K19, K1A, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K40, K41, K2B, K42, K4A, K7B, K44, K45, K46, K7D, \ + K31, K33, K4C, K4D, K4E, K4F, K50, K51, K52, K53, K54, K55, K56, K57, K59, K5B, K5C, K5D, \ + K48, K49, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K14, K70, K71, K72, K5A, \ + K5F, K61, K77, K13, K78, K79, K7A, K43, K0D, K18, K1B, K1C, K5E, K32 \ ) { \ - { KC_NO, K01 , K02 , K03 , K04 , K05 , K06 , K07 }, \ - { K08 , K09 , K0A , K0B , K0C , K0D , K0E , K0F ,}, \ - { K10 , K11 , K12 , K13 , K14 , K15 , K16 , K17 }, \ - { K18 , K19 , K1A , K1B , K1C , K1D , K1E , K1F }, \ - { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \ - { K28 , K29 , K2A , K2B , K2C , K2D , K2E , K2F }, \ - { K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 }, \ - { K38 , K39 , K3A , K3B , K3C , K3D , K3E , K3F }, \ - { K40 , K41 , K42 , K43 , K44 , K45 , K46 , K47 }, \ - { K48 , K49 , K4A , KC_NO, K4C , K4D , K4E , K4F }, \ - { K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \ - { K58 , K59 , K5A , K5B , K5C , K5D , K5E , K5F }, \ - { K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 }, \ - { K68 , K69 , K6A , K6B , K6C , K6D , K6E , KC_NO }, \ - { K70 , K71 , K72 , KC_NO, KC_NO, KC_NO, K76 , K77 }, \ - { K78 , K79 , K7A , K7B , KC_NO, K7D , KC_NO, KC_NO } \ + { XXX, K01, K02, K03, K04, K05, K06, K07 }, \ + { K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ + { K40, K41, K42, K43, K44, K45, K46, K47 }, \ + { K48, K49, K4A, XXX, K4C, K4D, K4E, K4F }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K68, K69, K6A, K6B, K6C, K6D, K6E, XXX }, \ + { K70, K71, K72, XXX, XXX, XXX, K76, K77 }, \ + { K78, K79, K7A, K7B, XXX, K7D, XXX, XXX } \ } /* Sun type 5 keyboard, US ANSI-style @@ -120,29 +121,28 @@ | 5F| 61| | 4C | 13| 78 | 79 | 7A | 43| 0D| | 18| 1B| 1C| | 5E | 32| | `-------' `-----------------------------------------------------------' `-----------' `---------------' */ -#define LAYOUT_ansi( \ - K76, K1D, K05,K06,K08,K0A, K0C,K0E,K10,K11, K12,K07,K09,K0B, K16,K17,K15, K2D,K02,K04,K30, \ - K01,K03, K2A,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29, K2B, K2C,K34,K60, K62,K2E,K2F,K47, \ - K19,K1A, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K58, K42,K4A,K7B, K44,K45,K46,K7D, \ - K31,K33, K77, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, K5B,K5C,K5D, \ - K48,K49, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E, K14, K70,K71,K72,K5A, \ - K5F,K61, K4C,K13, K78, K79, K7A, K43, K0D, K18,K1B,K1C, K5E, K32 \ +#define LAYOUT_ansi( \ + K76, K1D, K05, K06, K08, K0A, K0C, K0E, K10, K11, K12, K07, K09, K0B, K16, K17, K15, K2D, K02, K04, K30, \ + K01, K03, K2A, K1E, K1F, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2B, K2C, K34, K60, K62, K2E, K2F, K47, \ + K19, K1A, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K40, K41, K58, K42, K4A, K7B, K44, K45, K46, K7D, \ + K31, K33, K77, K4D, K4E, K4F, K50, K51, K52, K53, K54, K55, K56, K57, K59, K5B, K5C, K5D, \ + K48, K49, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K14, K70, K71, K72, K5A, \ + K5F, K61, K4C, K13, K78, K79, K7A, K43, K0D, K18, K1B, K1C, K5E, K32 \ ) { \ - { KC_NO, K01 , K02 , K03 , K04 , K05 , K06 , K07 }, \ - { K08 , K09 , K0A , K0B , K0C , K0D , K0E , KC_NO,}, \ - { K10 , K11 , K12 , K13 , K14 , K15 , K16 , K17 }, \ - { K18 , K19 , K1A , K1B , K1C , K1D , K1E , K1F }, \ - { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \ - { K28 , K29 , K2A , K2B , K2C , K2D , K2E , K2F }, \ - { K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 }, \ - { K38 , K39 , K3A , K3B , K3C , K3D , K3E , K3F }, \ - { K40 , K41 , K42 , K43 , K44 , K45 , K46 , K47 }, \ - { K48 , K49 , K4A , KC_NO, K4C , K4D , K4E , K4F }, \ - { K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \ - { K58 , K59 , K5A , K5B , K5C , K5D , K5E , K5F }, \ - { K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 }, \ - { K68 , K69 , K6A , K6B , K6C , K6D , K6E , KC_NO }, \ - { K70 , K71 , K72 , KC_NO, KC_NO, KC_NO, K76 , K77 }, \ - { K78 , K79 , K7A , K7B , KC_NO, K7D , KC_NO, KC_NO } \ + { XXX, K01, K02, K03, K04, K05, K06, K07 }, \ + { K08, K09, K0A, K0B, K0C, K0D, K0E, XXX }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ + { K40, K41, K42, K43, K44, K45, K46, K47 }, \ + { K48, K49, K4A, XXX, K4C, K4D, K4E, K4F }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K68, K69, K6A, K6B, K6C, K6D, K6E, XXX }, \ + { K70, K71, K72, XXX, XXX, XXX, K76, K77 }, \ + { K78, K79, K7A, K7B, XXX, K7D, XXX, XXX } \ } -#endif diff --git a/keyboards/converter/usb_usb/ble/ble.h b/keyboards/converter/usb_usb/ble/ble.h index d28629643a..3dccc23a41 100644 --- a/keyboards/converter/usb_usb/ble/ble.h +++ b/keyboards/converter/usb_usb/ble/ble.h @@ -1,6 +1,3 @@ -#ifndef BLE_H -#define BLE_H +#pragma once #include QMK_KEYBOARD_H - -#endif diff --git a/keyboards/converter/usb_usb/ble/rules.mk b/keyboards/converter/usb_usb/ble/rules.mk index 438dec834a..ad4d206a51 100644 --- a/keyboards/converter/usb_usb/ble/rules.mk +++ b/keyboards/converter/usb_usb/ble/rules.mk @@ -12,9 +12,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE -ADAFRUIT_BLE_ENABLE = yes + +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE EXTRAFLAGS += -flto diff --git a/keyboards/converter/usb_usb/config.h b/keyboards/converter/usb_usb/config.h index 7ff8ceeebd..d2488336a5 100644 --- a/keyboards/converter/usb_usb/config.h +++ b/keyboards/converter/usb_usb/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED @@ -46,5 +45,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/converter/usb_usb/hasu/hasu.h b/keyboards/converter/usb_usb/hasu/hasu.h index d5e7855860..3dccc23a41 100644 --- a/keyboards/converter/usb_usb/hasu/hasu.h +++ b/keyboards/converter/usb_usb/hasu/hasu.h @@ -1,6 +1,3 @@ -#ifndef HASU_H -#define HASU_H +#pragma once #include QMK_KEYBOARD_H - -#endif diff --git a/keyboards/converter/usb_usb/pro_micro/pro_micro.h b/keyboards/converter/usb_usb/pro_micro/pro_micro.h index 566df9f20f..3dccc23a41 100644 --- a/keyboards/converter/usb_usb/pro_micro/pro_micro.h +++ b/keyboards/converter/usb_usb/pro_micro/pro_micro.h @@ -1,6 +1,3 @@ -#ifndef PRO_MICRO_H -#define PRO_MICRO_H +#pragma once #include QMK_KEYBOARD_H - -#endif diff --git a/keyboards/converter/usb_usb/usb_usb.h b/keyboards/converter/usb_usb/usb_usb.h index 1d1b6770d1..3acd67634a 100644 --- a/keyboards/converter/usb_usb/usb_usb.h +++ b/keyboards/converter/usb_usb/usb_usb.h @@ -15,11 +15,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef USB_USB_H -#define USB_USB_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define ______ KC_TRNS /* ,---------------. ,---------------. ,---------------. @@ -63,46 +64,31 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * TODO: use same keycode to pass through instead of KC_NO? */ #define LAYOUT_all( \ - K68,K69,K6A,K6B,K6C,K6D,K6E,K6F,K70,K71,K72,K73, \ - K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, K81,K80,K7F,K66, K75, \ - K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K89,K2A, K49,K4A,K4B, K53,K54,K55,K56, K78,K79, \ - K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K31, K4C,K4D,K4E, K5F,K60,K61,K57, K76,K7A, \ - K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, K32,K28, K5C,K5D,K5E,K85, K77,K7C, \ - KE1,K64,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, K87,KE5, K52, K59,K5A,K5B,K67, K74,K7D, \ - KE0,KE3,KE2,K8B,K91, K2C, K90,K8A,K88,KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58, K7E,K7B \ + k68, k69, k6A, k6B, k6C, k6D, k6E, k6F, k70, k71, k72, k73, \ + k29, k3A, k3B, k3C, k3D, k3E, k3F, k40, k41, k42, k43, k44, k45, k46, k47, k48, k81, k80, k7F, k66, k75, \ +\ + k35, k1E, k1F, k20, k21, k22, k23, k24, k25, k26, k27, k2D, k2E, k89, k2A, k49, k4A, k4B, k53, k54, k55, k56, k78, k79, \ + k2B, k14, k1A, k08, k15, k17, k1C, k18, k0C, k12, k13, k2F, k30, k31, k4C, k4D, k4E, k5F, k60, k61, k57, k76, k7A, \ + k39, k04, k16, k07, k09, k0A, k0B, k0D, k0E, k0F, k33, k34, k32, k28, k5C, k5D, k5E, k85, k77, k7C, \ + kE1, k64, k1D, k1B, k06, k19, k05, k11, k10, k36, k37, k38, k87, kE5, k52, k59, k5A, k5B, k67, k74, k7D, \ + kE0, kE3, kE2, k8B, k91, k2C, k90, k8A, k88, kE6, kE7, k65, kE4, k50, k51, k4F, k62, k63, k58, k7E, k7B \ ) { \ - { 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, K66, K67, /* 60-67 */ \ - K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, /* 68-6F */ \ - { K70, K71, K72, K73, K74, K75, K76, K77, /* 70-77 */ \ - K78, K79, K7A, K7B, K7C, K7D, K7E, K7F }, /* 78-7F */ \ - { K80, K81, KC_NO, KC_NO, KC_NO, K85, KC_NO, K87, /* 80-87 */ \ - K88, K89, K8A, K8B, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \ - { K90, K91, 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 */ \ + { XXX, XXX, XXX, XXX, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E, k6F }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7A, k7B, k7C, k7D, k7E, k7F }, \ + { k80, k81, XXX, XXX, XXX, k85, XXX, k87, k88, k89, k8A, k8B, XXX, XXX, XXX, XXX }, \ + { k90, k91, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, kE6, kE7, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } \ } /* ,---. ,---------------. ,---------------. ,---------------. ,-----------. @@ -121,45 +107,30 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * `-----------------------------------------------------------' `-----------' `---------------' */ #define LAYOUT_ansi( \ - K29,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, \ - K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K2A, K49,K4A,K4B, K53,K54,K55,K56, \ - K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30,K31, K4C,K4D,K4E, K5F,K60,K61, \ - 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 \ + k29, k3A, k3B, k3C, k3D, k3E, k3F, k40, k41, k42, k43, k44, k45, k46, k47, k48, \ +\ + k35, k1E, k1F, k20, k21, k22, k23, k24, k25, k26, k27, k2D, k2E, k2A, k49, k4A, k4B, k53, k54, k55, k56, \ + k2B, k14, k1A, k08, k15, k17, k1C, k18, k0C, k12, k13, k2F, k30, k31, k4C, k4D, k4E, k5F, k60, k61, \ + 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 \ ) { \ - { 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 */ \ + { XXX, XXX, XXX, XXX, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, XXX, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F }, \ + { k60, k61, k62, k63, XXX, k65, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,}, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,}, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, kE6, kE7, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } \ } /* ,---. ,---------------. ,---------------. ,---------------. ,-----------. @@ -178,45 +149,30 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * `-----------------------------------------------------------' `-----------' `---------------' */ #define LAYOUT_iso( \ - K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, \ - K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K2A, K49,K4A,K4B, K53,K54,K55,K56, \ - K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30,K28, K4C,K4D,K4E, K5F,K60,K61,K57, \ - 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 \ + k29, k3A, k3B, k3C, k3D, k3E, k3F, k40, k41, k42, k43, k44, k45, k46, k47, k48, \ +\ + k35, k1E, k1F, k20, k21, k22, k23, k24, k25, k26, k27, k2D, k2E, k2A, k49, k4A, k4B, k53, k54, k55, k56, \ + k2B, k14, k1A, k08, k15, k17, k1C, k18, k0C, k12, k13, k2F, k30, k28, k4C, k4D, k4E, k5F, k60, k61, k57, \ + 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 \ ) { \ - { 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 */ \ + { XXX, XXX, XXX, XXX, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F }, \ + { k60, k61, k62, k63, k64, k65, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,}, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,}, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, kE6, kE7, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } \ } /* ,---. ,---------------. ,---------------. ,---------------. ,-----------. @@ -235,44 +191,28 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * `-----------------------------------------------------------' `-----------' `---------------' */ #define LAYOUT_jis( \ - K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, \ - K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K89,K2A, K49,K4A,K4B, K53,K54,K55,K56, \ - K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K28, K4C,K4D,K4E, K5F,K60,K61,K57, \ - 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 \ + k29, k3A, k3B, k3C, k3D, k3E, k3F, k40, k41, k42, k43, k44, k45, k46, k47, k48, \ +\ + k35, k1E, k1F, k20, k21, k22, k23, k24, k25, k26, k27, k2D, k2E, k89, k2A, k49, k4A, k4B, k53, k54, k55, k56, \ + k2B, k14, k1A, k08, k15, k17, k1C, k18, k0C, k12, k13, k2F, k30, k28, k4C, k4D, k4E, k5F, k60, k61, k57, \ + 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 \ ) { \ - { 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 */ \ + { XXX, XXX, XXX, XXX, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F }, \ + { k60, k61, k62, k63, k64, k65, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,}, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,}, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, k87, k88, k89, k8A, k8B, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, kE6, kE7, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } \ } -#endif diff --git a/keyboards/converter/xt_usb/rules.mk b/keyboards/converter/xt_usb/rules.mk index 519d76f4d4..8033614447 100644 --- a/keyboards/converter/xt_usb/rules.mk +++ b/keyboards/converter/xt_usb/rules.mk @@ -19,7 +19,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output -XT_ENABLE = yes CUSTOM_MATRIX = yes -SRC += matrix.c +SRC += matrix.c xt_interrupt.c diff --git a/keyboards/converter/xt_usb/xt.h b/keyboards/converter/xt_usb/xt.h new file mode 100644 index 0000000000..538ff0e459 --- /dev/null +++ b/keyboards/converter/xt_usb/xt.h @@ -0,0 +1,73 @@ +/* +Copyright 2018 Jun WAKO <wakojun@gmail.com> +Copyright 2016 Ethan Apodaca <papodaca@gmail.com> + +This software is licensed with a Modified BSD License. +All of this is supposed to be Free Software, Open Source, DFSG-free, +GPL-compatible, and OK to use in both free and proprietary applications. +Additions and corrections to this file are welcome. + + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +* Neither the name of the copyright holders nor the names of + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +*/ + +#pragma once + +#include "quantum.h" + +#define XT_DATA_IN() \ + do { \ + setPinInput(XT_DATA_PIN); \ + writePinHigh(XT_DATA_PIN); \ + } while (0) + +#define XT_DATA_READ() readPin(XT_DATA_PIN) + +#define XT_DATA_LO() \ + do { \ + writePinLow(XT_DATA_PIN); \ + setPinOutput(XT_DATA_PIN); \ + } while (0) + +#define XT_CLOCK_IN() \ + do { \ + setPinInput(XT_CLOCK_PIN); \ + writePinHigh(XT_CLOCK_PIN); \ + } while (0) + +#define XT_CLOCK_READ() readPin(XT_CLOCK_PIN) + +#define XT_CLOCK_LO() \ + do { \ + writePinLow(XT_CLOCK_PIN); \ + setPinOutput(XT_CLOCK_PIN); \ + } while (0) + +void xt_host_init(void); + +uint8_t xt_host_recv(void); diff --git a/keyboards/converter/xt_usb/xt_interrupt.c b/keyboards/converter/xt_usb/xt_interrupt.c new file mode 100644 index 0000000000..ba9d71848f --- /dev/null +++ b/keyboards/converter/xt_usb/xt_interrupt.c @@ -0,0 +1,166 @@ +/* +Copyright 2018 Jun WAKO <wakojun@gmail.com> +Copyright 2016 Ethan Apodaca <papodaca@gmail.com> + +This software is licensed with a Modified BSD License. +All of this is supposed to be Free Software, Open Source, DFSG-free, +GPL-compatible, and OK to use in both free and proprietary applications. +Additions and corrections to this file are welcome. + + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +* Neither the name of the copyright holders nor the names of + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +*/ + +#include <stdbool.h> +#include <avr/interrupt.h> +#include "xt.h" +#include "wait.h" +#include "debug.h" + +static inline uint8_t pbuf_dequeue(void); +static inline void pbuf_enqueue(uint8_t data); +static inline bool pbuf_has_data(void); +static inline void pbuf_clear(void); + +void xt_host_init(void) { + XT_INT_INIT(); + XT_INT_OFF(); + + /* hard reset */ +#ifdef XT_RESET + XT_RESET(); +#endif + + /* soft reset: pull clock line down for 20ms */ + XT_DATA_LO(); + XT_CLOCK_LO(); + wait_ms(20); + + /* input mode with pullup */ + XT_CLOCK_IN(); + XT_DATA_IN(); + + XT_INT_ON(); +} + +/* get data received by interrupt */ +uint8_t xt_host_recv(void) { + if (pbuf_has_data()) { + return pbuf_dequeue(); + } else { + return 0; + } +} + +ISR(XT_INT_VECT) { + /* + * XT signal format consits of 10 or 9 clocks and sends start bits and 8-bit data, + * which should be read on falling edge of clock. + * + * start(0), start(1), bit0, bit1, bit2, bit3, bit4, bit5, bit6, bit7 + * + * Original IBM XT keyboard sends start(0) bit while some of clones don't. + * Start(0) bit is read as low on data line while start(1) as high. + * + * https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol + */ + static enum { START, BIT0, BIT1, BIT2, BIT3, BIT4, BIT5, BIT6, BIT7 } state = START; + static uint8_t data = 0; + + uint8_t dbit = XT_DATA_READ(); + + // This is needed if using PCINT which can be called on both falling and rising edge + // if (XT_CLOCK_READ()) return; + + switch (state) { + case START: + // ignore start(0) bit + if (!dbit) return; + break; + case BIT0 ... BIT7: + data >>= 1; + if (dbit) data |= 0x80; + break; + } + if (state++ == BIT7) { + pbuf_enqueue(data); + state = START; + data = 0; + } + return; +} + +/*-------------------------------------------------------------------- + * Ring buffer to store scan codes from keyboard + *------------------------------------------------------------------*/ +#define PBUF_SIZE 32 +static uint8_t pbuf[PBUF_SIZE]; +static uint8_t pbuf_head = 0; +static uint8_t pbuf_tail = 0; + +static inline void pbuf_enqueue(uint8_t data) { + uint8_t sreg = SREG; + cli(); + uint8_t next = (pbuf_head + 1) % PBUF_SIZE; + if (next != pbuf_tail) { + pbuf[pbuf_head] = data; + pbuf_head = next; + } else { + dprintf("pbuf: full\n"); + } + SREG = sreg; +} + +static inline uint8_t pbuf_dequeue(void) { + uint8_t val = 0; + + uint8_t sreg = SREG; + cli(); + if (pbuf_head != pbuf_tail) { + val = pbuf[pbuf_tail]; + pbuf_tail = (pbuf_tail + 1) % PBUF_SIZE; + } + SREG = sreg; + + return val; +} + +static inline bool pbuf_has_data(void) { + uint8_t sreg = SREG; + cli(); + bool has_data = (pbuf_head != pbuf_tail); + SREG = sreg; + return has_data; +} + +static inline void pbuf_clear(void) { + uint8_t sreg = SREG; + cli(); + pbuf_head = pbuf_tail = 0; + SREG = sreg; +} diff --git a/keyboards/crkbd/keymaps/armand1m/keymap.c b/keyboards/crkbd/keymaps/armand1m/keymap.c index a37862fad3..3caee1c827 100644 --- a/keyboards/crkbd/keymaps/armand1m/keymap.c +++ b/keyboards/crkbd/keymaps/armand1m/keymap.c @@ -130,7 +130,8 @@ void oled_render_amsterdam_flag(void) { oled_write_raw_P(amsterdam_flag, sizeof(amsterdam_flag)); } -void oled_task_user(void) { +bool oled_task_user(void) { oled_render_amsterdam_flag(); + return false; } #endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/blipson/keymap.c b/keyboards/crkbd/keymaps/blipson/keymap.c index 23491e11a6..ad7664c295 100644 --- a/keyboards/crkbd/keymaps/blipson/keymap.c +++ b/keyboards/crkbd/keymaps/blipson/keymap.c @@ -128,12 +128,13 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); } else { oled_render_logo(); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/default/keymap.c b/keyboards/crkbd/keymaps/default/keymap.c index 88d40ee407..e06cfa3465 100644 --- a/keyboards/crkbd/keymaps/default/keymap.c +++ b/keyboards/crkbd/keymaps/default/keymap.c @@ -157,13 +157,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/devdev/keymap.c b/keyboards/crkbd/keymaps/devdev/keymap.c index aa4d39a253..a506295749 100644 --- a/keyboards/crkbd/keymaps/devdev/keymap.c +++ b/keyboards/crkbd/keymaps/devdev/keymap.c @@ -392,13 +392,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_master) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/dsanchezseco/keymap.c b/keyboards/crkbd/keymaps/dsanchezseco/keymap.c index 11690b0294..6ef428a11f 100644 --- a/keyboards/crkbd/keymaps/dsanchezseco/keymap.c +++ b/keyboards/crkbd/keymaps/dsanchezseco/keymap.c @@ -83,7 +83,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { } const char *read_logo(void); -void oled_task_user(void){ +bool oled_task_user(void){ switch (biton32(layer_state)){ case _DVORAK: oled_write_ln_P(PSTR("DVRK"), false); @@ -102,5 +102,6 @@ void oled_task_user(void){ } //now print logo oled_write(read_logo(), false); + return false; } #endif diff --git a/keyboards/crkbd/keymaps/edvorakjp/oled.c b/keyboards/crkbd/keymaps/edvorakjp/oled.c index 3a3748c691..e5ff029565 100644 --- a/keyboards/crkbd/keymaps/edvorakjp/oled.c +++ b/keyboards/crkbd/keymaps/edvorakjp/oled.c @@ -43,7 +43,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return is_keyboard_left() ? rotation : rotation ^ OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_left()) { render_mode_icon(!get_enable_kc_lang()); render_layer_state(); @@ -51,5 +51,6 @@ void oled_task_user(void) { } else { render_logo(); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/gotham/oled.c b/keyboards/crkbd/keymaps/gotham/oled.c index 4d2c10b60a..baacc86b18 100644 --- a/keyboards/crkbd/keymaps/gotham/oled.c +++ b/keyboards/crkbd/keymaps/gotham/oled.c @@ -246,7 +246,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } -void oled_task_user(void) { +bool oled_task_user(void) { if (timer_elapsed(oled_timer) > 10000) { oled_off(); return; @@ -262,4 +262,5 @@ void oled_task_user(void) { } else { render_status_secondary(); } + return false; } diff --git a/keyboards/crkbd/keymaps/kidbrazil/keymap.c b/keyboards/crkbd/keymaps/kidbrazil/keymap.c index 7cb08f40d5..219db22433 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/keymap.c +++ b/keyboards/crkbd/keymaps/kidbrazil/keymap.c @@ -172,7 +172,7 @@ void render_slave_oled(void) { } // {OLED Task} -----------------------------------------------// -void oled_task_user(void) { +bool oled_task_user(void) { // First time out switches to logo as first indication of iddle. if (timer_elapsed32(oled_timer) > 100000 && timer_elapsed32(oled_timer) < 479999) { // Render logo on both halves before full timeout @@ -209,5 +209,6 @@ void oled_task_user(void) { } } } + return false; } #endif diff --git a/keyboards/crkbd/keymaps/mcrown/oled.c b/keyboards/crkbd/keymaps/mcrown/oled.c index b728a5806e..9623b921a7 100644 --- a/keyboards/crkbd/keymaps/mcrown/oled.c +++ b/keyboards/crkbd/keymaps/mcrown/oled.c @@ -308,7 +308,7 @@ static void render_logo(void){ * @param void. * @return void. */ -void oled_task_user(void){ +bool oled_task_user(void){ if (timer_elapsed32(standby_oled_timer) > 15000){ oled_off(); }else{ @@ -321,6 +321,7 @@ void oled_task_user(void){ oled_scroll_left(); } } + return false; } /** @brief process the current key and add it to the keylog string. diff --git a/keyboards/crkbd/keymaps/oled_sample/keymap.c b/keyboards/crkbd/keymaps/oled_sample/keymap.c index 14b4535855..9daae9607d 100644 --- a/keyboards/crkbd/keymaps/oled_sample/keymap.c +++ b/keyboards/crkbd/keymaps/oled_sample/keymap.c @@ -190,13 +190,14 @@ void render_status_main(void) { render_keylogger_status(); } -void oled_task_user(void) { +bool oled_task_user(void) { update_log(); if (is_keyboard_master()) { render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_crkbd_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/oo/keymap.c b/keyboards/crkbd/keymaps/oo/keymap.c index c0416d9726..bcc296c8b6 100644 --- a/keyboards/crkbd/keymaps/oo/keymap.c +++ b/keyboards/crkbd/keymaps/oo/keymap.c @@ -148,13 +148,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/rarick/keymap.c b/keyboards/crkbd/keymaps/rarick/keymap.c index b11bac1e72..adf9555421 100644 --- a/keyboards/crkbd/keymaps/rarick/keymap.c +++ b/keyboards/crkbd/keymaps/rarick/keymap.c @@ -158,13 +158,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/rjhilgefort/keymap.c b/keyboards/crkbd/keymaps/rjhilgefort/keymap.c index 7ca234a0ee..a753b2b872 100644 --- a/keyboards/crkbd/keymaps/rjhilgefort/keymap.c +++ b/keyboards/crkbd/keymaps/rjhilgefort/keymap.c @@ -204,13 +204,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/rpbaptist/keymap.c b/keyboards/crkbd/keymaps/rpbaptist/keymap.c index d632e255d5..a098c73d2c 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/keymap.c +++ b/keyboards/crkbd/keymaps/rpbaptist/keymap.c @@ -290,7 +290,7 @@ void render_status(void) { # endif } -void oled_task_user(void) { +bool oled_task_user(void) { if (timer_elapsed32(oled_timer) > OLED_TIMEOUT) { oled_off(); return; @@ -310,6 +310,7 @@ void oled_task_user(void) { } #endif } + return false; } #endif diff --git a/keyboards/crkbd/keymaps/soundmonster/keymap.c b/keyboards/crkbd/keymaps/soundmonster/keymap.c index 67cfa78f92..98afe3685f 100644 --- a/keyboards/crkbd/keymaps/soundmonster/keymap.c +++ b/keyboards/crkbd/keymaps/soundmonster/keymap.c @@ -300,7 +300,7 @@ void suspend_power_down_user() { oled_off(); } -void oled_task_user(void) { +bool oled_task_user(void) { if (timer_elapsed32(oled_timer) > 30000) { oled_off(); return; @@ -314,6 +314,7 @@ void oled_task_user(void) { } else { render_status_secondary(); } + return false; } #endif diff --git a/keyboards/crkbd/keymaps/sulrich/keymap.c b/keyboards/crkbd/keymaps/sulrich/keymap.c index f1cd60c526..84668b53c8 100644 --- a/keyboards/crkbd/keymaps/sulrich/keymap.c +++ b/keyboards/crkbd/keymaps/sulrich/keymap.c @@ -137,13 +137,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -153,4 +154,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } #endif // OLED_ENABLE - diff --git a/keyboards/crkbd/keymaps/vayashiko/keymap.c b/keyboards/crkbd/keymaps/vayashiko/keymap.c index a1a8f7e9f5..ecb629f30d 100644 --- a/keyboards/crkbd/keymaps/vayashiko/keymap.c +++ b/keyboards/crkbd/keymaps/vayashiko/keymap.c @@ -164,13 +164,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_master) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/via/keymap.c b/keyboards/crkbd/keymaps/via/keymap.c index cbaeb93f6d..12c86f6bbc 100644 --- a/keyboards/crkbd/keymaps/via/keymap.c +++ b/keyboards/crkbd/keymaps/via/keymap.c @@ -158,13 +158,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/xyverz/keymap.c b/keyboards/crkbd/keymaps/xyverz/keymap.c index d99d9d6baf..0b7fc0a0ac 100644 --- a/keyboards/crkbd/keymaps/xyverz/keymap.c +++ b/keyboards/crkbd/keymaps/xyverz/keymap.c @@ -187,13 +187,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/cu24/config.h b/keyboards/cu24/config.h index 78dcabb0c8..a2a4e727ff 100644 --- a/keyboards/cu24/config.h +++ b/keyboards/cu24/config.h @@ -14,8 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -111,5 +110,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/cu24/cu24.h b/keyboards/cu24/cu24.h index d329182d23..8e3daa4758 100644 --- a/keyboards/cu24/cu24.h +++ b/keyboards/cu24/cu24.h @@ -13,11 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CU24_H -#define CU24_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The following is an example using the Planck MIT layout // The first section contains all of the arguments @@ -28,34 +30,28 @@ k20, k21, k22, k23, \ k30, k31, k32, k33, \ k40, k41, k42, k43, \ - k50, k51, k52, k53 \ -) \ -{ \ + k50, k51, k52, k53 \ +) { \ { k00, k01, k02, k03 }, \ { k10, k11, k12, k13 }, \ { k20, k21, k22, k23 }, \ { k30, k31, k32, k33 }, \ { k40, k41, k42, k43 }, \ - { k50, k51, k52, k53 } \ + { k50, k51, k52, k53 } \ } #define LAYOUT_numpad( \ k00, k01, k02, k03, \ k10, k11, k12, k13, \ k20, k21, k22, k23, \ - k30, k31, k32, \ + k30, k31, k32, \ k40, k41, k42, k43, \ - k51, k52 \ -) \ -{ \ - { k00, k01, k02, k03 }, \ - { k10, k11, k12, k13 }, \ - { k20, k21, k22, k23 }, \ - { k30, k31, k32, KC_NO }, \ - { k40, k41, k42, k43 }, \ - { KC_NO, k51, k52, KC_NO } \ + k51, k52 \ +) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, XXX }, \ + { k40, k41, k42, k43 }, \ + { XXX, k51, k52, XXX } \ } - - - -#endif diff --git a/keyboards/cu75/config.h b/keyboards/cu75/config.h index a45cc654f6..cfcb08cce1 100644 --- a/keyboards/cu75/config.h +++ b/keyboards/cu75/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -93,5 +92,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/cu75/cu75.h b/keyboards/cu75/cu75.h index 7774187b4f..444c8daaec 100644 --- a/keyboards/cu75/cu75.h +++ b/keyboards/cu75/cu75.h @@ -1,5 +1,4 @@ -#ifndef CU75_H -#define CU75_H +#pragma once #include "quantum.h" #include "matrix.h" @@ -40,71 +39,71 @@ enum action_functions { void reset_keyboard_kb(void); void click(uint16_t freq, uint16_t duration); +#define XXX KC_NO + /* Vanilla Keymap */ // This a shortcut to help you visually see your layout. /* * ,-------------------------------------------------------------------------------. -* | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 0A | 0B | 0C | 0D | 0E | 0F | 0G | +* | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 0A | 0B | 0C | 0D | 0E | 0F | * |-------------------------------------------------------------------------------| -* | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1D | 1E | 1G | +* | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1D | 1F | * |-------------------------------------------------------------------------------| -* | 21 | 22 |23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | 2C | 2D | 2E | 2F | +* | 20 | 21 |22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | 2C | 2D | 2E | * |-------------------------------------------------------------------------------| -* | 31 | 32 |33 | 34 | 35 | 36 | 37 | 38 | 39 | 3A | 3B | 3C | 3D | 3F | +* | 30 | 31 |32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 3A | 3B | 3C | 3E | * |-------------------------------------------------------------------------------| -* | 41 | 42 |43 | 45 | 46 | 47 | 48 | 49 | 4A | 4B | 4C | 4D | 4E | 4F | +* | 40 | 42 |43 | 44 | 45 | 46 | 47 | 48 | 49 | 4A | 4B | 4C | 4D | 4E | * |-------------------------------------------------------------------------------| -* | 51 | 52 | 53 | 54 | 57 | 59 | 5A | 5B | 5C | 5D | 5E | 5F | +* | 50 | 51 | 52 | 53 | 56 | 58 | 59 | 5A | 5B | 5C | 5D | 5E | * `-------------------------------------------------------------------------------' */ // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1G, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ - k41, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, \ - k51, k52, k53, k54, k57, k59, k5A, k5B, k5C, k5D, k5E, k5F \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, \ + k50, k51, k52, k53, k56, k58, k59, k5A, k5B, k5C, k5D, k5E \ ) { \ - {k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G}, \ - {k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, KC_NO, k1G}, \ - {k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, KC_NO}, \ - {k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO, k3F, KC_NO}, \ - {k41, KC_NO, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, KC_NO}, \ - {k51, k52, k53, k54, KC_NO, KC_NO, k57, KC_NO, k59, k5A, k5B, k5C, k5D, k5E, k5F, KC_NO}, \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, XXX, k3E, XXX }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, XXX }, \ + { k50, k51, k52, k53, XXX, XXX, k56, XXX, k58, k59, k5A, k5B, k5C, k5D, k5E, XXX } \ } #define LAYOUT_all( \ - k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, \ - k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, \ - k51, k52, k53, k54, k57, k59, k5A, k5B, k5C, k5D, k5E, k5F \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, \ + k50, k51, k52, k53, k56, k58, k59, k5A, k5B, k5C, k5D, k5E \ ) { \ - {k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G}, \ - {k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G}, \ - {k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, KC_NO}, \ - {k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, KC_NO}, \ - {k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, KC_NO}, \ - {k51, k52, k53, k54, KC_NO, KC_NO, k57, KC_NO, k59, k5A, k5B, k5C, k5D, k5E, k5F, KC_NO}, \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, XXX }, \ + { k50, k51, k52, k53, XXX, XXX, k56, XXX, k58, k59, k5A, k5B, k5C, k5D, k5E, XXX } \ } #define LAYOUT_iso( \ - k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1G, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ - k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, \ - k51, k52, k53, k54, k57, k59, k5A, k5B, k5C, k5D, k5E, k5F \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, \ + k50, k51, k52, k53, k56, k58, k59, k5A, k5B, k5C, k5D, k5E \ ) { \ - {k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G}, \ - {k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, KC_NO, k1G}, \ - {k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, KC_NO}, \ - {k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO, k3F, KC_NO}, \ - {k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, KC_NO}, \ - {k51, k52, k53, k54, KC_NO, KC_NO, k57, KC_NO, k59, k5A, k5B, k5C, k5D, k5E, k5F, KC_NO}, \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, XXX, k3E, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, XXX }, \ + { k50, k51, k52, k53, XXX, XXX, k56, XXX, k58, k59, k5A, k5B, k5C, k5D, k5E, XXX } \ } - -#endif //CU75_H diff --git a/keyboards/dc01/left/i2c.h b/keyboards/dc01/left/i2c.h index 25e876658b..0d93e4ecaa 100644 --- a/keyboards/dc01/left/i2c.h +++ b/keyboards/dc01/left/i2c.h @@ -1,5 +1,4 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include <stdint.h> @@ -27,5 +26,3 @@ uint8_t i2c_master_write(uint8_t data); uint8_t i2c_master_read(int); void i2c_reset_state(void); void i2c_slave_init(uint8_t address); - -#endif diff --git a/keyboards/dekunukem/duckypad/config.h b/keyboards/dekunukem/duckypad/config.h index 2f1b2ef32c..59c6826662 100644 --- a/keyboards/dekunukem/duckypad/config.h +++ b/keyboards/dekunukem/duckypad/config.h @@ -46,8 +46,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #endif -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_SCL_PAL_MODE 1 #define I2C1_SDA_PAL_MODE 1 diff --git a/keyboards/dekunukem/duckypad/keymaps/default/keymap.c b/keyboards/dekunukem/duckypad/keymaps/default/keymap.c index a87caa2cdd..3b74640fe6 100644 --- a/keyboards/dekunukem/duckypad/keymaps/default/keymap.c +++ b/keyboards/dekunukem/duckypad/keymaps/default/keymap.c @@ -125,7 +125,7 @@ char* make_rgb_text(void){ return s; }; -void oled_task_user(void) { +bool oled_task_user(void) { render_logo(); oled_set_cursor(0,3); if (rgbToggled) { @@ -137,6 +137,7 @@ void oled_task_user(void) { oled_write_ln_P(s, false); free(s); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/dekunukem/duckypad/keymaps/m4cs/keymap.c b/keyboards/dekunukem/duckypad/keymaps/m4cs/keymap.c index 80b188a480..cd8a314739 100644 --- a/keyboards/dekunukem/duckypad/keymaps/m4cs/keymap.c +++ b/keyboards/dekunukem/duckypad/keymaps/m4cs/keymap.c @@ -203,7 +203,7 @@ char* make_sys_info_text(void) { }; -void oled_task_user(void) { +bool oled_task_user(void) { if (!sysToggled) { render_logo(); oled_set_cursor(0,3); @@ -221,6 +221,7 @@ void oled_task_user(void) { free(s); } } + return false; }; int concat(int a, int b) { diff --git a/keyboards/dekunukem/duckypad/keymaps/via/keymap.c b/keyboards/dekunukem/duckypad/keymaps/via/keymap.c index 5d11b6d6c8..01baaeb593 100644 --- a/keyboards/dekunukem/duckypad/keymaps/via/keymap.c +++ b/keyboards/dekunukem/duckypad/keymaps/via/keymap.c @@ -67,7 +67,7 @@ static void render_logo(void) { oled_write_raw_P(ducky_logo, LOGO_SIZE); } -void oled_task_user(void) { +bool oled_task_user(void) { render_logo(); + return false; } - diff --git a/keyboards/dichotomy/config.h b/keyboards/dichotomy/config.h index 0cdaf776b4..03e19b1388 100644 --- a/keyboards/dichotomy/config.h +++ b/keyboards/dichotomy/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -66,5 +65,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ /* 8-bit data */ \ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); - -#endif diff --git a/keyboards/dichotomy/dichotomy.h b/keyboards/dichotomy/dichotomy.h index 2023259b11..37372d6496 100755 --- a/keyboards/dichotomy/dichotomy.h +++ b/keyboards/dichotomy/dichotomy.h @@ -1,5 +1,4 @@ -#ifndef DICHOTOMY_H -#define DICHOTOMY_H +#pragma once #include "report.h" #include "pointing_device.h" @@ -25,22 +24,21 @@ #define set_led_cyan() red_led_off(); grn_led_on(); blu_led_on() #define set_led_white() red_led_on(); grn_led_on(); blu_led_on() +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - 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, \ - k33, k34, k35, k36, k37, k38, \ - k42, k43, k44, k45, k46, k47, k48, k49 \ -) \ -{ \ - { 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 }, \ - { KC_NO, KC_NO, KC_NO, k33, k34, k35, k36, k37, k38, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, KC_NO, KC_NO } \ + 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, \ + k33, k34, k35, k36, k37, k38, \ + k42, k43, k44, k45, k46, k47, k48, k49 \ +) { \ + { 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 }, \ + { XXX, XXX, XXX, k33, k34, k35, k36, k37, k38, XXX, XXX, XXX }, \ + { XXX, XXX, k42, k43, k44, k45, k46, k47, k48, k49, XXX, XXX } \ } - -#endif diff --git a/keyboards/diverge3/diverge3.h b/keyboards/diverge3/diverge3.h index 53364213f6..c668bb29ef 100644 --- a/keyboards/diverge3/diverge3.h +++ b/keyboards/diverge3/diverge3.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef DIVERGE3_H -#define DIVERGE3_H + +#pragma once #include "quantum.h" @@ -26,24 +26,25 @@ #endif #endif +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The second converts the arguments into a two-dimensional array #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, LT0, LT1, LT2, RT2, RT1, RT0, R40, R41, R42, R43, R44 \ + 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, LT0, LT1, LT2, RT2, RT1, RT0, R40, R41, R42, R43, R44 \ ) { \ - { L00, L01, L02, L03, L04, L05, L06, KC_NO }, \ - { L10, L11, L12, L13, L14, L15, L16, KC_NO }, \ - { L20, L21, L22, L23, L24, L25, L26, KC_NO }, \ - { L30, L31, L32, L33, L34, L35, L36, KC_NO }, \ - { L40, L41, L42, L43, L44, LT0, LT1, LT2 }, \ - { R06, R05, R04, R03, R02, R01, R00, KC_NO }, \ - { R16, R15, R14, R13, R12, R11, R10, KC_NO }, \ - { R26, R25, R24, R23, R22, R21, R20, KC_NO }, \ - { R36, R35, R34, R33, R32, R31, R30, KC_NO }, \ - { R44, R43, R42, R41, R40, RT0, RT1, RT2 } \ + { L00, L01, L02, L03, L04, L05, L06, XXX }, \ + { L10, L11, L12, L13, L14, L15, L16, XXX }, \ + { L20, L21, L22, L23, L24, L25, L26, XXX }, \ + { L30, L31, L32, L33, L34, L35, L36, XXX }, \ + { L40, L41, L42, L43, L44, LT0, LT1, LT2 }, \ + { R06, R05, R04, R03, R02, R01, R00, XXX }, \ + { R16, R15, R14, R13, R12, R11, R10, XXX }, \ + { R26, R25, R24, R23, R22, R21, R20, XXX }, \ + { R36, R35, R34, R33, R32, R31, R30, XXX }, \ + { R44, R43, R42, R41, R40, RT0, RT1, RT2 } \ } -#endif diff --git a/keyboards/dm9records/ergoinu/post_rules.mk b/keyboards/dm9records/ergoinu/post_rules.mk new file mode 100644 index 0000000000..02aa48104c --- /dev/null +++ b/keyboards/dm9records/ergoinu/post_rules.mk @@ -0,0 +1,9 @@ +ifneq ($(strip $(ERGOINU)),) + ifeq ($(findstring promicroled, $(ERGOINU)), promicroled) + DISABLE_PROMICRO_LEDs = no + endif +endif + +ifeq ($(strip $(DISABLE_PROMICRO_LEDs)), yes) + OPT_DEFS += -DDISABLE_PROMICRO_LEDs +endif diff --git a/keyboards/dm9records/ergoinu/rules.mk b/keyboards/dm9records/ergoinu/rules.mk index 04884050dc..895ce253d7 100644 --- a/keyboards/dm9records/ergoinu/rules.mk +++ b/keyboards/dm9records/ergoinu/rules.mk @@ -27,13 +27,3 @@ SRC += matrix.c serial.c split_util.c # ergoinu configs DISABLE_PROMICRO_LEDs = yes - -ifneq ($(strip $(ERGOINU)),) - ifeq ($(findstring promicroled, $(ERGOINU)), promicroled) - DISABLE_PROMICRO_LEDs = no - endif -endif - -ifeq ($(strip $(DISABLE_PROMICRO_LEDs)), yes) - OPT_DEFS += -DDISABLE_PROMICRO_LEDs -endif diff --git a/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c b/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c index 181de5621c..b41359c5b6 100644 --- a/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c +++ b/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c @@ -220,7 +220,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { #endif } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -244,5 +244,6 @@ void oled_task_user(void) { oled_write_P(PSTR("Mode: "), false); oled_write_ln(rgb_mode_name, false); + return false; } #endif diff --git a/keyboards/do60/config.h b/keyboards/do60/config.h index f3ee1ed045..8a0f324aa2 100644 --- a/keyboards/do60/config.h +++ b/keyboards/do60/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -75,5 +74,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LOCKING_RESYNC_ENABLE #define TAPPING_TERM 200 - -#endif diff --git a/keyboards/doodboard/duckboard/keymaps/default/keymap.c b/keyboards/doodboard/duckboard/keymaps/default/keymap.c index e25280ff6a..b4e6207aea 100644 --- a/keyboards/doodboard/duckboard/keymaps/default/keymap.c +++ b/keyboards/doodboard/duckboard/keymaps/default/keymap.c @@ -89,7 +89,7 @@ static void render_anim(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); oled_set_cursor(0,6); oled_write_P(PSTR("DUCK\nBOARD\n"), false); @@ -109,6 +109,7 @@ void oled_task_user(void) { oled_write_P(PSTR("RGB\n"), false); break; } + return false; } #endif diff --git a/keyboards/doodboard/duckboard_r2/keymaps/default/keymap.c b/keyboards/doodboard/duckboard_r2/keymaps/default/keymap.c index ea603cdb22..af6e469ab2 100644 --- a/keyboards/doodboard/duckboard_r2/keymaps/default/keymap.c +++ b/keyboards/doodboard/duckboard_r2/keymaps/default/keymap.c @@ -89,7 +89,7 @@ static void render_anim(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); oled_set_cursor(0,6); oled_write_P(PSTR("DUCK\nBOARD\n"), false); @@ -109,6 +109,7 @@ void oled_task_user(void) { oled_write_P(PSTR("RGB\n"), false); break; } + return false; } #endif diff --git a/keyboards/doodboard/duckboard_r2/keymaps/via/keymap.c b/keyboards/doodboard/duckboard_r2/keymaps/via/keymap.c index 9afc121859..7911d9e3cc 100644 --- a/keyboards/doodboard/duckboard_r2/keymaps/via/keymap.c +++ b/keyboards/doodboard/duckboard_r2/keymaps/via/keymap.c @@ -96,7 +96,7 @@ static void render_anim(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); oled_set_cursor(0,6); oled_write_P(PSTR("DUCK\nBOARD\n"), false); @@ -119,6 +119,7 @@ void oled_task_user(void) { oled_write_P(PSTR("FN2\n"), false); break; } + return false; } #endif diff --git a/keyboards/draculad/keymaps/default/keymap.c b/keyboards/draculad/keymaps/default/keymap.c index 657ef2048d..a352359d13 100644 --- a/keyboards/draculad/keymaps/default/keymap.c +++ b/keyboards/draculad/keymaps/default/keymap.c @@ -186,12 +186,13 @@ static void render_status(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_logo(); } + return false; } #endif diff --git a/keyboards/draculad/keymaps/pimoroni/keymap.c b/keyboards/draculad/keymaps/pimoroni/keymap.c index c7b6cd35d5..b70184dbc8 100644 --- a/keyboards/draculad/keymaps/pimoroni/keymap.c +++ b/keyboards/draculad/keymaps/pimoroni/keymap.c @@ -200,12 +200,13 @@ static void render_status(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_logo(); } + return false; } #endif diff --git a/keyboards/dtisaac/dosa40rgb/config.h b/keyboards/dtisaac/dosa40rgb/config.h index c2d4a17056..62c8c6e22c 100644 --- a/keyboards/dtisaac/dosa40rgb/config.h +++ b/keyboards/dtisaac/dosa40rgb/config.h @@ -30,11 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROWS 4 #define MATRIX_COLS 11 -/* AdafruitBle Pin */ -#define AdafruitBleResetPin D4 -#define AdafruitBleCSPin B4 -#define AdafruitBleIRQPin E6 - /* * Keyboard Matrix Assignments * diff --git a/keyboards/dtisaac/dosa40rgb/rules.mk b/keyboards/dtisaac/dosa40rgb/rules.mk index bf7cde9a55..a76047eb26 100644 --- a/keyboards/dtisaac/dosa40rgb/rules.mk +++ b/keyboards/dtisaac/dosa40rgb/rules.mk @@ -20,7 +20,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE # Enable Bluetooth +BLUETOOTH_ENABLE = yes # Enable Bluetooth +BLUETOOTH_DRIVER = AdafruitBLE RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 diff --git a/keyboards/dumbo/keymaps/default/keymap.c b/keyboards/dumbo/keymaps/default/keymap.c index f3ee895210..7fc3ffc2c4 100644 --- a/keyboards/dumbo/keymaps/default/keymap.c +++ b/keyboards/dumbo/keymaps/default/keymap.c @@ -179,12 +179,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/dumbo/keymaps/trip-trap/keymap.c b/keyboards/dumbo/keymaps/trip-trap/keymap.c index fc1092ca6d..73042f5f5e 100644 --- a/keyboards/dumbo/keymaps/trip-trap/keymap.c +++ b/keyboards/dumbo/keymaps/trip-trap/keymap.c @@ -375,7 +375,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); sprintf(wpm_str, "%03d", get_current_wpm()); @@ -383,6 +383,7 @@ void oled_task_user(void) { } else { render_anim(); } + return false; } #endif diff --git a/keyboards/dztech/dz60rgb/v1/config.h b/keyboards/dztech/dz60rgb/v1/config.h index f6ee7c4e2f..b4b23a6213 100644 --- a/keyboards/dztech/dz60rgb/v1/config.h +++ b/keyboards/dztech/dz60rgb/v1/config.h @@ -46,8 +46,6 @@ # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 63 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 63 #endif diff --git a/keyboards/dztech/dz60rgb/v2/config.h b/keyboards/dztech/dz60rgb/v2/config.h index 6108e99034..338575ee9a 100644 --- a/keyboards/dztech/dz60rgb/v2/config.h +++ b/keyboards/dztech/dz60rgb/v2/config.h @@ -56,8 +56,6 @@ # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 63 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 63 #endif diff --git a/keyboards/dztech/dz60rgb/v2_1/config.h b/keyboards/dztech/dz60rgb/v2_1/config.h index 06d504e393..e6c08eab42 100644 --- a/keyboards/dztech/dz60rgb/v2_1/config.h +++ b/keyboards/dztech/dz60rgb/v2_1/config.h @@ -72,8 +72,6 @@ # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 63 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 63 #endif diff --git a/keyboards/dztech/dz60rgb_ansi/v1/config.h b/keyboards/dztech/dz60rgb_ansi/v1/config.h index dc2a6f4bc0..7341c1c02c 100644 --- a/keyboards/dztech/dz60rgb_ansi/v1/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v1/config.h @@ -46,8 +46,6 @@ # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 61 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 61 #endif diff --git a/keyboards/dztech/dz60rgb_ansi/v2/config.h b/keyboards/dztech/dz60rgb_ansi/v2/config.h index 6c1e006821..7e6842d8d6 100644 --- a/keyboards/dztech/dz60rgb_ansi/v2/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v2/config.h @@ -56,8 +56,6 @@ # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 61 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 61 #endif diff --git a/keyboards/dztech/dz60rgb_wkl/v1/config.h b/keyboards/dztech/dz60rgb_wkl/v1/config.h index 12317c2d35..c242401f6b 100644 --- a/keyboards/dztech/dz60rgb_wkl/v1/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v1/config.h @@ -46,8 +46,6 @@ # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 62 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 62 #endif diff --git a/keyboards/dztech/dz60rgb_wkl/v2/config.h b/keyboards/dztech/dz60rgb_wkl/v2/config.h index 945b591ce6..45ccf6c9f7 100644 --- a/keyboards/dztech/dz60rgb_wkl/v2/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v2/config.h @@ -56,8 +56,6 @@ # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 62 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 62 #endif diff --git a/keyboards/dztech/dz60rgb_wkl/v2_1/config.h b/keyboards/dztech/dz60rgb_wkl/v2_1/config.h index 76b0b6ea52..0e5bb8f67b 100644 --- a/keyboards/dztech/dz60rgb_wkl/v2_1/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v2_1/config.h @@ -72,8 +72,6 @@ # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 62 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 62 #endif diff --git a/keyboards/dztech/dz65rgb/keymaps/jumper149/readme.md b/keyboards/dztech/dz65rgb/keymaps/jumper149/readme.md index d872587317..9de86be2d1 100644 --- a/keyboards/dztech/dz65rgb/keymaps/jumper149/readme.md +++ b/keyboards/dztech/dz65rgb/keymaps/jumper149/readme.md @@ -3,13 +3,13 @@ Run commands in the root directory of this repository. ``` -./bin/qmk compile && sudo dfu-programmer atmega32u4 erase && sudo dfu-programmer atmega32u4 flash ./dztech_dz65rgb_v2_jumper149.hex && sudo dfu-programmer atmega32u4 reset +qmk compile && sudo dfu-programmer atmega32u4 erase && sudo dfu-programmer atmega32u4 flash ./dztech_dz65rgb_v2_jumper149.hex && sudo dfu-programmer atmega32u4 reset ``` ## build ``` -./bin/qmk compile +qmk compile ``` ## flash diff --git a/keyboards/dztech/dz65rgb/v3/config.h b/keyboards/dztech/dz65rgb/v3/config.h index dbf2f5b3ce..053b06fae1 100755 --- a/keyboards/dztech/dz65rgb/v3/config.h +++ b/keyboards/dztech/dz65rgb/v3/config.h @@ -49,9 +49,7 @@ # define RGB_MATRIX_LED_FLUSH_LIMIT 26 # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define DRIVER_ADDR_1 0b0110000 -# define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. # define DRIVER_COUNT 1 -# define DRIVER_1_LED_TOTAL 68 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_LED_TOTAL 68 # define DRIVER_INDICATOR_LED_TOTAL 0 #endif diff --git a/keyboards/eco/config.h b/keyboards/eco/config.h index db1c61ab4f..e5258e3a0b 100644 --- a/keyboards/eco/config.h +++ b/keyboards/eco/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -68,5 +67,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifdef SUBPROJECT_rev2 #include "rev2/config.h" #endif - -#endif diff --git a/keyboards/eco/eco.h b/keyboards/eco/eco.h index 211e41fe8f..885bf982d7 100644 --- a/keyboards/eco/eco.h +++ b/keyboards/eco/eco.h @@ -1,13 +1,9 @@ -#ifndef ECO_H -#define ECO_H +#pragma once -#ifdef KEYBOARD_eco_rev1 - #include "rev1.h" -#endif -#ifdef KEYBOARD_eco_rev2 - #include "rev2.h" +#if defined(KEYBOARD_eco_rev1) +# include "rev1.h" +#elif defined(KEYBOARD_eco_rev2) +# include "rev2.h" #endif #include "quantum.h" - -#endif diff --git a/keyboards/eco/rev1/config.h b/keyboards/eco/rev1/config.h index 1e97a703d1..65cb050d6c 100644 --- a/keyboards/eco/rev1/config.h +++ b/keyboards/eco/rev1/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#pragma once #include "../config.h" @@ -26,5 +25,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B1, B6, B2, B3 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 } #define UNUSED_PINS - -#endif diff --git a/keyboards/eco/rev1/rev1.h b/keyboards/eco/rev1/rev1.h index 132760fbe8..a6ceafb815 100644 --- a/keyboards/eco/rev1/rev1.h +++ b/keyboards/eco/rev1/rev1.h @@ -1,21 +1,17 @@ -#ifndef REV1_H -#define REV1_H +#pragma once #include "../eco.h" #include "quantum.h" #define LAYOUT( \ - k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \ - ) \ - { \ - { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014 }, \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 } \ - } - -#endif + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D } \ +} diff --git a/keyboards/eco/rev2/config.h b/keyboards/eco/rev2/config.h index 83f2defc9e..bbc0492e06 100644 --- a/keyboards/eco/rev2/config.h +++ b/keyboards/eco/rev2/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef REV2_CONFIG_H -#define REV2_CONFIG_H +#pragma once #include "../config.h" @@ -26,5 +25,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D7, B5, B4, E6 } #define MATRIX_COL_PINS { D1, D0, D4, C6, B6, B2, B3, B1, F7, F6, F5, F4, D2, D3 } #define UNUSED_PINS - -#endif diff --git a/keyboards/eco/rev2/rev2.h b/keyboards/eco/rev2/rev2.h index 881bcc77b9..a6ceafb815 100644 --- a/keyboards/eco/rev2/rev2.h +++ b/keyboards/eco/rev2/rev2.h @@ -1,21 +1,17 @@ -#ifndef REV2_H -#define REV2_H +#pragma once #include "../eco.h" #include "quantum.h" #define LAYOUT( \ - k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \ - ) \ - { \ - { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014 }, \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 } \ - } - -#endif + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D } \ +} diff --git a/keyboards/ein_60/ein_60.c b/keyboards/ein_60/ein_60.c index e9431edefb..d15ad0cd52 100644 --- a/keyboards/ein_60/ein_60.c +++ b/keyboards/ein_60/ein_60.c @@ -56,7 +56,8 @@ const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT( #endif #ifdef OLED_ENABLE -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { return false; } // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); switch (get_highest_layer(layer_state)) { @@ -95,7 +96,9 @@ __attribute__((weak)) void oled_task_user(void) { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255, 4,253,197,197,197,197,197,197,197,197,197,197,199,192,192, 0,255,255, 0,255, 0,255,255, 0,254, 13, 27, 55,111,222,188,120,255, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255, 0,255,197,197,197,197,197,197,197,197,197,197,253,253,255,131,254, 0, 0,255,255, 0,255,184,220,238,247,219,205,198,195,193,192,255,255,255,128,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0, 3, 3, 2, 3, 0, 3, 3, 2, 3, 0, 0, 0, 0, 0, 1, 3, 2, 2, 3, 0, 8, 28, 20, 20, 20, 20, 20, 28, 8, 0, 1, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0, 0, 0, 1, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; + oled_write_raw_P(ein60_logo, sizeof(ein60_logo)); + return false; } #endif diff --git a/keyboards/ein_60/keymaps/default/keymap.c b/keyboards/ein_60/keymaps/default/keymap.c index 3984dabcbf..24a705106c 100644 --- a/keyboards/ein_60/keymaps/default/keymap.c +++ b/keyboards/ein_60/keymaps/default/keymap.c @@ -167,11 +167,12 @@ static void render_status(void) { oled_set_cursor(1,2); } -void oled_task_user(void) { +bool oled_task_user(void) { render_status(); oled_write_ln_P(PSTR(""), false); render_ein60_logo(); + return false; } #endif diff --git a/keyboards/ein_60/keymaps/klackygears/keymap.c b/keyboards/ein_60/keymaps/klackygears/keymap.c index ea1d77dea7..be3c30b97d 100644 --- a/keyboards/ein_60/keymaps/klackygears/keymap.c +++ b/keyboards/ein_60/keymaps/klackygears/keymap.c @@ -104,7 +104,7 @@ static void render_ein60_logo(void) { static void render_status(void) { -//void oled_task_user(void) { +//bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -145,12 +145,13 @@ static void render_status(void) { } -void oled_task_user(void) { +bool oled_task_user(void) { render_status(); oled_write_ln_P(PSTR(""), false); render_ein60_logo(); + return false; } #endif @@ -172,5 +173,3 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } return true; } - - diff --git a/keyboards/ein_60/keymaps/ledtest/keymap.c b/keyboards/ein_60/keymaps/ledtest/keymap.c index 6f903124af..5fb5217c98 100644 --- a/keyboards/ein_60/keymaps/ledtest/keymap.c +++ b/keyboards/ein_60/keymaps/ledtest/keymap.c @@ -166,11 +166,13 @@ static void render_status(void) { oled_set_cursor(1,2); } -void oled_task_user(void) { +bool oled_task_user(void) { render_status(); oled_write_ln_P(PSTR(""), false); render_ein60_logo(); + + return false; } #endif diff --git a/keyboards/ep/40/40.h b/keyboards/ep/40/40.h index 30f3d15b4f..1ac39a278d 100644 --- a/keyboards/ep/40/40.h +++ b/keyboards/ep/40/40.h @@ -13,11 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef EP40_H -#define EP40_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + /* This a shortcut to help you visually see your layout. * * The first section contains all of the arguments representing the physical @@ -26,19 +28,14 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define xxx KC_NO - -#define LAYOUT(\ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b,\ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1b,\ - k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b,\ - k30, k31, k32, k34, k36, k38, k39, k3a, k3b \ -) \ -{ \ - {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b},\ - {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, xxx, k1b},\ - {k20, xxx, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b},\ - {k30, k31, k32, xxx, k34, xxx, k36, xxx, k38, k39, k3a, k3b} \ +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1B, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k34, k36, k38, k39, k3A, k3B \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, XXX, k1B }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, XXX, k34, XXX, k36, XXX, k38, k39, k3A, k3B } \ } - -#endif diff --git a/keyboards/ep/96/96.h b/keyboards/ep/96/96.h index 1887eb472c..1117256cdc 100644 --- a/keyboards/ep/96/96.h +++ b/keyboards/ep/96/96.h @@ -13,11 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef EP96_H -#define EP96_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + /* This a shortcut to help you visually see your layout. * * The first section contains all of the arguments representing the physical @@ -26,22 +28,19 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define xxxx KC_NO #define LAYOUT( \ - K000, K001, K002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, k016, k017, k018, \ - K100, K101, K102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k114, k115, k116, k117, k118, \ - K200, K202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, k215, k216, k217, \ - K300, K302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314, k315, k316, k317, k318, \ - K400, K401, K402, k403, k404, k405, k406, k407, k408, k409, k410, k411, k413, k414, k415, k416, k417, \ - K500, K501, K502, k506, k511, k512, k513, k514, k515, k516, k517, k518) \ -{ \ - {K000, K001, K002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, k016, k017, k018}, \ - {K100, K101, K102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, xxxx, k114, k115, k116, k117, k118}, \ - {K200, xxxx, K202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, xxxx, k215, k216, k217, xxxx}, \ - {K300, xxxx, K302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314, k315, k316, k317, k318}, \ - {K400, K401, K402, k403, k404, k405, k406, k407, k408, k409, k410, k411, xxxx, k413, k414, k415, k416, k417, xxxx}, \ - {K500, K501, K502, xxxx, xxxx, xxxx, k506, xxxx, xxxx, xxxx, xxxx, k511, k512, k513, k514, k515, k516, k517, k518} \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, k1G, k1H, k1I, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, k2H, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4D, k4E, k4F, k4G, k4H, \ + k50, k51, k52, k56, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, k1E, k1F, k1G, k1H, k1I }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX, k2F, k2G, k2H, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, XXX, k4D, k4E, k4F, k4G, k4H, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, XXX, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I } \ } - -#endif diff --git a/keyboards/ergodash/config.h b/keyboards/ergodash/config.h index c910d8f24f..cfb6bf4ffc 100644 --- a/keyboards/ergodash/config.h +++ b/keyboards/ergodash/config.h @@ -16,9 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" - -#endif diff --git a/keyboards/ergodash/mini/mini.h b/keyboards/ergodash/mini/mini.h index d565c6168f..4aca15775b 100644 --- a/keyboards/ergodash/mini/mini.h +++ b/keyboards/ergodash/mini/mini.h @@ -1,5 +1,4 @@ -#ifndef MINI_H -#define MINI_H +#pragma once #include "ergodash.h" @@ -16,41 +15,37 @@ #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) -#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 \ - ) \ - { \ - { 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 }, \ - { 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 }, \ - } +# 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 \ +) { \ + { 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 }, \ + { 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 } \ +} #else // Keymap with right side flipped // (TRRS jack on both halves are to the right) -#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 \ - ) \ - { \ - { 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 }, \ - { R00, R01, R02, R03, R04, R05, R06 }, \ - { R10, R11, R12, R13, R14, R15, R16 }, \ - { R20, R21, R22, R23, R24, R25, R26 }, \ - { R30, R31, R32, R33, R34, R35, R36 }, \ - } -#endif - +# 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 \ +) { \ + { 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 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25, R26 }, \ + { R30, R31, R32, R33, R34, R35, R36 } \ +} #endif diff --git a/keyboards/ergodash/rev1/rev1.h b/keyboards/ergodash/rev1/rev1.h index eaabf7cc5f..7f094534cc 100644 --- a/keyboards/ergodash/rev1/rev1.h +++ b/keyboards/ergodash/rev1/rev1.h @@ -1,5 +1,4 @@ -#ifndef REV1_H -#define REV1_H +#pragma once #include "ergodash.h" @@ -13,135 +12,128 @@ #endif #endif +#define XXX KC_NO + #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) -#define LAYOUT_4key( \ +# define LAYOUT_4key( \ 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 \ - ) \ - { \ - { 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 }, \ - { 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 } \ - } + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ +) { \ + { 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 }, \ + { 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 } \ +} // Just defined for configurator support, the matrix is identical to LAYOUT_4key -#define LAYOUT_4key_2u_inner( \ +# define LAYOUT_4key_2u_inner( \ 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 \ - ) \ - { \ - { 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 }, \ - { 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 } \ - } + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ +) { \ + { 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 }, \ + { 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 } \ +} -#define LAYOUT_3key_2us( \ +# define LAYOUT_3key_2us( \ 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, R31, R32, R33, R34, R35, R36, \ - L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ - ) \ - { \ - { 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, KC_NO }, \ - { L40, L41, L42, L43, L44, L45, L46 }, \ - { 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, KC_NO }, \ - { R46, R45, R44, R43, R42, R41, R40 } \ - } - + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ +) { \ + { 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, XXX }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { 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, XXX }, \ + { R46, R45, R44, R43, R42, R41, R40 } \ +} -#define LAYOUT_3key_1us( \ +# define LAYOUT_3key_1us( \ 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, R41, R42, R43, R44, R45, R46 \ - ) \ - { \ - { 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, KC_NO }, \ - { 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, KC_NO } \ - } + L40, L41, L42, L43, L44, L45, R41, R42, R43, R44, R45, R46 \ +) { \ + { 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, XXX }, \ + { 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, XXX } \ +} -#define LAYOUT_2key( \ +# define LAYOUT_2key( \ 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, R31, R32, R33, R34, R35, R36, \ - L40, L41, L42, L43, L44, L45, R41, R42, R43, R44, R45, R46 \ - ) \ - { \ - { 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, KC_NO }, \ - { L40, L41, L42, L43, L44, L45, KC_NO }, \ - { 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, KC_NO }, \ - { R46, R45, R44, R43, R42, R41, KC_NO } \ - } + L40, L41, L42, L43, L44, L45, R41, R42, R43, R44, R45, R46 \ +) { \ + { 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, XXX }, \ + { L40, L41, L42, L43, L44, L45, XXX }, \ + { 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, XXX }, \ + { R46, R45, R44, R43, R42, R41, XXX } \ +} #define LAYOUT LAYOUT_4key #else // Keymap with right side flipped // (TRRS jack on both halves are to the right) -#define LAYOUT( \ +# 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 \ - ) \ - { \ - { 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 }, \ - { R00, R01, R02, R03, R04, R05, R06 }, \ - { R10, R11, R12, R13, R14, R15, R16 }, \ - { R20, R21, R22, R23, R24, R25, R26 }, \ - { R30, R31, R32, R33, R34, R35, R36 }, \ - { R40, R41, R42, R43, R44, R45, R46 } \ - } -#endif - + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ +) { \ + { 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 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25, R26 }, \ + { R30, R31, R32, R33, R34, R35, R36 }, \ + { R40, R41, R42, R43, R44, R45, R46 } \ +} #endif diff --git a/keyboards/ergodox_infinity/board_is31fl3731c.h b/keyboards/ergodox_infinity/board_is31fl3731c.h deleted file mode 100644 index b2ed2b0031..0000000000 --- a/keyboards/ergodox_infinity/board_is31fl3731c.h +++ /dev/null @@ -1,110 +0,0 @@ -/* -Copyright 2016 Fred Sundvik <fsundvik@gmail.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/>. -*/ - -#ifndef _GDISP_LLD_BOARD_H -#define _GDISP_LLD_BOARD_H - -static const I2CConfig i2ccfg = { - 400000 // clock speed (Hz); 400kHz max for IS31 -}; - -static const uint8_t led_mask[] = { - 0xFF, 0x00, /* C1-1 -> C1-16 */ - 0xFF, 0x00, /* C2-1 -> C2-16 */ - 0xFF, 0x00, /* C3-1 -> C3-16 */ - 0xFF, 0x00, /* C4-1 -> C4-16 */ - 0x3F, 0x00, /* C5-1 -> C5-16 */ - 0x00, 0x00, /* C6-1 -> C6-16 */ - 0x00, 0x00, /* C7-1 -> C7-16 */ - 0x00, 0x00, /* C8-1 -> C8-16 */ - 0x00, 0x00, /* C9-1 -> C9-16 */ -}; - -// The address of the LED -#define LA(c, r) (c + r * 16 ) -// Need to be an address that is not mapped, but inside the range of the controller matrix -#define NA LA(8, 8) - -// The numbers in the comments are the led numbers DXX on the PCB -// The mapping is taken from the schematic of left hand side -static const uint8_t led_mapping[GDISP_SCREEN_HEIGHT][GDISP_SCREEN_WIDTH] = { -// 45 44 43 42 41 40 39 - { LA(1, 1), LA(1, 0), LA(0, 4), LA(0, 3), LA(0, 2), LA(0, 1), LA(0, 0)}, -// 52 51 50 49 48 47 46 - { LA(2, 3), LA(2, 2), LA(2, 1), LA(2, 0), LA(1, 4), LA(1, 3), LA(1, 2) }, -// 58 57 56 55 54 53 N/A - { LA(3, 4), LA(3, 3), LA(3, 2), LA(3, 1), LA(3, 0), LA(2, 4), NA }, -// 67 66 65 64 63 62 61 - { LA(5, 3), LA(5, 2), LA(5, 1), LA(5, 0), LA(4, 4), LA(4, 3), LA(4, 2) }, -// 76 75 74 73 72 60 59 - { LA(7, 3), LA(7, 2), LA(7, 1), LA(7, 0), LA(6, 3), LA(4, 1), LA(4, 0) }, -// N/A N/A N/A N/A N/A N/A 68 - { NA, NA, NA, NA, NA, NA, LA(5, 4) }, -// N/A N/A N/A N/A 71 70 69 - { NA, NA, NA, NA, LA(6, 2), LA(6, 1), LA(6, 0) }, -}; - - -#define IS31_ADDR_DEFAULT 0x74 // AD connected to GND -#define IS31_TIMEOUT 5000 - -static GFXINLINE void init_board(GDisplay *g) { - (void) g; - /* I2C pins */ - palSetPadMode(GPIOB, 0, PAL_MODE_ALTERNATIVE_2); // PTB0/I2C0/SCL - palSetPadMode(GPIOB, 1, PAL_MODE_ALTERNATIVE_2); // PTB1/I2C0/SDA - palSetPadMode(GPIOB, 16, PAL_MODE_OUTPUT_PUSHPULL); - palClearPad(GPIOB, 16); - /* start I2C */ - i2cStart(&I2CD1, &i2ccfg); - // try high drive (from kiibohd) - I2CD1.i2c->C2 |= I2Cx_C2_HDRS; - // try glitch fixing (from kiibohd) - I2CD1.i2c->FLT = 4; -} - -static GFXINLINE void post_init_board(GDisplay *g) { - (void) g; -} - -static GFXINLINE const uint8_t* get_led_mask(GDisplay* g) { - (void) g; - return led_mask; -} - -static GFXINLINE uint8_t get_led_address(GDisplay* g, uint16_t x, uint16_t y) -{ - (void) g; - return led_mapping[y][x]; -} - -static GFXINLINE void set_hardware_shutdown(GDisplay* g, bool shutdown) { - (void) g; - if(!shutdown) { - palSetPad(GPIOB, 16); - } - else { - palClearPad(GPIOB, 16); - } -} - -static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) { - (void) g; - i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, data, length, 0, 0, TIME_US2I(IS31_TIMEOUT)); -} - -#endif /* _GDISP_LLD_BOARD_H */ diff --git a/keyboards/ergodox_infinity/board_st7565.h b/keyboards/ergodox_infinity/board_st7565.h deleted file mode 100644 index 875ed9e65c..0000000000 --- a/keyboards/ergodox_infinity/board_st7565.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * This file is subject to the terms of the GFX License. If a copy of - * the license was not distributed with this file, you can obtain one at: - * - * http://ugfx.org/license.html - */ - -#ifndef _GDISP_LLD_BOARD_H -#define _GDISP_LLD_BOARD_H - -#include "quantum.h" - -#define ST7565_LCD_BIAS ST7565_LCD_BIAS_7 -#define ST7565_COM_SCAN ST7565_COM_SCAN_DEC -#define ST7565_PAGE_ORDER 0, 1, 2, 3 -/* - * Custom page order for several LCD boards, e.g. HEM12864-99 - * #define ST7565_PAGE_ORDER 4,5,6,7,0,1,2,3 - */ - -#define ST7565_A0_PIN C7 -#define ST7565_RST_PIN C8 -#define ST7565_MOSI_PIN C6 -#define ST7565_SCLK_PIN C5 -#define ST7565_SS_PIN C4 - -// DSPI Clock and Transfer Attributes -// Frame Size: 8 bits -// MSB First -// CLK Low by default -static const SPIConfig spi1config = { - // Operation complete callback or @p NULL. - .end_cb = NULL, - // The chip select line port - when not using pcs. - .ssport = PAL_PORT(ST7565_SS_PIN), - // brief The chip select line pad number - when not using pcs. - .sspad = PAL_PAD(ST7565_SS_PIN), - // SPI initialization data. - .tar0 = SPIx_CTARn_FMSZ(7) // Frame size = 8 bytes - | SPIx_CTARn_ASC(1) // After SCK Delay Scaler (min 50 ns) = 55.56ns - | SPIx_CTARn_DT(0) // Delay After Transfer Scaler (no minimum)= 27.78ns - | SPIx_CTARn_CSSCK(0) // PCS to SCK Delay Scaler (min 20 ns) = 27.78ns - | SPIx_CTARn_PBR(0) // Baud Rate Prescaler = 2 - | SPIx_CTARn_BR(0) // Baud rate (min 50ns) = 55.56ns -}; - -static GFXINLINE void acquire_bus(GDisplay *g) { - (void)g; - // Only the LCD is using the SPI bus, so no need to acquire - // spiAcquireBus(&SPID1); - spiSelect(&SPID1); -} - -static GFXINLINE void release_bus(GDisplay *g) { - (void)g; - // Only the LCD is using the SPI bus, so no need to release - // spiReleaseBus(&SPID1); - spiUnselect(&SPID1); -} - -static GFXINLINE void init_board(GDisplay *g) { - (void)g; - setPinOutput(ST7565_A0_PIN); - writePinHigh(ST7565_A0_PIN); - setPinOutput(ST7565_RST_PIN); - writePinHigh(ST7565_RST_PIN); - setPinOutput(ST7565_SS_PIN); - - palSetPadMode(PAL_PORT(ST7565_MOSI_PIN), PAL_PAD(ST7565_MOSI_PIN), PAL_MODE_ALTERNATIVE_2); - palSetPadMode(PAL_PORT(ST7565_SCLK_PIN), PAL_PAD(ST7565_SCLK_PIN), PAL_MODE_ALTERNATIVE_2); - - spiInit(); - spiStart(&SPID1, &spi1config); - release_bus(g); -} - -static GFXINLINE void post_init_board(GDisplay *g) { (void)g; } - -static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) { - (void)g; - writePin(ST7565_RST_PIN, !state); -} - -static GFXINLINE void write_cmd(GDisplay *g, gU8 cmd) { - (void)g; - writePinLow(ST7565_A0_PIN); - spiSend(&SPID1, 1, &cmd); -} - -static GFXINLINE void write_data(GDisplay *g, gU8 *data, gU16 length) { - (void)g; - writePinHigh(ST7565_A0_PIN); - spiSend(&SPID1, length, data); -} - -#endif /* _GDISP_LLD_BOARD_H */ diff --git a/keyboards/ergodox_infinity/config.h b/keyboards/ergodox_infinity/config.h index 4bee8c3d93..5dcc707a5d 100644 --- a/keyboards/ergodox_infinity/config.h +++ b/keyboards/ergodox_infinity/config.h @@ -15,9 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef INFINITY_ERGODOX_CONFIG_H -#define INFINITY_ERGODOX_CONFIG_H - +#pragma once /* USB Device descriptor parameter */ #define VENDOR_ID 0x1c11 @@ -85,9 +83,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 I2C1_SCL_PIN B0 +#define I2C1_SDA_PIN B1 #ifdef ST7565_ENABLE /* LCD driver */ @@ -115,8 +112,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 -#define VISUALIZER_USER_DATA_SIZE 16 - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -134,5 +129,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/ergodox_infinity/ergodox_infinity.c b/keyboards/ergodox_infinity/ergodox_infinity.c index 8f5b068a72..88028d3638 100644 --- a/keyboards/ergodox_infinity/ergodox_infinity.c +++ b/keyboards/ergodox_infinity/ergodox_infinity.c @@ -3,10 +3,6 @@ #include <hal.h> #include <string.h> #include "eeconfig.h" -#include "serial_link/system/serial_link.h" -#ifdef VISUALIZER_ENABLE -# include "lcd_backlight.h" -#endif #define RED_PIN 1 #define GREEN_PIN 2 @@ -87,11 +83,7 @@ static uint16_t cie_lightness(uint16_t v) { return y * 65535.0f; } -#ifdef VISUALIZER_ENABLE -void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b) { -#else void ergodox_infinity_lcd_color(uint16_t r, uint16_t g, uint16_t b) { -#endif CHANNEL_RED.CnV = cie_lightness(r); CHANNEL_GREEN.CnV = cie_lightness(g); CHANNEL_BLUE.CnV = cie_lightness(b); @@ -108,12 +100,10 @@ void keyboard_pre_init_kb() { setPinOutput(B16); writePinHigh(B16); #endif -#ifndef VISUALIZER_ENABLE // The backlight always has to be initialized, otherwise it will stay lit lcd_backlight_hal_init(); -# ifdef ST7565_ENABLE +#ifdef ST7565_ENABLE ergodox_infinity_lcd_color(UINT16_MAX / 2, UINT16_MAX / 2, UINT16_MAX / 2); -# endif #endif keyboard_pre_init_user(); } diff --git a/keyboards/ergodox_infinity/ergodox_infinity.h b/keyboards/ergodox_infinity/ergodox_infinity.h index 81ac1f338a..b9636b69be 100644 --- a/keyboards/ergodox_infinity/ergodox_infinity.h +++ b/keyboards/ergodox_infinity/ergodox_infinity.h @@ -1,5 +1,4 @@ -#ifndef KEYBOARDS_ERGODOX_INFINITY_INFINITY_H_ -#define KEYBOARDS_ERGODOX_INFINITY_INFINITY_H_ +#pragma once #include "quantum.h" @@ -80,85 +79,75 @@ inline void ergodox_led_all_set(uint8_t n) { ergodox_right_led_3_set(n); } -#ifndef VISUALIZER_ENABLE void ergodox_infinity_lcd_color(uint16_t r, uint16_t g, uint16_t b); -#endif -/* - * LEFT HAND: LINES 88-95 - * RIGHT HAND: LINES 97-104 - */ +#define XXX KC_NO + #define LAYOUT_ergodox( \ - A80, A70, A60, A50, A40, A30, A20, \ - A81, A71, A61, A51, A41, A31, A21, \ - A82, A72, A62, A52, A42, A32, \ - A83, A73, A63, A53, A43, A33, A23, \ - A84, A74, A64, A54, A44, \ + A80, A70, A60, A50, A40, A30, A20, \ + A81, A71, A61, A51, A41, A31, A21, \ + A82, A72, A62, A52, A42, A32, \ + A83, A73, A63, A53, A43, A33, A23, \ + A84, A74, A64, A54, A44, \ A13, A03, \ A04, \ A34, A24, A14, \ - \ +\ B20, B30, B40, B50, B60, B70, B80, \ B21, B31, B41, B51, B61, B71, B81, \ B32, B42, B52, B62, B72, B82, \ B23, B33, B43, B53, B63, B73, B83, \ B44, B54, B64, B74, B84, \ - B03, B13, \ - B04, \ + B03, B13, \ + B04, \ B14, B24, B34 \ ) { \ - { KC_NO, KC_NO, KC_NO, A03, A04 }, \ - { KC_NO, KC_NO, KC_NO, A13, A14 }, \ - { A20, A21, KC_NO, A23, A24 }, \ - { A30, A31, A32, A33, A34 }, \ - { A40, A41, A42, A43, A44 }, \ - { A50, A51, A52, A53, A54 }, \ - { A60, A61, A62, A63, A64 }, \ - { A70, A71, A72, A73, A74 }, \ - { A80, A81, A82, A83, A84 }, \ - { KC_NO, KC_NO, KC_NO, B03, B04 }, \ - { KC_NO, KC_NO, KC_NO, B13, B14 }, \ - { B20, B21, KC_NO, B23, B24 }, \ - { B30, B31, B32, B33, B34 }, \ - { B40, B41, B42, B43, B44 }, \ - { B50, B51, B52, B53, B54 }, \ - { B60, B61, B62, B63, B64 }, \ - { B70, B71, B72, B73, B74 }, \ - { B80, B81, B82, B83, B84 } \ + { XXX, XXX, XXX, A03, A04 }, \ + { XXX, XXX, XXX, A13, A14 }, \ + { A20, A21, XXX, A23, A24 }, \ + { A30, A31, A32, A33, A34 }, \ + { A40, A41, A42, A43, A44 }, \ + { A50, A51, A52, A53, A54 }, \ + { A60, A61, A62, A63, A64 }, \ + { A70, A71, A72, A73, A74 }, \ + { A80, A81, A82, A83, A84 }, \ + { XXX, XXX, XXX, B03, B04 }, \ + { XXX, XXX, XXX, B13, B14 }, \ + { B20, B21, XXX, B23, B24 }, \ + { B30, B31, B32, B33, B34 }, \ + { B40, B41, B42, B43, B44 }, \ + { B50, B51, B52, B53, B54 }, \ + { B60, B61, B62, B63, B64 }, \ + { B70, B71, B72, B73, B74 }, \ + { B80, B81, B82, B83, B84 } \ } -/* -------------- LEFT HAND -------------- -------------- RIGHT HAND -------------- */ -#define LAYOUT_ergodox_pretty( \ - \ - A80, A70, A60, A50, A40, A30, A20, B20, B30, B40, B50, B60, B70, B80, \ - A81, A71, A61, A51, A41, A31, A21, B21, B31, B41, B51, B61, B71, B81, \ - A82, A72, A62, A52, A42, A32, B32, B42, B52, B62, B72, B82, \ - A83, A73, A63, A53, A43, A33, A23, B23, B33, B43, B53, B63, B73, B83, \ - A84, A74, A64, A54, A44, B44, B54, B64, B74, B84, \ - A13, A03, B03, B13, \ - A04, B04, \ - A34, A24, A14, B14, B24, B34 ) \ - \ - /* matrix positions */ \ - { \ - { KC_NO, KC_NO, KC_NO, A03, A04 }, \ - { KC_NO, KC_NO, KC_NO, A13, A14 }, \ - { A20, A21, KC_NO, A23, A24 }, \ - { A30, A31, A32, A33, A34 }, \ - { A40, A41, A42, A43, A44 }, \ - { A50, A51, A52, A53, A54 }, \ - { A60, A61, A62, A63, A64 }, \ - { A70, A71, A72, A73, A74 }, \ - { A80, A81, A82, A83, A84 }, \ - { KC_NO, KC_NO, KC_NO, B03, B04 }, \ - { KC_NO, KC_NO, KC_NO, B13, B14 }, \ - { B20, B21, KC_NO, B23, B24 }, \ - { B30, B31, B32, B33, B34 }, \ - { B40, B41, B42, B43, B44 }, \ - { B50, B51, B52, B53, B54 }, \ - { B60, B61, B62, B63, B64 }, \ - { B70, B71, B72, B73, B74 }, \ - { B80, B81, B82, B83, B84 } \ +#define LAYOUT_ergodox_pretty( \ + A80, A70, A60, A50, A40, A30, A20, B20, B30, B40, B50, B60, B70, B80, \ + A81, A71, A61, A51, A41, A31, A21, B21, B31, B41, B51, B61, B71, B81, \ + A82, A72, A62, A52, A42, A32, B32, B42, B52, B62, B72, B82, \ + A83, A73, A63, A53, A43, A33, A23, B23, B33, B43, B53, B63, B73, B83, \ + A84, A74, A64, A54, A44, B44, B54, B64, B74, B84, \ + A13, A03, B03, B13, \ + A04, B04, \ + A34, A24, A14, B14, B24, B34 \ +) { \ + { XXX, XXX, XXX, A03, A04 }, \ + { XXX, XXX, XXX, A13, A14 }, \ + { A20, A21, XXX, A23, A24 }, \ + { A30, A31, A32, A33, A34 }, \ + { A40, A41, A42, A43, A44 }, \ + { A50, A51, A52, A53, A54 }, \ + { A60, A61, A62, A63, A64 }, \ + { A70, A71, A72, A73, A74 }, \ + { A80, A81, A82, A83, A84 }, \ + { XXX, XXX, XXX, B03, B04 }, \ + { XXX, XXX, XXX, B13, B14 }, \ + { B20, B21, XXX, B23, B24 }, \ + { B30, B31, B32, B33, B34 }, \ + { B40, B41, B42, B43, B44 }, \ + { B50, B51, B52, B53, B54 }, \ + { B60, B61, B62, B63, B64 }, \ + { B70, B71, B72, B73, B74 }, \ + { B80, B81, B82, B83, B84 } \ } - -#endif /* KEYBOARDS_ERGODOX_INFINITY_INFINITY_H_ */ diff --git a/keyboards/ergodox_infinity/gfxconf.h b/keyboards/ergodox_infinity/gfxconf.h deleted file mode 100644 index ca338399d3..0000000000 --- a/keyboards/ergodox_infinity/gfxconf.h +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This file has a different license to the rest of the uGFX system. - * You can copy, modify and distribute this file as you see fit. - * You do not need to publish your source modifications to this file. - * The only thing you are not permitted to do is to relicense it - * under a different license. - */ - -/** - * Copy this file into your project directory and rename it as gfxconf.h - * Edit your copy to turn on the uGFX features you want to use. - * The values below are the defaults. - * - * Only remove the comments from lines where you want to change the - * default value. This allows definitions to be included from - * driver makefiles when required and provides the best future - * compatibility for your project. - * - * Please use spaces instead of tabs in this file. - */ - -#ifndef _GFXCONF_H -#define _GFXCONF_H - -#include "common_gfxconf.h" - -#endif /* _GFXCONF_H */ diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/config.h b/keyboards/ergodox_infinity/keymaps/dudeofawesome/config.h index 161958233e..9dcf8a7f43 100644 --- a/keyboards/ergodox_infinity/keymaps/dudeofawesome/config.h +++ b/keyboards/ergodox_infinity/keymaps/dudeofawesome/config.h @@ -6,6 +6,4 @@ #include "../../config.h" #include "dudeofawesome.h" -#include "./visualizer.h" - #endif diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c b/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c index c3ea48654d..675b56edec 100644 --- a/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c @@ -471,8 +471,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void matrix_init_user() { - backlight_enable(); - backlight_level(BACKLIGHT_LEVELS); + led_matrix_enable_noeeprom(); + led_matrix_set_val_noeeprom(UINT8_MAX); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/simple_visualizer.h b/keyboards/ergodox_infinity/keymaps/dudeofawesome/simple_visualizer.h deleted file mode 100644 index 9213e99f42..0000000000 --- a/keyboards/ergodox_infinity/keymaps/dudeofawesome/simple_visualizer.h +++ /dev/null @@ -1,123 +0,0 @@ -/* Copyright 2017 Fred Sundvik - * - * 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/>. - */ - -#ifndef KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ -#define KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ - -// Currently we are assuming that both the backlight and LCD are enabled -// But it's entirely possible to write a custom visualizer that use only -// one of them -#ifndef LCD_BACKLIGHT_ENABLE -#error This visualizer needs that LCD backlight is enabled -#endif - -#ifndef LCD_ENABLE -#error This visualizer needs that LCD is enabled -#endif - -#include "visualizer.h" -#include "visualizer_keyframes.h" -#include "lcd_keyframes.h" -#include "lcd_backlight_keyframes.h" -#include "system/serial_link.h" -#include "led.h" -#include "default_animations.h" - -static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF); -static const uint32_t initial_color = LCD_COLOR(0, 0, 0); - -static bool initial_update = true; - -// Feel free to modify the animations below, or even add new ones if needed - -static keyframe_animation_t lcd_layer_display = { - .num_frames = 1, - .loop = false, - .frame_lengths = {gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_keyframe_display_layer_and_led_states} -}; - -// The color animation animates the LCD color when you change layers -static keyframe_animation_t color_animation = { - .num_frames = 2, - .loop = false, - // Note that there's a 200 ms no-operation frame, - // this prevents the color from changing when activating the layer - // momentarily - .frame_lengths = {gfxMillisecondsToTicks(1), gfxMillisecondsToTicks(5)}, - .frame_functions = {keyframe_no_operation, lcd_backlight_keyframe_animate_color}, -}; - -void initialize_user_visualizer(visualizer_state_t* state) { - // The brightness will be dynamically adjustable in the future - // But for now, change it here. - lcd_backlight_brightness(130); - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - initial_update = true; - start_keyframe_animation(&default_startup_animation); -} - - -// This function should be implemented by the keymap visualizer -// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing -// that the simple_visualizer assumes that you are updating -// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is -// stopped. This can be done by either double buffering it or by using constant strings -static void get_visualizer_layer_and_color(visualizer_state_t* state); - -void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - // Add more tests, change the colors and layer texts here - // Usually you want to check the high bits (higher layers first) - // because that's the order layers are processed for keypresses - // You can for check for example: - // state->status.layer - // state->status.default_layer - // state->status.leds (see led.h for available statuses) - - uint32_t prev_color = state->target_lcd_color; - const char* prev_layer_text = state->layer_text; - - get_visualizer_layer_and_color(state); - - if (initial_update || prev_color != state->target_lcd_color) { - start_keyframe_animation(&color_animation); - } - - if (initial_update || prev_layer_text != state->layer_text) { - start_keyframe_animation(&lcd_layer_display); - } - // You can also stop existing animations, and start your custom ones here - // remember that you should normally have only one animation for the LCD - // and one for the background. But you can also combine them if you want. -} - -void user_visualizer_suspend(visualizer_state_t* state) { - state->layer_text = "Suspending..."; - uint8_t hue = LCD_HUE(state->current_lcd_color); - uint8_t sat = LCD_SAT(state->current_lcd_color); - state->target_lcd_color = LCD_COLOR(hue, sat, 0); - start_keyframe_animation(&default_suspend_animation); -} - -void user_visualizer_resume(visualizer_state_t* state) { - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - initial_update = true; - start_keyframe_animation(&default_startup_animation); -} - -#endif /* KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ */ diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c b/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c deleted file mode 100644 index 54fc2363c7..0000000000 --- a/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c +++ /dev/null @@ -1,79 +0,0 @@ -/* -Copyright 2017 Fred Sundvik - -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 "./simple_visualizer.h" -#include "util.h" -#include "layers.h" - -// This function should be implemented by the keymap visualizer -// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing -// that the simple_visualizer assumes that you are updating -// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is -// stopped. This can be done by either double buffering it or by using constant strings -static void get_visualizer_layer_and_color(visualizer_state_t* state) { - switch(biton32(default_layer_state)) { - case _QWERTY: - state->layer_text = "QWERTY"; - state->target_lcd_color = LCD_COLOR(0, 255, 128); - break; - case _WORKMAN: - state->layer_text = "Workman"; - state->target_lcd_color = LCD_COLOR(80, 255, 128); - break; - case _DVORAK: - state->layer_text = "Dvorak"; - state->target_lcd_color = LCD_COLOR(194, 255, 128); - break; - case _COLEMAK: - state->layer_text = "Colemak"; - state->target_lcd_color = LCD_COLOR(18, 255, 128); - break; - } - - switch(biton32(state->status.layer)) { - case _LOWER: - state->layer_text = "Lower"; - state->target_lcd_color = LCD_COLOR(141, 255, 255); - break; - case _RAISE: - state->layer_text = "Raise"; - state->target_lcd_color = LCD_COLOR(18, 255, 255); - break; - case _ADJUST: - state->layer_text = "Adjust"; - state->target_lcd_color = LCD_COLOR(194, 255, 255); - break; - case _NUM: - state->layer_text = "Numpad"; - state->target_lcd_color = LCD_COLOR(80, 255, 255); - break; - case _MOUSE: - state->layer_text = "Mouse"; - state->target_lcd_color = LCD_COLOR(300, 255, 255); - break; - case _GAME: - state->layer_text = "Game"; - state->target_lcd_color = LCD_COLOR(300, 255, 255); - break; - case _QWERTY: case _WORKMAN: case _DVORAK: case _COLEMAK: - break; - default: - state->layer_text = "NONE"; - state->target_lcd_color = LCD_COLOR(0, 255, 255); - break; - } -} diff --git a/keyboards/ergodox_infinity/keymaps/halfkeyboard/visualizer.c b/keyboards/ergodox_infinity/keymaps/halfkeyboard/visualizer.c deleted file mode 100644 index 61a724c63f..0000000000 --- a/keyboards/ergodox_infinity/keymaps/halfkeyboard/visualizer.c +++ /dev/null @@ -1,384 +0,0 @@ -/* -Copyright 2017 Fred Sundvik -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 "visualizer.h" -#include "gfx.h" -#include "math.h" -#include "default_animations.h" -#include "led_backlight_keyframes.h" - -#define NUM_ROWS LED_HEIGHT -#define NUM_COLS LED_WIDTH - -#define ONESIDESCAN 10 -#define BOTHSIDESCAN 20 -#define FULL_ON LUMA2COLOR(255) -#define THREE_QUARTER LUMA2COLOR(200) -#define HALF_ON LUMA2COLOR(150) -#define ONE_QUARTER LUMA2COLOR(50) - -#define CROSSFADE_TIME 500 -#define GRADIENT_TIME 3000 -bool led_backlight_keyframe_one_period_sweep(keyframe_animation_t* animation, visualizer_state_t* state); -bool led_backlight_keyframe_half_period_sweep_to_on(keyframe_animation_t* animation, visualizer_state_t* state); -bool led_backlight_keyframe_half_period_sweep_to_off(keyframe_animation_t* animation, visualizer_state_t* state); -keyframe_animation_t Fade_in_all_leds = { - .num_frames = 1, - .loop = false, - .frame_lengths = { - CROSSFADE_TIME, - }, - .frame_functions = { - led_backlight_keyframe_fade_in_all, - }, -}; -keyframe_animation_t decreasing_gradient = { - .num_frames = 8, - .loop = true, - .frame_lengths = { - gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) - 0, // mirror leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) - 0, // normal leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) - 0, // mirror leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) - 0, // normal leds - }, - .frame_functions = { - led_backlight_keyframe_one_period_sweep, - led_backlight_keyframe_mirror_orientation, - keyframe_no_operation, - keyframe_no_operation, - keyframe_no_operation, - keyframe_no_operation, - led_backlight_keyframe_one_period_sweep, - led_backlight_keyframe_normal_orientation, - - }, -}; - - - -static uint8_t off_on_off_gradient(float t, float index, float num) { - const float two_pi = M_PI * 2.0f; - float normalized_index = (1.0f - index / (num - 1.0f)) * two_pi; - float x = t * two_pi + normalized_index-M_PI; - if((1*M_PI) < x && x < (3*M_PI)) - { - float v = 0.5 * (cosf(x) + 1.0f); - return (uint8_t)(255.0f * v); - } - else - { - return 0; - } -} -static uint8_t off_on_gradient(float t, float index, float num) { - const float two_pi = M_PI * 2.0f; - float normalized_index = (1.0f - index / (num - 1.0f)) * two_pi; - float x = t * two_pi + normalized_index-M_PI; - float v; - if((1*M_PI) < x && x < (2*M_PI)) - { - v = 0.5 * (cosf(x) + 1.0f); - } - else if(x >= (2*M_PI)) - { - v = 1; - } - else - { - v = 0; - } - return (uint8_t)(255.0f * v); -} -static uint8_t on_off_gradient(float t, float index, float num) { - const float two_pi = M_PI * 2.0f; - float normalized_index = (1.0f - index / (num - 1.0f)) * two_pi; - float x = t * two_pi + normalized_index-M_PI; - float v; - if((2*M_PI) < x && x < (3*M_PI)) - { - v = 0.5 * (cosf(x) + 1.0f); - - } - else if(x >= (3*M_PI)) - { - v = 0; - } - else - { - v = 1; - } - return (uint8_t)(255.0f * v); -} - -bool led_backlight_keyframe_one_period_sweep(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - float frame_length = animation->frame_lengths[animation->current_frame]; - float current_pos = frame_length - animation->time_left_in_frame; - float t = current_pos / frame_length; - for (int i=0; i< NUM_COLS; i++) { - uint8_t color = off_on_off_gradient(t*2, i, NUM_COLS); - gdispGDrawLine(LED_DISPLAY, i, 0, i, NUM_ROWS - 1, LUMA2COLOR(color)); - } - return true; -} - -bool led_backlight_keyframe_half_period_sweep_to_on(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - float frame_length = animation->frame_lengths[animation->current_frame]; - float current_pos = frame_length - animation->time_left_in_frame; - float t = current_pos / frame_length; - for (int i=0; i< NUM_COLS; i++) { - uint8_t color = off_on_gradient(t*2, i, NUM_COLS); - gdispGDrawLine(LED_DISPLAY, i, 0, i, NUM_ROWS - 1, LUMA2COLOR(color)); - } - return true; -} -bool led_backlight_keyframe_half_period_sweep_to_off(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - float frame_length = animation->frame_lengths[animation->current_frame]; - float current_pos = frame_length - animation->time_left_in_frame; - float t = current_pos / frame_length; - for (int i=0; i< NUM_COLS; i++) { - uint8_t color = on_off_gradient(t*2, i, NUM_COLS); - gdispGDrawLine(LED_DISPLAY, i, 0, i, NUM_ROWS - 1, LUMA2COLOR(color)); - } - return true; -} - - -/* - +---+---+---+---+---+---+---+---+---+---+---+---+---+---+-------+ -| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | phase | -+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-------+ -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | -| 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | -| 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | -| 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | -| 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | -| 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | -| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | -| 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | -| 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 9 | -| 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 10 | -| 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 11 | -| 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 12 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 13 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 14 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 15 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 16 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 17 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 18 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 19 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | -+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-------+ -*/ - -#ifdef MASTER_IS_ON_RIGHT /*right side*/ -keyframe_animation_t sweep_on_sweep_off_left_and_right = { - .num_frames = 12, - .loop = true, - .frame_lengths = { - 0, - 1, - gfxMillisecondsToTicks(GRADIENT_TIME), // left on - gfxMillisecondsToTicks(GRADIENT_TIME), // right on - gfxMillisecondsToTicks(GRADIENT_TIME), // left off - gfxMillisecondsToTicks(GRADIENT_TIME), // right off - 0, // mirror leds - gfxMillisecondsToTicks(GRADIENT_TIME), // right on - gfxMillisecondsToTicks(GRADIENT_TIME), // left on - gfxMillisecondsToTicks(GRADIENT_TIME), // right off - gfxMillisecondsToTicks(GRADIENT_TIME), // left off - 0, // normal leds - }, - .frame_functions = { - led_backlight_keyframe_mirror_orientation, - led_backlight_keyframe_fade_out_all, - keyframe_no_operation, - led_backlight_keyframe_half_period_sweep_to_on, - keyframe_no_operation, - led_backlight_keyframe_half_period_sweep_to_off, - led_backlight_keyframe_normal_orientation, - led_backlight_keyframe_half_period_sweep_to_on, - keyframe_no_operation, - led_backlight_keyframe_half_period_sweep_to_off, - keyframe_no_operation, - led_backlight_keyframe_mirror_orientation, - - }, -}; -keyframe_animation_t both_sides_fade_across = { - .num_frames = 10, - .loop = true, - .frame_lengths = { - 0, - 1, - gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) - 0, // mirror leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) - 0, // normal leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) - 0, // mirror leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) - 0, // normal leds - }, - .frame_functions = { - led_backlight_keyframe_mirror_orientation, - led_backlight_keyframe_fade_out_all, - keyframe_no_operation, - keyframe_no_operation, - led_backlight_keyframe_one_period_sweep, - led_backlight_keyframe_normal_orientation, - led_backlight_keyframe_one_period_sweep, - led_backlight_keyframe_mirror_orientation, - keyframe_no_operation, - keyframe_no_operation, - }, -}; - -#else /*left side*/ -keyframe_animation_t sweep_on_sweep_off_left_and_right = { - .num_frames = 10, - .loop = true, - .frame_lengths = { - gfxMillisecondsToTicks(GRADIENT_TIME), // left on - gfxMillisecondsToTicks(GRADIENT_TIME), // right on - gfxMillisecondsToTicks(GRADIENT_TIME), // left off - gfxMillisecondsToTicks(GRADIENT_TIME), // right off - 0, // mirror leds - gfxMillisecondsToTicks(GRADIENT_TIME), // right on - gfxMillisecondsToTicks(GRADIENT_TIME), // left on - gfxMillisecondsToTicks(GRADIENT_TIME), // right off - gfxMillisecondsToTicks(GRADIENT_TIME), // left off - 0, // normal leds - }, - .frame_functions = { - led_backlight_keyframe_half_period_sweep_to_on, - keyframe_no_operation, - led_backlight_keyframe_half_period_sweep_to_off, - keyframe_no_operation, - led_backlight_keyframe_mirror_orientation, - keyframe_no_operation, - led_backlight_keyframe_half_period_sweep_to_on, - keyframe_no_operation, - led_backlight_keyframe_half_period_sweep_to_off, - led_backlight_keyframe_normal_orientation, - - }, -}; -keyframe_animation_t both_sides_fade_across = { - .num_frames = 8, - .loop = true, - .frame_lengths = { - gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) - 0, // mirror leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) - 0, // normal leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) - 0, // mirror leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) - 0, // normal leds - }, - .frame_functions = { - led_backlight_keyframe_one_period_sweep, - led_backlight_keyframe_mirror_orientation, - keyframe_no_operation, - keyframe_no_operation, - keyframe_no_operation, - keyframe_no_operation, - led_backlight_keyframe_one_period_sweep, - led_backlight_keyframe_normal_orientation, - - }, -}; - - -#endif - -#define RED 0 -#define ORANGE 21 -#define YELLOW 42 -#define SPRING_GREEN 64 -#define GREEN 85 -#define TURQUOISE 107 -#define CYAN 127 -#define OCEAN 149 -#define BLUE 170 -#define VIOLET 192 -#define MAGENTA 212 -#define RASPBERRY 234 - -// This function should be implemented by the keymap visualizer -// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing -// that the simple_visualizer assumes that you are updating -// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is -// stopped. This can be done by either double buffering it or by using constant strings -static void get_visualizer_layer_and_color(visualizer_state_t* state) { - uint8_t saturation = 255; - /* if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) { - saturation = 255; - } */ - - if (state->status.layer & 0x400) { - state->target_lcd_color = LCD_COLOR(OCEAN, saturation, 0xFF); - state->layer_text = "STENOGRAPHY"; - } - else if (state->status.layer & 0x200) { - state->target_lcd_color = LCD_COLOR(GREEN, saturation, 0xFF); - state->layer_text = "FUNCTION"; - } - else if (state->status.layer & 0x100) { - state->target_lcd_color = LCD_COLOR(MAGENTA, saturation, 0xFF); - state->layer_text = "Shortcuts Layer"; - stop_keyframe_animation(&sweep_on_sweep_off_left_and_right); - start_keyframe_animation(&led_test_animation); - } - else if (state->status.layer & 0x80) { - state->target_lcd_color = LCD_COLOR(VIOLET, saturation, 0xFF); - state->layer_text = "Plover"; - } - else if (state->status.layer & 0x40) { - state->target_lcd_color = LCD_COLOR(RASPBERRY, saturation, 0xFF); - state->layer_text = "Mirrored Symbols"; - } - else if (state->status.layer & 0x20) { - state->target_lcd_color = LCD_COLOR(RED, saturation, 0xFF); - state->layer_text = "Symbols"; - } - else if (state->status.layer & 0x8) { - state->target_lcd_color = LCD_COLOR(OCEAN, saturation, 0xFF); - state->layer_text = "Mirrored Dvorak"; - } - else if (state->status.layer & 0x4) { - state->target_lcd_color = LCD_COLOR(BLUE, saturation, 0xFF); - state->layer_text = "Dvorak"; - stop_keyframe_animation(&led_test_animation); - start_keyframe_animation(&sweep_on_sweep_off_left_and_right); - } - else if (state->status.layer & 0x2) { - state->target_lcd_color = LCD_COLOR(ORANGE, saturation, 0xFF); - state->layer_text = "Mirrored Qwerty"; - } - else { - state->target_lcd_color = LCD_COLOR(YELLOW, saturation, 0xFF); - state->layer_text = "Qwerty"; - stop_keyframe_animation(&led_test_animation); - start_keyframe_animation(&Fade_in_all_leds); - } -} diff --git a/keyboards/ergodox_infinity/keymaps/halfkeyboard/visualizer.h b/keyboards/ergodox_infinity/keymaps/halfkeyboard/visualizer.h deleted file mode 100644 index c97a7a22a5..0000000000 --- a/keyboards/ergodox_infinity/keymaps/halfkeyboard/visualizer.h +++ /dev/null @@ -1,125 +0,0 @@ -/* Copyright 2017 Fred Sundvik - * - * 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/>. - */ - -#ifndef VISUALIZER_H_ -#define VISUALIZER_H_ - -// Currently we are assuming that both the backlight and LCD are enabled -// But it's entirely possible to write a custom visualizer that use only -// one of them -#ifndef LCD_BACKLIGHT_ENABLE -#error This visualizer needs that LCD backlight is enabled -#endif - -#ifndef LCD_ENABLE -#error This visualizer needs that LCD is enabled -#endif - -#include "visualizer.h" -#include "visualizer_keyframes.h" -#include "lcd_keyframes.h" -#include "lcd_backlight_keyframes.h" -#include "system/serial_link.h" -#include "led.h" -#include "default_animations.h" - -static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF); -static const uint32_t initial_color = LCD_COLOR(0, 0, 0); - -static bool initial_update = true; - -// Feel free to modify the animations below, or even add new ones if needed -extern keyframe_animation_t KITT_Scanner_animation; - -static keyframe_animation_t lcd_layer_display = { - .num_frames = 1, - .loop = false, - .frame_lengths = {gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_keyframe_display_layer_and_led_states} -}; - -// The color animation animates the LCD color when you change layers -static keyframe_animation_t color_animation = { - .num_frames = 2, - .loop = false, - // Note that there's a 200 ms no-operation frame, - // this prevents the color from changing when activating the layer - // momentarily - .frame_lengths = {gfxMillisecondsToTicks(200), gfxMillisecondsToTicks(500)}, - .frame_functions = {keyframe_no_operation, lcd_backlight_keyframe_animate_color}, -}; - -void initialize_user_visualizer(visualizer_state_t* state) { - // The brightness will be dynamically adjustable in the future - // But for now, change it here. - lcd_backlight_brightness(130); - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - initial_update = true; - start_keyframe_animation(&default_startup_animation); -} - - -// This function should be implemented by the keymap visualizer -// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing -// that the simple_visualizer assumes that you are updating -// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is -// stopped. This can be done by either double buffering it or by using constant strings -static void get_visualizer_layer_and_color(visualizer_state_t* state); - -void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - // Add more tests, change the colors and layer texts here - // Usually you want to check the high bits (higher layers first) - // because that's the order layers are processed for keypresses - // You can for check for example: - // state->status.layer - // state->status.default_layer - // state->status.leds (see led.h for available statuses) - - uint32_t prev_color = state->target_lcd_color; - const char* prev_layer_text = state->layer_text; - - get_visualizer_layer_and_color(state); - - if (initial_update || prev_color != state->target_lcd_color) { - start_keyframe_animation(&color_animation); - } - - if (initial_update || prev_layer_text != state->layer_text) { - start_keyframe_animation(&lcd_layer_display); - } - // You can also stop existing animations, and start your custom ones here - // remember that you should normally have only one animation for the LCD - // and one for the background. But you can also combine them if you want. - -} - -void user_visualizer_suspend(visualizer_state_t* state) { - state->layer_text = "Suspending..."; - uint8_t hue = LCD_HUE(state->current_lcd_color); - uint8_t sat = LCD_SAT(state->current_lcd_color); - state->target_lcd_color = LCD_COLOR(hue, sat, 0); - start_keyframe_animation(&default_suspend_animation); -} - -void user_visualizer_resume(visualizer_state_t* state) { - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - initial_update = true; - start_keyframe_animation(&default_startup_animation); -} - -#endif /* VISUALIZER_H_ */ diff --git a/keyboards/ergodox_infinity/readme.md b/keyboards/ergodox_infinity/readme.md index 73ee3bc1df..c51bdd7c82 100644 --- a/keyboards/ergodox_infinity/readme.md +++ b/keyboards/ergodox_infinity/readme.md @@ -13,18 +13,16 @@ for the left and right halves seperately. To flash them: - Install the firmware with `sudo make ergodox_infinity:keymapname:dfu-util` - - Build right hand firmware with `make ergodox_infinity:keymapname MASTER=right` - - Plug in the right hand keyboard only. - Press the program button (back of keyboard, above thumb pad). - - Install the firmware with `sudo make ergodox_infinity:keymapname:dfu-util MASTER=right` + - Install the firmware with `sudo make ergodox_infinity:keymapname:dfu-util` More information on the Infinity firmware is available in the [TMK/chibios for Input Club Infinity Ergodox](https://github.com/fredizzimo/infinity_ergodox/blob/master/README.md) -## Infinity Master/Two Halves +## Infinity Two Halves The Infinity is two completely independent keyboards, that can connect together. You have a few options in how you flash the firmware: @@ -32,21 +30,10 @@ You have a few options in how you flash the firmware: - Add `#define EE_HANDS` to your config.h, initialize the EEPROM values (see below), and then flash the same firmware to both halves. -- Flash the left half, rebuild the firmware with "MASTER=right" and then flash - the right half. This allows you to plug in either half directly to the - computer and is what the above instructions do. - -- Flash the left half, then flash the same firmware on the right. This only - works when the left half is plugged directly to the computer and the keymap - is mirrored. It saves the small extra step of rebuilding with - "MASTER=right". - -- The same as the previous one but with "MASTER=right" when you build the - firmware, then flash the same firmware to both halves. You just have to - directly connect the right half to the computer. +- Flash with the instructions above, which assume the left hand is connected to USB. - For minor changes such as changing only the keymap without having updated - any part of the firmware code itself, you can program only the MASTER half, + any part of the firmware code itself, you can program only the half connected to USB, but it is safest to program both halves. ### EE_HANDS initialization @@ -74,7 +61,6 @@ They only need to be done once, unless you reset the EEPROM later. - Add `#define EE_HANDS` to the config.h file of your keymap, and build your firmware using `make ergodox_infinity:keymapname`. - - After this, you can flash both halves with the same firmware, _without_ having to rebuild with - "MASTER=right" or risking a mirrored keyboard when connected the wrong way. + - After this, you can flash both halves with the same firmware, _without_ risking a mirrored keyboard when connected the wrong way. If you reset your EEPROM later, you'll have to follow these steps again, though. diff --git a/keyboards/ergodox_infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk index 06b62f547d..b6922e1ee6 100644 --- a/keyboards/ergodox_infinity/rules.mk +++ b/keyboards/ergodox_infinity/rules.mk @@ -34,11 +34,4 @@ ST7565_ENABLE = yes LED_MATRIX_ENABLE = yes LED_MATRIX_DRIVER = IS31FL3731 -# Config for Visualizer (set VISUALIZER_ENABLE = yes and ST7565_ENABLE = no to use) -LCD_ENABLE = yes -LCD_BACKLIGHT_ENABLE = yes -LCD_DRIVER = st7565 -LCD_WIDTH = 128 -LCD_HEIGHT = 32 - LAYOUTS = ergodox diff --git a/keyboards/ergodox_infinity/simple_visualizer.h b/keyboards/ergodox_infinity/simple_visualizer.h deleted file mode 100644 index 73d0e08870..0000000000 --- a/keyboards/ergodox_infinity/simple_visualizer.h +++ /dev/null @@ -1,123 +0,0 @@ -/* Copyright 2017 Fred Sundvik - * - * 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/>. - */ - -#ifndef KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ -#define KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ - -// Currently we are assuming that both the backlight and LCD are enabled -// But it's entirely possible to write a custom visualizer that use only -// one of them -#ifndef LCD_BACKLIGHT_ENABLE -#error This visualizer needs that LCD backlight is enabled -#endif - -#ifndef LCD_ENABLE -#error This visualizer needs that LCD is enabled -#endif - -#include "visualizer.h" -#include "visualizer_keyframes.h" -#include "lcd_keyframes.h" -#include "lcd_backlight_keyframes.h" -#include "system/serial_link.h" -#include "led.h" -#include "default_animations.h" - -static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF); -static const uint32_t initial_color = LCD_COLOR(0, 0, 0); - -static bool initial_update = true; - -// Feel free to modify the animations below, or even add new ones if needed - -static keyframe_animation_t lcd_layer_display = { - .num_frames = 1, - .loop = false, - .frame_lengths = {gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_keyframe_display_layer_and_led_states} -}; - -// The color animation animates the LCD color when you change layers -static keyframe_animation_t color_animation = { - .num_frames = 2, - .loop = false, - // Note that there's a 200 ms no-operation frame, - // this prevents the color from changing when activating the layer - // momentarily - .frame_lengths = {gfxMillisecondsToTicks(200), gfxMillisecondsToTicks(500)}, - .frame_functions = {keyframe_no_operation, lcd_backlight_keyframe_animate_color}, -}; - -void initialize_user_visualizer(visualizer_state_t* state) { - // The brightness will be dynamically adjustable in the future - // But for now, change it here. - lcd_backlight_brightness(130); - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - initial_update = true; - start_keyframe_animation(&default_startup_animation); -} - - -// This function should be implemented by the keymap visualizer -// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing -// that the simple_visualizer assumes that you are updating -// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is -// stopped. This can be done by either double buffering it or by using constant strings -static void get_visualizer_layer_and_color(visualizer_state_t* state); - -void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - // Add more tests, change the colors and layer texts here - // Usually you want to check the high bits (higher layers first) - // because that's the order layers are processed for keypresses - // You can for check for example: - // state->status.layer - // state->status.default_layer - // state->status.leds (see led.h for available statuses) - - uint32_t prev_color = state->target_lcd_color; - const char* prev_layer_text = state->layer_text; - - get_visualizer_layer_and_color(state); - - if (initial_update || prev_color != state->target_lcd_color) { - start_keyframe_animation(&color_animation); - } - - if (initial_update || prev_layer_text != state->layer_text) { - start_keyframe_animation(&lcd_layer_display); - } - // You can also stop existing animations, and start your custom ones here - // remember that you should normally have only one animation for the LCD - // and one for the background. But you can also combine them if you want. -} - -void user_visualizer_suspend(visualizer_state_t* state) { - state->layer_text = "Suspending..."; - uint8_t hue = LCD_HUE(state->current_lcd_color); - uint8_t sat = LCD_SAT(state->current_lcd_color); - state->target_lcd_color = LCD_COLOR(hue, sat, 0); - start_keyframe_animation(&default_suspend_animation); -} - -void user_visualizer_resume(visualizer_state_t* state) { - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - initial_update = true; - start_keyframe_animation(&default_startup_animation); -} - -#endif /* KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ */ diff --git a/keyboards/ergodox_infinity/visualizer.c b/keyboards/ergodox_infinity/visualizer.c deleted file mode 100644 index 1ea891e830..0000000000 --- a/keyboards/ergodox_infinity/visualizer.c +++ /dev/null @@ -1,328 +0,0 @@ -/* -Copyright 2016 Fred Sundvik <fsundvik@gmail.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/>. -*/ - -// Currently we are assuming that both the backlight and LCD are enabled -// But it's entirely possible to write a custom visualizer that use only -// one of them -#ifndef LCD_BACKLIGHT_ENABLE -#error This visualizer needs that LCD backlight is enabled -#endif - -#ifndef LCD_ENABLE -#error This visualizer needs that LCD is enabled -#endif - -#include "visualizer.h" -#include "visualizer_keyframes.h" -#include "lcd_keyframes.h" -#include "lcd_backlight_keyframes.h" -#include "default_animations.h" - -static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF); -static const uint32_t initial_color = LCD_COLOR(0, 0, 0); - -static const uint32_t led_emulation_colors[4] = { - LCD_COLOR(0, 0, 0), - LCD_COLOR(255, 255, 255), - LCD_COLOR(84, 255, 255), - LCD_COLOR(168, 255, 255), -}; - -static uint32_t next_led_target_color = 0; - -typedef enum { - LCD_STATE_INITIAL, - LCD_STATE_LAYER_BITMAP, - LCD_STATE_BITMAP_AND_LEDS, -} lcd_state_t; - -static lcd_state_t lcd_state = LCD_STATE_INITIAL; - -typedef struct { - uint8_t led_on; - uint8_t led1; - uint8_t led2; - uint8_t led3; -} visualizer_user_data_t; - -// Don't access from visualization function, use the visualizer state instead -static visualizer_user_data_t user_data_keyboard = { - .led_on = 0, - .led1 = LED_BRIGHTNESS_HI, - .led2 = LED_BRIGHTNESS_HI, - .led3 = LED_BRIGHTNESS_HI, -}; - -_Static_assert(sizeof(visualizer_user_data_t) <= VISUALIZER_USER_DATA_SIZE, - "Please increase the VISUALIZER_USER_DATA_SIZE"); - -// Feel free to modify the animations below, or even add new ones if needed - - -// The color animation animates the LCD color when you change layers -static keyframe_animation_t one_led_color = { - .num_frames = 1, - .loop = false, - .frame_lengths = {gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_backlight_keyframe_set_color}, -}; - -bool swap_led_target_color(keyframe_animation_t* animation, visualizer_state_t* state) { - uint32_t temp = next_led_target_color; - next_led_target_color = state->target_lcd_color; - state->target_lcd_color = temp; - return false; -} - -// The color animation animates the LCD color when you change layers -static keyframe_animation_t two_led_colors = { - .num_frames = 2, - .loop = true, - .frame_lengths = {gfxMillisecondsToTicks(1000), gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_backlight_keyframe_set_color, swap_led_target_color}, -}; - -// The LCD animation alternates between the layer name display and a -// bitmap that displays all active layers -static keyframe_animation_t lcd_bitmap_animation = { - .num_frames = 1, - .loop = false, - .frame_lengths = {gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_keyframe_display_layer_bitmap}, -}; - -static keyframe_animation_t lcd_bitmap_leds_animation = { - .num_frames = 2, - .loop = true, - .frame_lengths = {gfxMillisecondsToTicks(2000), gfxMillisecondsToTicks(2000)}, - .frame_functions = {lcd_keyframe_display_layer_bitmap, lcd_keyframe_display_led_states}, -}; - -void initialize_user_visualizer(visualizer_state_t* state) { - // The brightness will be dynamically adjustable in the future - // But for now, change it here. - lcd_backlight_brightness(130); - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - lcd_state = LCD_STATE_INITIAL; - start_keyframe_animation(&default_startup_animation); -} - -static inline bool is_led_on(visualizer_user_data_t* user_data, uint8_t num) { - return user_data->led_on & (1u << num); -} - -static uint8_t get_led_index_master(visualizer_user_data_t* user_data) { - for (int i=0; i < 3; i++) { - if (is_led_on(user_data, i)) { - return i + 1; - } - } - return 0; -} - -static uint8_t get_led_index_slave(visualizer_user_data_t* user_data) { - uint8_t master_index = get_led_index_master(user_data); - if (master_index!=0) { - for (int i=master_index; i < 3; i++) { - if (is_led_on(user_data, i)) { - return i + 1; - } - } - } - - return 0; -} - -static uint8_t get_secondary_led_index(visualizer_user_data_t* user_data) { - if (is_led_on(user_data, 0) && - is_led_on(user_data, 1) && - is_led_on(user_data, 2)) { - return 3; - } - return 0; -} - -static uint8_t get_brightness(visualizer_user_data_t* user_data, uint8_t index) { - switch (index) { - case 1: - return user_data->led1; - case 2: - return user_data->led2; - case 3: - return user_data->led3; - } - return 0; -} - -static void update_emulated_leds(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - visualizer_user_data_t* user_data_new = (visualizer_user_data_t*)state->status.user_data; - visualizer_user_data_t* user_data_old = (visualizer_user_data_t*)prev_status->user_data; - - uint8_t new_index; - uint8_t old_index; - - if (is_keyboard_master()) { - new_index = get_led_index_master(user_data_new); - old_index = get_led_index_master(user_data_old); - } - else { - new_index = get_led_index_slave(user_data_new); - old_index = get_led_index_slave(user_data_old); - } - uint8_t new_secondary_index = get_secondary_led_index(user_data_new); - uint8_t old_secondary_index = get_secondary_led_index(user_data_old); - - uint8_t old_brightness = get_brightness(user_data_old, old_index); - uint8_t new_brightness = get_brightness(user_data_new, new_index); - - uint8_t old_secondary_brightness = get_brightness(user_data_old, old_secondary_index); - uint8_t new_secondary_brightness = get_brightness(user_data_new, new_secondary_index); - - if (lcd_state == LCD_STATE_INITIAL || - new_index != old_index || - new_secondary_index != old_secondary_index || - new_brightness != old_brightness || - new_secondary_brightness != old_secondary_brightness) { - - if (new_secondary_index != 0) { - state->target_lcd_color = change_lcd_color_intensity( - led_emulation_colors[new_index], new_brightness); - next_led_target_color = change_lcd_color_intensity( - led_emulation_colors[new_secondary_index], new_secondary_brightness); - - stop_keyframe_animation(&one_led_color); - start_keyframe_animation(&two_led_colors); - } else { - state->target_lcd_color = change_lcd_color_intensity( - led_emulation_colors[new_index], new_brightness); - stop_keyframe_animation(&two_led_colors); - start_keyframe_animation(&one_led_color); - } - } -} - -static void update_lcd_text(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - if (state->status.leds) { - if (lcd_state != LCD_STATE_BITMAP_AND_LEDS || - state->status.leds != prev_status->leds || - state->status.layer != prev_status->layer || - state->status.default_layer != prev_status->default_layer) { - - // NOTE: that it doesn't matter if the animation isn't playing, stop will do nothing in that case - stop_keyframe_animation(&lcd_bitmap_animation); - - lcd_state = LCD_STATE_BITMAP_AND_LEDS; - // For information: - // The logic in this function makes sure that this doesn't happen, but if you call start on an - // animation that is already playing it will be restarted. - start_keyframe_animation(&lcd_bitmap_leds_animation); - } - } else { - if (lcd_state != LCD_STATE_LAYER_BITMAP || - state->status.layer != prev_status->layer || - state->status.default_layer != prev_status->default_layer) { - - stop_keyframe_animation(&lcd_bitmap_leds_animation); - - lcd_state = LCD_STATE_LAYER_BITMAP; - start_keyframe_animation(&lcd_bitmap_animation); - } - } -} - -void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - // Check the status here to start and stop animations - // You might have to save some state, like the current animation here so that you can start the right - // This function is called every time the status changes - - // NOTE that this is called from the visualizer thread, so don't access anything else outside the status - // This is also important because the slave won't have access to the active layer for example outside the - // status. - - update_emulated_leds(state, prev_status); - update_lcd_text(state, prev_status); - -} - -void user_visualizer_suspend(visualizer_state_t* state) { - state->layer_text = "Suspending..."; - uint8_t hue = LCD_HUE(state->current_lcd_color); - uint8_t sat = LCD_SAT(state->current_lcd_color); - state->target_lcd_color = LCD_COLOR(hue, sat, 0); - start_keyframe_animation(&default_suspend_animation); -} - -void user_visualizer_resume(visualizer_state_t* state) { - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - lcd_state = LCD_STATE_INITIAL; - start_keyframe_animation(&default_startup_animation); -} - -void ergodox_board_led_on(void){ - // No board led support -} - -void ergodox_right_led_1_on(void){ - user_data_keyboard.led_on |= (1u << 0); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_right_led_2_on(void){ - user_data_keyboard.led_on |= (1u << 1); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_right_led_3_on(void){ - user_data_keyboard.led_on |= (1u << 2); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_board_led_off(void){ - // No board led support -} - -void ergodox_right_led_1_off(void){ - user_data_keyboard.led_on &= ~(1u << 0); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_right_led_2_off(void){ - user_data_keyboard.led_on &= ~(1u << 1); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_right_led_3_off(void){ - user_data_keyboard.led_on &= ~(1u << 2); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_right_led_1_set(uint8_t n) { - user_data_keyboard.led1 = n; - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_right_led_2_set(uint8_t n) { - user_data_keyboard.led2 = n; - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_right_led_3_set(uint8_t n) { - user_data_keyboard.led3 = n; - visualizer_set_user_data(&user_data_keyboard); -} diff --git a/keyboards/ergotaco/post_rules.mk b/keyboards/ergotaco/post_rules.mk new file mode 100644 index 0000000000..0db3171b33 --- /dev/null +++ b/keyboards/ergotaco/post_rules.mk @@ -0,0 +1,8 @@ + +# A bunch of stuff that you shouldn't touch unless you +# know what you're doing. +# +# No touchy, capiche? +ifeq ($(strip $(DEBUG_MATRIX)), yes) + OPT_DEFS += -DDEBUG_MATRIX +endif diff --git a/keyboards/ergotaco/rules.mk b/keyboards/ergotaco/rules.mk index 9fe0992ffd..db236477b0 100644 --- a/keyboards/ergotaco/rules.mk +++ b/keyboards/ergotaco/rules.mk @@ -14,6 +14,3 @@ COMMAND_ENABLE = yes # # No touchy, capiche? SRC += matrix.c i2c_master.c -ifeq ($(strip $(DEBUG_MATRIX)), yes) - OPT_DEFS += -DDEBUG_MATRIX -endif diff --git a/keyboards/ergotravel/rev1/rev1.h b/keyboards/ergotravel/rev1/rev1.h index 5907617ef3..2973f4d9f3 100644 --- a/keyboards/ergotravel/rev1/rev1.h +++ b/keyboards/ergotravel/rev1/rev1.h @@ -1,5 +1,4 @@ -#ifndef REV1_H -#define REV1_H +#pragma once #include "ergotravel.h" @@ -13,21 +12,20 @@ #endif #endif +#define XXX KC_NO + #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, R30, R31, R32, R33, R34, R35 \ - ) \ - { \ - { 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, KC_NO }, \ - { R06, R05, R04, R03, R02, R01, R00 }, \ - { R16, R15, R14, R13, R12, R11, R10 }, \ - { R26, R25, R24, R23, R22, R21, R20 }, \ - { R35, R34, R33, R32, R31, R30, KC_NO } \ - } - -#endif + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ +) { \ + { 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, XXX }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30, XXX } \ +} diff --git a/keyboards/evil80/evil80.h b/keyboards/evil80/evil80.h index a880de98f5..90d4f6564b 100644 --- a/keyboards/evil80/evil80.h +++ b/keyboards/evil80/evil80.h @@ -1,23 +1,21 @@ -#ifndef EVIL80_H -#define EVIL80_H +#pragma once #include "quantum.h" -#define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ - K500, K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K501, K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ - K502, K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ - K503, K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, \ - K504, K505, K506, K507, K509, K510, K511, K512, K513, K514, K515 \ -) \ -{ \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, KC_NO, KC_NO }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO, K414, KC_NO }, \ - { K500, K501, K502, K503, K504, K505, K506, K507, KC_NO, K509, K510, K511, K512, K513, K514, K515 } \ -} +#define XXX KC_NO -#endif +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k50, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k51, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ + k52, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, \ + k53, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4E, \ + k54, k55, k56, k57, k59, k5A, k5B, k5C, k5D, k5E, k5F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, XXX, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, XXX, k4E, XXX }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, XXX, k59, k5A, k5B, k5C, k5D, k5E, k5F } \ +} diff --git a/keyboards/evyd13/atom47/rev3/info.json b/keyboards/evyd13/atom47/rev3/info.json index 0deaa7103c..fc602f699b 100644 --- a/keyboards/evyd13/atom47/rev3/info.json +++ b/keyboards/evyd13/atom47/rev3/info.json @@ -99,10 +99,11 @@ {"x":10.75, "y":2, "w":1.25}, {"x":12, "y":2}, - {"x":0, "y":3, "w":1.25}, - {"x":1.25, "y":3, "w":1.25}, - {"x":2.5, "y":3, "w":1.25}, - {"x":3.75, "y":3, "w":6.25}, + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3, "w":6}, + {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3} diff --git a/keyboards/evyd13/atom47/rev4/info.json b/keyboards/evyd13/atom47/rev4/info.json index a48b413588..d0fbf98742 100644 --- a/keyboards/evyd13/atom47/rev4/info.json +++ b/keyboards/evyd13/atom47/rev4/info.json @@ -99,10 +99,11 @@ {"x":10.75, "y":2, "w":1.25}, {"x":12, "y":2}, - {"x":0, "y":3, "w":1.25}, - {"x":1.25, "y":3, "w":1.25}, - {"x":2.5, "y":3, "w":1.25}, - {"x":3.75, "y":3, "w":6.25}, + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3, "w":6}, + {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3} diff --git a/keyboards/evyd13/atom47/rev5/config.h b/keyboards/evyd13/atom47/rev5/config.h index f1f8eacfa4..07252537ac 100644 --- a/keyboards/evyd13/atom47/rev5/config.h +++ b/keyboards/evyd13/atom47/rev5/config.h @@ -157,8 +157,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // ADDR2 represents A3:A2 of the 7-bit address. // The result is: 0b101(ADDR2)(ADDR1) #define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 64 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
\ No newline at end of file +#define DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL 64 diff --git a/keyboards/evyd13/gh80_3700/keymaps/ps2/config.h b/keyboards/evyd13/gh80_3700/keymaps/ps2/config.h index 44ac7dcd03..b77ac95d7d 100644 --- a/keyboards/evyd13/gh80_3700/keymaps/ps2/config.h +++ b/keyboards/evyd13/gh80_3700/keymaps/ps2/config.h @@ -17,14 +17,8 @@ #pragma once #ifdef PS2_USE_USART -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 5 -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 2 +#define PS2_CLOCK_PIN D5 +#define PS2_DATA_PIN D2 /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ /* set DDR of CLOCK as input to be slave */ diff --git a/keyboards/exclusive/e6_rgb/config.h b/keyboards/exclusive/e6_rgb/config.h index b1b8b1bed7..fd221f1765 100644 --- a/keyboards/exclusive/e6_rgb/config.h +++ b/keyboards/exclusive/e6_rgb/config.h @@ -31,8 +31,6 @@ #define RGBLIGHT_VAL_STEP 8 #define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 63 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL 63 diff --git a/keyboards/exclusive/e6v2/le/config.h b/keyboards/exclusive/e6v2/le/config.h index 8fc91e504c..f9295145ec 100644 --- a/keyboards/exclusive/e6v2/le/config.h +++ b/keyboards/exclusive/e6v2/le/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -57,5 +56,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 - -#endif diff --git a/keyboards/exclusive/e6v2/le/le.h b/keyboards/exclusive/e6v2/le/le.h index d52560dfbe..41992a185e 100644 --- a/keyboards/exclusive/e6v2/le/le.h +++ b/keyboards/exclusive/e6v2/le/le.h @@ -1,36 +1,35 @@ -#ifndef LE_H -#define LE_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0D, \ - K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K42, K43, K44, K47, K49, K4A, K4B, K4C, K4D, K4E \ -)\ -{\ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, KC_NO, K42, K43, K44, KC_NO, KC_NO, K47, KC_NO, K49, K4A, K4B, K4C, K4D, K4E }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0D, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k42, k43, k44, k47, k49, k4A, k4B, k4C, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, XXX, k42, k43, k44, XXX, XXX, k47, XXX, k49, k4A, k4B, k4C, k4D, k4E } \ } #define LAYOUT_60_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K42, K43, K47, K4A, K4B, K4D, K4E \ -)\ -{\ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ - { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, KC_NO }, \ - { K40, KC_NO, K42, K43, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k42, k43, k47, k4A, k4B, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, XXX }, \ + { k40, XXX, k42, k43, XXX, XXX, XXX, k47, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \ } /* LAYOUT_60_hhkb @@ -47,18 +46,15 @@ * └─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ */ #define LAYOUT_60_hhkb( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0D, \ - K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, \ - K42, K43, K47, K4B, K4D \ -)\ -{\ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E }, \ - { KC_NO, KC_NO, K42, K43, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, KC_NO, K4B, KC_NO, K4D, KC_NO }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0D, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, \ + k42, k43, k47, k4B, k4D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, XXX, k3E }, \ + { XXX, XXX, k42, k43, XXX, XXX, XXX, k47, XXX, XXX, XXX, k4B, XXX, k4D, XXX } \ } - -#endif diff --git a/keyboards/exclusive/e6v2/oe/config.h b/keyboards/exclusive/e6v2/oe/config.h index 13be6ccad6..d9362cfc03 100644 --- a/keyboards/exclusive/e6v2/oe/config.h +++ b/keyboards/exclusive/e6v2/oe/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -54,5 +53,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 - -#endif diff --git a/keyboards/exclusive/e6v2/oe/oe.h b/keyboards/exclusive/e6v2/oe/oe.h index 0746039fe7..21daaa2aa9 100644 --- a/keyboards/exclusive/e6v2/oe/oe.h +++ b/keyboards/exclusive/e6v2/oe/oe.h @@ -1,66 +1,61 @@ -#ifndef OE_H -#define OE_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D \ -)\ -{\ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_60_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D \ -)\ -{\ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, KC_NO }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, XXX, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_hhkb( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K41, K42, K46, K4B, K4C \ -)\ -{\ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \ - { KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, KC_NO }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k41, k42, k46, k4B, k4C \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX }, \ + { XXX, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4B, k4C, XXX, XXX } \ } #define LAYOUT_hhkb_splits( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K41, K42, K46, K4B, K4C \ -)\ -{\ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \ - { KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, KC_NO }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k41, k42, k46, k4B, k4C \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX }, \ + { XXX, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4B, k4C, XXX, XXX } \ } - -#endif diff --git a/keyboards/eyeohdesigns/sprh/info.json b/keyboards/eyeohdesigns/sprh/info.json index ed05558614..7c99615965 100644 --- a/keyboards/eyeohdesigns/sprh/info.json +++ b/keyboards/eyeohdesigns/sprh/info.json @@ -1,13 +1,148 @@ { - "keyboard_name": "sprh", - "url": "", - "maintainer": "eye oh designs", + "keyboard_name": "sprh", + "maintainer": "eye oh designs", + "url": "", "layouts": { - "LAYOUT_default": { - "layout": [{"label":"Encd", "x":0.5, "y":0}, {"label":"Esc", "x":1.5, "y":0}, {"label":"1", "x":2.5, "y":0}, {"label":"2", "x":3.5, "y":0}, {"label":"3", "x":4.5, "y":0}, {"label":"4", "x":5.5, "y":0}, {"label":"5", "x":6.5, "y":0}, {"label":"6", "x":7.5, "y":0}, {"label":"7", "x":8.5, "y":0}, {"label":"8", "x":9.5, "y":0}, {"label":"9", "x":10.5, "y":0}, {"label":"0", "x":11.5, "y":0}, {"label":"_", "x":12.5, "y":0}, {"label":"+", "x":13.5, "y":0}, {"label":"Backspace", "x":14.5, "y":0, "w":2}, {"label":"Tab", "x":1, "y":1, "w":1.5}, {"label":"Q", "x":2.5, "y":1}, {"label":"W", "x":3.5, "y":1}, {"label":"E", "x":4.5, "y":1}, {"label":"R", "x":5.5, "y":1}, {"label":"T", "x":6.5, "y":1}, {"label":"Y", "x":7.5, "y":1}, {"label":"U", "x":8.5, "y":1}, {"label":"I", "x":9.5, "y":1}, {"label":"O", "x":10.5, "y":1}, {"label":"P", "x":11.5, "y":1}, {"label":"[", "x":12.5, "y":1}, {"label":"]", "x":13.5, "y":1}, {"label":"\\", "x":14.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0.75, "y":2, "w":1.75}, {"label":"A", "x":2.5, "y":2}, {"label":"S", "x":3.5, "y":2}, {"label":"D", "x":4.5, "y":2}, {"label":"F", "x":5.5, "y":2}, {"label":"G", "x":6.5, "y":2}, {"label":"H", "x":7.5, "y":2}, {"label":"J", "x":8.5, "y":2}, {"label":"K", "x":9.5, "y":2}, {"label":"L", "x":10.5, "y":2}, {"label":";", "x":11.5, "y":2}, {"label":"'", "x":12.5, "y":2}, {"label":"Enter", "x":13.5, "y":2, "w":2.25}, {"label":"Shift", "x":0.25, "y":3, "w":2.25}, {"label":"Z", "x":2.5, "y":3}, {"label":"X", "x":3.5, "y":3}, {"label":"C", "x":4.5, "y":3}, {"label":"V", "x":5.5, "y":3}, {"label":"B", "x":6.5, "y":3}, {"label":"N", "x":7.5, "y":3}, {"label":"M", "x":8.5, "y":3}, {"label":",", "x":9.5, "y":3}, {"label":".", "x":10.5, "y":3}, {"label":"/", "x":11.5, "y":3}, {"label":"Shift", "x":12.5, "y":3, "w":2.75}, {"label":"\u2191", "x":15.25, "y":3}, {"label":"Super", "x":0, "y":4, "w":1.25}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":3.37, "y":4, "w":1.25}, {"x":4.62, "y":4, "w":6.25}, {"label":"Alt", "x":10.87, "y":4, "w":1.25}, {"label":"Function", "x":12.12, "y":4, "w":1.25}, {"label":"\u2190", "x":14.25, "y":4}, {"label":"\u2193", "x":15.25, "y":4}, {"label":"\u2192", "x":16.25, "y":4}] + "LAYOUT_default": { + "layout": [ + { "label": "Encd", "x": 0.5, "y": 0 }, + { "label": "Esc", "x": 1.5, "y": 0 }, + { "label": "1", "x": 2.5, "y": 0 }, + { "label": "2", "x": 3.5, "y": 0 }, + { "label": "3", "x": 4.5, "y": 0 }, + { "label": "4", "x": 5.5, "y": 0 }, + { "label": "5", "x": 6.5, "y": 0 }, + { "label": "6", "x": 7.5, "y": 0 }, + { "label": "7", "x": 8.5, "y": 0 }, + { "label": "8", "x": 9.5, "y": 0 }, + { "label": "9", "x": 10.5, "y": 0 }, + { "label": "0", "x": 11.5, "y": 0 }, + { "label": "_", "x": 12.5, "y": 0 }, + { "label": "+", "x": 13.5, "y": 0 }, + { "label": "Backspace", "w": 2, "x": 14.5, "y": 0 }, + { "label": "Tab", "w": 1.5, "x": 1, "y": 1 }, + { "label": "Q", "x": 2.5, "y": 1 }, + { "label": "W", "x": 3.5, "y": 1 }, + { "label": "E", "x": 4.5, "y": 1 }, + { "label": "R", "x": 5.5, "y": 1 }, + { "label": "T", "x": 6.5, "y": 1 }, + { "label": "Y", "x": 7.5, "y": 1 }, + { "label": "U", "x": 8.5, "y": 1 }, + { "label": "I", "x": 9.5, "y": 1 }, + { "label": "O", "x": 10.5, "y": 1 }, + { "label": "P", "x": 11.5, "y": 1 }, + { "label": "[", "x": 12.5, "y": 1 }, + { "label": "]", "x": 13.5, "y": 1 }, + { "label": "\\", "w": 1.5, "x": 14.5, "y": 1 }, + { "label": "Caps Lock", "w": 1.75, "x": 0.75, "y": 2 }, + { "label": "A", "x": 2.5, "y": 2 }, + { "label": "S", "x": 3.5, "y": 2 }, + { "label": "D", "x": 4.5, "y": 2 }, + { "label": "F", "x": 5.5, "y": 2 }, + { "label": "G", "x": 6.5, "y": 2 }, + { "label": "H", "x": 7.5, "y": 2 }, + { "label": "J", "x": 8.5, "y": 2 }, + { "label": "K", "x": 9.5, "y": 2 }, + { "label": "L", "x": 10.5, "y": 2 }, + { "label": ";", "x": 11.5, "y": 2 }, + { "label": "'", "x": 12.5, "y": 2 }, + { "label": "Enter", "w": 2.25, "x": 13.5, "y": 2 }, + { "label": "Shift", "w": 2.25, "x": 0.25, "y": 3 }, + { "label": "Z", "x": 2.5, "y": 3 }, + { "label": "X", "x": 3.5, "y": 3 }, + { "label": "C", "x": 4.5, "y": 3 }, + { "label": "V", "x": 5.5, "y": 3 }, + { "label": "B", "x": 6.5, "y": 3 }, + { "label": "N", "x": 7.5, "y": 3 }, + { "label": "M", "x": 8.5, "y": 3 }, + { "label": ",", "x": 9.5, "y": 3 }, + { "label": ".", "x": 10.5, "y": 3 }, + { "label": "/", "x": 11.5, "y": 3 }, + { "label": "Shift", "w": 2.75, "x": 12.5, "y": 3 }, + { "label": "\u2191", "x": 15.25, "y": 3 }, + { "label": "Super", "w": 1.25, "x": 0, "y": 4 }, + { "label": "Ctrl", "w": 1.25, "x": 1.25, "y": 4 }, + { "label": "Alt", "w": 1.25, "x": 3.37, "y": 4 }, + { "w": 6.25, "x": 4.62, "y": 4 }, + { "label": "Alt", "w": 1.25, "x": 10.87, "y": 4 }, + { "label": "Function", "w": 1.25, "x": 12.12, "y": 4 }, + { "label": "\u2190", "x": 14.25, "y": 4 }, + { "label": "\u2193", "x": 15.25, "y": 4 }, + { "label": "\u2192", "x": 16.25, "y": 4 } + ] }, - "LAYOUT_split": { - "layout": [{"label":"Encd", "x":0.5, "y":0}, {"label":"Esc", "x":1.5, "y":0}, {"label":"1", "x":2.5, "y":0}, {"label":"2", "x":3.5, "y":0}, {"label":"3", "x":4.5, "y":0}, {"label":"4", "x":5.5, "y":0}, {"label":"5", "x":6.5, "y":0}, {"label":"6", "x":7.5, "y":0}, {"label":"7", "x":8.5, "y":0}, {"label":"8", "x":9.5, "y":0}, {"label":"9", "x":10.5, "y":0}, {"label":"0", "x":11.5, "y":0}, {"label":"_", "x":12.5, "y":0}, {"label":"+", "x":13.5, "y":0}, {"label":"\u2190", "x":14.5, "y":0}, {"label":"Del", "x":15.5, "y":0}, {"label":"Tab", "x":1, "y":1, "w":1.5}, {"label":"Q", "x":2.5, "y":1}, {"label":"W", "x":3.5, "y":1}, {"label":"E", "x":4.5, "y":1}, {"label":"R", "x":5.5, "y":1}, {"label":"T", "x":6.5, "y":1}, {"label":"Y", "x":7.5, "y":1}, {"label":"U", "x":8.5, "y":1}, {"label":"I", "x":9.5, "y":1}, {"label":"O", "x":10.5, "y":1}, {"label":"P", "x":11.5, "y":1}, {"label":"[", "x":12.5, "y":1}, {"label":"]", "x":13.5, "y":1}, {"label":"\\", "x":14.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0.75, "y":2, "w":1.75}, {"label":"A", "x":2.5, "y":2}, {"label":"S", "x":3.5, "y":2}, {"label":"D", "x":4.5, "y":2}, {"label":"F", "x":5.5, "y":2}, {"label":"G", "x":6.5, "y":2}, {"label":"H", "x":7.5, "y":2}, {"label":"J", "x":8.5, "y":2}, {"label":"K", "x":9.5, "y":2}, {"label":"L", "x":10.5, "y":2}, {"label":";", "x":11.5, "y":2}, {"label":"'", "x":12.5, "y":2}, {"label":"Enter", "x":13.5, "y":2, "w":2.25}, {"label":"Shift", "x":0.25, "y":3, "w":2.25}, {"label":"Z", "x":2.5, "y":3}, {"label":"X", "x":3.5, "y":3}, {"label":"C", "x":4.5, "y":3}, {"label":"V", "x":5.5, "y":3}, {"label":"B", "x":6.5, "y":3}, {"label":"N", "x":7.5, "y":3}, {"label":"M", "x":8.5, "y":3}, {"label":",", "x":9.5, "y":3}, {"label":".", "x":10.5, "y":3}, {"label":"/", "x":11.5, "y":3}, {"label":"Shift", "x":12.5, "y":3, "w":1.75}, {"label":"Fn", "x":14.25, "y":3}, {"label":"\u2191", "x":15.25, "y":3}, {"label":"Super", "x":0, "y":4, "w":1.25}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":3.37, "y":4, "w":1.25}, {"x":4.62, "y":4, "w":2.75}, {"x":7.37, "y":4, "w":2.25}, {"x":9.62, "y":4, "w":1.25}, {"label":"Alt", "x":10.87, "y":4, "w":1.25}, {"label":"Function", "x":12.12, "y":4, "w":1.25}, {"label":"\u2190", "x":14.25, "y":4}, {"label":"\u2193", "x":15.25, "y":4}, {"label":"\u2192", "x":16.25, "y":4}] + "LAYOUT_split": { + "layout": [ + { "label": "Encd", "x": 0.5, "y": 0 }, + { "label": "Esc", "x": 1.5, "y": 0 }, + { "label": "1", "x": 2.5, "y": 0 }, + { "label": "2", "x": 3.5, "y": 0 }, + { "label": "3", "x": 4.5, "y": 0 }, + { "label": "4", "x": 5.5, "y": 0 }, + { "label": "5", "x": 6.5, "y": 0 }, + { "label": "6", "x": 7.5, "y": 0 }, + { "label": "7", "x": 8.5, "y": 0 }, + { "label": "8", "x": 9.5, "y": 0 }, + { "label": "9", "x": 10.5, "y": 0 }, + { "label": "0", "x": 11.5, "y": 0 }, + { "label": "_", "x": 12.5, "y": 0 }, + { "label": "+", "x": 13.5, "y": 0 }, + { "label": "\u2190", "x": 14.5, "y": 0 }, + { "label": "Del", "x": 15.5, "y": 0 }, + { "label": "Tab", "w": 1.5, "x": 1, "y": 1 }, + { "label": "Q", "x": 2.5, "y": 1 }, + { "label": "W", "x": 3.5, "y": 1 }, + { "label": "E", "x": 4.5, "y": 1 }, + { "label": "R", "x": 5.5, "y": 1 }, + { "label": "T", "x": 6.5, "y": 1 }, + { "label": "Y", "x": 7.5, "y": 1 }, + { "label": "U", "x": 8.5, "y": 1 }, + { "label": "I", "x": 9.5, "y": 1 }, + { "label": "O", "x": 10.5, "y": 1 }, + { "label": "P", "x": 11.5, "y": 1 }, + { "label": "[", "x": 12.5, "y": 1 }, + { "label": "]", "x": 13.5, "y": 1 }, + { "label": "\\", "w": 1.5, "x": 14.5, "y": 1 }, + { "label": "Caps Lock", "w": 1.75, "x": 0.75, "y": 2 }, + { "label": "A", "x": 2.5, "y": 2 }, + { "label": "S", "x": 3.5, "y": 2 }, + { "label": "D", "x": 4.5, "y": 2 }, + { "label": "F", "x": 5.5, "y": 2 }, + { "label": "G", "x": 6.5, "y": 2 }, + { "label": "H", "x": 7.5, "y": 2 }, + { "label": "J", "x": 8.5, "y": 2 }, + { "label": "K", "x": 9.5, "y": 2 }, + { "label": "L", "x": 10.5, "y": 2 }, + { "label": ";", "x": 11.5, "y": 2 }, + { "label": "'", "x": 12.5, "y": 2 }, + { "label": "Enter", "w": 2.25, "x": 13.5, "y": 2 }, + { "label": "CapsLock", "x": 0.25, "y": 3 }, + { "label": "Shift", "w": 1.25, "x": 1.25, "y": 3 }, + { "label": "Z", "x": 2.5, "y": 3 }, + { "label": "X", "x": 3.5, "y": 3 }, + { "label": "C", "x": 4.5, "y": 3 }, + { "label": "V", "x": 5.5, "y": 3 }, + { "label": "B", "x": 6.5, "y": 3 }, + { "label": "N", "x": 7.5, "y": 3 }, + { "label": "M", "x": 8.5, "y": 3 }, + { "label": ",", "x": 9.5, "y": 3 }, + { "label": ".", "x": 10.5, "y": 3 }, + { "label": "/", "x": 11.5, "y": 3 }, + { "label": "Shift", "w": 1.75, "x": 12.5, "y": 3 }, + { "label": "Fn", "x": 14.25, "y": 3 }, + { "label": "\u2191", "x": 15.25, "y": 3 }, + { "label": "Super", "w": 1.25, "x": 0, "y": 4 }, + { "label": "Ctrl", "w": 1.25, "x": 1.25, "y": 4 }, + { "label": "Alt", "w": 1.25, "x": 3.37, "y": 4 }, + { "w": 2.75, "x": 4.62, "y": 4 }, + { "w": 2.25, "x": 7.37, "y": 4 }, + { "w": 1.25, "x": 9.62, "y": 4 }, + { "label": "Alt", "w": 1.25, "x": 10.87, "y": 4 }, + { "label": "Function", "w": 1.25, "x": 12.12, "y": 4 }, + { "label": "\u2190", "x": 14.25, "y": 4 }, + { "label": "\u2193", "x": 15.25, "y": 4 }, + { "label": "\u2192", "x": 16.25, "y": 4 } + ] } } } diff --git a/keyboards/ez_maker/directpins/teensy_32/config.h b/keyboards/ez_maker/directpins/teensy_32/config.h index 861ae70e41..c487a84ab1 100644 --- a/keyboards/ez_maker/directpins/teensy_32/config.h +++ b/keyboards/ez_maker/directpins/teensy_32/config.h @@ -17,7 +17,7 @@ #pragma once // i2c_master defines -#define I2C1_SCL 0 // A2 on pinout = B0 -#define I2C1_SDA 1 // A3 on pinout = B1 +#define I2C1_SCL_PIN B0 // A2 on pinout = B0 +#define I2C1_SDA_PIN B1 // A3 on pinout = B1 #define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 #define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 diff --git a/keyboards/ez_maker/directpins/teensy_lc/config.h b/keyboards/ez_maker/directpins/teensy_lc/config.h index 861ae70e41..c487a84ab1 100644 --- a/keyboards/ez_maker/directpins/teensy_lc/config.h +++ b/keyboards/ez_maker/directpins/teensy_lc/config.h @@ -17,7 +17,7 @@ #pragma once // i2c_master defines -#define I2C1_SCL 0 // A2 on pinout = B0 -#define I2C1_SDA 1 // A3 on pinout = B1 +#define I2C1_SCL_PIN B0 // A2 on pinout = B0 +#define I2C1_SDA_PIN B1 // A3 on pinout = B1 #define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 #define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 diff --git a/keyboards/fc660c/actuation_point.h b/keyboards/fc660c/actuation_point.h index f7066d92c1..e02832186c 100644 --- a/keyboards/fc660c/actuation_point.h +++ b/keyboards/fc660c/actuation_point.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ACTUATION_POINT_H -#define ACTUATION_POINT_H +#pragma once #include <stdint.h> @@ -28,5 +27,3 @@ void actuation_point_down(void); // be careful with this. void adjust_actuation_point(int offset); - -#endif diff --git a/keyboards/fc660c/config.h b/keyboards/fc660c/config.h index e979daf331..460881cb17 100644 --- a/keyboards/fc660c/config.h +++ b/keyboards/fc660c/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -80,5 +79,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // test all keys before further adjustment. // this should probably stay in the range +/-5. // #define ACTUATION_DEPTH_ADJUSTMENT 0 - -#endif diff --git a/keyboards/fc660c/fc660c.h b/keyboards/fc660c/fc660c.h index e3621570dd..fca02dc0e9 100644 --- a/keyboards/fc660c/fc660c.h +++ b/keyboards/fc660c/fc660c.h @@ -14,38 +14,23 @@ 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/>. */ -#ifndef FC660C_H -#define FC660C_H + +#pragma once #include "quantum.h" +#define XXX KC_NO #define LAYOUT( \ - K13, K10, K11, K12, K14, K16, K17, K15, K1B, K18, K19, K1A, K1C, K1E, K1F, \ - K03, K00, K01, K02, K04, K06, K07, K05, K0B, K08, K09, K0A, K0C, K0E, K0F, \ - K43, K40, K41, K42, K44, K46, K47, K45, K4B, K48, K49, K4A, K4E, \ - K33, K31, K32, K34, K36, K37, K35, K3B, K38, K39, K3A, K3C, K3D, \ - K23, K21, K22, K27, K28, K2A, K2C, K2E, K2D, K2F \ + k13, k10, k11, k12, k14, k16, k17, k15, k1B, k18, k19, k1A, k1C, k1E, k1F, \ + k03, k00, k01, k02, k04, k06, k07, k05, k0B, k08, k09, k0A, k0C, k0E, k0F, \ + k43, k40, k41, k42, k44, k46, k47, k45, k4B, k48, k49, k4A, k4E, \ + k33, k31, k32, k34, k36, k37, k35, k3B, k38, k39, k3A, k3C, k3D, \ + k23, k21, k22, k27, k28, k2A, k2C, k2E, k2D, k2F \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, \ - K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, \ - K18, K19, K1A, K1B, K1C, KC_NO, K1E, K1F }, \ - { KC_NO, K21, K22, K23, KC_NO, KC_NO, KC_NO, K27, \ - K28, KC_NO, K2A, KC_NO, K2C, K2D, K2E, K2F }, \ - { KC_NO, K31, K32, K33, K34, K35, K36, K37, \ - K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, \ - K48, K49, K4A, K4B, KC_NO, KC_NO, K4E, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, XXX, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, k1E, k1F }, \ + { XXX, k21, k22, k23, XXX, XXX, XXX, k27, k28, XXX, k2A, XXX, k2C, k2D, k2E, k2F }, \ + { XXX, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, XXX, XXX, k4E, XXX } \ } -/* -KEYMAP( - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, - _______,_______,_______, _______, _______,_______,_______, _______,_______,_______ - ) -*/ - -#endif diff --git a/keyboards/fc660c/i2c.h b/keyboards/fc660c/i2c.h index c15b6bc506..8910e70f10 100644 --- a/keyboards/fc660c/i2c.h +++ b/keyboards/fc660c/i2c.h @@ -1,5 +1,4 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include <stdint.h> @@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void); extern unsigned char i2c_read(unsigned char ack); #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/fc980c/actuation_point.h b/keyboards/fc980c/actuation_point.h index f7066d92c1..e02832186c 100644 --- a/keyboards/fc980c/actuation_point.h +++ b/keyboards/fc980c/actuation_point.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ACTUATION_POINT_H -#define ACTUATION_POINT_H +#pragma once #include <stdint.h> @@ -28,5 +27,3 @@ void actuation_point_down(void); // be careful with this. void adjust_actuation_point(int offset); - -#endif diff --git a/keyboards/fc980c/config.h b/keyboards/fc980c/config.h index b74ca64a5c..b0bffef760 100644 --- a/keyboards/fc980c/config.h +++ b/keyboards/fc980c/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -87,5 +86,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // test all keys before further adjustment. // this should probably stay in the range +/-5. // #define ACTUATION_DEPTH_ADJUSTMENT 0 - -#endif diff --git a/keyboards/fc980c/i2c.h b/keyboards/fc980c/i2c.h index c15b6bc506..8910e70f10 100644 --- a/keyboards/fc980c/i2c.h +++ b/keyboards/fc980c/i2c.h @@ -1,5 +1,4 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include <stdint.h> @@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void); extern unsigned char i2c_read(unsigned char ack); #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/ferris/0_2/config.h b/keyboards/ferris/0_2/config.h index 89eac7ed16..f51e5dd8f1 100644 --- a/keyboards/ferris/0_2/config.h +++ b/keyboards/ferris/0_2/config.h @@ -67,10 +67,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* i2c settings */ #define I2C_DRIVER I2CD2 -#define I2C1_SCL_BANK GPIOB -#define I2C1_SCL 10 -#define I2C1_SDA_BANK GPIOB -#define I2C1_SDA 11 +#define I2C1_SCL_PIN B10 +#define I2C1_SDA_PIN B11 #define I2C1_TIMINGR_PRESC 2U #define I2C1_TIMINGR_SCLDEL 1U #define I2C1_TIMINGR_SDADEL 0U diff --git a/keyboards/ferris/0_2/matrix.c b/keyboards/ferris/0_2/matrix.c index afa8a344cd..ff0e66d65c 100644 --- a/keyboards/ferris/0_2/matrix.c +++ b/keyboards/ferris/0_2/matrix.c @@ -59,11 +59,6 @@ extern i2c_status_t mcp23017_status; bool i2c_initialized = 0; i2c_status_t mcp23017_status = I2C_ADDR; -#define I2C2_SCL_BANK GPIOB -#define I2C2_SCL 10 -#define I2C2_SDA_BANK GPIOB -#define I2C2_SDA 11 - uint8_t init_mcp23017(void) { print("init mcp23017\n"); mcp23017_status = I2C_ADDR; diff --git a/keyboards/flehrad/bigswitch/bigswitch.h b/keyboards/flehrad/bigswitch/bigswitch.h index ea3d51a1f3..c6c2f026d5 100644 --- a/keyboards/flehrad/bigswitch/bigswitch.h +++ b/keyboards/flehrad/bigswitch/bigswitch.h @@ -14,15 +14,13 @@ 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/>. */ -#ifndef BIGSWITCH_H -#define BIGSWITCH_H + +#pragma once #include "quantum.h" #define LAYOUT( \ - K00 \ + k00 \ ) { \ - { K00 } \ + { k00 } \ } - -#endif diff --git a/keyboards/flehrad/bigswitch/config.h b/keyboards/flehrad/bigswitch/config.h index b6fb15d3b7..c0f73366a7 100644 --- a/keyboards/flehrad/bigswitch/config.h +++ b/keyboards/flehrad/bigswitch/config.h @@ -14,8 +14,8 @@ 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/>. */ -#ifndef CONFIG_H -#define CONFIG_H + +#pragma once #include "config_common.h" @@ -52,5 +52,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 8 #endif - -#endif diff --git a/keyboards/fleuron/config.h b/keyboards/fleuron/config.h index 21500d0e9e..fae7d941ae 100644 --- a/keyboards/fleuron/config.h +++ b/keyboards/fleuron/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -112,5 +111,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_DI_PIN E6 // The pin the LED strip is connected to #define RGBLED_NUM 18 // Number of LEDs in your strip #define RGBLIGHT_ANIMATIONS - -#endif diff --git a/keyboards/fleuron/fleuron.h b/keyboards/fleuron/fleuron.h index abdccf2371..38f6bb38bf 100644 --- a/keyboards/fleuron/fleuron.h +++ b/keyboards/fleuron/fleuron.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef FLEURON_H -#define FLEURON_H + +#pragma once #include "quantum.h" @@ -23,22 +23,19 @@ // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT_ortho_6x16( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, \ - k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, \ - k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5d, k5e, k5f \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f }, \ - { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f }, \ - { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5d, k5e, k5f } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F } \ } #define LAYOUT_fleuron_grid LAYOUT_ortho_6x16 - -#endif diff --git a/keyboards/four_banger/config.h b/keyboards/four_banger/config.h index 30e2bd21ac..7ad7a5c369 100644 --- a/keyboards/four_banger/config.h +++ b/keyboards/four_banger/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -45,5 +44,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/four_banger/four_banger.h b/keyboards/four_banger/four_banger.h index a6da8dd0b7..1d735a1f0f 100644 --- a/keyboards/four_banger/four_banger.h +++ b/keyboards/four_banger/four_banger.h @@ -1,14 +1,11 @@ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" #define LAYOUT_ortho_2x2( \ - K00, K01, \ - K10, K11 \ + k00, k01, \ + k10, k11 \ ) { \ - { K00, K01 }, \ - { K10, K11 } \ + { k00, k01 }, \ + { k10, k11 } \ } - -#endif diff --git a/keyboards/fractal/config.h b/keyboards/fractal/config.h index 5d4e0d49e3..b9aeac3855 100755 --- a/keyboards/fractal/config.h +++ b/keyboards/fractal/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -45,5 +44,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/gergo/keymaps/oled/keymap.c b/keyboards/gergo/keymaps/oled/keymap.c index 7e19a799ee..ab374b9332 100644 --- a/keyboards/gergo/keymaps/oled/keymap.c +++ b/keyboards/gergo/keymaps/oled/keymap.c @@ -130,13 +130,14 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(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); + return false; } //for (int i = 0; i < fontLen; i++) { //oled_write_char(pgm_read_byte(lain+i), false); diff --git a/keyboards/getta25/keymaps/oled/keymap.c b/keyboards/getta25/keymaps/oled/keymap.c index 4fbaf3ec28..7d8151b86d 100644 --- a/keyboards/getta25/keymaps/oled/keymap.c +++ b/keyboards/getta25/keymaps/oled/keymap.c @@ -182,7 +182,7 @@ void render_status(void) { render_keylock_status(host_keyboard_led_state()); } -void oled_task_user(void) { +bool oled_task_user(void) { static const char PROGMEM font_logo[] = { 0x80,0x81,0x82,0x83,0x84, 0xa0,0xa1,0xa2,0xa3,0xa4, @@ -199,6 +199,7 @@ void oled_task_user(void) { oled_write_P(font_logo, false); render_status(); // Renders the current keyboard state (layer, lock) + return false; } #endif diff --git a/keyboards/gh80_3000/config.h b/keyboards/gh80_3000/config.h index 68a405c8d9..71adb3e249 100644 --- a/keyboards/gh80_3000/config.h +++ b/keyboards/gh80_3000/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -44,5 +43,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/gh80_3000/gh80_3000.h b/keyboards/gh80_3000/gh80_3000.h index 803d30ece5..9c58d6fe58 100644 --- a/keyboards/gh80_3000/gh80_3000.h +++ b/keyboards/gh80_3000/gh80_3000.h @@ -1,138 +1,143 @@ -#ifndef GH80_3000 -#define GH80_3000 +#pragma once #include "quantum.h" +#define XXX KC_NO + // default keymap: all 117 keys with ANSI Enter #define LAYOUT( \ - K000, K001, K002, K003, K300, K301, K302, K303, K306, K307, K308, K309, K310, K004, K005, K006, K007, K008, K009, K010, \ - K100, K101, K102, K103, K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K104, K105, K106, K107, K108, K109, K110, \ - K200, K201, K202, K203, K500, K501, K502, K503, K505, K506, K507, K508, K509, K510, K204, K205, K206, K207, K208, K209, K210, \ - K800, K801, K802, K803, K600, K601, K602, K603, K606, K607, K608, K609, K610, K807, K808, K809, K810, \ - K900, K901, K902, K903, K700, K701, K702, K703, K705, K706, K707, K708, K709, K710, K906, K907, K908, K909, K910, \ - KA00, KA01, KA02, KA03, K804, K805, K806, K604, K605, K904, K905, KA04, KA05, KA06, KA07, KA08, KA09, KA10 \ + k00, k01, k02, k03, k30, k31, k32, k33, k36, k37, k38, k39, k3A, k04, k05, k06, k07, k08, k09, k0A, \ +\ + k10, k11, k12, k13, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k50, k51, k52, k53, k55, k56, k57, k58, k59, k5A, k24, k25, k26, k27, k28, k29, k2A, \ + k80, k81, k82, k83, k60, k61, k62, k63, k66, k67, k68, k69, k6A, k87, k88, k89, k8A, \ + k90, k91, k92, k93, k70, k71, k72, k73, k75, k76, k77, k78, k79, k7A, k96, k97, k98, k99, k9A, \ + kA0, kA1, kA2, kA3, k84, k85, k86, k64, k65, k94, k95, kA4, kA5, kA6, kA7, kA8, kA9, kAA \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210 }, \ - { K300, K301, K302, K303, KC_NO, KC_NO, K306, K307, K308, K309, K310 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410 }, \ - { K500, K501, K502, K503, KC_NO, K505, K506, K507, K508, K509, K510 }, \ - { K600, K601, K602, K603, K604, K605, K606, K607, K608, K609, K610 }, \ - { K700, K701, K702, K703, KC_NO, K705, K706, K707, K708, K709, K710 }, \ - { K800, K801, K802, K803, K804, K805, K806, K807, K808, K809, K810 }, \ - { K900, K901, K902, K903, K904, K905, K906, K907, K908, K909, K910 }, \ - { KA00, KA01, KA02, KA03, KA04, KA05, KA06, KA07, KA08, KA09, KA10 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A }, \ + { k30, k31, k32, k33, XXX, XXX, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A }, \ + { k50, k51, k52, k53, XXX, k55, k56, k57, k58, k59, k5A }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, k78, k79, k7A }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8A }, \ + { k90, k91, k92, k93, k94, k95, k96, k97, k98, k99, k9A }, \ + { kA0, kA1, kA2, kA3, kA4, kA5, kA6, kA7, kA8, kA9, kAA } \ } // default ISO keymap: all 117 keys with ISO Enter #define LAYOUT_iso( \ - K000, K001, K002, K003, K300, K301, K302, K303, K306, K307, K308, K309, K310, K004, K005, K006, K007, K008, K009, K010, \ - K100, K101, K102, K103, K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K104, K105, K106, K107, K108, K109, K110, \ - K200, K201, K202, K203, K500, K501, K502, K503, K505, K506, K507, K508, K509, K204, K205, K206, K207, K208, K209, K210, \ - K800, K801, K802, K803, K600, K601, K602, K603, K606, K607, K608, K609, K510, K610, K807, K808, K809, K810, \ - K900, K901, K902, K903, K700, K701, K702, K703, K705, K706, K707, K708, K709, K710, K906, K907, K908, K909, K910, \ - KA00, KA01, KA02, KA03, K804, K805, K806, K604, K605, K904, K905, KA04, KA05, KA06, KA07, KA08, KA09, KA10 \ + k00, k01, k02, k03, k30, k31, k32, k33, k36, k37, k38, k39, k3A, k04, k05, k06, k07, k08, k09, k0A, \ +\ + k10, k11, k12, k13, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k50, k51, k52, k53, k55, k56, k57, k58, k59, k24, k25, k26, k27, k28, k29, k2A, \ + k80, k81, k82, k83, k60, k61, k62, k63, k66, k67, k68, k69, k5A, k6A, k87, k88, k89, k8A, \ + k90, k91, k92, k93, k70, k71, k72, k73, k75, k76, k77, k78, k79, k7A, k96, k97, k98, k99, k9A, \ + kA0, kA1, kA2, kA3, k84, k85, k86, k64, k65, k94, k95, kA4, kA5, kA6, kA7, kA8, kA9, kAA \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210 }, \ - { K300, K301, K302, K303, KC_NO, KC_NO, K306, K307, K308, K309, K310 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410 }, \ - { K500, K501, K502, K503, KC_NO, K505, K506, K507, K508, K509, K510 }, \ - { K600, K601, K602, K603, K604, K605, K606, K607, K608, K609, K610 }, \ - { K700, K701, K702, K703, KC_NO, K705, K706, K707, K708, K709, K710 }, \ - { K800, K801, K802, K803, K804, K805, K806, K807, K808, K809, K810 }, \ - { K900, K901, K902, K903, K904, K905, K906, K907, K908, K909, K910 }, \ - { KA00, KA01, KA02, KA03, KA04, KA05, KA06, KA07, KA08, KA09, KA10 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A }, \ + { k30, k31, k32, k33, XXX, XXX, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A }, \ + { k50, k51, k52, k53, XXX, k55, k56, k57, k58, k59, k5A }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, k78, k79, k7A }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8A }, \ + { k90, k91, k92, k93, k94, k95, k96, k97, k98, k99, k9A }, \ + { kA0, kA1, kA2, kA3, kA4, kA5, kA6, kA7, kA8, kA9, kAA } \ } // Standard ANSI Keyboard #define LAYOUT_fullsize_ansi( \ - K000, K001, K002, K003, K300, K301, K302, K303, K306, K307, K308, K309, K310, K004, K005, K006, \ - K100, K101, K102, K103, K400, K401, K402, K403, K404, K405, K406, K407, K408, K410, K104, K105, K106, K107, K108, K109, K110, \ - K200, K201, K202, K203, K500, K501, K502, K503, K505, K506, K507, K508, K509, K510, K204, K205, K206, K207, K208, K209, K810, \ - K800, K801, K802, K803, K600, K601, K602, K603, K606, K607, K608, K609, K610, K807, K808, K809, \ - K900, K902, K903, K700, K701, K702, K703, K705, K706, K707, K708, K709, K906, K907, K908, K909, KA10, \ - KA00, KA01, KA02, K805, K604, K605, K904, K905, KA04, KA05, KA06, KA07, KA09 \ + k00, k01, k02, k03, k30, k31, k32, k33, k36, k37, k38, k39, k3A, k04, k05, k06, \ +\ + k10, k11, k12, k13, k40, k41, k42, k43, k44, k45, k46, k47, k48, k4A, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k50, k51, k52, k53, k55, k56, k57, k58, k59, k5A, k24, k25, k26, k27, k28, k29, k8A, \ + k80, k81, k82, k83, k60, k61, k62, k63, k66, k67, k68, k69, k6A, k87, k88, k89, \ + k90, k92, k93, k70, k71, k72, k73, k75, k76, k77, k78, k79, k96, k97, k98, k99, kAA, \ + kA0, kA1, kA2, k85, k64, k65, k94, k95, kA4, kA5, kA6, kA7, kA9 \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, KC_NO }, \ - { K300, K301, K302, K303, KC_NO, KC_NO, K306, K307, K308, K309, K310 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, KC_NO, K410 }, \ - { K500, K501, K502, K503, KC_NO, K505, K506, K507, K508, K509, K510 }, \ - { K600, K601, K602, K603, K604, K605, K606, K607, K608, K609, K610 }, \ - { K700, K701, K702, K703, KC_NO, K705, K706, K707, K708, K709, KC_NO }, \ - { K800, K801, K802, K803, KC_NO, K805, KC_NO, K807, K808, K809, K810 }, \ - { K900, KC_NO, K902, K903, K904, K905, K906, K907, K908, K909, KC_NO }, \ - { KA00, KA01, KA02, KC_NO, KA04, KA05, KA06, KA07, KC_NO, KA09, KA10 } \ + { k00, k01, k02, k03, k04, k05, k06, XXX, XXX, XXX, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, XXX }, \ + { k30, k31, k32, k33, XXX, XXX, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, XXX, k4A }, \ + { k50, k51, k52, k53, XXX, k55, k56, k57, k58, k59, k5A }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, k78, k79, XXX }, \ + { k80, k81, k82, k83, XXX, k85, XXX, k87, k88, k89, k8A }, \ + { k90, XXX, k92, k93, k94, k95, k96, k97, k98, k99, XXX }, \ + { kA0, kA1, kA2, XXX, kA4, kA5, kA6, kA7, XXX, kA9, kAA } \ } // Standard ISO Keyboard #define LAYOUT_fullsize_iso( \ - K000, K001, K002, K003, K300, K301, K302, K303, K306, K307, K308, K309, K310, K004, K005, K006, \ - K100, K101, K102, K103, K400, K401, K402, K403, K404, K405, K406, K407, K408, K410, K104, K105, K106, K107, K108, K109, K110, \ - K200, K201, K202, K203, K500, K501, K502, K503, K505, K506, K507, K508, K509, K204, K205, K206, K207, K208, K209, K810, \ - K800, K801, K802, K803, K600, K601, K602, K603, K606, K607, K608, K609, K510, K610, K807, K808, K809, \ - K900, K901, K902, K903, K700, K701, K702, K703, K705, K706, K707, K708, K709, K906, K907, K908, K909, KA10, \ - KA00, KA01, KA02, K805, K604, K605, K904, K905, KA04, KA05, KA06, KA07, KA09 \ + k00, k01, k02, k03, k30, k31, k32, k33, k36, k37, k38, k39, k3A, k04, k05, k06, \ +\ + k10, k11, k12, k13, k40, k41, k42, k43, k44, k45, k46, k47, k48, k4A, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k50, k51, k52, k53, k55, k56, k57, k58, k59, k24, k25, k26, k27, k28, k29, k8A, \ + k80, k81, k82, k83, k60, k61, k62, k63, k66, k67, k68, k69, k5A, k6A, k87, k88, k89, \ + k90, k91, k92, k93, k70, k71, k72, k73, k75, k76, k77, k78, k79, k96, k97, k98, k99, kAA, \ + kA0, kA1, kA2, k85, k64, k65, k94, k95, kA4, kA5, kA6, kA7, kA9 \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, KC_NO }, \ - { K300, K301, K302, K303, KC_NO, KC_NO, K306, K307, K308, K309, K310 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, KC_NO, K410 }, \ - { K500, K501, K502, K503, KC_NO, K505, K506, K507, K508, K509, K510 }, \ - { K600, K601, K602, K603, K604, K605, K606, K607, K608, K609, K610 }, \ - { K700, K701, K702, K703, KC_NO, K705, K706, K707, K708, K709, KC_NO }, \ - { K800, K801, K802, K803, KC_NO, K805, KC_NO, K807, K808, K809, K810 }, \ - { K900, K901, K902, K903, K904, K905, K906, K907, K908, K909, KC_NO }, \ - { KA00, KA01, KA02, KC_NO, KA04, KA05, KA06, KA07, KC_NO, KA09, KA10 } \ + { k00, k01, k02, k03, k04, k05, k06, XXX, XXX, XXX, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, XXX }, \ + { k30, k31, k32, k33, XXX, XXX, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, XXX, k4A }, \ + { k50, k51, k52, k53, XXX, k55, k56, k57, k58, k59, k5A }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, k78, k79, XXX }, \ + { k80, k81, k82, k83, XXX, k85, XXX, k87, k88, k89, k8A }, \ + { k90, k91, k92, k93, k94, k95, k96, k97, k98, k99, XXX }, \ + { kA0, kA1, kA2, XXX, kA4, kA5, kA6, kA7, XXX, kA9, kAA } \ } // Winkeyless ANSI Keyboard #define LAYOUT_fullsize_ansi_wkl( \ - K000, K001, K002, K003, K300, K301, K302, K303, K306, K307, K308, K309, K310, K004, K005, K006, \ - K100, K101, K102, K103, K400, K401, K402, K403, K404, K405, K406, K407, K408, K410, K104, K105, K106, K107, K108, K109, K110, \ - K200, K201, K202, K203, K500, K501, K502, K503, K505, K506, K507, K508, K509, K510, K204, K205, K206, K207, K208, K209, K810, \ - K800, K801, K802, K803, K600, K601, K602, K603, K606, K607, K608, K609, K610, K807, K808, K809, \ - K900, K902, K903, K700, K701, K702, K703, K705, K706, K707, K708, K709, K906, K907, K908, K909, KA10, \ - KA00, KA02, K805, K605, K905, KA04, KA05, KA06, KA07, KA09 \ + k00, k01, k02, k03, k30, k31, k32, k33, k36, k37, k38, k39, k3A, k04, k05, k06, \ +\ + k10, k11, k12, k13, k40, k41, k42, k43, k44, k45, k46, k47, k48, k4A, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k50, k51, k52, k53, k55, k56, k57, k58, k59, k5A, k24, k25, k26, k27, k28, k29, k8A, \ + k80, k81, k82, k83, k60, k61, k62, k63, k66, k67, k68, k69, k6A, k87, k88, k89, \ + k90, k92, k93, k70, k71, k72, k73, k75, k76, k77, k78, k79, k96, k97, k98, k99, kAA, \ + kA0, kA2, k85, k65, k95, kA4, kA5, kA6, kA7, kA9 \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, KC_NO }, \ - { K300, K301, K302, K303, KC_NO, KC_NO, K306, K307, K308, K309, K310 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, KC_NO, K410 }, \ - { K500, K501, K502, K503, KC_NO, K505, K506, K507, K508, K509, K510 }, \ - { K600, K601, K602, K603, KC_NO, K605, K606, K607, K608, K609, K610 }, \ - { K700, K701, K702, K703, KC_NO, K705, K706, K707, K708, K709, KC_NO }, \ - { K800, K801, K802, K803, KC_NO, K805, KC_NO, K807, K808, K809, K810 }, \ - { K900, KC_NO, K902, K903, KC_NO, K905, K906, K907, K908, K909, KC_NO }, \ - { KA00, KC_NO, KA02, KC_NO, KA04, KA05, KA06, KA07, KC_NO, KA09, KA10 } \ + { k00, k01, k02, k03, k04, k05, k06, XXX, XXX, XXX, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, XXX }, \ + { k30, k31, k32, k33, XXX, XXX, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, XXX, k4A }, \ + { k50, k51, k52, k53, XXX, k55, k56, k57, k58, k59, k5A }, \ + { k60, k61, k62, k63, XXX, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, k78, k79, XXX }, \ + { k80, k81, k82, k83, XXX, k85, XXX, k87, k88, k89, k8A }, \ + { k90, XXX, k92, k93, XXX, k95, k96, k97, k98, k99, XXX }, \ + { kA0, XXX, kA2, XXX, kA4, kA5, kA6, kA7, XXX, kA9, kAA } \ } // Winkeyless ISO Keyboard #define LAYOUT_fullsize_iso_wkl( \ - K000, K001, K002, K003, K300, K301, K302, K303, K306, K307, K308, K309, K310, K004, K005, K006, \ - K100, K101, K102, K103, K400, K401, K402, K403, K404, K405, K406, K407, K408, K410, K104, K105, K106, K107, K108, K109, K110, \ - K200, K201, K202, K203, K500, K501, K502, K503, K505, K506, K507, K508, K509, K204, K205, K206, K207, K208, K209, K810, \ - K800, K801, K802, K803, K600, K601, K602, K603, K606, K607, K608, K609, K510, K610, K807, K808, K809, \ - K900, K901, K902, K903, K700, K701, K702, K703, K705, K706, K707, K708, K709, K906, K907, K908, K909, KA10, \ - KA00, KA02, K805, K605, K905, KA04, KA05, KA06, KA07, KA09 \ + k00, k01, k02, k03, k30, k31, k32, k33, k36, k37, k38, k39, k3A, k04, k05, k06, \ +\ + k10, k11, k12, k13, k40, k41, k42, k43, k44, k45, k46, k47, k48, k4A, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k50, k51, k52, k53, k55, k56, k57, k58, k59, k24, k25, k26, k27, k28, k29, k8A, \ + k80, k81, k82, k83, k60, k61, k62, k63, k66, k67, k68, k69, k5A, k6A, k87, k88, k89, \ + k90, k91, k92, k93, k70, k71, k72, k73, k75, k76, k77, k78, k79, k96, k97, k98, k99, kAA, \ + kA0, kA2, k85, k65, k95, kA4, kA5, kA6, kA7, kA9 \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, KC_NO }, \ - { K300, K301, K302, K303, KC_NO, KC_NO, K306, K307, K308, K309, K310 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, KC_NO, K410 }, \ - { K500, K501, K502, K503, KC_NO, K505, K506, K507, K508, K509, K510 }, \ - { K600, K601, K602, K603, KC_NO, K605, K606, K607, K608, K609, K610 }, \ - { K700, K701, K702, K703, KC_NO, K705, K706, K707, K708, K709, KC_NO }, \ - { K800, K801, K802, K803, KC_NO, K805, KC_NO, K807, K808, K809, K810 }, \ - { K900, K901, K902, K903, KC_NO, K905, K906, K907, K908, K909, KC_NO }, \ - { KA00, KC_NO, KA02, KC_NO, KA04, KA05, KA06, KA07, KC_NO, KA09, KA10 } \ + { k00, k01, k02, k03, k04, k05, k06, XXX, XXX, XXX, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, XXX }, \ + { k30, k31, k32, k33, XXX, XXX, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, XXX, k4A }, \ + { k50, k51, k52, k53, XXX, k55, k56, k57, k58, k59, k5A }, \ + { k60, k61, k62, k63, XXX, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, k78, k79, XXX }, \ + { k80, k81, k82, k83, XXX, k85, XXX, k87, k88, k89, k8A }, \ + { k90, k91, k92, k93, XXX, k95, k96, k97, k98, k99, XXX }, \ + { kA0, XXX, kA2, XXX, kA4, kA5, kA6, kA7, XXX, kA9, kAA } \ } - -#endif diff --git a/keyboards/gmmk/pro/ansi/keymaps/benschaeff/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/benschaeff/keymap.c index 834727827c..5f3e3f5fd8 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/benschaeff/keymap.c +++ b/keyboards/gmmk/pro/ansi/keymaps/benschaeff/keymap.c @@ -20,7 +20,7 @@ enum userspace_layers { }; //custom keycodes -#define MODS_ALT_MASK (MOD_BIT(KC_LALT)) // Make ALT layer for encoder use +#define MODS_ALT_MASK (MOD_BIT(KC_LALT)) // Make ALT layer for encoder use #define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)) // Make CTRL layer for encoder use #define SWAP_L SGUI(KC_LEFT) // Swap application to left display #define SWAP_R SGUI(KC_RGHT) // Swap application to right display diff --git a/keyboards/gray_studio/cod67/cod67.h b/keyboards/gray_studio/cod67/cod67.h index ed4a729971..85ebbab61b 100644 --- a/keyboards/gray_studio/cod67/cod67.h +++ b/keyboards/gray_studio/cod67/cod67.h @@ -13,24 +13,21 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef COD67_H -#define COD67_H + +#pragma once #include "quantum.h" #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K48, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K40, K41, K42, K43, K44, K45, K46, K47, K0D, K49, K4A, K4B, K4C, K4D \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k48, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k0D, k49, k4A, k4B, k4C, k4D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D } \ } - -#endif diff --git a/keyboards/gskt00/config.h b/keyboards/gskt00/config.h deleted file mode 100755 index 8ab0583cc8..0000000000 --- a/keyboards/gskt00/config.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6061 -#define DEVICE_VER 0x0001 -#define MANUFACTURER inachie -#define PRODUCT GSKT00 - -/* key matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 8 - -/* key matrix pins */ -#define MATRIX_ROW_PINS { F1, D1, D2, D4, D6, F7, B0, F4 } -#define MATRIX_COL_PINS { F6, D7, F5, C7, B4, C6, B6, B5 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE - -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/gskt00/gskt00.c b/keyboards/gskt00/gskt00.c deleted file mode 100755 index 89a0040ff3..0000000000 --- a/keyboards/gskt00/gskt00.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "gskt00.h" - diff --git a/keyboards/gskt00/gskt00.h b/keyboards/gskt00/gskt00.h deleted file mode 100755 index 90e9a1ad5a..0000000000 --- a/keyboards/gskt00/gskt00.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef GSKT00_H -#define GSKT00_H - -#include "quantum.h" - -#define LAYOUT_all( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \ - K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ - K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ - K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \ - K30, K40, K50, K60, K00, K10, K20 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, K22, K23, K24, K25, K26, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, K41, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { KC_NO, K71, K72, K73, K74, K75, K76, K77 } \ -} - -#define LAYOUT_60_iso_tsangan( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \ - K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, \ - K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K24, K23, /* enter */ \ - K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \ - K30, K40, K50, K60, K00, K10, K20 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { KC_NO, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, K41, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { KC_NO, K71, K72, K73, K74, K75, K76, K77 } \ -} - -#define LAYOUT_60_ansi_tsangan( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \ - K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ - K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ - K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \ - K30, K40, K50, K60, K00, K10, K20 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { KC_NO, K71, K72, K73, K74, K75, K76, K77 } \ -} - -#endif diff --git a/keyboards/gskt00/readme.md b/keyboards/gskt00/readme.md deleted file mode 100644 index ad03ac819f..0000000000 --- a/keyboards/gskt00/readme.md +++ /dev/null @@ -1,17 +0,0 @@ -# GSKT-00 PCB - -Firmware for the GSKT-00 PCB - -Keyboard Maintainer: [/u/iNachie](https://github.com/nachie) -Hardware Supported: GSKT-00 PCB -Hardware Availability: [/u/iNachie](https://www.reddit.com/user/inachie/) - -Make example for this keyboard (after setting up your build environment): - - make gskt00:default - -Or to make and flash: - - make gskt00:default:dfu - -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/hadron/hadron.h b/keyboards/hadron/hadron.h index c11774729f..349311270e 100644 --- a/keyboards/hadron/hadron.h +++ b/keyboards/hadron/hadron.h @@ -1,33 +1,27 @@ -#ifndef HADRON_H -#define HADRON_H +#pragma once #include "quantum.h" -#ifdef KEYBOARD_hadron_ver0 - #include "ver0.h" -#endif -#ifdef KEYBOARD_hadron_ver2 - #include "ver2.h" -#endif -#ifdef KEYBOARD_hadron_ver3 - #include "ver3.h" +#if defined(KEYBOARD_hadron_ver0) +# include "ver0.h" +#elif defined(KEYBOARD_hadron_ver2) +# include "ver2.h" +#elif defined(KEYBOARD_hadron_ver3) +# include "ver3.h" #endif +#define XXX KC_NO #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E \ - ) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, KC_NO, KC_NO, KC_NO }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, XXX, XXX, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E } \ } - - -#endif diff --git a/keyboards/hadron/i2c.c b/keyboards/hadron/i2c.c deleted file mode 100644 index cd2b835d50..0000000000 --- a/keyboards/hadron/i2c.c +++ /dev/null @@ -1,166 +0,0 @@ -#include <util/twi.h> -#include <avr/io.h> -#include <stdlib.h> -#include <avr/interrupt.h> -#include <util/twi.h> -#include <stdbool.h> -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<<TWINT)) && lim < I2C_LOOP_TIMEOUT) - lim++; - - // easier way, but will wait slightly longer - // _delay_us(100); -} - -// Setup twi to run at 100kHz -void i2c_master_init(void) { - // no prescaler - TWSR = 0; - // Set TWI clock frequency to SCL_CLOCK. Need TWBR>10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN); - - i2c_delay(); - - // check that we started successfully - if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START)) - return 1; - - // send device address - TWDR = address; - TWCR = (1<<TWINT) | (1<<TWEN); - - i2c_delay(); - - if ( (TW_STATUS != TW_MT_SLA_ACK) && (TW_STATUS != TW_MR_SLA_ACK) ) - return 1; // slave did not acknowledge - else - return 0; // success -} - - -// Finish the i2c transaction. -void i2c_master_stop(void) { - TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO); - - uint16_t lim = 0; - while(!(TWCR & (1<<TWSTO)) && lim < I2C_LOOP_TIMEOUT) - lim++; -} - -// Write one byte to the i2c slave. -// returns 0 => slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<<TWINT) | (1<<TWEN); - - i2c_delay(); - - // check if the slave acknowledged us - return (TW_STATUS == TW_MT_DATA_ACK) ? 0 : 1; -} - -// Read one byte from the i2c slave. If ack=1 the slave is acknowledged, -// if ack=0 the acknowledge bit is not set. -// returns: byte read from i2c device -uint8_t i2c_master_read(int ack) { - TWCR = (1<<TWINT) | (1<<TWEN) | (ack<<TWEA); - - i2c_delay(); - return TWDR; -} - -void i2c_reset_state(void) { - TWCR = 0; -} - -void i2c_slave_init(uint8_t address) { - TWAR = address << 0; // slave i2c address - // TWEN - twi enable - // TWEA - enable address acknowledgement - // TWINT - twi interrupt flag - // TWIE - enable the twi interrupt - TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN); -} - -ISR(TWI_vect); - -ISR(TWI_vect) { - uint8_t ack = 1; - switch(TW_STATUS) { - case TW_SR_SLA_ACK: - // this device has been addressed as a slave receiver - slave_has_register_set = false; - break; - - case TW_SR_DATA_ACK: - // this device has received data as a slave receiver - // The first byte that we receive in this transaction sets the location - // of the read/write location of the slaves memory that it exposes over - // i2c. After that, bytes will be written at slave_buffer_pos, incrementing - // slave_buffer_pos after each write. - if(!slave_has_register_set) { - slave_buffer_pos = TWDR; - // don't acknowledge the master if this memory loctaion is out of bounds - if ( slave_buffer_pos >= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN); -} - - - -#endif diff --git a/keyboards/hadron/i2c.h b/keyboards/hadron/i2c.h deleted file mode 100644 index 2bd7f40968..0000000000 --- a/keyboards/hadron/i2c.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef I2C_H -#define I2C_H - -#include <stdint.h> - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency -#define SCL_CLOCK 800000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/hadron/ver2/config.h b/keyboards/hadron/ver2/config.h index e051db209c..c992f7fe33 100644 --- a/keyboards/hadron/ver2/config.h +++ b/keyboards/hadron/ver2/config.h @@ -28,10 +28,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { F6, F7, D6, C7, F5, F4, F1, F0, D2, D3, D5, B3, B2, B1, B0 } #define UNUSED_PINS - -#define USE_I2C -#define SSD1306OLED -#define OLED_ROTATE180 +// configure oled driver for the 128x32 oled +#define OLED_UPDATE_INTERVAL 33 // ~30fps /* ws2812 RGB LED*/ #define RGB_DI_PIN D4 diff --git a/keyboards/hadron/ver2/keymaps/default/keymap.c b/keyboards/hadron/ver2/keymaps/default/keymap.c index 8e3d50d3d7..f24239aa22 100644 --- a/keyboards/hadron/ver2/keymaps/default/keymap.c +++ b/keyboards/hadron/ver2/keymaps/default/keymap.c @@ -1,10 +1,4 @@ #include QMK_KEYBOARD_H -#ifdef USE_I2C -#include "i2c.h" -#endif -#ifdef SSD1306OLED -#include "ssd1306.h" -#endif //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; @@ -18,8 +12,8 @@ extern rgblight_config_t rgblight_config; #define _DVORAK 2 #define _LOWER 3 #define _RAISE 4 -#define _MOUSECURSOR 8 -#define _ADJUST 16 +#define _MOUSECURSOR 5 +#define _ADJUST 6 enum preonic_keycodes { QWERTY = SAFE_RANGE, @@ -307,115 +301,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -//Functions for ver2 -#ifdef KEYBOARD_hadron_ver2 -#include <LUFA/Drivers/Peripheral/TWI.h> void matrix_init_user(void) { - #ifdef USE_I2C - i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - iota_gfx_init(); // turns on the display - #endif - #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - iota_gfx_task(); // this is what updates the display continuously - #endif -} - -void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} -//assign the right code to your layers for OLED display -#define L_BASE 0 -#define L_LOWER 8 -#define L_RAISE 16 -#define L_FNLAYER 64 -#define L_NUMLAY 128 -#define L_NLOWER 136 -#define L_NFNLAYER 192 -#define L_MOUSECURSOR 256 -#define L_ADJUST 65560 - -void iota_gfx_task_user(void) { -#if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } -#endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("USB: ")); -#ifdef PROTOCOL_LUFA - switch (USB_DeviceState) { - case DEVICE_STATE_Unattached: - matrix_write_P(&matrix, PSTR("Unattached")); - break; - case DEVICE_STATE_Suspended: - matrix_write_P(&matrix, PSTR("Suspended")); - break; - case DEVICE_STATE_Configured: - matrix_write_P(&matrix, PSTR("Connected")); - break; - case DEVICE_STATE_Powered: - matrix_write_P(&matrix, PSTR("Powered")); - break; - case DEVICE_STATE_Default: - matrix_write_P(&matrix, PSTR("Default")); - break; - case DEVICE_STATE_Addressed: - matrix_write_P(&matrix, PSTR("Addressed")); - break; - default: - matrix_write_P(&matrix, PSTR("Invalid")); - } +#ifdef AUDIO_ENABLE + startup_user(); #endif - -// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); - matrix_write_P(&matrix, PSTR("\n\nLayer: ")); - switch (layer_state) { - case L_BASE: - matrix_write_P(&matrix, PSTR("Default")); - break; - case L_RAISE: - matrix_write_P(&matrix, PSTR("Raise")); - break; - case L_LOWER: - matrix_write_P(&matrix, PSTR("Lower")); - break; - case L_ADJUST: - matrix_write_P(&matrix, PSTR("ADJUST")); - break; - default: - matrix_write(&matrix, buf); - } - - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s", - (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ", - (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ", - (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); - matrix_write(&matrix, led); - matrix_update(&display, &matrix); } - -#endif diff --git a/keyboards/hadron/ver2/keymaps/readme.md b/keyboards/hadron/ver2/keymaps/readme.md deleted file mode 100644 index 2f7641d185..0000000000 --- a/keyboards/hadron/ver2/keymaps/readme.md +++ /dev/null @@ -1,22 +0,0 @@ -# How to add your own keymap - -Folders can be named however you'd like (will be approved upon merging), or should follow the format with a preceding `_`: - - _[ISO 3166-1 alpha-2 code*]_[layout variant]_[layout name/author] - -\* See full list: https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements - -and contain the following files: - -* `keymap.c` -* `readme.md` *recommended* -* `config.h` *optional*, found automatically when compiling -* `Makefile` *optional*, found automatically when compling - -When adding your keymap to this list, keep it organised alphabetically (select list, edit->sort lines), and use this format: - - * **folder_name** description - -# List of Planck keymaps - -* **default** default Planck layout diff --git a/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c b/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c index c63ae93855..74f95b4b75 100644 --- a/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c +++ b/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c @@ -1,15 +1,4 @@ #include QMK_KEYBOARD_H -#include <LUFA/Drivers/Peripheral/TWI.h> -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#ifdef USE_I2C -#include "i2c.h" -#endif -#ifdef SSD1306OLED -#include "ssd1306.h" -#endif -extern keymap_config_t keymap_config; //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; @@ -19,12 +8,12 @@ extern rgblight_config_t rgblight_config; // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. #define _QWERTY 0 -#define _LOWER 3 -#define _RAISE 4 -#define _FNLAYER 6 -#define _NUMLAY 7 -#define _MOUSECURSOR 8 -#define _ADJUST 16 +#define _LOWER 1 +#define _RAISE 2 +#define _FNLAYER 3 +#define _NUMLAY 4 +#define _MOUSECURSOR 5 +#define _ADJUST 6 enum preonic_keycodes { QWERTY = SAFE_RANGE, @@ -41,10 +30,7 @@ enum preonic_keycodes { RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL, -}; - -enum macro_keycodes { - KC_DEMOMACRO, + DEMOMACRO, }; // Custom macros @@ -57,7 +43,6 @@ enum macro_keycodes { #define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor #define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise #define TG_NUMLAY TG(_NUMLAY) //Toggle for layer _NUMLAY -#define DEMOMACRO M(KC_DEMOMACRO) // My login macros const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -322,29 +307,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case DEMOMACRO: + if (record->event.pressed) { + SEND_STRING("hello world"); + } + return false; + break; } return true; } void matrix_init_user(void) { - #ifdef USE_I2C - i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - iota_gfx_init(); // turns on the display - #endif - #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - iota_gfx_task(); // this is what updates the display continuously - #endif +#ifdef AUDIO_ENABLE + startup_user(); +#endif } #ifdef AUDIO_ENABLE @@ -373,109 +349,3 @@ void music_scale_user(void) } #endif - -/* - * Macro definition - */ -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - if (!eeconfig_is_enabled()) { - eeconfig_init(); - } - - switch (id) { - case KC_DEMOMACRO: - if (record->event.pressed){ - return MACRO (I(1), T(H),T(E),T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END); - } - } - - return MACRO_NONE; -} - -void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -//assign the right code to your layers for OLED display -#define L_BASE 0 -#define L_LOWER 8 -#define L_RAISE 16 -#define L_FNLAYER 64 -#define L_NUMLAY 128 -#define L_NLOWER 136 -#define L_NFNLAYER 192 -#define L_MOUSECURSOR 256 -#define L_ADJUST 65560 - -void iota_gfx_task_user(void) { -#if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } -#endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("USB: ")); -#ifdef PROTOCOL_LUFA - switch (USB_DeviceState) { - case DEVICE_STATE_Unattached: - matrix_write_P(&matrix, PSTR("Unattached")); - break; - case DEVICE_STATE_Suspended: - matrix_write_P(&matrix, PSTR("Suspended")); - break; - case DEVICE_STATE_Configured: - matrix_write_P(&matrix, PSTR("Connected")); - break; - case DEVICE_STATE_Powered: - matrix_write_P(&matrix, PSTR("Powered")); - break; - case DEVICE_STATE_Default: - matrix_write_P(&matrix, PSTR("Default")); - break; - case DEVICE_STATE_Addressed: - matrix_write_P(&matrix, PSTR("Addressed")); - break; - default: - matrix_write_P(&matrix, PSTR("Invalid")); - } -#endif - -// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); - matrix_write_P(&matrix, PSTR("\n\nLayer: ")); - switch (layer_state) { - case L_BASE: - matrix_write_P(&matrix, PSTR("Default")); - break; - case L_RAISE: - matrix_write_P(&matrix, PSTR("Raise")); - break; - case L_LOWER: - matrix_write_P(&matrix, PSTR("Lower")); - break; - case L_ADJUST: - matrix_write_P(&matrix, PSTR("ADJUST")); - break; - default: - matrix_write(&matrix, buf); - } - - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s", - (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ", - (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ", - (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); - matrix_write(&matrix, led); - matrix_update(&display, &matrix); -} diff --git a/keyboards/hadron/ver2/rules.mk b/keyboards/hadron/ver2/rules.mk index e9200d1066..1d28cc0714 100644 --- a/keyboards/hadron/ver2/rules.mk +++ b/keyboards/hadron/ver2/rules.mk @@ -5,26 +5,19 @@ MCU = atmega32u4 BOOTLOADER = halfkay # 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 +# comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +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 -NKRO_ENABLE = yes # 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 -AUDIO_ENABLE = no # Audio output -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - +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 - - -EXTRAFLAGS += -flto - - -SRC = i2c.c \ - ssd1306.c +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 +AUDIO_ENABLE = no # Audio output +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/hadron/ver2/ver2.c b/keyboards/hadron/ver2/ver2.c index f00b4f26d6..abf21d4256 100644 --- a/keyboards/hadron/ver2/ver2.c +++ b/keyboards/hadron/ver2/ver2.c @@ -1 +1,65 @@ #include "ver2.h" + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; } + +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + oled_write_P(PSTR("LAYER "), false); + oled_write_char(get_highest_layer(layer_state) + 0x30, true); + + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(18, 0); + oled_write_P(PSTR("NUM"), led_state.num_lock); + oled_set_cursor(18, 1); + oled_write_P(PSTR("CAP"), led_state.caps_lock); + oled_set_cursor(18, 2); + oled_write_P(PSTR("SCR"), led_state.scroll_lock); + + uint8_t mod_state = get_mods(); + oled_set_cursor(10, 3); + oled_write_P(PSTR("S"), mod_state & MOD_MASK_SHIFT); + oled_advance_char(); + oled_write_P(PSTR("C"), mod_state & MOD_MASK_CTRL); + oled_advance_char(); + oled_write_P(PSTR("A"), mod_state & MOD_MASK_ALT); + oled_advance_char(); + oled_write_P(PSTR("G"), mod_state & MOD_MASK_GUI); + oled_advance_char(); + +/* Matrix display is 12 x 12 pixels */ +#define MATRIX_DISPLAY_X 5 +#define MATRIX_DISPLAY_Y 18 + + // matrix + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + for (uint8_t y = 0; y < MATRIX_COLS; y++) { + bool on = (matrix_get_row(x) & (1 << y)) > 0; + oled_write_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2, on); + } + } + + // outline + for (uint8_t x = 0; x < 19; x++) { + oled_write_pixel(MATRIX_DISPLAY_X + x, MATRIX_DISPLAY_Y, true); + oled_write_pixel(MATRIX_DISPLAY_X + x, MATRIX_DISPLAY_Y + 9, true); + } + for (uint8_t y = 0; y < 9; y++) { + oled_write_pixel(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y+y, true); + oled_write_pixel(MATRIX_DISPLAY_X + 19, MATRIX_DISPLAY_Y+y, true); + } + + // oled location + for (uint8_t x = 0; x < 3; x++) { + oled_write_pixel(MATRIX_DISPLAY_X + 14 + x, MATRIX_DISPLAY_Y + 2, true); + } + + // bodge for layer number left hand side + for (uint8_t y = 0; y < 8; y++) { + oled_write_pixel(35, 0 + y, true); + } + return false; +} +#endif diff --git a/keyboards/hadron/ver2/ver2.h b/keyboards/hadron/ver2/ver2.h index 54e141ffac..8127b497f7 100644 --- a/keyboards/hadron/ver2/ver2.h +++ b/keyboards/hadron/ver2/ver2.h @@ -1,6 +1,3 @@ -#ifndef VER2_H -#define VER2_H +#pragma once -#include "../hadron.h" - -#endif
\ No newline at end of file +#include "hadron.h" diff --git a/keyboards/hadron/ver3/config.h b/keyboards/hadron/ver3/config.h index 574dc6b016..54fab6662d 100644 --- a/keyboards/hadron/ver3/config.h +++ b/keyboards/hadron/ver3/config.h @@ -15,8 +15,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef REV3_CONFIG_H -#define REV3_CONFIG_H +#pragma once /* USB Device descriptor parameter */ #define DEVICE_VER 0x0003 @@ -70,16 +69,8 @@ #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f #endif -//configure qwiic micro_oled driver for the 128x32 oled -#ifdef QWIIC_MICRO_OLED_ENABLE - -#undef I2C_ADDRESS_SA0_1 -#define I2C_ADDRESS_SA0_1 0b0111100 -#define LCDWIDTH 128 -#define LCDHEIGHT 32 -#define micro_oled_rotate_180 - -#endif +// configure oled driver for the 128x32 oled +#define OLED_UPDATE_INTERVAL 33 // ~30fps /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ // #define DEBOUNCE 6 @@ -186,5 +177,3 @@ // #define RGB_MATRIX_KEYPRESSES #define SOLENOID_PIN A14 - -#endif diff --git a/keyboards/hadron/ver3/keymaps/default/config.h b/keyboards/hadron/ver3/keymaps/default/config.h deleted file mode 100644 index 6f70f09bee..0000000000 --- a/keyboards/hadron/ver3/keymaps/default/config.h +++ /dev/null @@ -1 +0,0 @@ -#pragma once diff --git a/keyboards/hadron/ver3/keymaps/default/keymap.c b/keyboards/hadron/ver3/keymaps/default/keymap.c index cec43e95d4..b897ffcab1 100644 --- a/keyboards/hadron/ver3/keymaps/default/keymap.c +++ b/keyboards/hadron/ver3/keymaps/default/keymap.c @@ -9,8 +9,8 @@ #define _DVORAK 2 #define _LOWER 3 #define _RAISE 4 -#define _MOUSECURSOR 8 -#define _ADJUST 16 +#define _MOUSECURSOR 5 +#define _ADJUST 6 enum preonic_keycodes { QWERTY = SAFE_RANGE, diff --git a/keyboards/hadron/ver3/keymaps/readme.md b/keyboards/hadron/ver3/keymaps/readme.md deleted file mode 100644 index 66bf06b711..0000000000 --- a/keyboards/hadron/ver3/keymaps/readme.md +++ /dev/null @@ -1,24 +0,0 @@ -# How to add your own keymap - -Folders can be named however you'd like (will be approved upon merging), or should follow the format with a preceding `_`: - - _[ISO 3166-1 alpha-2 code*]_[layout variant]_[layout name/author] - -\* See full list: https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements - -and contain the following files: - -* `keymap.c` -* `readme.md` *recommended* -* `config.h` *optional*, found automatically when compiling -* `Makefile` *optional*, found automatically when compling - -When adding your keymap to this list, keep it organised alphabetically (select list, edit->sort lines), and use this format: - - * **folder_name** description - -# List of Hadron keymaps - -* **default** default Hadron layout -* **ishtob** ishtob's Hadron layout -* **sebaslayout** sebaslayout's Hadron layout
\ No newline at end of file diff --git a/keyboards/hadron/ver3/rules.mk b/keyboards/hadron/ver3/rules.mk index f3cc14b17d..c8681a1418 100644 --- a/keyboards/hadron/ver3/rules.mk +++ b/keyboards/hadron/ver3/rules.mk @@ -21,7 +21,8 @@ AUDIO_ENABLE = yes RGBLIGHT_ENABLE = yes RGB_MATRIX_ENABLE = no # once arm_rgb is implemented RGB_MATRIX_DRIVER = WS2812 -HAPTIC_ENABLE += DRV2605L -QWIIC_ENABLE = yes -QWIIC_DRIVERS += MICRO_OLED +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = DRV2605L +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLER = yes diff --git a/keyboards/hadron/ver3/ver3.c b/keyboards/hadron/ver3/ver3.c index 0664bf4b0e..4c5a2e0c9a 100644 --- a/keyboards/hadron/ver3/ver3.c +++ b/keyboards/hadron/ver3/ver3.c @@ -14,9 +14,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "ver3.h" -#include "qwiic.h" -#include "action_layer.h" -#include "haptic.h" #ifdef RGB_MATRIX_ENABLE @@ -36,185 +33,66 @@ led_config_t g_led_config = { { #endif -uint8_t *o_fb; +#ifdef OLED_ENABLE +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; } -uint16_t counterst = 0; - - - -#ifdef QWIIC_MICRO_OLED_ENABLE - -/* screen off after this many milliseconds */ -#include "timer.h" -#define ScreenOffInterval 60000 /* milliseconds */ -static uint16_t last_flush; - -volatile uint8_t led_numlock = false; -volatile uint8_t led_capslock = false; -volatile uint8_t led_scrolllock = false; - -static uint8_t layer; -static bool queue_for_send = false; -static uint8_t encoder_value = 32; - -__attribute__ ((weak)) -void draw_ui(void) { - clear_buffer(); - last_flush = timer_read(); - send_command(DISPLAYON); - -/* Layer indicator is 41 x 10 pixels */ -#define LAYER_INDICATOR_X 5 -#define LAYER_INDICATOR_Y 0 - - draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0); - draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM); - draw_char(LAYER_INDICATOR_X + 34, LAYER_INDICATOR_Y + 2, layer + 0x30, PIXEL_ON, XOR, 0); - -/* Matrix display is 19 x 9 pixels */ +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + oled_write_P(PSTR("LAYER"), false); + oled_advance_char(); + oled_write_char(get_highest_layer(layer_state) + 0x30, true); + + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(18, 0); + oled_write_P(PSTR("NUM"), led_state.num_lock); + oled_set_cursor(18, 1); + oled_write_P(PSTR("CAP"), led_state.caps_lock); + oled_set_cursor(18, 2); + oled_write_P(PSTR("SCR"), led_state.scroll_lock); + + uint8_t mod_state = get_mods(); + oled_set_cursor(10, 3); + oled_write_P(PSTR("S"), mod_state & MOD_MASK_SHIFT); + oled_advance_char(); + oled_write_P(PSTR("C"), mod_state & MOD_MASK_CTRL); + oled_advance_char(); + oled_write_P(PSTR("A"), mod_state & MOD_MASK_ALT); + oled_advance_char(); + oled_write_P(PSTR("G"), mod_state & MOD_MASK_GUI); + oled_advance_char(); + +/* Matrix display is 12 x 12 pixels */ #define MATRIX_DISPLAY_X 5 #define MATRIX_DISPLAY_Y 18 - for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - for (uint8_t y = 0; y < MATRIX_COLS; y++) { - draw_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM); - } - } - draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 19, 9, PIXEL_ON, NORM); - /* hadron oled location on thumbnail */ - draw_rect_filled_soft(MATRIX_DISPLAY_X + 14, MATRIX_DISPLAY_Y + 2, 3, 1, PIXEL_ON, NORM); -/* - draw_rect_soft(0, 13, 64, 6, PIXEL_ON, NORM); - draw_line_vert(encoder_value, 13, 6, PIXEL_ON, NORM); - -*/ + // matrix + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + for (uint8_t y = 0; y < MATRIX_COLS; y++) { + bool on = (matrix_get_row(x) & (1 << y)) > 0; -/* Mod display is 41 x 16 pixels */ -#define MOD_DISPLAY_X 30 -#define MOD_DISPLAY_Y 18 + // force on for oled location + if((x == 0) && (y >= (MATRIX_COLS - 3))) on = 1; - uint8_t mods = get_mods(); - if (mods & MOD_LSFT) { - draw_rect_filled_soft(MOD_DISPLAY_X + 0, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LCTL) { - draw_rect_filled_soft(MOD_DISPLAY_X + 10, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LALT) { - draw_rect_filled_soft(MOD_DISPLAY_X + 20, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LGUI) { - draw_rect_filled_soft(MOD_DISPLAY_X + 30, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_ON, NORM, 0); - } - -/* Lock display is 23 x 32 */ -#define LOCK_DISPLAY_X 100 -#define LOCK_DISPLAY_Y 0 - - if (led_numlock == true) { - draw_rect_filled_soft(LOCK_DISPLAY_X, LOCK_DISPLAY_Y, 5 + (3 * 6), 9, PIXEL_ON, NORM); - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 1, "NUM", PIXEL_OFF, NORM, 0); - } else if (led_numlock == false) { - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 1, "NUM", PIXEL_ON, NORM, 0); - } - if (led_capslock == true) { - draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y + 11, 5 + (3 * 6), 9, PIXEL_ON, NORM); - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "CAP", PIXEL_OFF, NORM, 0); - } else if (led_capslock == false) { - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "CAP", PIXEL_ON, NORM, 0); - } - - if (led_scrolllock == true) { - draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y + 22, 5 + (3 * 6), 9, PIXEL_ON, NORM); - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 22 +1, "SCR", PIXEL_OFF, NORM, 0); - } else if (led_scrolllock == false) { - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 22 +1, "SCR", PIXEL_ON, NORM, 0); - } - send_buffer(); -} - -void read_host_led_state(void) { - uint8_t leds = host_keyboard_leds(); - if (leds & (1 << USB_LED_NUM_LOCK)) { - if (led_numlock == false){ - led_numlock = true;} - } else { - if (led_numlock == true){ - led_numlock = false;} + oled_write_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2, on); + } } - if (leds & (1 << USB_LED_CAPS_LOCK)) { - if (led_capslock == false){ - led_capslock = true;} - } else { - if (led_capslock == true){ - led_capslock = false;} + + // outline + for (uint8_t x = 0; x < 19; x++) { + oled_write_pixel(MATRIX_DISPLAY_X + x, MATRIX_DISPLAY_Y, true); + oled_write_pixel(MATRIX_DISPLAY_X + x, MATRIX_DISPLAY_Y + 9, true); } - if (leds & (1 << USB_LED_SCROLL_LOCK)) { - if (led_scrolllock == false){ - led_scrolllock = true;} - } else { - if (led_scrolllock == true){ - led_scrolllock = false;} + for (uint8_t y = 0; y < 9; y++) { + oled_write_pixel(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y+y, true); + oled_write_pixel(MATRIX_DISPLAY_X + 19, MATRIX_DISPLAY_Y+y, true); } -} - -uint32_t layer_state_set_kb(uint32_t state) { - state = layer_state_set_user(state); - layer = biton32(state); - queue_for_send = true; - return state; -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - queue_for_send = true; - return process_record_user(keycode, record); -} - -bool encoder_update_user(uint8_t index, bool clockwise); -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) return false; - encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64; - queue_for_send = true; - return true; -} - -#endif - -void matrix_init_kb(void) { - queue_for_send = true; - matrix_init_user(); + // bodge for layer number left hand side + for (uint8_t y = 0; y < 8; y++) { + oled_write_pixel(35, 0 + y, true); + } + return false; } - -void matrix_scan_kb(void) { -if (queue_for_send) { -#ifdef QWIIC_MICRO_OLED_ENABLE - read_host_led_state(); - draw_ui(); #endif - queue_for_send = false; - } -#ifdef QWIIC_MICRO_OLED_ENABLE - if (timer_elapsed(last_flush) > ScreenOffInterval) { - send_command(DISPLAYOFF); /* 0xAE */ - } -#endif - if (counterst == 0) { - //testPatternFB(o_fb); - } - counterst = (counterst + 1) % 1024; - //rgblight_task(); - matrix_scan_user(); -} diff --git a/keyboards/halfcliff/halfcliff.c b/keyboards/halfcliff/halfcliff.c index 4e2910b846..9e3f64d284 100644 --- a/keyboards/halfcliff/halfcliff.c +++ b/keyboards/halfcliff/halfcliff.c @@ -27,14 +27,18 @@ enum layer_names { /* _FN */ }; -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { if (!is_keyboard_master()) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } return rotation; } +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; } -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } if (!is_keyboard_master()) { static const char PROGMEM qmk_logo[] = { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, @@ -68,6 +72,7 @@ __attribute__((weak)) void oled_task_user(void) { oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK\n") : PSTR(" \n"), false); } + return false; } #endif diff --git a/keyboards/handwired/108key_trackpoint/config.h b/keyboards/handwired/108key_trackpoint/config.h index b1ac790d76..b5bf98271a 100644 --- a/keyboards/handwired/108key_trackpoint/config.h +++ b/keyboards/handwired/108key_trackpoint/config.h @@ -12,14 +12,8 @@ #define MATRIX_COLS 23 #ifdef PS2_USE_USART - #define PS2_CLOCK_PORT PORTD - #define PS2_CLOCK_PIN PIND - #define PS2_CLOCK_DDR DDRD - #define PS2_CLOCK_BIT 5 - #define PS2_DATA_PORT PORTD - #define PS2_DATA_PIN PIND - #define PS2_DATA_DDR DDRD - #define PS2_DATA_BIT 2 +#define PS2_CLOCK_PIN D5 +#define PS2_DATA_PIN D2 /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ /* set DDR of CLOCK as input to be slave */ diff --git a/keyboards/handwired/412_64/412_64.h b/keyboards/handwired/412_64/412_64.h index 27a32f15aa..9601f1257c 100644 --- a/keyboards/handwired/412_64/412_64.h +++ b/keyboards/handwired/412_64/412_64.h @@ -1,29 +1,23 @@ - -#ifndef FOURx16_H -#define FOURx16_H +#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 // The second converts the arguments into a two-dimensional array #define LAYOUT_ortho_4x16( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, \ - K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K30, K31, \ - K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, K44, K45, K46, K47, \ - K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K60, K61, K62, K63 \ -) \ -{ \ - { K00, K02, K04, K06, K08, K10, K12, K14 }, \ - { K01, K03, K05, K07, K09, K11, K13, K15 }, \ - { K16, K18, K20, K22, K24, K26, K28, K30 }, \ - { K17, K19, K21, K23, K25, K27, K29, K31 }, \ - { K32, K34, K36, K38, K40, K42, K44, K46 }, \ - { K33, K35, K37, K39, K41, K43, K45, K47 }, \ - { K48, K50, K52, K54, K56, K58, K60, K62 }, \ - { K49, K51, K53, K55, K57, K59, K61, K63 } \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 } \ } - -#endif diff --git a/keyboards/handwired/42/rules.mk b/keyboards/handwired/42/rules.mk index 3a6f75b2e3..72d7ebf915 100644 --- a/keyboards/handwired/42/rules.mk +++ b/keyboards/handwired/42/rules.mk @@ -23,4 +23,5 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/handwired/amigopunk/keymaps/default/keymap.c b/keyboards/handwired/amigopunk/keymaps/default/keymap.c index b7df62979a..3a64958fad 100644 --- a/keyboards/handwired/amigopunk/keymaps/default/keymap.c +++ b/keyboards/handwired/amigopunk/keymaps/default/keymap.c @@ -85,8 +85,9 @@ static void render_amigopunk_logo(void) { }; oled_write_raw_P(amigopunk_logo, sizeof(amigopunk_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { render_amigopunk_logo(); /* oled_write_P(PSTR("Amigo Punk\n"), false); */ + return false; } #endif diff --git a/keyboards/handwired/arrow_pad/arrow_pad.h b/keyboards/handwired/arrow_pad/arrow_pad.h index b93fd113f2..2d677beb5c 100644 --- a/keyboards/handwired/arrow_pad/arrow_pad.h +++ b/keyboards/handwired/arrow_pad/arrow_pad.h @@ -1,5 +1,4 @@ -#ifndef ARROW_PAD_H -#define ARROW_PAD_H +#pragma once #include "quantum.h" #include "matrix.h" @@ -10,34 +9,34 @@ #include <avr/io.h> #include <stddef.h> +#define XXX KC_NO + // This is the 21-key keypad to 4x6 element matrix mapping #define LAYOUT( \ - KM_ESC, KM_TAB, KM_BSL, KM_ARR, \ - KM_NUM, KM_FSL, KM_AST, KM_MIN, \ - KM___7, KM___8, KM___9, KM_EQU, \ - KM___4, KM___5, KM___6, KM_PLS, \ - KM___1, KM___2, KM___3, ___ENT, \ - KM___0, _____0, KM_DOT, KM_ENT \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43, \ + k50, k51, k52, k53 \ ) { \ - { KM_ESC, KM_TAB, KM_BSL, KM_ARR }, \ - { KM_NUM, KM_FSL, KM_AST, KM_MIN }, \ - { KM___7, KM___8, KM___9, KM_EQU }, \ - { KM___4, KM___5, KM___6, KM_PLS }, \ - { KM___1, KM___2, KM___3, KC_NO }, \ - { KM___0, KC_NO, KM_DOT, KM_ENT } \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 }, \ + { k40, k41, k42, k43 }, \ + { k50, k51, k52, k53 } \ } // This is the 21-key keypad to 2x11 element matrix mapping #define LAYOUT_pad21( \ - KM_ESC, KM_TAB, KM_BSL, KM_ARR, \ - KM_NUM, KM_FSL, KM_AST, KM_MIN, \ - KM___7, KM___8, KM___9, \ - KM___4, KM___5, KM___6, KM_PLS, \ - KM___1, KM___2, KM___3, \ - KM___0, KM_DOT, KM_ENT \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k04, k05, k06, \ + k14, k15, k16, k07, \ + k08, k09, k0A, \ + k19, k1A, k17 \ ) { \ - { KM_ESC, KM_TAB, KM_BSL, KM_ARR, KM___7, KM___8, KM___9, KM_PLS, KM___1, KM___2, KM___3, }, \ - { KM_NUM, KM_FSL, KM_AST, KM_MIN, KM___4, KM___5, KM___6, KM_ENT, KC_NO, KM___0, KM_DOT, }, \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19, k1A } \ } - -#endif diff --git a/keyboards/handwired/arrow_pad/config.h b/keyboards/handwired/arrow_pad/config.h index b23c5db8f0..dcbdef2fcc 100644 --- a/keyboards/handwired/arrow_pad/config.h +++ b/keyboards/handwired/arrow_pad/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -102,5 +101,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/atreus50/atreus50.h b/keyboards/handwired/atreus50/atreus50.h index a53c267424..710292a187 100644 --- a/keyboards/handwired/atreus50/atreus50.h +++ b/keyboards/handwired/atreus50/atreus50.h @@ -1,23 +1,21 @@ -#ifndef ATREUS50_H -#define ATREUS50_H +#pragma once #include "quantum.h" +#define XXX KC_NO + // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - 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, km0, km1, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, km0, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, km1, k36, k37, k38, k39, k3a, k3b } \ + 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, kM0, kM1, k36, k37, k38, k39, k3A, k3B \ +) { \ + { k00, k01, k02, k03, k04, k05, XXX, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, XXX, k16, k17, k18, k19, k1A, k1B }, \ + { k20, k21, k22, k23, k24, k25, kM0, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, k33, k34, k35, kM1, k36, k37, k38, k39, k3A, k3B } \ } #define KC_ KC_TRNS - -#endif diff --git a/keyboards/handwired/atreus50/config.h b/keyboards/handwired/atreus50/config.h index 062892347c..4a385c35cf 100644 --- a/keyboards/handwired/atreus50/config.h +++ b/keyboards/handwired/atreus50/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -102,5 +101,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/bdn9_ble/rules.mk b/keyboards/handwired/bdn9_ble/rules.mk index c73855bdee..79dba772f3 100644 --- a/keyboards/handwired/bdn9_ble/rules.mk +++ b/keyboards/handwired/bdn9_ble/rules.mk @@ -21,6 +21,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH = AdafruitBLE # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = no +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/handwired/cmd60/cmd60.h b/keyboards/handwired/cmd60/cmd60.h index 2e0baa9997..5c196e899f 100644 --- a/keyboards/handwired/cmd60/cmd60.h +++ b/keyboards/handwired/cmd60/cmd60.h @@ -1,20 +1,19 @@ -#ifndef CMD60_H -#define CMD60_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3D, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ - ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, KC_NO, K3D }, \ - { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3D, \ + k40, k41, k42, k45, k4A, k4B, k4C, k4D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, XXX, XXX, k3D }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4A, k4B, k4C, k4D } \ } - -#endif diff --git a/keyboards/handwired/cmd60/config.h b/keyboards/handwired/cmd60/config.h index 80f37055f2..ba54cab247 100644 --- a/keyboards/handwired/cmd60/config.h +++ b/keyboards/handwired/cmd60/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -103,5 +102,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/d48/keymaps/anderson/keymap.c b/keyboards/handwired/d48/keymaps/anderson/keymap.c index 0699780718..11bc62e537 100644 --- a/keyboards/handwired/d48/keymaps/anderson/keymap.c +++ b/keyboards/handwired/d48/keymaps/anderson/keymap.c @@ -251,7 +251,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_0; } -void oled_task_user(void) { +bool oled_task_user(void) { /* Host Keyboard Layer Status */ uint8_t current_layer = get_highest_layer(layer_state); @@ -337,5 +337,6 @@ void oled_task_user(void) { } } + return false; } #endif diff --git a/keyboards/handwired/d48/keymaps/default/keymap.c b/keyboards/handwired/d48/keymaps/default/keymap.c index 66b8dd714f..4c3925c7ed 100644 --- a/keyboards/handwired/d48/keymaps/default/keymap.c +++ b/keyboards/handwired/d48/keymaps/default/keymap.c @@ -196,7 +196,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_0; } -void oled_task_user(void) { +bool oled_task_user(void) { /* Host Keyboard Layer Status */ uint8_t current_layer = get_highest_layer(layer_state); @@ -282,5 +282,6 @@ void oled_task_user(void) { } } + return false; } #endif diff --git a/keyboards/handwired/dactyl/config.h b/keyboards/handwired/dactyl/config.h index 10c43d1307..29a008f0c6 100644 --- a/keyboards/handwired/dactyl/config.h +++ b/keyboards/handwired/dactyl/config.h @@ -17,8 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef DACTYL_CONFIG_H -#define DACTYL_CONFIG_H +#pragma once #include "config_common.h" @@ -64,5 +63,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DEBOUNCE 15 #define USB_MAX_POWER_CONSUMPTION 500 - -#endif diff --git a/keyboards/handwired/dactyl/dactyl.h b/keyboards/handwired/dactyl/dactyl.h index a6a043496c..b901b67673 100644 --- a/keyboards/handwired/dactyl/dactyl.h +++ b/keyboards/handwired/dactyl/dactyl.h @@ -1,5 +1,4 @@ -#ifndef DACTYL_H -#define DACTYL_H +#pragma once #include "quantum.h" #include <stdint.h> @@ -25,39 +24,31 @@ extern bool i2c_initialized; void init_dactyl(void); void init_expander(void); -/* - * LEFT HAND: LINES 38-45 - * RIGHT HAND: LINES 47-54 - */ -#define LAYOUT_dactyl( \ - \ - k00,k01,k02,k03,k04,k05, \ - k10,k11,k12,k13,k14,k15, \ - k20,k21,k22,k23,k24,k25, \ - k30,k31,k32,k33,k34,k35, \ - k40,k41,k42,k43,k44, \ - k55,k50, \ - k54, \ - k53,k52,k51, \ - \ - k06,k07,k08,k09,k0A,k0B, \ - k16,k17,k18,k19,k1A,k1B, \ - k26,k27,k28,k29,k2A,k2B, \ - k36,k37,k38,k39,k3A,k3B, \ - k47,k48,k49,k4A,k4B, \ - k5B,k56, \ - k57, \ - k5A,k59,k58 ) \ - \ - /* matrix positions */ \ - { \ - { 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, k36, k37, k38, k39, k3A, k3B }, \ - { k40, k41, k42, k43, k44, KC_NO, KC_NO, k47, k48, k49, k4A, k4B }, \ - { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B }, \ - } +#define XXX KC_NO - -#endif +#define LAYOUT_dactyl( \ + k00, k01, k02, k03, k04, k05, \ + k10, k11, k12, k13, k14, k15, \ + k20, k21, k22, k23, k24, k25, \ + k30, k31, k32, k33, k34, k35, \ + k40, k41, k42, k43, k44, \ + k55, k50, \ + k54, \ + k53, k52, k51, \ +\ + k06, k07, k08, k09, k0A, k0B, \ + k16, k17, k18, k19, k1A, k1B, \ + k26, k27, k28, k29, k2A, k2B, \ + k36, k37, k38, k39, k3A, k3B, \ + k47, k48, k49, k4A, k4B, \ + k5B, k56, \ + k57, \ + k5A, k59, k58 \ +) { \ + { 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, k36, k37, k38, k39, k3A, k3B }, \ + { k40, k41, k42, k43, k44, XXX, XXX, k47, k48, k49, k4A, k4B }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B } \ +} diff --git a/keyboards/handwired/dactyl_manuform/5x6_2_5/config.h b/keyboards/handwired/dactyl_manuform/5x6_2_5/config.h index 79ea625d9e..cb147654ba 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_2_5/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6_2_5/config.h @@ -34,9 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // // right half adafruit feather // #define MATRIX_COL_PINS { F1, F0, B1, B2, B3, D2 } // #define MATRIX_ROW_PINS { D6, B7, B6, B5, D7, C6 } -// #define AdafruitBleResetPin D4 -// #define AdafruitBleCSPin B4 -// #define AdafruitBleIRQPin E6 #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c index fd8c16420e..1e164081f2 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c @@ -115,7 +115,7 @@ void write_quote(const char* data, const uint8_t num_lines) { } } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_logo(); oled_advance_page(/* clearPageRemainder */ true); @@ -559,6 +559,7 @@ void oled_task_user(void) { break; } } + return false; } bool encoder_update_user(uint8_t index, bool clockwise) { diff --git a/keyboards/handwired/fivethirteen/config.h b/keyboards/handwired/fivethirteen/config.h index fc7c3a7e7a..45b459a0ad 100644 --- a/keyboards/handwired/fivethirteen/config.h +++ b/keyboards/handwired/fivethirteen/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -103,5 +102,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/fivethirteen/fivethirteen.h b/keyboards/handwired/fivethirteen/fivethirteen.h index 6d14b7f1c0..ffa0bd59d5 100644 --- a/keyboards/handwired/fivethirteen/fivethirteen.h +++ b/keyboards/handwired/fivethirteen/fivethirteen.h @@ -1,21 +1,19 @@ -#ifndef FIVETHIRTEEN_H -#define FIVETHIRTEEN_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, \ - k40, k41, k42, k43, k44, k46, k47, k48, k49, k410, k411, k412 \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012 }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112 }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212 }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312 }, \ - { k40, k41, k42, k43, k44, KC_NO, k46, k47, k48, k49, k410, k411, k412 } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, \ + k40, k41, k42, k43, k44, k46, k47, k48, k49, k4A, k4B, k4C \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C }, \ + { k40, k41, k42, k43, k44, XXX, k46, k47, k48, k49, k4A, k4B, k4C } \ } - -#endif diff --git a/keyboards/handwired/fruity60/rules.mk b/keyboards/handwired/fruity60/rules.mk index a5ab76a314..855bd38313 100644 --- a/keyboards/handwired/fruity60/rules.mk +++ b/keyboards/handwired/fruity60/rules.mk @@ -21,8 +21,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE LAYOUTS = 60_tsangan_hhkb diff --git a/keyboards/handwired/gamenum/config.h b/keyboards/handwired/gamenum/config.h index 13a14c7cf8..1be44a1156 100644 --- a/keyboards/handwired/gamenum/config.h +++ b/keyboards/handwired/gamenum/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -103,5 +102,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/gamenum/gamenum.h b/keyboards/handwired/gamenum/gamenum.h index 3a1429ff8c..48883b1185 100644 --- a/keyboards/handwired/gamenum/gamenum.h +++ b/keyboards/handwired/gamenum/gamenum.h @@ -1,21 +1,19 @@ -#ifndef GAMENUM_H -#define GAMENUM_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, \ - k30, k31, k32, \ - k41, k42, k43 \ -) \ -{ \ - { k00, k01, k02, k03 }, \ - { k10, k11, k12, k13 }, \ - { k20, k21, k22, KC_NO }, \ - { k30, k31, k32, KC_NO }, \ - { KC_NO, k41, k42, k43 } \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, \ + k41, k42, k43 \ +) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, XXX }, \ + { k30, k31, k32, XXX }, \ + { XXX, k41, k42, k43 } \ } - -#endif diff --git a/keyboards/handwired/hacked_motospeed/rules.mk b/keyboards/handwired/hacked_motospeed/rules.mk index 79bfe8a86a..6a8ad8fe82 100644 --- a/keyboards/handwired/hacked_motospeed/rules.mk +++ b/keyboards/handwired/hacked_motospeed/rules.mk @@ -18,7 +18,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in -BLUETOOTH = RN42 +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = RN42 diff --git a/keyboards/handwired/jn68m/jn68m.h b/keyboards/handwired/jn68m/jn68m.h index d47f9f6c9c..a5500824bb 100644 --- a/keyboards/handwired/jn68m/jn68m.h +++ b/keyboards/handwired/jn68m/jn68m.h @@ -13,37 +13,37 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef JN68M_H -#define JN68M_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K1 , K2 , K3 , K4 , K5 , K6 , K7 , K8 , K9 , K10, K11, K12, K13, K14, K67, K68,\ - K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K69, K70,\ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, \ - K43, K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, \ - K56, K57, K58, K59, K60, K61, K63, K64, K65, K66 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3B, k3C, k3E, \ + k40, k41, k42, k45, k49, k4B, k4C, k4D, k4E, k4F \ ) { \ - { K1 , K2 , K3 , K4 , K5 , K6 , K7 , K8 , K9 , K10, K11, K12, K13, K14, K67, K68 }, \ - { K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K69, K70 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42,KC_NO,KC_NO,KC_NO}, \ - { K43, K44, K45, K46, K47, K48, K49, K50, K51, K52,KC_NO,K53, K54,KC_NO,K55,KC_NO}, \ - { K56, K57, K58,KC_NO,KC_NO,K59,KC_NO,KC_NO,KC_NO,K60,KC_NO,K61, K63, K64, K65, K66} \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, XXX, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, XXX, k3B, k3C, XXX, k3E, XXX }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, XXX, k4B, k4C, k4D, k4E, k4F } \ } #define LAYOUT_splitbs( \ - K1 , K2 , K3 , K4 , K5 , K6 , K7 , K8 , K9 , K10, K11, K12, K13, K14, K15, K67, K68,\ - K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K69, K70,\ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, \ - K43, K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, \ - K56, K57, K58, K59, K60, K61, K63, K64, K65, K66 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k2D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3B, k3C, k3E, \ + k40, k41, k42, k45, k49, k4B, k4C, k4D, k4E, k4F \ ) { \ - { K1 , K2 , K3 , K4 , K5 , K6 , K7 , K8 , K9 , K10, K11, K12, K13, K14, K67, K68 }, \ - { K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K69, K70 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K15,KC_NO,KC_NO}, \ - { K43, K44, K45, K46, K47, K48, K49, K50, K51, K52,KC_NO,K53, K54,KC_NO,K55,KC_NO}, \ - { K56, K57, K58,KC_NO,KC_NO,K59,KC_NO,KC_NO,KC_NO,K60,KC_NO,K61, K63, K64, K65, K66} \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, XXX, k3B, k3C, XXX, k3E, XXX }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, XXX, k4B, k4C, k4D, k4E, k4F } \ } - -#endif diff --git a/keyboards/handwired/kbod/kbod.h b/keyboards/handwired/kbod/kbod.h index 5d9dbd05b3..86ff0e8ead 100644 --- a/keyboards/handwired/kbod/kbod.h +++ b/keyboards/handwired/kbod/kbod.h @@ -1,21 +1,22 @@ -#ifndef KBOD_H -#define KBOD_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, \ - k40, k41, k42, k43, k44, k45, k46, k47 \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07 }, { k08, k09, k0A, k0B, k0C, k0D, KC_NO, KC_NO }, \ - { k10, k11, k12, k13, k14, k15, k16, k17 }, { k18, k19, k1A, k1B, k1C, k1D, KC_NO, k3B }, \ - { k20, k21, k22, k23, k24, k25, k26, k27 }, { k28, k29, k2A, k2B, k2C, k38, k39, k3A }, \ - { k30, k31, k32, k33, k34, k35, k36, k37 }, \ - { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k10, k11, k12, k13, k14, k15, \ + k20, k21, k22, k23, k24, k25, k26, k27, k30, k31, k32, k33, k34, k35, \ + k40, k41, k42, k43, k44, k45, k46, k47, k50, k51, k52, k53, k54, \ + k60, k61, k62, k63, k64, k65, k66, k67, k55, k56, k57, k37, \ + k70, k71, k72, k73, k74, k75, k76, k77 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, XXX, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, k31, k32, k33, k34, k35, XXX, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 } \ } - -#endif diff --git a/keyboards/handwired/magicforce68/config.h b/keyboards/handwired/magicforce68/config.h index 9df39f4406..8ad3269d56 100644 --- a/keyboards/handwired/magicforce68/config.h +++ b/keyboards/handwired/magicforce68/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -103,5 +102,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/magicforce68/magicforce68.h b/keyboards/handwired/magicforce68/magicforce68.h index 949507fef7..829e5932b5 100644 --- a/keyboards/handwired/magicforce68/magicforce68.h +++ b/keyboards/handwired/magicforce68/magicforce68.h @@ -1,20 +1,19 @@ -#ifndef MAGICFORCE68_H -#define MAGICFORCE68_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K2E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K3E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, \ - K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D, K4E \ - ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, K3C, K3D, K3E }, \ - { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D, K4E } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k2E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k3E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3C, k3D, \ + k40, k41, k42, k45, k49, k4A, k4B, k4C, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, XXX, k3C, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4A, k4B, k4C, k4D, k4E } \ } - -#endif diff --git a/keyboards/handwired/marauder/keymaps/orvia/keymap.c b/keyboards/handwired/marauder/keymaps/orvia/keymap.c index 87a0a93cc7..987e748128 100644 --- a/keyboards/handwired/marauder/keymaps/orvia/keymap.c +++ b/keyboards/handwired/marauder/keymaps/orvia/keymap.c @@ -156,7 +156,7 @@ static void render_anim(void) { } // Used to draw on to the oled screen -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); // renders pixelart oled_set_cursor(0, 0); // sets cursor to (row, column) using charactar spacing (4 rows, 21 full columns on a 128x32 screen, anything more will overflow back to the top) @@ -194,5 +194,6 @@ void oled_task_user(void) { } oled_set_cursor(17, 3); oled_write_P(PSTR("NKRO"), keymap_config.nkro); + return false; } #endif diff --git a/keyboards/handwired/ms_sculpt_mobile/config.h b/keyboards/handwired/ms_sculpt_mobile/config.h index 1b61d8712a..c3c2a0962e 100644 --- a/keyboards/handwired/ms_sculpt_mobile/config.h +++ b/keyboards/handwired/ms_sculpt_mobile/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -85,5 +84,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/ms_sculpt_mobile/ms_sculpt_mobile.h b/keyboards/handwired/ms_sculpt_mobile/ms_sculpt_mobile.h index cfa07c92ef..64d4f7bbc4 100644 --- a/keyboards/handwired/ms_sculpt_mobile/ms_sculpt_mobile.h +++ b/keyboards/handwired/ms_sculpt_mobile/ms_sculpt_mobile.h @@ -1,48 +1,43 @@ -#ifndef MICROSOFT_SCULPT_MOBILE_H -#define MICROSOFT_SCULPT_MOBILE_H +#pragma once #include "quantum.h" +#define XXX KC_NO #define LAYOUT( \ - k7Q, k6O, k6P, k6Q, k5O, k5P, k5Q, k7A, k7B, k7C, k7D, k7E, k7F, k1O, k1K, k1L, \ - k5A, k5K, k5L, k5M, k5N, k5H, k5I, k2A, k2B, k2C, k2D, k5B, k5C, k5J, k2E, \ - k6R, k6D, k6E, k6F, k7I, k7J, k4A, k4B, k4C, k4D, k3A, k3B, k3C, k3D, \ - k0J, k6A, k6B, k6C, k7H, k1A, k1B, k5D, k5E, k5F, k5G, k1C, k7P, k2G, \ - k2P, k7K, k7L, k7M, k7O, k0A, k0B, k0C, k0D, k0E, k0F, k2L, k6G, k1P,\ - k1Q, k4N, k3O,k6N, k3K, k0R, k1M, k6H, k6I, k6J \ -) \ -{ \ - {k0A, k0B, k0C, k0D, k0E, k0F, KC_NO, KC_NO, KC_NO, k0J, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, k0R},\ - {k1A, k1B, k1C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k1K, k1L, k1M, KC_NO, k1O, k1P, k1Q, KC_NO},\ - {k2A, k2B, k2C, k2D, k2E, KC_NO, k2G, KC_NO, KC_NO, KC_NO, KC_NO, k2L, KC_NO, KC_NO, KC_NO, k2P, KC_NO, KC_NO},\ - {k3A, k3B, k3C, k3D, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k3K, KC_NO, KC_NO, KC_NO, k3O, KC_NO, KC_NO, KC_NO},\ - {k4A, k4B, k4C, k4D, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k4N, KC_NO,KC_NO, KC_NO, KC_NO},\ - {k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q, KC_NO },\ - {k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6J, KC_NO, KC_NO, KC_NO, k6N, k6O, k6P, k6Q, k6R},\ - {k7A, k7B, k7C, k7D, k7E, k7F, KC_NO, k7H, k7I, k7J, k7K, k7L, k7M, KC_NO, k7O, k7P, k7Q, KC_NO},\ + k7G, k6E, k6F, k6G, k5E, k5F, k5G, k70, k71, k72, k73, k74, k75, k1E, k1A, k1B, \ + k50, k5A, k5B, k5C, k5D, k57, k58, k20, k21, k22, k23, k51, k52, k59, k24, \ + k6H, k63, k64, k65, k78, k79, k40, k41, k42, k43, k30, k31, k32, k33, \ + k09, k60, k61, k62, k77, k10, k11, k53, k54, k55, k56, k12, k7F, k26, \ + k2F, k7A, k7B, k7C, k7E, k00, k01, k02, k03, k04, k05, k2B, k66, k1F, \ + k1G, k4D, k3E, k6D, k3A, k0H, k1C, k67, k68, k69 \ +) { \ + { k00, k01, k02, k03, k04, k05, XXX, XXX, XXX, k09, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k0H }, \ + { k10, k11, k12, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k1A, k1B, k1C, XXX, k1E, k1F, k1G, XXX }, \ + { k20, k21, k22, k23, k24, XXX, k26, XXX, XXX, XXX, XXX, k2B, XXX, XXX, XXX, k2F, XXX, XXX }, \ + { k30, k31, k32, k33, XXX, XXX, XXX, XXX, XXX, XXX, k3A, XXX, XXX, XXX, k3E, XXX, XXX, XXX }, \ + { k40, k41, k42, k43, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k4D, XXX, XXX, XXX, XXX }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F, k5G, XXX }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, XXX, XXX, XXX, k6D, k6E, k6F, k6G, k6H }, \ + { k70, k71, k72, k73, k74, k75, XXX, k77, k78, k79, k7A, k7B, k7C, XXX, k7E, k7F, k7G, XXX } \ } - #define MATRIX_TESTING_LAYOUT( \ - k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, k0, k0J, k0K, k0L, k0M, k0N, k0O, k0P, k0Q,\ - k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I, k1, k1J, k1K, k1L, k1M, k1N, k1O, k1P, k1Q,\ - k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2I, k2, k2J, k2K, k2L, k2M, k2N, k2O, k2P, k2Q,\ - k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I, k3, k3J, k3K, k3L, k3M, k3N, k3O, k3P, k3Q,\ - k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I, k4, k4J, k4K, k4L, k4M, k4N, k4O, k4P, k4Q,\ - k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q,\ - k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6, k6J, k6K, k6L, k6M, k6N, k6O, k6P, k6Q,\ - k7A, k7B, k7C, k7D, k7E, k7F, k7G, k7H, k7I, k7, k7J, k7K, k7L, k7M, k7N, k7O, k7P, k7Q\ -) \ -{ \ - {k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, k0, k0J, k0K, k0L, k0M, k0N, k0O, k0P, k0Q},\ - {k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I, k1, k1J, k1K, k1L, k1M, k1N, k1O, k1P, k1Q},\ - {k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2I, k2, k2J, k2K, k2L, k2M, k2N, k2O, k2P, k2Q},\ - {k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I, k3, k3J, k3K, k3L, k3M, k3N, k3O, k3P, k3Q},\ - {k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I, k4, k4J, k4K, k4L, k4M, k4N, k4O, k4P, k4Q},\ - {k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q},\ - {k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6, k6J, k6K, k6L, k6M, k6N, k6O, k6P, k6Q},\ - {k7A, k7B, k7C, k7D, k7E, k7F, k7G, k7H, k7I, k7, k7J, k7K, k7L, k7M, k7N, k7O, k7P, k7Q},\ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, \ + k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, \ + k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7A, k7B, k7C, k7D, k7E, k7F, k7G, k7H \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7A, k7B, k7C, k7D, k7E, k7F, k7G, k7H } \ } - -#endif diff --git a/keyboards/handwired/myskeeb/oled.c b/keyboards/handwired/myskeeb/oled.c index ee6aa86556..081ca8395a 100644 --- a/keyboards/handwired/myskeeb/oled.c +++ b/keyboards/handwired/myskeeb/oled.c @@ -1,108 +1,108 @@ // [OLED Configuration] ---------------------------------------------// // Draw - static const char PROGMEM skeeb_logo[] = { + static const char PROGMEM skeeb_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, 0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0}; - static const char PROGMEM oled_header[] = { + static const char PROGMEM oled_header[] = { 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,0}; - - static const char PROGMEM oled_layer_keylog_separator[] = { + + static const char PROGMEM oled_layer_keylog_separator[] = { 0xc8,0xff,0}; - - static const char PROGMEM oled_layer_line_end[] = { + + static const char PROGMEM oled_layer_line_end[] = { 0xd4,0}; - - static const char PROGMEM oled_layer_keylog_bottom[] = { + + static const char PROGMEM oled_layer_keylog_bottom[] = { 0xc1,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc3,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc2,0}; - - static const char PROGMEM oled_line_start[] = { + + static const char PROGMEM oled_line_start[] = { 0xc0,0}; - - static const char PROGMEM oled_mods_bottom[] = { + + static const char PROGMEM oled_mods_bottom[] = { 0xc1,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc2,0}; - - static const char PROGMEM oled_footer[] = { + + static const char PROGMEM oled_footer[] = { 0xc4,0xc5,0xc5,0xc9,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xcb,0xc5,0xc5,0xc6,0}; void render_skeeb_logo(void) { static const char PROGMEM skeeb_logo[] = { -0x00, 0xc0, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, -0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0x81, 0x81, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x19, 0x19, 0xff, 0xff, 0x01, -0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x19, 0x19, 0x99, 0x99, 0x99, -0x99, 0x99, 0x99, 0x01, 0x01, 0xff, 0xff, 0x81, 0x81, 0x7f, 0x7f, 0xff, 0xff, 0x7f, 0x7f, 0x81, -0x81, 0xff, 0xff, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xf9, 0xf9, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, -0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, -0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, -0x0f, 0x0f, 0x0f, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x08, 0x08, 0x0f, 0x0f, 0x08, -0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0f, 0x0f, 0x08, 0x08, 0x0f, 0x0f, 0x0f, -0x0f, 0x0f, 0x0f, 0x08, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0e, 0x0e, 0x09, 0x09, 0x0e, 0x0e, 0x0f, -0x0f, 0x0f, 0x0f, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0f, 0x0f, 0x0f, -0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, -0x00, 0xff, 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, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x10, -0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 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, 0xff, 0x00, -0x00, 0xff, 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, 0x01, 0x00, 0xe0, 0x20, 0x20, 0xe0, 0x00, 0x00, 0x00, -0x00, 0x00, 0xe0, 0x20, 0x20, 0xe0, 0x00, 0x01, 0xfe, 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, 0xff, 0x00, -0x00, 0xff, 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, -0xe0, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3f, 0x00, 0x00, 0xf9, 0x01, 0x01, 0xf9, 0x00, 0x00, 0xf8, -0x00, 0x00, 0xf9, 0x01, 0x01, 0xf9, 0x00, 0x00, 0x3f, 0x20, 0x20, 0x20, 0x20, 0x20, 0xe0, 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, 0xff, 0x00, -0x00, 0xff, 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, -0xff, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xff, 0x01, 0x01, 0xf1, 0x10, 0x10, 0x1f, 0x00, 0x00, 0x3f, -0x00, 0x00, 0x1f, 0x10, 0x10, 0xf3, 0x02, 0x02, 0xf2, 0x12, 0x12, 0x1e, 0x00, 0x00, 0xff, 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, 0xff, 0x00, -0x00, 0xff, 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, -0x0f, 0x00, 0x00, 0x0f, 0x08, 0x08, 0x0f, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0f, -0x00, 0x00, 0x0f, 0x01, 0x01, 0x09, 0x08, 0x08, 0x09, 0x09, 0x09, 0x0f, 0x00, 0x00, 0x0f, 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, 0xff, 0x00, -0x00, 0x03, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xe0, -0xf0, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, -0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, -0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, -0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, -0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, -0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, +0x00, 0xc0, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, +0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +0xff, 0xff, 0xff, 0x81, 0x81, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x19, 0x19, 0xff, 0xff, 0x01, +0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x19, 0x19, 0x99, 0x99, 0x99, +0x99, 0x99, 0x99, 0x01, 0x01, 0xff, 0xff, 0x81, 0x81, 0x7f, 0x7f, 0xff, 0xff, 0x7f, 0x7f, 0x81, +0x81, 0xff, 0xff, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xf9, 0xf9, 0xff, 0xff, 0xff, +0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, +0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, +0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, +0x0f, 0x0f, 0x0f, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x08, 0x08, 0x0f, 0x0f, 0x08, +0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0f, 0x0f, 0x08, 0x08, 0x0f, 0x0f, 0x0f, +0x0f, 0x0f, 0x0f, 0x08, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0e, 0x0e, 0x09, 0x09, 0x0e, 0x0e, 0x0f, +0x0f, 0x0f, 0x0f, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0f, 0x0f, 0x0f, +0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, +0x00, 0xff, 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, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x10, +0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 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, 0xff, 0x00, +0x00, 0xff, 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, 0x01, 0x00, 0xe0, 0x20, 0x20, 0xe0, 0x00, 0x00, 0x00, +0x00, 0x00, 0xe0, 0x20, 0x20, 0xe0, 0x00, 0x01, 0xfe, 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, 0xff, 0x00, +0x00, 0xff, 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, +0xe0, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3f, 0x00, 0x00, 0xf9, 0x01, 0x01, 0xf9, 0x00, 0x00, 0xf8, +0x00, 0x00, 0xf9, 0x01, 0x01, 0xf9, 0x00, 0x00, 0x3f, 0x20, 0x20, 0x20, 0x20, 0x20, 0xe0, 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, 0xff, 0x00, +0x00, 0xff, 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, +0xff, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xff, 0x01, 0x01, 0xf1, 0x10, 0x10, 0x1f, 0x00, 0x00, 0x3f, +0x00, 0x00, 0x1f, 0x10, 0x10, 0xf3, 0x02, 0x02, 0xf2, 0x12, 0x12, 0x1e, 0x00, 0x00, 0xff, 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, 0xff, 0x00, +0x00, 0xff, 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, +0x0f, 0x00, 0x00, 0x0f, 0x08, 0x08, 0x0f, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0f, +0x00, 0x00, 0x0f, 0x01, 0x01, 0x09, 0x08, 0x08, 0x09, 0x09, 0x09, 0x0f, 0x00, 0x00, 0x0f, 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, 0xff, 0x00, +0x00, 0x03, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xe0, +0xf0, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x03, 0x00,0 }; oled_write_raw_P(skeeb_logo, sizeof(skeeb_logo)); } - + // Mods Status void render_mod_status(uint8_t modifiers) { - oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(" "), false); oled_write_P(PSTR("-"), false); oled_write_P(PSTR("SHF"), (modifiers & MOD_MASK_SHIFT)); oled_write_P(PSTR("-"), false); @@ -112,7 +112,7 @@ void render_mod_status(uint8_t modifiers) { oled_write_P(PSTR("-"), false); oled_write_P(PSTR("ALT"), (modifiers & MOD_MASK_ALT)); oled_write_P(PSTR("-"), false); - oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(" "), false); } // Layer State @@ -122,19 +122,19 @@ void render_layer_state(void){ case 1: oled_write_P(PSTR(" MEDIA "), false); break; case 2: oled_write_P(PSTR(" MOBA "), false); break; case 3: oled_write_P(PSTR(" FPS "), false); break; - default: oled_write_P(PSTR("Undefined"), false); + default: oled_write_P(PSTR("Undefined"), false); } } -// Keylock State +// Keylock State void render_keylock_status(uint8_t led_usb_state) { oled_write_P(PSTR(" "), false); oled_write_P(led_usb_state & (1<<USB_LED_NUM_LOCK) ? PSTR("-NUML") : PSTR("-----"), false); oled_write_P(PSTR(" "), false); oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR("-CAPS") : PSTR("-----"), false); oled_write_P(PSTR(" "), false); - oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR("-SCRL") : PSTR("-----"), false); - oled_write_P(PSTR(" "), false); + oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR("-SCRL") : PSTR("-----"), false); + oled_write_P(PSTR(" "), false); } // Keylogger @@ -195,35 +195,36 @@ void render_keylogger_status(void) { // [OLED Init] ------------------------------------------------------// // Rotate Screen -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_180; - } +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; } // {OLED Task} ------------------------------------------------------// -void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } // MASTER SIDE if (is_keyboard_master()) { oled_write_P(oled_header, false); render_layer_state(); oled_write_P(oled_layer_keylog_separator, false); - render_keylogger_status(); + render_keylogger_status(); oled_set_cursor(20, 2); oled_write_P(oled_layer_line_end, false); oled_write_P(oled_layer_keylog_bottom, false); oled_write_P(oled_line_start, false); render_keylock_status(host_keyboard_leds()); - oled_write_P(oled_layer_line_end, false); + oled_write_P(oled_layer_line_end, false); oled_write_P(oled_mods_bottom, false); oled_write_P(oled_line_start, false); - render_mod_status(get_mods() | get_oneshot_mods()); + render_mod_status(get_mods() | get_oneshot_mods()); oled_write_P(oled_layer_line_end, false); - oled_write_P(oled_footer, false); + oled_write_P(oled_footer, false); } - + // SLAVE SIDE else { render_skeeb_logo(); - } + } + return false; } - diff --git a/keyboards/handwired/nicekey/config.h b/keyboards/handwired/nicekey/config.h index d1b18cc282..19e707c1fc 100644 --- a/keyboards/handwired/nicekey/config.h +++ b/keyboards/handwired/nicekey/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -65,5 +64,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/nicekey/nicekey.h b/keyboards/handwired/nicekey/nicekey.h index ee5bcfd6be..f008be168e 100644 --- a/keyboards/handwired/nicekey/nicekey.h +++ b/keyboards/handwired/nicekey/nicekey.h @@ -1,12 +1,9 @@ -#ifndef NICEKEY_H -#define NICEKEY_H +#pragma once #include "quantum.h" #define LAYOUT( \ k00 \ - ) { \ - { k00 } \ +) { \ + { k00 } \ } - -#endif diff --git a/keyboards/handwired/not_so_minidox/config.h b/keyboards/handwired/not_so_minidox/config.h index 9d2174b532..de9286eda5 100644 --- a/keyboards/handwired/not_so_minidox/config.h +++ b/keyboards/handwired/not_so_minidox/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -72,5 +71,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/not_so_minidox/i2c.h b/keyboards/handwired/not_so_minidox/i2c.h index c15b6bc506..8910e70f10 100644 --- a/keyboards/handwired/not_so_minidox/i2c.h +++ b/keyboards/handwired/not_so_minidox/i2c.h @@ -1,5 +1,4 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include <stdint.h> @@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void); extern unsigned char i2c_read(unsigned char ack); #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/handwired/not_so_minidox/not_so_minidox.h b/keyboards/handwired/not_so_minidox/not_so_minidox.h index c24a515e43..7c80dc9b3b 100644 --- a/keyboards/handwired/not_so_minidox/not_so_minidox.h +++ b/keyboards/handwired/not_so_minidox/not_so_minidox.h @@ -1,24 +1,21 @@ -#ifndef NOSOTMINIDOX_H -#define NOSOTMINIDOX_H - +#pragma once #include "quantum.h" -#define LAYOUT( \ - L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ - LT1, LT2, LT3, RT3, RT2, RT1 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { KC_NO, KC_NO, KC_NO, LT1, LT2, LT3 }, \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { KC_NO, KC_NO, KC_NO, RT1, RT2, RT3 }, \ - } +#define XXX KC_NO -#endif +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + LT1, LT2, LT3, RT3, RT2, RT1 \ +) { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { XXX, XXX, XXX, LT1, LT2, LT3 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { XXX, XXX, XXX, RT1, RT2, RT3 } \ +} diff --git a/keyboards/handwired/not_so_minidox/serial.h b/keyboards/handwired/not_so_minidox/serial.h index 15fe4db7b4..28fcc56ce7 100644 --- a/keyboards/handwired/not_so_minidox/serial.h +++ b/keyboards/handwired/not_so_minidox/serial.h @@ -1,5 +1,4 @@ -#ifndef MY_SERIAL_H -#define MY_SERIAL_H +#pragma once #include "config.h" #include <stdbool.h> @@ -22,5 +21,3 @@ void serial_master_init(void); void serial_slave_init(void); int serial_update_buffers(void); bool serial_slave_data_corrupt(void); - -#endif diff --git a/keyboards/handwired/not_so_minidox/split_util.h b/keyboards/handwired/not_so_minidox/split_util.h index 595a0659e1..807412cd38 100644 --- a/keyboards/handwired/not_so_minidox/split_util.h +++ b/keyboards/handwired/not_so_minidox/split_util.h @@ -1,5 +1,4 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H +#pragma once #include <stdbool.h> #include "eeconfig.h" @@ -16,5 +15,3 @@ bool has_usb(void); void keyboard_slave_loop(void); void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/handwired/numpad20/config.h b/keyboards/handwired/numpad20/config.h index d94e23b21d..dba74f43bd 100644 --- a/keyboards/handwired/numpad20/config.h +++ b/keyboards/handwired/numpad20/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -103,5 +102,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/numpad20/numpad20.h b/keyboards/handwired/numpad20/numpad20.h index c15aa9ac70..03fdd6d923 100644 --- a/keyboards/handwired/numpad20/numpad20.h +++ b/keyboards/handwired/numpad20/numpad20.h @@ -1,20 +1,17 @@ -#ifndef NUMPAD20_H -#define NUMPAD20_H +#pragma once #include "quantum.h" #define LAYOUT( \ - K00, K01, K02, K03, \ - K10, K11, K12, K13, \ - K20, K21, K22, K23, \ - K30, K31, K32, K33, \ - K40, K41, K42, K43 \ - ) { \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, K13 }, \ - { K20, K21, K22, K23 }, \ - { K30, K31, K32, K33 }, \ - { K40, K41, K42, K43 } \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43 \ +) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 }, \ + { k40, k41, k42, k43 } \ } - -#endif diff --git a/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c b/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c index 482287740f..c87852da53 100644 --- a/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c +++ b/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c @@ -342,7 +342,7 @@ void matrix_init_user(void) { set_unicode_input_mode(UC_WINC); }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR(" spaget v1\n\n"), false); // Host Keyboard Layer Status @@ -368,6 +368,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCROLL ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c b/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c index 956932329c..1287614a8b 100644 --- a/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c +++ b/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c @@ -17,7 +17,7 @@ #include QMK_KEYBOARD_H void board_init(void) { - // B9 is configured as I2C1_SDA in the board file; that function must be + // B9 is configured as I2C1_SDA_PIN in the board file; that function must be // disabled before using B7 as I2C1_SDA. setPinInputHigh(B9); } diff --git a/keyboards/handwired/onekey/keymaps/oled/keymap.c b/keyboards/handwired/onekey/keymaps/oled/keymap.c index c19b6918c0..e020d5e4b6 100644 --- a/keyboards/handwired/onekey/keymaps/oled/keymap.c +++ b/keyboards/handwired/onekey/keymaps/oled/keymap.c @@ -361,7 +361,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (update_speed_test) { // Speed test mode - wait for screen update completion. if (!oled_dirty) { @@ -450,6 +450,7 @@ void oled_task_user(void) { oled_write_P(PSTR("Draw Once"), false); break; } + return false; } void keyboard_post_init_user(void) { diff --git a/keyboards/handwired/onekey/keymaps/quine/rules.mk b/keyboards/handwired/onekey/keymaps/quine/rules.mk deleted file mode 100644 index 4c2b0289a2..0000000000 --- a/keyboards/handwired/onekey/keymaps/quine/rules.mk +++ /dev/null @@ -1 +0,0 @@ -BOOTLOADER = atmel-dfu diff --git a/keyboards/handwired/onekey/readme.md b/keyboards/handwired/onekey/readme.md index b630b11748..2973b7d873 100644 --- a/keyboards/handwired/onekey/readme.md +++ b/keyboards/handwired/onekey/readme.md @@ -3,7 +3,7 @@ Custom handwired one key keyboard. **See each individual board for pin information.** * Keyboard Maintainer: QMK Community -* Hardware Supported: bluepill, Elite-C, Pro Micro, Proton C, Teensy 2.0, Teensy++ 2.0, Teensy LC, Teensy 3.2 +* Hardware Supported: Blackpill F401/F411, Bluepill, Elite-C, Pro Micro, Proton C, Sipeed Longan Nano, STM32F0 Disco, Teensy 2.0, Teensy++ 2.0, Teensy LC, Teensy 3.2 * Hardware Availability: *n/a* Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/singa/keymaps/test/config.h b/keyboards/handwired/onekey/sipeed_longan_nano/chconf.h index e176ed3479..b1eb18de78 100644 --- a/keyboards/singa/keymaps/test/config.h +++ b/keyboards/handwired/onekey/sipeed_longan_nano/chconf.h @@ -1,4 +1,4 @@ -/* Copyright 2018 amnesia0287 +/* 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,11 +14,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "config_common.h" +#define CH_CFG_ST_RESOLUTION 16 -// place overrides here +#define CH_CFG_ST_FREQUENCY 10000 -#endif +#include_next <chconf.h> diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/config.h b/keyboards/handwired/onekey/sipeed_longan_nano/config.h new file mode 100644 index 0000000000..1825b936d8 --- /dev/null +++ b/keyboards/handwired/onekey/sipeed_longan_nano/config.h @@ -0,0 +1,37 @@ +/* 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 + +#include "config_common.h" + +#define MATRIX_COL_PINS \ + { B0 } +#define MATRIX_ROW_PINS \ + { A7 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN A1 /* Green LED. */ +#define BACKLIGHT_PWM_DRIVER PWMD5 /* GD32 numbering scheme starts from 0, TIMER4 on GD32 boards is TIMER5 on STM32 boards. */ +#define BACKLIGHT_PWM_CHANNEL 2 /* GD32 numbering scheme starts from 0, Channel 1 on GD32 boards is Channel 2 on STM32 boards. */ + +#define RGB_DI_PIN A2 +#define RGB_CI_PIN B13 + +#define ADC_PIN A0 + +#define I2C1_CLOCK_SPEED 1000000 /* GD32VF103 supports fast mode plus. */ +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/halconf.h b/keyboards/handwired/onekey/sipeed_longan_nano/halconf.h new file mode 100644 index 0000000000..2579c58747 --- /dev/null +++ b/keyboards/handwired/onekey/sipeed_longan_nano/halconf.h @@ -0,0 +1,23 @@ +/* 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 HAL_USE_PWM TRUE +#define HAL_USE_ADC TRUE +#define HAL_USE_I2C TRUE + +#include_next <halconf.h> diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/mcuconf.h b/keyboards/handwired/onekey/sipeed_longan_nano/mcuconf.h new file mode 100644 index 0000000000..eba0dd9eeb --- /dev/null +++ b/keyboards/handwired/onekey/sipeed_longan_nano/mcuconf.h @@ -0,0 +1,29 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + ChibiOS - Copyright (C) 2021 Stefan Kerkmann + + 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. +*/ + +#pragma once + +#include_next <mcuconf.h> + +#undef GD32_ADC_USE_ADC0 +#define GD32_ADC_USE_ADC0 TRUE + +#undef GD32_I2C_USE_I2C0 +#define GD32_I2C_USE_I2C0 TRUE + +#undef GD32_PWM_USE_TIM4 +#define GD32_PWM_USE_TIM4 TRUE diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/readme.md b/keyboards/handwired/onekey/sipeed_longan_nano/readme.md new file mode 100644 index 0000000000..0a3a291576 --- /dev/null +++ b/keyboards/handwired/onekey/sipeed_longan_nano/readme.md @@ -0,0 +1,5 @@ +# Sipeed Longan Nano onekey + +Supported Hardware: *GD32VF103CB Sipeed Longan Nano*. + +To trigger keypress, short together pins *B0* and *A7*.
\ No newline at end of file diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/rules.mk b/keyboards/handwired/onekey/sipeed_longan_nano/rules.mk new file mode 100644 index 0000000000..aef4fee6b2 --- /dev/null +++ b/keyboards/handwired/onekey/sipeed_longan_nano/rules.mk @@ -0,0 +1,11 @@ +# MCU name +MCU = GD32VF103 +BOARD = SIPEED_LONGAN_NANO + +# Bootloader selection +BOOTLOADER = gd32v-dfu + +# Build Options +# change yes to no to disable +# +KEYBOARD_SHARED_EP = yes diff --git a/keyboards/handwired/onekey/stm32f405_feather/config.h b/keyboards/handwired/onekey/stm32f405_feather/config.h new file mode 100644 index 0000000000..32d7807975 --- /dev/null +++ b/keyboards/handwired/onekey/stm32f405_feather/config.h @@ -0,0 +1,25 @@ +/* Copyright 2019 + * + * 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 Onekey Adafruit Feather STM32F405 + +#define MATRIX_COL_PINS { C2 } +#define MATRIX_ROW_PINS { C3 } +#define UNUSED_PINS diff --git a/keyboards/handwired/onekey/stm32f405_feather/readme.md b/keyboards/handwired/onekey/stm32f405_feather/readme.md new file mode 100644 index 0000000000..49a05725d5 --- /dev/null +++ b/keyboards/handwired/onekey/stm32f405_feather/readme.md @@ -0,0 +1,7 @@ +# Adafruit Feather STM32F405 Express onekey + +* Supported Hardware: [Adafruit Feather STM32F405 Express](https://www.adafruit.com/product/4382) + +To trigger keypress, short together pins *GPIO 12 / PC2* and *GPIO 11 / PC3*. + +https://learn.adafruit.com/adafruit-stm32f405-feather-express/dfu-bootloader-details#enabling-dfu-bootloader-mode-3045622-2
\ No newline at end of file diff --git a/keyboards/handwired/onekey/stm32f405_feather/rules.mk b/keyboards/handwired/onekey/stm32f405_feather/rules.mk new file mode 100644 index 0000000000..bff7a7e297 --- /dev/null +++ b/keyboards/handwired/onekey/stm32f405_feather/rules.mk @@ -0,0 +1,8 @@ +# MCU name +MCU = STM32F405 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/onekey/teensy_32/config.h b/keyboards/handwired/onekey/teensy_32/config.h index 180f324875..e388b01af8 100644 --- a/keyboards/handwired/onekey/teensy_32/config.h +++ b/keyboards/handwired/onekey/teensy_32/config.h @@ -26,7 +26,7 @@ #define UNUSED_PINS // i2c_master defines -#define I2C1_SCL 0 // A2 on pinout = B0 -#define I2C1_SDA 1 // A3 on pinout = B1 +#define I2C1_SCL_PIN B0 // A2 on pinout = B0 +#define I2C1_SDA_PIN B1 // A3 on pinout = B1 #define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 #define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 diff --git a/keyboards/handwired/onekey/teensy_lc/config.h b/keyboards/handwired/onekey/teensy_lc/config.h index ad30f969f5..4e594e7d7e 100644 --- a/keyboards/handwired/onekey/teensy_lc/config.h +++ b/keyboards/handwired/onekey/teensy_lc/config.h @@ -26,7 +26,7 @@ #define UNUSED_PINS // i2c_master defines -#define I2C1_SCL 0 // A2 on pinout = B0 -#define I2C1_SDA 1 // A3 on pinout = B1 +#define I2C1_SCL_PIN B0 // A2 on pinout = B0 +#define I2C1_SDA_PIN B1 // A3 on pinout = B1 #define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 #define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 diff --git a/keyboards/handwired/ortho5x13/config.h b/keyboards/handwired/ortho5x13/config.h index bab42593d0..d831940b8d 100644 --- a/keyboards/handwired/ortho5x13/config.h +++ b/keyboards/handwired/ortho5x13/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -103,5 +102,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c b/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c index 27a54d80f5..8636ac7536 100644 --- a/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c +++ b/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c @@ -66,7 +66,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { //return OLED_ROTATION_180; return OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status /*oled_write_P(PSTR("Lyr: "), false); switch (get_highest_layer(layer_state)) { @@ -92,5 +92,6 @@ void oled_task_user(void) { }; oled_write_P(qmk_logo, false); + return false; } #endif diff --git a/keyboards/handwired/pilcrow/config.h b/keyboards/handwired/pilcrow/config.h index 735a52f61b..15f487082b 100644 --- a/keyboards/handwired/pilcrow/config.h +++ b/keyboards/handwired/pilcrow/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -103,5 +102,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/pilcrow/pilcrow.h b/keyboards/handwired/pilcrow/pilcrow.h index 37d2914f24..30576e85c0 100644 --- a/keyboards/handwired/pilcrow/pilcrow.h +++ b/keyboards/handwired/pilcrow/pilcrow.h @@ -1,5 +1,4 @@ -#ifndef PILCROW_H -#define PILCROW_H +#pragma once #include "quantum.h" @@ -12,12 +11,9 @@ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 \ -) \ -{ \ +) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 } \ } - -#endif diff --git a/keyboards/handwired/pill60/keymaps/default/keymap.c b/keyboards/handwired/pill60/keymaps/default/keymap.c index 00f506bb43..38c5556fe2 100644 --- a/keyboards/handwired/pill60/keymaps/default/keymap.c +++ b/keyboards/handwired/pill60/keymaps/default/keymap.c @@ -66,8 +66,9 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { render_oled(); + return false; } #endif diff --git a/keyboards/handwired/prime_exl/prime_exl.h b/keyboards/handwired/prime_exl/prime_exl.h index 03524da3c2..1c9a8060fc 100644 --- a/keyboards/handwired/prime_exl/prime_exl.h +++ b/keyboards/handwired/prime_exl/prime_exl.h @@ -13,28 +13,28 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -//#ifndef PRIME_EXL_H -//#define PRIME_EXL_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K047, K057, K048, K058, \ - K030, K060, K031, K061, K032, K062, K033, K063, K034, K064, K035, K065, K036, K066, K037, K067, K038, K068, \ - K020, K070, K021, K071, K022, K072, K023, K073, K024, K074, K025, K075, K085, K026, K076, K027, K077, K028, K078, \ - K010, K080, K011, K081, K012, K082, K013, K083, K014, K084, K015, K016, K086, K017, K087, K018, \ - K000, K090, K001, K091, K002, K092 \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k48, k58, \ + k30, k60, k31, k61, k32, k62, k33, k63, k34, k64, k35, k65, k36, k66, k37, k67, k38, k68, \ + k20, k70, k21, k71, k22, k72, k23, k73, k24, k74, k25, k75, k85, k26, k76, k27, k77, k28, k78, \ + k10, k80, k11, k81, k12, k82, k13, k83, k14, k84, k15, k16, k86, k17, k87, k18, \ + k00, k90, k01, k91, k02, k92 \ ) { \ - { K000, K001, K002, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ - { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ - { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \ - { K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \ - { K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \ - { K060, K061, K062, K063, K064, K065, K066, K067, K068 }, \ - { K070, K071, K072, K073, K074, K075, K076, K077, K078 }, \ - { K080, K081, K082, K083, K084, K085, K086, K087, KC_NO }, \ - { K090, K091, K092, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + { k00, k01, k02, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78 }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, XXX }, \ + { k90, k91, k92, XXX, XXX, XXX, XXX, XXX, XXX } \ } - -//#endif
\ No newline at end of file diff --git a/keyboards/handwired/prkl30/feather/config.h b/keyboards/handwired/prkl30/feather/config.h index 6a9bce38cd..875b3d7401 100644 --- a/keyboards/handwired/prkl30/feather/config.h +++ b/keyboards/handwired/prkl30/feather/config.h @@ -35,9 +35,6 @@ #define ENCODERS_PAD_A { F7 } #define ENCODERS_PAD_B { F6 } #define ENCODER_RESOLUTION 4 -#define AdafruitBleResetPin D4 -#define AdafruitBleCSPin B4 -#define AdafruitBleIRQPin E6 #define UNUSED_PINS /* RGB Light Configuration */ diff --git a/keyboards/handwired/prkl30/feather/rules.mk b/keyboards/handwired/prkl30/feather/rules.mk index 6357015126..df2aa7f1db 100644 --- a/keyboards/handwired/prkl30/feather/rules.mk +++ b/keyboards/handwired/prkl30/feather/rules.mk @@ -10,7 +10,6 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BLUETOOTH = AdafruitBLE BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite ENCODER_ENABLE = yes MOUSEKEY_ENABLE = no # Mouse keys @@ -22,3 +21,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here BACKLIGHT_ENABLE = no AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below RGBLIGHT_ENABLE = no # This can be enabled if a ws2812 strip is connected to the expansion port. + +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index b146767d65..612675c63a 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -224,27 +224,15 @@ enum led_sequence { /* PS/2 mouse */ #ifdef PS2_USE_BUSYWAIT -# define PS2_CLOCK_PORT PORTD -# define PS2_CLOCK_PIN PIND -# define PS2_CLOCK_DDR DDRD -# define PS2_CLOCK_BIT 3 -# define PS2_DATA_PORT PORTD -# define PS2_DATA_PIN PIND -# define PS2_DATA_DDR DDRD -# define PS2_DATA_BIT 2 +# define PS2_CLOCK_PIN D3 +# define PS2_DATA_PIN D2 #endif /* PS/2 mouse interrupt version */ #ifdef PS2_USE_INT /* uses INT1 for clock line(ATMega32U4) */ -# define PS2_CLOCK_PORT PORTD -# define PS2_CLOCK_PIN PIND -# define PS2_CLOCK_DDR DDRD -# define PS2_CLOCK_BIT 3 -# define PS2_DATA_PORT PORTD -# define PS2_DATA_PIN PIND -# define PS2_DATA_DDR DDRD -# define PS2_DATA_BIT 2 +# define PS2_CLOCK_PIN D3 +# define PS2_DATA_PIN D2 # define PS2_INT_INIT() \ do { \ @@ -264,14 +252,8 @@ enum led_sequence { /* PS/2 mouse USART version */ #ifdef PS2_USE_USART /* XCK for clock line and RXD for data line */ -# define PS2_CLOCK_PORT PORTD -# define PS2_CLOCK_PIN PIND -# define PS2_CLOCK_DDR DDRD -# define PS2_CLOCK_BIT 5 -# define PS2_DATA_PORT PORTD -# define PS2_DATA_PIN PIND -# define PS2_DATA_DDR DDRD -# define PS2_DATA_BIT 2 +#define PS2_CLOCK_PIN D5 +#define PS2_DATA_PIN D2 /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ /* set DDR of CLOCK as input to be slave */ diff --git a/keyboards/handwired/promethium/keymaps/default/rules.mk b/keyboards/handwired/promethium/keymaps/default/rules.mk index 4fd8baae27..45b3332456 100644 --- a/keyboards/handwired/promethium/keymaps/default/rules.mk +++ b/keyboards/handwired/promethium/keymaps/default/rules.mk @@ -13,11 +13,9 @@ NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: ht BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output UNICODEMAP_ENABLE = yes -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 -BLUETOOTH = AdafruitBLE # 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/promethium/keymaps/priyadi/rules.mk b/keyboards/handwired/promethium/keymaps/priyadi/rules.mk index 4fd9b656b6..96db4fcbbc 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/rules.mk +++ b/keyboards/handwired/promethium/keymaps/priyadi/rules.mk @@ -15,11 +15,9 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes -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 -BLUETOOTH = AdafruitBLE # 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/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h index f35e5429bd..c4c90176b5 100644 --- a/keyboards/handwired/promethium/promethium.h +++ b/keyboards/handwired/promethium/promethium.h @@ -1,5 +1,4 @@ -#ifndef PROMETHIUM_H -#define PROMETHIUM_H +#pragma once #include <stdint.h> @@ -7,23 +6,22 @@ void battery_poll(uint8_t level); void led_set_kb(uint8_t usb_led); void led_set_user(uint8_t usb_led); +#define XXX KC_NO + #define LAYOUT( \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ - k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75, \ tp1, tp2, tp3 \ -) \ -{ \ - {k11, k12, k13, k14, k15, k16}, \ - {k21, k22, k23, k24, k25, k26}, \ - {k31, k32, k33, k34, k35, k36}, \ - {k41, k42, k43, k44, k45, k46}, \ - {k17, k18, k19, k1a, k1b, k1c}, \ - {k27, k28, k29, k2a, k2b, k2c}, \ - {k37, k38, k39, k3a, k3b, k3c}, \ - {k47, k48, k49, k4a, k4b, k4c}, \ - {tp1, tp2, tp3, KC_NO, KC_NO, KC_NO} \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { k70, k71, k72, k73, k74, k75 }, \ + { tp1, tp2, tp3, XXX, XXX, XXX } \ } - -#endif diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk index bd3b04a2d7..106f30759a 100644 --- a/keyboards/handwired/promethium/rules.mk +++ b/keyboards/handwired/promethium/rules.mk @@ -19,12 +19,12 @@ 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 BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output -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 CUSTOM_MATRIX = yes -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE # 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/pterodactyl/config.h b/keyboards/handwired/pterodactyl/config.h index 9f5f1412b8..044fa12f78 100644 --- a/keyboards/handwired/pterodactyl/config.h +++ b/keyboards/handwired/pterodactyl/config.h @@ -60,7 +60,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 0 - -#define AdafruitBleResetPin D4 -#define AdafruitBleCSPin B4 -#define AdafruitBleIRQPin E6 diff --git a/keyboards/handwired/pterodactyl/rules.mk b/keyboards/handwired/pterodactyl/rules.mk index 56f83265d9..7c8e3c3386 100644 --- a/keyboards/handwired/pterodactyl/rules.mk +++ b/keyboards/handwired/pterodactyl/rules.mk @@ -21,11 +21,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 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 -BLUETOOTH = AdafruitBLE UNICODE_ENABLE = yes CUSTOM_MATRIX = yes +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE SRC += matrix.c QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/handwired/qc60/qc60.h b/keyboards/handwired/qc60/qc60.h index 944ec10f5e..e26811ae72 100644 --- a/keyboards/handwired/qc60/qc60.h +++ b/keyboards/handwired/qc60/qc60.h @@ -1,10 +1,7 @@ -#ifndef QC60_H -#define QC60_H +#pragma once #include "quantum.h" -#ifdef KEYBOARD_handwired_qc60_proto - #include "proto.h" -#endif - +#if defined(KEYBOARD_handwired_qc60_proto) +# include "proto.h" #endif diff --git a/keyboards/handwired/reddot/config.h b/keyboards/handwired/reddot/config.h index 95dcde3261..196f08f6f5 100755 --- a/keyboards/handwired/reddot/config.h +++ b/keyboards/handwired/reddot/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -101,5 +100,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/retro_refit/config.h b/keyboards/handwired/retro_refit/config.h index 089e56bb01..74cebfb825 100644 --- a/keyboards/handwired/retro_refit/config.h +++ b/keyboards/handwired/retro_refit/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -88,5 +87,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/slash/rules.mk b/keyboards/handwired/slash/rules.mk index 82ebd5c103..8688504f63 100644 --- a/keyboards/handwired/slash/rules.mk +++ b/keyboards/handwired/slash/rules.mk @@ -21,5 +21,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH = AdafruitBLE AUDIO_ENABLE = no # Audio output +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/handwired/split65/split65.c b/keyboards/handwired/split65/split65.c index 3b1dcaddae..9d0831c025 100644 --- a/keyboards/handwired/split65/split65.c +++ b/keyboards/handwired/split65/split65.c @@ -18,11 +18,14 @@ // OLED Code inspired by https://github.com/qmk/qmk_firmware/blob/master/keyboards/splitkb/kyria/rev1/rev1.c #ifdef OLED_ENABLE -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_180; +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_180; } -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } if (is_keyboard_master()) { static const char PROGMEM qmk_logo[] = { 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, @@ -126,5 +129,6 @@ __attribute__((weak)) void oled_task_user(void) { }; oled_write_raw_P(split65_logo, sizeof(split65_logo)); } + return false; } #endif diff --git a/keyboards/handwired/swiftrax/koalafications/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/koalafications/keymaps/default/keymap.c index e702c18996..c4ac4c47be 100644 --- a/keyboards/handwired/swiftrax/koalafications/keymaps/default/keymap.c +++ b/keyboards/handwired/swiftrax/koalafications/keymaps/default/keymap.c @@ -119,7 +119,8 @@ static void render_anim(void){ } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); + return false; } #endif diff --git a/keyboards/handwired/swiftrax/koalafications/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/koalafications/keymaps/via/keymap.c index 973b36bffc..b9ce8a8b41 100644 --- a/keyboards/handwired/swiftrax/koalafications/keymaps/via/keymap.c +++ b/keyboards/handwired/swiftrax/koalafications/keymaps/via/keymap.c @@ -119,7 +119,8 @@ static void render_anim(void){ } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); + return false; } #endif diff --git a/keyboards/handwired/swiftrax/the_galleon/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/the_galleon/keymaps/default/keymap.c index efa8c27036..46bd189da1 100644 --- a/keyboards/handwired/swiftrax/the_galleon/keymaps/default/keymap.c +++ b/keyboards/handwired/swiftrax/the_galleon/keymaps/default/keymap.c @@ -99,7 +99,8 @@ static void render_anim(void){ } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); + return false; } #endif diff --git a/keyboards/handwired/swiftrax/the_galleon/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/the_galleon/keymaps/via/keymap.c index efa8c27036..46bd189da1 100644 --- a/keyboards/handwired/swiftrax/the_galleon/keymaps/via/keymap.c +++ b/keyboards/handwired/swiftrax/the_galleon/keymaps/via/keymap.c @@ -99,7 +99,8 @@ static void render_anim(void){ } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); + return false; } #endif diff --git a/keyboards/handwired/symmetric70_proto/post_rules.mk b/keyboards/handwired/symmetric70_proto/post_rules.mk new file mode 100644 index 0000000000..e2d35d60ab --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/post_rules.mk @@ -0,0 +1,2 @@ +KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))local_features.mk +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk b/keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk index de489fcabd..fbc1c3bb38 100644 --- a/keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk +++ b/keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk @@ -1,6 +1,3 @@ CUSTOM_MATRIX = yes SRC += matrix_common.c SRC += matrix_fast/matrix.c - -KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))../../local_features.mk -include $(KEYBOARD_LOCAL_FEATURES_MK) diff --git a/keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk b/keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk index 0b2b707ef8..73192f4ff7 100644 --- a/keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk +++ b/keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk @@ -1,6 +1,3 @@ CUSTOM_MATRIX = yes SRC += matrix_common.c SRC += matrix_debug/matrix.c - -KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))../../local_features.mk -include $(KEYBOARD_LOCAL_FEATURES_MK) diff --git a/keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk b/keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk index de489fcabd..fbc1c3bb38 100644 --- a/keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk +++ b/keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk @@ -1,6 +1,3 @@ CUSTOM_MATRIX = yes SRC += matrix_common.c SRC += matrix_fast/matrix.c - -KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))../../local_features.mk -include $(KEYBOARD_LOCAL_FEATURES_MK) diff --git a/keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk b/keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk index 0b2b707ef8..73192f4ff7 100644 --- a/keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk +++ b/keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk @@ -1,6 +1,3 @@ CUSTOM_MATRIX = yes SRC += matrix_common.c SRC += matrix_debug/matrix.c - -KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))../../local_features.mk -include $(KEYBOARD_LOCAL_FEATURES_MK) diff --git a/keyboards/handwired/terminus_mini/config.h b/keyboards/handwired/terminus_mini/config.h index e3b0c41999..e1d77d55e2 100644 --- a/keyboards/handwired/terminus_mini/config.h +++ b/keyboards/handwired/terminus_mini/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -109,5 +108,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/terminus_mini/terminus_mini.h b/keyboards/handwired/terminus_mini/terminus_mini.h index 27fb450981..f498313cbb 100644 --- a/keyboards/handwired/terminus_mini/terminus_mini.h +++ b/keyboards/handwired/terminus_mini/terminus_mini.h @@ -13,28 +13,27 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TERMINUS_MINI_H -#define TERMINUS_MINI_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The following is an example using the Terminus Mini layout // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - 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, k35, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { 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, KC_NO, k35, KC_NO, k37, k38, k39, k3a, k3b } \ + 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, k35, k37, k38, k39, k3A, k3B \ +) { \ + { 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, XXX, k35, XXX, k37, k38, k39, k3A, k3B } \ } #define KC_ KC_TRNS - -#endif
\ No newline at end of file diff --git a/keyboards/handwired/trackpoint/config.h b/keyboards/handwired/trackpoint/config.h index 1429136f40..cf8b5605f4 100644 --- a/keyboards/handwired/trackpoint/config.h +++ b/keyboards/handwired/trackpoint/config.h @@ -12,14 +12,8 @@ #define MATRIX_COLS 3 #ifdef PS2_USE_USART - #define PS2_CLOCK_PORT PORTD - #define PS2_CLOCK_PIN PIND - #define PS2_CLOCK_DDR DDRD - #define PS2_CLOCK_BIT 5 - #define PS2_DATA_PORT PORTD - #define PS2_DATA_PIN PIND - #define PS2_DATA_DDR DDRD - #define PS2_DATA_BIT 2 +#define PS2_CLOCK_PIN D5 +#define PS2_DATA_PIN D2 /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ /* set DDR of CLOCK as input to be slave */ diff --git a/keyboards/handwired/unicomp_mini_m/info.json b/keyboards/handwired/unicomp_mini_m/info.json index e2438eaeeb..d1a0558aa2 100644 --- a/keyboards/handwired/unicomp_mini_m/info.json +++ b/keyboards/handwired/unicomp_mini_m/info.json @@ -1,7 +1,7 @@ { "keyboard_name": "Unicomp Mini M", - "url": "", "maintainer": "stevendlander", + "url": "", "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/handwired/xealous/rev1/config.h b/keyboards/handwired/xealous/rev1/config.h index 946b0cb489..8bd5b464a4 100644 --- a/keyboards/handwired/xealous/rev1/config.h +++ b/keyboards/handwired/xealous/rev1/config.h @@ -16,8 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#pragma once #include "config_common.h" @@ -81,4 +80,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION #define IGNORE_MOD_TAP_INTERRUPT -#endif diff --git a/keyboards/handwired/xealous/rev1/rev1.h b/keyboards/handwired/xealous/rev1/rev1.h index 0d8913b2ea..88e5ef376e 100644 --- a/keyboards/handwired/xealous/rev1/rev1.h +++ b/keyboards/handwired/xealous/rev1/rev1.h @@ -1,30 +1,26 @@ -#ifndef REV1_H -#define REV1_H +#pragma once #include "quantum.h" #define XXX KC_NO #define LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, L15, R17, R16, R15, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, L25, R26, R25, R24, R23, R22, R21, R20, \ - L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30, \ - L40, L41, L42, L43, L44, R44, R43, R42, R41, R40 \ - ) \ - { \ - { XXX, L06, L05, L04, L03, L02, L01, L00 }, \ - { XXX, XXX, L15, L14, L13, L12, L11, L10 }, \ - { XXX, XXX, L25, L24, L23, L22, L21, L20 }, \ - { XXX, XXX, L35, L34, L33, L32, L31, L30 }, \ - { XXX, XXX, XXX, L44, L43, L42, L41, L40 }, \ - { R00, R01, R02, R03, R04, R05, R06, XXX }, \ - { R10, R11, R12, R13, R14, R15, R16, R17 }, \ - { R20, R21, R22, R23, R24, R25, R26, XXX }, \ - { R30, R31, R32, R33, R34, R35, XXX, XXX }, \ - { R40, R41, R42, R43, R44, XXX, XXX, XXX } \ - } + L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R17, R16, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R26, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30, \ + L40, L41, L42, L43, L44, R44, R43, R42, R41, R40 \ +) { \ + { XXX, L06, L05, L04, L03, L02, L01, L00 }, \ + { XXX, XXX, L15, L14, L13, L12, L11, L10 }, \ + { XXX, XXX, L25, L24, L23, L22, L21, L20 }, \ + { XXX, XXX, L35, L34, L33, L32, L31, L30 }, \ + { XXX, XXX, XXX, L44, L43, L42, L41, L40 }, \ + { R00, R01, R02, R03, R04, R05, R06, XXX }, \ + { R10, R11, R12, R13, R14, R15, R16, R17 }, \ + { R20, R21, R22, R23, R24, R25, R26, XXX }, \ + { R30, R31, R32, R33, R34, R35, XXX, XXX }, \ + { R40, R41, R42, R43, R44, XXX, XXX, XXX } \ +} #define LAYOUT_split60 LAYOUT - -#endif diff --git a/keyboards/helix/local_drivers/i2c.h b/keyboards/helix/local_drivers/i2c.h index 47cf6bd1b2..710662c7ab 100644 --- a/keyboards/helix/local_drivers/i2c.h +++ b/keyboards/helix/local_drivers/i2c.h @@ -1,5 +1,4 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include <stdint.h> @@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void); extern unsigned char i2c_read(unsigned char ack); #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/helix/local_drivers/serial.h b/keyboards/helix/local_drivers/serial.h index 2e53928df2..b4dcdafe57 100644 --- a/keyboards/helix/local_drivers/serial.h +++ b/keyboards/helix/local_drivers/serial.h @@ -1,5 +1,4 @@ -#ifndef SOFT_SERIAL_H -#define SOFT_SERIAL_H +#pragma once #include <stdbool.h> @@ -85,5 +84,3 @@ int soft_serial_transaction(int sstd_index); #ifdef SERIAL_USE_MULTI_TRANSACTION int soft_serial_get_and_clean_status(int sstd_index); #endif - -#endif /* SOFT_SERIAL_H */ diff --git a/keyboards/helix/local_drivers/ssd1306.h b/keyboards/helix/local_drivers/ssd1306.h index bcb30f8859..a7527f4ebc 100644 --- a/keyboards/helix/local_drivers/ssd1306.h +++ b/keyboards/helix/local_drivers/ssd1306.h @@ -1,5 +1,4 @@ -#ifndef SSD1306_H -#define SSD1306_H +#pragma once #include <stdbool.h> #include <stdio.h> @@ -88,5 +87,3 @@ void matrix_write_P(struct CharacterMatrix *matrix, const char *data); void matrix_render(struct CharacterMatrix *matrix); bool process_record_gfx(uint16_t keycode, keyrecord_t *record); - -#endif diff --git a/keyboards/helix/pico/keymaps/biacco/rules.mk b/keyboards/helix/pico/keymaps/biacco/rules.mk index 37e49977c5..993ade2673 100644 --- a/keyboards/helix/pico/keymaps/biacco/rules.mk +++ b/keyboards/helix/pico/keymaps/biacco/rules.mk @@ -18,7 +18,3 @@ LTO_ENABLE = no # if firmware size over limit, try this option # LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = no # LED animations # IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/pico/keymaps/default/rules.mk b/keyboards/helix/pico/keymaps/default/rules.mk index fcf92e6717..8a4a0df28e 100644 --- a/keyboards/helix/pico/keymaps/default/rules.mk +++ b/keyboards/helix/pico/keymaps/default/rules.mk @@ -18,7 +18,3 @@ LTO_ENABLE = no # if firmware size over limit, try this option # LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) # LED_ANIMATIONS = yes # LED animations # IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/pico/keymaps/mtei/rules.mk b/keyboards/helix/pico/keymaps/mtei/rules.mk index 165233f5fe..05a60f67d5 100644 --- a/keyboards/helix/pico/keymaps/mtei/rules.mk +++ b/keyboards/helix/pico/keymaps/mtei/rules.mk @@ -18,7 +18,3 @@ LTO_ENABLE = no # if firmware size over limit, try this option # LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) # LED_ANIMATIONS = yes # LED animations # IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/pico/local_features.mk b/keyboards/helix/pico/post_rules.mk index be5c739f97..38573d75a5 100644 --- a/keyboards/helix/pico/local_features.mk +++ b/keyboards/helix/pico/post_rules.mk @@ -1,12 +1,10 @@ # -# local_features.mk contains post-processing rules for the Helix keyboard. +# post_rules.mk contains post-processing rules for the Helix keyboard. # # Post-processing rules convert keyboard-specific shortcuts (that represent # combinations of standard options) into QMK standard options. # -KEYBOARD_LOCAL_FEATURES_MK := - define HELIX_CUSTOMISE_MSG $(info Helix Spacific Build Options) $(info - OLED_ENABLE = $(OLED_ENABLE)) diff --git a/keyboards/helix/pico/rules.mk b/keyboards/helix/pico/rules.mk index cb9a70e00e..12caec37ef 100644 --- a/keyboards/helix/pico/rules.mk +++ b/keyboards/helix/pico/rules.mk @@ -1,5 +1,3 @@ -KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))local_features.mk - # Helix Spacific Build Options default values OLED_ENABLE = no # OLED_ENABLE LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" diff --git a/keyboards/helix/pico/split_util.h b/keyboards/helix/pico/split_util.h index c0ecdb0974..b839ce6e3e 100644 --- a/keyboards/helix/pico/split_util.h +++ b/keyboards/helix/pico/split_util.h @@ -1,5 +1,4 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H +#pragma once #include <stdbool.h> #include "eeconfig.h" @@ -15,5 +14,3 @@ void split_keyboard_setup(void); bool is_helix_master(void); void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/helix/rev1/split_util.h b/keyboards/helix/rev1/split_util.h index 595a0659e1..807412cd38 100644 --- a/keyboards/helix/rev1/split_util.h +++ b/keyboards/helix/rev1/split_util.h @@ -1,5 +1,4 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H +#pragma once #include <stdbool.h> #include "eeconfig.h" @@ -16,5 +15,3 @@ bool has_usb(void); void keyboard_slave_loop(void); void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/helix/rev2/keymaps/default/oled_display.c b/keyboards/helix/rev2/keymaps/default/oled_display.c index 36a7cf0b10..4ee3f002d6 100644 --- a/keyboards/helix/rev2/keymaps/default/oled_display.c +++ b/keyboards/helix/rev2/keymaps/default/oled_display.c @@ -208,7 +208,7 @@ void iota_gfx_task_user(void) { matrix_update(&display, &matrix); } # else -void oled_task_user(void) { +bool oled_task_user(void) { # if DEBUG_TO_SCREEN if (debug_enable) { @@ -223,6 +223,7 @@ void oled_task_user(void) { render_rgbled_status(false); render_layer_status(); } + return false; } # endif #endif diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index c16f3e2b87..58b43a6bda 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/keymaps/default/rules.mk @@ -29,7 +29,3 @@ OLED_SELECT = core ifeq ($(strip $(OLED_ENABLE)), yes) SRC += oled_display.c endif - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/oled.c b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c index 500a7bbf1a..207aebc423 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/oled.c +++ b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c @@ -56,7 +56,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return is_keyboard_left() ? rotation : rotation ^ OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_left()) { render_mode_icon(!get_enable_kc_lang()); render_layer_state(); @@ -64,5 +64,6 @@ void oled_task_user(void) { } else { render_logo(); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/helix/rev2/keymaps/five_rows/oled_display.c b/keyboards/helix/rev2/keymaps/five_rows/oled_display.c index fcbd81c9b6..dc6de02b17 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/oled_display.c +++ b/keyboards/helix/rev2/keymaps/five_rows/oled_display.c @@ -259,7 +259,7 @@ void iota_gfx_task_user(void) { matrix_update(&display, &matrix); } # else -void oled_task_user(void) { +bool oled_task_user(void) { # if DEBUG_TO_SCREEN if (debug_enable) { @@ -272,6 +272,7 @@ void oled_task_user(void) { }else{ render_logo(); } + return false; } # endif diff --git a/keyboards/helix/rev2/keymaps/five_rows/rules.mk b/keyboards/helix/rev2/keymaps/five_rows/rules.mk index 0012f657ab..8a091605ac 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows/rules.mk @@ -106,7 +106,3 @@ endif ifeq ($(strip $(CUSTOM_DELAY)),yes) SRC += matrix_output_unselect_delay.c endif - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk index d44382f86a..7c4a7b6045 100644 --- a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk @@ -17,7 +17,3 @@ HELIX_ROWS = 5 # Helix Rows is 4 or 5 # LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) # LED_ANIMATIONS = yes # LED animations # IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/fraanrosi/rules.mk b/keyboards/helix/rev2/keymaps/fraanrosi/rules.mk index 462a83f6e7..98585b0d60 100644 --- a/keyboards/helix/rev2/keymaps/fraanrosi/rules.mk +++ b/keyboards/helix/rev2/keymaps/fraanrosi/rules.mk @@ -22,7 +22,3 @@ LED_ANIMATIONS = yes # LED animations LED_BACK_ENABLE = no LED_UNDERGLOW_ENABLE = yes - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/froggy/rules.mk b/keyboards/helix/rev2/keymaps/froggy/rules.mk index 5a0fd9a2b1..2d01c43fe7 100644 --- a/keyboards/helix/rev2/keymaps/froggy/rules.mk +++ b/keyboards/helix/rev2/keymaps/froggy/rules.mk @@ -17,7 +17,3 @@ LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations # IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/froggy_106/rules.mk b/keyboards/helix/rev2/keymaps/froggy_106/rules.mk index 5a0fd9a2b1..2d01c43fe7 100644 --- a/keyboards/helix/rev2/keymaps/froggy_106/rules.mk +++ b/keyboards/helix/rev2/keymaps/froggy_106/rules.mk @@ -17,7 +17,3 @@ LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations # IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/led_test/rules.mk b/keyboards/helix/rev2/keymaps/led_test/rules.mk index 8b590eee86..3ab27acfc2 100644 --- a/keyboards/helix/rev2/keymaps/led_test/rules.mk +++ b/keyboards/helix/rev2/keymaps/led_test/rules.mk @@ -23,7 +23,3 @@ ifeq ($(strip $(OLED_ENABLE)), yes) SRC += oled_display.c endif SRC += led_test_init.c - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk b/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk index 83dcc9b3b8..cd436cd9a3 100644 --- a/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk +++ b/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk @@ -17,7 +17,3 @@ OLED_ENABLE = yes # OLED_ENABLE # LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = no # LED animations # IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/post_rules.mk b/keyboards/helix/rev2/post_rules.mk new file mode 100644 index 0000000000..4c671d4515 --- /dev/null +++ b/keyboards/helix/rev2/post_rules.mk @@ -0,0 +1,3 @@ +ifneq ($(strip $(KEYBOARD_LOCAL_FEATURES_MK)),) + include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) +endif diff --git a/keyboards/helix/rev2/serial_config_simpleapi.h b/keyboards/helix/rev2/serial_config_simpleapi.h index e2d22a41e7..0e1dd9e4ac 100644 --- a/keyboards/helix/rev2/serial_config_simpleapi.h +++ b/keyboards/helix/rev2/serial_config_simpleapi.h @@ -1,8 +1,5 @@ -#ifndef SERIAL_CONFIG_SIMPLEAPI_H -#define SERIAL_CONFIG_SIMPLEAPI_H +#pragma once #undef SERIAL_USE_MULTI_TRANSACTION #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 #define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -#endif // SERIAL_CONFIG_SIMPLEAPI_H diff --git a/keyboards/helix/rev2/split_scomm.h b/keyboards/helix/rev2/split_scomm.h index 873d8939d8..16887eb74f 100644 --- a/keyboards/helix/rev2/split_scomm.h +++ b/keyboards/helix/rev2/split_scomm.h @@ -1,5 +1,4 @@ -#ifndef SPLIT_COMM_H -#define SPLIT_COMM_H +#pragma once #ifndef SERIAL_USE_MULTI_TRANSACTION /* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ @@ -20,5 +19,3 @@ void serial_slave_init(void); int serial_update_buffers(int master_changed); #endif - -#endif /* SPLIT_COMM_H */ diff --git a/keyboards/helix/rev2/split_util.h b/keyboards/helix/rev2/split_util.h index c0ecdb0974..b839ce6e3e 100644 --- a/keyboards/helix/rev2/split_util.h +++ b/keyboards/helix/rev2/split_util.h @@ -1,5 +1,4 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H +#pragma once #include <stdbool.h> #include "eeconfig.h" @@ -15,5 +14,3 @@ void split_keyboard_setup(void); bool is_helix_master(void); void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/helix/rev3_4rows/keymaps/default/oled_display.c b/keyboards/helix/rev3_4rows/keymaps/default/oled_display.c index fb1a6f9f87..e951f627c8 100644 --- a/keyboards/helix/rev3_4rows/keymaps/default/oled_display.c +++ b/keyboards/helix/rev3_4rows/keymaps/default/oled_display.c @@ -101,12 +101,13 @@ static void render_rgbled_status(bool full) { #endif } -void oled_task_user(void) { +bool oled_task_user(void) { if(is_keyboard_master()){ render_status(); }else{ render_logo(); render_rgbled_status(true); } + return false; } #endif diff --git a/keyboards/helix/rev3_4rows/keymaps/via/oled_display.c b/keyboards/helix/rev3_4rows/keymaps/via/oled_display.c index fb1a6f9f87..e951f627c8 100644 --- a/keyboards/helix/rev3_4rows/keymaps/via/oled_display.c +++ b/keyboards/helix/rev3_4rows/keymaps/via/oled_display.c @@ -101,12 +101,13 @@ static void render_rgbled_status(bool full) { #endif } -void oled_task_user(void) { +bool oled_task_user(void) { if(is_keyboard_master()){ render_status(); }else{ render_logo(); render_rgbled_status(true); } + return false; } #endif diff --git a/keyboards/helix/rev3_4rows/rev3_4rows.c b/keyboards/helix/rev3_4rows/rev3_4rows.c index 963cc744e7..704f915510 100644 --- a/keyboards/helix/rev3_4rows/rev3_4rows.c +++ b/keyboards/helix/rev3_4rows/rev3_4rows.c @@ -83,8 +83,8 @@ char *sprint2d(char *buf, char *leadstr, int data) { return sprint_decimal(buf, data); } -__attribute__((weak)) -void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { return false; } static const char PROGMEM helix_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, @@ -109,5 +109,6 @@ void oled_task_user(void) { } else { oled_write_P(helix_logo, false); } + return false; } #endif diff --git a/keyboards/helix/rev3_5rows/keymaps/default/oled_display.c b/keyboards/helix/rev3_5rows/keymaps/default/oled_display.c index fb1a6f9f87..e951f627c8 100644 --- a/keyboards/helix/rev3_5rows/keymaps/default/oled_display.c +++ b/keyboards/helix/rev3_5rows/keymaps/default/oled_display.c @@ -101,12 +101,13 @@ static void render_rgbled_status(bool full) { #endif } -void oled_task_user(void) { +bool oled_task_user(void) { if(is_keyboard_master()){ render_status(); }else{ render_logo(); render_rgbled_status(true); } + return false; } #endif diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c b/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c index e8ba0d720f..cee415ad30 100644 --- a/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c @@ -214,7 +214,7 @@ void iota_gfx_task_user(void) { matrix_update(&display, &matrix); } # else -void oled_task_user(void) { +bool oled_task_user(void) { # if DEBUG_TO_SCREEN if (debug_enable) { @@ -227,6 +227,7 @@ void oled_task_user(void) { }else{ render_logo(); } + return false; } # endif diff --git a/keyboards/helix/rev3_5rows/keymaps/via/oled_display.c b/keyboards/helix/rev3_5rows/keymaps/via/oled_display.c index fb1a6f9f87..e951f627c8 100644 --- a/keyboards/helix/rev3_5rows/keymaps/via/oled_display.c +++ b/keyboards/helix/rev3_5rows/keymaps/via/oled_display.c @@ -101,12 +101,13 @@ static void render_rgbled_status(bool full) { #endif } -void oled_task_user(void) { +bool oled_task_user(void) { if(is_keyboard_master()){ render_status(); }else{ render_logo(); render_rgbled_status(true); } + return false; } #endif diff --git a/keyboards/helix/rev3_5rows/rev3_5rows.c b/keyboards/helix/rev3_5rows/rev3_5rows.c index 963cc744e7..704f915510 100644 --- a/keyboards/helix/rev3_5rows/rev3_5rows.c +++ b/keyboards/helix/rev3_5rows/rev3_5rows.c @@ -83,8 +83,8 @@ char *sprint2d(char *buf, char *leadstr, int data) { return sprint_decimal(buf, data); } -__attribute__((weak)) -void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { return false; } static const char PROGMEM helix_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, @@ -109,5 +109,6 @@ void oled_task_user(void) { } else { oled_write_P(helix_logo, false); } + return false; } #endif diff --git a/keyboards/hhkb/ansi/post_rules.mk b/keyboards/hhkb/ansi/post_rules.mk new file mode 100644 index 0000000000..bc6ad5cd4c --- /dev/null +++ b/keyboards/hhkb/ansi/post_rules.mk @@ -0,0 +1,18 @@ +ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) + +OPT_DEFS += -DHHKB_RN42_ENABLE + +# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT +# HHKB Alt controller. +RN42_DIR = ../rn42 + +SRC += serial_uart.c \ + ../rn42/suart.S \ + ../rn42/rn42.c \ + ../rn42/rn42_task.c \ + ../rn42/battery.c \ + ../rn42/main.c + +VPATH += $(RN42_DIR) + +endif diff --git a/keyboards/hhkb/ansi/rules.mk b/keyboards/hhkb/ansi/rules.mk index 6e2e81b0cf..71e8198b4a 100644 --- a/keyboards/hhkb/ansi/rules.mk +++ b/keyboards/hhkb/ansi/rules.mk @@ -30,26 +30,6 @@ CUSTOM_MATRIX = yes # Custom matrix file for the HHKB # project specific files SRC = matrix.c -ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) - -OPT_DEFS += -DHHKB_RN42_ENABLE - -# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT -# HHKB Alt controller. -RN42_DIR = ../rn42 - -SRC += serial_uart.c \ - ../rn42/suart.S \ - ../rn42/rn42.c \ - ../rn42/rn42_task.c \ - ../rn42/battery.c \ - ../rn42/main.c - -VPATH += $(RN42_DIR) - -endif - - # debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION # debug-on: all diff --git a/keyboards/hhkb/jp/post_rules.mk b/keyboards/hhkb/jp/post_rules.mk new file mode 100644 index 0000000000..bc6ad5cd4c --- /dev/null +++ b/keyboards/hhkb/jp/post_rules.mk @@ -0,0 +1,18 @@ +ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) + +OPT_DEFS += -DHHKB_RN42_ENABLE + +# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT +# HHKB Alt controller. +RN42_DIR = ../rn42 + +SRC += serial_uart.c \ + ../rn42/suart.S \ + ../rn42/rn42.c \ + ../rn42/rn42_task.c \ + ../rn42/battery.c \ + ../rn42/main.c + +VPATH += $(RN42_DIR) + +endif diff --git a/keyboards/hhkb/jp/rules.mk b/keyboards/hhkb/jp/rules.mk index 56187bb331..8eb11940b3 100644 --- a/keyboards/hhkb/jp/rules.mk +++ b/keyboards/hhkb/jp/rules.mk @@ -30,26 +30,6 @@ CUSTOM_MATRIX = yes # Custom matrix file for the HHKB # project specific files SRC = matrix.c -ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) - -OPT_DEFS += -DHHKB_RN42_ENABLE - -# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT -# HHKB Alt controller. -RN42_DIR = ../rn42 - -SRC += serial_uart.c \ - ../rn42/suart.S \ - ../rn42/rn42.c \ - ../rn42/rn42_task.c \ - ../rn42/battery.c \ - ../rn42/main.c - -VPATH += $(RN42_DIR) - -endif - - # debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION # debug-on: all diff --git a/keyboards/hhkb/rn42/battery.h b/keyboards/hhkb/rn42/battery.h index 180d4dcfaa..c7f96d09a3 100644 --- a/keyboards/hhkb/rn42/battery.h +++ b/keyboards/hhkb/rn42/battery.h @@ -1,5 +1,4 @@ -#ifndef POWER_H -#define POWER_H +#pragma once #include <stdint.h> #include <stdbool.h> @@ -31,5 +30,3 @@ battery_status_t battery_status(void); // ADC offset:16, resolution:5mV #define BATTERY_ADC_OFFSET 16 #define BATTERY_ADC_RESOLUTION 5 - -#endif diff --git a/keyboards/hhkb/rn42/rn42.h b/keyboards/hhkb/rn42/rn42.h index dee214cc84..76bcef99bb 100644 --- a/keyboards/hhkb/rn42/rn42.h +++ b/keyboards/hhkb/rn42/rn42.h @@ -1,5 +1,4 @@ -#ifndef RN42_H -#define RN42_H +#pragma once #include <stdbool.h> #include "host_driver.h" @@ -26,5 +25,3 @@ void rn42_send_str(const char *str); void rn42_print_response(void); #define SEND_STR(str) rn42_send_str(PSTR(str)) #define SEND_COMMAND(cmd) rn42_send_command(PSTR(cmd)) - -#endif diff --git a/keyboards/hhkb/rn42/rn42_task.h b/keyboards/hhkb/rn42/rn42_task.h index ee00669ee5..05e80e9be2 100644 --- a/keyboards/hhkb/rn42/rn42_task.h +++ b/keyboards/hhkb/rn42/rn42_task.h @@ -1,5 +1,4 @@ -#ifndef RN42_TASK_H -#define RN42_TASK_H +#pragma once #include <stdbool.h> #include "rn42.h" @@ -10,5 +9,3 @@ bool rn42_nkro_last; void rn42_task_init(void); void rn42_task(void); - -#endif diff --git a/keyboards/hid_liber/config.h b/keyboards/hid_liber/config.h index 1e263649e5..1664b9e314 100755 --- a/keyboards/hid_liber/config.h +++ b/keyboards/hid_liber/config.h @@ -15,8 +15,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -91,5 +90,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/hotdox/keymaps/default/keymap.c b/keyboards/hotdox/keymaps/default/keymap.c index 3d6f040f34..fe07e6f91d 100644 --- a/keyboards/hotdox/keymaps/default/keymap.c +++ b/keyboards/hotdox/keymaps/default/keymap.c @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_NO, KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB,KC_ENT diff --git a/keyboards/hotdox/keymaps/via/keymap.c b/keyboards/hotdox/keymaps/via/keymap.c index 5cfad55ddd..df951542a6 100644 --- a/keyboards/hotdox/keymaps/via/keymap.c +++ b/keyboards/hotdox/keymaps/via/keymap.c @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_NO, KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB,KC_ENT diff --git a/keyboards/hs60/v1/v1.h b/keyboards/hs60/v1/v1.h index 4de781e5fa..4c81e90612 100644 --- a/keyboards/hs60/v1/v1.h +++ b/keyboards/hs60/v1/v1.h @@ -13,40 +13,39 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef HS60_H -#define HS60_H -#define XXX KC_NO +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. #define LAYOUT_60_iso( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ - { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D } \ } #define LAYOUT_60_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k2C, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ - { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D } \ } -#endif
\ No newline at end of file diff --git a/keyboards/hub20/config.h b/keyboards/hub20/config.h index f8e5d6be8d..fa78db3d97 100644 --- a/keyboards/hub20/config.h +++ b/keyboards/hub20/config.h @@ -108,7 +108,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LOCKING_RESYNC_ENABLE /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/rules.mk b/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/rules.mk index 507f4fcd37..7837adcbd3 100644 --- a/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/rules.mk +++ b/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/rules.mk @@ -22,4 +22,5 @@ ENCODER_ENABLE = no # Enable rotary encoder support AUDIO_ENABLE = no # Audio output KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID diff --git a/keyboards/idobo/idobo.h b/keyboards/idobo/idobo.h index 386fcee1a9..9643a1efd3 100644 --- a/keyboards/idobo/idobo.h +++ b/keyboards/idobo/idobo.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef IDOBO_H -#define IDOBO_H + +#pragma once #include "quantum.h" @@ -27,18 +27,15 @@ * represents the switch matrix. */ #define LAYOUT_ortho_5x15( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E } \ } - -#endif diff --git a/keyboards/jagdpietr/drakon/drakon.c b/keyboards/jagdpietr/drakon/drakon.c index 2aec1f4b50..65d9503055 100644 --- a/keyboards/jagdpietr/drakon/drakon.c +++ b/keyboards/jagdpietr/drakon/drakon.c @@ -37,10 +37,8 @@ _FN, _Lyr2 }; -__attribute__((weak)) -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_90; // flips the display 90 degrees if offhand - +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_90; } static void render_status(void) { @@ -210,8 +208,11 @@ static void render_anim(void) { } } } -__attribute__((weak)) -void oled_task_user(void) { + +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } render_anim(); oled_set_cursor(0,6); @@ -221,6 +222,7 @@ void oled_task_user(void) { render_status(); + return false; } #endif diff --git a/keyboards/jc65/v32a/v32a.h b/keyboards/jc65/v32a/v32a.h index 4e24420913..91e6164ae2 100644 --- a/keyboards/jc65/v32a/v32a.h +++ b/keyboards/jc65/v32a/v32a.h @@ -15,25 +15,24 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef V32A_H -#define V32A_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K04,K14,K24,K34,K44,K54,K16,KB6,KB7,K17,KA4,KB4,KC4,KD4,KE4,KD0, \ - K03,K13,K23,K33,K43,K53,K26,KC6,KC7,K27,KA3,KB3,KC3, KD3,K67, \ - K02,K12,K22,K32,K42,K52,K36,KD6,KD7,K37,KA2,KB2,KC2, KD2,K87, \ - K01,K30,K11,K21,K31,K41,K51,K46,KE6,KE7,K47,KA1, KB1,K86,K77, \ - K00,K10,K20, K40,K56,K50, K57,KB0,KC0,K96,K76,K66 \ -){ \ - { K00, K10, K20, K30, K40, K50,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KB0, KC0, KD0,KC_NO }, \ - { K01, K11, K21, K31, K41, K51,KC_NO,KC_NO,KC_NO,KC_NO, KA1, KB1,KC_NO,KC_NO,KC_NO }, \ - { K02, K12, K22, K32, K42, K52,KC_NO,KC_NO,KC_NO,KC_NO, KA2, KB2, KC2, KD2,KC_NO }, \ - { K03, K13, K23, K33, K43, K53,KC_NO,KC_NO,KC_NO,KC_NO, KA3, KB3, KC3, KD3,KC_NO }, \ - { K04, K14, K24, K34, K44, K54,KC_NO,KC_NO,KC_NO,KC_NO, KA4, KB4, KC4, KD4, KE4 }, \ - { KC_NO, K16, K26, K36, K46, K56, K66, K76, K86, K96,KC_NO, KB6, KC6, KD6, KE6 }, \ - { KC_NO, K17, K27, K37, K47, K57, K67, K77, K87,KC_NO,KC_NO, KB7, KC7, KD7, KE7 } \ + k40, k41, k42, k43, k44, k45, k61, k6B, k7B, k71, k4A, k4B, k4C, k4D, k4E, k0D, \ + k30, k31, k32, k33, k34, k35, k62, k6C, k7C, k72, k3A, k3B, k3C, k3D, k76, \ + k20, k21, k22, k23, k24, k25, k63, k6D, k7D, k73, k2A, k2B, k2C, k2D, k78, \ + k10, k03, k11, k12, k13, k14, k15, k64, k6E, k7E, k74, k1A, k1B, k68, k77, \ + k00, k01, k02, k04, k65, k05, k75, k0B, k0C, k69, k67, k66 \ +) { \ + { k00, k01, k02, k03, k04, k05, XXX, XXX, XXX, XXX, XXX, k0B, k0C, k0D, XXX }, \ + { k10, k11, k12, k13, k14, k15, XXX, XXX, XXX, XXX, k1A, k1B, XXX, XXX, XXX }, \ + { k20, k21, k22, k23, k24, k25, XXX, XXX, XXX, XXX, k2A, k2B, k2C, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, XXX, XXX, XXX, XXX, k3A, k3B, k3C, k3D, XXX }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX, XXX, XXX, k4A, k4B, k4C, k4D, k4E }, \ + { XXX, k61, k62, k63, k64, k65, k66, k67, k68, k69, XXX, k6B, k6C, k6D, k6E }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77, k78, XXX, XXX, k7B, k7C, k7D, k7E } \ } - -#endif diff --git a/keyboards/jc65/v32u4/config.h b/keyboards/jc65/v32u4/config.h index 314bfbf259..108e4126be 100644 --- a/keyboards/jc65/v32u4/config.h +++ b/keyboards/jc65/v32u4/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -55,5 +54,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 - -#endif diff --git a/keyboards/jc65/v32u4/v32u4.h b/keyboards/jc65/v32u4/v32u4.h index 866e6cc689..8bab085b11 100644 --- a/keyboards/jc65/v32u4/v32u4.h +++ b/keyboards/jc65/v32u4/v32u4.h @@ -1,21 +1,19 @@ -#ifndef V32U4_H -#define V32U4_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ - K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ - K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ - K40, K41, K43, K44, K46, K48, K4A, K4B, K4C, K4D, K4E, K4F \ -)\ -{\ - {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F}, \ - {K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F}, \ - {K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F}, \ - {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F}, \ - {K40, K41, KC_NO, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F}, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, k3F, \ + k40, k41, k43, k44, k46, k48, k4A, k4B, k4C, k4D, k4E, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E, k3F }, \ + { k40, k41, XXX, k43, k44, XXX, k46, XXX, k48, XXX, k4A, k4B, k4C, k4D, k4E, k4F } \ } - -#endif diff --git a/keyboards/jd40/config.h b/keyboards/jd40/config.h index 027aacfd58..dd6984f108 100644 --- a/keyboards/jd40/config.h +++ b/keyboards/jd40/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -68,5 +67,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/jd40/jd40.h b/keyboards/jd40/jd40.h index 4426fd7629..41ec860e8f 100644 --- a/keyboards/jd40/jd40.h +++ b/keyboards/jd40/jd40.h @@ -1,43 +1,18 @@ -#ifndef JD40_H -#define JD40_H +#pragma once #include "quantum.h" #include "led.h" -/* GH60 LEDs - * GPIO pads - * 0 F7 WASD LEDs - * 1 F6 ESC LED - * 2 F5 FN LED - * 3 F4 POKER Arrow LEDs - * B2 Capslock LED - * B0 not connected - */ - - /* -inline void gh60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); } -inline void gh60_poker_leds_on(void) { DDRF |= (1<<4); PORTF &= ~(1<<4); } -inline void gh60_fn_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); } -inline void gh60_esc_led_on(void) { DDRF |= (1<<6); PORTF &= ~(1<<6); } -inline void gh60_wasd_leds_on(void) { DDRF |= (1<<7); PORTF &= ~(1<<7); } - -inline void gh60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } -inline void gh60_poker_leds_off(void) { DDRF &= ~(1<<4); PORTF &= ~(1<<4); } -inline void gh60_fn_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } -inline void gh60_esc_led_off(void) { DDRF &= ~(1<<6); PORTF &= ~(1<<6); } -inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); } -*/ +#define XXX KC_NO #define LAYOUT( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \ - K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, \ - K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, \ - K35, K36, K37, K38, K39, K40, K41, K42, K43, K44 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, \ + k30, k31, k32, k33, k34, k36, k37, k38, k39, k3A \ ) { \ - { K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12 }, \ - { K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, KC_NO }, \ - { K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, KC_NO }, \ - { K35, K36, K37, K38, K39, KC_NO, K40, K41, K42, K43, K44, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, XXX }, \ + { k30, k31, k32, k33, k34, XXX, k36, k37, k38, k39, k3A, XXX } \ } - -#endif diff --git a/keyboards/jd45/config.h b/keyboards/jd45/config.h index 4cc46c646c..be2f0963ac 100644 --- a/keyboards/jd45/config.h +++ b/keyboards/jd45/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -72,5 +71,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/jd45/jd45.h b/keyboards/jd45/jd45.h index a0603d4e43..ab560e742c 100644 --- a/keyboards/jd45/jd45.h +++ b/keyboards/jd45/jd45.h @@ -1,20 +1,19 @@ -#ifndef JD45_H -#define JD45_H +#pragma once #include "quantum.h" +#define XXX KC_NO + /* JD45 keymap definition macro */ #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ - 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, k36, k38, k39, k3a, k3b \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, \ + 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, k36, k38, k39, k3A, k3B \ ) { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, KC_NO }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO }, \ - { k30, k31, k32, k33, k34, KC_NO, k36, KC_NO, k38, k39, k3a, k3b, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX }, \ + { k30, k31, k32, k33, k34, XXX, k36, XXX, k38, k39, k3A, k3B, XXX } \ } - -#endif diff --git a/keyboards/kapcave/arya/arya.c b/keyboards/kapcave/arya/arya.c new file mode 100644 index 0000000000..af5d19be4f --- /dev/null +++ b/keyboards/kapcave/arya/arya.c @@ -0,0 +1,27 @@ +/* +Copyright 2021 KapCave + +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 "arya.h" + +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; +} diff --git a/keyboards/kapcave/arya/arya.h b/keyboards/kapcave/arya/arya.h new file mode 100644 index 0000000000..ea1d1916c3 --- /dev/null +++ b/keyboards/kapcave/arya/arya.h @@ -0,0 +1,43 @@ +/* +Copyright 2021 KapCave + +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 LAYOUT_alice_split_bs( \ + K81, K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \ + K80, K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ + K82, K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ + K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \ + K30, K40, K50, K60, K00, K10, K20 \ +) \ +{ \ + { K00 , K01 , K02 , K03 , K04 , K05 , K06 , K07 }, \ + { K10 , K11 , K12 , K13 , K14 , K15 , K16 , K17 }, \ + { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \ + { K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 }, \ + { K40 , K41 , K42 , K43 , K44 , K45 , K46 , K47 }, \ + { K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \ + { K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 }, \ + { KC_NO , K71 , K72 , K73 , K74 , K75 , K76 , K77 }, \ + { K80 , K81 , K82 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} \ +} + + + + +#define LAYOUT_all LAYOUT_alice_split_bs diff --git a/keyboards/kapcave/arya/chconf.h b/keyboards/kapcave/arya/chconf.h new file mode 100644 index 0000000000..d5c78af075 --- /dev/null +++ b/keyboards/kapcave/arya/chconf.h @@ -0,0 +1,25 @@ +/* +Copyright 2021 KapCave + +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 CH_CFG_ST_RESOLUTION 16 + +#define CH_CFG_INTERVALS_SIZE 16 + +#include_next <chconf.h> + diff --git a/keyboards/kapcave/arya/config.h b/keyboards/kapcave/arya/config.h new file mode 100644 index 0000000000..62df795ff5 --- /dev/null +++ b/keyboards/kapcave/arya/config.h @@ -0,0 +1,68 @@ +/* +Copyright 2021 KapCave + +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 */ +#define VENDOR_ID 0x4B43 +#define PRODUCT_ID 0x4152 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KapCave +#define PRODUCT Arya + +/* key matrix size */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 8 + +#define MATRIX_COL_PINS { B0, B5, B4, B2, C13, F1, F0, A14} +#define MATRIX_ROW_PINS { B8, A13, B1, A15, B9, B10, B11, A0, A8 } +#define DIODE_DIRECTION COL2ROW + + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define ENCODERS_PAD_A { B12, B14, C15 } +#define ENCODERS_PAD_B { B13, B15, C14 } + +#define ENCODER_RESOLUTION 2 +#define TAP_CODE_DELAY 25 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* 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/kapcave/arya/halconf.h b/keyboards/kapcave/arya/halconf.h new file mode 100644 index 0000000000..dffa322d19 --- /dev/null +++ b/keyboards/kapcave/arya/halconf.h @@ -0,0 +1,23 @@ +/* +Copyright 2021 KapCave + +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 HAL_USE_PWM TRUE + +#include_next <halconf.h> + diff --git a/keyboards/kapcave/arya/info.json b/keyboards/kapcave/arya/info.json new file mode 100644 index 0000000000..fb220aa070 --- /dev/null +++ b/keyboards/kapcave/arya/info.json @@ -0,0 +1,77 @@ +{ + "keyboard_name": "Arya", + "url": "https://kapcave.com/products/arya", + "maintainer": "nachie", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":2.75, "y":5.9}, + {"label":"\u00ac", "x":4, "y":6.0}, + {"label":"!", "x":5, "y":6.0}, + {"label":"\"", "x":6, "y":6.0}, + {"label":"_", "x":15.25, "y":6.0}, + {"label":"+", "x":16.25, "y":6.0}, + {"label":"", "x":17.25, "y":6.0}, + {"label":"", "x":18.25, "y":6.0}, + {"label":"Pg Up", "x":2.5, "y":6.9}, + {"label":"Tab", "x":3.75, "y":7.0, "w":1.5}, + {"label":"Q", "x":5.25, "y":7.0}, + {"label":"P", "x":15, "y":7.0}, + {"label":"{", "x":16, "y":7.0}, + {"label":"}", "x":17, "y":7.0}, + {"label":"|", "x":18, "y":7.0, "w":1.5}, + {"label":"Pg Dn", "x":2.25, "y":7.9}, + {"label":"Caps Lock", "x":3.5, "y":8.0, "w":1.75}, + {"label":"A", "x":5.25, "y":8.0}, + {"label":":", "x":15.5, "y":8.0}, + {"label":"\"", "x":16.5, "y":8.0}, + {"label":"Enter", "x":17.5, "y":8.0, "w":2.25}, + {"label":"Shift", "x":3.25, "y":9.0, "w":2.25}, + {"label":"Z", "x":5.5, "y":9.0}, + {"label":">", "x":15.25, "y":9.0}, + {"label":"?", "x":16.25, "y":9.0}, + {"label":"Shift", "x":17.25, "y":9.0, "w":1.75}, + {"label":"Fn", "x":19, "y":9.0}, + {"label":"Ctrl", "x":3.25, "y":10.0, "w":1.5}, + {"label":"Ctrl", "x":18.25, "y":10.0, "w":1.5}, + {"label":"\u00a3", "x":8.25, "y":4.5}, + {"label":"$", "x":9.25, "y":4.5}, + {"label":"%", "x":10.25, "y":4.5}, + {"label":"^", "x":11.25, "y":4.5}, + {"label":"W", "x":7.75, "y":5.5}, + {"label":"E", "x":8.75, "y":5.5}, + {"label":"R", "x":9.75, "y":5.5}, + {"label":"T", "x":10.75, "y":5.5}, + {"label":"S", "x":8, "y":6.5}, + {"label":"D", "x":9, "y":6.5}, + {"label":"F", "x":10, "y":6.5}, + {"label":"G", "x":11, "y":6.5}, + {"label":"X", "x":8.5, "y":7.5}, + {"label":"C", "x":9.5, "y":7.5}, + {"label":"V", "x":10.5, "y":7.5}, + {"label":"B", "x":11.5, "y":7.5}, + {"label":"Alt", "x":8.25, "y":8.5, "w":1.5}, + {"label":"", "x":9.75, "y":8.5, "w":2}, + {"label":"Fn", "x":11.75, "y":8.5, "w":1.25}, + {"label":"&", "x":9.5, "y":9.0}, + {"label":"*", "x":10.5, "y":9.0}, + {"label":"(", "x":11.5, "y":9.0}, + {"label":")", "x":12.5, "y":9.0}, + {"label":"Y", "x":9, "y":10.0}, + {"label":"U", "x":10, "y":10.0}, + {"label":"I", "x":11, "y":10.0}, + {"label":"O", "x":12, "y":10.0}, + {"label":"H", "x":9.25, "y":11.0}, + {"label":"J", "x":10.25, "y":11.0}, + {"label":"K", "x":11.25, "y":11.0}, + {"label":"L", "x":12.25, "y":11.0}, + {"label":"Fn", "x":8.75, "y":12.0}, + {"label":"N", "x":9.75, "y":12.0}, + {"label":"M", "x":10.75, "y":12.0}, + {"label":"<", "x":11.75, "y":12.0}, + {"label":"Shift", "x":8.75, "y":13.0, "w":2.75}, + {"label":"Alt", "x":11.5, "y":13.0, "w":1.5} + ] + } + } +}
\ No newline at end of file diff --git a/keyboards/kapcave/arya/keymaps/default/keymap.c b/keyboards/kapcave/arya/keymaps/default/keymap.c new file mode 100644 index 0000000000..b8300b1f4a --- /dev/null +++ b/keyboards/kapcave/arya/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* +Copyright 2021 KapCave + +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] = { + LAYOUT_alice_split_bs( + KC_ESC, 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_GRV, KC_BSLS, + KC_PGUP, 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_BSPC, + KC_PGDN, KC_LCTL, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LGUI, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL + ), + LAYOUT_alice_split_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP , _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), +};
\ No newline at end of file diff --git a/keyboards/kapcave/arya/keymaps/default/readme.md b/keyboards/kapcave/arya/keymaps/default/readme.md new file mode 100644 index 0000000000..9d9894862a --- /dev/null +++ b/keyboards/kapcave/arya/keymaps/default/readme.md @@ -0,0 +1 @@ +The default layout for the KapCave Arya
\ No newline at end of file diff --git a/keyboards/kapcave/arya/keymaps/via/keymap.c b/keyboards/kapcave/arya/keymaps/via/keymap.c new file mode 100644 index 0000000000..4b98707da7 --- /dev/null +++ b/keyboards/kapcave/arya/keymaps/via/keymap.c @@ -0,0 +1,56 @@ +/* +Copyright 2021 KapCave + +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 layer_names { + _BASE, // Default Layer + _FN, // Fn Layer 1 + _FN2, // Fn Layer 2 + _FN3 // Fn Layer 3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY */ + [_BASE] = LAYOUT_alice_split_bs( + KC_ESC, 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_GRV, KC_BSLS, + KC_PGUP, 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_BSPC, + KC_PGDN, KC_LCTL, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LGUI, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL + ), + + /* FUNCTION */ + [_FN] = LAYOUT_alice_split_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP , _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN2] = LAYOUT_alice_split_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + +}; + diff --git a/keyboards/kapcave/arya/keymaps/via/readme.md b/keyboards/kapcave/arya/keymaps/via/readme.md new file mode 100644 index 0000000000..dcf12fbffd --- /dev/null +++ b/keyboards/kapcave/arya/keymaps/via/readme.md @@ -0,0 +1 @@ +The VIA Keymap for the KapCave Arya
\ No newline at end of file diff --git a/keyboards/kapcave/arya/keymaps/via/rules.mk b/keyboards/kapcave/arya/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/kapcave/arya/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/kapcave/arya/mcuconf.h b/keyboards/kapcave/arya/mcuconf.h new file mode 100644 index 0000000000..5c161dbe3c --- /dev/null +++ b/keyboards/kapcave/arya/mcuconf.h @@ -0,0 +1,33 @@ +/* +Copyright 2021 KapCave + +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_next <mcuconf.h> + +/* enable TIM1, used for backlight PWM */ +#undef STM32_PWM_USE_TIM1 +#define STM32_PWM_USE_TIM1 TRUE + +/* enable TIM2, used for underglow PWM driver */ +#undef STM32_PWM_USE_TIM2 +#define STM32_PWM_USE_TIM2 TRUE + +/* move system from TIM2 (default) to TIM3 (since TIM2 is needed for underglow) */ +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 FALSE +#undef STM32_ST_USE_TIMER +#define STM32_ST_USE_TIMER 3 diff --git a/keyboards/kapcave/arya/readme.md b/keyboards/kapcave/arya/readme.md new file mode 100644 index 0000000000..12fe9684a5 --- /dev/null +++ b/keyboards/kapcave/arya/readme.md @@ -0,0 +1,23 @@ +# KapCave Arya + +Firmware for the KapCave Arya Keyboard + +* Keyboard Maintainer: [KapCave](https://github.com/nachie) +* Hardware Supported: Arya PCB +* Hardware Availability: [KapCave](https://kapcave.com/products/arya-pcb) + +Make example for this keyboard (after setting up your build environment): + + make kapcave/arya:default + +Or to make and flash: + + make kapcave/arya: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). + +## Bootloader + +* **Bootmagic reset**: Hold down Right Space key and plug in the keyboard +* **Physical reset button**: Briefly press the button labeled "SW_RST1" on the back of the PCB diff --git a/keyboards/kapcave/arya/rules.mk b/keyboards/kapcave/arya/rules.mk new file mode 100644 index 0000000000..4732327713 --- /dev/null +++ b/keyboards/kapcave/arya/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = STM32F072 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +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 +# 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 +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/kapcave/gskt00/config.h b/keyboards/kapcave/gskt00/config.h new file mode 100755 index 0000000000..91c34182e7 --- /dev/null +++ b/keyboards/kapcave/gskt00/config.h @@ -0,0 +1,52 @@ +/* +Copyright 2021 KapCave + +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 0x4B43 +#define PRODUCT_ID 0x6061 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KapCave +#define PRODUCT GSKT00 + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F1, D1, D2, D4, D6, F7, B0, F4 } +#define MATRIX_COL_PINS { F6, D7, F5, C7, B4, C6, B6, B5 } +#define UNUSED_PINS + +#define BOOTMAGIC_LITE_ROW 3 +#define BOOTMAGIC_LITE_COLUMN 6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + diff --git a/keyboards/kapcave/gskt00/gskt00.c b/keyboards/kapcave/gskt00/gskt00.c new file mode 100755 index 0000000000..c2c2d823f9 --- /dev/null +++ b/keyboards/kapcave/gskt00/gskt00.c @@ -0,0 +1,18 @@ +/* +Copyright 2021 KapCave + +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 "gskt00.h" + diff --git a/keyboards/kapcave/gskt00/gskt00.h b/keyboards/kapcave/gskt00/gskt00.h new file mode 100755 index 0000000000..d0ac51acd7 --- /dev/null +++ b/keyboards/kapcave/gskt00/gskt00.h @@ -0,0 +1,73 @@ +/* +Copyright 2021 KapCave + +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 XXX KC_NO + +#define LAYOUT_all( \ + k36, k37, k46, k47, k56, k57, k66, k67, k76, k77, k06, k07, k17, k26, k27, \ + k34, k35, k44, k45, k54, k55, k64, k65, k75, k05, k15, k16, k25, k24, \ + k32, k33, k43, k52, k53, k63, k73, k74, k03, k04, k13, k14, k23, \ + k31, k41, k42, k51, k61, k62, k71, k72, k01, k02, k11, k12, k21, k22, \ + k30, k40, k50, k60, k00, k10, k20 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77 } \ +} + +#define LAYOUT_60_iso_tsangan( \ + k36, k37, k46, k47, k56, k57, k66, k67, k76, k77, k06, k07, k17, k27, \ + k34, k35, k44, k45, k54, k55, k64, k65, k75, k05, k15, k16, k25, \ + k32, k33, k43, k52, k53, k63, k73, k74, k03, k04, k13, k14, k24, k23, \ + k31, k41, k42, k51, k61, k62, k71, k72, k01, k02, k11, k12, k21, \ + k30, k40, k50, k60, k00, k10, k20 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { XXX, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, XXX, k23, k24, k25, XXX, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77 } \ +} + +#define LAYOUT_60_ansi_tsangan( \ + k36, k37, k46, k47, k56, k57, k66, k67, k76, k77, k06, k07, k17, k27, \ + k34, k35, k44, k45, k54, k55, k64, k65, k75, k05, k15, k16, k25, k24, \ + k32, k33, k43, k52, k53, k63, k73, k74, k03, k04, k13, k14, k23, \ + k31, k42, k51, k61, k62, k71, k72, k01, k02, k11, k12, k21, \ + k30, k40, k50, k60, k00, k10, k20 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, XXX, k23, k24, k25, XXX, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77 } \ +} diff --git a/keyboards/gskt00/info.json b/keyboards/kapcave/gskt00/info.json index 0b81c58514..ba1455fae9 100644 --- a/keyboards/gskt00/info.json +++ b/keyboards/kapcave/gskt00/info.json @@ -1,6 +1,6 @@ { - "keyboard_name": "gskt00", - "url": "", + "keyboard_name": "GSKT-00", + "url": "https://kapcave.com/products/gskt-00-pcb-usb-c", "maintainer": "nachie", "layouts": { "LAYOUT_60_ansi_tsangan": { diff --git a/keyboards/kapcave/gskt00/keymaps/default-poly/config.h b/keyboards/kapcave/gskt00/keymaps/default-poly/config.h new file mode 100644 index 0000000000..2db5749cb5 --- /dev/null +++ b/keyboards/kapcave/gskt00/keymaps/default-poly/config.h @@ -0,0 +1,39 @@ +/* +Copyright 2021 KapCave + +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 ENCODERS_PAD_A { D5 } +#define ENCODERS_PAD_B { D3 } + +#define RGB_DI_PIN D0 +#ifdef RGB_DI_PIN +#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 +#define RGBLIGHT_EFFECT_TWINKLE +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 12 +#endif + diff --git a/keyboards/kapcave/gskt00/keymaps/default-poly/keymap.c b/keyboards/kapcave/gskt00/keymaps/default-poly/keymap.c new file mode 100755 index 0000000000..8c7e9720db --- /dev/null +++ b/keyboards/kapcave/gskt00/keymaps/default-poly/keymap.c @@ -0,0 +1,70 @@ +/* +Copyright 2021 KapCave + +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] = { + + /* QWERTY */ + LAYOUT_all( + KC_ESC, 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_GRV, KC_BSLS, + 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_BSPC, + MO(3), 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_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LCTL), + + /* DVORAK */ + LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, + MO(3), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, + KC_LSFT, KC_NUBS, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LSFT, MO(3), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL), + + /* COLEMAK */ + LAYOUT_all( + KC_ESC, 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_GRV, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, + MO(3), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL), + + /* FUNCTION */ + LAYOUT_all( + 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSPC, + KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, RGB_TOG) + +}; + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } + return true; +}
\ No newline at end of file diff --git a/keyboards/kapcave/gskt00/keymaps/default-poly/readme.md b/keyboards/kapcave/gskt00/keymaps/default-poly/readme.md new file mode 100644 index 0000000000..1f6d7bcd38 --- /dev/null +++ b/keyboards/kapcave/gskt00/keymaps/default-poly/readme.md @@ -0,0 +1 @@ +There was a private run of Polycarbonate cases. This keymap supports the underglow PCBs that shipped out with those, in addition to future underglow pcbs. These PCBs also had encoder support which is reflected in the keymap.
\ No newline at end of file diff --git a/keyboards/kapcave/gskt00/keymaps/default-poly/rules.mk b/keyboards/kapcave/gskt00/keymaps/default-poly/rules.mk new file mode 100644 index 0000000000..53c9db2bd2 --- /dev/null +++ b/keyboards/kapcave/gskt00/keymaps/default-poly/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +ENCODER_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/gskt00/keymaps/default/keymap.c b/keyboards/kapcave/gskt00/keymaps/default/keymap.c index 225d0224ea..0d8d6dad6b 100755 --- a/keyboards/gskt00/keymaps/default/keymap.c +++ b/keyboards/kapcave/gskt00/keymaps/default/keymap.c @@ -1,3 +1,19 @@ +/* +Copyright 2021 KapCave + +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] = { @@ -10,22 +26,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), KC_LGUI, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(3)), - /* DVORAK */ - LAYOUT_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, - MO(3), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, - KC_LSFT, KC_NUBS, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LSFT, MO(3), - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL), - - /* COLEMAK */ - LAYOUT_all( - KC_ESC, 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_GRV, KC_BSLS, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, - MO(3), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL), - /* FUNCTION */ LAYOUT_all( 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_INS, KC_DEL, @@ -35,3 +35,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, RGB_TOG) }; + diff --git a/keyboards/kapcave/gskt00/keymaps/default/readme.md b/keyboards/kapcave/gskt00/keymaps/default/readme.md new file mode 100644 index 0000000000..042b07d148 --- /dev/null +++ b/keyboards/kapcave/gskt00/keymaps/default/readme.md @@ -0,0 +1 @@ +The default keymap for the GSKT-00 PCB.
\ No newline at end of file diff --git a/keyboards/gskt00/keymaps/nachie/keymap.c b/keyboards/kapcave/gskt00/keymaps/nachie/keymap.c index 8606d24841..8606d24841 100755 --- a/keyboards/gskt00/keymaps/nachie/keymap.c +++ b/keyboards/kapcave/gskt00/keymaps/nachie/keymap.c diff --git a/keyboards/kapcave/gskt00/keymaps/via/keymap.c b/keyboards/kapcave/gskt00/keymaps/via/keymap.c new file mode 100755 index 0000000000..95bc131422 --- /dev/null +++ b/keyboards/kapcave/gskt00/keymaps/via/keymap.c @@ -0,0 +1,57 @@ +/* +Copyright 2021 KapCave + +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 layer_names { + _BASE, // Default Layer + _FN, // Fn Layer 1 + _FN2, // Fn Layer 2 + _FN3 // Fn Layer 3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY */ + [_BASE] = LAYOUT_all( + KC_ESC, 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_GRV, 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_LBRC, KC_RBRC, KC_BSLS, + KC_LCTL, 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_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), + KC_LGUI, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(3)), + + /* FUNCTION */ + [_FN] = LAYOUT_all( + 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_INS, KC_DEL, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_PAUS, KC_DEL, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [_FN2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______), + + [_FN3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______) +}; diff --git a/keyboards/kapcave/gskt00/keymaps/via/readme.md b/keyboards/kapcave/gskt00/keymaps/via/readme.md new file mode 100644 index 0000000000..c5c3db7e3b --- /dev/null +++ b/keyboards/kapcave/gskt00/keymaps/via/readme.md @@ -0,0 +1 @@ +The via keymap for the GSKT-00 PCB.
\ No newline at end of file diff --git a/keyboards/kapcave/gskt00/keymaps/via/rules.mk b/keyboards/kapcave/gskt00/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/kapcave/gskt00/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/kapcave/gskt00/readme.md b/keyboards/kapcave/gskt00/readme.md new file mode 100644 index 0000000000..d1a90ca583 --- /dev/null +++ b/keyboards/kapcave/gskt00/readme.md @@ -0,0 +1,23 @@ +# GSKT-00 PCB + +Firmware for the GSKT-00 PCB + +* Keyboard Maintainer: [KapCave](https://github.com/nachie) +* Hardware Supported: GSKT-00 PCB +* Hardware Availability: [KapCave](https://kapcave.com/products/gskt-00-pcb-usb-c) + +Make example for this keyboard (after setting up your build environment): + + make kapcave/gskt00:default + +Or to make and flash: + + make kapcave/gskt00: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). + +## Bootloader + +* **Bootmagic reset**: Hold down ESC key (top left) and plug in the keyboard +* **Physical reset button**: Briefly press the button labeled "SW_RST1" on the back of the PCB diff --git a/keyboards/gskt00/rules.mk b/keyboards/kapcave/gskt00/rules.mk index 4e262e042f..0c803ec2e2 100755 --- a/keyboards/gskt00/rules.mk +++ b/keyboards/kapcave/gskt00/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/paladin64/config.h b/keyboards/kapcave/paladin64/config.h index fa588ee354..7c3d1a0fa1 100755 --- a/keyboards/paladin64/config.h +++ b/keyboards/kapcave/paladin64/config.h @@ -1,28 +1,41 @@ -#ifndef CONFIG_H -#define CONFIG_H +/* +Copyright 2021 KapCave + +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 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x4B43 +#define PRODUCT_ID 0x5036 #define DEVICE_VER 0x0001 -#define MANUFACTURER inachie +#define MANUFACTURER KapCave #define PRODUCT paladin64 /* key matrix size */ #define MATRIX_ROWS 8 #define MATRIX_COLS 8 +#define BOOTMAGIC_LITE_ROW 3 +#define BOOTMAGIC_LITE_COLUMN 6 + +/* Only required if you add in a trackpoint hardware to the pcb */ #ifdef PS2_USE_USART - #define PS2_CLOCK_PORT PORTD - #define PS2_CLOCK_PIN PIND - #define PS2_CLOCK_DDR DDRD - #define PS2_CLOCK_BIT 5 - #define PS2_DATA_PORT PORTD - #define PS2_DATA_PIN PIND - #define PS2_DATA_DDR DDRD - #define PS2_DATA_BIT 2 +#define PS2_CLOCK_PIN D5 +#define PS2_DATA_PIN D2 /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling * edge */ @@ -58,14 +71,8 @@ #endif #ifdef PS2_USE_INT -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 2 -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 5 +#define PS2_CLOCK_PIN D2 +#define PS2_DATA_PIN D5 #define PS2_INT_INIT() do { \ EICRA |= ((1<<ISC21) | \ @@ -112,5 +119,3 @@ #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 12 #endif - -#endif diff --git a/keyboards/paladin64/info.json b/keyboards/kapcave/paladin64/info.json index 628b1c8c8d..207010c24e 100644 --- a/keyboards/paladin64/info.json +++ b/keyboards/kapcave/paladin64/info.json @@ -1,7 +1,7 @@ { - "keyboard_name": "paladin64", - "url": "", - "maintainer": "qmk", + "keyboard_name": "Paladin64", + "url": "https://kapcave.com/products/paladin64-pcb", + "maintainer": "nachie", "layouts": { "LAYOUT_all": { "layout": [{"label":"~", "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}, {"x":13, "y":0}, {"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":1.25}, {"x":1.25, "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", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] diff --git a/keyboards/paladin64/keymaps/default/keymap.c b/keyboards/kapcave/paladin64/keymaps/default/keymap.c index 15c5858a81..ed906909fe 100755 --- a/keyboards/paladin64/keymaps/default/keymap.c +++ b/keyboards/kapcave/paladin64/keymaps/default/keymap.c @@ -1,3 +1,19 @@ +/* +Copyright 2021 KapCave + +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] = { diff --git a/keyboards/kapcave/paladin64/keymaps/default/readme.md b/keyboards/kapcave/paladin64/keymaps/default/readme.md new file mode 100644 index 0000000000..11248150d9 --- /dev/null +++ b/keyboards/kapcave/paladin64/keymaps/default/readme.md @@ -0,0 +1 @@ +The default keymap for Paladin64
\ No newline at end of file diff --git a/keyboards/kapcave/paladin64/keymaps/via/keymap.c b/keyboards/kapcave/paladin64/keymaps/via/keymap.c new file mode 100644 index 0000000000..7ce94a5ef4 --- /dev/null +++ b/keyboards/kapcave/paladin64/keymaps/via/keymap.c @@ -0,0 +1,59 @@ +/* +Copyright 2021 KapCave + +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 layer_names { + _BASE, // Default Layer + _FN, // Fn Layer 1 + _FN2, // Fn Layer 2 + _FN3 // Fn Layer 3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY */ + [_BASE] = LAYOUT_all( + KC_ESC, 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_GRV, KC_BSLS, + 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_BSPC, + MO(3), 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_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_APP, KC_RGUI, KC_RALT, KC_LCTL), + + /* FUNCTION */ + [_FN] = LAYOUT_all( + 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSPC, + KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, RGB_TOG), + + [_FN2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______) + +}; + diff --git a/keyboards/kapcave/paladin64/keymaps/via/readme.md b/keyboards/kapcave/paladin64/keymaps/via/readme.md new file mode 100644 index 0000000000..2cf66cd4cb --- /dev/null +++ b/keyboards/kapcave/paladin64/keymaps/via/readme.md @@ -0,0 +1 @@ +Via layout for the paladin64 pcb
\ No newline at end of file diff --git a/keyboards/kapcave/paladin64/keymaps/via/rules.mk b/keyboards/kapcave/paladin64/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/kapcave/paladin64/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/kapcave/paladin64/paladin64.c b/keyboards/kapcave/paladin64/paladin64.c new file mode 100755 index 0000000000..88dd1fdff2 --- /dev/null +++ b/keyboards/kapcave/paladin64/paladin64.c @@ -0,0 +1,18 @@ +/* +Copyright 2021 KapCave + +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 "paladin64.h" + diff --git a/keyboards/kapcave/paladin64/paladin64.h b/keyboards/kapcave/paladin64/paladin64.h new file mode 100755 index 0000000000..b578c18540 --- /dev/null +++ b/keyboards/kapcave/paladin64/paladin64.h @@ -0,0 +1,106 @@ +/* +Copyright 2021 KapCave + +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 XXX KC_NO + +#define LAYOUT_all( \ + k36, k37, k46, k47, k56, k57, k66, k67, k76, k77, k06, k07, k17, k26, k27, \ + k34, k35, k44, k45, k54, k55, k64, k65, k75, k05, k15, k16, k25, k24, \ + k32, k33, k43, k52, k53, k63, k73, k74, k03, k04, k13, k14, k23, \ + k31, k41, k42, k51, k61, k62, k71, k72, k01, k02, k11, k12, k21, k22, \ + k30, k40, k50, k60, k70, k00, k10, k20 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 } \ +} + +#define LAYOUT_iso( \ + k36, k37, k46, k47, k56, k57, k66, k67, k76, k77, k06, k07, k17, k27, \ + k34, k35, k44, k45, k54, k55, k64, k65, k75, k05, k15, k16, k25, k24, \ + k32, k33, k43, k52, k53, k63, k73, k74, k03, k04, k13, k14, k23, \ + k31, k41, k42, k51, k61, k62, k71, k72, k01, k02, k11, k12, k21, \ + k30, k40, k50, k60, k70, k00, k20 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { XXX, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, XXX, k23, k24, k25, XXX, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 } \ +} + +#define LAYOUT_60_ansi( \ + k36, k37, k46, k47, k56, k57, k66, k67, k76, k77, k06, k07, k17, k27, \ + k34, k35, k44, k45, k54, k55, k64, k65, k75, k05, k15, k16, k25, k24, \ + k32, k33, k43, k52, k53, k63, k73, k74, k03, k04, k13, k14, k23, \ + k31, k42, k51, k61, k62, k71, k72, k01, k02, k11, k12, k21, \ + k30, k40, k50, k60, k70, k00, k10, k20 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, XXX, k23, k24, k25, XXX, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 } \ +} + +#define LAYOUT_infinity( \ + k36, k37, k46, k47, k56, k57, k66, k67, k76, k77, k06, k07, k17, k26, k27, \ + k34, k35, k44, k45, k54, k55, k64, k65, k75, k05, k15, k16, k25, k24, \ + k32, k33, k43, k52, k53, k63, k73, k74, k03, k04, k13, k14, k23, \ + k31, k42, k51, k61, k62, k71, k72, k01, k02, k11, k12, k21, k22, \ + k30, k40, k50, k60, k70, k00, k10, k20 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 } \ +} + +#define LAYOUT_aek_103( \ + k36, k37, k46, k47, k56, k57, k66, k67, k76, k77, k06, k07, k17, k27, \ + k34, k35, k44, k45, k54, k55, k64, k65, k75, k05, k15, k16, k25, k24, \ + k32, k33, k43, k52, k53, k63, k73, k74, k03, k04, k13, k14, k23, \ + k31, k42, k51, k61, k62, k71, k72, k01, k02, k11, k12, k21, \ + k30, k40, k50, k60, k70, k00, k20 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { XXX, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, XXX, k23, k24, k25, XXX, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 } \ +} diff --git a/keyboards/kapcave/paladin64/readme.md b/keyboards/kapcave/paladin64/readme.md new file mode 100644 index 0000000000..cc4a9b67e3 --- /dev/null +++ b/keyboards/kapcave/paladin64/readme.md @@ -0,0 +1,24 @@ +# Paladin64 ALPS PCB + +Firmware for the Paladin64 ALPS64 PCB, with underglow and an optional +trackpoint module. + +* Keyboard Maintainer: [KapCave](https://github.com/nachie) +* Hardware Supported: Paladin64 ALPS PCB +* Hardware Availability: [KapCave](https://kapcave.com/products/paladin64-pcb) + +Make example for this keyboard (after setting up your build environment): + + make kapcave/paladin64:default + +Or to make and flash: + + make kapcave/paladin64: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). + +## Bootloader + +* **Bootmagic reset**: Hold down ESC key (top left) and plug in the keyboard +* **Physical reset button**: Briefly press the button labeled "SW_RST1" on the back of the PCB diff --git a/keyboards/kapcave/paladin64/rules.mk b/keyboards/kapcave/paladin64/rules.mk new file mode 100755 index 0000000000..f526755d4b --- /dev/null +++ b/keyboards/kapcave/paladin64/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 = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # 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 = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 60_ansi diff --git a/keyboards/kapcave/paladinpad/config.h b/keyboards/kapcave/paladinpad/config.h new file mode 100644 index 0000000000..9b3c9a4ca0 --- /dev/null +++ b/keyboards/kapcave/paladinpad/config.h @@ -0,0 +1,46 @@ +/* +Copyright 2021 KapCave + +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 0x4B43 +#define PRODUCT_ID 0x5050 +#define MANUFACTURER KapCave +#define PRODUCT paladinpad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + + diff --git a/keyboards/kapcave/paladinpad/info.json b/keyboards/kapcave/paladinpad/info.json new file mode 100644 index 0000000000..7d1afccf60 --- /dev/null +++ b/keyboards/kapcave/paladinpad/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "PaladinPad", + "url": "https://kapcave.com/products/paladinpad-pcb", + "maintainer": "nachie", + "layouts": { + "LAYOUT_ortho_5x4": { + "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}, + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4} + ] + }, + "LAYOUT_numpad_aek": { + "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":0, "y":4, "w":2}, + {"x":2, "y":4}, + {"x":3, "y":3, "h":2} + ] + }, + "LAYOUT_numpad_5x4": { + "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":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":1, "h":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + + {"x":0, "y":4, "w":2}, + {"x":2, "y":4}, + {"x":3, "y":3, "h":2} + ] + } + } +} diff --git a/keyboards/kapcave/paladinpad/keymaps/aek/keymap.c b/keyboards/kapcave/paladinpad/keymaps/aek/keymap.c new file mode 100644 index 0000000000..79c3baae44 --- /dev/null +++ b/keyboards/kapcave/paladinpad/keymaps/aek/keymap.c @@ -0,0 +1,38 @@ +/* +Copyright 2021 KapCave + +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] = { + + /* DEFAULT */ + LAYOUT_numpad_aek( + MO(1), KC_PEQL, KC_PSLS, KC_PAST, + KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT), + + /* FUNCTION */ + LAYOUT_numpad_aek( + KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, + RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, + RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RESET, KC_NLCK) +}; + diff --git a/keyboards/kapcave/paladinpad/keymaps/aek/readme.md b/keyboards/kapcave/paladinpad/keymaps/aek/readme.md new file mode 100644 index 0000000000..44b106fa6b --- /dev/null +++ b/keyboards/kapcave/paladinpad/keymaps/aek/readme.md @@ -0,0 +1 @@ +The keymap for PaladinPad which resembles the AEK Numpad
\ No newline at end of file diff --git a/keyboards/kapcave/paladinpad/keymaps/default/keymap.c b/keyboards/kapcave/paladinpad/keymaps/default/keymap.c new file mode 100644 index 0000000000..30dd1b9c00 --- /dev/null +++ b/keyboards/kapcave/paladinpad/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +/* +Copyright 2021 KapCave + +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] = { + + /* DEFAULT */ + LAYOUT_numpad_5x4( + MO(1), KC_PAST, KC_PSLS, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT), + + /* FUNCTION */ + LAYOUT_numpad_5x4( + KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, + RGB_HUI, RGB_SAI, RGB_VAI, + RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RESET, KC_NLCK) +}; + diff --git a/keyboards/kapcave/paladinpad/keymaps/default/readme.md b/keyboards/kapcave/paladinpad/keymaps/default/readme.md new file mode 100644 index 0000000000..2ade4edf38 --- /dev/null +++ b/keyboards/kapcave/paladinpad/keymaps/default/readme.md @@ -0,0 +1 @@ +The default keymap for PaladinPad which resembles the AEK Numpad
\ No newline at end of file diff --git a/keyboards/kapcave/paladinpad/keymaps/ortho/keymap.c b/keyboards/kapcave/paladinpad/keymaps/ortho/keymap.c new file mode 100644 index 0000000000..a65b53b341 --- /dev/null +++ b/keyboards/kapcave/paladinpad/keymaps/ortho/keymap.c @@ -0,0 +1,53 @@ +/* +Copyright 2021 KapCave + +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_keycodes { + DBLZERO = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* DEFAULT */ + LAYOUT_ortho_5x4( + MO(1), KC_PSLS, KC_PAST, KC_BSPC, + KC_P7, KC_P8, KC_P9, KC_MINS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_EQL, + DBLZERO, KC_P0, KC_PDOT, KC_PENT), + + /* FUNCTION */ + LAYOUT_ortho_5x4( + KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, + RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, + RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RESET, KC_NLCK) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DBLZERO: + if (record->event.pressed) { + SEND_STRING("00"); + } + break; + } + return true; +} + + diff --git a/keyboards/kapcave/paladinpad/keymaps/ortho/readme.md b/keyboards/kapcave/paladinpad/keymaps/ortho/readme.md new file mode 100644 index 0000000000..4dc98d30f4 --- /dev/null +++ b/keyboards/kapcave/paladinpad/keymaps/ortho/readme.md @@ -0,0 +1 @@ +The ortho keymap for PaladinPad which makes it a 5x4 ortho pad
\ No newline at end of file diff --git a/keyboards/kapcave/paladinpad/keymaps/via/keymap.c b/keyboards/kapcave/paladinpad/keymaps/via/keymap.c new file mode 100644 index 0000000000..2315da4ace --- /dev/null +++ b/keyboards/kapcave/paladinpad/keymaps/via/keymap.c @@ -0,0 +1,59 @@ +/* +Copyright 2021 KapCave + +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 layer_names { + _BASE, // Default Layer + _FN, // Fn Layer 1 + _FN2, // Fn Layer 2 + _FN3 // Fn Layer 3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* DEFAULT */ + [_BASE] = LAYOUT_ortho_5x4( + MO(1), KC_PSLS, KC_PAST, KC_BSPC, + KC_P7, KC_P8, KC_P9, KC_MINS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_EQL, + KC_P0, KC_P0, KC_PDOT, KC_PENT), + + /* FUNCTION */ + [_FN] = LAYOUT_ortho_5x4( + KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, + RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, + RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RESET, KC_NLCK), + + /* FUNCTION */ + [_FN2] = LAYOUT_ortho_5x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______), + + /* FUNCTION */ + [_FN3] = LAYOUT_ortho_5x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______) +}; diff --git a/keyboards/kapcave/paladinpad/keymaps/via/rules.mk b/keyboards/kapcave/paladinpad/keymaps/via/rules.mk new file mode 100644 index 0000000000..600f7d16a7 --- /dev/null +++ b/keyboards/kapcave/paladinpad/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +# Not enough space on ATMega32u4 for RGB + Audio + Via +AUDIO_ENABLE = no
\ No newline at end of file diff --git a/keyboards/kapcave/paladinpad/paladinpad.c b/keyboards/kapcave/paladinpad/paladinpad.c new file mode 100644 index 0000000000..063e49c872 --- /dev/null +++ b/keyboards/kapcave/paladinpad/paladinpad.c @@ -0,0 +1,17 @@ +/* +Copyright 2021 KapCave + +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 "paladinpad.h" diff --git a/keyboards/kapcave/paladinpad/paladinpad.h b/keyboards/kapcave/paladinpad/paladinpad.h new file mode 100644 index 0000000000..54b320c424 --- /dev/null +++ b/keyboards/kapcave/paladinpad/paladinpad.h @@ -0,0 +1,103 @@ +/* +Copyright 2021 KapCave + +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" + +/* + * ┌─────┬─────┬─────┬─────┐ + * │Num1 │ Eq │Slsh │Star │ + * ├─────┼─────┼─────┼─────┤ + * │ 7 │ 8 │ 9 │ │ + * ├─────┼─────┼─────┤Plus │ + * │ 4 │ 5 │ 6 │ │ + * ├─────┼─────┼─────┼─────┤ + * │ 1 │ 2 │ 3 │ │ + * ├─────┴─────┼─────┤ Ent │ + * │ 0 │ . │ │ + * └───────────┴─────┴─────┘ + */ + +#define LAYOUT_numpad_5x4( \ + K_NUM1, K_SLSH, K_STAR, K_MINUS, \ + K_7, K_8, K_9, \ + K_4, K_5, K_6, K_PLUS, \ + K_1, K_2, K_3, \ + K_0, K_DOT, K_ENT \ +) { \ + { K_NUM1, K_SLSH, K_STAR, K_MINUS }, \ + { K_7, K_8, K_9, KC_NO }, \ + { K_4, K_5, K_6, K_PLUS }, \ + { K_1, K_2, K_3, K_ENT }, \ + { K_0, K_DOT, KC_NO, KC_NO } \ +} + +/* + * ┌─────┬─────┬─────┬─────┐ + * │Num1 │Eql │Slsh │Star │ + * ├─────┼─────┼─────┼─────┤ + * │ 7 │ 8 │ 9 │Minus│ + * ├─────┼─────┼─────┼─────┤ + * │ 4 │ 5 │ 6 │Plus │ + * ├─────┼─────┼─────┼─────┤ + * │ 1 │ 2 │ 3 │ │ + * ├─────┼─────┼─────┤ Ent │ + * │ 0 │ 10 │ . │ │ + * └─────┴─────┴─────┴─────┘ + */ + +#define LAYOUT_numpad_aek( \ + K_NUM1, K_EQ1, K_SLSH1, K_STAR1, \ + K_7, K_8, K_9, K_MINUS1, \ + K_4, K_5, K_6, K_PLUS, \ + K_1, K_2, K_3, \ + K_0, K_DOT1, K_ENT \ +) { \ + { K_NUM1, K_EQ1, K_SLSH1, K_STAR1 }, \ + { K_7, K_8, K_9, K_MINUS1 }, \ + { K_4, K_5, K_6, K_PLUS }, \ + { K_1, K_2, K_3, K_ENT }, \ + { K_0, K_DOT1, KC_NO, KC_NO } \ +} + +/* + * ┌─────┬─────┬─────┬─────┐ + * │Num1 │ Eq │Slsh │Star │ + * ├─────┼─────┼─────┼─────┤ + * │ 7 │ 8 │ 9 │Minus│ + * ├─────┼─────┼─────┼─────┤ + * │ 4 │ 5 │ 6 │Plus │ + * ├─────┼─────┼─────┼─────┤ + * │ 1 │ 2 │ 3 │ 11 │ + * ├─────┼─────┼─────┼─────┤ + * │ 0 │ 10 │ . │ Ent │ + * └─────┴─────┴─────┴─────┘ + */ + +#define LAYOUT_ortho_5x4( \ + K_NUM1, K_EQ1, K_SLSH1, K_STAR1, \ + K_7, K_8, K_9, K_MINUS1, \ + K_4, K_5, K_6, K_PLUS, \ + K_1, K_2, K_3, K_11, \ + K_0, K_10, K_DOT1, K_ENT \ +) { \ + { K_NUM1, K_EQ1, K_SLSH1, K_STAR1 }, \ + { K_7, K_8, K_9, K_MINUS1 }, \ + { K_4, K_5, K_6, K_PLUS }, \ + { K_1, K_2, K_3, K_ENT }, \ + { K_0, K_DOT1, K_10, K_11 } \ +} diff --git a/keyboards/kapcave/paladinpad/readme.md b/keyboards/kapcave/paladinpad/readme.md new file mode 100644 index 0000000000..f21c43d783 --- /dev/null +++ b/keyboards/kapcave/paladinpad/readme.md @@ -0,0 +1,23 @@ +# PaladinPad PCB + +Firmware for the PaladinPad, with underglow. + +* Keyboard Maintainer: [KapCave](https://github.com/nachie) +* Hardware Supported: PaladinPad +* Hardware Availability: [KapCave](https://kapcave.com/products/paladinpad-pcb) + +Make example for this keyboard (after setting up your build environment): + + make kapcave/paladinpad:default + +Or to make and flash: + + make kapcave/paladinpad: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). + +## Bootloader + +* **Bootmagic reset**: Hold down NumLock (Top Left) and plug in the keyboard +* **Physical reset button**: Briefly press the button labeled "SW_RST1" on the back of the PCB diff --git a/keyboards/kapcave/paladinpad/rev1/config.h b/keyboards/kapcave/paladinpad/rev1/config.h new file mode 100644 index 0000000000..84af56ec25 --- /dev/null +++ b/keyboards/kapcave/paladinpad/rev1/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2021 KapCave + +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 DEVICE_VER 0x0001 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C7, B6, B4, D7, D6 } +#define MATRIX_COL_PINS { D4, D5, D3, B7 } + +#define RGB_DI_PIN D0 + +#ifdef RGB_DI_PIN +#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 +#define RGBLIGHT_EFFECT_TWINKLE +#define RGBLED_NUM 8 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 12 +#endif diff --git a/keyboards/mechlovin/adelais/standard_led/rev2/rules.mk b/keyboards/kapcave/paladinpad/rev1/rules.mk index e69de29bb2..e69de29bb2 100644 --- a/keyboards/mechlovin/adelais/standard_led/rev2/rules.mk +++ b/keyboards/kapcave/paladinpad/rev1/rules.mk diff --git a/keyboards/kapcave/paladinpad/rev2/config.h b/keyboards/kapcave/paladinpad/rev2/config.h new file mode 100644 index 0000000000..a27ac03ab1 --- /dev/null +++ b/keyboards/kapcave/paladinpad/rev2/config.h @@ -0,0 +1,47 @@ +/* +Copyright 2021 KapCave + +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 DEVICE_VER 0x0002 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F4, F6, D7, B4, D6 } +#define MATRIX_COL_PINS { F7, F5, D3, B7 } + +#define AUDIO_PIN C6 + +#define RGB_DI_PIN D0 + +#ifdef RGB_DI_PIN +#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 +#define RGBLIGHT_EFFECT_TWINKLE +#define RGBLED_NUM 7 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 12 +#endif + diff --git a/keyboards/mechlovin/adelais/standard_led/.noci b/keyboards/kapcave/paladinpad/rev2/rules.mk index e69de29bb2..e69de29bb2 100644 --- a/keyboards/mechlovin/adelais/standard_led/.noci +++ b/keyboards/kapcave/paladinpad/rev2/rules.mk diff --git a/keyboards/kapcave/paladinpad/rules.mk b/keyboards/kapcave/paladinpad/rules.mk new file mode 100644 index 0000000000..bb918b188d --- /dev/null +++ b/keyboards/kapcave/paladinpad/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +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 +# 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 = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +DEFAULT_FOLDER = kapcave/paladinpad/rev2 +LAYOUTS = numpad_5x4 ortho_5x4 diff --git a/keyboards/kbdfans/bella/rgb/config.h b/keyboards/kbdfans/bella/rgb/config.h index 07594a34ab..7d93ecb8d7 100644 --- a/keyboards/kbdfans/bella/rgb/config.h +++ b/keyboards/kbdfans/bella/rgb/config.h @@ -48,10 +48,8 @@ //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 108 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 108 #define DRIVER_INDICATOR_LED_TOTAL 0 #endif #define DYNAMIC_KEYMAP_LAYER_COUNT 2 diff --git a/keyboards/kbdfans/bella/rgb_iso/config.h b/keyboards/kbdfans/bella/rgb_iso/config.h index 4fda998677..9d931cbe85 100644 --- a/keyboards/kbdfans/bella/rgb_iso/config.h +++ b/keyboards/kbdfans/bella/rgb_iso/config.h @@ -48,10 +48,8 @@ //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 109 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 109 #define DRIVER_INDICATOR_LED_TOTAL 0 #endif #define DYNAMIC_KEYMAP_LAYER_COUNT 2 diff --git a/keyboards/kbdfans/boop65/rgb/config.h b/keyboards/kbdfans/boop65/rgb/config.h index 71db0f8b57..ba9c627c15 100644 --- a/keyboards/kbdfans/boop65/rgb/config.h +++ b/keyboards/kbdfans/boop65/rgb/config.h @@ -54,8 +54,7 @@ # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define DRIVER_ADDR_1 0b0110000 # define DRIVER_COUNT 1 -# define DRIVER_1_LED_TOTAL 83 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_LED_TOTAL 83 # define DRIVER_INDICATOR_LED_TOTAL 0 #endif diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h index 1ee83cdc94..7111bd5faf 100755 --- a/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h @@ -67,9 +67,7 @@ #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 67 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 67 #define DRIVER_INDICATOR_LED_TOTAL 0 #endif diff --git a/keyboards/kbdfans/kbdmini/config.h b/keyboards/kbdfans/kbdmini/config.h index fc65f43411..beb0637adc 100644 --- a/keyboards/kbdfans/kbdmini/config.h +++ b/keyboards/kbdfans/kbdmini/config.h @@ -54,10 +54,8 @@ #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH #define DISABLE_RGB_MATRIX_DIGITAL_RAIN #define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 52 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL 52 #endif /* disable these deprecated features by default */ diff --git a/keyboards/keebio/chocopad/config.h b/keyboards/keebio/chocopad/config.h index 08e62f034f..e07bd5da5b 100644 --- a/keyboards/keebio/chocopad/config.h +++ b/keyboards/keebio/chocopad/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -42,5 +41,3 @@ #endif #define RGB_DI_PIN D3 #define RGBLED_NUM 4 - -#endif diff --git a/keyboards/keebio/dilly/config.h b/keyboards/keebio/dilly/config.h index 835498f25e..9d7b08509d 100644 --- a/keyboards/keebio/dilly/config.h +++ b/keyboards/keebio/dilly/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -46,5 +45,3 @@ #define RGB_DI_PIN D3 #define RGBLED_NUM 10 - -#endif diff --git a/keyboards/keebio/dilly/dilly.h b/keyboards/keebio/dilly/dilly.h index 229c6cd954..e0f13bae5e 100644 --- a/keyboards/keebio/dilly/dilly.h +++ b/keyboards/keebio/dilly/dilly.h @@ -1,19 +1,16 @@ -#ifndef DILLY_H -#define DILLY_H +#pragma once #include "quantum.h" #define LAYOUT_ortho_3x10( \ - A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, \ - B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, \ - C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 \ + k00, k01, k02, k03, k04, k34, k33, k32, k31, k30, \ + k10, k11, k12, k13, k14, k44, k43, k42, k41, k40, \ + k20, k21, k22, k23, k24, k54, k53, k52, k51, k50 \ ) { \ - { A1, A2, A3, A4, A5 }, \ - { B1, B2, B3, B4, B5 }, \ - { C1, C2, C3, C4, C5 }, \ - { A10, A9, A8, A7, A6 }, \ - { B10, B9, B8, B7, B6 }, \ - { C10, C9, C8, C7, C6 } \ + { k00, k01, k02, k03, k04 }, \ + { k10, k11, k12, k13, k14 }, \ + { k20, k21, k22, k23, k24 }, \ + { k30, k31, k32, k33, k34 }, \ + { k40, k41, k42, k43, k44 }, \ + { k50, k51, k52, k53, k54 } \ } - -#endif diff --git a/keyboards/keebio/iris/config.h b/keyboards/keebio/iris/config.h index 863722d7d0..6868dc1354 100644 --- a/keyboards/keebio/iris/config.h +++ b/keyboards/keebio/iris/config.h @@ -15,9 +15,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" - -#endif // CONFIG_H diff --git a/keyboards/keebio/levinson/config.h b/keyboards/keebio/levinson/config.h index ca0c79e554..4a3def7cc8 100644 --- a/keyboards/keebio/levinson/config.h +++ b/keyboards/keebio/levinson/config.h @@ -17,9 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" - -#endif diff --git a/keyboards/keybage/radpad/keymaps/default/keymap.c b/keyboards/keybage/radpad/keymaps/default/keymap.c index 190400f7fa..f2d712bd6f 100644 --- a/keyboards/keybage/radpad/keymaps/default/keymap.c +++ b/keyboards/keybage/radpad/keymaps/default/keymap.c @@ -126,7 +126,7 @@ static void render_logo(void) { oled_write_raw_P(radpad_logo, sizeof(radpad_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { if (oled_logo_cleared) { render_status(); } else { @@ -138,5 +138,6 @@ void oled_task_user(void) { render_logo(); } } + return false; } #endif diff --git a/keyboards/keycapsss/kimiko/keymaps/default/keymap.c b/keyboards/keycapsss/kimiko/keymaps/default/keymap.c index 17bc1c7b37..5a33d527c8 100644 --- a/keyboards/keycapsss/kimiko/keymaps/default/keymap.c +++ b/keyboards/keycapsss/kimiko/keymaps/default/keymap.c @@ -321,12 +321,13 @@ void render_status_secondary(void) { render_space(); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_status_secondary(); } + return false; } #endif diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c index 714a5c80f4..2382185362 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c @@ -35,8 +35,9 @@ void keyboard_post_init_user(void) { // Rev3 and above only #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_ln_P(PSTR("Plaid-Pad ///////////"), false); + return false; } #endif diff --git a/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c index 0141676013..540a735fc5 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c @@ -117,9 +117,10 @@ void oled_render_layer_state(void) { } -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_ln_P(PSTR("Plaid-Pad ///////////"), false); oled_render_layer_state(); + return false; } #endif diff --git a/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c index 673ea1c204..7d48591cd2 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c @@ -62,8 +62,9 @@ void keyboard_post_init_user(void) { // Rev3 and above only #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_ln_P(PSTR("Plaid-Pad ///////////"), false); + return false; } #endif diff --git a/keyboards/kikoslab/kl90/keymaps/default/keymap.c b/keyboards/kikoslab/kl90/keymaps/default/keymap.c index 94ebe2633e..4dbffe8f77 100644 --- a/keyboards/kikoslab/kl90/keymaps/default/keymap.c +++ b/keyboards/kikoslab/kl90/keymaps/default/keymap.c @@ -140,7 +140,8 @@ static void render_anim(void){ } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); + return false; } #endif diff --git a/keyboards/kikoslab/kl90/keymaps/via/keymap.c b/keyboards/kikoslab/kl90/keymaps/via/keymap.c index 94ebe2633e..4dbffe8f77 100644 --- a/keyboards/kikoslab/kl90/keymaps/via/keymap.c +++ b/keyboards/kikoslab/kl90/keymaps/via/keymap.c @@ -140,7 +140,8 @@ static void render_anim(void){ } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); + return false; } #endif diff --git a/keyboards/kinesis/alvicstep/alvicstep.h b/keyboards/kinesis/alvicstep/alvicstep.h index 169012faf5..053698770a 100644 --- a/keyboards/kinesis/alvicstep/alvicstep.h +++ b/keyboards/kinesis/alvicstep/alvicstep.h @@ -1,80 +1,77 @@ -#ifndef KINESIS_ALVICSTEP_H -#define KINESIS_ALVICSTEP_H +#pragma once #include "../kinesis.h" #define ___ KC_NO -#define LAYOUT( \ - k02, k22, k12, k01, k21, k11, k00, k20, k10, \ - k80, k70, k60, k50, k40, k30, \ - k81, k71, k61, k51, k41, k31, \ - k82, k72, k62, k52, k42, k32, \ - k83, k73, k63, k53, k43, k33, \ - k74, k64, k54, k34, \ - k36, k35, \ - k55, \ - k56, k46, k75, \ - \ - k03, k23, k13, k04, k24, k14, k05, k85, k84, \ - k94, kA4, kB4, kD4, kE4, kF4, \ - k95, kA5, kB5, kD5, kE5, kF5, \ - k96, kA6, kB6, kD6, kE6, kF6, \ - k97, kA7, kB7, kD7, kE7, kF7, \ - k93, kB3, kD3, kE3, \ - k47, k66, \ - k67, \ - k87, k76, k86 \ -) { \ - { k00, k01, k02, k03, k04, k05, ___, ___ }, \ - { k10, k11, k12, k13, k14, ___, ___, ___ }, \ - { k20, k21, k22, k23, k24, ___, ___, ___ }, \ - { k30, k31, k32, k33, k34, k35, k36, ___ }, \ - { k40, k41, k42, k43, ___, ___, k46, k47 }, \ - { k50, k51, k52, k53, k54, k55, k56, ___ }, \ - { k60, k61, k62, k63, k64, ___, k66, k67 }, \ - { k70, k71, k72, k73, k74, k75, k76, ___ }, \ - { k80, k81, k82, k83, k84, k85, k86, k87 }, \ - { ___, ___, ___, k93, k94, k95, k96, k97 }, \ - { ___, ___, ___, ___, kA4, kA5, kA6, kA7 }, \ - { ___, ___, ___, kB3, kB4, kB5, kB6, kB7 }, \ - { ___, ___, ___, ___, ___, ___, ___, ___ }, \ - { ___, ___, ___, kD3, kD4, kD5, kD6, kD7 }, \ - { ___, ___, ___, kE3, kE4, kE5, kE6, kE7 }, \ - { ___, ___, ___, ___, kF4, kF5, kF6, kF7 } \ +#define LAYOUT( \ + k02, k22, k12, k01, k21, k11, k00, k20, k10, \ + k80, k70, k60, k50, k40, k30, \ + k81, k71, k61, k51, k41, k31, \ + k82, k72, k62, k52, k42, k32, \ + k83, k73, k63, k53, k43, k33, \ + k74, k64, k54, k34, \ + k36, k35, \ + k55, \ + k56, k46, k75, \ +\ + k03, k23, k13, k04, k24, k14, k05, k85, k84, \ + k94, kA4, kB4, kD4, kE4, kF4, \ + k95, kA5, kB5, kD5, kE5, kF5, \ + k96, kA6, kB6, kD6, kE6, kF6, \ + k97, kA7, kB7, kD7, kE7, kF7, \ + k93, kB3, kD3, kE3, \ + k47, k66, \ + k67, \ + k87, k76, k86 \ +) { \ + { k00, k01, k02, k03, k04, k05, ___, ___ }, \ + { k10, k11, k12, k13, k14, ___, ___, ___ }, \ + { k20, k21, k22, k23, k24, ___, ___, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, ___ }, \ + { k40, k41, k42, k43, ___, ___, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, ___ }, \ + { k60, k61, k62, k63, k64, ___, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, ___ }, \ + { k80, k81, k82, k83, k84, k85, k86, k87 }, \ + { ___, ___, ___, k93, k94, k95, k96, k97 }, \ + { ___, ___, ___, ___, kA4, kA5, kA6, kA7 }, \ + { ___, ___, ___, kB3, kB4, kB5, kB6, kB7 }, \ + { ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, kD3, kD4, kD5, kD6, kD7 }, \ + { ___, ___, ___, kE3, kE4, kE5, kE6, kE7 }, \ + { ___, ___, ___, ___, kF4, kF5, kF6, kF7 } \ } -/* ---------------- LEFT HAND ----------------- ---------------- RIGHT HAND ---------------- */ -#define LAYOUT_pretty( \ - k02, k22, k12, k01, k21, k11, k00, k20, k10, k03, k23, k13, k04, k24, k14, k05, k85, k84, \ - k80, k70, k60, k50, k40, k30, k94, kA4, kB4, kD4, kE4, kF4, \ - k81, k71, k61, k51, k41, k31, k95, kA5, kB5, kD5, kE5, kF5, \ - k82, k72, k62, k52, k42, k32, k96, kA6, kB6, kD6, kE6, kF6, \ - k83, k73, k63, k53, k43, k33, k97, kA7, kB7, kD7, kE7, kF7, \ - k74, k64, k54, k34, k93, kB3, kD3, kE3, \ - k36, k35, k47, k66, \ - k55, k67, \ - k56, k46, k75, k87, k76, k86 \ -) { \ - { k00, k01, k02, k03, k04, k05, ___, ___ }, \ - { k10, k11, k12, k13, k14, ___, ___, ___ }, \ - { k20, k21, k22, k23, k24, ___, ___, ___ }, \ - { k30, k31, k32, k33, k34, k35, k36, ___ }, \ - { k40, k41, k42, k43, ___, ___, k46, k47 }, \ - { k50, k51, k52, k53, k54, k55, k56, ___ }, \ - { k60, k61, k62, k63, k64, ___, k66, k67 }, \ - { k70, k71, k72, k73, k74, k75, k76, ___ }, \ - { k80, k81, k82, k83, k84, k85, k86, k87 }, \ - { ___, ___, ___, k93, k94, k95, k96, k97 }, \ - { ___, ___, ___, ___, kA4, kA5, kA6, kA7 }, \ - { ___, ___, ___, kB3, kB4, kB5, kB6, kB7 }, \ - { ___, ___, ___, ___, ___, ___, ___, ___ }, \ - { ___, ___, ___, kD3, kD4, kD5, kD6, kD7 }, \ - { ___, ___, ___, kE3, kE4, kE5, kE6, kE7 }, \ - { ___, ___, ___, ___, kF4, kF5, kF6, kF7 } \ +#define LAYOUT_pretty( \ + k02, k22, k12, k01, k21, k11, k00, k20, k10, k03, k23, k13, k04, k24, k14, k05, k85, k84, \ + k80, k70, k60, k50, k40, k30, k94, kA4, kB4, kD4, kE4, kF4, \ + k81, k71, k61, k51, k41, k31, k95, kA5, kB5, kD5, kE5, kF5, \ + k82, k72, k62, k52, k42, k32, k96, kA6, kB6, kD6, kE6, kF6, \ + k83, k73, k63, k53, k43, k33, k97, kA7, kB7, kD7, kE7, kF7, \ + k74, k64, k54, k34, k93, kB3, kD3, kE3, \ + k36, k35, k47, k66, \ + k55, k67, \ + k56, k46, k75, k87, k76, k86 \ +) { \ + { k00, k01, k02, k03, k04, k05, ___, ___ }, \ + { k10, k11, k12, k13, k14, ___, ___, ___ }, \ + { k20, k21, k22, k23, k24, ___, ___, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, ___ }, \ + { k40, k41, k42, k43, ___, ___, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, ___ }, \ + { k60, k61, k62, k63, k64, ___, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, ___ }, \ + { k80, k81, k82, k83, k84, k85, k86, k87 }, \ + { ___, ___, ___, k93, k94, k95, k96, k97 }, \ + { ___, ___, ___, ___, kA4, kA5, kA6, kA7 }, \ + { ___, ___, ___, kB3, kB4, kB5, kB6, kB7 }, \ + { ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, kD3, kD4, kD5, kD6, kD7 }, \ + { ___, ___, ___, kE3, kE4, kE5, kE6, kE7 }, \ + { ___, ___, ___, ___, kF4, kF5, kF6, kF7 } \ } - /* Row pin configuration @@ -97,5 +94,3 @@ PB6 col6 | | | | LCtrl | Delete | Bksp | RCtrl | Enter | Space | H | J | K | | L | ;: | '" PB7 col7 | | | | | RGUI | | PageUp | | PageDn | N | M | ,< | | .> | /? | RShift */ - -#endif diff --git a/keyboards/kinesis/alvicstep/config.h b/keyboards/kinesis/alvicstep/config.h index 02c7725cec..8a656264ee 100644 --- a/keyboards/kinesis/alvicstep/config.h +++ b/keyboards/kinesis/alvicstep/config.h @@ -1,5 +1,4 @@ -#ifndef ALVICSTEP_CONFIG_H -#define ALVICSTEP_CONFIG_H +#pragma once #include "../config.h" #include "config_common.h" @@ -31,6 +30,3 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - - -#endif diff --git a/keyboards/kinesis/config.h b/keyboards/kinesis/config.h index ecedf9bbff..b04d325903 100644 --- a/keyboards/kinesis/config.h +++ b/keyboards/kinesis/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED @@ -78,5 +77,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/kinesis/keymaps/default/keymap.c b/keyboards/kinesis/keymaps/default/keymap.c index 2d43aad077..d46a07cacf 100644 --- a/keyboards/kinesis/keymaps/default/keymap.c +++ b/keyboards/kinesis/keymaps/default/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL,KC_LALT, KC_HOME, KC_BSPC,KC_DEL ,KC_END , - KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR ,KC_SLCK ,KC_PAUS, KC_FN0, RESET, + KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR ,KC_SLCK ,KC_PAUS, KC_NO, RESET, KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS, KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN,KC_QUOT, diff --git a/keyboards/kinesis/keymaps/default_pretty/keymap.c b/keyboards/kinesis/keymaps/default_pretty/keymap.c index 9c01b222a7..94102a8067 100644 --- a/keyboards/kinesis/keymaps/default_pretty/keymap.c +++ b/keyboards/kinesis/keymaps/default_pretty/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [QWERTY] = LAYOUT_pretty( - KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, KC_FN0, RESET, + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, KC_NO, RESET, KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, 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_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, diff --git a/keyboards/kinesis/keymaps/dvorak/keymap.c b/keyboards/kinesis/keymaps/dvorak/keymap.c index 3c532628ef..6f4d63a7d4 100644 --- a/keyboards/kinesis/keymaps/dvorak/keymap.c +++ b/keyboards/kinesis/keymaps/dvorak/keymap.c @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_HOME, KC_BSPC, KC_DEL, KC_END, // right hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_FN0, RESET, + KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, RESET, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_D, KC_H, KC_T, KC_N, KC_S, KC_BSLS, diff --git a/keyboards/kinesis/keymaps/stapelberg/keymap.c b/keyboards/kinesis/keymaps/stapelberg/keymap.c index c62ffbbccf..d7a0a5e5c2 100644 --- a/keyboards/kinesis/keymaps/stapelberg/keymap.c +++ b/keyboards/kinesis/keymaps/stapelberg/keymap.c @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL,KC_LALT, KC_LGUI, KC_BSPC,KC_ESC ,KC_END , - KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR ,KC_SLCK ,KC_PAUS, KC_FN0, RESET, + KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR ,KC_SLCK ,KC_PAUS, KC_NO, RESET, KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS, KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN,KC_QUOT, diff --git a/keyboards/kinesis/keymaps/tw1t611/keymap.c b/keyboards/kinesis/keymaps/tw1t611/keymap.c index c94f06bbb9..e7a6ffd6e9 100644 --- a/keyboards/kinesis/keymaps/tw1t611/keymap.c +++ b/keyboards/kinesis/keymaps/tw1t611/keymap.c @@ -15,7 +15,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RCTL,KC_LALT, KC_HOME, KC_SPC ,KC_LSFT,KC_BSPC , - KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR,KC_SLCK,KC_PAUS,KC_FN0 ,RESET, + KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR,KC_SLCK,KC_PAUS,KC_NO ,RESET, KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,DE_SS , KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,DE_ADIA, KC_H ,KC_J ,KC_K ,KC_L ,DE_SLSH,DE_ODIA, diff --git a/keyboards/kinesis/kinesis.h b/keyboards/kinesis/kinesis.h index 1635c34436..54cf6b81a7 100644 --- a/keyboards/kinesis/kinesis.h +++ b/keyboards/kinesis/kinesis.h @@ -1,35 +1,24 @@ -#ifndef KINESIS_H -#define KINESIS_H +#pragma once -#ifdef KEYBOARD_kinesis_alvicstep - #include "alvicstep.h" -#endif -#ifdef KEYBOARD_kinesis_stapelberg - #include "stapelberg.h" -#endif -#ifdef KEYBOARD_kinesis_kint2pp - #include "kint2pp.h" -#endif -#ifdef KEYBOARD_kinesis_nguyenvietyen - #include "nguyenvietyen.h" -#endif -#ifdef KEYBOARD_kinesis_kint36 - #include "kint36.h" -#endif -#ifdef KEYBOARD_kinesis_kint41 - #include "kint41.h" +#if defined(KEYBOARD_kinesis_alvicstep) +# include "alvicstep.h" +#elif defined(KEYBOARD_kinesis_stapelberg) +# include "stapelberg.h" +#elif defined(KEYBOARD_kinesis_kint2pp) +# include "kint2pp.h" +#elif defined(KEYBOARD_kinesis_nguyenvietyen) +# include "nguyenvietyen.h" +#elif defined(KEYBOARD_kinesis_kint36) +# include "kint36.h" +#elif defined(KEYBOARD_kinesis_kint41) +# include "kint41.h" #endif #include "quantum.h" - void all_led_off(void); void all_led_on(void); void num_lock_led_on(void); void caps_lock_led_on(void); void scroll_lock_led_on(void); void keypad_led_on(void); - - - -#endif diff --git a/keyboards/kinesis/kint2pp/config.h b/keyboards/kinesis/kint2pp/config.h index a5530bc2f7..4191446e68 100644 --- a/keyboards/kinesis/kint2pp/config.h +++ b/keyboards/kinesis/kint2pp/config.h @@ -44,3 +44,7 @@ // Reduce input latency by lowering the USB polling interval // from its 10ms default to the 1ms minimum that USB 1.x (Full Speed) allows: #define USB_POLLING_INTERVAL_MS 1 + +// The Teensy 2++ consumes about 60 mA of current at its full speed of 16 MHz as +// per https://www.pjrc.com/teensy/low_power.html +#define USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/kinesis/kint36/config.h b/keyboards/kinesis/kint36/config.h index ab34daa7b8..3738629ea7 100644 --- a/keyboards/kinesis/kint36/config.h +++ b/keyboards/kinesis/kint36/config.h @@ -63,6 +63,10 @@ // from its 10ms default to the 1ms minimum that USB 1.x (Full Speed) allows: #define USB_POLLING_INTERVAL_MS 1 +// The Teensy 3.6 consumes about 80 mA of current at its full speed of 180 MHz: +// https://forum.pjrc.com/threads/47256-What-is-the-power-consumption-of-the-Teensy-3-6 +#define USB_MAX_POWER_CONSUMPTION 100 + #define LED_PIN_ON_STATE 0 #define LED_NUM_LOCK_PIN A14 #define LED_CAPS_LOCK_PIN C7 diff --git a/keyboards/kinesis/kint36/rules.mk b/keyboards/kinesis/kint36/rules.mk index 4f33583124..c50225ad8a 100644 --- a/keyboards/kinesis/kint36/rules.mk +++ b/keyboards/kinesis/kint36/rules.mk @@ -1,5 +1,5 @@ -BOARD = PJRC_TEENSY_3_6 -MCU = MK66F18 +# MCU name +MCU = MK66FX1M0 # Debounce eagerly (report change immediately), keep per-key timers. We can use # this because the kinT does not have to deal with noise. diff --git a/keyboards/kinesis/kint41/config.h b/keyboards/kinesis/kint41/config.h index 349d3ee364..7d87b8dd76 100644 --- a/keyboards/kinesis/kint41/config.h +++ b/keyboards/kinesis/kint41/config.h @@ -90,6 +90,10 @@ // from its 10ms default to the 125μs minimum that USB 2.x (High Speed) allows: #define USB_POLLING_INTERVAL_MS 1 +// The Teensy 4.1 consumes about 100 mA of current at its full speed of 600 MHz +// as per https://www.pjrc.com/store/teensy41.html +#define USB_MAX_POWER_CONSUMPTION 100 + /* 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. diff --git a/keyboards/kinesis/stapelberg/config.h b/keyboards/kinesis/stapelberg/config.h index 8f920c19c1..fe44131adb 100644 --- a/keyboards/kinesis/stapelberg/config.h +++ b/keyboards/kinesis/stapelberg/config.h @@ -1,5 +1,4 @@ -#ifndef STAPELBERG_CONFIG_H -#define STAPELBERG_CONFIG_H +#pragma once #include "../config.h" #include "config_common.h" @@ -46,5 +45,3 @@ */ #define IGNORE_MOD_TAP_INTERRUPT - -#endif diff --git a/keyboards/kinesis/stapelberg/stapelberg.h b/keyboards/kinesis/stapelberg/stapelberg.h index e35e2f5db8..f478c493fd 100644 --- a/keyboards/kinesis/stapelberg/stapelberg.h +++ b/keyboards/kinesis/stapelberg/stapelberg.h @@ -1,5 +1,4 @@ -#ifndef KINESIS_STAPELBERG_H -#define KINESIS_STAPELBERG_H +#pragma once #include "quantum.h" @@ -9,71 +8,70 @@ // 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, ___ } \ +#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, ___ } \ +#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, ___ } \ } /* @@ -98,7 +96,3 @@ PC4 kCx Row: ESC F3 F6 F9 F12 PAU -- PC5 kDx Row: F1 F4 F7 F10 PRT PRG -- PC6 kEx Row: F2 F5 F8 F11 SLK KEY -- */ - - - -#endif diff --git a/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c b/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c index 45e83f7611..6acb55dd53 100755 --- a/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c +++ b/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c @@ -76,7 +76,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status sprintf(oled_layer,"Layer\nL: %d\n",get_highest_layer(layer_state)); oled_write(oled_layer,false); @@ -86,5 +86,6 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NLCK ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCRLK") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c b/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c index 29262b8c38..62c2349150 100644 --- a/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c +++ b/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c @@ -41,7 +41,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; // flips the display 180 degrees if offhand } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Let's\nbuild\nsome-\nthing\nto-\nget-\nher!"), false); switch (get_highest_layer(layer_state)) { @@ -61,5 +61,7 @@ void oled_task_user(void) { oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NLCK ") : PSTR(" "), false); oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPS ") : PSTR(" "), false); oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLK") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/kira75/config.h b/keyboards/kira75/config.h index db42c36cc3..373c3e4f0b 100644 --- a/keyboards/kira75/config.h +++ b/keyboards/kira75/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -115,5 +114,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/kira75/kira75.h b/keyboards/kira75/kira75.h index 8c564f2082..27fdab02db 100644 --- a/keyboards/kira75/kira75.h +++ b/keyboards/kira75/kira75.h @@ -13,11 +13,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef KIRA75_H -#define KIRA75_H -#include "quantum.h" +#pragma once +#include "quantum.h" // Functions for setting LEDs on toggle keys inline void caps_led_on(void) { DDRD |= (1<<7); PORTD &= ~(1<<7); } @@ -26,25 +25,24 @@ inline void caps_led_off(void) { DDRD &= ~(1<<7); PORTD &= ~(1<<7); } inline void num_led_on(void) { DDRD |= (1<<6); PORTD &= ~(1<<6); } inline void num_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); } +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // 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( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \ - K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, \ - K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4E, K4F, \ - K50, K51, K53, K56, K5A, K5B, K5D, K5E, K5F \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, K1F }, \ - { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F }, \ - { KC_NO, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ - { K50, K51, KC_NO, K53, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, KC_NO, K5D, K5E, K5F } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4D, k4E, k4F, \ + k50, k51, k53, k56, k5A, k5B, k5D, k5E, k5F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX, k1F }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, k3F }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, XXX, k4D, k4E, k4F }, \ + { k50, k51, XXX, k53, XXX, XXX, k56, XXX, XXX, XXX, k5A, k5B, XXX, k5D, k5E, k5F } \ } - -#endif diff --git a/keyboards/kiwikey/wanderland/keymaps/stanrc85/keymap.c b/keyboards/kiwikey/wanderland/keymaps/stanrc85/keymap.c index de683e641b..c535306afc 100644 --- a/keyboards/kiwikey/wanderland/keymaps/stanrc85/keymap.c +++ b/keyboards/kiwikey/wanderland/keymaps/stanrc85/keymap.c @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { static const char PROGMEM qmk_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, @@ -81,5 +81,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/kmini/config.h b/keyboards/kmini/config.h index a0592b4ecf..c242aff0d0 100755 --- a/keyboards/kmini/config.h +++ b/keyboards/kmini/config.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H + +#pragma once #include "config_common.h" @@ -48,5 +48,3 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 - -#endif diff --git a/keyboards/kmini/kmini.h b/keyboards/kmini/kmini.h index 3d54c39d1f..e32ad5a0f9 100755 --- a/keyboards/kmini/kmini.h +++ b/keyboards/kmini/kmini.h @@ -13,24 +13,23 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef KMINI_H -#define KMINI_H -#define ___ KC_NO + +#pragma once #include "quantum.h" +#define ___ KC_NO + #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, K3F, K3G, \ - K40, K41, K42, K43, K44, K47, K4C, K4E, K4F, K4G \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, k3F, k3G, \ + k40, k41, k42, k43, k44, k47, k4C, k4E, k4F, k4G \ ) { \ - {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G}, \ - {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G}, \ - {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, ___, K2F, K2G}, \ - {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___, K3E, K3F, K3G}, \ - {K40, K41, K42, K43, K44, ___, ___, K47, ___, ___, ___, ___, K4C, ___, K4E, K4F, K4G}, \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G }, \ + { k40, k41, k42, k43, k44, ___, ___, k47, ___, ___, ___, ___, k4C, ___, k4E, k4F, k4G } \ } - -#endif diff --git a/keyboards/knobgoblin/keymaps/moults31/keymap.c b/keyboards/knobgoblin/keymaps/moults31/keymap.c index 16830bc98d..20dda4ccd0 100644 --- a/keyboards/knobgoblin/keymaps/moults31/keymap.c +++ b/keyboards/knobgoblin/keymaps/moults31/keymap.c @@ -141,7 +141,7 @@ static void render_goblin_logo(void) { oled_write_raw_P(my_logo, sizeof(my_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { render_goblin_logo(); @@ -167,4 +167,5 @@ void oled_task_user(void) { oled_write_P(PSTR(" NONE\n"), false); break; } + return false; } diff --git a/keyboards/knobgoblin/knobgoblin.c b/keyboards/knobgoblin/knobgoblin.c index 7349a31995..fcf86a3a40 100644 --- a/keyboards/knobgoblin/knobgoblin.c +++ b/keyboards/knobgoblin/knobgoblin.c @@ -40,7 +40,9 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { #ifdef OLED_ENABLE /* rotate screen for proper orentation*/ -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_270; +} /* byte map for the goblin logo, knob goblin text, and level text */ static void render_goblin_logo(void) { @@ -72,7 +74,10 @@ static void render_goblin_logo(void) { } /* text display for layer indication */ -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } render_goblin_logo(); @@ -99,5 +104,6 @@ __attribute__((weak)) void oled_task_user(void) { break; } + return false; } #endif diff --git a/keyboards/knops/mini/config.h b/keyboards/knops/mini/config.h index 28db6ae8d9..eca8b8b4a8 100644 --- a/keyboards/knops/mini/config.h +++ b/keyboards/knops/mini/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -106,5 +105,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/knops/mini/mini.h b/keyboards/knops/mini/mini.h index e2d6c546b0..e028dea6d7 100644 --- a/keyboards/knops/mini/mini.h +++ b/keyboards/knops/mini/mini.h @@ -13,18 +13,17 @@ * 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 "quantum.h" -#ifndef KNOPS_MINI_H -#define KNOPS_MINI_H +#pragma once // This a shortcut to help you visually see your layout. // 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( \ - K00, K01, K02, K03, K04, K05 \ + k00, k01, k02, k03, k04, k05 \ ) { \ - { K00, K01, K02, K03, K04, K05 }, \ + { k00, k01, k02, k03, k04, k05 } \ } -#endif
\ No newline at end of file diff --git a/keyboards/kona_classic/config.h b/keyboards/kona_classic/config.h index 1a99fa1265..c6dc3a0318 100644 --- a/keyboards/kona_classic/config.h +++ b/keyboards/kona_classic/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -105,5 +104,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/kona_classic/kona_classic.h b/keyboards/kona_classic/kona_classic.h index 98eed3b3c2..66757fc9c4 100644 --- a/keyboards/kona_classic/kona_classic.h +++ b/keyboards/kona_classic/kona_classic.h @@ -13,139 +13,136 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef KONACLASSIC_H -#define KONACLASSIC_H + +#pragma once #include "quantum.h" // readability #define ___ KC_NO - #define LAYOUT_all( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - KA8, KA9, K40, K41, K42, K44, K46, K47, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, \ + k40, k41, k42, k43, k44, k46, k48, k49, k4B, k4C, k4D, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { KA8, KA9, K40, K41, K42, ___, K44, ___, K46, K47, ___, K49, K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, ___, k46, ___, k48, k49, ___, k4B, k4C, k4D, k4E, k4F } \ } #define LAYOUT_ansi( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - KA8, KA9, K40, K41, K42, K46, K49, K4A, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k48, k4B, k4C, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___ }, \ - { KA8, KA9, K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, ___, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, ___, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, ___ }, \ + { k40, k41, k42, k43, k44, ___, ___, ___, k48, ___, ___, k4B, k4C, ___, k4E, k4F } \ } #define LAYOUT_ansi_arrows( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - KA8, KA9, K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, \ + k40, k41, k42, k43, k44, k48, k4B, k4C, k4D, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { KA8, KA9, K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, ___, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, ___, ___, ___, k48, ___, ___, k4B, k4C, k4D, k4E, k4F } \ } #define LAYOUT_ansi_split( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - KA8, KA9, K40, K41, K42, K44, K46, K47, K49, K4A, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k46, k48, k49, k4B, k4C, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___ }, \ - { KA8, KA9, K40, K41, K42, ___, K44, ___, K46, K47, ___, K49, K4A, ___, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, ___, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, ___ }, \ + { k40, k41, k42, k43, k44, ___, k46, ___, k48, k49, ___, k4B, k4C, ___, k4E, k4F } \ } #define LAYOUT_ansi_split_arrows( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - KA8, KA9, K40, K41, K42, K44, K46, K47, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, \ + k40, k41, k42, k43, k44, k46, k48, k49, k4B, k4C, k4D, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { KA8, KA9, K40, K41, K42, ___, K44, ___, K46, K47, ___, K49, K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, ___, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, ___, k46, ___, k48, k49, ___, k4B, k4C, k4D, k4E, k4F } \ } #define LAYOUT_iso( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - KA8, KA9, K40, K41, K42, K46, K49, K4A, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k48, k4B, k4C, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___ }, \ - { KA8, KA9, K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, ___, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, ___ }, \ + { k40, k41, k42, k43, k44, ___, ___, ___, k48, ___, ___, k4B, k4C, ___, k4E, k4F } \ } #define LAYOUT_iso_arrows( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - KA8, KA9, K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, \ + k40, k41, k42, k43, k44, k48, k4B, k4C, k4D, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { KA8, KA9, K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, ___, ___, ___, k48, ___, ___, k4B, k4C, k4D, k4E, k4F } \ } #define LAYOUT_iso_split( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - KA8, KA9, K40, K41, K42, K44, K46, K47, K49, K4A, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k46, k48, k49, k4B, k4C, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___ }, \ - { KA8, KA9, K40, K41, K42, ___, K44, ___, K46, K47, ___, K49, K4A, ___, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, ___ }, \ + { k40, k41, k42, k43, k44, ___, k46, ___, k48, k49, ___, k4B, k4C, ___, k4E, k4F } \ } #define LAYOUT_iso_split_arrows( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - KA8, KA9, K40, K41, K42, K44, K46, K47, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, \ + k40, k41, k42, k43, k44, k46, k48, k49, k4B, k4C, k4D, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { KA8, KA9, K40, K41, K42, ___, K44, ___, K46, K47, ___, K49, K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, ___, k46, ___, k48, k49, ___, k4B, k4C, k4D, k4E, k4F } \ } - -#endif diff --git a/keyboards/ktec/ergodone/config.h b/keyboards/ktec/ergodone/config.h index 39e0ae8c75..db626ab808 100644 --- a/keyboards/ktec/ergodone/config.h +++ b/keyboards/ktec/ergodone/config.h @@ -1,5 +1,4 @@ -#ifndef ERGODOX_ERGODONE_CONFIG_H -#define ERGODOX_ERGODONE_CONFIG_H +#pragma once #include "config_common.h" @@ -77,5 +76,3 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION //#define DEBUG_MATRIX_SCAN_RATE - -#endif diff --git a/keyboards/ktec/ergodone/ergodone.h b/keyboards/ktec/ergodone/ergodone.h index 89edb8a0b5..77e4968543 100644 --- a/keyboards/ktec/ergodone/ergodone.h +++ b/keyboards/ktec/ergodone/ergodone.h @@ -1,5 +1,4 @@ -#ifndef ERGODOX_ERGODONE_H -#define ERGODOX_ERGODONE_H +#pragma once #include "quantum.h" #include <stdint.h> @@ -64,116 +63,94 @@ inline void ergodox_right_led_3_set(uint8_t n) {} inline void ergodox_right_led_set(uint8_t l, uint8_t n) {} inline void ergodox_led_all_set(uint8_t n) {} -/* - * LEFT HAND: LINES 76-83 - * RIGHT HAND: LINES 85-92 - */ -#define LAYOUT_ergodox( \ - \ - k00,k01,k02,k03,k04,k05,k06, \ - k10,k11,k12,k13,k14,k15,k16, \ - k20,k21,k22,k23,k24,k25, \ - k30,k31,k32,k33,k34,k35,k36, \ - k40,k41,k42,k43,k44, \ - k55,k56, \ - k54, \ - k53,k52,k51, \ - \ - k07,k08,k09,k0A,k0B,k0C,k0D, \ - k17,k18,k19,k1A,k1B,k1C,k1D, \ - k28,k29,k2A,k2B,k2C,k2D, \ - k37,k38,k39,k3A,k3B,k3C,k3D, \ - k49,k4A,k4B,k4C,k4D, \ - k57,k58, \ - k59, \ - k5C,k5B,k5A ) \ - \ - /* matrix positions */ \ - { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ - { k20, k21, k22, k23, k24, k25, KC_NO, KC_NO, k28, k29, k2A, k2B, k2C, k2D }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ - { k40, k41, k42, k43, k44, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4A, k4B, k4C, k4D }, \ - { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, KC_NO } \ - } +#define XXX KC_NO -/* - * LEFT HAND: LINES 110-117 - * RIGHT HAND: LINES 119-126 - */ -#define LAYOUT_ergodox_80( \ - \ - k00,k01,k02,k03,k04,k05,k06, \ - k10,k11,k12,k13,k14,k15,k16, \ - k20,k21,k22,k23,k24,k25, \ - k30,k31,k32,k33,k34,k35,k36, \ - k40,k41,k42,k43,k44, \ - k55,k56, \ - k45,k46,k54, \ - k53,k52,k51, \ - \ - k07,k08,k09,k0A,k0B,k0C,k0D, \ - k17,k18,k19,k1A,k1B,k1C,k1D, \ - k28,k29,k2A,k2B,k2C,k2D, \ - k37,k38,k39,k3A,k3B,k3C,k3D, \ - k49,k4A,k4B,k4C,k4D, \ - k57,k58, \ - k59,k47,k48, \ - k5C,k5B,k5A ) \ - \ - /* matrix positions */ \ - { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ - { k20, k21, k22, k23, k24, k25, KC_NO, KC_NO, k28, k29, k2A, k2B, k2C, k2D }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ - { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D }, \ - { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, KC_NO } \ - } +#define LAYOUT_ergodox( \ + k00, k01, k02, k03, k04, k05, k06, \ + k10, k11, k12, k13, k14, k15, k16, \ + k20, k21, k22, k23, k24, k25, \ + k30, k31, k32, k33, k34, k35, k36, \ + k40, k41, k42, k43, k44, \ + k55, k56, \ + k54, \ + k53, k52, k51, \ +\ + k07, k08, k09, k0A, k0B, k0C, k0D, \ + k17, k18, k19, k1A, k1B, k1C, k1D, \ + k28, k29, k2A, k2B, k2C, k2D, \ + k37, k38, k39, k3A, k3B, k3C, k3D, \ + k49, k4A, k4B, k4C, k4D, \ + k57, k58, \ + k59, \ + k5C, k5B, k5A \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, XXX, XXX, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, k43, k44, XXX, XXX, XXX, XXX, k49, k4A, k4B, k4C, k4D }, \ + { XXX, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, XXX } \ +} -/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ -#define LAYOUT_ergodox_pretty( \ - \ - 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, 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, R42,R43,R44,R45,R46, \ - L55,L56, R50,R51, \ - L54, R52, \ - L53,L52,L51, R55,R54,R53 ) \ - \ - /* matrix positions */ \ - { \ - { 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,KC_NO, KC_NO,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,KC_NO,KC_NO, KC_NO,KC_NO,R42,R43,R44,R45,R46 }, \ - { KC_NO,L51,L52,L53,L54,L55,L56, R50,R51,R52,R53,R54,R55,KC_NO } \ +#define LAYOUT_ergodox_80( \ + k00, k01, k02, k03, k04, k05, k06, \ + k10, k11, k12, k13, k14, k15, k16, \ + k20, k21, k22, k23, k24, k25, \ + k30, k31, k32, k33, k34, k35, k36, \ + k40, k41, k42, k43, k44, \ + k55, k56, \ + k45, k46, k54, \ + k53, k52, k51, \ +\ + k07, k08, k09, k0A, k0B, k0C, k0D, \ + k17, k18, k19, k1A, k1B, k1C, k1D, \ + k28, k29, k2A, k2B, k2C, k2D, \ + k37, k38, k39, k3A, k3B, k3C, k3D, \ + k49, k4A, k4B, k4C, k4D, \ + k57, k58, \ + k59, k47, k48, \ + k5C, k5B, k5A \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, XXX, XXX, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D }, \ + { XXX, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, XXX } \ } -/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ -#define LAYOUT_ergodox_pretty_80( \ - \ - 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, 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, R42,R43,R44,R45,R46, \ - L55,L56, R50,R51, \ - L45,L46,L54, R52,R40,R41, \ - L53,L52,L51, R55,R54,R53 ) \ - \ - /* matrix positions */ \ - { \ - { 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,KC_NO, KC_NO,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 }, \ - { KC_NO,L51,L52,L53,L54,L55,L56, R50,R51,R52,R53,R54,R55,KC_NO } \ - } +#define LAYOUT_ergodox_pretty( \ + 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, 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, R42, R43, R44, R45, R46, \ + L55, L56, R50, R51, \ + L54, R52, \ + L53, L52, L51, R55, R54, R53 \ +) { \ + { 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, XXX, XXX, 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, XXX, XXX, XXX, XXX, R42, R43, R44, R45, R46 }, \ + { XXX, L51, L52, L53, L54, L55, L56, R50, R51, R52, R53, R54, R55, XXX } \ +} -#endif +#define LAYOUT_ergodox_pretty_80( \ + 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, 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, R42, R43, R44, R45, R46, \ + L55, L56, R50, R51, \ + L45, L46, L54, R52, R40, R41, \ + L53, L52, L51, R55, R54, R53 \ +) { \ + { 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, XXX, XXX, 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 }, \ + { XXX, L51, L52, L53, L54, L55, L56, R50, R51, R52, R53, R54, R55, XXX } \ +} diff --git a/keyboards/ktec/ergodone/expander.h b/keyboards/ktec/ergodone/expander.h index 8676fed693..071570c408 100644 --- a/keyboards/ktec/ergodone/expander.h +++ b/keyboards/ktec/ergodone/expander.h @@ -1,5 +1,4 @@ -#ifndef EXPANDER_H -#define EXPANDER_H +#pragma once #include <stdint.h> #include "matrix.h" @@ -44,5 +43,3 @@ uint8_t expander_get_col(uint8_t col); matrix_row_t expander_read_row(void); void expander_unselect_rows(void); void expander_select_row(uint8_t row); - -#endif diff --git a/keyboards/laptreus/laptreus.h b/keyboards/laptreus/laptreus.h index f367c13dc3..2e7932e494 100644 --- a/keyboards/laptreus/laptreus.h +++ b/keyboards/laptreus/laptreus.h @@ -1,26 +1,19 @@ -#ifndef LAPTREUS_H -#define LAPTREUS_H +#pragma once #include "quantum.h" #include "outputselect.h" -/* -// This a shortcut to help you visually see your layout. -// The first section contains all of the arguments -// The second converts the arguments into a two-dimensional array -*/ +#define XXX KC_NO + #define LAYOUT( \ - A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, \ - B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, \ - C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, \ - D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12 \ -) \ -{ \ - {A2, A3, A4, A5, A6, A7, A8, A9, A10, A11}, \ - {B2, B3, B4, B5, B6, B7, B8, B9, B10, B11}, \ - {C2, C3, C4, C5, C6, C7, C8, C9, C10, C11}, \ - {D2, D3, D4, D5, D6, D7, D8, D9, D10, D11}, \ - {A1, B1, C1, D1, KC_NO, KC_NO, D12, C12, B12, A12} \ + k40, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k49, \ + k41, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k48, \ + k42, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k47, \ + k43, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k46 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 }, \ + { k40, k41, k42, k43, XXX, XXX, k46, k47, k48, k49 } \ } - -#endif diff --git a/keyboards/laptreus/rules.mk b/keyboards/laptreus/rules.mk index 5fb166761f..b48040df35 100644 --- a/keyboards/laptreus/rules.mk +++ b/keyboards/laptreus/rules.mk @@ -23,5 +23,5 @@ KEY_LOCK_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 -BLUETOOTH_ENABLE = no # Legacy bluetooth support -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/latin17rgb/config.h b/keyboards/latin17rgb/config.h index 6a7ea8e781..1f52f9a651 100644 --- a/keyboards/latin17rgb/config.h +++ b/keyboards/latin17rgb/config.h @@ -49,10 +49,8 @@ #define DEBOUNCE 3 /* disable these deprecated features by default */ -//#ifndef LINK_TIME_OPTIMIZATION_ENABLE -//# define NO_ACTION_MACRO -//# define NO_ACTION_FUNCTION -//#endif +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects diff --git a/keyboards/latin47ble/rules.mk b/keyboards/latin47ble/rules.mk index 5a3f1069a3..61d3be26e6 100644 --- a/keyboards/latin47ble/rules.mk +++ b/keyboards/latin47ble/rules.mk @@ -21,8 +21,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 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 -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE LAYOUTS = planck_mit diff --git a/keyboards/latin60rgb/config.h b/keyboards/latin60rgb/config.h index 97b4812910..5a4b639ab2 100644 --- a/keyboards/latin60rgb/config.h +++ b/keyboards/latin60rgb/config.h @@ -72,8 +72,6 @@ # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 60 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 60 #endif diff --git a/keyboards/latin64ble/rules.mk b/keyboards/latin64ble/rules.mk index b4d726a60d..ba3f750117 100644 --- a/keyboards/latin64ble/rules.mk +++ b/keyboards/latin64ble/rules.mk @@ -21,6 +21,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 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 -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/latin6rgb/config.h b/keyboards/latin6rgb/config.h index 174c23c30c..b356ded816 100644 --- a/keyboards/latin6rgb/config.h +++ b/keyboards/latin6rgb/config.h @@ -50,10 +50,8 @@ #define DEBOUNCE 3 /* disable these deprecated features by default */ -//#ifndef LINK_TIME_OPTIMIZATION_ENABLE -//# define NO_ACTION_MACRO -//# define NO_ACTION_FUNCTION -//#endif +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects @@ -84,14 +82,9 @@ // 0b1110101 AD <-> SCL // 0b1110110 AD <-> SDA #define DRIVER_ADDR_1 0b1110100 -//#define DRIVER_ADDR_2 0b1110110 #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 6 -//#define DRIVER_1_LED_TOTAL 25 -//#define DRIVER_2_LED_TOTAL 24 -//#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 6 #endif //#define RGB_DI_PIN B7 //#ifdef RGB_DI_PIN diff --git a/keyboards/latinpad/keymaps/default/keymap.c b/keyboards/latinpad/keymaps/default/keymap.c index eebbd62655..b6606e6be7 100644 --- a/keyboards/latinpad/keymaps/default/keymap.c +++ b/keyboards/latinpad/keymaps/default/keymap.c @@ -49,7 +49,10 @@ static void render_logo(void) { } #ifdef OLED_ENABLE -void oled_task_user(void) { render_logo(); } +bool oled_task_user(void) { + render_logo(); + return false; +} #endif bool encoder_update_user(uint8_t index, bool clockwise) { diff --git a/keyboards/latinpad/keymaps/via/keymap.c b/keyboards/latinpad/keymaps/via/keymap.c index 04d9ad905f..12d7e910e6 100644 --- a/keyboards/latinpad/keymaps/via/keymap.c +++ b/keyboards/latinpad/keymaps/via/keymap.c @@ -47,7 +47,10 @@ static void render_logo(void) { } #ifdef OLED_ENABLE -void oled_task_user(void) { render_logo(); } +bool oled_task_user(void) { + render_logo(); + return false; +} #endif bool encoder_update_user(uint8_t index, bool clockwise) { diff --git a/keyboards/latinpadble/keymaps/default/keymap.c b/keyboards/latinpadble/keymaps/default/keymap.c index ad6f7f31d4..3fed6c0cb4 100644 --- a/keyboards/latinpadble/keymaps/default/keymap.c +++ b/keyboards/latinpadble/keymaps/default/keymap.c @@ -35,7 +35,10 @@ static void render_logo(void) { } #ifdef OLED_ENABLE -void oled_task_user(void) { render_logo(); } +bool oled_task_user(void) { + render_logo(); + return false; +} #endif bool encoder_update_user(uint8_t index, bool clockwise) { diff --git a/keyboards/latinpadble/keymaps/via/keymap.c b/keyboards/latinpadble/keymaps/via/keymap.c index cfcea7388b..2c4cc5f409 100644 --- a/keyboards/latinpadble/keymaps/via/keymap.c +++ b/keyboards/latinpadble/keymaps/via/keymap.c @@ -64,7 +64,10 @@ static void render_logo(void) { } #ifdef OLED_ENABLE -void oled_task_user(void) { render_logo(); } +bool oled_task_user(void) { + render_logo(); + return false; +} #endif bool encoder_update_user(uint8_t index, bool clockwise) { diff --git a/keyboards/latinpadble/rules.mk b/keyboards/latinpadble/rules.mk index b36d9a88cb..eca33fc0a0 100644 --- a/keyboards/latinpadble/rules.mk +++ b/keyboards/latinpadble/rules.mk @@ -21,10 +21,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 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 -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE OLED_ENABLE = yes OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes diff --git a/keyboards/launchpad/config.h b/keyboards/launchpad/config.h index e9a13a3bdf..327d67016b 100644 --- a/keyboards/launchpad/config.h +++ b/keyboards/launchpad/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -65,5 +64,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifdef SUBPROJECT_rev1 #include "rev1/config.h" #endif - -#endif diff --git a/keyboards/launchpad/launchpad.h b/keyboards/launchpad/launchpad.h index 85432de0ad..59cf64afec 100644 --- a/keyboards/launchpad/launchpad.h +++ b/keyboards/launchpad/launchpad.h @@ -1,11 +1,7 @@ -#ifndef LAUNCHPAD_H -#define LAUNCHPAD_H +#pragma once -#ifdef KEYBOARD_launchpad_rev1 - #include "rev1.h" +#if defined(KEYBOARD_launchpad_rev1) +# include "rev1.h" #endif #include "quantum.h" - - -#endif diff --git a/keyboards/launchpad/rev1/rev1.h b/keyboards/launchpad/rev1/rev1.h index 6644db8300..2ea6e7e775 100644 --- a/keyboards/launchpad/rev1/rev1.h +++ b/keyboards/launchpad/rev1/rev1.h @@ -1,21 +1,17 @@ -#ifndef REV1_H -#define REV1_H +#pragma once #include "../launchpad.h" #include "quantum.h" #define LAYOUT( \ - K00, K01, \ - K10, K11, \ - K20, K21, \ - K30, K31 \ - ) \ - { \ - { K00, K01 }, \ - { K10, K11 }, \ - { K20, K21 }, \ - { K30, K31 } \ - } - -#endif + k00, k01, \ + k10, k11, \ + k20, k21, \ + k30, k31 \ +) { \ + { k00, k01 }, \ + { k10, k11 }, \ + { k20, k21 }, \ + { k30, k31 } \ +} diff --git a/keyboards/lazydesigners/the60/rev2/info.json b/keyboards/lazydesigners/the60/rev2/info.json index bba03844bc..05540cd308 100755 --- a/keyboards/lazydesigners/the60/rev2/info.json +++ b/keyboards/lazydesigners/the60/rev2/info.json @@ -261,7 +261,10 @@ {"label":"Shift", "x":13.25, "y":3, "w":1.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, - {"label":"Space","x":4, "y":4, "w":7}, + {"label":"Space","x":4, "y":4, "w":2}, + {"label":"Space","x":6, "y":4, "w":1.5}, + {"label":"Space","x":7.5, "y":4, "w":1.5}, + {"label":"Space","x":9, "y":4, "w":2}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5} ] @@ -326,7 +329,10 @@ {"label":"Shift", "x":13.25, "y":3, "w":1.75}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, - {"label":"Space","x":4, "y":4, "w":7}, + {"label":"Space","x":4, "y":4, "w":2}, + {"label":"Space","x":6, "y":4, "w":1.5}, + {"label":"Space","x":7.5, "y":4, "w":1.5}, + {"label":"Space","x":9, "y":4, "w":2}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4} ] diff --git a/keyboards/lck75/lck75.c b/keyboards/lck75/lck75.c index 52ccdcfd06..55650681ac 100644 --- a/keyboards/lck75/lck75.c +++ b/keyboards/lck75/lck75.c @@ -33,11 +33,14 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { #define ANIM_FRAME_DURATION 200 #define ANIM_SIZE 512 #ifdef OLED_ENABLE -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; } -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } static uint32_t anim_timer = 0; static uint32_t anim_sleep = 0; static uint8_t current_idle_frame = 0; @@ -140,6 +143,6 @@ static uint8_t current_tap_frame = 0; } } } - + return false; } #endif diff --git a/keyboards/le_chiffre/keymaps/default/keymap.c b/keyboards/le_chiffre/keymaps/default/keymap.c index 3de991b558..45fee56a95 100644 --- a/keyboards/le_chiffre/keymaps/default/keymap.c +++ b/keyboards/le_chiffre/keymaps/default/keymap.c @@ -185,13 +185,15 @@ void render_mod_status(uint8_t modifiers) { oled_write_ln_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI)); } -void oled_task_user(void) { +bool oled_task_user(void) { render_lechiffre_logo(); oled_set_cursor(0,3); render_layer_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) render_mod_status(get_mods()|get_oneshot_mods()); render_keylock_status(host_keyboard_led_state()); render_keylogger_status(); + + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/le_chiffre/keymaps/via/keymap.c b/keyboards/le_chiffre/keymaps/via/keymap.c index 59cf17009e..10a2fb0d4a 100644 --- a/keyboards/le_chiffre/keymaps/via/keymap.c +++ b/keyboards/le_chiffre/keymaps/via/keymap.c @@ -144,13 +144,14 @@ void render_mod_status(uint8_t modifiers) { oled_write_ln_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI)); } -void oled_task_user(void) { +bool oled_task_user(void) { render_lechiffre_logo(); oled_set_cursor(0,3); // render_layer_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) render_mod_status(get_mods()|get_oneshot_mods()); render_keylock_status(host_keyboard_led_state()); render_keylogger_status(); + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/lefty/config.h b/keyboards/lefty/config.h new file mode 100644 index 0000000000..85620ca15b --- /dev/null +++ b/keyboards/lefty/config.h @@ -0,0 +1,44 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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 0x5363 // Sc for Smollchungus +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER SmollChungus +#define PRODUCT Lefty + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 8 + +/* key matrix pins are in subfolders v1/v2 */ + +/* Diode direction */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/lefty/info.json b/keyboards/lefty/info.json new file mode 100644 index 0000000000..bd5d2f7c4e --- /dev/null +++ b/keyboards/lefty/info.json @@ -0,0 +1,43 @@ +{ + "keyboard_name": "lefty", + "url": "https://github.com/smollchungus", + "maintainer": "smollchungus", + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"F1", "x":0.5, "y":0}, + {"label":"Escape", "x":2, "y":0}, + {"label":"1", "x":3, "y":0}, + {"label":"2", "x":4, "y":0}, + {"label":"3", "x":5, "y":0}, + {"label":"4", "x":6, "y":0}, + {"label":"5", "x":7, "y":0}, + {"label":"6", "x":8, "y":0}, + {"label":"F2", "x":0.25, "y":1}, + {"label":"Tab", "x":1.75, "y":1, "w":1.5}, + {"label":"Q", "x":3.25, "y":1}, + {"label":"W", "x":4.25, "y":1}, + {"label":"E", "x":5.25, "y":1}, + {"label":"R", "x":6.25, "y":1}, + {"label":"T", "x":7.25, "y":1}, + {"label":"F3", "x":0, "y":2}, + {"label":"Caps Lock", "x":1.5, "y":2, "w":1.75}, + {"label":"A", "x":3.25, "y":2}, + {"label":"S", "x":4.25, "y":2}, + {"label":"D", "x":5.25, "y":2}, + {"label":"F", "x":6.25, "y":2}, + {"label":"G", "x":7.25, "y":2}, + {"label":"Shift", "x":1.25, "y":3, "w":2.25}, + {"label":"Z", "x":3.5, "y":3}, + {"label":"X", "x":4.5, "y":3}, + {"label":"C", "x":5.5, "y":3}, + {"label":"V", "x":6.5, "y":3}, + {"label":"B", "x":7.5, "y":3}, + {"label":"Control", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":4.5, "y":4, "w":1.25}, + {"label":"Layer2", "x":5.75, "y":4, "w":2}, + {"label":"Layer3", "x":7.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/lefty/keymaps/default/keymap.c b/keyboards/lefty/keymaps/default/keymap.c new file mode 100644 index 0000000000..ecedbac390 --- /dev/null +++ b/keyboards/lefty/keymaps/default/keymap.c @@ -0,0 +1,64 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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 layers { + _QWERTY, + _LOWER, + _RAISE, + _SPECIAL, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define SPECIAL MO(_SPECIAL) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_all( + KC_UP, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_DOWN, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_RGHT, LOWER, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_LCTL, KC_LALT, RAISE, SPECIAL +), + +[_LOWER] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ +), + +[_RAISE] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ +), + +[_SPECIAL] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ +) +}; diff --git a/keyboards/lefty/keymaps/via/keymap.c b/keyboards/lefty/keymaps/via/keymap.c new file mode 100644 index 0000000000..5acf16c044 --- /dev/null +++ b/keyboards/lefty/keymaps/via/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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 layers { + _QWERTY, + _LOWER, + _RAISE, + _SPECIAL, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define SPECIAL MO(_SPECIAL) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_all( + KC_UP, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_DOWN, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_RGHT, LOWER, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_LCTL, KC_LALT, RAISE, SPECIAL +), + +[_LOWER] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ +), + +[_RAISE] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ +), + +[_SPECIAL] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ +) +}; diff --git a/keyboards/lefty/keymaps/via/rules.mk b/keyboards/lefty/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/lefty/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/lefty/lefty.c b/keyboards/lefty/lefty.c new file mode 100644 index 0000000000..a3e5301ea1 --- /dev/null +++ b/keyboards/lefty/lefty.c @@ -0,0 +1,47 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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 "lefty.h" + +#ifdef OLED_ENABLE +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR("Default\n"), false); + break; + case 1: + oled_write_P(PSTR("LOWER\n"), false); + break; + case 2: + oled_write_P(PSTR("RAISE\n"), false); + break; + case 3: + oled_write_P(PSTR("SPECIAL\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + + return true; +} +#endif diff --git a/keyboards/lefty/lefty.h b/keyboards/lefty/lefty.h new file mode 100644 index 0000000000..2466552353 --- /dev/null +++ b/keyboards/lefty/lefty.h @@ -0,0 +1,37 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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" + +// keymap +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, \ + K10, K11, K12, K13, K14, K15, K16, \ + K20, K21, K22, K23, K24, K25, K26, \ + K31, K32, K33, K34, K35, K36, \ + K41, K43, K44, K46 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ + { KC_NO, K31, K32, K33, K34, K35, K36, KC_NO }, \ + { KC_NO, K41, KC_NO, K43, K44, KC_NO, K46, KC_NO } \ +} + +#define LAYOUT LAYOUT diff --git a/keyboards/lefty/readme.md b/keyboards/lefty/readme.md new file mode 100644 index 0000000000..f8cc2ec203 --- /dev/null +++ b/keyboards/lefty/readme.md @@ -0,0 +1,27 @@ +# lefty + +![lefty](https://i.imgur.com/nMmJCJMh.jpeg) + +Half an alice used as a macropad. + +* Keyboard Maintainer: [SmollChungus](https://github.com/smollchungus/) + +* Hardware Supported: Lefty PCB rev1 and rev2 + +Make example for this keyboard (after setting up your build environment): + + make lefty:default + +Flashing example for this keyboard: + + make lefty: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). + +# Bootloader +Enter the bootloader in 3 ways: + +Bootmagic reset: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +Physical reset button: Briefly press the button on the back of the PCB - some may have pads you must short instead +Keycode in layout: Press the key mapped to RESET if it is available diff --git a/keyboards/lefty/rev1/config.h b/keyboards/lefty/rev1/config.h new file mode 100644 index 0000000000..fa70eeb359 --- /dev/null +++ b/keyboards/lefty/rev1/config.h @@ -0,0 +1,22 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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 + +/* key matrix pins */ + +#define MATRIX_ROW_PINS { F0, F1, C7, D5, B7 } +#define MATRIX_COL_PINS { D4, B5, F5, F6, F7, B1, B3, F4 } diff --git a/keyboards/lefty/rev1/rev1.c b/keyboards/lefty/rev1/rev1.c new file mode 100644 index 0000000000..81734fd7fc --- /dev/null +++ b/keyboards/lefty/rev1/rev1.c @@ -0,0 +1,17 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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 "lefty.h" diff --git a/keyboards/mechlovin/adelais/standard_led/rev2/.noci b/keyboards/lefty/rev1/rules.mk index e69de29bb2..e69de29bb2 100644 --- a/keyboards/mechlovin/adelais/standard_led/rev2/.noci +++ b/keyboards/lefty/rev1/rules.mk diff --git a/keyboards/lefty/rev2/config.h b/keyboards/lefty/rev2/config.h new file mode 100644 index 0000000000..8289418728 --- /dev/null +++ b/keyboards/lefty/rev2/config.h @@ -0,0 +1,21 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B2, B6, D7, E6, B4 } +#define MATRIX_COL_PINS { D4, B5, F5, F6, F7, B1, B3, F4 } diff --git a/keyboards/lefty/rev2/rev2.c b/keyboards/lefty/rev2/rev2.c new file mode 100644 index 0000000000..81734fd7fc --- /dev/null +++ b/keyboards/lefty/rev2/rev2.c @@ -0,0 +1,17 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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 "lefty.h" diff --git a/keyboards/lefty/rev2/rules.mk b/keyboards/lefty/rev2/rules.mk new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/lefty/rev2/rules.mk diff --git a/keyboards/lefty/rules.mk b/keyboards/lefty/rules.mk new file mode 100644 index 0000000000..119ec3128a --- /dev/null +++ b/keyboards/lefty/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +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 +# 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 = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes + +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 + +DEFAULT_FOLDER = lefty/rev2 diff --git a/keyboards/lfkeyboards/issi.h b/keyboards/lfkeyboards/issi.h index 51777f6ee3..74379ddbc8 100644 --- a/keyboards/lfkeyboards/issi.h +++ b/keyboards/lfkeyboards/issi.h @@ -1,6 +1,6 @@ +#pragma once + #ifdef ISSI_ENABLE -#ifndef ISSI_H -#define ISSI_H typedef struct ISSIDeviceStruct{ uint8_t fn_dirty; // function registers need to be resent @@ -37,4 +37,3 @@ void activateLED(uint8_t matrix, uint8_t cx, uint8_t cy, uint8_t pwm); void update_issi(uint8_t device_addr, uint8_t blocking); #endif -#endif
\ No newline at end of file diff --git a/keyboards/lfkeyboards/lfk65_hs/config.h b/keyboards/lfkeyboards/lfk65_hs/config.h index adedaa3427..0adc0b3f56 100644 --- a/keyboards/lfkeyboards/lfk65_hs/config.h +++ b/keyboards/lfkeyboards/lfk65_hs/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -83,5 +82,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h b/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h index 3256451658..6ba3a63e88 100644 --- a/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h +++ b/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h @@ -1,5 +1,4 @@ -#ifndef LFK65_HS_H -#define LFK65_HS_H +#pragma once #include "quantum.h" #include "matrix.h" @@ -13,58 +12,56 @@ void reset_keyboard_kb(void); /* All Keymap - contains every possible switch * ,-------------------------------------------------------------------------------. -* | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1D | 1E | 1F | 1G | +* | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 0A | 0B | 0C | 0D | 0E | 0F | * |-------------------------------------------------------------------------------| -* | 21 | 22 |23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | 2C | 2D | 2F | 2G | +* | 10 | 11 |12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1E | 1F | * |-------------------------------------------------------------------------------| -* | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 3A | 3B | 3C | 3F | 3G | +* | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | 2C | 2E | 2F | * |-------------------------------------------------------------------------------| -* | 41 | 42 | 43 | 45 | 46 | 47 | 48 | 49 | 4A | 4B | 4C | 4D | 4F | 4G | +* | 30 |31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 3A | 3B | 3C | 3E | 3F | * |-------------------------------------------------------------------------------| -* | 51 | 52 | 53 | 57 | 5A | 5B | 5C | 5D | 5E | 3E | 4E | +* | 40 | 41 | 42 | 46 | 4A | 4B | 4C | 4D | 2D | 3D | * `-------------------------------------------------------------------------------' */ // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array #define LAYOUT_all( \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, k3G, \ - k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \ - k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, k3F, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D, k2D, k3D \ ) { \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G }, \ - { k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \ - { k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, ___, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4A, k4B, k4C, k4D, ___, ___ } \ } /* ANSI Keymap * ,-------------------------------------------------------------------------------. -* | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1D | 1E | 1G | +* | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 0A | 0B | 0C | 0E | 0F | * |-------------------------------------------------------------------------------| -* | 21 | 22 |23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | 2C | 2D | 2F | 2G | +* | 10 | 11 |12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1E | 1F | * |-------------------------------------------------------------------------------| -* | 31 | 32 |33 | 34 | 35 | 36 | 37 | 38 | 39 | 3A | 3B | 3C | 3F | 3G | +* | 20 | 21 |22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | 2E | 2F | * |-------------------------------------------------------------------------------| -* | 41 | 42 |43 | 45 | 46 | 47 | 48 | 49 | 4A | 4B | 4C | 4D | 4F | 4G | +* | 30 | 32 |33 | 34 | 35 | 36 | 37 | 38 | 39 | 3A | 3B | 3C | 3E | 3F | * |-------------------------------------------------------------------------------| -* | 51 | 52 | 53 | 57 | 5A | 5B | 5C | 5D | 5E | 3E | 4E | +* | 40 | 41 | 42 | 46 | 4A | 4B | 4C | 4D | 2D | 3D | * `-------------------------------------------------------------------------------' */ #define LAYOUT_ansi( \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, k1G, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3F, k3G, \ - k41, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \ - k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2E, k2F, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, k3F, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D, k2D, k3D \ ) { \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F, k1G }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G }, \ - { k41, ___, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \ - { k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, ___, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, ___, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, k2D, k2E, k2F }, \ + { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4A, k4B, k4C, k4D, ___, ___ } \ } - -#endif //LFK65_HS_H diff --git a/keyboards/lfkeyboards/lfk78/post_rules.mk b/keyboards/lfkeyboards/lfk78/post_rules.mk new file mode 100644 index 0000000000..03f975b9df --- /dev/null +++ b/keyboards/lfkeyboards/lfk78/post_rules.mk @@ -0,0 +1,14 @@ +# Extra source files for IS3731 lighting +SRC += TWIlib.c issi.c lighting.c + +ifeq ($(strip $(ISSI_ENABLE)), yes) + TMK_COMMON_DEFS += -DISSI_ENABLE +endif + +ifeq ($(strip $(WATCHDOG_ENABLE)), yes) + TMK_COMMON_DEFS += -DWATCHDOG_ENABLE +endif + +ifeq ($(strip $(CAPSLOCK_LED)), yes) + TMK_COMMON_DEFS += -DCAPSLOCK_LED +endif diff --git a/keyboards/lfkeyboards/lfk78/rules.mk b/keyboards/lfkeyboards/lfk78/rules.mk index 7919543734..9422978d11 100644 --- a/keyboards/lfkeyboards/lfk78/rules.mk +++ b/keyboards/lfkeyboards/lfk78/rules.mk @@ -21,19 +21,4 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install thi WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms CAPSLOCK_LED = no # Toggle back light LED of Caps Lock -# Extra source files for IS3731 lighting -SRC = TWIlib.c issi.c lighting.c - -ifeq ($(strip $(ISSI_ENABLE)), yes) - TMK_COMMON_DEFS += -DISSI_ENABLE -endif - -ifeq ($(strip $(WATCHDOG_ENABLE)), yes) - TMK_COMMON_DEFS += -DWATCHDOG_ENABLE -endif - -ifeq ($(strip $(CAPSLOCK_LED)), yes) - TMK_COMMON_DEFS += -DCAPSLOCK_LED -endif - DEFAULT_FOLDER = lfkeyboards/lfk78/revj diff --git a/keyboards/lfkeyboards/lfk87/config.h b/keyboards/lfkeyboards/lfk87/config.h index d5b17005e5..387c58851c 100644 --- a/keyboards/lfkeyboards/lfk87/config.h +++ b/keyboards/lfkeyboards/lfk87/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -114,5 +113,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/lfkeyboards/lfk87/lfk87.h b/keyboards/lfkeyboards/lfk87/lfk87.h index 5c1fba6bab..1b1368659b 100644 --- a/keyboards/lfkeyboards/lfk87/lfk87.h +++ b/keyboards/lfkeyboards/lfk87/lfk87.h @@ -1,5 +1,4 @@ -#ifndef LFK87_H -#define LFK87_H +#pragma once #include "quantum.h" #include "matrix.h" @@ -44,85 +43,75 @@ void click(uint16_t freq, uint16_t duration); #define ___ KC_NO #ifdef LFK_TKL_REV_A - #ifndef LAYOUT_tkl_ansi - #define LAYOUT_tkl_ansi( \ - k11, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2h, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g, k3h, \ - k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, \ - k51, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5d, k5g, \ - k61, k62, k63, k67, k6b, k6c, k6d, k6e, k6f, k6g, k6h \ - ) \ - { \ - { k11, ___, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2h }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g, k3h }, \ - { k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, ___, ___, ___, ___ }, \ - { k51, ___, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5d, ___, ___, k5g, ___ }, \ - { k61, k62, k63, ___, ___, ___, k67, ___, ___, ___, k6b, k6c, k6d, k6e, k6f, k6g, k6h }, \ - } - +# ifndef LAYOUT_tkl_ansi +# define LAYOUT_tkl_ansi( \ + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4F, \ + k50, k51, k52, k56, k5A, k5B, k5C, k5D, k5E, k5F, k5G \ +) { \ + { k00, ___, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, ___, ___, ___ }, \ + { k40, ___, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, ___, ___, k4F, ___ }, \ + { k50, k51, k52, ___, ___, ___, k56, ___, ___, ___, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \ +} #endif // !LAYOUT_tkl_ansi - #ifndef LAYOUT_tkl_iso - #define LAYOUT_tkl_iso( \ - k11, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2h, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3f, k3g, k3h, \ - k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k3e, \ - k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5d, k5g, \ - k61, k62, k63, k67, k6b, k6c, k6d, k6e, k6f, k6g, k6h \ - ) \ - { \ - { k11, ___, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2h }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g, k3h }, \ - { k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, ___, ___, ___, ___ }, \ - { k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5d, ___, ___, k5g, ___ }, \ - { k61, k62, k63, ___, ___, ___, k67, ___, ___, ___, k6b, k6c, k6d, k6e, k6f, k6g, k6h }, \ - } - - #endif // !LAYOUT_tkl_iso +# ifndef LAYOUT_tkl_iso +# define LAYOUT_tkl_iso( \ + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k2D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4F, \ + k50, k51, k52, k56, k5A, k5B, k5C, k5D, k5E, k5F, k5G \ +) { \ + { k00, ___, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, ___, ___, ___ }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, ___, ___, k4F, ___ }, \ + { k50, k51, k52, ___, ___, ___, k56, ___, ___, ___, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \ +} +# endif // !LAYOUT_tkl_iso #else // RevC+ keymaps - #ifndef LAYOUT_tkl_ansi - #define LAYOUT_tkl_ansi( \ - k71, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, k1f, k1g, \ - k72, k73, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k2f, k2g, \ - k74, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g, \ - k61, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, \ - k62, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5f, \ - k63, k64, k65, k67, k6a, k6b, k6c, k6d, k6e, k6f, k6g \ - ) \ - { \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, ___, k1e, k1f, k1g }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, ___, k2e, k2f, k2g }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g }, \ - { k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, ___, ___, ___, ___ }, \ - { ___, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, ___, ___, k5f, ___ }, \ - { k61, k62, k63, k64, k65, ___, k67, ___, ___, k6a, k6b, k6c, k6d, k6e, k6f, k6g }, \ - { k71, k72, k73, k74, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ - } - - #endif // !LAYOUT_tkl_ansi - #ifndef LAYOUT_tkl_iso - #define LAYOUT_tkl_iso( \ - k71, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, k1f, k1g, \ - k72, k73, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k2f, k2g, \ - k74, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, k3g, \ - k61, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k3d, \ - k62, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5f, \ - k63, k64, k65, k67, k6a, k6b, k6c, k6d, k6e, k6f, k6g \ - ) \ - { \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, ___, k1e, k1f, k1g }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, ___, k2e, k2f, k2g }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g }, \ - { k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, ___, ___, ___, ___ }, \ - { k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, ___, ___, k5f, ___ }, \ - { k61, k62, k63, k64, k65, ___, k67, ___, ___, k6a, k6b, k6c, k6d, k6e, k6f, k6g }, \ - { k71, k72, k73, k74, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ - } - - #endif // !LAYOUT_tkl_iso +# ifndef LAYOUT_tkl_ansi +# define LAYOUT_tkl_ansi( \ + k60, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0D, k0E, k0F, \ + k61, k62, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1D, k1E, k1F, \ + k63, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ + k50, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, \ + k51, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4E, \ + k52, k53, k54, k56, k59, k5A, k5B, k5C, k5D, k5E, k5F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, ___, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, ___, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, ___, ___, ___, ___ }, \ + { ___, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, ___, ___, k4E, ___ }, \ + { k50, k51, k52, k53, k54, ___, k56, ___, ___, k59, k5A, k5B, k5C, k5D, k5E, k5F }, \ + { k60, k61, k62, k63, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ } \ +} +# endif // !LAYOUT_tkl_ansi +# ifndef LAYOUT_tkl_iso +# define LAYOUT_tkl_iso( \ + k60, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0D, k0E, k0F, \ + k61, k62, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1D, k1E, k1F, \ + k63, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, k2F, \ + k50, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k2C, \ + k51, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4E, \ + k52, k53, k54, k56, k59, k5A, k5B, k5C, k5D, k5E, k5F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, ___, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, ___, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, ___, ___, ___, ___ }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, ___, ___, k4E, ___ }, \ + { k50, k51, k52, k53, k54, ___, k56, ___, ___, k59, k5A, k5B, k5C, k5D, k5E, k5F }, \ + { k60, k61, k62, k63, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ } \ +} +# endif // !LAYOUT_tkl_iso #endif //Rev - -#endif //LFK87_H diff --git a/keyboards/lfkeyboards/lfk87/post_rules.mk b/keyboards/lfkeyboards/lfk87/post_rules.mk new file mode 100644 index 0000000000..563462dd99 --- /dev/null +++ b/keyboards/lfkeyboards/lfk87/post_rules.mk @@ -0,0 +1,13 @@ +ifeq ($(LFK_REV), A) + MCU = at90usb1286 +else + MCU = at90usb646 +endif + +ifeq ($(strip $(ISSI_ENABLE)), yes) + OPT_DEFS += -DISSI_ENABLE +endif + +ifeq ($(strip $(WATCHDOG_ENABLE)), yes) + OPT_DEFS += -DWATCHDOG_ENABLE +endif diff --git a/keyboards/lfkeyboards/lfk87/rules.mk b/keyboards/lfkeyboards/lfk87/rules.mk index afe1aef59d..1289cf133d 100644 --- a/keyboards/lfkeyboards/lfk87/rules.mk +++ b/keyboards/lfkeyboards/lfk87/rules.mk @@ -6,11 +6,6 @@ # LFK_REV = C -ifeq ($(LFK_REV), A) - MCU = at90usb1286 -else - MCU = at90usb646 -endif BOOTLOADER = atmel-dfu OPT_DEFS += -DLFK_TKL_REV_$(LFK_REV) @@ -39,13 +34,3 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms - - - -ifeq ($(strip $(ISSI_ENABLE)), yes) - OPT_DEFS += -DISSI_ENABLE -endif - -ifeq ($(strip $(WATCHDOG_ENABLE)), yes) - OPT_DEFS += -DWATCHDOG_ENABLE -endif diff --git a/keyboards/lfkeyboards/lfkpad/post_rules.mk b/keyboards/lfkeyboards/lfkpad/post_rules.mk new file mode 100644 index 0000000000..ad997587b2 --- /dev/null +++ b/keyboards/lfkeyboards/lfkpad/post_rules.mk @@ -0,0 +1,7 @@ +ifeq ($(strip $(ISSI_ENABLE)), yes) + TMK_COMMON_DEFS += -DISSI_ENABLE +endif + +ifeq ($(strip $(WATCHDOG_ENABLE)), yes) + TMK_COMMON_DEFS += -DWATCHDOG_ENABLE +endif diff --git a/keyboards/lfkeyboards/lfkpad/rules.mk b/keyboards/lfkeyboards/lfkpad/rules.mk index 3499ebb519..733c8b8606 100644 --- a/keyboards/lfkeyboards/lfkpad/rules.mk +++ b/keyboards/lfkeyboards/lfkpad/rules.mk @@ -26,12 +26,4 @@ WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan() isn't run every SRC = TWIlib.c issi.c lighting.c -ifeq ($(strip $(ISSI_ENABLE)), yes) - TMK_COMMON_DEFS += -DISSI_ENABLE -endif - -ifeq ($(strip $(WATCHDOG_ENABLE)), yes) - TMK_COMMON_DEFS += -DWATCHDOG_ENABLE -endif - LAYOUTS = numpad_6x4 diff --git a/keyboards/lfkeyboards/lighting.h b/keyboards/lfkeyboards/lighting.h index 69e63268dd..cb07755c53 100644 --- a/keyboards/lfkeyboards/lighting.h +++ b/keyboards/lfkeyboards/lighting.h @@ -1,6 +1,4 @@ -#ifndef LIGHTING_H -#define LIGHTING_H - +#pragma once // rgb_sequence[RGBLED_NUM] // @@ -49,5 +47,3 @@ void set_backlight(uint8_t level); void set_underglow(uint8_t red, uint8_t green, uint8_t blue); void set_rgb(uint8_t rgb_led, uint8_t red, uint8_t green, uint8_t blue); void set_backlight_by_keymap(uint8_t col, uint8_t row); - -#endif
\ No newline at end of file diff --git a/keyboards/lfkeyboards/mini1800/config.h b/keyboards/lfkeyboards/mini1800/config.h index 598f08a6f1..1504a95cb4 100644 --- a/keyboards/lfkeyboards/mini1800/config.h +++ b/keyboards/lfkeyboards/mini1800/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -101,5 +100,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/lfkeyboards/mini1800/mini1800.h b/keyboards/lfkeyboards/mini1800/mini1800.h index c007d7f76a..3e460c8a11 100644 --- a/keyboards/lfkeyboards/mini1800/mini1800.h +++ b/keyboards/lfkeyboards/mini1800/mini1800.h @@ -1,5 +1,4 @@ -#ifndef LFK87_H -#define LFK87_H +#pragma once #include "quantum.h" #include "matrix.h" @@ -43,33 +42,18 @@ void click(uint16_t freq, uint16_t duration); #define ___ KC_NO - // a = 10 - // b = 11 - // c = 12 - // d = 13 - // e = 14 - // f = 15 - // g = 16 - // h = 17 - // i = 18 - // j = 19 - #ifndef LAYOUT - #define LAYOUT( \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1f, k1g, k1h, k1i, k1j,\ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2g, k2h, k2i, k2j,\ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k2f, k3g, k3h, k3i, k3j,\ - k41, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4f, k4g, k4h, k4i, k4j,\ - k51, k52, k53, k56, k5b, k5c, k5d, k5f, k5g, k5h, k5i, k5j \ - ) \ - { \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, ___, k1f, k1g, k1h, k1i, k1j }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2h, k2i, k2j }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, ___, ___, ___, k3g, k3h, k3i, k3j }, \ - { k41, ___, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, ___, k4f, k4g, k4h, k4i, k4j }, \ - { k51, k52, k53, ___, ___, k56, ___, ___, ___, ___, k5b, k5c, k5d, ___, k5f, k5g, k5h, k5i, k5j }, \ - } - +# define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0F, k0G, k0H, k0I, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, k1G, k1H, k1I, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1E, k2F, k2G, k2H, k2I, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, k3F, k3G, k3H, k3I, \ + k40, k41, k42, k45, k4A, k4B, k4C, k4E, k4F, k4G, k4H, k4I \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, ___, k0E, k0F, k0G, k0H, k0I }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, ___, ___, k2F, k2G, k2H, k2I }, \ + { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G, k3H, k3I }, \ + { k40, k41, k42, ___, ___, k45, ___, ___, ___, ___, k4A, k4B, k4C, ___, k4E, k4F, k4G, k4H, k4I } \ +} #endif // !LAYOUT #endif - -#endif //LFK87_H diff --git a/keyboards/lfkeyboards/mini1800/post_rules.mk b/keyboards/lfkeyboards/mini1800/post_rules.mk new file mode 100644 index 0000000000..f04e10e4a3 --- /dev/null +++ b/keyboards/lfkeyboards/mini1800/post_rules.mk @@ -0,0 +1,9 @@ +ifeq ($(LFK_REV), A) + MCU = at90usb1286 +else + MCU = at90usb646 +endif + +ifeq ($(strip $(ISSI_ENABLE)), yes) + # TMK_COMMON_DEFS += -DISSI_ENABLE +endif diff --git a/keyboards/lfkeyboards/mini1800/rules.mk b/keyboards/lfkeyboards/mini1800/rules.mk index a9c29c4b91..c9a9b01054 100644 --- a/keyboards/lfkeyboards/mini1800/rules.mk +++ b/keyboards/lfkeyboards/mini1800/rules.mk @@ -7,21 +7,12 @@ # Set to A or C LFK_REV = C -ifeq ($(LFK_REV), A) - MCU = at90usb1286 -else - MCU = at90usb646 -endif BOOTLOADER = atmel-dfu OPT_DEFS += -DLFK_TKL_REV_$(LFK_REV) # Extra source files for IS3731 lighting SRC = TWIlib.c issi.c lighting.c -ifeq ($(strip $(ISSI_ENABLE)), yes) - # TMK_COMMON_DEFS += -DISSI_ENABLE -endif - # Build Options # change yes to no to disable # diff --git a/keyboards/lily58/keymaps/barabas/keymap.c b/keyboards/lily58/keymaps/barabas/keymap.c index 00d6045d49..64ef3cfffc 100644 --- a/keyboards/lily58/keymaps/barabas/keymap.c +++ b/keyboards/lily58/keymaps/barabas/keymap.c @@ -171,7 +171,7 @@ void write_layer_state(void) { oled_advance_page(true); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { write_layer_state(); oled_write_ln(read_keylog(), false); @@ -179,6 +179,7 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/lily58/keymaps/chuan/keymap.c b/keyboards/lily58/keymaps/chuan/keymap.c index 29e5aae19f..1e0923a3c5 100644 --- a/keyboards/lily58/keymaps/chuan/keymap.c +++ b/keyboards/lily58/keymaps/chuan/keymap.c @@ -152,7 +152,7 @@ const char *read_timelog(void); char encoder_debug[24]; -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status snprintf(encoder_debug, sizeof(encoder_debug), "%i %i", counter, lastIndex ); if (is_keyboard_master()) { @@ -168,6 +168,7 @@ void oled_task_user(void) { oled_write(read_logo(), false); // oled_write_ln(encoder_debug, false); } + return false; } #endif //OLED_ENABLE diff --git a/keyboards/lily58/keymaps/cykedev/keymap.c b/keyboards/lily58/keymaps/cykedev/keymap.c index 460afb2297..75cdc04feb 100644 --- a/keyboards/lily58/keymaps/cykedev/keymap.c +++ b/keyboards/lily58/keymaps/cykedev/keymap.c @@ -114,8 +114,8 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { const char *read_logo(void); -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_ln(read_logo(), false); + return false; } #endif // OLED_ENABLE - diff --git a/keyboards/lily58/keymaps/datadavd/keymap.c b/keyboards/lily58/keymaps/datadavd/keymap.c index 15bcce10b8..0485cd19ad 100644 --- a/keyboards/lily58/keymaps/datadavd/keymap.c +++ b/keyboards/lily58/keymaps/datadavd/keymap.c @@ -219,12 +219,13 @@ static void render_lfc_logo(void) { oled_write_raw_P(my_lfc_logo, sizeof(my_lfc_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_logo(); } else { render_lfc_logo(); } + return false; } #endif // OLED_ENABLE @@ -263,4 +264,3 @@ const char *read_layer_state(void) { return layer_state_str; } - diff --git a/keyboards/lily58/keymaps/default/keymap.c b/keyboards/lily58/keymaps/default/keymap.c index 1b5b7c862e..5010c66978 100644 --- a/keyboards/lily58/keymaps/default/keymap.c +++ b/keyboards/lily58/keymaps/default/keymap.c @@ -122,7 +122,7 @@ const char *read_keylogs(void); // void set_timelog(void); // const char *read_timelog(void); -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here oled_write_ln(read_layer_state(), false); @@ -134,6 +134,7 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/lily58/keymaps/domnantas/keymap.c b/keyboards/lily58/keymaps/domnantas/keymap.c index f1b2b2dcda..ef2a89c470 100644 --- a/keyboards/lily58/keymaps/domnantas/keymap.c +++ b/keyboards/lily58/keymaps/domnantas/keymap.c @@ -1,18 +1,18 @@ /* Copyright 2020 Domantas Petrauskas - * - * 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/>. + */ #include QMK_KEYBOARD_H #include <stdio.h> @@ -275,10 +275,11 @@ static void render_status(void) { oled_write_ln_P(PSTR("caps"), led_state.caps_lock); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_left()) { render_status(); } else { render_bongo_cat(); } + return false; } diff --git a/keyboards/lily58/keymaps/drasbeck/keymap.c b/keyboards/lily58/keymaps/drasbeck/keymap.c index 6e22f04313..56bed4d7ab 100644 --- a/keyboards/lily58/keymaps/drasbeck/keymap.c +++ b/keyboards/lily58/keymaps/drasbeck/keymap.c @@ -92,7 +92,7 @@ void set_keylog(uint16_t keycode, keyrecord_t *record); // void set_timelog(void); // const char *read_timelog(void); -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here oled_write_ln(read_layer_state(), false); @@ -104,6 +104,7 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/lily58/keymaps/lily58l/keymap.c b/keyboards/lily58/keymaps/lily58l/keymap.c index 3db5f4ac64..10794b8695 100644 --- a/keyboards/lily58/keymaps/lily58l/keymap.c +++ b/keyboards/lily58/keymaps/lily58l/keymap.c @@ -271,13 +271,14 @@ void render_status_main(void) { render_keylogger_status(); } -void oled_task_user(void) { +bool oled_task_user(void) { update_log(); if (is_keyboard_master()) { render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_lily58_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/lily58/keymaps/mikefightsbears/keymap.c b/keyboards/lily58/keymaps/mikefightsbears/keymap.c index 303e7b7d5b..2b9855f190 100644 --- a/keyboards/lily58/keymaps/mikefightsbears/keymap.c +++ b/keyboards/lily58/keymaps/mikefightsbears/keymap.c @@ -156,7 +156,7 @@ const char *read_keylogs(void); // void set_timelog(void); // const char *read_timelog(void); -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here oled_write_ln(read_layer_state(), false); @@ -168,6 +168,7 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif // OLED_ENABLE @@ -211,4 +212,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - diff --git a/keyboards/lily58/keymaps/muuko/keymap.c b/keyboards/lily58/keymaps/muuko/keymap.c index 7ec273743c..c984202b9e 100644 --- a/keyboards/lily58/keymaps/muuko/keymap.c +++ b/keyboards/lily58/keymaps/muuko/keymap.c @@ -174,11 +174,12 @@ static void render_anim(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_anim(); } + return false; } #endif diff --git a/keyboards/lily58/keymaps/narze/keymap.c b/keyboards/lily58/keymaps/narze/keymap.c index dfb51ae509..7438e72751 100644 --- a/keyboards/lily58/keymaps/narze/keymap.c +++ b/keyboards/lily58/keymaps/narze/keymap.c @@ -299,7 +299,7 @@ const char *read_timelog(void); char encoder_debug[24]; -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here @@ -313,6 +313,7 @@ void oled_task_user(void) { oled_write(read_logo(), false); // oled_write_ln(encoder_debug, false); } + return false; } #endif //OLED_ENABLE diff --git a/keyboards/lily58/keymaps/via/keymap.c b/keyboards/lily58/keymaps/via/keymap.c index 5cc5dc1e5a..4cae267338 100644 --- a/keyboards/lily58/keymaps/via/keymap.c +++ b/keyboards/lily58/keymaps/via/keymap.c @@ -186,7 +186,7 @@ const char *read_keylogs(void) { } //new -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -214,6 +214,7 @@ void oled_task_user(void) { } else { render_logo(); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/lily58/keymaps/yshrsmz/keymap.c b/keyboards/lily58/keymaps/yshrsmz/keymap.c index da840e5854..6b31663239 100644 --- a/keyboards/lily58/keymaps/yshrsmz/keymap.c +++ b/keyboards/lily58/keymaps/yshrsmz/keymap.c @@ -158,7 +158,7 @@ const char *read_keylogs(void); // void set_timelog(void); // const char *read_timelog(void); -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here oled_write_ln(read_layer_state(), false); @@ -170,6 +170,7 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/lily58/keymaps/yuchi/keymap.c b/keyboards/lily58/keymaps/yuchi/keymap.c index 02279bb8a0..2cab439c3b 100644 --- a/keyboards/lily58/keymaps/yuchi/keymap.c +++ b/keyboards/lily58/keymaps/yuchi/keymap.c @@ -140,7 +140,7 @@ const char *read_keylogs(void); // void set_timelog(void); // const char *read_timelog(void); -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here oled_write_ln(read_layer_state(), false); @@ -152,6 +152,7 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/lyra/lyra.c b/keyboards/lyra/lyra.c index 19f6e44642..f479cbfd7b 100644 --- a/keyboards/lyra/lyra.c +++ b/keyboards/lyra/lyra.c @@ -1,31 +1,34 @@ /* Copyright 2021 Domanic Calleja - * - * 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/>. + */ #include "lyra.h" #ifdef OLED_DRIVER_ENABLE // 'lyralogooled', 32x128px -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { if (is_keyboard_master()) { return OLED_ROTATION_270; } return rotation; } -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } if (is_keyboard_master()) { oled_write_P(PSTR(" "), false); # ifdef WPM_ENABLE @@ -50,40 +53,41 @@ __attribute__((weak)) void oled_task_user(void) { oled_write_P(PSTR("Dom C"), false); } else { static const char PROGMEM QMK_logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x78, 0x18, 0x0c, 0x04, 0x06, 0x02, - 0x02, 0x82, 0xc0, 0xf0, 0x38, 0x8c, 0xf2, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0xc0, 0x80, - 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, 0x80, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1f, 0x18, 0x30, 0x20, 0xa0, 0xe0, 0xf8, - 0x3e, 0x1f, 0x13, 0x0c, 0x06, 0xc3, 0xf0, 0x60, 0x00, 0x80, 0xf0, 0xe0, 0x00, 0x38, 0xfe, 0x67, - 0x7b, 0xa5, 0xf3, 0xf0, 0x70, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xe0, 0x70, 0x30, 0x20, 0x00, 0x00, - 0x00, 0x80, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0xdd, 0xdd, 0xdd, 0xe3, 0x7e, 0x3c, 0x3e, 0x61, 0xdf, - 0xde, 0xde, 0x01, 0xff, 0xfe, 0x00, 0x80, 0x80, 0x80, 0xff, 0xc0, 0xdf, 0xdf, 0xdf, 0xe0, 0xff, - 0x7f, 0x3c, 0x62, 0xdd, 0xdd, 0xdd, 0xe3, 0x7e, 0x3c, 0xfe, 0xc1, 0xfd, 0x7d, 0xc3, 0xfd, 0x7d, - 0xc3, 0xfe, 0xfc, 0x30, 0xea, 0xd5, 0xd5, 0xd5, 0xc3, 0xff, 0xfe, 0x7e, 0xc1, 0xfd, 0x7d, 0x7d, - 0xc3, 0xfe, 0xfc, 0x3f, 0xe1, 0xff, 0xff, 0x3c, 0x62, 0xdd, 0xdd, 0xdd, 0xf7, 0xe6, 0x00, 0x00, - 0x00, 0x78, 0xc4, 0xc2, 0x82, 0x82, 0x82, 0x82, 0xc2, 0xe4, 0x74, 0x7c, 0x3f, 0x1f, 0x31, 0x60, - 0xe0, 0xc0, 0x80, 0x9c, 0xbf, 0xe7, 0xf1, 0x78, 0x3e, 0x1f, 0x0b, 0x04, 0x02, 0x01, 0x00, 0x1c, - 0x3e, 0x2f, 0x13, 0x10, 0x0c, 0x1e, 0x3f, 0x2f, 0x13, 0x09, 0x1c, 0x3e, 0x2f, 0x10, 0x08, 0x06, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, - 0x06, 0x06, 0x07, 0x03, 0x7f, 0xc1, 0xbe, 0xbe, 0xbe, 0xa6, 0xe7, 0xc7, 0x60, 0xd4, 0xaa, 0xaa, - 0xaa, 0x86, 0xfe, 0xfc, 0x7f, 0xc0, 0xff, 0xff, 0x7f, 0xc0, 0xff, 0xff, 0xc4, 0xaa, 0xaa, 0xaa, - 0xa6, 0xfc, 0xf8, 0xff, 0x02, 0xff, 0xff, 0x60, 0xd4, 0xaa, 0xaa, 0xaa, 0x86, 0xfe, 0xfc, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x28, 0x24, - 0x32, 0x1b, 0x1f, 0x0f, 0x0f, 0x1f, 0x1f, 0x3c, 0x38, 0x38, 0x78, 0x70, 0x70, 0x70, 0x30, 0x38, - 0x1f, 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, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x07, 0x0d, 0x0e, 0x07, 0x03, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 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, 0x80, 0xe0, 0x78, 0x18, 0x0c, 0x04, 0x06, 0x02, + 0x02, 0x82, 0xc0, 0xf0, 0x38, 0x8c, 0xf2, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0xc0, 0x80, + 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, 0x80, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1f, 0x18, 0x30, 0x20, 0xa0, 0xe0, 0xf8, + 0x3e, 0x1f, 0x13, 0x0c, 0x06, 0xc3, 0xf0, 0x60, 0x00, 0x80, 0xf0, 0xe0, 0x00, 0x38, 0xfe, 0x67, + 0x7b, 0xa5, 0xf3, 0xf0, 0x70, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xe0, 0x70, 0x30, 0x20, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0xdd, 0xdd, 0xdd, 0xe3, 0x7e, 0x3c, 0x3e, 0x61, 0xdf, + 0xde, 0xde, 0x01, 0xff, 0xfe, 0x00, 0x80, 0x80, 0x80, 0xff, 0xc0, 0xdf, 0xdf, 0xdf, 0xe0, 0xff, + 0x7f, 0x3c, 0x62, 0xdd, 0xdd, 0xdd, 0xe3, 0x7e, 0x3c, 0xfe, 0xc1, 0xfd, 0x7d, 0xc3, 0xfd, 0x7d, + 0xc3, 0xfe, 0xfc, 0x30, 0xea, 0xd5, 0xd5, 0xd5, 0xc3, 0xff, 0xfe, 0x7e, 0xc1, 0xfd, 0x7d, 0x7d, + 0xc3, 0xfe, 0xfc, 0x3f, 0xe1, 0xff, 0xff, 0x3c, 0x62, 0xdd, 0xdd, 0xdd, 0xf7, 0xe6, 0x00, 0x00, + 0x00, 0x78, 0xc4, 0xc2, 0x82, 0x82, 0x82, 0x82, 0xc2, 0xe4, 0x74, 0x7c, 0x3f, 0x1f, 0x31, 0x60, + 0xe0, 0xc0, 0x80, 0x9c, 0xbf, 0xe7, 0xf1, 0x78, 0x3e, 0x1f, 0x0b, 0x04, 0x02, 0x01, 0x00, 0x1c, + 0x3e, 0x2f, 0x13, 0x10, 0x0c, 0x1e, 0x3f, 0x2f, 0x13, 0x09, 0x1c, 0x3e, 0x2f, 0x10, 0x08, 0x06, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, + 0x06, 0x06, 0x07, 0x03, 0x7f, 0xc1, 0xbe, 0xbe, 0xbe, 0xa6, 0xe7, 0xc7, 0x60, 0xd4, 0xaa, 0xaa, + 0xaa, 0x86, 0xfe, 0xfc, 0x7f, 0xc0, 0xff, 0xff, 0x7f, 0xc0, 0xff, 0xff, 0xc4, 0xaa, 0xaa, 0xaa, + 0xa6, 0xfc, 0xf8, 0xff, 0x02, 0xff, 0xff, 0x60, 0xd4, 0xaa, 0xaa, 0xaa, 0x86, 0xfe, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x28, 0x24, + 0x32, 0x1b, 0x1f, 0x0f, 0x0f, 0x1f, 0x1f, 0x3c, 0x38, 0x38, 0x78, 0x70, 0x70, 0x70, 0x30, 0x38, + 0x1f, 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, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x07, 0x0d, 0x0e, 0x07, 0x03, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; oled_write_raw_P(QMK_logo, sizeof(QMK_logo)); } + return false; } -#endif +#endif diff --git a/keyboards/manta60/post_rules.mk b/keyboards/manta60/post_rules.mk new file mode 100644 index 0000000000..e26b52df30 --- /dev/null +++ b/keyboards/manta60/post_rules.mk @@ -0,0 +1,3 @@ +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif diff --git a/keyboards/manta60/rules.mk b/keyboards/manta60/rules.mk index 1b715cd40f..f714527243 100644 --- a/keyboards/manta60/rules.mk +++ b/keyboards/manta60/rules.mk @@ -22,7 +22,3 @@ AUDIO_ENABLE = no # Audio output SPLIT_KEYBOARD = yes IOS_DEVICE_ENABLE = no # connect to IOS device (iPad, iPhone) - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif diff --git a/keyboards/marksard/rhymestone/keymaps/default/keymap.c b/keyboards/marksard/rhymestone/keymaps/default/keymap.c index f25955c917..0bc9819773 100644 --- a/keyboards/marksard/rhymestone/keymaps/default/keymap.c +++ b/keyboards/marksard/rhymestone/keymaps/default/keymap.c @@ -158,13 +158,14 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); } + return false; } #else diff --git a/keyboards/massdrop/alt/alt.h b/keyboards/massdrop/alt/alt.h index 0396095450..c3761bee8b 100644 --- a/keyboards/massdrop/alt/alt.h +++ b/keyboards/massdrop/alt/alt.h @@ -7,7 +7,7 @@ #include "i2c_master.h" #include "md_rgb_matrix.h" //For led keycodes #include "usb/udi_cdc.h" -#include "usb/usb2422.h" +#include "usb/usb_hub.h" #define LAYOUT_65_ansi_blocker( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, \ diff --git a/keyboards/massdrop/alt/config.h b/keyboards/massdrop/alt/config.h index d28094c492..1a0a7c9768 100644 --- a/keyboards/massdrop/alt/config.h +++ b/keyboards/massdrop/alt/config.h @@ -43,6 +43,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Temporary solution for matrix delay */ #define IGNORE_ATOMIC_BLOCK +/* Avoid out-of-bounds errors when SmartEEPROM is not enabled */ +#define EEPROM_SIZE 1024 + /* MCU Port name definitions */ #define PA 0 #define PB 1 @@ -50,22 +53,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* This Shift Register expands available hardware output lines to control additional peripherals */ /* It uses four lines from the MCU to provide 16 output lines */ /* Shift Register Clock configuration (MCU to ShiftRegister.RCLK) */ -#define SR_EXP_RCLK_PORT PB -#define SR_EXP_RCLK_PIN 14 +#define SR_EXP_RCLK_PIN B14 /* Shift Register Output Enable configuration (MCU to ShiftRegister.OE_N) */ -#define SR_EXP_OE_N_PORT PB -#define SR_EXP_OE_N_PIN 15 +#define SR_EXP_OE_PIN B15 /* SERCOM port to use for Shift Register SPI */ /* DATAOUT and SCLK must be configured to use hardware pins of this port */ -#define SR_EXP_SERCOM SERCOM2 +#define SPI_SERCOM SERCOM2 /* Shift Register SPI Data Out configuration (MCU.SERCOMx.PAD[0] to ShiftRegister.SER) */ -#define SR_EXP_DATAOUT_PORT PA -#define SR_EXP_DATAOUT_PIN 12 -#define SR_EXP_DATAOUT_MUX 2 +#define SPI_DATAOUT_PIN A12 +#define SPI_DATAOUT_MUX 2 /* Shift Register SPI Serial Clock configuration (MCU.SERCOMx.PAD[1] to ShiftRegister.SRCLK) */ -#define SR_EXP_SCLK_PORT PA -#define SR_EXP_SCLK_PIN 13 -#define SR_EXP_SCLK_MUX 2 +#define SPI_SCLK_PIN A13 +#define SPI_SCLK_MUX 2 /* Debug LED (Small LED Located near MCU) */ #define DEBUG_LED_ENABLE 1 @@ -94,6 +93,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DEBUG_BOOT_TRACING_PORT PB #define DEBUG_BOOT_TRACING_PIN 23 +/* USB2422 config */ +#define USB2422_ADDRESS 0x58 +#define USB2422_VENDOR_ID 0x04D8 +#define USB2422_PRODUCT_ID 0xEEC5 +#define USB2422_DEVICE_VER 0x0101 +#define USB2422_MANUFACTURER "Massdrop Inc." +#define USB2422_PRODUCT "Massdrop Hub" +#define USB2422_ACTIVE_PIN A18 + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/massdrop/alt/config_led.h b/keyboards/massdrop/alt/config_led.h index 82117b3327..b600dd23b9 100644 --- a/keyboards/massdrop/alt/config_led.h +++ b/keyboards/massdrop/alt/config_led.h @@ -58,7 +58,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //swr: Matrix wiring SW Red row (1-12) //swg: Matrix wiring SW Green row (1-12) //swb: Matrix wiring SW Blue row (1-12) -//scan: Associated key scancode if any +//scan: Associated key matrix scancode (set 255 if none or 254 for LED to turn off in alternating mode) //Note: Origin 0,0 may be located anywhere as the software will do the final layout #define ISSI3733_LED_MAP { \ { .id = 1, .x = 0, .y = 0, .adr = { .drv = 2, .cs = 2, .swr = 2, .swg = 1, .swb = 3 }, .scan = 0 }, \ @@ -129,46 +129,45 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { .id = 66, .x = 10.5, .y = -3, .adr = { .drv = 1, .cs = 12, .swr = 8, .swg = 7, .swb = 9 }, .scan = 73 }, \ { .id = 67, .x = 11.25, .y = -3, .adr = { .drv = 1, .cs = 12, .swr = 5, .swg = 4, .swb = 6 }, .scan = 74 }, \ { .id = 68, .x = -0.338, .y = -3.338, .adr = { .drv = 2, .cs = 11, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ - { .id = 69, .x = 0.39, .y = -3.443, .adr = { .drv = 2, .cs = 11, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ + { .id = 69, .x = 0.39, .y = -3.443, .adr = { .drv = 2, .cs = 11, .swr = 8, .swg = 7, .swb = 9 }, .scan = 254 }, \ { .id = 70, .x = 1.263, .y = -3.443, .adr = { .drv = 2, .cs = 11, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ - { .id = 71, .x = 2.135, .y = -3.443, .adr = { .drv = 2, .cs = 11, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 71, .x = 2.135, .y = -3.443, .adr = { .drv = 2, .cs = 11, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 72, .x = 3.008, .y = -3.443, .adr = { .drv = 2, .cs = 12, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 73, .x = 3.88, .y = -3.443, .adr = { .drv = 2, .cs = 12, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 73, .x = 3.88, .y = -3.443, .adr = { .drv = 2, .cs = 12, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ { .id = 74, .x = 4.753, .y = -3.443, .adr = { .drv = 2, .cs = 13, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ - { .id = 75, .x = 5.625, .y = -3.443, .adr = { .drv = 2, .cs = 13, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ + { .id = 75, .x = 5.625, .y = -3.443, .adr = { .drv = 2, .cs = 13, .swr = 8, .swg = 7, .swb = 9 }, .scan = 254 }, \ { .id = 76, .x = 6.497, .y = -3.443, .adr = { .drv = 1, .cs = 9, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ - { .id = 77, .x = 7.37, .y = -3.443, .adr = { .drv = 1, .cs = 9, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 77, .x = 7.37, .y = -3.443, .adr = { .drv = 1, .cs = 9, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ { .id = 78, .x = 8.242, .y = -3.443, .adr = { .drv = 1, .cs = 9, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 79, .x = 9.115, .y = -3.443, .adr = { .drv = 1, .cs = 13, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 79, .x = 9.115, .y = -3.443, .adr = { .drv = 1, .cs = 13, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 80, .x = 9.987, .y = -3.443, .adr = { .drv = 1, .cs = 13, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ - { .id = 81, .x = 10.86, .y = -3.443, .adr = { .drv = 1, .cs = 13, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 81, .x = 10.86, .y = -3.443, .adr = { .drv = 1, .cs = 13, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ { .id = 82, .x = 11.588, .y = -3.338, .adr = { .drv = 1, .cs = 13, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ - { .id = 83, .x = 11.693, .y = -2.623, .adr = { .drv = 1, .cs = 12, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ + { .id = 83, .x = 11.693, .y = -2.623, .adr = { .drv = 1, .cs = 12, .swr = 11, .swg = 10, .swb = 12 }, .scan = 254 }, \ { .id = 84, .x = 11.693, .y = -1.873, .adr = { .drv = 1, .cs = 8, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ { .id = 85, .x = 11.693, .y = -1.123, .adr = { .drv = 1, .cs = 8, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ - { .id = 86, .x = 11.693, .y = -0.373, .adr = { .drv = 1, .cs = 8, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 86, .x = 11.693, .y = -0.373, .adr = { .drv = 1, .cs = 8, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ { .id = 87, .x = 11.588, .y = 0.338, .adr = { .drv = 1, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ { .id = 88, .x = 9.908, .y = 0.443, .adr = { .drv = 1, .cs = 6, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 89, .x = 9.288, .y = 0.443, .adr = { .drv = 1, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 89, .x = 9.288, .y = 0.443, .adr = { .drv = 1, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 90, .x = 8.625, .y = 0.443, .adr = { .drv = 1, .cs = 4, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 91, .x = 7.875, .y = 0.443, .adr = { .drv = 1, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 91, .x = 7.875, .y = 0.443, .adr = { .drv = 1, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 92, .x = 7.125, .y = 0.443, .adr = { .drv = 1, .cs = 2, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 93, .x = 6.375, .y = 0.443, .adr = { .drv = 1, .cs = 1, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 93, .x = 6.375, .y = 0.443, .adr = { .drv = 1, .cs = 1, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 94, .x = 5.625, .y = 0.443, .adr = { .drv = 1, .cs = 14, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 95, .x = 4.875, .y = 0.443, .adr = { .drv = 2, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 95, .x = 4.875, .y = 0.443, .adr = { .drv = 2, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 96, .x = 4.125, .y = 0.443, .adr = { .drv = 2, .cs = 7, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 97, .x = 3.375, .y = 0.443, .adr = { .drv = 2, .cs = 6, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 97, .x = 3.375, .y = 0.443, .adr = { .drv = 2, .cs = 6, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 98, .x = 2.625, .y = 0.443, .adr = { .drv = 2, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 99, .x = 1.875, .y = 0.443, .adr = { .drv = 2, .cs = 4, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 99, .x = 1.875, .y = 0.443, .adr = { .drv = 2, .cs = 4, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 100, .x = 1.125, .y = 0.443, .adr = { .drv = 2, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ { .id = 101, .x = -0.338, .y = 0.338, .adr = { .drv = 2, .cs = 1, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 102, .x = -0.443, .y = -0.373, .adr = { .drv = 2, .cs = 1, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 102, .x = -0.443, .y = -0.373, .adr = { .drv = 2, .cs = 1, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ { .id = 103, .x = -0.443, .y = -1.123, .adr = { .drv = 2, .cs = 1, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ { .id = 104, .x = -0.443, .y = -1.873, .adr = { .drv = 2, .cs = 1, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ - { .id = 105, .x = -0.443, .y = -2.623, .adr = { .drv = 2, .cs = 10, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ + { .id = 105, .x = -0.443, .y = -2.623, .adr = { .drv = 2, .cs = 10, .swr = 11, .swg = 10, .swb = 12 }, .scan = 254 }, \ }; - #define USB_LED_INDICATOR_ENABLE //Comment out to disable indicator functionality #ifdef USB_LED_INDICATOR_ENABLE //Scan codes refer to actual key matrix codes, not KC_* (255 to disable) #define USB_LED_NUM_LOCK_SCANCODE 255 diff --git a/keyboards/massdrop/alt/keymaps/default_md/keymap.c b/keyboards/massdrop/alt/keymaps/default_md/keymap.c index 810585a3df..fa8b294cd1 100644 --- a/keyboards/massdrop/alt/keymaps/default_md/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default_md/keymap.c @@ -3,10 +3,15 @@ enum alt_keycodes { L_BRI = SAFE_RANGE, //LED Brightness Increase //Working L_BRD, //LED Brightness Decrease //Working + L_EDG_I, //LED Edge Brightness Increase + L_EDG_D, //LED Edge Brightness Decrease + L_EDG_M, //LED Edge lighting mode L_PTN, //LED Pattern Select Next //Working L_PTP, //LED Pattern Select Previous //Working L_PSI, //LED Pattern Speed Increase //Working L_PSD, //LED Pattern Speed Decrease //Working + L_RATIOD, + L_RATIOI, L_T_MD, //LED Toggle Mode //Working L_T_ONF, //LED Toggle On / Off //Broken L_ON, //LED On //Broken @@ -18,6 +23,7 @@ enum alt_keycodes { DBG_MTRX, //DEBUG Toggle Matrix Prints // DBG_KBD, //DEBUG Toggle Keyboard Prints // DBG_MOU, //DEBUG Toggle Mouse Prints // + DBG_FAC, //DEBUG Factory light testing (All on white) MD_BOOT //Restart into bootloader after hold timeout //Working }; @@ -31,10 +37,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [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_MUTE, \ - L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ - _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ - _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ + L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, L_EDG_D, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, L_T_MD, L_T_ONF, _______, L_EDG_M, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ + _______, _______, _______, DBG_FAC, _______, _______, KC_HOME, KC_PGDN, KC_END \ ), /* [X] = LAYOUT( @@ -53,6 +59,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; + static uint8_t scroll_effect = 0; + + switch (keycode) { + case L_BRI ... U_T_AGCR: + if (record->event.pressed) { + md_led_changed(); + } + break; + } switch (keycode) { case L_BRI: @@ -69,6 +84,38 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (led_animation_breathing) gcr_breathe = gcr_desired; } return false; + case L_EDG_M: + if (record->event.pressed) { + led_edge_mode++; + if (led_edge_mode > LED_EDGE_MODE_MAX) { + led_edge_mode = LED_EDGE_MODE_ALL; + } + } + return false; + case L_EDG_I: + if (record->event.pressed) { + led_edge_brightness += 0.1; + if (led_edge_brightness > 1) { led_edge_brightness = 1; } + } + return false; + case L_EDG_D: + if (record->event.pressed) { + led_edge_brightness -= 0.1; + if (led_edge_brightness < 0) { led_edge_brightness = 0; } + } + return false; + case L_RATIOI: + if (record->event.pressed) { + led_ratio_brightness += 0.2; + if (led_ratio_brightness > 2.0) { led_ratio_brightness = 2.0; } + } + return false; + case L_RATIOD: + if (record->event.pressed) { + led_ratio_brightness -= 0.2; + if (led_ratio_brightness < 0.0) { led_ratio_brightness = 0.0; } + } + return false; case L_PTN: if (record->event.pressed) { if (led_animation_id == led_setups_count - 1) led_animation_id = 0; @@ -128,7 +175,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case L_T_PTD: if (record->event.pressed) { - led_animation_direction = !led_animation_direction; + scroll_effect++; + if (scroll_effect == 1) { //Patterns with scroll move horizontal (Right to left) + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 0; + } else if (scroll_effect == 2) { //Patterns with scroll move vertical (Top to bottom) + led_animation_direction = 1; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 3) { //Patterns with scroll move vertical (Bottom to top) + led_animation_direction = 0; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 4) { //Patterns with scroll explode from center + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 1; + } else if (scroll_effect == 5) { //Patterns with scroll implode on center + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 1; + } else { //Patterns with scroll move horizontal (Left to right) + scroll_effect = 0; + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 0; + } } return false; case U_T_AGCR: @@ -136,6 +209,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); } return false; + case DBG_FAC: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + led_lighting_mode = LED_MODE_NORMAL; + led_edge_brightness = 1; + led_edge_mode = LED_EDGE_MODE_ALL; + led_animation_breathing = 0; + led_animation_id = 7; //led_programs.c led_setups leds_white index + gcr_desired = LED_GCR_MAX; + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; case DBG_TOG: if (record->event.pressed) { TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); diff --git a/keyboards/massdrop/alt/keymaps/mac_md/keymap.c b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c index b3626c1b61..bfcadf8900 100644 --- a/keyboards/massdrop/alt/keymaps/mac_md/keymap.c +++ b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c @@ -3,10 +3,15 @@ enum alt_keycodes { L_BRI = SAFE_RANGE, //LED Brightness Increase //Working L_BRD, //LED Brightness Decrease //Working + L_EDG_I, //LED Edge Brightness Increase + L_EDG_D, //LED Edge Brightness Decrease + L_EDG_M, //LED Edge lighting mode L_PTN, //LED Pattern Select Next //Working L_PTP, //LED Pattern Select Previous //Working L_PSI, //LED Pattern Speed Increase //Working L_PSD, //LED Pattern Speed Decrease //Working + L_RATIOD, + L_RATIOI, L_T_MD, //LED Toggle Mode //Working L_T_ONF, //LED Toggle On / Off //Broken L_ON, //LED On //Broken @@ -18,6 +23,7 @@ enum alt_keycodes { DBG_MTRX, //DEBUG Toggle Matrix Prints // DBG_KBD, //DEBUG Toggle Keyboard Prints // DBG_MOU, //DEBUG Toggle Mouse Prints // + DBG_FAC, //DEBUG Factory light testing (All on white) MD_BOOT //Restart into bootloader after hold timeout //Working }; @@ -31,10 +37,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [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_MUTE, \ - L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ - _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ - _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ + L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, L_EDG_D, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, L_T_MD, L_T_ONF, _______, L_EDG_M, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ + _______, _______, _______, DBG_FAC, _______, _______, KC_HOME, KC_PGDN, KC_END \ ), /* [X] = LAYOUT( @@ -53,6 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; + static uint8_t scroll_effect = 0; switch (keycode) { case L_BRI: @@ -69,6 +76,38 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (led_animation_breathing) gcr_breathe = gcr_desired; } return false; + case L_EDG_M: + if (record->event.pressed) { + led_edge_mode++; + if (led_edge_mode > LED_EDGE_MODE_MAX) { + led_edge_mode = LED_EDGE_MODE_ALL; + } + } + return false; + case L_EDG_I: + if (record->event.pressed) { + led_edge_brightness += 0.1; + if (led_edge_brightness > 1) { led_edge_brightness = 1; } + } + return false; + case L_EDG_D: + if (record->event.pressed) { + led_edge_brightness -= 0.1; + if (led_edge_brightness < 0) { led_edge_brightness = 0; } + } + return false; + case L_RATIOI: + if (record->event.pressed) { + led_ratio_brightness += 0.2; + if (led_ratio_brightness > 2.0) { led_ratio_brightness = 2.0; } + } + return false; + case L_RATIOD: + if (record->event.pressed) { + led_ratio_brightness -= 0.2; + if (led_ratio_brightness < 0.0) { led_ratio_brightness = 0.0; } + } + return false; case L_PTN: if (record->event.pressed) { if (led_animation_id == led_setups_count - 1) led_animation_id = 0; @@ -128,7 +167,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case L_T_PTD: if (record->event.pressed) { - led_animation_direction = !led_animation_direction; + scroll_effect++; + if (scroll_effect == 1) { //Patterns with scroll move horizontal (Right to left) + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 0; + } else if (scroll_effect == 2) { //Patterns with scroll move vertical (Top to bottom) + led_animation_direction = 1; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 3) { //Patterns with scroll move vertical (Bottom to top) + led_animation_direction = 0; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 4) { //Patterns with scroll explode from center + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 1; + } else if (scroll_effect == 5) { //Patterns with scroll implode on center + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 1; + } else { //Patterns with scroll move horizontal (Left to right) + scroll_effect = 0; + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 0; + } } return false; case U_T_AGCR: @@ -136,6 +201,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); } return false; + case DBG_FAC: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + led_lighting_mode = LED_MODE_NORMAL; + led_edge_brightness = 1; + led_edge_mode = LED_EDGE_MODE_ALL; + led_animation_breathing = 0; + led_animation_id = 7; //led_programs.c led_setups leds_white index + gcr_desired = LED_GCR_MAX; + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; case DBG_TOG: if (record->event.pressed) { TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); diff --git a/keyboards/massdrop/ctrl/config.h b/keyboards/massdrop/ctrl/config.h index 3dbd9b8877..b1df4452cc 100644 --- a/keyboards/massdrop/ctrl/config.h +++ b/keyboards/massdrop/ctrl/config.h @@ -42,6 +42,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Temporary solution for matrix delay */ #define IGNORE_ATOMIC_BLOCK +/* Avoid out-of-bounds errors when SmartEEPROM is not enabled */ +#define EEPROM_SIZE 1024 + /* MCU Port name definitions */ #define PA 0 #define PB 1 @@ -49,22 +52,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* This Shift Register expands available hardware output lines to control additional peripherals */ /* It uses four lines from the MCU to provide 16 output lines */ /* Shift Register Clock configuration (MCU to ShiftRegister.RCLK) */ -#define SR_EXP_RCLK_PORT PB -#define SR_EXP_RCLK_PIN 14 +#define SR_EXP_RCLK_PIN B14 /* Shift Register Output Enable configuration (MCU to ShiftRegister.OE_N) */ -#define SR_EXP_OE_N_PORT PB -#define SR_EXP_OE_N_PIN 15 +#define SR_EXP_OE_PIN B15 /* SERCOM port to use for Shift Register SPI */ /* DATAOUT and SCLK must be configured to use hardware pins of this port */ -#define SR_EXP_SERCOM SERCOM2 +#define SPI_SERCOM SERCOM2 /* Shift Register SPI Data Out configuration (MCU.SERCOMx.PAD[0] to ShiftRegister.SER) */ -#define SR_EXP_DATAOUT_PORT PA -#define SR_EXP_DATAOUT_PIN 12 -#define SR_EXP_DATAOUT_MUX 2 +#define SPI_DATAOUT_PIN A12 +#define SPI_DATAOUT_MUX 2 /* Shift Register SPI Serial Clock configuration (MCU.SERCOMx.PAD[1] to ShiftRegister.SRCLK) */ -#define SR_EXP_SCLK_PORT PA -#define SR_EXP_SCLK_PIN 13 -#define SR_EXP_SCLK_MUX 2 +#define SPI_SCLK_PIN A13 +#define SPI_SCLK_MUX 2 /* Debug LED (Small LED Located near MCU) */ #define DEBUG_LED_ENABLE 1 @@ -93,6 +92,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DEBUG_BOOT_TRACING_PORT PB #define DEBUG_BOOT_TRACING_PIN 23 +/* USB2422 config */ +#define USB2422_ADDRESS 0x58 +#define USB2422_VENDOR_ID 0x04D8 +#define USB2422_PRODUCT_ID 0xEEC5 +#define USB2422_DEVICE_VER 0x0101 +#define USB2422_MANUFACTURER "Massdrop Inc." +#define USB2422_PRODUCT "Massdrop Hub" +#define USB2422_ACTIVE_PIN A18 + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/massdrop/ctrl/config_led.h b/keyboards/massdrop/ctrl/config_led.h index 0c91a0c80b..de897ce1bd 100644 --- a/keyboards/massdrop/ctrl/config_led.h +++ b/keyboards/massdrop/ctrl/config_led.h @@ -58,7 +58,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //swr: Matrix wiring SW Red row (1-12) //swg: Matrix wiring SW Green row (1-12) //swb: Matrix wiring SW Blue row (1-12) -//scan: Associated key scancode if any +//scan: Associated key matrix scancode (set 255 if none or 254 for LED to turn off in alternating mode) //Note: Origin 0,0 may be located anywhere as the software will do the final layout #define ISSI3733_LED_MAP { \ { .id = 1, .x = 0, .y = 0, .adr = { .drv = 2, .cs = 2, .swr = 2, .swg = 1, .swb = 3 }, .scan = 0 }, \ @@ -149,37 +149,37 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { .id = 86, .x = 12.375, .y = -4.125, .adr = { .drv = 1, .cs = 12, .swr = 5, .swg = 4, .swb = 6 }, .scan = 85 }, \ { .id = 87, .x = 13.125, .y = -4.125, .adr = { .drv = 1, .cs = 11, .swr = 5, .swg = 4, .swb = 6 }, .scan = 86 }, \ { .id = 88, .x = 13.433, .y = -4.43, .adr = { .drv = 1, .cs = 11, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 89, .x = 12.285, .y = -4.535, .adr = { .drv = 1, .cs = 12, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 89, .x = 12.285, .y = -4.535, .adr = { .drv = 1, .cs = 12, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 90, .x = 11.14, .y = -4.535, .adr = { .drv = 1, .cs = 13, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 91, .x = 9.995, .y = -4.535, .adr = { .drv = 1, .cs = 14, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 91, .x = 9.995, .y = -4.535, .adr = { .drv = 1, .cs = 14, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 92, .x = 8.85, .y = -4.535, .adr = { .drv = 1, .cs = 15, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 93, .x = 7.705, .y = -4.535, .adr = { .drv = 1, .cs = 16, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 93, .x = 7.705, .y = -4.535, .adr = { .drv = 1, .cs = 16, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 94, .x = 6.56, .y = -4.535, .adr = { .drv = 2, .cs = 9, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 95, .x = 5.415, .y = -4.535, .adr = { .drv = 2, .cs = 10, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 95, .x = 5.415, .y = -4.535, .adr = { .drv = 2, .cs = 10, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 96, .x = 4.27, .y = -4.535, .adr = { .drv = 2, .cs = 11, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 97, .x = 3.125, .y = -4.535, .adr = { .drv = 2, .cs = 12, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 97, .x = 3.125, .y = -4.535, .adr = { .drv = 2, .cs = 12, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 98, .x = 1.98, .y = -4.535, .adr = { .drv = 2, .cs = 13, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 99, .x = 0.835, .y = -4.535, .adr = { .drv = 2, .cs = 14, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 99, .x = 0.835, .y = -4.535, .adr = { .drv = 2, .cs = 14, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 100, .x = -0.307, .y = -4.43, .adr = { .drv = 2, .cs = 15, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 101, .x = -0.41, .y = -3.245, .adr = { .drv = 2, .cs = 15, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ + { .id = 101, .x = -0.41, .y = -3.245, .adr = { .drv = 2, .cs = 15, .swr = 11, .swg = 10, .swb = 12 }, .scan = 254 }, \ { .id = 102, .x = -0.41, .y = -2.06, .adr = { .drv = 2, .cs = 15, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ - { .id = 103, .x = -0.41, .y = -0.875, .adr = { .drv = 2, .cs = 15, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ + { .id = 103, .x = -0.41, .y = -0.875, .adr = { .drv = 2, .cs = 15, .swr = 8, .swg = 7, .swb = 9 }, .scan = 254 }, \ { .id = 104, .x = -0.308, .y = 0.31, .adr = { .drv = 2, .cs = 1, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 105, .x = 0.835, .y = 0.415, .adr = { .drv = 2, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 105, .x = 0.835, .y = 0.415, .adr = { .drv = 2, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 106, .x = 1.98, .y = 0.415, .adr = { .drv = 2, .cs = 4, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 107, .x = 3.125, .y = 0.415, .adr = { .drv = 2, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 107, .x = 3.125, .y = 0.415, .adr = { .drv = 2, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 108, .x = 4.27, .y = 0.415, .adr = { .drv = 2, .cs = 7, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 109, .x = 5.415, .y = 0.415, .adr = { .drv = 2, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 109, .x = 5.415, .y = 0.415, .adr = { .drv = 2, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 110, .x = 6.56, .y = 0.415, .adr = { .drv = 1, .cs = 1, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 111, .x = 7.705, .y = 0.415, .adr = { .drv = 1, .cs = 2, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 111, .x = 7.705, .y = 0.415, .adr = { .drv = 1, .cs = 2, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 112, .x = 8.85, .y = 0.415, .adr = { .drv = 1, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 113, .x = 9.995, .y = 0.415, .adr = { .drv = 1, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 113, .x = 9.995, .y = 0.415, .adr = { .drv = 1, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 114, .x = 11.14, .y = 0.415, .adr = { .drv = 1, .cs = 6, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 115, .x = 12.285, .y = 0.415, .adr = { .drv = 1, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 115, .x = 12.285, .y = 0.415, .adr = { .drv = 1, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 116, .x = 13.432, .y = 0.31, .adr = { .drv = 1, .cs = 10, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 117, .x = 13.535, .y = -0.875, .adr = { .drv = 1, .cs = 10, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ + { .id = 117, .x = 13.535, .y = -0.875, .adr = { .drv = 1, .cs = 10, .swr = 8, .swg = 7, .swb = 9 }, .scan = 254 }, \ { .id = 118, .x = 13.535, .y = -2.06, .adr = { .drv = 1, .cs = 10, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ - { .id = 119, .x = 13.535, .y = -3.245, .adr = { .drv = 1, .cs = 10, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 119, .x = 13.535, .y = -3.245, .adr = { .drv = 1, .cs = 10, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ }; #define USB_LED_INDICATOR_ENABLE //Comment out to disable indicator functionality diff --git a/keyboards/massdrop/ctrl/ctrl.h b/keyboards/massdrop/ctrl/ctrl.h index 1650beb9a4..a3d66ba775 100644 --- a/keyboards/massdrop/ctrl/ctrl.h +++ b/keyboards/massdrop/ctrl/ctrl.h @@ -7,7 +7,7 @@ #include "i2c_master.h" #include "md_rgb_matrix.h" //For led keycodes #include "usb/udi_cdc.h" -#include "usb/usb2422.h" +#include "usb/usb_hub.h" #define LAYOUT( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, \ diff --git a/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c b/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c index 1083571ef9..db36131fca 100644 --- a/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c @@ -3,10 +3,15 @@ enum ctrl_keycodes { L_BRI = SAFE_RANGE, //LED Brightness Increase //Working L_BRD, //LED Brightness Decrease //Working + L_EDG_I, //LED Edge Brightness Increase + L_EDG_D, //LED Edge Brightness Decrease + L_EDG_M, //LED Edge lighting mode L_PTN, //LED Pattern Select Next //Working L_PTP, //LED Pattern Select Previous //Working L_PSI, //LED Pattern Speed Increase //Working L_PSD, //LED Pattern Speed Decrease //Working + L_RATIOD, + L_RATIOI, L_T_MD, //LED Toggle Mode //Working L_T_ONF, //LED Toggle On / Off //Broken L_ON, //LED On //Broken @@ -18,6 +23,7 @@ enum ctrl_keycodes { DBG_MTRX, //DEBUG Toggle Matrix Prints // DBG_KBD, //DEBUG Toggle Keyboard Prints // DBG_MOU, //DEBUG Toggle Mouse Prints // + DBG_FAC, //DEBUG Factory light testing (All on white) MD_BOOT //Restart into bootloader after hold timeout //Working }; @@ -33,10 +39,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ - L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, L_EDG_D, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, L_T_MD, L_T_ONF, _______, L_EDG_M, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, DBG_FAC, _______, _______, _______, _______, _______, _______, _______ \ ), /* [X] = LAYOUT( @@ -56,6 +62,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; + static uint8_t scroll_effect = 0; + + switch (keycode) { + case L_BRI ... U_T_AGCR: + if (record->event.pressed) { + md_led_changed(); + } + break; + } switch (keycode) { case L_BRI: @@ -72,6 +87,38 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (led_animation_breathing) gcr_breathe = gcr_desired; } return false; + case L_EDG_M: + if (record->event.pressed) { + led_edge_mode++; + if (led_edge_mode > LED_EDGE_MODE_MAX) { + led_edge_mode = LED_EDGE_MODE_ALL; + } + } + return false; + case L_EDG_I: + if (record->event.pressed) { + led_edge_brightness += 0.1; + if (led_edge_brightness > 1) { led_edge_brightness = 1; } + } + return false; + case L_EDG_D: + if (record->event.pressed) { + led_edge_brightness -= 0.1; + if (led_edge_brightness < 0) { led_edge_brightness = 0; } + } + return false; + case L_RATIOI: + if (record->event.pressed) { + led_ratio_brightness += 0.2; + if (led_ratio_brightness > 2.0) { led_ratio_brightness = 2.0; } + } + return false; + case L_RATIOD: + if (record->event.pressed) { + led_ratio_brightness -= 0.2; + if (led_ratio_brightness < 0.0) { led_ratio_brightness = 0.0; } + } + return false; case L_PTN: if (record->event.pressed) { if (led_animation_id == led_setups_count - 1) led_animation_id = 0; @@ -131,7 +178,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case L_T_PTD: if (record->event.pressed) { - led_animation_direction = !led_animation_direction; + scroll_effect++; + if (scroll_effect == 1) { //Patterns with scroll move horizontal (Right to left) + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 0; + } else if (scroll_effect == 2) { //Patterns with scroll move vertical (Top to bottom) + led_animation_direction = 1; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 3) { //Patterns with scroll move vertical (Bottom to top) + led_animation_direction = 0; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 4) { //Patterns with scroll explode from center + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 1; + } else if (scroll_effect == 5) { //Patterns with scroll implode on center + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 1; + } else { //Patterns with scroll move horizontal (Left to right) + scroll_effect = 0; + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 0; + } } return false; case U_T_AGCR: @@ -139,6 +212,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); } return false; + case DBG_FAC: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + led_lighting_mode = LED_MODE_NORMAL; + led_edge_brightness = 1; + led_edge_mode = LED_EDGE_MODE_ALL; + led_animation_breathing = 0; + led_animation_id = 7; //led_programs.c led_setups leds_white index + gcr_desired = LED_GCR_MAX; + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; case DBG_TOG: if (record->event.pressed) { TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); @@ -179,7 +264,7 @@ led_instruction_t led_instructions[] = { //Flags can be found in tmk_core/protocol/arm_atsam/md_rgb_matrix.h (prefixed with LED_FLAG_) //LED IDs can be found in config_led.h in the keyboard's directory //Examples are below - + //All LEDs use the user's selected pattern (this is the factory default) { .flags = LED_FLAG_USE_ROTATE_PATTERN }, @@ -188,7 +273,7 @@ led_instruction_t led_instructions[] = { //Specific LEDs use specified RGB values while all others are off // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFF, .id1 = 0x00FF, .id2 = 0x0000FF00, .id3 = 0xFF000000, .r = 75, .g = 150, .b = 225 }, - + //All LEDs use the user's selected pattern //On layer 1, all key LEDs (except the top row which keeps active pattern) are red while all edge LEDs are green //When layer 1 is active, key LEDs use red (id0 32 - 17: 1111 1111 1111 1111 0000 0000 0000 0000 = 0xFFFF0000) (except top row 16 - 1) diff --git a/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c b/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c index ba02d5e506..4a85b375b3 100644 --- a/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c @@ -3,10 +3,15 @@ enum ctrl_keycodes { L_BRI = SAFE_RANGE, //LED Brightness Increase //Working L_BRD, //LED Brightness Decrease //Working + L_EDG_I, //LED Edge Brightness Increase + L_EDG_D, //LED Edge Brightness Decrease + L_EDG_M, //LED Edge lighting mode L_PTN, //LED Pattern Select Next //Working L_PTP, //LED Pattern Select Previous //Working L_PSI, //LED Pattern Speed Increase //Working L_PSD, //LED Pattern Speed Decrease //Working + L_RATIOD, + L_RATIOI, L_T_MD, //LED Toggle Mode //Working L_T_ONF, //LED Toggle On / Off //Broken L_ON, //LED On //Broken @@ -18,6 +23,7 @@ enum ctrl_keycodes { DBG_MTRX, //DEBUG Toggle Matrix Prints // DBG_KBD, //DEBUG Toggle Keyboard Prints // DBG_MOU, //DEBUG Toggle Mouse Prints // + DBG_FAC, //DEBUG Factory light testing (All on white) MD_BOOT //Restart into bootloader after hold timeout //Working }; @@ -33,10 +39,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ - L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, L_EDG_D, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, L_T_MD, L_T_ONF, _______, L_EDG_M, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, DBG_FAC, _______, _______, _______, _______, _______, _______, _______ \ ), /* [X] = LAYOUT( @@ -64,6 +70,7 @@ void matrix_scan_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; + static uint8_t scroll_effect = 0; switch (keycode) { case L_BRI: @@ -80,6 +87,38 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (led_animation_breathing) gcr_breathe = gcr_desired; } return false; + case L_EDG_M: + if (record->event.pressed) { + led_edge_mode++; + if (led_edge_mode > LED_EDGE_MODE_MAX) { + led_edge_mode = LED_EDGE_MODE_ALL; + } + } + return false; + case L_EDG_I: + if (record->event.pressed) { + led_edge_brightness += 0.1; + if (led_edge_brightness > 1) { led_edge_brightness = 1; } + } + return false; + case L_EDG_D: + if (record->event.pressed) { + led_edge_brightness -= 0.1; + if (led_edge_brightness < 0) { led_edge_brightness = 0; } + } + return false; + case L_RATIOI: + if (record->event.pressed) { + led_ratio_brightness += 0.2; + if (led_ratio_brightness > 2.0) { led_ratio_brightness = 2.0; } + } + return false; + case L_RATIOD: + if (record->event.pressed) { + led_ratio_brightness -= 0.2; + if (led_ratio_brightness < 0.0) { led_ratio_brightness = 0.0; } + } + return false; case L_PTN: if (record->event.pressed) { if (led_animation_id == led_setups_count - 1) led_animation_id = 0; @@ -139,7 +178,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case L_T_PTD: if (record->event.pressed) { - led_animation_direction = !led_animation_direction; + scroll_effect++; + if (scroll_effect == 1) { //Patterns with scroll move horizontal (Right to left) + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 0; + } else if (scroll_effect == 2) { //Patterns with scroll move vertical (Top to bottom) + led_animation_direction = 1; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 3) { //Patterns with scroll move vertical (Bottom to top) + led_animation_direction = 0; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 4) { //Patterns with scroll explode from center + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 1; + } else if (scroll_effect == 5) { //Patterns with scroll implode on center + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 1; + } else { //Patterns with scroll move horizontal (Left to right) + scroll_effect = 0; + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 0; + } } return false; case U_T_AGCR: @@ -147,6 +212,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); } return false; + case DBG_FAC: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + led_lighting_mode = LED_MODE_NORMAL; + led_edge_brightness = 1; + led_edge_mode = LED_EDGE_MODE_ALL; + led_animation_breathing = 0; + led_animation_id = 7; //led_programs.c led_setups leds_white index + gcr_desired = LED_GCR_MAX; + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; case DBG_TOG: if (record->event.pressed) { TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); diff --git a/keyboards/matrix/m20add/config.h b/keyboards/matrix/m20add/config.h index 3df5d78d55..5d615dbad6 100644 --- a/keyboards/matrix/m20add/config.h +++ b/keyboards/matrix/m20add/config.h @@ -82,8 +82,8 @@ #define DEBOUNCE 5 // i2c setting -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_CLOCK_SPEED 400000 #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 diff --git a/keyboards/matrix/m20add/m20add.c b/keyboards/matrix/m20add/m20add.c index b38dad27cd..21f4f9b1ba 100644 --- a/keyboards/matrix/m20add/m20add.c +++ b/keyboards/matrix/m20add/m20add.c @@ -64,12 +64,12 @@ void i2c_init(void) } // Try releasing special pins for a short time - palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_INPUT); - palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT); + palSetLineMode(I2C1_SCL_PIN, PAL_MODE_INPUT); + palSetLineMode(I2C1_SDA_PIN, PAL_MODE_INPUT); chThdSleepMilliseconds(10); - palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); - palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); + palSetLineMode(I2C1_SCL_PIN, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); + palSetLineMode(I2C1_SDA_PIN, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); } #define REBOOT_MAGIC 0x41544B42 diff --git a/keyboards/matrix/noah/config.h b/keyboards/matrix/noah/config.h index f41cad94ce..e5fa4959c8 100644 --- a/keyboards/matrix/noah/config.h +++ b/keyboards/matrix/noah/config.h @@ -26,8 +26,8 @@ #define DEBOUNCE 5 // i2c setting -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_CLOCK_SPEED 400000 #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 #define PAL_MODE_STM32_ALTERNATE_OPENDRAIN (PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN) diff --git a/keyboards/mechllama/g35/keymaps/default/keymap.c b/keyboards/mechllama/g35/keymaps/default/keymap.c index 814f6fdcdf..f02cba0b5a 100644 --- a/keyboards/mechllama/g35/keymaps/default/keymap.c +++ b/keyboards/mechllama/g35/keymaps/default/keymap.c @@ -66,7 +66,8 @@ const char* get_layer_name(uint8_t layer) { } } -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_ln_P(get_layer_name(biton32(layer_state)), false); + return false; } #endif diff --git a/keyboards/mechlovin/adelais/adelais.h b/keyboards/mechlovin/adelais/adelais.h index a6bd2477a3..6c3980a090 100644 --- a/keyboards/mechlovin/adelais/adelais.h +++ b/keyboards/mechlovin/adelais/adelais.h @@ -18,58 +18,18 @@ #include "quantum.h" -#define LAYOUT_alice_split_bs( \ - K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ - K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ - K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ - K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ - K40, K42, K44, K46, K48, K4A, K4E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ -} - -#define LAYOUT_alice( \ - K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, \ - K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ - K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ - K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ - K40, K42, K44, K46, K48, K4A, K4E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ -} - -#define LAYOUT_alice_split_bs_full_rshift( \ - K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ - K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ - K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ - K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, \ - K40, K42, K44, K46, K48, K4A, K4E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ -} - -#define LAYOUT_alice_full_rshift( \ - K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, \ - K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ - K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ - K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, \ - K40, K42, K44, K46, K48, K4A, K4E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ -} +#ifdef KEYBOARD_mechlovin_adelais_rgb_led_rev1 + #include "rev1.h" +#elif KEYBOARD_mechlovin_adelais_rgb_led_rev2 + #include "rev2.h" +#elif KEYBOARD_mechlovin_adelais_rgb_led_rev3 + #include "rev3.h" +#elif KEYBOARD_mechlovin_adelais_standard_led_arm_rev2 + #include "rev2.h" +#elif KEYBOARD_mechlovin_adelais_standard_led_arm_rev3 + #include "rev3.h" +#elif KEYBOARD_mechlovin_adelais_standard_led_arm_rev4 + #include "rev4.h" +#elif KEYBOARD_mechlovin_adelais_standard_led_avr_rev1 + #include "rev1.h" +#endif diff --git a/keyboards/mechlovin/adelais/config.h b/keyboards/mechlovin/adelais/config.h index 3ec5c49132..035ffa8032 100644 --- a/keyboards/mechlovin/adelais/config.h +++ b/keyboards/mechlovin/adelais/config.h @@ -26,11 +26,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key matrix size */ #define MATRIX_ROWS 5 -#define MATRIX_COLS 15 - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - -#define LED_NUM_LOCK_PIN C15 -#define LED_CAPS_LOCK_PIN B2 -#define LED_SCROLL_LOCK_PIN B9 +#define MATRIX_COLS 15
\ No newline at end of file diff --git a/keyboards/mechlovin/adelais/rgb_led/config.h b/keyboards/mechlovin/adelais/rgb_led/config.h new file mode 100644 index 0000000000..2ec0afd47b --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/config.h @@ -0,0 +1,21 @@ +/* +Copyright 2020 Team Mechlovin' + +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 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechlovin/adelais/rgb_led/readme.md b/keyboards/mechlovin/adelais/rgb_led/readme.md deleted file mode 100644 index f58ca7aa29..0000000000 --- a/keyboards/mechlovin/adelais/rgb_led/readme.md +++ /dev/null @@ -1,16 +0,0 @@ -# Adelais En Ciel - -![adelais](https://i.imgur.com/6U1IfZe.png) - -Compatible with TGR Alice and all clone variants. -`rgb_led` (Adelais En Ciel) comes with per-key RGB LEDs pre-soldered, rev.2 and rev.3 support a rotary encoder. - -* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin) -* Hardware Supported: Adelais En Ciel -* Hardware Availability: [Mechlovin.studio](https://mechlovin.studio/collections/pcb/products/adelais-en-ciel-alice-compatible-rgb-pcb?variant=33937050828939) - -Make example for this keyboard (after setting up your build environment): - - make mechlovin/adelais/rgb_led: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/mechlovin/adelais/rgb_led/rev1/config.h b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h index d75cbd3f2a..97092e25e0 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h @@ -13,7 +13,12 @@ #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 // 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 + + +#define LED_NUM_LOCK_PIN C15 +#define LED_CAPS_LOCK_PIN B2 +#define LED_SCROLL_LOCK_PIN B9
\ No newline at end of file diff --git a/keyboards/mechlovin/adelais/rgb_led/rev1/rev1.h b/keyboards/mechlovin/adelais/rgb_led/rev1/rev1.h index 16cdf9ed85..45d48fac46 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev1/rev1.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev1/rev1.h @@ -17,3 +17,61 @@ #pragma once #include "quantum.h" + +#define LAYOUT_alice_split_bs( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice_split_bs_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_alice_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_all LAYOUT_alice_split_bs diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h index c830edce26..9c71c537b7 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h @@ -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 // 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 @@ -43,3 +43,8 @@ #define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 + + +#define LED_NUM_LOCK_PIN C15 +#define LED_CAPS_LOCK_PIN B2 +#define LED_SCROLL_LOCK_PIN B9
\ No newline at end of file diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.h b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.h index 16cdf9ed85..45d48fac46 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.h @@ -17,3 +17,61 @@ #pragma once #include "quantum.h" + +#define LAYOUT_alice_split_bs( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice_split_bs_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_alice_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_all LAYOUT_alice_split_bs diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/config.h b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h new file mode 100644 index 0000000000..5b3a8e8250 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h @@ -0,0 +1,75 @@ +/* +Copyright 2021 Mechlovin' Studio + +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 PRODUCT_ID 0xAEC3 +#define PRODUCT Adelais En Ciel Rev3 + +#define MATRIX_ROW_PINS { A4, A3, C13, A1, A2} +#define MATRIX_COL_PINS { B10, B11, B2, B1, B0, A6, A5, A14, A13, A15, B3, B4, B5, B8, B9 } + +#define RGB_DI_PIN A7 +#define WS2812_SPI SPID1 // default: SPID1 +#define WS2812_SPI_MOSI_PAL_MODE 5 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5 +#define RGBLED_NUM 23 +#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 +#define RGBLIGHT_EFFECT_TWINKLE +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +//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: +// 0b1110100 AD <-> GND +// 0b1110111 AD <-> VCC +// 0b1110101 AD <-> SCL +// 0b1110110 AD <-> SDA +#define DRIVER_ADDR_1 0b0110010 +#define DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL 66 +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#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 // 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 + +#define RGB_MATRIX_DISABLE_KEYCODES + +#define ENCODERS_PAD_A { B12 } +#define ENCODERS_PAD_B { B13 } +#define ENCODER_RESOLUTION 4 + +#define TAP_CODE_DELAY 10 + + +#define LED_NUM_LOCK_PIN A0 +#define LED_CAPS_LOCK_PIN C14 +#define LED_SCROLL_LOCK_PIN C15
\ No newline at end of file diff --git a/keyboards/mechlovin/adelais/standard_led/halconf.h b/keyboards/mechlovin/adelais/rgb_led/rev3/halconf.h index 01d02f71c3..d001829d03 100644 --- a/keyboards/mechlovin/adelais/standard_led/halconf.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/halconf.h @@ -14,7 +14,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ - #pragma once #define HAL_USE_I2C TRUE diff --git a/keyboards/mechlovin/adelais/standard_led/mcuconf.h b/keyboards/mechlovin/adelais/rgb_led/rev3/mcuconf.h index b7ecee0204..20d2a82c27 100644 --- a/keyboards/mechlovin/adelais/standard_led/mcuconf.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/mcuconf.h @@ -14,7 +14,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ - #pragma once #include_next <mcuconf.h> diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c new file mode 100644 index 0000000000..7631bc8505 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c @@ -0,0 +1,166 @@ +/* Copyright 2021 Team Mechlovin + * + * 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 "rev3.h" + +#ifdef RGB_MATRIX_ENABLE +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { + {0, CS3_SW5, CS2_SW5, CS1_SW5}, /* D9-K31-00 */ + {0, CS6_SW5, CS5_SW5, CS4_SW5}, /* D46-K00-01 */ + {0, CS6_SW9, CS5_SW9, CS4_SW9}, /* D59-K01-02 */ + {0, CS9_SW5, CS8_SW5, CS7_SW5}, /* D73-K02-03 */ + {0, CS9_SW9, CS8_SW9, CS7_SW9}, /* D75-K03-04 */ + {0, CS12_SW5, CS11_SW5, CS10_SW5}, /* D77-K04-05 */ + {0, CS12_SW9, CS11_SW9, CS10_SW9}, /* D79-K05-06 */ + {0, CS15_SW5, CS14_SW5, CS13_SW5}, /* D81-K06-07 */ + {0, CS15_SW9, CS14_SW9, CS13_SW9}, /* D83-K07-08 */ + {0, CS18_SW5, CS17_SW5, CS16_SW5}, /* D85-K08-09 */ + {0, CS18_SW9, CS17_SW9, CS16_SW9}, /* D87-K09-10 */ + {0, CS21_SW5, CS20_SW5, CS19_SW5}, /* D90-K0A-11 */ + {0, CS21_SW9, CS20_SW9, CS19_SW9}, /* D93-K0B-12 */ + {0, CS24_SW5, CS23_SW5, CS22_SW5}, /* D95-K0C-13 */ + {0, CS24_SW9, CS23_SW9, CS22_SW9}, /* D98-K0D-14 */ + {0, CS24_SW3, CS23_SW3, CS22_SW3}, /* D100-K0E-15 */ + {0, CS3_SW4, CS2_SW4, CS1_SW4}, /* D94-K41-16 */ + {0, CS6_SW4, CS5_SW4, CS4_SW4}, /* D92-K10-17 */ + {0, CS6_SW6, CS5_SW6, CS4_SW6}, /* D89-K11-18 */ + {0, CS9_SW4, CS8_SW4, CS7_SW4}, /* D86-K12-19 */ + {0, CS9_SW6, CS8_SW6, CS7_SW6}, /* D84-K13-20 */ + {0, CS12_SW4, CS11_SW4, CS10_SW4}, /* D82-K14-21 */ + {0, CS12_SW6, CS11_SW6, CS10_SW6}, /* D80-K15-22 */ + {0, CS15_SW4, CS14_SW4, CS13_SW4}, /* D78-K16-23 */ + {0, CS15_SW6, CS14_SW6, CS13_SW6}, /* D76-K17-24 */ + {0, CS18_SW4, CS17_SW4, CS16_SW4}, /* D74-K18-25 */ + {0, CS18_SW6, CS17_SW6, CS16_SW6}, /* D72-K19-26 */ + {0, CS21_SW4, CS20_SW4, CS19_SW4}, /* D51-K1A-27 */ + {0, CS21_SW6, CS20_SW6, CS19_SW6}, /* D10-K1B-28 */ + {0, CS24_SW4, CS23_SW4, CS22_SW4}, /* D101-K1C-29 */ + {0, CS24_SW6, CS23_SW6, CS22_SW6}, /* D104-K1D-30 */ + {0, CS3_SW3, CS2_SW3, CS1_SW3}, /* D108-K43-31 */ + {0, CS6_SW3, CS5_SW3, CS4_SW3}, /* D111-K20-32 */ + {0, CS6_SW7, CS5_SW7, CS4_SW7}, /* D114-K21-33 */ + {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* D117-K22-34 */ + {0, CS9_SW7, CS8_SW7, CS7_SW7}, /* D120-K23-35 */ + {0, CS12_SW3, CS11_SW3, CS10_SW3}, /* D123-K24-36 */ + {0, CS12_SW7, CS11_SW7, CS10_SW7}, /* D126-K25-37 */ + {0, CS15_SW3, CS14_SW3, CS13_SW3}, /* D129-K26-38 */ + {0, CS15_SW7, CS14_SW7, CS13_SW7}, /* D133-K27-39 */ + {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* D142-K28-40 */ + {0, CS18_SW7, CS17_SW7, CS16_SW7}, /* D146-K29-41 */ + {0, CS21_SW3, CS20_SW3, CS19_SW3}, /* D160-K2A-42 */ + {0, CS21_SW7, CS20_SW7, CS19_SW7}, /* D167-K2B-43 */ + {0, CS24_SW7, CS23_SW7, CS22_SW7}, /* D168-K2D-44 */ + + {0, CS6_SW2, CS5_SW2, CS4_SW2}, /* D163-K30-45 */ + {0, CS6_SW8, CS5_SW8, CS4_SW8}, /* D147-K31-46 */ + {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* D144-K32-47 */ + {0, CS9_SW8, CS8_SW8, CS7_SW8}, /* D137-K33-48 */ + {0, CS12_SW2, CS11_SW2, CS10_SW2}, /* D130-K34-49 */ + {0, CS12_SW8, CS11_SW8, CS10_SW8}, /* D127-K35-50 */ + {0, CS15_SW2, CS14_SW2, CS13_SW2}, /* D124-K36-51 */ + {0, CS15_SW8, CS14_SW8, CS13_SW8}, /* D121-K37-52 */ + {0, CS18_SW2, CS17_SW2, CS16_SW2}, /* D118-K38-53 */ + {0, CS18_SW8, CS17_SW8, CS16_SW8}, /* D115-K39-54 */ + {0, CS21_SW2, CS20_SW2, CS19_SW2}, /* D112-K3A-55 */ + {0, CS21_SW8, CS20_SW8, CS19_SW8}, /* D109-K3B-56 */ + {0, CS24_SW2, CS23_SW2, CS22_SW2}, /* D105-K3D-57 */ + {0, CS24_SW8, CS23_SW8, CS22_SW8}, /* D103-K3E-58 */ + + {0, CS3_SW1, CS2_SW1, CS1_SW1}, /* D163-K40-59 */ + {0, CS6_SW1, CS5_SW1, CS4_SW1}, /* D147-K42-60 */ + {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* D137-K44-61 */ + {0, CS12_SW1, CS11_SW1, CS10_SW1}, /* D127-K46-62 */ + {0, CS15_SW1, CS14_SW1, CS13_SW1}, /* D121-K48-63 */ + {0, CS18_SW1, CS17_SW1, CS16_SW1}, /* D115-K4A-64 */ + {0, CS24_SW1, CS23_SW1, CS22_SW1}, /* D103-K4E-65 */ +}; + +led_config_t g_led_config = { + { + // Key Matrix to LED Index + { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, + {17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, NO_LED}, + {32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, NO_LED, 44, NO_LED}, + {45, NO_LED, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58}, + {59, NO_LED, 60, NO_LED, 61, NO_LED, 62, NO_LED, 63, NO_LED, 64, NO_LED, NO_LED, NO_LED, 65}, + }, { + //LED Index to Physical Positon + {0,0}, { 17, 0}, { 34, 0 }, { 51, 0 }, { 69, 0}, { 86, 0}, {100, 0}, {103, 0}, { 120, 0}, { 138, 0}, { 155, 0}, { 172, 0}, { 189, 0}, {207, 0}, {215, 0}, {224, 0}, + {0,16}, { 17, 16}, { 34,16 }, { 51,16 }, { 69,16}, { 86,16}, {103,16}, { 120,16}, { 138,16}, { 155,16}, { 172,16}, { 189,16}, {207, 16}, {215, 16}, {224,16}, + {0,32}, { 17, 32}, { 34,32 }, { 51,32 }, { 69,32}, { 86,32}, {103,32}, { 120,32}, { 138,32}, { 155,32}, { 172,32}, { 189,32}, {207, 32}, {224,32}, + { 17, 48}, { 34,48 }, { 51,48 }, { 69,48}, { 86,48}, {103,48}, { 120,48}, { 138,48}, { 155,48}, { 172,48}, { 189,48}, {207, 48}, {215, 48}, {224,48}, + { 17, 64}, { 51,64 }, { 86,64}, { 103,64}, { 138,64}, { 172,64}, {224, 64}, + }, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + } +}; + +__attribute__((weak)) void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(32, 255, 255, 255); + } +} + + +#endif + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + #ifdef RGBLIGHT_ENABLE + #ifdef RGB_MATRIX_ENABLE + case KC_F13: // toggle rgb matrix + rgb_matrix_toggle(); + return false; + case KC_F14: + rgb_matrix_step(); + return false; + case KC_F15: + rgb_matrix_increase_speed(); + return false; + case KC_F16: + rgb_matrix_decrease_speed(); + return false; + case KC_F17: + rgb_matrix_increase_hue(); + return false; + case KC_F18: + rgb_matrix_decrease_hue(); + return false; + case KC_F19: + rgb_matrix_increase_sat(); + return false; + case KC_F20: + rgb_matrix_decrease_sat(); + return false; + case KC_F21: + rgb_matrix_increase_val(); + return false; + case KC_F22: + rgb_matrix_decrease_val(); + return false; + #endif + #endif + default: + break; + } + } + return true; +}
\ No newline at end of file diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.h b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.h new file mode 100644 index 0000000000..28c373ad85 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.h @@ -0,0 +1,78 @@ +/* Copyright 2021 Team Mechlovin + * + * 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 LAYOUT_alice_split_bs( \ + K31, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ + K41, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K43, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3C, K3D, K3E,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_alice( \ + K31, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D,\ + K41, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K43, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3C, K3D, K3E,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_alice_split_bs_full_rshift( \ + K31, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K41, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K43, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \ + { K40, K41, K42, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_alice_full_rshift( \ + K31, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K41, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K43, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \ + { K40, K41, K42, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_all LAYOUT_alice_split_bs + diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/rules.mk b/keyboards/mechlovin/adelais/rgb_led/rev3/rules.mk new file mode 100644 index 0000000000..904d20877b --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/rules.mk @@ -0,0 +1,5 @@ +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = IS31FL3741 +RGBLIGHT_ENABLE = yes +ENCODER_ENABLE = yes +WS2812_DRIVER = spi diff --git a/keyboards/mechlovin/adelais/rules.mk b/keyboards/mechlovin/adelais/rules.mk index a3531ff091..8b6c9a433e 100644 --- a/keyboards/mechlovin/adelais/rules.mk +++ b/keyboards/mechlovin/adelais/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -21,4 +21,4 @@ AUDIO_ENABLE = no # Audio output LAYOUTS = alice alice_split_bs -DEFAULT_FOLDER = mechlovin/adelais/standard_led/rev2 +DEFAULT_FOLDER = mechlovin/adelais/standard_led/arm/rev2 diff --git a/keyboards/mechlovin/adelais/standard_led/arm/.noci b/keyboards/mechlovin/adelais/standard_led/arm/.noci new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/.noci diff --git a/keyboards/mechlovin/adelais/standard_led/arm/chconf.h b/keyboards/mechlovin/adelais/standard_led/arm/chconf.h new file mode 100644 index 0000000000..fe716d6552 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/chconf.h @@ -0,0 +1,24 @@ +/* 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 + +#define CH_CFG_ST_TIMEDELTA 0 + +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +#include_next <chconf.h> + diff --git a/keyboards/mechlovin/adelais/standard_led/config.h b/keyboards/mechlovin/adelais/standard_led/arm/config.h index 4580e56d5a..4377405fc6 100644 --- a/keyboards/mechlovin/adelais/standard_led/config.h +++ b/keyboards/mechlovin/adelais/standard_led/arm/config.h @@ -23,6 +23,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { A10, A9, A8, B15, B14, B13, B12, B11, B10, B8, B4, B5, B3, C14, A15 } #define UNUSED_PINS +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + #define BACKLIGHT_PIN B0 #define BACKLIGHT_BREATHING #define BACKLIGHT_PWM_DRIVER PWMD3 @@ -32,3 +35,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLED_NUM 23 #define RGBLIGHT_LIMIT_VAL 255 #define RGBLIGHT_ANIMATIONS + + +#define LED_NUM_LOCK_PIN C15 +#define LED_CAPS_LOCK_PIN B2 +#define LED_SCROLL_LOCK_PIN B9 diff --git a/keyboards/mechlovin/adelais/standard_led/arm/halconf.h b/keyboards/mechlovin/adelais/standard_led/arm/halconf.h new file mode 100644 index 0000000000..aca546705d --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/halconf.h @@ -0,0 +1,24 @@ +/* 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 + +#define HAL_USE_PWM TRUE + +#define HAL_USE_SPI TRUE + +#include_next <halconf.h> + diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.h b/keyboards/mechlovin/adelais/standard_led/arm/mcuconf.h index 740a951ec8..ac5a23c70e 100644 --- a/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.h +++ b/keyboards/mechlovin/adelais/standard_led/arm/mcuconf.h @@ -1,4 +1,4 @@ -/* Copyright 2017 Fred Sundvik +/* 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 @@ -14,22 +14,16 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef VISUALIZER_H_ -#define VISUALIZER_H_ -#include "visualizer.h" -#include "led.h" +#pragma once -void ergodox_led_lower_on (void); -void ergodox_led_raise_on (void); -void ergodox_led_adjust_on (void); +#include_next <mcuconf.h> + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE + +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 TRUE -void ergodox_led_lower_off (void); -void ergodox_led_raise_off (void); -void ergodox_led_adjust_off (void); -void ergodox_led_lower_set (uint8_t n); -void ergodox_led_raise_set (uint8_t n); -void ergodox_led_adjust_set (uint8_t n); -#endif /* VISUALIZER_H_ */ diff --git a/keyboards/mechlovin/adelais/standard_led/readme.md b/keyboards/mechlovin/adelais/standard_led/arm/readme.md index a7c76beb49..9011ff3a88 100644 --- a/keyboards/mechlovin/adelais/standard_led/readme.md +++ b/keyboards/mechlovin/adelais/standard_led/arm/readme.md @@ -11,6 +11,6 @@ Compatible with TGR Alice and all clone variants. Make example for this keyboard (after setting up your build environment): - make mechlovin/adelais/standard_led:default + make mechlovin/adelais/standard_led/arm: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/mechlovin/adelais/standard_led/arm/rev2/.noci b/keyboards/mechlovin/adelais/standard_led/arm/rev2/.noci new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev2/.noci diff --git a/keyboards/mechlovin/adelais/standard_led/rev2/config.h b/keyboards/mechlovin/adelais/standard_led/arm/rev2/config.h index 7c2c63ea21..7c2c63ea21 100644 --- a/keyboards/mechlovin/adelais/standard_led/rev2/config.h +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev2/config.h diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev2/rev2.h b/keyboards/mechlovin/adelais/standard_led/arm/rev2/rev2.h new file mode 100644 index 0000000000..45d48fac46 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev2/rev2.h @@ -0,0 +1,77 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 LAYOUT_alice_split_bs( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice_split_bs_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_alice_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_all LAYOUT_alice_split_bs diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev2/rules.mk b/keyboards/mechlovin/adelais/standard_led/arm/rev2/rules.mk new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev2/rules.mk diff --git a/keyboards/mechlovin/adelais/standard_led/rev3/config.h b/keyboards/mechlovin/adelais/standard_led/arm/rev3/config.h index 4d56fedf05..4d56fedf05 100644 --- a/keyboards/mechlovin/adelais/standard_led/rev3/config.h +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev3/config.h diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev3/rev3.h b/keyboards/mechlovin/adelais/standard_led/arm/rev3/rev3.h new file mode 100644 index 0000000000..45d48fac46 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev3/rev3.h @@ -0,0 +1,77 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 LAYOUT_alice_split_bs( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice_split_bs_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_alice_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_all LAYOUT_alice_split_bs diff --git a/keyboards/mechlovin/adelais/standard_led/rev3/rules.mk b/keyboards/mechlovin/adelais/standard_led/arm/rev3/rules.mk index 5af1ba8536..5af1ba8536 100644 --- a/keyboards/mechlovin/adelais/standard_led/rev3/rules.mk +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev3/rules.mk diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev4/apm32f103/rules.mk b/keyboards/mechlovin/adelais/standard_led/arm/rev4/apm32f103/rules.mk new file mode 100644 index 0000000000..34cbe43495 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev4/apm32f103/rules.mk @@ -0,0 +1,5 @@ +# MCU name +MCU = STM32F103 + +# Bootloader selection +BOOTLOADER = stm32duino diff --git a/keyboards/mechlovin/adelais/standard_led/rev4/config.h b/keyboards/mechlovin/adelais/standard_led/arm/rev4/config.h index ca793f1fec..ca793f1fec 100644 --- a/keyboards/mechlovin/adelais/standard_led/rev4/config.h +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev4/config.h diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev4/readme.md b/keyboards/mechlovin/adelais/standard_led/arm/rev4/readme.md new file mode 100644 index 0000000000..8035195b0f --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev4/readme.md @@ -0,0 +1,16 @@ +# Adelais rev.4 + +![adelais](https://i.imgur.com/6U1IfZe.png) + +Compatible with TGR Alice and all clone variants. +`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. Adelais rev.4 support 3 rotary encoder, USB TypeC both side and reset footprint. + +* Keyboard Maintainer: [Team Mechlovin'](https://mechlovin.studio) +* Hardware Supported: Adelais rev. 4 +* Hardware Availability: [Mechlovin.studio](https://mechlovin.studio/collections/pcb/products/adelais-tgr-alice-clones-compatible-pcb?variant=34140335472779) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/adelais/standard_led/rev4: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/mechlovin/adelais/standard_led/arm/rev4/rev4.h b/keyboards/mechlovin/adelais/standard_led/arm/rev4/rev4.h new file mode 100644 index 0000000000..45d48fac46 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev4/rev4.h @@ -0,0 +1,77 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 LAYOUT_alice_split_bs( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice_split_bs_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_alice_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_all LAYOUT_alice_split_bs diff --git a/keyboards/mechlovin/adelais/standard_led/rev4/rules.mk b/keyboards/mechlovin/adelais/standard_led/arm/rev4/rules.mk index 5af1ba8536..5af1ba8536 100644 --- a/keyboards/mechlovin/adelais/standard_led/rev4/rules.mk +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev4/rules.mk diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev4/stm32f303/rules.mk b/keyboards/mechlovin/adelais/standard_led/arm/rev4/stm32f303/rules.mk new file mode 100644 index 0000000000..7a846816d1 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev4/stm32f303/rules.mk @@ -0,0 +1,6 @@ +# MCU name +MCU = STM32F303 +BOARD = QMK_PROTON_C + +# Bootloader selection +BOOTLOADER = stm32-dfu diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rules.mk b/keyboards/mechlovin/adelais/standard_led/arm/rules.mk new file mode 100644 index 0000000000..2a0951eabd --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/rules.mk @@ -0,0 +1,2 @@ +WS2812_DRIVER = spi +DEFAULT_FOLDER = mechlovin/adelais/standard_led/arm/rev2
\ No newline at end of file diff --git a/keyboards/mechlovin/adelais/standard_led/avr/.noci b/keyboards/mechlovin/adelais/standard_led/avr/.noci new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/avr/.noci diff --git a/keyboards/mechlovin/adelais/standard_led/rev4/readme.md b/keyboards/mechlovin/adelais/standard_led/avr/readme.md index 333efbacdb..aaae225efb 100644 --- a/keyboards/mechlovin/adelais/standard_led/rev4/readme.md +++ b/keyboards/mechlovin/adelais/standard_led/avr/readme.md @@ -1,16 +1,16 @@ -# Adelais rev.4 +# Adelais AVR ![adelais](https://i.imgur.com/6U1IfZe.png) Compatible with TGR Alice and all clone variants. `standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. Adelais rev.4 support 3 rotary encoder, USB TypeC both side and reset footprint. -* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin) +* Keyboard Maintainer: [Team Mechlovin'](https://mechlovin.studio) * Hardware Supported: Adelais * Hardware Availability: [Mechlovin.studio](https://mechlovin.studio/collections/pcb/products/adelais-tgr-alice-clones-compatible-pcb?variant=34140335472779) Make example for this keyboard (after setting up your build environment): - make mechlovin/adelais/standard_led:default + make mechlovin/adelais/standard_led/avr: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/mechlovin/adelais/standard_led/avr/rev1/config.h b/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h new file mode 100644 index 0000000000..9093d262e4 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h @@ -0,0 +1,67 @@ +/* +Copyright 2021 Mechlovin' Studio + +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 PRODUCT_ID 0xAD04 +#define PRODUCT Adelais AVR +/* + * 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 { B0, B1, B2, B3, B4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +#define LED_NUM_LOCK_PIN D7 +#define LED_CAPS_LOCK_PIN E6 +#define LED_SCROLL_LOCK_PIN F7 +#define LED_PIN_ON_STATE 1 + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_BREATHING + +#define RGB_DI_PIN E2 +#define RGBLED_NUM 23 +#define RGBLIGHT_LIMIT_VAL 255 +#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 +#define RGBLIGHT_EFFECT_TWINKLE + +#define ENCODERS_PAD_A { D3, D5, C7 } +#define ENCODERS_PAD_B { D2, B6, C6 } +#define ENCODER_RESOLUTION 4 + +#define TAP_CODE_DELAY 10 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5
\ No newline at end of file diff --git a/keyboards/mechlovin/adelais/standard_led/avr/rev1/matrix.c b/keyboards/mechlovin/adelais/standard_led/avr/rev1/matrix.c new file mode 100644 index 0000000000..37046790fe --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/avr/rev1/matrix.c @@ -0,0 +1,363 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar +Copyright 2019 Evy Dekkers + +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 <stdint.h> +#include <stdbool.h> +#include "wait.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +#ifdef DIRECT_PINS +static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; +#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +//static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +#endif + +// matrix code + +#ifdef DIRECT_PINS + +static void init_pins(void) { + for (int row = 0; row < MATRIX_ROWS; row++) { + for (int col = 0; col < MATRIX_COLS; col++) { + pin_t pin = direct_pins[row][col]; + if (pin != NO_PIN) { + setPinInputHigh(pin); + } + } + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + matrix_row_t last_row_value = current_matrix[current_row]; + current_matrix[current_row] = 0; + + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + pin_t pin = direct_pins[current_row][col_index]; + if (pin != NO_PIN) { + current_matrix[current_row] |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + } + + return (last_row_value != current_matrix[current_row]); +} + +#elif (DIODE_DIRECTION == ROW2COL) + +/* Cols 0 - 14 + * These columns use two 74HC138 3 to 8 bit demultiplexer. B0, F1 is the enable pin, must be set high (1) to use it. + * + * col / pin: PF4 PF1 PF0 PF5 PF6 + * 0: 0 ── 0 ── 1 1 ── 0 + * ───────────────────────────────────── + * 1: 0 ── 1 ── 0 1 ── 0 + * ───────────────────────────────────── + * 2: 0 ── 1 ── 1 1 ── 0 + * ───────────────────────────────────── + * 3: 1 ── 0 ── 0 1 ── 0 + * ───────────────────────────────────── + * 4: 1 ── 0 ── 1 1 ── 0 + * ───────────────────────────────────── + * 5: 1 ── 1 ── 1 1 ── 0 + * ───────────────────────────────────── + * 6: 1 ── 1 ── 1 0 ── 1 + * ───────────────────────────────────── + * 7: 0 ── 0 ── 0 0 ── 1 + * ───────────────────────────────────── + * 8: 0 ── 0 ── 1 0 ── 1 + * ───────────────────────────────────── + * 9: 0 ── 1 ── 0 0 ── 1 + * ───────────────────────────────────── + *10: 0 ── 1 ── 1 0 ── 1 + * ───────────────────────────────────── + *11: 1 ── 0 ── 0 0 ── 1 + * ───────────────────────────────────── + *12: 1 ── 0 ── 1 0 ── 1 + * ───────────────────────────────────── + *13: 1 ── 1 ── 0 0 ── 1 + * ───────────────────────────────────── + *14: 0 ── 0 ── 0 1 ── 0 + * + */ +static void select_col(uint8_t col) { + switch (col) { + case 0: + writePinLow(F4); + writePinLow(F1); + writePinHigh(F0); + writePinHigh(F5); + break; + case 1: + writePinLow(F4); + writePinHigh(F1); + writePinLow(F0); + writePinHigh(F5); + break; + case 2: + writePinLow(F4); + writePinHigh(F1); + writePinHigh(F0); + writePinHigh(F5); + break; + case 3: + writePinHigh(F4); + writePinLow(F1); + writePinLow(F0); + writePinHigh(F5); + break; + case 4: + writePinHigh(F4); + writePinLow(F1); + writePinHigh(F0); + writePinHigh(F5); + break; + case 5: + writePinHigh(F4); + writePinHigh(F1); + writePinHigh(F0); + writePinHigh(F5); + break; + case 6: + writePinHigh(F4); + writePinHigh(F1); + writePinHigh(F0); + writePinHigh(F6); + break; + case 7: + writePinLow(F4); + writePinLow(F1); + writePinLow(F0); + writePinHigh(F6); + break; + case 8: + writePinLow(F4); + writePinLow(F1); + writePinHigh(F0); + writePinHigh(F6); + break; + case 9: + writePinLow(F4); + writePinHigh(F1); + writePinLow(F0); + writePinHigh(F6); + break; + case 10: + writePinLow(F4); + writePinHigh(F1); + writePinHigh(F0); + writePinHigh(F6); + break; + case 11: + writePinHigh(F4); + writePinLow(F1); + writePinLow(F0); + writePinHigh(F6); + break; + case 12: + writePinHigh(F4); + writePinLow(F1); + writePinHigh(F0); + writePinHigh(F6); + break; + case 13: + writePinHigh(F4); + writePinHigh(F1); + writePinLow(F0); + writePinHigh(F6); + break; + case 14: + writePinLow(F4); + writePinLow(F1); + writePinLow(F0); + writePinHigh(F5); + break; + } +} + +static void unselect_col(uint8_t col) { + switch (col) { + case 0: + writePinHigh(F4); + writePinHigh(F1); + writePinLow(F0); + writePinLow(F5); + break; + case 1: + writePinHigh(F4); + writePinLow(F1); + writePinHigh(F0); + writePinLow(F5); + break; + case 2: + writePinHigh(F4); + writePinLow(F1); + writePinLow(F0); + writePinLow(F5); + break; + case 3: + writePinLow(F4); + writePinHigh(F1); + writePinHigh(F0); + writePinLow(F5); + break; + case 4: + writePinLow(F4); + writePinHigh(F1); + writePinLow(F0); + writePinLow(F5); + break; + case 5: + writePinLow(F4); + writePinLow(F1); + writePinLow(F0); + writePinLow(F5); + break; + case 6: + writePinLow(F4); + writePinLow(F1); + writePinLow(F0); + writePinLow(F6); + break; + case 7: + writePinHigh(F4); + writePinHigh(F1); + writePinHigh(F0); + writePinLow(F6); + break; + case 8: + writePinHigh(F4); + writePinHigh(F1); + writePinLow(F0); + writePinLow(F6); + break; + case 9: + writePinHigh(F4); + writePinLow(F1); + writePinHigh(F0); + writePinLow(F6); + break; + case 10: + writePinHigh(F4); + writePinLow(F1); + writePinLow(F0); + writePinLow(F6); + break; + case 11: + writePinLow(F4); + writePinHigh(F1); + writePinHigh(F0); + writePinLow(F6); + break; + case 12: + writePinLow(F4); + writePinHigh(F1); + writePinLow(F0); + writePinLow(F6); + break; + case 13: + writePinLow(F4); + writePinLow(F1); + writePinHigh(F0); + writePinLow(F6); + break; + case 14: + writePinHigh(F4); + writePinHigh(F1); + writePinHigh(F0); + writePinLow(F5); + break; + } +} + +static void unselect_cols(void) { + + //Demultiplexer + writePinHigh(F0); + writePinHigh(F1); + writePinHigh(F4); + writePinLow(F5); + writePinLow(F6); +} + +static void init_pins(void) { + unselect_cols(); + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } + setPinOutput(F0); + setPinOutput(F1); + setPinOutput(F4); + setPinOutput(F5); + setPinOutput(F6); +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if (readPin(row_pins[row_index]) == 0) { + // Pin LO, set col bit + current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col); + } else { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +#endif + +void matrix_init_custom(void) { + // initialize key pins + init_pins(); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + +#if defined(DIRECT_PINS) || (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(current_matrix, current_col); + } +#endif + + return changed; +} diff --git a/keyboards/mechlovin/adelais/standard_led/avr/rev1/readme.md b/keyboards/mechlovin/adelais/standard_led/avr/rev1/readme.md new file mode 100644 index 0000000000..9d7d7dbf20 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/avr/rev1/readme.md @@ -0,0 +1,16 @@ +# Adelais AVR rev. 1 + +![adelais](https://i.imgur.com/6U1IfZe.png) + +Compatible with TGR Alice and all clone variants. +`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. Adelais rev.5 support 3 rotary encoder, USB TypeC both side and reset button. + +* Keyboard Maintainer: [Team Mechlovin'](mechlovin.studio) +* Hardware Supported: Adelais +* Hardware Availability: [Mechlovin.studio](https://mechlovin.studio/collections/pcb/products/adelais-tgr-alice-clones-compatible-pcb?variant=34140335472779) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/adelais/standard_led/avr/rev1: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/mechlovin/adelais/standard_led/avr/rev1/rev1.h b/keyboards/mechlovin/adelais/standard_led/avr/rev1/rev1.h new file mode 100644 index 0000000000..7cc7add2c6 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/avr/rev1/rev1.h @@ -0,0 +1,77 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 LAYOUT_alice_split_bs( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K4C, K3C, K3D,\ + K40, K42, K44, K46, K48, K4A, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, K4C, K4D, KC_NO }, \ +} + +#define LAYOUT_alice( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D,\ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K4C, K3C, K3D,\ + K40, K42, K44, K46, K48, K4A, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, K4C, K4D, KC_NO }, \ +} + +#define LAYOUT_alice_split_bs_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K4C, K3C, \ + K40, K42, K44, K46, K48, K4A, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, K4C, K4D, KC_NO }, \ +} + +#define LAYOUT_alice_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K4C, K3C, K3D, \ + K40, K42, K44, K46, K48, K4A, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, K4C, K4D, KC_NO }, \ +} + +#define LAYOUT_all LAYOUT_alice_split_bs diff --git a/keyboards/mechlovin/adelais/standard_led/avr/rev1/rules.mk b/keyboards/mechlovin/adelais/standard_led/avr/rev1/rules.mk new file mode 100644 index 0000000000..0bba0b6eaf --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/avr/rev1/rules.mk @@ -0,0 +1,13 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +CUSTOM_MATRIX = lite + +SRC += matrix.c diff --git a/keyboards/mechlovin/adelais/standard_led/avr/rules.mk b/keyboards/mechlovin/adelais/standard_led/avr/rules.mk new file mode 100644 index 0000000000..f33198890d --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/avr/rules.mk @@ -0,0 +1,2 @@ + +DEFAULT_FOLDER = mechlovin/adelais/standard_led/avr/rev1
\ No newline at end of file diff --git a/keyboards/mechlovin/adelais/standard_led/rules.mk b/keyboards/mechlovin/adelais/standard_led/rules.mk index b4523dbf37..b3c522ca06 100644 --- a/keyboards/mechlovin/adelais/standard_led/rules.mk +++ b/keyboards/mechlovin/adelais/standard_led/rules.mk @@ -1,3 +1,5 @@ -RGBLIGHT_ENABLE = yes -WS2812_DRIVER = spi -DEFAULT_FOLDER = mechlovin/adelais/standard_led/rev2
\ No newline at end of file + +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +DEFAULT_FOLDER = mechlovin/adelais/standard_led/arm/rev2 diff --git a/keyboards/mechlovin/delphine/rgb_led/config.h b/keyboards/mechlovin/delphine/rgb_led/config.h index 9a653d7595..edb476ecb7 100644 --- a/keyboards/mechlovin/delphine/rgb_led/config.h +++ b/keyboards/mechlovin/delphine/rgb_led/config.h @@ -33,10 +33,7 @@ // 0b1110101 AD <-> SCL // 0b1110110 AD <-> SDA #define DRIVER_ADDR_1 0b1110110 -#define DRIVER_ADDR_2 0b1110100 #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 25 -#define DRIVER_2_LED_TOTAL 0 #define DRIVER_LED_TOTAL 25 #define RGB_MATRIX_KEYPRESSES // reacts to keypresses #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) diff --git a/keyboards/mechlovin/infinity87/rgb_rev1/config.h b/keyboards/mechlovin/infinity87/rgb_rev1/config.h index 76c6e0db73..8cef83f897 100644 --- a/keyboards/mechlovin/infinity87/rgb_rev1/config.h +++ b/keyboards/mechlovin/infinity87/rgb_rev1/config.h @@ -44,8 +44,6 @@ #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE #define DRIVER_ADDR_1 0b0110010 -#define DRIVER_ADDR_2 0b0110010 // this is here for compliancy reasons. #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 91 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 91 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/mechmini/mechmini.h b/keyboards/mechmini/mechmini.h index 637021cd20..cbd405285f 100644 --- a/keyboards/mechmini/mechmini.h +++ b/keyboards/mechmini/mechmini.h @@ -14,17 +14,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MECHMINI_H -#define MECHMINI_H +#pragma once #include "quantum.h" -#ifdef KEYBOARD_mechmini_v1 - #include "v1.h" -#endif - -#ifdef KEYBOARD_mechmini_v2 - #include "v2.h" -#endif - +#if defined(KEYBOARD_mechmini_v1) +# include "v1.h" +#elif defined(KEYBOARD_mechmini_v2) +# include "v2.h" #endif diff --git a/keyboards/mechmini/v2/config.h b/keyboards/mechmini/v2/config.h index c19e030bf4..7936caef00 100755 --- a/keyboards/mechmini/v2/config.h +++ b/keyboards/mechmini/v2/config.h @@ -12,8 +12,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef V2_CONFIG_H -#define V2_CONFIG_H + +#pragma once #include "config_common.h" @@ -62,5 +62,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/mechmini/v2/v2.h b/keyboards/mechmini/v2/v2.h index 67a13abbb5..a0a620675e 100755 --- a/keyboards/mechmini/v2/v2.h +++ b/keyboards/mechmini/v2/v2.h @@ -13,57 +13,56 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef V2_H -#define V2_H +#pragma once #include "../mechmini.h" +#define XXX KC_NO + #define LAYOUT_ortho( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \ + 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, k36, k37, k38, k39, k3A, k3B \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \ + { 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, k36, k37, k38, k39, k3A, k3B } \ } #define LAYOUT_625_space( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K111, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K306, K310, K311 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1B, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k36, k3A, k3B \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, KC_NO, K111 }, \ - { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, KC_NO, KC_NO, KC_NO, K306, KC_NO, KC_NO, KC_NO, K310, K311 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, XXX, k1B }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, XXX, XXX, XXX, k36, XXX, XXX, XXX, k3A, k3B } \ } #define LAYOUT_split_space( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K111, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K304, K307, K309, K310, K311 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1B, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k34, k37, k39, k3A, k3B \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, KC_NO, K111 }, \ - { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, KC_NO, K304, KC_NO, KC_NO, K307, KC_NO, K309, K310, K311 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, XXX, k1B }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, XXX, k34, XXX, XXX, k37, XXX, k39, k3A, k3B } \ } #define LAYOUT_2u_space_ortho( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311 \ + 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 \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, K303, K304, K305, K305, K307, K308, K309, K310, K311 } \ + { 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, k35, k37, k38, k39, k3A, k3B } \ } - -#endif diff --git a/keyboards/mechstudio/ud_40_ortho/keymaps/via/keymap.c b/keyboards/mechstudio/ud_40_ortho/keymaps/via/keymap.c index c61bec5a05..affc42c7bb 100644 --- a/keyboards/mechstudio/ud_40_ortho/keymaps/via/keymap.c +++ b/keyboards/mechstudio/ud_40_ortho/keymaps/via/keymap.c @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - _______, KC_LCTRL, KC_LALT, KC_LGUI, KC_FN13, KC_SPC, KC_SPC, KC_FN23, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + _______, KC_LCTRL, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), [1] = LAYOUT_ortho_4x12( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, diff --git a/keyboards/mechwild/mercutio/keymaps/bongocat/keymap.c b/keyboards/mechwild/mercutio/keymaps/bongocat/keymap.c index b094898768..6062b8c73d 100644 --- a/keyboards/mechwild/mercutio/keymaps/bongocat/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/bongocat/keymap.c @@ -187,12 +187,13 @@ static void render_anim(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); oled_set_cursor(0,4); sprintf(wpm_str, "WPM: %03d", get_current_wpm()); oled_write(wpm_str, false); + return false; } #endif diff --git a/keyboards/mechwild/mercutio/keymaps/default/keymap.c b/keyboards/mechwild/mercutio/keymaps/default/keymap.c index a08150505f..8f433292b5 100644 --- a/keyboards/mechwild/mercutio/keymaps/default/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/default/keymap.c @@ -76,7 +76,8 @@ static void render_name(void) { oled_write_P(mercutio_name, false); } -void oled_task_user(void) { +bool oled_task_user(void) { render_name(); + return false; } #endif diff --git a/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c b/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c index cb0a6173f3..96457be6d2 100755 --- a/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c @@ -107,7 +107,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { oled_write_P(logo_4, false); } - void oled_task_user(void) { + bool oled_task_user(void) { if ( IS_HOST_LED_OFF(USB_LED_NUM_LOCK) && IS_HOST_LED_OFF(USB_LED_CAPS_LOCK) && selected_layer == 0 && get_highest_layer(layer_state) == 0 ) { render_name(); @@ -164,5 +164,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { oled_write_P(led_state.num_lock ? PSTR("NLCK ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false); } + return false; } #endif diff --git a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c index 22d26db3c2..869a9f73ab 100755 --- a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c @@ -188,7 +188,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { oled_write_P(logo_4, false); } - void oled_task_user(void) { + bool oled_task_user(void) { if ( IS_HOST_LED_OFF(USB_LED_NUM_LOCK) && IS_HOST_LED_OFF(USB_LED_CAPS_LOCK) && get_selected_layer() == 0 && get_highest_layer(layer_state) == 0 ) { render_name(); @@ -263,6 +263,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } + return false; } void suspend_power_down_user(void) { // shutdown oled when powered down to prevent OLED from showing Mercutio all the time diff --git a/keyboards/mechwild/mercutio/keymaps/via/keymap.c b/keyboards/mechwild/mercutio/keymaps/via/keymap.c index a08150505f..8f433292b5 100755 --- a/keyboards/mechwild/mercutio/keymaps/via/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/via/keymap.c @@ -76,7 +76,8 @@ static void render_name(void) { oled_write_P(mercutio_name, false); } -void oled_task_user(void) { +bool oled_task_user(void) { render_name(); + return false; } #endif diff --git a/keyboards/mechwild/murphpad/keymaps/default/keymap.c b/keyboards/mechwild/murphpad/keymaps/default/keymap.c index a30bf6bfa1..fe46e8ce5e 100644 --- a/keyboards/mechwild/murphpad/keymaps/default/keymap.c +++ b/keyboards/mechwild/murphpad/keymaps/default/keymap.c @@ -115,7 +115,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { oled_write_P(logo_4, false); } - void oled_task_user(void) { + bool oled_task_user(void) { render_logo(); oled_set_cursor(0,6); @@ -143,5 +143,6 @@ bool encoder_update_user(uint8_t index, bool clockwise) { oled_write_ln_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_ln_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_ln_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/mechwild/murphpad/keymaps/jonavin/keymap.c b/keyboards/mechwild/murphpad/keymaps/jonavin/keymap.c index dc03e334bf..043eeb992b 100644 --- a/keyboards/mechwild/murphpad/keymaps/jonavin/keymap.c +++ b/keyboards/mechwild/murphpad/keymaps/jonavin/keymap.c @@ -296,7 +296,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } #ifdef LANDSCAPE_MODE - void oled_task_user(void) { + bool oled_task_user(void) { render_logo(); oled_set_cursor(8,2); @@ -359,6 +359,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR") : PSTR(" "), false); + return false; } #endif // LANDSCAPE_MODE @@ -368,7 +369,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return OLED_ROTATION_270; // flips the display 270 degrees } - void oled_task_user(void) { + bool oled_task_user(void) { render_logo(); oled_set_cursor(0,5); @@ -408,6 +409,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { oled_write_ln_P(led_state.num_lock ? PSTR(" NUM") : PSTR(" "), false); oled_write_ln_P(led_state.caps_lock ? PSTR(" CAP") : PSTR(" "), false); oled_write_ln_P(led_state.scroll_lock ? PSTR(" SCR") : PSTR(" "), false); + return false; } #endif // !LANDSCAPE_MODE diff --git a/keyboards/mechwild/murphpad/keymaps/via/keymap.c b/keyboards/mechwild/murphpad/keymaps/via/keymap.c index 17e4699a98..4f4f6d571a 100644 --- a/keyboards/mechwild/murphpad/keymaps/via/keymap.c +++ b/keyboards/mechwild/murphpad/keymaps/via/keymap.c @@ -113,7 +113,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { oled_write_P(logo_4, false); } - void oled_task_user(void) { + bool oled_task_user(void) { render_logo(); oled_set_cursor(0,6); @@ -141,5 +141,6 @@ bool encoder_update_user(uint8_t index, bool clockwise) { oled_write_ln_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_ln_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_ln_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/mehkee96/mehkee96.h b/keyboards/mehkee96/mehkee96.h index 1e1eb44a64..a92e7ffe0f 100644 --- a/keyboards/mehkee96/mehkee96.h +++ b/keyboards/mehkee96/mehkee96.h @@ -1,24 +1,23 @@ -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE2, KD0, K67, K87, K97, \ - K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, K64, K74, K84, K94, \ - K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K63, K73, K83, K93, \ - K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, K62, K72, K82, K92, \ - K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K61, K71, K81, K91, \ - K00, K10, K20, K56, K57, KA0, KB0, K66, K76, K96, K60, K80, K90 \ + k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k78, k79, \ + k40, k41, k42, k43, k44, k45, k61, k6B, k7B, k71, k4A, k4B, k4C, k4E, k46, k47, k48, k49, \ + k30, k31, k32, k33, k34, k35, k62, k6C, k7C, k72, k3A, k3B, k3C, k3D, k36, k37, k38, k39, \ + k20, k21, k22, k23, k24, k25, k63, k6D, k7D, k73, k2A, k2B, k2D, k26, k27, k28, k29, \ + k10, k11, k12, k13, k14, k15, k64, k6E, k7E, k74, k1A, k1B, k68, k16, k17, k18, k19, \ + k00, k01, k02, k65, k75, k0A, k0B, k66, k67, k69, k06, k08, k09 \ ) { \ - { K00, K10, K20, KC_NO, KC_NO, KC_NO, K60, KC_NO, K80, K90, KA0, KB0, KC_NO, KD0, KC_NO }, \ - { K01, K11, K21, K31, K41, K51, K61, K71, K81, K91, KA1, KB1, KC_NO, KD1, KC_NO }, \ - { K02, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC_NO, KD2, KE2 }, \ - { K03, K13, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3, KC_NO }, \ - { K04, K14, K24, K34, K44, K54, K64, K74, K84, K94, KA4, KB4, KC4, KC_NO, KE4 }, \ - { K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \ - { K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \ - { K07, K17, K27, K37, K47, K57, K67, KC_NO,K87, K97, KA7, KB7, KC7, KD7, KE7 } \ + { k00, k01, k02, XXX, XXX, XXX, k06, XXX, k08, k09, k0A, k0B, XXX, k0D, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, XXX, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, XXX, k4E }, \ + { k50, XXX, k52, k53, k54, k55, XXX, XXX, XXX, XXX, XXX, k5B, k5C, k5D, k5E }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E }, \ + { k70, k71, k72, k73, k74, k75, k76, XXX, k78, k79, k7A, k7B, k7C, k7D, k7E } \ } - -#endif diff --git a/keyboards/meira/config.h b/keyboards/meira/config.h index 4d864a8a76..999ab1bf8a 100644 --- a/keyboards/meira/config.h +++ b/keyboards/meira/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -44,5 +43,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLED_NUM 15 // Number of LEDs #endif - -#endif diff --git a/keyboards/meira/featherble/config.h b/keyboards/meira/featherble/config.h index 61f90d46a0..94bef3b330 100644 --- a/keyboards/meira/featherble/config.h +++ b/keyboards/meira/featherble/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef FEATHERBLECONFIG_H -#define FEATHERBLECONFIG_H +#pragma once #include "config_common.h" @@ -96,5 +95,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/meira/featherble/rules.mk b/keyboards/meira/featherble/rules.mk index b0295ced77..d3e985e8c2 100644 --- a/keyboards/meira/featherble/rules.mk +++ b/keyboards/meira/featherble/rules.mk @@ -2,4 +2,4 @@ F_CPU = 8000000 BLUETOOTH_ENABLE = yes -BLUETOOTH = AdafruitBLE +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/meira/issi.h b/keyboards/meira/issi.h index 51777f6ee3..74379ddbc8 100755 --- a/keyboards/meira/issi.h +++ b/keyboards/meira/issi.h @@ -1,6 +1,6 @@ +#pragma once + #ifdef ISSI_ENABLE -#ifndef ISSI_H -#define ISSI_H typedef struct ISSIDeviceStruct{ uint8_t fn_dirty; // function registers need to be resent @@ -37,4 +37,3 @@ void activateLED(uint8_t matrix, uint8_t cx, uint8_t cy, uint8_t pwm); void update_issi(uint8_t device_addr, uint8_t blocking); #endif -#endif
\ No newline at end of file diff --git a/keyboards/meira/lighting.h b/keyboards/meira/lighting.h index dc55b70ef9..42fee8ac92 100755 --- a/keyboards/meira/lighting.h +++ b/keyboards/meira/lighting.h @@ -1,9 +1,6 @@ -#ifndef LIGHTING_H -#define LIGHTING_H +#pragma once void led_test(void); void force_issi_refresh(void); void set_backlight(uint8_t level); void set_backlight_by_keymap(uint8_t col, uint8_t row); - -#endif diff --git a/keyboards/meira/promicro/config.h b/keyboards/meira/promicro/config.h index 4682a4104c..bbdaa9dbd8 100644 --- a/keyboards/meira/promicro/config.h +++ b/keyboards/meira/promicro/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PROMICROCONFIG_H -#define PROMICROCONFIG_H +#pragma once #include "config_common.h" @@ -87,5 +86,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/melgeek/mach80/rev1/config.h b/keyboards/melgeek/mach80/rev1/config.h index e3ae4de76d..868832d808 100755 --- a/keyboards/melgeek/mach80/rev1/config.h +++ b/keyboards/melgeek/mach80/rev1/config.h @@ -34,8 +34,7 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL -#define DRIVER_1_LED_TOTAL 97 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 97 #define DRIVER_INDICATOR_LED_TOTAL 3 diff --git a/keyboards/melgeek/mj61/config.h b/keyboards/melgeek/mj61/config.h index 6ba19dd757..313c4473bc 100644 --- a/keyboards/melgeek/mj61/config.h +++ b/keyboards/melgeek/mj61/config.h @@ -47,5 +47,4 @@ //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 diff --git a/keyboards/melgeek/mj61/rev1/config.h b/keyboards/melgeek/mj61/rev1/config.h index 9586a6930d..9d73a4fe96 100644 --- a/keyboards/melgeek/mj61/rev1/config.h +++ b/keyboards/melgeek/mj61/rev1/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 63 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 63 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj61/rev2/config.h b/keyboards/melgeek/mj61/rev2/config.h index e6c6e9610e..616426df65 100644 --- a/keyboards/melgeek/mj61/rev2/config.h +++ b/keyboards/melgeek/mj61/rev2/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 71 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 71 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj63/config.h b/keyboards/melgeek/mj63/config.h index 46d3b0fb7b..0292fa6461 100644 --- a/keyboards/melgeek/mj63/config.h +++ b/keyboards/melgeek/mj63/config.h @@ -47,5 +47,4 @@ //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 diff --git a/keyboards/melgeek/mj63/rev1/config.h b/keyboards/melgeek/mj63/rev1/config.h index 1f6914f661..75f7da43a6 100644 --- a/keyboards/melgeek/mj63/rev1/config.h +++ b/keyboards/melgeek/mj63/rev1/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 65 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 65 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj63/rev2/config.h b/keyboards/melgeek/mj63/rev2/config.h index e6c6e9610e..616426df65 100644 --- a/keyboards/melgeek/mj63/rev2/config.h +++ b/keyboards/melgeek/mj63/rev2/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 71 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 71 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj64/config.h b/keyboards/melgeek/mj64/config.h index 920d34acd5..c3741bc062 100644 --- a/keyboards/melgeek/mj64/config.h +++ b/keyboards/melgeek/mj64/config.h @@ -47,5 +47,4 @@ //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 diff --git a/keyboards/melgeek/mj64/rev1/config.h b/keyboards/melgeek/mj64/rev1/config.h index fb45ef3582..db846cb011 100644 --- a/keyboards/melgeek/mj64/rev1/config.h +++ b/keyboards/melgeek/mj64/rev1/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 64 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 64 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj64/rev2/config.h b/keyboards/melgeek/mj64/rev2/config.h index 8af6833b21..fbe170f18e 100644 --- a/keyboards/melgeek/mj64/rev2/config.h +++ b/keyboards/melgeek/mj64/rev2/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 66 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 66 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj64/rev3/config.h b/keyboards/melgeek/mj64/rev3/config.h index 26909d5598..dfde77f24a 100644 --- a/keyboards/melgeek/mj64/rev3/config.h +++ b/keyboards/melgeek/mj64/rev3/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 72 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 72 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj65/config.h b/keyboards/melgeek/mj65/config.h index 399c243ac6..bf8ca7c2c3 100644 --- a/keyboards/melgeek/mj65/config.h +++ b/keyboards/melgeek/mj65/config.h @@ -47,5 +47,4 @@ //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 diff --git a/keyboards/melgeek/mj65/rev3/config.h b/keyboards/melgeek/mj65/rev3/config.h index 7955f4be97..d9a8c5a815 100644 --- a/keyboards/melgeek/mj65/rev3/config.h +++ b/keyboards/melgeek/mj65/rev3/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 76 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 76 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj6xy/info.json b/keyboards/melgeek/mj6xy/info.json index 7465ed7304..712b97295c 100755 --- a/keyboards/melgeek/mj6xy/info.json +++ b/keyboards/melgeek/mj6xy/info.json @@ -3266,7 +3266,6 @@ {"x": 10.5, "y": 1}, {"x": 11.5, "y": 1}, {"x": 12.5, "y": 1}, - {"x": 13.5, "y": 1, "w": 1.5}, {"x": 0, "y": 2, "w": 1.75}, {"x": 1.75, "y": 2}, @@ -3413,7 +3412,6 @@ {"x": 10.5, "y": 1}, {"x": 11.5, "y": 1}, {"x": 12.5, "y": 1}, - {"x": 13.5, "y": 1, "w": 1.5}, {"x": 0, "y": 2, "w": 1.75}, {"x": 1.75, "y": 2}, diff --git a/keyboards/melgeek/mojo68/config.h b/keyboards/melgeek/mojo68/config.h index c4c1dbb0b7..923c15b06a 100755 --- a/keyboards/melgeek/mojo68/config.h +++ b/keyboards/melgeek/mojo68/config.h @@ -47,5 +47,4 @@ //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 diff --git a/keyboards/melgeek/mojo68/rev1/config.h b/keyboards/melgeek/mojo68/rev1/config.h index aed2a45c37..74a7e3dc26 100755 --- a/keyboards/melgeek/mojo68/rev1/config.h +++ b/keyboards/melgeek/mojo68/rev1/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 68 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 68 #define DRIVER_INDICATOR_LED_TOTAL 3 diff --git a/keyboards/melgeek/mojo75/config.h b/keyboards/melgeek/mojo75/config.h index d5bb4b4547..34f64e844e 100644 --- a/keyboards/melgeek/mojo75/config.h +++ b/keyboards/melgeek/mojo75/config.h @@ -48,5 +48,4 @@ #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 diff --git a/keyboards/melgeek/mojo75/rev1/config.h b/keyboards/melgeek/mojo75/rev1/config.h index c841c96fde..eaac850b6d 100644 --- a/keyboards/melgeek/mojo75/rev1/config.h +++ b/keyboards/melgeek/mojo75/rev1/config.h @@ -34,7 +34,6 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 92 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 92 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/z70ultra/config.h b/keyboards/melgeek/z70ultra/config.h index e4530e2eaa..d01d0222ce 100644 --- a/keyboards/melgeek/z70ultra/config.h +++ b/keyboards/melgeek/z70ultra/config.h @@ -46,8 +46,6 @@ //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 69 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 69 #define DRIVER_INDICATOR_LED_TOTAL 6 diff --git a/keyboards/meme/config.h b/keyboards/meme/config.h index 34624d2b6a..0757846f57 100644 --- a/keyboards/meme/config.h +++ b/keyboards/meme/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -108,5 +107,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/meme/meme.h b/keyboards/meme/meme.h index 4c4b29a046..36c533ea9d 100644 --- a/keyboards/meme/meme.h +++ b/keyboards/meme/meme.h @@ -13,90 +13,85 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MEME_H -#define MEME_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT_spicy( \ - K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07, K17, \ - K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K37, \ - K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56, K57, \ - K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K76, K67, K77, \ - K80, K90, K81, K92, K85, K95, K86, K96, K87, K97 \ -)\ -{\ - {K00, K01, K02, K03, K04, K05, K06, K07}, \ - {K10, K11, K12, K13, K14, K15, K16, K17}, \ - {K20, K21, K22, K23, K24, K25, K26, KC_NO}, \ - {K30, K31, K32, K33, K34, K35, K36, K37}, \ - {K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \ - {K50, K51, K52, K53, K54, K55, K56, K57}, \ - {K60, K61, K62, K63, K64, K65, KC_NO, K67}, \ - {K70, K71, K72, K73, K74, KC_NO, K76, K77}, \ - {K80, K81, KC_NO, KC_NO, KC_NO, K85, K86, K87}, \ - {K90, KC_NO, K92, KC_NO, KC_NO, K95, K96, K97}, \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k76, k67, k77, \ + k80, k90, k81, k92, k85, k95, k86, k96, k87, k97 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, XXX, k67 }, \ + { k70, k71, k72, k73, k74, XXX, k76, k77 }, \ + { k80, k81, XXX, XXX, XXX, k85, k86, k87 }, \ + { k90, XXX, k92, XXX, XXX, k95, k96, k97 } \ } #define LAYOUT_normie( \ - K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K07, K17, \ - K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K37, \ - K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56, K57, \ - K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K76, K67, K77, \ - K80, K90, K81, K92, K85, K95, K86, K96, K87, K97 \ -)\ -{\ - {K00, K01, K02, K03, K04, K05, K06, K07}, \ - {K10, K11, K12, K13, K14, K15, KC_NO, K17}, \ - {K20, K21, K22, K23, K24, K25, K26, KC_NO}, \ - {K30, K31, K32, K33, K34, K35, K36, K37}, \ - {K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \ - {K50, K51, K52, K53, K54, K55, K56, K57}, \ - {K60, K61, K62, K63, K64, K65, KC_NO, K67}, \ - {K70, K71, K72, K73, K74, KC_NO, K76, K77}, \ - {K80, K81, KC_NO, KC_NO, KC_NO, K85, K86, K87}, \ - {K90, KC_NO, K92, KC_NO, KC_NO, K95, K96, K97}, \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k76, k67, k77, \ + k80, k90, k81, k92, k85, k95, k86, k96, k87, k97 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, XXX, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, XXX, k67 }, \ + { k70, k71, k72, k73, k74, XXX, k76, k77 }, \ + { k80, k81, XXX, XXX, XXX, k85, k86, k87 }, \ + { k90, XXX, k92, XXX, XXX, k95, k96, k97 } \ } #define LAYOUT_dank( \ - K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K07, K17, \ - K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K37, \ - K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56, K57, \ - K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K76, K67, K77, \ - K80, K90, K81, K92, K85, K86, K96, K87, K97 \ -)\ -{\ - {K00, K01, K02, K03, K04, K05, K06, K07}, \ - {K10, K11, K12, K13, K14, K15, KC_NO, K17}, \ - {K20, K21, K22, K23, K24, K25, K26, KC_NO}, \ - {K30, K31, K32, K33, K34, K35, K36, K37}, \ - {K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \ - {K50, K51, K52, K53, K54, K55, K56, K57}, \ - {K60, K61, K62, K63, K64, K65, KC_NO, K67}, \ - {K70, K71, K72, K73, K74, KC_NO, K76, K77}, \ - {K80, K81, KC_NO, KC_NO, KC_NO, K85, K86, K87}, \ - {K90, KC_NO, K92, KC_NO, KC_NO, KC_NO, K96, K97}, \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k76, k67, k77, \ + k80, k90, k81, k92, k85, k86, k96, k87, k97 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, XXX, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, XXX, k67 }, \ + { k70, k71, k72, k73, k74, XXX, k76, k77 }, \ + { k80, k81, XXX, XXX, XXX, k85, k86, k87 }, \ + { k90, XXX, k92, XXX, XXX, XXX, k96, k97 } \ } #define LAYOUT_meme( \ - K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07, K17, \ - K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K37, \ - K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56, K57, \ - K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K76, K67, K77, \ - K80, K90, K81, K92, K85, K86, K96, K87, K97 \ -)\ -{\ - {K00, K01, K02, K03, K04, K05, K06, K07}, \ - {K10, K11, K12, K13, K14, K15, K16, K17}, \ - {K20, K21, K22, K23, K24, K25, K26, KC_NO}, \ - {K30, K31, K32, K33, K34, K35, K36, K37}, \ - {K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \ - {K50, K51, K52, K53, K54, K55, K56, K57}, \ - {K60, K61, K62, K63, K64, K65, KC_NO, K67}, \ - {K70, K71, K72, K73, K74, KC_NO, K76, K77}, \ - {K80, K81, KC_NO, KC_NO, KC_NO, K85, K86, K87}, \ - {K90, KC_NO, K92, KC_NO, KC_NO, KC_NO, K96, K97}, \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k76, k67, k77, \ + k80, k90, k81, k92, k85, k86, k96, k87, k97 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, XXX, k67 }, \ + { k70, k71, k72, k73, k74, XXX, k76, k77 }, \ + { k80, k81, XXX, XXX, XXX, k85, k86, k87 }, \ + { k90, XXX, k92, XXX, XXX, XXX, k96, k97 } \ } - - -#endif diff --git a/keyboards/merge/um70/keymaps/default/keymap.c b/keyboards/merge/um70/keymaps/default/keymap.c index 0a775929d0..926f7836aa 100644 --- a/keyboards/merge/um70/keymaps/default/keymap.c +++ b/keyboards/merge/um70/keymaps/default/keymap.c @@ -169,7 +169,7 @@ static void print_status_narrow(void) { // WPM counter End } -void oled_task_user(void) { +bool oled_task_user(void) { current_wpm = get_current_wpm(); if (is_keyboard_master()) { print_status_narrow(); @@ -178,6 +178,7 @@ void oled_task_user(void) { render_logo(); //print_status_narrow(); } + return false; } #endif diff --git a/keyboards/merge/um70/keymaps/via/keymap.c b/keyboards/merge/um70/keymaps/via/keymap.c index aaf682ffd1..f7255eacf2 100644 --- a/keyboards/merge/um70/keymaps/via/keymap.c +++ b/keyboards/merge/um70/keymaps/via/keymap.c @@ -173,7 +173,7 @@ static void print_status_narrow(void) { // WPM counter End } -void oled_task_user(void) { +bool oled_task_user(void) { current_wpm = get_current_wpm(); if (is_keyboard_master()) { print_status_narrow(); @@ -182,6 +182,7 @@ void oled_task_user(void) { render_logo(); //print_status_narrow(); } + return false; } #endif diff --git a/keyboards/miller/gm862/config.h b/keyboards/miller/gm862/config.h index e6e1b4c1df..7c4bfacd43 100644 --- a/keyboards/miller/gm862/config.h +++ b/keyboards/miller/gm862/config.h @@ -55,8 +55,6 @@ # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 62 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 62 #endif diff --git a/keyboards/miniaxe/miniaxe.h b/keyboards/miniaxe/miniaxe.h index b6a6051123..fc23865c36 100644 --- a/keyboards/miniaxe/miniaxe.h +++ b/keyboards/miniaxe/miniaxe.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MINIAXE_H -#define MINIAXE_H + +#pragma once #include "quantum.h" @@ -31,22 +31,19 @@ #define ___ KC_NO #define LAYOUT_split_3x5_3( \ - L01, L02, L03, L04, L05, R01, R02, R03, R04, R05, \ - L06, L07, L08, L09, L10, R06, R07, R08, R09, R10, \ - L11, L12, L13, L14, L15, R11, R12, R13, R14, R15, \ - L16, L17, L18, R16, R17, R18 \ - ) \ - { \ - { L01, L02, L03, L04, L05 }, \ - { L06, L07, L08, L09, L10 }, \ - { L11, L12, L13, L14, L15 }, \ - { L16, L17, L18, ___, ___ }, \ - { R01, R02, R03, R04, R05 }, \ - { R06, R07, R08, R09, R10 }, \ - { R11, R12, R13, R14, R15 }, \ - { R16, R17, R18, ___, ___ } \ - } - -#endif + L01, L02, L03, L04, L05, R01, R02, R03, R04, R05, \ + L06, L07, L08, L09, L10, R06, R07, R08, R09, R10, \ + L11, L12, L13, L14, L15, R11, R12, R13, R14, R15, \ + L16, L17, L18, R16, R17, R18 \ +) { \ + { L01, L02, L03, L04, L05 }, \ + { L06, L07, L08, L09, L10 }, \ + { L11, L12, L13, L14, L15 }, \ + { L16, L17, L18, ___, ___ }, \ + { R01, R02, R03, R04, R05 }, \ + { R06, R07, R08, R09, R10 }, \ + { R11, R12, R13, R14, R15 }, \ + { R16, R17, R18, ___, ___ } \ +} #define LAYOUT LAYOUT_split_3x5_3 diff --git a/keyboards/misonoworks/chocolatebar/chocolatebar.c b/keyboards/misonoworks/chocolatebar/chocolatebar.c index 448d955884..dc9a251df4 100644 --- a/keyboards/misonoworks/chocolatebar/chocolatebar.c +++ b/keyboards/misonoworks/chocolatebar/chocolatebar.c @@ -18,11 +18,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "chocolatebar.h" #ifdef OLED_ENABLE -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_270; // flips the display 180 degrees if offhand +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_270; } -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } static const char PROGMEM base_logo[] = {// 'choccy oled base', 32x128px 0xff, 0xff, 0xff, 0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x8f, 0xff, 0x7f, 0x1f, 0x0f, 0x0f, 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7f, 0x7f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7c, 0x38, 0x08, 0x04, 0x02, 0x03, 0xe3, 0x98, 0x08, 0x08, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x9e, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x01, 0x01, 0xff, 0x00, 0x00, 0x00, 0x61, 0x63, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x30, 0x20, 0x20, 0x30, 0x3f, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x3c, 0x30, 0x20, 0x20, 0x30, 0x3f, 0x3e, 0x7e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfc, 0xbc, 0x14, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x14, 0xbc, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x3f, 0x7f, 0x3b, 0x30, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x43, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x80, 0x80, 0xc3, 0xc3, 0xc2, 0xc2, 0xc2, 0xc3, 0xc2, 0xc0, 0xc0, 0xc2, 0xc3, 0xc2, 0xc2, 0xc2, 0x42, 0x43, 0xc0, 0x80, 0x80, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xbf, 0xdf, 0xef, 0x67, 0x9b, 0x9d, 0x6e, 0x75, 0xb3, 0xc5, 0xce, 0x57, 0xbb, 0xdc, 0xed, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -46,5 +49,6 @@ __attribute__((weak)) void oled_task_user(void) { default: oled_write_raw_P(base_logo, sizeof(base_logo)); } + return false; } #endif diff --git a/keyboards/mitosis/config.h b/keyboards/mitosis/config.h index 0e089269e8..94e84e680e 100644 --- a/keyboards/mitosis/config.h +++ b/keyboards/mitosis/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -66,5 +65,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ /* 8-bit data */ \ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); - -#endif diff --git a/keyboards/mitosis/mitosis.h b/keyboards/mitosis/mitosis.h index 80476e71c8..4b7d3a60c4 100644 --- a/keyboards/mitosis/mitosis.h +++ b/keyboards/mitosis/mitosis.h @@ -1,5 +1,4 @@ -#ifndef MITOSIS_H -#define MITOSIS_H +#pragma once #include "quantum.h" @@ -43,21 +42,21 @@ #define set_led_white PORTF |= (1<<LED_B) | (1<<LED_R) | (1<<LED_G) */ +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ - k31, k32, k33, k34, k35, k36, k37, k38, \ - k41, k42, k43, k44, k45, k46, k47, k48 \ -) \ - { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ - { KC_NO, k31, k32, k33, k34, k35, k36, k37, k38, KC_NO }, \ - { KC_NO, k41, k42, k43, k44, k45, k46, k47, k48, KC_NO } \ - } -#endif + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k31, k32, k33, k34, k35, k36, k37, k38, \ + k41, k42, k43, k44, k45, k46, k47, k48 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { XXX, k31, k32, k33, k34, k35, k36, k37, k38, XXX }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47, k48, XXX } \ +} diff --git a/keyboards/miuni32/config.h b/keyboards/miuni32/config.h index d2b98a9284..c25dfcaf99 100644 --- a/keyboards/miuni32/config.h +++ b/keyboards/miuni32/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -110,5 +109,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 - -#endif diff --git a/keyboards/miuni32/miuni32.h b/keyboards/miuni32/miuni32.h index ff74675450..c95a37e2e8 100644 --- a/keyboards/miuni32/miuni32.h +++ b/keyboards/miuni32/miuni32.h @@ -1,28 +1,27 @@ -#ifndef MIUNI32_H -#define MIUNI32_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ - K20, K21, K22, K23, K25, K26, K27, K28, K29, K2A \ - ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \ - { K20, K21, K22, K23, KC_NO, K25, K26, K27, K28, K29, K2A } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k25, k26, k27, k28, k29, k2A \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, XXX, k25, k26, k27, k28, k29, k2A } \ } #define LAYOUT_ortho_3x11( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ - ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A } \ } #define LAYOUT_all LAYOUT_ortho_3x11 - -#endif diff --git a/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c b/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c index 887bffeb82..207f907f6d 100644 --- a/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c +++ b/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c @@ -75,7 +75,7 @@ case _BASE: } #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR(""), false); @@ -107,6 +107,7 @@ void oled_task_user(void) { oled_write_P(led_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c b/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c index 1465372ec2..d49465eea9 100644 --- a/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c +++ b/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c @@ -84,7 +84,7 @@ case _DEL: } #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR(""), false); @@ -116,6 +116,7 @@ void oled_task_user(void) { oled_write_P(led_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/mschwingen/modelm/post_rules.mk b/keyboards/mschwingen/modelm/post_rules.mk new file mode 100644 index 0000000000..a1c2040f4c --- /dev/null +++ b/keyboards/mschwingen/modelm/post_rules.mk @@ -0,0 +1,3 @@ +ifeq ($(strip $(UART_DEBUG)), yes) + OPT_DEFS += -DUART_DEBUG +endif diff --git a/keyboards/mschwingen/modelm/rules.mk b/keyboards/mschwingen/modelm/rules.mk index 11282805cf..5e88410862 100644 --- a/keyboards/mschwingen/modelm/rules.mk +++ b/keyboards/mschwingen/modelm/rules.mk @@ -35,8 +35,4 @@ OPT_DEFS += -DSLEEP_LED_ENABLE # we need our own sleep callbacks to turn of WS28 LTO_ENABLE = yes -ifeq ($(strip $(UART_DEBUG)), yes) - OPT_DEFS += -DUART_DEBUG -endif - DEFAULT_FOLDER = mschwingen/modelm/led_wired diff --git a/keyboards/mt40/config.h b/keyboards/mt40/config.h index 84e1cb507c..a48d758e7f 100644 --- a/keyboards/mt40/config.h +++ b/keyboards/mt40/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -117,5 +116,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/mt40/mt40.h b/keyboards/mt40/mt40.h index c202d5f6c7..dc0de22b28 100644 --- a/keyboards/mt40/mt40.h +++ b/keyboards/mt40/mt40.h @@ -13,31 +13,30 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MT40_H -#define MT40_H + +#pragma once #include "quantum.h" +#define XXX KC_NO // This a shortcut to help you visually see your layout. // 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_planck_mit( \ - 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 \ + k40, k31, k32, k33, k34, k35, k52, k5C, k6C, k62, k3A, k4E, \ + k30, k21, k22, k23, k24, k25, k53, k5D, k6D, k63, k2A, k2B, \ + k10, k11, k12, k13, k14, k15, k54, k5E, k6E, k64, k1A, k66, \ + k20, k00, k01, k02, k04, k05, k0B, k56, k58, k57, k59 \ ) { \ - { K31, K32, K33, KC_NO, K34, K35, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K37, KC_NO, KC_NO, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, KC_NO, KC_NO, KC_NO, KC_NO, K2A, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K30, K11, K12, K13, K14, K15, KC_NO, KC_NO, KC_NO, KC_NO, K1A, K1B, KC_NO, KC_NO, KC_NO }, \ - { K10, K01, K02, K03, K04, K05, KC_NO, KC_NO, KC_NO, KC_NO, K0A, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K00, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0B }, \ - { KC_NO, KC_NO, K06, K16, K26, K35, K38, K3A, K39, K3B, KC_NO, KC_NO, K07, K17, K27 }, \ - { KC_NO, KC_NO, K09, K19, K29, KC_NO, K2B, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K08, K18, K28 } \ + { k00, k01, k02, XXX, k04, k05, XXX, XXX, XXX, XXX, XXX, k0B, XXX, XXX, XXX }, \ + { k10, k11, k12, k13, k14, k15, XXX, XXX, XXX, XXX, k1A, XXX, XXX, XXX, XXX }, \ + { k20, k21, k22, k23, k24, k25, XXX, XXX, XXX, XXX, k2A, k2B, XXX, XXX, XXX }, \ + { k30, k31, k32, k33, k34, k35, XXX, XXX, XXX, XXX, k3A, XXX, XXX, XXX, XXX }, \ + { k40, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k4E }, \ + { XXX, XXX, k52, k53, k54, k05, k56, k57, k58, k59, XXX, XXX, k5C, k5D, k5E }, \ + { XXX, XXX, k62, k63, k64, XXX, k66, XXX, XXX, XXX, XXX, XXX, k6C, k6D, k6E } \ } #define LAYOUT LAYOUT_planck_mit - -#endif diff --git a/keyboards/mt64rgb/config.h b/keyboards/mt64rgb/config.h index 8574d72360..810285d1e0 100644 --- a/keyboards/mt64rgb/config.h +++ b/keyboards/mt64rgb/config.h @@ -54,11 +54,9 @@ #define RGB_MATRIX_LED_PROCESS_LIMIT 20 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 64 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL 64 #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE diff --git a/keyboards/mxss/config.h b/keyboards/mxss/config.h index 8cb2156942..67f5b8fa27 100644 --- a/keyboards/mxss/config.h +++ b/keyboards/mxss/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -87,5 +86,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ //#define FORCE_NKRO - -#endif diff --git a/keyboards/mxss/rgblight.c b/keyboards/mxss/rgblight.c index d2d79815cd..b2df351c55 100644 --- a/keyboards/mxss/rgblight.c +++ b/keyboards/mxss/rgblight.c @@ -23,10 +23,6 @@ #ifdef EEPROM_ENABLE # include "eeprom.h" #endif -#ifdef STM32_EEPROM_ENABLE -# include <hal.h> -# include "eeprom_stm32.h" -#endif #include "wait.h" #include "progmem.h" #include "timer.h" diff --git a/keyboards/namecard2x4/namecard2x4.h b/keyboards/namecard2x4/namecard2x4.h index f2e27a0102..f3f6992703 100644 --- a/keyboards/namecard2x4/namecard2x4.h +++ b/keyboards/namecard2x4/namecard2x4.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NAMECARD2X4_H -#define NAMECARD2X4_H + +#pragma once #include "quantum.h" @@ -24,10 +24,8 @@ // The second converts the arguments into a two-dimensional array #define LAYOUT( \ k00, k01, k02, k03, \ - k10, k11, k12, k13 \ + k10, k11, k12, k13 \ ) { \ { k00, k01, k02, k03 }, \ - { k10, k11, k12, k13 }, \ + { k10, k11, k12, k13 } \ } - -#endif diff --git a/keyboards/nek_type_a/mcp23017.h b/keyboards/nek_type_a/mcp23017.h index 41c747beab..df1a305571 100644 --- a/keyboards/nek_type_a/mcp23017.h +++ b/keyboards/nek_type_a/mcp23017.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAP23017_H -#define MAP23017_H + +#pragma once #define EXPANDER_ADDR 0x27 #define I2C_TIMEOUT 200 // milliseconds @@ -67,5 +67,3 @@ void expander_init(void); void expander_select(uint8_t pin); void expander_unselect(uint8_t pin); void expander_unselect_all(void); - -#endif
\ No newline at end of file diff --git a/keyboards/nek_type_a/nek_type_a.h b/keyboards/nek_type_a/nek_type_a.h index 9bf6028cb9..78f019c0fd 100644 --- a/keyboards/nek_type_a/nek_type_a.h +++ b/keyboards/nek_type_a/nek_type_a.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NEK_TYPE_A_H -#define NEK_TYPE_A_H + +#pragma once #include "quantum.h" #include <stdint.h> @@ -39,20 +39,20 @@ extern bool i2c_initialized; void init_expander(void); +#define XXX KC_NO + #define LAYOUT( \ L12, L14, L15, L16, L17, R11, R12, R13, R14, R15, R16, R17, R18, R19, R1A, R1B, \ L21, L22, L23, L24, L25, L26, L27, R21, R22, R23, R24, R25, R26, R28, R29, R2A, R2B, \ L31, L32, L33, L34, L35, L36, R31, R32, R33, R34, R35, R36, R37, R38, R39, R3A, R3B, \ - L41, L42, L43, L44, L45, L46, R41, R42, R43, R44, R45, R46, R48, \ - L51, L52, L53, L54, L55, L56, R51, R52, R53, R54, R55, R58, R5A, \ - L61, L62, L63, L65, R61, R63, R65, R66, R68, R69, R6A, R6B \ -) \ -{ \ - { KC_NO, L12, KC_NO, L14, L15, L16, L17, R11, R12, R13, R14, R15, R16, R17, R18, R19, R1A, R1B }, \ - { L21, L22, L23, L24, L25, L26, L27, R21, R22, R23, R24, R25, R26, KC_NO, R28, R29, R2A, R2B }, \ - { L31, L32, L33, L34, L35, L36, KC_NO, R31, R32, R33, R34, R35, R36, R37, R38, R39, R3A, R3B }, \ - { L41, L42, L43, L44, L45, L46, KC_NO, R41, R42, R43, R44, R45, R46, KC_NO, R48, KC_NO, KC_NO, KC_NO }, \ - { L51, L52, L53, L54, L55, L56, KC_NO, R51, R52, R53, R54, R55, KC_NO, KC_NO, R58, KC_NO, R5A, KC_NO }, \ - { L61, L62, L63, KC_NO, L65, KC_NO, KC_NO, R61, KC_NO, R63, KC_NO, R65, R66, KC_NO, R68, R69, R6A, R6B }, \ + L41, L42, L43, L44, L45, L46, R41, R42, R43, R44, R45, R46, R48, \ + L51, L52, L53, L54, L55, L56, R51, R52, R53, R54, R55, R58, R5A, \ + L61, L62, L63, L65, R61, R63, R65, R66, R68, R69, R6A, R6B \ +) { \ + { XXX, L12, XXX, L14, L15, L16, L17, R11, R12, R13, R14, R15, R16, R17, R18, R19, R1A, R1B }, \ + { L21, L22, L23, L24, L25, L26, L27, R21, R22, R23, R24, R25, R26, XXX, R28, R29, R2A, R2B }, \ + { L31, L32, L33, L34, L35, L36, XXX, R31, R32, R33, R34, R35, R36, R37, R38, R39, R3A, R3B }, \ + { L41, L42, L43, L44, L45, L46, XXX, R41, R42, R43, R44, R45, R46, XXX, R48, XXX, XXX, XXX }, \ + { L51, L52, L53, L54, L55, L56, XXX, R51, R52, R53, R54, R55, XXX, XXX, R58, XXX, R5A, XXX }, \ + { L61, L62, L63, XXX, L65, XXX, XXX, R61, XXX, R63, XXX, R65, R66, XXX, R68, R69, R6A, R6B } \ } -#endif diff --git a/keyboards/nek_type_a/rules.mk b/keyboards/nek_type_a/rules.mk index 55baa97712..311f5a77e2 100644 --- a/keyboards/nek_type_a/rules.mk +++ b/keyboards/nek_type_a/rules.mk @@ -18,10 +18,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output CUSTOM_MATRIX = yes DEBUG_ENABLE = yes -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE SRC += matrix.c mcp23017.c diff --git a/keyboards/neson_design/n6/config.h b/keyboards/neson_design/n6/config.h index d3b49becb3..4a9d3c56c6 100644 --- a/keyboards/neson_design/n6/config.h +++ b/keyboards/neson_design/n6/config.h @@ -59,9 +59,8 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 -#define DRIVER_1_LED_TOTAL 32 #define DRIVER_ADDR_1 0b1110100 #define DRIVER_COUNT 1 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL) +#define DRIVER_LED_TOTAL 32 #define CAPS_PIN F5 diff --git a/keyboards/newgame40/newgame40.h b/keyboards/newgame40/newgame40.h index 6044f37657..e6146e4f14 100644 --- a/keyboards/newgame40/newgame40.h +++ b/keyboards/newgame40/newgame40.h @@ -1,19 +1,15 @@ -#ifndef NEWGAME40_H -#define NEWGAME40_H +#pragma once #include "quantum.h" #define LAYOUT_ortho_4x10( \ - k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, \ - k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, \ - k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, \ - k401, k402, k403, k404, k405, k406, k407, k408, k409, k410 \ -) \ -{ \ - {k101, k102, k103, k104, k105, k106, k107, k108, k109, k110}, \ - {k201, k202, k203, k204, k205, k206, k207, k208, k209, k210}, \ - {k301, k302, k303, k304, k305, k306, k307, k308, k309, k310}, \ - {k401, k402, k403, k404, k405, k406, k407, k408, k409, k410} \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 } \ } - -#endif diff --git a/keyboards/newgame40/post_rules.mk b/keyboards/newgame40/post_rules.mk new file mode 100644 index 0000000000..68229fe12b --- /dev/null +++ b/keyboards/newgame40/post_rules.mk @@ -0,0 +1,3 @@ +ifeq ($(strip $(IOS_DEVICE_ENABLE )), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif diff --git a/keyboards/newgame40/rules.mk b/keyboards/newgame40/rules.mk index 28039b7e57..12c3cef966 100644 --- a/keyboards/newgame40/rules.mk +++ b/keyboards/newgame40/rules.mk @@ -20,10 +20,6 @@ UNICODE_ENABLE = yes # Unicode RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. IOS_DEVICE_ENABLE = no # connect to IOS Device - ifeq ($(strip $(IOS_DEVICE_ENABLE )), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE - endif - # 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/noxary/x268/x268.h b/keyboards/noxary/x268/x268.h index 9961b7dfdb..d2f63dc919 100644 --- a/keyboards/noxary/x268/x268.h +++ b/keyboards/noxary/x268/x268.h @@ -13,23 +13,23 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef X268_H -#define X268_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, \ - K400, K401, K402, K406, K409, K410, K411, K412, K414, K415 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, k3F, \ + k40, k41, k42, k46, k49, k4A, k4B, k4C, k4E, k4F \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, K314, K315 }, \ - { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, K409, K410, K411, K412, KC_NO, K414, K415 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, XXX, k3E, k3F }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, k4A, k4B, k4C, XXX, k4E, k4F } \ } - -#endif diff --git a/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c b/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c index 14f79f5fbf..300af70737 100644 --- a/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c +++ b/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c @@ -83,8 +83,9 @@ static void render_logo(void) { oled_write_raw_P(nibble_logo, sizeof(nibble_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { render_logo(); + return false; } #endif diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c index 5c4e31ab6b..a4e484f9cf 100644 --- a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c +++ b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c @@ -155,7 +155,7 @@ static void render_anim(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); oled_set_cursor(0, 14); @@ -168,6 +168,8 @@ void oled_task_user(void) { wpm_counter[1] = '0'; wpm_counter[0] = '>'; oled_write_ln(wpm_counter, false); + + return false; } #endif diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c b/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c index 161eeedc3a..fa72a78905 100644 --- a/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c +++ b/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c @@ -51,11 +51,12 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(void) { if (timer_elapsed(oled_timer) >= 3000) { set_oled_mode(OLED_MODE_IDLE); } render_frame(); + return false; } #endif diff --git a/keyboards/nullbitsco/nibble/keymaps/snailmap/keymap.c b/keyboards/nullbitsco/nibble/keymaps/snailmap/keymap.c index d628a976fb..e549f22a83 100644 --- a/keyboards/nullbitsco/nibble/keymaps/snailmap/keymap.c +++ b/keyboards/nullbitsco/nibble/keymaps/snailmap/keymap.c @@ -106,73 +106,73 @@ static void write_pixel(int x, int y, bool onoff) { static void render_background(void) { if (oled_horizontal) { static const char PROGMEM oled_keymap_horizontal[] = { - 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, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x84, 0x80, 0x80, 0x80, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, - 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, - 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, - 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, - 0x80, 0x04, 0x04, 0x04, 0x04, 0x84, 0x84, 0x84, 0x84, 0x00, 0x00, 0x00, 0x00, 0x84, 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, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 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, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, - 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 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, 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, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x84, 0x80, 0x80, 0x80, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, + 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, + 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, + 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, + 0x80, 0x04, 0x04, 0x04, 0x04, 0x84, 0x84, 0x84, 0x84, 0x00, 0x00, 0x00, 0x00, 0x84, 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, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 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, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, + 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; oled_write_raw_P(oled_keymap_horizontal, sizeof(oled_keymap_horizontal)); } else { static const char PROGMEM oled_keymap_vertical[] = { - 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, - 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, - 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, - 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x10, 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, 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, 0x84, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, + 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, + 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, + 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x10, 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, 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(oled_keymap_vertical, sizeof(oled_keymap_vertical)); @@ -257,7 +257,7 @@ static void render_keymap(uint8_t key_row, uint8_t key_col, bool onoff) { int top = keymap_coords[key_row][key_col][1] + keymap_template[1]; int right = left + length - 1; int bottom = top + 4; - + // Special case 1 - Draw enter key on ISO layout, return if ((ansi_layout == false) && (key_row == 2) && (key_col == 14)) { for (int i = 0; i < 10; i++) { @@ -427,7 +427,7 @@ static void render_wpm_graph(int current_wpm) { } // Call OLED functions -void oled_task_user(void) { +bool oled_task_user(void) { // Draw OLED keyboard, prevent redraw if (first_loop) { render_background(); @@ -456,6 +456,7 @@ void oled_task_user(void) { render_wpm_graph(current_wpm); timer = timer_read(); } + return false; } #endif @@ -463,7 +464,7 @@ void oled_task_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Forwards keystrokes from an external input device over UART/TRRS process_record_remote_kb(keycode, record); - + #ifdef OLED_ENABLE // Toggle pixels surrounding key render_keymap(record->event.key.row, record->event.key.col, record->event.pressed); @@ -472,7 +473,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -// Rotary encoder - RGB and OLED settings +// Rotary encoder - RGB and OLED settings void change_RGB(bool clockwise) { // While on any layer except default: // Rotary = RGB Mode bool shift = get_mods() & MOD_MASK_SHIFT; // Rotary + Shift = OLED Brightness @@ -539,4 +540,4 @@ void matrix_init_user(void) { // Scan and parse keystrokes from remote keyboard, if connected void matrix_scan_user(void) { matrix_scan_remote_kb(); -}
\ No newline at end of file +} diff --git a/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c b/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c index 109da78ad6..b1c9282253 100644 --- a/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c +++ b/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c @@ -67,8 +67,9 @@ static void render_logo(void) { oled_write_raw_P(nullbits_logo, sizeof(nullbits_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { render_logo(); + return false; } #endif diff --git a/keyboards/numatreus/post_rules.mk b/keyboards/numatreus/post_rules.mk new file mode 100644 index 0000000000..1f49875d0f --- /dev/null +++ b/keyboards/numatreus/post_rules.mk @@ -0,0 +1,3 @@ +ifeq ($(strip $(LED_ANIMATIONS)), yes) + OPT_DEFS += -DLED_ANIMATIONS +endif diff --git a/keyboards/numatreus/rules.mk b/keyboards/numatreus/rules.mk index ce93d2ef34..8a1b3979f8 100644 --- a/keyboards/numatreus/rules.mk +++ b/keyboards/numatreus/rules.mk @@ -18,9 +18,5 @@ UNICODE_ENABLE = yes # Unicode RGBLIGHT_ENABLE = no LED_ANIMATIONS = no -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - # 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/ok60/config.h b/keyboards/ok60/config.h index aafed8a407..faccfcc646 100644 --- a/keyboards/ok60/config.h +++ b/keyboards/ok60/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -71,5 +70,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/ok60/ok60.h b/keyboards/ok60/ok60.h index d64f951c42..4e6aeb2c35 100644 --- a/keyboards/ok60/ok60.h +++ b/keyboards/ok60/ok60.h @@ -1,77 +1,75 @@ -#ifndef OK60_H -#define OK60_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT_60_ansi( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ - K400, K401, K402, K406, K410, K411, K412, K413 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO }, \ - { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \ - { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, XXX, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_60_ansi_split_bksp_rshift( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ - K400, K401, K402, K406, K410, K411, K412, K413 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO }, \ - { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ - { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_60_iso( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ - K400, K401, K402, K406, K410, K411, K412, K413 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, KC_NO }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \ - { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, XXX, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_60_iso_split_rshift( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ - K400, K401, K402, K406, K410, K411, K412, K413 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, KC_NO }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC314 }, \ - { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, XXX, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_60_hhkb( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ - K401, K402, K406, K411, K412 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k41, k42, k46, k4B, k4C \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO }, \ - { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ - { KC_NO, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, K412, KC_NO, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { XXX, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4B, k4C, XXX, XXX } \ } - - -#endif diff --git a/keyboards/omnikey_bh/config.h b/keyboards/omnikey_bh/config.h index 272424cf9e..7d170077a9 100644 --- a/keyboards/omnikey_bh/config.h +++ b/keyboards/omnikey_bh/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -46,5 +45,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/opendeck/32/rev1/config.h b/keyboards/opendeck/32/rev1/config.h index 8b25ab2564..9c7d4ddd9f 100644 --- a/keyboards/opendeck/32/rev1/config.h +++ b/keyboards/opendeck/32/rev1/config.h @@ -36,8 +36,7 @@ // RGB matrix #define DRIVER_ADDR_1 0b1110100 #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL (4 * 8 * 3) -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL) +#define DRIVER_LED_TOTAL (4 * 8 * 3) #define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_SPIRAL #define RGB_MATRIX_DISABLE_KEYCODES diff --git a/keyboards/org60/config.h b/keyboards/org60/config.h index 8189bc0960..42dbb83169 100644 --- a/keyboards/org60/config.h +++ b/keyboards/org60/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -72,5 +71,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LOCKING_RESYNC_ENABLE #define TAPPING_TERM 200 - -#endif diff --git a/keyboards/org60/org60.h b/keyboards/org60/org60.h index 8ee94179cb..34a41571f8 100644 --- a/keyboards/org60/org60.h +++ b/keyboards/org60/org60.h @@ -1,5 +1,4 @@ -#ifndef Org60_H -#define Org60_H +#pragma once #include "quantum.h" #include "led.h" @@ -19,33 +18,33 @@ inline void org60_bl_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); } inline void org60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } inline void org60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } +#define XXX KC_NO + /* Org60 Keymap Definition Macro */ #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K47, K3D, K3C, \ - K40, K41, K42, K45, K4A, K4B, K48, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k49, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k47, k3D, k3C, \ + k40, k41, k42, k45, k4A, k4B, k48, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { K40, K41, K42, KC_NO,KC_NO,K45, KC_NO,K47, K48, K49, K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, k47, k48, k49, k4A, k4B, k4C, k4D } \ } #define LAYOUT_60_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k41, k42, k45, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO,K2D }, \ - { K30, KC_NO,K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO,K3D }, \ - { K40, K41, K42, KC_NO,KC_NO,K45, KC_NO,KC_NO,KC_NO,KC_NO,K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4A, k4B, k4C, k4D } \ } - -#endif diff --git a/keyboards/owlab/voice65/hotswap/config.h b/keyboards/owlab/voice65/hotswap/config.h index fc894bd3ce..7a389264db 100644 --- a/keyboards/owlab/voice65/hotswap/config.h +++ b/keyboards/owlab/voice65/hotswap/config.h @@ -77,10 +77,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define RGB_MATRIX_STARTUP_VAL 128 # define DRIVER_ADDR_1 0b0110000 -# define DRIVER_ADDR_2 0b0110000 -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 67 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 67 #endif /* Encoder */ diff --git a/keyboards/owlab/voice65/soldered/config.h b/keyboards/owlab/voice65/soldered/config.h index e0e53a5d5d..9e5dc7bb18 100644 --- a/keyboards/owlab/voice65/soldered/config.h +++ b/keyboards/owlab/voice65/soldered/config.h @@ -76,10 +76,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define RGB_MATRIX_STARTUP_VAL 128 # define DRIVER_ADDR_1 0b0110000 -# define DRIVER_ADDR_2 0b0110000 -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 71 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 71 #endif /* Encoder */ diff --git a/keyboards/paladin64/paladin64.c b/keyboards/paladin64/paladin64.c deleted file mode 100755 index 5ef78d5bf7..0000000000 --- a/keyboards/paladin64/paladin64.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "paladin64.h" - diff --git a/keyboards/paladin64/paladin64.h b/keyboards/paladin64/paladin64.h deleted file mode 100755 index 9666b08988..0000000000 --- a/keyboards/paladin64/paladin64.h +++ /dev/null @@ -1,92 +0,0 @@ -#ifndef PALADIN64_H -#define PALADIN64_H - -#include "quantum.h" - -#define LAYOUT_all( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \ - K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ - K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ - K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \ - K30, K40, K50, K60, K70, K00, K10, K20 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, K22, K23, K24, K25, K26, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, K41, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { K70, K71, K72, K73, K74, K75, K76, K77 } \ -} - -#define LAYOUT_iso( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \ - K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ - K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ - K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \ - K30, K40, K50, K60, K70, K00, K20 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { KC_NO, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, K41, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { K70, K71, K72, K73, K74, K75, K76, K77 } \ -} - -#define LAYOUT_60_ansi( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \ - K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ - K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ - K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \ - K30, K40, K50, K60, K70, K00, K10, K20 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { K70, K71, K72, K73, K74, K75, K76, K77 } \ -} - -#define LAYOUT_infinity( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \ - K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ - K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ - K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \ - K30, K40, K50, K60, K70, K00, K10, K20 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, K22, K23, K24, K25, K26, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { K70, K71, K72, K73, K74, K75, K76, K77 } \ -} - -#define LAYOUT_aek_103( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \ - K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ - K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ - K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \ - K30, K40, K50, K60, K70, K00, K20 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { KC_NO, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { K70, K71, K72, K73, K74, K75, K76, K77 } \ -} - - -#endif diff --git a/keyboards/paladin64/readme.md b/keyboards/paladin64/readme.md deleted file mode 100644 index 8d62bb6b71..0000000000 --- a/keyboards/paladin64/readme.md +++ /dev/null @@ -1,19 +0,0 @@ -# Paladin64 ALPS PCB by /u/iNachie - -Firmware for the Paladin64 ALPS64 PCB, with underglow and an optional -trackpoint module. - -Keyboard Maintainer: [/u/iNachie](https://github.com/nachie) -Hardware Supported: Paladin64 ALPS PCB by iNachie -Hardware Availability: [/u/iNachie](https://www.reddit.com/user/inachie/) - -Make example for this keyboard (after setting up your build environment): - - make paladin64:default - -Or to make and flash: - - make paladin64:default:dfu - - -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/paladin64/rules.mk b/keyboards/paladin64/rules.mk deleted file mode 100755 index b25ab43119..0000000000 --- a/keyboards/paladin64/rules.mk +++ /dev/null @@ -1,24 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB 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 -AUDIO_ENABLE = no -RGBLIGHT_ENABLE = yes -#PS2_MOUSE_ENABLE = yes -#PS2_USE_USART = yes -#PS2_USE_INT = yes - -LAYOUTS = 60_ansi diff --git a/keyboards/palette1202/keymaps/default/keymap.c b/keyboards/palette1202/keymaps/default/keymap.c index fb28dedbe5..a1faa8558f 100644 --- a/keyboards/palette1202/keymaps/default/keymap.c +++ b/keyboards/palette1202/keymaps/default/keymap.c @@ -274,7 +274,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // OLED Display #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // get layer Number uint8_t currentDefault = get_highest_layer(default_layer_state); uint8_t currentLayer = get_highest_layer(layer_state); @@ -326,5 +326,6 @@ void oled_task_user(void) { // pressed key / 4th line of the logo render_row(3, " "); } + return false; } #endif // #ifdef OLED_ENABLE diff --git a/keyboards/palette1202/keymaps/key-check/keymap.c b/keyboards/palette1202/keymaps/key-check/keymap.c index 6291b5f8a0..00666007a2 100644 --- a/keyboards/palette1202/keymaps/key-check/keymap.c +++ b/keyboards/palette1202/keymaps/key-check/keymap.c @@ -142,10 +142,11 @@ bool encoder_update_user(uint8_t index, bool clockwise) { // OLED Display #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { render_row(0, "TEST"); render_row(1, "test"); render_row(2, "TEST"); render_row(3, "test"); + return false; } #endif // #ifdef OLED_ENABLE diff --git a/keyboards/palette1202/palette1202.c b/keyboards/palette1202/palette1202.c index be7fd6443a..a193964e3e 100644 --- a/keyboards/palette1202/palette1202.c +++ b/keyboards/palette1202/palette1202.c @@ -17,7 +17,7 @@ // initialize OLED if OLED is enabled #ifdef OLED_ENABLE - oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; - } +} #endif diff --git a/keyboards/percent/canoe/config.h b/keyboards/percent/canoe/config.h index c349c1106c..56793bab41 100644 --- a/keyboards/percent/canoe/config.h +++ b/keyboards/percent/canoe/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CANOE_CONFIG_H -#define CANOE_CONFIG_H +#pragma once #include "config_common.h" @@ -44,5 +43,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define BACKLIGHT_LEVELS 3 #define RGBLIGHT_ANIMATIONS - -#endif diff --git a/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc b/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc index df0a0b15c2..94ff62b3a8 100644 --- a/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc +++ b/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc @@ -25,13 +25,13 @@ static bool indicator_static(effect_params_t* params) { HSV hsv = rgb_matrix_config.hsv; RGB rgb = hsv_to_rgb(hsv); RGB_MATRIX_USE_LIMITS(led_min, led_max); - for (uint8_t i = led_min ; i < 74; i++) { + for (uint8_t i = led_min; i < 74; i++) { rgb_matrix_set_color(i, 0x00, 0x00, 0x00); } - for (uint8_t i = 74 ; i < led_max; i++) { + for (uint8_t i = 74; i < led_max; i++) { rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } bool effect_runner_indicator(effect_params_t* params, i_f effect_func) { @@ -47,7 +47,7 @@ bool effect_runner_indicator(effect_params_t* params, i_f effect_func) { rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } static HSV indicator_gradient_math(HSV hsv, uint8_t i, uint8_t time) { @@ -64,4 +64,4 @@ static HSV indicator_cycle_all_math(HSV hsv, uint8_t i, uint8_t time) { bool indicator_cycle_all(effect_params_t* params) { return effect_runner_indicator(params, &indicator_cycle_all_math); } -#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/keyboards/pinky/pinky.h b/keyboards/pinky/pinky.h index 9cc5d8d589..67dfbe3370 100644 --- a/keyboards/pinky/pinky.h +++ b/keyboards/pinky/pinky.h @@ -13,17 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PINKY_H -#define PINKY_H -#include "quantum.h" - -#ifdef KEYBOARD_pinky_3 - #include "3.h" -#endif +#pragma once -#ifdef KEYBOARD_pinky_4 - #include "4.h" -#endif +#include "quantum.h" +#if defined(KEYBOARD_pinky_3) +# include "3.h" +#elif defined(KEYBOARD_pinky_4) +# include "4.h" #endif diff --git a/keyboards/pistachio_pro/keymaps/default/keymap.c b/keyboards/pistachio_pro/keymaps/default/keymap.c index a79b9a2b52..3fe6e8a5f5 100644 --- a/keyboards/pistachio_pro/keymaps/default/keymap.c +++ b/keyboards/pistachio_pro/keymaps/default/keymap.c @@ -83,12 +83,12 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_ln_P(PSTR(" - PistachioPro -"), false); print_airstate(); print_keylog(); - return; + return false; } /* Encoder */ @@ -120,4 +120,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; -}
\ No newline at end of file +} diff --git a/keyboards/pistachio_pro/keymaps/rate/keymap.c b/keyboards/pistachio_pro/keymaps/rate/keymap.c index e08e167700..7aa70c51d1 100644 --- a/keyboards/pistachio_pro/keymaps/rate/keymap.c +++ b/keyboards/pistachio_pro/keymaps/rate/keymap.c @@ -85,12 +85,12 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_ln_P(PSTR(" - PistachioPro -"), false); print_airstate(); print_keylog(); - return; + return false; } /* Encoder */ @@ -122,4 +122,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; -}
\ No newline at end of file +} diff --git a/keyboards/pistachio_pro/keymaps/via/keymap.c b/keyboards/pistachio_pro/keymaps/via/keymap.c index 833bbb8ecc..7517b4a6e4 100644 --- a/keyboards/pistachio_pro/keymaps/via/keymap.c +++ b/keyboards/pistachio_pro/keymaps/via/keymap.c @@ -101,12 +101,12 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_ln_P(PSTR(" - PistachioPro -"), false); print_airstate(); print_keylog(); - return; + return false; } /* Encoder */ @@ -138,4 +138,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; -}
\ No newline at end of file +} diff --git a/keyboards/pistachio_pro/keymaps/via/rules.mk b/keyboards/pistachio_pro/keymaps/via/rules.mk index 036bd6d1c3..36b7ba9cbc 100644 --- a/keyboards/pistachio_pro/keymaps/via/rules.mk +++ b/keyboards/pistachio_pro/keymaps/via/rules.mk @@ -1 +1,2 @@ -VIA_ENABLE = yes
\ No newline at end of file +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/pizzakeyboards/pizza65/info.json b/keyboards/pizzakeyboards/pizza65/info.json index 66c8e7512f..0cd80f3f97 100644 --- a/keyboards/pizzakeyboards/pizza65/info.json +++ b/keyboards/pizzakeyboards/pizza65/info.json @@ -264,7 +264,6 @@ {"label": "r2_11", "x": 10.5, "y": 1}, {"label": "r2_12", "x": 11.5, "y": 1}, {"label": "r2_13", "x": 12.5, "y": 1}, - {"label": "r2_14", "x": 13.5, "y": 1}, {"label": "r2_15", "x": 15, "y": 1}, {"label": "r3_01", "x": 0, "y": 2, "w": 1.75}, diff --git a/keyboards/planck/config.h b/keyboards/planck/config.h index 71111eca21..a86359327a 100644 --- a/keyboards/planck/config.h +++ b/keyboards/planck/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -78,5 +77,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h index 4d1f1e92fe..504ab812e1 100644 --- a/keyboards/planck/ez/config.h +++ b/keyboards/planck/ez/config.h @@ -120,11 +120,9 @@ //#define WS2812_EXTERNAL_PULLUP #define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 47 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 47 #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS diff --git a/keyboards/planck/keymaps/aviator/config.h b/keyboards/planck/keymaps/aviator/config.h index b2b3104501..c0060de141 100644 --- a/keyboards/planck/keymaps/aviator/config.h +++ b/keyboards/planck/keymaps/aviator/config.h @@ -1,9 +1,8 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #include "config_common.h" -#ifndef LIGHT_CONFIG_H +#ifndef KEYBOARD_planck_light #define BACKLIGHT_BREATHING #define BREATHING_PERIOD 3 #endif @@ -40,5 +39,3 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 - -#endif diff --git a/keyboards/planck/keymaps/cbbrowne/config.h b/keyboards/planck/keymaps/cbbrowne/config.h index 4ec7d081ba..87953c339e 100644 --- a/keyboards/planck/keymaps/cbbrowne/config.h +++ b/keyboards/planck/keymaps/cbbrowne/config.h @@ -14,8 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #ifndef NO_DEBUG #define NO_DEBUG @@ -28,7 +27,7 @@ #define LEADER_TIMEOUT 300 -#ifndef LIGHT_CONFIG_H +#ifndef KEYBOARD_planck_light #define BACKLIGHT_BREATHING #endif @@ -42,6 +41,3 @@ * borrowed from basic keymap */ #define _____ KC_NO - -#endif - diff --git a/keyboards/planck/keymaps/khord/config.h b/keyboards/planck/keymaps/khord/config.h index 055d741c62..819cef60c6 100644 --- a/keyboards/planck/keymaps/khord/config.h +++ b/keyboards/planck/keymaps/khord/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #include "config_common.h" @@ -12,7 +11,7 @@ } #endif -#ifndef LIGHT_CONFIG_H +#ifndef KEYBOARD_planck_light #define BACKLIGHT_BREATHING #endif #define TAPPING_TERM 150 @@ -39,5 +38,3 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 - -#endif diff --git a/keyboards/planck/keymaps/pvc/config.h b/keyboards/planck/keymaps/pvc/config.h index fc7211fe6a..0fb08540d4 100644 --- a/keyboards/planck/keymaps/pvc/config.h +++ b/keyboards/planck/keymaps/pvc/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #include "config_common.h" @@ -25,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 12 /* Planck PCB default pin-out */ -#ifndef LIGHT_CONFIG_H +#ifndef KEYBOARD_planck_light #define MATRIX_ROW_PINS { D0, D5, B5, B6 } #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } #define UNUSED_PINS @@ -68,7 +67,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Only print user print statements */ #define USER_PRINT -#ifndef LIGHT_CONFIG_H +#ifndef KEYBOARD_planck_light #define BACKLIGHT_BREATHING #endif @@ -78,4 +77,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#endif diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c index 60bbc758d7..0baa24bdb7 100644 --- a/keyboards/planck/keymaps/yale/keymap.c +++ b/keyboards/planck/keymaps/yale/keymap.c @@ -68,9 +68,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_NAV] = LAYOUT_planck_grid( - KC_MS_ACCEL2, KC_FN1, KC_FN2, KC_FN3, KC_FN4, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX, + KC_MS_ACCEL2, KC_NO, KC_NO, KC_NO, KC_NO, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_ACCEL1, KC_MS_BTN4, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1, XXXXXXX, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, XXXXXXX, XXXXXXX, - KC_MS_ACCEL0, KC_FN9, KC_FN10, KC_FN11, KC_FN12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_MS_ACCEL0, KC_NO, KC_NO, KC_NO, KC_NO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), diff --git a/keyboards/planck/keymaps/zrichard/config.h b/keyboards/planck/keymaps/zrichard/config.h index fb7ebb9885..d12c19065c 100755 --- a/keyboards/planck/keymaps/zrichard/config.h +++ b/keyboards/planck/keymaps/zrichard/config.h @@ -15,18 +15,16 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #include "config_common.h" - /* key matrix size */ #define MATRIX_ROWS 4 #define MATRIX_COLS 12 /* Planck PCB default pin-out */ -#ifndef LIGHT_CONFIG_H +#ifndef KEYBOARD_planck_light #define MATRIX_ROW_PINS { D0, D5, B5, B6 } #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } #define UNUSED_PINS @@ -63,7 +61,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Only print user print statements */ #define USER_PRINT -#ifndef LIGHT_CONFIG_H +#ifndef KEYBOARD_planck_light #define BACKLIGHT_BREATHING #endif @@ -73,5 +71,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/planck/light/config.h b/keyboards/planck/light/config.h index ccf9f09843..8c55c3432f 100644 --- a/keyboards/planck/light/config.h +++ b/keyboards/planck/light/config.h @@ -1,5 +1,4 @@ -#ifndef LIGHT_CONFIG_H -#define LIGHT_CONFIG_H +#pragma once #include "config_common.h" @@ -39,6 +38,3 @@ #define DRIVER_1_LED_TOTAL 25 #define DRIVER_2_LED_TOTAL 24 #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) - - -#endif diff --git a/keyboards/planck/light/light.h b/keyboards/planck/light/light.h index f014c50171..623ffa707d 100644 --- a/keyboards/planck/light/light.h +++ b/keyboards/planck/light/light.h @@ -14,40 +14,35 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef LIGHT_H -#define LIGHT_H +#pragma once #include "planck.h" #include "rgb_matrix.h" #define 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 \ -) \ -{ \ - { 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, k35, k37, k38, k39, k3a, k3b } \ + 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 \ +) { \ + { 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, k35, k37, k38, k39, k3A, k3B } \ } #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, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { 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, k36, k37, k38, k39, k3a, k3b } \ + 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, k36, k37, k38, k39, k3A, k3B \ +) { \ + { 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, k36, k37, k38, k39, k3A, k3B } \ } #define LAYOUT LAYOUT_ortho_4x12 #define LAYOUT_planck_mit LAYOUT_planck_1x2uC #define LAYOUT_planck_grid LAYOUT_ortho_4x12 - -#endif diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h index bae075de10..aa70d46a8e 100644 --- a/keyboards/planck/rev6/config.h +++ b/keyboards/planck/rev6/config.h @@ -15,8 +15,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef REV6_CONFIG_H -#define REV6_CONFIG_H +#pragma once /* USB Device descriptor parameter */ #define PRODUCT_ID 0xA4F9 @@ -121,5 +120,3 @@ #define WS2812_DMA_CHANNEL 2 #define RGB_DISABLE_WHEN_USB_SUSPENDED - -#endif diff --git a/keyboards/planck/rev6/rev6.h b/keyboards/planck/rev6/rev6.h index 9fd51e70fe..9bf3603ed7 100644 --- a/keyboards/planck/rev6/rev6.h +++ b/keyboards/planck/rev6/rev6.h @@ -13,99 +13,92 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef REV6_H -#define REV6_H +#pragma once #include "planck.h" +#define XXX KC_NO + #define 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, 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, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, k34, KC_NO } \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k73, k74, k70, k71, k72, k33, k34, k35 \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { k70, k71, k72, k73, k74, XXX } \ } #define LAYOUT_planck_1x2uR( \ - 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 \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { KC_NO, k37, k38, k33, k34, k35 } \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k73, k74, k75, k71, k72, k33, k34, k35 \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { XXX, k71, k72, k73, k74, k75 } \ } #define LAYOUT_planck_1x2uL( \ - 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, 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, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, KC_NO, k35 } \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k73, k75, k70, k71, k72, k33, k34, k35 \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { k70, k71, k72, k73, XXX, k75 } \ } #define LAYOUT_planck_2x2u( \ - 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, k35, 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, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { KC_NO, k37, k38, k33, KC_NO, k35 } \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k73, k75, k71, k72, k33, k34, k35 \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { XXX, k71, k72, k73, XXX, k75 } \ } #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, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k73, k74, k75, k70, k71, k72, k33, k34, k35 \ +) { \ { k00, k01, k02, k03, k04, k05 }, \ { k10, k11, k12, k13, k14, k15 }, \ { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, k34, k35 } \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { k70, k71, k72, k73, k74, k75 } \ } - #define LAYOUT LAYOUT_ortho_4x12 #define LAYOUT_planck_mit LAYOUT_planck_1x2uC #define LAYOUT_planck_grid LAYOUT_ortho_4x12 - -#endif diff --git a/keyboards/playkbtw/pk60/config.h b/keyboards/playkbtw/pk60/config.h index 6084f34197..0a6ee47d44 100644 --- a/keyboards/playkbtw/pk60/config.h +++ b/keyboards/playkbtw/pk60/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -48,5 +47,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/playkbtw/pk60/pk60.h b/keyboards/playkbtw/pk60/pk60.h index 4a7a8f3bf0..c92057c0a6 100644 --- a/keyboards/playkbtw/pk60/pk60.h +++ b/keyboards/playkbtw/pk60/pk60.h @@ -1,90 +1,89 @@ -#ifndef pk60_H -#define pk60_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT_60_ansi_split_bs_rshift( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ - K40, K41, K42, K47, K49, K4A, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k40, k41, k42, k47, k49, k4A, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, KC_NO, K4C, K4D, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, XXX, XXX, k47, XXX, k49, k4A, XXX, k4C, k4D, XXX } \ } #define LAYOUT_iso( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ - K40, K41, K42, K47, K49, K4A, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k40, k41, k42, k47, k49, k4A, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, KC_NO, K4C, K4D, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, XXX, XXX, k47, XXX, k49, k4A, XXX, k4C, k4D, XXX } \ } #define LAYOUT_225u_arrow( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ - K40, K41, K42, K47, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k40, k41, k42, k47, k49, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, K4B, K4C, K4D, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, XXX, XXX, k47, XXX, k49, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_2u_arrow( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K47, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k47, k49, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, K4B, K4C, K4D, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, XXX, XXX, k47, XXX, k49, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_minila( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K43, K47, K48, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k47, k48, k49, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, XXX, XXX, XXX, k47, k48, k49, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K43, K47, K48, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k47, k48, k49, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, XXX, XXX, XXX, k47, k48, k49, k4A, k4B, k4C, k4D, XXX } \ } - -#endif
\ No newline at end of file diff --git a/keyboards/plut0nium/0x3e/keymaps/default/keymap.c b/keyboards/plut0nium/0x3e/keymaps/default/keymap.c index ed2c464e46..8f1a1d1960 100644 --- a/keyboards/plut0nium/0x3e/keymaps/default/keymap.c +++ b/keyboards/plut0nium/0x3e/keymaps/default/keymap.c @@ -24,15 +24,15 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [_QWERTY] = LAYOUT( - 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_BSLS, - MO(_FN), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LGUI, KC_MENU, KC_LALT, KC_SPC, KC_SPC, KC_PGDN, KC_SPC, KC_SPC, KC_RALT, KC_LBRC, KC_RBRC, KC_RCTL + 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_BSLS, + MO(_FN), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_MENU, KC_LALT, KC_SPC, KC_SPC, KC_PGDN, KC_SPC, KC_SPC, KC_RALT, KC_LBRC, KC_RBRC, KC_RCTL ), [_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_DEL, - RESET, _______, KC_UP, _______, _______, _______, _______, _______, _______, KC_F11, KC_F12, _______, + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + RESET, _______, KC_UP, _______, _______, _______, _______, _______, _______, KC_F11, KC_F12, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, _______, KC_END, _______, _______, BL_INC, KC_MPLY, KC_VOLU, KC_MUTE, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_TOG, RGB_TOG, KC_HOME, BL_TOGG, BL_TOGG, BL_DEC, KC_MPRV, KC_VOLD, KC_MNXT @@ -43,11 +43,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { static void render_logo(void) { static const char PROGMEM my_logo[] = { // '0x3E_logo_32x16', 32x16px - 0xff, 0x0f, 0x07, 0xf3, 0x73, 0xb3, 0x07, 0x0f, 0xff, 0x3f, 0x3f, 0xff, 0xff, 0x3f, 0x3f, 0xff, - 0xe7, 0xe3, 0x33, 0x33, 0x03, 0x87, 0xff, 0xff, 0x03, 0x03, 0x33, 0x33, 0x33, 0xf3, 0xff, 0xff, - 0x7f, 0x78, 0x70, 0x66, 0x67, 0x67, 0x70, 0x78, 0x7f, 0x67, 0x62, 0x78, 0x78, 0x62, 0x67, 0x7f, + 0xff, 0x0f, 0x07, 0xf3, 0x73, 0xb3, 0x07, 0x0f, 0xff, 0x3f, 0x3f, 0xff, 0xff, 0x3f, 0x3f, 0xff, + 0xe7, 0xe3, 0x33, 0x33, 0x03, 0x87, 0xff, 0xff, 0x03, 0x03, 0x33, 0x33, 0x33, 0xf3, 0xff, 0xff, + 0x7f, 0x78, 0x70, 0x66, 0x67, 0x67, 0x70, 0x78, 0x7f, 0x67, 0x62, 0x78, 0x78, 0x62, 0x67, 0x7f, 0x73, 0x63, 0x67, 0x67, 0x60, 0x70, 0x7f, 0x7f, 0x60, 0x60, 0x67, 0x67, 0x67, 0x67, 0x7f, 0x7f - }; + }; oled_write_raw_P(my_logo, sizeof(my_logo)); } @@ -117,7 +117,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; // flips the display 180 degrees if offhand } -void oled_task_user(void) { +bool oled_task_user(void) { render_logo(); oled_set_cursor(0,2); // default logo is 16px high (2 lines) @@ -153,5 +153,6 @@ void oled_task_user(void) { render_rgb_status(); #endif + return false; } #endif diff --git a/keyboards/preonic/config.h b/keyboards/preonic/config.h index dfd0a8439a..8f72de9094 100644 --- a/keyboards/preonic/config.h +++ b/keyboards/preonic/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -78,5 +77,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/preonic/keymaps/badger/keymap.c b/keyboards/preonic/keymaps/badger/keymap.c index 495cf28c45..761beb861f 100644 --- a/keyboards/preonic/keymaps/badger/keymap.c +++ b/keyboards/preonic/keymaps/badger/keymap.c @@ -14,7 +14,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ // if not REV3, just compile the default keymaps -#ifndef REV3_CONFIG_H +#ifndef KEYBOARD_preonic_rev3 #include "../default/keymap.c" #else diff --git a/keyboards/preonic/rev1/config.h b/keyboards/preonic/rev1/config.h index 76b6465909..a1091b10ed 100644 --- a/keyboards/preonic/rev1/config.h +++ b/keyboards/preonic/rev1/config.h @@ -15,12 +15,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#pragma once #include "config_common.h" #define DEVICE_VER 0x0001 #define PRODUCT_ID 0x67F3 - -#endif
\ No newline at end of file diff --git a/keyboards/preonic/rev2/config.h b/keyboards/preonic/rev2/config.h index 29fc091848..a62fed4850 100644 --- a/keyboards/preonic/rev2/config.h +++ b/keyboards/preonic/rev2/config.h @@ -15,12 +15,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef REV2_CONFIG_H -#define REV2_CONFIG_H +#pragma once #include "config_common.h" #define DEVICE_VER 0x0002 #define PRODUCT_ID 0x67F3 - -#endif
\ No newline at end of file diff --git a/keyboards/preonic/rev3/config.h b/keyboards/preonic/rev3/config.h index 420e7e5413..f2c4b3c3d8 100644 --- a/keyboards/preonic/rev3/config.h +++ b/keyboards/preonic/rev3/config.h @@ -15,8 +15,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef REV3_CONFIG_H -#define REV3_CONFIG_H +#pragma once /* USB Device descriptor parameter */ #define DEVICE_VER 0x0003 @@ -107,5 +106,3 @@ #define WS2812_PWM_PAL_MODE 1 #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 #define WS2812_DMA_CHANNEL 2 - -#endif diff --git a/keyboards/primekb/prime_o/prime_o.h b/keyboards/primekb/prime_o/prime_o.h index 99a8054522..fec3392b31 100644 --- a/keyboards/primekb/prime_o/prime_o.h +++ b/keyboards/primekb/prime_o/prime_o.h @@ -13,28 +13,26 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PRIME_O_H -#define PRIME_O_H + +#pragma once #include "quantum.h" #define LAYOUT( \ - K001, K008, K013, K018, K023, K029, K035, K041, K046, K052, K058, K064, K071, K076, K081, K086, \ - K002, K009, K014, K019, K024, K030, K036, K042, K047, K053, K059, K065, K072, K077, K082, K087, \ - K004, K010, K015, K020, K025, K031, K037, K043, K048, K054, K060, K066, K073, K078, K083, K089, \ - K005, K011, K016, K021, K026, K032, K038, K044, K049, K055, K061, K067, K074, K079, K084, K090, \ - K007, K012, K017, K022, K028, K034, K040, K045, K051, K057, K063, K069, K075, K080, K085, K092 \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, \ + k30, k60, k31, k61, k32, k62, k33, k63, k34, k64, k35, k65, k36, k66, k37, k67, \ + k20, k70, k21, k71, k22, k72, k23, k73, k24, k74, k25, k75, k26, k76, k27, k77, \ + k10, k80, k11, k81, k12, k82, k13, k83, k14, k84, k15, k85, k16, k86, k17, k87, \ + k00, k90, k01, k91, k02, k92, k03, k93, k04, k94, k05, k95, k06, k96, k07, k97 \ ) { \ - { K007, K017, K028, K040, K051, K063, K075, K085 }, \ - { K005, K016, K026, K038, K049, K061, K074, K084 }, \ - { K004, K015, K025, K037, K048, K060, K073, K083 }, \ - { K002, K014, K024, K036, K047, K059, K072, K082 }, \ - { K001, K013, K023, K035, K046, K058, K071, K081 }, \ - { K008, K018, K029, K041, K052, K064, K076, K086 }, \ - { K009, K019, K030, K042, K053, K065, K077, K087 }, \ - { K010, K020, K031, K043, K054, K066, K078, K089 }, \ - { K011, K021, K032, K044, K055, K067, K079, K090 }, \ - { K012, K022, K034, K045, K057, K069, K080, K092 } \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 }, \ + { k80, k81, k82, k83, k84, k85, k86, k87 }, \ + { k90, k91, k92, k93, k94, k95, k96, k97 } \ } - -#endif diff --git a/keyboards/primekb/prime_r/config.h b/keyboards/primekb/prime_r/config.h index abf559d8aa..b73eb346a7 100644 --- a/keyboards/primekb/prime_r/config.h +++ b/keyboards/primekb/prime_r/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -61,5 +60,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/primekb/prime_r/prime_r.h b/keyboards/primekb/prime_r/prime_r.h index 8295fc336c..905b5c8cf8 100644 --- a/keyboards/primekb/prime_r/prime_r.h +++ b/keyboards/primekb/prime_r/prime_r.h @@ -13,23 +13,23 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PRIMER_H -#define PRIMER_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K212, K213, K214, K215, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, \ - K400, K402, K403, K404, K405, K407, K409, K410, K411, K412, K413, K414, K415 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2C, k2D, k2E, k2F, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, \ + k40, k42, k43, k44, k45, k47, k49, k4A, k4B, k4C, k4D, k4E, k4F \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, KC_NO, K212, K213, K214, K215 }, \ - { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315 }, \ - { K400, KC_NO, K402, K403, K404, K405, KC_NO, K407, KC_NO, K409, K410, K411, K412, K413, K414, K415 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, XXX, k2C, k2D, k2E, k2F }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, XXX, k42, k43, k44, k45, XXX, k47, XXX, k49, k4A, k4B, k4C, k4D, k4E, k4F } \ } - -#endif
\ No newline at end of file diff --git a/keyboards/projectcain/vault45/info.json b/keyboards/projectcain/vault45/info.json index de2f299b64..6f272e3bba 100644 --- a/keyboards/projectcain/vault45/info.json +++ b/keyboards/projectcain/vault45/info.json @@ -1,7 +1,7 @@ { - "keyboard_name": "Vault 45", - "url": "", - "maintainer": "projectcain", + "keyboard_name": "Vault 45", + "url": "", + "maintainer": "projectcain", "layout_aliases": { "LAYOUT": "LAYOUT_all" }, diff --git a/keyboards/pteron36/keymaps/via/keymap.c b/keyboards/pteron36/keymaps/via/keymap.c index ce96ea6c59..40e3088a8e 100644 --- a/keyboards/pteron36/keymaps/via/keymap.c +++ b/keyboards/pteron36/keymaps/via/keymap.c @@ -1,19 +1,19 @@ /* Copyright HarshitGoel96 2020 * With permission from mattdibi, the original maintainer of the Redox hardware. - * - * 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/>. + */ #include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -131,12 +131,13 @@ static void render_status(void){ oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_logo(); // Renders a static logo oled_scroll_left(); // Turns on scrolling } + return false; } #endif diff --git a/keyboards/pteron36/pteron36.c b/keyboards/pteron36/pteron36.c index 3288626f00..b7f7d8d44d 100644 --- a/keyboards/pteron36/pteron36.c +++ b/keyboards/pteron36/pteron36.c @@ -37,7 +37,10 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { } //common oled support. #ifdef OLED_DRIVER_ENABLE -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } if (is_keyboard_master()) { oled_write_P(PSTR("Layer: "), false); switch (get_highest_layer(layer_state)) { @@ -62,5 +65,6 @@ __attribute__((weak)) void oled_task_user(void) { oled_write_P(qmk_logo, false); oled_scroll_left(); // Turns on scrolling } + return false; } #endif diff --git a/keyboards/puck/puck.h b/keyboards/puck/puck.h index 0f2a284a67..31fff79555 100644 --- a/keyboards/puck/puck.h +++ b/keyboards/puck/puck.h @@ -1,18 +1,15 @@ -#ifndef PUCK_H -#define PUCK_H +#pragma once #include "quantum.h" #define LAYOUT( \ - K00, K01, K02, \ - K03, K04, K05, \ - K06, K07, K08, \ - K09, K0A, K0B \ + k00, k01, k02, \ + k10, k11, k12, \ + k20, k21, k22, \ + k30, k31, k32 \ ) { \ - { K00, K01, K02 }, \ - { K03, K04, K05 }, \ - { K06, K07, K08 }, \ - { K09, K0A, K0B }, \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ + { k20, k21, k22 }, \ + { k30, k31, k32 } \ } - -#endif diff --git a/keyboards/rainkeeb/keymaps/default/keymap.c b/keyboards/rainkeeb/keymaps/default/keymap.c index 3d82661f8c..08cf7462c3 100644 --- a/keyboards/rainkeeb/keymaps/default/keymap.c +++ b/keyboards/rainkeeb/keymaps/default/keymap.c @@ -87,7 +87,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { char wpm[10]; -void oled_task_user(void) { +bool oled_task_user(void) { sprintf(wpm, "WPM: %03d", get_current_wpm()); // Host Keyboard Layer Status @@ -113,4 +113,5 @@ void oled_task_user(void) { } oled_write_P(PSTR(" "), false); oled_write(wpm, false); + return false; } diff --git a/keyboards/rainkeeb/keymaps/via/keymap.c b/keyboards/rainkeeb/keymaps/via/keymap.c index 3d82661f8c..08cf7462c3 100644 --- a/keyboards/rainkeeb/keymaps/via/keymap.c +++ b/keyboards/rainkeeb/keymaps/via/keymap.c @@ -87,7 +87,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { char wpm[10]; -void oled_task_user(void) { +bool oled_task_user(void) { sprintf(wpm, "WPM: %03d", get_current_wpm()); // Host Keyboard Layer Status @@ -113,4 +113,5 @@ void oled_task_user(void) { } oled_write_P(PSTR(" "), false); oled_write(wpm, false); + return false; } diff --git a/keyboards/ramonimbao/herringbone/pro/keymaps/default/keymap.c b/keyboards/ramonimbao/herringbone/pro/keymaps/default/keymap.c index ac3c11e699..a04192a3e4 100644 --- a/keyboards/ramonimbao/herringbone/pro/keymaps/default/keymap.c +++ b/keyboards/ramonimbao/herringbone/pro/keymaps/default/keymap.c @@ -80,7 +80,7 @@ static void render_pattern(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { // Render Herringbone pattern render_pattern(); oled_render(); @@ -94,5 +94,6 @@ void oled_task_user(void) { oled_set_cursor(0, 2); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); oled_render(); + return false; } #endif diff --git a/keyboards/ramonimbao/herringbone/pro/keymaps/iso/keymap.c b/keyboards/ramonimbao/herringbone/pro/keymaps/iso/keymap.c index 3409fbc16e..6d280905dc 100644 --- a/keyboards/ramonimbao/herringbone/pro/keymaps/iso/keymap.c +++ b/keyboards/ramonimbao/herringbone/pro/keymaps/iso/keymap.c @@ -80,7 +80,7 @@ static void render_pattern(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { // Render Herringbone pattern render_pattern(); oled_render(); @@ -94,5 +94,6 @@ void oled_task_user(void) { oled_set_cursor(0, 2); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); oled_render(); + return false; } #endif diff --git a/keyboards/ramonimbao/herringbone/pro/keymaps/via/keymap.c b/keyboards/ramonimbao/herringbone/pro/keymaps/via/keymap.c index 5c97a3fb83..fceca1a8bd 100644 --- a/keyboards/ramonimbao/herringbone/pro/keymaps/via/keymap.c +++ b/keyboards/ramonimbao/herringbone/pro/keymaps/via/keymap.c @@ -132,7 +132,7 @@ static void render_pattern(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { // Render Herringbone pattern render_pattern(); oled_render(); @@ -146,5 +146,6 @@ void oled_task_user(void) { oled_set_cursor(0, 2); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); oled_render(); + return false; } #endif diff --git a/keyboards/rart/rart67m/rart67m.c b/keyboards/rart/rart67m/rart67m.c index 6b2c6dffbb..e696a5cf3e 100644 --- a/keyboards/rart/rart67m/rart67m.c +++ b/keyboards/rart/rart67m/rart67m.c @@ -21,11 +21,14 @@ #define ANIM_FRAME_DURATION 200 #define ANIM_SIZE 512 #ifdef OLED_ENABLE -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; } -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } static uint32_t anim_timer = 0; static uint32_t anim_sleep = 0; static uint8_t current_idle_frame = 0; @@ -128,7 +131,7 @@ static uint8_t current_tap_frame = 0; } } } - + return false; } -#endif
\ No newline at end of file +#endif diff --git a/keyboards/rart/rart75m/rart75m.c b/keyboards/rart/rart75m/rart75m.c index 73e37d2d1a..87a12a9a1f 100644 --- a/keyboards/rart/rart75m/rart75m.c +++ b/keyboards/rart/rart75m/rart75m.c @@ -31,7 +31,10 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { #endif #ifdef OLED_ENABLE -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } // Host Keyboard Layer Status oled_write_P(PSTR("R A R T 7 5 M\nLayer: "), false); @@ -52,6 +55,8 @@ __attribute__((weak)) void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/rart/rartand/keymaps/default/keymap.c b/keyboards/rart/rartand/keymaps/default/keymap.c index 2dd9378b0d..3d04ffc6f3 100644 --- a/keyboards/rart/rartand/keymaps/default/keymap.c +++ b/keyboards/rart/rartand/keymaps/default/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("* R A R T A N D *\n Powered by QMK\nLayer: "), false); @@ -74,5 +74,6 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/rart/rartand/keymaps/via/keymap.c b/keyboards/rart/rartand/keymaps/via/keymap.c index 2dd9378b0d..3d04ffc6f3 100644 --- a/keyboards/rart/rartand/keymaps/via/keymap.c +++ b/keyboards/rart/rartand/keymaps/via/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("* R A R T A N D *\n Powered by QMK\nLayer: "), false); @@ -74,5 +74,6 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/rart/rartland/rartland.c b/keyboards/rart/rartland/rartland.c index 089ba9295c..e4a555d128 100644 --- a/keyboards/rart/rartland/rartland.c +++ b/keyboards/rart/rartland/rartland.c @@ -31,7 +31,10 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { #endif #ifdef OLED_ENABLE -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } // Host Keyboard Layer Status oled_write_P(PSTR("R A R T L A N D\nLayer: "), false); @@ -52,5 +55,7 @@ __attribute__((weak)) void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/rart/rartlice/keymaps/default/keymap.c b/keyboards/rart/rartlice/keymaps/default/keymap.c index 2ba4abff31..372a856bc2 100644 --- a/keyboards/rart/rartlice/keymaps/default/keymap.c +++ b/keyboards/rart/rartlice/keymaps/default/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("R A R T L I C E\nLayer: "), false); @@ -56,5 +56,6 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/rart/rartlice/keymaps/via/keymap.c b/keyboards/rart/rartlice/keymaps/via/keymap.c index 22e52c403d..700bb7f414 100644 --- a/keyboards/rart/rartlice/keymaps/via/keymap.c +++ b/keyboards/rart/rartlice/keymaps/via/keymap.c @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("* R A R T L I C E *\n Powered by QMK\nLayer: "), false); @@ -76,5 +76,6 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/rgbkb/mun/keymaps/default/keymap.c b/keyboards/rgbkb/mun/keymaps/default/keymap.c index b120c3a37a..866b8a0d15 100644 --- a/keyboards/rgbkb/mun/keymaps/default/keymap.c +++ b/keyboards/rgbkb/mun/keymaps/default/keymap.c @@ -230,7 +230,7 @@ static void render_touch(void) oled_write_P(touch_encoder_calibrating() ? PSTR("CLBRT") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_left()) { render_icon(); oled_write_P(PSTR(" "), false); @@ -245,6 +245,7 @@ void oled_task_user(void) { oled_write_P(PSTR(" "), false); render_rgb_menu(); } + return false; } oled_rotation_t oled_init_user(oled_rotation_t rotation) { diff --git a/keyboards/rgbkb/mun/keymaps/via/keymap.c b/keyboards/rgbkb/mun/keymaps/via/keymap.c index b120c3a37a..866b8a0d15 100644 --- a/keyboards/rgbkb/mun/keymaps/via/keymap.c +++ b/keyboards/rgbkb/mun/keymaps/via/keymap.c @@ -230,7 +230,7 @@ static void render_touch(void) oled_write_P(touch_encoder_calibrating() ? PSTR("CLBRT") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_left()) { render_icon(); oled_write_P(PSTR(" "), false); @@ -245,6 +245,7 @@ void oled_task_user(void) { oled_write_P(PSTR(" "), false); render_rgb_menu(); } + return false; } oled_rotation_t oled_init_user(oled_rotation_t rotation) { diff --git a/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c b/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c index cd1eec7515..ae5c0c9b19 100644 --- a/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c +++ b/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c @@ -119,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, 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, _______, - + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) @@ -223,7 +223,7 @@ void render_debug_scan(void) { } #endif -void oled_task_user(void) { +bool oled_task_user(void) { #if !defined(MATRIX_SCAN_DEBUG) if (is_keyboard_left()) { render_layer(); @@ -241,8 +241,9 @@ void oled_task_user(void) { #endif oled_set_cursor(0, 12); render_icon(); + return false; } 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/pan/keymaps/default/keymap.c b/keyboards/rgbkb/pan/keymaps/default/keymap.c index dac385aa4c..1188db837c 100644 --- a/keyboards/rgbkb/pan/keymaps/default/keymap.c +++ b/keyboards/rgbkb/pan/keymaps/default/keymap.c @@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("RGBKB Pan\n"), false); oled_write_P(PSTR("Layer: "), false); @@ -97,6 +97,8 @@ void oled_task_user(void) { led_t led_state = host_keyboard_led_state(); oled_write_P(led_state.num_lock ? PSTR("Numlock On\n") : PSTR(" \n"), false); oled_write_P(led_state.caps_lock ? PSTR("Capslock On \n") : PSTR(" \n"), false); + + return false; } #endif diff --git a/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c b/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c index aa465a6962..d6867ffa9b 100644 --- a/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c @@ -260,11 +260,13 @@ static void render_status(void) { oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR("SCLK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) render_status(); else render_logo(); + + return false; } #endif diff --git a/keyboards/rgbkb/sol/keymaps/danielhklein/keymap.c b/keyboards/rgbkb/sol/keymaps/danielhklein/keymap.c index 2ef78f122d..c24d382704 100644 --- a/keyboards/rgbkb/sol/keymaps/danielhklein/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/danielhklein/keymap.c @@ -324,11 +324,13 @@ static void render_status(void) { oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR("SCLK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) render_status(); else render_logo(); + + return false; } #endif diff --git a/keyboards/rgbkb/sol/keymaps/default/keymap.c b/keyboards/rgbkb/sol/keymaps/default/keymap.c index 6fc2cb7776..41108a29ab 100644 --- a/keyboards/rgbkb/sol/keymaps/default/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/default/keymap.c @@ -360,13 +360,14 @@ static void render_status(void) { #endif } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); oled_scroll_left(); } + return false; } #endif diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c index 73f7220a63..bdcfbb1b93 100644 --- a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c @@ -350,13 +350,14 @@ static void render_status(void) { #endif } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); oled_scroll_left(); } + return false; } #endif diff --git a/keyboards/rgbkb/zen/post_rules.mk b/keyboards/rgbkb/zen/post_rules.mk new file mode 100644 index 0000000000..3ddb449efa --- /dev/null +++ b/keyboards/rgbkb/zen/post_rules.mk @@ -0,0 +1,14 @@ +ifeq ($(strip $(CTPC)), yes) + CONVERT_TO_PROTON_C=yes +endif + +ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes) + SPLIT_KEYBOARD = no # currently unsupported on ARM + RGBLIGHT_ENABLE = no # currently unsupported on ARM + + EXTRAFLAGS += -DUSE_PROTON_C +else + # Currently moved to Pro Micro only section because of lack of Proton-C support + SPLIT_KEYBOARD = yes + RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +endif diff --git a/keyboards/rgbkb/zen/rev2/post_rules.mk b/keyboards/rgbkb/zen/rev2/post_rules.mk new file mode 100644 index 0000000000..2a4397e980 --- /dev/null +++ b/keyboards/rgbkb/zen/rev2/post_rules.mk @@ -0,0 +1,5 @@ +# Setup so that OLED can be turned on/off easily +ifeq ($(strip $(OLED_ENABLE)), yes) + # Custom local font file + OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\" +endif diff --git a/keyboards/rgbkb/zen/rev2/rev2.c b/keyboards/rgbkb/zen/rev2/rev2.c index 7bc0072467..5461890272 100644 --- a/keyboards/rgbkb/zen/rev2/rev2.c +++ b/keyboards/rgbkb/zen/rev2/rev2.c @@ -47,20 +47,23 @@ void render_status(void) { oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR("SCRLK") : PSTR(" "), false); // Line 16 } -oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { if (is_keyboard_master()) return OLED_ROTATION_270; // flips the display 270 degrees if mainhand return rotation; } -__attribute__((weak)) -void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } if (is_keyboard_master()) { render_status(); } else { render_logo(); oled_scroll_left(); } + return false; } #endif diff --git a/keyboards/rgbkb/zen/rev2/rules.mk b/keyboards/rgbkb/zen/rev2/rules.mk index 9bb8b8cd0d..6dd9d2e270 100644 --- a/keyboards/rgbkb/zen/rev2/rules.mk +++ b/keyboards/rgbkb/zen/rev2/rules.mk @@ -1,9 +1,3 @@ ENCODER_ENABLE = yes OLED_ENABLE = no - -# Setup so that OLED can be turned on/off easily -ifeq ($(strip $(OLED_ENABLE)), yes) - # Custom local font file - OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\" -endif diff --git a/keyboards/rgbkb/zen/rules.mk b/keyboards/rgbkb/zen/rules.mk index 9d6d2e1258..98a8a59edb 100644 --- a/keyboards/rgbkb/zen/rules.mk +++ b/keyboards/rgbkb/zen/rules.mk @@ -4,21 +4,6 @@ MCU = atmega32u4 # Bootloader selection BOOTLOADER = caterina -ifeq ($(strip $(CTPC)), yes) - CONVERT_TO_PROTON_C=yes -endif - -ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes) - SPLIT_KEYBOARD = no # currently unsupported on ARM - RGBLIGHT_ENABLE = no # currently unsupported on ARM - - EXTRAFLAGS += -DUSE_PROTON_C -else - # Currently moved to Pro Micro only section because of lack of Proton-C support - SPLIT_KEYBOARD = yes - RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -endif - # 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 diff --git a/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c b/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c index ffc222324d..4f5055dfdb 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c +++ b/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c @@ -222,13 +222,14 @@ static void render_status(void) { oled_write_ln_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); oled_scroll_left(); } + return false; } #endif diff --git a/keyboards/ristretto/ristretto.c b/keyboards/ristretto/ristretto.c index a39c366b00..b73e5043c3 100644 --- a/keyboards/ristretto/ristretto.c +++ b/keyboards/ristretto/ristretto.c @@ -36,11 +36,14 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { } #ifdef OLED_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_270; +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_270; } -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } oled_write_P(PSTR("\n\n"), false); oled_write_ln_P(PSTR("LAYER"), false); oled_write_ln_P(PSTR(""), false); @@ -58,6 +61,7 @@ __attribute__((weak)) void oled_task_user(void) { oled_write_P(PSTR("ADJ\n"), false); break; } + return false; } #endif diff --git a/keyboards/rocketboard_16/keymaps/default/keymap.c b/keyboards/rocketboard_16/keymaps/default/keymap.c index 050ab9f5b1..4ce537737b 100644 --- a/keyboards/rocketboard_16/keymaps/default/keymap.c +++ b/keyboards/rocketboard_16/keymaps/default/keymap.c @@ -209,7 +209,7 @@ static void render_logo(uint8_t startX, uint8_t startY) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void oled_task_user(void) +bool oled_task_user(void) { // Playing the animation if((timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) && (splash_dur_counter < SPLASH_DUR)) @@ -348,6 +348,7 @@ void oled_task_user(void) } + return false; } // Process the extra/extended keycode functionality diff --git a/keyboards/rocketboard_16/keymaps/via/keymap.c b/keyboards/rocketboard_16/keymaps/via/keymap.c index 050ab9f5b1..4ce537737b 100644 --- a/keyboards/rocketboard_16/keymaps/via/keymap.c +++ b/keyboards/rocketboard_16/keymaps/via/keymap.c @@ -209,7 +209,7 @@ static void render_logo(uint8_t startX, uint8_t startY) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void oled_task_user(void) +bool oled_task_user(void) { // Playing the animation if((timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) && (splash_dur_counter < SPLASH_DUR)) @@ -348,6 +348,7 @@ void oled_task_user(void) } + return false; } // Process the extra/extended keycode functionality diff --git a/keyboards/rubi/lib/oled.c b/keyboards/rubi/lib/oled.c index d48d27323c..9534cdd9b7 100644 --- a/keyboards/rubi/lib/oled.c +++ b/keyboards/rubi/lib/oled.c @@ -239,7 +239,8 @@ void render_frame(void) { } } -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { return false; } if (timer_elapsed(oled_frame_timer) > OLED_FRAME_TIMEOUT) { oled_clear(); oled_frame_timer = timer_read(); @@ -259,9 +260,10 @@ __attribute__((weak)) void oled_task_user(void) { } else { oled_mode = OLED_MODE_DEFAULT; } + return false; } -oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { oled_logo_timer = timer_read(); oled_frame_timer = timer_read(); return rotation; diff --git a/keyboards/sawnsprojects/satxri6key/keymaps/via/keymap.c b/keyboards/sawnsprojects/satxri6key/keymaps/via/keymap.c index e09ef997fe..0a2bdb39dc 100644 --- a/keyboards/sawnsprojects/satxri6key/keymaps/via/keymap.c +++ b/keyboards/sawnsprojects/satxri6key/keymaps/via/keymap.c @@ -145,7 +145,7 @@ static void render_anim(void) { } // Used to draw on to the oled screen -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); // renders pixelart oled_set_cursor(0, 0); // sets cursor to (row, column) using charactar spacing (5 rows on 128x32 screen, anything more will overflow back to the top) @@ -160,5 +160,6 @@ void oled_task_user(void) { led_t led_state = host_keyboard_led_state(); // caps lock stuff, prints CAPS on new line if caps led is on oled_set_cursor(0, 1); oled_write_P(led_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/sendyyeah/pix/keymaps/default/keymap.c b/keyboards/sendyyeah/pix/keymaps/default/keymap.c index ee98aedd8a..bcaf52d53b 100644 --- a/keyboards/sendyyeah/pix/keymaps/default/keymap.c +++ b/keyboards/sendyyeah/pix/keymaps/default/keymap.c @@ -174,7 +174,7 @@ void draw_brightness_icon(int key_position, int row) { oled_write_P(ICON_BRIGHTNESS_1, false); } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status static const char PROGMEM ICON_LAYER[] = {0x80, 0x81, 0x82, 0x83, 0}; static const char PROGMEM ICON_ENCODER[] = {0x84, 0x85, 0x86, 0x87, 0}; @@ -229,6 +229,7 @@ void oled_task_user(void) { break; } + return false; } #endif diff --git a/keyboards/sendyyeah/pix/keymaps/via/keymap.c b/keyboards/sendyyeah/pix/keymaps/via/keymap.c index ee98aedd8a..bcaf52d53b 100644 --- a/keyboards/sendyyeah/pix/keymaps/via/keymap.c +++ b/keyboards/sendyyeah/pix/keymaps/via/keymap.c @@ -174,7 +174,7 @@ void draw_brightness_icon(int key_position, int row) { oled_write_P(ICON_BRIGHTNESS_1, false); } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status static const char PROGMEM ICON_LAYER[] = {0x80, 0x81, 0x82, 0x83, 0}; static const char PROGMEM ICON_ENCODER[] = {0x84, 0x85, 0x86, 0x87, 0}; @@ -229,6 +229,7 @@ void oled_task_user(void) { break; } + return false; } #endif diff --git a/keyboards/sentraq/s65_plus/config.h b/keyboards/sentraq/s65_plus/config.h index 4d4819efce..2f02e8e162 100644 --- a/keyboards/sentraq/s65_plus/config.h +++ b/keyboards/sentraq/s65_plus/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -45,5 +44,3 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#endif diff --git a/keyboards/sentraq/s65_x/config.h b/keyboards/sentraq/s65_x/config.h index d3c9adbf3c..b8886bf67f 100644 --- a/keyboards/sentraq/s65_x/config.h +++ b/keyboards/sentraq/s65_x/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -44,5 +43,3 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#endif diff --git a/keyboards/setta21/keymaps/salicylic/keymap.c b/keyboards/setta21/keymaps/salicylic/keymap.c index 568afd1339..06fa89c9c7 100644 --- a/keyboards/setta21/keymaps/salicylic/keymap.c +++ b/keyboards/setta21/keymaps/salicylic/keymap.c @@ -190,8 +190,9 @@ void render_status(void) { render_layer_state(); } -void oled_task_user(void) { +bool oled_task_user(void) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + return false; } #endif diff --git a/keyboards/sidderskb/majbritt/rev2/info.json b/keyboards/sidderskb/majbritt/rev2/info.json index 788657f3bc..3e2aa450ad 100644 --- a/keyboards/sidderskb/majbritt/rev2/info.json +++ b/keyboards/sidderskb/majbritt/rev2/info.json @@ -1,10 +1,81 @@ { "keyboard_name": "Majbritt Rev2", - "url": "https://sidderskb.co.uk/", "maintainer": "Sleepdealr", + "url": "https://sidderskb.co.uk/", "layouts": { "LAYOUT": { - "layout": [{"label":"Esc", "x":0.75, "y":0}, {"label":"!", "x":1.75, "y":0}, {"label":"\"", "x":2.75, "y":0}, {"label":"\u00a3", "x":3.75, "y":0}, {"label":"$", "x":4.75, "y":0}, {"label":"%", "x":5.75, "y":0}, {"label":"^", "x":6.75, "y":0}, {"label":"&", "x":8.5, "y":0}, {"label":"*", "x":9.5, "y":0}, {"label":"(", "x":10.5, "y":0}, {"label":")", "x":11.5, "y":0}, {"label":"_", "x":12.5, "y":0}, {"label":"+", "x":13.5, "y":0}, {"label":"|", "x":14.5, "y":0}, {"label":"~", "x":15.5, "y":0}, {"label":"Del", "x":16.5, "y":0}, {"label":"Tab", "x":0.5, "y":1, "w":1.5}, {"label":"Q", "x":2, "y":1}, {"label":"W", "x":3, "y":1}, {"label":"E", "x":4, "y":1}, {"label":"R", "x":5, "y":1}, {"label":"T", "x":6, "y":1}, {"label":"Y", "x":8, "y":1}, {"label":"U", "x":9, "y":1}, {"label":"I", "x":10, "y":1}, {"label":"O", "x":11, "y":1}, {"label":"P", "x":12, "y":1}, {"label":"{", "x":13, "y":1}, {"label":"}", "x":14, "y":1}, {"label":"Enter", "x":15.25, "y":1, "w":1.25, "h":2}, {"label":"Pgup", "x":16.5, "y":1}, {"label":"Caps Lock", "x":0.25, "y":2, "w":1.75}, {"label":"A", "x":2, "y":2}, {"label":"S", "x":3, "y":2}, {"label":"D", "x":4, "y":2}, {"label":"F", "x":5, "y":2}, {"label":"G", "x":6, "y":2}, {"label":"H", "x":8.25, "y":2}, {"label":"J", "x":9.25, "y":2}, {"label":"K", "x":10.25, "y":2}, {"label":"L", "x":11.25, "y":2}, {"label":":", "x":12.25, "y":2}, {"label":"@", "x":13.25, "y":2}, {"label":"~", "x":14.25, "y":2}, {"label":"Pgdn", "x":16.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "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":8.75, "y":3}, {"label":"M", "x":9.75, "y":3}, {"label":"<", "x":10.75, "y":3}, {"label":">", "x":11.75, "y":3}, {"label":"?", "x":12.75, "y":3}, {"label":"Shift", "x":13.75, "y":3, "w":1.75}, {"label":"Up", "x":15.5, "y":3}, {"label":"Fn", "x":16.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":3, "y":4, "w":1.5}, {"label":"LSpace", "x":4.5, "y":4, "w":2.25}, {"label":"Fn", "x":6.75, "y":4}, {"label":"RSpace", "x":8.25, "y":4, "w":2.75}, {"label":"AltGr", "x":11, "y":4, "w":1.5}, {"label":"Left", "x":14.5, "y":4}, {"label":"Down", "x":15.5, "y":4}, {"label":"Right", "x":16.5, "y":4}] + "layout": [ + { "label": "Esc", "x": 0.75, "y": 0 }, + { "label": "!", "x": 1.75, "y": 0 }, + { "label": "\"", "x": 2.75, "y": 0 }, + { "label": "\u00a3", "x": 3.75, "y": 0 }, + { "label": "$", "x": 4.75, "y": 0 }, + { "label": "%", "x": 5.75, "y": 0 }, + { "label": "^", "x": 6.75, "y": 0 }, + { "label": "&", "x": 8.5, "y": 0 }, + { "label": "*", "x": 9.5, "y": 0 }, + { "label": "(", "x": 10.5, "y": 0 }, + { "label": ")", "x": 11.5, "y": 0 }, + { "label": "_", "x": 12.5, "y": 0 }, + { "label": "+", "x": 13.5, "y": 0 }, + { "label": "|", "x": 14.5, "y": 0 }, + { "label": "~", "x": 15.5, "y": 0 }, + { "label": "Del", "x": 16.5, "y": 0 }, + { "label": "Tab", "w": 1.5, "x": 0.5, "y": 1 }, + { "label": "Q", "x": 2, "y": 1 }, + { "label": "W", "x": 3, "y": 1 }, + { "label": "E", "x": 4, "y": 1 }, + { "label": "R", "x": 5, "y": 1 }, + { "label": "T", "x": 6, "y": 1 }, + { "label": "Y", "x": 8, "y": 1 }, + { "label": "U", "x": 9, "y": 1 }, + { "label": "I", "x": 10, "y": 1 }, + { "label": "O", "x": 11, "y": 1 }, + { "label": "P", "x": 12, "y": 1 }, + { "label": "{", "x": 13, "y": 1 }, + { "label": "}", "x": 14, "y": 1 }, + { "label": "Enter", "w": 1.5, "x": 15, "y": 1 }, + { "label": "Pgup", "x": 16.5, "y": 1 }, + { "label": "Caps Lock", "w": 1.75, "x": 0.25, "y": 2 }, + { "label": "A", "x": 2, "y": 2 }, + { "label": "S", "x": 3, "y": 2 }, + { "label": "D", "x": 4, "y": 2 }, + { "label": "F", "x": 5, "y": 2 }, + { "label": "G", "x": 6, "y": 2 }, + { "label": "H", "x": 8.25, "y": 2 }, + { "label": "J", "x": 9.25, "y": 2 }, + { "label": "K", "x": 10.25, "y": 2 }, + { "label": "L", "x": 11.25, "y": 2 }, + { "label": ":", "x": 12.25, "y": 2 }, + { "label": "@", "x": 13.25, "y": 2 }, + { "label": "~", "x": 14.25, "y": 2 }, + { "label": "Enter", "w": 1.25, "x": 15.25, "y": 2 }, + { "label": "Pgdn", "x": 16.5, "y": 2 }, + { "label": "Shift", "w": 1.25, "x": 0, "y": 3 }, + { "label": "|", "x": 1.25, "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": 8.75, "y": 3 }, + { "label": "M", "x": 9.75, "y": 3 }, + { "label": "<", "x": 10.75, "y": 3 }, + { "label": ">", "x": 11.75, "y": 3 }, + { "label": "?", "x": 12.75, "y": 3 }, + { "label": "Shift", "w": 1.75, "x": 13.75, "y": 3 }, + { "label": "Up", "x": 15.5, "y": 3 }, + { "label": "Fn", "x": 16.5, "y": 3 }, + { "label": "Ctrl", "w": 1.5, "x": 0, "y": 4 }, + { "label": "Alt", "w": 1.5, "x": 3, "y": 4 }, + { "label": "LSpace", "w": 2.25, "x": 4.5, "y": 4 }, + { "label": "Fn", "x": 6.75, "y": 4 }, + { "label": "RSpace", "w": 2.75, "x": 8.25, "y": 4 }, + { "label": "AltGr", "w": 1.5, "x": 11, "y": 4 }, + { "label": "Left", "x": 14.5, "y": 4 }, + { "label": "Down", "x": 15.5, "y": 4 }, + { "label": "Right", "x": 16.5, "y": 4 } + ] } } } diff --git a/keyboards/sixkeyboard/config.h b/keyboards/sixkeyboard/config.h index b438ceea9e..d6505e70c7 100644 --- a/keyboards/sixkeyboard/config.h +++ b/keyboards/sixkeyboard/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -65,5 +64,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/sixkeyboard/sixkeyboard.h b/keyboards/sixkeyboard/sixkeyboard.h index 353e2a78c8..3f563af6d1 100644 --- a/keyboards/sixkeyboard/sixkeyboard.h +++ b/keyboards/sixkeyboard/sixkeyboard.h @@ -1,20 +1,7 @@ -#ifndef SIXKEYBOARD_H -#define SIXKEYBOARD_H +#pragma once #include "quantum.h" -// This macro is an example of using a non-standard row-column matrix. The -// keyboard in question had 11 rows and 8 columns, but the rows were not all -// horizontal, and the columns were not all vertical. For example, row 2 -// contained "Print Screen", "N", "M", ",", ".", "/", "Right Shift", and -// "Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B", -// "Left Alt", "Up Arrow", and "Down Arrow". -// -// The macro makes programming the keys easier and in a more straight-forward -// manner because it realigns the keys into a 6x15 sensible keyboard layout -// instead of the obtuse 11x8 matrix. - - /* * ┌───┬───┬───┐ * │ A │ B │ C │ @@ -24,11 +11,8 @@ */ #define LAYOUT_ortho_2x3( \ k00, k01, k02, \ - k10, k11, k12 \ - ) { \ + k10, k11, k12 \ +) { \ { k00, k01, k02 }, \ - { k10, k11, k12 } \ + { k10, k11, k12 } \ } - - -#endif diff --git a/keyboards/smallkeyboard/config.h b/keyboards/smallkeyboard/config.h index 689d53d54e..a343d767ff 100644 --- a/keyboards/smallkeyboard/config.h +++ b/keyboards/smallkeyboard/config.h @@ -50,10 +50,8 @@ #define DEBOUNCE 3 /* disable these deprecated features by default */ -//#ifndef LINK_TIME_OPTIMIZATION_ENABLE -//# define NO_ACTION_MACRO -//# define NO_ACTION_FUNCTION -//#endif +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects @@ -84,14 +82,9 @@ // 0b1110101 AD <-> SCL // 0b1110110 AD <-> SDA #define DRIVER_ADDR_1 0b1110100 -//#define DRIVER_ADDR_2 0b1110110 #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 6 -//#define DRIVER_1_LED_TOTAL 25 -//#define DRIVER_2_LED_TOTAL 24 -//#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 6 #endif //#define RGB_DI_PIN B7 //#ifdef RGB_DI_PIN diff --git a/keyboards/sofle/keymaps/default/keymap.c b/keyboards/sofle/keymaps/default/keymap.c index a64d274b55..6c078a1292 100644 --- a/keyboards/sofle/keymaps/default/keymap.c +++ b/keyboards/sofle/keymaps/default/keymap.c @@ -200,12 +200,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/sofle/keymaps/devdev/keymap.c b/keyboards/sofle/keymaps/devdev/keymap.c index a0945b28f0..b805f7f176 100644 --- a/keyboards/sofle/keymaps/devdev/keymap.c +++ b/keyboards/sofle/keymaps/devdev/keymap.c @@ -465,12 +465,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/sofle/keymaps/helltm/keymap.c b/keyboards/sofle/keymaps/helltm/keymap.c index 3e1bcc82ea..8d6289af42 100644 --- a/keyboards/sofle/keymaps/helltm/keymap.c +++ b/keyboards/sofle/keymaps/helltm/keymap.c @@ -392,7 +392,7 @@ static void print_status_narrow(void) { oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } -void oled_task_user(void) { +bool oled_task_user(void) { /* KEYBOARD PET VARIABLES START */ current_wpm = get_current_wpm(); @@ -405,6 +405,7 @@ void oled_task_user(void) { } else { print_logo_narrow(); } + return false; } #endif diff --git a/keyboards/sofle/keymaps/j4ckofalltrades/oled.c b/keyboards/sofle/keymaps/j4ckofalltrades/oled.c index 46c791b053..de561bd0fa 100644 --- a/keyboards/sofle/keymaps/j4ckofalltrades/oled.c +++ b/keyboards/sofle/keymaps/j4ckofalltrades/oled.c @@ -65,12 +65,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/sofle/keymaps/killmaster/keymap.c b/keyboards/sofle/keymaps/killmaster/keymap.c index 34c07f3c45..71db0fc853 100644 --- a/keyboards/sofle/keymaps/killmaster/keymap.c +++ b/keyboards/sofle/keymaps/killmaster/keymap.c @@ -211,12 +211,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } diff --git a/keyboards/sofle/keymaps/rgb_default/keymap.c b/keyboards/sofle/keymaps/rgb_default/keymap.c index 13edbc5207..1972e8bc6a 100644 --- a/keyboards/sofle/keymaps/rgb_default/keymap.c +++ b/keyboards/sofle/keymaps/rgb_default/keymap.c @@ -465,12 +465,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/sofle/keymaps/via/oled.c b/keyboards/sofle/keymaps/via/oled.c index 8a230f0001..74f06cedc5 100644 --- a/keyboards/sofle/keymaps/via/oled.c +++ b/keyboards/sofle/keymaps/via/oled.c @@ -73,12 +73,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/spaceman/pancake/rev1/feather/config.h b/keyboards/spaceman/pancake/rev1/feather/config.h index e72b25f3db..cb80721e46 100644 --- a/keyboards/spaceman/pancake/rev1/feather/config.h +++ b/keyboards/spaceman/pancake/rev1/feather/config.h @@ -21,8 +21,4 @@ #define MATRIX_COL_PINS { C7, D6, B7, B6, F0, D2, D3, F1, F4, F5, F6, F7 } #define UNUSED_PINS -#define AdafruitBleResetPin D4 -#define AdafruitBleCSPin B4 -#define AdafruitBleIRQPin E6 - #define VIA_HAS_BROKEN_KEYCODES diff --git a/keyboards/spaceman/pancake/rev1/feather/rules.mk b/keyboards/spaceman/pancake/rev1/feather/rules.mk index b749dc2327..a2ddd81a9c 100644 --- a/keyboards/spaceman/pancake/rev1/feather/rules.mk +++ b/keyboards/spaceman/pancake/rev1/feather/rules.mk @@ -10,7 +10,6 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BLUETOOTH = AdafruitBLE BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control @@ -21,6 +20,8 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https: BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below RGBLIGHT_ENABLE = no # This can be enabled if a ws2812 strip is connected to the expansion port. +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE LAYOUTS = ortho_4x12 planck_mit diff --git a/keyboards/spaceman/pancake/rev2/rev2.c b/keyboards/spaceman/pancake/rev2/rev2.c index cd13099a9c..9b186192c5 100644 --- a/keyboards/spaceman/pancake/rev2/rev2.c +++ b/keyboards/spaceman/pancake/rev2/rev2.c @@ -17,10 +17,14 @@ #ifdef OLED_ENABLE -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_270; } -__attribute__((weak)) void oled_task_user(void) { + +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } static const char PROGMEM pancake_logo[] = { 0x00, 0x00, 0x3e, 0x0a, 0x04, 0x00, 0x3c, 0x0a, 0x3c, 0x00, 0x3e, 0x0c, 0x18, 0x3e, 0x00, 0x3e, 0x22, 0x22, 0x00, 0x3c, 0x0a, 0x3c, 0x00, 0x3e, 0x08, 0x36, 0x00, 0x3e, 0x2a, 0x22, 0x00, 0x00, @@ -50,5 +54,6 @@ __attribute__((weak)) void oled_task_user(void) { oled_write_ln_P(PSTR("Undefined"), false); break; } + return false; } #endif diff --git a/keyboards/spacey/info.json b/keyboards/spacey/info.json index 1bb8dea95a..94d68addf4 100644 --- a/keyboards/spacey/info.json +++ b/keyboards/spacey/info.json @@ -71,10 +71,10 @@ {"label":"k43", "x":3, "y":4}, {"label":"k44", "x":4, "y":4}, {"label":"k45", "x":5, "y":4}, - + {"label":"k46", "x":6, "y":4}, {"label":"k47", "x":7, "y":4}, {"label":"k48", "x":8, "y":4}, - + {"label":"k49", "x":9, "y":4}, {"label":"k4A", "x":10, "y":4}, {"label":"k4B", "x":11, "y":4}, {"label":"k4C", "x":12, "y":4}, diff --git a/keyboards/splitkb/kyria/keymaps/asapjockey/keymap.c b/keyboards/splitkb/kyria/keymaps/asapjockey/keymap.c index 8ba098eed2..baf46eeac6 100644 --- a/keyboards/splitkb/kyria/keymaps/asapjockey/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/asapjockey/keymap.c @@ -246,12 +246,13 @@ static void render_status(void) { oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_kyria_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/benji/keymap.c b/keyboards/splitkb/kyria/keymaps/benji/keymap.c index a670b77611..1ad50e5fc4 100644 --- a/keyboards/splitkb/kyria/keymaps/benji/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/benji/keymap.c @@ -200,12 +200,13 @@ static void render_status(void) { oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_kyria_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/cjuniet/keymap.c b/keyboards/splitkb/kyria/keymaps/cjuniet/keymap.c index d0620309b6..7e485a7be8 100644 --- a/keyboards/splitkb/kyria/keymaps/cjuniet/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/cjuniet/keymap.c @@ -117,11 +117,12 @@ static void render_status(void) { oled_write_ln_P(PSTR(" Layer\n"), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); render_status_bar(); } else { render_kyria_logo(); } + return false; } diff --git a/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c b/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c index 25a58038dc..1abf865010 100644 --- a/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c @@ -391,12 +391,13 @@ static void render_status(void) { } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/default/keymap.c b/keyboards/splitkb/kyria/keymaps/default/keymap.c index 243104afc6..20cb279ff6 100644 --- a/keyboards/splitkb/kyria/keymaps/default/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/default/keymap.c @@ -226,7 +226,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // QMK Logo and version information // clang-format off @@ -287,6 +287,7 @@ void oled_task_user(void) { // clang-format on oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/drashna/rules.mk b/keyboards/splitkb/kyria/keymaps/drashna/rules.mk index 6accf8cc03..7c6bd3e121 100644 --- a/keyboards/splitkb/kyria/keymaps/drashna/rules.mk +++ b/keyboards/splitkb/kyria/keymaps/drashna/rules.mk @@ -17,3 +17,4 @@ KEY_LOCK_ENABLE = no WPM_ENABLE = yes SWAP_HANDS_ENABLE = yes LTO_ENABLE = no +CTPC = yes diff --git a/keyboards/splitkb/kyria/keymaps/ghidalgo93/keymap.c b/keyboards/splitkb/kyria/keymaps/ghidalgo93/keymap.c index 67881b03e6..df542977a1 100644 --- a/keyboards/splitkb/kyria/keymaps/ghidalgo93/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/ghidalgo93/keymap.c @@ -214,12 +214,13 @@ static void render_status(void) { oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_kyria_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/gotham/keymap.c b/keyboards/splitkb/kyria/keymaps/gotham/keymap.c index 498e1c1124..5fdeb494e6 100644 --- a/keyboards/splitkb/kyria/keymaps/gotham/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/gotham/keymap.c @@ -106,7 +106,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void oled_task_user(void) { render_status(); } +bool oled_task_user(void) { + render_status(); + return false; +} #endif #ifdef ENCODER_ENABLE diff --git a/keyboards/splitkb/kyria/keymaps/j-inc/keymap.c b/keyboards/splitkb/kyria/keymaps/j-inc/keymap.c index 6121dd0f87..af583a607f 100644 --- a/keyboards/splitkb/kyria/keymaps/j-inc/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/j-inc/keymap.c @@ -317,7 +317,7 @@ static void render_anim(void) { // oled_write_raw_P(skull, 801); // } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { //render_skull(); //oled_set_cursor(7,6); @@ -335,6 +335,7 @@ void oled_task_user(void) { oled_write(wpm_str, false); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/jhelvy/keymap.c b/keyboards/splitkb/kyria/keymaps/jhelvy/keymap.c index a9c8db28d5..e78e15ea3e 100644 --- a/keyboards/splitkb/kyria/keymaps/jhelvy/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/jhelvy/keymap.c @@ -161,12 +161,13 @@ static void render_status(void) { } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_kyria_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/john-ezra/oled.c b/keyboards/splitkb/kyria/keymaps/john-ezra/oled.c index fe9c96d556..732cca8f7b 100644 --- a/keyboards/splitkb/kyria/keymaps/john-ezra/oled.c +++ b/keyboards/splitkb/kyria/keymaps/john-ezra/oled.c @@ -478,12 +478,13 @@ void render_status_secondary(void) { render_wpm_graph(); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_status_secondary(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/mattir/keymap.c b/keyboards/splitkb/kyria/keymaps/mattir/keymap.c index 89efaec559..7b567cbd60 100644 --- a/keyboards/splitkb/kyria/keymaps/mattir/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/mattir/keymap.c @@ -193,12 +193,13 @@ static void render_status(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard layer } else { render_mattir_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/ninjonas/oled.c b/keyboards/splitkb/kyria/keymaps/ninjonas/oled.c index 216f475347..813328aa0c 100644 --- a/keyboards/splitkb/kyria/keymaps/ninjonas/oled.c +++ b/keyboards/splitkb/kyria/keymaps/ninjonas/oled.c @@ -198,12 +198,13 @@ static void render_status(void) { render_mod_state(get_mods()|get_oneshot_mods()); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); oled_scroll_left(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/plattfot/keymap.c b/keyboards/splitkb/kyria/keymaps/plattfot/keymap.c index 8b4b0c2630..222759d60d 100644 --- a/keyboards/splitkb/kyria/keymaps/plattfot/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/plattfot/keymap.c @@ -327,12 +327,13 @@ static void render_status(void) { oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_static_info(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/shinze/keymap.c b/keyboards/splitkb/kyria/keymaps/shinze/keymap.c index ad9ca4da1d..3483410525 100644 --- a/keyboards/splitkb/kyria/keymaps/shinze/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/shinze/keymap.c @@ -216,12 +216,13 @@ static void render_status(void) { oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_kyria_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/tessachka/keymap.c b/keyboards/splitkb/kyria/keymaps/tessachka/keymap.c index 51a91fc915..16d2bad8a4 100644 --- a/keyboards/splitkb/kyria/keymaps/tessachka/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/tessachka/keymap.c @@ -231,11 +231,12 @@ static void render_status(void) { oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_kyria_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/thomasbaart/keymap.c b/keyboards/splitkb/kyria/keymaps/thomasbaart/keymap.c index 24be4135ea..0a4f1887c3 100644 --- a/keyboards/splitkb/kyria/keymaps/thomasbaart/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/thomasbaart/keymap.c @@ -298,12 +298,13 @@ static void render_status(void) { oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_kyria_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/via/keymap.c b/keyboards/splitkb/kyria/keymaps/via/keymap.c index 730b5028cc..6835652a70 100644 --- a/keyboards/splitkb/kyria/keymaps/via/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/via/keymap.c @@ -191,7 +191,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { #endif #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // QMK Logo and version information // clang-format off @@ -244,5 +244,6 @@ void oled_task_user(void) { // clang-format on oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/winternebs/keymap.c b/keyboards/splitkb/kyria/keymaps/winternebs/keymap.c index 0829030310..4f0df9354f 100755 --- a/keyboards/splitkb/kyria/keymaps/winternebs/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/winternebs/keymap.c @@ -695,7 +695,7 @@ static void render_logo(void) { oled_set_cursor(6,6); oled_write_P(PSTR(" play asc "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_anim(); oled_set_cursor(0,7); @@ -728,5 +728,6 @@ void oled_task_user(void) { oled_scroll_left(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/zigotica/oled.c b/keyboards/splitkb/kyria/keymaps/zigotica/oled.c index 46bb2c3cea..ba1415deed 100644 --- a/keyboards/splitkb/kyria/keymaps/zigotica/oled.c +++ b/keyboards/splitkb/kyria/keymaps/zigotica/oled.c @@ -77,11 +77,11 @@ static void render_status(void) { oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (!is_keyboard_left()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_kyria_logo(); } + return false; } - diff --git a/keyboards/splitkb/kyria/readme.md b/keyboards/splitkb/kyria/readme.md index 5ce652589c..7ecf3946f7 100644 --- a/keyboards/splitkb/kyria/readme.md +++ b/keyboards/splitkb/kyria/readme.md @@ -10,7 +10,8 @@ Hardware Availability: [splitkb.com](https://splitkb.com) and partners. Make example for this keyboard (after setting up your build environment): - make splitkb/kyria:default + make splitkb/kyria/rev1:default + make splitkb/kyria/rev1/proton_c:default Example of flashing this keyboard: @@ -19,3 +20,22 @@ Example of flashing this keyboard: 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). A build guide for the Kyria can be found at [docs.splitkb.com](https://docs.splitkb.com/hc/en-us/articles/360010552059-Kyria-Build-Guide-Introduction). + +## Proton C Conversion Guide + +If you're one of the lucky people to have Proton Cs to use with their Kyria, there are a couple of caveats to getting this working. + +1. You need to have 2x Proton Cs, as you cannot mix and match with Pro Micros or Elite C's. They both need to be Proton Cs. +2. You'll need to do some modding to enable proper support with the Proton C. + +By design, the Kyria uses every available pin on the Pro Micro footprint. This includes using D3 (RX) for RGB. This poses a challenge with using the Proton C, since it needs both the TX and RX pins. The Proton C needs both pins, especially if you plan on using Full Duplex Serial. + +To fix this, you need to break off the last header position on the right-hand side on the footprint. This is the `TX0/D3` pad. Leave this pad without a header connected to. + +From the A9 pin on the Proton C, you want to run a wire from it to the `SDA + Extra Data` pad near the TRRS jack on the PCB. This will allow for proper, full duplex communication over the TRRS cable. + +To get RGB working properly, as well, you want to run a wire from the `A3` pin on the Proton C, next to the GND and DFU pin, right under the USB port. Run this to the `TX0/D3` pad (the one you left without a header pin on the PCB). + +Once you've done that, you can solder in the Proton C. and flash it. + +![Proton C](https://i.imgur.com/nICqWLo.jpg) diff --git a/keyboards/splitkb/kyria/rev1/config.h b/keyboards/splitkb/kyria/rev1/config.h index a330dfc10f..e19e8dfa9c 100644 --- a/keyboards/splitkb/kyria/rev1/config.h +++ b/keyboards/splitkb/kyria/rev1/config.h @@ -57,18 +57,31 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ -#define SOFT_SERIAL_PIN D2 -#define RGB_DI_PIN D3 +#if defined(CONVERT_TO_PROTON_C) +# define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. +# define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. +# define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1 +# define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 +# define SERIAL_USART_TX_PIN D3 +# define SERIAL_USART_RX_PIN D2 + +# define RGB_DI_PIN PAL_LINE(GPIOA, 3) +# define WS2812_PWM_DRIVER PWMD2 // default: PWMD2 +# define WS2812_PWM_CHANNEL 4 // default: 2 +# define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 +# define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +# define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. +#else +# define RGB_DI_PIN D3 +# define SOFT_SERIAL_PIN D2 +#endif + #define RGBLED_SPLIT \ { 10, 10 } #define RGBLED_NUM 20 -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - #ifdef OLED_ENABLE # define OLED_DISPLAY_128X64 # define SPLIT_OLED_ENABLE diff --git a/keyboards/splitkb/kyria/rev1/proton_c/chconf.h b/keyboards/splitkb/kyria/rev1/proton_c/chconf.h new file mode 100644 index 0000000000..7ca1d3d243 --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/proton_c/chconf.h @@ -0,0 +1,22 @@ +/* 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 + +#define CH_CFG_ST_RESOLUTION 16 +#define CH_CFG_ST_FREQUENCY 10000 + +#include_next "chconf.h" diff --git a/keyboards/splitkb/kyria/rev1/proton_c/halconf.h b/keyboards/splitkb/kyria/rev1/proton_c/halconf.h new file mode 100644 index 0000000000..99f2e11b9a --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/proton_c/halconf.h @@ -0,0 +1,22 @@ +/* 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 3 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 <https://www.gnu.org/licenses/>. + */ +#pragma once + +#define HAL_USE_I2C TRUE +#define HAL_USE_PWM TRUE +#define HAL_USE_SERIAL TRUE + +#include_next <halconf.h> diff --git a/keyboards/splitkb/kyria/rev1/proton_c/mcuconf.h b/keyboards/splitkb/kyria/rev1/proton_c/mcuconf.h new file mode 100644 index 0000000000..58348af390 --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/proton_c/mcuconf.h @@ -0,0 +1,29 @@ +/* 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 3 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 <https://www.gnu.org/licenses/>. + */ +#pragma once + +#include_next <mcuconf.h> + +#undef STM32_PWM_USE_TIM2 +#define STM32_PWM_USE_TIM2 TRUE +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 FALSE + +#undef STM32_SERIAL_USE_USART1 +#define STM32_SERIAL_USE_USART1 TRUE + +#undef STM32_ST_USE_TIMER +#define STM32_ST_USE_TIMER 3 diff --git a/keyboards/splitkb/kyria/rev1/proton_c/proton_c.c b/keyboards/splitkb/kyria/rev1/proton_c/proton_c.c new file mode 100644 index 0000000000..628fabb2e5 --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/proton_c/proton_c.c @@ -0,0 +1,17 @@ +/* Copyright 2019 Thomas Baart <thomas@splitkb.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 "proton_c.h" diff --git a/keyboards/splitkb/kyria/rev1/proton_c/proton_c.h b/keyboards/splitkb/kyria/rev1/proton_c/proton_c.h new file mode 100644 index 0000000000..718f5636ff --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/proton_c/proton_c.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Thomas Baart <thomas@splitkb.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 "rev1.h" diff --git a/keyboards/splitkb/kyria/rev1/proton_c/rules.mk b/keyboards/splitkb/kyria/rev1/proton_c/rules.mk new file mode 100644 index 0000000000..9e0942398f --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/proton_c/rules.mk @@ -0,0 +1,5 @@ +WS2812_DRIVER = pwm +SERIAL_DRIVER = usart +AUDIO_ENABLE = no +LTO_ENABLE = no +CONVERT_TO_PROTON_C = yes diff --git a/keyboards/splitkb/kyria/rev1/rev1.c b/keyboards/splitkb/kyria/rev1/rev1.c index ac82f7373d..b2641fb40e 100644 --- a/keyboards/splitkb/kyria/rev1/rev1.c +++ b/keyboards/splitkb/kyria/rev1/rev1.c @@ -56,9 +56,14 @@ led_config_t g_led_config = { { #endif #ifdef OLED_ENABLE -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } if (is_keyboard_master()) { // QMK Logo and version information // clang-format off @@ -119,6 +124,7 @@ __attribute__((weak)) void oled_task_user(void) { // clang-format on oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/rev1/rev1.h b/keyboards/splitkb/kyria/rev1/rev1.h index bf9864fe36..8a5fbeb21d 100644 --- a/keyboards/splitkb/kyria/rev1/rev1.h +++ b/keyboards/splitkb/kyria/rev1/rev1.h @@ -16,6 +16,9 @@ #pragma once #include "kyria.h" +#ifdef KEYBOARD_splitkb_kyria_rev1_proton_c +# include "proton_c.h" +#endif /* This a shortcut to help you visually see your layout. * diff --git a/keyboards/splitkb/zima/keymaps/drashna/keymap.c b/keyboards/splitkb/zima/keymaps/drashna/keymap.c index 29d03ec918..b3133c601b 100644 --- a/keyboards/splitkb/zima/keymaps/drashna/keymap.c +++ b/keyboards/splitkb/zima/keymaps/drashna/keymap.c @@ -78,10 +78,10 @@ void render_user_status(void) { void keyboard_post_init_user(void) { oled_scroll_set_speed(0); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_asleep) { oled_off(); - return; + return false;; } if (timer_elapsed32(oled_timer) < 30000) { @@ -131,6 +131,7 @@ void oled_task_user(void) { oled_off(); } } + return false; } void suspend_power_down_user(void) { is_asleep = true; } diff --git a/keyboards/splitkb/zima/rules.mk b/keyboards/splitkb/zima/rules.mk index ecb6fd7cf1..657475a020 100644 --- a/keyboards/splitkb/zima/rules.mk +++ b/keyboards/splitkb/zima/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,7 +22,8 @@ AUDIO_ENABLE = yes # Audio output ENCODER_ENABLE = yes # ENables the use of one or more encoders OLED_ENABLE = yes -OLED_DRIVER = SSD1306 # Enables the use of OLED displays -HAPTIC_ENABLE += DRV2605L # Supported but not included by defaut +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +HAPTIC_ENABLE = yes # Supported but not included by defaut +HAPTIC_DRIVER = DRV2605L LTO_ENABLE = yes diff --git a/keyboards/splitkb/zima/zima.c b/keyboards/splitkb/zima/zima.c index 6570f3449c..f39e3a39eb 100644 --- a/keyboards/splitkb/zima/zima.c +++ b/keyboards/splitkb/zima/zima.c @@ -35,12 +35,17 @@ void suspend_wakeup_init_kb(void) { suspend_wakeup_init_user(); } -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } if (is_asleep) { oled_off(); - return; + return false; } if (timer_elapsed32(oled_timer) < 30000) { @@ -83,6 +88,7 @@ __attribute__((weak)) void oled_task_user(void) { oled_off(); } } + return false; } bool process_record_kb(uint16_t keycode, keyrecord_t* record) { diff --git a/keyboards/standaside/standaside.h b/keyboards/standaside/standaside.h index b661696397..9601f1257c 100644 --- a/keyboards/standaside/standaside.h +++ b/keyboards/standaside/standaside.h @@ -1,29 +1,23 @@ - -#ifndef STANDASIDE_H -#define STANDASIDE_H +#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 // The second converts the arguments into a two-dimensional array #define LAYOUT_ortho_4x16( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, \ - K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K30, K31, \ - K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, K44, K45, K46, K47, \ - K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K60, K61, K62, K63 \ -) \ -{ \ - { K00, K02, K04, K06, K08, K10, K12, K14 }, \ - { K01, K03, K05, K07, K09, K11, K13, K15 }, \ - { K16, K18, K20, K22, K24, K26, K28, K30 }, \ - { K17, K19, K21, K23, K25, K27, K29, K31 }, \ - { K32, K34, K36, K38, K40, K42, K44, K46 }, \ - { K33, K35, K37, K39, K41, K43, K45, K47 }, \ - { K48, K50, K52, K54, K56, K58, K60, K62 }, \ - { K49, K51, K53, K55, K57, K59, K61, K63 } \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 } \ } - -#endif diff --git a/keyboards/subatomic/config.h b/keyboards/subatomic/config.h index b19339ad6c..47fcc72fd2 100644 --- a/keyboards/subatomic/config.h +++ b/keyboards/subatomic/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -75,5 +74,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/suihankey/alpha/keymaps/default/keymap.c b/keyboards/suihankey/alpha/keymaps/default/keymap.c index 79c4c3df6e..b682f0f15d 100644 --- a/keyboards/suihankey/alpha/keymaps/default/keymap.c +++ b/keyboards/suihankey/alpha/keymaps/default/keymap.c @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("Layer: "), false); switch (biton32(layer_state)) { case BASE: @@ -80,5 +80,7 @@ void oled_task_user(void) { oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/suihankey/rev1/keymaps/default/keymap.c b/keyboards/suihankey/rev1/keymaps/default/keymap.c index 79c4c3df6e..b682f0f15d 100644 --- a/keyboards/suihankey/rev1/keymaps/default/keymap.c +++ b/keyboards/suihankey/rev1/keymaps/default/keymap.c @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("Layer: "), false); switch (biton32(layer_state)) { case BASE: @@ -80,5 +80,7 @@ void oled_task_user(void) { oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/sx60/sx60.h b/keyboards/sx60/sx60.h index f533d8e899..605b6fe78d 100755 --- a/keyboards/sx60/sx60.h +++ b/keyboards/sx60/sx60.h @@ -1,5 +1,4 @@ -#ifndef SX60_H -#define SX60_H +#pragma once #include "quantum.h" #include <stdint.h> @@ -23,60 +22,60 @@ extern uint8_t mcp23018_status; uint8_t init_mcp23018(void); +#define XXX KC_NO + #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, \ - K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, K44, \ - K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, \ - K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K70, K71 \ + k00, k01, k02, k03, k04, k05, k06, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k45, k48, k49, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, KC_NO, K07, K08, K09, K10, K11, K12, K13, K14 }, \ - { K15, K16, K17, K18, K19, K20, K21, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29 }, \ - { K30, K31, K32, K33, K34, K35, K36, KC_NO, K37, K38, K39, K40, K41, K42, K43, K44 }, \ - { K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K59 }, \ - { K60, K61, K62, K63, K64, K65, KC_NO, KC_NO, K66, K67, K68, K69, K70, K71, KC_NO, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, XXX, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3E }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX, k48, k49, k4A, k4B, k4C, k4D, XXX, XXX } \ } #define LAYOUT_ansi_split_bs_rshift( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, \ - K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, \ - K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, \ - K58, K59, K60, K61, K62, K63, K64, K65, K66, K67, K68, K69 \ + k00, k01, k02, k03, k04, k05, k06, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k45, k48, k49, k4A, k4B, k4C, k4E \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, KC_NO, K07, K08, K09, K10, K11, K12, K13, K14 }, \ - { K15, K16, K17, K18, K19, K20, K21, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29 }, \ - { K30, K31, K32, K33, K34, K35, K36, KC_NO, K37, K38, K39, K40, K41, K42, K43, KC_NO }, \ - { K44, K45, KC_NO, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K57 }, \ - { K58, K59, K60, K61, K62, K63, KC_NO, KC_NO, K64, K65, K66, K67, K68, K69, KC_NO, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, XXX, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2A, k2B, k2C, k2D, k2E, XXX }, \ + { k30, k31, XXX, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3E }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX, k48, k49, k4A, k4B, k4C, k4E, XXX, XXX } \ } #define LAYOUT_ansi_split_bs( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, \ - K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, \ - K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, \ - K57, K58, K59, K60, K61, K62, K63, K64, K65, K66, K67, K68 \ + k00, k01, k02, k03, k04, k05, k06, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k43, k44, k45, k48, k49, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, KC_NO, K07, K08, K09, K10, K11, K12, K13, K14 }, \ - { K15, K16, K17, K18, K19, K20, K21, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29 }, \ - { K30, K31, K32, K33, K34, K35, K36, KC_NO, K37, K38, K39, K40, K41, K42, K43, KC_NO }, \ - { K44, K45, KC_NO, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, KC_NO, KC_NO }, \ - { K57, K58, K59, K60, K61, K62, KC_NO, KC_NO, K63, K64, K65, K66, K67, K68, KC_NO, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, XXX, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2A, k2B, k2C, k2D, k2E, XXX }, \ + { k30, k31, XXX, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX, k48, k49, k4A, k4B, k4C, k4D, XXX, XXX } \ } #define LAYOUT_ansi_split_rshift( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, \ - K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, \ - K29, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, \ - K43, K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, \ - K57, K58, K59, K60, K61, K62, K63, K64, K65, K66, K67, K68 \ + k00, k01, k02, k03, k04, k05, k06, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k45, k48, k49, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, KC_NO, K07, K08, K09, K10, K11, K12, K13, K13 }, \ - { K14, K15, K16, K17, K18, K19, K20, KC_NO, K21, K22, K23, K24, K25, K26, K27, K28 }, \ - { K29, K30, K31, K32, K33, K34, K35, KC_NO, K36, K37, K38, K39, K40, K41, K42, KC_NO }, \ - { K43, K44, KC_NO, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, K56 }, \ - { K57, K58, K59, K60, K61, K62, KC_NO, KC_NO, K63, K64, K65, K66, K67, K68, KC_NO, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, XXX, k08, k09, k0A, k0B, k0C, k0D, k0E, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2A, k2B, k2C, k2D, k2E, XXX }, \ + { k30, k31, XXX, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3E }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX, k48, k49, k4A, k4B, k4C, k4D, XXX, XXX } \ } - -#endif diff --git a/keyboards/takashicompany/endzone34/keymaps/default/keymap.c b/keyboards/takashicompany/endzone34/keymaps/default/keymap.c index eb0ea5029c..e4bcb3625a 100644 --- a/keyboards/takashicompany/endzone34/keymaps/default/keymap.c +++ b/keyboards/takashicompany/endzone34/keymaps/default/keymap.c @@ -77,7 +77,7 @@ static void render_logo(void) { oled_write_raw_P(my_logo, sizeof(my_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { render_logo(); @@ -108,5 +108,6 @@ void oled_task_user(void) { oled_write_ln(count_str, false); + return false; } #endif diff --git a/keyboards/tanuki/config.h b/keyboards/tanuki/config.h index f73ffa79a2..4680753dd4 100644 --- a/keyboards/tanuki/config.h +++ b/keyboards/tanuki/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -76,5 +75,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/tau4/keymaps/default/keymap.c b/keyboards/tau4/keymaps/default/keymap.c index 1a1e5b38ce..6c1b2342a2 100755 --- a/keyboards/tau4/keymaps/default/keymap.c +++ b/keyboards/tau4/keymaps/default/keymap.c @@ -140,7 +140,8 @@ static void render_status(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { render_status(); + return false; } #endif diff --git a/keyboards/tender/macrowo_pad/keymaps/default/keymap.c b/keyboards/tender/macrowo_pad/keymaps/default/keymap.c index fc3a45c982..685fbd7e04 100644 --- a/keyboards/tender/macrowo_pad/keymaps/default/keymap.c +++ b/keyboards/tender/macrowo_pad/keymaps/default/keymap.c @@ -50,7 +50,8 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("OWO\nWhat's\nthis?"), false); + return false; } #endif diff --git a/keyboards/tender/macrowo_pad/keymaps/via/keymap.c b/keyboards/tender/macrowo_pad/keymaps/via/keymap.c index 84c7e3e447..e4e2c131ed 100644 --- a/keyboards/tender/macrowo_pad/keymaps/via/keymap.c +++ b/keyboards/tender/macrowo_pad/keymaps/via/keymap.c @@ -58,7 +58,8 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("OWO\nWhat's\nthis?"), false); + return false; } #endif diff --git a/keyboards/tetris/tetris.h b/keyboards/tetris/tetris.h index f5d13e5c2f..56f4ecbfc7 100755 --- a/keyboards/tetris/tetris.h +++ b/keyboards/tetris/tetris.h @@ -1,20 +1,19 @@ -#ifndef TETRIS_H -#define TETRIS_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT_planck_mit( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311, \ - K400, K401, K410, K411 \ + 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, \ + k40, k41, k4A, k4B \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, K303, K304, K305, KC_NO, K307, K308, K309, K310, K311 }, \ - { K400, K401, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K410, K411 } \ + { 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, XXX, k37, k38, k39, k3A, k3B }, \ + { k40, k41, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k4A, k4B } \ } - -#endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/josjoha/config.h b/keyboards/thevankeyboards/minivan/keymaps/josjoha/config.h index 8098422784..9db4d596de 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/josjoha/config.h +++ b/keyboards/thevankeyboards/minivan/keymaps/josjoha/config.h @@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // place overrides here // Some defines meant to decrease the firmware size. The firmware is otherwise over the maximum (atmega32u4) -//# ifndef LINK_TIME_OPTIMIZATION_ENABLE +//# ifndef LTO_ENABLE //Disable old style macro handling: MACRO() & action_get_macro //# define NO_ACTION_MACRO // This saves 320 bytes //disable calling of action_function() from the fn_actions array (deprecated) @@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Attempts to reduce firmware size: - //#define LINK_TIME_OPTIMIZATION_ENABLE // Did not decrease firmware size when tested on 26 Jan 2020 + //#define LTO_ENABLE // Did not decrease firmware size when tested on 26 Jan 2020 //#define NO_DEBUG //disable debugging (already defined) //#define NO_PRINT JJdisable printing/debugging using hid_listen (already defined) //#define NO_ACTION_LAYER //disable layers (obviously need layers) diff --git a/keyboards/thevankeyboards/roadkit/config.h b/keyboards/thevankeyboards/roadkit/config.h index edb1bd91c9..4572f5e2b9 100644 --- a/keyboards/thevankeyboards/roadkit/config.h +++ b/keyboards/thevankeyboards/roadkit/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -103,5 +102,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/thevankeyboards/roadkit/roadkit.h b/keyboards/thevankeyboards/roadkit/roadkit.h index 62cfabc5eb..f367c88ff4 100644 --- a/keyboards/thevankeyboards/roadkit/roadkit.h +++ b/keyboards/thevankeyboards/roadkit/roadkit.h @@ -1,33 +1,30 @@ -#ifndef ROADKIT_H -#define ROADKIT_H +#pragma once #include "quantum.h" +#define XXX KC_NO + // This is a shortcut to help you visually see your layout. #define LAYOUT_numpad_4x4( \ - K00, K01, K02, K03, \ - K10, K11, K12, \ - K20, K21, K22, K23, \ - K30, K32 \ -) \ -{ \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, KC_NO }, \ - { K20, K21, K22, K23 }, \ - { K30, KC_NO, K32, KC_NO } \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k23, \ + k30, k32 \ +) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, XXX }, \ + { k20, k21, k22, k23 }, \ + { k30, XXX, k32, XXX } \ } #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 } \ + 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 } \ } - -#endif diff --git a/keyboards/tkc/m0lly/keymaps/default/keymap.c b/keyboards/tkc/m0lly/keymaps/default/keymap.c index 846429674f..bb065fa239 100644 --- a/keyboards/tkc/m0lly/keymaps/default/keymap.c +++ b/keyboards/tkc/m0lly/keymaps/default/keymap.c @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("M0lly\n"),false); // Layer status @@ -91,5 +91,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/tkc/m0lly/keymaps/via/keymap.c b/keyboards/tkc/m0lly/keymaps/via/keymap.c index 333e29f4ec..40f75b4579 100644 --- a/keyboards/tkc/m0lly/keymaps/via/keymap.c +++ b/keyboards/tkc/m0lly/keymaps/via/keymap.c @@ -86,7 +86,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("M0lly\n"),false); // Layer Status @@ -115,5 +115,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/tkc/tkc1800/keymaps/default/keymap.c b/keyboards/tkc/tkc1800/keymaps/default/keymap.c index 762d5c4ed6..29a19e680d 100644 --- a/keyboards/tkc/tkc1800/keymaps/default/keymap.c +++ b/keyboards/tkc/tkc1800/keymaps/default/keymap.c @@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("TKC1800\n"),false); // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -102,5 +102,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/tkc/tkc1800/keymaps/smt/keymap.c b/keyboards/tkc/tkc1800/keymaps/smt/keymap.c index dd552cee86..9eceaa5bda 100644 --- a/keyboards/tkc/tkc1800/keymaps/smt/keymap.c +++ b/keyboards/tkc/tkc1800/keymaps/smt/keymap.c @@ -145,7 +145,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("TKC1800\n"),false); // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -173,5 +173,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/tkc/tkc1800/keymaps/via/keymap.c b/keyboards/tkc/tkc1800/keymaps/via/keymap.c index d05a1d420c..74ab1149f6 100644 --- a/keyboards/tkc/tkc1800/keymaps/via/keymap.c +++ b/keyboards/tkc/tkc1800/keymaps/via/keymap.c @@ -98,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("TKC1800\n"),false); // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -126,5 +126,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c b/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c index da8e8b9320..9349af7bcd 100644 --- a/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c +++ b/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c @@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("TKC1800\n"),false); // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -84,5 +84,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c b/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c index cee80a48c7..2ebfe33c3d 100644 --- a/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c +++ b/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c @@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("TKC1800\n"),false); // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -84,5 +84,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/tkw/grandiceps/keymaps/default/keymap.c b/keyboards/tkw/grandiceps/keymaps/default/keymap.c index 14ae9619ea..e3de33616e 100644 --- a/keyboards/tkw/grandiceps/keymaps/default/keymap.c +++ b/keyboards/tkw/grandiceps/keymaps/default/keymap.c @@ -416,12 +416,13 @@ static void print_status_narrow(void) { oled_write_P(PSTR("\n\n"), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } oled_rotation_t oled_init_user(oled_rotation_t rotation) { diff --git a/keyboards/toad/config.h b/keyboards/toad/config.h index e4391437b6..793e740fa3 100644 --- a/keyboards/toad/config.h +++ b/keyboards/toad/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -48,5 +47,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/tokyokeyboard/alix40/config.h b/keyboards/tokyokeyboard/alix40/config.h index 113412e95a..f4b4e6e5ab 100644 --- a/keyboards/tokyokeyboard/alix40/config.h +++ b/keyboards/tokyokeyboard/alix40/config.h @@ -65,9 +65,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define QMK_ESC_INPUT D7 // usually ROW /* Bluetooth */ -#define AdafruitBleResetPin D4 -#define AdafruitBleCSPin B4 -#define AdafruitBleIRQPin E6 #define BATTERY_LEVEL_PIN B6 #define VIA_HAS_BROKEN_KEYCODES diff --git a/keyboards/tokyokeyboard/alix40/rules.mk b/keyboards/tokyokeyboard/alix40/rules.mk index 5fedaed835..7f44c1325c 100644 --- a/keyboards/tokyokeyboard/alix40/rules.mk +++ b/keyboards/tokyokeyboard/alix40/rules.mk @@ -21,6 +21,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # 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 -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/torn/bongocat.c b/keyboards/torn/bongocat.c index 00f5cda6ac..21322c9536 100644 --- a/keyboards/torn/bongocat.c +++ b/keyboards/torn/bongocat.c @@ -34,7 +34,10 @@ static bool show_logo = true; __attribute__((weak)) extern const char PROGMEM bongocat_logo[]; -void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } // clang-format off static const char PROGMEM idle[][FRAME_SIZE] = { @@ -347,7 +350,7 @@ void oled_task_user(void) { oled_off(); anim_timer = 0; show_logo = true; - return; + return false; } if (timer_elapsed32(anim_timer) > FRAME_DURATION) { @@ -369,6 +372,7 @@ void oled_task_user(void) { } current_frame++; } + return false; } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/treadstone48/keymaps/default/keymap.c b/keyboards/treadstone48/keymaps/default/keymap.c index fc53d7e578..f1b37364b5 100644 --- a/keyboards/treadstone48/keymaps/default/keymap.c +++ b/keyboards/treadstone48/keymaps/default/keymap.c @@ -167,13 +167,14 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); } + return false; } #else diff --git a/keyboards/treadstone48/keymaps/like_jis/keymap.c b/keyboards/treadstone48/keymaps/like_jis/keymap.c index b86ab5cdbd..1e90a2416e 100644 --- a/keyboards/treadstone48/keymaps/like_jis/keymap.c +++ b/keyboards/treadstone48/keymaps/like_jis/keymap.c @@ -167,13 +167,14 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); } + return false; } #else diff --git a/keyboards/treadstone48/rev1/keymaps/like_jis_rs/keymap.c b/keyboards/treadstone48/rev1/keymaps/like_jis_rs/keymap.c index a6a52e0678..e1f0835881 100644 --- a/keyboards/treadstone48/rev1/keymaps/like_jis_rs/keymap.c +++ b/keyboards/treadstone48/rev1/keymaps/like_jis_rs/keymap.c @@ -219,13 +219,14 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); } + return false; } #else diff --git a/keyboards/treasure/type9/type9.h b/keyboards/treasure/type9/type9.h index 4e3c235d11..6034416f16 100644 --- a/keyboards/treasure/type9/type9.h +++ b/keyboards/treasure/type9/type9.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TYPE9_H -#define TYPE9_H + +#pragma once #include "quantum.h" @@ -26,15 +26,12 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT( \ - K00, K01, K02, \ - K10, K11, K12, \ - K20, K21, K22 \ -) \ -{ \ - { K00, K01, K02 }, \ - { K10, K11, K12 }, \ - { K20, K21, K22 }, \ +#define LAYOUT( \ + k00, k01, k02, \ + k10, k11, k12, \ + k20, k21, k22 \ +) { \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ + { k20, k21, k22 } \ } - -#endif diff --git a/keyboards/uk78/config.h b/keyboards/uk78/config.h index 272e8401e6..4ac138a9b5 100644 --- a/keyboards/uk78/config.h +++ b/keyboards/uk78/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -63,5 +62,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/uk78/uk78.h b/keyboards/uk78/uk78.h index 32c72d8fde..46e53e7b31 100644 --- a/keyboards/uk78/uk78.h +++ b/keyboards/uk78/uk78.h @@ -1,49 +1,47 @@ -#ifndef UK78_H -#define UK78_H +#pragma once #include "quantum.h" // readability -#define ____ KC_NO +#define ___ KC_NO /* Re: Right Shift * - * Per a conversation I had on reddit with Rozakiin, matrix positions K312, - * K313 and K314 are never in use all together at the same time. + * Per a conversation I had on reddit with Rozakiin, matrix positions k3C, + * k3D and k3E are never in use all together at the same time. * - * A 2.75u-sized right Shift uses position K313, rendering K312 and K314 + * A 2.75u-sized right Shift uses position k3D, rendering k3C and k3E * inaccessible. * * A split right Shift, in either 1.75u/1u or 1u/1.75u (JIS layout) uses - * positions K312 and K314, rendering K313 inaccessible. + * positions k3C and k3E, rendering k3D inaccessible. * * - @noroadsleft * July 13, 2018 */ - #define LAYOUT_all( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, K218, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, \ - K400, K401, K402, K406, K410, K411, K412, K413, K414, K415, K416, K417, K418 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, k1G, k1H, k1I, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, k2F, k2G, k2H, k2I, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, ____, K114, K115, K116, K117, K118 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, ____, K214, K215, K216, K217, K218 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318 }, \ - { K400, K401, K402, ____, ____, ____, K406, ____, ____, ____, K410, K411, K412, K413, K414, K415, K416, K417, K418 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, ___, k1E, k1F, k1G, k1H, k1I }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, ___, k2E, k2F, k2G, k2H, k2I }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I }, \ + { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I } \ } /* LAYOUT_ansi * * This layout uses: * - * - Split Backspace (K013 and K014) - * - ANSI Enter (K214) - * - ANSI 2.25u Left Shift (K300) - * - Compact right Shift (K312 and K314) - * - Two 1.5u modifiers (K410 and K412) between the spacebar and the Left + * - Split Backspace (k0D and k0E) + * - ANSI Enter (k2E) + * - ANSI 2.25u Left Shift (k30) + * - Compact right Shift (k3C and k3E) + * - Two 1.5u modifiers (k4A and k4C) between the spacebar and the Left * arrow key * ,---------------------------------------------------------------------------. * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -_| =+| \||Bsp|Del|P/ |P* |P- | @@ -58,28 +56,28 @@ * `---------------------------------------------------------------------------' */ #define LAYOUT_ansi( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K214, K215, K216, K217, K218, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, K316, K317, K318, \ - K400, K401, K402, K406, K410, K412, K413, K414, K415, K416, K417, K418 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, k1G, k1H, k1I, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2E, k2F, k2G, k2H, k2I, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, k3F, k3G, k3H, k3I, \ + k40, k41, k42, k46, k4A, k4C, k4D, k4E, k4F, k4G, k4H, k4I \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, ____, K114, K115, K116, K117, K118 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, ____, ____, K214, K215, K216, K217, K218 }, \ - { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, K314, K315, K316, K317, K318 }, \ - { K400, K401, K402, ____, ____, ____, K406, ____, ____, ____, K410, ____, K412, K413, K414, K415, K416, K417, K418 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, ___, k1E, k1F, k1G, k1H, k1I }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, ___, k2E, k2F, k2G, k2H, k2I }, \ + { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G, k3H, k3I }, \ + { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4A, ___, k4C, k4D, k4E, k4F, k4G, k4H, k4I } \ } /* LAYOUT_iso * * This layout uses: * - * - Split Backspace (K013 and K014) - * - ISO Enter (K114) - * - ISO Left Shift and 1u (K300 and K301) - * - Compact right Shift (K312 and K314) - * - Two 1.5u modifiers (K410 and K412) between the spacebar and the Left + * - Split Backspace (k0D and k0E) + * - ISO Enter (k1E) + * - ISO Left Shift and 1u (k30 and k31) + * - Compact right Shift (k3C and k3E) + * - Two 1.5u modifiers (k4A and k4C) between the spacebar and the Left * arrow key * ,---------------------------------------------------------------------------. * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -_| =+| \||Bsp|Del|P/ |P* |P- | @@ -94,17 +92,15 @@ * `---------------------------------------------------------------------------' */ #define LAYOUT_iso( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K215, K216, K217, K218, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, K316, K317, K318, \ - K400, K401, K402, K406, K410, K412, K413, K414, K415, K416, K417, K418 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, k1G, k1H, k1I, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2F, k2G, k2H, k2I, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, k3F, k3G, k3H, k3I, \ + k40, k41, k42, k46, k4A, k4C, k4D, k4E, k4F, k4G, k4H, k4I \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, ____, K114, K115, K116, K117, K118 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, ____, ____, K215, K216, K217, K218 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, K314, K315, K316, K317, K318 }, \ - { K400, K401, K402, ____, ____, ____, K406, ____, ____, ____, K410, ____, K412, K413, K414, K415, K416, K417, K418 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, ___, k1E, k1F, k1G, k1H, k1I }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, ___, ___, k2F, k2G, k2H, k2I }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G, k3H, k3I }, \ + { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4A, ___, k4C, k4D, k4E, k4F, k4G, k4H, k4I } \ } - -#endif diff --git a/keyboards/ungodly/launch_pad/keymaps/default/keymap.c b/keyboards/ungodly/launch_pad/keymaps/default/keymap.c index 42b6b397ca..43e0e72bdc 100644 --- a/keyboards/ungodly/launch_pad/keymaps/default/keymap.c +++ b/keyboards/ungodly/launch_pad/keymaps/default/keymap.c @@ -274,7 +274,7 @@ static void render_light_logo(void) { oled_write_raw_P(light_logo, sizeof(light_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { switch (get_highest_layer(layer_state)) { case 0: render_rocket_logo(); @@ -290,5 +290,6 @@ void oled_task_user(void) { oled_write_ln_P(PSTR(" UND"), false); break; } + return false; } #endif diff --git a/keyboards/ungodly/launch_pad/keymaps/via/keymap.c b/keyboards/ungodly/launch_pad/keymaps/via/keymap.c index 083bb8b815..0854715bef 100644 --- a/keyboards/ungodly/launch_pad/keymaps/via/keymap.c +++ b/keyboards/ungodly/launch_pad/keymaps/via/keymap.c @@ -273,7 +273,7 @@ static void render_light_logo(void) { oled_write_raw_P(light_logo, sizeof(light_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { switch (get_highest_layer(layer_state)) { case 0: render_rocket_logo(); @@ -289,5 +289,6 @@ void oled_task_user(void) { oled_write_ln_P(PSTR(" UND"), false); break; } + return false; } #endif diff --git a/keyboards/ungodly/launch_pad/keymaps/warzone/keymap.c b/keyboards/ungodly/launch_pad/keymaps/warzone/keymap.c index 4f856b9770..63f142d913 100644 --- a/keyboards/ungodly/launch_pad/keymaps/warzone/keymap.c +++ b/keyboards/ungodly/launch_pad/keymaps/warzone/keymap.c @@ -249,7 +249,7 @@ static void render_light_logo(void) { oled_write_raw_P(light_logo, sizeof(light_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { switch (get_highest_layer(layer_state)) { case 0: render_rocket_logo(); @@ -265,5 +265,6 @@ void oled_task_user(void) { oled_write_ln_P(PSTR(" UND"), false); break; } + return false; } #endif diff --git a/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/rules.mk b/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/rules.mk index 507f4fcd37..7837adcbd3 100644 --- a/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/rules.mk +++ b/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/rules.mk @@ -22,4 +22,5 @@ ENCODER_ENABLE = no # Enable rotary encoder support AUDIO_ENABLE = no # Audio output KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID diff --git a/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/rules.mk b/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/rules.mk index 30eb89bb7e..2886985a0d 100644 --- a/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/rules.mk +++ b/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/rules.mk @@ -22,5 +22,7 @@ ENCODER_ENABLE = no # Enable rotary encoder support AUDIO_ENABLE = no # Audio output KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID + LAYOUTS = fullsize_ansi fullsize_iso diff --git a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk index 507f4fcd37..7837adcbd3 100644 --- a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk +++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk @@ -22,4 +22,5 @@ ENCODER_ENABLE = no # Enable rotary encoder support AUDIO_ENABLE = no # Audio output KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID diff --git a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/rules.mk b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/rules.mk index 507f4fcd37..7837adcbd3 100644 --- a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/rules.mk +++ b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/rules.mk @@ -22,4 +22,5 @@ ENCODER_ENABLE = no # Enable rotary encoder support AUDIO_ENABLE = no # Audio output KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID diff --git a/keyboards/uzu42/keymaps/default/keymap.c b/keyboards/uzu42/keymaps/default/keymap.c index 54b944b244..fbed8b0638 100644 --- a/keyboards/uzu42/keymaps/default/keymap.c +++ b/keyboards/uzu42/keymaps/default/keymap.c @@ -197,7 +197,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here oled_write_ln(read_layer_state(), false); @@ -209,6 +209,7 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/waldo/keymaps/default_split_shft_bck/config.h b/keyboards/waldo/keymaps/default_split_shft_bck/config.h deleted file mode 100644 index 19a485296e..0000000000 --- a/keyboards/waldo/keymaps/default_split_shft_bck/config.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - - -#endif diff --git a/keyboards/westfoxtrot/aanzee/aanzee.h b/keyboards/westfoxtrot/aanzee/aanzee.h index aa1b916560..1cfa1784fb 100644 --- a/keyboards/westfoxtrot/aanzee/aanzee.h +++ b/keyboards/westfoxtrot/aanzee/aanzee.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef AANZEE_H -#define AANZEE_H + +#pragma once #define ___ KC_NO @@ -28,38 +28,33 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -// readability - #define LAYOUT_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0F, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K46, K49, K4A, K4C, K4D, K4E \ -) \ -{ \ - {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F}, \ - {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, ___}, \ - {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, ___, K2D, K2E, ___}, \ - {K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, ___}, \ - {K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, ___, K4C, K4D, K4E, ___} \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0F, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k46, k49, k4A, k4C, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, ___ }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, k2D, k2E, ___ }, \ + { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, ___ }, \ + { k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, k4A, ___, k4C, k4D, k4E, ___ } \ } + #define LAYOUT_iso( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K46, K49, K4A, K4C, K4D, K4E \ -) \ -{ \ - {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, ___}, \ - {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, ___, K1E, ___}, \ - {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, ___}, \ - {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, ___}, \ - {K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, ___, K4C, K4D, K4E, ___} \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k46, k49, k4A, k4C, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, ___ }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, ___, k1E, ___ }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, ___ }, \ + { k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, k4A, ___, k4C, k4D, k4E, ___ } \ } void matrix_init_user(void); void matrix_scan_user(void); - -#endif diff --git a/keyboards/westfoxtrot/cyclops/cyclops.h b/keyboards/westfoxtrot/cyclops/cyclops.h index d82c56744c..50744929de 100644 --- a/keyboards/westfoxtrot/cyclops/cyclops.h +++ b/keyboards/westfoxtrot/cyclops/cyclops.h @@ -13,11 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CYCLOPS_H -#define CYCLOPS_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + /* This a shortcut to help you visually see your layout. * * The first section contains all of the arguments representing the physical @@ -27,17 +29,15 @@ * represents the switch matrix. */ #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K4D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4E, K2E \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k4D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4E, k2E \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D, k4E } \ } - -#endif diff --git a/keyboards/whitefox/config.h b/keyboards/whitefox/config.h index 1cdac01d07..d2b6639a30 100644 --- a/keyboards/whitefox/config.h +++ b/keyboards/whitefox/config.h @@ -72,9 +72,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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 I2C1_SCL_PIN B0 +#define I2C1_SDA_PIN B1 /* 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/gfxconf.h b/keyboards/whitefox/gfxconf.h deleted file mode 100644 index ca338399d3..0000000000 --- a/keyboards/whitefox/gfxconf.h +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This file has a different license to the rest of the uGFX system. - * You can copy, modify and distribute this file as you see fit. - * You do not need to publish your source modifications to this file. - * The only thing you are not permitted to do is to relicense it - * under a different license. - */ - -/** - * Copy this file into your project directory and rename it as gfxconf.h - * Edit your copy to turn on the uGFX features you want to use. - * The values below are the defaults. - * - * Only remove the comments from lines where you want to change the - * default value. This allows definitions to be included from - * driver makefiles when required and provides the best future - * compatibility for your project. - * - * Please use spaces instead of tabs in this file. - */ - -#ifndef _GFXCONF_H -#define _GFXCONF_H - -#include "common_gfxconf.h" - -#endif /* _GFXCONF_H */ diff --git a/keyboards/whitefox/visualizer.c b/keyboards/whitefox/visualizer.c deleted file mode 100644 index 3846e92789..0000000000 --- a/keyboards/whitefox/visualizer.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright 2017 Fred Sundvik - * - * 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 "visualizer.h" -#include "visualizer_keyframes.h" -#include "default_animations.h" - -static bool initial_update = true; - -// Feel free to modify the animations below, or even add new ones if needed - -void initialize_user_visualizer(visualizer_state_t *state) { - // The brightness will be dynamically adjustable in the future - // But for now, change it here. - initial_update = true; - start_keyframe_animation(&default_startup_animation); -} - -void update_user_visualizer_state(visualizer_state_t *state, visualizer_keyboard_status_t *prev_status) { - // Add more tests, change the colors and layer texts here - // Usually you want to check the high bits (higher layers first) - // because that's the order layers are processed for keypresses - // You can for check for example: - // state->status.layer - // state->status.default_layer - // state->status.leds (see led.h for available statuses) - - if (initial_update) { - initial_update = false; - start_keyframe_animation(&led_test_animation); - } -} - -void user_visualizer_suspend(visualizer_state_t *state) { - start_keyframe_animation(&default_suspend_animation); -} - -void user_visualizer_resume(visualizer_state_t *state) { - initial_update = true; - start_keyframe_animation(&default_startup_animation); -} diff --git a/keyboards/wilba_tech/rama_works_m10_b/rama_works_m10_b.h b/keyboards/wilba_tech/rama_works_m10_b/rama_works_m10_b.h index d55ad598ca..c23a4d003c 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/rama_works_m10_b.h +++ b/keyboards/wilba_tech/rama_works_m10_b/rama_works_m10_b.h @@ -13,17 +13,18 @@ * 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 "quantum.h" +#pragma once -#ifndef RAMA_M10_B_H -#define RAMA_M10_B_H +#include "quantum.h" // This a shortcut to help you visually see your layout. // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -#define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 ) \ - { \ - {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09}, \ - } -#endif // RAMA_M10_B +#define LAYOUT( \ + k00, k01, k02, \ + k03, k04, k05, \ + k06, k07, k08, \ + k09 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 } \ +} diff --git a/keyboards/wilba_tech/rama_works_m6_a/rama_works_m6_a.h b/keyboards/wilba_tech/rama_works_m6_a/rama_works_m6_a.h index d3c7bad332..0a38581450 100644 --- a/keyboards/wilba_tech/rama_works_m6_a/rama_works_m6_a.h +++ b/keyboards/wilba_tech/rama_works_m6_a/rama_works_m6_a.h @@ -13,17 +13,17 @@ * 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 "quantum.h" -#ifndef RAMA_M6_A_H -#define RAMA_M6_A_H +#pragma once + +#include "quantum.h" // This a shortcut to help you visually see your layout. // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -#define LAYOUT( \ - K00, K01, K02, K03, K04, K05) \ - { \ - {K00, K01, K02, K03, K04, K05}, \ - } -#endif // RAMA_M6_A +#define LAYOUT( \ + k00, k01, k02, \ + k03, k04, k05 \ +) { \ + { k00, k01, k02, k03, k04, k05 } \ +} diff --git a/keyboards/work_louder/work_board/work_board.c b/keyboards/work_louder/work_board/work_board.c index a2722a055a..7a8edc1a9e 100644 --- a/keyboards/work_louder/work_board/work_board.c +++ b/keyboards/work_louder/work_board/work_board.c @@ -34,9 +34,14 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { # ifdef RGB_MATRIX_ENABLE # error Cannot run OLED and Per Key RGB at the same time due to pin conflicts # endif -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_90; } +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_90; +} -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } oled_write_P(PSTR("LAYER"), false); oled_write_P(PSTR("Lower"), layer_state_is(3)); oled_write_P(PSTR("Raise"), layer_state_is(4)); @@ -70,6 +75,8 @@ __attribute__((weak)) void oled_task_user(void) { oled_write_P(logo[0][1], !keymap_config.swap_lctl_lgui); oled_write_P(logo[1][1], keymap_config.swap_lctl_lgui); oled_write_P(PSTR(" NKRO"), keymap_config.nkro); + + return false; } #endif diff --git a/keyboards/xbows/numpad/config.h b/keyboards/xbows/numpad/config.h index d3ef6ed9d1..4617ce36af 100644 --- a/keyboards/xbows/numpad/config.h +++ b/keyboards/xbows/numpad/config.h @@ -46,6 +46,5 @@ # define DRIVER_ADDR_1 0b1110111 # define DRIVER_COUNT 1 -# define DRIVER_1_LED_TOTAL 22 -# define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL) +# define DRIVER_LED_TOTAL 22 #endif diff --git a/keyboards/xelus/kangaroo/config.h b/keyboards/xelus/kangaroo/config.h index f6b17c24a3..1d746b342e 100644 --- a/keyboards/xelus/kangaroo/config.h +++ b/keyboards/xelus/kangaroo/config.h @@ -43,8 +43,8 @@ #define LOCKING_RESYNC_ENABLE // I2C OLED defines -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_SCL_PAL_MODE 1 #define I2C1_SDA_PAL_MODE 1 diff --git a/keyboards/xelus/pachi/rgb/config.h b/keyboards/xelus/pachi/rgb/config.h index 9378b2c413..f144db47a2 100644 --- a/keyboards/xelus/pachi/rgb/config.h +++ b/keyboards/xelus/pachi/rgb/config.h @@ -45,8 +45,8 @@ #define LOCKING_RESYNC_ENABLE // I2C setup -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_SCL_PAL_MODE 4 #define I2C1_SDA_PAL_MODE 4 #define I2C1_TIMINGR_PRESC 0U @@ -60,11 +60,10 @@ // RGB Matrix defines #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110001 +//#define DRIVER_ADDR_2 0b0110001 #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 117 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 117 #define ISSI_DRIVER_TOTAL DRIVER_LED_TOTAL #define RGB_MATRIX_STARTUP_VAL 80 diff --git a/keyboards/xelus/valor/rev2/config.h b/keyboards/xelus/valor/rev2/config.h index 2ab581c753..502cc482ec 100644 --- a/keyboards/xelus/valor/rev2/config.h +++ b/keyboards/xelus/valor/rev2/config.h @@ -47,8 +47,8 @@ #define LOCKING_RESYNC_ENABLE // I2C setup -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_SCL_PAL_MODE 4 #define I2C1_SDA_PAL_MODE 4 #define I2C1_TIMINGR_PRESC 0U diff --git a/keyboards/xelus/valor_frl_tkl/config.h b/keyboards/xelus/valor_frl_tkl/config.h index 5319a95bae..c1c08878c0 100644 --- a/keyboards/xelus/valor_frl_tkl/config.h +++ b/keyboards/xelus/valor_frl_tkl/config.h @@ -47,8 +47,8 @@ #define LOCKING_RESYNC_ENABLE // I2C OLED defines -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_SCL_PAL_MODE 1 #define I2C1_SDA_PAL_MODE 1 diff --git a/keyboards/xiudi/xd87/xd87.h b/keyboards/xiudi/xd87/xd87.h index 0dec1f6a14..2d700d7ba4 100644 --- a/keyboards/xiudi/xd87/xd87.h +++ b/keyboards/xiudi/xd87/xd87.h @@ -13,58 +13,57 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef XD87_H -#define XD87_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K3E, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, K4G, \ - K50, K51, K52, K55, K58, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k3E, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G, \ + k50, k51, k52, k55, k58, k5A, k5B, k5C, k5D, k5E, k5F, k5G \ ) { \ -/* 0 1 2 3 4 5 6 7 8 9 A B C D E F G */ \ -/* 0 */ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ -/* 1 */ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ -/* 2 */ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \ -/* 3 */ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO, KC_NO }, \ -/* 4 */ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, K4G }, \ -/* 5 */ { K50, K51, K52, KC_NO, KC_NO, K55, KC_NO, KC_NO, K58, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \ + { k50, k51, k52, XXX, XXX, k55, XXX, XXX, k58, XXX, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \ } #define LAYOUT_tkl_ansi( \ - K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4F, \ - K50, K51, K52, K58, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4F, \ + k50, k51, k52, k58, k5A, k5B, k5C, k5D, k5E, k5F, k5G \ ) { \ - {K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ - {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ - {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \ - {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, KC_NO, KC_NO,KC_NO }, \ - {K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, KC_NO, K4F, KC_NO }, \ - {K50, K51, K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K58, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G } \ + { k00, XXX, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, XXX, XXX, XXX }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, XXX, XXX, k4F, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, XXX, XXX, k58, XXX, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \ } #define LAYOUT_tkl_iso( \ - K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4F, \ - K50, K51, K52, K58, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4F, \ + k50, k51, k52, k58, k5A, k5B, k5C, k5D, k5E, k5F, k5G \ ) { \ - {K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ - {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ - {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E, K2F, K2G }, \ - {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO,KC_NO }, \ - {K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, KC_NO, K4F, KC_NO }, \ - {K50, K51, K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K58, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G } \ + { k00, XXX, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, XXX, XXX, k4F, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, XXX, XXX, k58, XXX, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \ } - -#endif diff --git a/keyboards/xmmx/config.h b/keyboards/xmmx/config.h index c54e432398..773f612089 100644 --- a/keyboards/xmmx/config.h +++ b/keyboards/xmmx/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -48,5 +47,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/xw60/rules.mk b/keyboards/xw60/rules.mk index 5921be64c3..fc192e0593 100644 --- a/keyboards/xw60/rules.mk +++ b/keyboards/xw60/rules.mk @@ -17,6 +17,7 @@ NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: ht BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = 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/yampad/keymaps/default/keymap.c b/keyboards/yampad/keymaps/default/keymap.c index d22eb26177..51d921be3f 100644 --- a/keyboards/yampad/keymaps/default/keymap.c +++ b/keyboards/yampad/keymaps/default/keymap.c @@ -122,7 +122,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; // flips the display 270 degrees } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer"), false); switch (get_highest_layer(layer_state)) { @@ -159,5 +159,7 @@ void oled_task_user(void) { (uint8_t)(rgblight_get_sat() / RGBLIGHT_SAT_STEP), (uint8_t)(rgblight_get_val() / RGBLIGHT_VAL_STEP)); oled_write(led_buf, false); + + return false; } #endif diff --git a/keyboards/yampad/keymaps/traditional/keymap.c b/keyboards/yampad/keymaps/traditional/keymap.c index 57462c050c..78778cc34b 100644 --- a/keyboards/yampad/keymaps/traditional/keymap.c +++ b/keyboards/yampad/keymaps/traditional/keymap.c @@ -122,7 +122,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; // flips the display 270 degrees } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer"), false); switch (get_highest_layer(layer_state)) { @@ -159,5 +159,7 @@ void oled_task_user(void) { (uint8_t)(rgblight_get_sat() / RGBLIGHT_SAT_STEP), (uint8_t)(rgblight_get_val() / RGBLIGHT_VAL_STEP)); oled_write(led_buf, false); + + return false; } #endif diff --git a/keyboards/yampad/keymaps/via/keymap.c b/keyboards/yampad/keymaps/via/keymap.c index d22eb26177..51d921be3f 100644 --- a/keyboards/yampad/keymaps/via/keymap.c +++ b/keyboards/yampad/keymaps/via/keymap.c @@ -122,7 +122,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; // flips the display 270 degrees } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer"), false); switch (get_highest_layer(layer_state)) { @@ -159,5 +159,7 @@ void oled_task_user(void) { (uint8_t)(rgblight_get_sat() / RGBLIGHT_SAT_STEP), (uint8_t)(rgblight_get_val() / RGBLIGHT_VAL_STEP)); oled_write(led_buf, false); + + return false; } #endif diff --git a/keyboards/yampad/yampad.c b/keyboards/yampad/yampad.c index 950a987219..eab218d3b9 100644 --- a/keyboards/yampad/yampad.c +++ b/keyboards/yampad/yampad.c @@ -17,13 +17,14 @@ #include "yampad.h" #if defined(OLED_ENABLE) -__attribute__((weak)) -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_270; // flips the display 270 degrees +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_270; } -__attribute__((weak)) -void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } // Host Keyboard Layer Status oled_write_P(PSTR("Layer"), false); switch (get_highest_layer(layer_state)) { @@ -60,5 +61,7 @@ void oled_task_user(void) { (uint8_t)(rgblight_get_sat() / RGBLIGHT_SAT_STEP), (uint8_t)(rgblight_get_val() / RGBLIGHT_VAL_STEP)); oled_write(led_buf, false); + + return false; } #endif diff --git a/keyboards/yd68/yd68.h b/keyboards/yd68/yd68.h index d5d98dec08..3303bd899e 100644 --- a/keyboards/yd68/yd68.h +++ b/keyboards/yd68/yd68.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef YD68_H -#define YD68_H + +#pragma once #include "quantum.h" @@ -45,18 +45,15 @@ // The second converts the arguments into a two-dimensional array #define LAYOUT_ansi( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k48, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ - k40, k41, k42, k46, k49, k4a, k4b, k4c, k4d, k4e \ -) \ -{ \ - {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, XXX, k0e}, \ - {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e}, \ - {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, k2e}, \ - {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ - {k40, k41, k42, XXX, XXX, XXX, k46, XXX, k48, k49, k4a, k4b, k4c, k4d, k4e} \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k48, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k46, k49, k4A, k4B, k4C, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, XXX, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, k2E }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, k48, k49, k4A, k4B, k4C, k4D, k4E } \ } - -#endif diff --git a/keyboards/yosino58/rev1/split_scomm.h b/keyboards/yosino58/rev1/split_scomm.h index 873d8939d8..16887eb74f 100644 --- a/keyboards/yosino58/rev1/split_scomm.h +++ b/keyboards/yosino58/rev1/split_scomm.h @@ -1,5 +1,4 @@ -#ifndef SPLIT_COMM_H -#define SPLIT_COMM_H +#pragma once #ifndef SERIAL_USE_MULTI_TRANSACTION /* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ @@ -20,5 +19,3 @@ void serial_slave_init(void); int serial_update_buffers(int master_changed); #endif - -#endif /* SPLIT_COMM_H */ diff --git a/keyboards/yosino58/rev1/split_util.h b/keyboards/yosino58/rev1/split_util.h index 687ca19bd3..f593047560 100644 --- a/keyboards/yosino58/rev1/split_util.h +++ b/keyboards/yosino58/rev1/split_util.h @@ -1,5 +1,4 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H +#pragma once #include <stdbool.h> #include "eeconfig.h" @@ -15,5 +14,3 @@ void split_keyboard_setup(void); bool has_usb(void); void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/yosino58/serial.h b/keyboards/yosino58/serial.h index 7e0c0847a4..ac3459c876 100644 --- a/keyboards/yosino58/serial.h +++ b/keyboards/yosino58/serial.h @@ -1,5 +1,4 @@ -#ifndef SOFT_SERIAL_H -#define SOFT_SERIAL_H +#pragma once #include <stdbool.h> @@ -80,5 +79,3 @@ int soft_serial_transaction(int sstd_index); #ifdef SERIAL_USE_MULTI_TRANSACTION int soft_serial_get_and_clean_status(int sstd_index); #endif - -#endif /* SOFT_SERIAL_H */ diff --git a/keyboards/yushakobo/quick17/rgb_matrix_kb.inc b/keyboards/yushakobo/quick17/rgb_matrix_kb.inc index 87738389b7..0232b05ab9 100644 --- a/keyboards/yushakobo/quick17/rgb_matrix_kb.inc +++ b/keyboards/yushakobo/quick17/rgb_matrix_kb.inc @@ -111,7 +111,7 @@ static bool quick17_rgbm_effect (effect_params_t* params) { led_color_set(i, rgb_keymaps[_CONTROL][i]); } } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } #endif diff --git a/keyboards/z12/keymaps/zigotica/oled.c b/keyboards/z12/keymaps/zigotica/oled.c index 4b428a42b1..fa11a3d6c6 100644 --- a/keyboards/z12/keymaps/zigotica/oled.c +++ b/keyboards/z12/keymaps/zigotica/oled.c @@ -37,7 +37,7 @@ static void render_status(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { render_status(); + return false; } - diff --git a/keyboards/zlant/config.h b/keyboards/zlant/config.h index fd5632199b..922c446a01 100755 --- a/keyboards/zlant/config.h +++ b/keyboards/zlant/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -45,5 +44,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/zlant/zlant.h b/keyboards/zlant/zlant.h index 5fbc968ad8..86cd9fef85 100755 --- a/keyboards/zlant/zlant.h +++ b/keyboards/zlant/zlant.h @@ -1,32 +1,29 @@ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" #define LAYOUT_ortho_4x12( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \ + 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, k36, k37, k38, k39, k3A, k3B \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \ + { 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, k36, k37, k38, k39, k3A, k3B } \ } #define LAYOUT_planck_mit( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311 \ + 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 \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, K303, K304, K305, K305, K307, K308, K309, K310, K311 } \ + { 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, k35, k37, k38, k39, k3A, k3B } \ } #define LAYOUT LAYOUT_ortho_4x12 - -#endif diff --git a/keyboards/zoo/wampus/wampus.c b/keyboards/zoo/wampus/wampus.c index 350d47a3ed..aa41c27108 100644 --- a/keyboards/zoo/wampus/wampus.c +++ b/keyboards/zoo/wampus/wampus.c @@ -22,8 +22,7 @@ void board_init(void) { SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); } -oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; } - #endif |