Skip to content

Commit

Permalink
attiny-hal: Apply rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahix committed Mar 12, 2024
1 parent 798b2bb commit 204c77d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
13 changes: 2 additions & 11 deletions mcu/attiny-hal/src/adc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,14 @@ pub use avr_hal_generic::adc::{AdcChannel, AdcOps, ClockDivider};
#[repr(u8)]
pub enum ReferenceVoltage {
/// Voltage applied to AREF pin.
#[cfg(any(
feature = "attiny85",
feature = "attiny167",
))]
#[cfg(any(feature = "attiny85", feature = "attiny167",))]
Aref,
/// Default reference voltage (default).
AVcc,
/// Internal 1.1V reference.
Internal1_1,
/// Internal 2.56V reference.
#[cfg(any(
feature = "attiny85",
feature = "attiny167",
))]
#[cfg(any(feature = "attiny85", feature = "attiny167",))]
Internal2_56,
}

Expand Down Expand Up @@ -83,7 +77,6 @@ fn apply_clock(peripheral: &crate::pac::ADC, settings: AdcSettings) {
});
}


#[cfg(feature = "attiny85")]
avr_hal_generic::impl_adc! {
hal: crate::Attiny,
Expand Down Expand Up @@ -115,7 +108,6 @@ avr_hal_generic::impl_adc! {
},
}


#[cfg(feature = "attiny88")]
avr_hal_generic::impl_adc! {
hal: crate::Attiny,
Expand Down Expand Up @@ -149,7 +141,6 @@ avr_hal_generic::impl_adc! {
},
}


#[cfg(feature = "attiny167")]
avr_hal_generic::impl_adc! {
hal: crate::Attiny,
Expand Down
1 change: 0 additions & 1 deletion mcu/attiny-hal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ pub mod eeprom;
#[cfg(feature = "device-selected")]
pub use eeprom::Eeprom;


pub struct Attiny;

#[cfg(feature = "attiny84")]
Expand Down
4 changes: 2 additions & 2 deletions mcu/attiny-hal/src/simple_pwm.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pub use avr_hal_generic::simple_pwm::{PwmPinOps, Prescaler};
pub use avr_hal_generic::simple_pwm::{Prescaler, PwmPinOps};

#[cfg(any(feature = "attiny85",feature = "attiny84",feature="attiny88"))]
#[cfg(any(feature = "attiny85", feature = "attiny84", feature = "attiny88"))]
use crate::port::*;

#[cfg(feature = "attiny84")]
Expand Down

0 comments on commit 204c77d

Please sign in to comment.