From ccfe60eb57b6cb11c5c9914445cceae77c09c0da Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 9 Aug 2018 17:45:43 -0700 Subject: Update ps2avrgb readme (#3599) * give ps2avrgb a specific readme * add homebrew and crosspack avr step * update readme of all ps2avrgb boards to reflect the new template --- quantum/template/avr/readme.md | 15 +++++++++++++ quantum/template/base/readme.md | 15 ------------- quantum/template/ps2avrgb/readme.md | 44 +++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 15 deletions(-) create mode 100644 quantum/template/avr/readme.md delete mode 100644 quantum/template/base/readme.md create mode 100644 quantum/template/ps2avrgb/readme.md (limited to 'quantum/template') diff --git a/quantum/template/avr/readme.md b/quantum/template/avr/readme.md new file mode 100644 index 000000000..d9349811d --- /dev/null +++ b/quantum/template/avr/readme.md @@ -0,0 +1,15 @@ +# %KEYBOARD% + +![%KEYBOARD%](imgur.com image replace me!) + +A short description of the keyboard/project + +Keyboard Maintainer: [You](https://github.com/yourusername) +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 %KEYBOARD%:default + +See [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 diff --git a/quantum/template/base/readme.md b/quantum/template/base/readme.md deleted file mode 100644 index d9349811d..000000000 --- a/quantum/template/base/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# %KEYBOARD% - -![%KEYBOARD%](imgur.com image replace me!) - -A short description of the keyboard/project - -Keyboard Maintainer: [You](https://github.com/yourusername) -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 %KEYBOARD%:default - -See [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 diff --git a/quantum/template/ps2avrgb/readme.md b/quantum/template/ps2avrgb/readme.md new file mode 100644 index 000000000..1dcbe6e75 --- /dev/null +++ b/quantum/template/ps2avrgb/readme.md @@ -0,0 +1,44 @@ +# %KEYBOARD% + +![%KEYBOARD%](imgur.com image replace me!) + +A short description of the keyboard/project + +Keyboard Maintainer: [You](https://github.com/yourusername) +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 %KEYBOARD%:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python + brew install pyusb + brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + +See [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. -- cgit v1.2.3-24-g4f1b From 836efb50c6fa1be9e3189242479e7ae5bc2b3f38 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 29 Aug 2018 10:57:30 -0700 Subject: Updated templates for use by new_project.sh (#3783) * template.h file cleanup Reformatted the pre-macro comments as block comments. Updated the ps2avrgb template comment to match the avr template's comment, which was more informative. Deleted the line about the macro representing the Planck MIT layout, because the macro doesn't represent that layout anymore. * base template keymap.c refactor Deleted the deprecated TMK macro functions. Defined two custom keycodes for use as macros by process_record_user. process_record_user is now after the keymap and before matrix_init_user, where the deleted TMK functions were. * Removed an extra " from macro command per @drashna * Added BOOTLOADER rule to avr/rules.mk per @drashna * Updated Bootloader sections per @drashna * Updated links to docs at the bottom of both avr and ps2avrgb template readme.md files Corrected the links to the Build Environment Setup and the Make Instructions docs. Added direct link to the QMK Complete Newbs Guide. --- quantum/template/avr/readme.md | 2 +- quantum/template/avr/rules.mk | 25 ++++++++---- quantum/template/avr/template.h | 14 ++++--- quantum/template/base/keymaps/default/keymap.c | 54 ++++++++++++++------------ quantum/template/ps2avrgb/readme.md | 2 +- quantum/template/ps2avrgb/template.h | 12 ++++-- 6 files changed, 65 insertions(+), 44 deletions(-) (limited to 'quantum/template') 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): make %KEYBOARD%:default -See [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 +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). 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) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 # 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 @@ #include "quantum.h" -// This a shortcut to help you visually see your layout. -// The following is an example using the Planck MIT layout -// The first section contains all of the arguments representing the physical -// layout of the board and position of the keys -// The second converts the arguments into a two-dimensional array which -// represents the switch matrix. +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ #define LAYOUT( \ K00, K01, K02, \ 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 @@ */ #include QMK_KEYBOARD_H -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = LAYOUT( /* Base */ - KC_A, KC_1, KC_H, \ - KC_TAB, KC_SPC \ -), +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL }; -const uint16_t PROGMEM fn_actions[] = { - +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_A, KC_1, KC_H, \ + KC_TAB, KC_SPC \ + ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released } - return MACRO_NONE; -}; - + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} void matrix_init_user(void) { @@ -50,10 +58,6 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } 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: 4. Place your keyboard into reset. 5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. -See [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. +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). 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 @@ #include "quantum.h" -// This a shortcut to help you visually see your layout. -// The following is an example using the Planck MIT layout -// The first section contains all of the arguments -// The second converts the arguments into a two-dimensional array +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ #define LAYOUT( \ k00, k01, k02, \ k10, k11 \ -- cgit v1.2.3-24-g4f1b From 4ffcacd92086870eb7a3102d54178a7af64edb0c Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 27 Oct 2018 11:53:50 -0700 Subject: Add Bootmagic Lite to QMK (#4215) * Preliminary additon of bootmagic lite functionality * Cleanup code * Clean up bootmagic code * Add documentation and clean up code * Make 'lite' an option for BOOTMAGIC_ENABLE * Update Templates with note about Bootmagic Lite option * Detect Debounce variable * Make sure debounce is a non-zero number * Capitalize Bootmagic * Capitalize bootmagic * Update wording * Re-add EEPROM reset, by popular demand And add eeprom-less version to drashna userspace for his sanity * Fix spacing * Set BOOTMAGIC_ENABLE to use full/lite/off And default yes to "full" for compatibility * Add Bootmagic lite info to templates * Remove text from makefiles * Cleanup of makefile * mention yes in bootmagic docs * Wordsmitthing the docs * Fix white spaces * Readd default bootmagic setting, because it's necessary --- quantum/template/avr/config.h | 3 +++ quantum/template/ps2avrgb/config.h | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'quantum/template') diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index caa72af0c..56395f376 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -222,3 +222,6 @@ along with this program. If not, see . #endif */ +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 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 . /* key combination for command */ #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 -- cgit v1.2.3-24-g4f1b From d0f8e1babee406af6c17759200173109705a35e3 Mon Sep 17 00:00:00 2001 From: mtei <2170248+mtei@users.noreply.github.com> Date: Thu, 25 Oct 2018 02:03:29 +0900 Subject: modify quantum/template/avr/config.h: add rgblight effect configurations --- quantum/template/avr/config.h | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'quantum/template') diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index 56395f376..463ddff2d 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -54,11 +54,24 @@ along with this program. If not, see . // #define RGB_DI_PIN E2 // #ifdef RGB_DI_PIN -// #define RGBLIGHT_ANIMATIONS -// #define RGBLED_NUM 16 -// #define RGBLIGHT_HUE_STEP 8 -// #define RGBLIGHT_SAT_STEP 8 -// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -- cgit v1.2.3-24-g4f1b From a495326aed8292138577387d9124a4b980904d37 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 27 Nov 2018 16:54:43 -0800 Subject: Turn off Mousekeys for several ps2avrGB keyboards (#4502) * Turn off Mousekeys for jc65 * Turn off Mousekeys for ps2avrGB templates * Disable mousekeys for bmini and canoe as well --- quantum/template/ps2avrgb/rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'quantum/template') 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 BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = yes -MOUSEKEY_ENABLE = yes +BOOTMAGIC_ENABLE = full +MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes -- cgit v1.2.3-24-g4f1b From 155e9310ff685f557287749bef2e02510538a6d9 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sat, 15 Dec 2018 04:00:10 +0900 Subject: Make quantum/split_common/serial.[ch] configurable (#4419) * add temporary compile test shell script * add 'CONFIG_H += serial_backward_compatibility.h' into common_features.mk:SPLIT_KEYBOARD block * add quantum/split_common/serial_backward_compatibility.h SERIAL_PIN_PORT and other PIN define move to serial_backward_compatibility.h SERIAL_BACKLIT_START move to split_util.h * quantum/split_common/serial.c change to helix-serial.c style serial configuration * add temporary file quantum/split_common/split-keyboards-list.txt * add '#define SOFT_SERIAL_PIN D0' to keyboards/6lit/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/divergetm2/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/ergotravel/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/foobar/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/handwired/dactyl_manuform/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/handwired/qc60/config.h * add '//#define SOFT_SERIAL_PIN D0' to keyboards/handwired/xealous/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/iris/rev*/config.h * add '//#define SOFT_SERIAL_PIN D0' to keyboards/lets_split_eh/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/levinson/rev*/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/miniaxe/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/nyquist/rev?/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/quefrency/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/qwertyydox/config.h,keyboards/qwertyydox/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/redox/rev1/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/rorschach/rev1/config.h * remove '#define SOFT_SERIAL_PIN D0' from quantum/split_common/serial_backward_compatibility.h * remove temporary file quantum/split_common/split-keyboards-list.txt * remove temporary compile test shell script * Revert "remove temporary compile test shell script" This reverts commit 15b0021b4092127b8d8a21f572642ad3702b46d4. * update quantum/split_common/compile_split_test.sh for new keyboard test * add '#define SOFT_SERIAL_PIN D0' to keyboards/diverge3/config.h * add '#define SOFT_SERIAL_PIN D0' to keyboards/40percentclub/25/config.h * remove temporary compile test shell script * update docs/config_options.md, quantum/template/avr/config.h * fix quantum/template/avr/config.h * fix typo docs/config_options.md --- quantum/template/avr/config.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'quantum/template') diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index 463ddff2d..eed50e5c0 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -48,6 +48,11 @@ along with this program. If not, see . /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 -- cgit v1.2.3-24-g4f1b