3 This library is intended to control a LED device plugged on parallel port.
4 A such device is composed of a number of LED (default is 8, maybe more is
5 possible, I don't know) plugged on parallel port.
9 Julien Danjou <julien@jdanjou.org>
10 http://jdanjou.org/libparportled/
14 gcc option: -lparportled
15 #include <parportled.h>
17 MAXLED is defined as the number of LED available.
18 (--with-maxled= in configure option)
20 BASEPORT is the IO address of parallel port
21 (--with-port= in configure option)
23 Functions available are:
26 Initialise the parallel port, MUST be root !
36 Turn LED number "led" on.
39 Turn LED number "led" off.
41 int led_set_on(int *state);
42 State must be a int vector. If value is > 0, LED will be turned on.
44 int led_set_off(int *state);
45 Do the inverse of led_set().
47 int led_blink_on(int led, int us_time);
48 Start blinking LED number "led". us_time is the time in microsecond of
50 This function starts a new thread.
51 Please note that all LED are blinking with in a same interval, the first
54 led_blink_on(1, 10000);
55 led_blink_on(2, 2000);
56 10000 will be used for ALL blinking LED.
58 int led_blink_off(int led);
59 Stop blinking LED number led.
60 If no more led are blinking, thread exits.