Philips S1D13505 Computer Monitor User Manual


 
Epson Research and Development
Page 85
Vancouver Design Center
Programming Notes and Examples S1D13505
Issue Date: 01/02/05 X23A-G-003-07
** This step sets up the HAL for use but does not access the 1355.
*/
switch (seRegisterDevice(&HalInfo, &Device))
{
case ERR_OK:
break;
case HAL_DEVICE_ERR:
printf("\nERROR: Too many devices
registered.");
exit(1);
default:
printf("\nERROR: Could not regis-
ter SED1355 device.");
exit(1);
}
/*
** Identify that this is indeed an SED1355.
*/
seGetId( Device, &ChipId);
if (ID_SED1355F0A != ChipId)
{
printf("\nERROR: Did not detect SED1355.");
exit(1);
}
/*
** Initialize the SED1355.
** This step will actually program the registers with values taken
from
** the default register table in appcfg.h.
*/
if (ERR_OK != seSetInit(Device))
{
printf("\nERROR: Could not initialize device.");
exit(1);
}
/*
** The default initialization clears the display.
** Draw a 100x100 red rectangle in the upper left corner (0,0)
** of the display.
*/
seDrawRect(Device, 0, 0, 100, 100, 1, TRUE);
/*
** Init the HW cursor. The HAL performs several calculations to
** determine the best location to place the cursor image and
** will use that location from here on.