Struct esp_idf_svc::hal::uart::AsyncUartTxDriver
source · pub struct AsyncUartTxDriver<'d, T>where
T: BorrowMut<UartTxDriver<'d>>,{ /* private fields */ }
Implementations§
source§impl<'d> AsyncUartTxDriver<'d, UartTxDriver<'d>>
impl<'d> AsyncUartTxDriver<'d, UartTxDriver<'d>>
pub fn new( uart: impl Peripheral<P = impl Uart> + 'd, tx: impl Peripheral<P = impl OutputPin> + 'd, cts: Option<impl Peripheral<P = impl InputPin> + 'd>, rts: Option<impl Peripheral<P = impl OutputPin> + 'd>, config: &Config, ) -> Result<AsyncUartTxDriver<'d, UartTxDriver<'d>>, EspError>
source§impl<'d, T> AsyncUartTxDriver<'d, T>where
T: BorrowMut<UartTxDriver<'d>>,
impl<'d, T> AsyncUartTxDriver<'d, T>where
T: BorrowMut<UartTxDriver<'d>>,
pub fn wrap(driver: T) -> Result<AsyncUartTxDriver<'d, T>, EspError>
pub fn wrap_custom( driver: T, priority: Option<u8>, pin_to_core: Option<Core>, ) -> Result<AsyncUartTxDriver<'d, T>, EspError>
pub fn driver(&self) -> &UartTxDriver<'d>
pub fn driver_mut(&mut self) -> &mut UartTxDriver<'d>
pub async fn write(&self, bytes: &[u8]) -> Result<usize, EspError>
pub async fn wait_done(&self) -> Result<(), EspError>
Trait Implementations§
source§impl<'d, T> Drop for AsyncUartTxDriver<'d, T>where
T: BorrowMut<UartTxDriver<'d>>,
impl<'d, T> Drop for AsyncUartTxDriver<'d, T>where
T: BorrowMut<UartTxDriver<'d>>,
source§impl<'d, T> ErrorType for AsyncUartTxDriver<'d, T>where
T: BorrowMut<UartTxDriver<'d>>,
impl<'d, T> ErrorType for AsyncUartTxDriver<'d, T>where
T: BorrowMut<UartTxDriver<'d>>,
§type Error = EspIOError
type Error = EspIOError
Error type of all the IO operations on this type.
source§impl<'d, T> Write for AsyncUartTxDriver<'d, T>where
T: BorrowMut<UartTxDriver<'d>>,
impl<'d, T> Write for AsyncUartTxDriver<'d, T>where
T: BorrowMut<UartTxDriver<'d>>,
source§async fn write(
&mut self,
buf: &[u8],
) -> Result<usize, <AsyncUartTxDriver<'d, T> as ErrorType>::Error>
async fn write( &mut self, buf: &[u8], ) -> Result<usize, <AsyncUartTxDriver<'d, T> as ErrorType>::Error>
Write a buffer into this writer, returning how many bytes were written. Read more