esp-iot-solution/examples/usb/device/usb_webcam/bootloader_components/boot_hooks/boot_hooks.c
Code: Select all
void bootloader_before_init(void)
{
// Disable D+ pullup, to prevent the USB host from retrieving USB-Serial-JTAG's descriptor.
SET_PERI_REG_MASK(USB_SERIAL_JTAG_CONF0_REG, USB_SERIAL_JTAG_PAD_PULL_OVERRIDE);
CLEAR_PERI_REG_MASK(USB_SERIAL_JTAG_CONF0_REG, USB_SERIAL_JTAG_DP_PULLUP);
CLEAR_PERI_REG_MASK(USB_SERIAL_JTAG_CONF0_REG, USB_SERIAL_JTAG_USB_PAD_ENABLE);
}