From 79b0bc642ca07127ad3a280c2021159400df02fb Mon Sep 17 00:00:00 2001 From: Andrei Date: Sun, 4 Jun 2017 22:05:15 +0300 Subject: [PATCH] Persistent store --- firmware/controllers/persistent_store.cpp | 42 +++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 firmware/controllers/persistent_store.cpp diff --git a/firmware/controllers/persistent_store.cpp b/firmware/controllers/persistent_store.cpp new file mode 100644 index 0000000000..20b1860a47 --- /dev/null +++ b/firmware/controllers/persistent_store.cpp @@ -0,0 +1,42 @@ +/** + * @file persistent_store.cpp + * @brief Controllers package entry point code + * + * + * + * @date Feb 7, 2013 + * @author Andrey Belomutskiy, (c) 2012-2017 + * + * This file is part of rusEfi - see http://rusefi.com + * + * rusEfi is free software; you can redistribute it and/or modify it under the terms of + * the GNU General Public License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with this program. + * If not, see . + */ + +#include "sensor_chart.h" +#include "main.h" +#include "engine_configuration.h" +#include "trigger_central.h" +#include "engine_controller.h" + + +persistent_config_container_s persistentState CCM_OPTIONAL; + +const persistent_config_s *config = &persistentState.persistentConfiguration; + +/** + * todo: it really looks like these fields should become 'static', i.e. private + * the whole 'extern ...' pattern is less then perfect, I guess the 'God object' Engine + * would be a smaller evil. Whatever is needed should be passed into methods/modules/files as an explicit parameter. + */ +const engine_configuration_s *engineConfiguration = &persistentState.persistentConfiguration.engineConfiguration; +const board_configuration_s *boardConfiguration = &persistentState.persistentConfiguration.engineConfiguration.bc; +