Medius - Native APILED

LED

Drive a status LED

LED overrides one of the box's status LEDs, or returns it to the box's own status display. Each chip has a single green LED. It's fire-and-forget.

LED

Override or restore a status LED

LED picks a chip's green LED and either forces it to a pattern or returns it to its auto status display. Opcode 0x09.

LED 0x09 · payload 3 bytes

Fire-and-forget

PAYLOAD
OffsetFieldTypeNotes
0targetu8which chip's LED (see below)
1modeu8what to drive it to (see below)
2levelu8brightness 0-255; used by solid and blink, ignored for off and auto
TargetValueLED
device0The device chip's own LED.
host1The host chip's LED; the device relays it over the inter-chip link.
both2Both LEDs at once.
ModeValueEffect
auto0Return the LED to the box's status display (see below).
off1LED dark.
solid2LED lit steadily at level brightness.
blink3LED blinks at level brightness.
STATUS DISPLAY

In auto (the default), each chip drives its own LED from its state.

The device chip is solid when the inter-chip link, the real mouse, and the clone are all up, slow-blinks when the link is up but the mouse or clone is missing, and is off with no link.

The host chip is solid while the mouse is streaming and off when it isn't.

EFFECT

An override holds until you send auto again, and the box also reverts it to status on control-PC silence (the same ~1 s timeout that clears injection), on RESET, or on inter-chip link loss.

There's no game-PC-visible surface: a host or both override travels the inter-chip link only. Library binding: led.

EXAMPLE

Both LEDs to blink at level = 200 (0xC8):

+--------+--------+--------+--------+--------+--------+--------+--------+
| A5     | 09     | 00     | 03 00  | 02     | 03     | C8     | lo hi  |
+--------+--------+--------+--------+--------+--------+--------+--------+
| SOF    | TYPE   | SEQ    | LEN    | target | mode   | level  | CRC16  |
+--------+--------+--------+--------+--------+--------+--------+--------+