From 4cb7ec1772e2462d9659b8b98f0aaf790d126c2a Mon Sep 17 00:00:00 2001 From: polymurph Date: Sat, 16 Oct 2021 20:49:56 +0200 Subject: [PATCH] added more funtions to pin interface --- interfaces/pin.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/interfaces/pin.hpp b/interfaces/pin.hpp index 3a265d6..0da3daa 100644 --- a/interfaces/pin.hpp +++ b/interfaces/pin.hpp @@ -4,10 +4,20 @@ template struct Pin { + bool read() + { + return static_cast(this)->readImpl(); + } + void write(bool logic) { static_cast(this)->writeImpl(logic); } + + void toggle() + { + static_cast(this)-toggleImpl(); + } }; #endif // __PIN_HPP__