diff --git a/src/class.rs b/src/class.rs index 6a786b1..ad13809 100644 --- a/src/class.rs +++ b/src/class.rs @@ -2,7 +2,7 @@ use core::convert::TryFrom; use core::time::Duration; use interchange::Requester; -use apdu_dispatch::types::ContactInterchange; +use apdu_dispatch::interchanges; use crate::{ constants::*, @@ -33,7 +33,7 @@ where { pub fn new( allocator: &'static UsbBusAllocator, - request_pipe: Requester, + request_pipe: Requester, ) -> Self { let read = allocator.bulk(PACKET_SIZE as _); let write = allocator.bulk(PACKET_SIZE as _); diff --git a/src/pipe.rs b/src/pipe.rs index 6ea74ec..50c6285 100644 --- a/src/pipe.rs +++ b/src/pipe.rs @@ -1,6 +1,6 @@ use core::convert::TryFrom; -use apdu_dispatch::types::ContactInterchange; +use apdu_dispatch::interchanges; use interchange::Requester; use interchange::Interchange; @@ -53,7 +53,7 @@ where // pub(crate) rpc: TransportEndpoint<'rpc>, seq: u8, state: State, - interchange: Requester, + interchange: Requester, sent: usize, outbox: Option, @@ -71,7 +71,7 @@ where { pub(crate) fn new( write: EndpointIn<'static, Bus>, - request_pipe: Requester, + request_pipe: Requester, ) -> Self { assert!(MAX_MSG_LENGTH >= PACKET_SIZE); diff --git a/src/types.rs b/src/types.rs index 9704304..1c95780 100644 --- a/src/types.rs +++ b/src/types.rs @@ -1,14 +1,11 @@ // use cortex_m_semihosting::hprintln; -use heapless_bytes::Bytes; - -use crate::constants::*; use core::time::Duration; // pub mod apdu; pub mod packet; pub mod tlv; -pub type MessageBuffer = Bytes; +pub type MessageBuffer = apdu_dispatch::interchanges::Data; #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub enum ClassRequest {