aboutsummaryrefslogtreecommitdiff
path: root/quantum/template
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/template')
-rw-r--r--quantum/template/avr/config.h31
-rw-r--r--quantum/template/avr/readme.md2
-rw-r--r--quantum/template/avr/rules.mk25
-rw-r--r--quantum/template/avr/template.h14
-rw-r--r--quantum/template/base/keymaps/default/keymap.c54
-rw-r--r--quantum/template/ps2avrgb/config.h4
-rw-r--r--quantum/template/ps2avrgb/readme.md2
-rw-r--r--quantum/template/ps2avrgb/rules.mk4
-rw-r--r--quantum/template/ps2avrgb/template.h12
9 files changed, 97 insertions, 51 deletions
diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h
index caa72af0c..eed50e5c0 100644
--- a/quantum/template/avr/config.h
+++ b/quantum/template/avr/config.h
@@ -48,17 +48,35 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
48/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ 48/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
49#define DIODE_DIRECTION COL2ROW 49#define DIODE_DIRECTION COL2ROW
50 50
51/*
52 * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
53 */
54#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
55
51// #define BACKLIGHT_PIN B7 56// #define BACKLIGHT_PIN B7
52// #define BACKLIGHT_BREATHING 57// #define BACKLIGHT_BREATHING
53// #define BACKLIGHT_LEVELS 3 58// #define BACKLIGHT_LEVELS 3
54 59
55// #define RGB_DI_PIN E2 60// #define RGB_DI_PIN E2
56// #ifdef RGB_DI_PIN 61// #ifdef RGB_DI_PIN
57// #define RGBLIGHT_ANIMATIONS 62// #define RGBLED_NUM 16
58// #define RGBLED_NUM 16 63// #define RGBLIGHT_HUE_STEP 8
59// #define RGBLIGHT_HUE_STEP 8 64// #define RGBLIGHT_SAT_STEP 8
60// #define RGBLIGHT_SAT_STEP 8 65// #define RGBLIGHT_VAL_STEP 8
61// #define RGBLIGHT_VAL_STEP 8 66// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
67// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
68// /*== all animations enable ==*/
69// #define RGBLIGHT_ANIMATIONS
70// /*== or choose animations ==*/
71// #define RGBLIGHT_EFFECT_BREATHING
72// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
73// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
74// #define RGBLIGHT_EFFECT_SNAKE
75// #define RGBLIGHT_EFFECT_KNIGHT
76// #define RGBLIGHT_EFFECT_CHRISTMAS
77// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
78// #define RGBLIGHT_EFFECT_RGB_TEST
79// #define RGBLIGHT_EFFECT_ALTERNATING
62// #endif 80// #endif
63 81
64/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ 82/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
@@ -222,3 +240,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
222#endif 240#endif
223*/ 241*/
224 242
243/* Bootmagic Lite key configuration */
244// #define BOOTMAGIC_LITE_ROW 0
245// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/quantum/template/avr/readme.md b/quantum/template/avr/readme.md
index d9349811d..d243c66a9 100644
--- a/quantum/template/avr/readme.md
+++ b/quantum/template/avr/readme.md
@@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment):
12 12
13 make %KEYBOARD%:default 13 make %KEYBOARD%:default
14 14
15See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ No newline at end of file 15See 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).
diff --git a/quantum/template/avr/rules.mk b/quantum/template/avr/rules.mk
index 92f3a03a9..383a3594b 100644
--- a/quantum/template/avr/rules.mk
+++ b/quantum/template/avr/rules.mk
@@ -39,13 +39,24 @@ F_USB = $(F_CPU)
39OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT 39OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
40 40
41 41
42# Boot Section Size in *bytes* 42# Bootloader selection
43# Teensy halfKay 512 43# Teensy halfkay
44# Teensy++ halfKay 1024 44# Pro Micro caterina
45# Atmel DFU loader 4096 45# Atmel DFU atmel-dfu
46# LUFA bootloader 4096 46# LUFA DFU lufa-dfu
47# USBaspLoader 2048 47# QMK DFU qmk-dfu
48OPT_DEFS += -DBOOTLOADER_SIZE=4096 48# atmega32a bootloadHID
49BOOTLOADER = atmel-dfu
50
51
52# If you don't know the bootloader type, then you can specify the
53# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
54# Teensy halfKay 512
55# Teensy++ halfKay 1024
56# Atmel DFU loader 4096
57# LUFA bootloader 4096
58# USBaspLoader 2048
59# OPT_DEFS += -DBOOTLOADER_SIZE=4096
49 60
50 61
51# Build Options 62# Build Options
diff --git a/quantum/template/avr/template.h b/quantum/template/avr/template.h
index 031efc952..0d626ed50 100644
--- a/quantum/template/avr/template.h
+++ b/quantum/template/avr/template.h
@@ -18,12 +18,14 @@
18 18
19#include "quantum.h" 19#include "quantum.h"
20 20
21// This a shortcut to help you visually see your layout. 21/* This a shortcut to help you visually see your layout.
22// The following is an example using the Planck MIT layout 22 *
23// The first section contains all of the arguments representing the physical 23 * The first section contains all of the arguments representing the physical
24// layout of the board and position of the keys 24 * layout of the board and position of the keys.
25// The second converts the arguments into a two-dimensional array which 25 *
26// represents the switch matrix. 26 * The second converts the arguments into a two-dimensional array which
27 * represents the switch matrix.
28 */
27#define LAYOUT( \ 29#define LAYOUT( \
28 K00, K01, K02, \ 30 K00, K01, K02, \
29 K10, K11 \ 31 K10, K11 \
diff --git a/quantum/template/base/keymaps/default/keymap.c b/quantum/template/base/keymaps/default/keymap.c
index 14a8bc0f2..5f0730c8a 100644
--- a/quantum/template/base/keymaps/default/keymap.c
+++ b/quantum/template/base/keymaps/default/keymap.c
@@ -15,32 +15,40 @@
15 */ 15 */
16#include QMK_KEYBOARD_H 16#include QMK_KEYBOARD_H
17 17
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 18// Defines the keycodes used by our macros in process_record_user
19[0] = LAYOUT( /* Base */ 19enum custom_keycodes {
20 KC_A, KC_1, KC_H, \ 20 QMKBEST = SAFE_RANGE,
21 KC_TAB, KC_SPC \ 21 QMKURL
22),
23}; 22};
24 23
25const uint16_t PROGMEM fn_actions[] = { 24const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26 25 [0] = LAYOUT( /* Base */
26 KC_A, KC_1, KC_H, \
27 KC_TAB, KC_SPC \
28 ),
27}; 29};
28 30
29const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) 31bool process_record_user(uint16_t keycode, keyrecord_t *record) {
30{ 32 switch (keycode) {
31 // MACRODOWN only works in this function 33 case QMKBEST:
32 switch(id) { 34 if (record->event.pressed) {
33 case 0: 35 // when keycode QMKBEST is pressed
34 if (record->event.pressed) { 36 SEND_STRING("QMK is the best thing ever!");
35 register_code(KC_RSFT); 37 } else {
36 } else { 38 // when keycode QMKBEST is released
37 unregister_code(KC_RSFT);
38 }
39 break;
40 } 39 }
41 return MACRO_NONE; 40 break;
42}; 41 case QMKURL:
43 42 if (record->event.pressed) {
43 // when keycode QMKURL is pressed
44 SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
45 } else {
46 // when keycode QMKURL is released
47 }
48 break;
49 }
50 return true;
51}
44 52
45void matrix_init_user(void) { 53void matrix_init_user(void) {
46 54
@@ -50,10 +58,6 @@ void matrix_scan_user(void) {
50 58
51} 59}
52 60
53bool process_record_user(uint16_t keycode, keyrecord_t *record) {
54 return true;
55}
56
57void led_set_user(uint8_t usb_led) { 61void led_set_user(uint8_t usb_led) {
58 62
59} 63}
diff --git a/quantum/template/ps2avrgb/config.h b/quantum/template/ps2avrgb/config.h
index d2c83781f..4ff3513bc 100644
--- a/quantum/template/ps2avrgb/config.h
+++ b/quantum/template/ps2avrgb/config.h
@@ -44,3 +44,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
44 44
45/* key combination for command */ 45/* key combination for command */
46#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) 46#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
47
48/* Bootmagic Lite key configuration */
49// #define BOOTMAGIC_LITE_ROW 0
50// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/quantum/template/ps2avrgb/readme.md b/quantum/template/ps2avrgb/readme.md
index 1dcbe6e75..feec722a5 100644
--- a/quantum/template/ps2avrgb/readme.md
+++ b/quantum/template/ps2avrgb/readme.md
@@ -41,4 +41,4 @@ macOS:
414. Place your keyboard into reset. 414. Place your keyboard into reset.
425. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. 425. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
43 43
44See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. 44See 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).
diff --git a/quantum/template/ps2avrgb/rules.mk b/quantum/template/ps2avrgb/rules.mk
index 68d50aec6..85603f955 100644
--- a/quantum/template/ps2avrgb/rules.mk
+++ b/quantum/template/ps2avrgb/rules.mk
@@ -31,8 +31,8 @@ F_CPU = 12000000
31BOOTLOADER = bootloadHID 31BOOTLOADER = bootloadHID
32 32
33# build options 33# build options
34BOOTMAGIC_ENABLE = yes 34BOOTMAGIC_ENABLE = full
35MOUSEKEY_ENABLE = yes 35MOUSEKEY_ENABLE = no
36EXTRAKEY_ENABLE = yes 36EXTRAKEY_ENABLE = yes
37CONSOLE_ENABLE = yes 37CONSOLE_ENABLE = yes
38COMMAND_ENABLE = yes 38COMMAND_ENABLE = yes
diff --git a/quantum/template/ps2avrgb/template.h b/quantum/template/ps2avrgb/template.h
index c3924ee71..b4d6f4662 100644
--- a/quantum/template/ps2avrgb/template.h
+++ b/quantum/template/ps2avrgb/template.h
@@ -18,10 +18,14 @@
18 18
19#include "quantum.h" 19#include "quantum.h"
20 20
21// This a shortcut to help you visually see your layout. 21/* This a shortcut to help you visually see your layout.
22// The following is an example using the Planck MIT layout 22 *
23// The first section contains all of the arguments 23 * The first section contains all of the arguments representing the physical
24// The second converts the arguments into a two-dimensional array 24 * layout of the board and position of the keys.
25 *
26 * The second converts the arguments into a two-dimensional array which
27 * represents the switch matrix.
28 */
25#define LAYOUT( \ 29#define LAYOUT( \
26 k00, k01, k02, \ 30 k00, k01, k02, \
27 k10, k11 \ 31 k10, k11 \