pub fn slave_write_receive(&self, buffer: &'static mut [u8], len: u8) {
        self.slave_write_buffer.replace(buffer);
        self.slave_write_buffer_len.set(len);

        if self.slave_enabled.get() {
            self.slave_registers.map(|slave_registers| {
                let regs: &TWISRegisters = unsafe { &*slave_registers };

                let status = regs.status.get();
                let imr = regs.interrupt_mask.get();
                let interrupts = status & imr;

                // Address match status bit still set, so we need to tell the TWIS
                // to continue.
                if (interrupts & (1 << 16) > 0) && (status & (1 << 5) == 0) {
                    regs.status_clear.set(status);
                }
            });
        }
    }
/// Receive the bytes the I2C master is writing to us.
Receive the bytes the I2C master is writing to us.
Receive the bytes the I2C master is writing to us .
pub fn slave_write_receive(&self, buffer: &'static mut [u8], len: u8) {
        self.slave_write_buffer.replace(buffer);
        self.slave_write_buffer_len.set(len);
        if self.slave_enabled.get() {
            self.slave_registers.map(|slave_registers| {
                let regs: &TWISRegisters = unsafe { &*slave_registers };
                let status = regs.status.get();
                let imr = regs.interrupt_mask.get();
                let interrupts = status & imr;
                // Address match status bit still set, so we need to tell the TWIS
                // to continue.
                if (interrupts & (1 << 16) > 0) && (status & (1 << 5) == 0) {
                    regs.status_clear.set(status);
                }
            });
        }
    }
pub fn slave_write_receive ( & self , buffer : & ' static mut [ u8 ] , len : u8 ) { self . slave_write_buffer . replace ( buffer ) ; self . slave_write_buffer_len . set ( len ) ; if self . slave_enabled . get ( ) { self . slave_registers . map ( | slave_registers | { let regs : & TWISRegisters = unsafe { & * slave_registers } ; let status = regs . status . get ( ) ; let imr = regs . interrupt_mask . get ( ) ; let interrupts = status & imr ; // Address match status bit still set, so we need to tell the TWIS // to continue. if ( interrupts & ( 1 << 16 ) > 0 ) && ( status & ( 1 << 5 ) == 0 ) { regs . status_clear . set ( status ) ; } } ) ; } }
Receive the bytes the I2C master is writing to us.
Receive the bytes the I2C master is writing to us .
&self
buffer
&'static mut [u8]
len
u8
&self
buffer
&'static mut [u8]
len
u8