Skip to main content

SerialPort

Struct SerialPort 

Source
pub struct SerialPort<const TX: usize = rdif_serial::::serial_core::SerialPort::{constant#0}, const RX: usize = rdif_serial::::serial_core::SerialPort::{constant#1}> { /* private fields */ }

Implementations§

Source§

impl<const TX: usize, const RX: usize> SerialPort<TX, RX>

Source

pub fn split(raw: impl RawUart, owner: OwnerId) -> SerialParts<TX, RX>

Source

pub fn split_boxed(raw: Box<dyn RawUart>, owner: OwnerId) -> SerialParts<TX, RX>

Source

pub fn owner(&self) -> OwnerId

Source

pub fn startup( &self, lease: OwnerLease<'_>, config: &Config, ) -> Result<SerialIrqOutcome, ConfigError>

Source

pub fn shutdown(&self, lease: OwnerLease<'_>)

Source

pub fn set_config( &self, lease: OwnerLease<'_>, config: &Config, ) -> Result<(), ConfigError>

Source

pub fn baudrate(&self, lease: OwnerLease<'_>) -> u32

Source

pub fn tx_idle(&self, lease: OwnerLease<'_>) -> bool

Source

pub fn counters(&self) -> SerialCounters

Source§

impl<const TX: usize, const RX: usize> SerialPort<TX, RX>

Source

pub fn service( &self, lease: OwnerLease<'_>, work: SerialSoftWork, ) -> SerialIrqOutcome

Auto Trait Implementations§

§

impl<const TX: usize = rdif_serial::::serial_core::SerialPort::{constant#0}, const RX: usize = rdif_serial::::serial_core::SerialPort::{constant#1}> !RefUnwindSafe for SerialPort<TX, RX>

§

impl<const TX: usize = rdif_serial::::serial_core::SerialPort::{constant#0}, const RX: usize = rdif_serial::::serial_core::SerialPort::{constant#1}> !UnwindSafe for SerialPort<TX, RX>

§

impl<const TX: usize, const RX: usize> Freeze for SerialPort<TX, RX>

§

impl<const TX: usize, const RX: usize> Send for SerialPort<TX, RX>

§

impl<const TX: usize, const RX: usize> Sync for SerialPort<TX, RX>

§

impl<const TX: usize, const RX: usize> Unpin for SerialPort<TX, RX>

§

impl<const TX: usize, const RX: usize> UnsafeUnpin for SerialPort<TX, RX>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.