Fork of the espurna firmware for `mhsw` switches
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.

39 lines
1.2 KiB

  1. /**
  2. StreamString.h
  3. Copyright (c) 2015 Markus Sattler. All rights reserved.
  4. This file is part of the esp8266 core for Arduino environment.
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public
  7. License as published by the Free Software Foundation; either
  8. version 2.1 of the License, or (at your option) any later version.
  9. This library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. */
  17. #ifndef STREAMSTRING_H_
  18. #define STREAMSTRING_H_
  19. class StreamString: public Stream, public String {
  20. public:
  21. size_t write(const uint8_t *buffer, size_t size) override;
  22. size_t write(uint8_t data) override;
  23. int available() override;
  24. int read() override;
  25. int peek() override;
  26. void flush() override;
  27. };
  28. #endif /* STREAMSTRING_H_ */