diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-26 01:04:10 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-26 01:04:10 +0000 |
commit | 54150a8f62d57bd3af5efce1439ba3c29e20f07f (patch) | |
tree | 4c791787398c9f76ccd9c8a56e1dd139c2a4e8e4 /nuttx/configs/vsn/src/buttons.c | |
parent | c62abcf9c8c26757ac5e6fbf0fd9813f1ba087a6 (diff) | |
download | px4-nuttx-54150a8f62d57bd3af5efce1439ba3c29e20f07f.tar.gz px4-nuttx-54150a8f62d57bd3af5efce1439ba3c29e20f07f.tar.bz2 px4-nuttx-54150a8f62d57bd3af5efce1439ba3c29e20f07f.zip |
Incorporate changes from Uros Platise
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3419 42af7a65-404d-4744-a932-0658087f49c3
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 3025b373c..c0a0f7297 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 */ |