1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:32:45 +01:00

tests/periph_spi clearly say when init succeeds

The way it's now it's easy to interpret that there was an error, when
really there was not. As seen in issue #19025 quite some time can be
spent following a wrong clue.
This commit is contained in:
J. David Ibáñez 2023-01-19 10:42:50 +01:00
parent d4d91492cd
commit e176f1d338

View File

@ -217,9 +217,11 @@ int cmd_init(int argc, char **argv)
else {
printf("Trying to initialize SPI_DEV(%i): mode: %i, clk: %i, cs_port: %i, cs_pin: %i\n",
dev, mode, clk, port, pin);
puts("Note: Failed assertion (crash) means configuration not supported");
puts("(if below the program crashes with a failed assertion, then it means the"
" configuration is not supported)");
spi_acquire(spiconf.dev, spiconf.cs, spiconf.mode, spiconf.clk);
spi_release(spiconf.dev);
puts("Success.");
}
return 0;