Struct alt_stm32f30x_hal::gpio::gpioc::PC2 [−][src]
Pin
Methods
impl<PT: PullType, PM: PinMode> PC2<PT, PM>
[src]
impl<PT: PullType, PM: PinMode> PC2<PT, PM>
pub fn downgrade(self) -> PCx<PT, PM>
[src]
pub fn downgrade(self) -> PCx<PT, PM>
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) -> PC2<NPT, PM>
[src]
pub fn pull_type<NPT: PullType>(self, pt: NPT) -> PC2<NPT, PM>
Sets pull type: Floaing, PullUp, PullDown
pub fn input(self) -> PC2<PT, Input>
[src]
pub fn input(self) -> PC2<PT, Input>
Sets io_mode to input
pub fn analog(self) -> PC2<PT, Analog>
[src]
pub fn analog(self) -> PC2<PT, Analog>
Sets io_mode to analog
pub fn output(self) -> PC2<PT, Output<PushPull, LowSpeed>>
[src]
pub fn output(self) -> PC2<PT, Output<PushPull, LowSpeed>>
Set io_mode to output
pub fn alternating<AFN: AltFnNum>(
self,
af: AFN
) -> PC2<PT, AltFn<AFN, PushPull, LowSpeed>>
[src]
pub fn alternating<AFN: AltFnNum>(
self,
af: AFN
) -> PC2<PT, AltFn<AFN, PushPull, LowSpeed>>
Set io_mode to altfn and set alternating function
impl<PT: PullType, OT: OutputType, OS: OutputSpeed> PC2<PT, Output<OT, OS>>
[src]
impl<PT: PullType, OT: OutputType, OS: OutputSpeed> PC2<PT, Output<OT, OS>>
pub fn output_type<NOT: OutputType>(self, ot: NOT) -> PC2<PT, Output<NOT, OS>>
[src]
pub fn output_type<NOT: OutputType>(self, ot: NOT) -> PC2<PT, Output<NOT, OS>>
Set output type
pub fn output_speed<NOS: OutputSpeed>(self, os: NOS) -> PC2<PT, Output<OT, NOS>>
[src]
pub fn output_speed<NOS: OutputSpeed>(self, os: NOS) -> PC2<PT, Output<OT, NOS>>
Set output speed
impl<PT: PullType, AFN: AltFnNum, OT: OutputType, OS: OutputSpeed> PC2<PT, AltFn<AFN, OT, OS>>
[src]
impl<PT: PullType, AFN: AltFnNum, OT: OutputType, OS: OutputSpeed> PC2<PT, AltFn<AFN, OT, OS>>
pub fn output_type<NOT: OutputType>(
self,
ot: NOT
) -> PC2<PT, AltFn<AFN, NOT, OS>>
[src]
pub fn output_type<NOT: OutputType>(
self,
ot: NOT
) -> PC2<PT, AltFn<AFN, NOT, OS>>
Set output type
pub fn output_speed<NOS: OutputSpeed>(
self,
os: NOS
) -> PC2<PT, AltFn<AFN, OT, NOS>>
[src]
pub fn output_speed<NOS: OutputSpeed>(
self,
os: NOS
) -> PC2<PT, AltFn<AFN, OT, NOS>>
Set output speed
pub fn alt_fn<NAFN: AltFnNum>(self, af: NAFN) -> PC2<PT, AltFn<NAFN, OT, OS>>
[src]
pub fn alt_fn<NAFN: AltFnNum>(self, af: NAFN) -> PC2<PT, AltFn<NAFN, OT, OS>>
Set altfn
Trait Implementations
impl<PT: PullType, PM: PinMode> GPIOPin for PC2<PT, PM>
[src]
impl<PT: PullType, PM: PinMode> GPIOPin for PC2<PT, PM>
impl<PT: PullType, OT: OutputType, OS: OutputSpeed> OutputPin for PC2<PT, Output<OT, OS>>
[src]
impl<PT: PullType, OT: OutputType, OS: OutputSpeed> OutputPin for PC2<PT, Output<OT, OS>>
fn set_high(&mut self)
[src]
fn set_high(&mut self)
Drives the pin high Read more
fn set_low(&mut self)
[src]
fn set_low(&mut self)
Drives the pin low Read more
impl<PT: PullType, OT: OutputType, OS: OutputSpeed> StatefulOutputPin for PC2<PT, Output<OT, OS>>
[src]
impl<PT: PullType, OT: OutputType, OS: OutputSpeed> StatefulOutputPin for PC2<PT, Output<OT, OS>>
fn is_set_high(&self) -> bool
[src]
fn is_set_high(&self) -> bool
Is the pin in drive high mode? Read more
fn is_set_low(&self) -> bool
[src]
fn is_set_low(&self) -> bool
Is the pin in drive low mode? Read more
impl<PT: PullType, OT: OutputType, OS: OutputSpeed> Default for PC2<PT, Output<OT, OS>>
[src]
impl<PT: PullType, OT: OutputType, OS: OutputSpeed> Default for PC2<PT, Output<OT, OS>>
impl<PT: PullType> InputPin for PC2<PT, Input>
[src]
impl<PT: PullType> InputPin for PC2<PT, Input>