aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/HardwareSerial.h
diff options
context:
space:
mode:
authorDavid A. Mellis <d.mellis@arduino.cc>2008-04-18 18:39:02 +0000
committerDavid A. Mellis <d.mellis@arduino.cc>2008-04-18 18:39:02 +0000
commit75f170a0f42b3b81c8bd67721d00e40c419550d7 (patch)
treed4ab36bfc34ad06d9a412bf1c5e83a9a66a9a7fc /cores/arduino/HardwareSerial.h
parent28b81996d3a43317d62ad693902f51eecd9d3a74 (diff)
Factored out print() and println() from HardwareSerial to a base class for sharing with other things (e.g. LiquidCrystal library), eliminating #include's of avr/signal.h (deprecated). Upping version number and modifying to do list.
Diffstat (limited to 'cores/arduino/HardwareSerial.h')
-rwxr-xr-xcores/arduino/HardwareSerial.h32
1 files changed, 4 insertions, 28 deletions
diff --git a/cores/arduino/HardwareSerial.h b/cores/arduino/HardwareSerial.h
index 5de9a1f..f2c6ce8 100755
--- a/cores/arduino/HardwareSerial.h
+++ b/cores/arduino/HardwareSerial.h
@@ -22,44 +22,20 @@
#include <inttypes.h>
-#define DEC 10
-#define HEX 16
-#define OCT 8
-#define BIN 2
-#define BYTE 0
+#include "Print.h"
-class HardwareSerial
+class HardwareSerial : public Print
{
- private:
- //uint8_t _uart;
- void printNumber(unsigned long, uint8_t);
public:
- HardwareSerial(uint8_t);
+ HardwareSerial();
void begin(long);
uint8_t available(void);
int read(void);
void flush(void);
- void print(char);
- void print(const char[]);
- void print(uint8_t);
- void print(int);
- void print(unsigned int);
- void print(long);
- void print(unsigned long);
- void print(long, int);
- void println(void);
- void println(char);
- void println(const char[]);
- void println(uint8_t);
- void println(int);
- void println(unsigned int);
- void println(long);
- void println(unsigned long);
- void println(long, int);
+ void write(uint8_t);
};
extern HardwareSerial Serial;
-//extern HardwareSerial Serial1;
#endif