Enum pscontroller_rs::Device[][src]

pub enum Device {
    None,
    Unknown,
    ConfigurationMode,
    Classic(Classic),
    DualShock(DualShock),
    DualShock2(DualShock2),
    GuitarHero(GuitarHero),
    JogCon(JogCon),
    NegCon(NegCon),
    GunCon(GunCon),
    Baton(Baton),
}

Possible devices that can be returned by the poll command to the controller. Currently, we're relying both on the device type (high nybble) and the number of 16bit words its returning (low nybble) to guess the device type.

While that's not ideal, I haven't found a better way to do this yet. It seems as though the constants to define devices rarely change so for example, the Guitar Hero controller reports in every way that it is a DualShock 1 controller. Other devices, like the DVD remote don't even support escape mode so this is the best I can do until we find a better way to get creative.

Variants

If pulling the device type didn't work

A new controller type we haven't seen before

The controller is waiting for configuration data. Users of the library should never need to see this state.

Original controller that shipped with the PlayStation. Only contains regular buttons. DualShock 1 and 2 can emulate this mode

Controller with two analog sticks. This was the final controller style shipped with the original PlayStation

Controller that shipped with the PlayStation 2. Has dual analog sticks but also pressure senstive buttons

Controller that shipped with Guitar Hero

The Namco JonCon

The Namco NegCon

The Namco GunCon

The Mad Maestro Baton

Auto Trait Implementations

impl Send for Device

impl Sync for Device