diff options
author | jack <[email protected]> | 2022-11-21 01:15:32 +0000 |
---|---|---|
committer | jack <[email protected]> | 2022-11-21 01:15:32 +0000 |
commit | acd478e817692a7cffb9486602e656f65d6065d2 (patch) | |
tree | 472418aa94bc313af74367a33b4bbf11106665a2 | |
parent | ca2af407e9c031ebe091ac48fc19116b4b21605d (diff) | |
download | qmk_me-acd478e817692a7cffb9486602e656f65d6065d2.tar.gz qmk_me-acd478e817692a7cffb9486602e656f65d6065d2.zip |
update crkbd keymap for new pcbs
misc clean up/additions
-rw-r--r-- | keyboards/tornish/keymaps/default/keymap.c | 24 | ||||
-rw-r--r-- | keyboards/tornish/readme.md | 9 | ||||
-rw-r--r-- | keymaps/crkbd/chconf.h | 7 | ||||
-rw-r--r-- | keymaps/crkbd/config.h | 11 | ||||
-rw-r--r-- | keymaps/crkbd/halconf.h | 4 | ||||
-rw-r--r-- | keymaps/crkbd/keymap.c | 2 | ||||
-rw-r--r-- | keymaps/crkbd/mcuconf.h | 6 | ||||
-rw-r--r-- | keymaps/crkbd/rules.mk | 1 | ||||
-rw-r--r-- | keymaps/ferris/rules.mk | 1 | ||||
-rw-r--r-- | waffle/rle.c | 11 | ||||
-rw-r--r-- | waffle/rules.mk | 1 |
11 files changed, 37 insertions, 40 deletions
diff --git a/keyboards/tornish/keymaps/default/keymap.c b/keyboards/tornish/keymaps/default/keymap.c index 6b159dc..9a4e1c5 100644 --- a/keyboards/tornish/keymaps/default/keymap.c +++ b/keyboards/tornish/keymaps/default/keymap.c @@ -4,22 +4,21 @@ enum macros { DAY = SAFE_RANGE, - CLEAR, - GIVE + CLEAR }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - DAY, KC_Q, KC_W, KC_E, KC_R, KC_T, - CLEAR, KC_A, KC_S, KC_D, KC_F, KC_G, - GIVE, KC_Z, KC_X, KC_C, KC_V, KC_B, + DAY, KC_Q, KC_W, KC_E, KC_R, KC_T, + CLEAR, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ESC, MO(1), KC_SPC, KC_NO ), [1] = LAYOUT( - KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, - 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_TRNS, KC_NO + KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, + 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_TRNS, KC_NO, KC_NO ) }; @@ -39,13 +38,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING("weather clear" SS_TAP(X_ENT)); } break; - case GIVE: - if (record->event.pressed) { - tap_code(KC_SLSH); - wait_ms(500); - SEND_STRING("give box666 " SS_TAP(X_ENT)); - } - break; } return true; } diff --git a/keyboards/tornish/readme.md b/keyboards/tornish/readme.md index 289915c..3224611 100644 --- a/keyboards/tornish/readme.md +++ b/keyboards/tornish/readme.md @@ -1,2 +1,11 @@ ### half a [torn](https://github.com/rtitmuss/torn) keyboard used solely for minecraft :) ![img](https://i.imgur.com/e7zKTK7h.jpeg) + +for whatever reason, this board does not like to flash over usb. +so [flash.sh](flash.sh) does the work for us: +qmk compile -kb tornish -km default > /dev/null +```shell +sed -i '$ d' $FIRMWARE #remove last line from firmware hex file (eof indicator) +cat $BOOTLOADER >> $FIRMWARE #append bootloader hex file to firmware +avrdude -c usbtiny -p atmega328p -U flash:w:$FIRMWARE:i #flash firmware + bootloader over serial +``` diff --git a/keymaps/crkbd/chconf.h b/keymaps/crkbd/chconf.h deleted file mode 100644 index 2041f2e..0000000 --- a/keymaps/crkbd/chconf.h +++ /dev/null @@ -1,7 +0,0 @@ -#define CH_CFG_ST_RESOLUTION 16 -#define CH_CFG_ST_FREQUENCY 10000 -#if __has_include("platforms/chibios/common/configs/chconf.h") -# include_next "platforms/chibios/common/configs/chconf.h" -#else -# include_next "chconf.h" -#endif diff --git a/keymaps/crkbd/config.h b/keymaps/crkbd/config.h index 6025b92..be2c54b 100644 --- a/keymaps/crkbd/config.h +++ b/keymaps/crkbd/config.h @@ -1,12 +1,15 @@ +// Copyright 2022 jack (@waffle87) +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once #undef SOFT_SERIAL_PIN -#define SOFT_SERIAL_PIN D3 +#define SERIAL_USART_FULL_DUPLEX +#define SERIAL_USART_TX_PIN D3 +#define SERIAL_USART_RX_PIN D2 +#define SERIAL_USART_PIN_SWAP #define CRC8_USE_TABLE #define CRC8_OPTIMIZE_SPEED #define SERIAL_USART_SPEED 921600 -#define SERIAL_USART_DRIVER SD1 -#define SERIAL_USART_TX_PAL_MODE 7 #ifdef OLED_ENABLE # define LAYER_ANIM @@ -32,9 +35,9 @@ # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 # define WS2812_PWM_DRIVER PWMD3 # define WS2812_PWM_CHANNEL 3 -# define WS2812_PWM_PAL_MODE 2 # define WS2812_DMA_STREAM STM32_DMA1_STREAM3 # define WS2812_DMA_CHANNEL 3 +# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM3_UP #endif #ifdef ENCODER_ENABLE diff --git a/keymaps/crkbd/halconf.h b/keymaps/crkbd/halconf.h index c144217..8bd0386 100644 --- a/keymaps/crkbd/halconf.h +++ b/keymaps/crkbd/halconf.h @@ -1,5 +1,5 @@ +// Copyright 2022 jack (@waffle87) +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once -// #define HAL_USE_DAC TRUE -#define HAL_USE_PWM TRUE #define HAL_USE_SERIAL TRUE #include_next <halconf.h> diff --git a/keymaps/crkbd/keymap.c b/keymaps/crkbd/keymap.c index 9c82765..46aca4a 100644 --- a/keymaps/crkbd/keymap.c +++ b/keymaps/crkbd/keymap.c @@ -1,3 +1,5 @@ +// Copyright 2022 jack (@waffle87) +// SPDX-License-Identifier: GPL-2.0-or-later #include "waffle.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keymaps/crkbd/mcuconf.h b/keymaps/crkbd/mcuconf.h deleted file mode 100644 index 5acc767..0000000 --- a/keymaps/crkbd/mcuconf.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once -#include_next <mcuconf.h> -#undef STM32_PWM_USE_TIM3 -#define STM32_PWM_USE_TIM3 TRUE -#undef STM32_SERIAL_USE_USART1 -#define STM32_SERIAL_USE_USART1 TRUE diff --git a/keymaps/crkbd/rules.mk b/keymaps/crkbd/rules.mk index a08817e..c7ab7d4 100644 --- a/keymaps/crkbd/rules.mk +++ b/keymaps/crkbd/rules.mk @@ -1,4 +1,3 @@ -MCU = STM32F303 CONVERT_TO = proton_c SERIAL_DRIVER = usart WS2812_DRIVER = pwm diff --git a/keymaps/ferris/rules.mk b/keymaps/ferris/rules.mk index 8b7e3f7..8ed6705 100644 --- a/keymaps/ferris/rules.mk +++ b/keymaps/ferris/rules.mk @@ -1,4 +1,3 @@ BOOTLOADER = atmel-dfu -UNICODE_ENABLE = no RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 diff --git a/waffle/rle.c b/waffle/rle.c index 5dd7044..e631b62 100644 --- a/waffle/rle.c +++ b/waffle/rle.c @@ -1,7 +1,8 @@ // Copyright 2022 jack (@waffle87) // SPDX-License-Identifier: GPL-2.0-or-later #include <stdio.h> -#define FRAME_SIZE 650 +#define FRAME_SIZE 512 +#define FRAME_COUNT 2 void test_decode(unsigned char *rle, size_t rleN, const unsigned char *orig, size_t n) { int cursor = 0, bytes = (unsigned char)rle[0]; @@ -56,19 +57,23 @@ int encode(unsigned char *output, const unsigned char *array, size_t n) { } void print_array(unsigned char *array, int n) { - printf("{"); + int char_count = 0; + printf("{\n"); for (int i = 0; i < n; i++) { if (i == 0) printf("%u", array[i]); else printf(", %u", array[i]); + char_count++; + if (char_count >= n / 2) + printf("\n"), char_count = 0; } printf("}"); } int main() { char output[128 * 32]; - int size = encode(output, frame[0], FRAME_SIZE); + int size = encode(output, frames[1], FRAME_SIZE); printf("static const unsigned char PROGMEM prep[][%d] = {", size); print_array(output, size); printf("};\n"); diff --git a/waffle/rules.mk b/waffle/rules.mk index 5adb7aa..b8feee7 100644 --- a/waffle/rules.mk +++ b/waffle/rules.mk @@ -26,6 +26,7 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) endif ifeq ($(strip $(UNICODE_COMMON)), yes) + UNICODE_ENABLE = no SRC += unicode.c endif |