Previous 199869 Revisions Next

r26767 Thursday 26th December, 2013 at 21:12:44 UTC by smf
removed serial_source_device [smf]
[src/emu]diserial.c diserial.h

trunk/src/emu/diserial.c
r26766r26767
470470   /* let a know the state of b */
471471   other_connection->serial_connection_out();
472472}
473
474
475
476const device_type SERIAL_SOURCE = &device_creator<serial_source_device>;
477
478//-------------------------------------------------
479//  serial_source_device - constructor
480//-------------------------------------------------
481
482serial_source_device::serial_source_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
483   : device_t(mconfig, SERIAL_SOURCE, "Serial source", tag, owner, clock, "serial_source", __FILE__),
484      device_serial_interface(mconfig, *this)
485{
486}
487
488void serial_source_device::device_start()
489{
490}
491
492void serial_source_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
493{
494   device_serial_interface::device_timer(timer, id, param, ptr);
495}
496
497void serial_source_device::input_callback(UINT8 state)
498{
499   m_input_state = state;
500}
501
502void serial_source_device::send_bit(UINT8 data)
503{
504   set_out_data_bit(data);
505   serial_connection_out();
506}
trunk/src/emu/diserial.h
r26766r26767
157157   void rcv_edge();
158158};
159159
160
161class serial_source_device :  public device_t,
162                        public device_serial_interface
163{
164public:
165   // construction/destruction
166   serial_source_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
167
168   virtual void input_callback(UINT8 state);
169   void send_bit(UINT8 data);
170protected:
171   // device-level overrides
172   virtual void device_start();
173   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
174};
175
176extern const device_type SERIAL_SOURCE;
177
178#define MCFG_SERIAL_SOURCE_ADD(_tag)    \
179   MCFG_DEVICE_ADD((_tag), SERIAL_SOURCE, 0)
180
181160#endif  /* __DISERIAL_H__ */

Previous 199869 Revisions Next


© 1997-2024 The MAME Team