Union pscontroller_rs::ControllerData[][src]

#[repr(C)]
pub union ControllerData { pub data: [u8; 32], pub gh: GuitarHero, pub b: Baton, // some fields omitted }

The poll command returns a series of bytes. This union allows us to interact with those bytes with some functions. It's nice sugar that allows us to use the data in an obvious way without needing to copy the bytes around

Fields

The raw data representing the buttons. Kind of unwieldy

Maps the underlying bytes to buttons and the whammy bar of the Guitar Hero controller

Maps the bytes to the Mad Maestro baton

Auto Trait Implementations