rp/adc: rewrite the module
- don't require an irq binding for blocking-only adc - abstract adc pins into an AnyPin like interface, erasing the actual peripheral type at runtime. - add pull-up/pull-down functions for adc pins - add a test (mostly a copy of the example, to be honest) - configure adc pads according to datasheet - report conversion errors (although they seem exceedingly rare?) - drop embedded-hal interfaces. embedded-hal channels can do neither AnyPin nor pullup/pulldown without encoding both into the type
This commit is contained in:
@ -41,7 +41,7 @@ impl From<Level> for bool {
|
||||
}
|
||||
|
||||
/// Represents a pull setting for an input.
|
||||
#[derive(Debug, Eq, PartialEq)]
|
||||
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
|
||||
pub enum Pull {
|
||||
None,
|
||||
Up,
|
||||
|
Reference in New Issue
Block a user