English
Language : 

SED1374 Datasheet, PDF (166/420 Pages) Epson Company – SED1374 Embedded Memory Color LCD Controller
Page 70
Epson Research and Development
Vancouver Design Center
** This is done because an image in display memory is not rotated with the
** switch to SwivelView mode we are about to make.
*/
pMem = (LPBYTE)MEM_OFFSET;
do {
*pMem = 0;
pMem++;
} while (pMem < (LPBYTE)(MEM_OFFSET + MEM_SIZE));
/*
** SwivelView mode.
*/
/*
** We will use the default SwivelView mode scheme so we have to adjust
** the ROTATED width to be a power of 2.
** (NOTE: current height will become the rotated width)
*/
tmp = 1;
while (Height > (1 << tmp))
tmp++;
Height = (1 << tmp);
OffsetBytes = Height * BitsPerPixel / 8;
/*
** Set:
** 1) Line Byte Count to size of the ROTATED width (i.e. current height)
** 2) Start Address to the offset of the width of the ROTATED display.
** (in SwivelView mode the start address registers point to bytes)
*/
SET_REG(0x1C, (BYTE)OffsetBytes);
OffsetBytes--;
SET_REG(0x0C, LOBYTE(OffsetBytes));
SET_REG(0x0D, HIBYTE(OffsetBytes));
/*
** Set SwivelView mode.
** Use the non-X2 (default) scheme so we don't have to re-calc the frame
** rate. MCLK will be <= 25 MHz so we can leave auto-switch enabled.
*/
SET_REG(0x1B, 0x80);
/*
** Draw a solid blue 100x100 rectangle centered on the display.
** Starting co-ordinates, assuming a 320x240 display are:
** (320-100)/2 , (240-100)/2 = 110,70.
*/
for (y = 70; y < 180; y++)
{
/*
SED1374
X26A-G-002-02
Programming Notes and Examples
Issue Date: 99/04/27