diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2020-09-29 13:04:39 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2020-09-30 12:57:39 -0700 |
| commit | a739d314f1a9f5fee6517eb425a2c691969fd7f7 (patch) | |
| tree | ecdf62606a0ec23fc465798534e1cde7313351c9 /shared-module | |
| parent | 7f803c0b51c333210ed267502422ed7bb28b9be7 (diff) | |
Add Metro ESP32S2
Also fix two bugs:
* Crash when resetting board.SPI when it hasn't been inited.
* Reading back the output value is always false. Fixes #3353
Diffstat (limited to 'shared-module')
| -rw-r--r-- | shared-module/board/__init__.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/shared-module/board/__init__.c b/shared-module/board/__init__.c index fb4f731b8..39b68a0f1 100644 --- a/shared-module/board/__init__.c +++ b/shared-module/board/__init__.c @@ -167,7 +167,9 @@ void reset_board_busses(void) { } #endif // make sure SPI lock is not held over a soft reset - common_hal_busio_spi_unlock(&spi_obj); + if (spi_singleton != NULL) { + common_hal_busio_spi_unlock(spi_singleton); + } if (!display_using_spi) { spi_singleton = NULL; } |
