Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(p4): Add method to set the pins for SDIO to WiFi chip#11513

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
me-no-dev merged 2 commits intomasterfromfeature/p4_wifi_pins
Jun 30, 2025

Conversation

me-no-dev
Copy link
Member

This pull request introduces enhancements to the SDIO pin configuration mechanism in theWiFiGeneric library, allowing dynamic configuration of pins for external ESP MCU connections. The changes primarily involve adding a newsetPins method, refactoring pin initialization logic, and updating associated comments for clarity.

SDIO Pin Configuration Enhancements:

  • Addition ofsetPins Method: Introduced a static methodsetPins inWiFiGenericClass to allow dynamic configuration of SDIO pins. This method validates the provided pin values and ensures they are set before WiFi initialization. (libraries/WiFi/src/WiFiGeneric.cpp andlibraries/WiFi/src/WiFiGeneric.h,[1][2]

  • Refactoring Pin Initialization Logic: Replaced hardcoded pin configurations with a newsdio_pin_config_t structure, enabling centralized and flexible management of SDIO pin settings. (libraries/WiFi/src/WiFiGeneric.cpp,libraries/WiFi/src/WiFiGeneric.cppR249-R309)

Code Cleanup and Comments:

  • Updated Comments inwifiHostedInit: Refined comments in thewifiHostedInit function to reflect the use of the newsdio_pin_config structure instead of hardcoded pin configurations. (libraries/WiFi/src/WiFiGeneric.cpp,libraries/WiFi/src/WiFiGeneric.cppL282-R326)

Fixes:#11404

@github-actionsGitHub Actions
Copy link
Contributor

github-actionsbot commentedJun 24, 2025
edited
Loading

Messages
📖🎉 Good Job! All checks are passing!

👋Hello me-no-dev, we appreciate your contribution to this project!


📘 Please review the project'sContributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you haveread and signed theContributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by thePR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with eachpush event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger isnot a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manuallyretry these Danger checks, please navigate to theActions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫dangerJS against462efa9

@me-no-devme-no-dev requested a review fromCopilotJune 24, 2025 14:54
@me-no-devme-no-dev added Status: Review neededIssue or PR is awaiting review Area: WiFiIssue related to WiFi labelsJun 24, 2025
@me-no-devme-no-dev self-assigned thisJun 24, 2025
Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

Enhance SDIO pin flexibility by introducing a dynamic configuration method and centralizing pin setup using a new data structure, replacing hardcoded values.

  • AddsetPins method to allow custom SDIO pin assignment before WiFi initialization.
  • Introducesdio_pin_config_t struct with default initialization and refactorwifiHostedInit to use it.
  • Update inline comments to reflect the new pin configuration approach.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

FileDescription
libraries/WiFi/src/WiFiGeneric.hDeclaredsetPins method underCONFIG_ESP_WIFI_REMOTE_ENABLED.
libraries/WiFi/src/WiFiGeneric.cppAddedsdio_pin_config_t, default pin setup,setPins logic, refactoredwifiHostedInit, and updated comments.
Comments suppressed due to low confidence (2)

libraries/WiFi/src/WiFiGeneric.h:87

  • The public methodsetPins lacks a documentation comment. Consider adding a brief Doxygen-style comment describing each parameter, the return value, and when it should be called to improve clarity for users.
  static bool setPins(int8_t clk, int8_t cmd, int8_t d0, int8_t d1, int8_t d2, int8_t d3, int8_t rst);

libraries/WiFi/src/WiFiGeneric.cpp:280

  • The newsetPins method implements validation and configuration logic but isn't covered by any tests. Adding unit or integration tests would help ensure correct behavior and prevent regressions.
bool WiFiGenericClass::setPins(int8_t clk, int8_t cmd, int8_t d0, int8_t d1, int8_t d2, int8_t d3, int8_t rst) {

@github-actionsGitHub Actions
Copy link
Contributor

github-actionsbot commentedJun 24, 2025
edited
Loading

Test Results

 76 files   76 suites   13m 7s ⏱️
 38 tests  38 ✅ 0 💤 0 ❌
241 runs  241 ✅ 0 💤 0 ❌

Results for commit462efa9.

♻️ This comment has been updated with latest results.

@github-actionsGitHub Actions
Copy link
Contributor

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32P4000.000.00000.000.00
ESP32S3000.000.00000.000.00
ESP32S2000.000.00000.000.00
ESP32C3000.000.00000.000.00
ESP32C6000.000.00000.000.00
ESP32000.000.00000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32P4ESP32S3ESP32S2ESP32C3ESP32C6ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
libraries/WiFi/examples/FTM/FTM_Initiator------------
libraries/WiFi/examples/FTM/FTM_Responder------------
libraries/WiFi/examples/SimpleWiFiServer------------
libraries/WiFi/examples/WiFiAccessPoint------------
libraries/WiFi/examples/WiFiClient------------
libraries/WiFi/examples/WiFiClientBasic------------
libraries/WiFi/examples/WiFiClientConnect------------
libraries/WiFi/examples/WiFiClientEvents------------
libraries/WiFi/examples/WiFiClientStaticIP------------
libraries/WiFi/examples/WiFiExtender------------
libraries/WiFi/examples/WiFiIPv6------------
libraries/WiFi/examples/WiFiMulti------------
libraries/WiFi/examples/WiFiMultiAdvanced------------
libraries/WiFi/examples/WiFiScan------------
libraries/WiFi/examples/WiFiScanAsync------------
libraries/WiFi/examples/WiFiScanDualAntenna------------
libraries/WiFi/examples/WiFiScanTime------------
libraries/WiFi/examples/WiFiTelnetToSerial------------
libraries/WiFi/examples/WiFiUDPClient------------
libraries/WiFi/examples/WPS------------
libraries/WiFi/examples/WiFiBlueToothSwitch------------
libraries/WiFi/examples/WiFiClientEnterprise------------
libraries/WiFi/examples/WiFiSmartConfig------------

@Westcott1
Copy link

Can't wait to try this!

Jason2866 added a commit to tasmota/arduino-esp32 that referenced this pull requestJun 27, 2025
Jason2866 added a commit to tasmota/arduino-esp32 that referenced this pull requestJun 27, 2025
@P-R-O-C-H-YP-R-O-C-H-Y added Status: Pending MergePull Request is ready to be merged and removed Status: Review neededIssue or PR is awaiting review labelsJun 30, 2025
@me-no-devme-no-dev merged commit2592a7b intomasterJun 30, 2025
56 checks passed
@me-no-devme-no-dev deleted the feature/p4_wifi_pins branchJune 30, 2025 13:03
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@lucasssvazlucasssvazlucasssvaz approved these changes

@P-R-O-C-H-YP-R-O-C-H-YP-R-O-C-H-Y approved these changes

Assignees

@me-no-devme-no-dev

Labels
Area: WiFiIssue related to WiFiStatus: Pending MergePull Request is ready to be merged
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

ESP32P4/C6 WiFi init doesn't work SDIO fail
4 participants
@me-no-dev@Westcott1@lucasssvaz@P-R-O-C-H-Y

[8]ページ先頭

©2009-2025 Movatter.jp