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
#include <array>
7
#include <cstdint>
8
9
namespace
openmsx
{
10
11
class
CommandController;
12
class
MSXCliComm;
13
class
RTScheduler;
14
class
Interpreter;
15
16
class
LedStatus
final :
public
RTSchedulable
17
{
18
public
:
19
enum
Led
{
20
POWER
,
21
CAPS
,
22
KANA
,
// same as CODE LED
23
PAUSE
,
24
TURBO
,
25
FDD
,
26
NUM_LEDS
// must be last
27
};
28
29
LedStatus
(
RTScheduler
& rtScheduler,
30
CommandController
& commandController,
31
MSXCliComm
& msxCliComm);
32
33
void
setLed
(
Led
led,
bool
status);
34
35
private
:
36
void
handleEvent(
Led
led)
noexcept
;
37
38
// RTSchedulable
39
void
executeRT()
override
;
40
41
private
:
42
MSXCliComm
& msxCliComm;
43
Interpreter
& interp;
44
std::array<ReadOnlySetting, NUM_LEDS> ledStatus;
45
uint64_t lastTime;
46
std::array<bool, NUM_LEDS> ledValue;
47
};
48
49
}
// namespace openmsx
50
51
#endif
RTSchedulable.hh
ReadOnlySetting.hh
openmsx::CommandController
Definition
CommandController.hh:19
openmsx::Interpreter
Definition
Interpreter.hh:19
openmsx::LedStatus
Definition
LedStatus.hh:17
openmsx::LedStatus::setLed
void setLed(Led led, bool status)
Definition
LedStatus.cc:41
openmsx::LedStatus::Led
Led
Definition
LedStatus.hh:19
openmsx::LedStatus::PAUSE
@ PAUSE
Definition
LedStatus.hh:23
openmsx::LedStatus::POWER
@ POWER
Definition
LedStatus.hh:20
openmsx::LedStatus::FDD
@ FDD
Definition
LedStatus.hh:25
openmsx::LedStatus::CAPS
@ CAPS
Definition
LedStatus.hh:21
openmsx::LedStatus::NUM_LEDS
@ NUM_LEDS
Definition
LedStatus.hh:26
openmsx::LedStatus::KANA
@ KANA
Definition
LedStatus.hh:22
openmsx::LedStatus::TURBO
@ TURBO
Definition
LedStatus.hh:24
openmsx::MSXCliComm
Definition
MSXCliComm.hh:15
openmsx::RTSchedulable
Definition
RTSchedulable.hh:11
openmsx::RTScheduler
Definition
RTScheduler.hh:19
openmsx
This file implemented 3 utility functions:
Definition
Autofire.cc:9
Generated on Mon Mar 18 2024 19:13:14 for openMSX by
1.9.8