From ba42a5ae68a59ad514027d819c6b58ee86944e75 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 16 Jul 2019 17:26:38 +1000 Subject: Remove commented out MCUs in rules.mk (#5884) --- quantum/template/avr/rules.mk | 1 - 1 file changed, 1 deletion(-) (limited to 'quantum/template/avr') diff --git a/quantum/template/avr/rules.mk b/quantum/template/avr/rules.mk index 383a3594b4..bc370be039 100644 --- a/quantum/template/avr/rules.mk +++ b/quantum/template/avr/rules.mk @@ -1,5 +1,4 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 # Processor frequency. -- cgit v1.2.3 From a32f7e1a25a8a200d838aa8256ffe39708fbd723 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 16 Jul 2019 17:56:36 +1000 Subject: Store backlight breathing state in EEPROM (#6105) * Store backlight breathing state in EEPROM * Reduce backlight_config.level from 6 bits to 4 (max 15 "on" levels) * Error out if BACKLIGHT_LEVELS is > 15 * Remove mention of default backlight pin in rules.mk template * Remove pointless comment --- quantum/template/avr/config.h | 2 -- quantum/template/avr/rules.mk | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'quantum/template/avr') diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index 1e41a2d31d..fc65bb5976 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -91,8 +91,6 @@ along with this program. If not, see . /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST -/* number of backlight levels */ - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/quantum/template/avr/rules.mk b/quantum/template/avr/rules.mk index bc370be039..133c9e363b 100644 --- a/quantum/template/avr/rules.mk +++ b/quantum/template/avr/rules.mk @@ -70,7 +70,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode -- cgit v1.2.3 From a2e91ebec910d31a9f32cc56924ef3d6f0291e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Sat, 20 Jul 2019 22:21:40 +0200 Subject: Update IS_COMMAND definitions to use MOD_MASK_SHIFT (#6348) * Update IS_COMMAND definition in templates to use MOD_MASK_SHIFT * Update IS_COMMAND in docs * Update IS_COMMAND default definition in tmk_core * Update table in Command docs based on suggestion Co-Authored-By: fauxpark --- quantum/template/avr/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quantum/template/avr') diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index fc65bb5976..0fc7cf9cb9 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -136,7 +136,7 @@ along with this program. If not, see . /* key combination for magic key command */ /* defined by default; to change, uncomment and set to the combination you want */ -// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -- cgit v1.2.3 From 405dea01bef215a0b79524e4ff74364f1bcfeadf Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 9 Aug 2019 07:09:54 +1000 Subject: Add some defaults for ATmega32A to mcu_selection.mk (#6253) * Add some defaults for ATmega32A to mcu_selection.mk * Remove boilerplate from templates * Relax INTERRUPT_CONTROL_ENDPOINT and PROGRAM_CMD * Apply suggestions from code review Co-Authored-By: Drashna Jaelre --- quantum/template/avr/rules.mk | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'quantum/template/avr') diff --git a/quantum/template/avr/rules.mk b/quantum/template/avr/rules.mk index 133c9e363b..50deba92cf 100644 --- a/quantum/template/avr/rules.mk +++ b/quantum/template/avr/rules.mk @@ -1,42 +1,6 @@ # MCU name MCU = atmega32u4 -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay -- cgit v1.2.3 From b624f32f944acdc59dcb130674c09090c5c404cb Mon Sep 17 00:00:00 2001 From: skullY Date: Fri, 30 Aug 2019 11:19:03 -0700 Subject: clang-format changes --- quantum/template/avr/config.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'quantum/template/avr') diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index 0fc7cf9cb9..713d6be3a5 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -20,12 +20,12 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 -#define DEVICE_VER 0x0001 -#define MANUFACTURER %YOUR_NAME% -#define PRODUCT %KEYBOARD% -#define DESCRIPTION A custom keyboard +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER % YOUR_NAME % +#define PRODUCT % KEYBOARD % +#define DESCRIPTION A custom keyboard /* key matrix size */ #define MATRIX_ROWS 2 @@ -40,9 +40,11 @@ along with this program. If not, see . * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * -*/ -#define MATRIX_ROW_PINS { D0, D5 } -#define MATRIX_COL_PINS { F1, F0, B0 } + */ +#define MATRIX_ROW_PINS \ + { D0, D5 } +#define MATRIX_COL_PINS \ + { F1, F0, B0 } #define UNUSED_PINS /* COL2ROW, ROW2COL*/ @@ -51,7 +53,7 @@ along with this program. If not, see . /* * 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 SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING -- cgit v1.2.3 From de4a47f1cc28c4ef66e7560eac2a50f717070ae2 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 21 Sep 2019 15:06:32 +1000 Subject: Cleanup rules.mk for 32A and 328P keyboards (#6767) --- quantum/template/avr/rules.mk | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'quantum/template/avr') diff --git a/quantum/template/avr/rules.mk b/quantum/template/avr/rules.mk index 50deba92cf..0ed05e71b5 100644 --- a/quantum/template/avr/rules.mk +++ b/quantum/template/avr/rules.mk @@ -1,17 +1,16 @@ # MCU name MCU = atmega32u4 - # Bootloader selection # Teensy halfkay # Pro Micro caterina # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp 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 @@ -21,7 +20,6 @@ BOOTLOADER = atmel-dfu # USBaspLoader 2048 # OPT_DEFS += -DBOOTLOADER_SIZE=4096 - # Build Options # change yes to no to disable # -- cgit v1.2.3 From ed1bf3afa25d7e7674df7e8618dfaf243de3058b Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 10 Oct 2019 21:48:37 +1100 Subject: Prevent clang-format messing up placeholder tokens within keyboard templates (#6790) * Use .template file extension for keyboard template files * Filter out .template files completely before passing to clang-format * Undo file extension stuff; just ignore quantum/template dir --- quantum/template/avr/config.h | 10 ++++---- quantum/template/avr/keyboard.c | 51 +++++++++++++++++++++++++++++++++++++++++ quantum/template/avr/template.c | 51 ----------------------------------------- 3 files changed, 55 insertions(+), 57 deletions(-) create mode 100644 quantum/template/avr/keyboard.c delete mode 100644 quantum/template/avr/template.c (limited to 'quantum/template/avr') diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index 713d6be3a5..304a54ae59 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -23,8 +23,8 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x0000 #define DEVICE_VER 0x0001 -#define MANUFACTURER % YOUR_NAME % -#define PRODUCT % KEYBOARD % +#define MANUFACTURER %YOUR_NAME% +#define PRODUCT %KEYBOARD% #define DESCRIPTION A custom keyboard /* key matrix size */ @@ -41,10 +41,8 @@ along with this program. If not, see . * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -#define MATRIX_ROW_PINS \ - { D0, D5 } -#define MATRIX_COL_PINS \ - { F1, F0, B0 } +#define MATRIX_ROW_PINS { D0, D5 } +#define MATRIX_COL_PINS { F1, F0, B0 } #define UNUSED_PINS /* COL2ROW, ROW2COL*/ diff --git a/quantum/template/avr/keyboard.c b/quantum/template/avr/keyboard.c new file mode 100644 index 0000000000..e852a42c40 --- /dev/null +++ b/quantum/template/avr/keyboard.c @@ -0,0 +1,51 @@ +/* Copyright %YEAR% %YOUR_NAME% + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "%KEYBOARD%.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/quantum/template/avr/template.c b/quantum/template/avr/template.c deleted file mode 100644 index e852a42c40..0000000000 --- a/quantum/template/avr/template.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright %YEAR% %YOUR_NAME% - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "%KEYBOARD%.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -/* - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - led_set_user(usb_led); -} - -*/ -- cgit v1.2.3 From b23f6011c34dcb471c312655f7af37c0a0f5f779 Mon Sep 17 00:00:00 2001 From: Amber Holly Date: Sat, 19 Oct 2019 02:14:49 +0100 Subject: Remove build option firmware size impacts (#6947) * Update rules.mk template to remove build option size impacts * Add rules.mk cleaning script * Update all rules.mk files to remove build option firmware size impact messages * Remove references to feature filesize in documentation * Revert "Update all rules.mk files to remove build option firmware size impact messages" This reverts commit 7cfe70976bcc223bf47c960b2e6af8596df80a32. * Fix regex in cleanup script and exclude keymaps/ directories * Update quantum/template/avr/rules.mk Fixed missing tabs/spaces. Co-Authored-By: fauxpark --- quantum/template/avr/rules.mk | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'quantum/template/avr') diff --git a/quantum/template/avr/rules.mk b/quantum/template/avr/rules.mk index 0ed05e71b5..bb2bd14f9f 100644 --- a/quantum/template/avr/rules.mk +++ b/quantum/template/avr/rules.mk @@ -23,10 +23,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -34,9 +34,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode +MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs -- cgit v1.2.3 From e6cc9cc78d40af1386f9a116d5fcc95c20233110 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 2 Nov 2019 13:06:03 +1100 Subject: Template updates (#7221) * Template updates * Flesh out info.json & keymap.c, and turn double spaces section into a list * Add enum to demonstrate layer naming * Semicolon --- quantum/template/avr/keyboard.c | 51 ----------------------------------------- quantum/template/avr/readme.md | 6 ++--- quantum/template/avr/rules.mk | 1 + 3 files changed, 4 insertions(+), 54 deletions(-) delete mode 100644 quantum/template/avr/keyboard.c (limited to 'quantum/template/avr') diff --git a/quantum/template/avr/keyboard.c b/quantum/template/avr/keyboard.c deleted file mode 100644 index e852a42c40..0000000000 --- a/quantum/template/avr/keyboard.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright %YEAR% %YOUR_NAME% - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "%KEYBOARD%.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -/* - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - led_set_user(usb_led); -} - -*/ diff --git a/quantum/template/avr/readme.md b/quantum/template/avr/readme.md index 719222d377..0430dd0fc9 100644 --- a/quantum/template/avr/readme.md +++ b/quantum/template/avr/readme.md @@ -4,9 +4,9 @@ A short description of the keyboard/project -Keyboard Maintainer: [%YOUR_NAME%](https://github.com/yourusername) -Hardware Supported: The PCBs, controllers supported -Hardware Availability: links to where you can find this hardware +* Keyboard Maintainer: [%YOUR_NAME%](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): diff --git a/quantum/template/avr/rules.mk b/quantum/template/avr/rules.mk index bb2bd14f9f..ea0c83c68a 100644 --- a/quantum/template/avr/rules.mk +++ b/quantum/template/avr/rules.mk @@ -13,6 +13,7 @@ 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 +# Otherwise, delete this section # Teensy halfKay 512 # Teensy++ halfKay 1024 # Atmel DFU loader 4096 -- cgit v1.2.3 From 3f6426ff5f14d1cdac9af935aaf175d3dbca3592 Mon Sep 17 00:00:00 2001 From: Stephen Hogsten Date: Mon, 11 Nov 2019 18:27:20 -0800 Subject: disable deprecated actions (#7211) * disable deprecated actions * wrap no action with link time optimization test * fix link time optimization check --- quantum/template/avr/config.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'quantum/template/avr') diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index 304a54ae59..7e4a014495 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -190,9 +190,12 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif /* * MIDI options */ -- cgit v1.2.3