Struct avr_hal_generic::spi::ChipSelectPin
source · pub struct ChipSelectPin<CSPIN>(/* private fields */);
Expand description
Wrapper for the CS pin
Used to contain the chip-select pin during operation to prevent its mode from being changed from Output. This is necessary because the SPI state machine would otherwise reset itself to SPI slave mode immediately. This wrapper can be used just like an output pin, because it implements all the same traits from embedded-hal.
Trait Implementations§
source§impl<CSPIN: PinOps> ErrorType for ChipSelectPin<CSPIN>
impl<CSPIN: PinOps> ErrorType for ChipSelectPin<CSPIN>
§type Error = Infallible
type Error = Infallible
Error type
source§impl<CSPIN: PinOps> OutputPin for ChipSelectPin<CSPIN>
impl<CSPIN: PinOps> OutputPin for ChipSelectPin<CSPIN>
source§impl<CSPIN: PinOps> OutputPin for ChipSelectPin<CSPIN>
impl<CSPIN: PinOps> OutputPin for ChipSelectPin<CSPIN>
§type Error = Infallible
type Error = Infallible
Error type
source§impl<CSPIN: PinOps> StatefulOutputPin for ChipSelectPin<CSPIN>
impl<CSPIN: PinOps> StatefulOutputPin for ChipSelectPin<CSPIN>
source§impl<CSPIN: PinOps> StatefulOutputPin for ChipSelectPin<CSPIN>
impl<CSPIN: PinOps> StatefulOutputPin for ChipSelectPin<CSPIN>
source§impl<CSPIN: PinOps> ToggleableOutputPin for ChipSelectPin<CSPIN>
impl<CSPIN: PinOps> ToggleableOutputPin for ChipSelectPin<CSPIN>
Auto Trait Implementations§
impl<CSPIN> RefUnwindSafe for ChipSelectPin<CSPIN>where
CSPIN: RefUnwindSafe,
impl<CSPIN> Send for ChipSelectPin<CSPIN>where
CSPIN: Send,
impl<CSPIN> Sync for ChipSelectPin<CSPIN>where
CSPIN: Sync,
impl<CSPIN> Unpin for ChipSelectPin<CSPIN>where
CSPIN: Unpin,
impl<CSPIN> UnwindSafe for ChipSelectPin<CSPIN>where
CSPIN: 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