narf52/interfaces/gpio_interface.h
2020-03-31 20:28:36 +02:00

22 lines
411 B
C++

#ifndef __INTERFACES_GPIO_INTERFACE_H__
#define __INTERFACES_GPIO_INTERFACE_H__
#include <cstdint>
namespace pinetime::interfaces {
class GpioInterface
{
public:
enum class direction {IN, OUT};
virtual void set_direction(direction) = 0;
virtual uint32_t get() = 0;
virtual void set() = 0;
virtual void clear() = 0;
virtual void toggle() = 0;
};
}
#endif