|
RocketLogger
1.1.6
|
#include "gpio.h"
Include dependency graph for rl_deamon.c:Go to the source code of this file.
Macros | |
| #define | GPIO_BUTTON 26 |
| Linux GPIO number of start/stop button. More... | |
| #define | MIN_INTERVAL 1 |
| Minimal time interval between two interrupts (in seconds) More... | |
Functions | |
| int | gpio_setup (void) |
| void | interrupt_handler (int value) |
| int | main (void) |
| #define GPIO_BUTTON 26 |
Linux GPIO number of start/stop button.
Copyright (c) 2016-2019, Swiss Federal Institute of Technology (ETH Zurich) All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition at line 35 of file rl_deamon.c.
Referenced by gpio_setup(), and main().
| #define MIN_INTERVAL 1 |
Minimal time interval between two interrupts (in seconds)
Definition at line 37 of file rl_deamon.c.
Referenced by interrupt_handler().
| int gpio_setup | ( | void | ) |
Setup button GPIO
Definition at line 43 of file rl_deamon.c.
References FAILURE, FALLING, GPIO_BUTTON, gpio_dir(), gpio_export(), gpio_interrupt(), IN, and SUCCESS.
Referenced by main().
Here is the call graph for this function:| void interrupt_handler | ( | int | value | ) |
GPIO interrupt handler
| value | GPIO value after interrupt |
Definition at line 60 of file rl_deamon.c.
References MIN_INTERVAL, and status.
Referenced by main().
| int main | ( | void | ) |
RocketLogger deamon program. Continuously waits on interrupt on button GPIO and starts/stops RocketLogger
Arguments: none
Definition at line 85 of file rl_deamon.c.
References FAILURE, GPIO_BUTTON, gpio_setup(), gpio_wait_interrupt(), and interrupt_handler().
Here is the call graph for this function: