*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> led (4)              
Title
Content
Arch
Section
 

LED(4)

Contents


NAME    [Toc]    [Back]

     led -- enable soekris hardware specific options like the error LED

SYNOPSIS    [Toc]    [Back]

     #include <dev/led/led.h>

     typedef void led_t(void *priv, int onoff);

     dev_t
     led_create(led_t *func, void *priv, char const *name);

     void
     led_destroy(dev_t dev);

DESCRIPTION    [Toc]    [Back]

     The led driver provides generic support for handling LEDs, lamps and
     other announciators.

     The hardware driver must supply a function to turn the announciator on
     and off and the device name of the announciator relative "/dev/led/".
     The priv argument is passed back to this on/off function and can be used
     however the hardware driver sees fit.

     The lamp can be controlled by opening and writing ascii strings to the
     "/dev/led/bla" device.

     In the following we will use this special notation to indicate the
     resulting output of the announciator:
	   *	   The announciator is on for 1/10th secound.
	   _	   The announciator is off for 1/10th secound.

     State can be set directly, and since the change happens immediately, it
     is possible to flash the announciator with very short periods and synchronize
 it with program events.  It should be noted that there is a nontrivial
 overhead, so this may not be usable for benchmarking or measuring
     short intervals.
	   0	   Turn the announciator off immediately.
	   1	   Turn the announciator on immediately.

     Flashing can be set with a given period.  The pattern continues endlessly.

	   f	   _*
	   f1	   _*
	   f2	   __**
	   f3	   ___***
	   ...
	   f9	   _________*********

     Three high-level commands are available:
	   d%d	   numbers.  Each digit is blinked out at 1/10th second, zero
		   as ten pulses.  Between digits a one second pause and after
		   the last digit a two second pause after which the sequence
		   is repeated.
	   s%s	   string.  This gives full control over the announciator.
		   Letters 'A' ... 'J' turns the announciator on for from
		   1/10th to one full second.  Letters 'a' ... 'j' turns the
		   announciator off for 1/10th to one full second.  The
		   sequence is immediately repeated.
	   m%s	   morse.
			 '.'	 becomes _*
			 '-'	 becomes _***
			 ' '	 becomes __
			 '\n'	 becomes ____

     The sequence is repeated after a one second pause.

EXAMPLES    [Toc]    [Back]

     A 'd12' flashes the lamp

	   *__________*_*______________________________

     A 'sAaAbBa' flashes

	   _*_**__*

     /usr/games/morse -l "Soekris rocks" > /dev/led/error

FILES    [Toc]    [Back]

     /dev/led/*

SEE ALSO    [Toc]    [Back]

      
      
     morse(6)

HISTORY    [Toc]    [Back]

     The led driver first appeared in FreeBSD 5.2.

AUTHORS    [Toc]    [Back]

     This software was written by Poul-Henning Kamp <[email protected]>.

     This manual page was written by Sergey A. Osokin <[email protected]> and
     Poul-Henning Kamp <[email protected]>.


FreeBSD 5.2.1		       November 3, 2003 		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
hwgraph IRIX hardware graph and hardware graph file system
cdboot OpenBSD amd64-specific second-stage CD-specific bootstrap
cdboot OpenBSD i386-specific second-stage CD-specific bootstrap
cgerfs IRIX improve the computed solution to a system of linear equations and provides error bounds and backward error est
zgerfs IRIX improve the computed solution to a system of linear equations and provides error bounds and backward error est
dgerfs IRIX improve the computed solution to a system of linear equations and provides error bounds and backward error est
sgerfs IRIX improve the computed solution to a system of linear equations and provides error bounds and backward error est
ctbrfs IRIX provide error bounds and backward error estimates for the solution to a system of linear equations with a tria
strrfs IRIX provide error bounds and backward error estimates for the solution to a system of linear equations with a tria
stbrfs IRIX provide error bounds and backward error estimates for the solution to a system of linear equations with a tria
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service