From 4f50d0065451705be63b51dda04532fa6cd9e267 Mon Sep 17 00:00:00 2001 From: Christopher Durand Date: Thu, 12 Jan 2023 13:14:31 +0100 Subject: [PATCH] [sam] Add support for GpioInverted --- src/modm/platform/gpio/sam/module.lb | 1 + src/modm/platform/gpio/sam/pin.hpp.in | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/modm/platform/gpio/sam/module.lb b/src/modm/platform/gpio/sam/module.lb index 35ce88982c..e37fe72e32 100644 --- a/src/modm/platform/gpio/sam/module.lb +++ b/src/modm/platform/gpio/sam/module.lb @@ -129,3 +129,4 @@ def build(env): env.template("enable.cpp.in") env.template("pin.hpp.in") env.copy("unused.hpp") + env.copy("../common/inverted.hpp", "inverted.hpp") diff --git a/src/modm/platform/gpio/sam/pin.hpp.in b/src/modm/platform/gpio/sam/pin.hpp.in index b537b8e79e..5e1d2fa3e1 100644 --- a/src/modm/platform/gpio/sam/pin.hpp.in +++ b/src/modm/platform/gpio/sam/pin.hpp.in @@ -438,6 +438,14 @@ public: // For backwards compability with bitbang API using InputType = ::modm::platform::InputType; + // For compability with GpioInverted + using Type = Gpio; + using IO = Type; + using Input = Type; + using Output = Type; + using Data = PinConfig; + static constexpr bool isInverted = false; + template struct As;