diff --git a/.gitignore b/.gitignore index 73c8582..c05765c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ hardware/tonberry-pico/tonberry-pico-backups/ software/build compile_commands.json .dir-locals.el +.cache diff --git a/software/src/.flake8 b/software/.flake8 similarity index 100% rename from software/src/.flake8 rename to software/.flake8 diff --git a/software/CMakeLists.txt b/software/CMakeLists.txt index 21df313..93d05d0 100644 --- a/software/CMakeLists.txt +++ b/software/CMakeLists.txt @@ -50,7 +50,7 @@ add_test(NAME generate-xml-report set_tests_properties(clean-reports PROPERTIES FIXTURES_SETUP "Report") set_tests_properties(generate-xml-report PROPERTIES FIXTURES_CLEANUP "Report") -add_subdirectory(src/audiocore) +add_subdirectory(modules/audiocore) add_custom_target(check-format find . -iname '*.[ch]' -exec clang-format -Werror --dry-run {} + diff --git a/software/boards/RPI_PICO_W/manifest.py b/software/boards/RPI_PICO_W/manifest.py index 58eb9e0..eb25825 100644 --- a/software/boards/RPI_PICO_W/manifest.py +++ b/software/boards/RPI_PICO_W/manifest.py @@ -5,7 +5,7 @@ require("bundle-networking") # Bluetooth require("aioble") -module("rp2_neopixel.py", "../../src") +module("rp2_neopixel.py", "../../modules") require("sdcard") require("aiorepl") @@ -14,5 +14,4 @@ module("mfrc522.py", "../../lib/micropython-mfrc522/") module("microdot.py", "../../lib/microdot/src/microdot/") # TonberryPico modules -module("audiocore.py", "../../src/audiocore") -package("nfc", base_path="../../src/") +module("audiocore.py", "../../modules/audiocore") diff --git a/software/build.sh b/software/build.sh index 30b1429..317ddd9 100755 --- a/software/build.sh +++ b/software/build.sh @@ -8,7 +8,7 @@ set -eu make -C mpy-cross -j "$(nproc)" make -C ports/rp2 BOARD=TONBERRY_RPI_PICO_W BOARD_DIR="$TOPDIR"/boards/RPI_PICO_W clean make -C ports/rp2 BOARD=TONBERRY_RPI_PICO_W BOARD_DIR="$TOPDIR"/boards/RPI_PICO_W \ - USER_C_MODULES="$TOPDIR"/src/micropython.cmake -j "$(nproc)" + USER_C_MODULES="$TOPDIR"/modules/micropython.cmake -j "$(nproc)" ) ( cd tools/mklittlefs diff --git a/software/src/.clang-format b/software/modules/.clang-format similarity index 100% rename from software/src/.clang-format rename to software/modules/.clang-format diff --git a/software/src/audiocore/CMakeLists.txt b/software/modules/audiocore/CMakeLists.txt similarity index 100% rename from software/src/audiocore/CMakeLists.txt rename to software/modules/audiocore/CMakeLists.txt diff --git a/software/src/audiocore/audiocore.c b/software/modules/audiocore/audiocore.c similarity index 100% rename from software/src/audiocore/audiocore.c rename to software/modules/audiocore/audiocore.c diff --git a/software/src/audiocore/audiocore.h b/software/modules/audiocore/audiocore.h similarity index 100% rename from software/src/audiocore/audiocore.h rename to software/modules/audiocore/audiocore.h diff --git a/software/src/audiocore/audiocore.py b/software/modules/audiocore/audiocore.py similarity index 100% rename from software/src/audiocore/audiocore.py rename to software/modules/audiocore/audiocore.py diff --git a/software/src/audiocore/i2s.c b/software/modules/audiocore/i2s.c similarity index 100% rename from software/src/audiocore/i2s.c rename to software/modules/audiocore/i2s.c diff --git a/software/src/audiocore/i2s.h b/software/modules/audiocore/i2s.h similarity index 100% rename from software/src/audiocore/i2s.h rename to software/modules/audiocore/i2s.h diff --git a/software/src/audiocore/i2s_max98357.pio b/software/modules/audiocore/i2s_max98357.pio similarity index 100% rename from software/src/audiocore/i2s_max98357.pio rename to software/modules/audiocore/i2s_max98357.pio diff --git a/software/src/audiocore/micropython.cmake b/software/modules/audiocore/micropython.cmake similarity index 100% rename from software/src/audiocore/micropython.cmake rename to software/modules/audiocore/micropython.cmake diff --git a/software/src/audiocore/module.c b/software/modules/audiocore/module.c similarity index 100% rename from software/src/audiocore/module.c rename to software/modules/audiocore/module.c diff --git a/software/src/audiocore/mp3.c b/software/modules/audiocore/mp3.c similarity index 100% rename from software/src/audiocore/mp3.c rename to software/modules/audiocore/mp3.c diff --git a/software/src/audiocore/mp3.h b/software/modules/audiocore/mp3.h similarity index 100% rename from software/src/audiocore/mp3.h rename to software/modules/audiocore/mp3.h diff --git a/software/src/audiocore/test/test_audiocore.c b/software/modules/audiocore/test/test_audiocore.c similarity index 100% rename from software/src/audiocore/test/test_audiocore.c rename to software/modules/audiocore/test/test_audiocore.c diff --git a/software/src/micropython.cmake b/software/modules/micropython.cmake similarity index 100% rename from software/src/micropython.cmake rename to software/modules/micropython.cmake diff --git a/software/src/rp2_neopixel.py b/software/modules/rp2_neopixel.py similarity index 100% rename from software/src/rp2_neopixel.py rename to software/modules/rp2_neopixel.py diff --git a/software/src/rp2_sd/micropython.cmake b/software/modules/rp2_sd/micropython.cmake similarity index 100% rename from software/src/rp2_sd/micropython.cmake rename to software/modules/rp2_sd/micropython.cmake diff --git a/software/src/rp2_sd/module.c b/software/modules/rp2_sd/module.c similarity index 100% rename from software/src/rp2_sd/module.c rename to software/modules/rp2_sd/module.c diff --git a/software/src/rp2_sd/sd.c b/software/modules/rp2_sd/sd.c similarity index 100% rename from software/src/rp2_sd/sd.c rename to software/modules/rp2_sd/sd.c diff --git a/software/src/rp2_sd/sd.h b/software/modules/rp2_sd/sd.h similarity index 100% rename from software/src/rp2_sd/sd.h rename to software/modules/rp2_sd/sd.h diff --git a/software/src/rp2_sd/sd_spi.c b/software/modules/rp2_sd/sd_spi.c similarity index 100% rename from software/src/rp2_sd/sd_spi.c rename to software/modules/rp2_sd/sd_spi.c diff --git a/software/src/rp2_sd/sd_spi.h b/software/modules/rp2_sd/sd_spi.h similarity index 100% rename from software/src/rp2_sd/sd_spi.h rename to software/modules/rp2_sd/sd_spi.h diff --git a/software/src/rp2_sd/sd_spi_pio.pio b/software/modules/rp2_sd/sd_spi_pio.pio similarity index 100% rename from software/src/rp2_sd/sd_spi_pio.pio rename to software/modules/rp2_sd/sd_spi_pio.pio diff --git a/software/src/rp2_sd/sd_util.h b/software/modules/rp2_sd/sd_util.h similarity index 100% rename from software/src/rp2_sd/sd_util.h rename to software/modules/rp2_sd/sd_util.h diff --git a/software/src/test/include/hardware/sync.h b/software/modules/test/include/hardware/sync.h similarity index 100% rename from software/src/test/include/hardware/sync.h rename to software/modules/test/include/hardware/sync.h diff --git a/software/src/test/include/py/mperrno.h b/software/modules/test/include/py/mperrno.h similarity index 100% rename from software/src/test/include/py/mperrno.h rename to software/modules/test/include/py/mperrno.h diff --git a/software/src/mfrc522/main.py b/software/src/mfrc522_test.py similarity index 100% rename from software/src/mfrc522/main.py rename to software/src/mfrc522_test.py diff --git a/software/src/microdot/main.py b/software/src/microdot_test.py similarity index 100% rename from software/src/microdot/main.py rename to software/src/microdot_test.py