Struct atmega32u4_hal::port::portb::PB6 [−][src]
pub struct PB6<MODE> { /* fields omitted */ }
Pin
Methods
impl<MODE> PB6<MODE>
[src]
impl<MODE> PB6<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) -> PBx<MODE>
[src]
pub fn downgrade_port(self) -> PBx<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> PB6<MODE>
[src]
impl<MODE: Io> PB6<MODE>
pub fn into_floating_input<D: PortDDR>(
self,
ddr: &mut D
) -> PB6<Input<Floating>>
[src]
pub fn into_floating_input<D: PortDDR>(
self,
ddr: &mut D
) -> PB6<Input<Floating>>
Turn this pin into a floating input
pub fn into_pull_up_input<D: PortDDR>(self, ddr: &mut D) -> PB6<Input<PullUp>>
[src]
pub fn into_pull_up_input<D: PortDDR>(self, ddr: &mut D) -> PB6<Input<PullUp>>
Turn this pin into a pull up input
pub fn into_output<D: PortDDR>(self, ddr: &mut D) -> PB6<Output>
[src]
pub fn into_output<D: PortDDR>(self, ddr: &mut D) -> PB6<Output>
Turn this pin into an output input
impl PB6<Output>
[src]
impl PB6<Output>
pub fn into_pwm(self, pwm: &mut Timer1Pwm) -> PB6<Pwm<Timer1Pwm>>
[src]
pub fn into_pwm(self, pwm: &mut Timer1Pwm) -> PB6<Pwm<Timer1Pwm>>
Make this pin a PWM pin
Pin needs to be an output pin to be turned into a PWM pin.
impl PB6<Output>
[src]
impl PB6<Output>
pub fn into_pwm4(self, pwm: &mut Timer4Pwm) -> PB6<Pwm<Timer4Pwm>>
[src]
pub fn into_pwm4(self, pwm: &mut Timer4Pwm) -> PB6<Pwm<Timer4Pwm>>
Make this pin a PWM pin, but using Timer4 instead of Timer1
PB6
can be PWM'd by both Timer1 and Timer4.
Trait Implementations
impl OutputPin for PB6<Output>
[src]
impl OutputPin for PB6<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 PB6<Output>
[src]
impl StatefulOutputPin for PB6<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 PB6<Output>
[src]
impl Default for PB6<Output>
impl<MODE> InputPin for PB6<Input<MODE>>
[src]
impl<MODE> InputPin for PB6<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 PB6<Pwm<Timer1Pwm>>
[src]
impl PwmPin for PB6<Pwm<Timer1Pwm>>
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
impl PwmPin for PB6<Pwm<Timer4Pwm>>
[src]
impl PwmPin for PB6<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