1
0
Fork 0

Onekey cleanup (#13786)

This commit is contained in:
Ryan 2021-07-31 03:10:05 +10:00 committed by GitHub
parent cfca970718
commit d1db008745
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 121 additions and 118 deletions

View file

@ -36,4 +36,3 @@
#define CH_CFG_FACTORY_PIPES TRUE #define CH_CFG_FACTORY_PIPES TRUE
#include_next <chconf.h> #include_next <chconf.h>

View file

@ -18,6 +18,8 @@
#include "config_common.h" #include "config_common.h"
#define PRODUCT Onekey Blackpill STM32F401
#define MATRIX_COL_PINS { B0 } #define MATRIX_COL_PINS { B0 }
#define MATRIX_ROW_PINS { A7 } #define MATRIX_ROW_PINS { A7 }
#define UNUSED_PINS #define UNUSED_PINS

View file

@ -26,4 +26,3 @@
#define HAL_USE_PWM TRUE #define HAL_USE_PWM TRUE
#include_next <halconf.h> #include_next <halconf.h>

View file

@ -13,6 +13,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
#pragma once #pragma once
#include_next "mcuconf.h" #include_next "mcuconf.h"

View file

@ -1,5 +1,5 @@
# f401 blackpill onekey # F401 Blackpill onekey
Supported Hardware: *STM32F401CCU6 WeAct v1.3*. * Supported Hardware: STM32F401CCU6 WeAct v1.3
To trigger keypress, short together pins *B0* and *A7*. To trigger keypress, short together pins *B0* and *A7*.

View file

@ -4,7 +4,4 @@ MCU = STM32F401
# Bootloader selection # Bootloader selection
BOOTLOADER = stm32-dfu BOOTLOADER = stm32-dfu
# Build Options
# change yes to no to disable
#
KEYBOARD_SHARED_EP = yes KEYBOARD_SHARED_EP = yes

View file

@ -36,4 +36,3 @@
#define CH_CFG_FACTORY_PIPES TRUE #define CH_CFG_FACTORY_PIPES TRUE
#include_next <chconf.h> #include_next <chconf.h>

View file

@ -18,6 +18,8 @@
#include "config_common.h" #include "config_common.h"
#define PRODUCT Onekey Blackpill STM32F411
#define MATRIX_COL_PINS { B0 } #define MATRIX_COL_PINS { B0 }
#define MATRIX_ROW_PINS { A7 } #define MATRIX_ROW_PINS { A7 }
#define UNUSED_PINS #define UNUSED_PINS

View file

@ -26,4 +26,3 @@
#define HAL_USE_PWM TRUE #define HAL_USE_PWM TRUE
#include_next <halconf.h> #include_next <halconf.h>

View file

@ -13,6 +13,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
#pragma once #pragma once
#include_next "mcuconf.h" #include_next "mcuconf.h"

View file

@ -1,5 +1,5 @@
# f411 blackpill onekey # F411 Blackpill onekey
Supported Hardware: *STM32F411CEU6 WeAct v1.3*. * Supported Hardware: STM32F411CEU6 WeAct v1.3
To trigger keypress, short together pins *B0* and *A7*. To trigger keypress, short together pins *B0* and *A7*.

View file

@ -4,7 +4,4 @@ MCU = STM32F411
# Bootloader selection # Bootloader selection
BOOTLOADER = stm32-dfu BOOTLOADER = stm32-dfu
# Build Options
# change yes to no to disable
#
KEYBOARD_SHARED_EP = yes KEYBOARD_SHARED_EP = yes

View file

@ -18,6 +18,8 @@
#include "config_common.h" #include "config_common.h"
#define PRODUCT Onekey Blackpill STM32F411 TinyUF2
#define MATRIX_COL_PINS { B0 } #define MATRIX_COL_PINS { B0 }
#define MATRIX_ROW_PINS { A7 } #define MATRIX_ROW_PINS { A7 }
#define UNUSED_PINS #define UNUSED_PINS

View file

@ -13,6 +13,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
#pragma once #pragma once
#include_next "mcuconf.h" #include_next "mcuconf.h"

View file

@ -1,6 +1,6 @@
# f411 blackpill onekey # F411 Blackpill onekey
Supported Hardware: *STM32F411CEU6 WeAct v1.3*. * Supported Hardware: STM32F411CEU6 WeAct v1.3
To trigger keypress, short together pins *B0* and *A7*. To trigger keypress, short together pins *B0* and *A7*.

View file

@ -4,7 +4,4 @@ MCU = STM32F411
# Bootloader selection # Bootloader selection
BOOTLOADER = tinyuf2 BOOTLOADER = tinyuf2
# Build Options
# change yes to no to disable
#
KEYBOARD_SHARED_EP = yes KEYBOARD_SHARED_EP = yes

View file

@ -26,4 +26,3 @@
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
#include_next <chconf.h> #include_next <chconf.h>

View file

@ -18,6 +18,8 @@
#include "config_common.h" #include "config_common.h"
#define PRODUCT Onekey Bluepill STM32F103
#define MATRIX_COL_PINS { B0 } #define MATRIX_COL_PINS { B0 }
#define MATRIX_ROW_PINS { A7 } #define MATRIX_ROW_PINS { A7 }
#define UNUSED_PINS #define UNUSED_PINS

View file

@ -24,4 +24,3 @@
#define HAL_USE_PWM TRUE #define HAL_USE_PWM TRUE
#include_next <halconf.h> #include_next <halconf.h>

View file

@ -28,4 +28,3 @@
#undef STM32_SPI_USE_SPI2 #undef STM32_SPI_USE_SPI2
#define STM32_SPI_USE_SPI2 FALSE #define STM32_SPI_USE_SPI2 FALSE

View file

@ -1,3 +1,3 @@
# bluepill onekey # Bluepill onekey
To trigger keypress, short together pins *B0* and *A7*. To trigger keypress, short together pins *B0* and *A7*.

View file

@ -21,28 +21,28 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6465 #define PRODUCT_ID 0x6465
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER none #define MANUFACTURER QMK
#define PRODUCT onekey
/* key matrix size */ /* key matrix size */
#define MATRIX_ROWS 1 #define MATRIX_ROWS 1
#define MATRIX_COLS 1 #define MATRIX_COLS 1
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* define if matrix has ghost */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
//#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5 #define DEBOUNCE 5
#define TAPPING_TERM 500 /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */ /* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE #define LOCKING_RESYNC_ENABLE
#define TAPPING_TERM 500
/* /*
* Feature disable options * Feature disable options
* These options are also useful to firmware size reduction. * These options are also useful to firmware size reduction.
@ -58,5 +58,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_LAYER //#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING //#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT //#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION /* disable these deprecated features by default */
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
/* Bootmagic Lite key configuration */
//#define BOOTMAGIC_LITE_ROW 0
//#define BOOTMAGIC_LITE_COLUMN 0

View file

@ -18,6 +18,8 @@
#include "config_common.h" #include "config_common.h"
#define PRODUCT Onekey Elite-C
#define MATRIX_COL_PINS { F4 } #define MATRIX_COL_PINS { F4 }
#define MATRIX_ROW_PINS { F5 } #define MATRIX_ROW_PINS { F5 }
#define UNUSED_PINS #define UNUSED_PINS

View file

@ -1,3 +1,3 @@
# Elite-C onekey # Elite-C onekey
To trigger keypress, short together pins *F4* and *F5* (marked on the PCB as *A3* and *A2*). To trigger keypress, short together pins *F4* and *F5*.

View file

@ -2,11 +2,4 @@
MCU = atmega32u4 MCU = atmega32u4
# Bootloader selection # Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = atmel-dfu BOOTLOADER = atmel-dfu

View file

@ -7,7 +7,7 @@
"layouts": { "layouts": {
"LAYOUT_ortho_1x1": { "LAYOUT_ortho_1x1": {
"layout": [ "layout": [
{"x":0, "y":0} {"x": 0, "y": 0}
] ]
} }
} }

View file

@ -0,0 +1,20 @@
#include QMK_KEYBOARD_H
enum custom_keycodes {
KC_HELLO = SAFE_RANGE,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT_ortho_1x1(KC_HELLO)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_HELLO:
if (record->event.pressed) {
printf("Hello world!\n");
}
return false;
}
return true;
}

