aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-08 22:59:04 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:10:39 +0100
commit1ed2a620b5ac6272de01be7f1830715f7f0d280d (patch)
tree472082877c9bcb227963bb06b929fa2c827686b0
parentfd56d95d7f9794aafdbe8afae1dc212b232ae83b (diff)
Move "config" variable as global.
Change-Id: I1760dce5ef5836c9392837f4a196382ee88dabd8 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh> Conflicts: src/configuration.hpp
-rw-r--r--src/configuration.hpp4
-rw-r--r--src/low-can-binding.cpp1
-rw-r--r--src/low-can-binding.hpp6
3 files changed, 6 insertions, 5 deletions
diff --git a/src/configuration.hpp b/src/configuration.hpp
index 823d8864..77f452ff 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 759437bc..46dcbf26 100644
--- a/src/low-can-binding.cpp
+++ b/src/low-can-binding.cpp
@@ -27,6 +27,7 @@
#include <systemd/sd-event.h>
#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 1509c2a6..04c7eac4 100644
--- a/src/low-can-binding.hpp
+++ b/src/low-can-binding.hpp
@@ -20,8 +20,6 @@
#include <cstddef>
-#include "configuration.hpp"
-
extern "C"
{
#include <afb/afb-binding.h>
@@ -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