summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices
diff options
context:
space:
mode:
author cam900 <dbtlrchl@naver.com>2019-05-01 17:36:50 +0900
committer cam900 <dbtlrchl@naver.com>2019-05-01 17:36:50 +0900
commit2cce7ba6926a48b9aa0a40944ac1c1d30038f0f5 (patch)
tree53a5f11423edb2c8a0e584a24d137fb936194f84 /src/devices
parent5501b8c228f1a28809702edc65c52a2f4560d956 (diff)
adc1213x.cpp : Simplify handlers
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/machine/adc1213x.cpp12
-rw-r--r--src/devices/machine/adc1213x.h12
2 files changed, 12 insertions, 12 deletions
diff --git a/src/devices/machine/adc1213x.cpp b/src/devices/machine/adc1213x.cpp
index 889162bcd3a..1931498f58c 100644
--- a/src/devices/machine/adc1213x.cpp
+++ b/src/devices/machine/adc1213x.cpp
@@ -113,7 +113,7 @@ void adc12138_device::device_reset()
di_w
-------------------------------------------------*/
-WRITE8_MEMBER( adc12138_device::di_w )
+void adc12138_device::di_w(u8 data)
{
m_data_in = data & 1;
}
@@ -211,7 +211,7 @@ void adc12138_device::convert(int channel, int bits16, int lsbfirst)
cs_w
-------------------------------------------------*/
-WRITE8_MEMBER( adc12138_device::cs_w )
+void adc12138_device::cs_w(u8 data)
{
if (data)
{
@@ -292,7 +292,7 @@ WRITE8_MEMBER( adc12138_device::cs_w )
sclk_w
-------------------------------------------------*/
-WRITE8_MEMBER( adc12138_device::sclk_w )
+void adc12138_device::sclk_w(u8 data)
{
if (data)
{
@@ -312,7 +312,7 @@ WRITE8_MEMBER( adc12138_device::sclk_w )
conv_w
-------------------------------------------------*/
-WRITE8_MEMBER( adc12138_device::conv_w )
+void adc12138_device::conv_w(u8 data)
{
m_end_conv = 1;
}
@@ -321,7 +321,7 @@ WRITE8_MEMBER( adc12138_device::conv_w )
do_r
-------------------------------------------------*/
-READ8_MEMBER( adc12138_device::do_r )
+u8 adc12138_device::do_r()
{
//printf("ADC: DO\n");
return m_data_out;
@@ -331,7 +331,7 @@ READ8_MEMBER( adc12138_device::do_r )
eoc_r
-------------------------------------------------*/
-READ8_MEMBER( adc12138_device::eoc_r )
+u8 adc12138_device::eoc_r()
{
return m_end_conv;
}
diff --git a/src/devices/machine/adc1213x.h b/src/devices/machine/adc1213x.h
index f8dc4f9dd4c..985659be2e3 100644
--- a/src/devices/machine/adc1213x.h
+++ b/src/devices/machine/adc1213x.h
@@ -36,12 +36,12 @@ public:
set_ipt_convert_callback(ipt_convert_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
}
- DECLARE_WRITE8_MEMBER( di_w );
- DECLARE_WRITE8_MEMBER( cs_w );
- DECLARE_WRITE8_MEMBER( sclk_w );
- DECLARE_WRITE8_MEMBER( conv_w );
- DECLARE_READ8_MEMBER( do_r );
- DECLARE_READ8_MEMBER( eoc_r );
+ void di_w(u8 data);
+ void cs_w(u8 data);
+ void sclk_w(u8 data);
+ void conv_w(u8 data = 0);
+ u8 do_r();
+ u8 eoc_r();
protected:
adc12138_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);