init
This commit is contained in:
31
include/printer_service.h
Normal file
31
include/printer_service.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_Thermal.h>
|
||||
#include "config.h"
|
||||
|
||||
class PrinterService
|
||||
{
|
||||
private:
|
||||
HardwareSerial *printerSerial;
|
||||
Adafruit_Thermal *printer;
|
||||
|
||||
static PrinterService *instance;
|
||||
|
||||
PrinterService();
|
||||
|
||||
public:
|
||||
PrinterService(const PrinterService &) = delete;
|
||||
PrinterService &operator=(const PrinterService &) = delete;
|
||||
|
||||
static void init();
|
||||
static PrinterService &getInstance();
|
||||
|
||||
void wake();
|
||||
void sleep();
|
||||
void feed(int lines);
|
||||
|
||||
void setHeat(uint8_t heatTime);
|
||||
|
||||
void printBitmap(int w, int h, const uint8_t *bitmap);
|
||||
void printText(const String &text);
|
||||
};
|
||||
Reference in New Issue
Block a user