Prusa MINI Firmware overview
|
Go to the documentation of this file. 1 #ifndef GCODE_THUMB_DECODER_H
2 #define GCODE_THUMB_DECODER_H
16 #include "../Marlin/src/libs/circularqueue.h"
27 static const size_t MAX = 80;
48 operator const char *()
const {
49 return (
const char *)(
l);
83 bool AppendBase64Chars(
const char *src,
TBytesQueue &bytesQ);
98 bool LineIsBase64(
const char *l,
TBytesQueue &bytesQ) {
101 if (l[0] !=
';' || l[1] !=
' ')
105 return AppendBase64Chars(l + 2, bytesQ);
137 enum class States :
uint8_t { Searching,
142 States state = States::Searching;
154 int Read(
FIL *f,
char *pc,
int n);
159 state = States::Searching;
166 #endif // GCODE_THUMB_DECODER_H
bool isEmpty()
Checks if the queue has no items.
Definition: circularqueue.h:101
void AppendByte(uint8_t b)
Definition: gcode_thumb_decoder.h:36
static GCodeThumbDecoder & Instance()
Definition: gcode_thumb_decoder.h:145
void Reset()
Definition: gcode_thumb_decoder.h:156
uint8_t size
Definition: gcode_thumb_decoder.h:28
uint8_t i
Definition: screen_test_graph.c:72
T dequeue()
Removes and returns a item from the queue.
Definition: circularqueue.h:65
Definition: gcode_thumb_decoder.h:26
uint8_t l[MAX+1]
Definition: gcode_thumb_decoder.h:32
SLine()
Definition: gcode_thumb_decoder.h:33
int Read(FIL *f, char *pc, int n)
Definition: gcode_thumb_decoder.cpp:71
size_t expectedLineSize
Definition: gcode_thumb_decoder.h:30
#define min(a, b)
Definition: wiring_constants.h:36
void Reset()
Definition: gcode_thumb_decoder.h:43
int ConsumeChar(char c, uint8_t *out)
Definition: base64_stream_decoder.cpp:28
void Reset()
Definition: base64_stream_decoder.h:26
static const size_t MAX
Definition: gcode_thumb_decoder.h:27
Definition: base64_stream_decoder.h:16
const uint8_t[]
Definition: 404_html.c:3
#define f_eof(fp)
Definition: ff.h:277
bool IsEndThumbnail() const
Definition: gcode_thumb_decoder.cpp:29
int lines
Definition: g29_auto.py:141
Definition: gcode_thumb_decoder.h:60
uint8_t byte
Definition: wiring_constants.h:112
list b
Definition: createSpeedLookupTable.py:30
bool IsBeginThumbnail() const
Definition: gcode_thumb_decoder.cpp:3
bool enqueue(T const &item)
Adds an item to the queue.
Definition: circularqueue.h:84
unsigned int UINT
Definition: onboard_sd.h:16
FRESULT f_read(FIL *fp, void *buff, UINT btr, UINT *br)
Definition: ff.c:3499