From 03e791ab31ba810c6491bbd582de4185cdde3fa0 Mon Sep 17 00:00:00 2001 From: Florian Uekermann Date: Mon, 1 Aug 2022 15:20:54 +0200 Subject: [PATCH] Implement NonPwmPinMode for gpio::Disabled Fixes #397 --- rp2040-hal/src/pwm/mod.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rp2040-hal/src/pwm/mod.rs b/rp2040-hal/src/pwm/mod.rs index f92e549..ef04d35 100644 --- a/rp2040-hal/src/pwm/mod.rs +++ b/rp2040-hal/src/pwm/mod.rs @@ -80,9 +80,9 @@ use core::marker::PhantomData; use crate::{ gpio::{ - bank0::*, FunctionClock, FunctionI2C, FunctionPio0, FunctionPio1, FunctionPwm, FunctionSpi, - FunctionUart, FunctionUsbAux, FunctionXip, Input, InputConfig, Output, OutputConfig, Pin, - PinId, PinMode, ValidPinMode, + bank0::*, Disabled, DisabledConfig, FunctionClock, FunctionI2C, FunctionPio0, FunctionPio1, + FunctionPwm, FunctionSpi, FunctionUart, FunctionUsbAux, FunctionXip, Input, InputConfig, + Output, OutputConfig, Pin, PinId, PinMode, ValidPinMode, }, resets::SubsystemReset, typelevel::Sealed, @@ -509,6 +509,7 @@ impl NonPwmPinMode for FunctionUsbAux {} impl NonPwmPinMode for FunctionXip {} impl NonPwmPinMode for Input {} impl NonPwmPinMode for Output {} +impl NonPwmPinMode for Disabled {} /// Stores the attached gpio pin. ///