pub fn refresh(&self) -> Result<(), EI::Error> {
        self.dirty.store(0, Ordering::Release);
        let mut load_buffer = 0usize;
        let mut fresh_buffer = 0usize;
        let mut start_port = 4;
        let mut ports_to_read = self.issued.load(Ordering::Relaxed) >> start_port;
        while ports_to_read != 0 {
            let skip = ports_to_read.trailing_zeros();
            ports_to_read >>= skip;
            start_port += skip;
            let port_values = self.expander.lock(|ex| ex.read_ports(start_port as u8))?;
            load_buffer |= (port_values as usize) << start_port;
            fresh_buffer |= 0xFFusize << start_port;
            ports_to_read &= !0xFFusize;
        }
        self.cache.store(load_buffer, Ordering::Relaxed);
        self.fresh.store(fresh_buffer, Ordering::Relaxed);
        Ok(())
    }
/// Refresh the local cache by reading the port values from any outstanding `PortPin`s issued
/// from this adapter, updating the values read through their `InputPin` impls.
///
/// This is done using batch registers of MAX7301 to reduce bus traffic. All pending
/// `OutputPin` operations are discarded.
Refresh the local cache by reading the port values from any outstanding `PortPin`s issued
from this adapter, updating the values read through their `InputPin` impls.

This is done using batch registers of MAX7301 to reduce bus traffic. All pending
`OutputPin` operations are discarded.
Refresh the local cache by reading the port values from any outstanding ` PortPin ` s issued from this adapter updating the values read through their ` InputPin ` impls . This is done using batch registers of MAX7301 to reduce bus traffic . All pending ` OutputPin ` operations are discarded .
pub fn refresh(&self) -> Result<(), EI::Error> {
        self.dirty.store(0, Ordering::Release);
        let mut load_buffer = 0usize;
        let mut fresh_buffer = 0usize;
        let mut start_port = 4;
        let mut ports_to_read = self.issued.load(Ordering::Relaxed) >> start_port;
        while ports_to_read != 0 {
            let skip = ports_to_read.trailing_zeros();
            ports_to_read >>= skip;
            start_port += skip;
            let port_values = self.expander.lock(|ex| ex.read_ports(start_port as u8))?;
            load_buffer |= (port_values as usize) << start_port;
            fresh_buffer |= 0xFFusize << start_port;
            ports_to_read &= !0xFFusize;
        }
        self.cache.store(load_buffer, Ordering::Relaxed);
        self.fresh.store(fresh_buffer, Ordering::Relaxed);
        Ok(())
    }
pub fn refresh ( & self ) -> Result < ( ) , EI :: Error > { self . dirty . store ( 0 , Ordering :: Release ) ; let mut load_buffer = 0usize ; let mut fresh_buffer = 0usize ; let mut start_port = 4 ; let mut ports_to_read = self . issued . load ( Ordering :: Relaxed ) >> start_port ; while ports_to_read != 0 { let skip = ports_to_read . trailing_zeros ( ) ; ports_to_read >>= skip ; start_port += skip ; let port_values = self . expander . lock ( | ex | ex . read_ports ( start_port as u8 ) ) ? ; load_buffer |= ( port_values as usize ) << start_port ; fresh_buffer |= 0xFFusize << start_port ; ports_to_read &= ! 0xFFusize ; } self . cache . store ( load_buffer , Ordering :: Relaxed ) ; self . fresh . store ( fresh_buffer , Ordering :: Relaxed ) ; Ok ( ( ) ) }
Refresh the local cache by reading the port values from any outstanding `PortPin`s issued
from this adapter, updating the values read through their `InputPin` impls.
Refresh the local cache by reading the port values from any outstanding ` PortPin ` s issued from this adapter updating the values read through their ` InputPin ` impls .
&self
&self