diff options
Diffstat (limited to 'keyboards/horrortroll')
55 files changed, 232 insertions, 311 deletions
diff --git a/keyboards/horrortroll/caticorn/config.h b/keyboards/horrortroll/caticorn/config.h index bef1b690ab..f4c3931c70 100644 --- a/keyboards/horrortroll/caticorn/config.h +++ b/keyboards/horrortroll/caticorn/config.h @@ -16,7 +16,6 @@ #pragma once -#include "config_common.h" /* key matrix size */ #define MATRIX_ROWS 6 diff --git a/keyboards/horrortroll/caticorn/rev1/hotswap/info.json b/keyboards/horrortroll/caticorn/rev1/hotswap/info.json index 2309889e05..bd11a97d81 100644 --- a/keyboards/horrortroll/caticorn/rev1/hotswap/info.json +++ b/keyboards/horrortroll/caticorn/rev1/hotswap/info.json @@ -8,6 +8,7 @@ "pid": "0x6002", "device_version": "0.0.1" }, + "community_layouts": ["tkl_f13_ansi"], "layouts": { "LAYOUT_tkl_f13_ansi": { "layout": [ diff --git a/keyboards/horrortroll/caticorn/rev1/hotswap/rules.mk b/keyboards/horrortroll/caticorn/rev1/hotswap/rules.mk index f35b29bb41..f834a21af4 100644 --- a/keyboards/horrortroll/caticorn/rev1/hotswap/rules.mk +++ b/keyboards/horrortroll/caticorn/rev1/hotswap/rules.mk @@ -19,6 +19,4 @@ AUDIO_ENABLE = no # Audio output # EEPROM driver EEPROM_DRIVER = wear_leveling -WEAR_LEVELING_DRIVER = rp2040_flash - -LAYOUTS = tkl_f13_ansi
\ No newline at end of file +WEAR_LEVELING_DRIVER = rp2040_flash
\ No newline at end of file diff --git a/keyboards/horrortroll/caticorn/rev1/solder/info.json b/keyboards/horrortroll/caticorn/rev1/solder/info.json index 9964954aaf..9abad10591 100644 --- a/keyboards/horrortroll/caticorn/rev1/solder/info.json +++ b/keyboards/horrortroll/caticorn/rev1/solder/info.json @@ -8,6 +8,7 @@ "pid": "0x6001", "device_version": "0.0.1" }, + "community_layouts": ["tkl_ansi", "tkl_ansi_split_bs_rshift", "tkl_ansi_tsangan", "tkl_ansi_tsangan_split_bs_rshift", "tkl_f13_ansi", "tkl_f13_ansi_split_bs_rshift", "tkl_f13_ansi_tsangan", "tkl_f13_ansi_tsangan_split_bs_rshift", "tkl_iso", "tkl_iso_split_bs_rshift", "tkl_iso_tsangan", "tkl_iso_tsangan_split_bs_rshift", "tkl_f13_iso", "tkl_f13_iso_split_bs_rshift", "tkl_f13_iso_tsangan", "tkl_f13_iso_tsangan_split_bs_rshift"], "layouts": { "LAYOUT_all": { "layout": [ diff --git a/keyboards/horrortroll/caticorn/rev1/solder/rules.mk b/keyboards/horrortroll/caticorn/rev1/solder/rules.mk index 4540766805..104bb7d0c3 100644 --- a/keyboards/horrortroll/caticorn/rev1/solder/rules.mk +++ b/keyboards/horrortroll/caticorn/rev1/solder/rules.mk @@ -20,5 +20,3 @@ AUDIO_ENABLE = no # Audio output # EEPROM driver EEPROM_DRIVER = wear_leveling WEAR_LEVELING_DRIVER = rp2040_flash - -LAYOUTS = tkl_ansi tkl_ansi_split_bs_rshift tkl_ansi_tsangan tkl_ansi_tsangan_split_bs_rshift tkl_f13_ansi tkl_f13_ansi_split_bs_rshift tkl_f13_ansi_tsangan tkl_f13_ansi_tsangan_split_bs_rshift tkl_iso tkl_iso_split_bs_rshift tkl_iso_tsangan tkl_iso_tsangan_split_bs_rshift tkl_f13_iso tkl_f13_iso_split_bs_rshift tkl_f13_iso_tsangan tkl_f13_iso_tsangan_split_bs_rshift diff --git a/keyboards/horrortroll/chinese_pcb/black_e65/config.h b/keyboards/horrortroll/chinese_pcb/black_e65/config.h index 6ee3311f22..8855ac73d3 100644 --- a/keyboards/horrortroll/chinese_pcb/black_e65/config.h +++ b/keyboards/horrortroll/chinese_pcb/black_e65/config.h @@ -16,7 +16,6 @@ #pragma once -#include "config_common.h" /* Key matrix size */ #define MATRIX_ROWS 5 diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/config.h b/keyboards/horrortroll/chinese_pcb/devil68_pro/config.h index 3c972e748c..36292c7d2a 100644 --- a/keyboards/horrortroll/chinese_pcb/devil68_pro/config.h +++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/config.h @@ -16,7 +16,6 @@ #pragma once -#include "config_common.h" /* Key matrix size */ #define MATRIX_ROWS 5 diff --git a/keyboards/horrortroll/handwired_k552/chconf.h b/keyboards/horrortroll/handwired_k552/board.h index 4ad4a3be34..edd68f15ae 100644 --- a/keyboards/horrortroll/handwired_k552/chconf.h +++ b/keyboards/horrortroll/handwired_k552/board.h @@ -1,4 +1,4 @@ -/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll> +/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll> * * 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,13 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* - * This file was auto-generated by: - * `qmk chibios-confmigrate -i keyboards/horrortroll/handwired_k552/chconf.h -r platforms/chibios/common/configs/chconf.h` - */ - -#pragma once - -#define CH_CFG_ST_TIMEDELTA 0 +#include_next <board.h> -#include_next <chconf.h> +#undef STM32F103xB +#define STM32F103xE diff --git a/keyboards/horrortroll/handwired_k552/boards/k552/board.c b/keyboards/horrortroll/handwired_k552/boards/k552/board.c deleted file mode 100644 index 65269520ea..0000000000 --- a/keyboards/horrortroll/handwired_k552/boards/k552/board.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include <hal.h> - -/** - * @brief PAL setup. - * @details Digital I/O ports static configuration as defined in @p board.h. - * This variable is used by the HAL when initializing the PAL driver. - */ -#if HAL_USE_PAL || defined(__DOXYGEN__) -const PALConfig pal_default_config = -{ - {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, - {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, - {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, - {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, -}; -#endif - -/* - * Early initialization code. - * This initialization must be performed just after stack setup and before - * any other initialization. - */ -void __early_init(void) { - stm32_clock_init(); - -} - -/* - * Board-specific initialization code. - */ -void boardInit(void) { - -} diff --git a/keyboards/horrortroll/handwired_k552/boards/k552/board.h b/keyboards/horrortroll/handwired_k552/boards/k552/board.h deleted file mode 100644 index f9b38b0caf..0000000000 --- a/keyboards/horrortroll/handwired_k552/boards/k552/board.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _BOARD_H_ -#define _BOARD_H_ - -/* - * Board identifier. - */ -#define BOARD_K552 -#define BOARD_NAME "K552 keyboard" - -/* - * Board frequencies. - */ -#define STM32_LSECLK 32768 -#define STM32_HSECLK 8000000 - -/* - * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. - * - * Only xC (256KB Flash) is defined, but it's identical to the - * x8 version (64KB Flash) except for the Flash region size in the - * linker script. For x8 parts use xC here and change to the x8 linker - * script in the project Makefile. - */ -#pragma once -#include_next <board.h> -#undef STM32F103xB -#define STM32F103xE - -/* - * IO pins assignments - * - * numbering is sorted by onboard/connectors, as from the schematics in - * http://www.vcc-gnd.com/read.php?tid=369 - */ - -/* on-board */ -#define GPIOA_USBDM 11 // pin 8 -#define GPIOA_USBDP 12 // pin 9 - -#define GPIOC_OSC32_IN 14 -#define GPIOC_OSC32_OUT 15 - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * - * The digits have the following meaning: - * 0 - Analog input. - * 1 - Push Pull output 10MHz. - * 2 - Push Pull output 2MHz. - * 3 - Push Pull output 50MHz. - * 4 - Digital input. - * 5 - Open Drain output 10MHz. - * 6 - Open Drain output 2MHz. - * 7 - Open Drain output 50MHz. - * 8 - Digital input with PullUp or PullDown resistor depending on ODR. - * 9 - Alternate Push Pull output 10MHz. - * A - Alternate Push Pull output 2MHz. - * B - Alternate Push Pull output 50MHz. - * C - Reserved. - * D - Alternate Open Drain output 10MHz. - * E - Alternate Open Drain output 2MHz. - * F - Alternate Open Drain output 50MHz. - * Please refer to the STM32 Reference Manual for details. - */ - -/* - * Port A setup. - * Everything input with pull-up except: - */ -#define VAL_GPIOACRL 0x88888888 /* PA7...PA0 */ -#define VAL_GPIOACRH 0x88888888 /* PA15...PA8 */ -#define VAL_GPIOAODR 0xFFFFFFFF - -/* - * Port B setup. - * Everything input with pull-up except: - */ -#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ -#define VAL_GPIOBCRH 0x88888888 /* PB15...PB8 */ -#define VAL_GPIOBODR 0xFFFFFFFF - -/* - * Port C setup. - * Everything input with pull-up except: - */ -#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ -#define VAL_GPIOCCRH 0x88888888 /* PC15...PC8 */ -#define VAL_GPIOCODR 0xFFFFFFFF - -/* - * Port D setup. - * Everything input with pull-up except: - * PD0 - Normal input (XTAL). - * PD1 - Normal input (XTAL). - */ -#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ -#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ -#define VAL_GPIODODR 0xFFFFFFFF - -/* - * Port E setup. - * Everything input with pull-up except: - */ -#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ -#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ -#define VAL_GPIOEODR 0xFFFFFFFF - -/* - * USB bus activation macro, required by the USB driver. - */ -#define usb_lld_connect_bus(usbp) /* always connected */ - -/* - * USB bus de-activation macro, required by the USB driver. - */ -#define usb_lld_disconnect_bus(usbp) /* always connected */ - -#if !defined(_FROM_ASM_) -#ifdef __cplusplus -extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus -} -#endif -#endif /* _FROM_ASM_ */ - -#endif /* _BOARD_H_ */ diff --git a/keyboards/horrortroll/handwired_k552/boards/k552/board.mk b/keyboards/horrortroll/handwired_k552/boards/k552/board.mk deleted file mode 100644 index 15831c4f15..0000000000 --- a/keyboards/horrortroll/handwired_k552/boards/k552/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/k552/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/k552 diff --git a/keyboards/horrortroll/handwired_k552/config.h b/keyboards/horrortroll/handwired_k552/config.h index b26e7489a6..da775fd5b5 100644 --- a/keyboards/horrortroll/handwired_k552/config.h +++ b/keyboards/horrortroll/handwired_k552/config.h @@ -1,4 +1,4 @@ -/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll> +/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,15 +16,14 @@ #pragma once -#include "config_common.h" /* Key matrix size */ #define MATRIX_ROWS 6 #define MATRIX_COLS 17 -/* key matrix pins */ +/* Key matrix pins */ #define MATRIX_ROW_PINS { C12, C10, A10, A8, C8, C9 } -#define MATRIX_COL_PINS { B15, C6, C7, A3, A1, C3, C1, B14, B13, A9, B3, B4, A0, C11, A2, C0, C2 } +#define MATRIX_COL_PINS { B15, C6, C7, A3, A1, C3, C1, B14, B13, A9, B3, B4, A0, C11, C4, C0, C2 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL @@ -32,24 +31,26 @@ /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 -/* Bootmagic reset */ -#define BOOTMAGIC_LITE_ROW 4 -#define BOOTMAGIC_LITE_COLUMN 6 - /* Forcing to use NKRO instead 6KRO */ #define FORCE_NKRO -/* EEPROM size */ -#define EEPROM_PAGE_SIZE -#define FEE_PAGE_SIZE 0x800 -#define FEE_PAGE_COUNT 4 +// SPI configuration +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A5 +#define SPI_MOSI_PIN A7 +#define SPI_MISO_PIN A6 + +// Flash configuration +#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN A2 +#define EXTERNAL_FLASH_SPI_CLOCK_DIVISOR 16 +#define EXTERNAL_FLASH_PAGE_SIZE 256 +#define EXTERNAL_FLASH_SECTOR_SIZE 4096 +#define EXTERNAL_FLASH_BLOCK_SIZE 4096 +#define EXTERNAL_FLASH_SIZE (256 * 1024) // 2M-bit flash size -#define FEE_MCU_FLASH_SIZE_IGNORE_CHECK -#define FEE_MCU_FLASH_SIZE \ -({ \ - uint16_t flash_size = *(uint16_t*)FLASHSIZE_BASE; \ - (flash_size <= 512) ? flash_size : 512; \ -}) +// Wear-leveling driver configuration +#define WEAR_LEVELING_LOGICAL_SIZE 1024 +#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) #ifdef OLED_ENABLE /* Mapping I2C2 for OLED */ diff --git a/keyboards/horrortroll/handwired_k552/halconf.h b/keyboards/horrortroll/handwired_k552/halconf.h index 2ef68f8fb2..a8be303915 100644 --- a/keyboards/horrortroll/handwired_k552/halconf.h +++ b/keyboards/horrortroll/handwired_k552/halconf.h @@ -1,4 +1,4 @@ -/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll> +/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll> * * 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 @@ -23,4 +23,8 @@ #define HAL_USE_I2C TRUE +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + #include_next <halconf.h> diff --git a/keyboards/horrortroll/handwired_k552/handwired_k552.c b/keyboards/horrortroll/handwired_k552/handwired_k552.c index 03bbad461f..f4ce6d4c86 100644 --- a/keyboards/horrortroll/handwired_k552/handwired_k552.c +++ b/keyboards/horrortroll/handwired_k552/handwired_k552.c @@ -1,4 +1,4 @@ -/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll> +/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll> * * 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 @@ -17,7 +17,7 @@ #include "handwired_k552.h" // OLED animation -#include "lib/logo.c" +#include "lib/logo.h" #ifdef RGB_MATRIX_ENABLE led_config_t g_led_config = { { diff --git a/keyboards/horrortroll/handwired_k552/handwired_k552.h b/keyboards/horrortroll/handwired_k552/handwired_k552.h index 2a537714e3..7811c0e82e 100644 --- a/keyboards/horrortroll/handwired_k552/handwired_k552.h +++ b/keyboards/horrortroll/handwired_k552/handwired_k552.h @@ -1,4 +1,4 @@ -/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll> +/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll> * * 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 diff --git a/keyboards/horrortroll/handwired_k552/info.json b/keyboards/horrortroll/handwired_k552/info.json index 825493738a..150973eaf0 100644 --- a/keyboards/horrortroll/handwired_k552/info.json +++ b/keyboards/horrortroll/handwired_k552/info.json @@ -8,6 +8,7 @@ "pid": "0x5104", "device_version": "0.0.1" }, + "community_layouts": ["tkl_ansi"], "layouts": { "LAYOUT_tkl_ansi": { "layout": [ diff --git a/keyboards/horrortroll/handwired_k552/keymaps/default/keymap.c b/keyboards/horrortroll/handwired_k552/keymaps/default/keymap.c index 6e06466d22..3208b56544 100644 --- a/keyboards/horrortroll/handwired_k552/keymaps/default/keymap.c +++ b/keyboards/horrortroll/handwired_k552/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll> +/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll> * * 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 @@ -88,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ [_FN] = LAYOUT_tkl_ansi( - QK_BOOT, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, KC_WSCH, RGB_RMOD, RGB_MOD, RGB_TOG, + QK_BOOT, KC_MSEL, KC_VOLD, KC_VOLU, KC_MUTE, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MAIL, KC_WHOM, KC_CALC, KC_WSCH, RGB_RMOD, RGB_MOD, RGB_TOG, NK_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_C_E, _______, _______, _______, G1_HUD, G1_HUI, G1_SAD |