dear santa please fix my k-line

This commit is contained in:
rusefillc 2023-02-18 23:13:24 -05:00
parent 5202229fc8
commit 659e3ae186
1 changed files with 6 additions and 0 deletions

View File

@ -7,6 +7,8 @@
static SerialDriver* const klDriver = KLINE_SERIAL_DEVICE;
static THD_WORKING_AREA(klThreadStack, UTILITY_THREAD_STACK_SIZE);
static int totalBytes = 0;
void kLineThread(void*)
{
while(1)
@ -16,6 +18,7 @@ void kLineThread(void*)
// to begin with just write byte to console
if (ch != 0) {
efiPrintf("kline: %c", ch);
totalBytes++;
}
}
}
@ -41,5 +44,8 @@ void initKLine() {
sdStart(klDriver, &cfg);
chThdCreateStatic(klThreadStack, sizeof(klThreadStack), NORMALPRIO + 1, kLineThread, nullptr);
addConsoleAction("kline", [](){
efiPrintf("kline totalBytes %d", totalBytes);
});
#endif
}