Struct atmega_hal::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> ErrorType for ChipSelectPin<CSPIN>where
CSPIN: PinOps,
impl<CSPIN> ErrorType for ChipSelectPin<CSPIN>where
CSPIN: PinOps,
§type Error = Infallible
type Error = Infallible
Error type
source§impl<CSPIN> OutputPin for ChipSelectPin<CSPIN>where
CSPIN: PinOps,
impl<CSPIN> OutputPin for ChipSelectPin<CSPIN>where
CSPIN: PinOps,
source§impl<CSPIN> OutputPin for ChipSelectPin<CSPIN>where
CSPIN: PinOps,
impl<CSPIN> OutputPin for ChipSelectPin<CSPIN>where
CSPIN: PinOps,
source§impl<CSPIN> StatefulOutputPin for ChipSelectPin<CSPIN>where
CSPIN: PinOps,
impl<CSPIN> StatefulOutputPin for ChipSelectPin<CSPIN>where
CSPIN: PinOps,
source§fn is_set_low(&self) -> Result<bool, <ChipSelectPin<CSPIN> as OutputPin>::Error>
fn is_set_low(&self) -> Result<bool, <ChipSelectPin<CSPIN> as OutputPin>::Error>
Is the pin in drive low mode? Read more
source§fn is_set_high(
&self
) -> Result<bool, <ChipSelectPin<CSPIN> as OutputPin>::Error>
fn is_set_high( &self ) -> Result<bool, <ChipSelectPin<CSPIN> as OutputPin>::Error>
Is the pin in drive high mode? Read more
source§impl<CSPIN> StatefulOutputPin for ChipSelectPin<CSPIN>where
CSPIN: PinOps,
impl<CSPIN> StatefulOutputPin for ChipSelectPin<CSPIN>where
CSPIN: PinOps,
source§fn is_set_high(
&mut self
) -> Result<bool, <ChipSelectPin<CSPIN> as ErrorType>::Error>
fn is_set_high( &mut self ) -> Result<bool, <ChipSelectPin<CSPIN> as ErrorType>::Error>
Is the pin in drive high mode? Read more
source§fn is_set_low(
&mut self
) -> Result<bool, <ChipSelectPin<CSPIN> as ErrorType>::Error>
fn is_set_low( &mut self ) -> Result<bool, <ChipSelectPin<CSPIN> as ErrorType>::Error>
Is the pin in drive low mode? Read more
source§impl<CSPIN> ToggleableOutputPin for ChipSelectPin<CSPIN>where
CSPIN: PinOps,
impl<CSPIN> ToggleableOutputPin for ChipSelectPin<CSPIN>where
CSPIN: PinOps,
§type Error = Infallible
type Error = Infallible
Error type
source§fn toggle(
&mut self
) -> Result<(), <ChipSelectPin<CSPIN> as ToggleableOutputPin>::Error>
fn toggle( &mut self ) -> Result<(), <ChipSelectPin<CSPIN> as ToggleableOutputPin>::Error>
Toggle pin output.
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