(
+ pin: Pin,
+ pull: Pull,
+ ) -> Pin
{
+ pin.into_mode().internal_resistor(pull)
+ }
+}
+
+impl Output {
+ pub fn new(
+ mut pin: Pin,
+ state: PinState,
+ ) -> Pin
+ where
+ Self: PinMode,
+ {
+ pin._set_state(state);
+ pin.into_mode()
+ }
+}
+
+impl Analog {
+ pub fn new(pin: Pin) -> Pin
{
+ pin.into_mode()
+ }
+}
+
impl Pin> {
/// Turns pin alternate configuration pin into open drain
pub fn set_open_drain(self) -> Pin
> {
diff --git a/src/gpio/erased.rs b/src/gpio/erased.rs
index 67df8397..163e227f 100644
--- a/src/gpio/erased.rs
+++ b/src/gpio/erased.rs
@@ -1,6 +1,6 @@
use super::*;
-pub use ErasedPin as EPin;
+pub use ErasedPin as AnyPin;
/// Fully erased pin
///