xref: /freebsd-src/share/man/man4/uled.4 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
16bd03b20SKevin Lo.\"
26bd03b20SKevin Lo.\" Copyright (c) 2014 Kevin Lo
36bd03b20SKevin Lo.\" All rights reserved.
46bd03b20SKevin Lo.\"
56bd03b20SKevin Lo.\" Redistribution and use in source and binary forms, with or without
66bd03b20SKevin Lo.\" modification, are permitted provided that the following conditions
76bd03b20SKevin Lo.\" are met:
86bd03b20SKevin Lo.\" 1. Redistributions of source code must retain the above copyright
96bd03b20SKevin Lo.\"    notice, this list of conditions and the following disclaimer.
106bd03b20SKevin Lo.\" 2. Redistributions in binary form must reproduce the above copyright
116bd03b20SKevin Lo.\"    notice, this list of conditions and the following disclaimer in the
126bd03b20SKevin Lo.\"    documentation and/or other materials provided with the distribution.
136bd03b20SKevin Lo.\"
146bd03b20SKevin Lo.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
156bd03b20SKevin Lo.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
166bd03b20SKevin Lo.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
176bd03b20SKevin Lo.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
186bd03b20SKevin Lo.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
196bd03b20SKevin Lo.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
206bd03b20SKevin Lo.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
216bd03b20SKevin Lo.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
226bd03b20SKevin Lo.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
236bd03b20SKevin Lo.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
246bd03b20SKevin Lo.\" SUCH DAMAGE.
256bd03b20SKevin Lo.\"
26*0642eac4SKevin Lo.Dd March 31, 2017
276bd03b20SKevin Lo.Dt ULED 4
286bd03b20SKevin Lo.Os
296bd03b20SKevin Lo.Sh NAME
306bd03b20SKevin Lo.Nm uled
316bd03b20SKevin Lo.Nd USB LED driver
326bd03b20SKevin Lo.Sh SYNOPSIS
336bd03b20SKevin LoTo compile this driver into the kernel, place the following lines into
346bd03b20SKevin Loyour kernel configuration file:
356bd03b20SKevin Lo.Bd -ragged -offset indent
366bd03b20SKevin Lo.Cd "device uled"
376bd03b20SKevin Lo.Cd "device usb"
386bd03b20SKevin Lo.Ed
396bd03b20SKevin Lo.Pp
406bd03b20SKevin LoAlternatively, to load the driver as a module at boot time,
416bd03b20SKevin Loplace the following line in
426bd03b20SKevin Lo.Xr loader.conf 5 :
436bd03b20SKevin Lo.Bd -literal -offset indent
446bd03b20SKevin Louled_load="YES"
456bd03b20SKevin Lo.Ed
466bd03b20SKevin Lo.Sh DESCRIPTION
476bd03b20SKevin LoThe
486bd03b20SKevin Lo.Nm
49*0642eac4SKevin Lodriver provides support for Dream Cheeky WebMail Notifier and
50*0642eac4SKevin LoThingM blink(1) notification LED.
516bd03b20SKevin Lo.Pp
526bd03b20SKevin LoSubsequently, the
536bd03b20SKevin Lo.Pa /dev/uled0
546bd03b20SKevin Lodevice can be used by userland applications.
556bd03b20SKevin Lo.Sh IOCTLS
566bd03b20SKevin LoThe following
576bd03b20SKevin Lo.Xr ioctl 2
586bd03b20SKevin Locommands can be performed on
596bd03b20SKevin Lo.Pa /dev/uled0 ,
606bd03b20SKevin Lowhich are defined in
616bd03b20SKevin Lo.In dev/usb/uled_ioctl.h :
626bd03b20SKevin Lo.Bl -tag -width indent
636bd03b20SKevin Lo.It Dv ULED_GET_COLOR
646bd03b20SKevin LoThe command returns LED colors with values for RGB.
656bd03b20SKevin LoThis
666bd03b20SKevin Lo.Xr ioctl 2
676bd03b20SKevin Lotakes the following structure:
686bd03b20SKevin Lo.Bd -literal
696bd03b20SKevin Lostruct uled_color {
706bd03b20SKevin Lo	uint8_t	red;
716bd03b20SKevin Lo	uint8_t	green;
726bd03b20SKevin Lo	uint8_t	blue;
736bd03b20SKevin Lo};
746bd03b20SKevin Lo.Ed
756bd03b20SKevin Lo.It Dv ULED_SET_COLOR
766bd03b20SKevin LoThe command sets LED colors with values for RGB.
776bd03b20SKevin LoIt uses the same structure as above.
786bd03b20SKevin Lo.El
796bd03b20SKevin Lo.Sh FILES
806bd03b20SKevin Lo.Bl -tag -width ".Pa /dev/uled0" -compact
816bd03b20SKevin Lo.It Pa /dev/uled0
826bd03b20SKevin Loblocking device node
836bd03b20SKevin Lo.El
846bd03b20SKevin Lo.Sh SEE ALSO
856bd03b20SKevin Lo.Xr ohci 4 ,
866bd03b20SKevin Lo.Xr uhci 4 ,
876bd03b20SKevin Lo.Xr usb 4
886bd03b20SKevin Lo.Sh AUTHORS
896bd03b20SKevin Lo.An -nosplit
906bd03b20SKevin LoThe
916bd03b20SKevin Lo.Nm
926bd03b20SKevin Lodriver was written by
936bd03b20SKevin Lo.An Kevin Lo Aq Mt kevlo@FreeBSD.org .
94