Skip to content

Commit

Permalink
rs232/pty: remove unused constexpr
Browse files Browse the repository at this point in the history
  • Loading branch information
happppp committed Dec 19, 2023
1 parent 47cbeaa commit a09fd45
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/devices/bus/rs232/null_modem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ static INPUT_PORTS_START(null_modem)

PORT_START("FLOW_CONTROL")
PORT_CONFNAME(0x07, 0x00, "Flow Control")
PORT_CONFSETTING(0x00, "Off")
PORT_CONFSETTING(0x01, "RTS")
PORT_CONFSETTING(0x02, "DTR")
PORT_CONFSETTING(0x04, "XON/XOFF")
PORT_CONFSETTING( 0x00, DEF_STR(Off))
PORT_CONFSETTING( 0x01, "RTS")
PORT_CONFSETTING( 0x02, "DTR")
PORT_CONFSETTING( 0x04, "XON/XOFF")
INPUT_PORTS_END

ioport_constructor null_modem_device::device_input_ports() const
Expand Down
13 changes: 6 additions & 7 deletions src/devices/bus/rs232/pty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#include <cstdio>


static constexpr int TIMER_POLL = 1;

pseudo_terminal_device::pseudo_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, PSEUDO_TERMINAL, tag, owner, clock),
device_serial_interface(mconfig, *this),
Expand Down Expand Up @@ -60,12 +58,13 @@ static INPUT_PORTS_START(pseudo_terminal)
PORT_RS232_DATABITS("RS232_DATABITS", RS232_DATABITS_8, "Data Bits", pseudo_terminal_device, update_serial)
PORT_RS232_PARITY("RS232_PARITY", RS232_PARITY_NONE, "Parity", pseudo_terminal_device, update_serial)
PORT_RS232_STOPBITS("RS232_STOPBITS", RS232_STOPBITS_1, "Stop Bits", pseudo_terminal_device, update_serial)

PORT_START("FLOW_CONTROL")
PORT_CONFNAME(0x07, 0x00, "Flow Control")
PORT_CONFSETTING(0x00, "Off")
PORT_CONFSETTING(0x01, "RTS")
PORT_CONFSETTING(0x02, "DTR")
PORT_CONFSETTING(0x04, "XON/XOFF")
PORT_CONFSETTING( 0x00, DEF_STR(Off))
PORT_CONFSETTING( 0x01, "RTS")
PORT_CONFSETTING( 0x02, "DTR")
PORT_CONFSETTING( 0x04, "XON/XOFF")
INPUT_PORTS_END

ioport_constructor pseudo_terminal_device::device_input_ports() const
Expand Down Expand Up @@ -136,7 +135,7 @@ TIMER_CALLBACK_MEMBER(pseudo_terminal_device::update_queue)
if (m_input_index == m_input_count)
{
m_input_index = 0;
int const tmp = read(m_input_buffer , sizeof(m_input_buffer));
int const tmp = read(m_input_buffer, sizeof(m_input_buffer));
if (tmp > 0)
m_input_count = tmp;
else
Expand Down
2 changes: 1 addition & 1 deletion src/devices/bus/rs232/pty.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class pseudo_terminal_device : public device_t,
required_ioport m_rs232_stopbits;
required_ioport m_flow;

uint8_t m_input_buffer[ 1024 ];
uint8_t m_input_buffer[1024];
uint32_t m_input_count;
uint32_t m_input_index;
emu_timer *m_timer_poll;
Expand Down
2 changes: 1 addition & 1 deletion src/emu/dipty.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class device_pty_interface : public device_interface

bool is_open() const;

ssize_t read(u8 *rx_chars , size_t count) const;
ssize_t read(u8 *rx_chars, size_t count) const;
void write(u8 tx_char) const;

bool is_slave_connected() const;
Expand Down

0 comments on commit a09fd45

Please sign in to comment.