pub struct Pad6 {
pub pressed: u16,
pub second_scan: bool,
/* private fields */
}Expand description
The Avenue Pad 6 shape: on alternating scans (counted by CLR pulses) the SEL-high read shows 0000 and the SEL-low read shows III-VI instead of I, II, Select, Run. [doc: controller-info] Which scan comes first at power-up is not stated (a game scans twice).
Fields§
§pressed: u16§second_scan: boolImplementations§
Trait Implementations§
Source§impl ControllerPort for Pad6
impl ControllerPort for Pad6
fn write(&mut self, _sel: bool, clr: bool)
fn read(&mut self, sel: bool, clr: bool) -> u8
Source§fn set_pressed(&mut self, _port: usize, pressed: u16)
fn set_pressed(&mut self, _port: usize, pressed: u16)
The host’s side: the buttons held on pad
port (0 for a pad plugged straight in, 0-4
behind a multitap), as the bit mask of pads.rs.fn as_any_mut(&mut self) -> &mut dyn Any
Source§impl<'de> Deserialize<'de> for Pad6
impl<'de> Deserialize<'de> for Pad6
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DeviceState for Pad6
impl DeviceState for Pad6
Source§fn load_state(&mut self, data: &[u8]) -> Result<(), String>
fn load_state(&mut self, data: &[u8]) -> Result<(), String>
Put the device in a saved state. A device without state accepts only an empty one.
Source§fn state_identity(&self) -> String
fn state_identity(&self) -> String
What the device is and which media it holds (a card’s ROM by its SHA-1, a disc by its
table of contents): a state is refused by a system whose device answers otherwise.
impl Copy for Pad6
impl Eq for Pad6
impl StructuralPartialEq for Pad6
Auto Trait Implementations§
impl Freeze for Pad6
impl RefUnwindSafe for Pad6
impl Send for Pad6
impl Sync for Pad6
impl Unpin for Pad6
impl UnwindSafe for Pad6
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more