From: batt Date: Fri, 5 Oct 2007 09:14:15 +0000 (+0000) Subject: Fix some debug strings; suppress warning if XM_BUFSIZE < 1024. X-Git-Tag: 1.0.0~413 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=f6730955e734b2f02a8663dba83c04ef5426982c;p=bertos.git Fix some debug strings; suppress warning if XM_BUFSIZE < 1024. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@828 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/mware/xmodem.c b/mware/xmodem.c index c3410caf..5f4c12f8 100755 --- a/mware/xmodem.c +++ b/mware/xmodem.c @@ -22,6 +22,9 @@ /*#* *#* $Log$ + *#* Revision 1.12 2007/10/05 09:14:15 batt + *#* Fix some debug strings; suppress warning if XM_BUFSIZE < 1024. + *#* *#* Revision 1.11 2007/06/07 09:10:44 batt *#* Fix some todos. *#* @@ -62,9 +65,13 @@ #include "xmodem.h" -#include +#include #include /* for memset() */ +#include #include +#include + + /** @@ -160,7 +167,7 @@ bool xmodem_recv(struct Serial *port, KFile *fd) { /* Give up with CRC and fall back to checksum */ usecrc = false; - XMODEM_PROGRESS("Request Tx (BCC)"); + XMODEM_PROGRESS("Request Tx (BCC)\n"); ser_putchar(XM_NAK, port); } } @@ -178,7 +185,8 @@ bool xmodem_recv(struct Serial *port, KFile *fd) case XM_SOH: /* Start of header (128-byte block) */ blocksize = 128; - + /* Needed to avoid warning if XM_BUFSIZE < 1024 */ + goto getblock; getblock: /* Get block number */ c = ser_getchar(port); @@ -291,7 +299,7 @@ bool xmodem_recv(struct Serial *port, KFile *fd) case XM_EOT: /* End of transmission */ ser_putchar(XM_ACK, port); - XMODEM_PROGRESS("Transfer completed"); + XMODEM_PROGRESS("Transfer completed\n"); return true; case EOF: /* Timeout or serial error */ @@ -299,7 +307,7 @@ bool xmodem_recv(struct Serial *port, KFile *fd) break; default: - XMODEM_PROGRESS("Skipping garbage"); + XMODEM_PROGRESS("Skipping garbage\n"); purge = true; break; }