- added Delay to Serial flush method

Dependents:   WeeESP8266

Fork of ArduinoAPI by ITEAD STUDIO

Files at this revision

API Documentation at this revision

Comitter:
JojoS
Date:
Sat Mar 28 14:45:08 2015 +0000
Parent:
5:8072d40c7f3c
Child:
7:c62910a9e405
Commit message:
- Constructor with Baudrate argument; - Serial flush with delay ; - removed delay in read status

Changed in this revision

ArduinoSerial.cpp Show annotated file Show diff for this revision Revisions of this file
WString.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/ArduinoSerial.cpp	Sat Mar 14 10:15:36 2015 +0000
+++ b/ArduinoSerial.cpp	Sat Mar 28 14:45:08 2015 +0000
@@ -55,6 +55,7 @@
 
 void ArduinoSerial::flush(void)
 {
+    wait_ms(5);
     memset(&m_rx_buffer, 0, sizeof(m_rx_buffer));
 }
 
--- a/WString.cpp	Sat Mar 14 10:15:36 2015 +0000
+++ b/WString.cpp	Sat Mar 28 14:45:08 2015 +0000
@@ -139,7 +139,7 @@
 {
    // testPin();
     
-    //maxStrLen = ((maxStrLen / CHUNK_SIZE) + 1) * CHUNK_SIZE; 
+    maxStrLen = ((maxStrLen / CHUNK_SIZE) + 1) * CHUNK_SIZE; 
     char *newbuffer = (char *)realloc(buffer, maxStrLen + 1);
     if (newbuffer) {
         buffer = newbuffer;