Parser for AT commands and similar protocols

Dependencies:   BufferedSerial

Revision:
6:51f1171b5ebc
Parent:
5:26bc9255b751
Child:
7:d1b193880af1
diff -r 26bc9255b751 -r 51f1171b5ebc ATParser.h
--- a/ATParser.h	Fri Jul 17 17:23:57 2015 +0000
+++ b/ATParser.h	Fri Jul 17 21:00:23 2015 +0000
@@ -157,6 +157,24 @@
     */
     int getc();
     
+    /** 
+    * Write an array of bytes to the underlying stream
+    *
+    * @param data the array of bytes to write
+    * @param size number of bytes to write
+    * @return number of bytes written
+    */
+    int write(const char *data, int size);
+    
+    /** 
+    * Read an array of bytes from the underlying stream
+    *
+    * @param data the destination for the read bytes
+    * @param size number of bytes to read
+    * @return number of bytes read
+    */
+    int read(char *data, int size);
+    
     /**
     * Flushes the underlying stream
     */