Skip to content

Conversation

@ttzytt
Copy link
Contributor

@ttzytt ttzytt commented Jan 20, 2026

This PR builds on the dedicated GPIO foundation introduced in #4699 to implement dedicated GPIO bundles, which allow controlling multiple dedicated channels at once.

This PR also introduces several minor changes to the existing APIs (see this comment) and documentation.

cc #2649

Copilot AI review requested due to automatic review settings January 20, 2026 05:55
@ttzytt ttzytt changed the title Dedicated GPIO bundle implementation Dedicated GPIO bundle initial implementation Jan 20, 2026
Copy link
Contributor

Copilot AI 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

This PR implements dedicated GPIO bundles for ESP Rust HAL, building on the dedicated GPIO foundation from PR #4699. It provides a way to control multiple dedicated GPIO channels simultaneously, along with minor API improvements and enhanced documentation.

Changes:

  • Implements three bundle types (DedicatedGpioInputBundle, DedicatedGpioOutputBundle, DedicatedGpioFlexBundle) for efficient multi-channel operations
  • Updates existing dedicated GPIO APIs to improve usability (removes mut requirement from level() methods, enhances debug assertions with clearer error messages)
  • Adds comprehensive documentation with examples and low-level function helpers

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 12 comments.

File Description
hil-test/src/bin/gpio.rs Adds conditional compilation for architecture-specific features, new test cases for bundle functionality, and infrastructure for multi-core testing
esp-hal/src/gpio/dedicated.rs Implements bundle types, adds low-level helpers (write_ll, read_all_ll, output_levels_ll), improves documentation, and conditionally disables output_level methods on ESP32-S3 due to LLVM bug

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 20, 2026 06:06
ttzytt and others added 5 commits January 20, 2026 00:07
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
@ttzytt
Copy link
Contributor Author

ttzytt commented Jan 21, 2026

@bugadani

Really nice work, thank you for it! I left a few comments, I hope you don't mind, but most of them are just notes for the documentation to make things more obvious, and more in line with API guidelines that will need to be upheld for stabilization anyway.

Thank you for the careful review!

Of course I don’t mind at all. The notes are really helpful. They already helped me spot a bunch of issues and ambiguities I hadn’t realized,

I left some suggestions unresolved and will work on these soon.

Copilot AI review requested due to automatic review settings January 28, 2026 04:06
Copy link
Contributor

Copilot AI 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

Copilot reviewed 2 out of 3 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

/// Re-enables a dedicated output driver in this bundle after it was disabled by [`Self::disable_output`].
///
/// This is equivalent to [`Self::with_output`].
pub fn enable_output<'d>(&mut self, out: &'lt DedicatedGpioOutput<'d>) -> &mut Self {
Copy link
Contributor

Choose a reason for hiding this comment

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

We can probably get rid of with_output in favor of enable/disable. Otherwise you'd have to explain the difference between them (there is none, really), and explain when to use one over the other.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, that makes sense.

@esp-rs esp-rs deleted a comment from Copilot AI Jan 28, 2026
@esp-rs esp-rs deleted a comment from Copilot AI Jan 28, 2026
@esp-rs esp-rs deleted a comment from Copilot AI Jan 28, 2026
@esp-rs esp-rs deleted a comment from Copilot AI Jan 28, 2026
@esp-rs esp-rs deleted a comment from Copilot AI Jan 28, 2026
@esp-rs esp-rs deleted a comment from Copilot AI Jan 28, 2026
@esp-rs esp-rs deleted a comment from Copilot AI Jan 28, 2026
@esp-rs esp-rs deleted a comment from Copilot AI Jan 28, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

Copilot AI 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

Copilot reviewed 2 out of 3 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings January 28, 2026 07:55
Copy link
Contributor

Copilot AI 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

Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants