From bfe95b9da1dc938bbf9733c5591828ff0485a2a3 Mon Sep 17 00:00:00 2001 From: zvecr Date: Mon, 23 Aug 2021 23:23:40 +0100 Subject: [PATCH 1/3] Misc folder tidy --- {quantum/template => data/templates}/avr/config.h | 0 {quantum/template => data/templates}/avr/readme.md | 0 {quantum/template => data/templates}/avr/rules.mk | 0 {quantum/template => data/templates}/base/info.json | 0 {quantum/template => data/templates}/base/keyboard.c | 0 {quantum/template => data/templates}/base/keyboard.h | 0 .../templates}/base/keymaps/default/keymap.c | 0 .../templates}/base/keymaps/default/readme.md | 0 {quantum/template => data/templates}/ps2avrgb/config.h | 0 {quantum/template => data/templates}/ps2avrgb/readme.md | 0 {quantum/template => data/templates}/ps2avrgb/rules.mk | 0 lib/python/qmk/cli/format/c.py | 2 +- lib/python/qmk/cli/new/keyboard.py | 4 ++-- {quantum/tools => util}/eeprom_reset.hex | 0 util/new_keyboard.sh | 6 +++--- {quantum/tools => util}/readme.md | 0 16 files changed, 6 insertions(+), 6 deletions(-) rename {quantum/template => data/templates}/avr/config.h (100%) rename {quantum/template => data/templates}/avr/readme.md (100%) rename {quantum/template => data/templates}/avr/rules.mk (100%) rename {quantum/template => data/templates}/base/info.json (100%) rename {quantum/template => data/templates}/base/keyboard.c (100%) rename {quantum/template => data/templates}/base/keyboard.h (100%) rename {quantum/template => data/templates}/base/keymaps/default/keymap.c (100%) rename {quantum/template => data/templates}/base/keymaps/default/readme.md (100%) rename {quantum/template => data/templates}/ps2avrgb/config.h (100%) rename {quantum/template => data/templates}/ps2avrgb/readme.md (100%) rename {quantum/template => data/templates}/ps2avrgb/rules.mk (100%) rename {quantum/tools => util}/eeprom_reset.hex (100%) rename {quantum/tools => util}/readme.md (100%) diff --git a/quantum/template/avr/config.h b/data/templates/avr/config.h similarity index 100% rename from quantum/template/avr/config.h rename to data/templates/avr/config.h diff --git a/quantum/template/avr/readme.md b/data/templates/avr/readme.md similarity index 100% rename from quantum/template/avr/readme.md rename to data/templates/avr/readme.md diff --git a/quantum/template/avr/rules.mk b/data/templates/avr/rules.mk similarity index 100% rename from quantum/template/avr/rules.mk rename to data/templates/avr/rules.mk diff --git a/quantum/template/base/info.json b/data/templates/base/info.json similarity index 100% rename from quantum/template/base/info.json rename to data/templates/base/info.json diff --git a/quantum/template/base/keyboard.c b/data/templates/base/keyboard.c similarity index 100% rename from quantum/template/base/keyboard.c rename to data/templates/base/keyboard.c diff --git a/quantum/template/base/keyboard.h b/data/templates/base/keyboard.h similarity index 100% rename from quantum/template/base/keyboard.h rename to data/templates/base/keyboard.h diff --git a/quantum/template/base/keymaps/default/keymap.c b/data/templates/base/keymaps/default/keymap.c similarity index 100% rename from quantum/template/base/keymaps/default/keymap.c rename to data/templates/base/keymaps/default/keymap.c diff --git a/quantum/template/base/keymaps/default/readme.md b/data/templates/base/keymaps/default/readme.md similarity index 100% rename from quantum/template/base/keymaps/default/readme.md rename to data/templates/base/keymaps/default/readme.md diff --git a/quantum/template/ps2avrgb/config.h b/data/templates/ps2avrgb/config.h similarity index 100% rename from quantum/template/ps2avrgb/config.h rename to data/templates/ps2avrgb/config.h diff --git a/quantum/template/ps2avrgb/readme.md b/data/templates/ps2avrgb/readme.md similarity index 100% rename from quantum/template/ps2avrgb/readme.md rename to data/templates/ps2avrgb/readme.md diff --git a/quantum/template/ps2avrgb/rules.mk b/data/templates/ps2avrgb/rules.mk similarity index 100% rename from quantum/template/ps2avrgb/rules.mk rename to data/templates/ps2avrgb/rules.mk diff --git a/lib/python/qmk/cli/format/c.py b/lib/python/qmk/cli/format/c.py index b7263e19f315..0160e6036f63 100644 --- a/lib/python/qmk/cli/format/c.py +++ b/lib/python/qmk/cli/format/c.py @@ -12,7 +12,7 @@ c_file_suffixes = ('c', 'h', 'cpp') core_dirs = ('drivers', 'quantum', 'tests', 'tmk_core', 'platforms') -ignored = ('tmk_core/protocol/usb_hid', 'quantum/template', 'platforms/chibios') +ignored = ('tmk_core/protocol/usb_hid', 'platforms/chibios/boards') def find_clang_format(): diff --git a/lib/python/qmk/cli/new/keyboard.py b/lib/python/qmk/cli/new/keyboard.py index 9e4232679dfc..369d2bd7dafb 100644 --- a/lib/python/qmk/cli/new/keyboard.py +++ b/lib/python/qmk/cli/new/keyboard.py @@ -115,9 +115,9 @@ def find_user_name(): def copy_templates(keyboard_type, keyboard_path): - """Copies the template files from quantum/template to the new keyboard directory. + """Copies the template files from data/templates to the new keyboard directory. """ - template_base_path = Path('quantum/template') + template_base_path = Path('data/templates') keyboard_basename = keyboard_path.name cli.log.info('Copying base template files...') diff --git a/quantum/tools/eeprom_reset.hex b/util/eeprom_reset.hex similarity index 100% rename from quantum/tools/eeprom_reset.hex rename to util/eeprom_reset.hex diff --git a/util/new_keyboard.sh b/util/new_keyboard.sh index 87b7cde0c95a..62e8cb9e133c 100755 --- a/util/new_keyboard.sh +++ b/util/new_keyboard.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # This script generates a new keyboard directory under keyboards/, -# and copies the template files from quantum/template/ into it. +# and copies the template files from data/templates/ into it. # Print an error message with the word "ERROR" in red. echo_error() { @@ -35,11 +35,11 @@ copy_templates() { mkdir -p "$keyboard_dir" echo -n "Copying base template files..." - cp -r "quantum/template/base/." "${keyboard_dir}" + cp -r "data/templates/base/." "${keyboard_dir}" echo " done" echo -n "Copying $keyboard_type template files..." - cp -r "quantum/template/${keyboard_type}/." "${keyboard_dir}" + cp -r "data/templates/${keyboard_type}/." "${keyboard_dir}" echo " done" echo -n "Renaming keyboard files..." diff --git a/quantum/tools/readme.md b/util/readme.md similarity index 100% rename from quantum/tools/readme.md rename to util/readme.md From e147fdec73cd0654f016de709818166c1d33e4be Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 24 Aug 2021 00:20:53 +0100 Subject: [PATCH 2/3] Review comments --- util/readme.md | 6 ------ util/{eeprom_reset.hex => reset.eep} | 0 2 files changed, 6 deletions(-) delete mode 100644 util/readme.md rename util/{eeprom_reset.hex => reset.eep} (100%) diff --git a/util/readme.md b/util/readme.md deleted file mode 100644 index 5f355256def8..000000000000 --- a/util/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -`eeprom_reset.hex` is to reset the eeprom on the Atmega32u4, like this: - - dfu-programmer atmega32u4 erase - dfu-programmer atmega32u4 flash --eeprom eeprom_reset.hex - - You'll need to reflash afterwards, because DFU requires the flash to be erased before messing with the eeprom. diff --git a/util/eeprom_reset.hex b/util/reset.eep similarity index 100% rename from util/eeprom_reset.hex rename to util/reset.eep From 52e2749b9c4dba8ee78500006bb1dbfec751832c Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 24 Aug 2021 11:12:07 +0100 Subject: [PATCH 3/3] Remove redundant entry --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index b30b87ba11a7..f3b76f7edf5b 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,6 @@ api_data/v1 doxygen/ quantum/version.h -!quantum/tools/eeprom_reset.hex *.bin *.eep *.hex