From 2cade3a48300e0709f8aec68602faf90947b6738 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 24 Aug 2021 17:07:11 +0100 Subject: [PATCH] Align some quantum sub-directories (#14134) * Misc folder tidy * Review comments * Remove redundant entry --- .gitignore | 1 - {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 .../template => data/templates}/base/keyboard.c | 0 .../template => data/templates}/base/keyboard.h | 0 .../templates}/base/keymaps/default/keymap.c | 0 .../templates}/base/keymaps/default/readme.md | 0 .../template => data/templates}/ps2avrgb/config.h | 0 .../template => data/templates}/ps2avrgb/readme.md | 0 .../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/readme.md | 6 ------ util/new_keyboard.sh | 6 +++--- quantum/tools/eeprom_reset.hex => util/reset.eep | Bin 17 files changed, 6 insertions(+), 13 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%) delete mode 100644 quantum/tools/readme.md rename quantum/tools/eeprom_reset.hex => util/reset.eep (100%) diff --git a/.gitignore b/.gitignore index b30b87ba11..f3b76f7edf 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,6 @@ api_data/v1 doxygen/ quantum/version.h -!quantum/tools/eeprom_reset.hex *.bin *.eep *.hex 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 b7263e19f3..0160e6036f 100644 --- a/lib/python/qmk/cli/format/c.py +++ b/lib/python/qmk/cli/format/c.py @@ -12,7 +12,7 @@ from qmk.c_parse import c_source_files 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 9e4232679d..369d2bd7da 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/readme.md b/quantum/tools/readme.md deleted file mode 100644 index 5f355256de..0000000000 --- a/quantum/tools/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/new_keyboard.sh b/util/new_keyboard.sh index 87b7cde0c9..62e8cb9e13 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/eeprom_reset.hex b/util/reset.eep similarity index 100% rename from quantum/tools/eeprom_reset.hex rename to util/reset.eep