Skip to content

Commit 7b5dee4

Browse files
authored
Add caps lock indicator capabilities to M75S (#19552)
1 parent 609b23a commit 7b5dee4

File tree

7 files changed

+24
-71
lines changed

7 files changed

+24
-71
lines changed

keyboards/mode/m75s/chconf.h

-30
This file was deleted.

keyboards/mode/m75s/config.h

+11-26
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2020
/* key matrix size */
2121
#define MATRIX_ROWS 7
2222
#define MATRIX_COLS 16
23-
//C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15
23+
// C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15
2424
#define MATRIX_COL_PINS { C8, A8, A10, B13, B12, B10, B1, C10, C11, D2, C12, B3, B4, B5, B8, B9 }
25-
//R0, R1, R2, R3, R4, R5 , R6
25+
// R0, R1, R2, R3, R4, R5 , R6
2626
#define MATRIX_ROW_PINS { C5, B0, B14, B15, C7 , C9 , A15}
2727
#define DIODE_DIRECTION COL2ROW
2828

@@ -37,28 +37,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
3737
/* Locking resynchronize hack */
3838
#define LOCKING_RESYNC_ENABLE
3939

40-
#define EEPROM_I2C_24LC128
41-
//#define I2C1_CLOCK_SPEED 400000
42-
//#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2
40+
#define BACKLIGHT_PIN C6
41+
#define BACKLIGHT_LEVELS 20
42+
#define BACKLIGHT_CAPS_LOCK
43+
#define BACKLIGHT_DEFAULT_LEVEL 20
44+
#define BACKLIGHT_PWM_DRIVER PWMD3
45+
#define BACKLIGHT_PWM_CHANNEL 1
46+
#define BACKLIGHT_PAL_MODE 2
4347

44-
#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE
45-
46-
/*
47-
* Feature disable options
48-
* These options are also useful to firmware size reduction.
49-
*/
50-
51-
/* disable debug print */
52-
//#define NO_DEBUG
53-
54-
/* disable print */
55-
//#define NO_PRINT
56-
57-
/* disable action features */
58-
//#define NO_ACTION_LAYER
59-
//#define NO_ACTION_TAPPING
60-
//#define NO_ACTION_ONESHOT
61-
62-
#define TAP_CODE_DELAY 50
63-
64-
#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 16383 // Overriding to use more EEPROM
48+
#define WEAR_LEVELING_LOGICAL_SIZE 2048
49+
#define WEAR_LEVELING_BACKING_SIZE 4096

keyboards/mode/m75s/halconf.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#pragma once
2323

24-
#define HAL_USE_I2C TRUE
24+
#define HAL_USE_PWM TRUE
25+
#define HAL_USE_PAL TRUE
2526

2627
#include_next <halconf.h>

keyboards/mode/m75s/m75s.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2020 Álvaro "Gondolindrim" Volpato <[email protected]>
2+
Copyright 2022 Gondolindrim <[email protected]>
33
44
This program is free software: you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -16,7 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
*/
1717

1818
#include "m75s.h"
19-
20-
void board_init(void) {
21-
setPinInput(B10);
22-
}

keyboards/mode/m75s/m75s.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2020 Álvaro "Gondolindrim" Volpato <[email protected]>
2+
Copyright 2022 Gondolindrim <[email protected]>
33
44
This program is free software: you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by

keyboards/mode/m75s/mcuconf.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@
2323

2424
#include_next <mcuconf.h>
2525

26-
#undef STM32_I2C_USE_I2C1
27-
#define STM32_I2C_USE_I2C1 TRUE
26+
#undef STM32_PWM_USE_TIM3
27+
#define STM32_PWM_USE_TIM3 TRUE

keyboards/mode/m75s/rules.mk

+7-6
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ BOOTLOADER = stm32-dfu
99
# change yes to no to disable
1010
#
1111
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
12-
MOUSEKEY_ENABLE = no # Mouse keys
13-
EXTRAKEY_ENABLE = yes # Audio control and System control
14-
CONSOLE_ENABLE = no # Console for debug
15-
COMMAND_ENABLE = no # Commands for debug and configuration
12+
MOUSEKEY_ENABLE = no # Mouse keys
13+
EXTRAKEY_ENABLE = yes # Audio control and System control
14+
CONSOLE_ENABLE = no # Console for debug
15+
COMMAND_ENABLE = no # Commands for debug and configuration
1616
NKRO_ENABLE = no # Enable N-Key Rollover
17-
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
17+
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
1818
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
1919
AUDIO_ENABLE = no # Audio output
20-
EEPROM_DRIVER = i2c
20+
EEPROM_DRIVER = wear_leveling
21+
WEAR_LEVELING_DRIVER = legacy
2122
LTO_ENABLE = yes
2223

2324
# Enter lower-power sleep mode when on the ChibiOS idle thread

0 commit comments

Comments
 (0)