c46def32e2
The hardware driver decides the name under /dev/led and provides the function to turn the lamp on/off. All leds are serviced by a single timeout which runs at a basic rate of hz/10. The LED is controlled by ascii strings as follows. 0 Turn off. 1 Turn on. f Flash: _- f2 Flash: __-- f3 Flash: ___--- f4...f9 etc. d%d Digits. "d12": -__________-_-______________________________ s%s String, roll your own: 'a-j' gives on for (1...10)/10 sec. 'A-J' gives on for (1...10)/10 sec. 'sAaAbBa': _-_--__- m%s Morse '.' dot '-' dash ' ' letter space '\n' word space My mdoc skills do not reach to express that.
22 lines
681 B
C
22 lines
681 B
C
/*-
|
|
* ----------------------------------------------------------------------------
|
|
* "THE BEER-WARE LICENSE" (Revision 42):
|
|
* <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
|
|
* can do whatever you want with this stuff. If we meet some day, and you think
|
|
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
|
* ----------------------------------------------------------------------------
|
|
*
|
|
*/
|
|
|
|
#ifndef _DEV_LED_H
|
|
#define _DEV_LED_H
|
|
|
|
#include <sys/cdefs.h>
|
|
__FBSDID("$FreeBSD$");
|
|
|
|
typedef void led_t(void *, int);
|
|
dev_t led_create(led_t *func, void *priv, char const *name);
|
|
void led_destroy(dev_t);
|
|
|
|
#endif /* _DEV_LED_H */
|