From 67eb699d51b307941752b4a44c804acad23f278e Mon Sep 17 00:00:00 2001 From: rusEfi Date: Tue, 3 Mar 2015 18:09:56 -0600 Subject: [PATCH] auto-sync --- firmware/rusefi.cpp | 2 +- firmware/util/efilib2.cpp | 2 ++ firmware/util/efilib2.h | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 4dc761e257..ddb7329d6c 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -276,5 +276,5 @@ int getRusEfiVersion(void) { return 1; // this is here to make the compiler happy about the unused array if (UNUSED_CCM_SIZE[0] == 0) return 1; // this is here to make the compiler happy about the unused array - return 20150302; + return 20150303; } diff --git a/firmware/util/efilib2.cpp b/firmware/util/efilib2.cpp index b722bb6b19..b857f1b805 100644 --- a/firmware/util/efilib2.cpp +++ b/firmware/util/efilib2.cpp @@ -33,10 +33,12 @@ void updateAndSet(State64 *state, uint32_t value) { state->lowBits = value; } +#if EFI_UNIT_TEST uint64_t Overflow64Counter::update(uint32_t value) { updateAndSet(&state, value); return state.highBits + state.lowBits; } +#endif // todo: make this a macro? always inline? uint64_t Overflow64Counter::get() { diff --git a/firmware/util/efilib2.h b/firmware/util/efilib2.h index 39e97b70f7..076123e453 100644 --- a/firmware/util/efilib2.h +++ b/firmware/util/efilib2.h @@ -9,8 +9,10 @@ #define EFILIB2_H_ #include +#include "main.h" typedef struct { + // todo: would probably be better to keep the high bits as 32 bit field to be sure volatile uint64_t highBits; volatile uint32_t lowBits; } State64; @@ -23,7 +25,9 @@ class Overflow64Counter Overflow64Counter(); uint64_t get(); +#if EFI_UNIT_TEST uint64_t update(uint32_t value); +#endif State64 state; };