Skip to content

Pin.pull() needs PyMCU/PyMCU#448 (HAL getter); Pin.irq() blocked on #12 #19

Description

@begeistert

Update 2026-09-15: Pin.init done, Pin.pull/Pin.irq split into precise HAL/compiler tickets

machine.Pin.init(value=...) is implemented (src/pymcu_micropython/machine.py), forwarding
to the HAL's own init() which already had value/drive/alt; mode/pull's sentinel
default is now the literal -1 MicroPython itself uses (verified byte-identical to the old
255 spelling). drive=/alt= raise, matching what the HAL already does for them (this
chip's GPIO has neither a pin-mux nor a drive-strength register). This closes the
machine.Pin.init allowlist entry.

Remaining two, now precisely filed:

Original report

Compared against micropython-rp2-stubs:

  • machine.Pin.init(mode=-1, pull=-1, *, value=None, drive=None, alt=None) -- this layer's
    init(mode=255, pull=255) had neither value= nor drive=/alt=.
  • machine.Pin.pull() -- a getter for the currently configured pull mode; only the setter
    (init(pull=...)) existed.
  • machine.Pin.irq(handler, trigger, *, priority=1, wake=None, hard=False) -- this layer's
    irq(handler, trigger) has none of priority=/wake=/hard=; on this chip none of the
    three map onto anything real (documented limitation, not a gap to close).

Repo choice

machine.Pin.pull()'s getter needs PyMCU/PyMCU#448 (HAL). machine.Pin.irq() needs
#12 (compiler, positional-only /).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions