Epson Research and Development Page 67
Vancouver Design Center
Programming Notes and Examples S1D13705
Issue Date: 02/01/22 X27A-G-002-03
/*
** Get the product code to verify this is an S1D13705.
*/
seGetId(&ChipId);
if (ID_S1D13705_Rev1 != ChipId)
{printf("\nERROR: Did not detect an S1D13705.");
exit(1);
}
/*
** Initialize the S1D13705.
** This step programs the registers with values taken from
** the HalInfo struct in appcfg.h.
*/
if (ERR_OK != seSetInit())
{printf("\nERROR: Could not initialize device.");
exit(1);
}
/*
** The default initialization cleared the display.
** Draw a 100x100 red (color 1) rectangle in the upper
** left corner (0,0) of the display.
*/
seDrawRect(0, 0, 100, 100, 1, TRUE);
/*
** Pause here.
*/
getch();
/*
** Clear the display. Do this by writing 81920 bytes
*/
seWriteDisplayBytes(0, 0, EIGHTY_K);
/*
** Setup portrait mode.
*/
seSetHWRotate(PORTRAIT);
/*
** Draw a solid blue 100x100 rectangle in center of the display.
** This starting co-ordinates, assuming a 320x240 display is
** (320-100)/2 , (240-100)/2 = 110,70.
*/
seDrawRect(110, 70, 210, 170, 2, TRUE);
/*
** Done!
*/
exit(0);
}