embedded-resources 0.2.1

Define peripheral usage in a single place for use everywhere.
Documentation
1
2
3
4
5
6
7
8
9
10
11
fn main() {
    let features = [
        cfg!(feature = "_test"),
        cfg!(feature = "stm32"),
        cfg!(feature = "nrf"),
    ];

    if features.iter().filter(|enabled| **enabled).count() > 1 {
        println!("cargo::error=Exactly one ecosystem feature may be enabled at a time.");
    }
}