microbit-common 0.16.0

Implementation details for the BBC Micro:bit board support crates
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::hal;

/// Adc alias to unify v1 and v2 names
pub type Adc = hal::Adc;
/// AdcConfig alias to unify v1 and v2 names
pub type AdcConfig = hal::adc::AdcConfig;

/// Same resolution for v1 and v2
pub trait Default {
    /// v1 is limited to 10 bit
    fn default_10bit() -> Self;
}

impl Default for AdcConfig {
    fn default_10bit() -> Self {
        AdcConfig::default()
    }
}