From 3eb43c6b99107486349acf2ad35e1a6a9ee79267 Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Sun, 22 Nov 2020 07:45:32 -0800 Subject: [PATCH 1/2] move iir to new dsp crate --- .gitignore | 2 +- Cargo.lock | 8 ++++++ Cargo.toml | 1 + dsp/Cargo.lock | 63 +++++++++++++++++++++++++++++++++++++++++ dsp/Cargo.toml | 10 +++++++ {src => dsp/src}/iir.rs | 0 dsp/src/lib.rs | 3 ++ src/main.rs | 3 +- 8 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 dsp/Cargo.lock create mode 100644 dsp/Cargo.toml rename {src => dsp/src}/iir.rs (100%) create mode 100644 dsp/src/lib.rs diff --git a/.gitignore b/.gitignore index 265b7f53f..98097d7cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -/target +**/target .gdb_history diff --git a/Cargo.lock b/Cargo.lock index 014b427a9..f3ace3630 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -185,6 +185,13 @@ dependencies = [ "cortex-m", ] +[[package]] +name = "dsp" +version = "0.1.0" +dependencies = [ + "serde", +] + [[package]] name = "embedded-hal" version = "0.2.4" @@ -457,6 +464,7 @@ dependencies = [ "cortex-m-log", "cortex-m-rt", "cortex-m-rtic", + "dsp", "embedded-hal", "enum-iterator", "heapless", diff --git a/Cargo.toml b/Cargo.toml index a57745ee7..886f041ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,6 +40,7 @@ embedded-hal = "0.2.4" nb = "1.0.0" asm-delay = "0.9.0" enum-iterator = "0.6.0" +dsp = { path = "dsp", version = "0.1.0" } [dependencies.mcp23017] git = "https://github.com/mrd0ll4r/mcp23017.git" diff --git a/dsp/Cargo.lock b/dsp/Cargo.lock new file mode 100644 index 000000000..afad0c4f5 --- /dev/null +++ b/dsp/Cargo.lock @@ -0,0 +1,63 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "dsp" +version = "0.1.0" +dependencies = [ + "serde", +] + +[[package]] +name = "proc-macro2" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "quote" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "serde" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "syn" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443b4178719c5a851e1bde36ce12da21d74a0e60b4d982ec3385a933c812f0f6" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "unicode-xid" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" diff --git a/dsp/Cargo.toml b/dsp/Cargo.toml new file mode 100644 index 000000000..a9b7fe52c --- /dev/null +++ b/dsp/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "dsp" +version = "0.1.0" +authors = ["Robert Jördens "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +serde = { version = "1.0", features = ["derive"], default-features = false } diff --git a/src/iir.rs b/dsp/src/iir.rs similarity index 100% rename from src/iir.rs rename to dsp/src/iir.rs diff --git a/dsp/src/lib.rs b/dsp/src/lib.rs new file mode 100644 index 000000000..3c44bbc92 --- /dev/null +++ b/dsp/src/lib.rs @@ -0,0 +1,3 @@ +#![no_std] + +pub mod iir; diff --git a/src/main.rs b/src/main.rs index a7d3d737c..4c945e5f5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -54,10 +54,11 @@ static mut DES_RING: ethernet::DesRing = ethernet::DesRing::new(); mod afe; mod eeprom; -mod iir; mod pounder; mod server; +use dsp::iir; + #[cfg(not(feature = "semihosting"))] fn init_log() {} From d24dfb302e2770022d99a273af6c4862df2c0feb Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Sun, 22 Nov 2020 10:32:40 -0800 Subject: [PATCH 2/2] dsp crate: drop version dependency and remove boilerplate from cargo --- .gitignore | 2 +- Cargo.toml | 2 +- dsp/Cargo.toml | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 98097d7cc..265b7f53f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -**/target +/target .gdb_history diff --git a/Cargo.toml b/Cargo.toml index 886f041ee..7aad310bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ embedded-hal = "0.2.4" nb = "1.0.0" asm-delay = "0.9.0" enum-iterator = "0.6.0" -dsp = { path = "dsp", version = "0.1.0" } +dsp = { path = "dsp" } [dependencies.mcp23017] git = "https://github.com/mrd0ll4r/mcp23017.git" diff --git a/dsp/Cargo.toml b/dsp/Cargo.toml index a9b7fe52c..625d0f089 100644 --- a/dsp/Cargo.toml +++ b/dsp/Cargo.toml @@ -4,7 +4,5 @@ version = "0.1.0" authors = ["Robert Jördens "] edition = "2018" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] serde = { version = "1.0", features = ["derive"], default-features = false }