Skip to content

Commit e5e99d5

Browse files
committed
Fix hang on ESP32 (Issue# 156)
Call endTransaction to release a mutex acquired by beginTransaction. setClockDivider later tries to acquire the mutex. Signed-off-by: jim <jmwanderer@gmail.com>
1 parent 0bbc0b2 commit e5e99d5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/PN532_SPI.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ void PN532_SPI::begin()
2121

2222
_spi->begin();
2323
_spi->beginTransaction(SPISettings(1000000, LSBFIRST, SPI_MODE0));
24+
_spi->endTransaction();
2425
#if defined(ARDUINO_XIAO_RA4M1) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_RP2350)
2526
#else
2627
// _spi->setDataMode(SPI_MODE0); // PN532 only supports mode0

0 commit comments

Comments
 (0)