summaryrefslogtreecommitdiffstats
path: root/ctl-lib
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2018-07-10 10:20:12 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 15:02:55 +0100
commitc9ed0f7a1556a7c0828aec0daf4db19cdf0f29a4 (patch)
tree9becb3fb9530a102c7a8bec00e73f17f2da991a4 /ctl-lib
parent67c4bb646e9fb97bfad29ddf255a986cf6636098 (diff)
Use binding version to set controller definitions
Use binding version to set controller definitions. It is cleaner to define binding version directly into repository cmake than into a header like before this commit. Change-Id: Ie0f2812c8ac980e69ff901fb6e347f47f284f21b Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to 'ctl-lib')
-rw-r--r--ctl-lib/afb-definitions.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/ctl-lib/afb-definitions.h b/ctl-lib/afb-definitions.h
index d621f27..cf84fa4 100644
--- a/ctl-lib/afb-definitions.h
+++ b/ctl-lib/afb-definitions.h
@@ -21,9 +21,7 @@
#define _AFB_DEFINITIONS_INCLUDE_
// Waiting for a clean AppFW-V3 API
-#ifdef USE_API_DYN
- #define AFB_BINDING_VERSION 0
- #define AFB_BINDING_WANT_DYNAPI
+#if((AFB_BINDING_VERSION == 0 || AFB_BINDING_VERSION == 3) && defined(AFB_BINDING_WANT_DYNAPI))
#include <afb/afb-binding.h>
#define AFB_BINDING_PREV3
@@ -82,8 +80,7 @@
uint32_t session;
} AFB_ApiVerbs;
-#else
- #define AFB_BINDING_VERSION 2
+#elif(AFB_BINDING_VERSION == 2)
#include <afb/afb-binding.h>
typedef struct afb_req AFB_ReqT;