Ensure GPIO pins are reset when used by a I2C {master, slave}, UART and ADC #355
+277
−178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As the first step towards implementing
Dropfor all drivers, have the drivers own an instance of aPindriver 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
Sealedimplementations 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 theSdaPinandCtsPintraits and friends. The separation betweengpioandiopctlcould also be better.IopctlPintraits 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.