SNIC UART Interface library for Murata Type-YD module

Dependents:   WebSocketServerTest

Fork of SNICInterface_mod by Toyomasa Watarai

Revision:
40:b6b10c22a121
Parent:
39:a1233ca02edf
Child:
41:1c1b5ad4d491
--- a/Socket/UDPSocket.cpp	Tue Jul 15 02:08:42 2014 +0000
+++ b/Socket/UDPSocket.cpp	Tue Jul 15 09:56:37 2014 +0000
@@ -45,7 +45,7 @@
     tagMEMPOOL_BLOCK_T *payload_buf_p = snic_core_p->allocCmdBuf();
     if( payload_buf_p == NULL )
     {
-        printf("UDP bind payload_buf_p NULL\r\n");
+        DEBUG_PRINT("UDP bind payload_buf_p NULL\r\n");
         return -1;
     }
 
@@ -66,14 +66,14 @@
     ret = uartCmdMgr_p->wait();
     if( ret != 0 )
     {
-        printf( "UDP bind failed\r\n" );
+        DEBUG_PRINT( "UDP bind failed\r\n" );
         snic_core_p->freeCmdBuf( payload_buf_p );
         return -1;
     }
     
     if( uartCmdMgr_p->getCommandStatus() != UART_CMD_RES_SNIC_SUCCESS )
     {
-        printf("UDP bind status:%02x\r\n", uartCmdMgr_p->getCommandStatus());
+        DEBUG_PRINT("UDP bind status:%02x\r\n", uartCmdMgr_p->getCommandStatus());
         snic_core_p->freeCmdBuf( payload_buf_p );
         return -1;
     }
@@ -105,14 +105,14 @@
     ret = uartCmdMgr_p->wait();
     if( ret != 0 )
     {
-        printf( "UDP bind failed\r\n" );
+        DEBUG_PRINT( "UDP bind failed\r\n" );
         snic_core_p->freeCmdBuf( payload_buf_p );
         return -1;
     }
 
     if( uartCmdMgr_p->getCommandStatus() != 0 )
     {
-        printf("UDP bind status:%02x\r\n", uartCmdMgr_p->getCommandStatus());
+        DEBUG_PRINT("UDP bind status:%02x\r\n", uartCmdMgr_p->getCommandStatus());
         snic_core_p->freeCmdBuf( payload_buf_p );
         return -1;
     }
@@ -137,14 +137,14 @@
     ret = uartCmdMgr_p->wait();
     if( ret != 0 )
     {
-        printf( "UDP recv start failed\r\n" );
+        DEBUG_PRINT( "UDP recv start failed\r\n" );
         snic_core_p->freeCmdBuf( payload_buf_p );
         return -1;
     }
 
     if( uartCmdMgr_p->getCommandStatus() != 0 )
     {
-        printf("UDP recv start status:%02x\r\n", uartCmdMgr_p->getCommandStatus());
+        DEBUG_PRINT("UDP recv start status:%02x\r\n", uartCmdMgr_p->getCommandStatus());
         snic_core_p->freeCmdBuf( payload_buf_p );
         return -1;
     }
@@ -164,7 +164,7 @@
     tagMEMPOOL_BLOCK_T *payload_buf_p = snic_core_p->allocCmdBuf();
     if( payload_buf_p == NULL )
     {
-        printf("connect payload_buf_p NULL\r\n");
+        DEBUG_PRINT("connect payload_buf_p NULL\r\n");
         return -1;
     }
     
@@ -200,14 +200,14 @@
     int ret = uartCmdMgr_p->wait();
     if( ret != 0 )
     {
-        printf( "send failed\r\n" );
+        DEBUG_PRINT( "send failed\r\n" );
         snic_core_p->freeCmdBuf( payload_buf_p );
         return -1;
     }
     
     if( uartCmdMgr_p->getCommandStatus() != UART_CMD_RES_SNIC_SUCCESS )
     {
-        printf("send status:%02x\r\n", uartCmdMgr_p->getCommandStatus());
+        DEBUG_PRINT("send status:%02x\r\n", uartCmdMgr_p->getCommandStatus());
         snic_core_p->freeCmdBuf( payload_buf_p );
         return -1;
     }
@@ -222,7 +222,7 @@
 {
     if( (data_p == NULL) || (length < 1) )
     {
-        printf("UDPSocket::receiveFrom parameter error\r\n");
+        DEBUG_PRINT("UDPSocket::receiveFrom parameter error\r\n");
         return -1;
     }
     
@@ -231,7 +231,7 @@
     C_SNIC_Core::tagUDP_RECVINFO_T *con_info_p = snic_core_p->getUdpRecvInfo( mSocketID );
     if( con_info_p->recvbuf_p == NULL )
     {
-//        printf("UDPSocket::receiveFrom Conncection info error\r\n");
+//        DEBUG_PRINT("UDPSocket::receiveFrom Conncection info error\r\n");
         return 0;
     }
     if( con_info_p->is_received == false )