Kconfig: Standardize board LED and button configurations

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5112 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2012-09-08 03:31:46 +00:00
parent d2ef49c64e
commit 3eae5ef842
26 changed files with 114 additions and 751 deletions
-6
View File
@@ -216,12 +216,6 @@ config PAGING
If set =y in your configation file, this setting will enable the on-demand If set =y in your configation file, this setting will enable the on-demand
paging feature as described in http://www.nuttx.org/NuttXDemandPaging.html. paging feature as described in http://www.nuttx.org/NuttXDemandPaging.html.
config ARCH_LEDS
bool "Use board LEDs to show state"
default y
---help---
Use LEDs to show state. Unique to boards that have LEDs
config ARCH_INTERRUPTSTACK config ARCH_INTERRUPTSTACK
bool "Use interrupt stack" bool "Use interrupt stack"
default y default y
-6
View File
@@ -27,12 +27,6 @@ config ARCH_CHIP
string string
default "pic32mx" if ARCH_CHIP_PIC32MX default "pic32mx" if ARCH_CHIP_PIC32MX
config ARCH_LEDS
bool "Use board LEDs to show state"
default y
---help---
Use LEDs to show state. Unique to boards that have LEDs
config ARCH_INTERRUPTSTACK config ARCH_INTERRUPTSTACK
bool "Use interrupt stack" bool "Use interrupt stack"
default y default y
+114
View File
@@ -23,6 +23,9 @@ config ARCH_BOARD_AMBER
config ARCH_BOARD_AVR32DEV1 config ARCH_BOARD_AVR32DEV1
bool "Atmel AVR32DEV1 board" bool "Atmel AVR32DEV1 board"
depends on ARCH_CHIP_AT32UC3B0256 depends on ARCH_CHIP_AT32UC3B0256
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help--- ---help---
This is a port of NuttX to the Atmel AVR32DEV1 board. That board is This is a port of NuttX to the Atmel AVR32DEV1 board. That board is
based on the Atmel AT32UC3B0256 MCU and uses a specially patched based on the Atmel AT32UC3B0256 MCU and uses a specially patched
@@ -34,6 +37,7 @@ config ARCH_BOARD_AVR32DEV1
config ARCH_BOARD_C5471EVM config ARCH_BOARD_C5471EVM
bool "Spectrum Digital C5471 evaluation board" bool "Spectrum Digital C5471 evaluation board"
depends on ARCH_CHIP_C5471 depends on ARCH_CHIP_C5471
select ARCH_HAVE_LEDS
---help--- ---help---
This is a port to the Spectrum Digital C5471 evaluation board. The This is a port to the Spectrum Digital C5471 evaluation board. The
TMS320C5471 is a dual core processor from TI with an ARM7TDMI general TMS320C5471 is a dual core processor from TI with an ARM7TDMI general
@@ -62,6 +66,8 @@ config ARCH_BOARD_COMPALE99
config ARCH_BOARD_DEMOS92S12NEC64 config ARCH_BOARD_DEMOS92S12NEC64
bool "Freescale DMO9S12NE64 board" bool "Freescale DMO9S12NE64 board"
depends on ARCH_CHIP_MCS92S12NEC64 depends on ARCH_CHIP_MCS92S12NEC64
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
---help--- ---help---
Freescale DMO9S12NE64 board based on the MC9S12NE64 hcs12 cpu. This Freescale DMO9S12NE64 board based on the MC9S12NE64 hcs12 cpu. This
port uses the m9s12x GCC toolchain. STATUS: (Still) under development; it port uses the m9s12x GCC toolchain. STATUS: (Still) under development; it
@@ -70,6 +76,8 @@ config ARCH_BOARD_DEMOS92S12NEC64
config ARCH_BOARD_EA3131 config ARCH_BOARD_EA3131
bool "Embedded Artists EA3131 Development board" bool "Embedded Artists EA3131 Development board"
depends on ARCH_CHIP_LPC3131 depends on ARCH_CHIP_LPC3131
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
---help--- ---help---
Embedded Artists EA3131 Development board. This board is based on the Embedded Artists EA3131 Development board. This board is based on the
an NXP LPC3131 MCU. This OS is built with the arm-elf toolchain*. an NXP LPC3131 MCU. This OS is built with the arm-elf toolchain*.
@@ -78,6 +86,8 @@ config ARCH_BOARD_EA3131
config ARCH_BOARD_EA3152 config ARCH_BOARD_EA3152
bool "Embedded Artists EA3152 Development board" bool "Embedded Artists EA3152 Development board"
depends on ARCH_CHIP_LPC3152 depends on ARCH_CHIP_LPC3152
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
---help--- ---help---
Embedded Artists EA3152 Development board. This board is based on the Embedded Artists EA3152 Development board. This board is based on the
an NXP LPC3152 MCU. This OS is built with the arm-elf toolchain*. an NXP LPC3152 MCU. This OS is built with the arm-elf toolchain*.
@@ -87,6 +97,7 @@ config ARCH_BOARD_EA3152
config ARCH_BOARD_EAGLE100 config ARCH_BOARD_EAGLE100
bool "Micromint Eagle-100 Development board" bool "Micromint Eagle-100 Development board"
depends on ARCH_CHIP_LM3S6918 depends on ARCH_CHIP_LM3S6918
select ARCH_HAVE_LEDS
---help--- ---help---
Micromint Eagle-100 Development board. This board is based on the Micromint Eagle-100 Development board. This board is based on the
an ARM Cortex-M3 MCU, the Luminary LM3S6918. This OS is built with the an ARM Cortex-M3 MCU, the Luminary LM3S6918. This OS is built with the
@@ -95,6 +106,7 @@ config ARCH_BOARD_EAGLE100
config ARCH_BOARD_EKK_LM3S9B96 config ARCH_BOARD_EKK_LM3S9B96
bool "TI/Stellaris EKK-LM3S9B96" bool "TI/Stellaris EKK-LM3S9B96"
depends on ARCH_CHIP_LM3S9B96 depends on ARCH_CHIP_LM3S9B96
select ARCH_HAVE_LEDS
---help--- ---help---
TI/Stellaris EKK-LM3S9B96 board. This board is based on the TI/Stellaris EKK-LM3S9B96 board. This board is based on the
an EKK-LM3S9B96 which is a Cortex-M3. an EKK-LM3S9B96 which is a Cortex-M3.
@@ -102,6 +114,7 @@ config ARCH_BOARD_EKK_LM3S9B96
config ARCH_BOARD_EZ80F910200KITG config ARCH_BOARD_EZ80F910200KITG
bool "ZiLOG ez80f0910200kitg development kit" bool "ZiLOG ez80f0910200kitg development kit"
depends on ARCH_CHIP_EZ80F91 depends on ARCH_CHIP_EZ80F91
select ARCH_HAVE_LEDS
---help--- ---help---
ez80Acclaim! Microcontroller. This port use the ZiLOG ez80f0910200kitg ez80Acclaim! Microcontroller. This port use the ZiLOG ez80f0910200kitg
development kit, eZ80F091 part, and the Zilog ZDS-II Windows command line development kit, eZ80F091 part, and the Zilog ZDS-II Windows command line
@@ -110,6 +123,8 @@ config ARCH_BOARD_EZ80F910200KITG
config ARCH_BOARD_EZ80F910200ZCO config ARCH_BOARD_EZ80F910200ZCO
bool "ZiLOG ez80f0910200zco development kit" bool "ZiLOG ez80f0910200zco development kit"
depends on ARCH_CHIP_EZ80F91 depends on ARCH_CHIP_EZ80F91
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
---help--- ---help---
ez80Acclaim! Microcontroller. This port use the Zilog ez80f0910200zco ez80Acclaim! Microcontroller. This port use the Zilog ez80f0910200zco
development kit, eZ80F091 part, and the Zilog ZDS-II Windows command line development kit, eZ80F091 part, and the Zilog ZDS-II Windows command line
@@ -118,6 +133,9 @@ config ARCH_BOARD_EZ80F910200ZCO
config ARCH_BOARD_HYMINI_STM32V config ARCH_BOARD_HYMINI_STM32V
bool "HY-Mini STM32v board" bool "HY-Mini STM32v board"
depends on ARCH_CHIP_STM32F103VCT depends on ARCH_CHIP_STM32F103VCT
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help--- ---help---
A configuration for the HY-Mini STM32v board. This board is based on the A configuration for the HY-Mini STM32v board. This board is based on the
STM32F103VCT chip. STM32F103VCT chip.
@@ -125,12 +143,18 @@ config ARCH_BOARD_HYMINI_STM32V
config ARCH_BOARD_LINCOLN60 config ARCH_BOARD_LINCOLN60
bool "Micromint Lincoln 60 board" bool "Micromint Lincoln 60 board"
depends on ARCH_CHIP_LPC1769 depends on ARCH_CHIP_LPC1769
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help--- ---help---
Micromint Lincoln 60 board using the NXP LPC1769 MCU. Micromint Lincoln 60 board using the NXP LPC1769 MCU.
config ARCH_BOARD_KWIKSTIK_K40 config ARCH_BOARD_KWIKSTIK_K40
bool "FreeScale KwikStik-K40 development board" bool "FreeScale KwikStik-K40 development board"
depends on ARCH_CHIP_MK40X256VLQ100 depends on ARCH_CHIP_MK40X256VLQ100
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help--- ---help---
Kinetis K40 Cortex-M4 MCU. This port uses the FreeScale KwikStik-K40 Kinetis K40 Cortex-M4 MCU. This port uses the FreeScale KwikStik-K40
development board. development board.
@@ -138,6 +162,7 @@ config ARCH_BOARD_KWIKSTIK_K40
config ARCH_BOARD_LM3S6432S2E config ARCH_BOARD_LM3S6432S2E
bool "Stellaris RDK-S2E Reference Design Kit" bool "Stellaris RDK-S2E Reference Design Kit"
depends on ARCH_CHIP_LM3S6432 depends on ARCH_CHIP_LM3S6432
select ARCH_HAVE_LEDS
---help--- ---help---
Stellaris RDK-S2E Reference Design Kit and the MDL-S2E Ethernet to Stellaris RDK-S2E Reference Design Kit and the MDL-S2E Ethernet to
Serial module. Serial module.
@@ -145,6 +170,7 @@ config ARCH_BOARD_LM3S6432S2E
config ARCH_BOARD_LM3S6965EK config ARCH_BOARD_LM3S6965EK
bool "Stellaris LM3S6965 Evaluation Kit" bool "Stellaris LM3S6965 Evaluation Kit"
depends on ARCH_CHIP_LM3S6965 depends on ARCH_CHIP_LM3S6965
select ARCH_HAVE_LEDS
---help--- ---help---
Stellaris LM3S6965 Evaluation Kit. This board is based on the Stellaris LM3S6965 Evaluation Kit. This board is based on the
an ARM Cortex-M3 MCU, the Luminary/TI LM3S6965. This OS is built with the an ARM Cortex-M3 MCU, the Luminary/TI LM3S6965. This OS is built with the
@@ -153,6 +179,7 @@ config ARCH_BOARD_LM3S6965EK
config ARCH_BOARD_LM3S8962EK config ARCH_BOARD_LM3S8962EK
bool "Stellaris LMS38962 Evaluation Kit" bool "Stellaris LMS38962 Evaluation Kit"
depends on ARCH_CHIP_LM3S8962 depends on ARCH_CHIP_LM3S8962
select ARCH_HAVE_LEDS
---help--- ---help---
Stellaris LMS38962 Evaluation Kit. Stellaris LMS38962 Evaluation Kit.
@@ -166,6 +193,9 @@ config ARCH_BOARD_LPCXPRESSO
config ARCH_BOARD_LPC4330_XPLORER config ARCH_BOARD_LPC4330_XPLORER
bool "NXG LPC4330-Xplorer" bool "NXG LPC4330-Xplorer"
depends on ARCH_CHIP_LPC4330FET100 depends on ARCH_CHIP_LPC4330FET100
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help--- ---help---
NXG Technologoies LPC4330 Xplorer board. This board is based on the NXG Technologoies LPC4330 Xplorer board. This board is based on the
LPC4330FET100. The Code Red toolchain is used by default. LPC4330FET100. The Code Red toolchain is used by default.
@@ -181,6 +211,7 @@ config ARCH_BOARD_M68332EVB
config ARCH_BOARD_MBED config ARCH_BOARD_MBED
bool "mbed LCP1768" bool "mbed LCP1768"
depends on ARCH_CHIP_LPC1768 depends on ARCH_CHIP_LPC1768
select ARCH_HAVE_LEDS
---help--- ---help---
The configurations in this directory support the mbed board (http://mbed.org) The configurations in this directory support the mbed board (http://mbed.org)
that features the NXP LPC1768 microcontroller. This OS is also built that features the NXP LPC1768 microcontroller. This OS is also built
@@ -189,6 +220,7 @@ config ARCH_BOARD_MBED
config ARCH_BOARD_MCU123 config ARCH_BOARD_MCU123
bool "mcu123.com LPC2148 Development Board" bool "mcu123.com LPC2148 Development Board"
depends on ARCH_CHIP_LPC2148 depends on ARCH_CHIP_LPC2148
select ARCH_HAVE_LEDS
---help--- ---help---
This port is for the NXP LPC2148 as provided on the mcu123.com This port is for the NXP LPC2148 as provided on the mcu123.com
lpc214x development board. This OS is also built with the arm-elf lpc214x development board. This OS is also built with the arm-elf
@@ -205,6 +237,7 @@ config ARCH_BOARD_MICROPENDOUS3
config ARCH_BOARD_MX1ADS config ARCH_BOARD_MX1ADS
bool "Motorola MX1ADS development board" bool "Motorola MX1ADS development board"
depends on ARCH_CHIP_IMX1 depends on ARCH_CHIP_IMX1
select ARCH_HAVE_LEDS
---help--- ---help---
This is a port to the Motorola MX1ADS development board. That board This is a port to the Motorola MX1ADS development board. That board
is based on the Freescale i.MX1 processor. The i.MX1 is an ARM920T. is based on the Freescale i.MX1 processor. The i.MX1 is an ARM920T.
@@ -214,6 +247,8 @@ config ARCH_BOARD_MX1ADS
config ARCH_BOARD_NE64BADGE config ARCH_BOARD_NE64BADGE
bool "FEG NE64 /PoE Badge board" bool "FEG NE64 /PoE Badge board"
depends on ARCH_CHIP_MCS92S12NEC64 depends on ARCH_CHIP_MCS92S12NEC64
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
---help--- ---help---
Future Electronics Group NE64 /PoE Badge board based on the Future Electronics Group NE64 /PoE Badge board based on the
MC9S12NE64 hcs12 cpu. This port uses the m9s12x GCC toolchain. MC9S12NE64 hcs12 cpu. This port uses the m9s12x GCC toolchain.
@@ -223,6 +258,7 @@ config ARCH_BOARD_NE64BADGE
config ARCH_BOARD_NTOSD_DM320 config ARCH_BOARD_NTOSD_DM320
bool "Neuros OSD v1.0 Dev Board" bool "Neuros OSD v1.0 Dev Board"
depends on ARCH_CHIP_DM320 depends on ARCH_CHIP_DM320
select ARCH_HAVE_LEDS
---help--- ---help---
This port uses the Neuros OSD v1.0 Dev Board with a GNU arm-elf This port uses the Neuros OSD v1.0 Dev Board with a GNU arm-elf
toolchain*: see toolchain*: see
@@ -241,6 +277,7 @@ config ARCH_BOARD_NTOSD_DM320
config ARCH_BOARD_NUCLEUS2G config ARCH_BOARD_NUCLEUS2G
bool "Nucleus 2G board" bool "Nucleus 2G board"
depends on ARCH_CHIP_LPC1768 depends on ARCH_CHIP_LPC1768
select ARCH_HAVE_LEDS
---help--- ---help---
This port uses the Nucleus 2G board (with Babel CAN board). This board This port uses the Nucleus 2G board (with Babel CAN board). This board
features an NXP LPC1768 processor. See the 2G website (http://www.2g-eng.com/) features an NXP LPC1768 processor. See the 2G website (http://www.2g-eng.com/)
@@ -249,6 +286,9 @@ config ARCH_BOARD_NUCLEUS2G
config ARCH_BOARD_LPC1766STK config ARCH_BOARD_LPC1766STK
bool "Olimex LPC1766-STK board" bool "Olimex LPC1766-STK board"
depends on ARCH_CHIP_LPC1766 depends on ARCH_CHIP_LPC1766
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help--- ---help---
This port uses the Olimex LPC1766-STK board and a GNU GCC toolchain* under This port uses the Olimex LPC1766-STK board and a GNU GCC toolchain* under
Linux or Cygwin. STATUS: Complete and mature. Linux or Cygwin. STATUS: Complete and mature.
@@ -256,6 +296,7 @@ config ARCH_BOARD_LPC1766STK
config ARCH_BOARD_MIRTOO config ARCH_BOARD_MIRTOO
bool "Mirtoo PIC32 Module from Dimitech" bool "Mirtoo PIC32 Module from Dimitech"
depends on ARCH_CHIP_PIC32MX250F128D depends on ARCH_CHIP_PIC32MX250F128D
select ARCH_HAVE_LEDS
---help--- ---help---
This is the port to the DTX1-4000L "Mirtoo" module. This module uses MicroChip This is the port to the DTX1-4000L "Mirtoo" module. This module uses MicroChip
PIC32MX250F128D. See http://www.dimitech.com/ for further information. PIC32MX250F128D. See http://www.dimitech.com/ for further information.
@@ -263,6 +304,7 @@ config ARCH_BOARD_MIRTOO
config ARCH_BOARD_OLIMEXLPC2378 config ARCH_BOARD_OLIMEXLPC2378
bool "Olimex-lpc2378 board" bool "Olimex-lpc2378 board"
depends on ARCH_CHIP_LPC2378 depends on ARCH_CHIP_LPC2378
select ARCH_HAVE_LEDS
---help--- ---help---
This port uses the Olimex-lpc2378 board and a GNU arm-elf toolchain* under This port uses the Olimex-lpc2378 board and a GNU arm-elf toolchain* under
Linux or Cygwin. STATUS: ostest and NSH configurations available. Linux or Cygwin. STATUS: ostest and NSH configurations available.
@@ -271,6 +313,8 @@ config ARCH_BOARD_OLIMEXLPC2378
config ARCH_BOARD_OLIMEX_STRP711 config ARCH_BOARD_OLIMEX_STRP711
bool "Olimex STR-P711 board" bool "Olimex STR-P711 board"
depends on ARCH_CHIP_STR71X depends on ARCH_CHIP_STR71X
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
---help--- ---help---
This port uses the Olimex STR-P711 board and a GNU arm-elf toolchain* under This port uses the Olimex STR-P711 board and a GNU arm-elf toolchain* under
Linux or Cygwin. See the http://www.olimex.com/dev/str-p711.html" for Linux or Cygwin. See the http://www.olimex.com/dev/str-p711.html" for
@@ -299,6 +343,7 @@ config ARCH_BOARD_PCBLOGICPIC32MX
config ARCH_BOARD_PIC32_STARTERKIT config ARCH_BOARD_PIC32_STARTERKIT
bool "Microchip PIC32 Ethernet Starter Kit (DM320004)" bool "Microchip PIC32 Ethernet Starter Kit (DM320004)"
depends on ARCH_CHIP_PIC32MX795F512L depends on ARCH_CHIP_PIC32MX795F512L
select ARCH_HAVE_LEDS
---help--- ---help---
This is the port of NuttX to the Microchip PIC32 Ethernet Starter Kit This is the port of NuttX to the Microchip PIC32 Ethernet Starter Kit
(DM320004) with the Multimedia Expansion Board (MEB, DM320005). (DM320004) with the Multimedia Expansion Board (MEB, DM320005).
@@ -307,6 +352,7 @@ config ARCH_BOARD_PIC32_STARTERKIT
config ARCH_BOARD_PIC32_PIC32MX7MMB config ARCH_BOARD_PIC32_PIC32MX7MMB
bool "Mikroelektronika PIC32MX7 MMB" bool "Mikroelektronika PIC32MX7 MMB"
depends on ARCH_CHIP_PIC32MX795F512L depends on ARCH_CHIP_PIC32MX795F512L
select ARCH_HAVE_LEDS
---help--- ---help---
This is the port NuttX to the Mikroelektronika PIC32MX7 Multimedia Board This is the port NuttX to the Mikroelektronika PIC32MX7 Multimedia Board
(MMB). See http://www.mikroe.com/ for further information. (MMB). See http://www.mikroe.com/ for further information.
@@ -314,6 +360,7 @@ config ARCH_BOARD_PIC32_PIC32MX7MMB
config ARCH_BOARD_PJRC_87C52 config ARCH_BOARD_PJRC_87C52
bool "PJRC 87C52 development system" bool "PJRC 87C52 development system"
depends on ARCH_CHIP_8052 depends on ARCH_CHIP_8052
select ARCH_HAVE_LEDS
---help--- ---help---
8051 Microcontroller. This port uses the PJRC 87C52 development system 8051 Microcontroller. This port uses the PJRC 87C52 development system
and the SDCC toolchain. This port is not quite ready for prime time. and the SDCC toolchain. This port is not quite ready for prime time.
@@ -341,12 +388,18 @@ config ARCH_BOARD_RGMP
config ARCH_BOARD_SAM3UEK config ARCH_BOARD_SAM3UEK
bool "Atmel SAM3U-EK development board" bool "Atmel SAM3U-EK development board"
depends on ARCH_CHIP_AT91SAM3U4E depends on ARCH_CHIP_AT91SAM3U4E
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help--- ---help---
The port of NuttX to the Atmel SAM3U-EK development board. The port of NuttX to the Atmel SAM3U-EK development board.
config ARCH_BOARD_SHENZHOU config ARCH_BOARD_SHENZHOU
bool "Shenzhou STM32F107 board" bool "Shenzhou STM32F107 board"
depends on ARCH_CHIP_STM32F107VC depends on ARCH_CHIP_STM32F107VC
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help--- ---help---
This port uses the Shenzhou STM32 F107 board and a GNU arm-elf toolchain* under This port uses the Shenzhou STM32 F107 board and a GNU arm-elf toolchain* under
Linux or Cygwin. See the http://www.armjishu.com for further information. This Linux or Cygwin. See the http://www.armjishu.com for further information. This
@@ -355,6 +408,8 @@ config ARCH_BOARD_SHENZHOU
config ARCH_BOARD_SKP16C26 config ARCH_BOARD_SKP16C26
bool "Renesas SKP16C26 StarterKit" bool "Renesas SKP16C26 StarterKit"
depends on ARCH_CHIP_M30262F8 depends on ARCH_CHIP_M30262F8
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
---help--- ---help---
Renesas M16C processor on the Renesas SKP16C26 StarterKit. This port Renesas M16C processor on the Renesas SKP16C26 StarterKit. This port
uses the GNU m32c toolchain. STATUS: The port is complete but untested uses the GNU m32c toolchain. STATUS: The port is complete but untested
@@ -363,6 +418,9 @@ config ARCH_BOARD_SKP16C26
config ARCH_BOARD_STM3210E_EVAL config ARCH_BOARD_STM3210E_EVAL
bool "STMicro STM3210E-EVAL development board" bool "STMicro STM3210E-EVAL development board"
depends on ARCH_CHIP_STM32F103ZET6 depends on ARCH_CHIP_STM32F103ZET6
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help--- ---help---
STMicro STM3210E-EVAL development board based on the STMicro STM32F103ZET6 STMicro STM3210E-EVAL development board based on the STMicro STM32F103ZET6
microcontroller (ARM Cortex-M3). This port uses the GNU Cortex-M3 microcontroller (ARM Cortex-M3). This port uses the GNU Cortex-M3
@@ -371,6 +429,9 @@ config ARCH_BOARD_STM3210E_EVAL
config ARCH_BOARD_STM3220G_EVAL config ARCH_BOARD_STM3220G_EVAL
bool "STMicro STM3220G-EVAL development board" bool "STMicro STM3220G-EVAL development board"
depends on ARCH_CHIP_STM32F207IG depends on ARCH_CHIP_STM32F207IG
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help--- ---help---
STMicro STM3220G-EVAL development board based on the STMicro STM32F407IG STMicro STM3220G-EVAL development board based on the STMicro STM32F407IG
microcontroller (ARM Cortex-M3). microcontroller (ARM Cortex-M3).
@@ -378,6 +439,9 @@ config ARCH_BOARD_STM3220G_EVAL
config ARCH_BOARD_STM3240G_EVAL config ARCH_BOARD_STM3240G_EVAL
bool "STMicro STM3240G-EVAL development board" bool "STMicro STM3240G-EVAL development board"
depends on ARCH_CHIP_STM32F407IG depends on ARCH_CHIP_STM32F407IG
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help--- ---help---
STMicro STM3240G-EVAL development board based on the STMicro STM32F103ZET6 STMicro STM3240G-EVAL development board based on the STMicro STM32F103ZET6
microcontroller (ARM Cortex-M4 with FPU). This port uses a GNU Cortex-M4 microcontroller (ARM Cortex-M4 with FPU). This port uses a GNU Cortex-M4
@@ -386,12 +450,18 @@ config ARCH_BOARD_STM3240G_EVAL
config ARCH_BOARD_STM32F4_DISCOVERY config ARCH_BOARD_STM32F4_DISCOVERY
bool "STMicro STM32F4-Discovery board" bool "STMicro STM32F4-Discovery board"
depends on ARCH_CHIP_STM32F407VG depends on ARCH_CHIP_STM32F407VG
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help--- ---help---
STMicro STM32F4-Discovery board boased on the STMIcro STM32F407VGT6 MCU. STMicro STM32F4-Discovery board boased on the STMIcro STM32F407VGT6 MCU.
config ARCH_BOARD_SUREPIC32MX config ARCH_BOARD_SUREPIC32MX
bool "Sure PIC32MX boards" bool "Sure PIC32MX boards"
depends on ARCH_CHIP_PIC32MX440F512H depends on ARCH_CHIP_PIC32MX440F512H
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help--- ---help---
The "Advanced USB Storage Demo Board," Model DB-DP11215, from Sure The "Advanced USB Storage Demo Board," Model DB-DP11215, from Sure
Electronics (http://www.sureelectronics.net/). This board features Electronics (http://www.sureelectronics.net/). This board features
@@ -402,6 +472,7 @@ config ARCH_BOARD_SUREPIC32MX
config ARCH_BOARD_TEENSY config ARCH_BOARD_TEENSY
bool "PJRC Teensy++ 2.0 board" bool "PJRC Teensy++ 2.0 board"
depends on ARCH_CHIP_AT90USB1286 depends on ARCH_CHIP_AT90USB1286
select ARCH_HAVE_LEDS
---help--- ---help---
This is the port of NuttX to the PJRC Teensy++ 2.0 board. This board is This is the port of NuttX to the PJRC Teensy++ 2.0 board. This board is
developed by http://pjrc.com/teensy/. The Teensy++ 2.0 is based developed by http://pjrc.com/teensy/. The Teensy++ 2.0 is based
@@ -410,6 +481,9 @@ config ARCH_BOARD_TEENSY
config ARCH_BOARD_TWR_K60N512 config ARCH_BOARD_TWR_K60N512
bool "FreeScale TWR-K60N512d evelopment board" bool "FreeScale TWR-K60N512d evelopment board"
depends on ARCH_CHIP_MK60N512VMD100 depends on ARCH_CHIP_MK60N512VMD100
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help--- ---help---
Kinetis K60 Cortex-M4 MCU. This port uses the FreeScale TWR-K60N512 Kinetis K60 Cortex-M4 MCU. This port uses the FreeScale TWR-K60N512
development board. development board.
@@ -417,6 +491,9 @@ config ARCH_BOARD_TWR_K60N512
config ARCH_BOARD_UBW32 config ARCH_BOARD_UBW32
bool "UBW32 v2.4 board from Sparkfun" bool "UBW32 v2.4 board from Sparkfun"
depends on ARCH_CHIP_PIC32MX460F512L depends on ARCH_CHIP_PIC32MX460F512L
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
select ARCH_HAVE_IRQBUTTONS
---help--- ---help---
This is the port to the Sparkfun UBW32 board. This port uses the original v2.4 This is the port to the Sparkfun UBW32 board. This port uses the original v2.4
board which is based on the MicroChip PIC32MX460F512L. See board which is based on the MicroChip PIC32MX460F512L. See
@@ -427,6 +504,7 @@ config ARCH_BOARD_UBW32
config ARCH_BOARD_US7032EVB1 config ARCH_BOARD_US7032EVB1
bool "Hitachi SH-1/US7032EVB1 board" bool "Hitachi SH-1/US7032EVB1 board"
depends on ARCH_CHIP_SH7032 depends on ARCH_CHIP_SH7032
select ARCH_HAVE_LEDS
---help--- ---help---
This is a port of the Hitachi SH-1 on the Hitachi SH-1/US7032EVB1 board. This is a port of the Hitachi SH-1 on the Hitachi SH-1/US7032EVB1 board.
STATUS: Work has just began on this port. STATUS: Work has just began on this port.
@@ -434,6 +512,8 @@ config ARCH_BOARD_US7032EVB1
config ARCH_BOARD_VSN config ARCH_BOARD_VSN
bool "SOTEL NetClamps VSN sensor network platform" bool "SOTEL NetClamps VSN sensor network platform"
depends on ARCH_CHIP_STM32F103RET6 depends on ARCH_CHIP_STM32F103RET6
select ARCH_HAVE_LEDS
select ARCH_HAVE_BUTTONS
---help--- ---help---
ISOTEL NetClamps VSN V1.2 ready2go sensor network platform based on the ISOTEL NetClamps VSN V1.2 ready2go sensor network platform based on the
STMicro STM32F103RET6. Contributed by Uros Platise. See STMicro STM32F103RET6. Contributed by Uros Platise. See
@@ -450,6 +530,7 @@ config ARCH_BOARD_XTRS
config ARCH_BOARD_Z16F2800100ZCOG config ARCH_BOARD_Z16F2800100ZCOG
bool "Zilog Z16F2800100ZCOG Development Kit" bool "Zilog Z16F2800100ZCOG Development Kit"
depends on ARCH_CHIP_Z16F281 depends on ARCH_CHIP_Z16F281
select ARCH_HAVE_LEDS
---help--- ---help---
z16f Microcontroller. This port use the ZiLIG z16f2800100zcog z16f Microcontroller. This port use the ZiLIG z16f2800100zcog
development kit and the Zilog ZDS-II Windows command line tools. The development kit and the Zilog ZDS-II Windows command line tools. The
@@ -468,6 +549,7 @@ config ARCH_BOARD_Z80SIM
config ARCH_BOARD_Z8ENCORE000ZCO config ARCH_BOARD_Z8ENCORE000ZCO
bool "ZiLOG z8encore000zco Development Kit" bool "ZiLOG z8encore000zco Development Kit"
depends on ARCH_CHIP_Z8F6403 depends on ARCH_CHIP_Z8F6403
select ARCH_HAVE_LEDS
---help--- ---help---
z8Encore! Microcontroller. This port use the ZiLOG z8encore000zco z8Encore! Microcontroller. This port use the ZiLOG z8encore000zco
development kit, Z8F6403 part, and the Zilog ZDS-II Windows command line development kit, Z8F6403 part, and the Zilog ZDS-II Windows command line
@@ -476,6 +558,7 @@ config ARCH_BOARD_Z8ENCORE000ZCO
config ARCH_BOARD_Z8F64200100KI config ARCH_BOARD_Z8F64200100KI
bool "ZiLOG Z8F64200100KIT Development Kit" bool "ZiLOG Z8F64200100KIT Development Kit"
depends on ARCH_CHIP_Z8F642X depends on ARCH_CHIP_Z8F642X
select ARCH_HAVE_LEDS
---help--- ---help---
z8Encore! Microcontroller. This port use the Zilog z8f64200100kit z8Encore! Microcontroller. This port use the Zilog z8f64200100kit
development kit, Z8F6423 part, and the Zilog ZDS-II Windows command line development kit, Z8F6423 part, and the Zilog ZDS-II Windows command line
@@ -562,6 +645,37 @@ config ARCH_BOARD
default "sim" if ARCH_BOARD_SIM default "sim" if ARCH_BOARD_SIM
default "" if ARCH_BOARD_CUSTOM default "" if ARCH_BOARD_CUSTOM
comment "Common Board Options"
config ARCH_HAVE_LEDS
bool
config ARCH_LEDS
bool "Board LEDs support"
default y
depends on ARCH_HAVE_LEDS
---help---
Use board LEDs to show NuttX execution status state. Unique to boards that have LEDs
config ARCH_HAVE_BUTTONS
bool
config ARCH_BUTTONS
bool "Board button support"
default n
depends on ARCH_HAVE_BUTTONS
---help---
"Support interfaces to use buttons provided by the board."
config ARCH_IRQBUTTONS
bool "Button interrupt support"
default n
depends on ARCH_BUTTONS && ARCH_HAVE_IRQBUTTONS
---help---
"Support interrupts on button presses and releases."
comment "Board-Specific Options"
if ARCH_BOARD_AMBER if ARCH_BOARD_AMBER
source "configs/amber/Kconfig" source "configs/amber/Kconfig"
endif endif
-19
View File
@@ -4,24 +4,5 @@
# #
if ARCH_BOARD_AVR32DEV1 if ARCH_BOARD_AVR32DEV1
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
config ARCH_IRQBUTTONS
bool "Button interrupt support"
default n
depends on ARCH_BUTTONS
---help---
"Support interrupts on button presses and releases."
endif endif
-12
View File
@@ -4,17 +4,5 @@
# #
if ARCH_BOARD_DEMOS92S12NEC64 if ARCH_BOARD_DEMOS92S12NEC64
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
endif endif
-12
View File
@@ -4,16 +4,4 @@
# #
if ARCH_BOARD_EA3131 if ARCH_BOARD_EA3131
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
endif endif
-12
View File
@@ -4,16 +4,4 @@
# #
if ARCH_BOARD_EA3152 if ARCH_BOARD_EA3152
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
endif endif
-19
View File
@@ -4,23 +4,4 @@
# #
if ARCH_BOARD_HYMINI_STM32V if ARCH_BOARD_HYMINI_STM32V
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
config ARCH_IRQBUTTONS
bool "Button interrupt support"
default n
depends on ARCH_BUTTONS
---help---
"Support EXTI interrupts on button presses and releases."
endif endif
-12
View File
@@ -4,16 +4,4 @@
# #
if ARCH_BOARD_KWIKSTIK_K40 if ARCH_BOARD_KWIKSTIK_K40
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
endif endif
-12
View File
@@ -4,16 +4,4 @@
# #
if ARCH_BOARD_LINCOLN60 if ARCH_BOARD_LINCOLN60
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
endif endif
-12
View File
@@ -4,16 +4,4 @@
# #
if ARCH_BOARD_LPC4330_XPLORER if ARCH_BOARD_LPC4330_XPLORER
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
endif endif
-12
View File
@@ -4,16 +4,4 @@
# #
if ARCH_BOARD_NE64BADGE if ARCH_BOARD_NE64BADGE
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
endif endif
-19
View File
@@ -4,23 +4,4 @@
# #
if ARCH_BOARD_LPC1766STK if ARCH_BOARD_LPC1766STK
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
config ARCH_IRQBUTTONS
bool "Button interrupt support"
default n
depends on ARCH_BUTTONS
---help---
"Support interrupts on button presses and releases."
endif endif
-12
View File
@@ -4,16 +4,4 @@
# #
if ARCH_BOARD_OLIMEX_STM32P107 if ARCH_BOARD_OLIMEX_STM32P107
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
endif endif
-12
View File
@@ -4,16 +4,4 @@
# #
if ARCH_BOARD_OLIMEX_STRP711 if ARCH_BOARD_OLIMEX_STRP711
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
endif endif
-19
View File
@@ -4,23 +4,4 @@
# #
if ARCH_BOARD_SAM3UEK if ARCH_BOARD_SAM3UEK
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
config ARCH_IRQBUTTONS
bool "Button interrupt support"
default n
depends on ARCH_BUTTONS
---help---
"Support interrupts on button presses and releases."
endif endif
-12
View File
@@ -4,16 +4,4 @@
# #
if ARCH_BOARD_SHENZHOU if ARCH_BOARD_SHENZHOU
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
endif endif
-401
View File
@@ -1,401 +0,0 @@
/****************************************************************************
* configs/shenzhou/src/up_leds.c
* arch/arm/src/board/up_leds.c
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdint.h>
#include <stdbool.h>
#include <debug.h>
#include <arch/board/board.h>
#include <nuttx/power/pm.h>
#include "chip.h"
#include "up_arch.h"
#include "up_internal.h"
#include "stm32_internal.h"
#include "shenzhou-internal.h"
/****************************************************************************
* Definitions
****************************************************************************/
/* Enables debug output from this file (needs CONFIG_DEBUG with
* CONFIG_DEBUG_VERBOSE too)
*/
#undef LED_DEBUG /* Define to enable debug */
#ifdef LED_DEBUG
# define leddbg lldbg
# define ledvdbg llvdbg
#else
# define leddbg(x...)
# define ledvdbg(x...)
#endif
/* The following definitions map the encoded LED setting to GPIO settings */
#define SHENZHOU_LED1 (1 << 0)
#define SHENZHOU_LED2 (1 << 1)
#define SHENZHOU_LED3 (1 << 2)
#define SHENZHOU_LED4 (1 << 3)
#define ON_SETBITS_SHIFT (0)
#define ON_CLRBITS_SHIFT (4)
#define OFF_SETBITS_SHIFT (8)
#define OFF_CLRBITS_SHIFT (12)
#define ON_BITS(v) ((v) & 0xff)
#define OFF_BITS(v) (((v) >> 8) & 0x0ff)
#define SETBITS(b) ((b) & 0x0f)
#define CLRBITS(b) (((b) >> 4) & 0x0f)
#define ON_SETBITS(v) (SETBITS(ON_BITS(v))
#define ON_CLRBITS(v) (CLRBITS(ON_BITS(v))
#define OFF_SETBITS(v) (SETBITS(OFF_BITS(v))
#define OFF_CLRBITS(v) (CLRBITS(OFF_BITS(v))
#define LED_STARTED_ON_SETBITS ((SHENZHOU_LED1) << ON_SETBITS_SHIFT)
#define LED_STARTED_ON_CLRBITS ((SHENZHOU_LED2|SHENZHOU_LED3|SHENZHOU_LED4) << ON_CLRBITS_SHIFT)
#define LED_STARTED_OFF_SETBITS (0 << OFF_SETBITS_SHIFT)
#define LED_STARTED_OFF_CLRBITS ((SHENZHOU_LED1|SHENZHOU_LED2|SHENZHOU_LED3|SHENZHOU_LED4) << OFF_CLRBITS_SHIFT)
#define LED_HEAPALLOCATE_ON_SETBITS ((SHENZHOU_LED2) << ON_SETBITS_SHIFT)
#define LED_HEAPALLOCATE_ON_CLRBITS ((SHENZHOU_LED1|SHENZHOU_LED3|SHENZHOU_LED4) << ON_CLRBITS_SHIFT)
#define LED_HEAPALLOCATE_OFF_SETBITS ((SHENZHOU_LED1) << OFF_SETBITS_SHIFT)
#define LED_HEAPALLOCATE_OFF_CLRBITS ((SHENZHOU_LED2|SHENZHOU_LED3|SHENZHOU_LED4) << OFF_CLRBITS_SHIFT)
#define LED_IRQSENABLED_ON_SETBITS ((SHENZHOU_LED1|SHENZHOU_LED2) << ON_SETBITS_SHIFT)
#define LED_IRQSENABLED_ON_CLRBITS ((SHENZHOU_LED3|SHENZHOU_LED4) << ON_CLRBITS_SHIFT)
#define LED_IRQSENABLED_OFF_SETBITS ((SHENZHOU_LED2) << OFF_SETBITS_SHIFT)
#define LED_IRQSENABLED_OFF_CLRBITS ((SHENZHOU_LED1|SHENZHOU_LED3|SHENZHOU_LED4) << OFF_CLRBITS_SHIFT)
#define LED_STACKCREATED_ON_SETBITS ((SHENZHOU_LED3) << ON_SETBITS_SHIFT)
#define LED_STACKCREATED_ON_CLRBITS ((SHENZHOU_LED1|SHENZHOU_LED2|SHENZHOU_LED4) << ON_CLRBITS_SHIFT)
#define LED_STACKCREATED_OFF_SETBITS ((SHENZHOU_LED1|SHENZHOU_LED2) << OFF_SETBITS_SHIFT)
#define LED_STACKCREATED_OFF_CLRBITS ((SHENZHOU_LED3|SHENZHOU_LED4) << OFF_CLRBITS_SHIFT)
#define LED_INIRQ_ON_SETBITS ((SHENZHOU_LED1) << ON_SETBITS_SHIFT)
#define LED_INIRQ_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT)
#define LED_INIRQ_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT)
#define LED_INIRQ_OFF_CLRBITS ((SHENZHOU_LED1) << OFF_CLRBITS_SHIFT)
#define LED_SIGNAL_ON_SETBITS ((SHENZHOU_LED2) << ON_SETBITS_SHIFT)
#define LED_SIGNAL_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT)
#define LED_SIGNAL_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT)
#define LED_SIGNAL_OFF_CLRBITS ((SHENZHOU_LED2) << OFF_CLRBITS_SHIFT)
#define LED_ASSERTION_ON_SETBITS ((SHENZHOU_LED4) << ON_SETBITS_SHIFT)
#define LED_ASSERTION_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT)
#define LED_ASSERTION_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT)
#define LED_ASSERTION_OFF_CLRBITS ((SHENZHOU_LED4) << OFF_CLRBITS_SHIFT)
#define LED_PANIC_ON_SETBITS ((SHENZHOU_LED4) << ON_SETBITS_SHIFT)
#define LED_PANIC_ON_CLRBITS ((0) << ON_CLRBITS_SHIFT)
#define LED_PANIC_OFF_SETBITS ((0) << OFF_SETBITS_SHIFT)
#define LED_PANIC_OFF_CLRBITS ((SHENZHOU_LED4) << OFF_CLRBITS_SHIFT)
/**************************************************************************************
* Private Function Protototypes
**************************************************************************************/
/* LED State Controls */
static inline void led_clrbits(unsigned int clrbits);
static inline void led_setbits(unsigned int setbits);
static void led_setonoff(unsigned int bits);
/* LED Power Management */
#ifdef CONFIG_PM
static void led_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate);
static int led_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate);
#endif
/****************************************************************************
* Private Data
****************************************************************************/
static const uint16_t g_ledbits[8] =
{
(LED_STARTED_ON_SETBITS | LED_STARTED_ON_CLRBITS |
LED_STARTED_OFF_SETBITS | LED_STARTED_OFF_CLRBITS),
(LED_HEAPALLOCATE_ON_SETBITS | LED_HEAPALLOCATE_ON_CLRBITS |
LED_HEAPALLOCATE_OFF_SETBITS | LED_HEAPALLOCATE_OFF_CLRBITS),
(LED_IRQSENABLED_ON_SETBITS | LED_IRQSENABLED_ON_CLRBITS |
LED_IRQSENABLED_OFF_SETBITS | LED_IRQSENABLED_OFF_CLRBITS),
(LED_STACKCREATED_ON_SETBITS | LED_STACKCREATED_ON_CLRBITS |
LED_STACKCREATED_OFF_SETBITS | LED_STACKCREATED_OFF_CLRBITS),
(LED_INIRQ_ON_SETBITS | LED_INIRQ_ON_CLRBITS |
LED_INIRQ_OFF_SETBITS | LED_INIRQ_OFF_CLRBITS),
(LED_SIGNAL_ON_SETBITS | LED_SIGNAL_ON_CLRBITS |
LED_SIGNAL_OFF_SETBITS | LED_SIGNAL_OFF_CLRBITS),
(LED_ASSERTION_ON_SETBITS | LED_ASSERTION_ON_CLRBITS |
LED_ASSERTION_OFF_SETBITS | LED_ASSERTION_OFF_CLRBITS),
(LED_PANIC_ON_SETBITS | LED_PANIC_ON_CLRBITS |
LED_PANIC_OFF_SETBITS | LED_PANIC_OFF_CLRBITS)
};
#ifdef CONFIG_PM
static struct pm_callback_s g_ledscb =
{
.notify = led_pm_notify,
.prepare = led_pm_prepare,
};
#endif
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Name: led_clrbits
*
* Description:
* Clear all LEDs to the bit encoded state
*
****************************************************************************/
static inline void led_clrbits(unsigned int clrbits)
{
if ((clrbits & SHENZHOU_LED1) != 0)
{
stm32_gpiowrite(GPIO_LED1, false);
}
if ((clrbits & SHENZHOU_LED2) != 0)
{
stm32_gpiowrite(GPIO_LED2, false);
}
if ((clrbits & SHENZHOU_LED3) != 0)
{
stm32_gpiowrite(GPIO_LED3, false);
}
if ((clrbits & SHENZHOU_LED4) != 0)
{
stm32_gpiowrite(GPIO_LED4, false);
}
}
/****************************************************************************
* Name: led_setbits
*
* Description:
* Set all LEDs to the bit encoded state
*
****************************************************************************/
static inline void led_setbits(unsigned int setbits)
{
if ((setbits & SHENZHOU_LED1) != 0)
{
stm32_gpiowrite(GPIO_LED1, true);
}
if ((setbits & SHENZHOU_LED2) != 0)
{
stm32_gpiowrite(GPIO_LED2, true);
}
if ((setbits & SHENZHOU_LED3) != 0)
{
stm32_gpiowrite(GPIO_LED3, true);
}
if ((setbits & SHENZHOU_LED4) != 0)
{
stm32_gpiowrite(GPIO_LED4, true);
}
}
/****************************************************************************
* Name: led_setonoff
*
* Description:
* Set/clear all LEDs to the bit encoded state
*
****************************************************************************/
static void led_setonoff(unsigned int bits)
{
led_clrbits(CLRBITS(bits));
led_setbits(SETBITS(bits));
}
/****************************************************************************
* Name: led_pm_notify
*
* Description:
* Notify the driver of new power state. This callback is called after
* all drivers have had the opportunity to prepare for the new power state.
*
****************************************************************************/
#ifdef CONFIG_PM
static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate)
{
switch (pmstate)
{
case(PM_NORMAL):
{
/* Restore normal LEDs operation */
}
break;
case(PM_IDLE):
{
/* Entering IDLE mode - Turn leds off */
}
break;
case(PM_STANDBY):
{
/* Entering STANDBY mode - Logic for PM_STANDBY goes here */
}
break;
case(PM_SLEEP):
{
/* Entering SLEEP mode - Logic for PM_SLEEP goes here */
}
break;
default:
{
/* Should not get here */
}
break;
}
}
#endif
/****************************************************************************
* Name: led_pm_prepare
*
* Description:
* Request the driver to prepare for a new power state. This is a warning
* that the system is about to enter into a new power state. The driver
* should begin whatever operations that may be required to enter power
* state. The driver may abort the state change mode by returning a
* non-zero value from the callback function.
*
****************************************************************************/
#ifdef CONFIG_PM
static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate)
{
/* No preparation to change power modes is required by the LEDs driver.
* We always accept the state change by returning OK.
*/
return OK;
}
#endif
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: up_ledinit
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
void up_ledinit(void)
{
/* Configure LED1-4 GPIOs for output */
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED4);
}
/****************************************************************************
* Name: up_ledon
****************************************************************************/
void up_ledon(int led)
{
led_setonoff(ON_BITS(g_ledbits[led]));
}
/****************************************************************************
* Name: up_ledoff
****************************************************************************/
void up_ledoff(int led)
{
led_setonoff(OFF_BITS(g_ledbits[led]));
}
/****************************************************************************
* Name: up_ledpminitialize
****************************************************************************/
#ifdef CONFIG_PM
void up_ledpminitialize(void)
{
/* Register to receive power management callbacks */
int ret = pm_register(&g_ledscb);
if (ret != OK)
{
up_ledon(LED_ASSERTION);
}
}
#endif /* CONFIG_PM */
#endif /* CONFIG_ARCH_LEDS */
-12
View File
@@ -4,16 +4,4 @@
# #
if ARCH_BOARD_SKP16C26 if ARCH_BOARD_SKP16C26
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
endif endif
-19
View File
@@ -6,25 +6,6 @@
if ARCH_BOARD_STM3210E_EVAL if ARCH_BOARD_STM3210E_EVAL
comment "STM3210E-EVAL LCD Hardware Configuration" comment "STM3210E-EVAL LCD Hardware Configuration"
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
config ARCH_IRQBUTTONS
bool "Button interrupt support"
default n
depends on ARCH_BUTTONS
---help---
"Support EXTI interrupts on button presses and releases."
config STM3210E_LCD config STM3210E_LCD
bool "Select support for the STM3210E-EVAL LCD" bool "Select support for the STM3210E-EVAL LCD"
default y default y
-18
View File
@@ -4,24 +4,6 @@
# #
if ARCH_BOARD_STM3220G_EVAL if ARCH_BOARD_STM3220G_EVAL
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
config ARCH_IRQBUTTONS
bool "Button interrupt support"
default n
depends on ARCH_BUTTONS
---help---
"Support EXTI interrupts on button presses and releases."
config STM3220G_LCD config STM3220G_LCD
bool "Select support for the STM3210E-EVAL LCD" bool "Select support for the STM3210E-EVAL LCD"
-18
View File
@@ -4,24 +4,6 @@
# #
if ARCH_BOARD_STM3240G_EVAL if ARCH_BOARD_STM3240G_EVAL
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
config ARCH_IRQBUTTONS
bool "Button interrupt support"
default n
depends on ARCH_BUTTONS
---help---
"Support EXTI interrupts on button presses and releases."
config STM3240G_LCD config STM3240G_LCD
bool "Select support for the STM3210E-EVAL LCD" bool "Select support for the STM3210E-EVAL LCD"
-18
View File
@@ -4,24 +4,6 @@
# #
if ARCH_BOARD_STM32F4_DISCOVERY if ARCH_BOARD_STM32F4_DISCOVERY
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
config ARCH_IRQBUTTONS
bool "Button interrupt support"
default n
depends on ARCH_BUTTONS
---help---
"Support EXTI interrupts on button presses and releases."
config PM_BUTTONS config PM_BUTTONS
bool "PM Button support" bool "PM Button support"
-19
View File
@@ -4,23 +4,4 @@
# #
if ARCH_BOARD_SUREPIC32MX if ARCH_BOARD_SUREPIC32MX
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
config ARCH_IRQBUTTONS
bool "Button interrupt support"
default n
depends on ARCH_BUTTONS
---help---
"Support interrupts on button presses and releases."
endif endif
-19
View File
@@ -4,23 +4,4 @@
# #
if ARCH_BOARD_TWR_K60N512 if ARCH_BOARD_TWR_K60N512
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
config ARCH_IRQBUTTONS
bool "Button interrupt support"
default n
depends on ARCH_BUTTONS
---help---
"Support interrupts on button presses and releases."
endif endif
-19
View File
@@ -4,23 +4,4 @@
# #
if ARCH_BOARD_UBW32 if ARCH_BOARD_UBW32
config ARCH_LEDS
bool "NuttX LED support"
default n
---help---
"Support control of board LEDs by NuttX to indicate system state"
config ARCH_BUTTONS
bool "Button support"
default n
---help---
"Support interfaces to use buttons provided by the board."
config ARCH_IRQBUTTONS
bool "Button interrupt support"
default n
depends on ARCH_BUTTONS
---help---
"Support interrupts on button presses and releases."
endif endif