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

Function console_getc

bsp/simulator/drivers/uart_console.c:232–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232static 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
245static const struct rt_uart_ops console_uart_ops =
246{

Callers

nothing calls this directly

Calls 1

rt_ringbuffer_getcharFunction · 0.85

Tested by

no test coverage detected