diff options
Diffstat (limited to 'cores/arduino/HardwareSerial.h')
-rwxr-xr-x | cores/arduino/HardwareSerial.h | 24 |
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 |