Move miscellaneous defines to data driven (#21382)
This commit is contained in:
parent
9ab16e62f7
commit
023035f462
69 changed files with 103 additions and 236 deletions
|
|
@ -1,20 +0,0 @@
|
|||
/* Copyright 2020 Steven Nguyen
|
||||
*
|
||||
* 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 LEADER_TIMEOUT 250
|
||||
#define LEADER_PER_KEY_TIMING 150
|
||||
|
|
@ -21,6 +21,10 @@
|
|||
"qmk": {
|
||||
"tap_keycode_delay": 16
|
||||
},
|
||||
"leader_key": {
|
||||
"timeout": 250,
|
||||
"timing": true
|
||||
},
|
||||
"processor": "atmega328p",
|
||||
"bootloader": "usbasploader",
|
||||
"layouts": {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ void keyboard_post_init_kb(void){
|
|||
palSetLineMode(BACKLIGHT_PIN, PAL_MODE_ALTERNATE(BACKLIGHT_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING);
|
||||
}
|
||||
|
||||
#define LED_PIN_ON_STATE 1
|
||||
void led_init_ports(void) {
|
||||
palSetLineMode(LED_CAPS_LOCK_PIN, PAL_MODE_OUTPUT_OPENDRAIN | PAL_STM32_PUPDR_FLOATING);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LED_PIN_ON_STATE 1
|
||||
// Inits all indicator LEDs as push-pull outputs
|
||||
void led_init_ports(void) {
|
||||
palSetLineMode(LED1_PIN, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
/* Ensure we jump to bootloader if the RESET keycode was pressed */
|
||||
#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE
|
||||
|
||||
/* Indicator LEDs */
|
||||
#define LED_CAPS_LOCK_PIN B6
|
||||
#define LED_PIN_ON_STATE 0
|
||||
|
|
|
|||
|
|
@ -8,6 +8,10 @@
|
|||
"pid": "0x414C",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"indicators": {
|
||||
"caps_lock": "B6",
|
||||
"on_state": 0
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["A1", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "B2", "B10", "B11", "B12", "B13", "B14"],
|
||||
"rows": ["A2", "B9", "B8", "B5", "B4"]
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
/* Copyright 2019 angelbirth
|
||||
*
|
||||
* 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 "quantum.h"
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
if (led_update_user(led_state)) {
|
||||
writePin(NUM_LOCK_LED_PIN, !led_state.num_lock);
|
||||
writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock);
|
||||
writePin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -17,10 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#pragma once
|
||||
|
||||
#define NUM_LOCK_LED_PIN E6
|
||||
#define CAPS_LOCK_LED_PIN F0
|
||||
#define SCROLL_LOCK_LED_PIN F7
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
|
|
|
|||
|
|
@ -7,6 +7,12 @@
|
|||
"pid": "0x1800",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"indicators": {
|
||||
"caps_lock": "F0",
|
||||
"num_lock": "E6",
|
||||
"scroll_lock": "F7",
|
||||
"on_state": 0
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["F1", "F4", "F5", "F6", "B0", "B2", "B1", "B3", "B7", "C7"],
|
||||
"rows": ["C6", "B6", "B5", "B4", "D7", "D0", "D1", "D2", "D3", "D5", "D4", "D6"]
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
/* Copyright 2020 sh_xguitar
|
||||
*
|
||||
* 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 "quantum.h"
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
if (led_update_user(led_state)) {
|
||||
writePin(NUM_LOCK_LED_PIN, led_state.num_lock);
|
||||
writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock);
|
||||
writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -14,10 +14,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#pragma once
|
||||
|
||||
#define NUM_LOCK_LED_PIN E6
|
||||
#define CAPS_LOCK_LED_PIN F0
|
||||
#define SCROLL_LOCK_LED_PIN F7
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
|
|
|||
|
|
@ -8,6 +8,12 @@
|
|||
"pid": "0x14BC",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"indicators": {
|
||||
"caps_lock": "F0",
|
||||
"num_lock": "E6",
|
||||
"scroll_lock": "F7",
|
||||
"on_state": 0
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["F1", "F4", "F5", "F6", "B0", "B2", "B1", "B3", "B7", "C7"],
|
||||
"rows": ["C6", "B6", "B5", "B4", "D7", "D0", "D1", "D2", "D3", "D5", "D4", "D6"]
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
#define MATRIX_COLS 8
|
||||
|
||||
// HID Liberation Device uses custom matrix code to accomodate a 74HC238 3 to 8 decoder on pins B1, B2 and B3.
|
||||
//#define DIODE_DIRECTION
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
|
|
|
|||
|
|
@ -16,8 +16,5 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define ENCODERS_PAD_A { GP5 }
|
||||
#define ENCODERS_PAD_B { GP4 }
|
||||
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
|
||||
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
|
||||
|
|
|
|||
|
|
@ -9,6 +9,11 @@
|
|||
"vid": "0xCB3A",
|
||||
"device_version": "1.1.0"
|
||||
},
|
||||
"encoder": {
|
||||
"rotary": [
|
||||
{"pin_a": "GP5", "pin_b": "GP4"}
|
||||
]
|
||||
},
|
||||
"matrix_pins": {
|
||||
"direct": [
|
||||
["GP8", "GP7", "GP6"]
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// Cleanup RGB
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
|
||||
#define RGB_MATRIX_TIMEOUT 300000 // 5 minutes (5 * 60 * 1000ms)
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED
|
||||
|
||||
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS // Heatmap, Rain
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
"device_version": "0.1.0"
|
||||
},
|
||||
"rgb_matrix": {
|
||||
"driver": "WS2812"
|
||||
"driver": "WS2812",
|
||||
"timeout": 300000
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["C6", "D7", "E6", "B4", "B5"],
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
/* Copyright 2023 Eason <xiaoxuxk@yeah.net>
|
||||
*
|
||||
* 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 LED_CAPS_LOCK_PIN F0
|
||||
#define LED_PIN_ON_STATE 0
|
||||
|
|
@ -8,6 +8,10 @@
|
|||
"pid": "0x998F",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"indicators": {
|
||||
"caps_lock": "F0",
|
||||
"on_state": 0
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["D6", "D7", "B4", "B5", "B6", "C6", "C7", "E2", "F7", "F6", "F5", "F4", "B0", "B1", "B2", "B3"],
|
||||
"rows": ["D0", "D1", "D2", "D3", "D5", "D4"]
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define WS2812_DI_PIN B0
|
||||
# define RGB_DI_PIN B0
|
||||
# define RGB_MATRIX_LED_COUNT 82
|
||||
|
||||
/* RGB Matrix effect */
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue