Skip to content

Commit e5ba388

Browse files
committed
Update firmware
1 parent 860241e commit e5ba388

File tree

6 files changed

+105
-74
lines changed

6 files changed

+105
-74
lines changed

firmware/42.h

-25
This file was deleted.

firmware/Makefile

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
QMK_PATH := ./qmk_firmware
1+
QMK_PATH := "$$HOME/qmk_firmware"
22
KEYBOARD_PATH := $(QMK_PATH)/keyboards/handwired/42
33

4+
flash: build
5+
qmk flash -kb handwired/42 -km default
6+
47
build: clean
58
mkdir $(KEYBOARD_PATH)
6-
cp -r 42.h config.h keymaps rules.mk $(KEYBOARD_PATH)
7-
cd $(QMK_PATH) && make handwired/42:default:flash
9+
cp -r info.json config.h keymaps rules.mk $(KEYBOARD_PATH)
10+
qmk compile -kb handwired/42 -km default
811

912
clean:
1013
if [ -d $(KEYBOARD_PATH) ]; then rm -r $(KEYBOARD_PATH); fi
11-
cd $(QMK_PATH) && make clean
14+
qmk clean
1215

1316
init:
14-
git clone https://github.com/qmk/qmk_firmware || true
15-
cd $(QMK_PATH) && make git-submodule
17+
qmk setup
1618

1719
update-qmk:
1820
cd $(QMK_PATH) && git pull

firmware/config.h

-35
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,6 @@
11
#pragma once
22

3-
#include "config_common.h"
4-
5-
/* USB Device descriptor parameter */
6-
#define VENDOR_ID 0xFEED
7-
#define PRODUCT_ID 0x0000
8-
#define DEVICE_VER 0x0003
9-
#define MANUFACTURER nglgzz
10-
#define PRODUCT 42
11-
12-
/* key matrix size */
13-
#define MATRIX_ROWS 4
14-
#define MATRIX_COLS 12
15-
16-
/*
17-
* Keyboard Matrix Assignments
18-
*
19-
* Change this to how you wired your keyboard
20-
* COLS: AVR pins used for columns, left to right
21-
* ROWS: AVR pins used for rows, top to bottom
22-
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
23-
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
24-
*
25-
*/
26-
#define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6, B3, B1, F7, F6, F5, F4 }
27-
#define MATRIX_ROW_PINS { B4, B5, B2, B6 }
28-
#define UNUSED_PINS
29-
30-
/* COL2ROW, ROW2COL */
31-
#define DIODE_DIRECTION COL2ROW
32-
33-
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
34-
#define DEBOUNCE 5
35-
363
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
374
#define LOCKING_SUPPORT_ENABLE
385
/* Locking resynchronize hack */
396
#define LOCKING_RESYNC_ENABLE
40-
41-
#define TAPPING_TERM 150

