mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 12:33:34 +08:00
Change all occurrences of CONFIG_EXAMPLE_ to CONFIG_EXAMPLES_ for consistency; fleshed out a few more Kconfig files
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5211 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -61,60 +61,60 @@
|
||||
# error "CONFIG_ARCH_BUTTONS is not defined in the configuration"
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_EXAMPLE_BUTTONS_NAME0
|
||||
# define CONFIG_EXAMPLE_BUTTONS_NAME0 "BUTTON0"
|
||||
#ifndef CONFIG_EXAMPLES_BUTTONS_NAME0
|
||||
# define CONFIG_EXAMPLES_BUTTONS_NAME0 "BUTTON0"
|
||||
#endif
|
||||
#ifndef CONFIG_EXAMPLE_BUTTONS_NAME1
|
||||
# define CONFIG_EXAMPLE_BUTTONS_NAME1 "BUTTON1"
|
||||
#ifndef CONFIG_EXAMPLES_BUTTONS_NAME1
|
||||
# define CONFIG_EXAMPLES_BUTTONS_NAME1 "BUTTON1"
|
||||
#endif
|
||||
#ifndef CONFIG_EXAMPLE_BUTTONS_NAME2
|
||||
# define CONFIG_EXAMPLE_BUTTONS_NAME2 "BUTTON2"
|
||||
#ifndef CONFIG_EXAMPLES_BUTTONS_NAME2
|
||||
# define CONFIG_EXAMPLES_BUTTONS_NAME2 "BUTTON2"
|
||||
#endif
|
||||
#ifndef CONFIG_EXAMPLE_BUTTONS_NAME3
|
||||
# define CONFIG_EXAMPLE_BUTTONS_NAME3 "BUTTON3"
|
||||
#ifndef CONFIG_EXAMPLES_BUTTONS_NAME3
|
||||
# define CONFIG_EXAMPLES_BUTTONS_NAME3 "BUTTON3"
|
||||
#endif
|
||||
#ifndef CONFIG_EXAMPLE_BUTTONS_NAME4
|
||||
# define CONFIG_EXAMPLE_BUTTONS_NAME4 "BUTTON4"
|
||||
#ifndef CONFIG_EXAMPLES_BUTTONS_NAME4
|
||||
# define CONFIG_EXAMPLES_BUTTONS_NAME4 "BUTTON4"
|
||||
#endif
|
||||
#ifndef CONFIG_EXAMPLE_BUTTONS_NAME5
|
||||
# define CONFIG_EXAMPLE_BUTTONS_NAME5 "BUTTON5"
|
||||
#ifndef CONFIG_EXAMPLES_BUTTONS_NAME5
|
||||
# define CONFIG_EXAMPLES_BUTTONS_NAME5 "BUTTON5"
|
||||
#endif
|
||||
#ifndef CONFIG_EXAMPLE_BUTTONS_NAME6
|
||||
# define CONFIG_EXAMPLE_BUTTONS_NAME6 "BUTTON6"
|
||||
#ifndef CONFIG_EXAMPLES_BUTTONS_NAME6
|
||||
# define CONFIG_EXAMPLES_BUTTONS_NAME6 "BUTTON6"
|
||||
#endif
|
||||
#ifndef CONFIG_EXAMPLE_BUTTONS_NAME7
|
||||
# define CONFIG_EXAMPLE_BUTTONS_NAME7 "BUTTON7"
|
||||
#ifndef CONFIG_EXAMPLES_BUTTONS_NAME7
|
||||
# define CONFIG_EXAMPLES_BUTTONS_NAME7 "BUTTON7"
|
||||
#endif
|
||||
|
||||
#define BUTTON_MIN 0
|
||||
#define BUTTON_MAX 7
|
||||
|
||||
#ifndef CONFIG_EXAMPLE_BUTTONS_MIN
|
||||
# define CONFIG_EXAMPLE_BUTTONS_MIN BUTTON_MIN
|
||||
#ifndef CONFIG_EXAMPLES_BUTTONS_MIN
|
||||
# define CONFIG_EXAMPLES_BUTTONS_MIN BUTTON_MIN
|
||||
#endif
|
||||
#ifndef CONFIG_EXAMPLE_BUTTONS_MAX
|
||||
# define CONFIG_EXAMPLE_BUTTONS_MAX BUTTON_MAX
|
||||
#ifndef CONFIG_EXAMPLES_BUTTONS_MAX
|
||||
# define CONFIG_EXAMPLES_BUTTONS_MAX BUTTON_MAX
|
||||
#endif
|
||||
|
||||
#if CONFIG_EXAMPLE_BUTTONS_MIN > CONFIG_EXAMPLE_BUTTONS_MAX
|
||||
# error "CONFIG_EXAMPLE_BUTTONS_MIN > CONFIG_EXAMPLE_BUTTONS_MAX"
|
||||
#if CONFIG_EXAMPLES_BUTTONS_MIN > CONFIG_EXAMPLES_BUTTONS_MAX
|
||||
# error "CONFIG_EXAMPLES_BUTTONS_MIN > CONFIG_EXAMPLES_BUTTONS_MAX"
|
||||
#endif
|
||||
#if CONFIG_EXAMPLE_BUTTONS_MAX > 7
|
||||
# error "CONFIG_EXAMPLE_BUTTONS_MAX > 7"
|
||||
#if CONFIG_EXAMPLES_BUTTONS_MAX > 7
|
||||
# error "CONFIG_EXAMPLES_BUTTONS_MAX > 7"
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_EXAMPLE_IRQBUTTONS_MIN
|
||||
# define CONFIG_EXAMPLE_IRQBUTTONS_MIN CONFIG_EXAMPLE_BUTTONS_MIN
|
||||
#ifndef CONFIG_EXAMPLES_IRQBUTTONS_MIN
|
||||
# define CONFIG_EXAMPLES_IRQBUTTONS_MIN CONFIG_EXAMPLES_BUTTONS_MIN
|
||||
#endif
|
||||
#ifndef CONFIG_EXAMPLE_IRQBUTTONS_MAX
|
||||
# define CONFIG_EXAMPLE_IRQBUTTONS_MAX CONFIG_EXAMPLE_BUTTONS_MAX
|
||||
#ifndef CONFIG_EXAMPLES_IRQBUTTONS_MAX
|
||||
# define CONFIG_EXAMPLES_IRQBUTTONS_MAX CONFIG_EXAMPLES_BUTTONS_MAX
|
||||
#endif
|
||||
|
||||
#if CONFIG_EXAMPLE_IRQBUTTONS_MIN > CONFIG_EXAMPLE_IRQBUTTONS_MAX
|
||||
# error "CONFIG_EXAMPLE_IRQBUTTONS_MIN > CONFIG_EXAMPLE_IRQBUTTONS_MAX"
|
||||
#if CONFIG_EXAMPLES_IRQBUTTONS_MIN > CONFIG_EXAMPLES_IRQBUTTONS_MAX
|
||||
# error "CONFIG_EXAMPLES_IRQBUTTONS_MIN > CONFIG_EXAMPLES_IRQBUTTONS_MAX"
|
||||
#endif
|
||||
#if CONFIG_EXAMPLE_IRQBUTTONS_MAX > 7
|
||||
# error "CONFIG_EXAMPLE_IRQBUTTONS_MAX > 7"
|
||||
#if CONFIG_EXAMPLES_IRQBUTTONS_MAX > 7
|
||||
# error "CONFIG_EXAMPLES_IRQBUTTONS_MAX > 7"
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
@@ -124,8 +124,8 @@
|
||||
# define MAX(a,b) (a > b ? a : b)
|
||||
#endif
|
||||
|
||||
#define MIN_BUTTON MIN(CONFIG_EXAMPLE_BUTTONS_MIN, CONFIG_EXAMPLE_IRQBUTTONS_MIN)
|
||||
#define MAX_BUTTON MAX(CONFIG_EXAMPLE_BUTTONS_MAX, CONFIG_EXAMPLE_IRQBUTTONS_MAX)
|
||||
#define MIN_BUTTON MIN(CONFIG_EXAMPLES_BUTTONS_MIN, CONFIG_EXAMPLES_IRQBUTTONS_MIN)
|
||||
#define MAX_BUTTON MAX(CONFIG_EXAMPLES_BUTTONS_MAX, CONFIG_EXAMPLES_IRQBUTTONS_MAX)
|
||||
|
||||
#define NUM_BUTTONS (MAX_BUTTON - MIN_BUTTON + 1)
|
||||
#define BUTTON_INDEX(b) ((b)-MIN_BUTTON)
|
||||
@@ -187,7 +187,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
|
||||
{
|
||||
#if MIN_BUTTON < 1
|
||||
{
|
||||
CONFIG_EXAMPLE_BUTTONS_NAME0,
|
||||
CONFIG_EXAMPLES_BUTTONS_NAME0,
|
||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||
button0_handler
|
||||
#endif
|
||||
@@ -195,7 +195,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
|
||||
#endif
|
||||
#if MIN_BUTTON < 2 && MAX_BUTTON > 0
|
||||
{
|
||||
CONFIG_EXAMPLE_BUTTONS_NAME1,
|
||||
CONFIG_EXAMPLES_BUTTONS_NAME1,
|
||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||
button1_handler
|
||||
#endif
|
||||
@@ -203,7 +203,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
|
||||
#endif
|
||||
#if MIN_BUTTON < 3 && MAX_BUTTON > 1
|
||||
{
|
||||
CONFIG_EXAMPLE_BUTTONS_NAME2,
|
||||
CONFIG_EXAMPLES_BUTTONS_NAME2,
|
||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||
button2_handler
|
||||
#endif
|
||||
@@ -211,7 +211,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
|
||||
#endif
|
||||
#if MIN_BUTTON < 4 && MAX_BUTTON > 2
|
||||
{
|
||||
CONFIG_EXAMPLE_BUTTONS_NAME3,
|
||||
CONFIG_EXAMPLES_BUTTONS_NAME3,
|
||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||
button3_handler
|
||||
#endif
|
||||
@@ -219,7 +219,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
|
||||
#endif
|
||||
#if MIN_BUTTON < 5 && MAX_BUTTON > 3
|
||||
{
|
||||
CONFIG_EXAMPLE_BUTTONS_NAME4,
|
||||
CONFIG_EXAMPLES_BUTTONS_NAME4,
|
||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||
button4_handler
|
||||
#endif
|
||||
@@ -227,7 +227,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
|
||||
#endif
|
||||
#if MIN_BUTTON < 6 && MAX_BUTTON > 4
|
||||
{
|
||||
CONFIG_EXAMPLE_BUTTONS_NAME5,
|
||||
CONFIG_EXAMPLES_BUTTONS_NAME5,
|
||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||
button5_handler
|
||||
#endif
|
||||
@@ -235,7 +235,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
|
||||
#endif
|
||||
#if MIN_BUTTON < 7 && MAX_BUTTON > 5
|
||||
{
|
||||
CONFIG_EXAMPLE_BUTTONS_NAME6,
|
||||
CONFIG_EXAMPLES_BUTTONS_NAME6,
|
||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||
button6_handler
|
||||
#endif
|
||||
@@ -243,7 +243,7 @@ static const struct button_info_s g_buttoninfo[NUM_BUTTONS] =
|
||||
#endif
|
||||
#if MAX_BUTTON > 6
|
||||
{
|
||||
CONFIG_EXAMPLE_BUTTONS_NAME7,
|
||||
CONFIG_EXAMPLES_BUTTONS_NAME7,
|
||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||
button7_handler
|
||||
#endif
|
||||
@@ -419,7 +419,7 @@ int buttons_main(int argc, char *argv[])
|
||||
/* Register to recieve button interrupts */
|
||||
|
||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||
for (i = CONFIG_EXAMPLE_IRQBUTTONS_MIN; i <= CONFIG_EXAMPLE_IRQBUTTONS_MAX; i++)
|
||||
for (i = CONFIG_EXAMPLES_IRQBUTTONS_MIN; i <= CONFIG_EXAMPLES_IRQBUTTONS_MAX; i++)
|
||||
{
|
||||
xcpt_t oldhandler = up_irqbutton(i, g_buttoninfo[BUTTON_INDEX(i)].handler);
|
||||
|
||||
@@ -488,7 +488,7 @@ int buttons_main(int argc, char *argv[])
|
||||
/* Un-register button handlers */
|
||||
|
||||
#if defined(CONFIG_ARCH_IRQBUTTONS) && defined(CONFIG_NSH_BUILTIN_APPS)
|
||||
for (i = CONFIG_EXAMPLE_IRQBUTTONS_MIN; i <= CONFIG_EXAMPLE_IRQBUTTONS_MAX; i++)
|
||||
for (i = CONFIG_EXAMPLES_IRQBUTTONS_MIN; i <= CONFIG_EXAMPLES_IRQBUTTONS_MAX; i++)
|
||||
{
|
||||
(void)up_irqbutton(i, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user