rusEFI needs K-line firmware support #3248

only:hellen-honda-k
This commit is contained in:
Andrey 2023-03-09 18:56:26 -05:00
parent a8ad6764a8
commit b385756ce5
2 changed files with 8 additions and 6 deletions

View File

@ -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) {

View File

@ -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();