You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

HardwareSerial.h 674B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef HardwareSerial_h
  2. #define HardwareSerial_h
  3. #include <inttypes.h>
  4. #include "Stream.h"
  5. class HardwareSerial : public Stream
  6. {
  7. public:
  8. inline void begin(uint32_t baud, uint8_t txen_pin=255) {
  9. _begin(((F_CPU / 8) + (baud / 2)) / baud, txen_pin);
  10. }
  11. void _begin(uint16_t baud_count, uint8_t pin);
  12. void end(void);
  13. void transmitterEnable(uint8_t pin);
  14. virtual int available(void);
  15. virtual int peek(void);
  16. virtual int read(void);
  17. virtual void flush(void);
  18. int availableForWrite(void);
  19. void clear(void);
  20. #if ARDUINO >= 100
  21. virtual size_t write(uint8_t);
  22. #else
  23. virtual void write(uint8_t);
  24. #endif
  25. using Print::write;
  26. };
  27. extern HardwareSerial Serial1;
  28. #endif