mirror of
https://github.com/System-End/hackpad.git
synced 2026-04-19 22:15:14 +00:00
adding the firmware
This commit is contained in:
parent
286332a6dd
commit
f6015f882c
9 changed files with 323 additions and 0 deletions
18
hackpads/tim12/firmware/tim12 RAW QMK/.vscode/c_cpp_properties.json
vendored
Normal file
18
hackpads/tim12/firmware/tim12 RAW QMK/.vscode/c_cpp_properties.json
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "linux-gcc-x64",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"compilerPath": "/usr/bin/gcc",
|
||||
"cStandard": "${default}",
|
||||
"cppStandard": "${default}",
|
||||
"intelliSenseMode": "linux-gcc-x64",
|
||||
"compilerArgs": [
|
||||
""
|
||||
]
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
24
hackpads/tim12/firmware/tim12 RAW QMK/.vscode/launch.json
vendored
Normal file
24
hackpads/tim12/firmware/tim12 RAW QMK/.vscode/launch.json
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "C/C++ Runner: Debug Session",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": false,
|
||||
"cwd": "/home/tim/qmk_firmware/keyboards/tim12/keymaps/default",
|
||||
"program": "/home/tim/qmk_firmware/keyboards/tim12/keymaps/default/build/Debug/outDebug",
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
59
hackpads/tim12/firmware/tim12 RAW QMK/.vscode/settings.json
vendored
Normal file
59
hackpads/tim12/firmware/tim12 RAW QMK/.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"C_Cpp_Runner.cCompilerPath": "gcc",
|
||||
"C_Cpp_Runner.cppCompilerPath": "g++",
|
||||
"C_Cpp_Runner.debuggerPath": "gdb",
|
||||
"C_Cpp_Runner.cStandard": "",
|
||||
"C_Cpp_Runner.cppStandard": "",
|
||||
"C_Cpp_Runner.msvcBatchPath": "",
|
||||
"C_Cpp_Runner.useMsvc": false,
|
||||
"C_Cpp_Runner.warnings": [
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Wpedantic",
|
||||
"-Wshadow",
|
||||
"-Wformat=2",
|
||||
"-Wcast-align",
|
||||
"-Wconversion",
|
||||
"-Wsign-conversion",
|
||||
"-Wnull-dereference"
|
||||
],
|
||||
"C_Cpp_Runner.msvcWarnings": [
|
||||
"/W4",
|
||||
"/permissive-",
|
||||
"/w14242",
|
||||
"/w14287",
|
||||
"/w14296",
|
||||
"/w14311",
|
||||
"/w14826",
|
||||
"/w44062",
|
||||
"/w44242",
|
||||
"/w14905",
|
||||
"/w14906",
|
||||
"/w14263",
|
||||
"/w44265",
|
||||
"/w14928"
|
||||
],
|
||||
"C_Cpp_Runner.enableWarnings": true,
|
||||
"C_Cpp_Runner.warningsAsError": false,
|
||||
"C_Cpp_Runner.compilerArgs": [],
|
||||
"C_Cpp_Runner.linkerArgs": [],
|
||||
"C_Cpp_Runner.includePaths": [],
|
||||
"C_Cpp_Runner.includeSearch": [
|
||||
"*",
|
||||
"**/*"
|
||||
],
|
||||
"C_Cpp_Runner.excludeSearch": [
|
||||
"**/build",
|
||||
"**/build/**",
|
||||
"**/.*",
|
||||
"**/.*/**",
|
||||
"**/.vscode",
|
||||
"**/.vscode/**"
|
||||
],
|
||||
"C_Cpp_Runner.useAddressSanitizer": false,
|
||||
"C_Cpp_Runner.useUndefinedSanitizer": false,
|
||||
"C_Cpp_Runner.useLeakSanitizer": false,
|
||||
"C_Cpp_Runner.showCompilationTime": false,
|
||||
"C_Cpp_Runner.useLinkTimeOptimization": false,
|
||||
"C_Cpp_Runner.msvcSecureNoWarnings": false
|
||||
}
|
||||
29
hackpads/tim12/firmware/tim12 RAW QMK/config.h
Normal file
29
hackpads/tim12/firmware/tim12 RAW QMK/config.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#define tim12
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
// Matrix size
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 3
|
||||
|
||||
// Matrix pin configuration
|
||||
#define MATRIX_ROW_PINS { GP0, GP1, GP2, GP3, GP6 }
|
||||
#define MATRIX_COL_PINS { GP8, GP9, GP10 }
|
||||
|
||||
// Include QMK RGB lighting configurations
|
||||
#define WS2812_DI_PIN GP7
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_LED_COUNT RGBLED_NUM
|
||||
#define RGBLIGHT_SLEEP
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
|
||||
// OLED display configuration
|
||||
#define OLED_DRIVER_ENABLE
|
||||
#define OLED_I2C_ADDRESS 0x3C
|
||||
#define OLED_BRIGHTNESS 128
|
||||
|
||||
#endif // CONFIG_H
|
||||
51
hackpads/tim12/firmware/tim12 RAW QMK/keyboard.json
Normal file
51
hackpads/tim12/firmware/tim12 RAW QMK/keyboard.json
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"manufacturer": "timwhat",
|
||||
"keyboard_name": "tim12",
|
||||
"maintainer": "timwhat",
|
||||
"bootloader": "rp2040",
|
||||
"diode_direction": "COL2ROW",
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"command": false,
|
||||
"console": false,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"nkro": true
|
||||
},
|
||||
"matrix_size": {
|
||||
"rows": 5,
|
||||
"cols": 3
|
||||
},
|
||||
"matrix_pins": {
|
||||
"rows": ["GP0", "GP1", "GP2", "GP3", "GP6"],
|
||||
"cols": ["GP8", "GP9", "GP10"]
|
||||
},
|
||||
"processor": "RP2040",
|
||||
"url": "",
|
||||
"usb": {
|
||||
"device_version": "1.0.0",
|
||||
"pid": "0x0000",
|
||||
"vid": "0xFEED"
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_numpad_3x5": {
|
||||
"layout": [
|
||||
{ "matrix": [0, 0], "x": 0, "y": 0 },
|
||||
{ "matrix": [0, 1], "x": 1, "y": 0 },
|
||||
{ "matrix": [0, 2], "x": 2, "y": 0 },
|
||||
{ "matrix": [1, 0], "x": 0, "y": 1 },
|
||||
{ "matrix": [1, 1], "x": 1, "y": 1 },
|
||||
{ "matrix": [1, 2], "x": 2, "y": 1 },
|
||||
{ "matrix": [2, 0], "x": 0, "y": 2 },
|
||||
{ "matrix": [2, 1], "x": 1, "y": 2 },
|
||||
{ "matrix": [2, 2], "x": 2, "y": 2 },
|
||||
{ "matrix": [3, 0], "x": 0, "y": 3 },
|
||||
{ "matrix": [3, 1], "x": 1, "y": 3 },
|
||||
{ "matrix": [3, 2], "x": 2, "y": 3 },
|
||||
{ "matrix": [4, 0], "x": 0, "y": 4 },
|
||||
{ "matrix": [4, 1], "x": 1, "y": 4 },
|
||||
{ "matrix": [4, 2], "x": 2, "y": 4 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
107
hackpads/tim12/firmware/tim12 RAW QMK/keymaps/default/keymap.c
Normal file
107
hackpads/tim12/firmware/tim12 RAW QMK/keymaps/default/keymap.c
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
// Copyright 2023 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
* ┌───┬───┐
|
||||
* │F23│F24│
|
||||
* ├───┼───┤
|
||||
* │F21│F22|
|
||||
* ├───┼───┤
|
||||
* │F19│F20│
|
||||
* ┌───┼───┼───┤
|
||||
* │ly1│F17│F18│
|
||||
* ├───┼───┼───┤
|
||||
* │ly2│F15│F16│
|
||||
* └───┴───┴───┘
|
||||
*/
|
||||
[0] = LAYOUT_numpad_3x5(
|
||||
KC_NO, KC_F23, KC_F24,
|
||||
KC_NO, KC_F21, KC_F22,
|
||||
KC_NO, KC_F19, KC_F20,
|
||||
MO(1), KC_F17, KC_F18,
|
||||
MO(2), KC_F15, KC_F16
|
||||
),
|
||||
/*
|
||||
* ┌───┬───┐
|
||||
* │ │ │
|
||||
* ├───┼───┤
|
||||
* │ │ │
|
||||
* ├───┼───┤
|
||||
* │ │ │
|
||||
* ┌───┼───┼───┤
|
||||
* │ly1│ │ │
|
||||
* ├───┼───┼───┤
|
||||
* │ly2│ │ │
|
||||
* └───┴───┴───┘
|
||||
*/
|
||||
[1] = LAYOUT_numpad_3x5(
|
||||
KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO,
|
||||
MO(1), KC_NO, KC_NO,
|
||||
MO(2), KC_NO, KC_NO
|
||||
),
|
||||
/*
|
||||
* ┌───┬───┐
|
||||
* │ │ │
|
||||
* ├───┼───┤
|
||||
* │ │ │
|
||||
* ├───┼───┤
|
||||
* │ │ │
|
||||
* ┌───┼───┼───┤
|
||||
* │ly1│ │ │
|
||||
* ├───┼───┼───┤
|
||||
* │ly2│ │ │
|
||||
* └───┴───┴───┘
|
||||
*/
|
||||
[2] = LAYOUT_numpad_3x5(
|
||||
KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, RGB_TOG, RGB_MOD, // Toggle RGB and cycle through modes
|
||||
KC_NO, RGB_HUI, RGB_HUD, // Increase/decrease hue
|
||||
MO(1), RGB_SAI, RGB_SAD, // Increase/decrease saturation
|
||||
MO(2), RGB_VAI, RGB_VAD // Increase/decrease brightness
|
||||
)
|
||||
}; // TODO: add more layers for more functionality
|
||||
// RGB control, media keys, etc.
|
||||
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[] = {
|
||||
[0] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD), 0, 0}, // First encoder
|
||||
[1] = { ENCODER_CCW_CW(UG_PREV, UG_NEXT), 0, 0} // Second encoder
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
bool oled_task_user(void) {
|
||||
// Host Keyboard Layer Status
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case 0:
|
||||
oled_write_P(PSTR("Default\n"), false);
|
||||
break;
|
||||
case 1:
|
||||
oled_write_P(PSTR("FN\n"), false);
|
||||
break;
|
||||
case 2:
|
||||
oled_write_P(PSTR("ADJ\n"), false);
|
||||
break;
|
||||
default:
|
||||
// Or use the write_ln shortcut over adding '\n' to the end of your string
|
||||
oled_write_ln_P(PSTR("Undefined"), false);
|
||||
}
|
||||
|
||||
// Host Keyboard LED Status
|
||||
led_t led_state = host_keyboard_led_state();
|
||||
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
|
||||
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
|
||||
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
27
hackpads/tim12/firmware/tim12 RAW QMK/readme.md
Normal file
27
hackpads/tim12/firmware/tim12 RAW QMK/readme.md
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# tim12
|
||||
|
||||

|
||||
|
||||
_A short description of the keyboard/project_
|
||||
|
||||
- Keyboard Maintainer: [timwhat](https://github.com/timwhat)
|
||||
- Hardware Supported: _The PCBs, controllers supported_
|
||||
- Hardware Availability: _Links to where you can find this hardware_
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make tim12:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make tim12: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).
|
||||
|
||||
## Bootloader
|
||||
|
||||
Enter the bootloader in 3 ways:
|
||||
|
||||
- **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
|
||||
- **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
|
||||
- **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
|
||||
8
hackpads/tim12/firmware/tim12 RAW QMK/rules.mk
Normal file
8
hackpads/tim12/firmware/tim12 RAW QMK/rules.mk
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
RGBLIGHT_ENABLE = yes
|
||||
RGBLIGHT_DRIVER = ws2812
|
||||
WS2812_DRIVER = vendor
|
||||
|
||||
OLED_ENABLE = yes
|
||||
OLED_DRIVER = ssd1306
|
||||
OLED_TRANSPORT = i2c
|
||||
|
||||
BIN
hackpads/tim12/firmware/tim12_default.uf2
Normal file
BIN
hackpads/tim12/firmware/tim12_default.uf2
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue