mirror of
https://github.com/trussed-dev/usbd-ccid.git
synced 2026-06-20 04:16:20 -07:00
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.
This commit is contained in:
committed by
Robin Krahl
parent
fe4424496f
commit
6e589d6b76
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user