circuitpython/ports/atmel-samd/common-hal/busio
Scott Shawcroft fece0fb432
Fix crash when UART construct fails
After the script stops with the exception thrown the final gc_sweep
will call any finalizers and they usually call deinit. deinit on
invalid objects can wreak havoc by changing random memory or
(hopefully) crashing. This fixes ensures the object is deinited
until initialization succeeds and the object is valid.

Do the same fix for I2C and SPI too.

Fixes #4700 and fixes #5005
2021-07-20 17:15:19 -07:00
..
I2C.c Fix crash when UART construct fails 2021-07-20 17:15:19 -07:00
I2C.h codeformat: Fix handling of `**` 2021-04-30 15:30:13 -05:00
OneWire.h Merge commit 'f869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c' into nrf2_merge 2017-10-24 22:31:16 -07:00
SPI.c Fix crash when UART construct fails 2021-07-20 17:15:19 -07:00
SPI.h codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
UART.c Fix crash when UART construct fails 2021-07-20 17:15:19 -07:00
UART.h codeformat: Fix filename matching 2021-04-30 10:48:08 -05:00
__init__.c Merge commit 'f869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c' into nrf2_merge 2017-10-24 22:31:16 -07:00