diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-26 02:58:42 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-26 02:58:42 -0600 |
commit | 7f3507b606b0f5c0c44cc59eb27e87575cf87701 (patch) | |
tree | 7a94f620d7bb5920916f17139dcf37a2b68b065d /cmd/sbc_harness/hw/spi.h | |
parent | 1dad21650eb6fb3a4b9bba6c0ddd1402930163e2 (diff) |
conventions: Don't have 2 ways to spell "implements_foo"
Stop defining "struct foo" as a synonym for "implements_foo".
Diffstat (limited to 'cmd/sbc_harness/hw/spi.h')
-rw-r--r-- | cmd/sbc_harness/hw/spi.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/sbc_harness/hw/spi.h b/cmd/sbc_harness/hw/spi.h index 653e80f..da588de 100644 --- a/cmd/sbc_harness/hw/spi.h +++ b/cmd/sbc_harness/hw/spi.h @@ -22,7 +22,11 @@ struct bidi_iovec { size_t iov_len; }; -struct spi; +struct spi_vtable; + +typedef struct { + struct spi_vtable *vtable; +} implements_spi; /* This API assumes that an SPI frame is a multiple of 8-bits. * @@ -37,11 +41,7 @@ struct spi; * non-multiple-of-8 number of bits. */ struct spi_vtable { - void (*readwritev)(struct spi *, const struct bidi_iovec *iov, int iovcnt); + void (*readwritev)(implements_spi *, const struct bidi_iovec *iov, int iovcnt); }; -typedef struct spi { - struct spi_vtable *vtable; -} implements_spi; - #endif /* _HW_SPI_H_ */ |