Prusa MINI Firmware overview
gcode_file.h
Go to the documentation of this file.
1 #pragma once
2 #include "ff.h"
3 #include <stdbool.h>
4 #include <stdio.h>
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif //__cplusplus
9 
10 int f_gcode_thumb_open(FILE *fp, FIL *real_file);
11 int f_gcode_thumb_close(FILE *fp);
12 
13 /// Parse comment line in given file
14 ///
15 /// Reads from the file current line and parses it.
16 /// Example:
17 /// Read line: ` ; infill extrusion width = 0.40mm\n`
18 /// Ouptut: name = "infill extrusion width", value = "0.40mm"
19 bool f_gcode_get_next_comment_assignment(FIL *fp, char *name_buffer,
20  int name_buffer_len,
21  char *value_buffer,
22  int value_buffer_len);
23 
24 #ifdef __cplusplus
25 }
26 #endif //__cplusplus
f_gcode_thumb_close
int f_gcode_thumb_close(FILE *fp)
Definition: gcode_file.cpp:52
SLine::AppendByte
void AppendByte(uint8_t b)
Definition: gcode_thumb_decoder.h:36
FIL
Definition: ff.h:155
gcode_thumb_decoder.h
GCodeThumbDecoder::Instance
static GCodeThumbDecoder & Instance()
Definition: gcode_thumb_decoder.h:145
DBG
#define DBG
Definition: gcode_file.cpp:5
gcode_thumb_fp
static FIL * gcode_thumb_fp
Definition: gcode_file.cpp:7
GCodeThumbDecoder::Reset
void Reset()
Definition: gcode_thumb_decoder.h:156
SLine::size
uint8_t size
Definition: gcode_thumb_decoder.h:28
i
uint8_t i
Definition: screen_test_graph.c:72
f_gcode_get_next_comment_assignment
bool f_gcode_get_next_comment_assignment(FIL *fp, char *name_buffer, int name_buffer_len, char *value_buffer, int value_buffer_len)
Definition: gcode_file.cpp:94
SLine
Definition: gcode_thumb_decoder.h:26
dbg.h
SLine::l
uint8_t l[MAX+1]
Definition: gcode_thumb_decoder.h:32
gcode_file.h
f_gcode_thumb_close
int f_gcode_thumb_close(FILE *fp)
Definition: gcode_file.cpp:52
read_line
static bool read_line(FIL *fp, SLine &line)
Definition: gcode_file.cpp:60
createSpeedLookupTable.end
end
Definition: createSpeedLookupTable.py:33
GCodeThumbDecoder::Read
int Read(FIL *f, char *pc, int n)
Definition: gcode_thumb_decoder.cpp:71
close
static int close(struct _reent *_r, void *pv)
Definition: gcode_file.cpp:21
f_gcode_thumb_open
int f_gcode_thumb_open(FILE *fp, FIL *gcode_fp)
Definition: gcode_file.cpp:29
SLine::Reset
void Reset()
Definition: gcode_thumb_decoder.h:43
seek
static _fpos_t seek(struct _reent *_r, void *pv, _fpos_t fpos, int ipos)
Definition: gcode_file.cpp:25
f_gcode_thumb_open
int f_gcode_thumb_open(FILE *fp, FIL *real_file)
Definition: gcode_file.cpp:29
ff.h
f_gcode_get_next_comment_assignment
bool f_gcode_get_next_comment_assignment(FIL *fp, char *name_buffer, int name_buffer_len, char *value_buffer, int value_buffer_len)
Definition: gcode_file.cpp:94
uint8_t
const uint8_t[]
Definition: 404_html.c:3
f_eof
#define f_eof(fp)
Definition: ff.h:277
read
static int read(struct _reent *_r, void *pv, char *pc, int n)
Definition: gcode_file.cpp:9
FR_OK
Definition: ff.h:215
str_trim
static char * str_trim(char *str)
Definition: gcode_file.cpp:76
createSpeedLookupTable.int
int
Definition: createSpeedLookupTable.py:15
byte
uint8_t byte
Definition: wiring_constants.h:112
UINT
unsigned int UINT
Definition: onboard_sd.h:16
f_read
FRESULT f_read(FIL *fp, void *buff, UINT btr, UINT *br)
Definition: ff.c:3499
write
static int write(struct _reent *_r, void *pv, const char *pc, int n)
Definition: gcode_file.cpp:17