diff options
Diffstat (limited to 'keyboards/splitkb')
33 files changed, 223 insertions, 38 deletions
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..2f4f4d091f 100644 --- a/keyboards/splitkb/kyria/keymaps/drashna/rules.mk +++ b/keyboards/splitkb/kyria/keymaps/drashna/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = yes # 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 @@ -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..070d4fec9f 100644 --- a/keyboards/splitkb/zima/rules.mk +++ b/keyboards/splitkb/zima/rules.mk @@ -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) { |