[][src]Trait joycon_rs::joycon::InputReportMode

pub trait InputReportMode<D: JoyConDriver>: Sized {
    type Report: 'static + Send + TryFrom<[u8; 362], Error = JoyConError>;
    type ArgsType: 'static + Send + Copy + AsRef<[u8]>;

    const SUB_COMMAND: SubCommand;
    const ARGS: Self::ArgsType;

    fn new(driver: D) -> JoyConResult<Self>;
fn driver(&self) -> &D;
fn driver_mut(&mut self) -> &mut D;
fn into_driver(self) -> D; fn read_input_report(&self) -> JoyConResult<Self::Report> { ... }
fn read_input_report_timeout(
        &self,
        timeout: i32
    ) -> JoyConResult<Self::Report> { ... } }

Associated Types

type Report: 'static + Send + TryFrom<[u8; 362], Error = JoyConError>

type ArgsType: 'static + Send + Copy + AsRef<[u8]>

Loading content...

Associated Constants

const SUB_COMMAND: SubCommand

const ARGS: Self::ArgsType

Loading content...

Required methods

fn new(driver: D) -> JoyConResult<Self>

Set Joy-Con's input report mode and return instance

fn driver(&self) -> &D

Refference of driver.

fn driver_mut(&mut self) -> &mut D

Mutable refference of driver.

fn into_driver(self) -> D

Unwrap.

Loading content...

Provided methods

fn read_input_report(&self) -> JoyConResult<Self::Report>

read Joy-Con's input report

fn read_input_report_timeout(&self, timeout: i32) -> JoyConResult<Self::Report>

  • timeout - milli seconds
Loading content...

Implementors

impl<D> InputReportMode<D> for SimpleHIDMode<D> where
    D: JoyConDriver
[src]

type Report = SimpleHIDReport

type ArgsType = [u8; 1]

impl<D> InputReportMode<D> for StandardFullMode<D> where
    D: JoyConDriver
[src]

type Report = StandardInputReport<IMUData>

type ArgsType = [u8; 1]

Loading content...