From eb49c29fa3953e52b96bd8d03353893731ac30f2 Mon Sep 17 00:00:00 2001 From: gornekich Date: Fri, 13 Aug 2021 16:12:10 +0300 Subject: [PATCH] rfal platform: remove spi device check (#643) --- lib/ST25RFAL002/platform.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/ST25RFAL002/platform.c b/lib/ST25RFAL002/platform.c index 131cd98e..7a011965 100644 --- a/lib/ST25RFAL002/platform.c +++ b/lib/ST25RFAL002/platform.c @@ -68,12 +68,15 @@ HAL_StatusTypeDef platformSpiTxRx(const uint8_t *txBuf, uint8_t *rxBuf, uint16_t } void platformProtectST25RComm() { - furi_assert(platform_st25r3916 == NULL); + // Don't check platform_st25r3916 since spi device is used simultaneously from nfc worker + // thread and platformIrqWorker thread with the highest priority + + // furi_assert(platform_st25r3916 == NULL); platform_st25r3916 = (FuriHalSpiDevice*)furi_hal_spi_device_get(FuriHalSpiDeviceIdNfc); } void platformUnprotectST25RComm() { - furi_assert(platform_st25r3916); + // furi_assert(platform_st25r3916); furi_hal_spi_device_return(platform_st25r3916); - platform_st25r3916 = NULL; + // platform_st25r3916 = NULL; }