OXYGENHUB
◆ main openmsx / src / sound / Y8950KeyboardConnector.hh
826 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
1
#ifndef Y8950KEYBOARDCONNECTOR_HH
2
#define Y8950KEYBOARDCONNECTOR_HH
3
4
#include "Connector.hh"
5
6
#include <cstdint>
7
8
namespace openmsx {
9
10
class Y8950KeyboardDevice;
11
12
class Y8950KeyboardConnector final : public Connector
13
{
14
public:
15
	explicit Y8950KeyboardConnector(PluggingController& pluggingController);
16
17
	void write(uint8_t data, EmuTime time);
18
	[[nodiscard]] uint8_t read(EmuTime time) const;
19
	[[nodiscard]] uint8_t peek(EmuTime time) const;
20
	[[nodiscard]] Y8950KeyboardDevice& getPluggedKeyb() const;
21
22
	// Connector
23
	[[nodiscard]] zstring_view getDescription() const override;
24
	[[nodiscard]] zstring_view getClass() const override;
25
	void plug(Pluggable& dev, EmuTime time) override;
26
27
	template<typename Archive>
28
	void serialize(Archive& ar, unsigned version);
29
30
private:
31
	uint8_t data = 255;
32
};
33
34
} // namespace openmsx
35
36
#endif