pub struct Can<CAN: Instance, PULL = Floating> { /* private fields */ }
Expand description
Interface to the CAN peripheral.
Implementations§
Source§impl<CAN: Instance, PULL: UpMode> Can<CAN, PULL>
impl<CAN: Instance, PULL: UpMode> Can<CAN, PULL>
Sourcepub fn new<const R: u8>(
can: impl Into<Rmp<CAN, R>>,
_usb: USB,
pins: (impl RInto<CAN::Tx, R>, impl RInto<CAN::Rx<PULL>, R>),
rcc: &mut RCC,
) -> Can<CAN, PULL>
pub fn new<const R: u8>( can: impl Into<Rmp<CAN, R>>, _usb: USB, pins: (impl RInto<CAN::Tx, R>, impl RInto<CAN::Rx<PULL>, R>), rcc: &mut RCC, ) -> Can<CAN, PULL>
Creates a CAN interface.
CAN shares SRAM with the USB peripheral. Take ownership of USB to prevent accidental shared usage.
Sourcepub fn new_loopback(can: CAN, _usb: USB, rcc: &mut RCC) -> Can<CAN, PULL>
pub fn new_loopback(can: CAN, _usb: USB, rcc: &mut RCC) -> Can<CAN, PULL>
Creates a CAN interface in loopback mode
Trait Implementations§
Source§impl<PULL> FilterOwner for Can<CAN, PULL>
impl<PULL> FilterOwner for Can<CAN, PULL>
Source§const NUM_FILTER_BANKS: u8 = 28u8
const NUM_FILTER_BANKS: u8 = 28u8
The total number of filter banks available to the instance. Read more
Auto Trait Implementations§
impl<CAN, PULL> Freeze for Can<CAN, PULL>
impl<CAN, PULL> RefUnwindSafe for Can<CAN, PULL>where
CAN: RefUnwindSafe,
<CAN as CanCommon>::Tx: RefUnwindSafe,
<CAN as CanCommon>::Rx<PULL>: RefUnwindSafe,
impl<CAN, PULL> Send for Can<CAN, PULL>
impl<CAN, PULL> Sync for Can<CAN, PULL>
impl<CAN, PULL> Unpin for Can<CAN, PULL>
impl<CAN, PULL> UnwindSafe for Can<CAN, PULL>where
CAN: UnwindSafe,
<CAN as CanCommon>::Tx: UnwindSafe,
<CAN as CanCommon>::Rx<PULL>: UnwindSafe,
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