for (i = 0; i < ARRAY_SIZE(port_desc); i++) {
const struct port_desc *port = &port_desc[i];
const char *rw[4] = { "N/A", "WO", "RO", "RW" };
- const char *type = "";
+ char note[30] = "";
#ifdef TARGET_HAS_SPI
if (port->set == port_spi_set)
- type = "SPI";
+ snprintf(note, sizeof(note), "SPI, %s", port->cfg.spi.chip);
#endif
rpp_sci_printf("%-10s %s %dx%db%s%s%s\r\n",
port->name,
rw[(port->set ? 1 : 0) | (port->get ? 2 : 0)],
port->numchn, port->bpch,
- *type ? " (": "",
- type,
- *type ? ")" : "");
+ *note ? " (": "",
+ note,
+ *note ? ")" : "");
}
return 1;
}