summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/eeprom.h
diff options
context:
space:
mode:
author mooglyguy <therealmogminer@gmail.com>2018-08-23 18:34:05 +0200
committer mooglyguy <therealmogminer@gmail.com>2018-08-23 18:34:21 +0200
commitf10c6be54ff10fe557388f4e1d7fe3b648782b21 (patch)
tree24c452f1943990bbb683220b4b71315a89e7926f /src/devices/machine/eeprom.h
parent5d5a94e3d7bd1e7b4a3d66f68fb20fc4259480b5 (diff)
ds1315, ds1386, ds2404, ds75160a, ds75161a, eeprom, eepromser, eeprompar: Removed MCFG, nw
Diffstat (limited to 'src/devices/machine/eeprom.h')
-rw-r--r--src/devices/machine/eeprom.h44
1 files changed, 9 insertions, 35 deletions
diff --git a/src/devices/machine/eeprom.h b/src/devices/machine/eeprom.h
index 0cf280d6441..eb0a64b9234 100644
--- a/src/devices/machine/eeprom.h
+++ b/src/devices/machine/eeprom.h
@@ -13,36 +13,6 @@
#pragma once
-
-
-//**************************************************************************
-// INTERFACE CONFIGURATION MACROS
-//**************************************************************************
-
-#define MCFG_EEPROM_SIZE(_cells, _cellbits) \
- downcast<eeprom_base_device &>(*device).set_size(_cells, _cellbits);
-#define MCFG_EEPROM_DATA(_data, _size) \
- downcast<eeprom_base_device &>(*device).set_default_data(_data, _size);
-#define MCFG_EEPROM_DEFAULT_VALUE(_value) \
- downcast<eeprom_base_device &>(*device).set_default_value(_value);
-
-#define MCFG_EEPROM_WRITE_TIME(_value) \
- downcast<eeprom_base_device &>(*device).set_timing(eeprom_base_device::WRITE_TIME, _value);
-#define MCFG_EEPROM_WRITE_ALL_TIME(_value) \
- downcast<eeprom_base_device &>(*device).set_timing(eeprom_base_device::WRITE_ALL_TIME, _value);
-#define MCFG_EEPROM_ERASE_TIME(_value) \
- downcast<eeprom_base_device &>(*device).set_timing(eeprom_base_device::ERASE_TIME, _value);
-#define MCFG_EEPROM_ERASE_ALL_TIME(_value) \
- downcast<eeprom_base_device &>(*device).set_timing(eeprom_base_device::ERASE_ALL_TIME, _value);
-
-
-
-//**************************************************************************
-// TYPE DEFINITIONS
-//**************************************************************************
-
-// ======================> eeprom_base_device
-
class eeprom_base_device : public device_t,
public device_nvram_interface
{
@@ -58,11 +28,15 @@ public:
};
// inline configuration helpers
- void set_size(int cells, int cellbits);
- void set_default_data(const uint8_t *data, uint32_t size);
- void set_default_data(const uint16_t *data, uint32_t size);
- void set_default_value(uint32_t value) { m_default_value = value; m_default_value_set = true; }
- void set_timing(timing_type type, const attotime &duration) { m_operation_time[type] = duration; }
+ eeprom_base_device& size(int cells, int cellbits);
+ eeprom_base_device& default_data(const uint8_t *data, uint32_t size);
+ eeprom_base_device& default_data(const uint16_t *data, uint32_t size);
+ eeprom_base_device& default_value(uint32_t value) { m_default_value = value; m_default_value_set = true; return *this; }
+ eeprom_base_device& timing(timing_type type, const attotime &duration) { m_operation_time[type] = duration; return *this; }
+ eeprom_base_device& write_time(const attotime &duration) { m_operation_time[eeprom_base_device::WRITE_TIME] = duration; return *this; }
+ eeprom_base_device& write_all_time(const attotime &duration) { m_operation_time[eeprom_base_device::WRITE_ALL_TIME] = duration; return *this; }
+ eeprom_base_device& erase_time(const attotime &duration) { m_operation_time[eeprom_base_device::ERASE_TIME] = duration; return *this; }
+ eeprom_base_device& erase_all_time(const attotime &duration) { m_operation_time[eeprom_base_device::ERASE_ALL_TIME] = duration; return *this; }
// read/write/erase data
uint32_t read(offs_t address);