openMSX
KeyClick.cc
Go to the documentation of this file.
1#include "KeyClick.hh"
2
3namespace openmsx {
4
6 : dac("keyclick", "1-bit click generator", config)
7{
8}
9
10void KeyClick::reset(EmuTime::param time)
11{
12 setClick(false, time);
13}
14
15void KeyClick::setClick(bool newStatus, EmuTime::param time)
16{
17 if (newStatus != status) {
18 status = newStatus;
19 dac.writeDAC((status ? 0xff : 0x80), time);
20 }
21}
22
23// We don't need a serialize() method, instead the setClick() method
24// gets called during de-serialization.
25
26} // namespace openmsx
void writeDAC(uint8_t value, EmuTime::param time)
Definition DACSound8U.cc:17
void reset(EmuTime::param time)
Definition KeyClick.cc:10
void setClick(bool status, EmuTime::param time)
Definition KeyClick.cc:15
KeyClick(const DeviceConfig &config)
Definition KeyClick.cc:5
This file implemented 3 utility functions:
Definition Autofire.cc:11