HID services: Difference between revisions
→NotificationLedPattern: Imported info based on: https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/bluetooth_hid_subcommands_notes.md |
Correct some copy paste typos I did in dekunukem repo and also normalize the description for easier comprehension. |
||
Line 885: | Line 885: | ||
The specified controller must have a HOME button. | The specified controller must have a HOME button. | ||
This sends subcommand 0x38 to the specified controller, for setting the pattern for the HOME button notification LED. The input structure is converted to the format used by | This sends subcommand 0x38 to the specified controller, for setting the pattern for the HOME button notification LED. The input structure is converted to the format used by this [https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/bluetooth_hid_subcommands_notes.md#subcommand-0x38-set-home-light subcommand]. | ||
== NotificationLedPattern == | == NotificationLedPattern == | ||
Line 892: | Line 892: | ||
! Offset || Size || Subcommand argdata bytepos || Subcommand argdata nibble || Description | ! Offset || Size || Subcommand argdata bytepos || Subcommand argdata nibble || Description | ||
|- | |- | ||
| 0x0 || 0x1 || 0x0 || Low || | | 0x0 || 0x1 || 0x0 || Low || Mini Cycle Base Duration. Value 0x1-0xF: 12.5ms - 187.5ms. Value 0x0 = 0ms/OFF. | ||
|- | |- | ||
| 0x1 || 0x1 || 0x0 || High || Number of Mini Cycles. 1- | | 0x1 || 0x1 || 0x0 || High || Number of Mini Cycles + 1. Value 0x0-0xF: 1 - 16 mini cycles. | ||
|- | |- | ||
| 0x2 || 0x1 || 0x1 || Low || Number of Full Cycles. 1-15. Value 0x0 is repeat forever, but if | | 0x2 || 0x1 || 0x1 || Low || Number of Full Cycles. Value 0x1-0xF: 1 - 15 full cycles. Value 0x0 is repeat forever, but if Mini Cycle Base Duration is set to 0x0, it does the 1st Mini Cycle with a 12.5ms base duration and then the LED stays on with LED Start Intensity. | ||
|- | |- | ||
| 0x3 || 0x1 || 0x1 || High || LED Start Intensity. Value 0x0 | | 0x3 || 0x1 || 0x1 || High || LED Start Intensity. Value 0x0-0xF: 0% - 100%. (In HW, 1 - 241 duty) | ||
|- | |- | ||
| 0x4 || 0x1 || 0x2 || High || Mini Cycle 1 LED Intensity. | | 0x4 || 0x1 || 0x2 || High || Mini Cycle 1 LED Intensity. Value 0x0-0xF: 0% - 100%. (In HW, 1 - 241 duty) | ||
|- | |- | ||
| 0x5 || 0x1 || 0x3 || High || Fading Transition | | 0x5 || 0x1 || 0x3 || High || Fading Transition Steps to Mini Cycle 1 (Uses PWM). Value 0x0: Instant. Each step duration is based on Mini Cycle Step Duration Multiplier. | ||
|- | |- | ||
| 0x6 || 0x1 || 0x3 || Low || | | 0x6 || 0x1 || 0x3 || Low || Mini Cycle Step Duration Multiplier of Mini Cycle 1. Value is a Multiplier of Mini Cycle Base Duration. Value 0x0: x1, 0x1 - xF: 1x - 15x. | ||
|- | |- | ||
| 0x7 || 0x1 || || || Unused | | 0x7 || 0x1 || || || Unused | ||
Line 910: | Line 910: | ||
| 0x8 || 0x1 || 0x2 || Low || Mini Cycle 2 LED Intensity. | | 0x8 || 0x1 || 0x2 || Low || Mini Cycle 2 LED Intensity. | ||
|- | |- | ||
| 0x9 || 0x1 || 0x4 || High || Fading Transition | | 0x9 || 0x1 || 0x4 || High || Fading Transition Steps to Mini Cycle 2 (see above). | ||
|- | |- | ||
| 0xA || 0x1 || 0x4 || Low || | | 0xA || 0x1 || 0x4 || Low || Mini Cycle Step Duration Multiplier of Mini Cycle 2 (see above). | ||
|- | |- | ||
| 0xB || 0x1 || || || Unused | | 0xB || 0x1 || || || Unused | ||
Line 918: | Line 918: | ||
| 0xC || 0x1 || 0x5 || High || Mini Cycle 3 LED Intensity. | | 0xC || 0x1 || 0x5 || High || Mini Cycle 3 LED Intensity. | ||
|- | |- | ||
| 0xD || 0x1 || 0x6 || High || Fading Transition | | 0xD || 0x1 || 0x6 || High || Fading Transition Steps to Mini Cycle 3 (see above). | ||
|- | |- | ||
| 0xE || 0x1 || 0x6 || Low || | | 0xE || 0x1 || 0x6 || Low || Mini Cycle Step Duration Multiplier of Mini Cycle 3 (see above). | ||
|- | |- | ||
| 0xF || 0x1 || || || Unused | | 0xF || 0x1 || || || Unused | ||
Line 928: | Line 928: | ||
| 0x11 || 0x1 || 0x7 || High || Fading Transition Duration to Mini Cycle 4 (see above). | | 0x11 || 0x1 || 0x7 || High || Fading Transition Duration to Mini Cycle 4 (see above). | ||
|- | |- | ||
| 0x12 || 0x1 || 0x7 || Low || | | 0x12 || 0x1 || 0x7 || Low || Mini Cycle Step Duration Multiplier of Mini Cycle 4 (see above). | ||
|- | |- | ||
| 0x13 || 0x1 || || || Unused | | 0x13 || 0x1 || || || Unused | ||
Line 934: | Line 934: | ||
| 0x14 || 0x1 || 0x8 || High || Mini Cycle 5 LED Intensity. | | 0x14 || 0x1 || 0x8 || High || Mini Cycle 5 LED Intensity. | ||
|- | |- | ||
| 0x15 || 0x1 || 0x9 || High || Fading Transition | | 0x15 || 0x1 || 0x9 || High || Fading Transition Steps to Mini Cycle 5 (see above). | ||
|- | |- | ||
| 0x16 || 0x1 || 0x9 || Low || | | 0x16 || 0x1 || 0x9 || Low || Mini Cycle Step Duration Multiplier of Mini Cycle 5 (see above). | ||
|- | |- | ||
| 0x17 || 0x1 || || || Unused | | 0x17 || 0x1 || || || Unused | ||
Line 942: | Line 942: | ||
| 0x18 || 0x1 || 0x8 || Low || Mini Cycle 6 LED Intensity. | | 0x18 || 0x1 || 0x8 || Low || Mini Cycle 6 LED Intensity. | ||
|- | |- | ||
| 0x19 || 0x1 || 0xA || High || Fading Transition | | 0x19 || 0x1 || 0xA || High || Fading Transition Steps to Mini Cycle 6 (see above). | ||
|- | |- | ||
| 0x1A || 0x1 || 0xA || Low || | | 0x1A || 0x1 || 0xA || Low || Mini Cycle Step Duration Multiplier of Mini Cycle 6 (see above). | ||
|- | |- | ||
| 0x1B || 0x1 || || || Unused | | 0x1B || 0x1 || || || Unused | ||
Line 950: | Line 950: | ||
| 0x1C || 0x1 || 0xB || High || Mini Cycle 7 LED Intensity. | | 0x1C || 0x1 || 0xB || High || Mini Cycle 7 LED Intensity. | ||
|- | |- | ||
| 0x1D || 0x1 || 0xC || High || Fading Transition | | 0x1D || 0x1 || 0xC || High || Fading Transition Steps to Mini Cycle 7 (see above). | ||
|- | |- | ||
| 0x1E || 0x1 || 0xC || Low || | | 0x1E || 0x1 || 0xC || Low || Mini Cycle Step Duration Multiplier of Mini Cycle 7 (see above). | ||
|- | |- | ||
| 0x1F || 0x1 || || || Unused | | 0x1F || 0x1 || || || Unused | ||
Line 958: | Line 958: | ||
| 0x20 || 0x1 || 0xB || Low || Mini Cycle 8 LED Intensity. | | 0x20 || 0x1 || 0xB || Low || Mini Cycle 8 LED Intensity. | ||
|- | |- | ||
| 0x21 || 0x1 || 0xD || Low || Fading Transition | | 0x21 || 0x1 || 0xD || Low || Fading Transition Steps to Mini Cycle 8 (see above). | ||
|- | |- | ||
| 0x22 || 0x1 || 0xD || High || | | 0x22 || 0x1 || 0xD || High || Mini Cycle Step Duration Multiplier of Mini Cycle 8 (see above). | ||
|- | |- | ||
| 0x23 || 0x1 || || || Unused | | 0x23 || 0x1 || || || Unused | ||
Line 966: | Line 966: | ||
| 0x24 || 0x1 || 0xE || High || Mini Cycle 9 LED Intensity. | | 0x24 || 0x1 || 0xE || High || Mini Cycle 9 LED Intensity. | ||
|- | |- | ||
| 0x25 || 0x1 || 0xF || High || Fading Transition | | 0x25 || 0x1 || 0xF || High || Fading Transition Steps to Mini Cycle 9 (see above). | ||
|- | |- | ||
| 0x26 || 0x1 || 0xF || Low || | | 0x26 || 0x1 || 0xF || Low || Mini Cycle Step Duration Multiplier of Mini Cycle 9 (see above). | ||
|- | |- | ||
| 0x27 || 0x1 || || || Unused | | 0x27 || 0x1 || || || Unused | ||
Line 974: | Line 974: | ||
| 0x28 || 0x1 || 0xE || Low || Mini Cycle 10 LED Intensity. | | 0x28 || 0x1 || 0xE || Low || Mini Cycle 10 LED Intensity. | ||
|- | |- | ||
| 0x29 || 0x1 || 0x10 || High || Fading Transition | | 0x29 || 0x1 || 0x10 || High || Fading Transition Steps to Mini Cycle 10 (see above). | ||
|- | |- | ||
| 0x2A || 0x1 || 0x10 || Low || | | 0x2A || 0x1 || 0x10 || Low || Mini Cycle Step Duration Multiplier of Mini Cycle 10 (see above). | ||
|- | |- | ||
| 0x2B || 0x1 || || || Unused | | 0x2B || 0x1 || || || Unused | ||
Line 982: | Line 982: | ||
| 0x2C || 0x1 || 0x11 || High || Mini Cycle 11 LED Intensity. | | 0x2C || 0x1 || 0x11 || High || Mini Cycle 11 LED Intensity. | ||
|- | |- | ||
| 0x2D || 0x1 || 0x12 || High || Fading Transition | | 0x2D || 0x1 || 0x12 || High || Fading Transition Steps to Mini Cycle 11 (see above). | ||
|- | |- | ||
| 0x2E || 0x1 || 0x12 || Low || | | 0x2E || 0x1 || 0x12 || Low || Mini Cycle Step Duration Multiplier of Mini Cycle 11 (see above). | ||
|- | |- | ||
| 0x2F || 0x1 || || || Unused | | 0x2F || 0x1 || || || Unused | ||
Line 990: | Line 990: | ||
| 0x30 || 0x1 || 0x11 || Low || Mini Cycle 12 LED Intensity. | | 0x30 || 0x1 || 0x11 || Low || Mini Cycle 12 LED Intensity. | ||
|- | |- | ||
| 0x31 || 0x1 || 0x13 || High || Fading Transition | | 0x31 || 0x1 || 0x13 || High || Fading Transition Steps to Mini Cycle 12 (see above). | ||
|- | |- | ||
| 0x32 || 0x1 || 0x13 || Low || | | 0x32 || 0x1 || 0x13 || Low || Mini Cycle Step Duration Multiplier of Mini Cycle 12 (see above). | ||
|- | |- | ||
| 0x33 || 0x1 || || || Unused | | 0x33 || 0x1 || || || Unused | ||
Line 998: | Line 998: | ||
| 0x34 || 0x1 || 0x14 || High || Mini Cycle 13 LED Intensity. | | 0x34 || 0x1 || 0x14 || High || Mini Cycle 13 LED Intensity. | ||
|- | |- | ||
| 0x35 || 0x1 || 0x15 || High || Fading Transition | | 0x35 || 0x1 || 0x15 || High || Fading Transition Steps to Mini Cycle 13 (see above). | ||
|- | |- | ||
| 0x36 || 0x1 || 0x15 || Low || | | 0x36 || 0x1 || 0x15 || Low || Mini Cycle Step Duration Multiplier of Mini Cycle 13 (see above). | ||
|- | |- | ||
| 0x37 || 0x1 || || || Unused | | 0x37 || 0x1 || || || Unused | ||
Line 1,006: | Line 1,006: | ||
| 0x38 || 0x1 || 0x14 || Low || Mini Cycle 14 LED Intensity. | | 0x38 || 0x1 || 0x14 || Low || Mini Cycle 14 LED Intensity. | ||
|- | |- | ||
| 0x39 || 0x1 || 0x16 || High || Fading Transition | | 0x39 || 0x1 || 0x16 || High || Fading Transition Steps to Mini Cycle 14 (see above). | ||
|- | |- | ||
| 0x3A || 0x1 || 0x16 || Low || | | 0x3A || 0x1 || 0x16 || Low || Mini Cycle Step Duration Multiplier of Mini Cycle 14 (see above). | ||
|- | |- | ||
| 0x3B || 0x1 || || || Unused | | 0x3B || 0x1 || || || Unused | ||
Line 1,014: | Line 1,014: | ||
| 0x3C || 0x1 || 0x17 || High || Mini Cycle 15 LED Intensity. | | 0x3C || 0x1 || 0x17 || High || Mini Cycle 15 LED Intensity. | ||
|- | |- | ||
| 0x3D || 0x1 || 0x18 || High || Fading Transition | | 0x3D || 0x1 || 0x18 || High || Fading Transition Steps to Mini Cycle 15 (see above). | ||
|- | |- | ||
| 0x3E || 0x1 || 0x18 || Low || | | 0x3E || 0x1 || 0x18 || Low || Mini Cycle Step Duration Multiplier of Mini Cycle 15 (see above). | ||
|- | |- | ||
| 0x3F || 0x1 || || || Unused | | 0x3F || 0x1 || || || Unused | ||
Line 1,022: | Line 1,022: | ||
| 0x40 || 0x1 || 0x17 || Low || Mini Cycle 16 LED Intensity. | | 0x40 || 0x1 || 0x17 || Low || Mini Cycle 16 LED Intensity. | ||
|- | |- | ||
| 0x41 || 0x1 || 0x19 || High || Fading Transition | | 0x41 || 0x1 || 0x19 || High || Fading Transition Steps to Mini Cycle 16 (see above). (Unused in older Joy-Con / Pro-Con FW. Unknown for new.) | ||
|- | |- | ||
| 0x42 || 0x1 || 0x19 || Low || | | 0x42 || 0x1 || 0x19 || Low || Mini Cycle Step Duration Multiplier of Mini Cycle 16 (see above). (Unused in older Joy-Con / Pro-Con FW. Unknown for new.) | ||
|- | |- | ||
| 0x43 || 0x1 || || || Unused | | 0x43 || 0x1 || || || Unused | ||
|- | |- | ||
| 0x44 || 0x1 || 0x1A || High || Unknown | | 0x44 || 0x1 || 0x1A || High || Unknown (Unused in older Joy-Con / Pro-Con FW. Unknown for new.) | ||
|- | |- | ||
| 0x45 || 0x1 || 0x1A || Low || Unknown | | 0x45 || 0x1 || 0x1A || Low || Unknown (Unused in older Joy-Con / Pro-Con FW. Unknown for new.) | ||
|- | |- | ||
| 0x46 || 0x1 || || || Padding | | 0x46 || 0x1 || || || Padding |