Tweaks to comments to make Doxygen happier...

Wed, 05 Aug 2009 16:03:03 +0100

author
Philip Pemberton <philpem@philpem.me.uk>
date
Wed, 05 Aug 2009 16:03:03 +0100
changeset 16
57eff547e4f1
parent 15
e5577dd259c6
child 17
cf9d239ac1c9

Tweaks to comments to make Doxygen happier...

src/main.c file | annotate | diff | revisions
src/ptouch.h file | annotate | diff | revisions
     1.1 --- a/src/main.c	Wed Aug 05 15:15:47 2009 +0100
     1.2 +++ b/src/main.c	Wed Aug 05 16:03:03 2009 +0100
     1.3 @@ -75,6 +75,10 @@
     1.4  	gdImagePng(im, fp);
     1.5  	fclose(fp);
     1.6  
     1.7 +	// Set job options
     1.8 +	pt_SetOption(dev, PT_OPTION_AUTOCUT, 1);
     1.9 +	pt_SetOption(dev, PT_OPTION_MIRROR, 1);
    1.10 +
    1.11  	// Print the label
    1.12  	printf("Print state code: %d\n", pt_Print(dev, &im, 1));
    1.13  
     2.1 --- a/src/ptouch.h	Wed Aug 05 15:15:47 2009 +0100
     2.2 +++ b/src/ptouch.h	Wed Aug 05 16:03:03 2009 +0100
     2.3 @@ -18,19 +18,31 @@
     2.4   *
     2.5   * This is used to store the state of the printer as of the last call to
     2.6   * pt_GetStatus(), the current job settings, and other details required
     2.7 - * by the printer driver.
     2.8 + * by the printer driver. User code should not change any parameters inside
     2.9 + * a pt_Device struct under any circumstances. For further information on
    2.10 + * the various fields, see the Brother PT-9500PC Command Reference.
    2.11   */
    2.12  typedef struct {
    2.13  	/// Reference to the printer device
    2.14  	FILE	*fp;
    2.15  	/// Error information
    2.16  	int		errorInfo[2];
    2.17 -	/// Label width, type and length
    2.18 -	int		mediaWidth, mediaType, mediaLength;
    2.19 +	/// Label width (in millimetres)
    2.20 +	int		mediaWidth;
    2.21 +	/// Label type
    2.22 +	int		mediaType;
    2.23 +	///	Label length (in millimetres)
    2.24 +	int		mediaLength;
    2.25  	/// Label width in pixels
    2.26  	int		pixelWidth;
    2.27 -	/// Status type, phase type, and phase number
    2.28 -	int		statusType, phaseType, phaseHi, phaseLo;
    2.29 +	/// Printer status type
    2.30 +	int		statusType;
    2.31 +	/// Printing phase type
    2.32 +	int		phaseType;
    2.33 +	/// Printing phase, high byte
    2.34 +	int		phaseHi;
    2.35 +	/// Printing phase, low byte
    2.36 +	int		phaseLo;
    2.37  	/// Notification number
    2.38  	int		notification;
    2.39  
    2.40 @@ -38,9 +50,8 @@
    2.41  	int		autocut;
    2.42  	/// Print parameter: mirror printing enable
    2.43  	int		mirror;
    2.44 -	/// Print parameter: half-cut enable
    2.45 -	/// Print parameter: chainprint enable
    2.46 -	/// Print parameter: label end cut
    2.47 +	// TODO: add support for half-cut (when I get a printer that supports it)
    2.48 +	// TODO: add support for printing a separator line when autocut is off
    2.49  } pt_Device;
    2.50  
    2.51  /*
    2.52 @@ -70,7 +81,7 @@
    2.53   * Job options
    2.54   */
    2.55  typedef enum {
    2.56 -/// Mirror -- mirror the printed label along the long edge
    2.57 +/// Mirror -- mirror the printed label vertically
    2.58  	PT_OPTION_MIRROR,
    2.59  /// Auto-cutter -- enable or disable automatic label cutting
    2.60  	PT_OPTION_AUTOCUT