Improvement to Stream.h

Gene_R

Member
Hello Paul, All

I would like to request that you add the line below (marked in bold) to Stream.h (@ line 35, ref to version 1.27 ) to make it more compatible with HardwareSerial.h

Code:
	...
	virtual int peek() = 0;
	virtual void flush() = 0;

	[B]virtual int availableForWrite() { return 0xFFFF; }[/B]

	void setTimeout(unsigned long timeout);
	bool find(char *target);
	...


I believe this will make it easier to pass an object of type HardwareSerial[1,2,3] as a Stream object.

Thanks for your time,
Gene

ps, You and the teensy are (IMHO) amazing, please keep up the great work.
 
This is the sort of change that should be proposed upstream with Arduino.

Adding it only on Teensy could lead to compatibility issues....
 
Back
Top