tests/spi: add tostring check to interactive test

This commit is contained in:
Vanya A. Sergeev
2019-10-08 22:38:03 -05:00
parent 2b5f6e1935
commit 54625d6c72
+7
View File
@@ -123,6 +123,7 @@ bool getc_yes(void) {
}
void test_interactive(void) {
char str[256];
spi_t *spi;
uint8_t buf[] = { 0x55, 0xaa, 0x0f, 0xf0 };
@@ -138,6 +139,12 @@ void test_interactive(void) {
printf("Press enter to continue...\n");
getc(stdin);
/* Check tostring */
passert(spi_tostring(spi, str, sizeof(str)) > 0);
printf("SPI description: %s\n", str);
printf("SPI description looks OK? y/n\n");
passert(getc_yes());
/* Mode 0 transfer */
printf("Press enter to start transfer...");
getc(stdin);