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
10
namespace
openmsx
{
11
12
class
CommandController;
13
class
MSXCliComm;
14
class
RTScheduler;
15
class
Interpreter;
16
17
class
LedStatus
final :
public
RTSchedulable
18
{
19
public
:
20
enum
Led
{
21
POWER
,
22
CAPS
,
23
KANA
,
// same as CODE LED
24
PAUSE
,
25
TURBO
,
26
FDD
,
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
36
private
:
37
void
handleEvent(
Led
led)
noexcept
;
38
39
// RTSchedulable
40
void
executeRT()
override
;
41
42
private
:
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
RTSchedulable.hh
ReadOnlySetting.hh
openmsx::CommandController
Definition
CommandController.hh:19
openmsx::Interpreter
Definition
Interpreter.hh:19
openmsx::LedStatus
Definition
LedStatus.hh:18
openmsx::LedStatus::setLed
void setLed(Led led, bool status)
Definition
LedStatus.cc:44
openmsx::LedStatus::Led
Led
Definition
LedStatus.hh:20
openmsx::LedStatus::PAUSE
@ PAUSE
Definition
LedStatus.hh:24
openmsx::LedStatus::POWER
@ POWER
Definition
LedStatus.hh:21
openmsx::LedStatus::FDD
@ FDD
Definition
LedStatus.hh:26
openmsx::LedStatus::CAPS
@ CAPS
Definition
LedStatus.hh:22
openmsx::LedStatus::NUM_LEDS
@ NUM_LEDS
Definition
LedStatus.hh:27
openmsx::LedStatus::KANA
@ KANA
Definition
LedStatus.hh:23
openmsx::LedStatus::TURBO
@ TURBO
Definition
LedStatus.hh:25
openmsx::MSXCliComm
Definition
MSXCliComm.hh:18
openmsx::RTSchedulable
Definition
RTSchedulable.hh:11
openmsx::RTScheduler
Definition
RTScheduler.hh:19
openmsx
This file implemented 3 utility functions:
Definition
Autofire.cc:11
Generated on Sun Dec 1 2024 22:13:42 for openMSX by
1.9.8