summaryrefslogtreecommitdiff
path: root/py/modmicropython.c
diff options
context:
space:
mode:
authorrobert-hh <robert@hammelrath.com>2023-08-16 16:00:43 +0200
committerDamien George <damien@micropython.org>2023-09-01 00:27:13 +1000
commitce38784fa8e8abc57f7d99ce10739c4f1b577565 (patch)
tree12cf0c6b6a6ba77660e5e9c189341fbd5fd15efa /py/modmicropython.c
parent3f5976e14a1e0f94f9af414bd99789ebf30a865d (diff)
mimxrt/machine_uart: Fix and complete UART.deinit and uart_deinit_all.
The code did not check at deinit whether a UART was initialized. That did not matter for all MCU's except MIMXRT1176, which crashes at the second soft reset in a row. But since it is a general problem to use UART methods of a UART which has been deinitialized, checks were added to all applicable methods for a clear response instead of e.g. a crash. Deinitialize UART using software reset. It resets the UART but keeps it accessible for software, avoiding an exception when UART registers are accessed after a DeInit. Signed-off-by: robert-hh <robert@hammelrath.com>
Diffstat (limited to 'py/modmicropython.c')
0 files changed, 0 insertions, 0 deletions