diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-01-24 13:50:23 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-01-24 13:50:23 -0600 |
commit | ea439de0bb25f37ffc4004b6532bf53810511c3d (patch) | |
tree | 577b3e0aaa6a2878a6cc5d91792383781879fc28 /nuttx/configs/spark | |
parent | 1e646824d1fee99cba2f721cfc2181cfdd31d7f1 (diff) | |
download | nuttx-ea439de0bb25f37ffc4004b6532bf53810511c3d.tar.gz nuttx-ea439de0bb25f37ffc4004b6532bf53810511c3d.tar.bz2 nuttx-ea439de0bb25f37ffc4004b6532bf53810511c3d.zip |
Rename up_buttoninit to board_button_intialize
Diffstat (limited to 'nuttx/configs/spark')
-rw-r--r-- | nuttx/configs/spark/include/board.h | 30 | ||||
-rw-r--r-- | nuttx/configs/spark/src/up_boot.c | 2 | ||||
-rw-r--r-- | nuttx/configs/spark/src/up_buttons.c | 14 |
3 files changed, 9 insertions, 37 deletions
diff --git a/nuttx/configs/spark/include/board.h b/nuttx/configs/spark/include/board.h index 2421f69a8..153c2a67a 100644 --- a/nuttx/configs/spark/include/board.h +++ b/nuttx/configs/spark/include/board.h @@ -221,36 +221,6 @@ extern "C" /************************************************************************************ * Public Function Prototypes ************************************************************************************/ -/************************************************************************************ - * 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 /************************************************************************************ * Name: up_ledinit, up_setled, and up_setleds diff --git a/nuttx/configs/spark/src/up_boot.c b/nuttx/configs/spark/src/up_boot.c index 3fb9a6ef1..774b3c03e 100644 --- a/nuttx/configs/spark/src/up_boot.c +++ b/nuttx/configs/spark/src/up_boot.c @@ -78,7 +78,7 @@ void stm32_boardinitialize(void) #endif #ifdef CONFIG_ARCH_HAVE_BUTTONS - up_buttoninit(); + board_button_initialize(); #endif /* Configure SPI chip selects if 1) SP2 is not disabled, and 2) the weak function diff --git a/nuttx/configs/spark/src/up_buttons.c b/nuttx/configs/spark/src/up_buttons.c index 33791417a..ddba1e89e 100644 --- a/nuttx/configs/spark/src/up_buttons.c +++ b/nuttx/configs/spark/src/up_buttons.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/spark/src/up_buttons.c * - * Copyright (C) 2011-2013 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 "spark.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 + * 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) { /* Configure the GPIO pins as inputs. NOTE that EXTI interrupts are * configured for all pins. @@ -97,12 +99,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 * definitions in board.h for the meaning of each bit. |