Skip to content

Commit

Permalink
device: Disable USB on boot
Browse files Browse the repository at this point in the history
Leaving USB connected might cause hickups on the USB bus, and causes
power measurements to report incorrect data. Turn it off once the image
has been downloaded.

Signed-off-by: Bjorn Andersson <[email protected]>
  • Loading branch information
quic-bjorande authored and andersson committed Nov 6, 2023
1 parent ec642b6 commit 26110a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions device.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,11 @@ void device_boot(struct device *device, const void *data, size_t len)
fastboot_set_active(device->fastboot, device->set_active);
fastboot_download(device->fastboot, data, len);
device->boot(device);

if (!device->usb_always_on) {
warnx("disabling USB, use ^A V to enable");
device_usb(device, false);
}
}

void device_send_break(struct device *device)
Expand Down

0 comments on commit 26110a8

Please sign in to comment.