From 654b1940705197f22ffeebd73e62cea2282bdbda Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Sun, 23 Feb 2025 09:24:31 -0700 Subject: Pull iovec definitions out into libhw/generic/io.h --- libhw/rp2040_hwspi.c | 4 ++-- libhw/w5500_ll.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'libhw') diff --git a/libhw/rp2040_hwspi.c b/libhw/rp2040_hwspi.c index 23f3e8c..c60d6b9 100644 --- a/libhw/rp2040_hwspi.c +++ b/libhw/rp2040_hwspi.c @@ -83,7 +83,7 @@ void _rp2040_hwspi_init(struct rp2040_hwspi *self, self->pin_cs = pin_cs; } -static void rp2040_hwspi_readwritev(struct rp2040_hwspi *self, const struct bidi_iovec *iov, int iovcnt) { +static void rp2040_hwspi_readwritev(struct rp2040_hwspi *self, const struct duplex_iovec *iov, int iovcnt) { assert(self); spi_inst_t *inst = self->inst; @@ -101,7 +101,7 @@ static void rp2040_hwspi_readwritev(struct rp2040_hwspi *self, const struct bidi else if (iov[i].iov_read_dst) spi_read_blocking(inst, 0, iov[i].iov_read_dst, iov[i].iov_len); else - assert_notreached("bidi_iovec is neither read nor write"); + assert_notreached("duplex_iovec is neither read nor write"); } gpio_put(self->pin_cs, 1); } diff --git a/libhw/w5500_ll.h b/libhw/w5500_ll.h index 92d9f14..2b89353 100644 --- a/libhw/w5500_ll.h +++ b/libhw/w5500_ll.h @@ -89,7 +89,7 @@ w5500ll_write( (uint8_t)(addr & 0xFF), (block & CTL_MASK_BLOCK) | CTL_W | CTL_OM_VDM, }; - struct bidi_iovec iov[] = { + struct duplex_iovec iov[] = { {.iov_read_dst = NULL, .iov_write_src = header, .iov_len = sizeof(header)}, {.iov_read_dst = NULL, .iov_write_src = data, .iov_len = data_len}, }; @@ -119,7 +119,7 @@ w5500ll_read( (uint8_t)(addr & 0xFF), (block & CTL_MASK_BLOCK) | CTL_R | CTL_OM_VDM, }; - struct bidi_iovec iov[] = { + struct duplex_iovec iov[] = { {.iov_read_dst = NULL, .iov_write_src = header, .iov_len = sizeof(header)}, {.iov_read_dst = data, .iov_write_src = NULL, .iov_len = data_len}, }; -- cgit v1.2.3-2-g168b