libpruio  0.0.2
AM33xx-PRU driver for digital input / output and analog input
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sos.c File Reference

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"
Include dependency graph for sos.c:

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)
 

Detailed Description

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.

Macro Definition Documentation

#define _GNU_SOURCE   1

Definition at line 18 of file sos.c.

#define PIN   24

Definition at line 48 of file sos.c.

#define OUT_K   pruio_gpio_out(io, PIN, 1) ; isleep(250) ; pruio_gpio_out(io, PIN, 0) ; isleep(150) ;

Definition at line 49 of file sos.c.

#define OUT_L   pruio_gpio_out(io, PIN, 1) ; isleep(750) ; pruio_gpio_out(io, PIN, 0) ; isleep(150) ;

Definition at line 50 of file sos.c.

#define OUT_S   OUT_K ; OUT_K ; OUT_K ; isleep(250)

Definition at line 51 of file sos.c.

#define OUT_O   OUT_L ; OUT_L ; OUT_L ; isleep(250)

Definition at line 52 of file sos.c.

Function Documentation

int isleep ( unsigned int  mseconds)

Definition at line 29 of file sos.c.

int main ( int  argc,
char **  argv 
)

Definition at line 54 of file sos.c.

Here is the call graph for this function: