mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-08-02 17:31:53 +00:00
Add GPIO pin interface
This commit is contained in:
parent
348f6cae67
commit
a068681b31
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
|
Loading…
x
Reference in New Issue
Block a user