summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/ps2mc.h
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2018-07-22 20:41:57 +1000
committer Vas Crabb <vas@vastheman.com>2018-07-22 20:41:57 +1000
commitc0ab1c5aa4c172aa9e3e0deec5c2cc19d4f278d1 (patch)
tree359e7b0d6560d05a1872c2e18773a6e2e5038b7f /src/devices/machine/ps2mc.h
parent6d39a913e54c73640e4b5e7493b223c87a14c64a (diff)
(nw) srcclean and some cleanup:
* Make more #include guards follow standard format - using MAME_ as the prefix makes it easy to see which ones come from our code in a preprocessor dump, and having both src/devices/machine/foo.h and src/mame/machine/foo.h causes issues anyway * Get #include "emu.h" out of headers - it should only be the first thing in a complilation unit or we get differences in behaviour with PCH on/off * Add out-of-line destructors to some devices - it forces the compiler to instantiate the vtable in a certain location and avoids some non-deterministic compiler behaviours
Diffstat (limited to 'src/devices/machine/ps2mc.h')
-rw-r--r--src/devices/machine/ps2mc.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/devices/machine/ps2mc.h b/src/devices/machine/ps2mc.h
index c7551c1fce3..b3f120f62a1 100644
--- a/src/devices/machine/ps2mc.h
+++ b/src/devices/machine/ps2mc.h
@@ -9,20 +9,22 @@
*
*/
-#ifndef DEVICES_MACHINE_PS2MC_H
-#define DEVICES_MACHINE_PS2MC_H
+#ifndef MAME_MACHINE_PS2MC_H
+#define MAME_MACHINE_PS2MC_H
#pragma once
+
class ps2_mc_device : public device_t
{
public:
- ps2_mc_device(const machine_config &mconfig, const char *tag, device_t *owner)
- : ps2_mc_device(mconfig, tag, owner, (uint32_t)0)
- {
+ ps2_mc_device(const machine_config &mconfig, const char *tag, device_t *owner)
+ : ps2_mc_device(mconfig, tag, owner, (uint32_t)0)
+ {
}
- ps2_mc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ps2_mc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ virtual ~ps2_mc_device() override;
void recv_fifo_push(uint8_t data); // TODO: Turn me into a bus interface!
uint8_t xmit_fifo_pop();
@@ -34,8 +36,8 @@ public:
static const uint8_t SIO_DEVICE_ID = 0x81;
protected:
- virtual void device_start() override;
- virtual void device_reset() override;
+ virtual void device_start() override;
+ virtual void device_reset() override;
void xmit_fifo_push(uint8_t data);
uint8_t recv_fifo_pop();
@@ -47,9 +49,9 @@ protected:
enum : uint8_t
{
- CMD_INIT = 0x11,
- CMD_GET_TERM = 0x28,
- CMD_UNKNOWN_F3 = 0xf3,
+ CMD_INIT = 0x11,
+ CMD_GET_TERM = 0x28,
+ CMD_UNKNOWN_F3 = 0xf3,
};
uint8_t m_recv_buf[512]; // Buffer size is a guess
@@ -70,4 +72,4 @@ protected:
DECLARE_DEVICE_TYPE(SONYPS2_MC, ps2_mc_device)
-#endif // DEVICES_MACHINE_PS2MC_H
+#endif // MAME_MACHINE_PS2MC_H