|
1 | | -## USB Extension Screen Example |
| 1 | +## USB Extended Display Example |
2 | 2 |
|
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. |
4 | 4 |
|
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: |
6 | 6 |
|
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**. |
10 | 11 |
|
11 | 12 | ## Required Hardware |
12 | 13 |
|
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 |
17 | 15 |
|
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. |
20 | 29 |
|
21 | 30 | ## Compilation and Flashing |
22 | 31 |
|
23 | | -### P4 Device Side |
| 32 | +### Device Side |
24 | 33 |
|
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: |
26 | 35 |
|
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. |
31 | 40 |
|
32 | 41 | (To exit the serial monitor, press `Ctrl-]`.) |
33 | 42 |
|
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. |
35 | 44 |
|
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. |
37 | 46 |
|
38 | 47 | ### PC Side |
39 | 48 |
|
40 | | -For preparation, refer to the [windows_driver](./windows_driver/README.md) |
| 49 | +For preparation, refer to [windows_driver](./windows_driver/README_cn.md). |
41 | 50 |
|
42 | 51 |  |
43 | 52 |
|
44 | | -## Other Issues |
| 53 | +## Troubleshooting |
45 | 54 |
|
46 | | -### Touch Screen Does Not Control the P4 Screen |
| 55 | +### The touchscreen controls the wrong display |
47 | 56 |
|
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. |
51 | 60 |
|
52 | 61 | ### Adjusting JPEG Image Quality |
53 | 62 |
|
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`. |
55 | 82 |
|
56 | | -### Modify Screen Resolution |
| 83 | +### Disabling Audio Functionality |
57 | 84 |
|
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`. |
59 | 86 |
|
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`. |
0 commit comments