summaryrefslogtreecommitdiffstats
path: root/nuttx/configs/stm32vldiscovery
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-01-24 13:50:23 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-01-24 13:50:23 -0600
commitea439de0bb25f37ffc4004b6532bf53810511c3d (patch)
tree577b3e0aaa6a2878a6cc5d91792383781879fc28 /nuttx/configs/stm32vldiscovery
parent1e646824d1fee99cba2f721cfc2181cfdd31d7f1 (diff)
Rename up_buttoninit to board_button_intialize
Diffstat (limited to 'nuttx/configs/stm32vldiscovery')
-rw-r--r--nuttx/configs/stm32vldiscovery/include/board.h31
-rw-r--r--nuttx/configs/stm32vldiscovery/src/stm32_buttons.c14
2 files changed, 8 insertions, 37 deletions
diff --git a/nuttx/configs/stm32vldiscovery/include/board.h b/nuttx/configs/stm32vldiscovery/include/board.h
index ebc04f9851..76f25bffe1 100644
--- a/nuttx/configs/stm32vldiscovery/include/board.h
+++ b/nuttx/configs/stm32vldiscovery/include/board.h
@@ -184,37 +184,6 @@ void stm32_setled(int led, bool ledon);
void stm32_setleds(uint8_t ledset);
#endif
-/************************************************************************************
- * 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
- * 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.
- *
- * 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).
- *
- ************************************************************************************/
-
-#ifdef CONFIG_ARCH_BUTTONS
-void up_buttoninit(void);
-uint8_t up_buttons(void);
-#ifdef CONFIG_ARCH_IRQBUTTONS
-xcpt_t up_irqbutton(int id, xcpt_t irqhandler);
-#endif
-#endif
-
#undef EXTERN
#if defined(__cplusplus)
}
diff --git a/nuttx/configs/stm32vldiscovery/src/stm32_buttons.c b/nuttx/configs/stm32vldiscovery/src/stm32_buttons.c
index c614fdca0a..d214ae323b 100644
--- a/nuttx/configs/stm32vldiscovery/src/stm32_buttons.c
+++ b/nuttx/configs/stm32vldiscovery/src/stm32_buttons.c
@@ -1,7 +1,7 @@
/****************************************************************************
* configs/stm32vldiscovery/src/stm32_buttons.c
*
- * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2012, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
* Freddie Chopin <freddie_chopin@op.pl>
*
@@ -42,7 +42,9 @@
#include <stdint.h>
+#include <nuttx/arch.h>
#include <arch/board/board.h>
+
#include "stm32vldiscovery.h"
#ifdef CONFIG_ARCH_BUTTONS
@@ -52,17 +54,17 @@
****************************************************************************/
/****************************************************************************
- * Name: up_buttoninit
+ * Name: board_button_initialize
*
* Description:
- * up_buttoninit() must be called to initialize button resources. After
+ * 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)
{
stm32_configgpio(GPIO_BTN_0); /* Configure the GPIO pins as inputs. */
}
@@ -84,12 +86,12 @@ uint8_t up_buttons(void)
* Button support.
*
* Description:
- * up_buttoninit() must be called to initialize button resources. After
+ * 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
+ * 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.