summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/drivers/px4.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/mess/drivers/px4.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/mess/drivers/px4.c')
-rw-r--r--src/mess/drivers/px4.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mess/drivers/px4.c b/src/mess/drivers/px4.c
index e1f44167b02..2baaf27950d 100644
--- a/src/mess/drivers/px4.c
+++ b/src/mess/drivers/px4.c
@@ -862,14 +862,14 @@ READ8_MEMBER( px4_state::px4_artsr_r )
// art mode register
WRITE8_MEMBER( px4_state::px4_artmr_w )
{
- int data_bits = BIT(data, 2) ? 8 : 7;
- int parity = BIT(data, 4) ? (BIT(data, 5) ? PARITY_EVEN : PARITY_ODD) : PARITY_NONE;
- int stop_bits = BIT(data, 7) ? 2 : 1;
+ int data_bit_count = BIT(data, 2) ? 8 : 7;
+ parity_t parity = BIT(data, 4) ? (BIT(data, 5) ? PARITY_EVEN : PARITY_ODD) : PARITY_NONE;
+ stop_bits_t stop_bits = BIT(data, 7) ? STOP_BITS_2 : STOP_BITS_1;
if (VERBOSE)
- logerror("%s: serial frame setup: %d-%d-%d\n", tag(), data_bits, stop_bits, parity);
+ logerror("%s: serial frame setup: %d-%s-%d\n", tag(), data_bit_count, device_serial_interface::parity_tostring(parity), stop_bits);
- set_data_frame(data_bits, stop_bits, parity, false);
+ set_data_frame(1, data_bit_count, parity, stop_bits);
}
// io status register