Struct esp32c3_hal::gpio::GpioPin

source ·
pub struct GpioPin<MODE, const GPIONUM: u8> { /* private fields */ }

Implementations§

source§

impl<MODE, const GPIONUM: u8> GpioPin<MODE, GPIONUM>where GpioPin<MODE, GPIONUM>: GpioProperties,

source

pub fn into_floating_input(self) -> GpioPin<Input<Floating>, GPIONUM>

source

pub fn into_pull_up_input(self) -> GpioPin<Input<PullUp>, GPIONUM>

source

pub fn into_pull_down_input(self) -> GpioPin<Input<PullDown>, GPIONUM>

source§

impl<MODE, const GPIONUM: u8> GpioPin<MODE, GPIONUM>where GpioPin<MODE, GPIONUM>: GpioProperties, <GpioPin<MODE, GPIONUM> as GpioProperties>::PinType: IsOutputPin,

source

pub fn into_push_pull_output(self) -> GpioPin<Output<PushPull>, GPIONUM>

source

pub fn into_open_drain_output(self) -> GpioPin<Output<OpenDrain>, GPIONUM>

source

pub fn into_alternate_1(self) -> GpioPin<Alternate<AF1>, GPIONUM>

source

pub fn into_alternate_2(self) -> GpioPin<Alternate<AF2>, GPIONUM>

source§

impl<MODE, const GPIONUM: u8> GpioPin<MODE, GPIONUM>where GpioPin<MODE, GPIONUM>: GpioProperties, <GpioPin<MODE, GPIONUM> as GpioProperties>::PinType: IsAnalogPin,

source

pub fn into_analog(self) -> GpioPin<Analog, GPIONUM>

source§

impl<MODE> GpioPin<MODE, 0>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 1>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 2>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 3>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 4>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 5>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 6>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 7>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 8>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 9>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 10>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 11>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 12>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 13>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 14>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 15>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 16>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 17>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 18>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 19>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 20>

source

pub fn degrade(self) -> AnyPin<MODE>

source§

impl<MODE> GpioPin<MODE, 21>

source

pub fn degrade(self) -> AnyPin<MODE>

Trait Implementations§

source§

impl Channel<ADC1> for GpioPin<Analog, 0>

§

type ID = u8

Channel ID type Read more
source§

fn channel() -> u8

Get the specific ID that identifies this channel, for example 0_u8 for the first ADC channel, if Self::ID is u8.
source§

impl Channel<ADC1> for GpioPin<Analog, 1>

§

type ID = u8

Channel ID type Read more
source§

fn channel() -> u8

Get the specific ID that identifies this channel, for example 0_u8 for the first ADC channel, if Self::ID is u8.
source§

impl Channel<ADC1> for GpioPin<Analog, 2>

§

type ID = u8

Channel ID type Read more
source§

fn channel() -> u8

Get the specific ID that identifies this channel, for example 0_u8 for the first ADC channel, if Self::ID is u8.
source§

impl Channel<ADC1> for GpioPin<Analog, 3>

§

type ID = u8

Channel ID type Read more
source§

fn channel() -> u8

Get the specific ID that identifies this channel, for example 0_u8 for the first ADC channel, if Self::ID is u8.
source§

impl Channel<ADC1> for GpioPin<Analog, 4>

§

type ID = u8

Channel ID type Read more
source§

fn channel() -> u8

Get the specific ID that identifies this channel, for example 0_u8 for the first ADC channel, if Self::ID is u8.
source§

impl Channel<ADC2> for GpioPin<Analog, 5>

§

type ID = u8

Channel ID type Read more
source§

fn channel() -> u8

Get the specific ID that identifies this channel, for example 0_u8 for the first ADC channel, if Self::ID is u8.
source§

impl<MODE> From<GpioPin<MODE, 0>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 0>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 1>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 1>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 10>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 10>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 11>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 11>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 12>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 12>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 13>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 13>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 14>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 14>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 15>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 15>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 16>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 16>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 17>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 17>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 18>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 18>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 19>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 19>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 2>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 2>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 20>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 20>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 21>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 21>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 3>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 3>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 4>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 4>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 5>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 5>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 6>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 6>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 7>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 7>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 8>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 8>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<MODE> From<GpioPin<MODE, 9>> for AnyPin<MODE>

source§

fn from(value: GpioPin<MODE, 9>) -> AnyPin<MODE>

Converts to this type from the input type.
source§

impl<const GPIONUM: u8> From<GpioPin<Unknown, GPIONUM>> for GpioPin<Analog, GPIONUM>where GpioPin<Analog, GPIONUM>: GpioProperties, <GpioPin<Analog, GPIONUM> as GpioProperties>::PinType: IsAnalogPin, GpioPin<Unknown, GPIONUM>: GpioProperties, <GpioPin<Unknown, GPIONUM> as GpioProperties>::PinType: IsAnalogPin,

