sta-core/src/gpio_pin.cpp
2024-04-18 00:01:14 +02:00

21 lines
378 B
C++

#include <sta/gpio_pin.hpp>
namespace sta
{
void GpioPin::setHigh()
{
setState(GpioPinState::GPIO_HIGH);
}
void GpioPin::setLow()
{
setState(GpioPinState::GPIO_LOW);
}
void GpioPin::toggle()
{
setState(getState() == GpioPinState::GPIO_HIGH ? GpioPinState::GPIO_LOW : GpioPinState::GPIO_HIGH);
}
} // namespace sta