Add an ADC-based touchscreen driver for the PIC32MX7 MMB board

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4804 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2012-06-05 19:45:01 +00:00
parent 7da38c9dad
commit 930b5b836c
9 changed files with 1981 additions and 553 deletions

View File

@ -2888,3 +2888,5 @@
support for the MIO283QT2 LCD. support for the MIO283QT2 LCD.
* configs/pic32mx7mmb/src/up_mio283qt2.c: Add support for the MIO283QT2 * configs/pic32mx7mmb/src/up_mio283qt2.c: Add support for the MIO283QT2
LCD on the PIC32MX7 MMB board. LCD on the PIC32MX7 MMB board.
* configs/pic32mx7mmb/src/up_touchscreen.c: Add an ACD-based touchscreen
driver for the PIC32MX7 MMB board.

View File

@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4"> <tr align="center" bgcolor="#e4e4e4">
<td> <td>
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1> <h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
<p>Last Updated: May 19, 2012</p> <p>Last Updated: June 4, 2012</p>
</td> </td>
</tr> </tr>
</table> </table>
@ -2269,14 +2269,19 @@
Stay tuned for updates. Stay tuned for updates.
</p> </p>
<li><b>Mikroelektronika PIC32MX7 Mulitmedia Board (MMB)</b>. <li><b>Mikroelektronika PIC32MX7 Mulitmedia Board (MMB)</b>.
A port has begun for the Mikroelektronika PIC32MX7 Multimedia Board (MMB). A port has been completed for the Mikroelektronika PIC32MX7 Multimedia Board (MMB).
See http://www.mikroe.com/ for further information. See http://www.mikroe.com/ for further information about this board.
</li> </li>
<p> <p>
<b>STATUS:</b> <b>STATUS:</b>
A basic OS test configuration is in place, but the board does not boot. Two verified configurations are available:
It looks like I will need an ICD3 in order to debug the code (PICkit3 (1) The basic OS test configuration that verfies the correctnexx port of Nuttx, and (2) an extensive <a href="NuttShell.html">NuttShell (NSH)</a> configuration.
doesn't work for debugging with this board). This effort is temporarily stalled. The NSH configuration includes:
(1) Full network support,
(2) Verified SPI driver,
(3) SPI-based SD Card support,
(4) USB device support (including configuration options for the USB mass storage device and the CDC/ACM serial class), and
(4) Support for the MIO873QT2 LCD on the PIC32MX7 MMB.
</p> </p>
</ul> </ul>
</td> </td>

View File

@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/mips/src/pic32mx/pic32mx-adc.h * arch/mips/src/pic32mx/pic32mx-adc.h
* *
* Copyright (C) 2011 Gregory Nutt. All rights reserved. * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

View File

@ -1,7 +1,7 @@
/******************************************************************************************** /********************************************************************************************
* arch/mips/src/pic32mx/pic32mx-ioport.h * arch/mips/src/pic32mx/pic32mx-ioport.h
* *
* Copyright (C) 2011 Gregory Nutt. All rights reserved. * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without

View File

@ -762,3 +762,13 @@ Where <subdir> is one of the following:
CONFIGURED_APPS += examples/nximage : CONFIGURED_APPS += examples/nximage :
CONFIGURED_APPS += examples/nxlines : CONFIGURED_APPS += examples/nxlines :
Enabling touch screen support in the nsh configuaration
-------------------------------------------------------
In defconfig (or nuttx/.config), set:
CONFIG_INPUT=y
In appconfig (or apps/.config), uncomment:
CONFIGURED_APPS += examples/touchscreen

View File

@ -124,3 +124,9 @@ ifeq ($(CONFIG_NX),y)
#CONFIGURED_APPS += examples/nximage #CONFIGURED_APPS += examples/nximage
#CONFIGURED_APPS += examples/nxlines #CONFIGURED_APPS += examples/nxlines
endif endif
# Uncomment to enable the touchscreen test
ifeq ($(CONFIG_INPUT),y)
#CONFIGURED_APPS += examples/touchscreen
endif

View File

@ -1567,6 +1567,28 @@ CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0xf7bb
CONFIG_EXAMPLES_NXLINES_BPP=16 CONFIG_EXAMPLES_NXLINES_BPP=16
CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n
#
# Settings for examples/touchscreen
#
# CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN - Build the touchscreen test as
# an NSH built-in function. Default: Built as a standalone problem
# CONFIG_EXAMPLES_TOUCHSCREEN_MINOR - The minor device number. Minor=N
# correspnds to touchscreen device /dev/input0. Note this value must
# with CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH. Default 0.
# CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH - The path to the touchscreen
# device. This must be consistent with CONFIG_EXAMPLES_TOUCHSCREEN_MINOR.
# Default: "/dev/input0"
# CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES - If CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN
# is defined, then the number of samples is provided on the command line
# and this value is ignored. Otherwise, this number of samples is
# collected and the program terminates. Default: Samples are collected
# indefinitely.
#
CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=y
CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0
CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
# #
# Settings for examples/usbserial # Settings for examples/usbserial
# #

View File

@ -55,6 +55,10 @@ ifeq ($(CONFIG_USBMSC),y)
CSRCS += up_usbmsc.c CSRCS += up_usbmsc.c
endif endif
ifeq ($(CONFIG_INPUT),y)
CSRCS += up_touchscreen.c
endif
AOBJS = $(ASRCS:.S=$(OBJEXT)) AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT))

File diff suppressed because it is too large Load Diff