#include <cafe/kbd.h> KBDEc KBDSetLedsRetryEx (KBDChannel ch, KBDLedState leds);
|ch||Keyboard channel to set.|
|KBDEc||Keyboard error code.
Sends an LED command to the keyboard on channel ch. The command instructs the keyboard to turn on the LEDs specified by leds. If the attempt fails due to the
KBD_ERR_BUSY condition, a timer is set to retry the call 1 millisecond later. This will continue until a retry succeeds, or until another error status occurs.
KBDSetLedsRetryEx is a non-blocking call, and it may be used from within a callback or whenever interrupts are disabled. This is in contrast to the blocking version of this function,
KBDSetLedsRetryEx sends a message over the USB bus, refrain from calling this API too frequently to prevent flooding of the USB bus. Avoid sending more than 12 LED commands (total for all keyboards) per 1/60th of a second. Even this amount is excessive and should be avoided.
This function will always attempt to send the LED command. Any "lazy" setting of LED state must be performed at a higher level.
|Background||Do not call this function from the background.|
2013/06/20 Initial version.