-
Notifications
You must be signed in to change notification settings - Fork 19
/
thermalprinter.h
64 lines (49 loc) · 1.39 KB
/
thermalprinter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*******************************************
*
* Name.......: Epson TM-T88II Library
* Version....: 0.6.0
* Description: A Library to control an Epson TM-T88II thermal printer (microprinter)
* by an arduino via serial connection
* Project....: https://github.com/signalwerk/thermalprinter
* License....: You may use this work under the terms of either the MIT License or
the GNU General Public License (GPL) Version 3
* Keywords...: thermal, micro, receipt, printer, serial, tm-t88, tm88, tmt88, epson
* ********************************************/
#ifndef thermalprinter_h
#define thermalprinter_h
#include "Arduino.h"
#include "SoftwareSerial.h"
class Epson : public Print {
public:
Epson(int rxPin, int txPin);
size_t write(uint8_t c);
int read();
void start();
int getStatus();
void boldOff();
void boldOn();
void characterSet(uint8_t n);
void defaultLineSpacing();
void doubleHeightOff();
void doubleHeightOn();
void feed(uint8_t n);
void feed();
void lineSpacing(uint8_t n);
void reverseOff();
void reverseOn();
void underlineOff();
void underlineOn();
void justifyLeft();
void justifyCenter();
void justifyRight();
void barcodeHeight(uint8_t n);
void barcodeWidth(uint8_t n);
void barcodeNumberPosition(uint8_t n);
void printBarcode(uint8_t m,uint8_t n);
void cut();
private:
int _rxPin;
int _txPin;
SoftwareSerial * _printer;
};
#endif