source§

fn from(pin: GpioPin<Unknown, GPIONUM>) -> GpioPin<Analog, GPIONUM>

Converts to this type from the input type.
source§

impl<const GPIONUM: u8> From<GpioPin<Unknown, GPIONUM>> for GpioPin<Input<Floating>, GPIONUM>where GpioPin<Input<Floating>, GPIONUM>: GpioProperties, <GpioPin<Input<Floating>, GPIONUM> as GpioProperties>::PinType: IsOutputPin, GpioPin<Unknown, GPIONUM>: GpioProperties,

source§

fn from(pin: GpioPin<Unknown, GPIONUM>) -> GpioPin<Input<Floating>, GPIONUM>

Converts to this type from the input type.
source§

impl<const GPIONUM: u8> From<GpioPin<Unknown, GPIONUM>> for GpioPin<Input<PullDown>, GPIONUM>where GpioPin<Input<PullDown>, GPIONUM>: GpioProperties, <GpioPin<Input<PullDown>, GPIONUM> as GpioProperties>::PinType: IsInputPin, GpioPin<Unknown, GPIONUM>: GpioProperties,

source§

fn from(pin: GpioPin<Unknown, GPIONUM>) -> GpioPin<Input<PullDown>, GPIONUM>

Converts to this type from the input type.
source§

impl<const GPIONUM: u8> From<GpioPin<Unknown, GPIONUM>> for GpioPin<Input<PullUp>, GPIONUM>where GpioPin<Input<PullUp>, GPIONUM>: GpioProperties, <GpioPin<Input<PullUp>, GPIONUM> as GpioProperties>::PinType: IsOutputPin, GpioPin<Unknown, GPIONUM>: GpioProperties,

source§

fn from(pin: GpioPin<Unknown, GPIONUM>) -> GpioPin<Input<PullUp>, GPIONUM>

Converts to this type from the input type.
source§

impl<const GPIONUM: u8> From<GpioPin<Unknown, GPIONUM>> for GpioPin<Output<OpenDrain>, GPIONUM>where GpioPin<Output<OpenDrain>, GPIONUM>: GpioProperties, <GpioPin<Output<OpenDrain>, GPIONUM> as GpioProperties>::PinType: IsOutputPin, GpioPin<Unknown, GPIONUM>: GpioProperties, <GpioPin<Unknown, GPIONUM> as GpioProperties>::PinType: IsOutputPin,

source§

fn from(pin: GpioPin<Unknown, GPIONUM>) -> GpioPin<Output<OpenDrain>, GPIONUM>

Converts to this type from the input type.
source§

impl<const GPIONUM: u8> From<GpioPin<Unknown, GPIONUM>> for GpioPin<Output<PushPull>, GPIONUM>where GpioPin<Output<PushPull>, GPIONUM>: GpioProperties, <GpioPin<Output<PushPull>, GPIONUM> as GpioProperties>::PinType: IsOutputPin, GpioPin<Unknown, GPIONUM>: GpioProperties, <GpioPin<Unknown, GPIONUM> as GpioProperties>::PinType: IsOutputPin,

source§

fn from(pin: GpioPin<Unknown, GPIONUM>) -> GpioPin<Output<PushPull>, GPIONUM>

Converts to this type from the input type.
source§

impl<MODE> GpioProperties for GpioPin<MODE, 0>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio0Signals

§

type PinType = InputOutputAnalogPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 1>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio1Signals

§

type PinType = InputOutputAnalogPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 10>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio10Signals

§

type PinType = InputOutputPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 11>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio11Signals

§

type PinType = InputOutputPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 12>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio12Signals

§

type PinType = InputOutputPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 13>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio13Signals

§

type PinType = InputOutputPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 14>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio14Signals

§

type PinType = InputOutputPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 15>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio15Signals

§

type PinType = InputOutputPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 16>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio16Signals

§

type PinType = InputOutputPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 17>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio17Signals

§

type PinType = InputOutputPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 18>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio18Signals

§

type PinType = InputOutputPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 19>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio19Signals

§

type PinType = InputOutputPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 2>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio2Signals

§

type PinType = InputOutputAnalogPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 20>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio20Signals

§

type PinType = InputOutputPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 21>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio21Signals

§

type PinType = InputOutputPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 3>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio3Signals

§

type PinType = InputOutputAnalogPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 4>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio4Signals

§

type PinType = InputOutputAnalogPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 5>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio5Signals

§

type PinType = InputOutputAnalogPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 6>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio6Signals

§

type PinType = InputOutputPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 7>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio7Signals

§

type PinType = InputOutputPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 8>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio8Signals

§

type PinType = InputOutputPinType

source§

impl<MODE> GpioProperties for GpioPin<MODE, 9>

