pub fn write(&mut self, data: u8) -> Result<(), ProgError> {
    if !self.transmitting {return Err(ProgError::PermissionDenied);}

    if self.tx_buffer.push(data).is_err() {return Err(ProgError::OutOfMemory);}
    else {return Ok(());}
  }
/// Add a byte that is send to the slave. Returns an error-enum if transmittion is not initiated or the tx buffer is full.
Add a byte that is send to the slave. Returns an error-enum if transmittion is not initiated or the tx buffer is full.
Add a byte that is send to the slave . Returns an error - enum if transmittion is not initiated or the tx buffer is full .
pub fn write(&mut self, data: u8) -> Result<(), ProgError> {
    if !self.transmitting {return Err(ProgError::PermissionDenied);}
    if self.tx_buffer.push(data).is_err() {return Err(ProgError::OutOfMemory);}
    else {return Ok(());}
  }
pub fn write ( & mut self , data : u8 ) -> Result < ( ) , ProgError > { if ! self . transmitting { return Err ( ProgError :: PermissionDenied ) ; } if self . tx_buffer . push ( data ) . is_err ( ) { return Err ( ProgError :: OutOfMemory ) ; } else { return Ok ( ( ) ) ; } }
Add a byte that is send to the slave.
Add a byte that is send to the slave .
&mut self
data
u8
&mut self
data
u8