|
1 | 1 | //! The primary module containing microcontroller-specific core definitions
|
2 | 2 |
|
3 | 3 | /// The ATmega88.
|
4 |
| -pub mod atmega88; |
| 4 | +#[cfg(any(avr_mcu_atmega88, feature = "all-mcus"))] pub mod atmega88; |
5 | 5 | #[cfg(avr_mcu_atmega88)] pub use self::atmega88 as current;
|
6 | 6 |
|
7 | 7 | /// The ATmega48A.
|
8 |
| -pub mod atmega48a; |
| 8 | +#[cfg(any(avr_mcu_atmega48a, feature = "all-mcus"))] pub mod atmega48a; |
9 | 9 | #[cfg(avr_mcu_atmega48a)] pub use self::atmega48a as current;
|
10 | 10 |
|
11 | 11 | /// The ATmega168A.
|
12 |
| -pub mod atmega168a; |
| 12 | +#[cfg(any(avr_mcu_atmega168a, feature = "all-mcus"))] pub mod atmega168a; |
13 | 13 | #[cfg(avr_mcu_atmega168a)] pub use self::atmega168a as current;
|
14 | 14 |
|
15 | 15 | /// The ATmega88P.
|
16 |
| -pub mod atmega88p; |
| 16 | +#[cfg(any(avr_mcu_atmega88p, feature = "all-mcus"))] pub mod atmega88p; |
17 | 17 | #[cfg(avr_mcu_atmega88p)] pub use self::atmega88p as current;
|
18 | 18 |
|
19 | 19 | /// The ATmega168P.
|
20 |
| -pub mod atmega168p; |
| 20 | +#[cfg(any(avr_mcu_atmega168p, feature = "all-mcus"))] pub mod atmega168p; |
21 | 21 | #[cfg(avr_mcu_atmega168p)] pub use self::atmega168p as current;
|
22 | 22 |
|
23 | 23 | /// The ATmega88PA.
|
24 |
| -pub mod atmega88pa; |
| 24 | +#[cfg(any(avr_mcu_atmega88pa, feature = "all-mcus"))] pub mod atmega88pa; |
25 | 25 | #[cfg(avr_mcu_atmega88pa)] pub use self::atmega88pa as current;
|
26 | 26 |
|
27 | 27 | /// The ATmega168.
|
28 |
| -pub mod atmega168; |
| 28 | +#[cfg(any(avr_mcu_atmega168, feature = "all-mcus"))] pub mod atmega168; |
29 | 29 | #[cfg(avr_mcu_atmega168)] pub use self::atmega168 as current;
|
30 | 30 |
|
31 | 31 | /// The ATmega328P.
|
32 |
| -pub mod atmega328p; |
| 32 | +#[cfg(any(avr_mcu_atmega328p, feature = "all-mcus"))] pub mod atmega328p; |
33 | 33 | #[cfg(avr_mcu_atmega328p)] pub use self::atmega328p as current;
|
34 | 34 |
|
35 | 35 | /// The ATmega48PA.
|
36 |
| -pub mod atmega48pa; |
| 36 | +#[cfg(any(avr_mcu_atmega48pa, feature = "all-mcus"))] pub mod atmega48pa; |
37 | 37 | #[cfg(avr_mcu_atmega48pa)] pub use self::atmega48pa as current;
|
38 | 38 |
|
39 | 39 | /// The ATmega168PA.
|
40 |
| -pub mod atmega168pa; |
| 40 | +#[cfg(any(avr_mcu_atmega168pa, feature = "all-mcus"))] pub mod atmega168pa; |
41 | 41 | #[cfg(avr_mcu_atmega168pa)] pub use self::atmega168pa as current;
|
42 | 42 |
|
43 | 43 | /// The ATmega48P.
|
44 |
| -pub mod atmega48p; |
| 44 | +#[cfg(any(avr_mcu_atmega48p, feature = "all-mcus"))] pub mod atmega48p; |
45 | 45 | #[cfg(avr_mcu_atmega48p)] pub use self::atmega48p as current;
|
46 | 46 |
|
47 | 47 | /// 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; |
50 | 52 |
|
51 | 53 | /// The ATmega88A.
|
52 |
| -pub mod atmega88a; |
| 54 | +#[cfg(any(avr_mcu_atmega88a, feature = "all-mcus"))] pub mod atmega88a; |
53 | 55 | #[cfg(avr_mcu_atmega88a)] pub use self::atmega88a as current;
|
54 | 56 |
|
55 | 57 | /// The ATmega48.
|
56 |
| -pub mod atmega48; |
| 58 | +#[cfg(any(avr_mcu_atmega48, feature = "all-mcus"))] pub mod atmega48; |
57 | 59 | #[cfg(avr_mcu_atmega48)] pub use self::atmega48 as current;
|
58 | 60 |
|
59 | 61 |
|
0 commit comments