From 165cac428e85dba174927bfd71db449906ae1927 Mon Sep 17 00:00:00 2001 From: Nigel Barnes Date: Thu, 24 Dec 2020 18:02:22 +0000 Subject: [PATCH] i2cmem.cpp: Added PCF8582 device. --- src/devices/machine/i2cmem.cpp | 6 ++++++ src/devices/machine/i2cmem.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/devices/machine/i2cmem.cpp b/src/devices/machine/i2cmem.cpp index 94c08716f97..2b026cc2b6f 100644 --- a/src/devices/machine/i2cmem.cpp +++ b/src/devices/machine/i2cmem.cpp @@ -62,6 +62,7 @@ static inline void ATTR_PRINTF( 3, 4 ) verboselog( device_t *device, int n_level // device type definition DEFINE_DEVICE_TYPE(I2C_24C01, i2c_24c01_device, "24c01", "24C01 I2C Memory") DEFINE_DEVICE_TYPE(I2C_PCD8572, i2c_pcd8572_device, "pcd8572", "PCD8572 I2C Memory") +DEFINE_DEVICE_TYPE(I2C_PCF8582, i2c_pcf8582_device, "pcf8582", "PCF8582 I2C Memory") DEFINE_DEVICE_TYPE(I2C_24C02, i2c_24c02_device, "24c02", "24C02 I2C Memory") DEFINE_DEVICE_TYPE(I2C_M24C02, i2c_m24c02_device, "m24c02", "M24C02 I2C Memory") DEFINE_DEVICE_TYPE(I2C_24C04, i2c_24c04_device, "24c04", "24C04 I2C Memory") @@ -124,6 +125,11 @@ i2c_pcd8572_device::i2c_pcd8572_device(const machine_config& mconfig, const char { } +i2c_pcf8582_device::i2c_pcf8582_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : + i2cmem_device(mconfig, I2C_PCF8582, tag, owner, clock, 0, 0, 0x100) +{ +} + i2c_24c02_device::i2c_24c02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : i2cmem_device(mconfig, I2C_24C02, tag, owner, clock, 0, 8, 0x100) { diff --git a/src/devices/machine/i2cmem.h b/src/devices/machine/i2cmem.h index 3a7916a838a..5c6707b4e3b 100644 --- a/src/devices/machine/i2cmem.h +++ b/src/devices/machine/i2cmem.h @@ -101,6 +101,7 @@ protected: DECLARE_I2C_DEVICE(24c01); DECLARE_I2C_DEVICE(pcd8572); +DECLARE_I2C_DEVICE(pcf8582); DECLARE_I2C_DEVICE(24c02); DECLARE_I2C_DEVICE(m24c02); DECLARE_I2C_DEVICE(24c04); @@ -113,6 +114,7 @@ DECLARE_I2C_DEVICE(24c512); // device type definition DECLARE_DEVICE_TYPE(I2C_24C01, i2c_24c01_device) DECLARE_DEVICE_TYPE(I2C_PCD8572, i2c_pcd8572_device) +DECLARE_DEVICE_TYPE(I2C_PCF8582, i2c_pcf8582_device) DECLARE_DEVICE_TYPE(I2C_24C02, i2c_24c02_device) DECLARE_DEVICE_TYPE(I2C_M24C02, i2c_m24c02_device) DECLARE_DEVICE_TYPE(I2C_24C04, i2c_24c04_device)