mirror of https://github.com/rusefi/rusefi.git
kline: hide under ifdef EFI_KLINE, signed vs unsigned
This commit is contained in:
parent
abad5a6e1e
commit
33875a959a
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue