From f301170c7cb50fdb9250a6e4b89682f9c0e543cb Mon Sep 17 00:00:00 2001 From: Mike Teachman Date: Tue, 22 Oct 2019 10:25:37 -0700 Subject: [PATCH] esp32/machine_hw_spi: Fix exception msg when host is already in use. When a SPI bus is initialized with a SPI host that is currently in use the exception msg incorrectly indicates "SPI device already in use". The mention of "device" in the exception msg is confusing because the error is about trying to use a SPI host that is already claimed. A better exception msg is "SPI host already in use". --- ports/esp32/machine_hw_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/esp32/machine_hw_spi.c b/ports/esp32/machine_hw_spi.c index 2f63a32d4a..af47711aad 100644 --- a/ports/esp32/machine_hw_spi.c +++ b/ports/esp32/machine_hw_spi.c @@ -205,7 +205,7 @@ STATIC void machine_hw_spi_init_internal( return; case ESP_ERR_INVALID_STATE: - mp_raise_msg(&mp_type_OSError, "SPI device already in use"); + mp_raise_msg(&mp_type_OSError, "SPI host already in use"); return; }