hid_types/id/usage/
arcade.rs1use num_enum::{IntoPrimitive, TryFromPrimitive};
4
5use crate::Ident;
6
7#[expect(missing_docs)]
12#[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive, IntoPrimitive)]
13#[repr(u16)]
14#[non_exhaustive]
15pub enum KnownUsage {
16 Undefined = 0,
17 GeneralPurposeIoCard = 0x01,
18 CoinDoor = 0x02,
19 WatchdogTimer = 0x03,
20 GeneralPurposeAnalogInputState = 0x30,
22 GeneralPurposeDigitalInputState = 0x31,
23 GeneralPurposeOpticalInputState = 0x32,
24 GeneralPurposeDigitalOutputState = 0x33,
25 NumberOfCoinDoors = 0x34,
26 CoinDrawerDropCount = 0x35,
27 CoinDrawerStart = 0x36,
28 CoinDrawerService = 0x37,
29 CoinDrawerTilt = 0x38,
30 CoinDoorTest = 0x39,
31 CoinDoorLockout = 0x40,
33 WatchdogTimeout = 0x41,
34 WatchdogAction = 0x42,
35 WatchdogReboot = 0x43,
36 WatchdogRestart = 0x44,
37 AlarmInput = 0x45,
38 CoinDoorCounter = 0x46,
39 IoDirectionMapping = 0x47,
40 SetIoDirectionMapping = 0x48,
41 ExtendedOpticalInputState = 0x49,
42 PinPadInputState = 0x4A,
43 PinPadStatus = 0x4B,
44 PinPadOutput = 0x4C,
45 PinPadCommand = 0x4D,
46 }
48
49pub type Usage = Ident<KnownUsage, u16>;