Lines Matching refs:port
41 * \param port Serial Port number.
45 errval_t serial_init(unsigned port, bool initialize_hw)
47 if (port >= NUM_PORTS) {
52 if (serial_portbase != 0x3f8 && port == 0) {
53 // We're trying to initialize the console port on a machine
60 port = 1;
63 pc16550d_t *uart = &ports[port];
64 pc16550d_initialize(uart, portbases[port]);
111 errval_t serial_early_init(unsigned port)
116 /** \brief Prints a single character to the default serial port. */
117 void serial_putchar(unsigned port, char c)
119 assert(port < NUM_PORTS);
120 assert(ports[port].base != 0);
122 while(!pc16550d_lsr_thre_rdf(&ports[port]));
124 pc16550d_thr_wr(&ports[port], c);
127 /** \brief Reads a single character from the default serial port.
130 char serial_getchar(unsigned port)
132 assert(port < NUM_PORTS);
133 assert(ports[port].base != 0);
136 while( !pc16550d_lsr_dr_rdf(&ports[port]));
137 return pc16550d_rbr_rd(&ports[port]);