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 606B

123456789101112131415161718192021222324252627282930
  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. virtual int available(void);
  14. virtual int peek(void);
  15. virtual int read(void);
  16. virtual void flush(void);
  17. void clear(void);
  18. #if ARDUINO >= 100
  19. virtual size_t write(uint8_t);
  20. #else
  21. virtual void write(uint8_t);
  22. #endif
  23. using Print::write;
  24. };
  25. extern HardwareSerial Serial1;
  26. #endif