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

Function console_lowlevel_init

bsp/simulator/drivers/uart_console.c:41–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39
40static DWORD WINAPI ThreadforKeyGet(LPVOID lpParam);
41void 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
71static DWORD WINAPI ThreadforKeyGet(LPVOID lpParam)
72#else /* POSIX version */

Callers 1

uart_console_initFunction · 0.85

Calls 2

pthread_createFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected