void _initialize_ser_hardwire (void) { struct serial_ops *ops = XMALLOC (struct serial_ops); memset (ops, 0, sizeof (struct serial_ops)); ops->name = "hardwire"; ops->next = 0; ops->open = hardwire_open; ops->close = hardwire_close; /* FIXME: Don't replace this with the equivalent ser_unix*() until the old TERMIOS/SGTTY/... timer code has been flushed. cagney 1999-09-16. */ ops->readchar = hardwire_readchar; ops->write = ser_unix_write; ops->flush_output = hardwire_flush_output; ops->flush_input = hardwire_flush_input; ops->send_break = hardwire_send_break; ops->go_raw = hardwire_raw; ops->get_tty_state = hardwire_get_tty_state; ops->set_tty_state = hardwire_set_tty_state; ops->print_tty_state = hardwire_print_tty_state; ops->noflush_set_tty_state = hardwire_noflush_set_tty_state; ops->setbaudrate = hardwire_setbaudrate; ops->setstopbits = hardwire_setstopbits; ops->drain_output = hardwire_drain_output; ops->async = ser_unix_async; serial_add_interface (ops); }
void _initialize_ser_tcp (void) { struct serial_ops *ops = XMALLOC (struct serial_ops); memset (ops, 0, sizeof (struct serial_ops)); ops->name = "tcp"; ops->next = 0; ops->open = net_open; ops->close = net_close; ops->readchar = ser_unix_readchar; ops->write = ser_unix_write; ops->flush_output = ser_unix_nop_flush_output; ops->flush_input = ser_unix_flush_input; ops->send_break = ser_unix_nop_send_break; ops->go_raw = ser_unix_nop_raw; ops->get_tty_state = ser_unix_nop_get_tty_state; ops->set_tty_state = ser_unix_nop_set_tty_state; ops->print_tty_state = ser_unix_nop_print_tty_state; ops->noflush_set_tty_state = ser_unix_nop_noflush_set_tty_state; ops->setbaudrate = ser_unix_nop_setbaudrate; ops->setstopbits = ser_unix_nop_setstopbits; ops->drain_output = ser_unix_nop_drain_output; ops->async = ser_unix_async; serial_add_interface (ops); }
void _initialize_ser_tcp (void) { #ifdef USE_WIN32API /* Do nothing; the TCP serial operations will be initialized in ser-mingw.c. */ return; #else struct serial_ops *ops; ops = XMALLOC (struct serial_ops); memset (ops, 0, sizeof (struct serial_ops)); ops->name = "tcp"; ops->next = 0; ops->open = net_open; ops->close = net_close; ops->readchar = ser_base_readchar; ops->write = ser_base_write; ops->flush_output = ser_base_flush_output; ops->flush_input = ser_base_flush_input; ops->send_break = ser_tcp_send_break; ops->go_raw = ser_base_raw; ops->get_tty_state = ser_base_get_tty_state; ops->set_tty_state = ser_base_set_tty_state; ops->print_tty_state = ser_base_print_tty_state; ops->noflush_set_tty_state = ser_base_noflush_set_tty_state; ops->setbaudrate = ser_base_setbaudrate; ops->setstopbits = ser_base_setstopbits; ops->drain_output = ser_base_drain_output; ops->async = ser_base_async; ops->read_prim = net_read_prim; ops->write_prim = net_write_prim; serial_add_interface (ops); #endif /* USE_WIN32API */ }
void _initialize_remote_mobile (void) { struct serial_ops *ops = xmalloc (sizeof(struct serial_ops)); init_remote_mobile_ops (); add_target (&remote_mobile_ops); /* This is the "file handle" serial ops. The only difference from the standard serial ops is that we already have an open file handle which gets passed to us from some source that can talk to the mobile device framework. */ memset (ops, 0, sizeof (struct serial_ops)); ops->name = "filedesc"; ops->next = 0; ops->open = filedesc_open; ops->close = filedesc_close; ops->readchar = ser_base_readchar; ops->write = ser_base_write; ops->flush_output = ser_base_flush_output; ops->flush_input = ser_base_flush_input; ops->send_break = ser_base_send_break; ops->go_raw = ser_base_raw; ops->get_tty_state = ser_base_get_tty_state; ops->set_tty_state = ser_base_set_tty_state; ops->print_tty_state = ser_base_print_tty_state; ops->noflush_set_tty_state = ser_base_noflush_set_tty_state; ops->setbaudrate = ser_base_setbaudrate; ops->setstopbits = ser_base_setstopbits; ops->drain_output = ser_base_drain_output; ops->async = ser_base_async; ops->read_prim = ser_unix_read_prim; ops->write_prim = ser_unix_write_prim; serial_add_interface (ops); }