summaryrefslogtreecommitdiffstats
path: root/hal/pin.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'hal/pin.hpp')
-rw-r--r--hal/pin.hpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/hal/pin.hpp b/hal/pin.hpp
index 6625f90..384c0c7 100644
--- a/hal/pin.hpp
+++ b/hal/pin.hpp
@@ -6,20 +6,20 @@
*/
#ifndef PIN_HPP
-#define PIN_HPP
+#define PIN_HPP
template<unsigned bit>
class pin {
public:
- enum class mode : unsigned
- { INPUT = 1, OUTPUT = 0 };
+ enum class mode : unsigned
+ { INPUT = 1, OUTPUT = 0 };
- enum class state : unsigned
- { ON = 1, OFF = 0 };
+ enum class state : unsigned
+ { ON = 1, OFF = 0 };
- pin() = delete;
+ pin() = delete;
- template<typename latch_T, typename tris_T, typename port_T>
+ template<typename latch_T, typename tris_T, typename port_T>
pin(latch_T *latch, tris_T *tris, port_T *port);
virtual ~pin();
@@ -27,9 +27,9 @@ public:
void set_mode(unsigned m);
void set_mode(mode m);
- state read() const;
+ state read() const;
- void set(unsigned s);
+ void set(unsigned s);
void set(state s);
void toggle();
@@ -38,9 +38,9 @@ public:
bool operator!=(const pin<bit> &other) const;
private:
- volatile uint8_t *_latch;
- volatile uint8_t *_tris;
- volatile uint8_t *_port;
+ volatile uint8_t *_latch;
+ volatile uint8_t *_tris;
+ volatile uint8_t *_port;
};
-#endif /* PIN_HPP */ \ No newline at end of file
+#endif /* PIN_HPP */