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

Function rt_hw_exit

bsp/simulator/drivers/board.c:67–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65#endif
66
67void rt_hw_exit(void)
68{
69 rt_kprintf("RT-Thread, bye\n");
70#if !defined(_WIN32) && defined(__GNUC__)
71 /* *
72 * getchar reads key from buffer, while finsh need an non-buffer getchar
73 * in windows, getch is such an function, in linux, we had to change
74 * the behaviour of terminal to get an non-buffer getchar.
75 * in usart_sim.c, set_stty is called to do this work
76 * */
77 {
78 extern void restore_stty(void);
79 restore_stty();
80 }
81#endif
82 exit(0);
83}
84
85#if defined(RT_USING_FINSH)
86#include <finsh.h>

Callers 1

sdl_loopFunction · 0.85

Calls 2

rt_kprintfFunction · 0.85
restore_sttyFunction · 0.85

Tested by

no test coverage detected