Rename up_irqbutton() to board_button_irq()

This commit is contained in:
Gregory Nutt
2014-01-24 14:04:07 -06:00
parent f4d84ecd7e
commit f797601f19
34 changed files with 140 additions and 140 deletions
+8 -8
View File
@@ -67,16 +67,16 @@
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Name: up_irqbuttonx * Name: board_button_irqx
* *
* Description: * Description:
* This function implements the core of the up_irqbutton() logic. * This function implements the core of the board_button_irq() logic.
* *
****************************************************************************/ ****************************************************************************/
#if defined(CONFIG_AVR32_GPIOIRQ) && defined(CONFIG_ARCH_IRQBUTTONS) && \ #if defined(CONFIG_AVR32_GPIOIRQ) && defined(CONFIG_ARCH_IRQBUTTONS) && \
(defined(CONFIG_AVR32DEV_BUTTON1_IRQ) || defined(CONFIG_AVR32DEV_BUTTON2_IRQ)) (defined(CONFIG_AVR32DEV_BUTTON1_IRQ) || defined(CONFIG_AVR32DEV_BUTTON2_IRQ))
static xcpt_t up_irqbuttonx(int irq, xcpt_t irqhandler) static xcpt_t board_button_irqx(int irq, xcpt_t irqhandler)
{ {
xcpt_t oldhandler; xcpt_t oldhandler;
@@ -111,7 +111,7 @@ static xcpt_t up_irqbuttonx(int irq, xcpt_t irqhandler)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. * board_button_initialize() must be called to initialize button resources.
* After that, board_buttons() may be called to collect the current state of * After that, board_buttons() may be called to collect the current state of
* all buttons or up_irqbutton() may be called to register button interrupt * all buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -145,7 +145,7 @@ uint8_t board_buttons(void)
} }
/**************************************************************************** /****************************************************************************
* Name: up_irqbutton * Name: board_button_irq
* *
* Description: * Description:
* This function may be called to register an interrupt handler that will * This function may be called to register an interrupt handler that will
@@ -163,19 +163,19 @@ uint8_t board_buttons(void)
****************************************************************************/ ****************************************************************************/
#if defined(CONFIG_AVR32_GPIOIRQ) && defined(CONFIG_ARCH_IRQBUTTONS) #if defined(CONFIG_AVR32_GPIOIRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
#ifdef CONFIG_AVR32DEV_BUTTON1_IRQ #ifdef CONFIG_AVR32DEV_BUTTON1_IRQ
if (id == BUTTON1) if (id == BUTTON1)
{ {
return up_irqbuttonx(GPIO_BUTTON1_IRQ, irqhandler); return board_button_irqx(GPIO_BUTTON1_IRQ, irqhandler);
} }
else else
#endif #endif
#ifdef CONFIG_AVR32DEV_BUTTON2_IRQ #ifdef CONFIG_AVR32DEV_BUTTON2_IRQ
if (id == BUTTON2) if (id == BUTTON2)
{ {
return up_irqbuttonx(GPIO_BUTTON2_IRQ, irqhandler); return board_button_irqx(GPIO_BUTTON2_IRQ, irqhandler);
} }
else else
#endif #endif
+4 -4
View File
@@ -79,7 +79,7 @@ static const uint16_t g_buttons[NUM_BUTTONS] =
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. * board_button_initialize() must be called to initialize button resources.
* After that, board_buttons() may be called to collect the current state of * After that, board_buttons() may be called to collect the current state of
* all buttons or up_irqbutton() may be called to register button interrupt * all buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -138,7 +138,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. * board_button_initialize() must be called to initialize button resources.
* After that, board_buttons() may be called to collect the current state of * After that, board_buttons() may be called to collect the current state of
* all buttons or up_irqbutton() may be called to register button interrupt * all buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be * After board_button_initialize() has been called, board_buttons() may be
@@ -147,7 +147,7 @@ uint8_t board_buttons(void)
* BUTTON_*_BIT and JOYSTICK_*_BIT definitions in board.h for the meaning * BUTTON_*_BIT and JOYSTICK_*_BIT definitions in board.h for the meaning
* of each bit. * of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See * button enumeration value that uniquely identifies a button resource. See
* the * the
@@ -158,7 +158,7 @@ uint8_t board_buttons(void)
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+4 -4
View File
@@ -70,7 +70,7 @@
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. * board_button_initialize() must be called to initialize button resources.
* After that, board_buttons() may be called to collect the current state of * After that, board_buttons() may be called to collect the current state of
* all buttons or up_irqbutton() may be called to register button interrupt * all buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -114,7 +114,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. * board_button_initialize() must be called to initialize button resources.
* After that, board_buttons() may be called to collect the current state of all * After that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be * After board_button_initialize() has been called, board_buttons() may be
@@ -123,7 +123,7 @@ uint8_t board_buttons(void)
* BUTTON_*_BIT and JOYSTICK_*_BIT definitions in board.h for the meaning * BUTTON_*_BIT and JOYSTICK_*_BIT definitions in board.h for the meaning
* of each bit. * of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See * button enumeration value that uniquely identifies a button resource. See
* the BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of * the BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of
@@ -133,7 +133,7 @@ uint8_t board_buttons(void)
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
uint16_t gpio; uint16_t gpio;
+4 -4
View File
@@ -62,7 +62,7 @@
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. * board_button_initialize() must be called to initialize button resources.
* After that, board_buttons() may be called to collect the current state of * After that, board_buttons() may be called to collect the current state of
* all buttons or up_irqbutton() may be called to register button interrupt * all buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -108,7 +108,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. * board_button_initialize() must be called to initialize button resources.
* After that, board_buttons() may be called to collect the current state of * After that, board_buttons() may be called to collect the current state of
* all buttons or up_irqbutton() may be called to register button interrupt * all buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be * After board_button_initialize() has been called, board_buttons() may be
@@ -117,7 +117,7 @@ uint8_t board_buttons(void)
* BUTTON_*_BIT and JOYSTICK_*_BIT definitions in board.h for the meaning * BUTTON_*_BIT and JOYSTICK_*_BIT definitions in board.h for the meaning
* of each bit. * of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See * button enumeration value that uniquely identifies a button resource. See
* the BUTTON_* definitions in board.h for the meaning of enumeration * the BUTTON_* definitions in board.h for the meaning of enumeration
@@ -127,7 +127,7 @@ uint8_t board_buttons(void)
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
uint32_t pinset = GPIO_BTN_KEYA; uint32_t pinset = GPIO_BTN_KEYA;
+4 -4
View File
@@ -70,7 +70,7 @@
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. * board_button_initialize() must be called to initialize button resources.
* After that, board_buttons() may be called to collect the current state of * After that, board_buttons() may be called to collect the current state of
* all buttons or up_irqbutton() may be called to register button interrupt * all buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -97,7 +97,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. * board_button_initialize() must be called to initialize button resources.
* After that, board_buttons() may be called to collect the current state of * After that, board_buttons() may be called to collect the current state of
* all buttons or up_irqbutton() may be called to register button interrupt * all buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be * After board_button_initialize() has been called, board_buttons() may be
@@ -106,7 +106,7 @@ uint8_t board_buttons(void)
* BUTTON_*_BIT and JOYSTICK_*_BIT definitions in board.h for the meaning * BUTTON_*_BIT and JOYSTICK_*_BIT definitions in board.h for the meaning
* of each bit. * of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. * button enumeration value that uniquely identifies a button resource.
* See the BUTTON_* and JOYSTICK_* definitions in board.h for the meaning * See the BUTTON_* and JOYSTICK_* definitions in board.h for the meaning
@@ -116,7 +116,7 @@ uint8_t board_buttons(void)
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
/* The KwikStik-K40 board has no standard GPIO contact buttons */ /* The KwikStik-K40 board has no standard GPIO contact buttons */
+6 -6
View File
@@ -99,7 +99,7 @@ static uint8_t g_buttonirq[BOARD_NUM_BUTTONS] =
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -161,24 +161,24 @@ uint8_t board_buttons(void)
* *
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, up_irqbutton() may be called to register button interrupt handlers. * that, board_button_irq() may be called to register button interrupt handlers.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BOARD_BUTTON_* and BOARD_JOYSTICK_* definitions in board.h for the meaning * BOARD_BUTTON_* and BOARD_JOYSTICK_* definitions in board.h for the meaning
* of enumeration values. The previous interrupt handler address is returned * of enumeration values. The previous interrupt handler address is returned
* (so that it may restored, if so desired). * (so that it may restored, if so desired).
* *
* Note that up_irqbutton() also enables button interrupts. Button * Note that board_button_irq() also enables button interrupts. Button
* interrupts will remain enabled after the interrupt handler is attached. * interrupts will remain enabled after the interrupt handler is attached.
* Interrupts may be disabled (and detached) by calling up_irqbutton with * Interrupts may be disabled (and detached) by calling board_button_irq with
* irqhandler equal to NULL. * irqhandler equal to NULL.
* *
****************************************************************************/ ****************************************************************************/
#if defined(CONFIG_ARCH_IRQBUTTONS) && defined(CONFIG_GPIO_IRQ) #if defined(CONFIG_ARCH_IRQBUTTONS) && defined(CONFIG_GPIO_IRQ)
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
irqstate_t flags; irqstate_t flags;
+6 -6
View File
@@ -98,7 +98,7 @@ static uint8_t g_buttonirq[BOARD_NUM_BUTTONS] =
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -160,24 +160,24 @@ uint8_t board_buttons(void)
* *
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, up_irqbutton() may be called to register button interrupt handlers. * that, board_button_irq() may be called to register button interrupt handlers.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BOARD_BUTTON_* and BOARD_JOYSTICK_* definitions in board.h for the meaning * BOARD_BUTTON_* and BOARD_JOYSTICK_* definitions in board.h for the meaning
* of enumeration values. The previous interrupt handler address is returned * of enumeration values. The previous interrupt handler address is returned
* (so that it may restored, if so desired). * (so that it may restored, if so desired).
* *
* Note that up_irqbutton() also enables button interrupts. Button * Note that board_button_irq() also enables button interrupts. Button
* interrupts will remain enabled after the interrupt handler is attached. * interrupts will remain enabled after the interrupt handler is attached.
* Interrupts may be disabled (and detached) by calling up_irqbutton with * Interrupts may be disabled (and detached) by calling board_button_irq with
* irqhandler equal to NULL. * irqhandler equal to NULL.
* *
****************************************************************************/ ****************************************************************************/
#if defined(CONFIG_ARCH_IRQBUTTONS) && defined(CONFIG_GPIO_IRQ) #if defined(CONFIG_ARCH_IRQBUTTONS) && defined(CONFIG_GPIO_IRQ)
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
irqstate_t flags; irqstate_t flags;
@@ -144,7 +144,7 @@
* NOTES: * NOTES:
* 1. Pull-ups are not required because the pins are already pulled-up by * 1. Pull-ups are not required because the pins are already pulled-up by
* through resistors on the board. * through resistors on the board.
* 2. All buttons are capable of supporting interrupts if up_irqbutton() is * 2. All buttons are capable of supporting interrupts if board_button_irq() is
* called to attach an interrupt handler. Interrupts are configured to * called to attach an interrupt handler. Interrupts are configured to
* occur on both edges. * occur on both edges.
*/ */
@@ -170,7 +170,7 @@
* NOTES: * NOTES:
* 1. Pull-ups are not required because the pins are already pulled-up by * 1. Pull-ups are not required because the pins are already pulled-up by
* through resistors on the board. * through resistors on the board.
* 2. All buttons are capable of supporting interrupts if up_irqbutton() is * 2. All buttons are capable of supporting interrupts if board_button_irq() is
* called to attach an interrupt handler. Interrupts are configured to * called to attach an interrupt handler. Interrupts are configured to
* occur on both edges. * occur on both edges.
*/ */
+6 -6
View File
@@ -102,7 +102,7 @@ static uint8_t g_buttonirq[BOARD_NUM_BUTTONS] =
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -164,24 +164,24 @@ uint8_t board_buttons(void)
* *
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, up_irqbutton() may be called to register button interrupt handlers. * that, board_button_irq() may be called to register button interrupt handlers.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BOARD_BUTTON_* and BOARD_JOYSTICK_* definitions in board.h for the meaning * BOARD_BUTTON_* and BOARD_JOYSTICK_* definitions in board.h for the meaning
* of enumeration values. The previous interrupt handler address is returned * of enumeration values. The previous interrupt handler address is returned
* (so that it may restored, if so desired). * (so that it may restored, if so desired).
* *
* Note that up_irqbutton() also enables button interrupts. Button * Note that board_button_irq() also enables button interrupts. Button
* interrupts will remain enabled after the interrupt handler is attached. * interrupts will remain enabled after the interrupt handler is attached.
* Interrupts may be disabled (and detached) by calling up_irqbutton with * Interrupts may be disabled (and detached) by calling board_button_irq with
* irqhandler equal to NULL. * irqhandler equal to NULL.
* *
****************************************************************************/ ****************************************************************************/
#if defined(CONFIG_ARCH_IRQBUTTONS) && defined(CONFIG_GPIO_IRQ) #if defined(CONFIG_ARCH_IRQBUTTONS) && defined(CONFIG_GPIO_IRQ)
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
irqstate_t flags; irqstate_t flags;
+4 -4
View File
@@ -85,7 +85,7 @@ static const uint16_t g_buttons[NUM_BUTTONS] =
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -158,7 +158,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be called to * After board_button_initialize() has been called, board_buttons() may be called to
@@ -166,7 +166,7 @@ uint8_t board_buttons(void)
* with each bit associated with a button. See the BUTTON_*_BIT * with each bit associated with a button. See the BUTTON_*_BIT
* definitions in board.h for the meaning of each bit. * definitions in board.h for the meaning of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BUTTON_* definitions in board.h for the meaning of enumeration * BUTTON_* definitions in board.h for the meaning of enumeration
@@ -176,7 +176,7 @@ uint8_t board_buttons(void)
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+6 -6
View File
@@ -120,7 +120,7 @@ static uint8_t g_buttonirq[BOARD_NUM_BUTTONS] =
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -182,24 +182,24 @@ uint8_t board_buttons(void)
* *
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, up_irqbutton() may be called to register button interrupt handlers. * that, board_button_irq() may be called to register button interrupt handlers.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BOARD_BUTTON_* and BOARD_JOYSTICK_* definitions in board.h for the meaning * BOARD_BUTTON_* and BOARD_JOYSTICK_* definitions in board.h for the meaning
* of enumeration values. The previous interrupt handler address is returned * of enumeration values. The previous interrupt handler address is returned
* (so that it may restored, if so desired). * (so that it may restored, if so desired).
* *
* Note that up_irqbutton() also enables button interrupts. Button * Note that board_button_irq() also enables button interrupts. Button
* interrupts will remain enabled after the interrupt handler is attached. * interrupts will remain enabled after the interrupt handler is attached.
* Interrupts may be disabled (and detached) by calling up_irqbutton with * Interrupts may be disabled (and detached) by calling board_button_irq with
* irqhandler equal to NULL. * irqhandler equal to NULL.
* *
****************************************************************************/ ****************************************************************************/
#if defined(CONFIG_ARCH_IRQBUTTONS) && defined(CONFIG_GPIO_IRQ) #if defined(CONFIG_ARCH_IRQBUTTONS) && defined(CONFIG_GPIO_IRQ)
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
irqstate_t flags; irqstate_t flags;
+3 -3
View File
@@ -77,7 +77,7 @@ static xcpt_t g_irqbutton[BOARD_NBUTTONS];
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -104,7 +104,7 @@ uint8_t board_buttons(void)
} }
/**************************************************************************** /****************************************************************************
* Name: up_irqbutton * Name: board_button_irq
* *
* Description: * Description:
* This function may be called to register an interrupt handler that will * This function may be called to register an interrupt handler that will
@@ -119,7 +119,7 @@ uint8_t board_buttons(void)
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+8 -8
View File
@@ -70,15 +70,15 @@ static xcpt_t g_irqbutton2;
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Name: up_irqbuttonx * Name: board_button_irqx
* *
* Description: * Description:
* This function implements the core of the up_irqbutton() logic. * This function implements the core of the board_button_irq() logic.
* *
****************************************************************************/ ****************************************************************************/
#if defined(CONFIG_GPIOA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS) #if defined(CONFIG_GPIOA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
static xcpt_t up_irqbuttonx(int irq, xcpt_t irqhandler, xcpt_t *store) static xcpt_t board_button_irqx(int irq, xcpt_t irqhandler, xcpt_t *store)
{ {
xcpt_t oldhandler; xcpt_t oldhandler;
irqstate_t flags; irqstate_t flags;
@@ -117,7 +117,7 @@ static xcpt_t up_irqbuttonx(int irq, xcpt_t irqhandler, xcpt_t *store)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -150,7 +150,7 @@ uint8_t board_buttons(void)
} }
/**************************************************************************** /****************************************************************************
* Name: up_irqbutton * Name: board_button_irq
* *
* Description: * Description:
* This function may be called to register an interrupt handler that will * This function may be called to register an interrupt handler that will
@@ -168,15 +168,15 @@ uint8_t board_buttons(void)
****************************************************************************/ ****************************************************************************/
#if defined(CONFIG_GPIOA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS) #if defined(CONFIG_GPIOA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
if (id == BUTTON1) if (id == BUTTON1)
{ {
return up_irqbuttonx(IRQ_BUTTON1, irqhandler, &g_irqbutton1); return board_button_irqx(IRQ_BUTTON1, irqhandler, &g_irqbutton1);
} }
else if (id == BUTTON2) else if (id == BUTTON2)
{ {
return up_irqbuttonx(IRQ_BUTTON2, irqhandler, &g_irqbutton2); return board_button_irqx(IRQ_BUTTON2, irqhandler, &g_irqbutton2);
} }
else else
{ {
+3 -3
View File
@@ -78,7 +78,7 @@ static xcpt_t g_irqsw0;
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -105,7 +105,7 @@ uint8_t board_buttons(void)
} }
/**************************************************************************** /****************************************************************************
* Name: up_irqbutton * Name: board_button_irq
* *
* Description: * Description:
* This function may be called to register an interrupt handler that will * This function may be called to register an interrupt handler that will
@@ -123,7 +123,7 @@ uint8_t board_buttons(void)
****************************************************************************/ ****************************************************************************/
#if defined(CONFIG_GPIOA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS) #if defined(CONFIG_GPIOA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+3 -3
View File
@@ -76,7 +76,7 @@ static xcpt_t g_irqbp2;
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -103,7 +103,7 @@ uint8_t board_buttons(void)
} }
/**************************************************************************** /****************************************************************************
* Name: up_irqbutton * Name: board_button_irq
* *
* Description: * Description:
* This function may be called to register an interrupt handler that will * This function may be called to register an interrupt handler that will
@@ -121,7 +121,7 @@ uint8_t board_buttons(void)
****************************************************************************/ ****************************************************************************/
#if defined(CONFIG_GPIOA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS) #if defined(CONFIG_GPIOA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+3 -3
View File
@@ -93,7 +93,7 @@ static xcpt_t g_irquser1;
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -120,7 +120,7 @@ uint8_t board_buttons(void)
} }
/**************************************************************************** /****************************************************************************
* Name: up_irqbutton * Name: board_button_irq
* *
* Description: * Description:
* This function may be called to register an interrupt handler that will * This function may be called to register an interrupt handler that will
@@ -136,7 +136,7 @@ uint8_t board_buttons(void)
****************************************************************************/ ****************************************************************************/
#if defined(CONFIG_SAMA5_PIOE_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS) #if defined(CONFIG_SAMA5_PIOE_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+4 -4
View File
@@ -78,7 +78,7 @@ static const uint16_t g_buttons[NUM_BUTTONS] =
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -137,7 +137,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be called to * After board_button_initialize() has been called, board_buttons() may be called to
@@ -145,7 +145,7 @@ uint8_t board_buttons(void)
* with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT * with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT
* definitions in board.h for the meaning of each bit. * definitions in board.h for the meaning of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration * BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration
@@ -155,7 +155,7 @@ uint8_t board_buttons(void)
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+4 -4
View File
@@ -70,7 +70,7 @@
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -101,7 +101,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be called to * After board_button_initialize() has been called, board_buttons() may be called to
@@ -109,7 +109,7 @@ uint8_t board_buttons(void)
* with each bit associated with a button. See the BUTTON_*_BIT * with each bit associated with a button. See the BUTTON_*_BIT
* definitions in board.h for the meaning of each bit. * definitions in board.h for the meaning of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BUTTON_* definitions in board.h for the meaning of enumeration * BUTTON_* definitions in board.h for the meaning of enumeration
@@ -119,7 +119,7 @@ uint8_t board_buttons(void)
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+4 -4
View File
@@ -79,7 +79,7 @@ static const uint16_t g_buttons[NUM_BUTTONS] =
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -138,7 +138,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be called to * After board_button_initialize() has been called, board_buttons() may be called to
@@ -146,7 +146,7 @@ uint8_t board_buttons(void)
* with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT * with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT
* definitions in board.h for the meaning of each bit. * definitions in board.h for the meaning of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration * BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration
@@ -156,7 +156,7 @@ uint8_t board_buttons(void)
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+1 -1
View File
@@ -304,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_buttonhandlers[BUTTON_INDEX(i)]); xcpt_t oldhandler = board_button_irq(i, g_buttonhandlers[BUTTON_INDEX(i)]);
if (oldhandler != NULL) if (oldhandler != NULL)
{ {
+4 -4
View File
@@ -79,7 +79,7 @@ static const uint16_t g_buttons[NUM_BUTTONS] =
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -138,7 +138,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be called to * After board_button_initialize() has been called, board_buttons() may be called to
@@ -146,7 +146,7 @@ uint8_t board_buttons(void)
* with each bit associated with a button. See the BUTTON_*_BIT * with each bit associated with a button. See the BUTTON_*_BIT
* definitions in board.h for the meaning of each bit. * definitions in board.h for the meaning of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BUTTON_* definitions in board.h for the meaning of enumeration * BUTTON_* definitions in board.h for the meaning of enumeration
@@ -156,7 +156,7 @@ uint8_t board_buttons(void)
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+4 -4
View File
@@ -79,7 +79,7 @@ static const uint16_t g_buttons[NUM_BUTTONS] =
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -138,7 +138,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be called to * After board_button_initialize() has been called, board_buttons() may be called to
@@ -146,7 +146,7 @@ uint8_t board_buttons(void)
* with each bit associated with a button. See the BUTTON_*_BIT * with each bit associated with a button. See the BUTTON_*_BIT
* definitions in board.h for the meaning of each bit. * definitions in board.h for the meaning of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BUTTON_* definitions in board.h for the meaning of enumeration * BUTTON_* definitions in board.h for the meaning of enumeration
@@ -156,7 +156,7 @@ uint8_t board_buttons(void)
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+4 -4
View File
@@ -59,7 +59,7 @@
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -88,7 +88,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be called to * After board_button_initialize() has been called, board_buttons() may be called to
@@ -96,7 +96,7 @@ uint8_t board_buttons(void)
* with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT * with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT
* definitions in board.h for the meaning of each bit. * definitions in board.h for the meaning of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration * BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration
@@ -106,7 +106,7 @@ uint8_t board_buttons(void)
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+4 -4
View File
@@ -79,7 +79,7 @@ static const uint16_t g_buttons[NUM_BUTTONS] =
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -133,7 +133,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be called to * After board_button_initialize() has been called, board_buttons() may be called to
@@ -141,7 +141,7 @@ uint8_t board_buttons(void)
* with each bit associated with a button. See the BUTTON_*_BIT * with each bit associated with a button. See the BUTTON_*_BIT
* definitions in board.h for the meaning of each bit. * definitions in board.h for the meaning of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BUTTON_* definitions in board.h for the meaning of enumeration * BUTTON_* definitions in board.h for the meaning of enumeration
@@ -151,7 +151,7 @@ uint8_t board_buttons(void)
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+4 -4
View File
@@ -79,7 +79,7 @@ static const uint16_t g_buttons[NUM_BUTTONS] =
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -133,7 +133,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be called to * After board_button_initialize() has been called, board_buttons() may be called to
@@ -141,7 +141,7 @@ uint8_t board_buttons(void)
* with each bit associated with a button. See the BUTTON_*_BIT * with each bit associated with a button. See the BUTTON_*_BIT
* definitions in board.h for the meaning of each bit. * definitions in board.h for the meaning of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BUTTON_* definitions in board.h for the meaning of enumeration * BUTTON_* definitions in board.h for the meaning of enumeration
@@ -151,7 +151,7 @@ uint8_t board_buttons(void)
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+4 -4
View File
@@ -79,7 +79,7 @@ static const uint16_t g_buttons[NUM_BUTTONS] =
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -133,7 +133,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be called to * After board_button_initialize() has been called, board_buttons() may be called to
@@ -141,7 +141,7 @@ uint8_t board_buttons(void)
* with each bit associated with a button. See the BUTTON_*_BIT * with each bit associated with a button. See the BUTTON_*_BIT
* definitions in board.h for the meaning of each bit. * definitions in board.h for the meaning of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BUTTON_* definitions in board.h for the meaning of enumeration * BUTTON_* definitions in board.h for the meaning of enumeration
@@ -151,7 +151,7 @@ uint8_t board_buttons(void)
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+1 -1
View File
@@ -135,7 +135,7 @@ void up_pmbuttons(void)
board_button_initialize(); board_button_initialize();
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t oldhandler = up_irqbutton(0, button_handler); xcpt_t oldhandler = board_button_irq(0, button_handler);
if (oldhandler != NULL) if (oldhandler != NULL)
{ {
+4 -4
View File
@@ -79,7 +79,7 @@ static const uint16_t g_buttons[NUM_BUTTONS] =
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -133,7 +133,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be called to * After board_button_initialize() has been called, board_buttons() may be called to
@@ -141,7 +141,7 @@ uint8_t board_buttons(void)
* with each bit associated with a button. See the BUTTON_*_BIT * with each bit associated with a button. See the BUTTON_*_BIT
* definitions in board.h for the meaning of each bit. * definitions in board.h for the meaning of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BUTTON_* definitions in board.h for the meaning of enumeration * BUTTON_* definitions in board.h for the meaning of enumeration
@@ -151,7 +151,7 @@ uint8_t board_buttons(void)
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+4 -4
View File
@@ -59,7 +59,7 @@
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -88,7 +88,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be called to * After board_button_initialize() has been called, board_buttons() may be called to
@@ -96,7 +96,7 @@ uint8_t board_buttons(void)
* with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT * with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT
* definitions in board.h for the meaning of each bit. * definitions in board.h for the meaning of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration * BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration
@@ -106,7 +106,7 @@ uint8_t board_buttons(void)
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+4 -4
View File
@@ -130,7 +130,7 @@ static const uint8_t g_buttoncn[NUM_BUTTONS] =
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -179,7 +179,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be called to * After board_button_initialize() has been called, board_buttons() may be called to
@@ -187,7 +187,7 @@ uint8_t board_buttons(void)
* with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT * with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT
* definitions in board.h for the meaning of each bit. * definitions in board.h for the meaning of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration * BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration
@@ -205,7 +205,7 @@ uint8_t board_buttons(void)
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+4 -4
View File
@@ -75,7 +75,7 @@
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -115,7 +115,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be called to * After board_button_initialize() has been called, board_buttons() may be called to
@@ -123,7 +123,7 @@ uint8_t board_buttons(void)
* with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT * with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT
* definitions in board.h for the meaning of each bit. * definitions in board.h for the meaning of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration * BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration
@@ -133,7 +133,7 @@ uint8_t board_buttons(void)
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
uint32_t pinset; uint32_t pinset;
+4 -4
View File
@@ -109,7 +109,7 @@ static const uint8_t g_buttoncn[NUM_BUTTONS] =
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -154,7 +154,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be called to * After board_button_initialize() has been called, board_buttons() may be called to
@@ -162,7 +162,7 @@ uint8_t board_buttons(void)
* with each bit associated with a button. See the BUTTON_*_BIT definitions in * with each bit associated with a button. See the BUTTON_*_BIT definitions in
* board.h for the meaning of each bit. * board.h for the meaning of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BUTTON_* definitions in board.h for the meaning of enumeration value. The * BUTTON_* definitions in board.h for the meaning of enumeration value. The
@@ -180,7 +180,7 @@ uint8_t board_buttons(void)
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
@@ -78,7 +78,7 @@ static const uint16_t g_buttons[NUM_BUTTONS] =
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -133,7 +133,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be called to * After board_button_initialize() has been called, board_buttons() may be called to
@@ -141,7 +141,7 @@ uint8_t board_buttons(void)
* with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT * with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT
* definitions in board.h for the meaning of each bit. * definitions in board.h for the meaning of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration * BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration
@@ -151,7 +151,7 @@ uint8_t board_buttons(void)
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS #ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t oldhandler = NULL; xcpt_t oldhandler = NULL;
+4 -4
View File
@@ -88,7 +88,7 @@ static xcpt_t g_oldhandler;
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
****************************************************************************/ ****************************************************************************/
@@ -140,7 +140,7 @@ uint8_t board_buttons(void)
* Description: * Description:
* board_button_initialize() must be called to initialize button resources. After * board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all * that, board_buttons() may be called to collect the current state of all
* buttons or up_irqbutton() may be called to register button interrupt * buttons or board_button_irq() may be called to register button interrupt
* handlers. * handlers.
* *
* After board_button_initialize() has been called, board_buttons() may be called to * After board_button_initialize() has been called, board_buttons() may be called to
@@ -148,7 +148,7 @@ uint8_t board_buttons(void)
* with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT * with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT
* definitions in board.h for the meaning of each bit. * definitions in board.h for the meaning of each bit.
* *
* up_irqbutton() may be called to register an interrupt handler that will * board_button_irq() may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is a * be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the * button enumeration value that uniquely identifies a button resource. See the
* BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration * BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of enumeration
@@ -158,7 +158,7 @@ uint8_t board_buttons(void)
************************************************************************************/ ************************************************************************************/
#if defined CONFIG_ARCH_IRQBUTTONS && CONFIG_GPIO_IRQ #if defined CONFIG_ARCH_IRQBUTTONS && CONFIG_GPIO_IRQ
xcpt_t up_irqbutton(int id, xcpt_t irqhandler) xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{ {
xcpt_t rethandler = NULL; xcpt_t rethandler = NULL;
irqstate_t flags; irqstate_t flags;