§

type Bank = Bank0GpioRegisterAccess

§

type InterruptStatus = InterruptStatusRegisterAccessBank0

§

type Signals = Gpio9Signals

§

type PinType = InputOutputPinType

source§

impl<MODE, const GPIONUM: u8> InputPin for GpioPin<Input<MODE>, GPIONUM>where GpioPin<Input<MODE>, GPIONUM>: GpioProperties,

§

type Error = Infallible

Error type
source§

fn is_high( &self ) -> Result<bool, <GpioPin<Input<MODE>, GPIONUM> as InputPin>::Error>

Is the input pin high?
source§

fn is_low( &self ) -> Result<bool, <GpioPin<Input<MODE>, GPIONUM> as InputPin>::Error>

Is the input pin low?
source§

impl<MODE, const GPIONUM: u8> InputPin for GpioPin<MODE, GPIONUM>where GpioPin<MODE, GPIONUM>: GpioProperties,

source§

fn set_to_input(&mut self) -> &mut GpioPin<MODE, GPIONUM>

source§

fn enable_input(&mut self, on: bool) -> &mut GpioPin<MODE, GPIONUM>

source§

fn enable_input_in_sleep_mode( &mut self, on: bool ) -> &mut GpioPin<MODE, GPIONUM>

source§

fn is_input_high(&self) -> bool

source§

fn connect_input_to_peripheral_with_options( &mut self, signal: InputSignal, invert: bool, force_via_gpio_mux: bool ) -> &mut GpioPin<MODE, GPIONUM>

source§

fn disconnect_input_from_peripheral( &mut self, signal: InputSignal ) -> &mut GpioPin<MODE, GPIONUM>

Remove a connected signal from this input pin. Read more
source§

fn connect_input_to_peripheral(&mut self, signal: InputSignal) -> &mut Self

source§

impl<const GPIONUM: u8> InputPin for GpioPin<Output<OpenDrain>, GPIONUM>where GpioPin<Output<OpenDrain>, GPIONUM>: GpioProperties,

§

type Error = Infallible

Error type
source§

fn is_high( &self ) -> Result<bool, <GpioPin<Output<OpenDrain>, GPIONUM> as InputPin>::Error>

Is the input pin high?
source§

fn is_low( &self ) -> Result<bool, <GpioPin<Output<OpenDrain>, GPIONUM> as InputPin>::Error>

Is the input pin low?
source§

impl<MODE, const GPIONUM: u8> OutputPin for GpioPin<MODE, GPIONUM>where GpioPin<MODE, GPIONUM>: GpioProperties, <GpioPin<MODE, GPIONUM> as GpioProperties>::PinType: IsOutputPin,

source§

fn set_to_open_drain_output(&mut self) -> &mut GpioPin<MODE, GPIONUM>

source§

fn set_to_push_pull_output(&mut self) -> &mut GpioPin<MODE, GPIONUM>

source§

fn enable_output(&mut self, on: bool) -> &mut GpioPin<MODE, GPIONUM>

source§

fn set_output_high(&mut self, high: bool) -> &mut GpioPin<MODE, GPIONUM>

source§

fn set_drive_strength( &mut self, strength: DriveStrength ) -> &mut GpioPin<MODE, GPIONUM>

source§

fn enable_open_drain(&mut self, on: bool) -> &mut GpioPin<MODE, GPIONUM>

source§

fn internal_pull_up_in_sleep_mode( &mut self, on: bool ) -> &mut GpioPin<MODE, GPIONUM>

source§

fn internal_pull_down_in_sleep_mode( &mut self, on: bool ) -> &mut GpioPin<MODE, GPIONUM>

source§

fn enable_output_in_sleep_mode( &mut self, on: bool ) -> &mut GpioPin<MODE, GPIONUM>

source§

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, GPIONUM>

source§

fn disconnect_peripheral_from_output(&mut self) -> &mut GpioPin<MODE, GPIONUM>

Remove this output pin from a connected signal. Read more
source§

fn internal_pull_up(&mut self, on: bool) -> &mut GpioPin<MODE, GPIONUM>

source§

fn internal_pull_down(&mut self, on: bool) -> &mut GpioPin<MODE, GPIONUM>

source§

fn connect_peripheral_to_output(&mut self, signal: OutputSignal) -> &mut Self

source§

impl<MODE, const GPIONUM: u8> OutputPin for GpioPin<Output<MODE>, GPIONUM>where GpioPin<Output<MODE>, GPIONUM>: GpioProperties, <GpioPin<Output<MODE>, GPIONUM> as GpioProperties>::PinType: IsOutputPin,

§

type Error = Infallible

Error type
source§

fn set_high( &mut self ) -> Result<(), <GpioPin<Output<MODE>, GPIONUM> as OutputPin>::Error>

