My Marlin configs for Fabrikator Mini and CTC i3 Pro B
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

lcdprint.h 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /**
  2. * @file lcdprint.h
  3. * @brief LCD print api
  4. * @author Yunhui Fu (yhfudev@gmail.com)
  5. * @version 1.0
  6. * @date 2016-08-19
  7. * @copyright GPL/BSD
  8. */
  9. #ifndef _LCDPRINT_H
  10. #define _LCDPRINT_H
  11. #include "fontutils.h"
  12. #if DISABLED(DOGLCD)
  13. #define _UxGT(a) a
  14. #else
  15. #include "u8g_fontutf8.h"
  16. #endif
  17. #define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80u)
  18. int lcd_glyph_height(void);
  19. int lcd_put_wchar_max(wchar_t c, pixel_len_t max_length);
  20. /**
  21. * @brief Draw a UTF-8 string
  22. *
  23. * @param utf8_str : the UTF-8 string
  24. * @param max_length : the pixel length of the string allowed (or number of slots in HD44780)
  25. *
  26. * @return the pixel width
  27. *
  28. * Draw a UTF-8 string
  29. */
  30. int lcd_put_u8str_max(const char * utf8_str, pixel_len_t max_length);
  31. /**
  32. * @brief Draw a ROM UTF-8 string
  33. *
  34. * @param utf8_str_P : the ROM UTF-8 string
  35. * @param max_length : the pixel length of the string allowed (or number of slots in HD44780)
  36. *
  37. * @return the pixel width
  38. *
  39. * Draw a ROM UTF-8 string
  40. */
  41. int lcd_put_u8str_max_P(const char * utf8_str_P, pixel_len_t max_length);
  42. void lcd_moveto(int col, int row);
  43. inline int lcd_put_u8str_P(const char *str) { return lcd_put_u8str_max_P(str, PIXEL_LEN_NOLIMIT); }
  44. inline int lcd_put_u8str(const char* str) { return lcd_put_u8str_max(str, PIXEL_LEN_NOLIMIT); }
  45. inline int lcd_put_wchar(wchar_t c) { return lcd_put_wchar_max(c, PIXEL_LEN_NOLIMIT); }
  46. #endif // _LCDPRINT_H