[−][src]Struct alt_stm32f30x_hal::gpio::PD5
Pin
Implementations
impl<PT: PullType, PM: PinMode> PD5<PT, PM>
[src]
pub fn downgrade(self) -> PDx<PT, PM>
[src]
Erases the pin number from the type
This is useful when you want to collect the pins into an array where you need all the elements to have the same type
pub fn pull_type<NPT: PullType>(self, pt: NPT) -> PD5<NPT, PM>
[src]
Sets pull type: Floaing, PullUp, PullDown
pub fn input(self) -> PD5<PT, Input>
[src]
Sets io_mode to input
pub fn analog(self) -> PD5<PT, Analog>
[src]
Sets io_mode to analog
pub fn output(self) -> PD5<PT, Output<PushPull, LowSpeed>>
[src]
Set io_mode to output
pub fn alternating<AFN: AltFnNum>(
self,
af: AFN
) -> PD5<PT, AltFn<AFN, PushPull, LowSpeed>>
[src]
self,
af: AFN
) -> PD5<PT, AltFn<AFN, PushPull, LowSpeed>>
Set io_mode to altfn and set alternating function
impl<PT: PullType, OT: OutputType, OS: OutputSpeed> PD5<PT, Output<OT, OS>>
[src]
pub fn output_type<NOT: OutputType>(self, ot: NOT) -> PD5<PT, Output<NOT, OS>>
[src]
Set output type
pub fn push_pull(self) -> PD5<PT, Output<PushPull, OS>>
[src]
Set output type to PushPull
pub fn open_drain(self) -> PD5<PT, Output<OpenDrain, OS>>
[src]
Set output type to OpenDrain
pub fn output_speed<NOS: OutputSpeed>(self, os: NOS) -> PD5<PT, Output<OT, NOS>>
[src]
Set output speed
impl<PT: PullType, AFN: AltFnNum, OT: OutputType, OS: OutputSpeed> PD5<PT, AltFn<AFN, OT, OS>>
[src]
pub fn output_type<NOT: OutputType>(
self,
ot: NOT
) -> PD5<PT, AltFn<AFN, NOT, OS>>
[src]
self,
ot: NOT
) -> PD5<PT, AltFn<AFN, NOT, OS>>
Set output type
pub fn output_speed<NOS: OutputSpeed>(
self,
os: NOS
) -> PD5<PT, AltFn<AFN, OT, NOS>>
[src]
self,
os: NOS
) -> PD5<PT, AltFn<AFN, OT, NOS>>
Set output speed
pub fn alt_fn<NAFN: AltFnNum>(self, af: NAFN) -> PD5<PT, AltFn<NAFN, OT, OS>>
[src]
Set altfn
Trait Implementations
impl<PT: PullType, OT: OutputType, OS: OutputSpeed> Default for PD5<PT, Output<OT, OS>>
[src]
impl<PT: PullType, PM: PinMode> GPIOPin for PD5<PT, PM>
[src]
impl<PT: PullType> InputPin for PD5<PT, Input>
[src]
impl<PT: PullType, OT: OutputType, OS: OutputSpeed> OutputPin for PD5<PT, Output<OT, OS>>
[src]
impl<PT: PullType, AN: AltFnNum, OT: OutputType, OS: OutputSpeed> OutputPin for PD5<PT, AltFn<AN, OT, OS>>
[src]
impl<PT: PullType, PM: PinMode> SerialExt<USART2, PD5<PT, PM>, PA15<PT, PM>, PD5<PT, AltFn<AF7, PushPull, HighSpeed>>, PA15<PT, AltFn<AF7, PushPull, HighSpeed>>> for USART2
[src]
pub fn serial(
self,
pins: (PD5<PT, PM>, PA15<PT, PM>),
baud_rate: Bps<u32>,
clocks: Clocks
) -> Serial<USART2, (PD5<PT, AltFn<AF7, PushPull, HighSpeed>>, PA15<PT, AltFn<AF7, PushPull, HighSpeed>>)>
[src]
self,
pins: (PD5<PT, PM>, PA15<PT, PM>),
baud_rate: Bps<u32>,
clocks: Clocks
) -> Serial<USART2, (PD5<PT, AltFn<AF7, PushPull, HighSpeed>>, PA15<PT, AltFn<AF7, PushPull, HighSpeed>>)>
impl<PT: PullType, PM: PinMode> SerialExt<USART2, PD5<PT, PM>, PA3<PT, PM>, PD5<PT, AltFn<AF7, PushPull, HighSpeed>>, PA3<PT, AltFn<AF7, PushPull, HighSpeed>>> for USART2
[src]
pub fn serial(
self,
pins: (PD5<PT, PM>, PA3<PT, PM>),
baud_rate: Bps<u32>,
clocks: Clocks
) -> Serial<USART2, (PD5<PT, AltFn<AF7, PushPull, HighSpeed>>, PA3<PT, AltFn<AF7, PushPull, HighSpeed>>)>
[src]
self,
pins: (PD5<PT, PM>, PA3<PT, PM>),
baud_rate: Bps<u32>,
clocks: Clocks
) -> Serial<USART2, (PD5<PT, AltFn<AF7, PushPull, HighSpeed>>, PA3<PT, AltFn<AF7, PushPull, HighSpeed>>)>
impl<PT: PullType, PM: PinMode> SerialExt<USART2, PD5<PT, PM>, PB4<PT, PM>, PD5<PT, AltFn<AF7, PushPull, HighSpeed>>, PB4<PT, AltFn<AF7, PushPull, HighSpeed>>> for USART2
[src]
pub fn serial(
self,
pins: (PD5<PT, PM>, PB4<PT, PM>),
baud_rate: Bps<u32>,
clocks: Clocks
) -> Serial<USART2, (PD5<PT, AltFn<AF7, PushPull, HighSpeed>>, PB4<PT, AltFn<AF7, PushPull, HighSpeed>>)>
[src]
self,
pins: (PD5<PT, PM>, PB4<PT, PM>),
baud_rate: Bps<u32>,
clocks: Clocks
) -> Serial<USART2, (PD5<PT, AltFn<AF7, PushPull, HighSpeed>>, PB4<PT, AltFn<AF7, PushPull, HighSpeed>>)>
impl<PT: PullType, PM: PinMode> SerialExt<USART2, PD5<PT, PM>, PD6<PT, PM>, PD5<PT, AltFn<AF7, PushPull, HighSpeed>>, PD6<PT, AltFn<AF7, PushPull, HighSpeed>>> for USART2
[src]
pub fn serial(
self,
pins: (PD5<PT, PM>, PD6<PT, PM>),
baud_rate: Bps<u32>,
clocks: Clocks
) -> Serial<USART2, (PD5<PT, AltFn<AF7, PushPull, HighSpeed>>, PD6<PT, AltFn<AF7, PushPull, HighSpeed>>)>
[src]
self,
pins: (PD5<PT, PM>, PD6<PT, PM>),
baud_rate: Bps<u32>,
clocks: Clocks
) -> Serial<USART2, (PD5<PT, AltFn<AF7, PushPull, HighSpeed>>, PD6<PT, AltFn<AF7, PushPull, HighSpeed>>)>
impl<PT: PullType, OT: OutputType, OS: OutputSpeed> StatefulOutputPin for PD5<PT, Output<OT, OS>>
[src]
pub fn is_set_high(&self) -> bool
[src]
pub fn is_set_low(&self) -> bool
[src]
Auto Trait Implementations
impl<PT, PM> Send for PD5<PT, PM> where
PM: Send,
PT: Send,
[src]
PM: Send,
PT: Send,
impl<PT, PM> Sync for PD5<PT, PM> where
PM: Sync,
PT: Sync,
[src]
PM: Sync,
PT: Sync,
impl<PT, PM> Unpin for PD5<PT, PM> where
PM: Unpin,
PT: Unpin,
[src]
PM: Unpin,
PT: 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> InputPin for T where
T: InputPin,
[src]
T: InputPin,
type Error = ()
Error type
pub fn is_low(&self) -> Result<bool, <T as InputPin>::Error>
[src]
pub fn is_high(&self) -> Result<bool, <T as InputPin>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> OutputPin for T where
T: OutputPin,
[src]
T: OutputPin,
type Error = ()
Error type
pub fn set_low(&mut self) -> Result<(), <T as OutputPin>::Error>
[src]
pub fn set_high(&mut self) -> Result<(), <T as OutputPin>::Error>
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> StatefulOutputPin for T where
T: StatefulOutputPin + OutputPin,
[src]
T: StatefulOutputPin + OutputPin,
pub fn is_set_low(&self) -> Result<bool, <T as OutputPin>::Error>
[src]
pub fn is_set_high(&self) -> Result<bool, <T as OutputPin>::Error>
[src]
impl<P> ToggleableOutputPin for P where
P: Default,
[src]
P: Default,
type Error = <P as OutputPin>::Error
Error type
pub fn toggle(&mut self) -> Result<(), <P as ToggleableOutputPin>::Error>
[src]
Toggle pin output
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>,