SerialRaw

Struct SerialRaw 

Source
pub struct SerialRaw<T>
where T: Register,
{ /* private fields */ }

Implementations§

Source§

impl<T> SerialRaw<T>
where T: Register,

Source

pub fn new(inner: T) -> SerialRaw<T>

Source

pub fn set_config(&mut self, config: &Config) -> Result<(), ConfigError>

Source

pub fn baudrate(&self) -> u32

Source

pub fn data_bits(&self) -> DataBits

Source

pub fn stop_bits(&self) -> StopBits

Source

pub fn parity(&self) -> Parity

Source

pub fn clock_freq(&self) -> u32

Source

pub fn enable_loopback(&mut self)

Source

pub fn disable_loopback(&mut self)

Source

pub fn is_loopback_enabled(&self) -> bool

Source

pub fn enable_interrupts(&mut self, mask: InterruptMask)

Source

pub fn disable_interrupts(&mut self, mask: InterruptMask)

Source

pub fn get_enabled_interrupts(&self) -> InterruptMask

Source

pub fn take_tx(&mut self) -> Option<SenderRaw<T>>

Source

pub fn take_rx(&mut self) -> Option<RecieverRaw<T>>

Source

pub fn irq_handler(&mut self) -> Option<IrqHandlerRaw<T>>

Source

pub fn set_tx(&mut self, tx: SenderRaw<T>) -> Result<(), NotMatchError>

Source

pub fn set_rx(&mut self, rx: RecieverRaw<T>) -> Result<(), NotMatchError>

Source

pub fn set_irq_handler( &mut self, handler: IrqHandlerRaw<T>, ) -> Result<(), NotMatchError>

Auto Trait Implementations§

§

impl<T> !Freeze for SerialRaw<T>

§

impl<T> !RefUnwindSafe for SerialRaw<T>

§

impl<T> Send for SerialRaw<T>

§

impl<T> Sync for SerialRaw<T>

§

impl<T> Unpin for SerialRaw<T>
where T: Unpin,

§

impl<T> UnwindSafe for SerialRaw<T>
where T: UnwindSafe,

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.