arch/arm/src/: Fix a error in last commit that was cloned in three places.
This commit is contained in:
parent
b8ea9e9c64
commit
87252297d6
@ -59,5 +59,4 @@
|
||||
|
||||
void lpc17_boardinitialize(void);
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARCH_ARM_SRC_LPC17XX_LPC17_START_H */
|
||||
|
@ -59,5 +59,4 @@
|
||||
|
||||
void lpc43_boardinitialize(void);
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARCH_ARM_SRC_LPC43XX_LPC43_START_H */
|
||||
|
@ -59,5 +59,4 @@
|
||||
|
||||
void stm32_boardinitialize(void);
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARCH_ARM_SRC_STM32_STM32_START_H */
|
||||
|
@ -12,16 +12,21 @@ CONFIG_DRIVERS_VIDEO=y
|
||||
CONFIG_EXAMPLES_FB=y
|
||||
CONFIG_EXAMPLES_NSH=y
|
||||
CONFIG_EXAMPLES_PDCURSES=y
|
||||
CONFIG_EXAMPLES_TOUCHSCREEN=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_GRAPHICS_PDCURSES=y
|
||||
CONFIG_I2CTOOL_MAXBUS=9
|
||||
CONFIG_INPUT_FT5X06=y
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0_OFFSET=0x00080000
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0_SIZE=0x00f80000
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0=y
|
||||
CONFIG_LPC54_EMC=y
|
||||
CONFIG_LPC54_GPIOIRQ=y
|
||||
CONFIG_LPC54_I2C2_MASTER=y
|
||||
CONFIG_LPC54_LCD_BGR=y
|
||||
CONFIG_LPC54_LCD_BPP16_565=y
|
||||
CONFIG_LPC54_LCD_HBACKPORCH=43
|
||||
@ -51,11 +56,13 @@ CONFIG_RAM_SIZE=32768
|
||||
CONFIG_RAM_START=0x10000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_START_DAY=13
|
||||
CONFIG_START_MONTH=12
|
||||
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||
CONFIG_SYSTEM_I2CTOOL=y
|
||||
CONFIG_SYSTEM_RAMTEST=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_USART0_SERIAL_CONSOLE=y
|
||||
|
@ -50,6 +50,18 @@ ifeq ($(CONFIG_LIB_BOARDCTL),y)
|
||||
CSRCS += lpc54_appinit.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LPC54_HAVE_I2C_MASTER),y)
|
||||
CSRCS += lpc54_i2c.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SYSTEM_I2CTOOL),y)
|
||||
CSRCS += lpc54_i2ctool.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_INPUT_FT5X06),y)
|
||||
CSRCS += lpc54_ft5x06.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LPC54_EMC),y)
|
||||
ifeq ($(CONFIG_LPC54_EMC_DYNAMIC),y)
|
||||
CSRCS += lpc54_sdram.c
|
||||
|
@ -43,99 +43,16 @@
|
||||
#include <sys/mount.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/video/fb.h>
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
#ifdef CONFIG_VIDEO_FB
|
||||
# include <nuttx/video/fb.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BUTTONS_LOWER
|
||||
# include <nuttx/input/buttons.h>
|
||||
#endif
|
||||
|
||||
#include "lpc54_config.h"
|
||||
#include "lpc54_i2c_master.h"
|
||||
#include "lpcxpresso-lpc54628.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_i2c_register
|
||||
*
|
||||
* Description:
|
||||
* Register one I2C drivers for the I2C tool.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef HAVE_I2CTOOL
|
||||
static void lpc54_i2c_register(int bus)
|
||||
{
|
||||
FAR struct i2c_master_s *i2c;
|
||||
int ret;
|
||||
|
||||
i2c = lpc54_i2cbus_initialize(bus);
|
||||
if (i2c == NULL)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to get I2C%d interface\n", bus);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = i2c_register(i2c, bus);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to register I2C%d driver: %d\n",
|
||||
bus, ret);
|
||||
lpc54_i2cbus_uninitialize(i2c);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_i2ctool
|
||||
*
|
||||
* Description:
|
||||
* Register I2C drivers for the I2C tool.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef HAVE_I2CTOOL
|
||||
static void lpc54_i2ctool(void)
|
||||
{
|
||||
#ifdef CONFIG_LPC54_I2C0_MASTER
|
||||
lpc54_i2c_register(0);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C1_MASTER
|
||||
lpc54_i2c_register(1);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C2_MASTER
|
||||
lpc54_i2c_register(2);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C3_MASTER
|
||||
lpc54_i2c_register(3);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C4_MASTER
|
||||
lpc54_i2c_register(4);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C5_MASTER
|
||||
lpc54_i2c_register(5);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C6_MASTER
|
||||
lpc54_i2c_register(6);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C7_MASTER
|
||||
lpc54_i2c_register(7);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C8_MASTER
|
||||
lpc54_i2c_register(8);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C9_MASTER
|
||||
lpc54_i2c_register(9);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
# define lpc54_i2ctool()
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@ -168,9 +85,11 @@ int lpc54_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_I2CTOOL
|
||||
/* Register I2C drivers on behalf of the I2C tool */
|
||||
|
||||
lpc54_i2ctool();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_VIDEO_FB
|
||||
/* Initialize and register the framebuffer driver */
|
||||
@ -182,6 +101,16 @@ int lpc54_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FT5x06
|
||||
/* Register the FT5x06 touch panel driver */
|
||||
|
||||
ret = lpc54_ft5x06_register();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: lpc54_ft5x06_register() failed: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BUTTONS_LOWER
|
||||
/* Register the BUTTON driver */
|
||||
|
||||
|
@ -65,9 +65,9 @@ void lpc54_lcd_initialize(void)
|
||||
|
||||
lpc54_gpio_config(GPIO_LCD_BL);
|
||||
|
||||
/* Initialize touchscreen controller GPIOs here too (for now) */
|
||||
/* Initiale touchscreen controller nRST GPIOs here (putting it into reset) */
|
||||
|
||||
lpc54_gpio_config(GPIO_LCD_CTRSTn);
|
||||
lpc54_gpio_config(GPIO_FT5x06_CTRSTn);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -50,6 +50,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#define HAVE_I2CTOOL 1
|
||||
#define HAVE_FT5x06 1
|
||||
|
||||
/* Do we need to register I2C drivers on behalf of the I2C tool? */
|
||||
|
||||
@ -58,6 +59,106 @@
|
||||
# undef HAVE_I2CTOOL
|
||||
#endif
|
||||
|
||||
/* Do we need to register FT5x06 touch panel driver? */
|
||||
|
||||
#if !defined(CONFIG_INPUT_FT5X06) || !defined(CONFIG_LPC54_I2C2_MASTER) || \
|
||||
!defined(CONFIG_LPC54_GPIOIRQ)
|
||||
# undef HAVE_FT5x06
|
||||
#endif
|
||||
|
||||
/* Indices into a sparse I2C array. Used with lpc54_i2c_handle() */
|
||||
|
||||
#ifdef CONFIG_LPC54_I2C0_MASTER
|
||||
# define I2C0NDX 0
|
||||
# define I2C0CNT 1
|
||||
# define __I2C1NX 1
|
||||
#else
|
||||
# define I2C0CNT 0
|
||||
# define __I2C1NX 0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC54_I2C1_MASTER
|
||||
# define I2C1NDX __I2C1NX
|
||||
# define I2C1CNT 1
|
||||
# define __I2C2NX (__I2C1NX + 1)
|
||||
#else
|
||||
# define I2C1CNT 0
|
||||
# define __I2C2NX 0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC54_I2C2_MASTER
|
||||
# define I2C2NDX __I2C2NX
|
||||
# define I2C2CNT 1
|
||||
# define __I2C3NX (__I2C2NX + 1)
|
||||
#else
|
||||
# define I2C2CNT 0
|
||||
# define __I2C3NX __I2C2NX
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC54_I2C3_MASTER
|
||||
# define I2C3NDX __I2C3NX
|
||||
# define I2C3CNT 1
|
||||
# define __I2C4NX (__I2C3NX + 1)
|
||||
#else
|
||||
# define I2C3CNT 0
|
||||
# define __I2C4NX __I2C3NX
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC54_I2C4_MASTER
|
||||
# define I2C4NDX __I2C4NX
|
||||
# define I2C4CNT 1
|
||||
# define __I2C5NX (__I2C4NX + 1)
|
||||
#else
|
||||
# define I2C4CNT 0
|
||||
# define __I2C5NX __I2C4NX
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC54_I2C5_MASTER
|
||||
# define I2C5NDX __I2C5NX
|
||||
# define I2C5CNT 1
|
||||
# define __I2C6NX (__I2C5NX + 1)
|
||||
#else
|
||||
# define I2C5CNT 0
|
||||
# define __I2C6NX __I2C5NX
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC54_I2C6_MASTER
|
||||
# define I2C6NDX __I2C6NX
|
||||
# define I2C6CNT 1
|
||||
# define __I2C7NX (__I2C6NX + 1)
|
||||
#else
|
||||
# define I2C6CNT 0
|
||||
# define __I2C7NX __I2C6NX
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC54_I2C7_MASTER
|
||||
# define I2C7NDX __I2C7NX
|
||||
# define I2C7CNT 1
|
||||
# define __I2C8NX (__I2C7NX + 1)
|
||||
#else
|
||||
# define I2C7CNT 0
|
||||
# define __I2C8NX __I2C7NX
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC54_I2C8_MASTER
|
||||
# define I2C8NDX __I2C8NX
|
||||
# define I2C8CNT 1
|
||||
# define __I2C9NX (__I2C8NX + 1)
|
||||
#else
|
||||
# define I2C8CNT 0
|
||||
# define __I2C9NX __I2C8NX
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC54_I2C9_MASTER
|
||||
# define I2CNDX __I2C9NX
|
||||
# define I2C9CNT 1
|
||||
#else
|
||||
# define I2C9CNT 0
|
||||
#endif
|
||||
|
||||
#define NI2C (I2C0CNT + I2C1CNT + I2C2CNT + I2C3CNT + I2C4CNT + \
|
||||
I2C5CNT + I2C6CNT + I2C7CNT + I2C8CNT + I2C9CNT )
|
||||
|
||||
/* LED definitions **********************************************************/
|
||||
/* The LPCXpress-LPC54628 has three user LEDs: D9, D11, and D12. These
|
||||
* LEDs are for application use. They are illuminated when the driving
|
||||
@ -118,19 +219,24 @@
|
||||
/* The integrated touchscreen uses one GPIO out and one GPIO interrupting
|
||||
* GPIO input:
|
||||
*
|
||||
* P2.27 CT_RSTn
|
||||
* P4.0 INTR
|
||||
* P2.27 CT_RSTn Active low
|
||||
* P4.0 INTR On falling edge, I belieive
|
||||
*
|
||||
* The FT4x06's WAKE-UP interrupt pin is not brought out.
|
||||
*/
|
||||
|
||||
#define GPIO_LCD_CTRSTn \
|
||||
#define GPIO_FT5x06_CTRSTn \
|
||||
(GPIO_PORT2 | GPIO_PIN27 | GPIO_VALUE_ZERO | GPIO_OUTPUT | \
|
||||
GPIO_MODE_DIGITAL | GPIO_FILTER_OFF | GPIO_PUSHPULL | GPIO_PULLUP)
|
||||
|
||||
#define GPIO_FT5x06_INTR \
|
||||
(GPIO_PORT4 | GPIO_PIN20 | GPIO_INTFE | GPIO_MODE_DIGITAL | GPIO_FILTER_OFF)
|
||||
|
||||
/* I2C addresses (7-bit): */
|
||||
|
||||
#define CODEC_I2C_ADDRESS 0x1a
|
||||
#define ACCEL_I2C_ADDRESS 0x1d
|
||||
#define TSC_I2C_ADDRESS 0x38
|
||||
#define FT5x06_I2C_ADDRESS 0x38
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
@ -184,5 +290,53 @@ void lpc54_sdram_initialize(void);
|
||||
|
||||
void lpc54_lcd_initialize(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_i2ctool
|
||||
*
|
||||
* Description:
|
||||
* Register I2C drivers for the I2C tool.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef HAVE_I2CTOOL
|
||||
void lpc54_i2ctool(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_ft5x06_register
|
||||
*
|
||||
* Description:
|
||||
* Register the FT5x06 touch panel driver
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef HAVE_FT5x06
|
||||
int lpc54_ft5x06_register(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_i2c_handle
|
||||
*
|
||||
* Description:
|
||||
* Create (or reuse) an I2C handle
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(HAVE_I2CTOOL) || defined(HAVE_FT5x06)
|
||||
FAR struct i2c_master_s *lpc54_i2c_handle(int bus, int ndx);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_i2c_free
|
||||
*
|
||||
* Description:
|
||||
* Free an I2C handle created by lpc54_i2c_handle
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(HAVE_I2CTOOL) || defined(HAVE_FT5x06)
|
||||
void lpc54_i2c_free(int ndx);
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* _CONFIGS_LPCXPRESSO_LPC54628_SRC_LPCXPRESSO_LPC54628_H */
|
||||
|
@ -37,7 +37,7 @@ config INPUT_TSC2007
|
||||
if INPUT_TSC2007
|
||||
|
||||
config TSC2007_8BIT
|
||||
bool "8-bit Conversions"
|
||||
bool "TSC2007 8-bit Conversions"
|
||||
default n
|
||||
---help---
|
||||
Use faster, but less accurate, 8-bit conversions. Default: 12-bit conversions.
|
||||
@ -49,13 +49,38 @@ config TSC2007_MULTIPLE
|
||||
Can be defined to support multiple TSC2007 devices on board.
|
||||
|
||||
config TSC2007_NPOLLWAITERS
|
||||
int "Number poll waiters"
|
||||
int "Number TSC2007 poll waiters"
|
||||
default 4
|
||||
depends on !DISABLE_POLL
|
||||
---help---
|
||||
Maximum number of threads that can be waiting on poll()
|
||||
|
||||
endif
|
||||
endif # INPUT_TSC2007
|
||||
|
||||
config INPUT_FT5X06
|
||||
bool "FocalTech FT5x06 multi-touch, capacitive touch panel controller"
|
||||
default n
|
||||
select I2C
|
||||
---help---
|
||||
Enable support for the FocalTech FT5x06 multi-touch, capacitive
|
||||
touch panel controller
|
||||
|
||||
config INPUT_FT5336
|
||||
bool "FocalTech FT5336 multi-touch, capacitive touch panel controller"
|
||||
default n
|
||||
select I2C
|
||||
select INPUT_FT5X06
|
||||
depends on EXPERIMENTAL
|
||||
---help---
|
||||
Enable support for the FocalTech FT5x06 multi-touch, capacitive
|
||||
touch panel controller
|
||||
|
||||
config FT5X06_NPOLLWAITERS
|
||||
int "Number FT5336/FT5x06 poll waiters"
|
||||
default 4
|
||||
depends on !DISABLE_POLL && INPUT_FT5X06
|
||||
---help---
|
||||
Maximum number of threads that can be waiting on poll()
|
||||
|
||||
config INPUT_ADS7843E
|
||||
bool "TI ADS7843/TSC2046 touchscreen controller"
|
||||
|
@ -43,6 +43,10 @@ ifeq ($(CONFIG_INPUT_TSC2007),y)
|
||||
CSRCS += tsc2007.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_INPUT_FT5X06),y)
|
||||
CSRCS += ft5x06.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_INPUT_ADS7843E),y)
|
||||
CSRCS += ads7843e.c
|
||||
endif
|
||||
|
@ -945,9 +945,9 @@ static ssize_t tsc2007_read(FAR struct file *filep, FAR char *buffer, size_t len
|
||||
ret = tsc2007_sample(priv, &sample);
|
||||
if (ret < 0)
|
||||
{
|
||||
/* Sample data is not available now. We would ave to wait to get
|
||||
* receive sample data. If the user has specified the O_NONBLOCK
|
||||
* option, then just return an error.
|
||||
/* Sample data is not available now. We would ave to wait to receive
|
||||
* sample data. If the user has specified the O_NONBLOCK option, then
|
||||
* just return an error.
|
||||
*/
|
||||
|
||||
if (filep->f_oflags & O_NONBLOCK)
|
||||
@ -1259,11 +1259,18 @@ int tsc2007_register(FAR struct i2c_master_s *dev,
|
||||
/* Initialize the TSC2007 device driver instance */
|
||||
|
||||
memset(priv, 0, sizeof(struct tsc2007_dev_s));
|
||||
priv->i2c = dev; /* Save the I2C device handle */
|
||||
priv->config = config; /* Save the board configuration */
|
||||
priv->i2c = dev; /* Save the I2C device handle */
|
||||
priv->config = config; /* Save the board configuration */
|
||||
|
||||
nxsem_init(&priv->devsem, 0, 1); /* Initialize device structure semaphore */
|
||||
nxsem_init(&priv->waitsem, 0, 0); /* Initialize pen event wait semaphore */
|
||||
|
||||
/* The event wait semaphore is used for signaling and, hence, should not
|
||||
* have priority inheritance enabled.
|
||||
*/
|
||||
|
||||
nxsem_setprotocol(&priv->waitsem, SEM_PRIO_NONE);
|
||||
|
||||
/* Make sure that interrupts are disabled */
|
||||
|
||||
config->clear(config);
|
||||
|
@ -100,7 +100,7 @@
|
||||
#define TOUCH_DOWN (1 << 0) /* A new touch contact is established */
|
||||
#define TOUCH_MOVE (1 << 1) /* Movement occurred with previously reported contact */
|
||||
#define TOUCH_UP (1 << 2) /* The touch contact was lost */
|
||||
#define TOUCH_ID_VALID (1 << 3) /* Touch ID is uncertain */
|
||||
#define TOUCH_ID_VALID (1 << 3) /* Touch ID is certain */
|
||||
#define TOUCH_POS_VALID (1 << 4) /* Hardware provided a valid X/Y position */
|
||||
#define TOUCH_PRESSURE_VALID (1 << 5) /* Hardware provided a valid pressure */
|
||||
#define TOUCH_SIZE_VALID (1 << 6) /* Hardware provided a valid H/W contact size */
|
||||
|
Loading…
x
Reference in New Issue
Block a user