Skip to content

Commit c93c3f4

Browse files
authored
Use CYW43_PRINTF macro in cyw43-support code. (#1745)
Without this change, using cyw43 has a dependency on printf code for printing error message. Everywhere else in cyw43-code this dependency is masked with the CYW43_PRINTF-macro. This PR extends the usage of the CYW43-PRINTF macro to the SPI-support code.
1 parent b1abf96 commit c93c3f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rp2_common/pico_cyw43_driver/cyw43_bus_pio_spi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ int cyw43_read_bytes(cyw43_int_t *self, uint32_t fn, uint32_t addr, size_t len,
507507
logic_debug_set(pin_WIFI_RX, 0);
508508
}
509509
if (ret != 0) {
510-
printf("cyw43_read_bytes error %d", ret);
510+
CYW43_PRINTF("cyw43_read_bytes error %d", ret);
511511
return ret;
512512
}
513513
if (buf != self->spid_buf) { // avoid a copy in the usual case just to add the header
@@ -536,7 +536,7 @@ int cyw43_write_bytes(cyw43_int_t *self, uint32_t fn, uint32_t addr, size_t len,
536536
}
537537
}
538538
if (f2_ready_attempts <= 0) {
539-
printf("F2 not ready\n");
539+
CYW43_PRINTF("F2 not ready\n");
540540
return CYW43_FAIL_FAST_CHECK(-CYW43_EIO);
541541
}
542542
}

0 commit comments

Comments
 (0)