Skip to content

Conversation

@ericschaal
Copy link

Summary

Adds set_output_enable_inversion API to both GPIO and PIO pin types, providing control over output enable signal polarity.

Changes

  • Added set_output_enable_inversion(&mut self, invert: bool) method to GPIO pins
  • Added set_output_enable_inversion(&mut self, invert: bool) method to PIO pins

@ericschaal ericschaal marked this pull request as ready for review October 31, 2025 08:51
@i509VCB
Copy link
Member

i509VCB commented Nov 1, 2025

I think set_output_enable_inversion could be shorted to set_output_inversion and mean the same thing.

@ericschaal
Copy link
Author

Hi @i509VCB,

I think these are different things. set_output_inversion flips the data (HIGH/LOW), while set_output_enable_inversion inverts the output enable signal. They use different registers (OUTOVER vs OEOVER).

For background, I needed this to implement i2C using PIO. I'm using this pico sample as a reference.

Let me know if I'm misunderstanding though!

Screenshot 2025-11-03 at 8 36 47 AM

@i509VCB
Copy link
Member

i509VCB commented Nov 3, 2025

Okay, so I guess ignore my comment then regarding naming.

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