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.

преди 11 години
преди 11 години
12345678910111213141516171819202122232425262728293031
  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. void clear(void);
  19. #if ARDUINO >= 100
  20. virtual size_t write(uint8_t);
  21. #else
  22. virtual void write(uint8_t);
  23. #endif
  24. using Print::write;
  25. };
  26. extern HardwareSerial Serial1;
  27. #endif