Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Thermal_HelloWorld
Fork of AdafruitThermalPrinter by
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:
-
string containing L, R, or C for alignment
Definition at line 264 of file AdafruitThermal.cpp.
| void print | ( | char * | string ) |
Main function to print information.
- Parameters:
-
array of 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:
-
char to print (see AdafruitThermal.h)
Definition at line 120 of file AdafruitThermal.cpp.
Generated on Sun Jul 17 2022 11:40:08 by
1.7.2

Adafruit Thermal Printer