Host Protocols Direct Protocol CONTROL class IOs and UI LED modes
April 13, 2023 at 2:39 AMLED Modes
Some devices feature either a RGB LED and/or a 4-LED ramp.
All the LEDs have a so-called ‘Mode’ parameter which define their behaviour: solid, blinking or flashing. All the supported behaviours are listed in the table below.
“Special” modes
Mode | Behaviour | Remark |
---|---|---|
00 |
OFF | |
01 |
Solid ON | |
0F |
“Breathing” | Available on RGB LED only |
“Blinking and flashing” modes
Values for the “blinking or flashing” modes are constructed as the aggregation of two 4-bit values.
- The high-order nibble (
1x
toBx
) codes the frequency, - The low-order nibble (
x0
toxE
) codes the pattern.
Frequency
Mode’s high-order nibble | Frequency | Period |
---|---|---|
1x |
0.25 Hz | 4 s |
2x |
0.50 Hz | 2 s |
3x |
1 Hz | 1 s |
4x |
2 Hz | 500 ms |
5x |
3 Hz | 333 ms |
6x |
4 Hz | 250 ms |
7x |
5 Hz | 200 ms |
8x |
6.66 Hz | 150 ms |
9x |
10 Hz | 100 ms |
Ax |
15 Hz | 66.6 ms |
Bx |
20 Hz | 50 ms |
Pattern
Mode’s high-order nibble | Pattern |
---|---|
x0 |
blinking: 50% ON and 50% OFF |
x1 |
1 long flash: 25% ON, then 75% OFF |
x2 |
1 medium flash: 20% ON, then 80% OFF |
x3 |
1 short flash: 10% ON, then 90% OFF |
x4 |
1 very-short flash: 5% ON, then 95% OFF |
x5 |
2 grouped medium flashes, each 20% ON |
x6 |
2 grouped short flashes, each 10% ON |
x7 |
2 grouped very-short flashes, each 5% ON |
x8 |
3 grouped short flashes, each 10% ON |
x9 |
3 grouped very-short flashes, each 5% ON |
xA |
4 grouped short flashes, each 10% ON |
xB |
4 grouped very-short flashes, each 5% ON |
xC |
5 grouped very-short flashes, each 5% ON |
xD |
6 grouped very-short flashes, each 5% ON |
xE |
7 grouped very-short flashes, each 5% ON |