Lines Matching refs:ops

148   for (const serial_ops *ops : serial_ops_list)
149 if (strcmp (name, ops->name) == 0)
150 return ops;
179 new_serial (const struct serial_ops *ops)
185 scb->ops = ops;
194 static struct serial *serial_open_ops_1 (const struct serial_ops *ops,
202 const struct serial_ops *ops;
207 ops = serial_interface_lookup ("pipe");
216 ops = serial_interface_lookup ("tcp");
224 ops = serial_interface_lookup ("local");
227 ops = serial_interface_lookup ("hardwire");
230 if (!ops)
233 return serial_open_ops_1 (ops, open_name);
239 serial_open_ops_1 (const struct serial_ops *ops, const char *open_name)
243 scb = new_serial (ops);
246 if ((*scb->ops->open) (scb, open_name))
272 serial_open_ops (const struct serial_ops *ops)
274 return serial_open_ops_1 (ops, NULL);
278 interface ops OPS. */
281 serial_fdopen_ops (const int fd, const struct serial_ops *ops)
285 if (!ops)
287 ops = serial_interface_lookup ("terminal");
288 if (!ops)
289 ops = serial_interface_lookup ("hardwire");
292 if (!ops)
295 scb = new_serial (ops);
301 if ((ops->fdopen) != NULL)
302 (*ops->fdopen) (scb, fd);
335 scb->ops->close (scb);
400 ch = scb->ops->readchar (scb, timeout);
449 return (scb->ops->write (scb, buf, count));
467 return scb->ops->drain_output (scb);
473 return scb->ops->flush_output (scb);
479 return scb->ops->flush_input (scb);
488 return (scb->ops->send_break (scb));
494 scb->ops->go_raw (scb);
500 return scb->ops->get_tty_state (scb);
506 return scb->ops->copy_tty_state (scb, ttystate);
512 return scb->ops->set_tty_state (scb, ttystate);
520 scb->ops->print_tty_state (scb, ttystate, stream);
526 return scb->ops->setbaudrate (scb, rate);
532 return scb->ops->setstopbits (scb, num);
540 return scb->ops->setparity (scb, parity);
546 return (scb->ops->async != NULL);
552 return (scb->ops->async != NULL) && (scb->async_handler != NULL);
566 scb->ops->async (scb, handler != NULL);
585 if (scb->ops->wait_handle)
586 scb->ops->wait_handle (scb, read, except);
597 if (scb->ops->done_wait_handle)
598 scb->ops->done_wait_handle (scb);
605 const struct serial_ops *ops;
608 ops = serial_interface_lookup ("pipe");
609 if (!ops)
618 scbs[0] = serial_fdopen_ops (fildes[0], ops);
619 scbs[1] = serial_fdopen_ops (fildes[1], ops);