changeset 75:85f16813c730

Convert \r\n to \n
author Daniel O'Connor <darius@dons.net.au>
date Thu, 18 Apr 2013 22:44:52 +0930
parents 3f1c101f89bc
children f1c9a51e368a
files flash.c
diffstat 1 files changed, 17 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/flash.c	Mon Apr 15 22:37:46 2013 +0930
+++ b/flash.c	Thu Apr 18 22:44:52 2013 +0930
@@ -34,7 +34,7 @@
     uint32_t addr;
     
     if (argc == 0) {
-	fputs("No command specified\r\n", stdout);
+	fputs("No command specified\n", stdout);
 	return;
     }
     
@@ -46,27 +46,27 @@
 		fputs(flstattbl[i], stdout);
 		fputs(" ", stdout);
 	    }
-	printf("(0x%02x)\r\n", status);
+	printf("(0x%02x)\n", status);
     } else if (!strcmp(argv[0], "stw")) {
 	if (argc != 2) {
-	    fputs("Incorrect number of arguments\r\n", stdout);
+	    fputs("Incorrect number of arguments\n", stdout);
 	    return;
 	}
 	tmp = atoi(argv[1]);
 	flashwritestatus(tmp);
 	status = flashreadstatus();
-	printf("Wrote 0x%02x to status, now 0x%02x\r\n", tmp, status);
+	printf("Wrote 0x%02x to status, now 0x%02x\n", tmp, status);
     } else if (!strcmp(argv[0], "er")) {
 	if (argc != 2) {
-	    fputs("Incorrect number of arguments\r\n", stdout);
+	    fputs("Incorrect number of arguments\n", stdout);
 	    return;
 	}
 	addr = atoi(argv[1]);
 	flash4kerase(addr);
-	printf("Erased 0x%x\r\n", (unsigned int)addr);
+	printf("Erased 0x%x\n", (unsigned int)addr);
     } else if (!strcmp(argv[0], "rd")) {
 	if (argc < 2) {
-	    fputs("Incorrect number of arguments\r\n", stdout);
+	    fputs("Incorrect number of arguments\n", stdout);
 	    return;
 	}
 	
@@ -80,13 +80,13 @@
 	flashstartread(addr);
 	
 	for (uint32_t i = 0; i < len; i++)
-	    printf("Read 0x%02x from 0x%06x\r\n", flashreadbyte(), (unsigned int)(addr + i));
+	    printf("Read 0x%02x from 0x%06x\n", flashreadbyte(), (unsigned int)(addr + i));
 	flashstopread();
 	
-	fputs("\r\n", stdout);
+	fputs("\n", stdout);
     } else if (!strcmp(argv[0], "wr")) {
 	if (argc < 2) {
-	    fputs("Incorrect number of arguments\r\n", stdout);
+	    fputs("Incorrect number of arguments\n", stdout);
 	    return;
 	}
 
@@ -100,7 +100,7 @@
 	for (int i = 0; i < 16; i += 2) {
 	    uint16_t data;
 	    data = ((i + 1) << 8) | i;
-	    printf("Writing 0x%04x to 0x%06x\r\n", data, (unsigned int)(addr + i));
+	    printf("Writing 0x%04x to 0x%06x\n", data, (unsigned int)(addr + i));
 
 	    if (i == 0)
 		flashstartwrite(addr, data);
@@ -109,9 +109,9 @@
 	}
 	flashstopwrite();
     } else if (!strcmp(argv[0], "id")) {
-	printf("Flash ID = 0x%04hx (expect 0xbf41)\r\n", flashreadid());
+	printf("Flash ID = 0x%04hx (expect 0xbf41)\n", flashreadid());
     } else {
-	fputs("Unknown sub command\r\n", stdout);
+	fputs("Unknown sub command\n", stdout);
 	return;
     }
 }
@@ -141,7 +141,7 @@
     for (cnt = 0; (flashreadstatus() & FL_BUSY) != 0; cnt++)
 	;
 
-    //printf("cnt = %d\r\n", cnt);
+    //printf("cnt = %d\n", cnt);
 }
 
 uint16_t
@@ -362,7 +362,7 @@
 
     ramcrc = CRC_GetCRC();
     
-    /* printf("RAM CRC 0x%08x Flash CRC 0x%08x\r\n", (uint)ramcrc, (uint)flashcrc); */
+    /* printf("RAM CRC 0x%08x Flash CRC 0x%08x\n", (uint)ramcrc, (uint)flashcrc); */
     if (ramcrc == flashcrc)
 	return 1;
     else
@@ -389,7 +389,7 @@
     uint16_t	*data = _data;
     uint32_t	crc, vcrc;
     
-    //printf("Writing %u bytes to 0x%06x\r\n", (uint)len, (uint)addr);
+    //printf("Writing %u bytes to 0x%06x\n", (uint)len, (uint)addr);
     
     /* Ensure data is
      * - 16 bit aligned
@@ -421,7 +421,7 @@
    /* Calculate CRC */
    crc = CRC_GetCRC();
    
-   //printf("CRC is 0x%08x\r\n", (uint)crc);
+   //printf("CRC is 0x%08x\n", (uint)crc);
    
    /* Write CRC */
    flashwriteword(crc);