/* * IO.h * * Created on: Feb 24, 2021 * Author: erki */ #ifndef PERIPHERALS_IO_HPP_ #define PERIPHERALS_IO_HPP_ #include #include #include namespace Peripherals { struct IO { GPIO_TypeDef* port; std::uint16_t pin; IO() = default; IO(GPIO_TypeDef* port, const unsigned short pin); void Set(const bool state); void Toggle(); bool Read(); #ifdef PERIPHERALS_USE_DELAY_US void SetDelayUs(const bool state, const std::uint32_t micros); #endif }; } /* namespace Peripherals */ #endif /* PERIPHERALS_IO_HPP_ */