From 6e589d6b764fce2ca638bdd6e633b0e3897a08ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sosth=C3=A8ne=20Gu=C3=A9don?= Date: Wed, 25 Jan 2023 11:00:07 +0100 Subject: [PATCH] Remove the PowerSelection enum This could be usefull for a smartcard reader's firmware, but is not useful to our use-case, and was currently used anyway. --- src/types/packet.rs | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/types/packet.rs b/src/types/packet.rs index 5782013..a8385ab 100644 --- a/src/types/packet.rs +++ b/src/types/packet.rs @@ -271,27 +271,6 @@ command_message!( impl PacketWithData for XfrBlock {} -#[derive(Copy, Clone, Debug, Eq, PartialEq)] -pub enum PowerSelection { - Automatic, - V5, - V3_3, - V1_8, -} - -impl PowerOn { - #[inline(always)] - pub fn power_select(&self) -> PowerSelection { - match &self[7] { - 0 => PowerSelection::Automatic, - 1 => PowerSelection::V5, - 2 => PowerSelection::V3_3, - 3 => PowerSelection::V1_8, - _ => panic!("invalid power select parameter"), - } - } -} - #[derive(Copy, Clone, Debug, Eq, PartialEq)] #[repr(u8)] pub enum Chain {