mirror of
https://github.com/trussed-dev/pc-usbip-runner.git
synced 2026-06-20 04:16:19 -07:00
Bump to heapless 0.9
This commit is contained in:
Generated
+422
-264
File diff suppressed because it is too large
Load Diff
+13
-3
@@ -26,8 +26,8 @@ usbd-ccid = { version = "0.3", features = ["log-all"], optional = true }
|
||||
clap = { version = "3.0.0", features = ["derive"] }
|
||||
clap-num = "1.0.0"
|
||||
delog = { version = "0.1.6", features = ["std-log"] }
|
||||
heapless-bytes = "0.3"
|
||||
littlefs2 = "0.6"
|
||||
heapless-bytes = "0.5"
|
||||
littlefs2 = "0.7"
|
||||
pretty_env_logger = "0.4.0"
|
||||
trussed = "0.1"
|
||||
|
||||
@@ -37,4 +37,14 @@ ctaphid = ["ctaphid-dispatch", "usbd-ctaphid"]
|
||||
ccid = ["apdu-dispatch", "usbd-ccid"]
|
||||
|
||||
[patch.crates-io]
|
||||
trussed = { git = "https://github.com/trussed-dev/trussed.git", rev = "024e0eca5fb7dbd2457831f7c7bffe4341e08775" }
|
||||
trussed = { git = "https://github.com/trussed-dev/trussed.git", rev = "e6bb61a716a3575b3e5d9869a0e1bb1740fe9969" }
|
||||
trussed-core = { git = "https://github.com/trussed-dev/trussed.git", rev = "e6bb61a716a3575b3e5d9869a0e1bb1740fe9969" }
|
||||
ctaphid-app = { git = "https://github.com/trussed-dev/ctaphid-dispatch.git", rev = "edc5d69eeb71e6718c60aad54574f6c3b824309c" }
|
||||
ctaphid-dispatch = { git = "https://github.com/trussed-dev/ctaphid-dispatch.git", rev = "edc5d69eeb71e6718c60aad54574f6c3b824309c" }
|
||||
apdu-app = { git = "https://github.com/trussed-dev/apdu-dispatch.git", rev = "931c4269d1d293954fae2012d809e9663cd2cb7e" }
|
||||
apdu-dispatch = { git = "https://github.com/trussed-dev/apdu-dispatch.git", rev = "931c4269d1d293954fae2012d809e9663cd2cb7e" }
|
||||
usbd-ctaphid = { git = "https://github.com/trussed-dev/usbd-ctaphid.git", rev = "94881f83a6b4229a7a3187a5dd7b3ccf6eb6dc00" }
|
||||
usbd-ccid = { git = "https://github.com/trussed-dev/usbd-ccid.git", rev = "045b8f16c6fc41ed71da3de2f47b9afa79535adf" }
|
||||
littlefs2 = { git = "https://github.com/trussed-dev/littlefs2.git", rev = "e9d3a1ca98f80e92cd20ee9b94707067810b9036" }
|
||||
littlefs2-core = { git = "https://github.com/trussed-dev/littlefs2.git", rev = "e9d3a1ca98f80e92cd20ee9b94707067810b9036" }
|
||||
littlefs2-sys = { git = "https://github.com/trussed-dev/littlefs2-sys", rev = "v0.3.1-nitrokey.1" }
|
||||
|
||||
+7
-7
@@ -59,7 +59,7 @@ struct DummyApp<C: Client> {
|
||||
}
|
||||
|
||||
impl<C: Client> DummyApp<C> {
|
||||
fn rng<const N: usize>(&mut self, response: &mut heapless_bytes::Bytes<N>) {
|
||||
fn rng(&mut self, response: &mut heapless_bytes::BytesView) {
|
||||
let bytes = syscall!(self.client.random_bytes(57)).bytes;
|
||||
response.extend_from_slice(&bytes).unwrap();
|
||||
}
|
||||
@@ -69,7 +69,7 @@ impl<C: Client> DummyApp<C> {
|
||||
const CTAPHID_COMMAND_RNG: Command = Command::Vendor(VendorCommand::H60);
|
||||
|
||||
#[cfg(feature = "ctaphid")]
|
||||
impl<C: Client, const N: usize> ctaphid_dispatch::app::App<'_, N> for DummyApp<C> {
|
||||
impl<C: Client> ctaphid_dispatch::app::App<'_> for DummyApp<C> {
|
||||
fn commands(&self) -> &'static [Command] {
|
||||
&[CTAPHID_COMMAND_RNG]
|
||||
}
|
||||
@@ -78,7 +78,7 @@ impl<C: Client, const N: usize> ctaphid_dispatch::app::App<'_, N> for DummyApp<C
|
||||
&mut self,
|
||||
command: Command,
|
||||
_request: &[u8],
|
||||
response: &mut heapless_bytes::Bytes<N>,
|
||||
response: &mut heapless_bytes::BytesView,
|
||||
) -> Result<(), Error> {
|
||||
match command {
|
||||
CTAPHID_COMMAND_RNG => self.rng(response),
|
||||
@@ -111,17 +111,17 @@ impl<'a> trussed_usbip::Apps<'a, CoreOnly> for Apps<trussed_usbip::Client<CoreOn
|
||||
}
|
||||
|
||||
#[cfg(feature = "ctaphid")]
|
||||
fn with_ctaphid_apps<T, const N: usize>(
|
||||
fn with_ctaphid_apps<T>(
|
||||
&mut self,
|
||||
f: impl FnOnce(&mut [&mut dyn ctaphid_dispatch::app::App<'a, N>]) -> T,
|
||||
f: impl FnOnce(&mut [&mut dyn ctaphid_dispatch::app::App<'a>]) -> T,
|
||||
) -> T {
|
||||
f(&mut [&mut self.dummy])
|
||||
}
|
||||
|
||||
#[cfg(feature = "ccid")]
|
||||
fn with_ccid_apps<T, const N: usize>(
|
||||
fn with_ccid_apps<T>(
|
||||
&mut self,
|
||||
f: impl FnOnce(&mut [&mut dyn apdu_dispatch::app::App<N>]) -> T,
|
||||
f: impl FnOnce(&mut [&mut dyn apdu_dispatch::app::App]) -> T,
|
||||
) -> T {
|
||||
f(&mut [])
|
||||
}
|
||||
|
||||
+4
-4
@@ -66,15 +66,15 @@ pub trait Apps<'interrupt, D: Dispatch> {
|
||||
) -> Self;
|
||||
|
||||
#[cfg(feature = "ctaphid")]
|
||||
fn with_ctaphid_apps<T, const N: usize>(
|
||||
fn with_ctaphid_apps<T>(
|
||||
&mut self,
|
||||
f: impl FnOnce(&mut [&mut dyn ctaphid_dispatch::app::App<'interrupt, N>]) -> T,
|
||||
f: impl FnOnce(&mut [&mut dyn ctaphid_dispatch::app::App<'interrupt>]) -> T,
|
||||
) -> T;
|
||||
|
||||
#[cfg(feature = "ccid")]
|
||||
fn with_ccid_apps<T, const N: usize>(
|
||||
fn with_ccid_apps<T>(
|
||||
&mut self,
|
||||
f: impl FnOnce(&mut [&mut dyn apdu_dispatch::app::App<N>]) -> T,
|
||||
f: impl FnOnce(&mut [&mut dyn apdu_dispatch::app::App]) -> T,
|
||||
) -> T;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user