mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
board_button_irq: Button IRQ logic no longer returns the xcpt_t oldhandler. There value is useless and dangerous after the recent changes to interrupt argument passing.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* configs/cloudctrl/src/stm32_buttons.c
|
||||
*
|
||||
* Copyright (C) 2012, 2014-2015 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2012, 2014-2015, 2017 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* Darcy Gong <darcy.gong@gmail.com>
|
||||
*
|
||||
@@ -151,15 +151,13 @@ uint8_t board_buttons(void)
|
||||
* 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
|
||||
* button enumeration value that uniquely identifies a button resource. See
|
||||
* the
|
||||
* BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of
|
||||
* enumeration value. The previous interrupt handler address is returned
|
||||
* (so that it may restored, if so desired).
|
||||
* the BUTTON_* and JOYSTICK_* definitions in board.h for the meaning of
|
||||
* enumeration value.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||
xcpt_t board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
{
|
||||
xcpt_t oldhandler = NULL;
|
||||
|
||||
@@ -171,7 +169,8 @@ xcpt_t board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
irqhandler, arg);
|
||||
}
|
||||
|
||||
return oldhandler;
|
||||
UNUSED(oldhandler);
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
#endif /* CONFIG_ARCH_BUTTONS */
|
||||
|
||||
Reference in New Issue
Block a user