diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2011-03-26 01:04:10 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2011-03-26 01:04:10 +0000 |
commit | f3e64e55c04e9eef02c64d64d3b9117143502ccd (patch) | |
tree | 4c791787398c9f76ccd9c8a56e1dd139c2a4e8e4 /nuttx/configs/vsn/src/buttons.c | |
parent | 92a6346ae8bb62459481b880abf4f211b4bd4031 (diff) |
Incorporate changes from Uros Platise
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3419 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/configs/vsn/src/buttons.c')
-rw-r--r-- | nuttx/configs/vsn/src/buttons.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/nuttx/configs/vsn/src/buttons.c b/nuttx/configs/vsn/src/buttons.c index 3025b373c0..c0a0f72975 100644 --- a/nuttx/configs/vsn/src/buttons.c +++ b/nuttx/configs/vsn/src/buttons.c @@ -1,11 +1,9 @@ /**************************************************************************** * configs/vsn/src/buttons.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Copyright (C) 2011 Uros Platise. All rights reserved. * - * Authors: Gregory Nutt <spudmonkey@racsa.co.cr> - * Uros Platise <uros.platise@isotel.eu> + * Authors: Uros Platise <uros.platise@isotel.eu> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -36,17 +34,18 @@ * ****************************************************************************/ -/**************************************************************************** - * Included Files - ****************************************************************************/ +/** \file + * \author Uros Platise + * \brief VSN Button + */ + +#ifdef CONFIG_ARCH_BUTTONS #include <nuttx/config.h> #include <stdint.h> #include <arch/board/board.h> #include "vsn.h" -#ifdef CONFIG_ARCH_BUTTONS - /**************************************************************************** * Definitions ****************************************************************************/ @@ -59,12 +58,19 @@ * Private Functions ****************************************************************************/ -/**************************************************************************** - * Public Functions - ****************************************************************************/ +/** Called from an interrupt + * + * \todo Measure the time button is being pressed, and then: + * - if short signal all processes (tasks and threads) with 'button user request': SIGUSR1 + * - if long (>0.5 s) signal all with 'power-off request': SIGTERM + **/ +void buttons_callback(void) +{ +} + /**************************************************************************** - * Name: up_buttoninit + * Public Functions ****************************************************************************/ void up_buttoninit(void) @@ -72,13 +78,11 @@ void up_buttoninit(void) stm32_configgpio(GPIO_PUSHBUTTON); } -/**************************************************************************** - * Name: up_buttons - ****************************************************************************/ uint8_t up_buttons(void) { return stm32_gpioread(GPIO_PUSHBUTTON); } + #endif /* CONFIG_ARCH_BUTTONS */ |