Files
Cpp-in-Embedded-Systems/Chapter13/uart_c_hal_wrapper/hal/gpio/inc/gpio.hpp
Amar Mahmutbegovic 60b08160ba add Chapter13
2024-11-03 14:41:27 +01:00

20 lines
385 B
C++

#pragma once
#include <cstdint>
#include <functional>
namespace hal
{
class gpio
{
public:
gpio(const std::function<void()> & on_press = nullptr);
void execute_interrupt_handler() const;
[[nodiscard]] virtual bool is_interrupt_generated() const = 0;
virtual void clear_interrupt_flag() const = 0;
private:
std::function<void()> on_press_;
};
}; // namespace hal