pub struct Device {
desc: Device,
}Fields§
§desc: DeviceImplementations§
Source§impl Device
impl Device
pub fn open(compatible: &str, ordinal: usize) -> Result<Self>
pub fn transmit(&self, frame: &Frame) -> Result<()>
pub fn receive(&self, out: &mut Frame) -> Result<bool>
Sourcepub fn configure_filter(&self, filter: &Filter) -> Result<()>
pub fn configure_filter(&self, filter: &Filter) -> Result<()>
Configure a hardware filter. Prefer calling this before start.
pub fn bus_status(&self) -> BusStatus
pub fn recover(&self) -> Result<()>
pub fn diag(&self) -> Diag
pub fn slot(&self) -> u8
Sourcepub fn register_waiter(&self, uid: usize) -> Result<()>
pub fn register_waiter(&self, uid: usize) -> Result<()>
Park uid as the single waiter on this controller. Returns
EBUSY if another thread is already armed — callers must not
share a single CAN device across concurrent receivers.
pub fn unregister_waiter(&self) -> Result<()>
fn with_bus<R, F: FnOnce(&Bus) -> R>(&self, f: F) -> Result<R>
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnsafeUnpin for Device
impl UnwindSafe for Device
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