Skip to main content

Expander

Trait Expander 

Source
pub trait Expander<I2C>
where I2C: I2c,
{ // Required methods fn write_byte( &mut self, register: Register, data: u8, ) -> Result<(), ExpanderError<<I2C as ErrorType>::Error>>; fn read_byte( &mut self, register: Register, buffer: &mut u8, ) -> Result<(), ExpanderError<<I2C as ErrorType>::Error>>; fn write_halfword( &mut self, register: Register, data: u16, ) -> Result<(), ExpanderError<<I2C as ErrorType>::Error>>; fn read_halfword( &mut self, register: Register, buffer: &mut u16, ) -> Result<(), ExpanderError<<I2C as ErrorType>::Error>>; }
Expand description

Trait for standard IO expanders which are not Sync

Required Methods§

Source

fn write_byte( &mut self, register: Register, data: u8, ) -> Result<(), ExpanderError<<I2C as ErrorType>::Error>>

Source

fn read_byte( &mut self, register: Register, buffer: &mut u8, ) -> Result<(), ExpanderError<<I2C as ErrorType>::Error>>

Source

fn write_halfword( &mut self, register: Register, data: u16, ) -> Result<(), ExpanderError<<I2C as ErrorType>::Error>>

Source

fn read_halfword( &mut self, register: Register, buffer: &mut u16, ) -> Result<(), ExpanderError<<I2C as ErrorType>::Error>>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<I2C, E> Expander<I2C> for Pca9535Immediate<I2C>
where E: Debug, I2C: I2c<Error = E>,

Source§

impl<I2C, IP, E> Expander<I2C> for Pca9535Cached<I2C, IP>
where IP: InputPin, I2C: I2c<Error = E>, E: Debug,