From 51a827c0c9f45683228177b8ac7ffe140613e982 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Fri, 4 May 2018 01:39:50 +0200 Subject: Fix indent, replace tabs with spaces --- hal/pin.tpp | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'hal/pin.tpp') diff --git a/hal/pin.tpp b/hal/pin.tpp index c3c005f..c6cf957 100644 --- a/hal/pin.tpp +++ b/hal/pin.tpp @@ -11,13 +11,13 @@ template template pin::pin(latch_T *latch, tris_T *tris, port_T *port) : - _latch(reinterpret_cast(latch)), - _tris(reinterpret_cast(tris)), - _port(reinterpret_cast(port)) + _latch(reinterpret_cast(latch)), + _tris(reinterpret_cast(tris)), + _port(reinterpret_cast(port)) { - // default settings - set_mode(pin::mode::OUTPUT); - set(pin::state::OFF); + // default settings + set_mode(pin::mode::OUTPUT); + set(pin::state::OFF); } @@ -31,58 +31,58 @@ pin::~pin() template void pin::set_mode(unsigned m) { - if (m) - *_tris |= 1< void pin::set_mode(pin::mode m) { - set(static_cast(m)); + set(static_cast(m)); } template typename pin::state pin::read() const { - if (*_tris & (1< void pin::set(unsigned s) { - if (s) - *_latch |= 1< void pin::set(pin::state s) { - set(static_cast(s)); + set(static_cast(s)); } template void pin::toggle() { - *_latch ^= 1< bool pin::operator==(const pin &other) const { - return (_latch == other._latch - && _tris == other._tris - && _port == other._port); + return (_latch == other._latch + && _tris == other._tris + && _port == other._port); } template bool pin::operator!=(const pin &other) const { - return !(*this == other); -} \ No newline at end of file + return !(*this == other); +} -- cgit v1.2.1