summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/mos6551.c
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2014-01-13 11:20:45 +0000
committer smf- <smf-@users.noreply.github.com>2014-01-13 11:20:45 +0000
commit61424105fbd4e5f3604921edeacb588565c8a1e4 (patch)
tree74c927345759961ef88d76f77366d8cac6991a31 /src/emu/machine/mos6551.c
parenta1b3437fc42bd2260707f09813a8d788381ae702 (diff)
Changed parity & stop bits to an enum (you can now pass in 1.5). I've updated the uarts that were testing for 1.5 stop bits to pass that in, but there are probably others & 1.5 stop bits is converted to 2 by diserial. However the 68681 requires stop bits to be specified in clocks, so this will change in the future. Replaced synchronous flag with start bit count, as some uarts can use a start bit in synchronous mode & that whether there is a start bit is all the flag is currently controlling. Updated rs232 terminal to allow startbits, stop bits 1.5 to be specified (although that is currently not supported by diserial) and individual transmit and receive baud rates. [smf]
Diffstat (limited to 'src/emu/machine/mos6551.c')
-rw-r--r--src/emu/machine/mos6551.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/emu/machine/mos6551.c b/src/emu/machine/mos6551.c
index e50cf53c420..2aa08bab002 100644
--- a/src/emu/machine/mos6551.c
+++ b/src/emu/machine/mos6551.c
@@ -202,19 +202,19 @@ void mos6551_device::update_serial()
{
int brg = m_ctrl & CTRL_BRG_MASK;
- int num_data_bits = 8;
- int stop_bit_count = 1;
- int parity_code = PARITY_NONE;
-
+ int data_bits_count;
switch (m_ctrl & CTRL_WL_MASK)
{
- case CTRL_WL_8: num_data_bits = 8; break;
- case CTRL_WL_7: num_data_bits = 7; break;
- case CTRL_WL_6: num_data_bits = 6; break;
- case CTRL_WL_5: num_data_bits = 5; break;
+ case CTRL_WL_8: default: data_bits_count = 8; break;
+ case CTRL_WL_7: data_bits_count = 7; break;
+ case CTRL_WL_6: data_bits_count = 6; break;
+ case CTRL_WL_5: data_bits_count = 5; break;
}
- set_data_frame(num_data_bits, stop_bit_count, parity_code, false);
+ parity_t parity = PARITY_NONE;
+ stop_bits_t stop_bits = STOP_BITS_1;
+
+ set_data_frame(1, data_bits_count, parity, stop_bits);
if (brg == CTRL_BRG_16X_EXTCLK)
{