Skip to content

Commit

Permalink
[sam] Add support for GpioInverted
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-durand committed Jan 12, 2023
1 parent c93dd2c commit 4f50d00
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/modm/platform/gpio/sam/module.lb
Expand Up @@ -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")
8 changes: 8 additions & 0 deletions src/modm/platform/gpio/sam/pin.hpp.in
Expand Up @@ -438,6 +438,14 @@ public:
// For backwards compability with bitbang API
using InputType = ::modm::platform::InputType;

// For compability with GpioInverted
using Type = Gpio<PinConfig>;
using IO = Type;
using Input = Type;
using Output = Type;
using Data = PinConfig;
static constexpr bool isInverted = false;

template<PeripheralPin peripheral_pin_v>
struct As;

Expand Down

0 comments on commit 4f50d00

Please sign in to comment.