495dcd659a
This patch adds gpio-pcal9535a.c and gpio-pcal9535a.h files, which support access to I2C-based PCAL9535A GPIO controller configuration register through a function interface. The PCAL9535A is a low-voltage 16-bit GPIO expander with interrupt and reset for I2C-bus/SMBus applications. It contains the PCA9535 register set of four pairs of 8-bit Configuration, Input, Output, and Polarity Inversion registers, and additionally, the PCAL9535A has Agile I/O, which are additional features specifically designed to enhance the I/O. More about PCAL9535A can be found in its datasheet[1]. This driver is needed in order to configure Galileo pinmux. [1] - http://www.nxp.com/documents/data_sheet/PCAL9535A.pdf
25 lines
838 B
Makefile
25 lines
838 B
Makefile
BSP_PATH=$(CONTIKI)/platform/galileo/bsp
|
|
LIBC_PATH=$(BSP_PATH)/libc
|
|
LIBC=$(LIBC_PATH)/i586-elf
|
|
LIBGCC_PATH = /usr/lib/gcc/$(shell gcc -dumpmachine)/$(shell gcc -dumpversion)
|
|
|
|
CONTIKI_TARGET_DIRS = . core/sys/ drivers/
|
|
CONTIKI_TARGET_MAIN = ${addprefix $(OBJECTDIR)/,contiki-main.o}
|
|
CONTIKI_SOURCEFILES += contiki-main.c clock.c rtimer-arch.c gpio-pcal9535a.c
|
|
|
|
PROJECT_SOURCEFILES += newlib-syscalls.c
|
|
|
|
CONTIKI_CPU=$(CONTIKI)/cpu/x86
|
|
include $(CONTIKI)/cpu/x86/Makefile.x86_quarkX1000
|
|
|
|
CFLAGS += -fno-stack-protector -nostdinc -I$(LIBC)/include -isystem $(LIBGCC_PATH)/include -isystem $(LIBGCC_PATH)/include-fixed
|
|
LDFLAGS += -nostdlib -L$(LIBC)/lib -L$(LIBGCC_PATH)/32
|
|
|
|
TARGET_LIBFILES += -lm -lc -lgcc
|
|
|
|
-include $(LIBC_PATH)/Makefile.libc
|
|
|
|
ifndef BUILT_LIBC
|
|
$(error Build the C library by executing $(LIBC_PATH)/build_newlib.sh)
|
|
endif
|