Add NX configuration
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3165 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
67f1072e7b
commit
f673b88bab
@ -546,6 +546,26 @@ defconfig -- This is a configuration file similar to the Linux
|
||||
- All pixel writes must be aligned to byte boundaries.
|
||||
The latter limitation effectively reduces the 128x96 disply to 64x96.
|
||||
|
||||
Nokia 6100 Configuration Settings:
|
||||
|
||||
CONFIG_NOKIA6100_SPIMODE - Controls the SPI mode
|
||||
CONFIG_NOKIA6100_FREQUENCY - Define to use a different bus frequency
|
||||
CONFIG_NOKIA6100_NINTERFACES - Specifies the number of physical Nokia
|
||||
6100 devices that will be supported.
|
||||
CONFIG_NOKIA6100_BPP - Device supports 8, 12, and 16 bits per pixel.
|
||||
CONFIG_NOKIA6100_S1D15G10 - Selects the Epson S1D15G10 display controller
|
||||
CONFIG_NOKIA6100_PCF8833 - Selects the Phillips PCF8833 display controller
|
||||
CONFIG_NOKIA6100_BLINIT - Initial backlight setting
|
||||
|
||||
Required LCD driver settings:
|
||||
CONFIG_LCD_NOKIA6100 - Enable Nokia 6100 support
|
||||
CONFIG_LCD_MAXCONTRAST - must be 63 with the Epson controller and 127 with
|
||||
the Phillips controller.
|
||||
CONFIG_LCD_MAXPOWER - Maximum value of backlight setting. The backlight
|
||||
control is managed outside of the 6100 driver so this value has no
|
||||
meaning to the driver. Board-specific logic may place restrictions on
|
||||
this value.
|
||||
|
||||
ENC28J60 Ethernet Driver Configuration Settings:
|
||||
CONFIG_NET_ENC28J60 - Enabled ENC28J60 support
|
||||
CONFIG_ENC28J60_SPIMODE - Controls the SPI mode
|
||||
|
@ -431,6 +431,10 @@ Where <subdir> is one of the following:
|
||||
driver is waiting for the network to come up. That is probably
|
||||
a bug in the Ethernet driver behavior!
|
||||
|
||||
nx:
|
||||
And example using the NuttX graphics system (NX). This example
|
||||
uses the P14201 OLED driver.
|
||||
|
||||
ostest:
|
||||
This configuration directory, performs a simple OS test using
|
||||
examples/ostest.
|
||||
|
@ -651,12 +651,21 @@ sudirectory and can be selected as follow:
|
||||
|
||||
Where <subdir> is one of the following:
|
||||
|
||||
nettest:
|
||||
This configuration directory may be used to enable networking using the
|
||||
LPC17xx's Ethernet controller. It uses examples/nettest to excercise the
|
||||
TCP/IP network.
|
||||
|
||||
nsh:
|
||||
Configures the NuttShell (nsh) located at examples/nsh. The
|
||||
Configuration enables both the serial and telnet NSH interfaces.
|
||||
Support for the board's SPI-based MicroSD card is included
|
||||
(but not passing tests as of this writing).
|
||||
|
||||
nx:
|
||||
And example using the NuttX graphics system (NX). This example
|
||||
uses the Nokia 6100 LCD driver.
|
||||
|
||||
ostest:
|
||||
This configuration directory, performs a simple OS test using
|
||||
examples/ostest.
|
||||
|
162
configs/olimex-lpc1766stk/nx/Make.defs
Executable file
162
configs/olimex-lpc1766stk/nx/Make.defs
Executable file
@ -0,0 +1,162 @@
|
||||
############################################################################
|
||||
# configs/olimex-lpc1766stk/nx/Make.defs
|
||||
#
|
||||
# Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# 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
|
||||
|
||||
# Setup for the selected toolchain
|
||||
|
||||
ifeq ($(CONFIG_LPC17_CODESOURCERYW),y)
|
||||
# CodeSourcery under Windows
|
||||
CROSSDEV = arm-none-eabi-
|
||||
WINTOOL = y
|
||||
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||
endif
|
||||
ifeq ($(CONFIG_LPC17_CODESOURCERYL),y)
|
||||
# CodeSourcery under Linux
|
||||
CROSSDEV = arm-none-eabi-
|
||||
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||
MAXOPTIMIZATION = -O2
|
||||
endif
|
||||
ifeq ($(CONFIG_LPC17_DEVKITARM),y)
|
||||
# devkitARM under Windows
|
||||
CROSSDEV = arm-eabi-
|
||||
WINTOOL = y
|
||||
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||
endif
|
||||
ifeq ($(CONFIG_LPC17_BUILDROOT),y)
|
||||
# NuttX buildroot under Linux or Cygwin
|
||||
CROSSDEV = arm-elf-
|
||||
ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
|
||||
MAXOPTIMIZATION = -Os
|
||||
endif
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
# Windows-native toolchains
|
||||
DIRLINK = $(TOPDIR)/tools/winlink.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)/nx/ld.script}"
|
||||
MAXOPTIMIZATION = -O2
|
||||
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)/nx/ld.script
|
||||
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
|
||||
else
|
||||
ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-builtin
|
||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
||||
ARCHWARNINGSXX = -Wall -Wshadow
|
||||
ARCHDEFINES =
|
||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||
|
||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe
|
||||
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) -pipe
|
||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld -no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
||||
ifneq ($(CROSSDEV),arm-elf-)
|
||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||
endif
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
LDFLAGS += -g
|
||||
endif
|
||||
|
||||
define PREPROCESS
|
||||
@echo "CPP: $1->$2"
|
||||
@$(CPP) $(CPPFLAGS) $1 -o $2
|
||||
endef
|
||||
|
||||
define COMPILE
|
||||
@echo "CC: $1"
|
||||
@$(CC) -c $(CFLAGS) $1 -o $2
|
||||
endef
|
||||
|
||||
define COMPILEXX
|
||||
@echo "CXX: $1"
|
||||
@$(CXX) -c $(CXXFLAGS) $1 -o $2
|
||||
endef
|
||||
|
||||
define ASSEMBLE
|
||||
@echo "AS: $1"
|
||||
@$(CC) -c $(AFLAGS) $1 -o $2
|
||||
endef
|
||||
|
||||
define ARCHIVE
|
||||
echo "AR: $2"; \
|
||||
$(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; }
|
||||
endef
|
||||
|
||||
define CLEAN
|
||||
@rm -f *.o *.a
|
||||
endef
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
|
1101
configs/olimex-lpc1766stk/nx/defconfig
Executable file
1101
configs/olimex-lpc1766stk/nx/defconfig
Executable file
File diff suppressed because it is too large
Load Diff
109
configs/olimex-lpc1766stk/nx/ld.script
Executable file
109
configs/olimex-lpc1766stk/nx/ld.script
Executable file
@ -0,0 +1,109 @@
|
||||
/****************************************************************************
|
||||
* configs/olimex-lpc1766stk/nx/ld.script
|
||||
*
|
||||
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* The LPC1766 has 256Kb of FLASH beginning at address 0x0000:0000 and
|
||||
* 64Kb of total SRAM: 32Kb of SRAM in the CPU block beginning at address
|
||||
* 0x10000000 and 32Kb of AHB SRAM in two banks of 16Kb beginning at addresses
|
||||
* 0x20070000 and 0x20080000. Here we assume that .data and .bss will all fit
|
||||
* into the 32Kb CPU SRAM address range.
|
||||
*/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
flash (rx) : ORIGIN = 0x00000000, LENGTH = 256K
|
||||
sram (rwx) : ORIGIN = 0x10000000, LENGTH = 32K
|
||||
}
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
ENTRY(_stext)
|
||||
SECTIONS
|
||||
{
|
||||
.text : {
|
||||
_stext = ABSOLUTE(.);
|
||||
*(.vectors)
|
||||
*(.text .text.*)
|
||||
*(.fixup)
|
||||
*(.gnu.warning)
|
||||
*(.rodata .rodata.*)
|
||||
*(.gnu.linkonce.t.*)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
*(.got)
|
||||
*(.gcc_except_table)
|
||||
*(.gnu.linkonce.r.*)
|
||||
_etext = ABSOLUTE(.);
|
||||
} > flash
|
||||
|
||||
_eronly = ABSOLUTE(.); /* See below */
|
||||
|
||||
.data : {
|
||||
_sdata = ABSOLUTE(.);
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
CONSTRUCTORS
|
||||
_edata = ABSOLUTE(.);
|
||||
} > sram AT > flash
|
||||
|
||||
.ARM.extab : {
|
||||
*(.ARM.extab*)
|
||||
} >sram
|
||||
|
||||
.ARM.exidx : {
|
||||
__exidx_start = ABSOLUTE(.);
|
||||
*(.ARM.exidx*)
|
||||
__exidx_end = ABSOLUTE(.);
|
||||
} >sram
|
||||
|
||||
.bss : { /* BSS */
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.bss .bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > sram
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_info 0 : { *(.debug_info) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
}
|
47
configs/olimex-lpc1766stk/nx/setenv.sh
Executable file
47
configs/olimex-lpc1766stk/nx/setenv.sh
Executable file
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
# configs/olimex-lpc1766stk/nx/setenv.sh
|
||||
#
|
||||
# Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# 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 [ "$(basename $0)" = "setenv.sh" ] ; then
|
||||
echo "You must source this script, not run it!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi
|
||||
|
||||
WD=`pwd`
|
||||
export LPCTOOL_DIR="${WD}/configs/olimex-lpc1766stk/tools"
|
||||
export BUILDROOT_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin"
|
||||
export PATH="${BUILDROOT_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}"
|
||||
|
||||
echo "PATH : ${PATH}"
|
@ -808,6 +808,56 @@ CONFIG_EXAMPLES_USBSERIAL_TRACETRANSFERS=n
|
||||
CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n
|
||||
CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
|
||||
|
||||
#
|
||||
# Settings for examples/usbstorage
|
||||
#
|
||||
# CONFIG_EXAMPLES_USBSTRG_NLUNS
|
||||
# Defines the number of logical units (LUNs) exported by the USB storage
|
||||
# driver. Each LUN corresponds to one exported block driver (or partition
|
||||
# of a block driver). May be 1, 2, or 3. Default is 1.
|
||||
# CONFIG_EXAMPLES_USBSTRG_DEVMINOR1
|
||||
# The minor device number of the block driver for the first LUN. For
|
||||
# example, N in /dev/mmcsdN. Used for registering the block driver. Default
|
||||
# is zero.
|
||||
# CONFIG_EXAMPLES_USBSTRG_DEVPATH1
|
||||
# The full path to the registered block driver. Default is "/dev/mmcsd0"
|
||||
# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
|
||||
# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
|
||||
# is 2 or 3. No defaults.
|
||||
# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
|
||||
# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
|
||||
# is 3. No defaults.
|
||||
#
|
||||
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
|
||||
# the example code will also manage the USB trace output. The amount of trace output
|
||||
# can be controlled using:
|
||||
#
|
||||
# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
|
||||
# Show initialization events
|
||||
# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
|
||||
# Show class driver events
|
||||
# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
|
||||
# Show data transfer events
|
||||
# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
|
||||
# Show controller events
|
||||
# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
|
||||
# Show interrupt-related events.
|
||||
#
|
||||
CONFIG_EXAMPLES_USBSTRG_NLUNS=1
|
||||
CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
|
||||
CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
|
||||
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
|
||||
CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
|
||||
|
||||
#
|
||||
# Stack and heap information
|
||||
#
|
||||
|
@ -44,15 +44,18 @@
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/spi.h>
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
#include <nuttx/lcd/nokia6100.h>
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "lpc17_syscon.h"
|
||||
#include "lpc17_pwm.h"
|
||||
#include "lpc17_internal.h"
|
||||
#include "lpc17stk_internal.h"
|
||||
#include "lpc1766stk_internal.h"
|
||||
|
||||
#ifdef defined(CONFIG_NX_LCDDRIVER) && defined(CONFIG_LCD_NOKIA6100) && defined(CONFIG_LPC17_SSP0)
|
||||
#if defined(CONFIG_NX_LCDDRIVER) && defined(CONFIG_LCD_NOKIA6100) && defined(CONFIG_LPC17_SSP0)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
@ -60,8 +63,8 @@
|
||||
|
||||
/* Check power setting */
|
||||
|
||||
#if !defined(CONFIG_LCD_MAXPOWER) || CONFIG_LCD_MAXPOWER != 128
|
||||
# error "CONFIG_LCD_MAXPOWER must be 128"
|
||||
#if !defined(CONFIG_LCD_MAXPOWER) || CONFIG_LCD_MAXPOWER != 127
|
||||
# error "CONFIG_LCD_MAXPOWER must be 127"
|
||||
#endif
|
||||
|
||||
/* Backlight OFF PWM setting */
|
||||
@ -85,7 +88,7 @@
|
||||
|
||||
#ifdef CONFIG_LCD_NOKIADBG
|
||||
# define lcddbg(format, arg...) vdbg(format, ##arg)
|
||||
# define lcd_dumpgpio(m) lm3s_dumpgpio(LPC1766STK_LCD_RST, m)
|
||||
# define lcd_dumpgpio(m) lpc17_dumpgpio(LPC1766STK_LCD_RST, m)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
# define lcd_dumpgpio(m)
|
||||
@ -109,7 +112,7 @@ void nokia_blinitialize(void)
|
||||
|
||||
/* Enable clocking of PWM1 */
|
||||
|
||||
regval = regreg32(LPC17_SYSCON_PCONP);
|
||||
regval = getreg32(LPC17_SYSCON_PCONP);
|
||||
regval |= SYSCON_PCONP_PCPWM1;
|
||||
putreg32(regval, LPC17_SYSCON_PCONP);
|
||||
|
||||
@ -189,16 +192,16 @@ FAR struct lcd_dev_s *up_nxdrvinit(unsigned int devno)
|
||||
/* Configure the LCD GPIOs */
|
||||
|
||||
lcd_dumpgpio("up_nxdrvinit: On entry");
|
||||
lm3s_configgpio(LPC1766STK_LCD_RST);
|
||||
lm3s_configgpio(LPC1766STK_LCD_BL);
|
||||
lpc17_configgpio(LPC1766STK_LCD_RST);
|
||||
lpc17_configgpio(LPC1766STK_LCD_BL);
|
||||
lcd_dumpgpio("up_nxdrvinit: After GPIO setup");
|
||||
|
||||
/* Reset the LCD */
|
||||
|
||||
lpc17_gpiowrite(LPC1766STK_LCD_RST, false);
|
||||
up_usdelay(10);
|
||||
up_udelay(10);
|
||||
lpc17_gpiowrite(LPC1766STK_LCD_RST, true);
|
||||
up_msdelay(5);
|
||||
up_mdelay(5);
|
||||
|
||||
/* Configure PWM1 to support the backlight */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user