aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--quantum/template/avr/readme.md6
-rw-r--r--quantum/template/avr/rules.mk1
-rw-r--r--quantum/template/base/info.json18
-rw-r--r--quantum/template/base/keyboard.c (renamed from quantum/template/avr/keyboard.c)25
-rw-r--r--quantum/template/base/keyboard.h7
-rw-r--r--quantum/template/base/keymaps/default/keymap.c19
-rw-r--r--quantum/template/ps2avrgb/keyboard.c52
-rw-r--r--quantum/template/ps2avrgb/readme.md6
-rw-r--r--quantum/template/ps2avrgb/rules.mk18
-rwxr-xr-xutil/new_keyboard.sh2
10 files changed, 69 insertions, 85 deletions
diff --git a/quantum/template/avr/readme.md b/quantum/template/avr/readme.md
index 719222d37..0430dd0fc 100644
--- a/quantum/template/avr/readme.md
+++ b/quantum/template/avr/readme.md
@@ -4,9 +4,9 @@
4 4
5A short description of the keyboard/project 5A short description of the keyboard/project
6 6
7Keyboard Maintainer: [%YOUR_NAME%](https://github.com/yourusername) 7* Keyboard Maintainer: [%YOUR_NAME%](https://github.com/yourusername)
8Hardware Supported: The PCBs, controllers supported 8* Hardware Supported: The PCBs, controllers supported
9Hardware Availability: links to where you can find this hardware 9* Hardware Availability: Links to where you can find this hardware
10 10
11Make example for this keyboard (after setting up your build environment): 11Make example for this keyboard (after setting up your build environment):
12 12
diff --git a/quantum/template/avr/rules.mk b/quantum/template/avr/rules.mk
index bb2bd14f9..ea0c83c68 100644
--- a/quantum/template/avr/rules.mk
+++ b/quantum/template/avr/rules.mk
@@ -13,6 +13,7 @@ BOOTLOADER = atmel-dfu
13 13
14# If you don't know the bootloader type, then you can specify the 14# If you don't know the bootloader type, then you can specify the
15# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line 15# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
16# Otherwise, delete this section
16# Teensy halfKay 512 17# Teensy halfKay 512
17# Teensy++ halfKay 1024 18# Teensy++ halfKay 1024
18# Atmel DFU loader 4096 19# Atmel DFU loader 4096
diff --git a/quantum/template/base/info.json b/quantum/template/base/info.json
index e69de29bb..b8e8f1f2d 100644
--- a/quantum/template/base/info.json
+++ b/quantum/template/base/info.json
@@ -0,0 +1,18 @@
1{
2 "keyboard_name": "%KEYBOARD%",
3 "url": "",
4 "maintainer": "%YOUR_NAME%",
5 "width": 3,
6 "height": 2,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [
10 {"label":"k00", "x":0, "y":0},
11 {"label":"k01", "x":1, "y":0},
12 {"label":"k02", "x":2, "y":0},
13 {"label":"k10", "x":0, "y":1, "w":1.5},
14 {"label":"k12", "x":1.5, "y":1, "w":1.5}
15 ]
16 }
17 }
18}
diff --git a/quantum/template/avr/keyboard.c b/quantum/template/base/keyboard.c
index e852a42c4..55e4fffd3 100644
--- a/quantum/template/avr/keyboard.c
+++ b/quantum/template/base/keyboard.c
@@ -13,6 +13,7 @@
13 * You should have received a copy of the GNU General Public License 13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16
16#include "%KEYBOARD%.h" 17#include "%KEYBOARD%.h"
17 18
18// Optional override functions below. 19// Optional override functions below.
@@ -20,32 +21,30 @@
20// These are only required if you want to perform custom actions. 21// These are only required if you want to perform custom actions.
21 22
22/* 23/*
23
24void matrix_init_kb(void) { 24void matrix_init_kb(void) {
25 // put your keyboard start-up code here 25 // put your keyboard start-up code here
26 // runs once when the firmware starts up 26 // runs once when the firmware starts up
27 27
28 matrix_init_user(); 28 matrix_init_user();
29} 29}
30 30
31void matrix_scan_kb(void) { 31void matrix_scan_kb(void) {
32 // put your looping keyboard code here 32 // put your looping keyboard code here
33 // runs every cycle (a lot) 33 // runs every cycle (a lot)
34 34
35 matrix_scan_user(); 35 matrix_scan_user();
36} 36}
37 37
38bool process_record_kb(uint16_t keycode, keyrecord_t *record) { 38bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
39 // put your per-action keyboard code here 39 // put your per-action keyboard code here
40 // runs for every action, just before processing by the firmware 40 // runs for every action, just before processing by the firmware
41 41
42 return process_record_user(keycode, record); 42 return process_record_user(keycode, record);
43} 43}
44 44
45void led_set_kb(uint8_t usb_led) { 45void led_set_kb(uint8_t usb_led) {
46 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here 46 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
47 47
48 led_set_user(usb_led); 48 led_set_user(usb_led);
49} 49}
50
51*/ 50*/
diff --git a/quantum/template/base/keyboard.h b/quantum/template/base/keyboard.h
index 2e531b1fd..8a21d9257 100644
--- a/quantum/template/base/keyboard.h
+++ b/quantum/template/base/keyboard.h
@@ -13,11 +13,12 @@
13 * You should have received a copy of the GNU General Public License 13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16
16#pragma once 17#pragma once
17 18
18#include "quantum.h" 19#include "quantum.h"
19 20
20/* This a shortcut to help you visually see your layout. 21/* This is a shortcut to help you visually see your layout.
21 * 22 *
22 * The first section contains all of the arguments representing the physical 23 * The first section contains all of the arguments representing the physical
23 * layout of the board and position of the keys. 24 * layout of the board and position of the keys.
@@ -27,9 +28,9 @@
27 */ 28 */
28#define LAYOUT( \ 29#define LAYOUT( \
29 k00, k01, k02, \ 30 k00, k01, k02, \
30 k10, k11 \ 31 k10, k12 \
31) \ 32) \
32{ \ 33{ \
33 { k00, k01, k02 }, \ 34 { k00, k01, k02 }, \
34 { k10, KC_NO, k11 }, \ 35 { k10, KC_NO, k12 } \
35} 36}
diff --git a/quantum/template/base/keymaps/default/keymap.c b/quantum/template/base/keymaps/default/keymap.c
index 3508055b7..4d5bac7b2 100644
--- a/quantum/template/base/keymaps/default/keymap.c
+++ b/quantum/template/base/keymaps/default/keymap.c
@@ -15,6 +15,12 @@
15 */ 15 */
16#include QMK_KEYBOARD_H 16#include QMK_KEYBOARD_H
17 17
18// Defines names for use in layer keycodes and the keymap
19enum layer_names {
20 _BASE,
21 _FN
22};
23
18// Defines the keycodes used by our macros in process_record_user 24// Defines the keycodes used by our macros in process_record_user
19enum custom_keycodes { 25enum custom_keycodes {
20 QMKBEST = SAFE_RANGE, 26 QMKBEST = SAFE_RANGE,
@@ -22,10 +28,15 @@ enum custom_keycodes {
22}; 28};
23 29
24const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 30const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25 [0] = LAYOUT( /* Base */ 31 /* Base */
26 KC_A, KC_1, KC_H, 32 [_BASE] = LAYOUT(
27 KC_TAB, KC_SPC 33 KC_A, KC_1, MO(_FN),
34 KC_TAB, KC_SPC
28 ), 35 ),
36 [_FN] = LAYOUT(
37 QMKBEST, QMKURL, _______,
38 RESET, XXXXXXX
39 )
29}; 40};
30 41
31bool process_record_user(uint16_t keycode, keyrecord_t *record) { 42bool process_record_user(uint16_t keycode, keyrecord_t *record) {
@@ -50,6 +61,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
50 return true; 61 return true;
51} 62}
52 63
64/*
53void matrix_init_user(void) { 65void matrix_init_user(void) {
54 66
55} 67}
@@ -61,3 +73,4 @@ void matrix_scan_user(void) {
61void led_set_user(uint8_t usb_led) { 73void led_set_user(uint8_t usb_led) {
62 74
63} 75}
76*/
diff --git a/quantum/template/ps2avrgb/keyboard.c b/quantum/template/ps2avrgb/keyboard.c
deleted file mode 100644
index 73cd668f8..000000000
--- a/quantum/template/ps2avrgb/keyboard.c
+++ /dev/null
@@ -1,52 +0,0 @@
1/* Copyright %YEAR% %YOUR_NAME%
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "%KEYBOARD%.h"
18
19// Optional override functions below.
20// You can leave any or all of these undefined.
21// These are only required if you want to perform custom actions.
22
23/*
24
25void matrix_init_kb(void) {
26 // put your keyboard start-up code here
27 // runs once when the firmware starts up
28
29 matrix_init_user();
30}
31
32void matrix_scan_kb(void) {
33 // put your looping keyboard code here
34 // runs every cycle (a lot)
35
36 matrix_scan_user();
37}
38
39bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
40 // put your per-action keyboard code here
41 // runs for every action, just before processing by the firmware
42
43 return process_record_user(keycode, record);
44}
45
46void led_set_kb(uint8_t usb_led) {
47 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
48
49 led_set_user(usb_led);
50}
51
52*/
diff --git a/quantum/template/ps2avrgb/readme.md b/quantum/template/ps2avrgb/readme.md
index 3dce0e950..b45ef91c9 100644
--- a/quantum/template/ps2avrgb/readme.md
+++ b/quantum/template/ps2avrgb/readme.md
@@ -4,9 +4,9 @@
4 4
5A short description of the keyboard/project 5A short description of the keyboard/project
6 6
7Keyboard Maintainer: [%YOUR_NAME%](https://github.com/yourusername) 7* Keyboard Maintainer: [%YOUR_NAME%](https://github.com/yourusername)
8Hardware Supported: The PCBs, controllers supported 8* Hardware Supported: The PCBs, controllers supported
9Hardware Availability: links to where you can find this hardware 9* Hardware Availability: links to where you can find this hardware
10 10
11Make example for this keyboard (after setting up your build environment): 11Make example for this keyboard (after setting up your build environment):
12 12
diff --git a/quantum/template/ps2avrgb/rules.mk b/quantum/template/ps2avrgb/rules.mk
index ec57b03dc..b9b81a675 100644
--- a/quantum/template/ps2avrgb/rules.mk
+++ b/quantum/template/ps2avrgb/rules.mk
@@ -11,14 +11,16 @@ MCU = atmega32a
11# ATmega328P USBasp 11# ATmega328P USBasp
12BOOTLOADER = bootloadHID 12BOOTLOADER = bootloadHID
13 13
14# build options 14# Build Options
15BOOTMAGIC_ENABLE = no 15# change yes to no to disable
16MOUSEKEY_ENABLE = no 16#
17EXTRAKEY_ENABLE = yes 17BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
18CONSOLE_ENABLE = yes 18MOUSEKEY_ENABLE = no # Mouse keys
19COMMAND_ENABLE = yes 19EXTRAKEY_ENABLE = yes # Audio control and System control
20BACKLIGHT_ENABLE = no 20CONSOLE_ENABLE = yes # Console for debug
21RGBLIGHT_ENABLE = yes 21COMMAND_ENABLE = yes # Commands for debug and configuration
22BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
23RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
22WS2812_DRIVER = i2c 24WS2812_DRIVER = i2c
23 25
24OPT_DEFS = -DDEBUG_LEVEL=0 26OPT_DEFS = -DDEBUG_LEVEL=0
diff --git a/util/new_keyboard.sh b/util/new_keyboard.sh
index fe7c1a829..11c6497e2 100755
--- a/util/new_keyboard.sh
+++ b/util/new_keyboard.sh
@@ -86,6 +86,7 @@ replace_year_placeholders() {
86replace_keyboard_placeholders() { 86replace_keyboard_placeholders() {
87 local replace_keyboard_filenames=( 87 local replace_keyboard_filenames=(
88 "${keyboard_dir}/config.h" 88 "${keyboard_dir}/config.h"
89 "${keyboard_dir}/info.json"
89 "${keyboard_dir}/readme.md" 90 "${keyboard_dir}/readme.md"
90 "${keyboard_dir}/${keyboard_name}.c" 91 "${keyboard_dir}/${keyboard_name}.c"
91 "${keyboard_dir}/keymaps/default/readme.md" 92 "${keyboard_dir}/keymaps/default/readme.md"
@@ -97,6 +98,7 @@ replace_keyboard_placeholders() {
97replace_name_placeholders() { 98replace_name_placeholders() {
98 local replace_name_filenames=( 99 local replace_name_filenames=(
99 "${keyboard_dir}/config.h" 100 "${keyboard_dir}/config.h"
101 "${keyboard_dir}/info.json"
100 "${keyboard_dir}/readme.md" 102 "${keyboard_dir}/readme.md"
101 "${keyboard_dir}/${keyboard_name}.c" 103 "${keyboard_dir}/${keyboard_name}.c"
102 "${keyboard_dir}/${keyboard_name}.h" 104 "${keyboard_dir}/${keyboard_name}.h"