summaryrefslogtreecommitdiffstats
path: root/hal/pin.hpp
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-05-08 16:21:33 +0200
committerNao Pross <naopross@thearcway.org>2018-05-08 16:21:33 +0200
commit2490b24a1ced7372e4462c60802748e426901da1 (patch)
treee7ec935869975c526d6786d1c78e0e10046ab25d /hal/pin.hpp
parentCheck if substring is empty in split(), minor fix in command parsing (diff)
downloadSAMLiquidSmoke-2490b24a1ced7372e4462c60802748e426901da1.tar.gz
SAMLiquidSmoke-2490b24a1ced7372e4462c60802748e426901da1.zip
Add notes, rename gpio class to gpio_pin and rename led variablesHEADmaster
Diffstat (limited to 'hal/pin.hpp')
-rw-r--r--hal/pin.hpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/hal/pin.hpp b/hal/pin.hpp
index ab9d3ad..13e9a52 100644
--- a/hal/pin.hpp
+++ b/hal/pin.hpp
@@ -8,14 +8,16 @@
#ifndef PIN_HPP
#define PIN_HPP
+#include <cstdint>
+
extern "C" {
#include <xc.h>
}
-class gpio
+class gpio_pin
{
public:
- virtual ~gpio() {}
+ virtual ~gpio_pin() {}
// digital mode methods
virtual void set_mode(unsigned m) = 0;
@@ -31,11 +33,11 @@ public:
// TODO: analog mode methods
protected:
- gpio() {}
+ gpio_pin() {}
};
template<unsigned bit>
-class io_pin : public gpio {
+class io_pin : public gpio_pin {
public:
enum class mode : unsigned
{ INPUT = 1, OUTPUT = 0 };