aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/HardwareSerial.h
diff options
context:
space:
mode:
authorDavid A. Mellis <d.mellis@arduino.cc>2009-03-25 10:50:00 +0000
committerDavid A. Mellis <d.mellis@arduino.cc>2009-03-25 10:50:00 +0000
commita42326aba2fd9696a4b2e1239a5a222014056ff5 (patch)
tree69288e62749704d81d7ab11079e5868022bdc174 /cores/arduino/HardwareSerial.h
parentb89ee8da481d7b9c360b689f367b7a234ec7cb11 (diff)
Adding support for the Arduino Mega (ATmega1280) to the core and bootloader.
Diffstat (limited to 'cores/arduino/HardwareSerial.h')
-rwxr-xr-xcores/arduino/HardwareSerial.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/cores/arduino/HardwareSerial.h b/cores/arduino/HardwareSerial.h
index e4cb969..55abf07 100755
--- a/cores/arduino/HardwareSerial.h
+++ b/cores/arduino/HardwareSerial.h
@@ -24,9 +24,27 @@
#include "Print.h"
+struct ring_buffer;
+
class HardwareSerial : public Print
{
+ private:
+ ring_buffer *_rx_buffer;
+ volatile uint8_t *_ubrrh;
+ volatile uint8_t *_ubrrl;
+ volatile uint8_t *_ucsra;
+ volatile uint8_t *_ucsrb;
+ volatile uint8_t *_udr;
+ uint8_t _rxen;
+ uint8_t _txen;
+ uint8_t _rxcie;
+ uint8_t _udre;
public:
+ HardwareSerial(ring_buffer *rx_buffer,
+ volatile uint8_t *ubrrh, volatile uint8_t *ubrrl,
+ volatile uint8_t *ucsra, volatile uint8_t *ucsrb,
+ volatile uint8_t *udr,
+ uint8_t rxen, uint8_t txen, uint8_t rxcie, uint8_t udre);
void begin(long);
uint8_t available(void);
int read(void);
@@ -36,5 +54,11 @@ class HardwareSerial : public Print
extern HardwareSerial Serial;
+#if defined(__AVR_ATmega1280__)
+extern HardwareSerial Serial1;
+extern HardwareSerial Serial2;
+extern HardwareSerial Serial3;
+#endif
+
#endif