Skip to main content

InputReport

Enum InputReport 

Source
pub enum InputReport {
    StatusInformation(StatusData),
    ReadMemory(MemoryData),
    Acknowledge(AcknowledgeData),
    DataReport(u8, WiimoteData),
}
Expand description

An input report represents the data sent from the Wii remote to the computer.

Variants§

§

StatusInformation(StatusData)

Status information report (ID 0x20).

Can be requested by sending an output report with ID 0x15 and is automatically sent when the Extension is connected or disconnected.

WiiBrew Documentation: https://www.wiibrew.org/wiki/Wiimote#0x20:_Status

§

ReadMemory(MemoryData)

Read memory data report (ID 0x21).

Result of a read memory request (output report ID 0x17).

WiiBrew Documentation: https://www.wiibrew.org/wiki/Wiimote#0x21:_Read_Memory_Data

§

Acknowledge(AcknowledgeData)

Acknowledge report (ID 0x22).

Sent as a response to an output report with a corresponding result or error.

WiiBrew Documentation: https://www.wiibrew.org/wiki/Wiimote#0x22:_Acknowledge_output_report.2C_return_function_result

§

DataReport(u8, WiimoteData)

Data report (IDs 0x30-0x3F).

Contains the data of the buttons, accelerometer, IR and Extension from the Wii remote. The exact data depends on the report type requested by the output report 0x12. Defaults to 0x30 which only contains the button data.

WiiBrew Documentation: https://www.wiibrew.org/wiki/Wiimote#Data_Reporting

Trait Implementations§

Source§

impl Debug for InputReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl TryFrom<&[u8; 32]> for InputReport

Source§

type Error = WiimoteError

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

fn try_from(value: &[u8; 32]) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<&[u8]> for InputReport

Source§

type Error = WiimoteError

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

fn try_from(value: &[u8]) -> Result<Self, Self::Error>

Performs the conversion.

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.