#[non_exhaustive]pub enum Arcade {
Show 27 variants
GeneralPurposeIOCard,
CoinDoor,
WatchdogTimer,
GeneralPurposeAnalogInputState,
GeneralPurposeDigitalInputState,
GeneralPurposeOpticalInputState,
GeneralPurposeDigitalOutputState,
NumberofCoinDoors,
CoinDrawerDropCount,
CoinDrawerStart,
CoinDrawerService,
CoinDrawerTilt,
CoinDoorTest,
CoinDoorLockout,
WatchdogTimeout,
WatchdogAction,
WatchdogReboot,
WatchdogRestart,
AlarmInput,
CoinDoorCounter,
IODirectionMapping,
SetIODirectionMapping,
ExtendedOpticalInputState,
PinPadInputState,
PinPadStatus,
PinPadOutput,
PinPadCommand,
}Expand description
Usage Page 0x91: “Arcade”
This enum is autogenerated from the HID Usage Tables.
let u1 = Usage::Arcade(Arcade::CoinDoor);
let u2 = Usage::new_from_page_and_id(0x91, 0x2).unwrap();
let u3 = Usage::from(Arcade::CoinDoor);
let u4: Usage = Arcade::CoinDoor.into();
assert_eq!(u1, u2);
assert_eq!(u1, u3);
assert_eq!(u1, u4);
assert!(matches!(u1.usage_page(), UsagePage::Arcade));
assert_eq!(0x91, u1.usage_page_value());
assert_eq!(0x2, u1.usage_id_value());
assert_eq!((0x91 << 16) | 0x2, u1.usage_value());
assert_eq!("Coin Door", u1.name());Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
GeneralPurposeIOCard
Usage ID 0x1: “General Purpose IO Card”
CoinDoor
Usage ID 0x2: “Coin Door”
WatchdogTimer
Usage ID 0x3: “Watchdog Timer”
GeneralPurposeAnalogInputState
Usage ID 0x30: “General Purpose Analog Input State”
GeneralPurposeDigitalInputState
Usage ID 0x31: “General Purpose Digital Input State”
GeneralPurposeOpticalInputState
Usage ID 0x32: “General Purpose Optical Input State”
GeneralPurposeDigitalOutputState
Usage ID 0x33: “General Purpose Digital Output State”
NumberofCoinDoors
Usage ID 0x34: “Number of Coin Doors”
CoinDrawerDropCount
Usage ID 0x35: “Coin Drawer Drop Count”
CoinDrawerStart
Usage ID 0x36: “Coin Drawer Start”
CoinDrawerService
Usage ID 0x37: “Coin Drawer Service”
CoinDrawerTilt
Usage ID 0x38: “Coin Drawer Tilt”
CoinDoorTest
Usage ID 0x39: “Coin Door Test”
CoinDoorLockout
Usage ID 0x40: “Coin Door Lockout”
WatchdogTimeout
Usage ID 0x41: “Watchdog Timeout”
WatchdogAction
Usage ID 0x42: “Watchdog Action”
WatchdogReboot
Usage ID 0x43: “Watchdog Reboot”
WatchdogRestart
Usage ID 0x44: “Watchdog Restart”
AlarmInput
Usage ID 0x45: “Alarm Input”
CoinDoorCounter
Usage ID 0x46: “Coin Door Counter”
IODirectionMapping
Usage ID 0x47: “I/O Direction Mapping”
SetIODirectionMapping
Usage ID 0x48: “Set I/O Direction Mapping”
ExtendedOpticalInputState
Usage ID 0x49: “Extended Optical Input State”
PinPadInputState
Usage ID 0x4A: “Pin Pad Input State”
PinPadStatus
Usage ID 0x4B: “Pin Pad Status”
PinPadOutput
Usage ID 0x4C: “Pin Pad Output”
PinPadCommand
Usage ID 0x4D: “Pin Pad Command”
Implementations§
Trait Implementations§
Source§impl AsUsage for Arcade
impl AsUsage for Arcade
Source§fn usage_value(&self) -> u32
fn usage_value(&self) -> u32
Returns the 32 bit Usage value of this Usage
Source§fn usage_id_value(&self) -> u16
fn usage_id_value(&self) -> u16
Returns the 16 bit Usage ID value of this Usage
Source§fn usage(&self) -> Usage
fn usage(&self) -> Usage
Returns this usage as Usage::Arcade(self)
This is a convenience function to avoid having
to implement From for every used type in the caller.
let gd_x = GenericDesktop::X;
let usage = Usage::from(GenericDesktop::X);
assert!(matches!(gd_x.usage(), usage));Source§impl AsUsagePage for Arcade
impl AsUsagePage for Arcade
Source§fn usage_page_value(&self) -> u16
fn usage_page_value(&self) -> u16
Returns the 16 bit value of this UsagePage
This value is 0x91 for Arcade
Source§fn usage_page(&self) -> UsagePage
fn usage_page(&self) -> UsagePage
Returns UsagePage::Arcade]
Source§impl BitOr<u16> for Arcade
impl BitOr<u16> for Arcade
Source§impl From<&Arcade> for UsagePage
impl From<&Arcade> for UsagePage
Source§fn from(_: &Arcade) -> UsagePage
fn from(_: &Arcade) -> UsagePage
Always returns UsagePage::Arcade and is identical to Arcade::usage_page().
Source§impl From<Arcade> for UsagePage
impl From<Arcade> for UsagePage
Source§fn from(_: Arcade) -> UsagePage
fn from(_: Arcade) -> UsagePage
Always returns UsagePage::Arcade and is identical to Arcade::usage_page().