#ifndef __PIN_HPP__
#define __PIN_HPP__

template <typename Derived>
struct Pin
{
    void set(bool logic)
    {
        static_cast<Derived*>(this)->setImp(logic);
    }

    void toggle()
    {
        static_cast<Derived*>(this)->toggleImp();
    }

    bool get(void)
    {
        return static_cast<Derived*>(this)->getImp();
    }
};

#endif // __PIN_HPP__