Struct vcs_classic_hid::led::LedReport[][src]

pub struct LedReport(_);

Structure representing a report for LED activation on the controller.

Implementations

impl LedReport[src]

pub fn new() -> Self[src]

Create a new LED report.

By default, an LED report will turn off all LEDs.

pub fn filled(value: u8) -> Self[src]

Create a new LED report filled with the given intensity value.

pub fn clear(&mut self)[src]

Turn all ring of LEDs off.

pub fn fill(&mut self, value: u8)[src]

Set all LEDs in the ring to the given value.

pub fn set_fuji(&mut self, value: u8)[src]

Set the Fuji LED to a value.

pub fn set(&mut self, led: u8, value: u8)[src]

Set a LED in the ring to a value.

pub fn set_selection(&mut self, selection: LedSelection, value: u8)[src]

Set a selection of LEDs in the ring to a value.

pub fn invert(&mut self, led: u8)[src]

Invert the value of the LED in the ring.

pub fn invert_selection(&mut self, selection: LedSelection)[src]

Invert the values of a selection of the LED in the ring.

pub fn saturating_add(&mut self, led: u8, value_delta: i16)[src]

Add an intensity to a LED in the ring.

The addition is relative to the receiving report value, and not the current state of the LEDs in the controller. Values are automatically clamped to the limits of the device.

pub fn saturating_add_selection(
    &mut self,
    selection: LedSelection,
    value_delta: i16
)
[src]

Add an intensity to a selection of LEDs in the ring.

The addition is relative to the receiving report value, and not the current state of the LEDs in the controller. Values are automatically clamped to the limits of the device.

pub fn send<D>(&self, device: D) -> Result<(), D::Error> where
    D: Device
[src]

Send this report as an HID message to the given device.

Safety: although not memory unsafe, the operation must be done on a readily available device handle for the Atari Classic Controller. The effects on any other device are unknown and potentially dangerous.

Trait Implementations

impl AsRef<[u8]> for LedReport[src]

impl Clone for LedReport[src]

impl Copy for LedReport[src]

impl Debug for LedReport[src]

impl Default for LedReport[src]

By default, an LED report will turn off all LEDs.

impl Eq for LedReport[src]

impl PartialEq<LedReport> for LedReport[src]

impl StructuralEq for LedReport[src]

impl StructuralPartialEq for LedReport[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.