rusEFI
The most advanced open source ECU
persistent_store.cpp
Go to the documentation of this file.
1 /**
2  * @file persistent_store.cpp
3  * @brief Controllers package entry point code
4  *
5  *
6  *
7  * @date Feb 7, 2013
8  * @author Andrey Belomutskiy, (c) 2012-2020
9  *
10  * This file is part of rusEfi - see http://rusefi.com
11  *
12  * rusEfi is free software; you can redistribute it and/or modify it under the terms of
13  * the GNU General Public License as published by the Free Software Foundation; either
14  * version 3 of the License, or (at your option) any later version.
15  *
16  * rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
17  * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License along with this program.
21  * If not, see <http://www.gnu.org/licenses/>.
22  */
23 
24 #include "pch.h"
25 
26 #if !EFI_UNIT_TEST
27 #include "sensor_chart.h"
28 #include "trigger_central.h"
29 
30 #ifndef PERSISTENT_LOCATION
31 #define PERSISTENT_LOCATION CCM_OPTIONAL
32 #else
33 /* nothing */
34 #endif
35 
36 // Magic from https://stackoverflow.com/questions/1562074/how-do-i-show-the-value-of-a-define-at-compile-time
37 /* definition to expand macro then apply to pragma message */
38 #define VALUE_TO_STRING(x) #x
39 #define VALUE(x) VALUE_TO_STRING(x)
40 #define VAR_NAME_VALUE(var) #var "=" VALUE(var)
41 #pragma message(VAR_NAME_VALUE(PERSISTENT_LOCATION))
42 
44 
45 #else // EFI_UNIT_TEST
46 
49 
50 #endif /* EFI_UNIT_TEST */
persistent_config_container_s persistentState
persistent_config_s * config
persistent_config_container_s persistentState PERSISTENT_LOCATION
engine_configuration_s * engineConfiguration