summaryrefslogtreecommitdiff
path: root/cmd/sbc_harness/hw/w5500.h
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/sbc_harness/hw/w5500.h')
-rw-r--r--cmd/sbc_harness/hw/w5500.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/cmd/sbc_harness/hw/w5500.h b/cmd/sbc_harness/hw/w5500.h
index 4ec6edd..f8a7034 100644
--- a/cmd/sbc_harness/hw/w5500.h
+++ b/cmd/sbc_harness/hw/w5500.h
@@ -14,25 +14,28 @@
struct _w5500_listener;
struct _w5500_conn {
+ /* const-after-init */
implements_net_conn;
-
- struct _w5500_listener *parent_listener;
};
struct _w5500_listener {
+ /* const-after-init */
implements_net_listener;
-
- struct w5500 *chip;
uint8_t socknum;
struct _w5500_conn active_conn;
+
+ /* mutable */
+ uint16_t port;
};
struct w5500 {
+ /* const-after-init */
struct spi *spidev;
uint pin_reset;
- struct _w5500_listener _listeners[8];
- uint16_t _next_local_port;
+ /* mutable */
+ uint16_t next_local_port;
+ struct _w5500_listener listeners[8];
};
/**
@@ -61,7 +64,7 @@ void _w5500_init(struct w5500 *self,
/**
* TODO.
*/
-void w5500_reset(struct w5500 *self);
+void w5500_reset(struct w5500 *self, struct net_eth_addr addr);
struct w5500_netcfg {
struct net_ip4_addr gateway_addr;
@@ -74,6 +77,7 @@ struct w5500_netcfg {
*/
void w5500_netcfg(struct w5500 *self, struct w5500_netcfg cfg);
-implements_net_listener *w5500_listen(struct w5500 *self, uint8_t socknum, uint16_t port);
+implements_net_listener *w5500_listen(struct w5500 *self, uint8_t socknum,
+ uint16_t port);
#endif /* _HW_W5500_H_ */