Remove unused items

This commit is contained in:
Sosthène Guédon
2023-01-26 20:54:03 +01:00
committed by Robin Krahl
parent 1c4c9fda5c
commit fe4424496f
3 changed files with 8 additions and 27 deletions
-1
View File
@@ -45,7 +45,6 @@ pub const MAX_IFSD: [u8; 4] = [0xfe, 0x00, 0x00, 0x00];
pub const MAX_MSG_LENGTH: usize = 3072;
pub const MAX_MSG_LENGTH_LE: [u8; 4] = (MAX_MSG_LENGTH as u32).to_le_bytes();
pub const NUM_SLOTS: u8 = 1;
pub const MAX_BUSY_SLOTS: u8 = 1;
// bPinSupport (0x0 = none, 0x01 = verification, 0x02 = modification)
pub const PIN_SUPPORT: u8 = 0;
-6
View File
@@ -120,12 +120,6 @@ where
atr
}
pub fn busy(&self) -> bool {
// need more states, but if we're waiting
// to send, we can't accept new packets
self.outbox.is_some()
}
}
impl<'bus, Bus, I, const N: usize> Pipe<'bus, Bus, I, N>
+8 -20
View File
@@ -20,12 +20,6 @@ pub enum Error {
UnknownCommand(u8),
}
#[allow(clippy::large_enum_variant)]
pub enum Message {
Command(Command),
Response(Response),
}
pub trait Packet: core::ops::Deref<Target = ExtPacket> {
#[inline]
fn slot(&self) -> u8 {
@@ -151,16 +145,15 @@ pub enum CommandType {
GetParameters = 0x6c,
XfrBlock = 0x6f,
Abort = 0x72,
// unsupported
ResetParameters = 0x6d,
SetParameters = 0x61,
Escape = 0x6b, // for vendor commands
IccClock = 0x7e,
T0Apdu = 0x6a,
Secure = 0x69,
Mechanical = 0x71,
SetDataRateAndClockFrequency = 0x73,
// ResetParameters = 0x6d,
// SetParameters = 0x61,
// Escape = 0x6b, // for vendor commands
// IccClock = 0x7e,
// T0Apdu = 0x6a,
// Secure = 0x69,
// Mechanical = 0x71,
// SetDataRateAndClockFrequency = 0x73,
}
macro_rules! command_message {
@@ -318,11 +311,6 @@ impl Chain {
}
}
pub enum Response {
// DataBlock(DataBlock),
// SlotStatus(SlotStatus),
}
impl core::fmt::Debug for Command {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
let mut debug_struct = f.debug_struct("Command");