Epson Research and Development Page 81
Vancouver Design Center
Programming Notes and Examples S1D13505
Issue Date: 01/02/05 X23A-G-003-07
{printf("\r\nERROR: Unable to register device with
HAL\r\n"); return -1;
}
/*
** Init the SED1355 with the defaults stored in the HAL_STRUCT
*/
if (seSetInit(DevId) != ERR_OK)
{printf("\r\nERROR: Unable to initialize the
SED1355\r\n"); return -1;
}
/*
** Determine the screen size
*/
if (seGetScreenSize(DevId, &width, &height) != ERR_OK)
{printf("\r\nERROR: Unable to get screen size\r\n");
return -1;
}
/*
** Determine the Bpp mode, and set colors appropriately
** Note: if less than 15Bpp set the color Lookup Table (LUT)
** local color variables contain either index into LUT or RGB value
*/
seGetBitsPerPixel(DevId, &Bpp);
if (verbose) printf("Bpp is %d\n", Bpp);
switch(Bpp)
{case 1: /* Can't really do red and blue here */
seSetLut(DevId, (BYTE *)&RedBlue-
Lut[0][0], 3); color_red = 1;
color_blue = 1;
break;
/* Set the LUT to values appropriate to Black, Red,
and Blue */ case 2:
case 4:
case 8: seSetLut(DevId, (BYTE *)&RedBlue-
Lut[0][0], 3); color_red = 1;
color_blue = 2;
break;
default: /* 15 or 16 bpp */
color_red = RED16BPP;