blob: 7b10ee9b98ec24df78fcfe9d1a442202ba413948 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#pragma once
#include <escpos/memory.h>
#include <stdbool.h>
#include <stdint.h>
#define ESCPOS_PRINT_BUFFER_MAX_HEIGHT 24
struct escpos_canvas {
uint8_t *data;
size_t w, h;
};
struct escpos_parser;
struct escpos_parser {
size_t (*read)(const struct escpos_parser *parser, void *ptr, const size_t size);
void (*write)(const struct escpos_parser *parser, const uint8_t *ptr, const size_t w, const size_t h);
struct escpos_canvas canvas, print_buffer;
struct escpos_mem window, var;
};
bool
escpos_parser_parse(struct escpos_parser *parser, const char *name);
|