gpio helper

This commit is contained in:
Matthew Kennedy 2020-09-20 02:35:38 -07:00
parent f64d586411
commit 7c56a740aa
1 changed files with 22 additions and 0 deletions

22
firmware/gpio.h Normal file
View File

@ -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;
};