Example
#include <conio.h> #include <stdio.h> #include <string.h> #include "mmsultra.h"
void main(void) |
|
{ | // Print data structure |
PRINTINIT pConfig; | |
short sStatus = 0; | // Command calls status |
char cFormat[100]; | // Format to print |
sStatus = pclInit(NULL); | // Start Print subsystem |
if (sStatus != 0) |
|
printf("Init Failed\nError: %d", sStatus); |
|
else |
|
{ | // Check battery |
if (!pclBatteryOkToPrint()) | |
printf("Battery too low"); |
|
else | // Write format |
{ |
strcpy(cFormat, "{F,1,A,R,E,400,200,\"1C39\""); strcat(cFormat, "B,1,12,F,320,29,4,12,20,8,L,0"); strcat(cFormat, "R,1,\"666666666666"); strcat(cFormat, "\"}");
sStatus = pclWrite(cFormat, strlen(cFormat));