[−][src]Struct cntrlr::hw::board::teensy_common::io::Serial
A serial instance
This wraps a UART and provides application-level functionality.
Implementations
impl<M, T, R, const N: usize> Serial<M, T, R, N>
[src]
Trait Implementations
impl<M, T, R, const N: usize> Read for Serial<M, T, R, N> where
M: 'static,
T: 'static,
R: UartRx<M, N> + 'static,
[src]
M: 'static,
T: 'static,
R: UartRx<M, N> + 'static,
type Error = SerialError
The error type
type Future = impl Future<Output = Result<usize, Self::Error>> + 'a
The future for Self::read()
pub fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Self::Future
[src]
impl Serial for Serial<Mk20Dx128, Serial1Tx, Serial1Rx, 0>
[src]
This is supported on
board="teensy_30"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mk20Dx128, Serial2Tx, Serial2Rx, 1>
[src]
This is supported on
board="teensy_30"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mk64Fx512, Serial5Tx, Serial5Rx, 4>
[src]
This is supported on
board="teensy_35"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mk64Fx512, Serial6Tx, Serial6Rx, 5>
[src]
This is supported on
board="teensy_35"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mk66Fx1M0, Serial1Tx, Serial1Rx, 0>
[src]
This is supported on
board="teensy_36"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mk66Fx1M0, Serial2Tx, Serial2Rx, 1>
[src]
This is supported on
board="teensy_36"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mk66Fx1M0, Serial3Tx, Serial3Rx, 2>
[src]
This is supported on
board="teensy_36"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mk66Fx1M0, Serial4Tx, Serial4Rx, 3>
[src]
This is supported on
board="teensy_36"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mk66Fx1M0, Serial5Tx, Serial5Rx, 4>
[src]
This is supported on
board="teensy_36"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mkl26Z64, Serial1Tx, Serial1Rx, 0>
[src]
This is supported on
board="teensy_lc"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mkl26Z64, Serial2Tx, Serial2Rx, 1>
[src]
This is supported on
board="teensy_lc"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mkl26Z64, Serial3Tx, Serial3Rx, 2>
[src]
This is supported on
board="teensy_lc"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mk20Dx128, Serial3Tx, Serial3Rx, 2>
[src]
This is supported on
board="teensy_30"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mk20Dx256, Serial1Tx, Serial1Rx, 0>
[src]
This is supported on
board="teensy_32"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mk20Dx256, Serial2Tx, Serial2Rx, 1>
[src]
This is supported on
board="teensy_32"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mk20Dx256, Serial3Tx, Serial3Rx, 2>
[src]
This is supported on
board="teensy_32"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mk64Fx512, Serial1Tx, Serial1Rx, 0>
[src]
This is supported on
board="teensy_35"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mk64Fx512, Serial2Tx, Serial2Rx, 1>
[src]
This is supported on
board="teensy_35"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mk64Fx512, Serial3Tx, Serial3Rx, 2>
[src]
This is supported on
board="teensy_35"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl Serial for Serial<Mk64Fx512, Serial4Tx, Serial4Rx, 3>
[src]
This is supported on
board="teensy_35"
only.type Error = SerialError
The error type
pub fn enable(&mut self, baud: usize) -> Result<(), Self::Error>
[src]
pub fn disable(&mut self) -> Result<(), Self::Error>
[src]
impl<M, T, R, const N: usize> Write for Serial<M, T, R, N> where
M: 'static,
T: UartTx<M, N> + 'static,
R: 'static,
[src]
M: 'static,
T: UartTx<M, N> + 'static,
R: 'static,
type Error = SerialError
The error type
type Future = impl Future<Output = Result<usize, Self::Error>> + 'a
The future for Self::write()
type FlushFuture = impl Future<Output = Result<(), Self::Error>> + 'a
The future for Self::flush()
pub fn write<'a>(&'a mut self, buf: &'a [u8]) -> Self::Future
[src]
pub fn flush<'a>(&'a mut self) -> Self::FlushFuture
[src]
Auto Trait Implementations
impl<M, T, R, const N: usize> Send for Serial<M, T, R, N> where
M: Send,
R: Send,
T: Send,
[src]
M: Send,
R: Send,
T: Send,
impl<M, T, R, const N: usize> !Sync for Serial<M, T, R, N>
[src]
impl<M, T, R, const N: usize> Unpin for Serial<M, T, R, N> where
M: Unpin,
R: Unpin,
T: Unpin,
[src]
M: Unpin,
R: Unpin,
T: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ReadExt for T where
T: 'static + Read,
[src]
T: 'static + Read,
type ExactFuture = impl Future<Output = Result<(), <T as Read>::Error>> + 'a
The future for Self::read_exact()
type LineFuture = impl Future<Output = Result<(), LineError<<T as Read>::Error>>> + 'a
The future for Self::read_line()
pub fn read_exact(&'a mut Self, &'a mut [u8]) -> <T as ReadExt>::ExactFuture
[src]
pub fn read_line(&'a mut Self, &'a mut String) -> <T as ReadExt>::LineFuture
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> WriteExt for T where
T: 'static + Write,
[src]
T: 'static + Write,
type AllFuture = impl Future<Output = Result<(), <T as Write>::Error>> + 'a
The future for Self::write_all()
type FmtFuture = impl Future<Output = Result<(), <T as Write>::Error>> + 'a
The future for Self::write_fmt()