update everything else for new reply handling

This commit is contained in:
Conor Patrick
2021-04-25 16:31:25 +02:00
committed by Nicolas Stalder
parent 68d1673a22
commit 85da52fdca
3 changed files with 6 additions and 9 deletions
+2 -2
View File
@@ -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<Bus>,
request_pipe: Requester<ContactInterchange>,
request_pipe: Requester<interchanges::Contact>,
) -> Self {
let read = allocator.bulk(PACKET_SIZE as _);
let write = allocator.bulk(PACKET_SIZE as _);
+3 -3
View File
@@ -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<ContactInterchange>,
interchange: Requester<interchanges::Contact>,
sent: usize,
outbox: Option<RawPacket>,
@@ -71,7 +71,7 @@ where
{
pub(crate) fn new(
write: EndpointIn<'static, Bus>,
request_pipe: Requester<ContactInterchange>,
request_pipe: Requester<interchanges::Contact>,
) -> Self {
assert!(MAX_MSG_LENGTH >= PACKET_SIZE);
+1 -4
View File
@@ -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<MAX_MSG_LENGTH_TYPE>;
pub type MessageBuffer = apdu_dispatch::interchanges::Data;
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum ClassRequest {