-
Notifications
You must be signed in to change notification settings - Fork 4.3k
ESP-P4-Function-EV-Board add SD card, camera, and font initialization #1403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…nd display handling
…uch and SD card support
Removed ESP hosted configuration options.
…d updated configurations
…updated configurations
…detailed features; add SD card, camera, and font initialization in esp-p4-function-ev-board.cc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds hardware initialization support for the ESP-P4-Function-EV-Board, including SD card mounting, camera initialization, and font verification functionality. The changes enhance the board's feature set by enabling additional peripherals and updating documentation to reflect these capabilities.
- Adds three new initialization methods for SD card, camera, and fonts
- Updates destructor to handle SD card cleanup
- Expands README documentation to list all supported hardware features
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| main/boards/esp-p4-function-ev-board/esp-p4-function-ev-board.cc | Adds SD card, camera, and font initialization methods; includes SD card unmount in destructor and new include for LVGL theme support |
| main/boards/esp-p4-function-ev-board/README.md | Expands feature documentation to include detailed hardware support (audio, touch, SD card, camera, USB, SPIFFS, fonts) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
main/boards/esp-p4-function-ev-board/esp-p4-function-ev-board.cc
Outdated
Show resolved
Hide resolved
main/boards/esp-p4-function-ev-board/esp-p4-function-ev-board.cc
Outdated
Show resolved
Hide resolved
| void InitializeCamera() | ||
| { | ||
| ESP_LOGI(TAG, "Initializing camera"); | ||
| bsp_camera_cfg_t camera_cfg = {0}; | ||
| esp_err_t ret = bsp_camera_start(&camera_cfg); | ||
| if (ret != ESP_OK) { | ||
| ESP_LOGE(TAG, "Failed to initialize camera: %s", esp_err_to_name(ret)); | ||
| } else { | ||
| ESP_LOGI(TAG, "Camera initialized successfully"); | ||
| } | ||
| } |
Copilot
AI
Nov 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The camera is initialized but never exposed through a GetCamera() method, and there's no cleanup in the destructor. This means:
- The initialized camera resources cannot be accessed by the application
- Camera resources may leak on board destruction
Consider either:
- Adding a
virtual Camera* GetCamera() overridemethod that returns a Camera wrapper for the BSP camera - Adding camera cleanup in the destructor (e.g.,
bsp_camera_stop()if available) - Removing the camera initialization if the camera functionality is not yet ready to be used
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…ck configuration for direct camera setup and update README for clarity
Remove ESP-P4-Function-EV-Board configuration and update README with detailed features; add SD card, camera, and font initialization in esp-p4-function-ev-board.cc