Review and update some board configurations

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4991 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2012-07-29 18:30:48 +00:00
parent e08e917d5a
commit c91aa007f2
38 changed files with 266 additions and 260 deletions
+7
View File
@@ -16,5 +16,12 @@ config ARCH_BUTTONS
---help--- ---help---
"Support interfaces to use buttons provided by the board." "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
+7
View File
@@ -16,4 +16,11 @@ config ARCH_BUTTONS
---help--- ---help---
"Support interfaces to use buttons provided by the board." "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
+7
View File
@@ -16,4 +16,11 @@ config ARCH_BUTTONS
---help--- ---help---
"Support interfaces to use buttons provided by the board." "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
+7
View File
@@ -16,4 +16,11 @@ config ARCH_BUTTONS
---help--- ---help---
"Support interfaces to use buttons provided by the board." "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
+82
View File
@@ -18,6 +18,13 @@ config ARCH_BUTTONS
---help--- ---help---
"Support interfaces to use buttons provided by the board." "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
@@ -105,4 +112,79 @@ config STM32_R61580_DISABLE
endif endif
config PM_BUTTONS
bool "PM Button support"
default n
depends on PM && ARCH_IRQBUTTONS
---help---
Enable PM button EXTI interrupts to support PM testing
config PM_BUTTONS_MIN
int "Minimum button number"
default 0
depends on PM_BUTTONS
---help---
The lowest button code to use for PM testing (see board.h)
config PM_BUTTONS_MAX
int "Maximum button number"
default 7
depends on PM_BUTTONS
---help---
The highest button code to use for PM testing (see board.h)
config PM_IRQBUTTONS_MIN
int "Minimum interrupting button number"
default 0
depends on PM_BUTTONS
---help---
The lowest interrupting button code to use for PM testing (see board.h)
config PM_IRQBUTTONS_MAX
int "Maximum interrupting button number"
default 7
depends on PM_BUTTONS
---help---
The highest interrupting button code to use for PM testing (see board.h)
config PM_BUTTON_ACTIVITY
int "Button PM activity weight"
default 10
depends on PM_BUTTONS
---help---
The activity weight to report to the power management subsystem when a button is pressed.
config PM_ALARM_SEC
int "PM_STANDBY delay (seconds)"
default 15
depends on PM && RTC_ALARM
--help---
Number of seconds to wait in PM_STANDBY before going to PM_STANDBY mode.
config PM_ALARM_NSEC
int "PM_STANDBY delay (nanoseconds)"
default 0
depends on PM && RTC_ALARM
--help---
Number of additional nanoseconds to wait in PM_STANDBY before going to PM_STANDBY mode.
config PM_SLEEP_WAKEUP
bool "PM_SLEEP wake-up alarm"
default n
depends on PM && RTC_ALARM
--help---
Wake-up of PM_SLEEP mode after a delay and resume normal operation.
config PM_SLEEP_WAKEUP_SEC
int "PM_SLEEP delay (seconds)"
default 10
depends on PM && RTC_ALARM
--help---
Number of seconds to wait in PM_SLEEP before going to PM_STANDBY mode.
config PM_SLEEP_WAKEUP_NSEC
int "PM_SLEEP delay (nanoseconds)"
default 0
depends on PM && RTC_ALARM
--help---
Number of additional nanoseconds to wait in PM_SLEEP before going to PM_STANDBY mode.
+16 -83
View File
@@ -64,31 +64,6 @@
# error "CONFIG_ARCH_BUTTONS is not defined in the configuration" # error "CONFIG_ARCH_BUTTONS is not defined in the configuration"
#endif #endif
#ifndef CONFIG_PM_BUTTONS_NAME0
# define CONFIG_PM_BUTTONS_NAME0 "BUTTON0"
#endif
#ifndef CONFIG_PM_BUTTONS_NAME1
# define CONFIG_PM_BUTTONS_NAME1 "BUTTON1"
#endif
#ifndef CONFIG_PM_BUTTONS_NAME2
# define CONFIG_PM_BUTTONS_NAME2 "BUTTON2"
#endif
#ifndef CONFIG_PM_BUTTONS_NAME3
# define CONFIG_PM_BUTTONS_NAME3 "BUTTON3"
#endif
#ifndef CONFIG_PM_BUTTONS_NAME4
# define CONFIG_PM_BUTTONS_NAME4 "BUTTON4"
#endif
#ifndef CONFIG_PM_BUTTONS_NAME5
# define CONFIG_PM_BUTTONS_NAME5 "BUTTON5"
#endif
#ifndef CONFIG_PM_BUTTONS_NAME6
# define CONFIG_PM_BUTTONS_NAME6 "BUTTON6"
#endif
#ifndef CONFIG_PM_BUTTONS_NAME7
# define CONFIG_PM_BUTTONS_NAME7 "BUTTON7"
#endif
#define BUTTON_MIN 0 #define BUTTON_MIN 0
#define BUTTON_MAX 7 #define BUTTON_MAX 7
@@ -106,6 +81,10 @@
# error "CONFIG_PM_BUTTONS_MAX > 7" # error "CONFIG_PM_BUTTONS_MAX > 7"
#endif #endif
#ifndef CONFIG_ARCH_IRQBUTTONS
# warning "CONFIG_ARCH_IRQBUTTONS is not defined in the configuration"
#endif
#ifndef CONFIG_PM_IRQBUTTONS_MIN #ifndef CONFIG_PM_IRQBUTTONS_MIN
# define CONFIG_PM_IRQBUTTONS_MIN CONFIG_PM_BUTTONS_MIN # define CONFIG_PM_IRQBUTTONS_MIN CONFIG_PM_BUTTONS_MIN
#endif #endif
@@ -143,14 +122,6 @@
* Private Types * Private Types
****************************************************************************/ ****************************************************************************/
struct button_info_s
{
FAR const char *name; /* Name for the button */
#ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t handler; /* Button interrupt handler */
#endif
};
/**************************************************************************** /****************************************************************************
* Private Function Prototypes * Private Function Prototypes
****************************************************************************/ ****************************************************************************/
@@ -188,72 +159,34 @@ static int button7_handler(int irq, FAR void *context);
* Private Data * Private Data
****************************************************************************/ ****************************************************************************/
/* Button Names */ /* Button interrupt handlers */
static const struct button_info_s g_buttoninfo[NUM_PMBUTTONS] = #ifdef CONFIG_ARCH_IRQBUTTONS
static const xcpt_t g_buttonhandlers[NUM_PMBUTTONS] =
{ {
#if MIN_BUTTON < 1 #if MIN_BUTTON < 1
{ button0_handler,
CONFIG_PM_BUTTONS_NAME0,
#ifdef CONFIG_ARCH_IRQBUTTONS
button0_handler
#endif
},
#endif #endif
#if MIN_BUTTON < 2 && MAX_BUTTON > 0 #if MIN_BUTTON < 2 && MAX_BUTTON > 0
{ button1_handler,
CONFIG_PM_BUTTONS_NAME1,
#ifdef CONFIG_ARCH_IRQBUTTONS
button1_handler
#endif
},
#endif #endif
#if MIN_BUTTON < 3 && MAX_BUTTON > 1 #if MIN_BUTTON < 3 && MAX_BUTTON > 1
{ button2_handler,
CONFIG_PM_BUTTONS_NAME2,
#ifdef CONFIG_ARCH_IRQBUTTONS
button2_handler
#endif
},
#endif #endif
#if MIN_BUTTON < 4 && MAX_BUTTON > 2 #if MIN_BUTTON < 4 && MAX_BUTTON > 2
{ button3_handler,
CONFIG_PM_BUTTONS_NAME3,
#ifdef CONFIG_ARCH_IRQBUTTONS
button3_handler
#endif
},
#endif #endif
#if MIN_BUTTON < 5 && MAX_BUTTON > 3 #if MIN_BUTTON < 5 && MAX_BUTTON > 3
{ button4_handler,
CONFIG_PM_BUTTONS_NAME4,
#ifdef CONFIG_ARCH_IRQBUTTONS
button4_handler
#endif
},
#endif #endif
#if MIN_BUTTON < 6 && MAX_BUTTON > 4 #if MIN_BUTTON < 6 && MAX_BUTTON > 4
{ button5_handler,
CONFIG_PM_BUTTONS_NAME5,
#ifdef CONFIG_ARCH_IRQBUTTONS
button5_handler
#endif
},
#endif #endif
#if MIN_BUTTON < 7 && MAX_BUTTON > 5 #if MIN_BUTTON < 7 && MAX_BUTTON > 5
{ button6_handler,
CONFIG_PM_BUTTONS_NAME6,
#ifdef CONFIG_ARCH_IRQBUTTONS
button6_handler
#endif
},
#endif #endif
#if MAX_BUTTON > 6 #if MAX_BUTTON > 6
{ button7_handler,
CONFIG_PM_BUTTONS_NAME7,
#ifdef CONFIG_ARCH_IRQBUTTONS
button7_handler
#endif
} }
#endif #endif
}; };
@@ -371,7 +304,7 @@ void up_pmbuttons(void)
int i; int i;
for (i = CONFIG_PM_IRQBUTTONS_MIN; i <= CONFIG_PM_IRQBUTTONS_MAX; i++) for (i = CONFIG_PM_IRQBUTTONS_MIN; i <= CONFIG_PM_IRQBUTTONS_MAX; i++)
{ {
xcpt_t oldhandler = up_irqbutton(i, g_buttoninfo[BUTTON_INDEX(i)].handler); xcpt_t oldhandler = up_irqbutton(i, g_buttonhandlers[BUTTON_INDEX(i)]);
if (oldhandler != NULL) if (oldhandler != NULL)
{ {
+7
View File
@@ -16,6 +16,13 @@ config ARCH_BUTTONS
---help--- ---help---
"Support interfaces to use buttons provided by the board." "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"
default y default y
-6
View File
@@ -573,12 +573,6 @@ STM3220G-EVAL-specific Configuration Options
CONFIG_STM32_TIM10 CONFIG_STM32_TIM10
CONFIG_STM32_TIM11 CONFIG_STM32_TIM11
Timer and I2C devices may need to the following to force power to be applied
unconditionally at power up. (Otherwise, the device is powered when it is
initialized).
CONFIG_STM32_FORCEPOWER
Timer devices may be used for different purposes. One special purpose is Timer devices may be used for different purposes. One special purpose is
to generate modulated outputs for such things as motor control. If CONFIG_STM32_TIMn to generate modulated outputs for such things as motor control. If CONFIG_STM32_TIMn
is defined (as above) then the following may also be defined to indicate that is defined (as above) then the following may also be defined to indicate that
-5
View File
@@ -191,11 +191,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F20xxx specific serial device driver settings # STM32F20xxx specific serial device driver settings
# #
-5
View File
@@ -191,11 +191,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F20xxx specific serial device driver settings # STM32F20xxx specific serial device driver settings
# #
-5
View File
@@ -191,11 +191,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F20xxx specific serial device driver settings # STM32F20xxx specific serial device driver settings
# #
-5
View File
@@ -192,11 +192,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F20xxx specific serial device driver settings # STM32F20xxx specific serial device driver settings
# #
-5
View File
@@ -191,11 +191,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F20xxx specific serial device driver settings # STM32F20xxx specific serial device driver settings
# #
-5
View File
@@ -191,11 +191,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F20xxx specific serial device driver settings # STM32F20xxx specific serial device driver settings
# #
-5
View File
@@ -191,11 +191,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F20xxx specific serial device driver settings # STM32F20xxx specific serial device driver settings
# #
+7
View File
@@ -16,6 +16,13 @@ config ARCH_BUTTONS
---help--- ---help---
"Support interfaces to use buttons provided by the board." "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"
default y default y
-6
View File
@@ -694,12 +694,6 @@ STM3240G-EVAL-specific Configuration Options
CONFIG_STM32_TIM10 CONFIG_STM32_TIM10
CONFIG_STM32_TIM11 CONFIG_STM32_TIM11
Timer and I2C devices may need to the following to force power to be applied
unconditionally at power up. (Otherwise, the device is powered when it is
initialized).
CONFIG_STM32_FORCEPOWER
Timer devices may be used for different purposes. One special purpose is Timer devices may be used for different purposes. One special purpose is
to generate modulated outputs for such things as motor control. If CONFIG_STM32_TIMn to generate modulated outputs for such things as motor control. If CONFIG_STM32_TIMn
is defined (as above) then the following may also be defined to indicate that is defined (as above) then the following may also be defined to indicate that
-5
View File
@@ -203,11 +203,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F40xxx specific serial device driver settings # STM32F40xxx specific serial device driver settings
# #
-5
View File
@@ -203,11 +203,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F40xxx specific serial device driver settings # STM32F40xxx specific serial device driver settings
# #
-5
View File
@@ -203,11 +203,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F40xxx specific serial device driver settings # STM32F40xxx specific serial device driver settings
# #
-5
View File
@@ -204,11 +204,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F40xxx specific serial device driver settings # STM32F40xxx specific serial device driver settings
# #
@@ -203,11 +203,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F40xxx specific serial device driver settings # STM32F40xxx specific serial device driver settings
# #
-5
View File
@@ -203,11 +203,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F40xxx specific serial device driver settings # STM32F40xxx specific serial device driver settings
# #
-5
View File
@@ -203,11 +203,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM3240xxx specific serial device driver settings # STM3240xxx specific serial device driver settings
# #
-5
View File
@@ -203,11 +203,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F40xxx specific serial device driver settings # STM32F40xxx specific serial device driver settings
# #
+56
View File
@@ -16,4 +16,60 @@ config ARCH_BUTTONS
---help--- ---help---
"Support interfaces to use buttons provided by the board." "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
bool "PM Button support"
default n
depends on PM && ARCH_IRQBUTTONS
---help---
Enable PM button EXTI interrupts to support PM testing
config PM_BUTTON_ACTIVITY
int "Button PM activity weight"
default 10
depends on PM_BUTTONS
---help---
The activity weight to report to the power management subsystem when a button is pressed.
config PM_ALARM_SEC
int "PM_STANDBY delay (seconds)"
default 15
depends on PM && RTC_ALARM
--help---
Number of seconds to wait in PM_STANDBY before going to PM_STANDBY mode.
config PM_ALARM_NSEC
int "PM_STANDBY delay (nanoseconds)"
default 0
depends on PM && RTC_ALARM
--help---
Number of additional nanoseconds to wait in PM_STANDBY before going to PM_STANDBY mode.
config PM_SLEEP_WAKEUP
bool "PM_SLEEP wake-up alarm"
default n
depends on PM && RTC_ALARM
--help---
Wake-up of PM_SLEEP mode after a delay and resume normal operation.
config PM_SLEEP_WAKEUP_SEC
int "PM_SLEEP delay (seconds)"
default 10
depends on PM && RTC_ALARM
--help---
Number of seconds to wait in PM_SLEEP before going to PM_STANDBY mode.
config PM_SLEEP_WAKEUP_NSEC
int "PM_SLEEP delay (nanoseconds)"
default 0
depends on PM && RTC_ALARM
--help---
Number of additional nanoseconds to wait in PM_SLEEP before going to PM_STANDBY mode.
endif endif
-6
View File
@@ -807,12 +807,6 @@ STM32F4Discovery-specific Configuration Options
CONFIG_STM32_TIM10 CONFIG_STM32_TIM10
CONFIG_STM32_TIM11 CONFIG_STM32_TIM11
Timer and I2C devices may need to the following to force power to be applied
unconditionally at power up. (Otherwise, the device is powered when it is
initialized).
CONFIG_STM32_FORCEPOWER
Timer devices may be used for different purposes. One special purpose is Timer devices may be used for different purposes. One special purpose is
to generate modulated outputs for such things as motor control. If CONFIG_STM32_TIMn to generate modulated outputs for such things as motor control. If CONFIG_STM32_TIMn
is defined (as above) then the following may also be defined to indicate that is defined (as above) then the following may also be defined to indicate that
-5
View File
@@ -180,11 +180,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F40xxx specific serial device driver settings # STM32F40xxx specific serial device driver settings
# #
@@ -180,11 +180,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F40xxx specific serial device driver settings # STM32F40xxx specific serial device driver settings
# #
@@ -180,11 +180,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F4Discovery specific serial device driver settings # STM32F4Discovery specific serial device driver settings
# #
-5
View File
@@ -181,11 +181,6 @@ CONFIG_STM32_TIM9=n
CONFIG_STM32_TIM10=n CONFIG_STM32_TIM10=n
CONFIG_STM32_TIM11=n CONFIG_STM32_TIM11=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
# #
# STM32F40xxx specific serial device driver settings # STM32F40xxx specific serial device driver settings
# #
+5 -58
View File
@@ -64,12 +64,8 @@
# error "CONFIG_ARCH_BUTTONS is not defined in the configuration" # error "CONFIG_ARCH_BUTTONS is not defined in the configuration"
#endif #endif
#ifndef CONFIG_PM_BUTTONS_NAME0 #ifndef CONFIG_ARCH_IRQBUTTONS
# define CONFIG_PM_BUTTONS_NAME0 "BUTTON0" # warning "CONFIG_ARCH_IRQBUTTONS is not defined in the configuration"
#endif
#ifndef CONFIG_PM_IRQBUTTON
# define CONFIG_PM_IRQBUTTON 0
#endif #endif
#ifndef CONFIG_PM_BUTTON_ACTIVITY #ifndef CONFIG_PM_BUTTON_ACTIVITY
@@ -80,61 +76,18 @@
* Private Types * Private Types
****************************************************************************/ ****************************************************************************/
struct button_info_s
{
FAR const char *name; /* Name for the button */
#ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t handler; /* Button interrupt handler */
#endif
};
/**************************************************************************** /****************************************************************************
* Private Function Prototypes * Private Function Prototypes
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
static void button_handler(int id, int irq); static int button_handler(int irq, FAR void *context);
#if MIN_BUTTON < 1
static int button0_handler(int irq, FAR void *context);
#endif
#if MIN_BUTTON < 2 && MAX_BUTTON > 0
static int button1_handler(int irq, FAR void *context);
#endif
#if MIN_BUTTON < 3 && MAX_BUTTON > 1
static int button2_handler(int irq, FAR void *context);
#endif
#if MIN_BUTTON < 4 && MAX_BUTTON > 2
static int button3_handler(int irq, FAR void *context);
#endif
#if MIN_BUTTON < 5 && MAX_BUTTON > 3
static int button4_handler(int irq, FAR void *context);
#endif
#if MIN_BUTTON < 6 && MAX_BUTTON > 4
static int button5_handler(int irq, FAR void *context);
#endif
#if MIN_BUTTON < 7 && MAX_BUTTON > 5
static int button6_handler(int irq, FAR void *context);
#endif
#if MAX_BUTTON > 6
static int button7_handler(int irq, FAR void *context);
#endif
#endif /* CONFIG_ARCH_IRQBUTTONS */ #endif /* CONFIG_ARCH_IRQBUTTONS */
/**************************************************************************** /****************************************************************************
* Private Data * Private Data
****************************************************************************/ ****************************************************************************/
/* Button Names */
static const struct button_info_s g_buttoninfo =
{
CONFIG_PM_BUTTONS_NAME0,
#ifdef CONFIG_ARCH_IRQBUTTONS
button0_handler,
#endif
};
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
****************************************************************************/ ****************************************************************************/
@@ -148,7 +101,7 @@ static const struct button_info_s g_buttoninfo =
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
static void button_handler(int id, int irq) static int button_handler(int irq, FAR void *context)
{ {
/* At this point the MCU should have already awakened. The state /* At this point the MCU should have already awakened. The state
* change will be handled in the IDLE loop when the system is re-awakened * change will be handled in the IDLE loop when the system is re-awakened
@@ -158,14 +111,8 @@ static void button_handler(int id, int irq)
*/ */
pm_activity(CONFIG_PM_BUTTON_ACTIVITY); pm_activity(CONFIG_PM_BUTTON_ACTIVITY);
}
static int button0_handler(int irq, FAR void *context)
{
button_handler(0, irq);
return OK; return OK;
} }
#endif /* CONFIG_ARCH_IRQBUTTONS */ #endif /* CONFIG_ARCH_IRQBUTTONS */
/**************************************************************************** /****************************************************************************
@@ -188,7 +135,7 @@ void up_pmbuttons(void)
up_buttoninit(); up_buttoninit();
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t oldhandler = up_irqbutton(0, g_buttoninfo.handler); xcpt_t oldhandler = up_irqbutton(0, button_handler);
if (oldhandler != NULL) if (oldhandler != NULL)
{ {
+7
View File
@@ -16,4 +16,11 @@ config ARCH_BUTTONS
---help--- ---help---
"Support interfaces to use buttons provided by the board." "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
+7
View File
@@ -16,4 +16,11 @@ config ARCH_BUTTONS
---help--- ---help---
"Support interfaces to use buttons provided by the board." "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
+22
View File
@@ -2,3 +2,25 @@
# For a description of the syntax of this configuration file, # For a description of the syntax of this configuration file,
# see misc/tools/kconfig-language.txt. # see misc/tools/kconfig-language.txt.
# #
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
+21 -1
View File
@@ -208,6 +208,7 @@ menuconfig ANALOG
This includes drivers for Analog to Digital Conversion (ADC) as This includes drivers for Analog to Digital Conversion (ADC) as
well as drivers for Digital to Analog Conversion (DAC). well as drivers for Digital to Analog Conversion (DAC).
See include/nuttx/analog/*.h for registration information. See include/nuttx/analog/*.h for registration information.
if ANALOG if ANALOG
source drivers/analog/Kconfig source drivers/analog/Kconfig
endif endif
@@ -220,6 +221,7 @@ config BCH
a character driver. This is the complementary conversion as that a character driver. This is the complementary conversion as that
performed by loop.c. See include/nuttx/fs/fs.h for registration performed by loop.c. See include/nuttx/fs/fs.h for registration
information. information.
if BCH if BCH
source drivers/bch/Kconfig source drivers/bch/Kconfig
endif endif
@@ -231,6 +233,7 @@ menuconfig INPUT
This directory holds implementations of input device drivers. This directory holds implementations of input device drivers.
This includes such things as touchscreen and keypad drivers. This includes such things as touchscreen and keypad drivers.
See include/nuttx/input/*.h for registration information. See include/nuttx/input/*.h for registration information.
if INPUT if INPUT
source drivers/input/Kconfig source drivers/input/Kconfig
endif endif
@@ -242,6 +245,7 @@ menuconfig LCD
---help--- ---help---
Drivers for parallel and serial LCD and OLED type devices. These Drivers for parallel and serial LCD and OLED type devices. These
drivers support interfaces as defined in include/nuttx/lcd/lcd.h drivers support interfaces as defined in include/nuttx/lcd/lcd.h
if LCD if LCD
source drivers/lcd/Kconfig source drivers/lcd/Kconfig
endif endif
@@ -270,6 +274,7 @@ menuconfig MTD
confused with the "real" MTD developed at infradead.org. This confused with the "real" MTD developed at infradead.org. This
logic is unrelated; I just used the name MTD because I am not logic is unrelated; I just used the name MTD because I am not
aware of any other common way to refer to this class of devices). aware of any other common way to refer to this class of devices).
if MTD if MTD
source drivers/mtd/Kconfig source drivers/mtd/Kconfig
endif endif
@@ -279,6 +284,7 @@ menuconfig NETDEVICES
default n default n
---help--- ---help---
Network interface drivers. See also include/nuttx/net/net.h Network interface drivers. See also include/nuttx/net/net.h
if NETDEVICES if NETDEVICES
source drivers/net/Kconfig source drivers/net/Kconfig
endif endif
@@ -289,11 +295,12 @@ menuconfig PIPES
---help--- ---help---
FIFO and named pipe drivers. Standard interfaces are declared FIFO and named pipe drivers. Standard interfaces are declared
in include/unistd.h in include/unistd.h
if PIPES if PIPES
source drivers/pipes/Kconfig source drivers/pipes/Kconfig
endif endif
menuconfig POWER config PM
bool "Power management (PM) driver interfaces" bool "Power management (PM) driver interfaces"
default n default n
---help--- ---help---
@@ -301,6 +308,13 @@ menuconfig POWER
to manage power usage of a platform by monitoring driver activity to manage power usage of a platform by monitoring driver activity
and by placing drivers into reduce power usage modes when the and by placing drivers into reduce power usage modes when the
drivers are not active. drivers are not active.
menuconfig POWER
bool "Power management device support"
default n
---help---
Enable building of power-related devices (battery monitors, chargers, etc).
if POWER if POWER
source drivers/power/Kconfig source drivers/power/Kconfig
endif endif
@@ -310,6 +324,7 @@ menuconfig SENSORS
default n default n
---help--- ---help---
Drivers for various sensors Drivers for various sensors
if SENSORS if SENSORS
source drivers/sensors/Kconfig source drivers/sensors/Kconfig
endif endif
@@ -326,6 +341,7 @@ menuconfig SERCOMM_CONSOLE
configuration file. If you attempt to build this driver without configuration file. If you attempt to build this driver without
osmocom-bb, you will get compilation errors because of header files osmocom-bb, you will get compilation errors because of header files
that are needed from the osmocom-bb. that are needed from the osmocom-bb.
if SERCOMM if SERCOMM
source drivers/sercomm/Kconfig source drivers/sercomm/Kconfig
endif endif
@@ -337,6 +353,7 @@ menuconfig SERIAL
Front-end character drivers for chip-specific UARTs. This provide Front-end character drivers for chip-specific UARTs. This provide
some TTY-like functionality and are commonly used (but not required for) some TTY-like functionality and are commonly used (but not required for)
the NuttX system console. See also include/nuttx/serial/serial.h the NuttX system console. See also include/nuttx/serial/serial.h
if SERIAL if SERIAL
source drivers/serial/Kconfig source drivers/serial/Kconfig
endif endif
@@ -346,6 +363,7 @@ menuconfig USBDEV
default n default n
---help--- ---help---
USB device drivers. See also include/nuttx/usb/usbdev.h USB device drivers. See also include/nuttx/usb/usbdev.h
if USBDEV if USBDEV
source drivers/usbdev/Kconfig source drivers/usbdev/Kconfig
endif endif
@@ -355,6 +373,7 @@ menuconfig USBHOST
default n default n
---help--- ---help---
USB host drivers. See also include/nuttx/usb/usbhost.h USB host drivers. See also include/nuttx/usb/usbhost.h
if USBHOST if USBHOST
source drivers/usbhost/Kconfig source drivers/usbhost/Kconfig
endif endif
@@ -364,6 +383,7 @@ menuconfig WIRELESS
default n default n
---help--- ---help---
Drivers for various wireless devices. Drivers for various wireless devices.
if WIRELESS if WIRELESS
source drivers/wireless/Kconfig source drivers/wireless/Kconfig
endif endif
-1
View File
@@ -21,4 +21,3 @@ config MAX1704X
config I2C_MAX1704X config I2C_MAX1704X
bool bool
default y if MAX1704X default y if MAX1704X
+8 -4
View File
@@ -1,7 +1,7 @@
//*************************************************************************** //***************************************************************************
// include/cxx/cstring // include/cxx/cstring
// //
// Copyright (C) 2009 Gregory Nutt. All rights reserved. // Copyright (C) 2009-2012 Gregory Nutt. All rights reserved.
// Author: Gregory Nutt <gnutt@nuttx.org> // Author: Gregory Nutt <gnutt@nuttx.org>
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
@@ -50,7 +50,7 @@
namespace std namespace std
{ {
using ::size_t; using ::size_t;
using ::strchr;
using ::strdup; using ::strdup;
using ::strndup; using ::strndup;
using ::strerror; using ::strerror;
@@ -70,12 +70,16 @@ namespace std
using ::strspn; using ::strspn;
using ::strcspn; using ::strcspn;
using ::strstr; using ::strstr;
using ::strcasestr;
using ::strtok; using ::strtok;
using ::strtok_r; using ::strtok_r;
using ::memset;
using ::memcpy; using ::memchr;
using ::memccpy;
using ::memcmp; using ::memcmp;
using ::memcpy;
using ::memmove; using ::memmove;
using ::memset;
} }
#endif // __INCLUDE_CXX_CSTRING #endif // __INCLUDE_CXX_CSTRING