kline: hide under ifdef EFI_KLINE, signed vs unsigned

This commit is contained in:
Andrey Gusakov 2023-04-06 19:41:31 +03:00 committed by rusefillc
parent abad5a6e1e
commit 33875a959a
2 changed files with 4 additions and 3 deletions

View File

@ -3,7 +3,7 @@
#include "hellen_meta.h"
#include "crc8hondak.h"
size_t readWhileGives(ByteSource source, uint8_t *buffer, int bufferSize) {
size_t readWhileGives(ByteSource source, uint8_t *buffer, size_t bufferSize) {
size_t totalBytes = 0;
while (totalBytes < bufferSize) {
size_t readThisTime = source(&buffer[totalBytes], bufferSize - totalBytes);
@ -16,6 +16,8 @@ size_t readWhileGives(ByteSource source, uint8_t *buffer, int bufferSize) {
return totalBytes;
}
#ifdef EFI_KLINE
#define HONDA_K_40_PACKET 0x40
bool kAcRequestState;
@ -30,7 +32,6 @@ static void handleHonda(uint8_t *bufferIn) {
}
}
#ifdef EFI_KLINE
static SerialDriver* const klDriver = &KLINE_SERIAL_DEVICE;
static THD_WORKING_AREA(klThreadStack, UTILITY_THREAD_STACK_SIZE);

View File

@ -21,4 +21,4 @@ void startKLine();
void stopKLine();
typedef size_t (*ByteSource)(uint8_t *, int);
size_t readWhileGives(ByteSource source, uint8_t *buffer, int bufferSize);
size_t readWhileGives(ByteSource source, uint8_t *buffer, size_t bufferSize);