Example: print digital and analog inputs. More...
#include "stdio.h"#include <termios.h>#include <unistd.h>#include <errno.h>#include <sys/types.h>#include <sys/time.h>#include "libpruio/pruio.h"
Go to the source code of this file.
Macros | |
| #define | _GNU_SOURCE 1 |
| Message for the compiler. | |
Functions | |
| int | isleep (unsigned int mseconds) |
| Wait for keystroke or timeout. More... | |
| int | main (int argc, char **argv) |
| The main function. More... | |
Example: print digital and analog inputs.
This file contains an example on how to use libpruio to print out the state of the digital GPIOs and the analog input lines. Find a functional description in section io_input.
Licence: GPLv3, Copyright 2014-2023 by Thomas{ doT ]Freiherr[ At ]gmx[ DoT }net
Compile by: gcc -Wall -o io_input io_input.c -lpruio
Definition in file io_input.c.
| int isleep | ( | unsigned int | mseconds | ) |
Wait for keystroke or timeout.
| mseconds | Timeout value in milliseconds. |
Wait for a keystroke or timeout and return which of the events happened.
Definition at line 35 of file io_input.c.

| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
The main function.
create new driver structure
Definition at line 54 of file io_input.c.
