From 6ebace65d8530505ae32559d06b6a68b57b1b585 Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 15 Aug 2011 22:11:24 +0000 Subject: 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 --- nuttx/configs/kwikstik-k40/src/up_buttons.c | 57 ++--------------------------- 1 file changed, 4 insertions(+), 53 deletions(-) (limited to 'nuttx/configs/kwikstik-k40/src/up_buttons.c') 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 */ -- cgit v1.2.3