From cdd9badaff19717b7c247848eae68a9afa104a23 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 31 Dec 2011 20:47:53 +0000 Subject: [PATCH] Fix some issues with LPC1766-STK button support (there are more) git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4245 42af7a65-404d-4744-a932-0658087f49c3 --- configs/olimex-lpc1766stk/README.txt | 9 +++++- configs/olimex-lpc1766stk/ftpc/defconfig | 28 +++++++++++++++++++ configs/olimex-lpc1766stk/hidkbd/defconfig | 28 +++++++++++++++++++ configs/olimex-lpc1766stk/nettest/defconfig | 28 +++++++++++++++++++ configs/olimex-lpc1766stk/nsh/defconfig | 28 +++++++++++++++++++ configs/olimex-lpc1766stk/nx/defconfig | 28 +++++++++++++++++++ configs/olimex-lpc1766stk/ostest/defconfig | 28 +++++++++++++++++++ .../olimex-lpc1766stk/slip-httpd/defconfig | 28 +++++++++++++++++++ configs/olimex-lpc1766stk/src/up_buttons.c | 8 ++++-- configs/olimex-lpc1766stk/thttpd/defconfig | 28 +++++++++++++++++++ configs/olimex-lpc1766stk/usbserial/defconfig | 28 +++++++++++++++++++ .../olimex-lpc1766stk/usbstorage/defconfig | 28 +++++++++++++++++++ 12 files changed, 294 insertions(+), 3 deletions(-) diff --git a/configs/olimex-lpc1766stk/README.txt b/configs/olimex-lpc1766stk/README.txt index 69e77c6718..36c2e2387a 100755 --- a/configs/olimex-lpc1766stk/README.txt +++ b/configs/olimex-lpc1766stk/README.txt @@ -537,11 +537,18 @@ Using OpenOCD and GDB with an FT2232 JTAG emulator arm-elf-gdb (gdb) target remote localhost:3333 - And you can load the NuttX ELF file: + NOTE: The name of your GDB program may differ. For example, with the + CodeSourcery toolchain, the ARM GDB would be called arm-none-eabi-gdb. + + After starting GDB, you can load the NuttX ELF file: (gdb) symbol-file nuttx (gdb) load nuttx + Loading the symbol-file is only useful if you have built NuttX to + inclulde debug symbols (by setting CONFIG_DEBUG_SYMBOLS=y in the + .config file). + OpenOCD will support several special 'monitor' commands. These GDB commands will send comments to the OpenOCD monitor. Here are a couple that you will need to use: diff --git a/configs/olimex-lpc1766stk/ftpc/defconfig b/configs/olimex-lpc1766stk/ftpc/defconfig index 5d01d7e86d..ce92fb24b3 100755 --- a/configs/olimex-lpc1766stk/ftpc/defconfig +++ b/configs/olimex-lpc1766stk/ftpc/defconfig @@ -133,6 +133,12 @@ CONFIG_LPC17_ADC=n CONFIG_LPC17_DAC=n CONFIG_LPC17_GPDMA=n +# +# LPC17xx Button interrupt support +# +CONFIG_GPIO_IRQ=n +CONFIG_ARCH_IRQBUTTONS=n + # # LPC17xx specific serial device driver settings # @@ -876,6 +882,28 @@ CONFIG_EXAMPLES_OSTEST_LOOPS=1 CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048 CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3 +# +# Settings for examples/buttons +# +# CONFIG_EXAMPLE_BUTTONS_MIN and CONFIG_EXAMPLE_BUTTONS_MAX +# Lowest and highest button number (0-7) +# CONFIG_EXAMPLE_IRQBUTTONS_MIN and CONFIG_EXAMPLE_IRQBUTTONS_MAX +# Lowest and highest interrupting button number (-7) +# CONFIG_EXAMPLE_BUTTONS_NAMEn - Name for button n +# +CONFIG_EXAMPLE_BUTTONS_MIN=0 +CONFIG_EXAMPLE_BUTTONS_MAX=7 +CONFIG_EXAMPLE_IRQBUTTONS_MIN=0 +CONFIG_EXAMPLE_IRQBUTTONS_MAX=7 +CONFIG_EXAMPLE_BUTTONS_NAME0="BUT1" +CONFIG_EXAMPLE_BUTTONS_NAME1="BUT2" +CONFIG_EXAMPLE_BUTTONS_NAME2="WAKE-UP" +CONFIG_EXAMPLE_BUTTONS_NAME3="CENTER" +CONFIG_EXAMPLE_BUTTONS_NAME4="UP" +CONFIG_EXAMPLE_BUTTONS_NAME5="DOWN" +CONFIG_EXAMPLE_BUTTONS_NAME6="LEFT" +CONFIG_EXAMPLE_BUTTONS_NAME7="RIGHT" + # # Settings for apps/nshlib # diff --git a/configs/olimex-lpc1766stk/hidkbd/defconfig b/configs/olimex-lpc1766stk/hidkbd/defconfig index 36746d15eb..bdccfa4114 100755 --- a/configs/olimex-lpc1766stk/hidkbd/defconfig +++ b/configs/olimex-lpc1766stk/hidkbd/defconfig @@ -133,6 +133,12 @@ CONFIG_LPC17_ADC=n CONFIG_LPC17_DAC=n CONFIG_LPC17_GPDMA=n +# +# LPC17xx Button interrupt support +# +CONFIG_GPIO_IRQ=n +CONFIG_ARCH_IRQBUTTONS=n + # # LPC17xx specific serial device driver settings # @@ -769,6 +775,28 @@ CONFIG_EXAMPLES_OSTEST_LOOPS=1 CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048 CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3 +# +# Settings for examples/buttons +# +# CONFIG_EXAMPLE_BUTTONS_MIN and CONFIG_EXAMPLE_BUTTONS_MAX +# Lowest and highest button number (0-7) +# CONFIG_EXAMPLE_IRQBUTTONS_MIN and CONFIG_EXAMPLE_IRQBUTTONS_MAX +# Lowest and highest interrupting button number (-7) +# CONFIG_EXAMPLE_BUTTONS_NAMEn - Name for button n +# +CONFIG_EXAMPLE_BUTTONS_MIN=0 +CONFIG_EXAMPLE_BUTTONS_MAX=7 +CONFIG_EXAMPLE_IRQBUTTONS_MIN=0 +CONFIG_EXAMPLE_IRQBUTTONS_MAX=7 +CONFIG_EXAMPLE_BUTTONS_NAME0="BUT1" +CONFIG_EXAMPLE_BUTTONS_NAME1="BUT2" +CONFIG_EXAMPLE_BUTTONS_NAME2="WAKE-UP" +CONFIG_EXAMPLE_BUTTONS_NAME3="CENTER" +CONFIG_EXAMPLE_BUTTONS_NAME4="UP" +CONFIG_EXAMPLE_BUTTONS_NAME5="DOWN" +CONFIG_EXAMPLE_BUTTONS_NAME6="LEFT" +CONFIG_EXAMPLE_BUTTONS_NAME7="RIGHT" + # # Settings for apps/nshlib # diff --git a/configs/olimex-lpc1766stk/nettest/defconfig b/configs/olimex-lpc1766stk/nettest/defconfig index 8f2f02937d..89d1ad54a7 100755 --- a/configs/olimex-lpc1766stk/nettest/defconfig +++ b/configs/olimex-lpc1766stk/nettest/defconfig @@ -133,6 +133,12 @@ CONFIG_LPC17_ADC=n CONFIG_LPC17_DAC=n CONFIG_LPC17_GPDMA=n +# +# LPC17xx Button interrupt support +# +CONFIG_GPIO_IRQ=n +CONFIG_ARCH_IRQBUTTONS=n + # # LPC17xx specific serial device driver settings # @@ -722,6 +728,28 @@ CONFIG_EXAMPLES_OSTEST_LOOPS=1 CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048 CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3 +# +# Settings for examples/buttons +# +# CONFIG_EXAMPLE_BUTTONS_MIN and CONFIG_EXAMPLE_BUTTONS_MAX +# Lowest and highest button number (0-7) +# CONFIG_EXAMPLE_IRQBUTTONS_MIN and CONFIG_EXAMPLE_IRQBUTTONS_MAX +# Lowest and highest interrupting button number (-7) +# CONFIG_EXAMPLE_BUTTONS_NAMEn - Name for button n +# +CONFIG_EXAMPLE_BUTTONS_MIN=0 +CONFIG_EXAMPLE_BUTTONS_MAX=7 +CONFIG_EXAMPLE_IRQBUTTONS_MIN=0 +CONFIG_EXAMPLE_IRQBUTTONS_MAX=7 +CONFIG_EXAMPLE_BUTTONS_NAME0="BUT1" +CONFIG_EXAMPLE_BUTTONS_NAME1="BUT2" +CONFIG_EXAMPLE_BUTTONS_NAME2="WAKE-UP" +CONFIG_EXAMPLE_BUTTONS_NAME3="CENTER" +CONFIG_EXAMPLE_BUTTONS_NAME4="UP" +CONFIG_EXAMPLE_BUTTONS_NAME5="DOWN" +CONFIG_EXAMPLE_BUTTONS_NAME6="LEFT" +CONFIG_EXAMPLE_BUTTONS_NAME7="RIGHT" + # # Settings for apps/nshlib # diff --git a/configs/olimex-lpc1766stk/nsh/defconfig b/configs/olimex-lpc1766stk/nsh/defconfig index ba1e2133ed..0b058f5b99 100755 --- a/configs/olimex-lpc1766stk/nsh/defconfig +++ b/configs/olimex-lpc1766stk/nsh/defconfig @@ -133,6 +133,12 @@ CONFIG_LPC17_ADC=n CONFIG_LPC17_DAC=n CONFIG_LPC17_GPDMA=n +# +# LPC17xx Button interrupt support +# +CONFIG_GPIO_IRQ=n +CONFIG_ARCH_IRQBUTTONS=n + # # LPC17xx specific serial device driver settings # @@ -787,6 +793,28 @@ CONFIG_EXAMPLES_OSTEST_LOOPS=1 CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048 CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3 +# +# Settings for examples/buttons +# +# CONFIG_EXAMPLE_BUTTONS_MIN and CONFIG_EXAMPLE_BUTTONS_MAX +# Lowest and highest button number (0-7) +# CONFIG_EXAMPLE_IRQBUTTONS_MIN and CONFIG_EXAMPLE_IRQBUTTONS_MAX +# Lowest and highest interrupting button number (-7) +# CONFIG_EXAMPLE_BUTTONS_NAMEn - Name for button n +# +CONFIG_EXAMPLE_BUTTONS_MIN=0 +CONFIG_EXAMPLE_BUTTONS_MAX=7 +CONFIG_EXAMPLE_IRQBUTTONS_MIN=0 +CONFIG_EXAMPLE_IRQBUTTONS_MAX=7 +CONFIG_EXAMPLE_BUTTONS_NAME0="BUT1" +CONFIG_EXAMPLE_BUTTONS_NAME1="BUT2" +CONFIG_EXAMPLE_BUTTONS_NAME2="WAKE-UP" +CONFIG_EXAMPLE_BUTTONS_NAME3="CENTER" +CONFIG_EXAMPLE_BUTTONS_NAME4="UP" +CONFIG_EXAMPLE_BUTTONS_NAME5="DOWN" +CONFIG_EXAMPLE_BUTTONS_NAME6="LEFT" +CONFIG_EXAMPLE_BUTTONS_NAME7="RIGHT" + # # Settings for apps/nshlib # diff --git a/configs/olimex-lpc1766stk/nx/defconfig b/configs/olimex-lpc1766stk/nx/defconfig index 309bf31acb..1bfe7e0769 100755 --- a/configs/olimex-lpc1766stk/nx/defconfig +++ b/configs/olimex-lpc1766stk/nx/defconfig @@ -133,6 +133,12 @@ CONFIG_LPC17_ADC=n CONFIG_LPC17_DAC=n CONFIG_LPC17_GPDMA=n +# +# LPC17xx Button interrupt support +# +CONFIG_GPIO_IRQ=n +CONFIG_ARCH_IRQBUTTONS=n + # # LPC17xx specific serial device driver settings # @@ -878,6 +884,28 @@ CONFIG_EXAMPLES_OSTEST_LOOPS=1 CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048 CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3 +# +# Settings for examples/buttons +# +# CONFIG_EXAMPLE_BUTTONS_MIN and CONFIG_EXAMPLE_BUTTONS_MAX +# Lowest and highest button number (0-7) +# CONFIG_EXAMPLE_IRQBUTTONS_MIN and CONFIG_EXAMPLE_IRQBUTTONS_MAX +# Lowest and highest interrupting button number (-7) +# CONFIG_EXAMPLE_BUTTONS_NAMEn - Name for button n +# +CONFIG_EXAMPLE_BUTTONS_MIN=0 +CONFIG_EXAMPLE_BUTTONS_MAX=7 +CONFIG_EXAMPLE_IRQBUTTONS_MIN=0 +CONFIG_EXAMPLE_IRQBUTTONS_MAX=7 +CONFIG_EXAMPLE_BUTTONS_NAME0="BUT1" +CONFIG_EXAMPLE_BUTTONS_NAME1="BUT2" +CONFIG_EXAMPLE_BUTTONS_NAME2="WAKE-UP" +CONFIG_EXAMPLE_BUTTONS_NAME3="CENTER" +CONFIG_EXAMPLE_BUTTONS_NAME4="UP" +CONFIG_EXAMPLE_BUTTONS_NAME5="DOWN" +CONFIG_EXAMPLE_BUTTONS_NAME6="LEFT" +CONFIG_EXAMPLE_BUTTONS_NAME7="RIGHT" + # # Settings for apps/nshlib # diff --git a/configs/olimex-lpc1766stk/ostest/defconfig b/configs/olimex-lpc1766stk/ostest/defconfig index 4f6fc29f08..ba39341000 100755 --- a/configs/olimex-lpc1766stk/ostest/defconfig +++ b/configs/olimex-lpc1766stk/ostest/defconfig @@ -133,6 +133,12 @@ CONFIG_LPC17_ADC=n CONFIG_LPC17_DAC=n CONFIG_LPC17_GPDMA=n +# +# LPC17xx Button interrupt support +# +CONFIG_GPIO_IRQ=n +CONFIG_ARCH_IRQBUTTONS=n + # # LPC17xx specific serial device driver settings # @@ -714,6 +720,28 @@ CONFIG_EXAMPLES_OSTEST_LOOPS=1 CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048 CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3 +# +# Settings for examples/buttons +# +# CONFIG_EXAMPLE_BUTTONS_MIN and CONFIG_EXAMPLE_BUTTONS_MAX +# Lowest and highest button number (0-7) +# CONFIG_EXAMPLE_IRQBUTTONS_MIN and CONFIG_EXAMPLE_IRQBUTTONS_MAX +# Lowest and highest interrupting button number (-7) +# CONFIG_EXAMPLE_BUTTONS_NAMEn - Name for button n +# +CONFIG_EXAMPLE_BUTTONS_MIN=0 +CONFIG_EXAMPLE_BUTTONS_MAX=7 +CONFIG_EXAMPLE_IRQBUTTONS_MIN=0 +CONFIG_EXAMPLE_IRQBUTTONS_MAX=7 +CONFIG_EXAMPLE_BUTTONS_NAME0="BUT1" +CONFIG_EXAMPLE_BUTTONS_NAME1="BUT2" +CONFIG_EXAMPLE_BUTTONS_NAME2="WAKE-UP" +CONFIG_EXAMPLE_BUTTONS_NAME3="CENTER" +CONFIG_EXAMPLE_BUTTONS_NAME4="UP" +CONFIG_EXAMPLE_BUTTONS_NAME5="DOWN" +CONFIG_EXAMPLE_BUTTONS_NAME6="LEFT" +CONFIG_EXAMPLE_BUTTONS_NAME7="RIGHT" + # # Settings for apps/nshlib # diff --git a/configs/olimex-lpc1766stk/slip-httpd/defconfig b/configs/olimex-lpc1766stk/slip-httpd/defconfig index 55aca7aec7..b51be7d2c8 100755 --- a/configs/olimex-lpc1766stk/slip-httpd/defconfig +++ b/configs/olimex-lpc1766stk/slip-httpd/defconfig @@ -133,6 +133,12 @@ CONFIG_LPC17_ADC=n CONFIG_LPC17_DAC=n CONFIG_LPC17_GPDMA=n +# +# LPC17xx Button interrupt support +# +CONFIG_GPIO_IRQ=n +CONFIG_ARCH_IRQBUTTONS=n + # # LPC17xx specific serial device driver settings # @@ -829,6 +835,28 @@ CONFIG_EXAMPLES_OSTEST_LOOPS=1 CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048 CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3 +# +# Settings for examples/buttons +# +# CONFIG_EXAMPLE_BUTTONS_MIN and CONFIG_EXAMPLE_BUTTONS_MAX +# Lowest and highest button number (0-7) +# CONFIG_EXAMPLE_IRQBUTTONS_MIN and CONFIG_EXAMPLE_IRQBUTTONS_MAX +# Lowest and highest interrupting button number (-7) +# CONFIG_EXAMPLE_BUTTONS_NAMEn - Name for button n +# +CONFIG_EXAMPLE_BUTTONS_MIN=0 +CONFIG_EXAMPLE_BUTTONS_MAX=7 +CONFIG_EXAMPLE_IRQBUTTONS_MIN=0 +CONFIG_EXAMPLE_IRQBUTTONS_MAX=7 +CONFIG_EXAMPLE_BUTTONS_NAME0="BUT1" +CONFIG_EXAMPLE_BUTTONS_NAME1="BUT2" +CONFIG_EXAMPLE_BUTTONS_NAME2="WAKE-UP" +CONFIG_EXAMPLE_BUTTONS_NAME3="CENTER" +CONFIG_EXAMPLE_BUTTONS_NAME4="UP" +CONFIG_EXAMPLE_BUTTONS_NAME5="DOWN" +CONFIG_EXAMPLE_BUTTONS_NAME6="LEFT" +CONFIG_EXAMPLE_BUTTONS_NAME7="RIGHT" + # # Settings for apps/nshlib # diff --git a/configs/olimex-lpc1766stk/src/up_buttons.c b/configs/olimex-lpc1766stk/src/up_buttons.c index 611ff56401..a6b73b2844 100644 --- a/configs/olimex-lpc1766stk/src/up_buttons.c +++ b/configs/olimex-lpc1766stk/src/up_buttons.c @@ -40,10 +40,14 @@ #include #include +#include +#include #include #include + +#include "lpc17_internal.h" #include "lpc1766stk_internal.h" #ifdef CONFIG_ARCH_BUTTONS @@ -189,8 +193,8 @@ xcpt_t up_irqbutton(int id, xcpt_t irqhandler) { /* Return the current button handler and set the new interrupt handler */ - oldhandler = g_buttonisr[id]; - g_buttonisr = irqhandler; + oldhandler = g_buttonisr[id]; + g_buttonisr[id] = irqhandler; /* Disable interrupts until we are done */ diff --git a/configs/olimex-lpc1766stk/thttpd/defconfig b/configs/olimex-lpc1766stk/thttpd/defconfig index 61e66a8179..82ed2f8066 100755 --- a/configs/olimex-lpc1766stk/thttpd/defconfig +++ b/configs/olimex-lpc1766stk/thttpd/defconfig @@ -133,6 +133,12 @@ CONFIG_LPC17_ADC=n CONFIG_LPC17_DAC=n CONFIG_LPC17_GPDMA=n +# +# LPC17xx Button interrupt support +# +CONFIG_GPIO_IRQ=n +CONFIG_ARCH_IRQBUTTONS=n + # # LPC17xx specific serial device driver settings # @@ -821,6 +827,28 @@ CONFIG_EXAMPLES_OSTEST_LOOPS=1 CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048 CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3 +# +# Settings for examples/buttons +# +# CONFIG_EXAMPLE_BUTTONS_MIN and CONFIG_EXAMPLE_BUTTONS_MAX +# Lowest and highest button number (0-7) +# CONFIG_EXAMPLE_IRQBUTTONS_MIN and CONFIG_EXAMPLE_IRQBUTTONS_MAX +# Lowest and highest interrupting button number (-7) +# CONFIG_EXAMPLE_BUTTONS_NAMEn - Name for button n +# +CONFIG_EXAMPLE_BUTTONS_MIN=0 +CONFIG_EXAMPLE_BUTTONS_MAX=7 +CONFIG_EXAMPLE_IRQBUTTONS_MIN=0 +CONFIG_EXAMPLE_IRQBUTTONS_MAX=7 +CONFIG_EXAMPLE_BUTTONS_NAME0="BUT1" +CONFIG_EXAMPLE_BUTTONS_NAME1="BUT2" +CONFIG_EXAMPLE_BUTTONS_NAME2="WAKE-UP" +CONFIG_EXAMPLE_BUTTONS_NAME3="CENTER" +CONFIG_EXAMPLE_BUTTONS_NAME4="UP" +CONFIG_EXAMPLE_BUTTONS_NAME5="DOWN" +CONFIG_EXAMPLE_BUTTONS_NAME6="LEFT" +CONFIG_EXAMPLE_BUTTONS_NAME7="RIGHT" + # # Settings for apps/nshlib # diff --git a/configs/olimex-lpc1766stk/usbserial/defconfig b/configs/olimex-lpc1766stk/usbserial/defconfig index cb55b85a32..f7b23816fb 100755 --- a/configs/olimex-lpc1766stk/usbserial/defconfig +++ b/configs/olimex-lpc1766stk/usbserial/defconfig @@ -133,6 +133,12 @@ CONFIG_LPC17_ADC=n CONFIG_LPC17_DAC=n CONFIG_LPC17_GPDMA=n +# +# LPC17xx Button interrupt support +# +CONFIG_GPIO_IRQ=n +CONFIG_ARCH_IRQBUTTONS=n + # # LPC17xx specific serial device driver settings # @@ -714,6 +720,28 @@ CONFIG_EXAMPLES_OSTEST_LOOPS=1 CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048 CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3 +# +# Settings for examples/buttons +# +# CONFIG_EXAMPLE_BUTTONS_MIN and CONFIG_EXAMPLE_BUTTONS_MAX +# Lowest and highest button number (0-7) +# CONFIG_EXAMPLE_IRQBUTTONS_MIN and CONFIG_EXAMPLE_IRQBUTTONS_MAX +# Lowest and highest interrupting button number (-7) +# CONFIG_EXAMPLE_BUTTONS_NAMEn - Name for button n +# +CONFIG_EXAMPLE_BUTTONS_MIN=0 +CONFIG_EXAMPLE_BUTTONS_MAX=7 +CONFIG_EXAMPLE_IRQBUTTONS_MIN=0 +CONFIG_EXAMPLE_IRQBUTTONS_MAX=7 +CONFIG_EXAMPLE_BUTTONS_NAME0="BUT1" +CONFIG_EXAMPLE_BUTTONS_NAME1="BUT2" +CONFIG_EXAMPLE_BUTTONS_NAME2="WAKE-UP" +CONFIG_EXAMPLE_BUTTONS_NAME3="CENTER" +CONFIG_EXAMPLE_BUTTONS_NAME4="UP" +CONFIG_EXAMPLE_BUTTONS_NAME5="DOWN" +CONFIG_EXAMPLE_BUTTONS_NAME6="LEFT" +CONFIG_EXAMPLE_BUTTONS_NAME7="RIGHT" + # # Settings for apps/nshlib # diff --git a/configs/olimex-lpc1766stk/usbstorage/defconfig b/configs/olimex-lpc1766stk/usbstorage/defconfig index 975bddc8aa..e3f2c0d718 100755 --- a/configs/olimex-lpc1766stk/usbstorage/defconfig +++ b/configs/olimex-lpc1766stk/usbstorage/defconfig @@ -133,6 +133,12 @@ CONFIG_LPC17_ADC=n CONFIG_LPC17_DAC=n CONFIG_LPC17_GPDMA=n +# +# LPC17xx Button interrupt support +# +CONFIG_GPIO_IRQ=n +CONFIG_ARCH_IRQBUTTONS=n + # # LPC17xx specific serial device driver settings # @@ -714,6 +720,28 @@ CONFIG_EXAMPLES_OSTEST_LOOPS=1 CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048 CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3 +# +# Settings for examples/buttons +# +# CONFIG_EXAMPLE_BUTTONS_MIN and CONFIG_EXAMPLE_BUTTONS_MAX +# Lowest and highest button number (0-7) +# CONFIG_EXAMPLE_IRQBUTTONS_MIN and CONFIG_EXAMPLE_IRQBUTTONS_MAX +# Lowest and highest interrupting button number (-7) +# CONFIG_EXAMPLE_BUTTONS_NAMEn - Name for button n +# +CONFIG_EXAMPLE_BUTTONS_MIN=0 +CONFIG_EXAMPLE_BUTTONS_MAX=7 +CONFIG_EXAMPLE_IRQBUTTONS_MIN=0 +CONFIG_EXAMPLE_IRQBUTTONS_MAX=7 +CONFIG_EXAMPLE_BUTTONS_NAME0="BUT1" +CONFIG_EXAMPLE_BUTTONS_NAME1="BUT2" +CONFIG_EXAMPLE_BUTTONS_NAME2="WAKE-UP" +CONFIG_EXAMPLE_BUTTONS_NAME3="CENTER" +CONFIG_EXAMPLE_BUTTONS_NAME4="UP" +CONFIG_EXAMPLE_BUTTONS_NAME5="DOWN" +CONFIG_EXAMPLE_BUTTONS_NAME6="LEFT" +CONFIG_EXAMPLE_BUTTONS_NAME7="RIGHT" + # # Settings for apps/nshlib #