23 lines
453 B
Rust
23 lines
453 B
Rust
//! General Purpose Input / Output
|
|
|
|
use pac::DIO;
|
|
use core::marker::PhantomData;
|
|
use hal::digital::OutputPin;
|
|
|
|
pub trait GpioExt {
|
|
type Parts;
|
|
|
|
/// Consume and split the device into its constituent parts
|
|
fn split(self) -> Self::Parts;
|
|
}
|
|
|
|
/// Represents a pin configured for input.
|
|
pub struct Input<MODE> {
|
|
_mode: PhantomData<MODE>,
|
|
}
|
|
|
|
/// Represents a pin configured for output.
|
|
pub struct Output<MODE> {
|
|
_mode: PhantomData<MODE>,
|
|
}
|