Onekey: migrate some stuff to data driven (#18502)
This commit is contained in:
parent
bad8c67189
commit
45b5ed5c6e
69 changed files with 259 additions and 335 deletions
|
|
@ -18,13 +18,9 @@
|
|||
|
||||
#include "config_common.h"
|
||||
|
||||
#define MATRIX_COL_PINS { B0 }
|
||||
#define MATRIX_ROW_PINS { A7 }
|
||||
|
||||
#define BACKLIGHT_PIN A0
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD5
|
||||
#define BACKLIGHT_PWM_CHANNEL 1
|
||||
|
||||
#define RGB_DI_PIN A1
|
||||
|
||||
#define ADC_PIN A0
|
||||
|
||||
#define RGB_CI_PIN A2
|
||||
|
|
|
|||
|
|
@ -1,3 +1,14 @@
|
|||
{
|
||||
"keyboard_name": "Onekey Blackpill STM32F401"
|
||||
"keyboard_name": "Onekey Blackpill STM32F401",
|
||||
"development_board": "blackpill_f401",
|
||||
"matrix_pins": {
|
||||
"cols": ["B0"],
|
||||
"rows": ["A7"]
|
||||
},
|
||||
"backlight": {
|
||||
"pin": "A0"
|
||||
},
|
||||
"rgblight": {
|
||||
"pin": "A1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1 @@
|
|||
# MCU name
|
||||
MCU = STM32F401
|
||||
BOARD = BLACKPILL_STM32_F401
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = stm32-dfu
|
||||
|
||||
KEYBOARD_SHARED_EP = yes
|
||||
|
|
|
|||
|
|
@ -18,17 +18,13 @@
|
|||
|
||||
#include "config_common.h"
|
||||
|
||||
#define MATRIX_COL_PINS { B0 }
|
||||
#define MATRIX_ROW_PINS { A7 }
|
||||
|
||||
#define BACKLIGHT_PIN A0
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD5
|
||||
#define BACKLIGHT_PWM_CHANNEL 1
|
||||
|
||||
#define RGB_DI_PIN A1
|
||||
|
||||
#define ADC_PIN A0
|
||||
|
||||
#define RGB_CI_PIN A2
|
||||
|
||||
#define SOLENOID_PIN B12
|
||||
#define SOLENOID_PINS { B12, B13, B14, B15 }
|
||||
#define SOLENOID_PINS_ACTIVE_STATE { high, high, low }
|
||||
|
|
|
|||
|
|
@ -1,3 +1,14 @@
|
|||
{
|
||||
"keyboard_name": "Onekey Blackpill STM32F411"
|
||||
"keyboard_name": "Onekey Blackpill STM32F411",
|
||||
"development_board": "blackpill_f411",
|
||||
"matrix_pins": {
|
||||
"cols": ["B0"],
|
||||
"rows": ["A7"]
|
||||
},
|
||||
"backlight": {
|
||||
"pin": "A0"
|
||||
},
|
||||
"rgblight": {
|
||||
"pin": "A1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1 @@
|
|||
# MCU name
|
||||
MCU = STM32F411
|
||||
BOARD = BLACKPILL_STM32_F411
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = stm32-dfu
|
||||
|
||||
KEYBOARD_SHARED_EP = yes
|
||||
|
|
|
|||
|
|
@ -18,13 +18,9 @@
|
|||
|
||||
#include "config_common.h"
|
||||
|
||||
#define MATRIX_COL_PINS { B0 }
|
||||
#define MATRIX_ROW_PINS { A7 }
|
||||
|
||||
#define BACKLIGHT_PIN A0
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD5
|
||||
#define BACKLIGHT_PWM_CHANNEL 1
|
||||
|
||||
#define RGB_DI_PIN A1
|
||||
|
||||
#define ADC_PIN A0
|
||||
|
||||
#define RGB_CI_PIN A2
|
||||
|
|
|
|||
|
|
@ -1,3 +1,16 @@
|
|||
{
|
||||
"keyboard_name": "Onekey Blackpill STM32F411 TinyUF2"
|
||||
"keyboard_name": "Onekey Blackpill STM32F411 TinyUF2",
|
||||
"processor": "STM32F411",
|
||||
"bootloader": "tinyuf2",
|
||||
"board": "BLACKPILL_STM32_F411",
|
||||
"matrix_pins": {
|
||||
"cols": ["B0"],
|
||||
"rows": ["A7"]
|
||||
},
|
||||
"backlight": {
|
||||
"pin": "A0"
|
||||
},
|
||||
"rgblight": {
|
||||
"pin": "A1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1 @@
|
|||
# MCU name
|
||||
MCU = STM32F411
|
||||
BOARD = BLACKPILL_STM32_F411
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = tinyuf2
|
||||
|
||||
KEYBOARD_SHARED_EP = yes
|
||||
|
|
|
|||
|
|
@ -18,13 +18,9 @@
|
|||
|
||||
#include "config_common.h"
|
||||
|
||||
#define MATRIX_COL_PINS { B0 }
|
||||
#define MATRIX_ROW_PINS { A7 }
|
||||
|
||||
#define BACKLIGHT_PIN A0
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD2
|
||||
#define BACKLIGHT_PWM_CHANNEL 1
|
||||
|
||||
#define RGB_DI_PIN A1
|
||||
|
||||
#define ADC_PIN A0
|
||||
|
||||
#define RGB_CI_PIN A2
|
||||
|
|
|
|||
|
|
@ -1,3 +1,14 @@
|
|||
{
|
||||
"keyboard_name": "Onekey Bluepill STM32F103"
|
||||
"keyboard_name": "Onekey Bluepill STM32F103",
|
||||
"development_board": "bluepill",
|
||||
"matrix_pins": {
|
||||
"cols": ["B0"],
|
||||
"rows": ["A7"]
|
||||
},
|
||||
"backlight": {
|
||||
"pin": "A0"
|
||||
},
|
||||
"rgblight": {
|
||||
"pin": "A1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,2 @@
|
|||
# MCU name
|
||||
MCU = STM32F103
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = stm32duino
|
||||
|
||||
# Enter lower-power sleep mode when on the ChibiOS idle thread
|
||||
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
|
||||
|
|
|
|||
|
|
@ -18,18 +18,13 @@
|
|||
|
||||
#include "config_common.h"
|
||||
|
||||
#define MATRIX_COL_PINS { B0 }
|
||||
#define MATRIX_ROW_PINS { A7 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
#define BACKLIGHT_PIN A0
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD2
|
||||
#define BACKLIGHT_PWM_CHANNEL 1
|
||||
|
||||
#define RGB_DI_PIN A1
|
||||
|
||||
#define ADC_PIN A0
|
||||
|
||||
#define RGB_CI_PIN A2
|
||||
|
||||
// This code does not fit into the really small flash of STM32F103x6 together
|
||||
// with CONSOLE_ENABLE=yes, and the debugging console is probably more
|
||||
// important for the "okeney" testing firmware. In a real firmware you may be
|
||||
|
|
|
|||
|
|
@ -1,3 +1,15 @@
|
|||
{
|
||||
"keyboard_name": "Onekey Bluepill STM32F103C6"
|
||||
"keyboard_name": "Onekey Bluepill STM32F103C6",
|
||||
"processor": "STM32F103",
|
||||
"board": "STM32_F103_STM32DUINO",
|
||||
"matrix_pins": {
|
||||
"cols": ["B0"],
|
||||
"rows": ["A7"]
|
||||
},
|
||||
"backlight": {
|
||||
"pin": "A0"
|
||||
},
|
||||
"rgblight": {
|
||||
"pin": "A1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,8 @@
|
|||
# MCU name
|
||||
MCU = STM32F103
|
||||
|
||||
# Bootloader selection
|
||||
# Cannot use `BOOTLOADER = stm32duino` due to the need to override
|
||||
# `MCU_LDSCRIPT`, therefore all parameters need to be specified here manually.
|
||||
OPT_DEFS += -DBOOTLOADER_STM32DUINO
|
||||
MCU_LDSCRIPT = STM32F103x6_stm32duino_bootloader
|
||||
BOARD = STM32_F103_STM32DUINO
|
||||
BOOTLOADER_TYPE = stm32duino
|
||||
DFU_ARGS = -d 1EAF:0003 -a 2 -R
|
||||
DFU_SUFFIX_ARGS = -v 1EAF -p 0003
|
||||
|
|
|
|||
|
|
@ -17,16 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#pragma once
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 1
|
||||
#define MATRIX_COLS 1
|
||||
|
||||
/* COL2ROW, ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
|
|
|
|||
|
|
@ -18,12 +18,6 @@
|
|||
|
||||
#include "config_common.h"
|
||||
|
||||
#define MATRIX_COL_PINS { F4 }
|
||||
#define MATRIX_ROW_PINS { F5 }
|
||||
|
||||
#define BACKLIGHT_PIN B6
|
||||
|
||||
#define RGB_DI_PIN F6
|
||||
#define RGB_CI_PIN B1
|
||||
|
||||
#define ADC_PIN F6
|
||||
|
|
|
|||
|
|
@ -1,3 +1,14 @@
|
|||
{
|
||||
"keyboard_name": "Onekey Elite-C"
|
||||
"keyboard_name": "Onekey Elite-C",
|
||||
"development_board": "elite_c",
|
||||
"matrix_pins": {
|
||||
"cols": ["F4"],
|
||||
"rows": ["F5"]
|
||||
},
|
||||
"backlight": {
|
||||
"pin": "B6"
|
||||
},
|
||||
"rgblight": {
|
||||
"pin": "F6"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
// Copyright 2021 Nick Brassel (@tzarc)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#define MATRIX_COL_PINS { B12 }
|
||||
#define MATRIX_ROW_PINS { B13 }
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue