summaryrefslogtreecommitdiff
path: root/nuttx/configs/kwikstik-k40/src/up_buttons.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/configs/kwikstik-k40/src/up_buttons.c')
-rw-r--r--nuttx/configs/kwikstik-k40/src/up_buttons.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/nuttx/configs/kwikstik-k40/src/up_buttons.c b/nuttx/configs/kwikstik-k40/src/up_buttons.c
index a30a480bc..0358cda33 100644
--- a/nuttx/configs/kwikstik-k40/src/up_buttons.c
+++ b/nuttx/configs/kwikstik-k40/src/up_buttons.c
@@ -1,7 +1,7 @@
/****************************************************************************
* configs/kwikstik-k40/src/up_buttons.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2011, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,9 @@
#include <stdint.h>
+#include <nuttx/arch.h>
#include <arch/board/board.h>
+
#include "kwikstik-internal.h"
#ifdef CONFIG_ARCH_BUTTONS
@@ -63,17 +65,17 @@
****************************************************************************/
/****************************************************************************
- * Name: up_buttoninit
+ * Name: board_button_initialize
*
* Description:
- * up_buttoninit() must be called to initialize button resources. After
- * that, up_buttons() may be called to collect the current state of all
- * buttons or up_irqbutton() may be called to register button interrupt
+ * board_button_initialize() must be called to initialize button resources.
+ * After that, up_buttons() may be called to collect the current state of
+ * all buttons or up_irqbutton() may be called to register button interrupt
* handlers.
*
****************************************************************************/
-void up_buttoninit(void)
+void board_button_initialize(void)
{
/* The KwikStik-K40 board has no standard GPIO contact buttons */
}
@@ -89,28 +91,29 @@ uint8_t up_buttons(void)
return 0;
}
-/************************************************************************************
+/****************************************************************************
* Button support.
*
* Description:
- * up_buttoninit() must be called to initialize button resources. After
- * that, up_buttons() may be called to collect the current state of all
- * buttons or up_irqbutton() may be called to register button interrupt
+ * board_button_initialize() must be called to initialize button resources.
+ * After that, up_buttons() may be called to collect the current state of
+ * all buttons or up_irqbutton() may be called to register button interrupt
* handlers.
*
- * After up_buttoninit() has been called, up_buttons() may be called to
- * collect the state of all buttons. up_buttons() returns an 8-bit bit set
- * with each bit associated with a button. See the BUTTON_*_BIT and JOYSTICK_*_BIT
- * definitions in board.h for the meaning of each bit.
+ * After board_button_initialize() has been called, up_buttons() may be
+ * called to collect the state of all buttons. up_buttons() returns an
+ * 8-bit bit set with each bit associated with a button. See the
+ * BUTTON_*_BIT and JOYSTICK_*_BIT definitions in board.h for the meaning
+ * of each bit.
*
* up_irqbutton() 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).
+ * 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 be restored, if so desired).
*
- ************************************************************************************/
+ ****************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t up_irqbutton(int id, xcpt_t irqhandler)