| 230 | } |
| 231 | |
| 232 | static int console_getc(struct rt_serial_device *serial) |
| 233 | { |
| 234 | char ch; |
| 235 | struct console_uart* uart; |
| 236 | |
| 237 | RT_ASSERT(serial != RT_NULL); |
| 238 | uart = (struct console_uart *)serial->parent.user_data; |
| 239 | |
| 240 | if (rt_ringbuffer_getchar(&(uart->rb), &ch)) return ch; |
| 241 | |
| 242 | return -1; |
| 243 | } |
| 244 | |
| 245 | static const struct rt_uart_ops console_uart_ops = |
| 246 | { |
nothing calls this directly
no test coverage detected