*
****************************************************************************/
/****************************************************************************
- * arch/arm/src/sidk_s5jt200/src/s5j_buttons.c
+ * os/arch/arm/src/sidk_s5jt200/src/s5jt200_buttons.c
*
* Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
* Name: board_button_initialize
*
* Description:
- * board_button_initialize() must be called to initialize button resources. After
- * that, board_buttons() may be called to collect the current state of all
- * buttons or board_button_irq() may be called to register button interrupt
- * handlers.
+ * board_button_initialize() must be called to initialize button resources.
+ * After that, board_buttons() may be called to collect the current state
+ * of all buttons or board_button_irq() may be called to register button
+ * interrupt handlers.
*
****************************************************************************/
return ret;
}
-/************************************************************************************
+/****************************************************************************
* Button support.
*
* Description:
- * board_button_initialize() must be called to initialize button resources. After
- * that, board_buttons() may be called to collect the current state of all
- * buttons or board_button_irq() may be called to register button interrupt
- * handlers.
- *
- * After board_button_initialize() has been called, board_buttons() may be called to
- * collect the state of all buttons. board_buttons() returns an 8-bit bit set
- * with each bit associated with a button. See the BUTTON_*_BIT
- * definitions in board.h for the meaning of each bit.
- *
- * 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_* 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).
+ * board_button_initialize() must be called to initialize button resources.
+ * After that, board_buttons() may be called to collect the current state
+ * of all buttons or board_button_irq() may be called to register button
+ * interrupt handlers.
+ *
+ * After board_button_initialize() has been called, board_buttons() may be
+ * called to collect the state of all buttons. board_buttons() returns an
+ * 8-bit bit set with each bit associated with a button. See the
+ * BUTTON_*_BIT definitions in board.h for the meaning of each bit.
+ *
+ * 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_* 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).
*
- ************************************************************************************/
+ ****************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t board_button_irq(int id, xcpt_t irqhandler)
up_enable_irq(IRQ_EINT0);
} else {
/* TO DO: How can it contolled ? */
-
- //oldhandler = irqhandler;
}
return oldhandler;
gpio_eint_clear_pending(gpio);
}
#endif
-#endif /* CONFIG_ARCH_BUTTONS */
+#endif /* CONFIG_ARCH_BUTTONS */