| 539 | } |
| 540 | |
| 541 | bool AlienwareController::Reset() |
| 542 | { |
| 543 | /*-----------------------------------------------------*\ |
| 544 | | Bail if zones is empty | |
| 545 | \*-----------------------------------------------------*/ |
| 546 | if(zones.empty()) |
| 547 | { |
| 548 | return(true); |
| 549 | } |
| 550 | |
| 551 | unsigned char usb_buf[HIDAPI_ALIENWARE_REPORT_SIZE]; |
| 552 | |
| 553 | /*-----------------------------------------------------*\ |
| 554 | | Zero out buffer | |
| 555 | \*-----------------------------------------------------*/ |
| 556 | memset(usb_buf, 0x00, sizeof(usb_buf)); |
| 557 | |
| 558 | /*-----------------------------------------------------*\ |
| 559 | | Set up message packet with leading 00, per hidapi | |
| 560 | \*-----------------------------------------------------*/ |
| 561 | usb_buf[0x00] = 0x00; |
| 562 | usb_buf[0x01] = 0x03; |
| 563 | usb_buf[0x02] = ALIENWARE_COMMAND_RESET; |
| 564 | |
| 565 | /*-----------------------------------------------------*\ |
| 566 | | Send packet | |
| 567 | \*-----------------------------------------------------*/ |
| 568 | SendHIDReport(dev, usb_buf, sizeof(usb_buf)); |
| 569 | |
| 570 | HidapiAlienwareReport response = GetResponse(); |
| 571 | |
| 572 | /*-----------------------------------------------------*\ |
| 573 | | For this command, error is if the output equals the | |
| 574 | | input | |
| 575 | \*-----------------------------------------------------*/ |
| 576 | return(response.data[1] == 0x03); |
| 577 | } |
| 578 | |
| 579 | void AlienwareController::SetMode(uint8_t zone, uint8_t mode) |
| 580 | { |
nothing calls this directly
no test coverage detected