summaryrefslogtreecommitdiff
path: root/py/makeversionhdr.py
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2025-08-06 17:26:21 +1000
committerDamien George <damien@micropython.org>2025-09-10 16:18:03 +1000
commit371db85c8e9c29ac66d772e051c7a167782e8407 (patch)
tree9468c89325200ead9d402d9aadb704aa30fc0b55 /py/makeversionhdr.py
parenta43e38544bf707831350dd53091c7d47eddd41bf (diff)
esp32/machine_uart: Convert machine.UART objects to static instances.
Makes machine.UART objects static instances (similar to other ports), adds machine_uart_deinit_all() function for cleanup on soft reset. - Fixes the case where the OS-level uart_event_task is leaked (along with 2KB of heap) when a UART object is garbage collected (including after a soft reset). - Fixes hard fault if a previous UART irq() fires after the UART object is garbage collected (including after a soft reset), but before any new UART object is instantiated for the same UART number. - Constructing multiple UART objects for the same UART now returns the same instance multiple times, not different instances. - Was also able to streamline deinit/init to only install the driver once, rather than install-with-defaults/uninstall/reinstall. Alternative would be to add a finaliser, but this is more consistent with how most other UART objects are implemented. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'py/makeversionhdr.py')
0 files changed, 0 insertions, 0 deletions