Skip to content

Commit ea46beb

Browse files
committed
feat: support esp32s3
1 parent 77acf37 commit ea46beb

File tree

131 files changed

+8372
-1165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+8372
-1165
lines changed

.gitlab/ci/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,9 +785,12 @@ build_example_usb_device_usb_extend_screen:
785785
extends:
786786
- .build_examples_template
787787
- .rules:build:example_usb_device_usb_extend_screen
788+
parallel:
789+
matrix:
790+
- IMAGE: espressif/idf:release-v5.3
791+
- IMAGE: espressif/idf:release-v5.4
788792
variables:
789793
EXAMPLE_DIR: examples/usb/device/usb_extend_screen
790-
IMAGE: espressif/idf:release-v5.3
791794

792795
build_example_usb_device_usb_webcam:
793796
extends:

.gitlab/ci/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ pack-upload_files:
116116
- job: "build_example_usb_device_bootloader_uf2: [espressif/idf:release-v5.3]"
117117
- job: "build_example_usb_device_usb_dongle: [espressif/idf:release-v5.3]"
118118
- job: "build_example_usb_device_usb_dual_uvc_device: [espressif/idf:release-v5.3]"
119-
- job: "build_example_usb_device_usb_extend_screen"
119+
- job: "build_example_usb_device_usb_extend_screen: [espressif/idf:release-v5.4]"
120120
- job: "build_example_usb_device_usb_hid_device: [espressif/idf:release-v5.0]"
121121
- job: "build_example_usb_device_usb_lcd_display"
122122
- job: "build_example_usb_device_usb_msc_wireless_disk: [espressif/idf:release-v5.0]"
Lines changed: 57 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,87 @@
1-
## USB Extension Screen Example
1+
## USB Extended Display Example
22

