pub struct DeviceController { /* private fields */ }
Expand description
A single manager for both a device and an associated DeviceEventStream.
Implementations§
source§impl DeviceController
impl DeviceController
sourcepub fn events(&self) -> &DeviceEventStream
pub fn events(&self) -> &DeviceEventStream
Get a reference to the event stream.
sourcepub fn new_from_device(device: Device) -> Self
pub fn new_from_device(device: Device) -> Self
Create a new device controller from a device.
sourcepub fn allocate_interrupt(
&self,
) -> Result<InterruptInfo, InterruptAllocationError>
pub fn allocate_interrupt( &self, ) -> Result<InterruptInfo, InterruptAllocationError>
Allocate a new interrupt on this device.
sourcepub fn check_mailbox(&self, pri: MailboxPriority) -> Option<u64>
pub fn check_mailbox(&self, pri: MailboxPriority) -> Option<u64>
Poll a single mailbox. If there are no messages, returns None.
sourcepub async fn next_msg(&self, min: MailboxPriority) -> (MailboxPriority, u64)
pub async fn next_msg(&self, min: MailboxPriority) -> (MailboxPriority, u64)
Get the next message with a priority equal to or higher that min
.
Auto Trait Implementations§
impl !DeviceSync for DeviceController
impl Freeze for DeviceController
impl !ObjSafe for DeviceController
impl RefUnwindSafe for DeviceController
impl Send for DeviceController
impl Sync for DeviceController
impl Unpin for DeviceController
impl UnwindSafe for DeviceController
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more