parent
a8ad6764a8
commit
b385756ce5
|
@ -12,11 +12,14 @@ static int kLineOut;
|
|||
|
||||
void kLineThread(void*) {
|
||||
while (1) {
|
||||
uint8_t ch = 0;
|
||||
chnReadTimeout(klDriver, &ch, 1, KLINE_READ_TIMEOUT);
|
||||
uint8_t bufferIn[16];
|
||||
int count = chnReadTimeout(klDriver, bufferIn, sizeof(bufferIn), KLINE_READ_TIMEOUT);
|
||||
// to begin with just write byte to console
|
||||
if (ch != 0) {
|
||||
efiPrintf("kline: 0x%02x", ch);
|
||||
if (count > 0) {
|
||||
efiPrintf("kline: got count 0x%02x", count);
|
||||
for (int i =0;i<count;i++) {
|
||||
efiPrintf("kline: got 0x%02x", bufferIn[i]);
|
||||
}
|
||||
totalBytes++;
|
||||
}
|
||||
if (kLineOutPending) {
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
// The standard transmission rate
|
||||
#define KLINE_BAUD_RATE 10400
|
||||
|
||||
#define KLINE_READ_TIMEOUT 50
|
||||
|
||||
#define KLINE_READ_TIMEOUT TIME_MS2I(1)
|
||||
|
||||
void initKLine();
|
||||
|
||||
|
|
Loading…
Reference in New Issue