summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/samcoupe/expansion/dallas.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/samcoupe/expansion/dallas.h')
-rw-r--r--src/devices/bus/samcoupe/expansion/dallas.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/devices/bus/samcoupe/expansion/dallas.h b/src/devices/bus/samcoupe/expansion/dallas.h
new file mode 100644
index 00000000000..4b011e5db34
--- /dev/null
+++ b/src/devices/bus/samcoupe/expansion/dallas.h
@@ -0,0 +1,49 @@
+// license: GPL-2.0+
+// copyright-holders: Dirk Best
+/***************************************************************************
+
+ Dallas Clock for SAM Coupe
+
+***************************************************************************/
+
+#ifndef MAME_BUS_SAMCOUPE_EXPANSION_DALLAS_H
+#define MAME_BUS_SAMCOUPE_EXPANSION_DALLAS_H
+
+#pragma once
+
+#include "expansion.h"
+#include "machine/ds128x.h"
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> sam_dallas_clock_device
+
+class sam_dallas_clock_device : public device_t, public device_samcoupe_expansion_interface
+{
+public:
+ // construction/destruction
+ sam_dallas_clock_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ // from host
+ virtual void print_w(int state) override;
+
+ virtual uint8_t iorq_r(offs_t offset) override;
+ virtual void iorq_w(offs_t offset, uint8_t data) override;
+
+protected:
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual void device_start() override;
+
+private:
+ required_device<ds12885_device> m_rtc;
+
+ int m_print;
+};
+
+// device type definition
+DECLARE_DEVICE_TYPE(SAM_DALLAS_CLOCK, sam_dallas_clock_device)
+
+#endif // MAME_BUS_SAMCOUPE_EXPANSION_DALLAS_H