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:
parent
079cc940a6
commit
f301170c7c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user