diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-07 14:23:05 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-07 14:23:05 +0000 |
commit | 6aaedb5fc741627830baa841728c504b62e047a6 (patch) | |
tree | 10086eb56660f593c9b81e6ce769aa7af7cb9fd0 /nuttx/configs/sam3u-ek/include | |
parent | 98dcf81241c8ea176634617af8c4d3146c914eb3 (diff) | |
download | px4-nuttx-6aaedb5fc741627830baa841728c504b62e047a6.tar.gz px4-nuttx-6aaedb5fc741627830baa841728c504b62e047a6.tar.bz2 px4-nuttx-6aaedb5fc741627830baa841728c504b62e047a6.zip |
Standardize button interfaces
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3749 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/sam3u-ek/include')
-rwxr-xr-x | nuttx/configs/sam3u-ek/include/board.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/nuttx/configs/sam3u-ek/include/board.h b/nuttx/configs/sam3u-ek/include/board.h index 45335e6b0..7721d0f88 100755 --- a/nuttx/configs/sam3u-ek/include/board.h +++ b/nuttx/configs/sam3u-ek/include/board.h @@ -2,7 +2,7 @@ * configs/sam3u-ek/include/board.h * include/arch/board/board.h * - * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2009-2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -160,9 +160,8 @@ EXTERN void sam3u_boardinitialize(void); * * Description: * up_buttoninit() must be called to initialize button resources. After that, - * 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* definitions above for the meaning of each bit in the returned value. + * up_buttons() may be called to collect the current state of all buttons or + * up_irqbutton() may be called to register button interrupt handlers. * ************************************************************************************/ @@ -183,18 +182,18 @@ EXTERN void up_buttoninit(void); EXTERN uint8_t up_buttons(void); /************************************************************************************ - * Name: up_irqbutton1/2 + * Name: up_irqbutton * * Description: - * These functions may be called to register an interrupt handler that will be - * called when BUTTON1/2 is depressed. The previous interrupt handler value is + * This function may be called to register an interrupt handler that will be + * called when a button is depressed or released. The ID value is one of the + * BUTTON* definitions provided above. The previous interrupt handler address is * returned (so that it may restored, if so desired). * ************************************************************************************/ #ifdef CONFIG_GPIOA_IRQ -EXTERN xcpt_t up_irqbutton1(xcpt_t irqhandler); -EXTERN xcpt_t up_irqbutton2(xcpt_t irqhandler); +EXTERN xcpt_t up_irqbutton(int id, xcpt_t irqhandler); #endif #endif /* CONFIG_ARCH_BUTTONS */ |