MCPcopy Create free account
hub / github.com/OpenIntelWireless/IntelBluetoothFirmware / intelBoot

Method intelBoot

IntelBluetoothFirmware/BtIntel.cpp:187–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187bool BtIntel::
188intelBoot(uint32_t bootAddr)
189{
190 uint8_t buf[CMD_BUF_MAX_SIZE];
191 uint32_t actLen = 0;
192 HciResponse *resp = (HciResponse *)buf;
193
194 if (!sendIntelReset(bootAddr)) {
195 XYLog("Intel Soft Reset failed\n");
196 resetToBootloader();
197 return false;
198 }
199
200 /* The bootloader will not indicate when the device is ready. This
201 * is done by the operational firmware sending bootup notification.
202 *
203 * Booting into operational firmware should not take longer than
204 * 1 second. However if that happens, then just fail the setup
205 * since something went wrong.
206 */
207 IOReturn ret = m_pUSBDeviceController->interruptPipeRead(buf, sizeof(buf), &actLen, 1000);
208 if (ret != kIOReturnSuccess || actLen <= 0) {
209 XYLog("Intel boot failed\n");
210 if (ret == kIOReturnTimeout) {
211 XYLog("Reset to bootloader\n");
212 resetToBootloader();
213 }
214 return false;
215 }
216 if (resp->evt.evt == 0xff && resp->numCommands == 0x02) {
217 XYLog("Notify: Device reboot done\n");
218 return true;
219 }
220 return false;
221}
222
223bool BtIntel::
224loadDDCConfig(const char *ddcFileName)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected