#ifndef __PIN_HPP__ #define __PIN_HPP__ template struct Pin { bool read() { return static_cast(this)->readImpl(); } void write(bool logic) { static_cast(this)->writeImpl(logic); } void toggle() { static_cast(this)-toggleImpl(); } }; #endif // __PIN_HPP__