configs: Still trying to get consistent name. button driver expects board to define NUM_BUTTONS, not BOARD_NUM_BUTTONS. That was changed in all board.h header files, but there are still references in configs/ C files to BOARD_NUM_BUTTONS
This commit is contained in:
parent
7ca9e8c376
commit
bd8a07a4b2
@ -61,7 +61,7 @@
|
|||||||
* by the BUTTON_* definitions in board.h
|
* by the BUTTON_* definitions in board.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const uint16_t g_buttoncfg[BOARD_NUM_BUTTONS] =
|
static const uint16_t g_buttoncfg[NUM_BUTTONS] =
|
||||||
{
|
{
|
||||||
BAMBINO_BUT1
|
BAMBINO_BUT1
|
||||||
};
|
};
|
||||||
@ -71,7 +71,7 @@ static const uint16_t g_buttoncfg[BOARD_NUM_BUTTONS] =
|
|||||||
* numbers.
|
* numbers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static uint8_t g_buttonirq[BOARD_NUM_BUTTONS] =
|
static uint8_t g_buttonirq[NUM_BUTTONS] =
|
||||||
{
|
{
|
||||||
BAMBINO_BUT1_IRQ
|
BAMBINO_BUT1_IRQ
|
||||||
};
|
};
|
||||||
@ -98,7 +98,7 @@ void board_button_initialize(void)
|
|||||||
|
|
||||||
/* Configure the GPIO pins as interrupting inputs. */
|
/* Configure the GPIO pins as interrupting inputs. */
|
||||||
|
|
||||||
for (i = 0; i < BOARD_NUM_BUTTONS; i++)
|
for (i = 0; i < NUM_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
lpc43_configgpio(g_buttoncfg[i]);
|
lpc43_configgpio(g_buttoncfg[i]);
|
||||||
}
|
}
|
||||||
@ -127,7 +127,7 @@ uint32_t board_buttons(void)
|
|||||||
|
|
||||||
/* Check that state of each key */
|
/* Check that state of each key */
|
||||||
|
|
||||||
for (i = 0; i < BOARD_NUM_BUTTONS; i++)
|
for (i = 0; i < NUM_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
/* A LOW value means that the key is pressed. */
|
/* A LOW value means that the key is pressed. */
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
|||||||
|
|
||||||
/* Verify that the button ID is within range */
|
/* Verify that the button ID is within range */
|
||||||
|
|
||||||
if ((unsigned)id < BOARD_NUM_BUTTONS)
|
if ((unsigned)id < NUM_BUTTONS)
|
||||||
{
|
{
|
||||||
/* Disable interrupts until we are done */
|
/* Disable interrupts until we are done */
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
* the BUTTON_* and JOYSTICK_* definitions in board.h
|
* the BUTTON_* and JOYSTICK_* definitions in board.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const uint16_t g_buttoncfg[BOARD_NUM_BUTTONS] =
|
static const uint16_t g_buttoncfg[NUM_BUTTONS] =
|
||||||
{
|
{
|
||||||
LINCOLN60_BUT1
|
LINCOLN60_BUT1
|
||||||
};
|
};
|
||||||
@ -74,7 +74,7 @@ static const uint16_t g_buttoncfg[BOARD_NUM_BUTTONS] =
|
|||||||
* numbers.
|
* numbers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static uint8_t g_buttonirq[BOARD_NUM_BUTTONS] =
|
static uint8_t g_buttonirq[NUM_BUTTONS] =
|
||||||
{
|
{
|
||||||
LINCOLN60_BUT1_IRQ
|
LINCOLN60_BUT1_IRQ
|
||||||
};
|
};
|
||||||
@ -105,7 +105,7 @@ void board_button_initialize(void)
|
|||||||
|
|
||||||
/* Configure the GPIO pins as interrupting inputs. */
|
/* Configure the GPIO pins as interrupting inputs. */
|
||||||
|
|
||||||
for (i = 0; i < BOARD_NUM_BUTTONS; i++)
|
for (i = 0; i < NUM_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
lpc17_configgpio(g_buttoncfg[i]);
|
lpc17_configgpio(g_buttoncfg[i]);
|
||||||
}
|
}
|
||||||
@ -134,7 +134,7 @@ uint32_t board_buttons(void)
|
|||||||
|
|
||||||
/* Check that state of each key */
|
/* Check that state of each key */
|
||||||
|
|
||||||
for (i = 0; i < BOARD_NUM_BUTTONS; i++)
|
for (i = 0; i < NUM_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
/* A LOW value means that the key is pressed. */
|
/* A LOW value means that the key is pressed. */
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
|||||||
|
|
||||||
/* Verify that the button ID is within range */
|
/* Verify that the button ID is within range */
|
||||||
|
|
||||||
if ((unsigned)id < BOARD_NUM_BUTTONS)
|
if ((unsigned)id < NUM_BUTTONS)
|
||||||
{
|
{
|
||||||
/* Disable interrupts until we are done */
|
/* Disable interrupts until we are done */
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
* by the BUTTON_* definitions in board.h
|
* by the BUTTON_* definitions in board.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const uint16_t g_buttoncfg[BOARD_NUM_BUTTONS] =
|
static const uint16_t g_buttoncfg[NUM_BUTTONS] =
|
||||||
{
|
{
|
||||||
LPC4330_XPLORER_BUT1
|
LPC4330_XPLORER_BUT1
|
||||||
};
|
};
|
||||||
@ -73,7 +73,7 @@ static const uint16_t g_buttoncfg[BOARD_NUM_BUTTONS] =
|
|||||||
* numbers.
|
* numbers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static uint8_t g_buttonirq[BOARD_NUM_BUTTONS] =
|
static uint8_t g_buttonirq[NUM_BUTTONS] =
|
||||||
{
|
{
|
||||||
LPC4330_XPLORER_BUT1_IRQ
|
LPC4330_XPLORER_BUT1_IRQ
|
||||||
};
|
};
|
||||||
@ -104,7 +104,7 @@ void board_button_initialize(void)
|
|||||||
|
|
||||||
/* Configure the GPIO pins as interrupting inputs. */
|
/* Configure the GPIO pins as interrupting inputs. */
|
||||||
|
|
||||||
for (i = 0; i < BOARD_NUM_BUTTONS; i++)
|
for (i = 0; i < NUM_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
lpc43_configgpio(g_buttoncfg[i]);
|
lpc43_configgpio(g_buttoncfg[i]);
|
||||||
}
|
}
|
||||||
@ -133,7 +133,7 @@ uint32_t board_buttons(void)
|
|||||||
|
|
||||||
/* Check that state of each key */
|
/* Check that state of each key */
|
||||||
|
|
||||||
for (i = 0; i < BOARD_NUM_BUTTONS; i++)
|
for (i = 0; i < NUM_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
/* A LOW value means that the key is pressed. */
|
/* A LOW value means that the key is pressed. */
|
||||||
|
|
||||||
@ -178,7 +178,7 @@ int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
|||||||
|
|
||||||
/* Verify that the button ID is within range */
|
/* Verify that the button ID is within range */
|
||||||
|
|
||||||
if ((unsigned)id < BOARD_NUM_BUTTONS)
|
if ((unsigned)id < NUM_BUTTONS)
|
||||||
{
|
{
|
||||||
/* Disable interrupts until we are done */
|
/* Disable interrupts until we are done */
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if 0 /* Not yet used */
|
#if 0 /* Not yet used */
|
||||||
static const uint16_t g_buttoncfg[BOARD_NUM_BUTTONS] =
|
static const uint16_t g_buttoncfg[NUM_BUTTONS] =
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ static const uint16_t g_buttoncfg[BOARD_NUM_BUTTONS] =
|
|||||||
* numbers.
|
* numbers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static uint8_t g_buttonirq[BOARD_NUM_BUTTONS] =
|
static uint8_t g_buttonirq[NUM_BUTTONS] =
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
@ -106,7 +106,7 @@ void board_button_initialize(void)
|
|||||||
|
|
||||||
/* Configure the GPIO pins as interrupting inputs. */
|
/* Configure the GPIO pins as interrupting inputs. */
|
||||||
|
|
||||||
for (i = 0; i < BOARD_NUM_BUTTONS; i++)
|
for (i = 0; i < NUM_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
lpc43_configgpio(g_buttoncfg[i]);
|
lpc43_configgpio(g_buttoncfg[i]);
|
||||||
}
|
}
|
||||||
@ -137,7 +137,7 @@ uint32_t board_buttons(void)
|
|||||||
|
|
||||||
/* Check that state of each key */
|
/* Check that state of each key */
|
||||||
|
|
||||||
for (i = 0; i < BOARD_NUM_BUTTONS; i++)
|
for (i = 0; i < NUM_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
/* A LOW value means that the key is pressed. */
|
/* A LOW value means that the key is pressed. */
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
|||||||
|
|
||||||
/* Verify that the button ID is within range */
|
/* Verify that the button ID is within range */
|
||||||
|
|
||||||
if ((unsigned)id < BOARD_NUM_BUTTONS)
|
if ((unsigned)id < NUM_BUTTONS)
|
||||||
{
|
{
|
||||||
/* Disable interrupts until we are done */
|
/* Disable interrupts until we are done */
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
* the BUTTON_* and JOYSTICK_* definitions in board.h
|
* the BUTTON_* and JOYSTICK_* definitions in board.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const uint16_t g_buttoncfg[BOARD_NUM_BUTTONS] =
|
static const uint16_t g_buttoncfg[NUM_BUTTONS] =
|
||||||
{
|
{
|
||||||
LPC1766STK_BUT1, LPC1766STK_BUT2, LPC1766STK_WAKEUP, LPC1766STK_CENTER,
|
LPC1766STK_BUT1, LPC1766STK_BUT2, LPC1766STK_WAKEUP, LPC1766STK_CENTER,
|
||||||
LPC1766STK_UP, LPC1766STK_DOWN, LPC1766STK_LEFT, LPC1766STK_RIGHT
|
LPC1766STK_UP, LPC1766STK_DOWN, LPC1766STK_LEFT, LPC1766STK_RIGHT
|
||||||
@ -75,7 +75,7 @@ static const uint16_t g_buttoncfg[BOARD_NUM_BUTTONS] =
|
|||||||
* numbers.
|
* numbers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static uint8_t g_buttonirq[BOARD_NUM_BUTTONS] =
|
static uint8_t g_buttonirq[NUM_BUTTONS] =
|
||||||
{
|
{
|
||||||
LPC1766STK_BUT1_IRQ, LPC1766STK_BUT2_IRQ, LPC1766STK_WAKEUP_IRQ,
|
LPC1766STK_BUT1_IRQ, LPC1766STK_BUT2_IRQ, LPC1766STK_WAKEUP_IRQ,
|
||||||
LPC1766STK_CENTER_IRQ, LPC1766STK_UP_IRQ, LPC1766STK_DOWN_IRQ,
|
LPC1766STK_CENTER_IRQ, LPC1766STK_UP_IRQ, LPC1766STK_DOWN_IRQ,
|
||||||
@ -108,7 +108,7 @@ void board_button_initialize(void)
|
|||||||
|
|
||||||
/* Configure the GPIO pins as interrupting inputs. */
|
/* Configure the GPIO pins as interrupting inputs. */
|
||||||
|
|
||||||
for (i = 0; i < BOARD_NUM_BUTTONS; i++)
|
for (i = 0; i < NUM_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
lpc17_configgpio(g_buttoncfg[i]);
|
lpc17_configgpio(g_buttoncfg[i]);
|
||||||
}
|
}
|
||||||
@ -137,7 +137,7 @@ uint32_t board_buttons(void)
|
|||||||
|
|
||||||
/* Check that state of each key */
|
/* Check that state of each key */
|
||||||
|
|
||||||
for (i = 0; i < BOARD_NUM_BUTTONS; i++)
|
for (i = 0; i < NUM_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
/* A LOW value means that the key is pressed. */
|
/* A LOW value means that the key is pressed. */
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
|||||||
|
|
||||||
/* Verify that the button ID is within range */
|
/* Verify that the button ID is within range */
|
||||||
|
|
||||||
if ((unsigned)id < BOARD_NUM_BUTTONS)
|
if ((unsigned)id < NUM_BUTTONS)
|
||||||
{
|
{
|
||||||
/* Disable interrupts until we are done */
|
/* Disable interrupts until we are done */
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
* the BUTTON_* and JOYSTICK_* definitions in board.h
|
* the BUTTON_* and JOYSTICK_* definitions in board.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const lpc17_pinset_t g_buttoncfg[BOARD_NUM_BUTTONS] =
|
static const lpc17_pinset_t g_buttoncfg[NUM_BUTTONS] =
|
||||||
{
|
{
|
||||||
GPIO_USER1, GPIO_USER2, GPIO_USER3, GPIO_JOY_A,
|
GPIO_USER1, GPIO_USER2, GPIO_USER3, GPIO_JOY_A,
|
||||||
GPIO_JOY_B, GPIO_JOY_C, GPIO_JOY_D, GPIO_JOY_CTR
|
GPIO_JOY_B, GPIO_JOY_C, GPIO_JOY_D, GPIO_JOY_CTR
|
||||||
@ -92,7 +92,7 @@ static const lpc17_pinset_t g_buttoncfg[BOARD_NUM_BUTTONS] =
|
|||||||
* numbers.
|
* numbers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const uint8_t g_buttonirq[BOARD_NUM_BUTTONS] =
|
static const uint8_t g_buttonirq[NUM_BUTTONS] =
|
||||||
{
|
{
|
||||||
0, GPIO_USER2_IRQ, GPIO_USER3_IRQ, GPIO_JOY_A_IRQ,
|
0, GPIO_USER2_IRQ, GPIO_USER3_IRQ, GPIO_JOY_A_IRQ,
|
||||||
GPIO_JOY_B_IRQ, GPIO_JOY_C_IRQ, GPIO_JOY_D_IRQ, GPIO_JOY_CTR_IRQ
|
GPIO_JOY_B_IRQ, GPIO_JOY_C_IRQ, GPIO_JOY_D_IRQ, GPIO_JOY_CTR_IRQ
|
||||||
@ -120,7 +120,7 @@ void board_button_initialize(void)
|
|||||||
|
|
||||||
/* Configure the GPIO pins as interrupting inputs. */
|
/* Configure the GPIO pins as interrupting inputs. */
|
||||||
|
|
||||||
for (i = 0; i < BOARD_NUM_BUTTONS; i++)
|
for (i = 0; i < NUM_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
lpc17_configgpio(g_buttoncfg[i]);
|
lpc17_configgpio(g_buttoncfg[i]);
|
||||||
}
|
}
|
||||||
@ -149,7 +149,7 @@ uint32_t board_buttons(void)
|
|||||||
|
|
||||||
/* Check that state of each key */
|
/* Check that state of each key */
|
||||||
|
|
||||||
for (i = 0; i < BOARD_NUM_BUTTONS; i++)
|
for (i = 0; i < NUM_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
/* A LOW value means that the key is pressed. */
|
/* A LOW value means that the key is pressed. */
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
|||||||
|
|
||||||
/* Verify that the button ID is within range */
|
/* Verify that the button ID is within range */
|
||||||
|
|
||||||
if ((unsigned)id < BOARD_NUM_BUTTONS)
|
if ((unsigned)id < NUM_BUTTONS)
|
||||||
{
|
{
|
||||||
/* Get the IRQ number for the button; A value of zero indicates that
|
/* Get the IRQ number for the button; A value of zero indicates that
|
||||||
* the button does not support the interrupt function.
|
* the button does not support the interrupt function.
|
||||||
|
@ -68,10 +68,10 @@
|
|||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Pin configuration for each zkit-arm-1769 button. This array is indexed by
|
/* Pin configuration for each zkit-arm-1769 button. This array is indexed by
|
||||||
* BOARD_NUM_BUTTONS in board.h
|
* NUM_BUTTONS in board.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const uint16_t g_buttons[BOARD_NUM_BUTTONS] =
|
static const uint16_t g_buttons[NUM_BUTTONS] =
|
||||||
{
|
{
|
||||||
ZKITARM_KEY1, ZKITARM_KEY2, ZKITARM_KEY3, ZKITARM_KEY4, ZKITARM_KEY5
|
ZKITARM_KEY1, ZKITARM_KEY2, ZKITARM_KEY3, ZKITARM_KEY4, ZKITARM_KEY5
|
||||||
};
|
};
|
||||||
@ -99,7 +99,7 @@ void board_button_initialize(void)
|
|||||||
* configured for some pins but NOT used in this file
|
* configured for some pins but NOT used in this file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i = 0; i < BOARD_NUM_BUTTONS; i++)
|
for (i = 0; i < NUM_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
lpc17_configgpio(g_buttons[i]);
|
lpc17_configgpio(g_buttons[i]);
|
||||||
}
|
}
|
||||||
@ -117,7 +117,7 @@ uint32_t board_buttons(void)
|
|||||||
|
|
||||||
/* Check that state of each key */
|
/* Check that state of each key */
|
||||||
|
|
||||||
for (i = 0; i < BOARD_NUM_BUTTONS; i++)
|
for (i = 0; i < NUM_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
released = lpc17_gpioread(g_buttons[i]);
|
released = lpc17_gpioread(g_buttons[i]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user