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.

draw_print_file.h 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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" { /* C-declarations for 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_NEME_LEN 13
  34. #define NAME_CUT_LEN 23
  35. #define MAX_DIR_LEVEL 10
  36. typedef struct {
  37. //char longName[FILE_NUM][LONG_FILENAME_LENGTH];
  38. char file_name[FILE_NUM][SHORT_NEME_LEN * MAX_DIR_LEVEL + 1];
  39. char curDirPath[SHORT_NEME_LEN * MAX_DIR_LEVEL + 1];
  40. char long_name[FILE_NUM][SHORT_NEME_LEN * 2 + 1];
  41. char IsFolder[FILE_NUM];
  42. char Sd_file_cnt;
  43. char sd_file_index;
  44. char Sd_file_offset;
  45. } LIST_FILE;
  46. extern LIST_FILE list_file;
  47. extern void disp_gcode_icon(uint8_t file_num);
  48. extern void lv_draw_print_file(void);
  49. extern uint32_t lv_open_gcode_file(char *path);
  50. extern void lv_gcode_file_read(uint8_t *data_buf);
  51. extern void lv_close_gcode_file();
  52. extern void cutFileName(char *path, int len, int bytePerLine, char *outStr);
  53. extern int ascii2dec_test(char *ascii);
  54. extern void lv_clear_print_file();
  55. extern void lv_gcode_file_seek(uint32_t pos);
  56. //extern void disp_temp_ready_print();
  57. #ifdef __cplusplus
  58. } /* C-declarations for C++ */
  59. #endif