From 55d3369d9e7f68bb0c836c8143778b2918f01ba5 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 19 Feb 2019 12:58:07 +0000 Subject: 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. --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index a11296e..b5f2c65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,7 @@ cortex-m = "0.5.8" cortex-m-rt = "0.6.7" embedded-hal = "0.2.2" panic-halt = "0.2.0" +serde-big-array = "0.1.4" stm32f103xx-usb = { git = "https://github.com/mvirkkunen/stm32f103xx-usb", rev = "57d23751367461bec5f39322727bdd65e5c2aa30" } usb-device = { git = "https://github.com/mvirkkunen/usb-device", rev = "e58e30f3b9c9bf4aab00ea039d129b964a3fd2d3" } -- cgit v1.2.1