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/sure-pic32mx | |
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/sure-pic32mx')
-rw-r--r-- | nuttx/configs/sure-pic32mx/include/board.h | 36 | ||||
-rw-r--r-- | nuttx/configs/sure-pic32mx/src/pic32mx_buttons.c | 10 |
2 files changed, 5 insertions, 41 deletions
diff --git a/nuttx/configs/sure-pic32mx/include/board.h b/nuttx/configs/sure-pic32mx/include/board.h index 3b4d7f798..f22c47123 100644 --- a/nuttx/configs/sure-pic32mx/include/board.h +++ b/nuttx/configs/sure-pic32mx/include/board.h @@ -169,42 +169,6 @@ extern "C" { #define EXTERN extern #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 - * 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_* 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). - * - * When an interrupt occurs, it is due to a change on the GPIO input pin - * associated with the button. In that case, all attached change - * notification handlers will be called. Each handler must maintain state - * and determine if the unlying GPIO button input value changed. - * - ****************************************************************************/ - -#ifdef CONFIG_ARCH_BUTTONS -EXTERN void up_buttoninit(void); -EXTERN uint8_t up_buttons(void); -#ifdef CONFIG_ARCH_IRQBUTTONS -EXTERN xcpt_t up_irqbutton(int id, xcpt_t irqhandler); -#endif -#endif - #undef EXTERN #ifdef __cplusplus } diff --git a/nuttx/configs/sure-pic32mx/src/pic32mx_buttons.c b/nuttx/configs/sure-pic32mx/src/pic32mx_buttons.c index ce9acd875..cfcdbede9 100644 --- a/nuttx/configs/sure-pic32mx/src/pic32mx_buttons.c +++ b/nuttx/configs/sure-pic32mx/src/pic32mx_buttons.c @@ -125,17 +125,17 @@ static const uint8_t g_buttoncn[NUM_BUTTONS] = ****************************************************************************/ /**************************************************************************** - * 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) { int i; @@ -177,12 +177,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. |