summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/eepromser.h
diff options
context:
space:
mode:
author wilbertpol <wilbertpol@users.noreply.github.com>2018-03-03 18:18:08 +0100
committer Vas Crabb <cuavas@users.noreply.github.com>2018-03-04 04:18:08 +1100
commit3b923d59ccb8d2d8e386392518450006f8e644fe (patch)
tree73c48568e76d69edbde9f96a3f57d173dd05a747 /src/devices/machine/eepromser.h
parent25472091b626bd01ef47f11389a4b2ebe0fc0008 (diff)
destaticify initializations (nw) (#3289)
* destaticify initializations (nw) * fix this->set_screen (nw)
Diffstat (limited to 'src/devices/machine/eepromser.h')
-rw-r--r--src/devices/machine/eepromser.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/devices/machine/eepromser.h b/src/devices/machine/eepromser.h
index d0d662948d8..2a68f1ea1bc 100644
--- a/src/devices/machine/eepromser.h
+++ b/src/devices/machine/eepromser.h
@@ -22,10 +22,10 @@
// optional enable for streaming reads
#define MCFG_EEPROM_SERIAL_ENABLE_STREAMING() \
- eeprom_serial_base_device::static_enable_streaming(*device);
+ downcast<eeprom_serial_base_device &>(*device).enable_streaming(true);
// optional enable for output on falling clock
#define MCFG_EEPROM_SERIAL_ENABLE_OUTPUT_ON_FALLING_CLOCK() \
- eeprom_serial_base_device::static_enable_output_on_falling_clock(*device);
+ downcast<eeprom_serial_base_device &>(*device).enable_output_on_falling_clock(true);
// standard 93CX6 class of 16-bit EEPROMs
#define MCFG_EEPROM_SERIAL_93C06_ADD(_tag) \
@@ -92,7 +92,7 @@
#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);
+ devcb = &downcast<eeprom_serial_base_device &>(*device).set_do_callback(DEVCB_##_devcb);
//**************************************************************************
@@ -106,13 +106,10 @@ class eeprom_serial_base_device : public eeprom_base_device
{
public:
// inline configuration helpers
- 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));
- }
+ void set_address_bits(int addrbits) { m_command_address_bits = addrbits; }
+ void enable_streaming(bool enable) { m_streaming_enabled = enable; }
+ void enable_output_on_falling_clock(bool enable) { m_output_on_falling_clock_enabled = enable; }
+ template<class Object> devcb_base &set_do_callback(Object &&cb) { return m_do_cb.set_callback(std::forward<Object>(cb)); }
protected:
// construction/destruction