rust-embedded-talk/example-source/msp432-hal/src/gpio.rs

23 lines
453 B
Rust
Raw Normal View History

//! 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>,
}