mock: added mraa mock platform infra and GPIO implementation
Mock platform allows one to use mraa without having any real HW. This commit makes necessary foundational changes and implements GPIO functionality as well as adds respective tests. Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com> Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
committed by
Brendan Le Foll
parent
593fd0be54
commit
bcb6adc551
@@ -78,9 +78,10 @@ option (RPM "Generate RPM using CPack" OFF)
|
||||
option (ENABLEEXAMPLES "Disable building of examples" ON)
|
||||
option (INSTALLGPIOTOOL "Install gpio tool" OFF)
|
||||
option (INSTALLTOOLS "Install all tools" OFF)
|
||||
option (BUILDARCH "Override architecture to build for - override" OFF)
|
||||
option (BUILDTESTS "Override the addition of tests" ON)
|
||||
|
||||
set (BUILDARCH "" CACHE STRING "Override architecture to build for")
|
||||
|
||||
set (MRAAPLATFORMFORCE "ALL" CACHE STRING "Override platform to build for")
|
||||
|
||||
if (NOT BUILDSWIG)
|
||||
@@ -103,8 +104,10 @@ if (DETECTED_ARCH STREQUAL "i586" OR DETECTED_ARCH STREQUAL "x86_64"
|
||||
set (X86PLAT ON)
|
||||
elseif (DETECTED_ARCH MATCHES "arm.*")
|
||||
set (ARMPLAT ON)
|
||||
elseif (DETECTED_ARCH STREQUAL "MOCK")
|
||||
set (MOCKPLAT ON)
|
||||
else ()
|
||||
message (FATAL_ERROR "Only x86 and arm platforms currently supported")
|
||||
message (FATAL_ERROR "Only x86, arm and mock platforms currently supported")
|
||||
endif()
|
||||
|
||||
if (BUILDSWIGPYTHON OR BUILDTESTS)
|
||||
|
||||
Reference in New Issue
Block a user