Andrew Ross / Adafruit_Thermal_Printer

Dependents:   Thermal_HelloWorld

Fork of AdafruitThermalPrinter by Ashley Mills

Embed: (wiki syntax)

« Back to documentation index

AdafruitThermal Class Reference

AdafruitThermal Class Reference

Example: More...

#include <AdafruitThermal.h>

Public Member Functions

 AdafruitThermal (PinName RX_Pin, PinName TX_Pin)
 Documentation by Andrew Ross - NOTE: printBitmap not ported, nothing tested.
void setDefault ()
 Sets Default settings on printer.
size_t write (uint8_t c)
 Basic function for all printing.
void inverseOn ()
 Inverses the printer color space.
void inverseOff ()
 Turns off inverse.
void justify (char value)
 Allows you to left, right or center justify your text.
void print (char *string)
 Main function to print information.

Detailed Description

Example:

 // Print a char array onto the thermal paper
 #include "mbed.h"
 #include "AdafruitThermal.h"

 AdafruitThermal printer(p9,p10);

 int main() {
     printer.begin();
     char *Text_Out = "Hello World!\n";
     printer.print(Text_Out);
 }

Definition at line 58 of file AdafruitThermal.h.


Constructor & Destructor Documentation

AdafruitThermal ( PinName  RX_Pin,
PinName  TX_Pin 
)

Documentation by Andrew Ross - NOTE: printBitmap not ported, nothing tested.

Definition at line 22 of file AdafruitThermal.cpp.


Member Function Documentation

void inverseOff (  )

Turns off inverse.

Definition at line 213 of file AdafruitThermal.cpp.

void inverseOn (  )

Inverses the printer color space.

Definition at line 208 of file AdafruitThermal.cpp.

void justify ( char  value )

Allows you to left, right or center justify your text.

Parameters:
stringcontaining L, R, or C for alignment

Definition at line 264 of file AdafruitThermal.cpp.

void print ( char *  string )

Main function to print information.

Parameters:
arrayof chars which is parsed by the write function

Definition at line 106 of file AdafruitThermal.cpp.

void setDefault (  )

Sets Default settings on printer.

Definition at line 83 of file AdafruitThermal.cpp.

size_t write ( uint8_t  c )

Basic function for all printing.

Prints character to stream

Parameters:
charto print (see AdafruitThermal.h)

Definition at line 120 of file AdafruitThermal.cpp.