2cade3a48300e0709f8aec68602faf90947b6738

Author
Joel Challis <git@zvecr.com>
Committer
GitHub <noreply@github.com>
Date

Message

Align some quantum sub-directories (#14134)

* Misc folder tidy

* Review comments

* Remove redundant entry

Diff

  1diff --git a/.gitignore b/.gitignore
  2index b30b87ba11a7a5f14d27f6bd004f262263a768cc..f3b76f7edf5b06d0ee8b6733223abff76b00b490 100644
  3--- a/.gitignore
  4+++ b/.gitignore
  5@@ -20,7 +20,6 @@
  6 api_data/v1
  7 doxygen/
  8 quantum/version.h
  9-!quantum/tools/eeprom_reset.hex
 10 *.bin
 11 *.eep
 12 *.hex
 13diff --git a/quantum/template/avr/config.h b/data/templates/avr/config.h
 14rename from quantum/template/avr/config.h
 15rename to data/templates/avr/config.h
 16diff --git a/quantum/template/avr/readme.md b/data/templates/avr/readme.md
 17rename from quantum/template/avr/readme.md
 18rename to data/templates/avr/readme.md
 19diff --git a/quantum/template/avr/rules.mk b/data/templates/avr/rules.mk
 20rename from quantum/template/avr/rules.mk
 21rename to data/templates/avr/rules.mk
 22diff --git a/quantum/template/base/info.json b/data/templates/base/info.json
 23rename from quantum/template/base/info.json
 24rename to data/templates/base/info.json
 25diff --git a/quantum/template/base/keyboard.c b/data/templates/base/keyboard.c
 26rename from quantum/template/base/keyboard.c
 27rename to data/templates/base/keyboard.c
 28diff --git a/quantum/template/base/keyboard.h b/data/templates/base/keyboard.h
 29rename from quantum/template/base/keyboard.h
 30rename to data/templates/base/keyboard.h
 31diff --git a/quantum/template/base/keymaps/default/keymap.c b/data/templates/base/keymaps/default/keymap.c
 32rename from quantum/template/base/keymaps/default/keymap.c
 33rename to data/templates/base/keymaps/default/keymap.c
 34diff --git a/quantum/template/base/keymaps/default/readme.md b/data/templates/base/keymaps/default/readme.md
 35rename from quantum/template/base/keymaps/default/readme.md
 36rename to data/templates/base/keymaps/default/readme.md
 37diff --git a/quantum/template/ps2avrgb/config.h b/data/templates/ps2avrgb/config.h
 38rename from quantum/template/ps2avrgb/config.h
 39rename to data/templates/ps2avrgb/config.h
 40diff --git a/quantum/template/ps2avrgb/readme.md b/data/templates/ps2avrgb/readme.md
 41rename from quantum/template/ps2avrgb/readme.md
 42rename to data/templates/ps2avrgb/readme.md
 43diff --git a/quantum/template/ps2avrgb/rules.mk b/data/templates/ps2avrgb/rules.mk
 44rename from quantum/template/ps2avrgb/rules.mk
 45rename to data/templates/ps2avrgb/rules.mk
 46diff --git a/lib/python/qmk/cli/format/c.py b/lib/python/qmk/cli/format/c.py
 47index b7263e19f315cf90ebe228336da0fd7c0ae770d1..0160e6036f630ef56e1f7f3a3cdf425cd277fdbe 100644
 48--- a/lib/python/qmk/cli/format/c.py
 49+++ b/lib/python/qmk/cli/format/c.py
 50@@ -12,7 +12,7 @@ from qmk.c_parse import c_source_files
 51 
 52 c_file_suffixes = ('c', 'h', 'cpp')
 53 core_dirs = ('drivers', 'quantum', 'tests', 'tmk_core', 'platforms')
 54-ignored = ('tmk_core/protocol/usb_hid', 'quantum/template', 'platforms/chibios')
 55+ignored = ('tmk_core/protocol/usb_hid', 'platforms/chibios/boards')
 56 
 57 
 58 def find_clang_format():
 59diff --git a/lib/python/qmk/cli/new/keyboard.py b/lib/python/qmk/cli/new/keyboard.py
 60index 9e4232679dfcacff01e0fdf098f53a1df9b98b04..369d2bd7dafba77d6ac15b981afb72237e3f132c 100644
 61--- a/lib/python/qmk/cli/new/keyboard.py
 62+++ b/lib/python/qmk/cli/new/keyboard.py
 63@@ -115,9 +115,9 @@ def find_user_name():
 64 
 65 
 66 def copy_templates(keyboard_type, keyboard_path):
 67-    """Copies the template files from quantum/template to the new keyboard directory.
 68+    """Copies the template files from data/templates to the new keyboard directory.
 69     """
 70-    template_base_path = Path('quantum/template')
 71+    template_base_path = Path('data/templates')
 72     keyboard_basename = keyboard_path.name
 73 
 74     cli.log.info('Copying base template files...')
 75diff --git a/quantum/tools/readme.md b/quantum/tools/readme.md
 76deleted file mode 100644
 77index 5f355256def834c3b0e5105354ee73b782802da0..0000000000000000000000000000000000000000
 78--- a/quantum/tools/readme.md
 79+++ /dev/null
 80@@ -1,6 +0,0 @@
 81-`eeprom_reset.hex` is to reset the eeprom on the Atmega32u4, like this:
 82-
 83-    dfu-programmer atmega32u4 erase
 84-    dfu-programmer atmega32u4 flash --eeprom eeprom_reset.hex
 85-
 86- You'll need to reflash afterwards, because DFU requires the flash to be erased before messing with the eeprom.
 87diff --git a/util/new_keyboard.sh b/util/new_keyboard.sh
 88index 87b7cde0c95ad9616cb493a6ce3609b00774a2b1..62e8cb9e133cab4d3afd641501563e2a53ee1a0d 100755
 89--- a/util/new_keyboard.sh
 90+++ b/util/new_keyboard.sh
 91@@ -1,7 +1,7 @@
 92 #!/usr/bin/env bash
 93 
 94 # This script generates a new keyboard directory under keyboards/,
 95-# and copies the template files from quantum/template/ into it.
 96+# and copies the template files from data/templates/ into it.
 97 
 98 # Print an error message with the word "ERROR" in red.
 99 echo_error() {
100@@ -35,11 +35,11 @@ copy_templates() {
101     mkdir -p "$keyboard_dir"
102 
103     echo -n "Copying base template files..."
104-    cp -r "quantum/template/base/." "${keyboard_dir}"
105+    cp -r "data/templates/base/." "${keyboard_dir}"
106     echo " done"
107 
108     echo -n "Copying $keyboard_type template files..."
109-    cp -r "quantum/template/${keyboard_type}/." "${keyboard_dir}"
110+    cp -r "data/templates/${keyboard_type}/." "${keyboard_dir}"
111     echo " done"
112 
113     echo -n "Renaming keyboard files..."
114diff --git a/quantum/tools/eeprom_reset.hex b/util/reset.eep
115rename from quantum/tools/eeprom_reset.hex
116rename to util/reset.eep