| 486 | } |
| 487 | |
| 488 | bool CECStartBootloader(void) |
| 489 | { |
| 490 | bool bReturn(false); |
| 491 | cec_adapter deviceList[1]; |
| 492 | if (CAdapterFactory(nullptr).FindAdapters(deviceList, 1, 0) > 0) |
| 493 | { |
| 494 | CAdapterFactory factory(nullptr); |
| 495 | IAdapterCommunication *comm = factory.GetInstance(deviceList[0].comm); |
| 496 | if (comm) |
| 497 | { |
| 498 | CTimeout timeout(CEC_DEFAULT_CONNECT_TIMEOUT); |
| 499 | while (timeout.TimeLeft() > 0 && |
| 500 | (bReturn = comm->Open(timeout.TimeLeft() / CEC_CONNECT_TRIES, true)) == false) |
| 501 | { |
| 502 | comm->Close(); |
| 503 | CEvent::Sleep(500); |
| 504 | } |
| 505 | if (comm->IsOpen()) |
| 506 | bReturn = comm->StartBootloader(); |
| 507 | |
| 508 | delete comm; |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | return bReturn; |
| 513 | } |
| 514 | |
| 515 | void CECDestroy(CEC::ICECAdapter *instance) |
| 516 | { |
nothing calls this directly
no test coverage detected