From ee126bfe7358e142cef9984c294dac0356b16850 Mon Sep 17 00:00:00 2001 From: Gondolindrim Date: Mon, 9 Jan 2023 14:13:26 -0300 Subject: [PATCH] Add caps lock indicator capabilities to M75S Signed-off-by: Gondolindrim --- keyboards/mode/m75s/chconf.h | 30 ---------------------------- keyboards/mode/m75s/config.h | 37 +++++++++++------------------------ keyboards/mode/m75s/halconf.h | 3 ++- keyboards/mode/m75s/m75s.c | 6 +----- keyboards/mode/m75s/m75s.h | 2 +- keyboards/mode/m75s/mcuconf.h | 4 ++-- keyboards/mode/m75s/rules.mk | 13 ++++++------ 7 files changed, 24 insertions(+), 71 deletions(-) delete mode 100644 keyboards/mode/m75s/chconf.h diff --git a/keyboards/mode/m75s/chconf.h b/keyboards/mode/m75s/chconf.h deleted file mode 100644 index dedd4d5e28f5..000000000000 --- a/keyboards/mode/m75s/chconf.h +++ /dev/null @@ -1,30 +0,0 @@ -/* 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 . - */ - -/* - * This file was auto-generated by: - * `qmk chibios-confmigrate -i keyboards/acheron/austin/chconf.h -r platforms/chibios/common/configs/chconf.h` - */ - -#pragma once - -#define CH_CFG_ST_FREQUENCY 10000 - -#define CH_CFG_OPTIMIZE_SPEED FALSE - -#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE - -#include_next diff --git a/keyboards/mode/m75s/config.h b/keyboards/mode/m75s/config.h index 5da8543e95ec..983ab350955e 100644 --- a/keyboards/mode/m75s/config.h +++ b/keyboards/mode/m75s/config.h @@ -20,9 +20,9 @@ along with this program. If not, see . /* key matrix size */ #define MATRIX_ROWS 7 #define MATRIX_COLS 16 - //C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + // C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 #define MATRIX_COL_PINS { C8, A8, A10, B13, B12, B10, B1, C10, C11, D2, C12, B3, B4, B5, B8, B9 } - //R0, R1, R2, R3, R4, R5 , R6 + // R0, R1, R2, R3, R4, R5 , R6 #define MATRIX_ROW_PINS { C5, B0, B14, B15, C7 , C9 , A15} #define DIODE_DIRECTION COL2ROW @@ -37,28 +37,13 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#define EEPROM_I2C_24LC128 -//#define I2C1_CLOCK_SPEED 400000 -//#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 +#define BACKLIGHT_PIN C6 +#define BACKLIGHT_LEVELS 20 +#define BACKLIGHT_CAPS_LOCK +#define BACKLIGHT_DEFAULT_LEVEL 20 +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 1 +#define BACKLIGHT_PAL_MODE 2 -#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE - -/* - * 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 TAP_CODE_DELAY 50 - -#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 16383 // Overriding to use more EEPROM +#define WEAR_LEVELING_LOGICAL_SIZE 2048 +#define WEAR_LEVELING_BACKING_SIZE 4096 diff --git a/keyboards/mode/m75s/halconf.h b/keyboards/mode/m75s/halconf.h index 6c53f594c769..5f1a1aa2be1a 100644 --- a/keyboards/mode/m75s/halconf.h +++ b/keyboards/mode/m75s/halconf.h @@ -21,6 +21,7 @@ #pragma once -#define HAL_USE_I2C TRUE +#define HAL_USE_PWM TRUE +#define HAL_USE_PAL TRUE #include_next diff --git a/keyboards/mode/m75s/m75s.c b/keyboards/mode/m75s/m75s.c index bd323a435beb..87e643653cc4 100644 --- a/keyboards/mode/m75s/m75s.c +++ b/keyboards/mode/m75s/m75s.c @@ -1,5 +1,5 @@ /* - Copyright 2020 Álvaro "Gondolindrim" Volpato + Copyright 2022 Gondolindrim 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,7 +16,3 @@ along with this program. If not, see . */ #include "m75s.h" - -void board_init(void) { - setPinInput(B10); -} diff --git a/keyboards/mode/m75s/m75s.h b/keyboards/mode/m75s/m75s.h index 7306874a2325..7ce003dfe5ec 100644 --- a/keyboards/mode/m75s/m75s.h +++ b/keyboards/mode/m75s/m75s.h @@ -1,5 +1,5 @@ /* -Copyright 2020 Álvaro "Gondolindrim" Volpato +Copyright 2022 Gondolindrim 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/mode/m75s/mcuconf.h b/keyboards/mode/m75s/mcuconf.h index dd68a8c1e778..0cc9c2023d70 100644 --- a/keyboards/mode/m75s/mcuconf.h +++ b/keyboards/mode/m75s/mcuconf.h @@ -23,5 +23,5 @@ #include_next -#undef STM32_I2C_USE_I2C1 -#define STM32_I2C_USE_I2C1 TRUE +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 TRUE diff --git a/keyboards/mode/m75s/rules.mk b/keyboards/mode/m75s/rules.mk index 76752ec1b38f..128beaa0a6fe 100644 --- a/keyboards/mode/m75s/rules.mk +++ b/keyboards/mode/m75s/rules.mk @@ -9,15 +9,16 @@ BOOTLOADER = stm32-dfu # 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 +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 NKRO_ENABLE = no # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output -EEPROM_DRIVER = i2c +EEPROM_DRIVER = wear_leveling +WEAR_LEVELING_DRIVER = legacy LTO_ENABLE = yes # Enter lower-power sleep mode when on the ChibiOS idle thread