trunk/src/emu/bus/rs232/loopback.c
| r0 | r29357 | |
| 1 | // license:MAME |
| 2 | // copyright-holders:smf |
| 3 | |
| 4 | #include "loopback.h" |
| 5 | |
| 6 | const device_type RS232_LOOPBACK = &device_creator<rs232_loopback_device>; |
| 7 | |
| 8 | rs232_loopback_device::rs232_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 9 | : device_t(mconfig, RS232_LOOPBACK, "RS232 Loopback", tag, owner, clock, "rs232_loopback", __FILE__), |
| 10 | device_rs232_port_interface(mconfig, *this) |
| 11 | { |
| 12 | } |
| 13 | |
| 14 | void rs232_loopback_device::device_start() |
| 15 | { |
| 16 | } |
trunk/src/emu/bus/rs232/loopback.h
| r0 | r29357 | |
| 1 | // license:MAME |
| 2 | // copyright-holders:smf |
| 3 | |
| 4 | #ifndef RS232_LOOPBACK_H_ |
| 5 | #define RS232_LOOPBACK_H_ |
| 6 | |
| 7 | #include "bus/rs232/rs232.h" |
| 8 | |
| 9 | class rs232_loopback_device : public device_t, |
| 10 | public device_rs232_port_interface |
| 11 | { |
| 12 | public: |
| 13 | rs232_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 14 | |
| 15 | virtual WRITE_LINE_MEMBER( input_txd ) { output_rxd(state); } |
| 16 | virtual WRITE_LINE_MEMBER( input_rts ) { output_ri(state); output_cts(state); } |
| 17 | virtual WRITE_LINE_MEMBER( input_dtr ) { output_dsr(state); output_dcd(state); } |
| 18 | |
| 19 | protected: |
| 20 | virtual void device_start(); |
| 21 | }; |
| 22 | |
| 23 | extern const device_type RS232_LOOPBACK; |
| 24 | |
| 25 | #endif |