summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTod E. Kurt <tod@todbot.com>2013-04-30 00:25:50 +0000
committerTod E. Kurt <tod@todbot.com>2013-04-30 00:25:50 +0000
commit2dec0bb942d34a3c5eb373ae549785533ea23d29 (patch)
tree130be989c86fcf4ff135ece251b7763d36c1da24
parent894a61dffcbffb5769da53d5503219d519907ea5 (diff)
downloadarduino-serial-2dec0bb942d34a3c5eb373ae549785533ea23d29.tar.gz
arduino-serial-2dec0bb942d34a3c5eb373ae549785533ea23d29.tar.bz2
arduino-serial-2dec0bb942d34a3c5eb373ae549785533ea23d29.zip
serialportdebug fixes
-rw-r--r--arduino-serial-lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arduino-serial-lib.c b/arduino-serial-lib.c
index 7ec100c..d9dbe91 100644
--- a/arduino-serial-lib.c
+++ b/arduino-serial-lib.c
@@ -14,6 +14,7 @@
#include <string.h> // String function definitions
#include <sys/ioctl.h>
+// uncomment this to debug reads
//#define SERIALPORTDEBUG
// takes the string name of the serial port (e.g. "/dev/tty.usbserial","COM1")
@@ -130,7 +131,7 @@ int serialport_read_until(int fd, char* buf, char until, int buf_max, int timeou
continue;
}
#ifdef SERIALPORTDEBUG
- printf("serialport_read_until: i=%d, n=%d %c\n",i,n,b[0]); // debug
+ printf("serialport_read_until: i=%d, n=%d b='%c'\n",i,n,b[0]); // debug
#endif
buf[i] = b[0];
i++;