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