|
RocketLogger
1.1.5
|
#include "gpio.h"
Include dependency graph for gpio.c:Go to the source code of this file.
Functions | |
| int | gpio_unexport (int num) |
| int | gpio_export (int num) |
| int | gpio_dir (int num, rl_direction dir) |
| int | gpio_interrupt (int num, rl_edge edge) |
| int | gpio_set_value (int num, int val) |
| int | gpio_get_value (int num) |
| int | gpio_wait_interrupt (int num, int timeout) |
| int gpio_dir | ( | int | num, |
| rl_direction | dir | ||
| ) |
| int gpio_export | ( | int | num | ) |
| int gpio_get_value | ( | int | num | ) |
| int gpio_interrupt | ( | int | num, |
| rl_edge | edge | ||
| ) |
Set direction of GPIO interrupt edge.
| num | Linux GPIO number. |
| edge | Edge direction. |
Definition at line 117 of file gpio.c.
References BOTH, ERROR, FAILURE, FALLING, GPIO_PATH, MAX_PATH_LENGTH, NONE, RISING, rl_log(), and SUCCESS.
Referenced by gpio_setup().
Here is the call graph for this function:| int gpio_set_value | ( | int | num, |
| int | val | ||
| ) |
Set value of GPIO.
| num | Linux GPIO number. |
| val | Value (0 or 1). |
Definition at line 156 of file gpio.c.
References ERROR, FAILURE, GPIO_PATH, MAX_PATH_LENGTH, rl_log(), and SUCCESS.
Referenced by hw_close(), hw_init(), and hw_sample().
Here is the call graph for this function:| int gpio_unexport | ( | int | num | ) |
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. Unexport (deactivate) a GPIO.
| num | Linux GPIO number. |
Definition at line 39 of file gpio.c.
References ERROR, FAILURE, GPIO_PATH, rl_log(), and SUCCESS.
Referenced by hw_close().
Here is the call graph for this function:| int gpio_wait_interrupt | ( | int | num, |
| int | timeout | ||
| ) |
Wait on GPIO interrupt.
| num | Linux GPIO number. |
| timeout | Maximum waiting time (in ms). Set to 0 for infinite time out. |
Definition at line 212 of file gpio.c.
References ERROR, FAILURE, GPIO_PATH, MAX_PATH_LENGTH, MIN_BUTTON_TIME, and rl_log().
Referenced by main().
Here is the call graph for this function: