sta-core/include/sta/gpio_pin.hpp
2023-02-02 22:22:14 +01:00

48 lines
703 B
C++

/**
* @file
* @brief GPIO pin interface definitions.
*/
#ifndef STA_CORE_GPIO_PIN_HPP
#define STA_CORE_GPIO_PIN_HPP
namespace sta
{
/**
* @defgroup sta_core_gpio GPIO
* @ingroup sta_core
* @brief GPIO pins.
* @{
*/
/**
* @brief GPIO pin state.
*/
enum class GpioPinState
{
LOW,
HIGH
};
/**
* @brief Interface for GPIO pins.
*/
class GpioPin
{
public:
/**
* @brief Set pin output state.
*
* @param state Output state
*/
virtual void setState(GpioPinState state) = 0;
};
/** @} */
} // namespace sta
#endif // STA_CORE_GPIO_PIN_HPP