openMSX
LedStatus.hh
Go to the documentation of this file.
1
#ifndef LEDSTATUS_HH
2
#define LEDSTATUS_HH
3
4
#include "
RTSchedulable.hh
"
5
#include <memory>
6
#include <cstdint>
7
8
namespace
openmsx
{
9
10
class
CommandController;
11
class
MSXCliComm;
12
class
ReadOnlySetting;
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
~LedStatus
();
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::unique_ptr<ReadOnlySetting> ledStatus[
NUM_LEDS
];
46
uint64_t lastTime;
47
bool
ledValue[
NUM_LEDS
];
48
};
49
50
}
// namespace openmsx
51
52
#endif
RTSchedulable.hh
openmsx::CommandController
Definition:
CommandController.hh:19
openmsx::Interpreter
Definition:
Interpreter.hh:19
openmsx::LedStatus
Definition:
LedStatus.hh:17
openmsx::LedStatus::LedStatus
LedStatus(RTScheduler &rtScheduler, CommandController &commandController, MSXCliComm &msxCliComm)
Definition:
LedStatus.cc:19
openmsx::LedStatus::~LedStatus
~LedStatus()
openmsx::LedStatus::setLed
void setLed(Led led, bool status)
Definition:
LedStatus.cc:40
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:14
openmsx::RTSchedulable
Definition:
RTSchedulable.hh:11
openmsx::RTScheduler
Definition:
RTScheduler.hh:20
openmsx
This file implemented 3 utility functions:
Definition:
Autofire.cc:5
Generated on Fri Feb 26 2021 22:13:43 for openMSX by
1.9.1