From 1ed2a620b5ac6272de01be7f1830715f7f0d280d Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Wed, 8 Mar 2017 22:59:04 +0100 Subject: Move "config" variable as global. Change-Id: I1760dce5ef5836c9392837f4a196382ee88dabd8 Signed-off-by: Romain Forlot Conflicts: src/configuration.hpp --- src/configuration.hpp | 4 ++++ src/low-can-binding.cpp | 1 + src/low-can-binding.hpp | 6 +----- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/configuration.hpp b/src/configuration.hpp index 823d886..77f452f 100644 --- a/src/configuration.hpp +++ b/src/configuration.hpp @@ -101,3 +101,7 @@ class configuration_t bool isBusActive(can_bus_dev_t* bus); */ }; + +// Make a global variable pointer +extern configuration_t *config; + diff --git a/src/low-can-binding.cpp b/src/low-can-binding.cpp index 759437b..46dcbf2 100644 --- a/src/low-can-binding.cpp +++ b/src/low-can-binding.cpp @@ -27,6 +27,7 @@ #include #include "openxc.pb.h" +#include "configuration.hpp" #include "can/can-bus.hpp" #include "can/can-signals.hpp" #include "can/can-message.hpp" diff --git a/src/low-can-binding.hpp b/src/low-can-binding.hpp index 1509c2a..04c7eac 100644 --- a/src/low-can-binding.hpp +++ b/src/low-can-binding.hpp @@ -20,8 +20,6 @@ #include -#include "configuration.hpp" - extern "C" { #include @@ -29,6 +27,4 @@ extern "C" extern "C" struct afb_binding_interface; -extern const struct afb_binding_interface *binder_interface; - -extern configuration_t *config; \ No newline at end of file +extern const struct afb_binding_interface *binder_interface; \ No newline at end of file -- cgit 1.2.3-korg