driver number |
---|
2 |
The LEDs driver provides userspace with synchronous control of an array of discrete LEDs. The LEDs can be turned on, off, and toggled.
LEDs are indexed in the array starting at 0. The order of the LEDs and the mapping between indexes and actual LEDs is set by the kernel in the board's main file.
-
Description: How many LEDs are supported on this board.
Argument 1: unused
Argument 2: unused
Returns: The number of LEDs on the board, or
NODEVICE
if this driver is not present on the board. -
Description: Turn on an LED.
Argument 1: The index of the LED to turn on, starting at 0.
Argument 2: unused
Returns:
Ok(())
if the LED index is valid,INVAL
otherwise. -
Description: Turn off an LED.
Argument 1: The index of the LED to turn off, starting at 0.
Argument 2: unused
Returns:
Ok(())
if the LED index is valid,INVAL
otherwise. -
Description: Toggle an LED. If the LED is currently on it will be turned off, and vice-versa.
Argument 1: The index of the LED to toggle, starting at 0.
Argument 2: unused
Returns:
Ok(())
if the LED index is valid,INVAL
otherwise.
Unused for the LED driver. Will always return ENOSUPPORT
.
Unused for the LED driver. Will always return ENOSUPPORT
.