View file

@ -18,6 +18,8 @@
#include "config_common.h" #include "config_common.h"
#define PRODUCT Onekey Pro Micro
#define MATRIX_COL_PINS { F4 } #define MATRIX_COL_PINS { F4 }
#define MATRIX_ROW_PINS { F5 } #define MATRIX_ROW_PINS { F5 }
#define UNUSED_PINS #define UNUSED_PINS

View file

@ -2,11 +2,4 @@
MCU = atmega32u4 MCU = atmega32u4
# Bootloader selection # Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = caterina BOOTLOADER = caterina

View file

@ -18,6 +18,8 @@
#include "config_common.h" #include "config_common.h"
#define PRODUCT Onekey Proton-C
#define MATRIX_COL_PINS { A2 } #define MATRIX_COL_PINS { A2 }
#define MATRIX_ROW_PINS { A1 } #define MATRIX_ROW_PINS { A1 }
#define UNUSED_PINS #define UNUSED_PINS

View file

@ -1,3 +1,3 @@
# Proton C onekey # Proton-C onekey
To trigger keypress, short together pins *A1* and *A2*. To trigger keypress, short together pins *A1* and *A2*.

View file

@ -1,15 +1,17 @@
# onekey handwired # onekey
Custom handwired one key keyboard. Custom handwired one key keyboard. **See each individual board for pin information.**
Keyboard Maintainer: QMK Community * Keyboard Maintainer: QMK Community
Hardware Supported: bluepill, Elite-C, Pro Micro, Proton C, Teensy 2.0, Teensy++ 2.0, Teensy LC, Teensy 3.2 * Hardware Supported: bluepill, Elite-C, Pro Micro, Proton C, Teensy 2.0, Teensy++ 2.0, Teensy LC, Teensy 3.2
Hardware Availability: * Hardware Availability: *n/a*
**See each individual board for pin infomation**
Make example for this keyboard (after setting up your build environment): Make example for this keyboard (after setting up your build environment):
make handwired/onekey:default make handwired/onekey:default
Flashing example for this keyboard:
make handwired/onekey:default:flash
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

