From cb0c00a240c0d803e7202433f9940a91db849a5c Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Sun, 2 Feb 2025 02:42:00 -0700 Subject: libhw_generic: spi: Use libobj instead of vcall.h --- libhw/rp2040_include/libhw/rp2040_hwspi.h | 5 ++--- libhw/rp2040_include/libhw/w5500.h | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'libhw/rp2040_include') diff --git a/libhw/rp2040_include/libhw/rp2040_hwspi.h b/libhw/rp2040_include/libhw/rp2040_hwspi.h index 7c4991b..b1abe0c 100644 --- a/libhw/rp2040_include/libhw/rp2040_hwspi.h +++ b/libhw/rp2040_include/libhw/rp2040_hwspi.h @@ -1,6 +1,6 @@ /* libhw/rp2040_hwspi.h - implementation for the RP2040's ARM Primecell SSP (PL022) * - * Copyright (C) 2024 Luke T. Shumaker + * Copyright (C) 2024-2025 Luke T. Shumaker * SPDX-License-Identifier: AGPL-3.0-or-later */ @@ -19,13 +19,12 @@ enum rp2040_hwspi_instance { }; struct rp2040_hwspi { - implements_spi; - BEGIN_PRIVATE(LIBHW_RP2040_HWSPI_H) void /*spi_inst_t*/ *inst; uint pin_cs; END_PRIVATE(LIBHW_RP2040_HWSPI_H) }; +LO_IMPLEMENTATION_H(spi, struct rp2040_hwspi, rp2040_hwspi) /** * Initialize an instance of `struct rp2040_hwspi`. diff --git a/libhw/rp2040_include/libhw/w5500.h b/libhw/rp2040_include/libhw/w5500.h index 3cae620..87d333a 100644 --- a/libhw/rp2040_include/libhw/w5500.h +++ b/libhw/rp2040_include/libhw/w5500.h @@ -1,6 +1,6 @@ /* libhw/w5500.h - implementation for the WIZnet W5500 chip * - * Copyright (C) 2024 Luke T. Shumaker + * Copyright (C) 2024-2025 Luke T. Shumaker * SPDX-License-Identifier: AGPL-3.0-or-later */ @@ -48,7 +48,7 @@ struct w5500 { /* const-after-init */ implements_net_iface; BEGIN_PRIVATE(LIBHW_W5500_H) - implements_spi *spidev; + lo_interface spi spidev; uint pin_intr; uint pin_reset; struct net_eth_addr hwaddr; @@ -82,7 +82,7 @@ struct w5500 { _w5500_init(self, spi, pin_intr, pin_reset, eth_addr); \ } while (0) void _w5500_init(struct w5500 *self, - implements_spi *spi, uint pin_intr, uint pin_reset, + lo_interface spi spi, uint pin_intr, uint pin_reset, struct net_eth_addr addr); /** -- cgit v1.2.3-2-g168b