rubble-nrf5x 0.0.4

Rubble driver for the nRF51/nRF52-series radios
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::env;

fn main() {
    let features = &["51", "52810", "52811", "52832", "52833", "52840"];
    let count = features
        .iter()
        .filter(|name| env::var_os(format!("CARGO_FEATURE_{}", name)).is_some())
        .count();

    match count {
        0 => panic!("no device feature enabled; please enable one of the following features, matching your target device: {:?}", features),
        1 => {},
        _ => panic!("{} device features enabled; please only enable one", count),
    }
}