yangyang

Dependents:   espyun espyun

Fork of WIZnetInterface by jiang hao

Revision:
32:26fc4b6c5784
Parent:
30:6feeaebad180
--- a/arch/int/W7500x_toe.h	Fri Nov 04 12:09:25 2016 +0000
+++ b/arch/int/W7500x_toe.h	Wed Nov 09 09:23:14 2016 +0000
@@ -237,9 +237,16 @@
             buf[sizeof(buf)-1-i] = t;
         }
 		*/
+		//unsigned char delay_t = 200;
+		//Serial pc(PA_13,PA_14);
         for(int i = 0; i < sizeof(buf); i++) { //  Little Endian to Big Endian
         	*(volatile uint8_t *)(W7500x_WZTOE_BASE + (uint32_t)((cb<<16)+addr)+i) = buf[i];
+        	wait(0.001f);
+        	//while(delay_t--);
+        	//delay_t = 200;//pc.printf("%s():%d--buf[%d]\n",__FUNCTION__, __LINE__,i);
 		}
+        //delay_t = 200;//pc.printf("%s():%d--buf[%d]\n",__FUNCTION__, __LINE__,i);
+        //while(delay_t--);
     }
 
     template<typename T>
@@ -252,6 +259,7 @@
         uint8_t buf[sizeof(T)] = {0,};
         for(int i = 0; i < sizeof(buf); i++) { //  Little Endian to Big Endian
         	buf[i] = *(volatile uint8_t *)(W7500x_WZTOE_BASE + (uint32_t)((cb<<16)+addr)+i);
+        	wait(0.001f);
 		}
         /*
 		for(int i = 0; i < sizeof(buf)/2; i++) { // Big Endian to Little Endian