ChannelCreator

Struct ChannelCreator 

Source
pub struct ChannelCreator<'ch, Dm, const CHANNEL: u8>
where Dm: DriverMode,
{ /* private fields */ }
Expand description

RMT Channel Creator

Implementations§

Source§

impl<Dm, const CHANNEL: u8> ChannelCreator<'_, Dm, CHANNEL>
where Dm: DriverMode,

Source

pub fn reborrow<'a>(&'a mut self) -> ChannelCreator<'a, Dm, CHANNEL>

Reborrow this channel creator for a shorter lifetime 'a.

Source

pub unsafe fn steal() -> Self

Unsafely steal a channel creator instance.

§Safety

Circumvents HAL ownership and safety guarantees and allows creating multiple handles to the same peripheral structure.

Trait Implementations§

Source§

impl<'ch, Dm> RxChannelCreator<'ch, Dm> for ChannelCreator<'ch, Dm, 2>
where Dm: DriverMode,

Available on crate feature unstable only.
Source§

fn configure_rx( self, pin: impl PeripheralInput<'ch>, config: RxChannelConfig, ) -> Result<Channel<'ch, Dm, Rx>, Error>
where Self: Sized,

Configure the RX channel
Source§

impl<'ch, Dm> RxChannelCreator<'ch, Dm> for ChannelCreator<'ch, Dm, 3>
where Dm: DriverMode,

Available on crate feature unstable only.
Source§

fn configure_rx( self, pin: impl PeripheralInput<'ch>, config: RxChannelConfig, ) -> Result<Channel<'ch, Dm, Rx>, Error>
where Self: Sized,

Configure the RX channel
Source§

impl<'ch, Dm> TxChannelCreator<'ch, Dm> for ChannelCreator<'ch, Dm, 0>
where Dm: DriverMode,

Available on crate feature unstable only.
Source§

fn configure_tx( self, pin: impl PeripheralOutput<'ch>, config: TxChannelConfig, ) -> Result<Channel<'ch, Dm, Tx>, Error>
where Self: Sized,

Configure the TX channel
Source§

impl<'ch, Dm> TxChannelCreator<'ch, Dm> for ChannelCreator<'ch, Dm, 1>
where Dm: DriverMode,

Available on crate feature unstable only.
Source§

fn configure_tx( self, pin: impl PeripheralOutput<'ch>, config: TxChannelConfig, ) -> Result<Channel<'ch, Dm, Tx>, Error>
where Self: Sized,

Configure the TX channel

Auto Trait Implementations§

§

impl<'ch, Dm, const CHANNEL: u8> Freeze for ChannelCreator<'ch, Dm, CHANNEL>

§

impl<'ch, Dm, const CHANNEL: u8> RefUnwindSafe for ChannelCreator<'ch, Dm, CHANNEL>
where Dm: RefUnwindSafe,

§

impl<'ch, Dm, const CHANNEL: u8> Send for ChannelCreator<'ch, Dm, CHANNEL>
where Dm: Send,

§

impl<'ch, Dm, const CHANNEL: u8> Sync for ChannelCreator<'ch, Dm, CHANNEL>
where Dm: Sync,

§

impl<'ch, Dm, const CHANNEL: u8> Unpin for ChannelCreator<'ch, Dm, CHANNEL>
where Dm: Unpin,

§

impl<'ch, Dm, const CHANNEL: u8> !UnwindSafe for ChannelCreator<'ch, Dm, CHANNEL>

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

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> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.