Commit Graph

11 Commits

Author SHA1 Message Date
David A. Mellis b86a613d99 readBytes() and readBytesUntil() handle zero bytes and return # of bytes read.
http://code.google.com/p/arduino/issues/detail?id=586
2011-11-19 16:23:19 -05:00
David A. Mellis aaa69be264 Protecting the version of parseInt() and parseFloat(). (Paul Stoffregen)
This should allow us more flexibility in determining how to handle these functions later.  For example, in specifying that initial characters shouldn't be skipped.

http://code.google.com/p/arduino/issues/detail?id=698
2011-10-29 17:40:23 -04:00
David A. Mellis 075bb009b9 Fixing warnings in Stream (Paul Stoffregen)
http://code.google.com/p/arduino/issues/detail?id=208
2011-10-02 09:44:21 -04:00
David A. Mellis 023ea285e1 Don't consume trailing char in parseInt() and parseFloat (Paul Stoffregen).
http://code.google.com/p/arduino/issues/detail?id=624
2011-09-09 16:24:47 -04:00
David A. Mellis 8dd6a40334 A few API changes to new Stream parsing functions.
Renamed readChars() -> readBytes(), readCharsUntil() -> readBytesUntil().
Changed timeouts to milliseconds from seconds; default from 5 to 1 seconds.
Removed readCharsBetween().
2011-08-17 14:16:47 -04:00
David A. Mellis 31ff05504f Integrating Stream searching & parsing (Michael Margolis)
This from Michael's TextFinder library, incorporated into the Stream class: find(), findUntil(), parseInt(), parseFloat(), readChars(), readCharsUntil(), readCharsBetween(), setTimeout().
2011-08-17 13:53:49 -04:00
David A. Mellis 6ac63fbadf SD File object implements Stream.
Added peak() and available() using a single byte buffer.
Added flush().
2010-11-20 11:45:05 -05:00
David A. Mellis 8dca3d5ad3 Making Client inherit from Stream, which unforunately means taking peek() out of Stream for now, since there's no immediate implementation for Client. 2010-08-11 18:19:01 +00:00
David A. Mellis 2b1c9aea35 changing available() to return an int (because the Ethernet Client class or another stream might need more than 255 bytes). 2010-08-02 22:23:48 +00:00
David A. Mellis d3cb43c1c9 Adding a peek() function to Stream and HardwareSerial (Serial). 2010-07-04 23:31:55 +00:00
David A. Mellis 90eb0aecd8 Adding a basic Stream interface and modifying HardwareSerial to inherit from it. 2010-05-28 22:41:03 +00:00