* 发送一个字节 * @uartx 串口号 * @ch 待发送的字符串 */
| 163 | * @ch 待发送的字符串 |
| 164 | */ |
| 165 | void 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 | /* |
no test coverage detected