xwrust::xwds::i2cm

Struct I2cm

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

I2C主机模式控制器

Implementations§

source§

impl I2cm

source

pub fn xfer( &self, addr: u16, flag: MsgFlag, data: &mut [u8], size: XwSz, to: XwTm, ) -> XwEr

传输I2C消息

§参数说明
  • addr: 外设地址
  • flag: 传输消息标志,取值 MsgFlag 的常量组合
  • data: 数据数组的切片
  • size: 数据大小
  • to: 期望唤醒的时间点
§错误码
source

pub fn abort(&self, addr: u16, addrflag: MsgFlag, to: XwTm) -> XwEr

中止I2C总线传输

§参数说明
  • addr: I2C地址
  • addrflag: I2C地址模式,取值 MsgFlag 的常量组合
  • to: 期望唤醒的时间点
§错误码

Auto Trait Implementations§

§

impl !Freeze for I2cm

§

impl !RefUnwindSafe for I2cm

§

impl Send for I2cm

§

impl !Sync for I2cm

§

impl Unpin for I2cm

§

impl UnwindSafe for I2cm

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.