+bool CECStartBootloader(void)
+{
+ bool bReturn(false);
+ cec_adapter deviceList[1];
+ if (CUSBCECAdapterDetection::FindAdapters(deviceList, 1) > 0)
+ {
+ CUSBCECAdapterCommunication comm(NULL, deviceList[0].comm);
+ CTimeout timeout(10000);
+ while (timeout.TimeLeft() > 0 && (bReturn = comm.Open(NULL, (timeout.TimeLeft() / CEC_CONNECT_TRIES)), true) == false)
+ {
+ comm.Close();
+ CEvent::Sleep(500);
+ }
+ if (comm.IsOpen())
+ bReturn = comm.StartBootloader();
+ }
+
+ return bReturn;
+}
+