diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-08-15 22:11:24 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-08-15 22:11:24 +0000 |
commit | 6ebace65d8530505ae32559d06b6a68b57b1b585 (patch) | |
tree | 8eb9490e587c97c4be503d4bcb69cdd0d0fb196a /nuttx/configs/kwikstik-k40/src/up_buttons.c | |
parent | 6738657390598bac04d5be9d72ee6021fe87e835 (diff) | |
download | px4-nuttx-6ebace65d8530505ae32559d06b6a68b57b1b585.tar.gz px4-nuttx-6ebace65d8530505ae32559d06b6a68b57b1b585.tar.bz2 px4-nuttx-6ebace65d8530505ae32559d06b6a68b57b1b585.zip |
Add board support for the FreeScale Kinetis TWR-K60N512
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3884 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/kwikstik-k40/src/up_buttons.c')
-rw-r--r-- | nuttx/configs/kwikstik-k40/src/up_buttons.c | 57 |
1 files changed, 4 insertions, 53 deletions
diff --git a/nuttx/configs/kwikstik-k40/src/up_buttons.c b/nuttx/configs/kwikstik-k40/src/up_buttons.c index 8ba02f4a6..3c944c508 100644 --- a/nuttx/configs/kwikstik-k40/src/up_buttons.c +++ b/nuttx/configs/kwikstik-k40/src/up_buttons.c @@ -53,16 +53,6 @@ /**************************************************************************** * Private Data ****************************************************************************/ -/* Pin configuration for each KwikStik-K40 button. This array is indexed by - * the BUTTON_* definitions in board.h - */ - -#if 0 -static const uint16_t g_buttons[NUM_BUTTONS] = -{ -}; -#endif -#warning "Missing logic" /**************************************************************************** * Private Functions @@ -85,18 +75,7 @@ static const uint16_t g_buttons[NUM_BUTTONS] = void up_buttoninit(void) { -#if 0 - int i; - - /* Configure the GPIO pins as inputs. */ - - for (i = 0; i < NUM_BUTTONS; i++) - { - kinetis_configgpio(g_buttons[i]); - } -#else -#warning "Missing logic" -#endif + /* The KwikStik-K40 board has no standard GPIO contact buttons */ } /**************************************************************************** @@ -105,31 +84,9 @@ void up_buttoninit(void) uint8_t up_buttons(void) { -#if 0 - uint8_t ret = 0; - int i; - - /* Check that state of each key */ + /* The KwikStik-K40 board has no standard GPIO contact buttons */ - for (i = 0; i < NUM_BUTTONS; i++) - { - /* A LOW value means that the key is pressed for most keys */ - - bool released = kinetis_gpioread(g_buttons[i]); - - /* Accumulate the set of depressed (not released) keys */ - - if (!released) - { - ret |= (1 << i); - } - } - - return ret; -#else -#warning "Missing logic" return 0; -#endif } /************************************************************************************ @@ -158,15 +115,9 @@ uint8_t up_buttons(void) #ifdef CONFIG_ARCH_IRQBUTTONS xcpt_t up_irqbutton(int id, xcpt_t irqhandler) { - xcpt_t oldhandler = NULL; - - /* The following should be atomic */ + /* The KwikStik-K40 board has no standard GPIO contact buttons */ - if (id >= MIN_IRQBUTTON && id <= MAX_IRQBUTTON) - { - oldhandler = kinetis_gpiosetevent(g_buttons[id], true, true, true, irqhandler); - } - return oldhandler; + return NULL; } #endif #endif /* CONFIG_ARCH_BUTTONS */ |