embassy-usb-host

Crates

git

Versions

default

Flavors

XboxOneSGamepad

Struct XboxOneSGamepad 

Source
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

Source§

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]]

GIP init packets sent in response to the device’s Hello message. Read more
Source§

fn parse_input(&self, data: &[u8]) -> Option<GamepadReport>

Parse a GIP input report (message type 0x20) into a GamepadReport. Read more
Source§

fn parse_guide_button(&self, data: &[u8]) -> Option<bool>

Parse 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

Build a rumble command packet into buf. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.