Skip to content

Conversation

@Wassasin
Copy link
Contributor

As the first step towards implementing Drop for all drivers, have the drivers own an instance of a Pin driver which takes care of resetting each pin when the parent peripheral driver is dropped.

A subsequent PR will tackle Flexcomm disable/reset for each peripheral.

I took care to change as little as possible. Ideally low level Sealed implementations are separated from high level embassy driver implementations. Currently this distinction is a bit blurry, and consequently a driver can be a bit messy. Good examples of these are the SdaPin and CtsPin traits and friends. The separation between gpio and iopctl could also be better. IopctlPin traits should be private.

Have not yet tested this PR on the EVK, as we are waiting for those to be delivered. I will update this PR once it has been tested.

@jerrysxie jerrysxie added enhancement New feature or request core hal MCU core HAL functionality labels Mar 25, 2025
@Wassasin Wassasin force-pushed the feature/drop-for-gpio branch 3 times, most recently from 4308137 to 7cbaa1a Compare March 31, 2025 13:05
@felipebalbi felipebalbi moved this to In progress in Embedded Controller Apr 3, 2025
@Wassasin Wassasin force-pushed the feature/drop-for-gpio branch 2 times, most recently from 60943f2 to 89f7de2 Compare April 8, 2025 18:01
@jeffglaum
Copy link
Contributor

@JamesHuard , @felipebalbi can you guys please review and provide feedback? Thanks.

@jeffglaum
Copy link
Contributor

@RobertZ2011 can you guys please review and provide feedback? Thanks.

felipebalbi
felipebalbi previously approved these changes May 20, 2025
Copy link
Contributor

@felipebalbi felipebalbi left a comment

Choose a reason for hiding this comment

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

No worries with this change. Just added a Guard type to make sure Drop puts the pin back into its reset state. Conflicts need to be fixed, though.

@Wassasin Wassasin force-pushed the feature/drop-for-gpio branch from 15f92eb to d5575fd Compare May 21, 2025 08:42
@Wassasin Wassasin marked this pull request as ready for review May 21, 2025 09:55
@jeffglaum jeffglaum moved this from In progress to In review in Embedded Controller May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core hal MCU core HAL functionality enhancement New feature or request

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

5 participants