Bluetooth® Sample Application Programmer's Reference: Printing Functions

Bluetooth

Bluetooth® Sample Application Programmer's Reference
Printing Functions

Presentation

Printer.c/h contains the functions that are used Goal Printing

Functions

int printText (const char *str)
 
int printSizeSet (eTextSize size)
 
int printAlignSet (eTextAlign size)
 
void printDocument (void)
 

Typedefs

typedef enum eTextSize eTextSize
 
typedef enum eTextAlign eTextAlign
 

Enumerations

enum  eTextSize {
  textSizeXXSmall = 0x3FF0, textSizeXSmall = 0x3FF1, textSizeSmall = 0x3FF2, textSizeMedium = 0x3FF3,
  textSizeLarge = 0x3FF4, textSizeXLarge = 0x3FF5, textSizeXXLarge =0x3FF6
}
 
enum  eTextAlign {
  textAlignCenter = 0x00, textAlignLeft = 0x01, textAlignRight = 0x02, textAlignTop = 0x04,
  textAlignBottom = 0x08
}
 

Function Documentation

int printText ( const char *  str)

Adds the string str to the document which can be printed by calling the function printDocument()

Parameters
str(I) String to be added to the document.
Returns
  • negative if failure.
  • non negative if OK. Utilities.h Printer.c
int printSizeSet ( eTextSize  size)

Set the size of the font to be printed

Parameters
size(I) Size of the string.
Returns
  • negative if failure.
  • non negative if OK. Utilities.h Printer.c
int printAlignSet ( eTextAlign  size)

Set the alignment of the font to be printed

Parameters
size(I) Alignment of the string.
Returns
  • negative if failure.
  • non negative if OK. Utilities.h Printer.c
void printDocument ( void  )

Print a document containing data prepared through calling the function printText(). Utilities.h Printer.c

Typedef Documentation

typedef enum eTextSize eTextSize
typedef enum eTextAlign eTextAlign

Enumeration Type Documentation

enum eTextSize
Enumerator
textSizeXXSmall 

Printer Text Scales.

Extra extra small font size (Optimized to display an average of 24 characters on the screen width)

textSizeXSmall 

Extra small font size (Optimized to display an average of 24 characters on the screen width)

textSizeSmall 

Small font size (Optimized to display an average of 22 characters on the screen width)

textSizeMedium 

Medium font size (Optimized to display an average of 20 characters on the screen width)

textSizeLarge 

Large font size (Optimized to display an average of 16 characters on the screen width)

textSizeXLarge 

Extra large font size (Optimized to display an average of 12 characters on the screen width)

textSizeXXLarge 

Extra extra large font size (Optimized to display an average of 10 characters on the screen width)

enum eTextAlign
Enumerator
textAlignCenter 

Printer Text Scales.

the item is placed in the center

textAlignLeft 

the item is placed in horizontal on the left

textAlignRight 

the item is placed in horizontal on the right

textAlignTop 

the item is placed in vertical on the top

textAlignBottom 

the item is placed in vertical on the bottom


Ingenico