| 65 | #endif |
| 66 | |
| 67 | void 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> |
no test coverage detected