diff options
author | 2013-11-18 21:05:30 +0000 | |
---|---|---|
committer | 2013-11-18 21:05:30 +0000 | |
commit | 671ba32470a9aee7a72180c750170855f0fd9b1f (patch) | |
tree | 79c426e10df96a12e8eb93f7f9c7c23305235264 /src/mess/machine/keyboard.c | |
parent | 8c7bc3bfa741fd4cdfab9ba2af24da5742bc6906 (diff) |
diserial: Remove defines, cleanup clocks/timers, add sync support [O. Galibert]
Diffstat (limited to 'src/mess/machine/keyboard.c')
-rw-r--r-- | src/mess/machine/keyboard.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/mess/machine/keyboard.c b/src/mess/machine/keyboard.c index f271d8ab895..d1c777e5b19 100644 --- a/src/mess/machine/keyboard.c +++ b/src/mess/machine/keyboard.c @@ -436,7 +436,7 @@ void serial_keyboard_device::device_start() m_slot = m_owner && 1; m_timer = timer_alloc(); set_tra_rate(baud); - set_data_frame(8, 1, SERIAL_PARITY_NONE); + set_data_frame(8, 1, PARITY_NONE, false); } INPUT_CHANGED_MEMBER(serial_keyboard_device::update_frame) @@ -459,21 +459,29 @@ void serial_keyboard_device::device_reset() switch(val & 0x30) { case 0x10: - set_data_frame(7, 1, SERIAL_PARITY_EVEN); + set_data_frame(7, 1, PARITY_EVEN, false); break; case 0x00: default: - set_data_frame(8, 1, SERIAL_PARITY_NONE); + set_data_frame(8, 1, PARITY_NONE, false); break; case 0x20: - set_data_frame(8, 2, SERIAL_PARITY_NONE); + set_data_frame(8, 2, PARITY_NONE, false); break; case 0x30: - set_data_frame(8, 1, SERIAL_PARITY_EVEN); + set_data_frame(8, 1, PARITY_EVEN, false); break; } } +void serial_keyboard_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + if (id) + device_serial_interface::device_timer(timer, id, param, ptr); + else + generic_keyboard_device::device_timer(timer, id, param, ptr); +} + void serial_keyboard_device::send_key(UINT8 code) { if(is_transmit_register_empty()) |