WIZNet W5500 with additional enhancements

Fork of WIZnetInterface by WIZnet

Revision:
32:f6d76a55a50b
Parent:
14:2101ab5ee40f
Child:
33:879cfe51e66e
diff -r a3fbfa5c8351 -r f6d76a55a50b arch/ext/W5500.h
--- a/arch/ext/W5500.h	Sat Oct 07 15:08:58 2017 +0200
+++ b/arch/ext/W5500.h	Sat Oct 07 16:26:55 2017 +0200
@@ -324,7 +324,7 @@
     void reg_wr(uint16_t addr, uint8_t cb, T data) {
         uint8_t buf[sizeof(T)];
         *reinterpret_cast<T*>(buf) = data;
-        for(int i = 0; i < sizeof(buf)/2; i++) { //  Little Endian to Big Endian
+        for(int i = 0; i < (int)sizeof(buf)/2; i++) { //  Little Endian to Big Endian
             uint8_t t = buf[i];
             buf[i] = buf[sizeof(buf)-1-i];
             buf[sizeof(buf)-1-i] = t;
@@ -341,7 +341,7 @@
     T reg_rd(uint16_t addr, uint8_t cb) {
         uint8_t buf[sizeof(T)];
         spi_read(addr, cb, buf, sizeof(buf));
-        for(int i = 0; i < sizeof(buf)/2; i++) { // Big Endian to Little Endian
+        for(int i = 0; i < (int)sizeof(buf)/2; i++) { // Big Endian to Little Endian
             uint8_t t = buf[i];
             buf[i] = buf[sizeof(buf)-1-i];
             buf[sizeof(buf)-1-i] = t;