openMSX
LedStatus.hh
Go to the documentation of this file.
1#ifndef LEDSTATUS_HH
2#define LEDSTATUS_HH
3
4#include "ReadOnlySetting.hh"
5#include "RTSchedulable.hh"
6
7#include <array>
8#include <cstdint>
9
10namespace openmsx {
11
12class CommandController;
13class MSXCliComm;
14class RTScheduler;
15class Interpreter;
16
17class LedStatus final : public RTSchedulable
18{
19public:
20 enum Led {
23 KANA, // same as CODE LED
27 NUM_LEDS // must be last
28 };
29
30 LedStatus(RTScheduler& rtScheduler,
31 CommandController& commandController,
32 MSXCliComm& msxCliComm);
33
34 void setLed(Led led, bool status);
35
36private:
37 void handleEvent(Led led) noexcept;
38
39 // RTSchedulable
40 void executeRT() override;
41
42private:
43 MSXCliComm& msxCliComm;
44 Interpreter& interp;
45 std::array<ReadOnlySetting, NUM_LEDS> ledStatus;
46 uint64_t lastTime;
47 std::array<bool, NUM_LEDS> ledValue;
48};
49
50} // namespace openmsx
51
52#endif
void setLed(Led led, bool status)
Definition LedStatus.cc:44
This file implemented 3 utility functions:
Definition Autofire.cc:11