View file

@ -1,21 +1,20 @@
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
# #
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = yes # Console for debug(+400) CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = yes # USB Nkey Rollover NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) BLUETOOTH_ENABLE = no # Enable Bluetooth
UNICODE_ENABLE = no # Unicode AUDIO_ENABLE = no # Audio output
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
DEFAULT_FOLDER = handwired/onekey/promicro DEFAULT_FOLDER = handwired/onekey/promicro
LAYOUTS = ortho_1x1 LAYOUTS = ortho_1x1

View file

@ -28,4 +28,3 @@
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
#include_next <chconf.h> #include_next <chconf.h>

View file

@ -18,6 +18,8 @@
#include "config_common.h" #include "config_common.h"
#define PRODUCT Onekey STM32F072 Discovery
#define MATRIX_COL_PINS { B4 } #define MATRIX_COL_PINS { B4 }
#define MATRIX_ROW_PINS { B5 } #define MATRIX_ROW_PINS { B5 }
#define UNUSED_PINS #define UNUSED_PINS

View file

@ -24,4 +24,3 @@
#define HAL_USE_PWM TRUE #define HAL_USE_PWM TRUE
#include_next <halconf.h> #include_next <halconf.h>

View file

@ -25,4 +25,3 @@
#undef STM32_PWM_USE_TIM3 #undef STM32_PWM_USE_TIM3
#define STM32_PWM_USE_TIM3 TRUE #define STM32_PWM_USE_TIM3 TRUE

