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.
65 lines
1.9 KiB
65 lines
1.9 KiB
4 years ago
|
/**
|
||
|
* 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
|
||
4 years ago
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||
4 years ago
|
*
|
||
|
*/
|
||
|
#pragma once
|
||
|
|
||
|
#ifdef __cplusplus
|
||
4 years ago
|
extern "C" { /* C-declarations for C++ */
|
||
4 years ago
|
#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
|
||
4 years ago
|
#define SHORT_NAME_LEN 13
|
||
4 years ago
|
#define NAME_CUT_LEN 23
|
||
|
|
||
|
#define MAX_DIR_LEVEL 10
|
||
|
|
||
|
typedef struct {
|
||
4 years ago
|
char file_name[FILE_NUM][SHORT_NAME_LEN * MAX_DIR_LEVEL + 1];
|
||
|
char curDirPath[SHORT_NAME_LEN * MAX_DIR_LEVEL + 1];
|
||
|
char long_name[FILE_NUM][SHORT_NAME_LEN * 2 + 1];
|
||
4 years ago
|
bool IsFolder[FILE_NUM];
|
||
4 years ago
|
char Sd_file_cnt;
|
||
|
char sd_file_index;
|
||
|
char Sd_file_offset;
|
||
|
} LIST_FILE;
|
||
|
extern LIST_FILE list_file;
|
||
|
|
||
3 years ago
|
void disp_gcode_icon(uint8_t file_num);
|
||
|
void lv_draw_print_file();
|
||
|
uint32_t lv_open_gcode_file(char *path);
|
||
|
void lv_gcode_file_read(uint8_t *data_buf);
|
||
|
void lv_close_gcode_file();
|
||
|
void cutFileName(char *path, int len, int bytePerLine, char *outStr);
|
||
|
int ascii2dec_test(char *ascii);
|
||
|
void lv_clear_print_file();
|
||
|
void lv_gcode_file_seek(uint32_t pos);
|
||
4 years ago
|
|
||
|
#ifdef __cplusplus
|
||
4 years ago
|
} /* C-declarations for C++ */
|
||
4 years ago
|
#endif
|