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

Function uart_putc

bsp/loongson/ls1cdev/libraries/ls1c_uart.c:165–177  ·  view source on GitHub ↗

* 发送一个字节 * @uartx 串口号 * @ch 待发送的字符串 */

Source from the content-addressed store, hash-verified

163 * @ch 待发送的字符串
164 */
165void uart_putc(ls1c_uart_t uartx, unsigned char ch)
166{
167 void *uart_base = uart_get_base(uartx);
168
169 // 等待
170 while (FALSE == uart_is_transmit_empty(uartx))
171 ;
172
173 // 发送
174 reg_write_8(ch, uart_base + LS1C_UART_DAT_OFFSET);
175
176 return ;
177}
178
179
180/*

Callers 3

uart_printFunction · 0.70
uart_debug_putcFunction · 0.70
ls1c_uart_putcFunction · 0.50

Calls 3

uart_get_baseFunction · 0.70
uart_is_transmit_emptyFunction · 0.70
reg_write_8Function · 0.70

Tested by

no test coverage detected