From 11838a75588b1b8a901f08939fdb877ccd529fba Mon Sep 17 00:00:00 2001 From: rusefi Date: Wed, 13 Nov 2019 22:47:49 -0500 Subject: [PATCH] docs --- firmware/controllers/global_shared.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/firmware/controllers/global_shared.h b/firmware/controllers/global_shared.h index 14ab8d2ecf..d5203d8cb0 100644 --- a/firmware/controllers/global_shared.h +++ b/firmware/controllers/global_shared.h @@ -57,6 +57,10 @@ /** * this macro allows the compiled to figure out the complete static address, that's a performance * optimization which is hopefully useful at least for anything trigger-related + * + * this is related to the fact that for unit tests we prefer to explicitly pass references in method signature thus code covered by + * unit tests would need to use by-reference access. These macro allow us to have faster by-address access in real firmware and by-reference + * access in unit tests */ #define CONFIG(x) persistentState.persistentConfiguration.engineConfiguration.x #define CONFIGB(x) persistentState.persistentConfiguration.engineConfiguration.bc.x