Update 2026-09-15: irq() done, the other four named precisely at PyMCU/PyMCU#451
machine.UART.irq(handler, trigger=0, hard=0) is implemented, wrapping the HAL's own
UART.irq() (which already existed: RXCIE0 + global interrupts + compile_isr, the same
primitive Pin.irq/Timer.irq already use). trigger=/hard= are accepted and ignored --
this chip's USART has one real interrupt source and every ISR here is already a true
hardware interrupt. The stub declares handler/trigger/hard positional-only
(self, handler=None, trigger=0, hard=False, /), so the signature stays blocked on
PyMCU/pymcu-micropython#12 (moved the allowlist entry there, alongside PWM's and
Pin.value's identically-shaped setters).
init()/deinit()/flush()/sendbreak()/txdone() genuinely need new HAL primitives (the
existing uart_write()'s busy-wait is on the wrong flag for flush/txdone: UDRE0, "ready
for the next byte", not TXC0, "the last byte finished"). Named exactly at
PyMCU/PyMCU#451 (milestone Peripherals): uart_reinit/uart_flush/uart_tx_done/
uart_deinit, plus a note that sendbreak() is real additional work (baud-rate-relative
pin-level timing, no native break mode on this USART) and that most of init()'s stub
keywords (tx=/rx=/txbuf=/rxbuf=/timeout=/timeout_char=/invert=/flow=/rts=/
cts=) describe hardware this USART does not have.
Original report
machine.UART only offers __init__, write, read, readline, readinto, any and
three PyMCU-only helpers (write_str, println, print_byte). Compared against
micropython-rp2-stubs, init()/deinit()/flush()/irq()/sendbreak()/txdone() were
missing.
Repo choice
irq() closed in src/pymcu_micropython/machine.py. The rest: PyMCU/PyMCU#451 (HAL), then
thin wrappers here.
Update 2026-09-15: irq() done, the other four named precisely at PyMCU/PyMCU#451
machine.UART.irq(handler, trigger=0, hard=0)is implemented, wrapping the HAL's ownUART.irq()(which already existed: RXCIE0 + global interrupts +compile_isr, the sameprimitive
Pin.irq/Timer.irqalready use).trigger=/hard=are accepted and ignored --this chip's USART has one real interrupt source and every ISR here is already a true
hardware interrupt. The stub declares
handler/trigger/hardpositional-only(
self, handler=None, trigger=0, hard=False, /), so the signature stays blocked onPyMCU/pymcu-micropython#12(moved the allowlist entry there, alongsidePWM's andPin.value's identically-shaped setters).init()/deinit()/flush()/sendbreak()/txdone()genuinely need new HAL primitives (theexisting
uart_write()'s busy-wait is on the wrong flag forflush/txdone:UDRE0, "readyfor the next byte", not
TXC0, "the last byte finished"). Named exactly atPyMCU/PyMCU#451 (milestone Peripherals):
uart_reinit/uart_flush/uart_tx_done/uart_deinit, plus a note thatsendbreak()is real additional work (baud-rate-relativepin-level timing, no native break mode on this USART) and that most of
init()'s stubkeywords (
tx=/rx=/txbuf=/rxbuf=/timeout=/timeout_char=/invert=/flow=/rts=/cts=) describe hardware this USART does not have.Original report
machine.UARTonly offers__init__,write,read,readline,readinto,anyandthree PyMCU-only helpers (
write_str,println,print_byte). Compared againstmicropython-rp2-stubs,init()/deinit()/flush()/irq()/sendbreak()/txdone()weremissing.
Repo choice
irq()closed insrc/pymcu_micropython/machine.py. The rest: PyMCU/PyMCU#451 (HAL), thenthin wrappers here.