From 7c56a740aacad642e1ade1802829fedddd97c907 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Sun, 20 Sep 2020 02:35:38 -0700 Subject: [PATCH] gpio helper --- firmware/gpio.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 firmware/gpio.h diff --git a/firmware/gpio.h b/firmware/gpio.h new file mode 100644 index 0000000..3b825f7 --- /dev/null +++ b/firmware/gpio.h @@ -0,0 +1,22 @@ +#pragma once + +#include "hal.h" + +class Gpio +{ +public: + Gpio(ioline_t line) : m_line(line) {}; + + void Set() + { + palSetLine(m_line); + } + + void Clear() + { + palClearLine(m_line); + } + +private: + const ioline_t m_line; +};