forked from xuos/xiuos
Add nuttx to the system framework, which is 10.1.0
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||
#
|
||||
|
||||
if ARCH_BOARD_LPCXPRESSO
|
||||
endif
|
||||
@@ -0,0 +1,578 @@
|
||||
README
|
||||
======
|
||||
|
||||
This directory contains the port to the NXP LPCXpress-LPC54628 board
|
||||
(OMI1309UL). This board features:
|
||||
|
||||
- LPC54628 Cortex-M4 microcontroller running at up to 220MHz
|
||||
- 272x480 color LCD with capacitive touch screen
|
||||
- On-board, high-speed USB, Link2 debug probe with CMSIS-DAP and SEGGER
|
||||
J-Link protocol options
|
||||
- UART and SPI port bridging from LPC546xx target to USB via the on-
|
||||
board debug probe
|
||||
- Support for external debug probe
|
||||
- 3 x user LEDs, plus Reset, ISP (3) and user buttons
|
||||
- Multiple Expansion options, including Arduino UNO and PMod
|
||||
- Built-in power consumption measurement for target LPC546xx MCU
|
||||
- 128Mb Micron MT25QL128 Quad-SPI flash
|
||||
- 16MB Micron MT48LC8M16A2B4 SDRAM
|
||||
- Knowles SPH0641LM4H digital microphone
|
||||
- Full size SD/MMC card slot
|
||||
- NXP MMA8652FCR1 accelerometer
|
||||
- Stereo audio codec with line in/out
|
||||
- High and full speed USB ports with micro A/B connector for host or
|
||||
device functionality
|
||||
- 10/100Mbps Ethernet (RJ45 connector)
|
||||
|
||||
CONTENTS
|
||||
========
|
||||
|
||||
- STATUS
|
||||
- Configurations
|
||||
|
||||
STATUS
|
||||
======
|
||||
|
||||
2017-12-10: The basic NSH configuration is functional at 220MHz with a
|
||||
Serial console, timer and LED support. Added support for the external
|
||||
SDRAM and for the RAM test utility.
|
||||
2017-12-11: Fixed an error in board LEDs. Added framework for future
|
||||
I2C and SPI flexcomm drivers.
|
||||
2017-12-12: The SDRAM is now functional and passes the complete RAM
|
||||
test. Added configuration options and logic to add none, portions, or
|
||||
all of the external SDRAM to the system heap. Brought in the LPC1788
|
||||
LCD driver. The LPC1788 LCD registers are identical to the LPC54xx
|
||||
(other than a minor clock source setting).
|
||||
2017-12-13: Created the fb configuration for testing the LCD.
|
||||
2017-12-14: Corrected a misconception about how the video data lines
|
||||
were configured. The LCD now appears to be fully functional.
|
||||
2017-12-15: Added an I2C driver.
|
||||
2017-12-16: Added support for LPC54xx GPIO interrupts; added button
|
||||
support (with interrupts) to the NSH configuration. The button
|
||||
test appears to functional functional. There are noticeable delays
|
||||
in receiving the button events, especially when the button is
|
||||
released. But if you do not press the buttons too quickly all events
|
||||
are processed. This, I suspect, is a consequence of the strong glitch
|
||||
filtering that is enabled in the pin configuration. Snappier
|
||||
response my be obtainable with filtering off.
|
||||
2017-12-17: Added a driver for the FT5x06 capacitive, multi-touch
|
||||
controller. Add support logic for the LPCXpresso-LPC54528 to
|
||||
initialize and the register the FT5x06 driver. Unfortunately, the
|
||||
FT5x06 interrupt is on pin P4.0 but pin interrupts are only supported
|
||||
on P0.m and P1.m, m=0..31.
|
||||
2017-12-18: Added an option to the FT5x06 driver to support a timer-
|
||||
based poll instead of interrupts. This is very inefficient in that it
|
||||
will introduce delays in touchscreen response and will consume more CPU
|
||||
bandwidth. The driver appears to be functional. Added the NxWM
|
||||
configuration to do some integrated testing. NxWM seems to be fully
|
||||
functional. However, the action of the touchscreen could use some
|
||||
human factors improvements. I imagine that this is a consequence of
|
||||
the polled solution.
|
||||
2017-12-19: Brought in Alan Carvalho de Assis' LPC43xx SD/MMC driver from
|
||||
https://github.com/Smoothieware/smoothie-nuttx/tree/master/nuttx/arch/arm/src/lpc43xx
|
||||
and adapted it for use by the LPC54xx. Unverified as of this writing.
|
||||
2017-12-21: Some things are working with he SDMMC drivers but read DMAs
|
||||
are non-functional and, hence not usable.
|
||||
2017-12-23: SDMMC is still non-functional. The first DMA read of 512 bytes
|
||||
fails with a CRC error. Similar result if clock is reduced, if 1-bit bus
|
||||
is used, if DMA is disabled., if DEBUG output is disabled.
|
||||
2017-12-24: Added basic DMA support; brought in the WWDT driver from the
|
||||
LPC43 which has the same peripheral. Neither tested; almost certainly
|
||||
non-functional without some additional investment.
|
||||
2017-12-25: Added an RTC driver. It appears to be functional but has not
|
||||
been well tested.
|
||||
2017-12-26: Added an RNG driver. The RNG is actually controlled by a ROM
|
||||
function. This driver seems to work fine when single stepping. However,
|
||||
if I collect samples indefinitely, I get a reserved interrupt. The symptom
|
||||
before the crash is that local variables are getting corrupted after the
|
||||
call into ROM. Increasing the stack size does not seem to help. Perhaps
|
||||
to use the ROM at high frequencies it may be necessary to modify the ROM
|
||||
access timing in some way???
|
||||
2017-12-30: Completed implementation of an Ethernet driver. Untested as
|
||||
of this writing. Also added the netnsh configuration will, eventually,
|
||||
be used to test the Ethernet driver.
|
||||
2018-01-01: There Ethernet driver appears to be fully functional although
|
||||
more testing is certainly needed.
|
||||
2018-01-14: The basic SPI driver is code complete but still untested. It
|
||||
is "basic" in the sense that it supports only polled mode (no DMA).
|
||||
2018-01-18: Added the lvgl configuration. See notes under "Configuration
|
||||
Sub-directories" for additional status.
|
||||
2018-10-22: Dave Marples recently fixed the LPC43 version of the USB
|
||||
device controller driver. That driver is a clone from the LPC54 USB
|
||||
DCD. I have backported Dave's changes to the LPC54 DCD. Unfortunately,
|
||||
it did not fix the problem. Then I discovered this errata for the LPC54:
|
||||
|
||||
For the 4-bit mode to work successfully, four otherwise unused upper
|
||||
data bits (SD_D[4] to SD_D[7]) must be functionally assigned to GPIO
|
||||
pins with pull-up resistor. These pins do not need to be physically
|
||||
connected on the hardware.
|
||||
|
||||
With that change (and a lot of other fidgeting), there is some
|
||||
improvement. I am able to mount and read the SD card .. at least most
|
||||
of the time. I still get CRC errors when writing and I have not
|
||||
successfully written to the SD card. It is closer but more TLC is
|
||||
needed.
|
||||
2018-10-24: Dave Marples now has the LPC43 SD/MMC working reliably. I
|
||||
have ported all of Dave's change to the LPC54 but have done no further
|
||||
testing as of this writing. The feature is still marked EXPERIMENTAL.
|
||||
2019-05-08: I brought in the USB0 OHCI USB host driver from LPC17. Since
|
||||
OHCI is well standardized, this should work out of the box provided that
|
||||
the peripheral is properly configured, initialized, and clocked. The
|
||||
clock setup logic is missing as of this writing (the driver is not yet
|
||||
even included in the build and completely unverified).
|
||||
2019-00-22: Although everyone with the older Rev C boards were booting
|
||||
happily, it was reported that people with Rev F boards could not boot.
|
||||
A patch updating the clock configuration for those boards was verified
|
||||
(on both Rev C and Rev F) and pushed upstream.
|
||||
|
||||
There is still no support for the Accelerometer, SPIFI, or USB. There is
|
||||
a complete but not entirely functional SD card driver and and tested SPI
|
||||
driver. There is also a partial port of the USB0 OHCI host driver if
|
||||
anyone is ambitious enough to finish that off. There are no on-board
|
||||
devices to support SPI testing.
|
||||
|
||||
Configurations
|
||||
==============
|
||||
|
||||
Information Common to All Configurations
|
||||
----------------------------------------
|
||||
Each LPCXpresso-LPC54628 configuration is maintained in a sub-directory
|
||||
and can be selected as follow:
|
||||
|
||||
.tools/configure.sh [OPTIONS] lpcxpresso-lpc54628:<subdir>
|
||||
|
||||
See '.tools/configure.sh -h' for a list of all options. The most typical
|
||||
are -l to select the Linux host or -c to select the Windows Cygwin host.
|
||||
|
||||
Before starting the build, make sure that your PATH environment variable
|
||||
includes the correct path to your toolchain.
|
||||
|
||||
And then build NuttX by simply typing the following. At the conclusion of
|
||||
the make, the nuttx binary will reside in an ELF file called, simply, nuttx.
|
||||
|
||||
make
|
||||
|
||||
The <subdir> that is provided above as an argument to the tools/configure.sh
|
||||
must be is one of the following.
|
||||
|
||||
NOTES:
|
||||
|
||||
1. These configurations use the mconf-based configuration tool. To
|
||||
change any of these configurations using that tool, you should:
|
||||
|
||||
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
|
||||
see additional README.txt files in the NuttX tools repository.
|
||||
|
||||
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
||||
reconfiguration process.
|
||||
|
||||
2. Unless stated otherwise, all configurations generate console
|
||||
output on USART0 (aka Flexcomm0). USART0 connects to the serial
|
||||
bridge on LPC4322JET100 and should be available as a USB serial
|
||||
device on your host PC.
|
||||
|
||||
3. All of these configurations are set up to build under Windows using
|
||||
the "GNU Tools for ARM Embedded Processors" that is maintained by
|
||||
ARM (unless stated otherwise in the description of the configuration).
|
||||
|
||||
https://developer.arm.com/open-source/gnu-toolchain/gnu-rm
|
||||
|
||||
That toolchain selection can easily be reconfigured using
|
||||
'make menuconfig'. Here are the relevant current settings:
|
||||
|
||||
Build Setup:
|
||||
CONFIG_HOST_WINDOWS=y : Window environment
|
||||
CONFIG_WINDOWS_CYGWIN=y : Cywin under Windows
|
||||
|
||||
System Type -> Toolchain:
|
||||
CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW=y : GNU ARM EABI toolchain
|
||||
|
||||
Configuration Sub-directories
|
||||
-----------------------------
|
||||
|
||||
fb:
|
||||
|
||||
A simple NSH configuration used for some basic debug of LCD using the
|
||||
framebuffer character drivers. This configuration provides the test
|
||||
programs:
|
||||
|
||||
- apps/examples/pdcurses, and
|
||||
- apps/examples/fb
|
||||
|
||||
as NSH built-in applications.
|
||||
|
||||
NOTES:
|
||||
1. This configuration enables SDRAM to hold the LCD framebuffer and
|
||||
enables the LPC54xx LCD driver in order to support the LPCXpresso's
|
||||
TFT panel. In this configuration, the framebuffer resides in the
|
||||
the lower half megabyte of SDRAM beginning at address 0xa0000000
|
||||
The remainder of the SDRAM from 0xa0080000 up to 0xa1000000 is added
|
||||
to the heap.
|
||||
|
||||
The is wasteful of SDRAM: Only 261,120 bytes actually used for the
|
||||
framebuffer. This memory could be reclaimed by changing the DRAM
|
||||
CS0 offset value in the .config file.
|
||||
|
||||
2. Some of the pdcurses test rely on some positional input device and so
|
||||
is not yet usable. Others work fine with no user include: charset,
|
||||
xmas, firework, worms, rain, for examples.
|
||||
|
||||
3. I2C2 is enabled (will be used with the capacitive touchscreen). In
|
||||
order to verify I2C functionality, the I2C tool at apps/system/i2ctool
|
||||
is enabled in this configuration.
|
||||
|
||||
nsh> i2c dev -b 2 3 77
|
||||
0 1 2 3 4 5 6 7 8 9 a b c d e f
|
||||
00: -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
10: -- -- -- -- -- -- -- -- -- -- 1a -- -- 1d -- --
|
||||
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
30: -- -- -- -- -- -- -- -- 38 -- -- -- -- -- -- --
|
||||
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
70: -- -- -- -- -- -- -- --
|
||||
|
||||
Codec I2C address: 0x1a
|
||||
Accel I2C address: 0x1d
|
||||
Touch panel I2C address: 0x38
|
||||
|
||||
4. The touchscreen test program at apps/examples/touchscreen is also
|
||||
included in this configuration.
|
||||
|
||||
nsh> tc 5
|
||||
tc_main: nsamples: 2
|
||||
tc_main: Initializing external touchscreen device
|
||||
tc_main: Opening /dev/input0
|
||||
Sample :
|
||||
npoints : 1
|
||||
Point 1 :
|
||||
id : 0
|
||||
flags : 1a
|
||||
x : 230
|
||||
y : 84
|
||||
h : 0
|
||||
w : 0
|
||||
pressure : 0
|
||||
etc.
|
||||
|
||||
NOTE that the touchscreen controlled must run in a polled mode! The
|
||||
FT5x06 interrupt GPIO is on P4.0 and, as far as I know, GPIO
|
||||
interrupts are not supported on P4. So polled mode only for this
|
||||
puppy.
|
||||
|
||||
lvgl
|
||||
----
|
||||
This is a demonstration of the LittlevGL graphics library running on
|
||||
the NuttX frame buffer driver (as in the fb configuration). You can
|
||||
find LittlevGL here:
|
||||
|
||||
https://littlevgl.com/
|
||||
https://github.com/littlevgl
|
||||
|
||||
This configuration uses the LittlevGL demonstration at apps/examples/lvgldemo.
|
||||
|
||||
NOTES:
|
||||
|
||||
1. The LittlevGL demonstration is quit large, due mostly to some large
|
||||
graphic images. So memory is tight in the LPC54628's 512Kb FLASH. In
|
||||
fact, if you disable optimization, the demo will not fit into FLASH
|
||||
memory (at least not with debug output also enabled).
|
||||
|
||||
A longer term solution might load the large images into the abundant
|
||||
SDRAM at runtime instead of linking it statically in FLASH.
|
||||
|
||||
STATUS:
|
||||
|
||||
2018-01-18: The demo is basically function but has some issues:
|
||||
|
||||
a) The font is too big on the "Write" screen. They don't fit in on
|
||||
the keyboard.
|
||||
b) The "List" display is filled with a big box that says "Click a
|
||||
button to copy its text to Text area." There are no buttons and
|
||||
nothing to click on (maybe they are behind the big box?). This
|
||||
may also be a font size issue.
|
||||
c) The "Chart" display looks okay.
|
||||
|
||||
netnsh:
|
||||
------
|
||||
This is a special version of the NuttShell (nsh) configuration that is
|
||||
tailored for network testing. This version derives from nsh
|
||||
configuration so many of the notes there apply here except as noted
|
||||
below.
|
||||
|
||||
NOTES:
|
||||
|
||||
1. Networking is enabled. The LPCXpressio-LPC54628 has an SMC _LAN8720 PHY
|
||||
and RJ45 network connector. Support is enabled for IPv4, IPv6, TCP/IP,
|
||||
UDP, ICMP, ICMPv6, and ARP.
|
||||
|
||||
The default IP addresses are 10.0.0.2 (IPv4) and fc00::2 (IPv6). You
|
||||
should reconfigure these as appropriate for your test network.
|
||||
|
||||
2. SD card and I2C support are not enabled. The I2C tool application is
|
||||
not enabled
|
||||
|
||||
3. SDRAM support is enabled and the SDRAM is added to the system heap.
|
||||
The RAM test application is not enabled.
|
||||
|
||||
4. This configuration does not include support for asynchronous network
|
||||
initialization. As a consequence, NSH must bring up the network
|
||||
before you get the NSH prompt. If the network cable is unplugged,
|
||||
this can mean a significant delay before you see the prompt.
|
||||
|
||||
5. In this configuration, the network the network and the Telnet
|
||||
daemon are available by the time that the NSH prompt is presented.
|
||||
|
||||
Telnet defaults to IPv6 so to use it from the host PS, you would have
|
||||
to do:
|
||||
|
||||
$ telnet fc00::42
|
||||
|
||||
nsh:
|
||||
|
||||
Configures the NuttShell (nsh) application located at examples/nsh.
|
||||
This configuration was used to bring up the board support and, hence,
|
||||
is focused on low level, command-line driver testing. It has no
|
||||
network and no graphics capability.
|
||||
|
||||
NOTES:
|
||||
|
||||
1. NSH built-in applications are supported.
|
||||
|
||||
Binary Formats:
|
||||
CONFIG_BUILTIN=y : Enable support for built-in programs
|
||||
|
||||
Application Configuration:
|
||||
CONFIG_NSH_BUILTIN_APPS=y : Enable starting apps from NSH command line
|
||||
|
||||
2. SDRAM support is enabled, but the SDRAM is *not* added to the system
|
||||
heap. The apps/system/ramtest utility is include in the build as an
|
||||
NSH built-in function that can be used to verify the SDRAM.
|
||||
|
||||
nsh> ramtest -h
|
||||
RAMTest: Missing required arguments
|
||||
|
||||
Usage: <noname> [-w|h|b] <hex-address> <decimal-size>
|
||||
|
||||
Where:
|
||||
<hex-address> starting address of the test.
|
||||
<decimal-size> number of memory locations (in bytes).
|
||||
-w Sets the width of a memory location to 32-bits.
|
||||
-h Sets the width of a memory location to 16-bits (default).
|
||||
-b Sets the width of a memory location to 8-bits.
|
||||
|
||||
The MTL48LC8M16A2B4-6A SDRAM is on CS0 which corresponds to address
|
||||
0xa0000000, the size of the memory is 128Mbits or 16Mb. So the DRAM
|
||||
may be tested with this command:
|
||||
|
||||
NuttShell (NSH) NuttX-7.23
|
||||
nsh> ramtest a0000000 16777216
|
||||
RAMTest: Marching ones: a0000000 16777216
|
||||
RAMTest: Marching zeroes: a0000000 16777216
|
||||
RAMTest: Pattern test: a0000000 16777216 55555555 aaaaaaaa
|
||||
RAMTest: Pattern test: a0000000 16777216 66666666 99999999
|
||||
RAMTest: Pattern test: a0000000 16777216 33333333 cccccccc
|
||||
RAMTest: Address-in-address test: a0000000 16777216
|
||||
nsh>
|
||||
|
||||
3. I2C2 is enabled (will be used with the capacitive touchscreen). In
|
||||
order to verify I2C functionality, the I2C tool at apps/system/i2ctool
|
||||
is enabled in this configuration.
|
||||
|
||||
nsh> i2c bus
|
||||
BUS EXISTS?
|
||||
Bus 0: NO
|
||||
Bus 1: NO
|
||||
Bus 2: YES
|
||||
Bus 3: NO
|
||||
Bus 4: NO
|
||||
Bus 5: NO
|
||||
Bus 6: NO
|
||||
Bus 7: NO
|
||||
Bus 8: NO
|
||||
Bus 9: NO
|
||||
nsh> i2c dev -b 2 3 77
|
||||
0 1 2 3 4 5 6 7 8 9 a b c d e f
|
||||
00: -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
10: -- -- -- -- -- -- -- -- -- -- 1a -- -- 1d -- --
|
||||
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
70: -- -- -- -- -- -- -- --
|
||||
|
||||
I believe that the on-board Accelerometer, Audio CODEC, and touch
|
||||
panel controller should have been detected (but perhaps the touch
|
||||
panel is not powered in this configuration since the LCD is not
|
||||
configured?)
|
||||
|
||||
Codec I2C address: 0x1a
|
||||
Accel I2C address: 0x1d
|
||||
Touch panel I2C address: 0x38
|
||||
|
||||
4. Support for the on-board USER button is included as well as the
|
||||
button test program at apps/examples/buttons. This test is useful
|
||||
for verifying the functionality of GPIO interrupts.
|
||||
|
||||
NuttShell (NSH) NuttX-7.23
|
||||
nsh> buttons
|
||||
buttons_main: Starting the button_daemon
|
||||
buttons_main: button_daemon started
|
||||
button_daemon: Running
|
||||
button_daemon: Opening /dev/buttons
|
||||
button_daemon: Supported BUTTONs 0x01
|
||||
nsh> Sample = 1
|
||||
Sample = 0
|
||||
Sample = 1
|
||||
Sample = 0
|
||||
Sample = 1
|
||||
Sample = 0
|
||||
Sample = 1
|
||||
etc.
|
||||
|
||||
There are noticeable delays in receiving the button events,
|
||||
especially when the button is released. But if you do not press the
|
||||
buttons too quickly all events are processed. This, I suspect, is a
|
||||
consequence of the strong glitch filtering that is enabled in the pin
|
||||
configuration. Snappier response my be obtainable with filtering off
|
||||
if desired.
|
||||
|
||||
5. This configuration has been used for testing the SDMMC driver with
|
||||
these configuration additions:
|
||||
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
|
||||
CONFIG_LPC54_SDMMC=y
|
||||
CONFIG_LPC54_SDMMC_PWRCTRL=y
|
||||
CONFIG_LPC54_SDMMC_DMA=y
|
||||
|
||||
CONFIG_SIG_SIGWORK=17
|
||||
CONFIG_SCHED_WORKQUEUE=y
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_HPWORKPRIORITY=224
|
||||
CONFIG_SCHED_HPWORKSTACKSIZE=2048
|
||||
|
||||
CONFIG_MMCSD=y
|
||||
CONFIG_MMCSD_NSLOTS=1
|
||||
CONFIG_MMCSD_MULTIBLOCK_DISABLE=y
|
||||
CONFIG_MMCSD_HAVE_CARDDETECT=y
|
||||
CONFIG_MMCSD_HAVE_WRITEPROTECT=y
|
||||
CONFIG_ARCH_HAVE_SDIO=y
|
||||
CONFIG_SDIO_DMA=y
|
||||
CONFIG_MMCSD_SDIO=y
|
||||
|
||||
CONFIG_NSH_MMCSDSLOTNO=0
|
||||
|
||||
6. The RTC is enabled in this configuration.
|
||||
|
||||
NuttShell (NSH) NuttX-7.23
|
||||
nsh> date
|
||||
Jan 01 00:00:06 1970
|
||||
nsh> date -s "DEC 25 08:00:00 2017"
|
||||
nsh> date
|
||||
Dec 25 08:00:01 2017
|
||||
|
||||
After reset:
|
||||
|
||||
NuttShell (NSH) NuttX-7.23
|
||||
nsh> date
|
||||
Dec 25 08:00:05 2017
|
||||
|
||||
nxwm:
|
||||
|
||||
This is a special configuration setup for the NxWM window manager
|
||||
UnitTest. This builds on top of the features that were unit tested in
|
||||
by the fb configuration.
|
||||
|
||||
The NxWM window manager can be found here:
|
||||
|
||||
apps/graphics/NxWidgets/nxwm
|
||||
|
||||
The NxWM unit test can be found at:
|
||||
|
||||
apps/graphics/NxWidgets/UnitTests/nxwm
|
||||
|
||||
pwfb:
|
||||
|
||||
This configuration uses the test at apps/examples/pwfb to verify the
|
||||
operation of the per-window framebuffer. That example shows three
|
||||
windows containing text moving around, crossing each other from
|
||||
"above" and from "below". The example application is NOT updating the
|
||||
windows any anyway! The application is only changing the window
|
||||
position. The windows are being updated from the per-winidow
|
||||
frame buffers automatically.
|
||||
|
||||
This example is reminiscent of Pong: Each window travels in straight
|
||||
line until it hits an edge, then it bounces off. The window is also
|
||||
raised when it hits the edge (gets "focus"). This tests all
|
||||
combinations of overlap.
|
||||
|
||||
2019-03-19: Everything works fine!
|
||||
|
||||
pwlines:
|
||||
|
||||
This configuration uses the test at apps/examples/pwline. It is another
|
||||
verification of the operation of the per-window frame buffers. This
|
||||
examples is very similar to the pwfb example used in pwfb configuration
|
||||
except that instead of text, each window has an (trivial) animated
|
||||
graphic (based on the rotating line of apps/examples/nslines).
|
||||
|
||||
2019-03-20: Everything works fine!
|
||||
|
||||
twm4nx1 and twmnx2:
|
||||
|
||||
These configuration exercises the port of TWM to NuttX. A description of
|
||||
that port is available at apps/graphics/twm4nx/README.txt. The two
|
||||
configurations are identical, differing on in the "theme" of the UI.
|
||||
twm4nx1 uses framed windows in dark, bright primary colors reminiscent of
|
||||
Windows98. twm4nx2 uses border-less windows in pastel shades for a more
|
||||
contemporary look.
|
||||
|
||||
NOTES:
|
||||
1. This version uses the on-board display with the touchscreen for
|
||||
positional input (instead of a mouse). Keyboard input is currently
|
||||
disabled only because (1) there is no Twm4Nx application that needs
|
||||
it, and (2) I will first need to create a USB host driver to support
|
||||
a USB keyboard.
|
||||
|
||||
STATUS:
|
||||
|
||||
Refer to apps/graphics/twm4nx/README.txt for an overall status. Here
|
||||
are just some issues/topics unique to the LPCXpresso-LPC54628 and/or
|
||||
this configuration.
|
||||
|
||||
1. There is a responsive-ness issue the the FT5x06 touchscreen controller.
|
||||
The pin selected by the board designers will not support interrupts.
|
||||
Therefore, a fall-back polled mode is use. This polled mode has
|
||||
significant inherent delays that effect the user experience when
|
||||
touching buttons or grabbing and moving objects on the desktop.
|
||||
|
||||
2. The NxTerm application is available as the "NuttShell" entry in the
|
||||
Main Menu. When pressed, this will bring up an NSH session in a
|
||||
Twm4Nx window. There is a performance issue, however, due to another
|
||||
issue with the polled mode in the ft5x06 driver. When that driver
|
||||
runs in polled mode, it samples the touch data at a high rate. Each
|
||||
sample is sufficient to wake up the Twm4Nx poll() with POLLIN data
|
||||
availability. But when Twm4Nx tries to read the data, it falls under
|
||||
the FT5x06.c there threshold and no data is returned.
|
||||
|
||||
The actual delay various dynamically from 50 to 200 millisecond
|
||||
intervals.
|
||||
|
||||
A possible solution might be to beef up the POLLIN notification logic
|
||||
in FT5x06.c to avoid these false poll() wake-ups. That, however, is
|
||||
non-trivial since it would have to support the polled as well as the
|
||||
non-polled mode.
|
||||
|
||||
3. Color artifacts: In the CLASSIC configuration, the background of the
|
||||
central NX image is a slightly different hue of blue. For the
|
||||
CONTEMPORARY configuration, the toolbar buttons are supposed to be
|
||||
borderless. There is however, a fine border around each toolbar
|
||||
widget with ruins the feel that the theme was trying for.
|
||||
|
||||
4. Revisiting this configuration after a few months, I found that the
|
||||
configuration generated a hard fault. This turned out to be an issue
|
||||
with the toolchain and dropping the optimization level eliminated the
|
||||
problem; -O2 was sufficient for me. If you see odd behavior like
|
||||
this, you might want to do the same.
|
||||
@@ -0,0 +1,83 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_ARCH_FPU is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="lpcxpresso-lpc54628"
|
||||
CONFIG_ARCH_BOARD_LPCXPRESSO_LPC54628=y
|
||||
CONFIG_ARCH_CHIP="lpc54xx"
|
||||
CONFIG_ARCH_CHIP_LPC54628=y
|
||||
CONFIG_ARCH_CHIP_LPC54XX=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARCH_STDARG_H=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=21082
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DRIVERS_VIDEO=y
|
||||
CONFIG_EXAMPLES_FB=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_FT5X06_POLLMODE=y
|
||||
CONFIG_FT5X06_SINGLEPOINT=y
|
||||
CONFIG_FT5X06_SWAPXY=y
|
||||
CONFIG_GRAPHICS_PDCURSES=y
|
||||
CONFIG_I2CTOOL_MAXBUS=9
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_FT5X06=y
|
||||
CONFIG_LPC54_EMC=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0_OFFSET=0x00080000
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0_SIZE=0x00f80000
|
||||
CONFIG_LPC54_GPIOIRQ=y
|
||||
CONFIG_LPC54_I2C2_MASTER=y
|
||||
CONFIG_LPC54_LCD=y
|
||||
CONFIG_LPC54_LCD_BGR=y
|
||||
CONFIG_LPC54_LCD_BPP16_565=y
|
||||
CONFIG_LPC54_LCD_HBACKPORCH=43
|
||||
CONFIG_LPC54_LCD_HFRONTPORCH=8
|
||||
CONFIG_LPC54_LCD_VBACKPORCH=12
|
||||
CONFIG_LPC54_LCD_VFRONTPORCH=4
|
||||
CONFIG_LPC54_LCD_VPULSE=10
|
||||
CONFIG_LPC54_LCD_VRAMBASE=0xa0000000
|
||||
CONFIG_LPC54_USART0=y
|
||||
CONFIG_MAX_TASKS=16
|
||||
CONFIG_MM_REGIONS=2
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_DISABLE_IFUPDOWN=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_LINELEN=64
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NXFONTS_DISABLE_1BPP=y
|
||||
CONFIG_NXFONTS_DISABLE_24BPP=y
|
||||
CONFIG_NXFONTS_DISABLE_2BPP=y
|
||||
CONFIG_NXFONTS_DISABLE_32BPP=y
|
||||
CONFIG_NXFONTS_DISABLE_4BPP=y
|
||||
CONFIG_NXFONTS_DISABLE_8BPP=y
|
||||
CONFIG_PDCURSES_FONT_6X9=y
|
||||
CONFIG_PREALLOC_TIMERS=4
|
||||
CONFIG_RAM_SIZE=163840
|
||||
CONFIG_RAM_START=0x20000000
|
||||
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_NSH=y
|
||||
CONFIG_SYSTEM_RAMTEST=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_USART0_SERIAL_CONSOLE=y
|
||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||
CONFIG_VIDEO_FB=y
|
||||
@@ -0,0 +1,64 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_ARCH_FPU is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="lpcxpresso-lpc54628"
|
||||
CONFIG_ARCH_BOARD_LPCXPRESSO_LPC54628=y
|
||||
CONFIG_ARCH_CHIP="lpc54xx"
|
||||
CONFIG_ARCH_CHIP_LPC54628=y
|
||||
CONFIG_ARCH_CHIP_LPC54XX=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARCH_STDARG_H=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=21082
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DRIVERS_VIDEO=y
|
||||
CONFIG_EXAMPLES_LVGLDEMO=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FT5X06_POLLMODE=y
|
||||
CONFIG_FT5X06_SINGLEPOINT=y
|
||||
CONFIG_FT5X06_SWAPXY=y
|
||||
CONFIG_GRAPHICS_LVGL=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_FT5X06=y
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
CONFIG_LPC54_EMC=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0_OFFSET=0x00080000
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0_SIZE=0x00f80000
|
||||
CONFIG_LPC54_GPIOIRQ=y
|
||||
CONFIG_LPC54_I2C2_MASTER=y
|
||||
CONFIG_LPC54_LCD=y
|
||||
CONFIG_LPC54_LCD_BGR=y
|
||||
CONFIG_LPC54_LCD_BPP16_565=y
|
||||
CONFIG_LPC54_LCD_HBACKPORCH=43
|
||||
CONFIG_LPC54_LCD_HFRONTPORCH=8
|
||||
CONFIG_LPC54_LCD_VBACKPORCH=12
|
||||
CONFIG_LPC54_LCD_VFRONTPORCH=4
|
||||
CONFIG_LPC54_LCD_VPULSE=10
|
||||
CONFIG_LPC54_LCD_VRAMBASE=0xa0000000
|
||||
CONFIG_LPC54_USART0=y
|
||||
CONFIG_LV_HOR_RES=480
|
||||
CONFIG_LV_VER_RES=272
|
||||
CONFIG_MAX_TASKS=16
|
||||
CONFIG_MM_REGIONS=2
|
||||
CONFIG_PREALLOC_TIMERS=4
|
||||
CONFIG_RAM_SIZE=163840
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_TASK_NAME_SIZE=32
|
||||
CONFIG_USART0_SERIAL_CONSOLE=y
|
||||
CONFIG_USER_ENTRYPOINT="lvgldemo_main"
|
||||
CONFIG_VIDEO_FB=y
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_ARCH_FPU is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="lpcxpresso-lpc54628"
|
||||
CONFIG_ARCH_BOARD_LPCXPRESSO_LPC54628=y
|
||||
CONFIG_ARCH_BUTTONS=y
|
||||
CONFIG_ARCH_CHIP="lpc54xx"
|
||||
CONFIG_ARCH_CHIP_LPC54628=y
|
||||
CONFIG_ARCH_CHIP_LPC54XX=y
|
||||
CONFIG_ARCH_IRQBUTTONS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARCH_STDARG_H=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=21082
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_ETH0_PHY_LAN8720=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_BUTTONS=y
|
||||
CONFIG_INPUT_BUTTONS_LOWER=y
|
||||
CONFIG_LIB_HOSTNAME="LpcXpresso-Lpc54628"
|
||||
CONFIG_LPC54_EMC=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0_SIZE=0x01000000
|
||||
CONFIG_LPC54_ETHERNET=y
|
||||
CONFIG_LPC54_ETH_PHYADDR=0
|
||||
CONFIG_LPC54_GPIOIRQ=y
|
||||
CONFIG_LPC54_USART0=y
|
||||
CONFIG_MAX_TASKS=16
|
||||
CONFIG_MM_REGIONS=2
|
||||
CONFIG_NET=y
|
||||
CONFIG_NETINIT_NOMAC=y
|
||||
CONFIG_NETUTILS_TELNETC=y
|
||||
CONFIG_NETUTILS_TELNETD=y
|
||||
CONFIG_NET_ARP_SEND=y
|
||||
CONFIG_NET_ICMP=y
|
||||
CONFIG_NET_ICMP_SOCKET=y
|
||||
CONFIG_NET_ICMPv6=y
|
||||
CONFIG_NET_ICMPv6_NEIGHBOR=y
|
||||
CONFIG_NET_ICMPv6_SOCKET=y
|
||||
CONFIG_NET_IPv6=y
|
||||
CONFIG_NET_STATISTICS=y
|
||||
CONFIG_NET_TCP=y
|
||||
CONFIG_NET_TCP_WRITE_BUFFERS=y
|
||||
CONFIG_NET_UDP=y
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_LINELEN=64
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_PREALLOC_TIMERS=4
|
||||
CONFIG_RAM_SIZE=163840
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_START_DAY=2
|
||||
CONFIG_START_MONTH=12
|
||||
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_PING6=y
|
||||
CONFIG_SYSTEM_PING=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_USART0_SERIAL_CONSOLE=y
|
||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||
@@ -0,0 +1,63 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_ARCH_FPU is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="lpcxpresso-lpc54628"
|
||||
CONFIG_ARCH_BOARD_LPCXPRESSO_LPC54628=y
|
||||
CONFIG_ARCH_BUTTONS=y
|
||||
CONFIG_ARCH_CHIP="lpc54xx"
|
||||
CONFIG_ARCH_CHIP_LPC54628=y
|
||||
CONFIG_ARCH_CHIP_LPC54XX=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_ARCH_IRQBUTTONS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARCH_STDARG_H=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=21082
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_EXAMPLES_BUTTONS=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2CTOOL_MAXBUS=9
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_BUTTONS=y
|
||||
CONFIG_INPUT_BUTTONS_LOWER=y
|
||||
CONFIG_LPC54_EMC=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0=y
|
||||
CONFIG_LPC54_GPIOIRQ=y
|
||||
CONFIG_LPC54_I2C2_MASTER=y
|
||||
CONFIG_LPC54_RTC=y
|
||||
CONFIG_LPC54_USART0=y
|
||||
CONFIG_MAX_TASKS=16
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_DISABLE_IFUPDOWN=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_LINELEN=64
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_PREALLOC_TIMERS=4
|
||||
CONFIG_RAM_SIZE=163840
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_RTC_ALARM=y
|
||||
CONFIG_RTC_DRIVER=y
|
||||
CONFIG_RTC_IOCTL=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_START_DAY=2
|
||||
CONFIG_START_MONTH=12
|
||||
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||
CONFIG_SYSTEM_I2CTOOL=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_RAMTEST=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_USART0_SERIAL_CONSOLE=y
|
||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||
@@ -0,0 +1,102 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_ARCH_FPU is not set
|
||||
# CONFIG_NXFONTS_DISABLE_16BPP is not set
|
||||
# CONFIG_NXTK_DEFAULT_BORDERCOLORS is not set
|
||||
# CONFIG_NX_DISABLE_16BPP is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="lpcxpresso-lpc54628"
|
||||
CONFIG_ARCH_BOARD_LPCXPRESSO_LPC54628=y
|
||||
CONFIG_ARCH_CHIP="lpc54xx"
|
||||
CONFIG_ARCH_CHIP_LPC54628=y
|
||||
CONFIG_ARCH_CHIP_LPC54XX=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARCH_STDARG_H=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=21082
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FT5X06_POLLMODE=y
|
||||
CONFIG_FT5X06_SINGLEPOINT=y
|
||||
CONFIG_FT5X06_SWAPXY=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_FT5X06=y
|
||||
CONFIG_LPC54_EMC=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0_OFFSET=0x00080000
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0_SIZE=0x00f80000
|
||||
CONFIG_LPC54_GPIOIRQ=y
|
||||
CONFIG_LPC54_I2C2_MASTER=y
|
||||
CONFIG_LPC54_LCD=y
|
||||
CONFIG_LPC54_LCD_BGR=y
|
||||
CONFIG_LPC54_LCD_BPP16_565=y
|
||||
CONFIG_LPC54_LCD_HBACKPORCH=43
|
||||
CONFIG_LPC54_LCD_HFRONTPORCH=8
|
||||
CONFIG_LPC54_LCD_VBACKPORCH=12
|
||||
CONFIG_LPC54_LCD_VFRONTPORCH=4
|
||||
CONFIG_LPC54_LCD_VPULSE=10
|
||||
CONFIG_LPC54_LCD_VRAMBASE=0xa0000000
|
||||
CONFIG_LPC54_USART0=y
|
||||
CONFIG_MAX_TASKS=16
|
||||
CONFIG_MM_REGIONS=2
|
||||
CONFIG_MQ_MAXMSGSIZE=64
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_LIBRARY=y
|
||||
CONFIG_NSH_LINELEN=64
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NX=y
|
||||
CONFIG_NXFONT_SANS22X29B=y
|
||||
CONFIG_NXFONT_SANS23X27=y
|
||||
CONFIG_NXTERM=y
|
||||
CONFIG_NXTERM_CACHESIZE=32
|
||||
CONFIG_NXTERM_CURSORCHAR=95
|
||||
CONFIG_NXTERM_MXCHARS=325
|
||||
CONFIG_NXTERM_NXKBDIN=y
|
||||
CONFIG_NXTK_BORDERCOLOR1=0x5cb7
|
||||
CONFIG_NXTK_BORDERCOLOR2=0x21c9
|
||||
CONFIG_NXTK_BORDERCOLOR3=0xffdf
|
||||
CONFIG_NXWIDGETS=y
|
||||
CONFIG_NXWIDGETS_BPP=16
|
||||
CONFIG_NXWIDGETS_CUSTOM_EDGECOLORS=y
|
||||
CONFIG_NXWIDGETS_CUSTOM_FILLCOLORS=y
|
||||
CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR=0x9dfb
|
||||
CONFIG_NXWIDGETS_DEFAULT_HIGHLIGHTCOLOR=0xc618
|
||||
CONFIG_NXWIDGETS_DEFAULT_SELECTEDBACKGROUNDCOLOR=0xd73e
|
||||
CONFIG_NXWIDGETS_DEFAULT_SHADOWEDGECOLOR=0x21e9
|
||||
CONFIG_NXWIDGETS_DEFAULT_SHINEEDGECOLOR=0xffdf
|
||||
CONFIG_NXWIDGETS_SIZEOFCHAR=1
|
||||
CONFIG_NXWM=y
|
||||
CONFIG_NXWM_HEXCALCULATOR_CUSTOM_FONTID=y
|
||||
CONFIG_NXWM_HEXCALCULATOR_FONTID=5
|
||||
CONFIG_NXWM_KEYBOARD=y
|
||||
CONFIG_NXWM_TASKBAR_LEFT=y
|
||||
CONFIG_NXWM_TASKBAR_VSPACING=4
|
||||
CONFIG_NX_BLOCKING=y
|
||||
CONFIG_NX_KBD=y
|
||||
CONFIG_NX_XYINPUT_TOUCHSCREEN=y
|
||||
CONFIG_PREALLOC_TIMERS=4
|
||||
CONFIG_RAM_SIZE=163840
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_ONEXIT=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_START_DAY=18
|
||||
CONFIG_START_MONTH=12
|
||||
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_USART0_SERIAL_CONSOLE=y
|
||||
CONFIG_USER_ENTRYPOINT="nxwm_main"
|
||||
@@ -0,0 +1,74 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_ARCH_FPU is not set
|
||||
# CONFIG_EXAMPLES_PWFB_DEFAULT_COLORS is not set
|
||||
# CONFIG_EXAMPLES_PWFB_DEFAULT_FONT is not set
|
||||
# CONFIG_NXFONTS_DISABLE_16BPP is not set
|
||||
# CONFIG_NXTK_DEFAULT_BORDERCOLORS is not set
|
||||
# CONFIG_NX_DISABLE_16BPP is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="lpcxpresso-lpc54628"
|
||||
CONFIG_ARCH_BOARD_LPCXPRESSO_LPC54628=y
|
||||
CONFIG_ARCH_CHIP="lpc54xx"
|
||||
CONFIG_ARCH_CHIP_LPC54628=y
|
||||
CONFIG_ARCH_CHIP_LPC54XX=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARCH_STDARG_H=y
|
||||
CONFIG_BOARD_LATE_INITIALIZE=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=21082
|
||||
CONFIG_EXAMPLES_PWFB=y
|
||||
CONFIG_EXAMPLES_PWFB_BGCOLOR=0x7b5d
|
||||
CONFIG_EXAMPLES_PWFB_BPP=16
|
||||
CONFIG_EXAMPLES_PWFB_COLOR1=0xe73f
|
||||
CONFIG_EXAMPLES_PWFB_COLOR2=0xdefb
|
||||
CONFIG_EXAMPLES_PWFB_COLOR3=0xff76
|
||||
CONFIG_EXAMPLES_PWFB_FONTCOLOR=0x0000
|
||||
CONFIG_EXAMPLES_PWFB_FONTID=1
|
||||
CONFIG_EXAMPLES_PWFB_TBCOLOR=0xad55
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_LPC54_EMC=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0_OFFSET=0x00080000
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0_SIZE=0x00f80000
|
||||
CONFIG_LPC54_LCD=y
|
||||
CONFIG_LPC54_LCD_BGR=y
|
||||
CONFIG_LPC54_LCD_BPP16_565=y
|
||||
CONFIG_LPC54_LCD_HBACKPORCH=43
|
||||
CONFIG_LPC54_LCD_HFRONTPORCH=8
|
||||
CONFIG_LPC54_LCD_VBACKPORCH=12
|
||||
CONFIG_LPC54_LCD_VFRONTPORCH=4
|
||||
CONFIG_LPC54_LCD_VPULSE=10
|
||||
CONFIG_LPC54_LCD_VRAMBASE=0xa0000000
|
||||
CONFIG_LPC54_USART0=y
|
||||
CONFIG_MAX_TASKS=16
|
||||
CONFIG_MM_REGIONS=2
|
||||
CONFIG_MQ_MAXMSGSIZE=64
|
||||
CONFIG_NX=y
|
||||
CONFIG_NXFONT_SANS23X27=y
|
||||
CONFIG_NXTK_BORDERCOLOR1=0xad55
|
||||
CONFIG_NXTK_BORDERCOLOR2=0x6b4d
|
||||
CONFIG_NXTK_BORDERCOLOR3=0xdedb
|
||||
CONFIG_NX_BLOCKING=y
|
||||
CONFIG_PREALLOC_TIMERS=4
|
||||
CONFIG_RAM_SIZE=163840
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_HPWORKPRIORITY=192
|
||||
CONFIG_SCHED_ONEXIT=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_START_DAY=19
|
||||
CONFIG_START_MONTH=3
|
||||
CONFIG_START_YEAR=2019
|
||||
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_USART0_SERIAL_CONSOLE=y
|
||||
CONFIG_USER_ENTRYPOINT="pwfb_main"
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_ARCH_FPU is not set
|
||||
# CONFIG_NXFONTS_DISABLE_16BPP is not set
|
||||
# CONFIG_NXTK_DEFAULT_BORDERCOLORS is not set
|
||||
# CONFIG_NX_DISABLE_16BPP is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="lpcxpresso-lpc54628"
|
||||
CONFIG_ARCH_BOARD_LPCXPRESSO_LPC54628=y
|
||||
CONFIG_ARCH_CHIP="lpc54xx"
|
||||
CONFIG_ARCH_CHIP_LPC54628=y
|
||||
CONFIG_ARCH_CHIP_LPC54XX=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARCH_STDARG_H=y
|
||||
CONFIG_BOARD_LATE_INITIALIZE=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=21082
|
||||
CONFIG_EXAMPLES_PWLINES=y
|
||||
CONFIG_EXAMPLES_PWLINES_BPP=16
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_LPC54_EMC=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0_OFFSET=0x00080000
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0_SIZE=0x00f80000
|
||||
CONFIG_LPC54_LCD=y
|
||||
CONFIG_LPC54_LCD_BGR=y
|
||||
CONFIG_LPC54_LCD_BPP16_565=y
|
||||
CONFIG_LPC54_LCD_HBACKPORCH=43
|
||||
CONFIG_LPC54_LCD_HFRONTPORCH=8
|
||||
CONFIG_LPC54_LCD_VBACKPORCH=12
|
||||
CONFIG_LPC54_LCD_VFRONTPORCH=4
|
||||
CONFIG_LPC54_LCD_VPULSE=10
|
||||
CONFIG_LPC54_LCD_VRAMBASE=0xa0000000
|
||||
CONFIG_LPC54_USART0=y
|
||||
CONFIG_MAX_TASKS=16
|
||||
CONFIG_MM_REGIONS=2
|
||||
CONFIG_MQ_MAXMSGSIZE=64
|
||||
CONFIG_NX=y
|
||||
CONFIG_NXFONT_SANS23X27=y
|
||||
CONFIG_NXTK_BORDERCOLOR1=0xad55
|
||||
CONFIG_NXTK_BORDERCOLOR2=0x6b4d
|
||||
CONFIG_NXTK_BORDERCOLOR3=0xdedb
|
||||
CONFIG_NX_ANTIALIASING=y
|
||||
CONFIG_NX_BLOCKING=y
|
||||
CONFIG_PREALLOC_MQ_MSGS=64
|
||||
CONFIG_PREALLOC_TIMERS=4
|
||||
CONFIG_RAM_SIZE=163840
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_HPWORKPRIORITY=192
|
||||
CONFIG_SCHED_ONEXIT=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_START_DAY=19
|
||||
CONFIG_START_MONTH=3
|
||||
CONFIG_START_YEAR=2019
|
||||
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_USART0_SERIAL_CONSOLE=y
|
||||
CONFIG_USER_ENTRYPOINT="pwlines_main"
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_ARCH_FPU is not set
|
||||
# CONFIG_NXFONTS_DISABLE_16BPP is not set
|
||||
# CONFIG_NXTK_DEFAULT_BORDERCOLORS is not set
|
||||
# CONFIG_NX_DISABLE_16BPP is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="lpcxpresso-lpc54628"
|
||||
CONFIG_ARCH_BOARD_LPCXPRESSO_LPC54628=y
|
||||
CONFIG_ARCH_CHIP="lpc54xx"
|
||||
CONFIG_ARCH_CHIP_LPC54628=y
|
||||
CONFIG_ARCH_CHIP_LPC54XX=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARCH_STDARG_H=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=21082
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FT5X06_POLLMODE=y
|
||||
CONFIG_FT5X06_SINGLEPOINT=y
|
||||
CONFIG_FT5X06_SWAPXY=y
|
||||
CONFIG_FT5X06_THRESHX=8
|
||||
CONFIG_FT5X06_THRESHY=8
|
||||
CONFIG_GRAPHICS_TWM4NX=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_FT5X06=y
|
||||
CONFIG_LIB_HOSTNAME="LPCXpresso-LPC54628"
|
||||
CONFIG_LPC54_EMC=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0_OFFSET=0x00080000
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0_SIZE=0x00f80000
|
||||
CONFIG_LPC54_GPIOIRQ=y
|
||||
CONFIG_LPC54_I2C2_MASTER=y
|
||||
CONFIG_LPC54_LCD=y
|
||||
CONFIG_LPC54_LCD_BGR=y
|
||||
CONFIG_LPC54_LCD_BPP16_565=y
|
||||
CONFIG_LPC54_LCD_HBACKPORCH=43
|
||||
CONFIG_LPC54_LCD_HFRONTPORCH=8
|
||||
CONFIG_LPC54_LCD_VBACKPORCH=12
|
||||
CONFIG_LPC54_LCD_VFRONTPORCH=4
|
||||
CONFIG_LPC54_LCD_VPULSE=10
|
||||
CONFIG_LPC54_LCD_VRAMBASE=0xa0000000
|
||||
CONFIG_LPC54_USART0=y
|
||||
CONFIG_MAX_TASKS=16
|
||||
CONFIG_MM_REGIONS=2
|
||||
CONFIG_MQ_MAXMSGSIZE=64
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_LIBRARY=y
|
||||
CONFIG_NSH_LINELEN=64
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NX=y
|
||||
CONFIG_NXFONT_SANS22X29B=y
|
||||
CONFIG_NXFONT_SANS23X27=y
|
||||
CONFIG_NXGLYPHS_BACKGROUNDCOLOR=0x9dfb
|
||||
CONFIG_NXTERM=y
|
||||
CONFIG_NXTERM_CACHESIZE=32
|
||||
CONFIG_NXTERM_CURSORCHAR=95
|
||||
CONFIG_NXTERM_MXCHARS=325
|
||||
CONFIG_NXTERM_NXKBDIN=y
|
||||
CONFIG_NXTK_BORDERCOLOR1=0x5cb7
|
||||
CONFIG_NXTK_BORDERCOLOR2=0x21c9
|
||||
CONFIG_NXTK_BORDERCOLOR3=0xffdf
|
||||
CONFIG_NXWIDGETS_BPP=16
|
||||
CONFIG_NXWIDGETS_CUSTOM_EDGECOLORS=y
|
||||
CONFIG_NXWIDGETS_CUSTOM_FILLCOLORS=y
|
||||
CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR=0x9dfb
|
||||
CONFIG_NXWIDGETS_DEFAULT_HIGHLIGHTCOLOR=0xc618
|
||||
CONFIG_NXWIDGETS_DEFAULT_SELECTEDBACKGROUNDCOLOR=0xd73e
|
||||
CONFIG_NXWIDGETS_DEFAULT_SHADOWEDGECOLOR=0x21e9
|
||||
CONFIG_NXWIDGETS_DEFAULT_SHINEEDGECOLOR=0xffdf
|
||||
CONFIG_NXWIDGETS_SIZEOFCHAR=1
|
||||
CONFIG_NX_BLOCKING=y
|
||||
CONFIG_NX_KBD=y
|
||||
CONFIG_NX_SWCURSOR=y
|
||||
CONFIG_NX_XYINPUT_TOUCHSCREEN=y
|
||||
CONFIG_PREALLOC_MQ_MSGS=64
|
||||
CONFIG_PREALLOC_TIMERS=4
|
||||
CONFIG_RAM_SIZE=163840
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_ONEXIT=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_START_DAY=4
|
||||
CONFIG_START_MONTH=5
|
||||
CONFIG_START_YEAR=2019
|
||||
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TWM4NX_ARCHINIT=y
|
||||
CONFIG_TWM4NX_ICONMGR_NCOLUMNS=2
|
||||
CONFIG_TWM4NX_KEYBOARD_DEVPATH="/dev/console"
|
||||
CONFIG_TWM4NX_TOUCHSCREEN=y
|
||||
CONFIG_USART0_SERIAL_CONSOLE=y
|
||||
CONFIG_USER_ENTRYPOINT="twm4nx_main"
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_ARCH_FPU is not set
|
||||
# CONFIG_NXFONTS_DISABLE_16BPP is not set
|
||||
# CONFIG_NXTK_DEFAULT_BORDERCOLORS is not set
|
||||
# CONFIG_NX_DISABLE_16BPP is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="lpcxpresso-lpc54628"
|
||||
CONFIG_ARCH_BOARD_LPCXPRESSO_LPC54628=y
|
||||
CONFIG_ARCH_CHIP="lpc54xx"
|
||||
CONFIG_ARCH_CHIP_LPC54628=y
|
||||
CONFIG_ARCH_CHIP_LPC54XX=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARCH_STDARG_H=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=21082
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FT5X06_POLLMODE=y
|
||||
CONFIG_FT5X06_SINGLEPOINT=y
|
||||
CONFIG_FT5X06_SWAPXY=y
|
||||
CONFIG_FT5X06_THRESHX=8
|
||||
CONFIG_FT5X06_THRESHY=8
|
||||
CONFIG_GRAPHICS_TWM4NX=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
CONFIG_INPUT=y
|
||||
CONFIG_INPUT_FT5X06=y
|
||||
CONFIG_LIB_HOSTNAME="LPCXpresso-LPC54628"
|
||||
CONFIG_LPC54_EMC=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0=y
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0_OFFSET=0x00080000
|
||||
CONFIG_LPC54_EMC_DYNAMIC_CS0_SIZE=0x00f80000
|
||||
CONFIG_LPC54_GPIOIRQ=y
|
||||
CONFIG_LPC54_I2C2_MASTER=y
|
||||
CONFIG_LPC54_LCD=y
|
||||
CONFIG_LPC54_LCD_BGR=y
|
||||
CONFIG_LPC54_LCD_BPP16_565=y
|
||||
CONFIG_LPC54_LCD_HBACKPORCH=43
|
||||
CONFIG_LPC54_LCD_HFRONTPORCH=8
|
||||
CONFIG_LPC54_LCD_VBACKPORCH=12
|
||||
CONFIG_LPC54_LCD_VFRONTPORCH=4
|
||||
CONFIG_LPC54_LCD_VPULSE=10
|
||||
CONFIG_LPC54_LCD_VRAMBASE=0xa0000000
|
||||
CONFIG_LPC54_USART0=y
|
||||
CONFIG_MAX_TASKS=16
|
||||
CONFIG_MM_REGIONS=2
|
||||
CONFIG_MQ_MAXMSGSIZE=64
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_LIBRARY=y
|
||||
CONFIG_NSH_LINELEN=64
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NX=y
|
||||
CONFIG_NXFONT_SANS22X29B=y
|
||||
CONFIG_NXFONT_SANS23X27=y
|
||||
CONFIG_NXGLYPHS_BACKGROUNDCOLOR=0xc54a
|
||||
CONFIG_NXTERM=y
|
||||
CONFIG_NXTERM_CACHESIZE=32
|
||||
CONFIG_NXTERM_CURSORCHAR=95
|
||||
CONFIG_NXTERM_MXCHARS=325
|
||||
CONFIG_NXTERM_NXKBDIN=y
|
||||
CONFIG_NXTK_BORDERCOLOR1=0x5cb7
|
||||
CONFIG_NXTK_BORDERCOLOR2=0x21c9
|
||||
CONFIG_NXTK_BORDERCOLOR3=0xffdf
|
||||
CONFIG_NXTK_BORDERWIDTH=0
|
||||
CONFIG_NXWIDGETS_BPP=16
|
||||
CONFIG_NXWIDGETS_CUSTOM_EDGECOLORS=y
|
||||
CONFIG_NXWIDGETS_CUSTOM_FILLCOLORS=y
|
||||
CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR=0xdd71
|
||||
CONFIG_NXWIDGETS_DEFAULT_HIGHLIGHTCOLOR=0xc618
|
||||
CONFIG_NXWIDGETS_DEFAULT_SELECTEDBACKGROUNDCOLOR=0xfeb0
|
||||
CONFIG_NXWIDGETS_DEFAULT_SHADOWEDGECOLOR=0x21e9
|
||||
CONFIG_NXWIDGETS_DEFAULT_SHINEEDGECOLOR=0xffdf
|
||||
CONFIG_NXWIDGETS_SIZEOFCHAR=1
|
||||
CONFIG_NX_BLOCKING=y
|
||||
CONFIG_NX_KBD=y
|
||||
CONFIG_NX_SWCURSOR=y
|
||||
CONFIG_NX_XYINPUT_TOUCHSCREEN=y
|
||||
CONFIG_PREALLOC_MQ_MSGS=64
|
||||
CONFIG_PREALLOC_TIMERS=4
|
||||
CONFIG_RAM_SIZE=163840
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_ONEXIT=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_START_DAY=4
|
||||
CONFIG_START_MONTH=5
|
||||
CONFIG_START_YEAR=2019
|
||||
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_TWM4NX_ARCHINIT=y
|
||||
CONFIG_TWM4NX_CONTEMPORARY=y
|
||||
CONFIG_TWM4NX_ICONMGR_NCOLUMNS=2
|
||||
CONFIG_TWM4NX_KEYBOARD_DEVPATH="/dev/console"
|
||||
CONFIG_TWM4NX_TOUCHSCREEN=y
|
||||
CONFIG_USART0_SERIAL_CONSOLE=y
|
||||
CONFIG_USER_ENTRYPOINT="twm4nx_main"
|
||||
@@ -0,0 +1,519 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/lpc54xx/lpcxpresso-lpc54628/include/board.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_LPC54XX_LPCXPRESSO_LPC54628_INCLUDE_BOARD_H
|
||||
#define __BOARDS_ARM_LPC54XX_LPCXPRESSO_LPC54628_INCLUDE_BOARD_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Clocking *****************************************************************/
|
||||
|
||||
#undef BOARD_180MHz
|
||||
#define BOARD_220MHz 1
|
||||
|
||||
/* System PLL
|
||||
*
|
||||
* Notation:
|
||||
* Fin = the input to the PLL.
|
||||
* Fout = the output of the PLL.
|
||||
* Fref = the PLL reference frequency, the input to the phase frequency
|
||||
* detector.
|
||||
* N = optional pre-divider value.
|
||||
* M = feedback divider value, which represents the multiplier for the
|
||||
* PLL.
|
||||
* P = optional post-divider value. An additional divide-by-2 is
|
||||
* included in the post-divider path.
|
||||
*
|
||||
* In all variations of normal mode, the following requirements must be met:
|
||||
*
|
||||
* -275 MHz ≤ Fcco ≤ 550 MHz.
|
||||
* 4 kHz ≤ Fin / N ≤ 25 MHz.
|
||||
*
|
||||
* Normal mode with optional pre-divide. In the equations, use N = 1 when
|
||||
* the pre-divider is not used. The extra divide by 2 is in the feedback
|
||||
* divider path:
|
||||
*
|
||||
* Fout = Fcco = 2 x M x Fin / N
|
||||
*
|
||||
* Normal mode with post-divide and optional pre-divide. In the equations,
|
||||
* use N = 1 when the pre-divider is not used:
|
||||
*
|
||||
* Fout = Fcco / (2 x P) = M x Fin / (N x P)
|
||||
*/
|
||||
|
||||
#define BOARD_PLL_SOURCE /* Select source FR0 12MHz */
|
||||
#define BOARD_PLL_FIN LPC54_FRO_12MHZ /* PLL input frequency */
|
||||
|
||||
#ifdef BOARD_180MHz
|
||||
/* PLL Clock Source: CLKIN
|
||||
* Main Clock Source: PLL
|
||||
* Fout: 220000000
|
||||
*/
|
||||
|
||||
# define BOARD_PLL_CLKSEL SYSCON_SYSPLLCLKSEL_CLKIN
|
||||
# define BOARD_PLL_SELI 32 /* Bandwidth select I value */
|
||||
# define BOARD_PLL_SELP 16 /* Bandwidth select P value */
|
||||
# define BOARD_PLL_SELR 0 /* Bandwidth select R value */
|
||||
# define BOARD_PLL_MDEC 8191 /* Encoded M-divider coefficient */
|
||||
# define BOARD_PLL_NDEC 770 /* Encoded N-divider coefficient */
|
||||
# define BOARD_PLL_PDEC 98 /* Encoded P-divider coefficient */
|
||||
# define BOARD_PLL_FOUT 180000000U /* Pll output frequency */
|
||||
|
||||
#else /* BOARD_220MHz */
|
||||
/* PLL Clock Source: FRO 12MHz
|
||||
* Main Clock Source: PLL
|
||||
* Fout: 220000000
|
||||
*/
|
||||
|
||||
# define BOARD_PLL_CLKSEL SYSCON_SYSPLLCLKSEL_FFRO
|
||||
# define BOARD_PLL_SELI 34 /* Bandwidth select I value */
|
||||
# define BOARD_PLL_SELP 31 /* Bandwidth select P value */
|
||||
# define BOARD_PLL_SELR 0 /* Bandwidth select R value */
|
||||
# define BOARD_PLL_MDEC 13243 /* Encoded M-divider coefficient */
|
||||
# define BOARD_PLL_NDEC 1 /* Encoded N-divider coefficient */
|
||||
# define BOARD_PLL_PDEC 98 /* Encoded P-divider coefficient */
|
||||
# define BOARD_PLL_FOUT 220000000 /* Pll output frequency */
|
||||
#endif
|
||||
|
||||
#define BOARD_MAIN_CLK BOARD_PLL_FOUT /* Main clock frequency */
|
||||
|
||||
/* CPU Clock:
|
||||
*
|
||||
* AHB Clock Divider: 1
|
||||
* AHB Clock Frequency: 180,000,000 or 220,000,000
|
||||
*/
|
||||
|
||||
#define BOARD_AHBCLKDIV 1 /* (un-decremented) */
|
||||
#define BOARD_AHB_FREQUENCY (BOARD_MAIN_CLK / BOARD_AHBCLKDIV)
|
||||
#define BOARD_CPU_FREQUENCY BOARD_AHB_FREQUENCY
|
||||
|
||||
/* Fraction Rate Generator (FRG) Clock (Optional Flexcomm0 function clock)
|
||||
*
|
||||
* To use the fractional divider, the DIV value must be programmed with the
|
||||
* fixed value of 256. Then:
|
||||
*
|
||||
* Ffrg = (Finput) / (1 + (MULT / DIV))
|
||||
*
|
||||
* Mainclock is used as the FRG clock source. Divider must be such that the
|
||||
* FRG output frequency is less than equal to 48MHz
|
||||
*
|
||||
* MUL = (Finput - Ffrg) * 256) / Ffrg
|
||||
*/
|
||||
|
||||
/* Revisit: FRGCLK <= 48MHz cannot be realized with the MainClk source */
|
||||
|
||||
#define BOARD FRGCLK_CLKSEL SYSCON_FRGCLKSEL_MAINCLK
|
||||
#define BOARD_FRGCLK_INPUT BOARD_MAIN_CLK /* FRG input frequency */
|
||||
#define BOARD_FRGCLK 48000000 /* May not be exact */
|
||||
|
||||
/* SysTick:
|
||||
* The SysTick clock may be clocked internally either by the by the system
|
||||
* clock (CLKSOURCE==1) or by the SysTick function clock (CLKSOURCE==0).
|
||||
* The SysTick Function clock is equal to:
|
||||
*
|
||||
* Fsystick = Fmainclk / SYSTICKCLKDIV
|
||||
*
|
||||
* Tips for selecting BOARD_SYSTICKCLKDIV:
|
||||
* The resulting SysTick reload value should be as large as possible,
|
||||
* but must be less than 2^24:
|
||||
*
|
||||
* SYSTICKDIV > Fmainclk / CLK_TCK / 2^24
|
||||
*
|
||||
* The logic in lpc54_timerisr.c will always select the SysTick function
|
||||
* clock as the source (CLKSOURCE==0).
|
||||
* NOTE: When the system tick clock divider is selected as the clock source,
|
||||
* the CPU clock must be at least 2.5 times faster than the divider output.
|
||||
*
|
||||
* SysTick Divider: (SYSTICKCLKDIV)
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_SCHED_TICKLESS
|
||||
# if CONFIG_USEC_PER_TICK == 10000
|
||||
# define BOARD_SYSTICKCLKDIV 1
|
||||
# else
|
||||
# error Missing SYSTICK divider
|
||||
# endif
|
||||
# define BOARD_SYSTICK_CLOCK (BOARD_AHB_FREQUENCY / BOARD_SYSTICKCLKDIV)
|
||||
#endif
|
||||
|
||||
/* Flexcomm0: USART0 (REVIST) */
|
||||
|
||||
#define BOARD_FLEXCOMM0_CLKSEL SYSCON_FCLKSEL_FRO12M
|
||||
#define BOARD_FLEXCOMM0_FCLK LPC54_FRO_12MHZ
|
||||
|
||||
/* Flexcomm2: I2C2 (REVIST) */
|
||||
|
||||
#define BOARD_FLEXCOMM2_CLKSEL SYSCON_FCLKSEL_FRO12M
|
||||
#define BOARD_FLEXCOMM2_FCLK LPC54_FRO_12MHZ
|
||||
|
||||
/* EMC */
|
||||
|
||||
#ifdef BOARD_220MHz
|
||||
#define BOARD_EMC_CLKDIV 3 /* EMC Clock = CPU FREQ/3 */
|
||||
#else /* if BOARD_180MHz */
|
||||
#define BOARD_EMC_CLKDIV 2 /* EMC Clock = CPU FREQ/2 */
|
||||
#endif
|
||||
#define BOARD_EMC_FREQUENCY (BOARD_CPU_FREQUENCY / BOARD_EMC_CLKDIV)
|
||||
|
||||
/* SD/MMC or SDIO interface */
|
||||
|
||||
/* SD/MMC function clock. The SDMMC source clock (Fsdmmc) is the main clock
|
||||
* which may be divided down by the SYSCON module (8-bit divider, functional
|
||||
* range, 1-256). The SD clock is obtained by dividing the source clock
|
||||
* down once again (8-bit divider with functional range 1 (bypass) then 2-510
|
||||
* in steps of 2).
|
||||
*
|
||||
* Fsdmmc = Fmck / SYSDIV
|
||||
* Fsd = Fsdmmc / SDDIV
|
||||
*
|
||||
* The optimal SYSCON divisor (SYSDIV) is the smallest divisor that will
|
||||
* assure that the smallest usable SD frequency (Fmin = 400KHz) can be
|
||||
* attained without overflowing the final 8-bit divider (SDDIV). That is:
|
||||
*
|
||||
* SYSDIV = Fmck / 400,000 / 510
|
||||
*
|
||||
* Example: BOARD_MAIN_CLK=220MHz, CLKDIV=2, Finput=110MHz.
|
||||
*
|
||||
* REVISIT: We could get getter timing resolution if we were to reset the
|
||||
* optimal SYSCON divider with each frequency change. For example, at 220
|
||||
* MHz, we could set he divider to 1 for all operational frequencies.
|
||||
*/
|
||||
|
||||
#define BOARD_SDMMC_CEIL(a,b) (((a) + (b) - 1) / (b))
|
||||
|
||||
#define BOARD_SDMMC_CLKSRC SYSCON_SDIOCLKSEL_MAINCLK
|
||||
#define BOARD_SDMMC_CLKDIV BOARD_SDMMC_CEIL(BOARD_MAIN_CLK, 400000 * 510)
|
||||
#define BOARD_SDMMC_FREQUENCY (BOARD_MAIN_CLK / BOARD_SDMMC_CLKDIV)
|
||||
|
||||
/* Mode-dependent function clock division
|
||||
*
|
||||
* Example: BOARD_SDMMC_FREQUENCY=110MHz
|
||||
* BOARD_CLKDIV_INIT=276[275], Fsdmmc=399KHz (400KHz max)
|
||||
* BOARD_CLKDIV_MMCXFR=6, Fsdmmc=18Mhz (20MHz max)
|
||||
* BOARD_CLKDIV_SDWIDEXFR=6[5], Fsdmmc=18MHz (25MHz max)
|
||||
* BOARD_CLKDIV_SDXFR=6[5], Fsdmmc=18MHz (25MHz max)
|
||||
*
|
||||
* NOTE: Clock division is 2*n. For example, value of 0 means divide by
|
||||
* 2 * 0 = 0 (no division, bypass), value of 1 means divide by 2 * 1 = 2,
|
||||
* value of 255 means divide by 2 * 255 = 510, and so on.
|
||||
*
|
||||
* SD/MMC logic will write the value ((clkdiv + 1) >> 1) as the divisor.
|
||||
* So an odd value calculated below will be moved up to next higher divider
|
||||
* value. So the value 3 will cause 2 to be written as the divider value
|
||||
* and the effective divider will be 4.
|
||||
*/
|
||||
|
||||
#define BOARD_CLKDIV_INIT BOARD_SDMMC_CEIL(BOARD_SDMMC_FREQUENCY, 400000)
|
||||
#define BOARD_CLKDIV_MMCXFR BOARD_SDMMC_CEIL(BOARD_SDMMC_FREQUENCY, 20000000)
|
||||
#define BOARD_CLKDIV_SDWIDEXFR BOARD_SDMMC_CEIL(BOARD_SDMMC_FREQUENCY, 25000000)
|
||||
#define BOARD_CLKDIV_SDXFR BOARD_SDMMC_CEIL(BOARD_SDMMC_FREQUENCY, 25000000)
|
||||
|
||||
/* Clocking *****************************************************************/
|
||||
|
||||
/* The LPCXpress-LPC54628 has three user LEDs: D9, D11, and D12. These
|
||||
* LEDs are for application use. They are illuminated when the driving
|
||||
* signal from the LPC546xx is low. The LEDs are driven by ports P2-2 (D9),
|
||||
* P3-3 (D11) and P3-14 (D12).
|
||||
*/
|
||||
|
||||
/* LED index values for use with board_userled() */
|
||||
|
||||
#define BOARD_D9 0
|
||||
#define BOARD_D11 1
|
||||
#ifndef CONFIG_ARCH_LEDS
|
||||
# define BOARD_D12 2
|
||||
# define BOARD_NLEDS 3
|
||||
#else
|
||||
# define BOARD_NLEDS 2
|
||||
#endif
|
||||
|
||||
/* LED bits for use with board_userled_all() */
|
||||
|
||||
#define BOARD_D9_BIT (1 << BOARD_D9)
|
||||
#define BOARD_D11_BIT (1 << BOARD_D11)
|
||||
#ifndef CONFIG_ARCH_LEDS
|
||||
# define BOARD_D12_BIT (1 << BOARD_D12)
|
||||
#endif
|
||||
|
||||
/* These LEDs are not used by the NuttX port unless CONFIG_ARCH_LEDS is
|
||||
* defined. In that case, the usage by the board port is defined in
|
||||
* include/board.h and src/lpc54_autoleds.c. The LEDs are used to encode
|
||||
* OS-related events as follows:
|
||||
*/
|
||||
|
||||
/* D9 D11 D12 */
|
||||
#define LED_STARTED 0 /* OFF OFF OFF */
|
||||
#define LED_HEAPALLOCATE 1 /* ON OFF OFF */
|
||||
#define LED_IRQSENABLED 2 /* OFF ON OFF */
|
||||
#define LED_STACKCREATED 3 /* OFF OFF OFF */
|
||||
|
||||
#define LED_INIRQ 4 /* NC NC ON (momentary) */
|
||||
#define LED_SIGNAL 4 /* NC NC ON (momentary) */
|
||||
#define LED_ASSERTION 4 /* NC NC ON (momentary) */
|
||||
#define LED_PANIC 4 /* NC NC ON (2Hz flashing) */
|
||||
#undef LED_IDLE /* Sleep mode indication not supported */
|
||||
|
||||
/* After booting, LEDs D9 and D11 are available for use by the user. If the
|
||||
* system booted properly, D9 and D11 should be OFF and D12 should be glowing
|
||||
* to indicate that interrupts are occurring. If D12 is flash at 2Hz, then
|
||||
* the system has crashed.
|
||||
*/
|
||||
|
||||
/* Button definitions *******************************************************/
|
||||
|
||||
/* The LPCXpresso has four switches:
|
||||
*
|
||||
* SW2 ISP2 P0.6
|
||||
* SW3 ISP1 P0.5
|
||||
* SW4 ISP0 P0.4
|
||||
* SW5 User Button P1.1
|
||||
*
|
||||
* In all cased, the signal is low when the button is pressed.
|
||||
*
|
||||
* SW2, SW3, SW4 can be used to force the LPC546xx in to ISP boot modes.
|
||||
* After boot these buttons could be used as user buttons. However, they are
|
||||
* not available when the on-board SRDRAM is used because P0.4, P0.5, and
|
||||
* P0.6 are also used as EMC_D2, EMC_D3, and EMC_D4, respectively.
|
||||
*
|
||||
* So SW5 is really the only button that that is generally available for
|
||||
* software usage.
|
||||
*/
|
||||
|
||||
#define BUTTON_USER 0
|
||||
#define NUM_BUTTONS 1
|
||||
|
||||
#define BUTTON_USER_BIT (1 << BUTTON_USER)
|
||||
|
||||
/* Pin Disambiguation *******************************************************/
|
||||
|
||||
/* Flexcomm0/USART0
|
||||
*
|
||||
* USART0 connects to the serial bridge on LPC4322JET100 and is typically
|
||||
* used for the serial console.
|
||||
*
|
||||
* BRIDGE_UART_RXD -> P0_29-ISP_FC0_RXD -> P0.29 GPIO_FC0_RXD_SDA_MOSI_2
|
||||
* BRIDGE_UART_TXD <- P0_30-ISP_FC0_TXD <- P0.30 GPIO_FC0_TXD_SCL_MISO_2
|
||||
*/
|
||||
|
||||
#define GPIO_USART0_RXD (GPIO_FC0_RXD_SDA_MOSI_2 | GPIO_FILTER_OFF)
|
||||
#define GPIO_USART0_TXD (GPIO_FC0_TXD_SCL_MISO_2 | GPIO_FILTER_OFF)
|
||||
|
||||
/* An alternative for the serial console is a Arduino Uno compatible serial
|
||||
* shield:
|
||||
*
|
||||
* Arduino Uno J13 Board Signal
|
||||
* ----------- ------ ----------------
|
||||
* D0 RX Pin 15 P3_26-FC4_RXD
|
||||
* D1 TX Pin 13 P3_27-FC4_TXD
|
||||
*/
|
||||
|
||||
#define GPIO_USART4_RXD (GPIO_FC4_RXD_SDA_MOSI_2 | GPIO_FILTER_OFF)
|
||||
#define GPIO_USART4_TXD (GPIO_FC4_TXD_SCL_MISO_2 | GPIO_FILTER_OFF)
|
||||
|
||||
/* Flexcomm2/I2C
|
||||
*
|
||||
* For I2C:
|
||||
* Type A & D pins need:
|
||||
* GPIO_OPENDRAIN + GPIO_FILTER_OFF
|
||||
* Type I pins need for Standard mode I2C need:
|
||||
* GPIO_FILTER_OFF + GPIO_I2C_FILTER_ON + GPIO_I2CDRIVE_LOW
|
||||
* Type I pins need for fast speed I2C need:
|
||||
* GPIO_FILTER_OFF + GPIO_I2C_FILTER_ON or OFF +
|
||||
* GPIO_I2CDRIVE_LOW or HIGH
|
||||
* Type I pins need for high speed I2C need:
|
||||
* GPIO_FILTER_OFF + GPIO_I2C_FILTER_OFF + GPIO_I2CDRIVE_HIGH
|
||||
*
|
||||
* There are several on-board devices using I2C2:
|
||||
*
|
||||
* Codec I2C address: 0x1a
|
||||
* Accel I2C address: 0x1d
|
||||
* Touch panel I2C address: 0x38
|
||||
*
|
||||
* In addition, these same I2C2 pins are brought out through D14 and D15 of
|
||||
* the Arduino Uno connector.
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_LPC54_I2C_FAST)
|
||||
# define _I2CFILTER GPIO_I2C_FILTER_OFF
|
||||
# define _I2CDRIVE GPIO_I2CDRIVE_HIGH
|
||||
#elif defined(CONFIG_LPC54_I2C_HIGH)
|
||||
# define _I2CFILTER GPIO_I2C_FILTER_OFF
|
||||
# define _I2CDRIVE GPIO_I2CDRIVE_HIGH
|
||||
#else
|
||||
# define _I2CFILTER GPIO_I2C_FILTER_ON
|
||||
# define _I2CDRIVE GPIO_I2CDRIVE_LOW
|
||||
#endif
|
||||
|
||||
#define GPIO_I2C2_SCL (GPIO_FC2_RTS_SCL_SSEL1_2 | \
|
||||
GPIO_FILTER_OFF | _I2CFILTER | \
|
||||
_I2CDRIVE)
|
||||
#define GPIO_I2C2_SDA (GPIO_FC2_CTS_SDA_SSEL0_2 | \
|
||||
GPIO_FILTER_OFF | _I2CFILTER | \
|
||||
_I2CDRIVE)
|
||||
|
||||
/* Flexcomm2/SPI
|
||||
*
|
||||
* There are no SPI devices on board the LPCXpresso-LPC54628. SPI is
|
||||
* available on the Arduino Uno compatible connector, however:
|
||||
*
|
||||
* Arduino Uno J9 Board Signal Pin Type
|
||||
* ----------- ------ ---------------- ---------
|
||||
* D10 SSEL Pin 15 P3_20-FC9_SCK Type D
|
||||
* D11 MOSI Pin 13 P3_21-FC9_MOSI Type A
|
||||
* D12 MISO Pin 11 P3_22-FC9_MISO Type A
|
||||
* D13 SCK Pin 9 P3_30-FC9_SSELn0 Type D
|
||||
*
|
||||
* For SPI:
|
||||
* Type A & D pins need:
|
||||
* GPIO_PUSHPULL (on outputs) + GPIO_SLEW_STANDARD (Type D) +
|
||||
* GPIO_FILTER_OFF
|
||||
* GPIO_SLEW_FAST is optional for high data rates (Type D).
|
||||
* Type I need:
|
||||
* GPIO_I2C_FILTER_OFF + GPIO_I2CDRIVE_LOW + GPIO_FILTER_OFF +
|
||||
* GPIO_I2CSLEW_GPIO
|
||||
*/
|
||||
|
||||
#define GPIO_FC9_RXD_SDA_MOSI (GPIO_FC9_RXD_SDA_MOSI_1 | \
|
||||
GPIO_PUSHPULL | GPIO_FILTER_OFF)
|
||||
#define GPIO_FC9_TXD_SCL_MISO (GPIO_FC9_TXD_SCL_MISO_1 | \
|
||||
GPIO_FILTER_OFF)
|
||||
#define GPIO_FC9_SCK (GPIO_FC9_SCK_1 | GPIO_PUSHPULL | \
|
||||
GPIO_SLEW_STANDARD | GPIO_FILTER_OFF)
|
||||
|
||||
/* SD/MMC
|
||||
*
|
||||
* P2_10-SD_CDn
|
||||
* P2_6-SD_D0
|
||||
* P2_7-SD_D1
|
||||
* P2_8-SD_D2
|
||||
* P2_9-SD_D3
|
||||
* P2_3-SD_CLK
|
||||
* P2_4-SD_CMD
|
||||
* P2_5-SD_POW_EN
|
||||
* P3_15-SD_WPn
|
||||
*/
|
||||
|
||||
#define GPIO_SD_CARD_DET_N GPIO_SD_CARD_DET_N_2 /* P2.10 */
|
||||
#define GPIO_SD_D0 GPIO_SD_D0_3 /* P2.6 */
|
||||
#define GPIO_SD_D1 GPIO_SD_D1_3 /* P2.7 */
|
||||
#define GPIO_SD_D2 GPIO_SD_D2_3 /* P2.8 */
|
||||
#define GPIO_SD_D3 GPIO_SD_D3_3 /* P2.9 */
|
||||
#define GPIO_SD_CLK GPIO_SD_CLK_3 /* P2.3 */
|
||||
#define GPIO_SD_CMD GPIO_SD_CMD_3 /* P2.4 */
|
||||
#define GPIO_SD_POW_EN GPIO_SD_POW_EN_2 /* P2.5 */
|
||||
#define GPIO_SD_WR_PRT GPIO_SD_WR_PRT_2 /* P2.15 */
|
||||
|
||||
/* REVISIT: Due to chip errata, Rev. 1.7, Issue 3.7, DAT4-7 must also be
|
||||
* configured. Otherwise the SD interface will not work.
|
||||
*/
|
||||
|
||||
#define GPIO_SD_D4 (GPIO_SD_D4_3 | GPIO_PULLUP) /* P4.29 */
|
||||
#define GPIO_SD_D5 (GPIO_SD_D5_3 | GPIO_PULLUP) /* P4.30 */
|
||||
#define GPIO_SD_D6 (GPIO_SD_D6_3 | GPIO_PULLUP) /* P4.31 */
|
||||
#define GPIO_SD_D7 (GPIO_SD_D7_3 | GPIO_PULLUP) /* P5.0 */
|
||||
|
||||
/* LCD
|
||||
*
|
||||
* There are no alternatives for LCD pins except for the VD0-VD3 pins.
|
||||
* VD0-VD2 are not used in this hardware configuration. VD3 is on
|
||||
* P2.21.
|
||||
*/
|
||||
|
||||
#define GPIO_LCD_VD3 GPIO_LCD_VD3_1
|
||||
|
||||
/* Ethernet Clock
|
||||
*
|
||||
* The Lpcxpresso-LPC546258 uses a LAN8720A PHY in RMII mode. Clocking is
|
||||
* provided via a 25MHz crystal (Y1). CLKOUT on P3.12 is an option if JS4
|
||||
* is reversed.
|
||||
*/
|
||||
|
||||
#define BOARD_PHY_CLOCK 25000000 /* 25MHz crystal */
|
||||
|
||||
/* Ethernet RMII mode pins:
|
||||
*
|
||||
* P4_16-ENET_MDIO Ethernet MIIM data input and output
|
||||
* P4_15-ENET_MDC Ethernet MIIM clock
|
||||
*
|
||||
* P4_11-ENET_RXD0 Ethernet receive data 0-1
|
||||
* P4_12-ENET_RXD1
|
||||
* P4_8-ENET_TXD0 Ethernet transmit data 0-1
|
||||
* P0_17-ENET_TXD1
|
||||
* P4_10-ENET_CRS_DV Ethernet receive data valid
|
||||
* P4_13-ENET_TX_EN Ethernet transmit data enable
|
||||
*
|
||||
* P4_14-ENET_RX_CLK REF_CLK, Reference clock
|
||||
* P2_26-ENET_PHY_RSTn nRST (Controlled by board logic)
|
||||
*
|
||||
* NOTE: You must set JP11 and JP12 to close 1-2 to enable Ethernet
|
||||
* port functionality. Some pins are shared with USB0 overcurrent
|
||||
* feature.
|
||||
*/
|
||||
|
||||
#define GPIO_ENET_MDIO GPIO_ENET_MDIO_2 /* P4.16 */
|
||||
#define GPIO_ENET_MDC GPIO_ENET_MDC_2 /* P4.15 */
|
||||
|
||||
#define GPIO_ENET_RXD0 GPIO_ENET_RXD0_2 /* P4.11 */
|
||||
#define GPIO_ENET_RXD1 GPIO_ENET_RXD1_2 /* P4.12 */
|
||||
#define GPIO_ENET_TXD0 GPIO_ENET_TXD0_3 /* P4.8 */
|
||||
#define GPIO_ENET_TXD1 GPIO_ENET_TXD1_4 /* P0.17 */
|
||||
#define GPIO_ENET_RX_DV GPIO_ENET_RX_DV_2 /* P4.10 */
|
||||
#define GPIO_ENET_TX_EN GPIO_ENET_TX_EN_2 /* P4.13 */
|
||||
|
||||
#define GPIO_ENET_REF_CLK GPIO_ENET_RX_CLK_2 /* P4.14 */
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_ARM_LPC54XX_LPCXPRESSO_LPC54628_INCLUDE_BOARD_H */
|
||||
@@ -0,0 +1,65 @@
|
||||
############################################################################
|
||||
# boards/arm/lpc54xx/lpcxpresso-lpc54628/scripts/Make.defs
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership. The
|
||||
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance with the
|
||||
# License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include $(TOPDIR)/.config
|
||||
include $(TOPDIR)/tools/Config.mk
|
||||
include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs
|
||||
|
||||
# Setup for the kind of memory that we are executing from
|
||||
|
||||
LDSCRIPT = flash.ld
|
||||
|
||||
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
|
||||
ARCHSCRIPT = -T "${shell cygpath -w $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)}"
|
||||
else
|
||||
ARCHSCRIPT = -T$(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = -g
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
||||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-builtin
|
||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||
|
||||
CFLAGS := $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
|
||||
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
|
||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
|
||||
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
|
||||
|
||||
ifneq ($(CROSSDEV),arm-nuttx-elf-)
|
||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||
endif
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
LDFLAGS += -g
|
||||
endif
|
||||
@@ -0,0 +1,103 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/lpc54xx/lpcxpresso-lpc54628/scripts/flash.ld
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* The LPC54628 on the LPCXPresso has 512Kb of FLASH at address 0x0000:0000.
|
||||
* The Main SRAM is comprised of up to a total 160 KB of contiguous, on-chip
|
||||
* static RAM memory beginning at address 0x2000:0000 (this is in addition
|
||||
* to SRAMX aso the total device SRAM can be up to 200 KB).
|
||||
*/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
progmem (rx) : ORIGIN = 0x00000000, LENGTH = 512K
|
||||
datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 160K
|
||||
}
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
ENTRY(__start) /* Treat __start as the anchor for dead code stripping */
|
||||
EXTERN(_vectors) /* Force the vectors to be included in the output */
|
||||
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(.);
|
||||
} > progmem
|
||||
|
||||
.init_section : {
|
||||
_sinit = ABSOLUTE(.);
|
||||
*(.init_array .init_array.*)
|
||||
_einit = ABSOLUTE(.);
|
||||
} > progmem
|
||||
|
||||
.ARM.extab : {
|
||||
*(.ARM.extab*)
|
||||
} > progmem
|
||||
|
||||
__exidx_start = ABSOLUTE(.);
|
||||
.ARM.exidx : {
|
||||
*(.ARM.exidx*)
|
||||
} > progmem
|
||||
__exidx_end = ABSOLUTE(.);
|
||||
|
||||
_eronly = ABSOLUTE(.);
|
||||
|
||||
.data : {
|
||||
_sdata = ABSOLUTE(.);
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
CONSTRUCTORS
|
||||
. = ALIGN(4);
|
||||
_edata = ABSOLUTE(.);
|
||||
} > datamem AT > progmem
|
||||
|
||||
.bss : {
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.bss .bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > datamem
|
||||
|
||||
/* 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) }
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
############################################################################
|
||||
# boards/arm/lpc54xx/lpcxpresso-lpc54628/src/Makefile
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership. The
|
||||
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance with the
|
||||
# License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include $(TOPDIR)/Make.defs
|
||||
|
||||
CSRCS = lpc54_boot.c lpc54_bringup.c lpc54_userleds.c lpc54_lcd.c
|
||||
|
||||
ifeq ($(CONFIG_ARCH_LEDS),y)
|
||||
CSRCS += lpc54_autoleds.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_BUTTONS),y)
|
||||
CSRCS += lpc54_buttons.c
|
||||
endif
|
||||
|
||||
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
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(TOPDIR)/boards/Board.mk
|
||||
@@ -0,0 +1,73 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_appinit.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
|
||||
#include "lpcxpresso-lpc54628.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_app_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform application specific initialization. This function is never
|
||||
* called directly from application code, but only indirectly via the
|
||||
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
|
||||
*
|
||||
* Input Parameters:
|
||||
* arg - The boardctl() argument is passed to the board_app_initialize()
|
||||
* implementation without modification. The argument has no
|
||||
* meaning to NuttX; the meaning of the argument is a contract
|
||||
* between the board-specific initialization logic and the
|
||||
* matching application logic. The value could be such things as a
|
||||
* mode enumeration value, a set of DIP switch switch settings, a
|
||||
* pointer to configuration data read from a file or serial FLASH,
|
||||
* or whatever you would like to do with it. Every implementation
|
||||
* should accept zero/NULL as a default configuration.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success; a negated errno value is returned on
|
||||
* any failure to indicate the nature of the failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int board_app_initialize(uintptr_t arg)
|
||||
{
|
||||
#ifdef CONFIG_BOARD_LATE_INITIALIZE
|
||||
/* Board initialization already performed by board_late_initialize() */
|
||||
|
||||
return OK;
|
||||
#else
|
||||
/* Perform board-specific initialization */
|
||||
|
||||
return lpc54_bringup();
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_autoleds.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* The LPCXpress-LPC54628 has three user LEDs: D9, D11, and D12. These
|
||||
* LEDs are for application use. They are illuminated when the driving
|
||||
* signal from the LPC546xx is low. The LEDs are driven by ports P2-2 (D9),
|
||||
* P3-3 (D11) and P3-14 (D12).
|
||||
*
|
||||
* These LEDs are not used by the NuttX port unless CONFIG_ARCH_LEDS is
|
||||
* defined. In that case, the usage by the board port is defined in
|
||||
* include/board.h and src/lpc54_autoleds.c. The LEDs are used to encode
|
||||
* OS-related events as follows:
|
||||
* D9 D11 D12
|
||||
* LED_STARTED 0 OFF OFF OFF
|
||||
* LED_HEAPALLOCATE 1 ON OFF OFF
|
||||
* LED_IRQSENABLED 2 OFF ON OFF
|
||||
* LED_STACKCREATED 3 OFF OFF OFF
|
||||
*
|
||||
* LED_INIRQ 4 NC NC ON (momentary)
|
||||
* LED_SIGNAL 4 NC NC ON (momentary)
|
||||
* LED_ASSERTION 4 NC NC ON (momentary)
|
||||
* LED_PANIC 4 NC NC ON (2Hz flashing)
|
||||
* LED_IDLE Sleep mode indication not supported
|
||||
*
|
||||
* After booting, LEDs D9 and D11 are available for use by the user. If the
|
||||
* system booted properly, D9 and D11 should be OFF and D12 should be glowing
|
||||
* to indicate that interrupts are occurring. If D12 is flash at 2Hz, then
|
||||
* the system has crashed.
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "lpc54_gpio.h"
|
||||
#include "lpcxpresso-lpc54628.h"
|
||||
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_autoled_initialize
|
||||
****************************************************************************/
|
||||
|
||||
void board_autoled_initialize(void)
|
||||
{
|
||||
/* Configure LED GPIOs for output */
|
||||
|
||||
lpc54_gpio_config(GPIO_LED_D9);
|
||||
lpc54_gpio_config(GPIO_LED_D11);
|
||||
lpc54_gpio_config(GPIO_LED_D12);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_autoled_on
|
||||
****************************************************************************/
|
||||
|
||||
void board_autoled_on(int led)
|
||||
{
|
||||
/* D9 and D11 are only changed during boot up states */
|
||||
|
||||
if ((unsigned int)led <= 3)
|
||||
{
|
||||
bool d9off = (led != 1);
|
||||
bool d11off = (led != 2);
|
||||
|
||||
lpc54_gpio_write(GPIO_LED_D9, d9off); /* Low illuminates */
|
||||
lpc54_gpio_write(GPIO_LED_D11, d11off); /* Low illuminates */
|
||||
lpc54_gpio_write(GPIO_LED_D12, true); /* Low illuminates */
|
||||
}
|
||||
else
|
||||
{
|
||||
lpc54_gpio_write(GPIO_LED_D12, false); /* Low illuminates */
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_autoled_off
|
||||
****************************************************************************/
|
||||
|
||||
void board_autoled_off(int led)
|
||||
{
|
||||
if (led == 4)
|
||||
{
|
||||
lpc54_gpio_write(GPIO_LED_D12, true); /* Low illuminates */
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ARCH_LEDS */
|
||||
@@ -0,0 +1,88 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_boot.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
|
||||
#include "lpcxpresso-lpc54628.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_board_initialize
|
||||
*
|
||||
* Description:
|
||||
* All LPC54xx architectures must provide the following entry point.
|
||||
* This entry point is called early in the initialization -- after
|
||||
* clocking and memory have been configured but before caches have been
|
||||
* enabled and before any devices have been initialized.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void lpc54_board_initialize(void)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
/* Configure on-board LEDs if LED support has been selected. */
|
||||
|
||||
board_autoled_initialize();
|
||||
#endif
|
||||
|
||||
/* Configure the LCD GPIOs if LCD support has been selected. This is done
|
||||
* unconditionally because even if the LCD is not configured, we will
|
||||
* still want to turn the backlight off.
|
||||
*/
|
||||
|
||||
lpc54_lcd_initialize();
|
||||
|
||||
#ifdef CONFIG_LPC54_EMC
|
||||
/* Initialize SDRAM */
|
||||
|
||||
lpc54_sdram_initialize();
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_late_initialize
|
||||
*
|
||||
* Description:
|
||||
* If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
|
||||
* initialization call will be performed in the boot-up sequence to a
|
||||
* function called board_late_initialize(). board_late_initialize() will be
|
||||
* called immediately after up_initialize() is called and just before the
|
||||
* initial application is started. This additional initialization phase
|
||||
* may be used, for example, to initialize board-specific device drivers.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_BOARD_LATE_INITIALIZE
|
||||
void board_late_initialize(void)
|
||||
{
|
||||
/* Perform board-specific initialization */
|
||||
|
||||
lpc54_bringup();
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,176 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_bringup.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_VIDEO_FB
|
||||
# include <nuttx/video/fb.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_INPUT_BUTTONS_LOWER
|
||||
# include <nuttx/input/buttons.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPC54_SDMMC
|
||||
# include <nuttx/sdio.h>
|
||||
# include <nuttx/mmcsd.h>
|
||||
# include "lpc54_sdmmc.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTC_DRIVER
|
||||
# include <nuttx/timers/rtc.h>
|
||||
# include "lpc54_rtc.h"
|
||||
#endif
|
||||
|
||||
#include "lpcxpresso-lpc54628.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_bringup
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture-specific initialization
|
||||
*
|
||||
* CONFIG_BOARD_LATE_INITIALIZE=y :
|
||||
* Called from board_late_initialize().
|
||||
*
|
||||
* CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_LIB_BOARDCTL=y :
|
||||
* Called from the NSH library
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int lpc54_bringup(void)
|
||||
{
|
||||
#ifdef HAVE_MMCSD
|
||||
struct sdio_dev_s *sdmmc;
|
||||
#endif
|
||||
#ifdef HAVE_RTC_DRIVER
|
||||
struct rtc_lowerhalf_s *rtc;
|
||||
#endif
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_RTC_DRIVER
|
||||
/* Instantiate the STM32 lower-half RTC driver */
|
||||
|
||||
rtc = lpc54_rtc_lowerhalf();
|
||||
if (rtc == NULL)
|
||||
{
|
||||
syslog(LOG_ERR,
|
||||
"ERROR: Failed to instantiate the RTC lower-half driver\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Bind the lower half driver and register the combined RTC driver
|
||||
* as /dev/rtc0
|
||||
*/
|
||||
|
||||
ret = rtc_initialize(0, rtc);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR,
|
||||
"ERROR: Failed to bind/register the RTC driver: %d\n",
|
||||
ret);
|
||||
}
|
||||
}
|
||||
#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 */
|
||||
|
||||
ret = fb_register(0, 0);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: fb_register() failed: %d\n", ret);
|
||||
}
|
||||
#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 HAVE_MMCSD
|
||||
/* Get an instance of the SDIO interface */
|
||||
|
||||
sdmmc = lpc54_sdmmc_initialize(0);
|
||||
if (!sdmmc)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize SD/MMC\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Dind the SDIO interface to the MMC/SD driver */
|
||||
|
||||
ret = mmcsd_slotinitialize(MMCSD_MINOR, sdmmc);
|
||||
if (ret != OK)
|
||||
{
|
||||
syslog(LOG_ERR,
|
||||
"ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n",
|
||||
ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_INPUT_BUTTONS_LOWER
|
||||
/* Register the BUTTON driver */
|
||||
|
||||
ret = btn_lower_initialize("/dev/buttons");
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: btn_lower_initialize() failed: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
UNUSED(ret);
|
||||
return OK;
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_buttons.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/irq.h>
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
|
||||
#include "lpc54_gpio.h"
|
||||
#include "lpcxpresso-lpc54628.h"
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#ifdef CONFIG_ARCH_BUTTONS
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_LPC54_GPIOIRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
|
||||
static uint8_t g_button_irq;
|
||||
static xcpt_t g_button_handler;
|
||||
static void *g_button_arg;
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_button_interrupt
|
||||
*
|
||||
* Description:
|
||||
* This function intermediates the interrupt provided to the application
|
||||
* logic that attached the interrupt. This is necessary to properly
|
||||
* clear the pending button interrupts.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int board_button_interrupt(int irq, FAR void *context, FAR void *arg)
|
||||
{
|
||||
/* Acknowledge the button interrupt */
|
||||
|
||||
lpc54_gpio_ackedge(irq);
|
||||
|
||||
/* Transfer control to the attached interrupt handler */
|
||||
|
||||
if (g_button_handler != NULL)
|
||||
{
|
||||
return g_button_handler(irq, context, arg);
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_button_initialize
|
||||
*
|
||||
* Description:
|
||||
* board_button_initialize() must be called to initialize button resources.
|
||||
* After that, board_buttons() may be called to collect the current state
|
||||
* of all buttons or board_button_irq() may be called to register button
|
||||
* interrupt handlers.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint32_t board_button_initialize(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Configure the button GPIO interrupt */
|
||||
|
||||
ret = lpc54_gpio_config(GPIO_BUTTON_USER);
|
||||
if (ret >= 0)
|
||||
{
|
||||
#if defined(CONFIG_LPC54_GPIOIRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
|
||||
/* Get the IRQ that is associated with the PIN interrupt and attach the
|
||||
* intermediate button interrupt handler to that interrupt.
|
||||
*/
|
||||
|
||||
g_button_irq = lpc54_gpio_irqno(GPIO_BUTTON_USER);
|
||||
irq_attach(g_button_irq, board_button_interrupt, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
return NUM_BUTTONS;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_buttons
|
||||
*
|
||||
* Description:
|
||||
* After board_button_initialize() has been called, board_buttons() may be
|
||||
* called to collect the state of all buttons. board_buttons() returns an
|
||||
* 32-bit bit set with each bit associated with a button. See the BUTTON*
|
||||
* definitions above for the meaning of each bit in the returned value.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint32_t board_buttons(void)
|
||||
{
|
||||
return lpc54_gpio_read(GPIO_BUTTON_USER) ? 0 : BUTTON_USER_BIT;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_button_irq
|
||||
*
|
||||
* Description:
|
||||
* This function may be called to register an interrupt handler that will
|
||||
* be called when a button is depressed or released. The ID value is one
|
||||
* of the BUTTON* definitions provided above.
|
||||
*
|
||||
* Configuration Notes:
|
||||
* Configuration CONFIG_AVR32_GPIOIRQ must be selected to enable the
|
||||
* overall GPIO IRQ feature and CONFIG_AVR32_GPIOIRQSETA and/or
|
||||
* CONFIG_AVR32_GPIOIRQSETB must be enabled to select GPIOs to support
|
||||
* interrupts on. For button support, bits 2 and 3 must be set in
|
||||
* CONFIG_AVR32_GPIOIRQSETB (PB2 and PB3).
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_LPC54_GPIOIRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
|
||||
if (id == BUTTON_USER)
|
||||
{
|
||||
/* Are we attaching or detaching? */
|
||||
|
||||
if (irqhandler != NULL)
|
||||
{
|
||||
/* Yes.. Attach and enable the interrupt */
|
||||
|
||||
g_button_handler = irqhandler;
|
||||
g_button_arg = arg;
|
||||
up_enable_irq(g_button_irq);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* No.. Disable and detach the interrupt */
|
||||
|
||||
up_disable_irq(g_button_irq);
|
||||
g_button_handler = NULL;
|
||||
g_button_arg = NULL;
|
||||
}
|
||||
|
||||
ret = OK;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_ARCH_BUTTONS */
|
||||
@@ -0,0 +1,233 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_ft5x06.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
#include <nuttx/input/ft5x06.h>
|
||||
|
||||
#include "lpc54_config.h"
|
||||
#include "lpc54_gpio.h"
|
||||
#include "lpcxpresso-lpc54628.h"
|
||||
|
||||
#ifdef HAVE_FT5x06
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define FT5X06_FREQUENCY 400000 /* For now, will boost later */
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Ptototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_FT5X06_POLLMODE
|
||||
static int lpc54_ft5x06_attach(FAR const struct ft5x06_config_s *config,
|
||||
xcpt_t isr, FAR void *arg);
|
||||
static void lpc54_ft5x06_enable(FAR const struct ft5x06_config_s *config,
|
||||
bool enable);
|
||||
static void lpc54_ft5x06_clear(FAR const struct ft5x06_config_s *config);
|
||||
#endif
|
||||
|
||||
static void lpc54_ft5x06_wakeup(FAR const struct ft5x06_config_s *config);
|
||||
static void lpc54_ft5x06_nreset(FAR const struct ft5x06_config_s *config,
|
||||
bool state);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
static const struct ft5x06_config_s g_ft5x06_config =
|
||||
{
|
||||
.address = FT5X06_I2C_ADDRESS,
|
||||
.frequency = FT5X06_FREQUENCY,
|
||||
#ifndef CONFIG_FT5X06_POLLMODE
|
||||
.attach = lpc54_ft5x06_attach,
|
||||
.enable = lpc54_ft5x06_enable,
|
||||
.clear = lpc54_ft5x06_clear,
|
||||
#endif
|
||||
.wakeup = lpc54_ft5x06_wakeup,
|
||||
.nreset = lpc54_ft5x06_nreset
|
||||
};
|
||||
|
||||
#ifndef CONFIG_FT5X06_POLLMODE
|
||||
static uint8_t g_ft5x06_irq;
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_ft5x06_attach
|
||||
*
|
||||
* Description:
|
||||
* Attach an FT5x06 interrupt handler to a GPIO interrupt
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_FT5X06_POLLMODE
|
||||
static int lpc54_ft5x06_attach(FAR const struct ft5x06_config_s *config,
|
||||
xcpt_t isr, FAR void *arg)
|
||||
{
|
||||
return irq_attach(g_ft5x06_irq, isr, arg);
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_ft5x06_enable
|
||||
*
|
||||
* Description:
|
||||
* Enable or disable a GPIO interrupt
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_FT5X06_POLLMODE
|
||||
static void lpc54_ft5x06_enable(FAR const struct ft5x06_config_s *config,
|
||||
bool enable)
|
||||
{
|
||||
if (enable)
|
||||
{
|
||||
up_enable_irq(g_ft5x06_irq);
|
||||
}
|
||||
else
|
||||
{
|
||||
up_disable_irq(g_ft5x06_irq);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_ft5x06_clear
|
||||
*
|
||||
* Description:
|
||||
* Acknowledge/clear any pending GPIO interrupt
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_FT5X06_POLLMODE
|
||||
static void lpc54_ft5x06_clear(FAR const struct ft5x06_config_s *config)
|
||||
{
|
||||
lpc54_gpio_ackedge(g_ft5x06_irq);
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_ft5x06_wakeup
|
||||
*
|
||||
* Description:
|
||||
* Issue WAKE interrupt to FT5x06 to change the FT5x06 from Hibernate to
|
||||
* Active mode.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void lpc54_ft5x06_wakeup(FAR const struct ft5x06_config_s *config)
|
||||
{
|
||||
/* We do not have access to the WAKE pin in the implementation */
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_ft5x06_nreset
|
||||
*
|
||||
* Description:
|
||||
* Control the chip reset pin (active low)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void lpc54_ft5x06_nreset(FAR const struct ft5x06_config_s *config,
|
||||
bool nstate)
|
||||
{
|
||||
lpc54_gpio_write(GPIO_FT5X06_CTRSTN, nstate);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_ft5x06_register
|
||||
*
|
||||
* Description:
|
||||
* Register the FT5x06 touch panel driver
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int lpc54_ft5x06_register(void)
|
||||
{
|
||||
FAR struct i2c_master_s *i2c;
|
||||
int ret;
|
||||
|
||||
#ifndef CONFIG_FT5X06_POLLMODE
|
||||
int irq;
|
||||
|
||||
/* Initialize GPIO pins. NOTE: The nRST pin was already configured during
|
||||
* early LCD initialization. The Part is in reset now.
|
||||
*/
|
||||
|
||||
lpc54_gpio_config(GPIO_FT5X06_INTR);
|
||||
irq = lpc54_gpio_irqno(GPIO_FT5X06_INTR);
|
||||
DEBUGASSERT(irq > 0 && irq < UINT8_MAX);
|
||||
g_ft5x06_irq = (uint8_t)irq;
|
||||
|
||||
/* Make sure that the interrupt is disabled at the NVIC */
|
||||
|
||||
lpc54_gpio_ackedge(irq);
|
||||
up_disable_irq(irq);
|
||||
#endif
|
||||
|
||||
/* Take the FT5x06 out of reset */
|
||||
|
||||
lpc54_gpio_write(GPIO_FT5X06_CTRSTN, true);
|
||||
|
||||
/* The FT5x06 is on I2C2. Get the handle and register the F5x06 device */
|
||||
|
||||
i2c = lpc54_i2c_handle(2, I2C2NDX);
|
||||
if (i2c == NULL)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to get I2C2 interface\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = ft5x06_register(i2c, &g_ft5x06_config, 0);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to register FT5x06 driver: %d\n",
|
||||
ret);
|
||||
|
||||
lpc54_gpio_write(GPIO_FT5X06_CTRSTN, false);
|
||||
lpc54_i2c_free(I2C2NDX);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
#endif /* HAVE_FT5x06*/
|
||||
@@ -0,0 +1,92 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_i2c.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
|
||||
#include "lpc54_config.h"
|
||||
#include "lpc54_i2c_master.h"
|
||||
#include "lpcxpresso-lpc54628.h"
|
||||
|
||||
#if defined(HAVE_I2CTOOL) || defined(HAVE_FT5x06)
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
static FAR struct i2c_master_s *g_i2c_handle[NI2C];
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_i2c_handle
|
||||
*
|
||||
* Description:
|
||||
* Create (or reuse) an I2C handle
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct i2c_master_s *lpc54_i2c_handle(int bus, int ndx)
|
||||
{
|
||||
FAR struct i2c_master_s *i2c = g_i2c_handle[ndx];
|
||||
|
||||
if (i2c == NULL)
|
||||
{
|
||||
i2c = lpc54_i2cbus_initialize(bus);
|
||||
if (i2c == NULL)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to get I2C%d interface\n", bus);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_i2c_handle[ndx] = i2c;
|
||||
}
|
||||
}
|
||||
|
||||
return i2c;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_i2c_free
|
||||
*
|
||||
* Description:
|
||||
* Free an I2C handle created by lpc54_i2c_handle
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void lpc54_i2c_free(int ndx)
|
||||
{
|
||||
if (g_i2c_handle[ndx] != NULL)
|
||||
{
|
||||
lpc54_i2cbus_uninitialize(g_i2c_handle[ndx]);
|
||||
g_i2c_handle[ndx] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* HAVE_I2CTOOL || HAVE_FT5x06*/
|
||||
@@ -0,0 +1,117 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_i2ctool.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
|
||||
#include "lpc54_config.h"
|
||||
#include "lpc54_i2c_master.h"
|
||||
#include "lpcxpresso-lpc54628.h"
|
||||
|
||||
#ifdef HAVE_I2CTOOL
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_i2c_register
|
||||
*
|
||||
* Description:
|
||||
* Register one I2C drivers for the I2C tool.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void lpc54_i2c_register(int bus, int ndx)
|
||||
{
|
||||
FAR struct i2c_master_s *i2c;
|
||||
int ret;
|
||||
|
||||
i2c = lpc54_i2c_handle(bus, ndx);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_i2ctool
|
||||
*
|
||||
* Description:
|
||||
* Register I2C drivers for the I2C tool.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void lpc54_i2ctool(void)
|
||||
{
|
||||
#ifdef CONFIG_LPC54_I2C0_MASTER
|
||||
lpc54_i2c_register(0, I2C0NDX);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C1_MASTER
|
||||
lpc54_i2c_register(1, I2C1NDX);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C2_MASTER
|
||||
lpc54_i2c_register(2, I2C2NDX);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C3_MASTER
|
||||
lpc54_i2c_register(3, I2C3NDX);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C4_MASTER
|
||||
lpc54_i2c_register(4, I2C4NDX);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C5_MASTER
|
||||
lpc54_i2c_register(5, I2C5NDX);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C6_MASTER
|
||||
lpc54_i2c_register(6, I2C6NDX);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C7_MASTER
|
||||
lpc54_i2c_register(7, I2C7NDX);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C8_MASTER
|
||||
lpc54_i2c_register(8, I2C8NDX);
|
||||
#endif
|
||||
#ifdef CONFIG_LPC54_I2C9_MASTER
|
||||
lpc54_i2c_register(9, I2C9NDX);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* HAVE_I2CTOOL */
|
||||
@@ -0,0 +1,74 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_lcd.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "lpc54_lcd.h"
|
||||
#include "lpc54_gpio.h"
|
||||
|
||||
#include "lpcxpresso-lpc54628.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD. Setup backlight (initially off)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void lpc54_lcd_initialize(void)
|
||||
{
|
||||
/* Configure the LCD backlight (and turn the backlight off) */
|
||||
|
||||
lpc54_gpio_config(GPIO_LCD_BL);
|
||||
|
||||
/* Initiale touchscreen controller nRST GPIOs here
|
||||
* (putting it into reset)
|
||||
*/
|
||||
|
||||
lpc54_gpio_config(GPIO_FT5X06_CTRSTN);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_backlight
|
||||
*
|
||||
* Description:
|
||||
* If CONFIG_LPC54_LCD_BACKLIGHT is defined, then the board-specific
|
||||
* logic must provide this interface to turn the backlight on and off.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LPC54_LCD_BACKLIGHT
|
||||
void lpc54_backlight(bool blon)
|
||||
{
|
||||
lpc54_gpio_write(GPIO_LCD_BL, blon); /* High illuminates */
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,147 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_sdram.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include "hardware/lpc54_pinmux.h"
|
||||
#include "lpc54_gpio.h"
|
||||
#include "lpc54_emc.h"
|
||||
#include "lpcxpresso-lpc54628.h"
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#if defined(CONFIG_LPC54_EMC) && defined(CONFIG_LPC54_EMC_DYNAMIC)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define EMC_CLOCK_PERIOD_NS (1000000000 / BOARD_EMC_FREQUENCY)
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/* EMC basic configuration. */
|
||||
|
||||
static const struct emc_config_s g_emc_config =
|
||||
{
|
||||
.bigendian = false, /* Little endian */
|
||||
.clksrc = EMC_INTLOOPBACK, /* Internal loop back from EMC_CLK output */
|
||||
#ifdef BOARD_220MHz
|
||||
.clkdiv = 3, /* EMC Clock = CPU FREQ/3 */
|
||||
#else /* if BOARD_180MHz */
|
||||
.clkdiv = 2, /* EMC Clock = CPU FREQ/2 */
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Pin configuration */
|
||||
|
||||
static const lpc54_pinset_t g_emc_pinset[] =
|
||||
{
|
||||
/* Control signals */
|
||||
|
||||
GPIO_EMC_CASN, GPIO_EMC_RASN, GPIO_EMC_WEN, GPIO_EMC_CLK0,
|
||||
GPIO_EMC_CKE0, GPIO_EMC_DYCSN0, GPIO_EMC_DQM0, GPIO_EMC_DQM1,
|
||||
|
||||
/* Address lines */
|
||||
|
||||
GPIO_EMC_A0, GPIO_EMC_A1, GPIO_EMC_A2, GPIO_EMC_A3, GPIO_EMC_A4,
|
||||
GPIO_EMC_A5, GPIO_EMC_A6, GPIO_EMC_A7, GPIO_EMC_A8, GPIO_EMC_A9,
|
||||
GPIO_EMC_A10, GPIO_EMC_A11, GPIO_EMC_A12, GPIO_EMC_A13, GPIO_EMC_A14,
|
||||
|
||||
/* Data lines */
|
||||
|
||||
GPIO_EMC_D0, GPIO_EMC_D1, GPIO_EMC_D2, GPIO_EMC_D3, GPIO_EMC_D4,
|
||||
GPIO_EMC_D5, GPIO_EMC_D6, GPIO_EMC_D7, GPIO_EMC_D8, GPIO_EMC_D9,
|
||||
GPIO_EMC_D10, GPIO_EMC_D11, GPIO_EMC_D12, GPIO_EMC_D13, GPIO_EMC_D14,
|
||||
GPIO_EMC_D15
|
||||
};
|
||||
|
||||
#define EMC_NPINS (sizeof(g_emc_pinset) / sizeof(lpc54_pinset_t))
|
||||
|
||||
/* Dynamic memory timing configuration. */
|
||||
|
||||
static const struct emc_dynamic_timing_config_s g_emc_dynconfig =
|
||||
{
|
||||
.rdconfig = EMC_CMDDELAY,
|
||||
.refresh = (64 * 1000000 / 4096), /* 4096 rows/ 64ms */
|
||||
.rp = 18,
|
||||
.ras = 42,
|
||||
.srex = 67,
|
||||
.apr = 18,
|
||||
.wr = EMC_CLOCK_PERIOD_NS + 6, /* one clk + 6ns */
|
||||
.dal = EMC_CLOCK_PERIOD_NS + 24,
|
||||
.rc = 60,
|
||||
.rfc = 60,
|
||||
.xsr = 67,
|
||||
.rrd = 12,
|
||||
.mrd = 2,
|
||||
};
|
||||
|
||||
/* Dynamic memory chip specific configuration: Chip 0 - MTL48LC8M16A2B4-6A */
|
||||
|
||||
static const struct emc_dynamic_chip_config_s g_emc_dynchipconfig =
|
||||
{
|
||||
.chndx = 0,
|
||||
.dyndev = EMC_SDRAM,
|
||||
.rasnclk = 2,
|
||||
.mode = 0x23,
|
||||
.extmode = 0, /* SDRAM only */
|
||||
.addrmap = 0x09, /* 128Mbits (8M*16, 4banks, 12 rows, 9 columns) */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_sdram_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize external SDRAM
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void lpc54_sdram_initialize(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* EMC Basic configuration. */
|
||||
|
||||
lpc54_emc_initialize(&g_emc_config);
|
||||
|
||||
/* Configured pins used on the board */
|
||||
|
||||
for (i = 0; i < EMC_NPINS; i++)
|
||||
{
|
||||
lpc54_gpio_config(g_emc_pinset[i]);
|
||||
}
|
||||
|
||||
/* EMC Dynamc memory configuration. */
|
||||
|
||||
lpc54_emc_sdram_initialize(&g_emc_dynconfig, &g_emc_dynchipconfig, 1);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_LPC54_EMC && CONFIG_LPC54_EMC_DYNAMIC */
|
||||
@@ -0,0 +1,97 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_userleds.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* The LPCXpress-LPC54628 has three user LEDs: D9, D11, and D12. These
|
||||
* LEDs are for application use. They are illuminated when the driving
|
||||
* signal from the LPC546xx is low. The LEDs are driven by ports P2-2 (D9),
|
||||
* P3-3 (D11) and P3-14 (D12).
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "lpc54_gpio.h"
|
||||
#include "lpcxpresso-lpc54628.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_userled_initialize
|
||||
****************************************************************************/
|
||||
|
||||
uint32_t board_userled_initialize(void)
|
||||
{
|
||||
#ifndef CONFIG_ARCH_LEDS
|
||||
/* Configure LED GPIOs for output */
|
||||
|
||||
lpc54_gpio_config(GPIO_LED_D9);
|
||||
lpc54_gpio_config(GPIO_LED_D11);
|
||||
lpc54_gpio_config(GPIO_LED_D12);
|
||||
#endif
|
||||
return BOARD_NLEDS;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_userled
|
||||
****************************************************************************/
|
||||
|
||||
void board_userled(int led, bool ledon)
|
||||
{
|
||||
if (led == BOARD_D9)
|
||||
{
|
||||
lpc54_gpio_write(GPIO_LED_D9, !ledon); /* Low illuminates */
|
||||
}
|
||||
else if (led == BOARD_D11)
|
||||
{
|
||||
lpc54_gpio_write(GPIO_LED_D11, !ledon); /* Low illuminates */
|
||||
}
|
||||
#ifndef CONFIG_ARCH_LEDS
|
||||
else if (led == BOARD_D12)
|
||||
{
|
||||
lpc54_gpio_write(GPIO_LED_D12, !ledon); /* Low illuminates */
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_userled_all
|
||||
****************************************************************************/
|
||||
|
||||
void board_userled_all(uint32_t ledset)
|
||||
{
|
||||
/* Low illuminates */
|
||||
|
||||
lpc54_gpio_write(GPIO_LED_D9, (ledset & BOARD_D9_BIT) == 0);
|
||||
lpc54_gpio_write(GPIO_LED_D11, (ledset & BOARD_D11_BIT) == 0);
|
||||
#ifndef CONFIG_ARCH_LEDS
|
||||
lpc54_gpio_write(GPIO_LED_D12, (ledset & BOARD_D12_BIT) == 0);
|
||||
#endif
|
||||
}
|
||||
+389
@@ -0,0 +1,389 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpcxpresso-lpc54628.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_LPC54XX_LPCXPRESSO_LPC54628_SRC_LPCXPRESSO_LPC54628_H
|
||||
#define __BOARDS_ARM_LPC54XX_LPCXPRESSO_LPC54628_SRC_LPCXPRESSO_LPC54628_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
#include "lpc54_config.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define HAVE_I2CTOOL 1
|
||||
#define HAVE_FT5x06 1
|
||||
#define HAVE_MMCSD 1
|
||||
#define HAVE_RTC_DRIVER 1
|
||||
|
||||
/* Do we need to register I2C drivers on behalf of the I2C tool? */
|
||||
|
||||
#ifdef CONFIG_SYSTEM_I2CTOOL
|
||||
|
||||
# ifndef CONFIG_I2C_DRIVER
|
||||
# warning CONFIG_SYSTEM_I2CTOOL requires CONFIG_I2C_DRIVER
|
||||
# undef HAVE_I2CTOOL
|
||||
# endif
|
||||
|
||||
# ifndef HAVE_I2C_MASTER_DEVICE
|
||||
# warning CONFIG_SYSTEM_I2CTOOL requires HAVE_I2C_MASTER_DEVICE
|
||||
# undef HAVE_I2CTOOL
|
||||
# endif
|
||||
|
||||
#else
|
||||
# undef HAVE_I2CTOOL
|
||||
#endif
|
||||
|
||||
/* Do we need to register FT5x06 touch panel driver? */
|
||||
|
||||
#ifdef CONFIG_INPUT_FT5X06
|
||||
|
||||
# ifndef CONFIG_LPC54_I2C2_MASTER
|
||||
# warning CONFIG_INPUT_FT5X06 requires CONFIG_LPC54_I2C2_MASTER
|
||||
# undef HAVE_FT5x06
|
||||
# endif
|
||||
|
||||
# ifndef CONFIG_FT5X06_POLLMODE
|
||||
# warning CONFIG_INPUT_FT5X06 requires CONFIG_FT5X06_POLLMODE
|
||||
# undef HAVE_FT5x06
|
||||
# endif
|
||||
|
||||
#else
|
||||
# undef HAVE_FT5x06
|
||||
#endif
|
||||
|
||||
/* MMC/SD support */
|
||||
|
||||
#ifdef CONFIG_LPC54_SDMMC
|
||||
|
||||
# ifndef CONFIG_MMCSD
|
||||
# warning MMC/SD support requires CONFIG_MMCSD
|
||||
# undef HAVE_MMCSD
|
||||
# endif
|
||||
|
||||
# ifndef CONFIG_MMCSD_SDIO
|
||||
# warning MMC/SD support requires CONFIG_MMCSD_SDIO
|
||||
# undef HAVE_MMCSD
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_DISABLE_MOUNTPOINT
|
||||
# warning MMC/SD cannot be supported with CONFIG_DISABLE_MOUNTPOINT
|
||||
# undef HAVE_MMCSD
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_NSH_MMCSDMINOR
|
||||
# define MMCSD_MINOR CONFIG_NSH_MMCSDMINOR
|
||||
# else
|
||||
# define MMCSD_MINOR 0
|
||||
# endif
|
||||
|
||||
#else
|
||||
# undef HAVE_MMCSD
|
||||
#endif
|
||||
|
||||
/* Check if we can support the RTC driver */
|
||||
|
||||
#if !defined(CONFIG_RTC) || !defined(CONFIG_RTC_DRIVER)
|
||||
# undef HAVE_RTC_DRIVER
|
||||
#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
|
||||
* signal from the LPC546xx is low. The LEDs are driven by ports P2-2 (D9),
|
||||
* P3-3 (D11) and P3-14 (D12).
|
||||
*/
|
||||
|
||||
#define GPIO_LED_D9 \
|
||||
(GPIO_PORT2 | GPIO_PIN2 | GPIO_VALUE_ONE | GPIO_OUTPUT | \
|
||||
GPIO_MODE_DIGITAL | GPIO_FILTER_OFF | GPIO_PUSHPULL | GPIO_PULLUP)
|
||||
|
||||
#define GPIO_LED_D11 \
|
||||
(GPIO_PORT3 | GPIO_PIN3 | GPIO_VALUE_ONE | GPIO_OUTPUT | \
|
||||
GPIO_MODE_DIGITAL | GPIO_FILTER_OFF | GPIO_PUSHPULL | GPIO_PULLUP)
|
||||
|
||||
#define GPIO_LED_D12 \
|
||||
(GPIO_PORT3 | GPIO_PIN14 | GPIO_VALUE_ONE | GPIO_OUTPUT | \
|
||||
GPIO_MODE_DIGITAL | GPIO_FILTER_OFF | GPIO_PUSHPULL | GPIO_PULLUP)
|
||||
|
||||
/* Button definitions *******************************************************/
|
||||
|
||||
/* The LPCXpresso has four switches:
|
||||
*
|
||||
* SW2 ISP2 P0.6
|
||||
* SW3 ISP1 P0.5
|
||||
* SW4 ISP0 P0.4
|
||||
* SW5 User Button P1.1
|
||||
*
|
||||
* In all cased, the signal is low when the button is pressed.
|
||||
*
|
||||
* SW2, SW3, SW4 can be used to force the LPC546xx in to ISP boot modes.
|
||||
* After boot these buttons could be used as user buttons. However, they are
|
||||
* not available when the on-board SRDRAM is used because P0.4, P0.5, and
|
||||
* P0.6 are also used as EMC_D2, EMC_D3, and EMC_D4, respectively.
|
||||
*
|
||||
* So SW5 is really the only button that that is generally available for
|
||||
* software usage. When pressed, it will be sensed low.
|
||||
*
|
||||
* P1.1 is a Type D pin.
|
||||
*/
|
||||
|
||||
#define GPIO_BUTTON_USER \
|
||||
(GPIO_PORT1 | GPIO_PIN1 | GPIO_INTBOTH | GPIO_MODE_DIGITAL | GPIO_FILTER_ON)
|
||||
|
||||
/* LCD/TSC definitions ******************************************************/
|
||||
|
||||
/* The backlight is controlled by P3.31 and is intended to connect via PWM
|
||||
* to control the brightness level. For simplicity here, it configured as a
|
||||
* simple GPIO output.
|
||||
*
|
||||
* The output goes to the enable (EN) pin of a AP5724 step-up DC/DC
|
||||
* converter designed to drive white LEDs with a constant current. A high
|
||||
* input at EN turns the converter on, and a low input turns it off.
|
||||
*/
|
||||
|
||||
#define GPIO_LCD_BL \
|
||||
(GPIO_PORT3 | GPIO_PIN31 | GPIO_VALUE_ZERO | GPIO_OUTPUT | \
|
||||
GPIO_MODE_DIGITAL | GPIO_FILTER_OFF | GPIO_PUSHPULL | GPIO_PULLUP)
|
||||
|
||||
/* The integrated touchscreen uses one GPIO out and one GPIO interrupting
|
||||
* GPIO input:
|
||||
*
|
||||
* 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_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 FT5X06_I2C_ADDRESS 0x38
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_bringup
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture-specific initialization
|
||||
*
|
||||
* CONFIG_BOARD_LATE_INITIALIZE=y :
|
||||
* Called from board_late_initialize().
|
||||
*
|
||||
* CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_LIB_BOARDCTL=y :
|
||||
* Called from the NSH library
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int lpc54_bringup(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_sdram_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize external SDRAM
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LPC54_EMC
|
||||
void lpc54_sdram_initialize(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc54_lcd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the LCD. Setup backlight (initially off)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
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 /* __BOARDS_ARM_LPC54XX_LPCXPRESSO_LPC54628_SRC_LPCXPRESSO_LPC54628_H */
|
||||
Reference in New Issue
Block a user