diff options
Diffstat (limited to 'nuttx/configs/fire-stm32v2/src/up_buttons.c')
-rw-r--r-- | nuttx/configs/fire-stm32v2/src/up_buttons.c | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/nuttx/configs/fire-stm32v2/src/up_buttons.c b/nuttx/configs/fire-stm32v2/src/up_buttons.c index 738d65d5f..e9ebdc18e 100644 --- a/nuttx/configs/fire-stm32v2/src/up_buttons.c +++ b/nuttx/configs/fire-stm32v2/src/up_buttons.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/fire-stm32v2/src/up_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> * * 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 "fire-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) { /* Configure the GPIO pins as inputs. NOTE that EXTI interrupts are * configured for some pins but NOT used in this file @@ -106,28 +108,29 @@ uint8_t up_buttons(void) return ret; } -/************************************************************************************ +/***************************************************************************** * 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 + * 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 values. The previous interrupt handler address is returned + * (so that it may restored, if so desired). * - ************************************************************************************/ + ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS xcpt_t up_irqbutton(int id, xcpt_t irqhandler) |