Skip to content

Conversation

@multiplemonomials
Copy link
Collaborator

Summary of changes

This PR simplifies and standardizes the PinMode enum on Apollo3. Previously, this enum contained every possible pin setting it was possible to set on the device, even ones that didn't really make sense (e.g. disabling the input so it reads as 0). Now, this enum is much simpler and only contains pin modes that are (semi-)standard across other Mbed targets.

I also fixed an issue where if a pin was configured as an open-drain output, reading it would always return the written state of the pin instead of its actual electrical state.

Impact of changes

  • Apollo3 pin name constants now have standardized names
  • Removed Apollo3 pin name constants whose functions aren't obvious or standardized
  • Fixed bug with reading open drain DigitalInOuts on Apollo3

Migration actions required

Documentation

I'll add a note to the docs site about how only IO_20 has a pulldown.


Pull request type

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[X] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR

Verified that Apollo3 now passes the GPIO test, except that the pull-down test fails as it does not support this.


@multiplemonomials multiplemonomials merged commit 0ff573d into master Aug 19, 2025
52 checks passed
@multiplemonomials multiplemonomials deleted the dev/apollo3-standardize-pin-modes branch August 19, 2025 02:43
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.

3 participants