Skip to content

Commit d32864a

Browse files
dalpilRahix
authored andcommitted
Use the same simple_pwm implementation for 1280 as for 2560
The only difference seems to be the amount of flash memory available
1 parent ad89af3 commit d32864a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mcu/atmega-hal/src/simple_pwm.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ avr_hal_generic::impl_simple_pwm! {
233233
}
234234

235235

236-
#[cfg(feature = "atmega2560")]
236+
#[cfg(any(feature = "atmega1280", feature="atmega2560"))]
237237
avr_hal_generic::impl_simple_pwm! {
238238
/// Use `TC0` for PWM (pins `PB7`, `PG5`)
239239
///
@@ -281,7 +281,7 @@ avr_hal_generic::impl_simple_pwm! {
281281
}
282282
}
283283

284-
#[cfg(feature = "atmega2560")]
284+
#[cfg(any(feature = "atmega1280", feature="atmega2560"))]
285285
avr_hal_generic::impl_simple_pwm! {
286286
/// Use `TC1` for PWM (pins `PB5`, `PB6`, `PB7`)
287287
///
@@ -339,7 +339,7 @@ avr_hal_generic::impl_simple_pwm! {
339339
}
340340
}
341341

342-
#[cfg(feature = "atmega2560")]
342+
#[cfg(any(feature = "atmega1280", feature="atmega2560"))]
343343
avr_hal_generic::impl_simple_pwm! {
344344
/// Use `TC2` for PWM (pins `PB4`, `PH6`)
345345
///
@@ -392,7 +392,7 @@ avr_hal_generic::impl_simple_pwm! {
392392
}
393393
}
394394

395-
#[cfg(feature = "atmega2560")]
395+
#[cfg(any(feature = "atmega1280", feature="atmega2560"))]
396396
avr_hal_generic::impl_simple_pwm! {
397397
/// Use `TC3` for PWM (pins `PE3`, `PE4`, `PE5`)
398398
///
@@ -455,7 +455,7 @@ avr_hal_generic::impl_simple_pwm! {
455455
}
456456
}
457457

458-
#[cfg(feature = "atmega2560")]
458+
#[cfg(any(feature = "atmega1280", feature="atmega2560"))]
459459
avr_hal_generic::impl_simple_pwm! {
460460
/// Use `TC4` for PWM (pins `PH3`, `PH4`, `PH5`)
461461
///
@@ -518,7 +518,7 @@ avr_hal_generic::impl_simple_pwm! {
518518
}
519519
}
520520

521-
#[cfg(feature = "atmega2560")]
521+
#[cfg(any(feature = "atmega1280", feature="atmega2560"))]
522522
avr_hal_generic::impl_simple_pwm! {
523523
/// Use `TC5` for PWM (pins `PL3`, `PL4`, `PL5`)
524524
///

0 commit comments

Comments
 (0)