frederic blanc / Mbed 2 deprecated HMA_HelloWord

Dependencies:   USBDevice mbed

Revision:
1:16fae309f85e
Parent:
0:92dd9611bf80
Child:
2:88f866289381
diff -r 92dd9611bf80 -r 16fae309f85e main.cpp
--- a/main.cpp	Wed May 14 14:51:44 2014 +0000
+++ b/main.cpp	Fri May 16 13:57:27 2014 +0000
@@ -50,7 +50,7 @@
         str[start_str]=pc.getc();
     }
 
-    if( strcmp(str,"*IDN?\r")==0 || strcmp(str,"*ID?")==0) {
+    if( strcmp(str,"*IDN?")==0 || strcmp(str,"*ID?")==0) {
         pc.printf("HMA\r");
         start_str=0;
         for(int i=0; i<256; ++i) {
@@ -120,7 +120,7 @@
             flag_write_USB=0;
             led1=1;
 
-            pc.printf("%04d\0",index_hma_read);
+            pc.printf("%04d\0\r",index_hma_read); //'\0'fin de chaine ASCII '\r' fin de transmission
 
             char* ptr=(char*)&T_hma_u16[!t_write][0];