-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathThermal_Printer_SR.h
66 lines (50 loc) · 1.35 KB
/
Thermal_Printer_SR.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
65
66
//
// FILE: Thermal_Printer_SR.h
// AUTHOR: Jimmy Patrick
// VERSION: 0.0.01
// PURPOSE: Controls a Parallel Printer through a 595 shift Register
// DATE: 2013-12-18
// URL:
//
// Released to the public domain. Thanks to Rob Tillaart for helping me get this started.
//
#ifndef Thermal_Printer_SR_h
#define Thermal_Printer_SR_h
#include "Energia.h"
#include <Print.h>
class Thermal_Printer_SR : public Print
{
public:
Thermal_Printer_SR();
void printChar(uint8_t toPrint);
void begin(int, int, int, int, int);
size_t write(uint8_t);
void waitForPrinter(int port);
void doStrobe();
//void setData(char text);
void initializePrinter();
void alignCenter();
void alignRight();
void alignLeft();
void underline();
void thickUnderline();
void noUnderline();
void doCut();
void doBuzzer(int repeat);
void fontA();
void fontB();
void lineFeed(uint8_t lines);
void boldOn();
void boldOff();
void inverse();
void notInverse();
void printSize(byte fontsize);
void upsideDown();
void notUpsideDown();
private:
int _latchPin;
int _dataPin;
int _clockPin;
int _busyPin;
};
#endif