WIZNet W5500 with additional enhancements
Fork of WIZnetInterface by
Diff: arch/int/W7500x_toe.h
- Revision:
- 37:018436dccfcd
- Parent:
- 14:2101ab5ee40f
--- a/arch/int/W7500x_toe.h Wed Oct 11 11:18:41 2017 +0200 +++ b/arch/int/W7500x_toe.h Wed Oct 11 14:25:44 2017 +0200 @@ -237,7 +237,7 @@ buf[sizeof(buf)-1-i] = t; } */ - for(int i = 0; i < sizeof(buf); i++) { // Little Endian to Big Endian + for(int i = 0; i < (int)sizeof(buf); i++) { // Little Endian to Big Endian *(volatile uint8_t *)(W7500x_WZTOE_BASE + (uint32_t)((cb<<16)+addr)+i) = buf[i]; } } @@ -250,7 +250,7 @@ template<typename T> T reg_rd(uint16_t addr, uint8_t cb) { uint8_t buf[sizeof(T)] = {0,}; - for(int i = 0; i < sizeof(buf); i++) { // Little Endian to Big Endian + for(int i = 0; i < (int)sizeof(buf); i++) { // Little Endian to Big Endian buf[i] = *(volatile uint8_t *)(W7500x_WZTOE_BASE + (uint32_t)((cb<<16)+addr)+i); } /* @@ -270,8 +270,16 @@ void sreg_ip(int socket, uint16_t addr, const char* ip); int ethernet_link(void); + + int ethernet_speed(void); void ethernet_set_link(int speed, int duplex); + + bool ethernet_fullduplex(void); + + uint32_t getDNSAddr(void) { + return dnsaddr; + }; protected: @@ -280,6 +288,8 @@ uint32_t netmask; uint32_t gateway; uint32_t dnsaddr; + uint32_t timesrv; + uint32_t leaseTime; bool dhcp; static WIZnet_Chip* inst;