pub struct Max485<RIDO, REDE>{ /* private fields */ }Expand description
Asynchronous driver for MAX485 RS-485 transceivers. Requires a serial port, a RE/DE pin, and a delay provider.
Implementations§
Source§impl<RIDO, REDE> Max485<RIDO, REDE>
impl<RIDO, REDE> Max485<RIDO, REDE>
pub fn new(serial: RIDO, pin: REDE) -> Self
pub fn into_parts(self) -> (RIDO, REDE)
pub fn inner_mut(&mut self) -> &mut RIDO
Trait Implementations§
Source§impl<RIDO, REDE> Read for Max485<RIDO, REDE>
impl<RIDO, REDE> Read for Max485<RIDO, REDE>
Source§async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§async fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
async fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf. Read moreSource§impl<RIDO, REDE> Write for Max485<RIDO, REDE>
impl<RIDO, REDE> Write for Max485<RIDO, REDE>
Source§async fn write(&mut self, bytes: &[u8]) -> Result<usize, Self::Error>
async fn write(&mut self, bytes: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
Source§impl<RIDO, REDE> WriteReady for Max485<RIDO, REDE>
impl<RIDO, REDE> WriteReady for Max485<RIDO, REDE>
Auto Trait Implementations§
impl<RIDO, REDE> Freeze for Max485<RIDO, REDE>
impl<RIDO, REDE> RefUnwindSafe for Max485<RIDO, REDE>where
RIDO: RefUnwindSafe,
REDE: RefUnwindSafe,
impl<RIDO, REDE> Send for Max485<RIDO, REDE>
impl<RIDO, REDE> Sync for Max485<RIDO, REDE>
impl<RIDO, REDE> Unpin for Max485<RIDO, REDE>
impl<RIDO, REDE> UnsafeUnpin for Max485<RIDO, REDE>where
RIDO: UnsafeUnpin,
REDE: UnsafeUnpin,
impl<RIDO, REDE> UnwindSafe for Max485<RIDO, REDE>where
RIDO: UnwindSafe,
REDE: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more