Linux: Add support for SPIDEV (#734)

RPi and Linux refactor.

Add GPIO Sysfs for GPIO operations.

Update configure script.

Fix some cppcheck warnings.

Add serial emulation that prints to stdout.

Fix some file headers.
This commit is contained in:
Marcelo Aquino
2017-01-14 23:50:21 +01:00
committed by Henrik Ekblad
parent aa5cecfca1
commit 2e0f6b6229
43 changed files with 1574 additions and 593 deletions
+16
View File
@@ -34,6 +34,22 @@ GATEWAY_OBJECTS+=$(patsubst %.c,$(BUILDDIR)/%.o,$(RPI_C_SOURCES)) $(patsubst %.c
INCLUDES+=-I./drivers/RPi
endif
ifeq ($(SPI_DRIVER), BCM)
SPI_DRIVER_C_SOURCES=$(wildcard drivers/BCM/*.c)
SPI_DRIVER_CPP_SOURCES=$(wildcard drivers/BCM/*.cpp)
GATEWAY_OBJECTS+=$(patsubst %.c,$(BUILDDIR)/%.o,$(SPI_DRIVER_C_SOURCES)) $(patsubst %.cpp,$(BUILDDIR)/%.o,$(SPI_DRIVER_CPP_SOURCES))
INCLUDES+=-I./drivers/BCM
endif
ifeq ($(SPI_DRIVER), SPIDEV)
SPI_DRIVER_C_SOURCES=$(wildcard drivers/SPIDEV/*.c)
SPI_DRIVER_CPP_SOURCES=$(wildcard drivers/SPIDEV/*.cpp)
GATEWAY_OBJECTS+=$(patsubst %.c,$(BUILDDIR)/%.o,$(SPI_DRIVER_C_SOURCES)) $(patsubst %.cpp,$(BUILDDIR)/%.o,$(SPI_DRIVER_CPP_SOURCES))
INCLUDES+=-I./drivers/SPIDEV
endif
# Gets include flags for library
get_library_includes = $(if $(and $(wildcard $(1)/src), $(wildcard $(1)/library.properties)), \
-I$(1)/src, \