From 7d47370afeb481c33691f6cec08503d105a50e06 Mon Sep 17 00:00:00 2001 From: Kevron Rees Date: Wed, 27 Sep 2017 08:53:38 -0700 Subject: [PATCH] Enable force platform minnowboard turbot Compile error would result if force minnowboard max. This is because mraa_intel_minnowboard_byt_compatible signature requires bool option for max or turbot board variations. This patch allows user to force platform for either max or turbot without compile error. Signed-off-by: Kevron Rees --- api/mraa/types.h | 1 + src/CMakeLists.txt | 2 ++ src/x86/x86.c | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/api/mraa/types.h b/api/mraa/types.h index 8479b7663..6b255d82c 100644 --- a/api/mraa/types.h +++ b/api/mraa/types.h @@ -57,6 +57,7 @@ typedef enum { MRAA_PHYBOARD_WEGA = 14, /**< The phyBOARD-Wega */ MRAA_DE_NANO_SOC = 15, /**< Terasic DE-Nano-SoC Board */ MRAA_UP2 = 16, /**< The UP^2 Board */ + MRAA_INTEL_MINNOWBOARD_TURBOT = 17, /**< The Intel Minnow Board Max */ // USB platform extenders start at 256 MRAA_FTDI_FT4222 = 256, /**< FTDI FT4222 USB to i2c bridge */ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ed9b35627..892b94b64 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -68,6 +68,8 @@ if (NOT ${MRAAPLATFORMFORCE} STREQUAL "ALL") set (mraa_LIB_X86_SRCS_NOAUTO ${PROJECT_SOURCE_DIR}/src/x86/x86.c ${PROJECT_SOURCE_DIR}/src/x86/intel_edison_fab_c.c) elseif (${MRAAPLATFORMFORCE} STREQUAL "MRAA_INTEL_MINNOWBOARD_MAX") set (mraa_LIB_X86_SRCS_NOAUTO ${PROJECT_SOURCE_DIR}/src/x86/x86.c ${PROJECT_SOURCE_DIR}/src/x86/intel_minnow_byt_compatible.c) + elseif (${MRAAPLATFORMFORCE} STREQUAL "MRAA_INTEL_MINNOWBOARD_TURBOT") + set (mraa_LIB_X86_SRCS_NOAUTO ${PROJECT_SOURCE_DIR}/src/x86/x86.c ${PROJECT_SOURCE_DIR}/src/x86/intel_minnow_byt_compatible.c) elseif (${MRAAPLATFORMFORCE} STREQUAL "MRAA_INTEL_NUC5") set (mraa_LIB_X86_SRCS_NOAUTO ${PROJECT_SOURCE_DIR}/src/x86/x86.c ${PROJECT_SOURCE_DIR}/src/x86/intel_nuc5.c) elseif (${MRAAPLATFORMFORCE} STREQUAL "MRAA_INTEL_SOFIA_3GR") diff --git a/src/x86/x86.c b/src/x86/x86.c index 8836ff9f6..0d735bc9e 100644 --- a/src/x86/x86.c +++ b/src/x86/x86.c @@ -131,7 +131,9 @@ mraa_x86_platform() #elif defined(xMRAA_INTEL_DE3815) plat = mraa_intel_de3815(); #elif defined(xMRAA_INTEL_MINNOWBOARD_MAX) - plat = mraa_intel_minnowboard_byt_compatible(); + plat = mraa_intel_minnowboard_byt_compatible(0); + #elif defined(xMRAA_INTEL_MINNOWBOARD_TURBOT) + plat = mraa_intel_minnowboard_byt_compatible(1); #elif defined(xMRAA_INTEL_GALILEO_GEN1) plat = mraa_intel_galileo_rev_d(); #elif defined(xMRAA_INTEL_NUC5)