pub struct XboxOneSGamepad { /* private fields */ }Expand description
GIP device implementation for the Xbox One S controller.
Handles the Microsoft Xbox One S pad (045e:02ea) and is broadly
compatible with most standard GIP gamepads including:
- Xbox One original (
045e:02d1) - Xbox One S (
045e:02ea) - Xbox One (2015 firmware) (
045e:02dd) - Xbox Series X|S (
045e:0b12) - Most third-party GIP controllers
For controllers with non-standard features (Elite paddles, custom
firmware packets), implement GipDevice directly.
Trait Implementations§
Source§impl GipDevice for XboxOneSGamepad
impl GipDevice for XboxOneSGamepad
Source§fn try_new(vendor_id: u16, product_id: u16) -> Option<Self>
fn try_new(vendor_id: u16, product_id: u16) -> Option<Self>
Attempt to create a device handler for the given USB device. Read more
Source§fn init_packets(&self) -> &'static [&'static [u8]]
fn init_packets(&self) -> &'static [&'static [u8]]
GIP init packets sent in response to the device’s Hello message. Read more
Source§fn parse_input(&self, data: &[u8]) -> Option<GamepadReport>
fn parse_input(&self, data: &[u8]) -> Option<GamepadReport>
Parse a GIP input report (message type 0x20) into a
GamepadReport. Read moreParse a virtual key report (message type 0x07) into a guide button state. Read more
Source§fn build_rumble(
&self,
buf: &mut [u8; 64],
seq: u8,
cmd: &RumbleCommand,
) -> usize
fn build_rumble( &self, buf: &mut [u8; 64], seq: u8, cmd: &RumbleCommand, ) -> usize
Build a rumble command packet into
buf. Read moreAuto Trait Implementations§
impl Freeze for XboxOneSGamepad
impl RefUnwindSafe for XboxOneSGamepad
impl Send for XboxOneSGamepad
impl Sync for XboxOneSGamepad
impl Unpin for XboxOneSGamepad
impl UnwindSafe for XboxOneSGamepad
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