You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
KED/bsl/csl/interfaces/pin.hpp

24 lines
368 B

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