|
46 | 46 | #![warn(missing_docs)]
|
47 | 47 | #![deny(macro_use_extern_crate)]
|
48 | 48 |
|
49 |
| -#[cfg(all(not(feature = "device-selected"), not(feature = "needs-subvariant")))] |
| 49 | +#[cfg(all(feature = "direct-call-deprecated", not(feature = "device-selected")))] |
| 50 | +compile_error!( |
| 51 | + "The feature you selected is deprecated, because it was split up into sub-devices. |
| 52 | +
|
| 53 | + Example: The STM32F3Discovery board has a STM32F303VCT6 chip. |
| 54 | + You probably used to use `--features stm32f303` but now functionalities for the sub-device were added. |
| 55 | + In this case replace it with `--features stm32f303xc` to make your code build again. |
| 56 | +
|
| 57 | + Please select one of the chip features stated above." |
| 58 | +); |
| 59 | + |
| 60 | +// TODO Remove because, as of stm32f3 v0.12, this will be caught by it's build.rs? |
| 61 | +#[cfg(all( |
| 62 | + not(feature = "direct-call-deprecated"), |
| 63 | + not(feature = "device-selected") |
| 64 | +))] |
50 | 65 | compile_error!(
|
51 | 66 | "This crate requires you to specify your target chip as a feature.
|
52 | 67 |
|
@@ -81,17 +96,6 @@ compile_error!(
|
81 | 96 | "
|
82 | 97 | );
|
83 | 98 |
|
84 |
| -#[cfg(all(not(feature = "device-selected"), feature = "direct-call-deprecated",))] |
85 |
| -compile_error!( |
86 |
| - "The feature you selected is deprecated, because it was split up into sub-devices. |
87 |
| -
|
88 |
| - Example: The STM32F3Discovery board has a STM32F303VCT6 chip. |
89 |
| - You probably used to use `--features stm32f303` but now functionalities for the sub-device were added. |
90 |
| - In this case replace it with `--features stm32f303xc` to make your code build again. |
91 |
| -
|
92 |
| - Please select one of the chip features stated above." |
93 |
| -); |
94 |
| - |
95 | 99 | pub use embedded_hal as hal;
|
96 | 100 |
|
97 | 101 | pub use nb;
|
|
0 commit comments