Received an update of a specific value
| 220 | |
| 221 | // Received an update of a specific value |
| 222 | void WirelessHIDDevice::receivedUpdate(unsigned char type, unsigned char *data) |
| 223 | { |
| 224 | switch (type) |
| 225 | { |
| 226 | case 0x13: // Battery level |
| 227 | battery = data[0]; |
| 228 | { |
| 229 | OSObject *prop = OSNumber::withNumber(battery, 8); |
| 230 | if (prop != NULL) |
| 231 | { |
| 232 | setProperty(kIOWirelessBatteryLevel, prop); |
| 233 | prop->release(); |
| 234 | } |
| 235 | } |
| 236 | break; |
| 237 | |
| 238 | default: |
| 239 | break; |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | // Received a normal HID update from the device |
| 244 | void WirelessHIDDevice::receivedHIDupdate(unsigned char *data, int length) |
nothing calls this directly
no outgoing calls
no test coverage detected