diff --git a/inout.h b/inout.h index 6469b4f..dba5f59 100644 --- a/inout.h +++ b/inout.h @@ -202,10 +202,8 @@ template class InOutPin { public: - inline InOutPin() __attribute__( (always_inline) ); - - static inline void setDirection( InOut::Dir enmDir ) __attribute__( (always_inline) ); - static inline void setPullup( bool bPullup ) __attribute__( (always_inline) ); + static inline void direction( InOut::Dir enmDir ) __attribute__( (always_inline) ); + static inline void pullup( bool bPullup ) __attribute__( (always_inline) ); static inline bool read() __attribute__( (always_inline) ); static inline void write( bool bValue ) __attribute__( (always_inline) ); @@ -213,12 +211,7 @@ public: ////////////////////////////////////////////////////////////////////////// template -inline InOutPin::InOutPin() -{} - -////////////////////////////////////////////////////////////////////////// -template -inline void InOutPin::setDirection( InOut::Dir enmDir ) +inline void InOutPin::direction( InOut::Dir enmDir ) { constexpr volatile uint8_t *vpui8DDR = InOut::getPort( enmPin, InOut::Type::DDR ); constexpr uint8_t ui8Pin = InOut::getPin( enmPin ); @@ -231,7 +224,7 @@ inline void InOutPin::setDirection( InOut::Dir enmDir ) ////////////////////////////////////////////////////////////////////////// template -inline void InOutPin::setPullup( bool bPullup ) +inline void InOutPin::pullup( bool bPullup ) { write( bPullup ); } @@ -269,10 +262,8 @@ template class InOutPort { public: - inline InOutPort() __attribute__( (always_inline) ); - - static inline void setDirection( InOut::Dir enmDir ) __attribute__( (always_inline) ); - static inline void setPullup( bool bPullup ) __attribute__( (always_inline) ); + static inline void direction( InOut::Dir enmDir ) __attribute__( (always_inline) ); + static inline void pullup( bool bPullup ) __attribute__( (always_inline) ); static inline uint8_t read() __attribute__( (always_inline) ); static inline void write( uint8_t ui8Value ) __attribute__( (always_inline) ); @@ -280,12 +271,7 @@ public: ////////////////////////////////////////////////////////////////////////// template -inline InOutPort::InOutPort() -{} - -////////////////////////////////////////////////////////////////////////// -template -inline void InOutPort::setDirection( InOut::Dir enmDir ) +inline void InOutPort::direction( InOut::Dir enmDir ) { constexpr volatile uint8_t *vpui8DDR = InOut::getPort( static_cast( enmPort ), InOut::Type::DDR ); *vpui8DDR = ( enmDir == InOut::Dir::OUT ) ? 0xFF : 0x00; @@ -293,7 +279,7 @@ inline void InOutPort::setDirection( InOut::Dir enmDir ) ////////////////////////////////////////////////////////////////////////// template -inline void InOutPort::setPullup( bool bPullup ) +inline void InOutPort::pullup( bool bPullup ) { write( bPullup ? 0xFF : 0x00 ); }