From 4a87af0e9af046d5fc00d930476920c0c34a57a7 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 29 Nov 2022 11:43:42 -0800 Subject: [Keymap] Drashna updates for 0.19 (#19175) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix up bastardkb boards since blackpill support is officially added. * Check for blackpill version, not elite c. * Add checks in chibiOS config since multiple ARM controllers supported. * Rework rules.mk for keymaps to better handle arm vs avr support * Start moving away from `matrix_*_*` functions. * `housekeeping_task_*` instead of `matrix_scan_*` * `keyboard_(pre|post)_init_*` instead of `matrix_init_*` * Add ℂℴmⅈℂ unicode input method. * Clean up unicode code to be more compact and flexible. * Remove/move Pro Micro LED commands to userspace and better filter them * Fixup OLED code * Use newer quantum keycode functions/preprocessors rather than manual bit manipulation * Make unicode mode render much more compact/simple. * Make qmk secrets more self contained * Remove custom implementation of split watchdog --- .../dilemma/3x5_2/keymaps/drashna/halconf.h | 23 +++++++++++++++++++ .../dilemma/3x5_2/keymaps/drashna/keymap.c | 18 ++++++++++++++- .../dilemma/3x5_2/keymaps/drashna/mcuconf.h | 26 ++++++++++++++++++++++ 3 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/halconf.h create mode 100644 keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/mcuconf.h (limited to 'keyboards/bastardkb/dilemma') diff --git a/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/halconf.h b/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/halconf.h new file mode 100644 index 0000000000..135994a43c --- /dev/null +++ b/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/halconf.h @@ -0,0 +1,23 @@ +/** + * Copyright 2022 Charly Delay (@0xcharly) + * + * 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 . + */ + +#pragma once + +#define HAL_USE_SPI TRUE +#define HAL_USE_I2C TRUE + +#include_next "halconf.h" diff --git a/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/keymap.c b/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/keymap.c index 9cd21c3c1f..d4aa71440d 100644 --- a/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/keymap.c +++ b/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/keymap.c @@ -112,7 +112,7 @@ bool oled_task_keymap(void) { }; oled_write_raw_P(header_image, sizeof(header_image)); oled_set_cursor(7, 0); - oled_write_P(PSTR("Rock On"), true); + oled_write_P(PSTR("Dilemma"), true); render_default_layer_state(1, 1); render_layer_state(1, 2); @@ -158,3 +158,19 @@ bool oled_task_keymap(void) { return false; } #endif + + +#ifdef SWAP_HANDS_ENABLE +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{0, 4}, {3, 4}, {2, 4}, {5, 4}, {4, 4}}, + {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}}, + {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}}, + {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}}, + /* Right hand, matrix positions */ + {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}}, + {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}}, + {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}}, + {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}}, + }; +#endif diff --git a/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/mcuconf.h b/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/mcuconf.h new file mode 100644 index 0000000000..f9aa894665 --- /dev/null +++ b/keyboards/bastardkb/dilemma/3x5_2/keymaps/drashna/mcuconf.h @@ -0,0 +1,26 @@ +/** + * Copyright 2022 Charly Delay (@0xcharly) + * + * 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 . + */ + +#pragma once + +#include_next "mcuconf.h" + +#undef RP_SPI_USE_SPI1 +#define RP_SPI_USE_SPI1 TRUE + +#undef RP_I2C_USE_I2C1 +#define RP_I2C_USE_I2C1 TRUE -- cgit v1.2.3