firmware/info.json

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"keyboard_name": "42",
3+
"manufacturer": "nglgzz",
4+
"url": "",
5+
"maintainer": "nglgzz",
6+
"usb": {
7+
"vid": "0xFEED",
8+
"pid": "0x0000",
9+
"device_version": "0.0.3"
10+
},
11+
"tapping": {
12+
"term": 150
13+
},
14+
"matrix_pins": {
15+
"cols": [
16+
"D1",
17+
"D0",
18+
"D4",
19+
"C6",
20+
"D7",
21+
"E6",
22+
"B3",
23+
"B1",
24+
"F7",
25+
"F6",
26+
"F5",
27+
"F4"
28+
],
29+
"rows": ["B4", "B5", "B2", "B6"]
30+
},
31+
"diode_direction": "COL2ROW",
32+
"processor": "atmega32u4",
33+
"bootloader": "atmel-dfu",
34+
"layouts": {
35+
"LAYOUT": {
36+
"layout": [
37+
{ "matrix": [0, 0], "x": 0, "y": 0.625 },
38+
{ "matrix": [0, 1], "x": 1, "y": 0.417 },
39+
{ "matrix": [0, 2], "x": 2, "y": 0.208 },
40+
{ "matrix": [0, 3], "x": 3, "y": 0 },
41+
{ "matrix": [0, 4], "x": 4, "y": 0.208 },
42+
{ "matrix": [0, 5], "x": 5, "y": 0.417 },
43+
44+
{ "matrix": [0, 6], "x": 8.5, "y": 0.417 },
45+
{ "matrix": [0, 7], "x": 9.5, "y": 0.208 },
46+
{ "matrix": [0, 8], "x": 10.5, "y": 0 },
47+
{ "matrix": [0, 9], "x": 11.5, "y": 0.208 },
48+
{ "matrix": [0, 10], "x": 12.5, "y": 0.417 },
49+
{ "matrix": [0, 11], "x": 13.5, "y": 0.625 },
50+
51+
{ "matrix": [1, 0], "x": 0, "y": 1.625 },
52+
{ "matrix": [1, 1], "x": 1, "y": 1.417 },
53+
{ "matrix": [1, 2], "x": 2, "y": 1.208 },
54+
{ "matrix": [1, 3], "x": 3, "y": 1 },
55+
{ "matrix": [1, 4], "x": 4, "y": 1.208 },
56+
{ "matrix": [1, 5], "x": 5, "y": 1.417 },
57+
58+
{ "matrix": [1, 6], "x": 8.5, "y": 1.417 },
59+
{ "matrix": [1, 7], "x": 9.5, "y": 1.208 },
60+
{ "matrix": [1, 8], "x": 10.5, "y": 1 },
61+
{ "matrix": [1, 9], "x": 11.5, "y": 1.208 },
62+
{ "matrix": [1, 10], "x": 12.5, "y": 1.417 },
63+
{ "matrix": [1, 11], "x": 13.5, "y": 1.625 },
64+
65+
{ "matrix": [2, 0], "x": 0, "y": 2.625 },
66+
{ "matrix": [2, 1], "x": 1, "y": 2.417 },
67+
{ "matrix": [2, 2], "x": 2, "y": 2.208 },
68+
{ "matrix": [2, 3], "x": 3, "y": 2 },
69+
{ "matrix": [2, 4], "x": 4, "y": 2.208 },
70+
{ "matrix": [2, 5], "x": 5, "y": 2.417 },
71+
72+
{ "matrix": [2, 6], "x": 8.5, "y": 2.417 },
73+
{ "matrix": [2, 7], "x": 9.5, "y": 2.208 },
74+
{ "matrix": [2, 8], "x": 10.5, "y": 2 },
75+
{ "matrix": [2, 9], "x": 11.5, "y": 2.208 },
76+
{ "matrix": [2, 10], "x": 12.5, "y": 2.417 },
77+
{ "matrix": [2, 11], "x": 13.5, "y": 2.625 },
78+
79+
{ "matrix": [3, 3], "x": 4, "y": 3.208 },
80+
{ "matrix": [3, 4], "x": 5, "y": 3.417 },
81+
{ "matrix": [3, 5], "x": 5.75, "y": 4.417 },
82+
83+
{ "matrix": [3, 6], "x": 7.75, "y": 4.417 },
84+
{ "matrix": [3, 7], "x": 8.5, "y": 3.417 },
85+
{ "matrix": [3, 8], "x": 9.5, "y": 3.208 }
86+
]
87+
}
88+
}
89+
}

firmware/keymaps/default/keymap.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
#define L1_LBRC LT(1, KC_LBRC)
1616
#define L1_RBRC LT(1, KC_RBRC)
1717

18+
// One Shot Keys
19+
#define OS_RALT OSM(MOD_RALT)
20+
1821
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
1922
// Default Layer
2023
LAYOUT(
@@ -28,13 +31,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
2831
KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_EQL ,
2932
KC_INS , S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_MINS,
3033
KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 ,
31-
KC_CAPS, _______, _______, _______, _______, _______
34+
KC_CAPS, OS_RALT, _______, _______, _______, _______
3235
),
36+
3337
// Navigation Layer
3438
LAYOUT(
3539
_______, _______, _______, KC_PGUP, _______, _______, KC_BRIU, _______, KC_UP , _______, _______, _______,
3640
_______, _______, KC_HOME, KC_PGDN, KC_END , _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
37-
_______, _______, _______, _______, _______, _______, KC_BRID, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______,
41+
_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_BRID, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______,
3842
_______, _______, _______, _______, _______, _______
3943
),
4044
// Mouse Layer

firmware/rules.mk

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# MCU name
2-
MCU = atmega32u4
3-
4-
# Bootloader selection
5-
BOOTLOADER = atmel-dfu
6-
71
# Build Options
82
# change yes to no to disable
93
#
@@ -12,8 +6,10 @@ MOUSEKEY_ENABLE = yes # Mouse keys
126
EXTRAKEY_ENABLE = yes # Audio control and System control
137
CONSOLE_ENABLE = no # Console for debug
148
COMMAND_ENABLE = no # Commands for debug and configuration
9+
1510
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
1611
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
12+
1713
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
1814
NKRO_ENABLE = yes # USB Nkey Rollover
1915
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality

0 commit comments

Comments
 (0)