+usleep for better reliability w/o DEBUG on uClinux
authorshort <>
Wed, 27 Feb 2002 22:48:19 +0000 (22:48 +0000)
committershort <>
Wed, 27 Feb 2002 22:48:19 +0000 (22:48 +0000)
+debug dumps of incoming bytes

common/protocol/fbus.c

index 2cc8aae..04984ca 100644 (file)
@@ -161,6 +161,8 @@ int FBUS_SendFrame(u16 message_length, u8 message_type, u8 *buffer) {
   NULL_TX_DisplayMessage(current, out_buffer);
 #endif /* DEBUG */
 
   NULL_TX_DisplayMessage(current, out_buffer);
 #endif /* DEBUG */
 
+usleep(200000);
+
   /* Send it out... */
   if (!NULL_WritePhone(current,out_buffer))
     return (false);
   /* Send it out... */
   if (!NULL_WritePhone(current,out_buffer))
     return (false);
@@ -256,6 +258,14 @@ void FBUS_RX_StateMachine(unsigned char rx_byte) {
 //    AT_RX_StateMachine(rx_byte);
 //  } else {
 
 //    AT_RX_StateMachine(rx_byte);
 //  } else {
 
+#ifdef XDEBUG_LaceDisabled
+  if (isprint(rx_byte))
+    fprintf(stdout, "[%02x%c]", rx_byte, rx_byte);
+  else
+    fprintf(stdout, "[%02x ]", rx_byte);
+  fflush(stdout);
+#endif
+
 #ifdef DEBUG
   /* For model sniff only display received bytes */
   if (strcmp(GSM_Info->FBUSModels, "sniff"))
 #ifdef DEBUG
   /* For model sniff only display received bytes */
   if (strcmp(GSM_Info->FBUSModels, "sniff"))