Sets the LED with the same format as the wired controller
| 48 | |
| 49 | // Sets the LED with the same format as the wired controller |
| 50 | void WirelessHIDDevice::SetLEDs(int mode) |
| 51 | { |
| 52 | unsigned char buf[] = {0x00, 0x00, 0x08, (unsigned char)(0x40 + (mode % 0x0e)), 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; |
| 53 | WirelessDevice *device = OSDynamicCast(WirelessDevice, getProvider()); |
| 54 | |
| 55 | if (device != NULL) |
| 56 | { |
| 57 | device->SendPacket(buf, sizeof(buf)); |
| 58 | device->SendPacket(weirdStart, sizeof(weirdStart)); |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | // Returns the battery level |
| 63 | unsigned char WirelessHIDDevice::GetBatteryLevel(void) |
nothing calls this directly
no test coverage detected