Added Camera_USB_XCLK_FREQ and CONFIG_GENERAL_UVC_DELAY

This commit is contained in:
PhosphorosVR
2025-08-08 22:45:28 +02:00
parent 2a2327b038
commit a5d4ac3c7d
6 changed files with 33 additions and 3 deletions

4
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,4 @@
{
"idf.portWin": "COM21",
"idf.flashType": "UART"
}

View File

@@ -16,7 +16,7 @@
#ifndef DEFAULT_XCLK_FREQ_HZ
#define DEFAULT_XCLK_FREQ_HZ 16500000
#define USB_DEFAULT_XCLK_FREQ_HZ 20000000
#define USB_DEFAULT_XCLK_FREQ_HZ CONFIG_Camera_USB_XCLK_FREQ
#define OV5640_XCLK_FREQ_HZ DEFAULT_XCLK_FREQ_HZ
#endif

View File

@@ -10,6 +10,24 @@ menu "OpenIris: General Configuration"
bool "Wired mode"
default false
config GENERAL_UVC_DELAY
int "UVC delay (s)"
default 30
range 10 10000
help
Delay in seconds before the ESP reports itself as a UVC device.
endmenu
menu "OpenIris: Camera Configuration"
config Camera_USB_XCLK_FREQ
int "USB XCLK frequency (Hz)"
default 20000000
range 1 40000000
help
USB XCLK frequency in Hertz.
endmenu
menu "OpenIris: WiFi Configuration"

View File

@@ -231,6 +231,6 @@ extern "C" void app_main(void) {
// Pass the actual TaskHandle_t value into the timer
timerHandle = createStartVideoStreamingTimer((void*)serialManagerHandle);
if (timerHandle != nullptr) {
esp_timer_start_once(timerHandle, 30000000); // 30s
esp_timer_start_once(timerHandle, CONFIG_GENERAL_UVC_DELAY * 1000000);
}
}

View File

@@ -554,8 +554,15 @@ CONFIG_ENV_GPIO_OUT_RANGE_MAX=48
# OpenIris: General Configuration
#
CONFIG_WIRED_MODE=y
CONFIG_GENERAL_UVC_DELAY=30
# end of OpenIris: General Configuration
#
# OpenIris: Camera Configuration
#
CONFIG_Camera_USB_XCLK_FREQ=23000000
# end of OpenIris: Camera Configuration
#
# OpenIris: WiFi Configuration
#

View File

@@ -57,4 +57,5 @@ CONFIG_SPIRAM_SPEED_80M=y
CONFIG_LED_EXTERNAL_CONTROL=y
CONFIG_LED_EXTERNAL_GPIO=9
CONFIG_LED_EXTERNAL_PWM_FREQ=20000
CONFIG_LED_EXTERNAL_PWM_DUTY_CYCLE=100
CONFIG_LED_EXTERNAL_PWM_DUTY_CYCLE=100
CONFIG_Camera_USB_XCLK_FREQ=23000000