Éric Bisson / Mbed 2 deprecated S5info_APP4

Dependencies:   mbed-rtos mbed CRC16

Fork of S5info_APP2 by Éric Bisson

Files at this revision

API Documentation at this revision

Comitter:
ericbisson
Date:
Mon Mar 06 22:49:58 2017 +0000
Parent:
9:01be68364986
Child:
11:b27d1a83f688
Commit message:
menage effectu?

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
uart.h Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Mar 06 22:46:10 2017 +0000
+++ b/main.cpp	Mon Mar 06 22:49:58 2017 +0000
@@ -7,7 +7,6 @@
 
 Serial pc(USBTX, USBRX, 9600);
 Serial uart(p13, p14, 9600);
-DigitalOut myled1(LED1);
 Thread ThreadLecture;
 
 bool bIsHalfPeriod = false;
@@ -16,7 +15,6 @@
     //clear flag
     LPC_RIT->RICTRL |= bit0; //write 1 to clear bit
     
-    myled1 = !myled1;
     bIsHalfPeriod = !bIsHalfPeriod;
 }
 
@@ -38,7 +36,7 @@
         ThreadLecture.signal_wait(1);
         
         // Lis le message. Retourne une exception si il y a une erreur
-        vector<char> message = uart_read(uart, pc);
+        vector<char> message = uart_read(uart);
         
         if (!message.empty())
         {
--- a/uart.h	Mon Mar 06 22:46:10 2017 +0000
+++ b/uart.h	Mon Mar 06 22:49:58 2017 +0000
@@ -11,7 +11,7 @@
 const char MAX_LENGTH = 80;
 CRC16 mycrc16;
 
-vector<char> uart_read(Serial& COM, Serial& pc)
+vector<char> uart_read(Serial& COM)
 {
     vector<char> result;
 
@@ -41,8 +41,6 @@
             RETURN_EMPTYVECTOR(char);
         }
         
-        charge_utile.push_back('\0'); // end of string pour pouvoir l'afficher
-        
         return charge_utile;
     }
     RETURN_EMPTYVECTOR(char);