| 39 | |
| 40 | static DWORD WINAPI ThreadforKeyGet(LPVOID lpParam); |
| 41 | void console_lowlevel_init(void) |
| 42 | { |
| 43 | /* |
| 44 | * create serial thread that receive key input from keyboard |
| 45 | */ |
| 46 | |
| 47 | OSKey_Thread = CreateThread(NULL, |
| 48 | 0, |
| 49 | (LPTHREAD_START_ROUTINE)ThreadforKeyGet, |
| 50 | 0, |
| 51 | CREATE_SUSPENDED, |
| 52 | &OSKey_ThreadID); |
| 53 | if (OSKey_Thread == NULL) |
| 54 | { |
| 55 | //Display Error Message |
| 56 | return; |
| 57 | } |
| 58 | |
| 59 | SetThreadPriority(OSKey_Thread, |
| 60 | THREAD_PRIORITY_NORMAL); |
| 61 | SetThreadPriorityBoost(OSKey_Thread, |
| 62 | TRUE); |
| 63 | SetThreadAffinityMask(OSKey_Thread, |
| 64 | 0x01); |
| 65 | /* |
| 66 | * Start OS get key Thread |
| 67 | */ |
| 68 | ResumeThread(OSKey_Thread); |
| 69 | } |
| 70 | |
| 71 | static DWORD WINAPI ThreadforKeyGet(LPVOID lpParam) |
| 72 | #else /* POSIX version */ |
no test coverage detected