Skip to content

Commit 372f774

Browse files
committed
Run re-generate MCU cores script
1 parent 0f33352 commit 372f774

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

src/cores/mod.rs

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,61 @@
11
//! The primary module containing microcontroller-specific core definitions
22
33
/// The ATmega88.
4-
pub mod atmega88;
4+
#[cfg(any(avr_mcu_atmega88, feature = "all-mcus"))] pub mod atmega88;
55
#[cfg(avr_mcu_atmega88)] pub use self::atmega88 as current;
66

77
/// The ATmega48A.
8-
pub mod atmega48a;
8+
#[cfg(any(avr_mcu_atmega48a, feature = "all-mcus"))] pub mod atmega48a;
99
#[cfg(avr_mcu_atmega48a)] pub use self::atmega48a as current;
1010

1111
/// The ATmega168A.
12-
pub mod atmega168a;
12+
#[cfg(any(avr_mcu_atmega168a, feature = "all-mcus"))] pub mod atmega168a;
1313
#[cfg(avr_mcu_atmega168a)] pub use self::atmega168a as current;
1414

1515
/// The ATmega88P.
16-
pub mod atmega88p;
16+
#[cfg(any(avr_mcu_atmega88p, feature = "all-mcus"))] pub mod atmega88p;
1717
#[cfg(avr_mcu_atmega88p)] pub use self::atmega88p as current;
1818

1919
/// The ATmega168P.
20-
pub mod atmega168p;
20+
#[cfg(any(avr_mcu_atmega168p, feature = "all-mcus"))] pub mod atmega168p;
2121
#[cfg(avr_mcu_atmega168p)] pub use self::atmega168p as current;
2222

2323
/// The ATmega88PA.
24-
pub mod atmega88pa;
24+
#[cfg(any(avr_mcu_atmega88pa, feature = "all-mcus"))] pub mod atmega88pa;
2525
#[cfg(avr_mcu_atmega88pa)] pub use self::atmega88pa as current;
2626

2727
/// The ATmega168.
28-
pub mod atmega168;
28+
#[cfg(any(avr_mcu_atmega168, feature = "all-mcus"))] pub mod atmega168;
2929
#[cfg(avr_mcu_atmega168)] pub use self::atmega168 as current;
3030

3131
/// The ATmega328P.
32-
pub mod atmega328p;
32+
#[cfg(any(avr_mcu_atmega328p, feature = "all-mcus"))] pub mod atmega328p;
3333
#[cfg(avr_mcu_atmega328p)] pub use self::atmega328p as current;
3434

3535
/// The ATmega48PA.
36-
pub mod atmega48pa;
36+
#[cfg(any(avr_mcu_atmega48pa, feature = "all-mcus"))] pub mod atmega48pa;
3737
#[cfg(avr_mcu_atmega48pa)] pub use self::atmega48pa as current;
3838

3939
/// The ATmega168PA.
40-
pub mod atmega168pa;
40+
#[cfg(any(avr_mcu_atmega168pa, feature = "all-mcus"))] pub mod atmega168pa;
4141
#[cfg(avr_mcu_atmega168pa)] pub use self::atmega168pa as current;
4242

4343
/// The ATmega48P.
44-
pub mod atmega48p;
44+
#[cfg(any(avr_mcu_atmega48p, feature = "all-mcus"))] pub mod atmega48p;
4545
#[cfg(avr_mcu_atmega48p)] pub use self::atmega48p as current;
4646

4747
/// The ATmega328.
48-
pub mod atmega328;
49-
#[cfg(avr_mcu_atmega328)] pub use self::atmega328 as current;
48+
///
49+
/// This device is chosen as the default when the crate is targeting non-AVR devices.
50+
#[cfg(any(avr_mcu_atmega328, feature = "all-mcus", not(target_arch = "avr")))] pub mod atmega328;
51+
#[cfg(any(avr_mcu_atmega328, not(target_arch = "avr")))] pub use self::atmega328 as current;
5052

5153
/// The ATmega88A.
52-
pub mod atmega88a;
54+
#[cfg(any(avr_mcu_atmega88a, feature = "all-mcus"))] pub mod atmega88a;
5355
#[cfg(avr_mcu_atmega88a)] pub use self::atmega88a as current;
5456

5557
/// The ATmega48.
56-
pub mod atmega48;
58+
#[cfg(any(avr_mcu_atmega48, feature = "all-mcus"))] pub mod atmega48;
5759
#[cfg(avr_mcu_atmega48)] pub use self::atmega48 as current;
5860

5961

0 commit comments

Comments
 (0)