My Marlin configs for Fabrikator Mini and CTC i3 Pro B
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. Print.h - Base class that provides print() and println()
  3. Copyright (c) 2008 David A. Mellis. All right reserved.
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with this library; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  15. */
  16. #ifndef Print_h
  17. #define Print_h
  18. #include <inttypes.h>
  19. #include <stdio.h> // for size_t
  20. #include "WString.h"
  21. #define DEC 10
  22. #define HEX 16
  23. #define OCT 8
  24. #define BIN 2
  25. #define BYTE 0
  26. class Print
  27. {
  28. private:
  29. void printNumber(unsigned long, uint8_t);
  30. void printFloat(double, uint8_t);
  31. public:
  32. virtual void write(uint8_t) = 0;
  33. virtual void write(const char *str);
  34. virtual void write(const uint8_t *buffer, size_t size);
  35. void print(const String &);
  36. void print(const char[]);
  37. void print(char, int = BYTE);
  38. void print(unsigned char, int = BYTE);
  39. void print(int, int = DEC);
  40. void print(unsigned int, int = DEC);
  41. void print(long, int = DEC);
  42. void print(unsigned long, int = DEC);
  43. void print(double, int = 2);
  44. void println(const String &s);
  45. void println(const char[]);
  46. void println(char, int = BYTE);
  47. void println(unsigned char, int = BYTE);
  48. void println(int, int = DEC);
  49. void println(unsigned int, int = DEC);
  50. void println(long, int = DEC);
  51. void println(unsigned long, int = DEC);
  52. void println(double, int = 2);
  53. void println(void);
  54. };
  55. #endif