diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-03-30 15:31:53 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-03-30 15:31:53 -0600 |
commit | 59654f5bb2f29d3429008eb100bc4b81891899f8 (patch) | |
tree | e8feb929698f7205f1b6045980081ca44156826f /nuttx | |
parent | 692fd3d0c106be5fe0c8933bda1c14889fc73cd6 (diff) | |
download | px4-nuttx-59654f5bb2f29d3429008eb100bc4b81891899f8.tar.gz px4-nuttx-59654f5bb2f29d3429008eb100bc4b81891899f8.tar.bz2 px4-nuttx-59654f5bb2f29d3429008eb100bc4b81891899f8.zip |
SAMV71-XULT: Add a configuration for testing the maXTouch Xplained Pro connected to the board
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/configs/samv71-xult/Kconfig | 47 | ||||
-rw-r--r-- | nuttx/configs/samv71-xult/README.txt | 168 | ||||
-rw-r--r-- | nuttx/configs/samv71-xult/include/board.h | 51 | ||||
-rw-r--r-- | nuttx/configs/samv71-xult/mxtxplnd/Make.defs | 116 | ||||
-rw-r--r-- | nuttx/configs/samv71-xult/mxtxplnd/defconfig | 1063 | ||||
-rwxr-xr-x | nuttx/configs/samv71-xult/mxtxplnd/setenv.sh | 77 | ||||
-rwxr-xr-x | nuttx/configs/samv71-xult/netnsh/setenv.sh | 2 | ||||
-rwxr-xr-x | nuttx/configs/samv71-xult/nsh/setenv.sh | 2 | ||||
-rw-r--r-- | nuttx/configs/samv71-xult/src/Makefile | 4 | ||||
-rw-r--r-- | nuttx/configs/samv71-xult/src/sam_bringup.c | 28 | ||||
-rw-r--r-- | nuttx/configs/samv71-xult/src/sam_hsmci.c | 2 | ||||
-rw-r--r-- | nuttx/configs/samv71-xult/src/sam_maxtouch.c | 310 | ||||
-rw-r--r-- | nuttx/configs/samv71-xult/src/samv71-xult.h | 197 |
13 files changed, 2010 insertions, 57 deletions
diff --git a/nuttx/configs/samv71-xult/Kconfig b/nuttx/configs/samv71-xult/Kconfig index 7d3f82c99..1730e1c70 100644 --- a/nuttx/configs/samv71-xult/Kconfig +++ b/nuttx/configs/samv71-xult/Kconfig @@ -5,33 +5,64 @@ if ARCH_BOARD_SAMV71_XULT -config SAMV7XULT_HSMCI0_AUTOMOUNT +config SAMV71XULT_MXTXPLND + bool "MaXTouch Xplained connected" + default n + +if SAMV71XULT_MXTXPLND + +choice + prompt "MaXTouch Xplained connection" + default SAMV71XULT_MXTXPLND_EXT1 + +config SAMV71XULT_MXTXPLND_EXT1 + bool "Connected on EXT1" + +config SAMV71XULT_MXTXPLND_EXT2 + bool "Connected on EXT2" + +endchoice # MaXTouch Xplained connection + +if INPUT_MXT + +config SAMV71XULT_MXT_I2CFREQUENCY + int "maXTouch I2C frequency" + default 400000 + +config SAMV71XULT_MXT_DEVMINOR + int "/dev/input minor number" + default 0 + +endif # INPUT_MXT +endif # SAMV71XULT_MXTXPLND + +config SAMV71XULT_HSMCI0_AUTOMOUNT bool "HSMCI0 automounter" default n depends on FS_AUTOMOUNTER && SAMA5_HSMCI0 -if SAMV7XULT_HSMCI0_AUTOMOUNT +if SAMV71XULT_HSMCI0_AUTOMOUNT -config SAMV7XULT_HSMCI0_AUTOMOUNT_FSTYPE +config SAMV71XULT_HSMCI0_AUTOMOUNT_FSTYPE string "HSMCI0 file system type" default "vfat" -config SAMV7XULT_HSMCI0_AUTOMOUNT_BLKDEV +config SAMV71XULT_HSMCI0_AUTOMOUNT_BLKDEV string "HSMCI0 block device" default "/dev/mmcsd0" -config SAMV7XULT_HSMCI0_AUTOMOUNT_MOUNTPOINT +config SAMV71XULT_HSMCI0_AUTOMOUNT_MOUNTPOINT string "HSMCI0 mount point" default "/mnt/sdcard0" -config SAMV7XULT_HSMCI0_AUTOMOUNT_DDELAY +config SAMV71XULT_HSMCI0_AUTOMOUNT_DDELAY int "HSMCI0 debounce delay (milliseconds)" default 1000 -config SAMV7XULT_HSMCI0_AUTOMOUNT_UDELAY +config SAMV71XULT_HSMCI0_AUTOMOUNT_UDELAY int "HSMCI0 unmount retry delay (milliseconds)" default 2000 -endif # SAMV7XULT_HSMCI0_AUTOMOUNT +endif # SAMV71XULT_HSMCI0_AUTOMOUNT endif # ARCH_BOARD_SAMV71_XULT diff --git a/nuttx/configs/samv71-xult/README.txt b/nuttx/configs/samv71-xult/README.txt index 38d96a9a8..4549f11b3 100644 --- a/nuttx/configs/samv71-xult/README.txt +++ b/nuttx/configs/samv71-xult/README.txt @@ -5,6 +5,8 @@ This README file discusses the port of NuttX to the Atmel SAM V71 Xplained Ultra Evaluation Kit (SAMV71-XULT). This board features the ATSAMV71Q21 Cortex-M7 microcontroller. +Additional support of provided for the (optional) maXTouch Xplained Pro LCD. + Contents ======== @@ -16,6 +18,7 @@ Contents - LEDs and Buttons - AT24MAC402 Serial EEPROM - Networking + - maXTouch Xplained Pro - Debugging - Configurations @@ -116,7 +119,7 @@ The BASIC nsh configuration is fully function (as desribed below under sample code and study of the data sheet, but I have not found the key to solving this. -+nmnmSerial Console +Serial Console ============== The SAMV71-XULT has no on-board RS-232 drivers so it will be necessary to @@ -294,12 +297,12 @@ Auto-Mounter CONFIG_FS_AUTOMOUNTER=y Board-Specific Options - CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT=y - CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT_FSTYPE="vfat" - CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT_BLKDEV="/dev/mmcsd0" - CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT_MOUNTPOINT="/mnt/sdcard" - CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT_DDELAY=1000 - CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT_UDELAY=2000 + CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT=y + CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT_FSTYPE="vfat" + CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT_BLKDEV="/dev/mmcsd0" + CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT_MOUNTPOINT="/mnt/sdcard" + CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT_DDELAY=1000 + CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT_UDELAY=2000 WARNING: SD cards should never be removed without first unmounting them. This is to avoid data and possible corruption of the file @@ -691,6 +694,81 @@ additional settings. CONFIG_NSH_NETINIT_RETRYMSEC=2000 : Configure the network monitor as you like CONFIG_NSH_NETINIT_SIGNO=18 +maXTouch Xplained Pro +===================== + +Connectivity +------------ +Testing has also been performed using the maXTouch Xplained Pro LCD +(ATMXT-XPRO). That LCD could be connected either via EXT1 or EXT2 using the 2x10 +20-pin cable and the maXTouch Xplained Pro standard extension header. Access +this then performed in SPI mode. + + ---- -------- ---- ----------- ---- ----------- ------------------------------------------ + SAMV71-XULT maxTouch Xplained Pro + PIN FUNCTION EXT1 FUNC EXT2 FUNC Description + ---- -------- ---- ----------- ---- ----------- ------------------------------------------ + 1 ID - - - - Communication line to ID chip + 2 GND - - - - Ground + 3 N/C PC31 - PD30 - + 4 N/C PA19 - PC13 - + 5 GPIO PB3 GPIO PA6 GPIO Command/Data Select + 6 N/C PB2 - PD11 - + 7 PWM PA0 PWMC0_PWMH0 PC19 PWMC0_PMWH2 Backlight control + 8 N/C PC30 - PD26 - + 9 GPIO/IRQ PD28 GPIO PA2 GPIO IRQ from maXTouch controller + 10 GPIO PA5 GPIO PA24 GPIO RESET signal for maXTouch and LCD controller + 11 I2C SDA PA3 TWID0 PA3 TWID0 I2C Data line for maXTouch controller + 12 I2C SCL PA4 TWICK0 PA4 TWICK0 I2C Clock line for maXTouch controller + 13 N/C PB0 - PA21 - + 14 N/C PB1 - PB4 - + 15 CS PD25 GPIO PD27 GPIO CS line for LCD controller + 16 SPI MOSI PD21 SPI0_MOSI PD21 SPI0_MOSI SPI Data to LCD controller + 17 SPI MISO PD20 SPI0_MISO PD20 SPI0_MISO SPI Data from LCD controller + 18 SPI SCK PD22 SPI0_SPCK PD22 SPI0_SPCK SPI Clock line + 19 GND - - - - Ground + 20 VCC - - - - Target supply voltage + ---- -------- ---- ----------- ---- ----------- ------------------------------------------ + +NOTE: Use of EXT1 conflicts with the Arduino RXD pin (PD28). You cannot +put the maXTouch Xplained in EXT1 and also use the Arduion RXD/TXD pins +as your serial console. + +It ought be possible to connect the LCD via the flat cable to the EXT4 LCD +connector. In this case, you would use the SMC to communicate with the LCD. +I have not tried this configuration. + +Configuration Options +--------------------- + + System Type -> SAMV7 Peripheral Support + CONFIG_SAMV7_TWIHS0=y : Needed by the MaXTouch controller + CONFIG_SAMV7_TWIHS0_FREQUENCY=100000 + + Board Selection -> + CONFIG_SAMV71XULT_MXTXPLND=y : MaXTouch Xplained is connected + CONFIG_SAMV71XULT_MXTXPLND_EXT1=y : Connected on EXT1, or + CONFIG_SAMV71XULT_MXTXPLND_EXT2=y : Connected on EXT2 + CONFIG_SAMV71XULT_MXT_DEVMINOR=0 : Register as /dev/input0 + CONFIG_SAMV71XULT_MXT_I2CFREQUENCY=400000 + + NOTE: When selecting EXT1 or EXT2, be conscious of possible pin conflicts. + EXT1, for example, will conflict with the use of the Arduino TXD and RXD + pins for the serial console + + Device Drivers -> Input Devices + CONFIG_INPUT=y : Enable support for human input devices + CONFIG_INPUT_MXT=y : Enable support for the maXTouch controller + + The following enables a small built-in application that can be used to + test the touchscreen: + + Application Configuration -> Examples -> Touchscreen example + CONFIG_EXAMPLES_TOUCHSCREEN=y : Enables the example + CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y : Have board-specific intialization + CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" + CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0 + Debugging ========= @@ -784,15 +862,70 @@ NOTES: Configuration sub-directories ----------------------------- - nsh: + mxtxplned: + + Configures the NuttShell (nsh) located at examples/nsh. There are three + very similar NSH configurations: + + - nsh. This configuration is focused on low level, command-line + driver testing. It has no network. + - netnsh. This configuration is focused on network testing and + has only limited command support. + - mxtxplnd. This configuration is identical to the nsh configuration + but assumes that you have a maXTouch Xplained Pro LCD attached + and includes extra tests for the touchscreen and LCD. + + NOTES: + + 1. See the notes associated with the nsh configuration below. Only + differences from that configuration will be addressed here. + + 2. Basic touchscreen/LCD configuration settings are discussed above in + the paragraph entitled, "maXTouch Xplained Pro". + + 3. Like the nsh configuration, this configuratino has the serial console + setup to used with an Aduino serial shield (UART3). NOTE: Use of + EXT1 conflicts with the Arduino RXD pin (PD28). You cannot put the + maXTouch Xplained in EXT1 and also use the Arduion RXD/TXD pins as + your serial console. Hence, this configuration assumes that you + have the maXTouch Xplained Pro connected via EXT2. + + If you need to use EXT1, you will have to re-configure the serial + console on a different UART/USART. + + 4. When the maXTouch Xplained is connect via EXT2, a new I2C address + appears at address 0x4a: + + nsh> i2c dev 3 77 + 0 1 2 3 4 5 6 7 8 9 a b c d e f + 00: -- -- -- -- -- -- -- -- -- -- -- -- -- + 10: -- -- -- -- -- -- -- -- -- -- 1a -- -- -- -- -- + 20: -- -- -- -- -- -- -- -- 28 -- -- -- -- -- -- -- + 30: -- -- -- -- -- -- -- 37 -- -- -- -- -- -- -- -- + 40: -- -- -- -- -- -- -- -- -- -- 4a -- -- -- 4e -- + 50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- 5f + 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 70: -- -- -- -- -- -- -- -- + + This is the I2C address of the maXTouch touchscreen controller. + + (0x1a is the address of the WM8904 Audio CODEC, 0x28 is the + address of TWI interface to the EDBG, 0x4e is the address of the + CP2100CP programmable PLL, and 0x57 and 0x5f are the addresses of + the AT2 EEPROM. I am not sure what the other address, 0x37, is). + + netnsh: - Configures the NuttShell (nsh) located at examples/nsh. There are two - NSH configurations: + Configures the NuttShell (nsh) located at examples/nsh. There are three + very similar NSH configurations: - nsh. This configuration is focused on low level, command-line - driver testing. It has not network. + driver testing. It has no network. - netnsh. This configuration is focused on network testing and has only limited command support. + - mxtxplnd. This configuration is identical to the nsh configuration + but assumes that you have a maXTouch Xplained Pro LCD attached + and includes extra tests for the touchscreen and LCD. NOTES: @@ -897,13 +1030,16 @@ Configuration sub-directories nsh: - Configures the NuttShell (nsh) located at examples/nsh. There are two - NSH configurations: + Configures the NuttShell (nsh) located at examples/nsh. There are three + very similar NSH configurations: - nsh. This configuration is focused on low level, command-line - driver testing. It has not network. + driver testing. It has no network. - netnsh. This configuration is focused on network testing and has only limited command support. + - mxtxplnd. This configuration is identical to the nsh configuration + but assumes that you have a maXTouch Xplained Pro LCD attached + and includes extra tests for the touchscreen and LCD. NOTES: @@ -1062,10 +1198,10 @@ Configuration sub-directories 70: -- -- -- -- -- -- -- -- nsh> - Where 0x1a us the address of the WM8904 Audio CODEC, 0x28 is the + Where 0x1a is the address of the WM8904 Audio CODEC, 0x28 is the address of TWI interface to the EDBG, 0x4e is the address of the CP2100CP programmable PLL, and 0x57 and 0x5f are the addresses of - the AT2 EEPROM (I am not sure what the other address, 0x37, is are + the AT2 EEPROM (I am not sure what the other address, 0x37, is as this writing). 7. TWIHS0 is also used to support 256 byte non-volatile storage for diff --git a/nuttx/configs/samv71-xult/include/board.h b/nuttx/configs/samv71-xult/include/board.h index 0920f931e..57f1a6703 100644 --- a/nuttx/configs/samv71-xult/include/board.h +++ b/nuttx/configs/samv71-xult/include/board.h @@ -337,6 +337,57 @@ #define GPIO_SSC0_TD GPIO_SSC0_TD_1 +/* maXTouch Xplained Pro LCD + * + * This LCD could be connected either via EXT1 or EXT2 using the 2x10 + * 20-pin cable and the maXTouch Xplained Pro standard extension + * header. Access this then performed in SPI mode. + * + * ---- -------- ---- ----------- ---- ----------- ------------------------------------------ + * SAMV71-XULT maxTouch Xplained Pro + * PIN FUNCTION EXT1 FUNC EXT2 FUNC Description + * ---- -------- ---- ----------- ---- ----------- ------------------------------------------ + * 1 ID - - - - Communication line to ID chip + * 2 GND - - - - Ground + * 3 N/C PC31 - PD30 - + * 4 N/C PA19 - PC13 - + * 5 GPIO PB3 GPIO PA6 GPIO Command/Data Select + * 6 N/C PB2 - PD11 - + * 7 PWM PA0 PWMC0_PWMH0 PC19 PWMC0_PMWH2 Backlight control + * 8 N/C PC30 - PD26 - + * 9 GPIO/IRQ PD28 GPIO PA2 GPIO IRQ from maXTouch controller + * 10 GPIO PA5 GPIO PA24 GPIO RESET signal for maXTouch and LCD controller + * 11 I2C SDA PA3 TWID0 PA3 TWID0 I2C Data line for maXTouch controller + * 12 I2C SCL PA4 TWICK0 PA4 TWICK0 I2C Clock line for maXTouch controller + * 13 N/C PB0 - PA21 - + * 14 N/C PB1 - PB4 - + * 15 CS PD25 GPIO PD27 GPIO CS line for LCD controller + * 16 SPI MOSI PD21 SPI0_MOSI PD21 SPI0_MOSI SPI Data to LCD controller + * 17 SPI MISO PD20 SPI0_MISO PD20 SPI0_MISO SPI Data from LCD controller + * 18 SPI SCK PD22 SPI0_SPCK PD22 SPI0_SPCK SPI Clock line + * 19 GND - - - - Ground + * 20 VCC - - - - Target supply voltage + * ---- -------- ---- ----------- ---- ----------- ------------------------------------------ + * + * There are no alternatives for SPI0 and TWI0 pins. Only the PWM pins require any + * disambiguration. + */ + +#ifdef CONFIG_SAMV71XULT_MXTXLND +# ifdef CONFIG_SAMV71XULT_MXTXLND_EXT1 + +# define GPIO_PWMC0_H0 GPIO_PWMC0_H0_1 +# define GPIO_MXTXLND_PWM GPIO_PWMC0_H0_1 +# define GPIO_SPI0_NPCS1 GPIO_SPI0_NPCS1_2 + +# else /* CONFIG_SAMV71XULT_MXTXLND_EXT2 */ + +# define GPIO_PWMC0_H2 GPIO_PWMC0_H2_5 +# define GPIO_MXTXLND_PWM GPIO_PWMC0_H2_5 + +# endif +#endif + /************************************************************************************ * Public Types ************************************************************************************/ diff --git a/nuttx/configs/samv71-xult/mxtxplnd/Make.defs b/nuttx/configs/samv71-xult/mxtxplnd/Make.defs new file mode 100644 index 000000000..680ccb849 --- /dev/null +++ b/nuttx/configs/samv71-xult/mxtxplnd/Make.defs @@ -0,0 +1,116 @@ +############################################################################ +# configs/samv71-xult/mxtxplnd/Make.defs +# +# Copyright (C) 2015 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt <gnutt@nuttx.org> +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +include ${TOPDIR}/.config +include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs + +ifeq ($(CONFIG_ARMV7M_DTCM),y) + LDSCRIPT = flash-dtcm.ld +else + LDSCRIPT = flash-sram.ld +endif + +ifeq ($(WINTOOL),y) + # Windows-native toolchains + DIRLINK = $(TOPDIR)/tools/copydir.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mknulldeps.sh + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}" +else + # Linux/Cygwin-native toolchain + MKDEP = $(TOPDIR)/tools/mkdeps.sh + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) +endif + +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E +LD = $(CROSSDEV)ld +AR = $(CROSSDEV)ar rcs +NM = $(CROSSDEV)nm +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump + +ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} +ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + ARCHOPTIMIZATION = -g +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += $(MAXOPTIMIZATION) +endif + +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -fno-strict-aliasing +ARCHWARNINGSXX = -Wall -Wshadow +ARCHDEFINES = +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 + +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) +AFLAGS = $(CFLAGS) -D__ASSEMBLY__ + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 + +OBJEXT = .o +LIBEXT = .a +EXEEXT = + +ifneq ($(CROSSDEV),arm-nuttx-elf-) + LDFLAGS += -nostartfiles -nodefaultlibs +endif +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + LDFLAGS += -g +endif + + +HOSTCC = gcc +HOSTINCLUDES = -I. +HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe +HOSTLDFLAGS = + diff --git a/nuttx/configs/samv71-xult/mxtxplnd/defconfig b/nuttx/configs/samv71-xult/mxtxplnd/defconfig new file mode 100644 index 000000000..a30fe71da --- /dev/null +++ b/nuttx/configs/samv71-xult/mxtxplnd/defconfig @@ -0,0 +1,1063 @@ +# +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# + +# +# Build Setup +# +# CONFIG_EXPERIMENTAL is not set +# CONFIG_DEFAULT_SMALL is not set +# CONFIG_HOST_LINUX is not set +# CONFIG_HOST_OSX is not set +CONFIG_HOST_WINDOWS=y +# CONFIG_HOST_OTHER is not set +# CONFIG_WINDOWS_NATIVE is not set +CONFIG_WINDOWS_CYGWIN=y +# CONFIG_WINDOWS_MSYS is not set +# CONFIG_WINDOWS_OTHER is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +# CONFIG_INTELHEX_BINARY is not set +# CONFIG_MOTOROLA_SREC is not set +CONFIG_RAW_BINARY=y +# CONFIG_UBOOT_UIMAGE is not set + +# +# Customize Header Files +# +# CONFIG_ARCH_STDINT_H is not set +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_FLOAT_H is not set +# CONFIG_ARCH_STDARG_H is not set + +# +# Debug Options +# +# CONFIG_DEBUG is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set +# CONFIG_DEBUG_SYMBOLS is not set +CONFIG_ARCH_HAVE_CUSTOMOPT=y +# CONFIG_DEBUG_NOOPT is not set +# CONFIG_DEBUG_CUSTOMOPT is not set +CONFIG_DEBUG_FULLOPT=y + +# +# System Type +# +CONFIG_ARCH_ARM=y +# CONFIG_ARCH_AVR is not set +# CONFIG_ARCH_HC is not set +# CONFIG_ARCH_MIPS is not set +# CONFIG_ARCH_RGMP is not set +# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_SIM is not set +# CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_Z16 is not set +# CONFIG_ARCH_Z80 is not set +CONFIG_ARCH="arm" + +# +# ARM Options +# +# CONFIG_ARCH_CHIP_A1X is not set +# CONFIG_ARCH_CHIP_C5471 is not set +# CONFIG_ARCH_CHIP_CALYPSO is not set +# CONFIG_ARCH_CHIP_DM320 is not set +# CONFIG_ARCH_CHIP_EFM32 is not set +# CONFIG_ARCH_CHIP_IMX is not set +# CONFIG_ARCH_CHIP_KINETIS is not set +# CONFIG_ARCH_CHIP_KL is not set +# CONFIG_ARCH_CHIP_LM is not set +# CONFIG_ARCH_CHIP_TIVA is not set +# CONFIG_ARCH_CHIP_LPC17XX is not set +# CONFIG_ARCH_CHIP_LPC214X is not set +# CONFIG_ARCH_CHIP_LPC2378 is not set +# CONFIG_ARCH_CHIP_LPC31XX is not set +# CONFIG_ARCH_CHIP_LPC43XX is not set +# CONFIG_ARCH_CHIP_NUC1XX is not set +# CONFIG_ARCH_CHIP_SAMA5 is not set +# CONFIG_ARCH_CHIP_SAMD is not set +# CONFIG_ARCH_CHIP_SAM34 is not set +CONFIG_ARCH_CHIP_SAMV7=y +# CONFIG_ARCH_CHIP_STM32 is not set +# CONFIG_ARCH_CHIP_STR71X is not set +# CONFIG_ARCH_ARM7TDMI is not set +# CONFIG_ARCH_ARM926EJS is not set +# CONFIG_ARCH_ARM920T is not set +# CONFIG_ARCH_CORTEXM0 is not set +# CONFIG_ARCH_CORTEXM3 is not set +# CONFIG_ARCH_CORTEXM4 is not set +CONFIG_ARCH_CORTEXM7=y +# CONFIG_ARCH_CORTEXA5 is not set +# CONFIG_ARCH_CORTEXA8 is not set +CONFIG_ARCH_FAMILY="armv7-m" +CONFIG_ARCH_CHIP="samv7" +# CONFIG_ARMV7M_USEBASEPRI is not set +CONFIG_ARCH_HAVE_CMNVECTOR=y +CONFIG_ARMV7M_CMNVECTOR=y +CONFIG_ARMV7M_LAZYFPU=y +CONFIG_ARCH_HAVE_FPU=y +CONFIG_ARCH_HAVE_DPFPU=y +CONFIG_ARCH_FPU=y +CONFIG_ARCH_DPFPU=y +# CONFIG_ARMV7M_MPU is not set + +# +# ARMV7M Configuration Options +# +CONFIG_ARMV7M_HAVE_ICACHE=y +CONFIG_ARMV7M_HAVE_DCACHE=y +CONFIG_ARMV7M_ICACHE=y +CONFIG_ARMV7M_DCACHE=y +# CONFIG_ARMV7M_DCACHE_WRITETHROUGH is not set +CONFIG_ARMV7M_HAVE_ITCM=y +CONFIG_ARMV7M_HAVE_DTCM=y +# CONFIG_ARMV7M_ITCM is not set +# CONFIG_ARMV7M_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set +# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW is not set +# CONFIG_ARMV7M_TOOLCHAIN_DEVKITARM is not set +# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set +CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW=y +# CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set +CONFIG_SDIO_DMA=y +# CONFIG_SDIO_WIDTH_D1_ONLY is not set + +# +# SAMV7 Configuration Options +# +# CONFIG_ARCH_CHIP_SAMV71Q19 is not set +# CONFIG_ARCH_CHIP_SAMV71Q20 is not set +CONFIG_ARCH_CHIP_SAMV71Q21=y +# CONFIG_ARCH_CHIP_SAMV71N19 is not set +# CONFIG_ARCH_CHIP_SAMV71N20 is not set +# CONFIG_ARCH_CHIP_SAMV71N21 is not set +# CONFIG_ARCH_CHIP_SAMV71J19 is not set +# CONFIG_ARCH_CHIP_SAMV71J20 is not set +# CONFIG_ARCH_CHIP_SAMV71J21 is not set +CONFIG_ARCH_CHIP_SAMV71=y +CONFIG_ARCH_CHIP_SAMV71Q=y +# CONFIG_ARCH_CHIP_SAMV71N is not set +# CONFIG_ARCH_CHIP_SAMV71J is not set +CONFIG_SAMV7_HAVE_CAN1=y +CONFIG_SAMV7_HAVE_DAC1=y +CONFIG_SAMV7_HAVE_EBI=y +# CONFIG_SAMV7_EMAC is not set +CONFIG_SAMV7_HSMCI=y +CONFIG_SAMV7_HAVE_HSMCI0=y +# CONFIG_SAMV7_HAVE_ISI8 is not set +CONFIG_SAMV7_HAVE_SDRAMC=y +# CONFIG_SAMV7_HAVE_SPI is not set +CONFIG_SAMV7_HAVE_SPI0=y +CONFIG_SAMV7_HAVE_SPI1=y +# CONFIG_SAMV7_QSPI_IS_SPI is not set +# CONFIG_SAMV7_SSC is not set +CONFIG_SAMV7_HAVE_TWIHS2=y +# CONFIG_SAMV7_HAVE_USBFS is not set +CONFIG_SAMV7_HAVE_USBHS=y +CONFIG_SAMV7_HAVE_USART0=y +CONFIG_SAMV7_HAVE_USART1=y +CONFIG_SAMV7_HAVE_USART2=y + +# +# SAMV7 Peripheral Selection +# +# CONFIG_SAMV7_ACC is not set +# CONFIG_SAMV7_ADC is not set +# CONFIG_SAMV7_AFEC0 is not set +# CONFIG_SAMV7_AFEC1 is not set +# CONFIG_SAMV7_CAN0 is not set +# CONFIG_SAMV7_CAN1 is not set +# CONFIG_SAMV7_DAC0 is not set +# CONFIG_SAMV7_DAC1 is not set +# CONFIG_SAMV7_EBI is not set +# CONFIG_SAMV7_EMAC0 is not set +CONFIG_SAMV7_XDMAC=y +CONFIG_SAMV7_HSMCI0=y +# CONFIG_SAMV7_ISI is not set +# CONFIG_SAMV7_MLB is not set +# CONFIG_SAMV7_PWM0 is not set +# CONFIG_SAMV7_PWM1 is not set +# CONFIG_SAMV7_QSPI is not set +# CONFIG_SAMV7_RTC is not set +# CONFIG_SAMV7_RTT is not set +# CONFIG_SAMV7_SDRAMC is not set +# CONFIG_SAMV7_SMC is not set +# CONFIG_SAMV7_SPI0 is not set +# CONFIG_SAMV7_SPI1 is not set +# CONFIG_SAMV7_SSC0 is not set +# CONFIG_SAMV7_TC0 is not set +# CONFIG_SAMV7_TC1 is not set +# CONFIG_SAMV7_TC2 is not set +# CONFIG_SAMV7_TC3 is not set +# CONFIG_SAMV7_TC4 is not set +# CONFIG_SAMV7_TC5 is not set +# CONFIG_SAMV7_TC6 is not set +# CONFIG_SAMV7_TC7 is not set +# CONFIG_SAMV7_TC8 is not set +# CONFIG_SAMV7_TC9 is not set +# CONFIG_SAMV7_TC10 is not set +# CONFIG_SAMV7_TC11 is not set +# CONFIG_SAMV7_TRNG is not set +CONFIG_SAMV7_TWIHS0=y +# CONFIG_SAMV7_TWIHS1 is not set +# CONFIG_SAMV7_TWIHS2 is not set +# CONFIG_SAMV7_UART0 is not set +# CONFIG_SAMV7_UART1 is not set +# CONFIG_SAMV7_UART2 is not set +CONFIG_SAMV7_UART3=y +# CONFIG_SAMV7_UART4 is not set +# CONFIG_SAMV7_USBDEVHS is not set +# CONFIG_SAMV7_USBHOSTHS is not set +# CONFIG_SAMV7_USART0 is not set +# CONFIG_SAMV7_USART1 is not set +# CONFIG_SAMV7_USART2 is not set +# CONFIG_SAMV7_WDT0 is not set +# CONFIG_SAMV7_WDT1 is not set +CONFIG_SAMV7_GPIO_IRQ=y +CONFIG_SAMV7_GPIOA_IRQ=y +CONFIG_SAMV7_GPIOB_IRQ=y +# CONFIG_SAMV7_GPIOC_IRQ is not set +CONFIG_SAMV7_GPIOD_IRQ=y +# CONFIG_SAMV7_GPIOE_IRQ is not set + +# +# TWIHS device driver options +# +CONFIG_SAMV7_TWIHS0_FREQUENCY=100000 + +# +# HSMCI device driver options +# +# CONFIG_SAMV7_HSMCI_RDPROOF is not set +# CONFIG_SAMV7_HSMCI_WRPROOF is not set + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_VECNOTIRQ is not set +CONFIG_ARCH_DMA=y +CONFIG_ARCH_HAVE_IRQPRIO=y +# CONFIG_ARCH_L2CACHE is not set +# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set +# CONFIG_ARCH_HAVE_ADDRENV is not set +# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set +CONFIG_ARCH_HAVE_VFORK=y +# CONFIG_ARCH_HAVE_MMU is not set +CONFIG_ARCH_HAVE_MPU=y +# CONFIG_ARCH_NAND_HWECC is not set +# CONFIG_ARCH_HAVE_EXTCLK is not set +# CONFIG_ARCH_USE_MPU is not set +# CONFIG_ARCH_IRQPRIO is not set +CONFIG_ARCH_STACKDUMP=y +# CONFIG_ENDIAN_BIG is not set +# CONFIG_ARCH_IDLE_CUSTOM is not set +CONFIG_ARCH_HAVE_RAMFUNCS=y +# CONFIG_ARCH_RAMFUNCS is not set +CONFIG_ARCH_HAVE_RAMVECTORS=y +# CONFIG_ARCH_RAMVECTORS is not set + +# +# Board Settings +# +CONFIG_BOARD_LOOPSPERMSEC=51262 +# CONFIG_ARCH_CALIBRATION is not set + +# +# Interrupt options +# +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +CONFIG_ARCH_INTERRUPTSTACK=2048 +CONFIG_ARCH_HAVE_HIPRI_INTERRUPT=y +# CONFIG_ARCH_HIPRI_INTERRUPT is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x20400000 +CONFIG_RAM_SIZE=393216 +# CONFIG_ARCH_HAVE_SDRAM is not set + +# +# Board Selection +# +CONFIG_ARCH_BOARD_SAMV71_XULT=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="samv71-xult" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y +CONFIG_ARCH_HAVE_BUTTONS=y +CONFIG_ARCH_BUTTONS=y +CONFIG_ARCH_HAVE_IRQBUTTONS=y +CONFIG_ARCH_IRQBUTTONS=y +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 + +# +# Board-Specific Options +# +CONFIG_SAMV71XULT_MXTXPLND=y +# CONFIG_SAMV71XULT_MXTXPLND_EXT1 is not set +CONFIG_SAMV71XULT_MXTXPLND_EXT2=y +CONFIG_SAMV71XULT_MXT_I2CFREQUENCY=400000 +CONFIG_SAMV71XULT_MXT_DEVMINOR=0 + +# +# RTOS Features +# +CONFIG_DISABLE_OS_API=y +# CONFIG_DISABLE_POSIX_TIMERS is not set +# CONFIG_DISABLE_PTHREAD is not set +# CONFIG_DISABLE_SIGNALS is not set +# CONFIG_DISABLE_MQUEUE is not set +# CONFIG_DISABLE_ENVIRON is not set + +# +# Clocks and Timers +# +CONFIG_USEC_PER_TICK=10000 +# CONFIG_SYSTEM_TIME64 is not set +# CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2014 +CONFIG_START_MONTH=3 +CONFIG_START_DAY=10 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=32 +CONFIG_WDOG_INTRESERVE=4 +CONFIG_PREALLOC_TIMERS=4 + +# +# Tasks and Scheduling +# +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_RR_INTERVAL=200 +CONFIG_TASK_NAME_SIZE=0 +CONFIG_MAX_TASKS=16 +# CONFIG_SCHED_HAVE_PARENT is not set +CONFIG_SCHED_WAITPID=y + +# +# Pthread Options +# +# CONFIG_MUTEX_TYPES is not set +CONFIG_NPTHREAD_KEYS=4 + +# +# Performance Monitoring +# +# CONFIG_SCHED_CPULOAD is not set +# CONFIG_SCHED_INSTRUMENTATION is not set + +# +# Files and I/O +# +CONFIG_DEV_CONSOLE=y +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +# CONFIG_PRIORITY_INHERITANCE is not set + +# +# RTOS hooks +# +# CONFIG_BOARD_INITIALIZE is not set +# CONFIG_SCHED_STARTHOOK is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set + +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCONDTIMEDOUT=16 +CONFIG_SIG_SIGWORK=17 + +# +# POSIX Message Queue Options +# +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 + +# +# Work Queue Support +# +CONFIG_SCHED_WORKQUEUE=y +CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_HPWORKPRIORITY=224 +CONFIG_SCHED_HPWORKPERIOD=50000 +CONFIG_SCHED_HPWORKSTACKSIZE=2048 +# CONFIG_SCHED_LPWORK is not set + +# +# Stack and heap information +# +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=2048 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 +# CONFIG_LIB_SYSCALL is not set + +# +# Device Drivers +# +CONFIG_DISABLE_POLL=y +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_LOOP is not set + +# +# Buffering +# +# CONFIG_DRVR_WRITEBUFFER is not set +# CONFIG_DRVR_READAHEAD is not set +# CONFIG_RAMDISK is not set +# CONFIG_CAN is not set +# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set +# CONFIG_PWM is not set +# CONFIG_ARCH_HAVE_I2CRESET is not set +CONFIG_I2C=y +# CONFIG_I2C_SLAVE is not set +CONFIG_I2C_TRANSFER=y +# CONFIG_I2C_WRITEREAD is not set +# CONFIG_I2C_POLLED is not set +# CONFIG_I2C_TRACE is not set +CONFIG_SPI=y +# CONFIG_SPI_OWNBUS is not set +CONFIG_SPI_EXCHANGE=y +# CONFIG_SPI_CMDDATA is not set +# CONFIG_SPI_CALLBACK is not set +# CONFIG_SPI_BITBANG is not set +# CONFIG_I2S is not set +# CONFIG_TIMER is not set +# CONFIG_RTC is not set +# CONFIG_WATCHDOG is not set +# CONFIG_ANALOG is not set +# CONFIG_AUDIO_DEVICES is not set +# CONFIG_VIDEO_DEVICES is not set +# CONFIG_BCH is not set +CONFIG_INPUT=y +# CONFIG_MOUSE is not set +# CONFIG_INPUT_MAX11802 is not set +# CONFIG_INPUT_TSC2007 is not set +# CONFIG_INPUT_ADS7843E is not set +CONFIG_INPUT_MXT=y +CONFIG_MXT_THRESHX=5 +CONFIG_MXT_THRESHY=8 +# CONFIG_INPUT_STMPE811 is not set +# CONFIG_DJOYSTICK is not set +# CONFIG_AJOYSTICK is not set +# CONFIG_LCD is not set +CONFIG_MMCSD=y +CONFIG_MMCSD_NSLOTS=1 +# CONFIG_MMCSD_READONLY is not set +CONFIG_MMCSD_MULTIBLOCK_DISABLE=y +# CONFIG_MMCSD_MMCSUPPORT is not set +CONFIG_MMCSD_HAVECARDDETECT=y +# CONFIG_MMCSD_SPI is not set +CONFIG_ARCH_HAVE_SDIO=y +# CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE is not set +CONFIG_MMCSD_SDIO=y +# CONFIG_SDIO_PREFLIGHT is not set +# CONFIG_SDIO_MUXBUS is not set +CONFIG_SDIO_BLOCKSETUP=y +CONFIG_MTD=y + +# +# MTD Configuration +# +# CONFIG_MTD_PARTITION is not set +# CONFIG_MTD_SECT512 is not set +# CONFIG_MTD_BYTE_WRITE is not set +CONFIG_MTD_CONFIG=y +# CONFIG_MTD_CONFIG_RAM_CONSOLIDATE is not set +CONFIG_MTD_CONFIG_ERASEDVALUE=0xff + +# +# MTD Device Drivers +# +# CONFIG_MTD_NAND is not set +# CONFIG_RAMMTD is not set +CONFIG_MTD_AT24XX=y +CONFIG_AT24XX_SIZE=2 +CONFIG_AT24XX_ADDR=0x57 +CONFIG_AT24XX_EXTENDED=y +CONFIG_AT24XX_EXTSIZE=160 +CONFIG_MTD_AT25=y +CONFIG_AT25_SPIMODE=0 +CONFIG_AT25_SPIFREQUENCY=20000000 +# CONFIG_MTD_AT45DB is not set +# CONFIG_MTD_M25P is not set +# CONFIG_MTD_SMART is not set +# CONFIG_MTD_RAMTRON is not set +# CONFIG_MTD_SST25 is not set +# CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST39FV is not set +# CONFIG_MTD_W25 is not set +# CONFIG_EEPROM is not set +# CONFIG_PIPES is not set +# CONFIG_PM is not set +# CONFIG_POWER is not set +# CONFIG_SENSORS is not set +# CONFIG_SERCOMM_CONSOLE is not set +CONFIG_SERIAL=y +# CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_16550_UART is not set +# CONFIG_ARCH_HAVE_UART is not set +# CONFIG_ARCH_HAVE_UART0 is not set +# CONFIG_ARCH_HAVE_UART1 is not set +# CONFIG_ARCH_HAVE_UART2 is not set +CONFIG_ARCH_HAVE_UART3=y +# CONFIG_ARCH_HAVE_UART4 is not set +# CONFIG_ARCH_HAVE_UART5 is not set +# CONFIG_ARCH_HAVE_UART6 is not set +# CONFIG_ARCH_HAVE_UART7 is not set +# CONFIG_ARCH_HAVE_UART8 is not set +# CONFIG_ARCH_HAVE_SCI0 is not set +# CONFIG_ARCH_HAVE_SCI1 is not set +# CONFIG_ARCH_HAVE_USART0 is not set +# CONFIG_ARCH_HAVE_USART1 is not set +# CONFIG_ARCH_HAVE_USART2 is not set +# CONFIG_ARCH_HAVE_USART3 is not set +# CONFIG_ARCH_HAVE_USART4 is not set +# CONFIG_ARCH_HAVE_USART5 is not set +# CONFIG_ARCH_HAVE_USART6 is not set +# CONFIG_ARCH_HAVE_USART7 is not set +# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_ARCH_HAVE_OTHER_UART is not set + +# +# USART Configuration +# +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +# CONFIG_SERIAL_IFLOWCONTROL is not set +# CONFIG_SERIAL_OFLOWCONTROL is not set +CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y +# CONFIG_SERIAL_TERMIOS is not set +CONFIG_UART3_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# UART3 Configuration +# +CONFIG_UART3_RXBUFSIZE=256 +CONFIG_UART3_TXBUFSIZE=256 +CONFIG_UART3_BAUD=115200 +CONFIG_UART3_BITS=8 +CONFIG_UART3_PARITY=0 +CONFIG_UART3_2STOP=0 +# CONFIG_UART3_IFLOWCONTROL is not set +# CONFIG_UART3_OFLOWCONTROL is not set +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_WIRELESS is not set + +# +# System Logging Device Options +# + +# +# System Logging +# +# CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_CONSOLE is not set + +# +# Networking Support +# +# CONFIG_ARCH_HAVE_NET is not set +# CONFIG_ARCH_HAVE_PHY is not set +# CONFIG_NET is not set + +# +# Crypto API +# +# CONFIG_CRYPTO is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set +CONFIG_FS_READABLE=y +CONFIG_FS_WRITABLE=y +# CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" +# CONFIG_FS_RAMMAP is not set +CONFIG_FS_FAT=y +CONFIG_FAT_LCNAMES=y +CONFIG_FAT_LFN=y +CONFIG_FAT_MAXFNAME=32 +# CONFIG_FS_FATTIME is not set +# CONFIG_FAT_DMAMEMORY is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set +# CONFIG_FS_SMARTFS is not set +# CONFIG_FS_BINFS is not set +# CONFIG_FS_PROCFS is not set + +# +# System Logging +# +# CONFIG_SYSLOG is not set +# CONFIG_SYSLOG_TIMESTAMP is not set + +# +# Graphics Support +# +# CONFIG_NX is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=1 +# CONFIG_ARCH_HAVE_HEAP2 is not set +# CONFIG_GRAN is not set + +# +# Audio Support +# +# CONFIG_AUDIO is not set + +# +# Binary Loader +# +# CONFIG_BINFMT_DISABLE is not set +# CONFIG_BINFMT_EXEPATH is not set +# CONFIG_NXFLAT is not set +# CONFIG_ELF is not set +CONFIG_BUILTIN=y +# CONFIG_PIC is not set +# CONFIG_SYMTAB_ORDEREDBYNAME is not set + +# +# Library Routines +# + +# +# Standard C Library Options +# +CONFIG_STDIO_BUFFER_SIZE=64 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=2 +CONFIG_LIB_HOMEDIR="/" +# CONFIG_LIBM is not set +# CONFIG_NOPRINTF_FIELDWIDTH is not set +# CONFIG_LIBC_FLOATINGPOINT is not set +# CONFIG_LIBC_IOCTL_VARIADIC is not set +CONFIG_LIB_RAND_ORDER=1 +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_EXECFUNCS is not set +CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 +CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_LIBC_TMPDIR="/tmp" +CONFIG_LIBC_MAX_TMPFILE=32 +CONFIG_ARCH_LOWPUTC=y +# CONFIG_LIBC_LOCALTIME is not set +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set + +# +# Non-standard Library Support +# +# CONFIG_LIB_KBDCODEC is not set +# CONFIG_LIB_SLCDCODEC is not set + +# +# Basic CXX Support +# +# CONFIG_C99_BOOL8 is not set +# CONFIG_HAVE_CXX is not set + +# +# Application Configuration +# + +# +# Built-In Applications +# +CONFIG_BUILTIN_PROXY_STACKSIZE=1024 + +# +# Examples +# +CONFIG_EXAMPLES_BUTTONS=y +CONFIG_EXAMPLES_BUTTONS_MIN=0 +CONFIG_EXAMPLES_BUTTONS_MAX=1 +CONFIG_EXAMPLES_IRQBUTTONS_MIN=0 +CONFIG_EXAMPLES_IRQBUTTONS_MAX=1 +CONFIG_EXAMPLES_BUTTONS_NAME0="SW0" +CONFIG_EXAMPLES_BUTTONS_NAME1="SW1" +CONFIG_EXAMPLES_BUTTONS_NAME2="Button 2" +CONFIG_EXAMPLES_BUTTONS_NAME3="Button 3" +CONFIG_EXAMPLES_BUTTONS_NAME4="Button 4" +CONFIG_EXAMPLES_BUTTONS_NAME5="Button 5" +CONFIG_EXAMPLES_BUTTONS_NAME6="Button 6" +CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" +# CONFIG_EXAMPLES_CAN is not set +# CONFIG_EXAMPLES_CONFIGDATA is not set +# CONFIG_EXAMPLES_CPUHOG is not set +# CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FTPC is not set +# CONFIG_EXAMPLES_FTPD is not set +# CONFIG_EXAMPLES_HELLO is not set +# CONFIG_EXAMPLES_HELLOXX is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_HIDKBD is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set +# CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_MM is not set +# CONFIG_EXAMPLES_MODBUS is not set +# CONFIG_EXAMPLES_MOUNT is not set +# CONFIG_EXAMPLES_NRF24L01TERM is not set +CONFIG_EXAMPLES_NSH=y +# CONFIG_EXAMPLES_NULL is not set +# CONFIG_EXAMPLES_NX is not set +# CONFIG_EXAMPLES_NXTERM is not set +# CONFIG_EXAMPLES_NXFFS is not set +# CONFIG_EXAMPLES_NXFLAT is not set +# CONFIG_EXAMPLES_NXHELLO is not set +# CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTEXT is not set +# CONFIG_EXAMPLES_OSTEST is not set +# CONFIG_EXAMPLES_PIPE is not set +# CONFIG_EXAMPLES_POSIXSPAWN is not set +# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_RGMP is not set +# CONFIG_EXAMPLES_ROMFS is not set +# CONFIG_EXAMPLES_SENDMAIL is not set +# CONFIG_EXAMPLES_SERIALBLASTER is not set +# CONFIG_EXAMPLES_SERIALRX is not set +# CONFIG_EXAMPLES_SERLOOP is not set +# CONFIG_EXAMPLES_SLCD is not set +# CONFIG_EXAMPLES_SMART_TEST is not set +# CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_TCPECHO is not set +# CONFIG_EXAMPLES_TELNETD is not set +# CONFIG_EXAMPLES_THTTPD is not set +# CONFIG_EXAMPLES_TIFF is not set +CONFIG_EXAMPLES_TOUCHSCREEN=y +CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0 +CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" +# CONFIG_EXAMPLES_TOUCHSCREEN_MOUSE is not set +CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y +# CONFIG_EXAMPLES_WEBSERVER is not set +# CONFIG_EXAMPLES_USBSERIAL is not set +# CONFIG_EXAMPLES_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set + +# +# Graphics Support +# +# CONFIG_TIFF is not set +# CONFIG_GRAPHICS_TRAVELER is not set + +# +# Interpreters +# +# CONFIG_INTERPRETERS_BAS is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set +# CONFIG_INTERPRETERS_MICROPYTHON is not set + +# +# Network Utilities +# + +# +# Networking Utilities +# +# CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_FTPC is not set +# CONFIG_NETUTILS_JSON is not set +# CONFIG_NETUTILS_SMTP is not set +# CONFIG_NETUTILS_THTTPD is not set +# CONFIG_NETUTILS_PPPD is not set + +# +# FreeModBus +# +# CONFIG_MODBUS is not set + +# +# NSH Library +# +CONFIG_NSH_LIBRARY=y + +# +# Command Line Configuration +# +CONFIG_NSH_READLINE=y +# CONFIG_NSH_CLE is not set +CONFIG_NSH_LINELEN=64 +# CONFIG_NSH_DISABLE_SEMICOLON is not set +CONFIG_NSH_CMDPARMS=y +CONFIG_NSH_MAXARGUMENTS=6 +CONFIG_NSH_ARGCAT=y +CONFIG_NSH_NESTDEPTH=3 +# CONFIG_NSH_DISABLEBG is not set +CONFIG_NSH_BUILTIN_APPS=y + +# +# Disable Individual commands +# +# CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_CAT is not set +# CONFIG_NSH_DISABLE_CD is not set +# CONFIG_NSH_DISABLE_CP is not set +# CONFIG_NSH_DISABLE_CMP is not set +# CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_DF is not set +# CONFIG_NSH_DISABLE_DELROUTE is not set +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +# CONFIG_NSH_DISABLE_IFCONFIG is not set +# CONFIG_NSH_DISABLE_KILL is not set +# CONFIG_NSH_DISABLE_LOSETUP is not set +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKFATFS is not set +# CONFIG_NSH_DISABLE_MKFIFO is not set +# CONFIG_NSH_DISABLE_MKRD is not set +# CONFIG_NSH_DISABLE_MH is not set +# CONFIG_NSH_DISABLE_MOUNT is not set +# CONFIG_NSH_DISABLE_MV is not set +# CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_PS is not set +# CONFIG_NSH_DISABLE_PUT is not set +# CONFIG_NSH_DISABLE_PWD is not set +# CONFIG_NSH_DISABLE_RM is not set +# CONFIG_NSH_DISABLE_RMDIR is not set +# CONFIG_NSH_DISABLE_SET is not set +# CONFIG_NSH_DISABLE_SH is not set +# CONFIG_NSH_DISABLE_SLEEP is not set +# CONFIG_NSH_DISABLE_TEST is not set +# CONFIG_NSH_DISABLE_UMOUNT is not set +# CONFIG_NSH_DISABLE_UNSET is not set +# CONFIG_NSH_DISABLE_USLEEP is not set +# CONFIG_NSH_DISABLE_WGET is not set +# CONFIG_NSH_DISABLE_XD is not set + +# +# Configure Command Options +# +# CONFIG_NSH_CMDOPT_DF_H is not set +CONFIG_NSH_CODECS_BUFSIZE=128 +CONFIG_NSH_CMDOPT_HEXDUMP=y +CONFIG_NSH_FILEIOSIZE=512 + +# +# Scripting Support +# +# CONFIG_NSH_DISABLESCRIPT is not set +# CONFIG_NSH_DISABLE_ITEF is not set +# CONFIG_NSH_DISABLE_LOOPS is not set + +# +# Console Configuration +# +CONFIG_NSH_CONSOLE=y +# CONFIG_NSH_ALTCONDEV is not set +CONFIG_NSH_ARCHINIT=y + +# +# NxWidgets/NxWM +# + +# +# Platform-specific Support +# +# CONFIG_PLATFORM_CONFIGDATA is not set + +# +# System Libraries and NSH Add-Ons +# + +# +# Custom Free Memory Command +# +# CONFIG_SYSTEM_FREE is not set + +# +# EMACS-like Command Line Editor +# +# CONFIG_SYSTEM_CLE is not set + +# +# CU Minimal Terminal +# +# CONFIG_SYSTEM_CUTERM is not set + +# +# FLASH Program Installation +# +# CONFIG_SYSTEM_INSTALL is not set + +# +# FLASH Erase-all Command +# +# CONFIG_SYSTEM_FLASH_ERASEALL is not set + +# +# Intel HEX to binary conversion +# +# CONFIG_SYSTEM_HEX2BIN is not set + +# +# I2C tool +# +CONFIG_SYSTEM_I2CTOOL=y +CONFIG_I2CTOOL_MINBUS=0 +CONFIG_I2CTOOL_MAXBUS=0 +CONFIG_I2CTOOL_MINADDR=0x03 +CONFIG_I2CTOOL_MAXADDR=0x77 +CONFIG_I2CTOOL_MAXREGADDR=0xff +CONFIG_I2CTOOL_DEFFREQ=400000 + +# +# INI File Parser +# +# CONFIG_SYSTEM_INIFILE is not set + +# +# NxPlayer media player library / command Line +# + +# +# RAM test +# +# CONFIG_SYSTEM_RAMTEST is not set + +# +# readline() +# +CONFIG_SYSTEM_READLINE=y +CONFIG_READLINE_ECHO=y + +# +# P-Code Support +# + +# +# PHY Tool +# + +# +# Power Off +# +# CONFIG_SYSTEM_POWEROFF is not set + +# +# RAMTRON +# +# CONFIG_SYSTEM_RAMTRON is not set + +# +# SD Card +# +# CONFIG_SYSTEM_SDCARD is not set + +# +# Sudoku +# +# CONFIG_SYSTEM_SUDOKU is not set + +# +# Sysinfo +# +# CONFIG_SYSTEM_SYSINFO is not set + +# +# Temperature +# + +# +# VI Work-Alike Editor +# +# CONFIG_SYSTEM_VI is not set + +# +# Stack Monitor +# + +# +# USB CDC/ACM Device Commands +# + +# +# USB Composite Device Commands +# + +# +# USB Mass Storage Device Commands +# + +# +# USB Monitor +# + +# +# Zmodem Commands +# +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/nuttx/configs/samv71-xult/mxtxplnd/setenv.sh b/nuttx/configs/samv71-xult/mxtxplnd/setenv.sh new file mode 100755 index 000000000..56aa1eb83 --- /dev/null +++ b/nuttx/configs/samv71-xult/mxtxplnd/setenv.sh @@ -0,0 +1,77 @@ +#!/bin/bash +# configs/samv7-xult/mxtxplnd/Make.defs +# +# Copyright (C) 2015 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt <gnutt@nuttx.org> +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +if [ "$_" = "$0" ] ; then + echo "You must source this script, not run it!" 1>&2 + exit 1 +fi + +WD=`pwd` +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This is the Cygwin path to the location where I installed the Atmel GCC +# toolchain under Windows. You will also have to edit this if you install +# this toolchain in any other location +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Atmel/Atmel Toolchain/ARM GCC/Native/4.7.3.99/arm-gnu-toolchain/bin" + +# This is the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" +# export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" + +# This is the location where I installed the ARM "GNU Tools for ARM Embedded Processors" +# You can this free toolchain here https://launchpad.net/gcc-arm-embedded +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/GNU Tools ARM Embedded/4.9 2014q4/bin" + +# This is the path to the location where I installed the devkitARM toolchain +# You can get this free toolchain from http://devkitpro.org/ or http://sourceforge.net/projects/devkitpro/ +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/devkitARM/bin" + +# This is the Cygwin path to the location where I build the buildroot +# toolchain. +# export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" + +# Add the path to the toolchain to the PATH varialble +export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" + +echo "PATH : ${PATH}" diff --git a/nuttx/configs/samv71-xult/netnsh/setenv.sh b/nuttx/configs/samv71-xult/netnsh/setenv.sh index c62128345..678fc9558 100755 --- a/nuttx/configs/samv71-xult/netnsh/setenv.sh +++ b/nuttx/configs/samv71-xult/netnsh/setenv.sh @@ -1,5 +1,5 @@ #!/bin/bash -# configs/sam4e-ek/netnsh/Make.defs +# configs/samv7-xult/netnsh/Make.defs # # Copyright (C) 2015 Gregory Nutt. All rights reserved. # Author: Gregory Nutt <gnutt@nuttx.org> diff --git a/nuttx/configs/samv71-xult/nsh/setenv.sh b/nuttx/configs/samv71-xult/nsh/setenv.sh index 58b9c6e57..9c084a195 100755 --- a/nuttx/configs/samv71-xult/nsh/setenv.sh +++ b/nuttx/configs/samv71-xult/nsh/setenv.sh @@ -1,5 +1,5 @@ #!/bin/bash -# configs/sam4e-ek/nsh/Make.defs +# configs/samv7-xult/nsh/Make.defs # # Copyright (C) 2015 Gregory Nutt. All rights reserved. # Author: Gregory Nutt <gnutt@nuttx.org> diff --git a/nuttx/configs/samv71-xult/src/Makefile b/nuttx/configs/samv71-xult/src/Makefile index 5e4acb34c..4e31999d5 100644 --- a/nuttx/configs/samv71-xult/src/Makefile +++ b/nuttx/configs/samv71-xult/src/Makefile @@ -94,6 +94,10 @@ endif endif endif +ifeq ($(CONFIG_INPUT_MXT),y) +CSRCS += sam_maxtouch.c +endif + COBJS = $(CSRCS:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) diff --git a/nuttx/configs/samv71-xult/src/sam_bringup.c b/nuttx/configs/samv71-xult/src/sam_bringup.c index 3b1878410..a1856f97f 100644 --- a/nuttx/configs/samv71-xult/src/sam_bringup.c +++ b/nuttx/configs/samv71-xult/src/sam_bringup.c @@ -64,8 +64,8 @@ ****************************************************************************/ #define NSECTORS(n) \ - (((n)+CONFIG_SAMV7XULT_ROMFS_ROMDISK_SECTSIZE-1) / \ - CONFIG_SAMV7XULT_ROMFS_ROMDISK_SECTSIZE) + (((n)+CONFIG_SAMV71XULT_ROMFS_ROMDISK_SECTSIZE-1) / \ + CONFIG_SAMV71XULT_ROMFS_ROMDISK_SECTSIZE) /* Debug ********************************************************************/ @@ -125,25 +125,25 @@ int sam_bringup(void) HSMCI0_SLOTNO, HSMCI0_MINOR, ret); } -#ifdef CONFIG_SAMV7XULT_HSMCI0_MOUNT +#ifdef CONFIG_SAMV71XULT_HSMCI0_MOUNT else { /* REVISIT: A delay seems to be required here or the mount will fail. */ /* Mount the volume on HSMCI0 */ - ret = mount(CONFIG_SAMV7XULT_HSMCI0_MOUNT_BLKDEV, - CONFIG_SAMV7XULT_HSMCI0_MOUNT_MOUNTPOINT, - CONFIG_SAMV7XULT_HSMCI0_MOUNT_FSTYPE, + ret = mount(CONFIG_SAMV71XULT_HSMCI0_MOUNT_BLKDEV, + CONFIG_SAMV71XULT_HSMCI0_MOUNT_MOUNTPOINT, + CONFIG_SAMV71XULT_HSMCI0_MOUNT_FSTYPE, 0, NULL); if (ret < 0) { SYSLOG("ERROR: Failed to mount %s: %d\n", - CONFIG_SAMV7XULT_HSMCI0_MOUNT_MOUNTPOINT, errno); + CONFIG_SAMV71XULT_HSMCI0_MOUNT_MOUNTPOINT, errno); } } -#endif /* CONFIG_SAMV7XULT_HSMCI0_MOUNT */ +#endif /* CONFIG_SAMV71XULT_HSMCI0_MOUNT */ #endif /* HAVE_HSMCI */ #ifdef HAVE_AUTOMOUNTER @@ -155,9 +155,9 @@ int sam_bringup(void) #ifdef HAVE_ROMFS /* Create a ROM disk for the /etc filesystem */ - ret = romdisk_register(CONFIG_SAMV7XULT_ROMFS_ROMDISK_MINOR, romfs_img, + ret = romdisk_register(CONFIG_SAMV71XULT_ROMFS_ROMDISK_MINOR, romfs_img, NSECTORS(romfs_img_len), - CONFIG_SAMV7XULT_ROMFS_ROMDISK_SECTSIZE); + CONFIG_SAMV71XULT_ROMFS_ROMDISK_SECTSIZE); if (ret < 0) { SYSLOG("ERROR: romdisk_register failed: %d\n", -ret); @@ -166,14 +166,14 @@ int sam_bringup(void) { /* Mount the file system */ - ret = mount(CONFIG_SAMV7XULT_ROMFS_ROMDISK_DEVNAME, - CONFIG_SAMV7XULT_ROMFS_MOUNT_MOUNTPOINT, + ret = mount(CONFIG_SAMV71XULT_ROMFS_ROMDISK_DEVNAME, + CONFIG_SAMV71XULT_ROMFS_MOUNT_MOUNTPOINT, "romfs", MS_RDONLY, NULL); if (ret < 0) { SYSLOG("ERROR: mount(%s,%s,romfs) failed: %d\n", - CONFIG_SAMV7XULT_ROMFS_ROMDISK_DEVNAME, - CONFIG_SAMV7XULT_ROMFS_MOUNT_MOUNTPOINT, errno); + CONFIG_SAMV71XULT_ROMFS_ROMDISK_DEVNAME, + CONFIG_SAMV71XULT_ROMFS_MOUNT_MOUNTPOINT, errno); } } #endif diff --git a/nuttx/configs/samv71-xult/src/sam_hsmci.c b/nuttx/configs/samv71-xult/src/sam_hsmci.c index 856d18c6b..77aca84c1 100644 --- a/nuttx/configs/samv71-xult/src/sam_hsmci.c +++ b/nuttx/configs/samv71-xult/src/sam_hsmci.c @@ -175,7 +175,7 @@ static int sam_hsmci0_cardetect(int irq, void *regs) ret = sam_hsmci_cardetect(&g_hsmci0); -#ifdef CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT +#ifdef CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT /* Let the automounter know about the insertion event */ sam_automount_event(HSMCI0_SLOTNO, sam_cardinserted(HSMCI0_SLOTNO)); diff --git a/nuttx/configs/samv71-xult/src/sam_maxtouch.c b/nuttx/configs/samv71-xult/src/sam_maxtouch.c new file mode 100644 index 000000000..e1eb8b2a5 --- /dev/null +++ b/nuttx/configs/samv71-xult/src/sam_maxtouch.c @@ -0,0 +1,310 @@ +/************************************************************************************ + * configs/samv7-xult/src/sam_maxtouch.c + * + * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <gnutt@nuttx.org> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include <nuttx/config.h> + +#include <stdbool.h> +#include <stdio.h> +#include <debug.h> +#include <assert.h> +#include <errno.h> + +#include <nuttx/spi/spi.h> +#include <nuttx/input/touchscreen.h> +#include <nuttx/input/mxt.h> + +#include "up_arch.h" +#include "sam_gpio.h" +#include "sam_twihs.h" + +#include "samv71-xult.h" + +#ifdef HAVE_MAXTOUCH + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ +/* Configuration ************************************************************/ + +#ifndef CONFIG_SAMV71XULT_MXT_I2CFREQUENCY +# define CONFIG_SAMV71XULT_MXT_I2CFREQUENCY 500000 +#endif + +#ifndef CONFIG_SAMV71XULT_MXT_DEVMINOR +# define CONFIG_SAMV71XULT_MXT_DEVMINOR 0 +#endif + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +struct sama5d4ek_tscinfo_s +{ + /* Standard maXTouch interface */ + + struct mxt_lower_s lower; + + /* Extensions for the sama5d4ek board */ + + mxt_handler_t handler; + FAR void *arg; +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/* IRQ/PIO access callbacks. These operations all hidden behind + * callbacks to isolate the maXTouch driver from differences in PIO + * interrupt handling by varying boards and MCUs. If possible, + * interrupts should be configured on both rising and falling edges + * so that contact and loss-of-contact events can be detected. + * + * attach - Attach the maXTouch interrupt handler to the PIO interrupt + * enable - Enable or disable the PIO interrupt + * clear - Acknowledge/clear any pending PIO interrupt + */ + +static int mxt_attach(FAR const struct mxt_lower_s *lower, mxt_handler_t isr, + FAR void *arg); +static void mxt_enable(FAR const struct mxt_lower_s *lower, bool enable); +static void mxt_clear(FAR const struct mxt_lower_s *lower); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* A reference to a structure of this type must be passed to the maXTouch + * driver. This structure provides information about the configuration + * of the maXTouch and provides some board-specific hooks. + * + * Memory for this structure is provided by the caller. It is not copied + * by the driver and is presumed to persist while the driver is active. + */ + +static struct sama5d4ek_tscinfo_s g_mxtinfo = +{ + .lower = + { + .address = MXT_I2C_ADDRESS, + .frequency = CONFIG_SAMV71XULT_MXT_I2CFREQUENCY, + + .attach = mxt_attach, + .enable = mxt_enable, + .clear = mxt_clear, + }, +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * IRQ/PIO access callbacks. These operations all hidden behind + * callbacks to isolate the maXTouch driver from differences in PIO + * interrupt handling by varying boards and MCUs. If possible, + * interrupts should be configured on both rising and falling edges + * so that contact and loss-of-contact events can be detected. + * + * attach - Attach the maXTouch interrupt handler to the PIO interrupt + * enable - Enable or disable the PIO interrupt + * clear - Acknowledge/clear any pending PIO interrupt + * + ****************************************************************************/ + +static int mxt_attach(FAR const struct mxt_lower_s *lower, mxt_handler_t isr, + FAR void *arg) +{ + if (isr) + { + /* Just save the address of the handler and its argument for now. The + * new handler will called via mxt_interrupt() when the interrupt occurs. + */ + + ivdbg("Attaching %p\n", isr); + g_mxtinfo.handler = isr; + g_mxtinfo.arg = arg; + } + else + { + ivdbg("Detaching %p\n", g_mxtinfo.handler); + mxt_enable(lower, false); + g_mxtinfo.handler = NULL; + g_mxtinfo.arg = NULL; + } + + return OK; +} + +static void mxt_enable(FAR const struct mxt_lower_s *lower, bool enable) +{ + /* Enable or disable interrupts */ + + if (enable && g_mxtinfo.handler) + { + sam_gpioirqenable(IRQ_MXT_CHG); + } + else + { + sam_gpioirqdisable(IRQ_MXT_CHG); + } +} + +static void mxt_clear(FAR const struct mxt_lower_s *lower) +{ + /* Does nothing */ +} + +static int mxt_interrupt(int irq, FAR void *context) +{ + /* Just forward the interrupt to the maXTouch driver */ + + if (g_mxtinfo.handler) + { + return g_mxtinfo.handler(&g_mxtinfo.lower, g_mxtinfo.arg); + } + + /* We got an interrupt with no handler. This should not + * happen. + */ + + sam_gpioirqdisable(IRQ_MXT_CHG); + return OK; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: arch_tcinitialize + * + * Description: + * Each board that supports a touchscreen device must provide this function. + * This function is called by application-specific, setup logic to + * configure the touchscreen device. This function will register the driver + * as /dev/inputN where N is the minor device number. + * + * Input Parameters: + * minor - The input device minor number + * + * Returned Value: + * Zero is returned on success. Otherwise, a negated errno value is + * returned to indicate the nature of the failure. + * + ****************************************************************************/ + +int arch_tcinitialize(int minor) +{ + FAR struct i2c_dev_s *i2c; + static bool initialized = false; + int ret; + + idbg("minor %d\n", minor); + DEBUGASSERT(minor == 0); + + /* Have we already initialized? Since we never uninitialize we must prevent + * multiple initializations. This is necessary, for example, when the + * touchscreen example is used as a built-in application in NSH and can be + * called numerous time. It will attempt to initialize each time. + */ + + if (!initialized) + { + /* Configure the maXTouch CHG interrupt pin */ + + (void)sam_configgpio(GPIO_MXT_CHG); + + /* Get an instance of the I2C interface for the touchscreen chip select */ + + i2c = up_i2cinitialize(MXT_TWI_BUS); + if (!i2c) + { + idbg("Failed to initialize I2C%d\n", MXT_TWI_BUS); + return -ENODEV; + } + + /* Configure maXTouch CHG interrupts */ + + sam_gpioirq(GPIO_MXT_CHG); + (void)irq_attach(IRQ_MXT_CHG, mxt_interrupt); + + /* Initialize and register the I2C touchscreen device */ + + ret = mxt_register(i2c, &g_mxtinfo.lower, CONFIG_SAMV71XULT_MXT_DEVMINOR); + if (ret < 0) + { + idbg("ERROR: Failed to register touchscreen device\n"); + irq_detach(IRQ_MXT_CHG); + /* up_i2cuninitialize(i2c); */ + return -ENODEV; + } + + /* Now we are initialized */ + + initialized = true; + } + + return OK; +} + +/**************************************************************************** + * Name: arch_tcuninitialize + * + * Description: + * Each board that supports a touchscreen device must provide this function. + * This function is called by application-specific, setup logic to + * uninitialize the touchscreen device. + * + * Input Parameters: + * None + * + * Returned Value: + * None + * + ****************************************************************************/ + +void arch_tcuninitialize(void) +{ + /* No support for un-initializing the touchscreen maXTouch device. It will + * continue to run and process touch interrupts in the background. + */ +} + +#endif /* HAVE_MAXTOUCH */ diff --git a/nuttx/configs/samv71-xult/src/samv71-xult.h b/nuttx/configs/samv71-xult/src/samv71-xult.h index 873972ffd..e3cb1f753 100644 --- a/nuttx/configs/samv71-xult/src/samv71-xult.h +++ b/nuttx/configs/samv71-xult/src/samv71-xult.h @@ -61,6 +61,59 @@ #define HAVE_NETWORK 1 #define HAVE_MACADDR 1 #define HAVE_MTDCONFIG 1 +#define HAVE_MAXTOUCH 1 +#define HAVE_ILI9488 1 + +/* LCD */ + +#ifndef CONFIG_SAMV71XULT_MXTXPLND +# undef HAVE_MAXTOUCH +# undef HAVE_ILI9488 +#endif + +#if defined(HAVE_MAXTOUCH) && !defined(CONFIG_INPUT_MXT) +# warning maXTouch support not enabled (CONFIG_INPUT_MXT) +# undef HAVE_MAXTOUCH +#endif + +#if defined(HAVE_MAXTOUCH) && !defined(CONFIG_SAMV7_TWIHS0) +# warning maXTouch support requires TWIHS0 +# undef HAVE_MAXTOUCH +#endif + +#ifdef HAVE_MAXTOUCH +# if defined(CONFIG_SAMV71XULT_MXTXPLND_EXT1) +# ifndef CONFIG_SAMV7_GPIOD_IRQ +# warning maXTouch on EXT1 requires CONFIG_SAMV7_GPIOD_IRQ +# undef HAVE_MAXTOUCH +# endif +# elif defined(CONFIG_SAMV71XULT_MXTXPLND_EXT2) +# ifndef CONFIG_SAMV7_GPIOA_IRQ +# warning maXTouch on EXT1 requires CONFIG_SAMV7_GPIOA_IRQ +# undef HAVE_MAXTOUCH +# endif +# else +# warning maXTouch requires CONFIG_SAMV71XULT_MXTXPLND_EXT1 or EXT2 +# undef HAVE_MAXTOUCH +# endif +#endif + +#if defined(HAVE_ILI9488) && !defined(CONFIG_LCD_ILI9488) +# warning ILI9488 support not enabled (CONFIG_LCD_ILI9488) +# undef HAVE_ILI9488 +#endif + +#if defined(HAVE_ILI9488) && !defined(CONFIG_SAMV7_SPI0) +# warning ILI9488 support requires SPI0 +# undef HAVE_ILI9488 +#endif + +#ifdef HAVE_ILI9488 +# if !defined(CONFIG_SAMV71XULT_MXTXPLND_EXT1) && !defined(CONFIG_SAMV71XULT_MXTXPLND_EXT2) +# warning ILI9488 requires CONFIG_SAMV71XULT_MXTXPLND_EXT1 or EXT2 +# undef HAVE_ILI9488 +# endif +#endif /* HSMCI */ /* Can't support MMC/SD if the card interface is not enabled */ @@ -106,37 +159,37 @@ #if !defined(CONFIG_FS_AUTOMOUNTER) || !defined(HAVE_HSMCI) # undef HAVE_AUTOMOUNTER -# undef CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT +# undef CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT #endif -#ifndef CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT +#ifndef CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT # undef HAVE_AUTOMOUNTER #endif #ifdef HAVE_AUTOMOUNTER -# ifdef CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT +# ifdef CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT /* HSMCI0 Automounter defaults */ -# ifndef CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT_FSTYPE -# define CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT_FSTYPE "vfat" +# ifndef CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT_FSTYPE +# define CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT_FSTYPE "vfat" # endif -# ifndef CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT_BLKDEV -# define CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT_BLKDEV "/dev/mmcds0" +# ifndef CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT_BLKDEV +# define CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT_BLKDEV "/dev/mmcds0" # endif -# ifndef CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT_MOUNTPOINT -# define CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT_MOUNTPOINT "/mnt/sdcard0" +# ifndef CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT_MOUNTPOINT +# define CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT_MOUNTPOINT "/mnt/sdcard0" # endif -# ifndef CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT_DDELAY -# define CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT_DDELAY 1000 +# ifndef CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT_DDELAY +# define CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT_DDELAY 1000 # endif -# ifndef CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT_UDELAY -# define CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT_UDELAY 2000 +# ifndef CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT_UDELAY +# define CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT_UDELAY 2000 # endif -# endif /* CONFIG_SAMV7XULT_HSMCI0_AUTOMOUNT */ +# endif /* CONFIG_SAMV71XULT_HSMCI0_AUTOMOUNT */ #endif /* HAVE_AUTOMOUNTER */ /* USB Device */ @@ -181,10 +234,122 @@ /* SAMV71-XULT GPIO Pin Definitions *************************************************/ -/* LCD: - * To be provided +/* maXTouch Xplained Pro LCD + * + * This LCD could be connected either via EXT1 or EXT2 using the 2x10 + * 20-pin cable and the maXTouch Xplained Pro standard extension + * header. Access this then performed in SPI mode. + * + * ---- -------- ---- ----------- ---- ----------- ------------------------------------------ + * SAMV71-XULT maxTouch Xplained Pro + * PIN FUNCTION EXT1 FUNC EXT2 FUNC Description + * ---- -------- ---- ----------- ---- ----------- ------------------------------------------ + * 1 ID - - - - Communication line to ID chip + * 2 GND - - - - Ground + * 3 N/C PC31 - PD30 - + * 4 N/C PA19 - PC13 - + * 5 GPIO PB3 GPIO PA6 GPIO Command/Data Select + * 6 N/C PB2 - PD11 - + * 7 PWM PA0 PWMC0_PWMH0 PC19 PWMC0_PMWH2 Backlight control + * 8 N/C PC30 - PD26 - + * 9 GPIO/IRQ PD28 GPIO PA2 GPIO IRQ from maXTouch controller + * 10 GPIO PA5 GPIO PA24 GPIO RESET signal for maXTouch and LCD controller + * 11 I2C SDA PA3 TWID0 PA3 TWID0 I2C Data line for maXTouch controller + * 12 I2C SCL PA4 TWICK0 PA4 TWICK0 I2C Clock line for maXTouch controller + * 13 N/C PB0 - PA21 - + * 14 N/C PB1 - PB4 - + * 15 CS PD25 GPIO PD27 GPIO CS line for LCD controller + * 16 SPI MOSI PD21 SPI0_MOSI PD21 SPI0_MOSI SPI Data to LCD controller + * 17 SPI MISO PD20 SPI0_MISO PD20 SPI0_MISO SPI Data from LCD controller + * 18 SPI SCK PD22 SPI0_SPCK PD22 SPI0_SPCK SPI Clock line + * 19 GND - - - - Ground + * 20 VCC - - - - Target supply voltage + * ---- -------- ---- ----------- ---- ----------- ------------------------------------------ */ +#ifdef CONFIG_SAMV71XULT_MXTXPLND +/* Common maXTouch Xplained Pro board definitions */ + +# ifdef CONFIG_SAMV71XULT_MXTXPLND_EXT1 + +# define GPIO_MXTXPLND_RESET \ + (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_SET | \ + GPIO_PORT_PIOA | GPIO_PIN5) + +# define GPIO_ILI9488_BLOFF \ + (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_CLEAR | \ + GPIO_PORT_PIOA | GPIO_PIN0) + +# else /* CONFIG_SAMV71XULT_MXTXPLND_EXT2 */ + +# define GPIO_MXTXPLND_RESET \ + (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_SET | \ + GPIO_PORT_PIOA | GPIO_PIN24) + +# define GPIO_ILI9488_BLOFF \ + (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_CLEAR | \ + GPIO_PORT_PIOC | GPIO_PIN19) + +# endif /* CONFIG_SAMV71XULT_MXTXPLND_EXT1 */ + +# ifdef HAVE_MAXTOUCH +/* maXTouch touchscreen controller definitions */ + +# ifdef CONFIG_SAMV71XULT_MXTXPLND_EXT1 + +# define GPIO_MXT_CHG \ + (GPIO_INPUT | GPIO_CFG_PULLUP | GPIO_CFG_DEGLITCH | GPIO_INT_FALLING | \ + GPIO_PORT_PIOD | GPIO_PIN28) +# define IRQ_MXT_CHG \ + SAM_IRQ_PD28 + +# else /* if CONFIG_SAMV71XULT_MXTXPLND_EXT2 */ + +# define GPIO_MXT_CHG \ + (GPIO_INPUT | GPIO_CFG_PULLUP | GPIO_CFG_DEGLITCH | GPIO_INT_FALLING | \ + GPIO_PORT_PIOA | GPIO_PIN2) +# define IRQ_MXT_CHG \ + SAM_IRQ_PA2 + +# endif /* CONFIG_SAMV71XULT_MXTXPLND_EXT1 */ + +/* The touchscreen communicates on TWI0, I2C address 0x4a */ + +# define MXT_TWI_BUS 0 +# define MXT_I2C_ADDRESS 0x4a + +# endif /* HAVE_MAXTOUCH */ + +# ifdef HAVE_ILI9488 +/* ILI9488 LCD definitions */ + +# ifdef CONFIG_SAMV71XULT_MXTXPLND_EXT1 +# define GPIO_ILI9488_CMDDAT \ + (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_CLEAR | \ + GPIO_PORT_PIOA | GPIO_PIN23) + +# define GPIO_ILI9488_CS \ + (PIO_OUTPUT | GPIO_CFG_PULLUP | GPIO_OUTPUT_SET | \ + GPIO_PORT_PIOD | GPIO_PIN25) +# define ILI9488_PORT \ + SPI0_CS1 + +# else /* if CONFIG_SAMV71XULT_MXTXPLND_EXT2 */ + +# define GPIO_ILI9488_CMDDAT \ + (GPIO_OUTPUT | GPIO_CFG_DEFAULT | GPIO_OUTPUT_CLEAR | \ + GPIO_PORT_PIOA | GPIO_PIN23) + +# define GPIO_ILI9488_CS \ + (PIO_OUTPUT | GPIO_CFG_PULLUP | GPIO_OUTPUT_SET | \ + GPIO_PORT_PIOD | GPIO_PIN27) +# define MXTXLPND_PORT \ + SPI0_CS3 + +# endif /* CONFIG_SAMV71XULT_MXTXPLND_EXT1 */ +# endif /* HAVE_ILI9488 */ +#endif /* CONFIG_SAMV71XULT_MXTXPLND */ + /* Ethernet MAC. * * KSZ8061RNBVA Connections |