mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-09-28 21:17:33 +00:00
Add GPIO pin interface
This commit is contained in:
32
include/sta/gpio_pin.hpp
Normal file
32
include/sta/gpio_pin.hpp
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#ifndef STA_GPIO_PIN_HPP
|
||||||
|
#define STA_GPIO_PIN_HPP
|
||||||
|
|
||||||
|
|
||||||
|
namespace sta
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @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_GPIO_PIN_HPP
|
Reference in New Issue
Block a user