/// Sends a message through the wrapped USART instance
///
/// Accepts a message and a buffer. The buffer will be used to hold the
/// serialized message, and must be large enough for that purpose. Any
/// previous contents of the buffer will be ignored.
Sends a message through the wrapped USART instance
Accepts a message and a buffer. The buffer will be used to hold the
serialized message, and must be large enough for that purpose. Any
previous contents of the buffer will be ignored.
Sends a message through the wrapped USART instance Accepts a message and a buffer . The buffer will be used to hold the serialized message and must be large enough for that purpose . Any previous contents of the buffer will be ignored .
pub fn send_message<T>(&mut self, message: &T, buf: &mut [u8])
        -> Result<(), Error>
        where T: Serialize
    {
        let data = postcard::to_slice_cobs(message, buf)?;
        self.usart.bwrite_all(data)
            .void_unwrap();
        Ok(())
    }
pub fn send_message < T > ( & mut self , message : & T , buf : & mut [ u8 ] ) -> Result < ( ) , Error > where T : Serialize { let data = postcard :: to_slice_cobs ( message , buf ) ? ; self . usart . bwrite_all ( data ) . void_unwrap ( ) ; Ok ( ( ) ) }
Sends a message through the wrapped USART instance
Accepts a message and a buffer.
Sends a message through the wrapped USART instance Accepts a message and a buffer .
&mut self
message
&T
buf
&mut [u8]