View file

@ -1,5 +1,5 @@
# STM32F072 Discovery kit onekey # STM32F072 Discovery kit onekey
Supported Hardware: <https://www.st.com/en/evaluation-tools/32f072bdiscovery.html> * Supported Hardware: [STM32F072 Discovery](https://www.st.com/en/evaluation-tools/32f072bdiscovery.html)
To trigger keypress, short together pins *B4* and *B5*. To trigger keypress, short together pins *B4* and *B5*.

View file

@ -18,6 +18,8 @@
#include "config_common.h" #include "config_common.h"
#define PRODUCT Onekey Teensy 2.0
#define MATRIX_COL_PINS { F4 } #define MATRIX_COL_PINS { F4 }
#define MATRIX_ROW_PINS { F5 } #define MATRIX_ROW_PINS { F5 }
#define UNUSED_PINS #define UNUSED_PINS

View file

@ -1,3 +1,3 @@
# Teensy 2.0 onekey # Teensy 2.0 onekey
To trigger keypress, short together pins *F4* and *F5* To trigger keypress, short together pins *F4* and *F5*.

View file

@ -2,11 +2,4 @@
MCU = atmega32u4 MCU = atmega32u4
# Bootloader selection # Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = halfkay BOOTLOADER = halfkay

View file

@ -18,6 +18,8 @@
#include "config_common.h" #include "config_common.h"
#define PRODUCT Onekey Teensy 2++
#define MATRIX_COL_PINS { F4 } #define MATRIX_COL_PINS { F4 }
#define MATRIX_ROW_PINS { F5 } #define MATRIX_ROW_PINS { F5 }
#define UNUSED_PINS #define UNUSED_PINS

View file

@ -1,3 +1,3 @@
# Teensy++ 2.0 onekey # Teensy++ 2.0 onekey
To trigger keypress, short together pins *F4* and *F5* To trigger keypress, short together pins *F4* and *F5*.

View file

@ -2,11 +2,4 @@
MCU = at90usb1286 MCU = at90usb1286
# Bootloader selection # Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = halfkay BOOTLOADER = halfkay

View file

@ -50,4 +50,3 @@
#define CH_DBG_FILL_THREADS TRUE #define CH_DBG_FILL_THREADS TRUE
#include_next <chconf.h> #include_next <chconf.h>

View file

@ -19,6 +19,8 @@
// TODO: including this causes "error: expected identifier before '(' token" errors // TODO: including this causes "error: expected identifier before '(' token" errors
//#include "config_common.h" //#include "config_common.h"
#define PRODUCT Onekey Teensy 3.2
#define MATRIX_COL_PINS { D5 } #define MATRIX_COL_PINS { D5 }
#define MATRIX_ROW_PINS { B2 } #define MATRIX_ROW_PINS { B2 }
#define UNUSED_PINS #define UNUSED_PINS

View file

@ -24,4 +24,3 @@
#define HAL_USE_I2C TRUE #define HAL_USE_I2C TRUE
#include_next <halconf.h> #include_next <halconf.h>

View file

@ -50,4 +50,3 @@
#define CH_DBG_FILL_THREADS TRUE #define CH_DBG_FILL_THREADS TRUE
#include_next <chconf.h> #include_next <chconf.h>

View file

@ -19,6 +19,8 @@
// TODO: including this causes "error: expected identifier before '(' token" errors // TODO: including this causes "error: expected identifier before '(' token" errors
//#include "config_common.h" //#include "config_common.h"
#define PRODUCT Onekey Teensy LC
#define MATRIX_COL_PINS { D5 } #define MATRIX_COL_PINS { D5 }
#define MATRIX_ROW_PINS { B2 } #define MATRIX_ROW_PINS { B2 }
#define UNUSED_PINS #define UNUSED_PINS

View file

@ -24,4 +24,3 @@
#define HAL_USE_I2C TRUE #define HAL_USE_I2C TRUE
#include_next <halconf.h> #include_next <halconf.h>