micropython-stubs icon indicating copy to clipboard operation
micropython-stubs copied to clipboard

Add side_pindir parameter to rp2.asm_pio signature

Open Copilot opened this issue 4 months ago • 0 comments

This PR updates the rp2.asm_pio() function signature in the reference stubs to include the new side_pindir parameter introduced in micropython/micropython#16506.

Changes

Added the side_pindir: bool = False parameter to the asm_pio() decorator function in /reference/micropython/rp2/__init__.pyi.

Parameter Details

The side_pindir parameter controls how .side() modifiers behave in PIO assembly programs:

  • When False (default): .side() modifiers control pin values
  • When True: .side() modifiers control pin directions instead of pin values

Documentation Updates

  • Added documentation for the new side_pindir parameter
  • Improved the sideset_init parameter documentation to use the more precise .side() modifiers terminology, matching the official MicroPython documentation style

Validation

✅ All ruff check and ruff format validations passed
✅ Type annotations are correct (bool type with False default)
✅ Documentation follows the existing style and format

Fixes #793

[!WARNING]

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/micropython/micropython/pulls/16506
    • Triggering command: curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Reference: Update rp2.asm_pio signature </issue_title> <issue_description>Add new optional parameter

https://github.com/micropython/micropython/pull/16506</issue_description>

Comments on the Issue (you are @copilot in this section)

@Josverl This needs to be added only to the rp2 Pio stub in the reference folder.

First check if the new parameter is already there. If so then Stop making any changes.

Alse add a the parameter with the correct typing, an run ruff check an ruff format ob the changed files </comment_new>

Fixes Josverl/micropython-stubs#793


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot avatar Oct 17 '25 00:10 Copilot