Add define for PN1803/L508/L509
Change-Id: Ide7bf05b34d2e4b6c9a7259032593e40d366c8eb
diff --git a/mbtk/Make.defines b/mbtk/Make.defines
index 451a120..c271713 100755
--- a/mbtk/Make.defines
+++ b/mbtk/Make.defines
@@ -60,6 +60,28 @@
DEFINE += -DMBTK_MP3_SUPPORT
endif
+#$(info TOPDIR=$(TOPDIR))
+BUILD_PROJECT=$(shell cat $(ROOT)/../build_version | grep PROJECT | cut -d '=' -f 2)
+$(info BUILD_PROJECT=$(BUILD_PROJECT))
+#BUILD_PROJECT_X=$(shell ${BUILD_PROJECT:0:4})
+#BUILD_PROJECT_X=$(shell echo $(BUILD_PROJECT) | cut -c 1-4)
+#$(info BUILD_PROJECT_X=$(BUILD_PROJECT_X))
+
+ifeq ($(shell echo $(BUILD_PROJECT) | cut -c 1-4), L508)
+$(info BUILD_PROJECT=L508)
+DEFINE += -DMBTK_PROJECT_L508
+else
+ifeq ($(shell echo $(BUILD_PROJECT) | cut -c 1-4), L509)
+$(info BUILD_PROJECT=L509)
+DEFINE += -DMBTK_PROJECT_L509
+else
+ifeq ($(shell echo $(BUILD_PROJECT) | cut -c 1-6), PN1803)
+$(info BUILD_PROJECT=PN1803)
+DEFINE += -DMBTK_PROJECT_PN1803
+endif
+endif
+endif
+
LIB_DIR = \
-L$(OUT_DIR)/lib
diff --git a/mbtk/mbtk_lib/src/mbtk_gpio.c b/mbtk/mbtk_lib/src/mbtk_gpio.c
index ed48796..26c9f24 100755
--- a/mbtk/mbtk_lib/src/mbtk_gpio.c
+++ b/mbtk/mbtk_lib/src/mbtk_gpio.c
@@ -513,6 +513,7 @@
return ret;
}
+#if defined(MBTK_PROJECT_PN1803)
int mbtk_at_gpio(void* arg)
{
/*
@@ -570,3 +571,26 @@
mbtk_adc_close();
return n;
}
+
+#elif defined(MBTK_PROJECT_L508)
+
+int mbtk_at_gpio(void* arg)
+{
+ return -1;
+}
+
+#elif defined(MBTK_PROJECT_L509)
+
+int mbtk_at_gpio(void* arg)
+{
+ return -1;
+}
+
+#else
+
+int mbtk_at_gpio(void* arg)
+{
+ return -1;
+}
+
+#endif