Struct atmega32u4_hal::port::portd::PD7 [−][src]
pub struct PD7<MODE> { /* fields omitted */ }
Pin
Methods
impl<MODE> PD7<MODE>
[src]
impl<MODE> PD7<MODE>
pub fn downgrade(self) -> Pin<MODE>
[src]
pub fn downgrade(self) -> Pin<MODE>
Downgrade this pin into a more generic pin type
This allows storing multiple pins in an array. It does however
come with some runtime overhead, so choose downgrade_port
if
possible.
Note: The mode of downgraded pins can no longer be changed.
pub fn downgrade_port(self) -> PDx<MODE>
[src]
pub fn downgrade_port(self) -> PDx<MODE>
Downgrade this pin into a more type generic over all pins of this port
This allows storing multiple pins of a port in an array
Note: The mode of downgraded pins can no longer be changed.
impl<MODE: Io> PD7<MODE>
[src]
impl<MODE: Io> PD7<MODE>
pub fn into_floating_input<D: PortDDR>(
self,
ddr: &mut D
) -> PD7<Input<Floating>>
[src]
pub fn into_floating_input<D: PortDDR>(
self,
ddr: &mut D
) -> PD7<Input<Floating>>
Turn this pin into a floating input
pub fn into_pull_up_input<D: PortDDR>(self, ddr: &mut D) -> PD7<Input<PullUp>>
[src]
pub fn into_pull_up_input<D: PortDDR>(self, ddr: &mut D) -> PD7<Input<PullUp>>
Turn this pin into a pull up input
pub fn into_output<D: PortDDR>(self, ddr: &mut D) -> PD7<Output>
[src]
pub fn into_output<D: PortDDR>(self, ddr: &mut D) -> PD7<Output>
Turn this pin into an output input
impl PD7<Output>
[src]
impl PD7<Output>
pub fn into_pwm(self, pwm: &mut Timer4Pwm) -> PD7<Pwm<Timer4Pwm>>
[src]
pub fn into_pwm(self, pwm: &mut Timer4Pwm) -> PD7<Pwm<Timer4Pwm>>
Make this pin a PWM pin
Pin needs to be an output pin to be turned into a PWM pin.
Trait Implementations
impl OutputPin for PD7<Output>
[src]
impl OutputPin for PD7<Output>
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 StatefulOutputPin for PD7<Output>
[src]
impl StatefulOutputPin for PD7<Output>
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 Default for PD7<Output>
[src]
impl Default for PD7<Output>
impl<MODE> InputPin for PD7<Input<MODE>>
[src]
impl<MODE> InputPin for PD7<Input<MODE>>
fn is_high(&self) -> bool
[src]
fn is_high(&self) -> bool
Is the input pin high?
fn is_low(&self) -> bool
[src]
fn is_low(&self) -> bool
Is the input pin low?
impl PwmPin for PD7<Pwm<Timer4Pwm>>
[src]
impl PwmPin for PD7<Pwm<Timer4Pwm>>
type Duty = u8
Type for the duty
methods Read more
fn disable(&mut self)
[src]
fn disable(&mut self)
Disables a PWM channel
fn enable(&mut self)
[src]
fn enable(&mut self)
Enables a PWM channel
fn get_duty(&self) -> Self::Duty
[src]
fn get_duty(&self) -> Self::Duty
Returns the current duty cycle
fn get_max_duty(&self) -> Self::Duty
[src]
fn get_max_duty(&self) -> Self::Duty
Returns the maximum duty cycle value
fn set_duty(&mut self, duty: Self::Duty)
[src]
fn set_duty(&mut self, duty: Self::Duty)
Sets a new duty cycle