embassy-usb

Crates

git

Versions

default

Flavors

Skip to main content

ControlShared

Struct ControlShared 

Source
pub struct ControlShared { /* private fields */ }
Expand description

Shared data between control request handler and application API.

Implementations§

Source§

impl ControlShared

Source

pub const fn new(capabilities: Capabilities, usb488: bool) -> Self

Creates a new ControlShared.

Source

pub fn set_status_byte(&self, stb: u8)

Sets the IEEE 488.2 status byte (*STB).

Source

pub fn status_byte(&self) -> u8

Gets the current IEEE 488.2 status byte (*STB).

Source

pub fn check_clear(&self) -> bool

Checks if a clear request was issued by the host, clearing the flag if set.

Source

pub fn set_clear_pending(&self, val: bool)

Sets or clears the pending clear flag.

Source

pub fn indicator_pulse_count(&self) -> u32

Gets the number of indicator pulses received from the host.

Source

pub fn increment_indicator_pulse(&self)

Increments the indicator pulse counter.

Source

pub fn trigger_count(&self) -> u32

Gets the total number of hardware trigger commands received.

Source

pub fn reset(&self)

Resets all internal state flags and counters.

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.