Struct esp32c3_hal::gpio::GpioPin
source · pub struct GpioPin<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8>where
RA: BankGpioRegisterAccess,
IRA: InteruptStatusRegisterAccess,
PINTYPE: PinType,
SIG: GpioSignal,{ /* private fields */ }
Implementations§
source§impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>where
RA: BankGpioRegisterAccess,
IRA: InteruptStatusRegisterAccess,
PINTYPE: PinType,
SIG: GpioSignal,
impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>where RA: BankGpioRegisterAccess, IRA: InteruptStatusRegisterAccess, PINTYPE: PinType, SIG: GpioSignal,
pub fn into_floating_input( self ) -> GpioPin<Input<Floating>, RA, IRA, PINTYPE, SIG, GPIONUM>
pub fn into_pull_up_input( self ) -> GpioPin<Input<PullUp>, RA, IRA, PINTYPE, SIG, GPIONUM>
pub fn into_pull_down_input( self ) -> GpioPin<Input<PullDown>, RA, IRA, PINTYPE, SIG, GPIONUM>
source§impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>where
RA: BankGpioRegisterAccess,
IRA: InteruptStatusRegisterAccess,
PINTYPE: IsOutputPin,
SIG: GpioSignal,
impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>where RA: BankGpioRegisterAccess, IRA: InteruptStatusRegisterAccess, PINTYPE: IsOutputPin, SIG: GpioSignal,
pub fn into_push_pull_output( self ) -> GpioPin<Output<PushPull>, RA, IRA, PINTYPE, SIG, GPIONUM>
pub fn into_open_drain_output( self ) -> GpioPin<Output<OpenDrain>, RA, IRA, PINTYPE, SIG, GPIONUM>
pub fn into_alternate_1( self ) -> GpioPin<Alternate<AF1>, RA, IRA, PINTYPE, SIG, GPIONUM>
pub fn into_alternate_2( self ) -> GpioPin<Alternate<AF2>, RA, IRA, PINTYPE, SIG, GPIONUM>
Trait Implementations§
source§impl<RA, IRA, PINTYPE, SIG, const GPIONUM: u8> From<GpioPin<Unknown, RA, IRA, PINTYPE, SIG, GPIONUM>> for GpioPin<Input<Floating>, RA, IRA, PINTYPE, SIG, GPIONUM>where
RA: BankGpioRegisterAccess,
IRA: InteruptStatusRegisterAccess,
PINTYPE: IsOutputPin,
SIG: GpioSignal,
impl<RA, IRA, PINTYPE, SIG, const GPIONUM: u8> From<GpioPin<Unknown, RA, IRA, PINTYPE, SIG, GPIONUM>> for GpioPin<Input<Floating>, RA, IRA, PINTYPE, SIG, GPIONUM>where RA: BankGpioRegisterAccess, IRA: InteruptStatusRegisterAccess, PINTYPE: IsOutputPin, SIG: GpioSignal,
source§impl<RA, IRA, PINTYPE, SIG, const GPIONUM: u8> From<GpioPin<Unknown, RA, IRA, PINTYPE, SIG, GPIONUM>> for GpioPin<Input<PullDown>, RA, IRA, PINTYPE, SIG, GPIONUM>where
RA: BankGpioRegisterAccess,
IRA: InteruptStatusRegisterAccess,
PINTYPE: IsInputPin,
SIG: GpioSignal,
impl<RA, IRA, PINTYPE, SIG, const GPIONUM: u8> From<GpioPin<Unknown, RA, IRA, PINTYPE, SIG, GPIONUM>> for GpioPin<Input<PullDown>, RA, IRA, PINTYPE, SIG, GPIONUM>where RA: BankGpioRegisterAccess, IRA: InteruptStatusRegisterAccess, PINTYPE: IsInputPin, SIG: GpioSignal,
source§impl<RA, IRA, PINTYPE, SIG, const GPIONUM: u8> From<GpioPin<Unknown, RA, IRA, PINTYPE, SIG, GPIONUM>> for GpioPin<Input<PullUp>, RA, IRA, PINTYPE, SIG, GPIONUM>where
RA: BankGpioRegisterAccess,
IRA: InteruptStatusRegisterAccess,
PINTYPE: IsOutputPin,
SIG: GpioSignal,
impl<RA, IRA, PINTYPE, SIG, const GPIONUM: u8> From<GpioPin<Unknown, RA, IRA, PINTYPE, SIG, GPIONUM>> for GpioPin<Input<PullUp>, RA, IRA, PINTYPE, SIG, GPIONUM>where RA: BankGpioRegisterAccess, IRA: InteruptStatusRegisterAccess, PINTYPE: IsOutputPin, SIG: GpioSignal,
source§impl<RA, IRA, PINTYPE, SIG, const GPIONUM: u8> From<GpioPin<Unknown, RA, IRA, PINTYPE, SIG, GPIONUM>> for GpioPin<Output<OpenDrain>, RA, IRA, PINTYPE, SIG, GPIONUM>where
RA: BankGpioRegisterAccess,
IRA: InteruptStatusRegisterAccess,
PINTYPE: IsOutputPin,
SIG: GpioSignal,
impl<RA, IRA, PINTYPE, SIG, const GPIONUM: u8> From<GpioPin<Unknown, RA, IRA, PINTYPE, SIG, GPIONUM>> for GpioPin<Output<OpenDrain>, RA, IRA, PINTYPE, SIG, GPIONUM>where RA: BankGpioRegisterAccess, IRA: InteruptStatusRegisterAccess, PINTYPE: IsOutputPin, SIG: GpioSignal,
source§impl<RA, IRA, PINTYPE, SIG, const GPIONUM: u8> From<GpioPin<Unknown, RA, IRA, PINTYPE, SIG, GPIONUM>> for GpioPin<Output<PushPull>, RA, IRA, PINTYPE, SIG, GPIONUM>where
RA: BankGpioRegisterAccess,
IRA: InteruptStatusRegisterAccess,
PINTYPE: IsOutputPin,
SIG: GpioSignal,
impl<RA, IRA, PINTYPE, SIG, const GPIONUM: u8> From<GpioPin<Unknown, RA, IRA, PINTYPE, SIG, GPIONUM>> for GpioPin<Output<PushPull>, RA, IRA, PINTYPE, SIG, GPIONUM>where RA: BankGpioRegisterAccess, IRA: InteruptStatusRegisterAccess, PINTYPE: IsOutputPin, SIG: GpioSignal,
source§impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> InputPin for GpioPin<Input<MODE>, RA, IRA, PINTYPE, SIG, GPIONUM>where
RA: BankGpioRegisterAccess,
IRA: InteruptStatusRegisterAccess,
PINTYPE: PinType,
SIG: GpioSignal,
impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> InputPin for GpioPin<Input<MODE>, RA, IRA, PINTYPE, SIG, GPIONUM>where RA: BankGpioRegisterAccess, IRA: InteruptStatusRegisterAccess, PINTYPE: PinType, SIG: GpioSignal,
source§impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> InputPin for GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>where
RA: BankGpioRegisterAccess,
IRA: InteruptStatusRegisterAccess,
PINTYPE: PinType,
SIG: GpioSignal,
impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> InputPin for GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>where RA: BankGpioRegisterAccess, IRA: InteruptStatusRegisterAccess, PINTYPE: PinType, SIG: GpioSignal,
fn set_to_input(&mut self) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn enable_input( &mut self, on: bool ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn enable_input_in_sleep_mode( &mut self, on: bool ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn is_input_high(&self) -> bool
fn connect_input_to_peripheral_with_options( &mut self, signal: InputSignal, invert: bool, force_via_gpio_mux: bool ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
source§fn disconnect_input_from_peripheral(
&mut self,
signal: InputSignal
) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn disconnect_input_from_peripheral( &mut self, signal: InputSignal ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
Remove a connected
signal
from this input pin. Read morefn connect_input_to_peripheral(&mut self, signal: InputSignal) -> &mut Self
source§impl<RA, IRA, PINTYPE, SIG, const GPIONUM: u8> InputPin for GpioPin<Output<OpenDrain>, RA, IRA, PINTYPE, SIG, GPIONUM>where
RA: BankGpioRegisterAccess,
IRA: InteruptStatusRegisterAccess,
PINTYPE: PinType,
SIG: GpioSignal,
impl<RA, IRA, PINTYPE, SIG, const GPIONUM: u8> InputPin for GpioPin<Output<OpenDrain>, RA, IRA, PINTYPE, SIG, GPIONUM>where RA: BankGpioRegisterAccess, IRA: InteruptStatusRegisterAccess, PINTYPE: PinType, SIG: GpioSignal,
source§impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> OutputPin for GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>where
RA: BankGpioRegisterAccess,
IRA: InteruptStatusRegisterAccess,
PINTYPE: IsOutputPin,
SIG: GpioSignal,
impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> OutputPin for GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>where RA: BankGpioRegisterAccess, IRA: InteruptStatusRegisterAccess, PINTYPE: IsOutputPin, SIG: GpioSignal,
fn set_to_open_drain_output( &mut self ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn set_to_push_pull_output( &mut self ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn enable_output( &mut self, on: bool ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn set_output_high( &mut self, high: bool ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn set_drive_strength( &mut self, strength: DriveStrength ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn enable_open_drain( &mut self, on: bool ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn internal_pull_up_in_sleep_mode( &mut self, on: bool ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn internal_pull_down_in_sleep_mode( &mut self, on: bool ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn enable_output_in_sleep_mode( &mut self, on: bool ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn connect_peripheral_to_output_with_options( &mut self, signal: OutputSignal, invert: bool, invert_enable: bool, enable_from_gpio: bool, force_via_gpio_mux: bool ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
source§fn disconnect_peripheral_from_output(
&mut self
) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn disconnect_peripheral_from_output( &mut self ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn internal_pull_up( &mut self, on: bool ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn internal_pull_down( &mut self, on: bool ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn connect_peripheral_to_output(&mut self, signal: OutputSignal) -> &mut Self
source§impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> OutputPin for GpioPin<Output<MODE>, RA, IRA, PINTYPE, SIG, GPIONUM>where
RA: BankGpioRegisterAccess,
IRA: InteruptStatusRegisterAccess,
PINTYPE: IsOutputPin,
SIG: GpioSignal,
impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> OutputPin for GpioPin<Output<MODE>, RA, IRA, PINTYPE, SIG, GPIONUM>where RA: BankGpioRegisterAccess, IRA: InteruptStatusRegisterAccess, PINTYPE: IsOutputPin, SIG: GpioSignal,
§type Error = Infallible
type Error = Infallible
Error type
source§fn set_high(
&mut self
) -> Result<(), <GpioPin<Output<MODE>, RA, IRA, PINTYPE, SIG, GPIONUM> as OutputPin>::Error>
fn set_high( &mut self ) -> Result<(), <GpioPin<Output<MODE>, RA, IRA, PINTYPE, SIG, GPIONUM> as OutputPin>::Error>
Drives the pin high Read more
source§impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> Peripheral for GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>where
RA: BankGpioRegisterAccess,
IRA: InteruptStatusRegisterAccess,
PINTYPE: PinType,
SIG: GpioSignal,
impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> Peripheral for GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>where RA: BankGpioRegisterAccess, IRA: InteruptStatusRegisterAccess, PINTYPE: PinType, SIG: GpioSignal,
source§unsafe fn clone_unchecked(
&mut self
) -> <GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM> as Peripheral>::P
unsafe fn clone_unchecked( &mut self ) -> <GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM> as Peripheral>::P
Unsafely clone (duplicate) a peripheral singleton. Read more
source§impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> Pin for GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>where
RA: BankGpioRegisterAccess,
IRA: InteruptStatusRegisterAccess,
PINTYPE: PinType,
SIG: GpioSignal,
impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> Pin for GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>where RA: BankGpioRegisterAccess, IRA: InteruptStatusRegisterAccess, PINTYPE: PinType, SIG: GpioSignal,
fn number(&self) -> u8
fn sleep_mode( &mut self, on: bool ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn set_alternate_function( &mut self, alternate: AlternateFunction ) -> &mut GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>
fn listen_with_options( &mut self, event: Event, int_enable: bool, nmi_enable: bool, wake_up_from_light_sleep: bool )
fn is_listening(&self) -> bool
fn unlisten(&mut self)
fn clear_interrupt(&mut self)
fn is_pcore_interrupt_set(&self) -> bool
fn is_pcore_non_maskable_interrupt_set(&self) -> bool
fn is_acore_interrupt_set(&self) -> bool
fn is_acore_non_maskable_interrupt_set(&self) -> bool
fn enable_hold(&mut self, _on: bool)
fn listen(&mut self, event: Event)
source§impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> StatefulOutputPin for GpioPin<Output<MODE>, RA, IRA, PINTYPE, SIG, GPIONUM>where
RA: BankGpioRegisterAccess,
IRA: InteruptStatusRegisterAccess,
PINTYPE: IsOutputPin,
SIG: GpioSignal,
impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> StatefulOutputPin for GpioPin<Output<MODE>, RA, IRA, PINTYPE, SIG, GPIONUM>where RA: BankGpioRegisterAccess, IRA: InteruptStatusRegisterAccess, PINTYPE: IsOutputPin, SIG: GpioSignal,
Auto Trait Implementations§
impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> RefUnwindSafe for GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>where IRA: RefUnwindSafe, MODE: RefUnwindSafe, PINTYPE: RefUnwindSafe, RA: RefUnwindSafe, SIG: RefUnwindSafe,
impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> Send for GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>where IRA: Send, MODE: Send, PINTYPE: Send, RA: Send, SIG: Send,
impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> Sync for GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>where IRA: Sync, MODE: Sync, PINTYPE: Sync, RA: Sync, SIG: Sync,
impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> Unpin for GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>where IRA: Unpin, MODE: Unpin, PINTYPE: Unpin, RA: Unpin, SIG: Unpin,
impl<MODE, RA, IRA, PINTYPE, SIG, const GPIONUM: u8> UnwindSafe for GpioPin<MODE, RA, IRA, PINTYPE, SIG, GPIONUM>where IRA: UnwindSafe, MODE: UnwindSafe, PINTYPE: UnwindSafe, RA: UnwindSafe, SIG: 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