Example: blink user LED 3. More...
#include "stdio.h"
#include <termios.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/time.h>
#include "../c_wrapper/pruio_c_wrapper.h"
Go to the source code of this file.
Macros | |
#define | _GNU_SOURCE 1 |
#define | PIN 24 |
#define | OUT_K pruio_gpio_out(io, PIN, 1) ; isleep(250) ; pruio_gpio_out(io, PIN, 0) ; isleep(150) ; |
#define | OUT_L pruio_gpio_out(io, PIN, 1) ; isleep(750) ; pruio_gpio_out(io, PIN, 0) ; isleep(150) ; |
#define | OUT_S OUT_K ; OUT_K ; OUT_K ; isleep(250) |
#define | OUT_O OUT_L ; OUT_L ; OUT_L ; isleep(250) |
Functions | |
int | isleep (unsigned int mseconds) |
int | main (int argc, char **argv) |
Example: blink user LED 3.
This file contains an example on how to use libpruio to control the user LED 3 (near ethernet connector) on the beaglebone board.
Licence: GPLv3
Copyright 2014 by Thomas{ dOt ]Freiherr[ At ]gmx[ DoT }net
Compile by:
gcc -Wall -o sos sos.c /usr/local/lib/freebasic/fbrt0.o -lpruio -L"/usr/local/lib/freebasic/" -lfb -lpthread -lprussdrv -ltermcap -lsupc++
Definition in file sos.c.
#define OUT_K pruio_gpio_out(io, PIN, 1) ; isleep(250) ; pruio_gpio_out(io, PIN, 0) ; isleep(150) ; |
#define OUT_L pruio_gpio_out(io, PIN, 1) ; isleep(750) ; pruio_gpio_out(io, PIN, 0) ; isleep(150) ; |