mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
stm32_gpiosetevent: GPIO IRQ logic no longer returns the xcpt_t oldhandler. This value is useless and dangerous after the recent changes to interrupt argument passing.
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
@@ -159,18 +160,17 @@ uint8_t board_buttons(void)
|
||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||
{
|
||||
xcpt_t oldhandler = NULL;
|
||||
int ret = -EINVAL;
|
||||
|
||||
/* The following should be atomic */
|
||||
|
||||
if (id >= MIN_IRQBUTTON && id <= MAX_IRQBUTTON)
|
||||
{
|
||||
oldhandler = stm32_gpiosetevent(g_buttons[id], true, true, true,
|
||||
irqhandler, arg);
|
||||
ret = stm32_gpiosetevent(g_buttons[id], true, true, true, irqhandler,
|
||||
arg);
|
||||
}
|
||||
|
||||
UNUSED(oldhandler);
|
||||
return OK;
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
#endif /* CONFIG_ARCH_BUTTONS */
|
||||
|
||||
Reference in New Issue
Block a user