add mtp03

This commit is contained in:
cuu
2021-12-01 11:06:26 +00:00
parent 649e727920
commit a900c2fff5
4 changed files with 24 additions and 17 deletions

View File

@@ -134,9 +134,7 @@
#define Fontrows ((uint8_t)24)
#define FontColums ((uint8_t)16)
#define Maxdotsperline ((uint16_t)384)
#define nextcharactercolum ((uint8_t)Fontrows/8) // = 3
#define Maxcharacterperline ((uint16_t)Maxdotsperline/FontColums) // 384/16=24
@@ -155,18 +153,26 @@
#define ESC_STATE 1
#define GET_IMAGE 2
#define ALIGN_LEFT 0
#define ALIGN_CENTER 1
#define ALIGN_RIGHT 2
#define MAX_DOTS 384
#define IMAGE_MAX 9224
#define BITS8 8
#define PRINTER_BITS 384
#define MAX_DOTS 384
#define PRINTER_BITS MAX_DOTS
#define MAXPIXELS 48
#ifdef MTP03
#define MAX_DOTS 576
#define PRINTER_BITS MAX_DOTS
#define MAXPIXELS 72
#endif
//extract bits
#define LAST(k,n) ((k) & ((1<<(n))-1))
#define MID(k,m,n) LAST((k)>>(m),((n)-(m)))