Files
OpenIris-ESPIDF/bootloader_components/boot_hooks.c
PhosphorosVR 83d7805e9e - Updated README to reflect changes in device mode terminology from "Auto" to "Setup".
- Changed configuration macros from CONFIG_GENERAL_DEFAULT_WIRED_MODE to CONFIG_GENERAL_INCLUDE_UVC_MODE across multiple files.
- Introduced new command for retrieving LED current in CommandManager.
- Added MonitoringManager and CurrentMonitor classes to handle LED current monitoring.
- Updated Kconfig to include options for LED current monitoring.
- Modified main application logic to integrate MonitoringManager and handle new device modes.
- Adjusted CMakeLists and source files to include new monitoring components.
2025-09-05 01:08:11 +02:00

24 lines
821 B
C

// source: https://github.com/espressif/esp-iot-solution/blob/4730d91db70df7e6e0a3191d725ab1c5f98ff9ce/examples/usb/device/usb_webcam/bootloader_components/boot_hooks/boot_hooks.c
#ifdef CONFIG_GENERAL_INCLUDE_UVC_MODE
#include "esp_log.h"
#include "soc/rtc_cntl_struct.h"
#include "soc/usb_serial_jtag_reg.h"
/* Function used to tell the linker to include this file
* with all its symbols.
*/
void bootloader_hooks_include(void)
{
}
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);
}
#endif