esp_idf_hal::can

Type Alias OwnedAsyncCanDriver

Source
pub type OwnedAsyncCanDriver<'d> = AsyncCanDriver<'d, CanDriver<'d>>;

Aliased Type§

struct OwnedAsyncCanDriver<'d> { /* private fields */ }

Implementations

Source§

impl<'d> AsyncCanDriver<'d, CanDriver<'d>>

Source

pub fn new( can: impl Peripheral<P = CAN> + 'd, tx: impl Peripheral<P = impl OutputPin> + 'd, rx: impl Peripheral<P = impl InputPin> + 'd, config: &Config, ) -> Result<Self, EspError>

Source§

impl<'d, T> AsyncCanDriver<'d, T>
where T: BorrowMut<CanDriver<'d>>,

Source

pub fn wrap(driver: T) -> Result<Self, EspError>

Source

pub fn wrap_custom( driver: T, priority: Option<u8>, pin_to_core: Option<Core>, ) -> Result<Self, EspError>

Source

pub fn driver(&self) -> &CanDriver<'d>

Source

pub fn driver_mut(&mut self) -> &mut CanDriver<'d>

Source

pub fn start(&mut self) -> Result<(), EspError>

Source

pub fn stop(&mut self) -> Result<(), EspError>

Source

pub async fn transmit(&self, frame: &Frame) -> Result<(), EspError>

Source

pub async fn receive(&self) -> Result<Frame, EspError>

Source

pub async fn read_alerts(&self) -> Result<EnumSet<Alert>, EspError>

Trait Implementations

Source§

impl<'d, T> Drop for AsyncCanDriver<'d, T>
where T: BorrowMut<CanDriver<'d>>,

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more