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".
This commit is contained in:
Mike Teachman 2019-10-22 10:25:37 -07:00 committed by Damien George
parent 079cc940a6
commit f301170c7c

View File

@ -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;
}