My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

draw_print_file.h 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. typedef struct {
  27. int cur_page_first_offset;
  28. int cur_page_last_offset;
  29. int curPage;
  30. } DIR_OFFSET;
  31. extern DIR_OFFSET dir_offset[10];
  32. #define FILE_NUM 6
  33. #define SHORT_NAME_LEN 13
  34. #define NAME_CUT_LEN 23
  35. #define MAX_DIR_LEVEL 10
  36. typedef struct {
  37. char file_name[FILE_NUM][SHORT_NAME_LEN * MAX_DIR_LEVEL + 1];
  38. char curDirPath[SHORT_NAME_LEN * MAX_DIR_LEVEL + 1];
  39. char long_name[FILE_NUM][SHORT_NAME_LEN * 2 + 1];
  40. bool IsFolder[FILE_NUM];
  41. char Sd_file_cnt;
  42. char sd_file_index;
  43. char Sd_file_offset;
  44. } LIST_FILE;
  45. extern LIST_FILE list_file;
  46. void disp_gcode_icon(uint8_t file_num);
  47. void lv_draw_print_file();
  48. uint32_t lv_open_gcode_file(char *path);
  49. void lv_gcode_file_read(uint8_t *data_buf);
  50. void lv_close_gcode_file();
  51. void cutFileName(char *path, int len, int bytePerLine, char *outStr);
  52. int ascii2dec_test(char *ascii);
  53. void lv_clear_print_file();
  54. void lv_gcode_file_seek(uint32_t pos);
  55. #ifdef __cplusplus
  56. } /* C-declarations for C++ */
  57. #endif