Ersa Wearable Platform
Embedded smartwatch firmware and application framework
Loading...
Searching...
No Matches
esp32_input.h
Go to the documentation of this file.
1#pragma once
2
3#if defined(ARDUINO)
4
5#include "ersa/hal/input.h"
6#include "ersa/board/pins.h"
8
9namespace ersa {
10namespace hal {
11
17class Esp32Input : public IInput {
18public:
20 explicit Esp32Input(const board::ButtonPins& pins,
21 events::EventBus& bus = events::EventBus::instance());
22 ~Esp32Input() override = default;
23
24 Result<void> init() override;
25 void poll() override;
26 bool isPressed(events::ButtonId button) const override;
27 bool hasPendingEvents() const override;
28
29private:
30 board::ButtonPins pins_;
31 events::EventBus& bus_;
32};
33
34} // namespace hal
35} // namespace ersa
36
37#endif // ARDUINO
bool hasPendingEvents()
Definition application.h:10