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

Function rt_hw_console_getchar

bsp/tae32f5300/board/board.c:106–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106char rt_hw_console_getchar(void)
107{
108 /* note: ch default value < 0 */
109 int ch = -1;
110 if (__LL_UART_IsDatReady(UART0))
111 {
112 /* receive data */
113 ch = __LL_UART_RxBuf9bits_Read(UART0);
114 }
115 else
116 {
117 rt_thread_mdelay(10);
118 }
119 return ch;
120}
121
122void SystemClock_Config(void)
123{

Callers 1

finsh_getcharFunction · 0.50

Calls 1

rt_thread_mdelayFunction · 0.85

Tested by

no test coverage detected