I2sData

Trait I2sData 

Source
pub trait I2sData {
    // Required methods
    fn datlen() -> u8;
    fn for_u16<F: Fn(u16)>(&self, f: F);
}
Expand description

Implemented by data types that fit the device’s data width: u16, and u32.

Required Methods§

Source

fn datlen() -> u8

Value for I2C datlen register field.

Source

fn for_u16<F: Fn(u16)>(&self, f: F)

Run given f closure for each 16-bit part of the value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl I2sData for u16

Source§

fn datlen() -> u8

Source§

fn for_u16<F: Fn(u16)>(&self, f: F)

Source§

impl I2sData for u32

Source§

fn datlen() -> u8

Source§

fn for_u16<F: Fn(u16)>(&self, f: F)

Implementors§