diff options
author | Nao Pross <naopross@thearcway.org> | 2018-05-04 01:39:50 +0200 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2018-05-04 01:39:50 +0200 |
commit | 51a827c0c9f45683228177b8ac7ffe140613e982 (patch) | |
tree | b419b626b076e007240a1abe16900a7ecb310fe3 /hal/pin.hpp | |
parent | Update pin class to support input and output mode (diff) | |
download | SAMLiquidSmoke-51a827c0c9f45683228177b8ac7ffe140613e982.tar.gz SAMLiquidSmoke-51a827c0c9f45683228177b8ac7ffe140613e982.zip |
Fix indent, replace tabs with spaces
Diffstat (limited to '')
-rw-r--r-- | hal/pin.hpp | 26 |
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 */ |