Ersa Wearable Platform
Embedded smartwatch firmware and application framework
Loading...
Searching...
No Matches
src
hal
esp32
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
"
7
#include "
ersa/events/event_bus.h
"
8
9
namespace
ersa
{
10
namespace
hal {
11
17
class
Esp32Input :
public
IInput {
18
public
:
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
29
private
:
30
board::ButtonPins pins_;
31
events::EventBus& bus_;
32
};
33
34
}
// namespace hal
35
}
// namespace ersa
36
37
#endif
// ARDUINO
event_bus.h
input.h
Buttons::hasPendingEvents
bool hasPendingEvents()
ersa
Definition
application.h:10
pins.h
Generated by
1.9.8