uic
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| uic [2025/02/22 22:19] – arisotura | uic [2025/04/18 12:00] (current) – arisotura | ||
|---|---|---|---|
| Line 188: | Line 188: | ||
| | 0x06 | 0 | 0 | EEPROM write enable | | | 0x06 | 0 | 0 | EEPROM write enable | | ||
| | 0x07 | 0 | 128 | query input data | | | 0x07 | 0 | 128 | query input data | | ||
| - | | 0x08 | 2 | 0 | ? | | + | | 0x08 | 2 | 0 | set status LED brightness |
| | 0x09 | 1 | 0 | begin firmware update | | | 0x09 | 1 | 0 | begin firmware update | | ||
| | 0x0A | 0 | 6 | set various battery thresholds | | | 0x0A | 0 | 6 | set various battery thresholds | | ||
| | 0x0B | 0 | 4 | get UIC firmware version | | | 0x0B | 0 | 4 | get UIC firmware version | | ||
| | 0x0C | 102 | 0 | ? | | | 0x0C | 102 | 0 | ? | | ||
| - | | 0x0D | 1 | 0 | ? | | + | | 0x0D | 1 | 0 | set mic status bit0-1 |
| - | | 0x0E | 1 | 0 | ? | | + | | 0x0E | 1 | 0 | set mic status bit2-3 |
| | 0x0F | 0 | 2 | get previous and current UIC state | | | 0x0F | 0 | 2 | get previous and current UIC state | | ||
| | 0x10 | 0 | 1 | get battery level | | | 0x10 | 0 | 1 | get battery level | | ||
| Line 279: | Line 279: | ||
| Query input data. | Query input data. | ||
| + | |||
| + | Important note: polling input too often may cause the UIC to return bogus data. For reference, the stock firmware polls every ~5.5 milliseconds. | ||
| Response: | Response: | ||
| Line 352: | Line 354: | ||
| The input data is little-endian. | The input data is little-endian. | ||
| + | |||
| + | |||
| + | ==== Command 08 ==== | ||
| + | |||
| + | Set status LED brightness for the given LED. | ||
| + | |||
| + | First parameter byte is the number of the LED to set: 0 is the HOME button LED, 1 is the blue battery LED, 2 is the red battery LED, and 3 is the amber battery LED. Any value higher than 3 is interpreted as 3. | ||
| + | |||
| + | Second parameter byte is the brightness, ranging from 0 (off) to 255 (full brightness). | ||
| + | |||
| + | Note that only one battery LED can be active at a time. Setting any of the blue/ | ||
| + | |||
| + | This command will be ignored if the UIC is overriding the battery LED (for example, during the blue LED fade-out at boot). | ||
| Line 380: | Line 395: | ||
| Get battery level. The returned battery level is expressed in steps, based on the thresholds set by command 0x0A. | Get battery level. The returned battery level is expressed in steps, based on the thresholds set by command 0x0A. | ||
| + | |||
| + | Returns 0 when the AC adapter is connected. | ||
| Response: one byte, the battery level step. | Response: one byte, the battery level step. | ||
uic.1740262745.txt.gz · Last modified: 2025/02/22 22:19 by arisotura
