Go to the documentation of this file.
33 #include "debug/PcSpeaker.hh"
43 controlVal.timer =
timer->outputHigh(2) ? 1 : 0;
45 "Reading from speaker device: gate %s, speaker %s, output %s.\n",
46 controlVal.gate ?
"on" :
"off",
47 controlVal.speaker ?
"on" :
"off",
48 controlVal.timer ?
"on" :
"off");
49 pkt->
setLE((uint8_t)controlVal);
57 assert(pkt->
getAddr() == pioAddr);
59 SpeakerControl
val = pkt->
getLE<uint8_t>();
60 controlVal.gate =
val.gate;
63 warn(
"The gate bit of the pc speaker isn't implemented and "
68 controlVal.speaker =
val.speaker;
69 DPRINTF(PcSpeaker,
"Writing to speaker device: gate %s, speaker %s.\n",
70 controlVal.gate ?
"on" :
"off", controlVal.speaker ?
"on" :
"off");
88 PcSpeakerParams::create()
void makeAtomicResponse()
Addr pioAddr
Address that the device listens to.
#define UNSERIALIZE_SCALAR(scalar)
uint64_t Tick
Tick count type.
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
#define SERIALIZE_SCALAR(scalar)
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void serialize(CheckpointOut &cp) const override
Serialize an object.
void setLE(T v)
Set the value in the data pointer to v as little endian.
std::ostream CheckpointOut
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Generated on Wed Sep 30 2020 14:02:12 for gem5 by doxygen 1.8.17