W5200(WIZ820io) network interface
Diff: MyNetIf.cpp
- Revision:
- 1:803123933c5a
- Parent:
- 0:61831b843b44
--- a/MyNetIf.cpp Sat Apr 14 17:21:11 2012 +0000 +++ b/MyNetIf.cpp Tue Apr 17 12:13:15 2012 +0000 @@ -1,4 +1,4 @@ -// MyNetIf.cpp 2012/4/13 +// MyNetIf.cpp 2012/4/17 #include "mbed.h" #include "MyNetIf.h" #include "MyNetTcpSocket.h" @@ -8,8 +8,9 @@ //#define DEBUG #ifdef DEBUG +#include "w5100.h" #include "Utils.h" -#define PRINT_FUNC() printf("%d:%s\n", __LINE__,__PRETTY_FUNCTION__) +#define PRINT_FUNC() printf("%p %d:%s\n", this,__LINE__,__PRETTY_FUNCTION__) #else //DEBUG #define PRINT_FUNC() #endif //DEBUG @@ -49,4 +50,31 @@ void MyNetIf::poll() { PRINT_FUNC(); +#ifdef DEBUG + printf("SnMR:"); + for(int s = 0; s < MAX_SOCK_NUM; s++) { + printf(" %02x", W5100.readSnMR(s)); + } + printf("\n"); + + printf("SnIR:"); + for(int s = 0; s < MAX_SOCK_NUM; s++) { + printf(" %02x", W5100.readSnIR(s)); + } + printf("\n"); + + printf("SnSR:"); + for(int s = 0; s < MAX_SOCK_NUM; s++) { + printf(" %02x", W5100.readSnSR(s)); + } + printf("\n"); + + printf("SnPORT:"); + for(int s = 0; s < MAX_SOCK_NUM; s++) { + printf(" %d", W5100.readSnPORT(s)); + } + printf("\n"); + + wait_ms(500); +#endif //DEBUG }