diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2019-02-19 12:58:07 +0000 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2019-02-19 14:54:24 +0100 |
commit | 55d3369d9e7f68bb0c836c8143778b2918f01ba5 (patch) | |
tree | 06b1c6b9563423af40b3710e71970138e68f147d /Cargo.lock | |
parent | ffb3d8f11b232e811bebfe0c9b450a8a95a7b12b (diff) | |
download | ntw-55d3369d9e7f68bb0c836c8143778b2918f01ba5.tar.gz ntw-55d3369d9e7f68bb0c836c8143778b2918f01ba5.tar.bz2 |
Use ssmarshal to generate the response data
Previously, we manually constructed the data to sent with a Get_Report
response. This patch introduces the Response struct which can be
serialized using ssmarshal.
As Serialize is only implemented for arrays with a length up to 32, we
have to use the serde-big-array crate for the data field. As the
command ID might not be recognized by us, we use a raw u8 value instead
of the CommandId enum.
Diffstat (limited to 'Cargo.lock')
-rw-r--r-- | Cargo.lock | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -78,6 +78,7 @@ dependencies = [ "embedded-hal 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "panic-halt 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde-big-array 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "ssmarshal 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "stm32f103xx-usb 0.1.0 (git+https://github.com/mvirkkunen/stm32f103xx-usb?rev=57d23751367461bec5f39322727bdd65e5c2aa30)", "stm32f1xx-hal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -161,6 +162,15 @@ dependencies = [ ] [[package]] +name = "serde-big-array" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "serde_derive" version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -275,6 +285,7 @@ dependencies = [ "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "9f301d728f2b94c9a7691c90f07b0b4e8a4517181d9461be94c04bddeb4bd850" +"checksum serde-big-array 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "dbd629249ae3007dac9632aa92334c5ba9c8a4dbe0a6263e546121dd1c57394a" "checksum serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "beed18e6f5175aef3ba670e57c60ef3b1b74d250d962a26604bff4c80e970dd4" "checksum ssmarshal 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f3e6ad23b128192ed337dfa4f1b8099ced0c2bf30d61e551b65fda5916dbb850" "checksum stm32f1 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "48763f6f093674476399efbd8d2e52349dc32c3bbf57657234cbb15d309cd8a3" |