libparportled library is intended to control a LED device plugged on parallel port. A such device is composed of a number of LED (de
libparportled library is intended to control a LED device plugged on parallel port.
A such device is composed of a number of LED (default is 8, maybe more is possible, I don't know) plugged on parallel port.
gcc option: -lparportled
#include < parportled.h >
MAXLED is defined as the number of LED available.
(--with-maxled= in configure option)
BASEPORT is the IO address of parallel port
(--with-port= in configure option)
Functions available are:
Initialise the parallel port, MUST be root !
Return -1 on error.
Turn all LED on.
Turn all LED off.
int led_on(int led);
Turn LED number "led" on.
int led_off(int led);
Turn LED number "led" off.
int led_set_on(int *state);
State must be a int vector. If value is > 0, LED will be turned on.
int led_set_off(int *state);
Do the inverse of led_set().
int led_blink_on(int led, int us_time);
Start blinking LED number "led". us_time is the time in microsecond of
the state changement.
This function starts a new thread.
Please note that all LED are blinking with in a same interval, the first
us_time is used.
If you do:
10000 will be used for ALL blinking LED.
int led_blink_off(int led);
Stop blinking LED number led.
If no more led are blinking, thread exits.
What's New in This Release:
tags int led off int parallel port led blink led off number led led number led set all led blinking led are blinking led are int *state
Download libparportled 0.5.1
Other software in this category
- Desktop Environment
- Science and Engineering
- Text Editing&Processing