3-
Try with [LaunchPad](https://espressif.github.io/esp-launchpad/?flashConfigURL=https://dl.espressif.com/AE/esp-iot-solution/config.toml)
3+
Use [LaunchPad](https://espressif.github.io/esp-launchpad/?flashConfigURL=https://dl.espressif.com/AE/esp-iot-solution/config.toml) to flash this example.
44

5-
The USB Extension Screen Example allows the P4 development board to be used as an additional screen for Windows. It supports the following features:
5+
The USB extended display example allows the [ESP32_S3_LCD_EV_BOARD](https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/index.html) / [ESP32_P4_FUNCTION_EV_BOARD](https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32p4/esp32-p4-function-ev-board/index.html) development boards to function as a secondary display for Windows. It supports the following features:
66

7-
* Supports a screen refresh rate of 1024*600@60FPS
8-
* Supports up to five touch points
9-
* Supports audio input and output
7+
* **P4**: Supports a screen refresh rate of **1024×576@60FPS**.
8+
* **S3**: Supports a screen refresh rate of **800×480@13FPS**.
9+
* Supports up to **five-point touch input**.
10+
* Supports **audio input and output**.
1011

1112
## Required Hardware
1213

13-
* Development Board
14-
1. [ESP32-P4-Function-EV-Board](https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32p4/esp32-p4-function-ev-board/user_guide.html#getting-started) development board
15-
2. A 1024*600 MIPI screen from the development kit
16-
3. A speaker
14+
### P4 Development Board
1715

18-
* Connections
19-
1. Connect the high-speed USB port on the development board to the PC
16+
1. [ESP32-P4-Function-EV-Board](https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32p4/esp32-p4-function-ev-board/user_guide.html#getting-started) development board.
17+
2. A **1024×600** MIPI display from the development kit.
18+
3. A speaker.
19+
20+
### S3 Development Board
21+
22+
1. [ESP32-S3-LCD-EV-Board](https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/user_guide.html#getting-started) development board.
23+
2. A **800×480** or **480×480** RGB display from the development kit.
24+
3. A speaker.
25+
26+
## Hardware Connection
27+
28+
1. Connect the high-speed USB port on the development board to the PC.
2029

2130
## Compilation and Flashing
2231

23-
### P4 Device Side
32+
### Device Side
2433

25-
Build the project and flash it to the board, then run the monitor tool to view serial output:
34+
Build the project, flash it to the board, and run the monitor tool to check the serial output:
2635

27-
* Run `. ./export.sh` to set up the IDF environment
28-
* Run `idf.py set-target esp32p4` to set the target chip
29-
* If there are any errors in the previous step, run `pip install "idf-component-manager~=1.1.4"` to upgrade your component manager
30-
* Run `idf.py -p PORT flash monitor` to build, flash, and monitor the project
36+
1. Run `. ./export.sh` to set up the IDF environment.
37+
2. Run `idf.py set-target esp32p4` to set the target chip.
38+
3. If you encounter any errors in the previous step, run `pip install "idf-component-manager~=1.1.4"` to upgrade the component manager.
39+
4. Run `idf.py -p PORT flash monitor` to build, flash, and monitor the project.
3140

3241
(To exit the serial monitor, press `Ctrl-]`.)
3342

34-
Refer to the Getting Started Guide for all steps to configure and use ESP-IDF to build projects.
43+
Refer to the **Getting Started Guide** for full instructions on configuring and using ESP-IDF to build projects.
3544

36-
> Note: This example will fetch an AVI file online. Ensure that you are connected to the internet during the initial compilation.
45+
>> **Note:** This example fetches AVI files online. Ensure you have an internet connection during the first compilation.
3746
3847
### PC Side
3948

40-
For preparation, refer to the [windows_driver](./windows_driver/README.md)
49+
For preparation, refer to [windows_driver](./windows_driver/README_cn.md).
4150

4251
![Demo](https://dl.espressif.com/AE/esp-iot-solution/p4_usb_extern_screen.gif)
4352

44-
## Other Issues
53+
## Troubleshooting
4554

46-
### Touch Screen Does Not Control the P4 Screen
55+
### The touchscreen controls the wrong display
4756

48-
* In the Control Panel, select `Tablet PC Settings`
49-
* In the configuration section, select `Setup`
50-
* Follow the prompts to choose the P4 extension screen
57+
1. Open **Control Panel** and select **Tablet PC Settings**.
58+
2. Under the **Display** section, select **Setup**.
59+
3. Follow the on-screen instructions to choose the correct extended display.
5160

5261
### Adjusting JPEG Image Quality
5362

54-
* Modify the `string_desc_arr` vendor interface string in the `usb_descriptor.c` file. Change `Ejpg4` to the desired image quality level; the higher the number, the better the quality, but it will use more memory for the same frame.
63+
* Modify `CONFIG_USB_EXTEND_SCREEN_JPEG_QUALITY`. A higher value increases image quality but also consumes more memory per frame.
64+
65+
### Changing the Secondary Screen Resolution
66+
67+
* Modify `CONFIG_USB_EXTEND_SCREEN_HEIGHT` and `CONFIG_USB_EXTEND_SCREEN_WIDTH`.
68+
69+
**Note:** The driver currently does not support portrait-oriented screens. Please use a screen designed for landscape mode.
70+
71+
### Adjusting Image Output Frame Rate
72+
73+
* Modify `CONFIG_USB_EXTEND_SCREEN_MAX_FPS`. Lowering this value effectively reduces USB bandwidth usage. If USB audio stuttering occurs, consider decreasing this value.
74+
75+
### Modifying the Maximum Frame Size
76+
77+
* Modify `CONFIG_USB_EXTEND_SCREEN_FRAME_LIMIT_B` to limit the maximum image size received from the PC driver.
78+
79+
### Disabling Touchscreen Functionality
80+
81+
* Set `CONFIG_HID_TOUCH_ENABLE` to `n`.
5582

56-
### Modify Screen Resolution
83+
### Disabling Audio Functionality
5784

58-
- Update the `usb_descriptor.c` file by changing the `string_desc_arr` vendor interface string. Modify `R1024x600` to the desired screen resolution.
85+
* Set `CONFIG_UAC_AUDIO_ENABLE` to `n`.
5986

60-
**Note**: Currently, the driver does not support portrait mode screens. Please use hardware that is designed for landscape orientation.
87+
**Note:** If only the secondary screen function is enabled, change the PID to `0x2987`.

examples/usb/device/usb_extend_screen/README_cn.md

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,39 @@
22

33
使用 [LaunchPad](https://espressif.github.io/esp-launchpad/?flashConfigURL=https://dl.espressif.com/AE/esp-iot-solution/config.toml) 烧录该示例
44

5-
USB 扩展屏示例可以将 P4 开发板作为一块 windows 的副屏。支持以下功能。
5+
USB 扩展屏示例可以将 [ESP32_S3_LCD_EV_BOARD](https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/index.html) / [ESP32_P4_FUNCTION_EV_BOARD](https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32p4/esp32-p4-function-ev-board/index.html) 开发板作为一块 windows 的副屏。支持以下功能。
66

7-
* 支持 1024*600@60FPS 的屏幕刷新速率
7+
* P4: 支持 1024*576@60FPS 的屏幕刷新速率
8+
9+
* S3: 支持 800*480@13FPS 的屏幕刷新速率
810

911
* 支持最多五点的屏幕触摸
1012

1113
* 支持音频的输入和输出
1214

1315
## 所需硬件
1416

15-
* 开发板
17+
* P4 开发板
1618

1719
1. [ESP32-P4-Function-EV-Board](https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32p4/esp32-p4-function-ev-board/user_guide.html#getting-started) 开发板
1820
2. 开发套件中的一块 1024*600 的 MIPI 屏幕
1921
3. 一个扬声器
2022

23+
* S3 开发板
24+
25+
1. [ESP32-S3-LCD-EV-Board](https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/user_guide.html#getting-started) 开发板
26+
2. 开发套件中的一块 800\*480 / 480\*480 的 RGB 屏幕
27+
3. 一个扬声器
28+
29+
## 硬件连接
30+
2131
* 连接
2232

2333
1. 将开发板上的高速 USB 口连接到 PC 上
2434

2535
## 编译和烧录
2636

27-
### P4 设备端
37+
### 设备端
2838

2939
构建项目并将其烧录到板子上,然后运行监控工具以查看串行输出:
3040

@@ -47,20 +57,38 @@ USB 扩展屏示例可以将 P4 开发板作为一块 windows 的副屏。支持
4757

4858
## 其他问题
4959

50-
### 触摸屏控制的不是 P4 的屏幕
60+
### 触摸屏控制的不是设备端的屏幕
5161

5262
* 在控制面板中选择 `平板电脑设置`
5363

5464
* 在配置栏中选择 `设置`
5565

56-
* 按照提示选择 P4 扩展屏
66+
* 按照提示选择扩展屏
5767

5868
### 调高/调低 JPEG 的图片质量
5969

60-
* 修改 `usb_descriptor.c` 文件中的 `string_desc_arr` Vendor 接口字符串,将 `Ejpg4` 修改为所需的图片质量,数字越大质量越高,同样的一帧图像占用内存更多。
70+
* 修改 `CONFIG_USB_EXYEEND_SCREEN_JEPG_QUALITY`,数字越大质量越高,同样的一帧图像占用内存更多。
71+
72+
### 修改副屏分辨率
73+
74+
* 修改 `CONFIG_USB_EXTEND_SCREEN_HEIGHT``CONFIG_USB_EXTEND_SCREEN_WIDTH`
75+
76+
Note: 目前驱动不支持竖屏的屏幕,请使用硬件上为横屏的屏幕。
77+
78+
### 修改图像输出帧率
79+
80+
* 修改 `CONFIG_USB_EXTEND_SCREEN_MAX_FPS`,降低该值可以有效的减少 USB 带宽,当 USB AUDIO 音频卡顿时,可以适当减少此值。
81+
82+
### 修改一帧图像的最大值
83+
84+
* 修改 `CONFIG_USB_EXTEND_SCREEN_FRAME_LIMIT_B`,可以限制 PC 驱动传来的图像最大长度。
85+
86+
### 不启用触摸屏功能
87+
88+
* 修改 `CONFIG_HID_TOUCH_ENABLE``n`
6189

62-
### 修改屏幕分辨率
90+
### 不启用音频功能
6391

64-
* 修改 `usb_descriptor.c` 文件中的 `string_desc_arr` Vendor 接口字符串,将 `R1024x600` 修改为所需的屏幕大小
92+
* 修改 `CONFIG_UAC_AUDIO_ENABLE``n`
6593

66-
Note: 目前驱动不支持竖屏的屏幕,请使用硬件上为横屏的屏幕。
94+
Note: 当只启用副屏功能,请将 PID 修改为 `0x2987`
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
file(GLOB_RECURSE SRCS src/*.c)
2+
3+
set(priv_requires "esp32_s3_lcd_ev_board")
4+
5+
idf_component_register(
6+
SRCS ${SRCS}
7+
INCLUDE_DIRS "include"
8+
PRIV_REQUIRES ${priv_requires})
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## IDF Component Manager Manifest File
2+
dependencies:
3+
idf: ">=5.0"
4+
5+
chmorgan/esp-audio-player: "1.0.*"
6+
chmorgan/esp-file-iterator: "1.0.0"
7+
espressif/led_strip: ^2
8+
9+
esp_codec_dev:
10+
public: true
11+
version: "~1.3.0"

0 commit comments

Comments
 (0)