Skip to content

Commit

Permalink
Add W6100 device driver
Browse files Browse the repository at this point in the history
  • Loading branch information
Extrems committed Oct 11, 2024
1 parent 0680460 commit 002a105
Show file tree
Hide file tree
Showing 6 changed files with 1,104 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ LWIPOBJ := network.o netio.o gcif.o \
sys.o tcp.o tcp_in.o tcp_out.o \
udp.o icmp.o ip.o ip_frag.o \
ip_addr.o etharp.o loopif.o \
enc28j60if.o w5500if.o
enc28j60if.o w5500if.o w6100if.o

#---------------------------------------------------------------------------------
OGCOBJ := \
Expand Down
35 changes: 35 additions & 0 deletions gc/netif/w6100if.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*-------------------------------------------------------------
w6100if.h -- W6100 device driver
Copyright (C) 2024 Extrems
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you
must not claim that you wrote the original software. If you use
this software in a product, an acknowledgment in the product
documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
-------------------------------------------------------------*/

#ifndef __NETIF_W6100IF_H__
#define __NETIF_W6100IF_H__

#include "lwip/netif.h"

err_t w6100if_init(struct netif *netif);

#endif /* __NETIF_W6100IF_H__ */
2 changes: 1 addition & 1 deletion libogc/exi.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ char *EXI_GetTypeString(u32 nType)
case 0x02020000:
return "Modem";
case 0x03000000:
return "W5500";
return "WIZnet";
case 0x03010000:
return "Marlin";
case 0x04120000:
Expand Down
8 changes: 4 additions & 4 deletions lwip/netif/w5500if.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ enum {
Sn_RX_WR = 0x2A, // Socket n RX Write Pointer Register
Sn_IMR = 0x2C, // Socket n Interrupt Mask Register
Sn_FRAG, // Socket n Fragment Offset in IP Header Register
Sn_KPALVTR = 0x2F, // Socket n Keep Alive Time Register
Sn_KPALVTR = 0x2F, // Socket n Keepalive Time Register
};

typedef enum {
Expand All @@ -94,8 +94,8 @@ typedef enum {
W5500_SIPR1, // Source IP Address Register 1
W5500_SIPR2, // Source IP Address Register 2
W5500_SIPR3, // Source IP Address Register 3
W5500_INTLEVEL0, // Interrupt Low Level Timer Register 0
W5500_INTLEVEL1, // Interrupt Low Level Timer Register 1
W5500_INTLEVEL0, // Interrupt Low-Level Timer Register 0
W5500_INTLEVEL1, // Interrupt Low-Level Timer Register 1
W5500_IR, // Interrupt Register
W5500_IMR, // Interrupt Mask Register
W5500_SIR, // Socket Interrupt Register
Expand Down Expand Up @@ -178,7 +178,7 @@ W5500_S(7)
} W5500Reg;

typedef enum {
W5500_INTLEVEL = W5500_REG(0x13), // Interrupt Low Level Timer Register
W5500_INTLEVEL = W5500_REG(0x13), // Interrupt Low-Level Timer Register
W5500_RTR = W5500_REG(0x19), // Retransmission Time Register
W5500_PSID = W5500_REG(0x24), // PPPoE Session ID Register
W5500_PMRU = W5500_REG(0x26), // PPPoE Maximum Receive Unit Register
Expand Down
Loading

0 comments on commit 002a105

Please sign in to comment.