mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +08:00
board_button_irq: API change in upstream
This commit is contained in:
@@ -68,7 +68,6 @@
|
|||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
void board_button_initialize(void);
|
void board_button_initialize(void);
|
||||||
xcpt_t board_button_irq(int id, xcpt_t irqhandler);
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Button support.
|
* Button support.
|
||||||
*
|
*
|
||||||
@@ -137,17 +136,17 @@ uint32_t board_buttons(void)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_IRQBUTTONS
|
#ifdef CONFIG_ARCH_IRQBUTTONS
|
||||||
xcpt_t board_button_irq(int id, xcpt_t irqhandler)
|
int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg)
|
||||||
{
|
{
|
||||||
xcpt_t oldhandler = NULL;
|
int ret = -EINVAL;
|
||||||
|
|
||||||
/* The following should be atomic */
|
/* The following should be atomic */
|
||||||
|
|
||||||
if (id == IRQBUTTON) {
|
if (id == IRQBUTTON) {
|
||||||
oldhandler = stm32_gpiosetevent(BUTTON_BOOT0n, true, true, true, irqhandler);
|
ret = stm32_gpiosetevent(BUTTON_BOOT0n, true, true, true, irqhandler, arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
return oldhandler;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif /* CONFIG_ARCH_BUTTONS */
|
#endif /* CONFIG_ARCH_BUTTONS */
|
||||||
|
|||||||
Reference in New Issue
Block a user