Struct avr_hal_generic::usart::UsartWriter
source · pub struct UsartWriter<H, USART: UsartOps<H, RX, TX>, RX, TX, CLOCK> { /* private fields */ }Expand description
Writer half of a Usart peripheral.
Created by calling Usart::split. Splitting a peripheral into reader and writer allows
concurrently receiving and transmitting data from different contexts.
The writer half most notably implements embedded_hal_v0::serial::Write and ufmt::uWrite
for transmitting data.
Implementations§
source§impl<H, USART: UsartOps<H, RX, TX>, RX, TX, CLOCK> UsartWriter<H, USART, RX, TX, CLOCK>
impl<H, USART: UsartOps<H, RX, TX>, RX, TX, CLOCK> UsartWriter<H, USART, RX, TX, CLOCK>
sourcepub fn reunite(
self,
other: UsartReader<H, USART, RX, TX, CLOCK>
) -> Usart<H, USART, RX, TX, CLOCK>
pub fn reunite( self, other: UsartReader<H, USART, RX, TX, CLOCK> ) -> Usart<H, USART, RX, TX, CLOCK>
Merge this UsartWriter with a UsartReader back into a single Usart peripheral.
Trait Implementations§
source§impl<H, USART: UsartOps<H, RX, TX>, RX, TX, CLOCK> Write<u8> for UsartWriter<H, USART, RX, TX, CLOCK>
impl<H, USART: UsartOps<H, RX, TX>, RX, TX, CLOCK> Write<u8> for UsartWriter<H, USART, RX, TX, CLOCK>
source§impl<H, USART: UsartOps<H, RX, TX>, RX, TX, CLOCK> uWrite for UsartWriter<H, USART, RX, TX, CLOCK>
impl<H, USART: UsartOps<H, RX, TX>, RX, TX, CLOCK> uWrite for UsartWriter<H, USART, RX, TX, CLOCK>
source§fn write_str(&mut self, s: &str) -> Result<(), Self::Error>
fn write_str(&mut self, s: &str) -> Result<(), Self::Error>
Writes a string slice into this writer, returning whether the write succeeded. Read more
source§fn write_char(&mut self, c: char) -> Result<(), Self::Error>
fn write_char(&mut self, c: char) -> Result<(), Self::Error>
Writes a [
char] into this writer, returning whether the write succeeded. Read more