mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
Making Client inherit from Stream, which unforunately means taking peek() out of Stream for now, since there's no immediate implementation for Client.
This commit is contained in:
parent
7bac64c4ac
commit
54d367b1e0
@ -23,8 +23,8 @@ ARDUINO 0019
|
|||||||
* Added Serial.peek() method.
|
* Added Serial.peek() method.
|
||||||
http://code.google.com/p/arduino/issues/detail?id=270
|
http://code.google.com/p/arduino/issues/detail?id=270
|
||||||
|
|
||||||
* Added Stream base class to Serial object (w/ available(), peek(), read()
|
* Added Stream base class to Serial object (w/ available(), read() and
|
||||||
and the write(), print(), and println() functions from the Print class).
|
the write(), print(), and println() functions from the Print class).
|
||||||
http://code.google.com/p/arduino/issues/detail?id=60
|
http://code.google.com/p/arduino/issues/detail?id=60
|
||||||
|
|
||||||
* Disabling interrupts while digitalWrite() and pinMode() write to pins.
|
* Disabling interrupts while digitalWrite() and pinMode() write to pins.
|
||||||
|
@ -27,7 +27,6 @@ class Stream : public Print
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual int available() = 0;
|
virtual int available() = 0;
|
||||||
virtual int peek() = 0;
|
|
||||||
virtual int read() = 0;
|
virtual int read() = 0;
|
||||||
virtual void flush() = 0;
|
virtual void flush() = 0;
|
||||||
};
|
};
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "WProgram.h"
|
#include "WProgram.h"
|
||||||
#include "Print.h"
|
#include "Print.h"
|
||||||
|
|
||||||
class Client : public Print {
|
class Client : public Stream {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Client();
|
Client();
|
||||||
@ -15,9 +15,9 @@ public:
|
|||||||
virtual void write(uint8_t);
|
virtual void write(uint8_t);
|
||||||
virtual void write(const char *str);
|
virtual void write(const char *str);
|
||||||
virtual void write(const uint8_t *buf, size_t size);
|
virtual void write(const uint8_t *buf, size_t size);
|
||||||
int available();
|
virtual int available();
|
||||||
int read();
|
virtual int read();
|
||||||
void flush();
|
virtual void flush();
|
||||||
void stop();
|
void stop();
|
||||||
uint8_t connected();
|
uint8_t connected();
|
||||||
uint8_t operator==(int);
|
uint8_t operator==(int);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user