xwrust::xwds::dmauartc

Struct DmaUartC

source
#[repr(C)]
pub struct DmaUartC { /* private fields */ }
Expand description

SPI主机模式控制器

Implementations§

source§

impl DmaUartC

source

pub fn tx(&self, txd: &[u8], size: &mut XwSz, to: XwTm) -> XwEr

配置DMA通道发送数据

§参数说明
  • txd: 待发送的数据的缓冲区
  • size: 传输的大小
    • (I) 作为输入时,表示期望发送的数据的大小(单位:字节)
    • (O) 作为输出时,返回实际发送的数据大小
  • to: 期望唤醒的时间点
§错误码
source

pub fn putc(&self, byte: u8, to: XwTm) -> XwEr

发送一字节数据数据(非DMA模式)

§参数说明
  • byte: 待发送的字节
  • to: 期望唤醒的时间点
§错误码
source

pub fn rx(&self, rxd: &mut [u8], size: &mut XwSz, to: XwTm) -> XwEr

从接收队列中获取数据

§参数说明
  • rxd: 接收数据的缓冲区
  • size: 传输的大小
    • (I) 作为输入时,表示缓冲区大小(单位:字节)
    • (O) 作为输出时,返回实际读取的数据大小
  • to: 期望唤醒的时间点
§错误码
source

pub fn try_rx(&self, rxd: &mut [u8], size: &mut XwSz) -> XwEr

尝试从接收队列中获取数据

§参数说明
  • rxd: 接收数据的缓冲区
  • size: 传输的大小
    • (I) 作为输入时,表示缓冲区大小(单位:字节)
    • (O) 作为输出时,返回实际读取的数据大小
§错误码

Auto Trait Implementations§

§

impl !Freeze for DmaUartC

§

impl !RefUnwindSafe for DmaUartC

§

impl Send for DmaUartC

§

impl !Sync for DmaUartC

§

impl Unpin for DmaUartC

§

impl UnwindSafe for DmaUartC

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.

§

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.