From cf1205e2cc4a5ff97ab8426a015c0949f0e15d3b Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 30 Aug 2023 13:27:36 +0800 Subject: [PATCH] qt-py-rp2040: Move example into own crate Run with: ```sh cd examples/qt-py-rp2040/ cargo run ``` Signed-off-by: Daniel Schaefer --- .gitignore | 7 +----- Cargo.toml | 20 +++++++---------- .../qt-py-rp2040/.cargo}/config.toml | 0 examples/qt-py-rp2040/Cargo.toml | 22 +++++++++++++++++++ build.rs => examples/qt-py-rp2040/build.rs | 0 memory.x => examples/qt-py-rp2040/memory.x | 0 .../src/main.rs} | 0 7 files changed, 31 insertions(+), 18 deletions(-) rename {.cargo => examples/qt-py-rp2040/.cargo}/config.toml (100%) create mode 100644 examples/qt-py-rp2040/Cargo.toml rename build.rs => examples/qt-py-rp2040/build.rs (100%) rename memory.x => examples/qt-py-rp2040/memory.x (100%) rename examples/{qt-py-rp2040-matrix.rs => qt-py-rp2040/src/main.rs} (100%) diff --git a/.gitignore b/.gitignore index 03bf752..e5fad3e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ # Generated by Cargo # will have compiled files and executables -/target/ +target/ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html @@ -9,8 +9,3 @@ Cargo.lock # These are backup files generated by rustfmt **/*.rs.bk *.uf2 - - -# Added by cargo - -/target diff --git a/Cargo.toml b/Cargo.toml index f0c8861..6fa50db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,17 +16,17 @@ embedded-graphics-core = { optional = true, version = "0.4.0" } [package.metadata.docs.rs] all-features = true -[dev-dependencies] -cortex-m-rt = "0.7.3" -cortex-m = "0.7.7" -panic-halt = "0.2.0" +#[dev-dependencies] +#cortex-m-rt = "0.7.3" +#cortex-m = "0.7.7" +#panic-halt = "0.2.0" #stm32g0xx-hal = {version = "0.2.0", features = ["rt", "stm32g071"]} # TODO Split boards #rp-pico = "0.7.0" -adafruit-qt-py-rp2040 = {version = "0.6.0", features = ["rt"]} -tinybmp = "0.5.0" -embedded-graphics = "0.8.1" -fugit = "0.3.7" +#adafruit-qt-py-rp2040 = {version = "0.6.0", features = ["rt"]} +#tinybmp = "0.5.0" +#embedded-graphics = "0.8.1" +#fugit = "0.3.7" [features] adafruit_rgb_13x9 = [] @@ -40,7 +40,3 @@ default = ["adafruit_rgb_13x9", "embedded_graphics"] #[[example]] #name = "stm32-gaypride" #required-features = ["adafruit_rgb_13x9", "embedded_graphics"] - -[[example]] -name = "qt-py-rp2040-matrix" -required-features = ["adafruit_rgb_13x9"] diff --git a/.cargo/config.toml b/examples/qt-py-rp2040/.cargo/config.toml similarity index 100% rename from .cargo/config.toml rename to examples/qt-py-rp2040/.cargo/config.toml diff --git a/examples/qt-py-rp2040/Cargo.toml b/examples/qt-py-rp2040/Cargo.toml new file mode 100644 index 0000000..7b33540 --- /dev/null +++ b/examples/qt-py-rp2040/Cargo.toml @@ -0,0 +1,22 @@ +[package] +edition = "2021" +name = "is31fl3741-qt-py-rp2040" +version = "0.2.1" + +[dependencies] +embedded-hal = "0.2.7" +embedded-graphics-core = { optional = true, version = "0.4.0" } + +cortex-m-rt = "0.7.3" +cortex-m = "0.7.7" +panic-halt = "0.2.0" +#stm32g0xx-hal = {version = "0.2.0", features = ["rt", "stm32g071"]} +# TODO Split boards +#rp-pico = "0.7.0" +adafruit-qt-py-rp2040 = {version = "0.6.0", features = ["rt"]} +tinybmp = "0.5.0" +embedded-graphics = "0.8.1" +fugit = "0.3.7" + +is31fl3741 = { path = "../.." } +#required-features = ["adafruit_rgb_13x9"] diff --git a/build.rs b/examples/qt-py-rp2040/build.rs similarity index 100% rename from build.rs rename to examples/qt-py-rp2040/build.rs diff --git a/memory.x b/examples/qt-py-rp2040/memory.x similarity index 100% rename from memory.x rename to examples/qt-py-rp2040/memory.x diff --git a/examples/qt-py-rp2040-matrix.rs b/examples/qt-py-rp2040/src/main.rs similarity index 100% rename from examples/qt-py-rp2040-matrix.rs rename to examples/qt-py-rp2040/src/main.rs