Refactored GPIO module

- The GPIO module uses type-level programming now
- Implementation heavily based on the ATSAMD GPIO HAL:
  https://docs.rs/atsamd-hal/0.13.0/atsamd_hal/gpio/v2/index.html
- Changes to API, but no passing of peripheral references necessary
  anymore. All examples and tests updated accordingly
This commit is contained in:
2021-11-11 17:20:19 +01:00
parent 47e64c2606
commit 63be6ed5fe
15 changed files with 1851 additions and 758 deletions

View File

@@ -1,8 +1,8 @@
//! Prelude
pub use embedded_hal::prelude::*;
pub use crate::gpio::GpioExt as _va108xx_hal_gpio_GpioExt;
// embedded-hal doesnt yet have v2 in its prelude, so we need to
// export it ourselves
pub use embedded_hal::digital::v2::InputPin as _embedded_hal_gpio_InputPin;
pub use embedded_hal::digital::v2::OutputPin as _embedded_hal_gpio_OutputPin;
pub use embedded_hal::digital::v2::StatefulOutputPin as _embedded_hal_gpio_StatefulOutputPin;