Drives the pin high Read more
source§

fn set_low( &mut self ) -> Result<(), <GpioPin<Output<MODE>, GPIONUM> as OutputPin>::Error>

Drives the pin low Read more
§

fn set_state(&mut self, state: PinState) -> Result<(), Self::Error>

Drives the pin high or low depending on the provided value Read more
source§

impl<MODE, const GPIONUM: u8> Peripheral for GpioPin<MODE, GPIONUM>where GpioPin<MODE, GPIONUM>: GpioProperties,

§

type P = GpioPin<MODE, GPIONUM>

Peripheral singleton type
source§

unsafe fn clone_unchecked( &mut self ) -> <GpioPin<MODE, GPIONUM> as Peripheral>::P

Unsafely clone (duplicate) a peripheral singleton. Read more
source§

fn into_ref<'a>(self) -> PeripheralRef<'a, Self::P>where Self: 'a,

Convert a value into a PeripheralRef. Read more
source§

impl<MODE, const GPIONUM: u8> Pin for GpioPin<MODE, GPIONUM>where GpioPin<MODE, GPIONUM>: GpioProperties,

source§

fn number(&self) -> u8

source§

fn sleep_mode(&mut self, on: bool)

source§

fn set_alternate_function(&mut self, alternate: AlternateFunction)

source§

fn listen_with_options( &mut self, event: Event, int_enable: bool, nmi_enable: bool, wake_up_from_light_sleep: bool )

source§

fn is_listening(&self) -> bool

source§

fn unlisten(&mut self)

source§

fn clear_interrupt(&mut self)

source§

fn is_pcore_interrupt_set(&self) -> bool

source§

fn is_pcore_non_maskable_interrupt_set(&self) -> bool

source§

fn is_acore_interrupt_set(&self) -> bool

source§

fn is_acore_non_maskable_interrupt_set(&self) -> bool

source§

fn enable_hold(&mut self, _on: bool)

source§

fn listen(&mut self, event: Event)

source§

impl<MODE, const GPIONUM: u8> StatefulOutputPin for GpioPin<Output<MODE>, GPIONUM>where GpioPin<Output<MODE>, GPIONUM>: GpioProperties, <GpioPin<Output<MODE>, GPIONUM> as GpioProperties>::PinType: IsOutputPin,

source§

fn is_set_high( &self ) -> Result<bool, <GpioPin<Output<MODE>, GPIONUM> as OutputPin>::Error>

Is the pin in drive high mode? Read more
source§

fn is_set_low( &self ) -> Result<bool, <GpioPin<Output<MODE>, GPIONUM> as OutputPin>::Error>

Is the pin in drive low mode? Read more
source§

impl<MODE, const GPIONUM: u8> ToggleableOutputPin for GpioPin<Output<MODE>, GPIONUM>where GpioPin<Output<MODE>, GPIONUM>: GpioProperties, <GpioPin<Output<MODE>, GPIONUM> as GpioProperties>::PinType: IsOutputPin,

§

type Error = Infallible

Error type
source§

fn toggle( &mut self ) -> Result<(), <GpioPin<Output<MODE>, GPIONUM> as ToggleableOutputPin>::Error>

Toggle pin output.
source§

impl<MODE> TryInto<GpioPin<MODE, 0>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 0>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 0>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 1>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 1>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 1>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 10>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 10>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 10>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 11>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 11>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 11>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 12>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 12>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 12>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 13>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 13>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 13>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 14>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 14>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 14>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 15>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 15>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 15>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 16>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 16>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 16>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 17>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 17>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 17>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 18>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 18>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 18>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 19>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 19>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 19>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 2>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 2>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 2>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 20>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 20>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 20>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 21>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 21>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 21>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 3>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 3>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 3>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 4>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 4>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 4>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 5>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 5>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 5>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 6>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 6>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 6>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 7>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 7>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 7>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 8>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 8>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 8>>>::Error>

Performs the conversion.
source§

impl<MODE> TryInto<GpioPin<MODE, 9>> for AnyPin<MODE>

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<GpioPin<MODE, 9>, <AnyPin<MODE> as TryInto<GpioPin<MODE, 9>>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<MODE, const GPIONUM: u8> RefUnwindSafe for GpioPin<MODE, GPIONUM>where MODE: RefUnwindSafe,

§

impl<MODE, const GPIONUM: u8> Send for GpioPin<MODE, GPIONUM>where MODE: Send,

§

impl<MODE, const GPIONUM: u8> Sync for GpioPin<MODE, GPIONUM>where MODE: Sync,

§

impl<MODE, const GPIONUM: u8> Unpin for GpioPin<MODE, GPIONUM>where MODE: Unpin,

§

impl<MODE, const GPIONUM: u8> UnwindSafe for GpioPin<MODE, GPIONUM>where MODE: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.