diff options
Diffstat (limited to 'src/devices/machine/eepromser.h')
-rw-r--r-- | src/devices/machine/eepromser.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/devices/machine/eepromser.h b/src/devices/machine/eepromser.h index 0eefba08276..d0d662948d8 100644 --- a/src/devices/machine/eepromser.h +++ b/src/devices/machine/eepromser.h @@ -91,6 +91,8 @@ #define MCFG_EEPROM_SERIAL_DATA MCFG_EEPROM_DATA #define MCFG_EEPROM_SERIAL_DEFAULT_VALUE MCFG_EEPROM_DEFAULT_VALUE +#define MCFG_EEPROM_SERIAL_DO_CALLBACK(_devcb) \ + devcb = &eeprom_serial_base_device::static_set_do_callback(*device, DEVCB_##_devcb); //************************************************************************** @@ -107,6 +109,10 @@ public: static void static_set_address_bits(device_t &device, int addrbits); static void static_enable_streaming(device_t &device); static void static_enable_output_on_falling_clock(device_t &device); + template<class Object> static devcb_base &static_set_do_callback(device_t &device, Object &&object) + { + return downcast<eeprom_serial_base_device &>(device).m_do_cb.set_callback(std::forward<Object>(object)); + } protected: // construction/destruction @@ -174,6 +180,7 @@ protected: uint8_t m_command_address_bits; // number of address bits in a command bool m_streaming_enabled; // true if streaming is enabled bool m_output_on_falling_clock_enabled; // true if the output pin is updated on the falling edge of the clock + devcb_write_line m_do_cb; // callback to push state of DO line // runtime state eeprom_state m_state; // current internal state @@ -314,7 +321,7 @@ DECLARE_SERIAL_EEPROM_DEVICE(93cxx, s29190, S29190, 16) DECLARE_SERIAL_EEPROM_DEVICE(93cxx, s29290, S29290, 16) DECLARE_SERIAL_EEPROM_DEVICE(93cxx, s29390, S29390, 16) -// X24c44 8 bit 32byte ram/eeprom combo +// X24c44 16 bit 32byte ram/eeprom combo DECLARE_SERIAL_EEPROM_DEVICE(x24c44, x24c44, X24C44, 16) #endif // MAME_MACHINE_EEPROMSER_H |