MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_serial_putc

Function rt_serial_putc

bsp/x86/drivers/serial.c:53–64  ·  view source on GitHub ↗

* This function will write a character to serial without interrupt enable mode * * @param c the char to write */

Source from the content-addressed store, hash-verified

51 * @param c the char to write
52 */
53void rt_serial_putc(const char c)
54{
55 int val;
56
57 while(1)
58 {
59 if ((val = inb(COM1+COMSTATUS)) & THRE)
60 break;
61 }
62
63 outb(COM1+COMWRITE, c&0xff);
64}
65
66/*@}*/

Callers 2

rt_console_putcFunction · 0.70
rt_hw_console_outputFunction · 0.50

Calls 2

inbFunction · 0.85
outbFunction · 0.85

Tested by

no test coverage detected