DS785UM1
8-13
Copyright 2007 Cirrus Logic
Graphics Accelerator
EP93xx User’s Guide
8
8
8
Note:The word count for this example would be: 6 - 1 = 5 words, since P6 ends in the 6th word.
The word count takes into account the whole pixel, not just the starting location. So,
WIDTH = 0x5 would be written to the
register.
8.6 Register Usage
Since some registers have different meanings based on the type of transfer being performed,
the next section will give the use and meaning of the register during the various graphics
transfers.
8.6.1 Breshenham’s Algorithm Line Draw
The following sequence describes how to set up the registers that are used for a
Breshenham algorithm line draw:
1. Setup LINEINIT Register
Write YINIT = 0x800 (2048) and XINIT = 0x800 in the
register.
2. Setup LINEPATTERN Register
A. Write desired values to the Pattern (PTRN) and Count (CNT) fields to create solid or
patterned lines. The
register contains a 4-bit pattern Count (CNT)
value and a 16-bit Pattern (PTRN) that defines 16 pixel on/off patterns for line
functions. CNT specifies the position of the last bit used in the PTRN field starting at
bit 0 of the PTRN field.
B. For a solid line, write CNT = 0xF and PTRN = 0xFFFF to the
register. The solid line will have the color value that is written to the MASK field in
the
register.
C. For a pattern of 8 ‘on’ pixels and 8 ‘off’ pixels, write CNT = 0xF and PTRN = 0x00FF
register. The 8 ‘on’ pixels would have the color value that is
written to the MASK field in the
register. The 8 ‘off’ pixels would
either be transparent as specified by BG = ‘0’ in the
register or have
the color value written to the
register as specified by BG = ‘1’ in
the
register. Using DX/DY line draw, the pattern will be more
consistent for any line regardless of angle.
Table 8-20. 24 BPP Memory Layout for Destination Image
Address
31
24
23
16
15
8
7
0
0x0058
P1
P0
P0
P0
0x005C
P2
P2
P1
P1
0x0060
P3
P3
P3
P2
0x0064
P5
P4
P4
P4
0x0068
P6
P6
P5
P5
0x006C
P7
P7
P7
P6
Summary of Contents for EP93 Series
Page 28: ...P 6 DS785UM1 Copyright 2007 Cirrus Logic Preface EP93xx User s Guide PP P ...
Page 162: ...5 36 DS785UM1 Copyright 2007 Cirrus Logic System Controller EP93xx User s Guide 55 5 ...
Page 576: ...15 18 DS785UM1 Copyright 2007 Cirrus Logic UART2 EP93xx User s Guide 1515 15 ...
Page 634: ...17 38 DS785UM1 Copyright 2007 Cirrus Logic IrDA EP93xx User s Guide 1717 17 ...
Page 648: ...19 6 DS785UM1 Copyright 2007 Cirrus Logic Watchdog Timer EP93xx User s Guide 1919 19 ...
Page 688: ...21 32 DS785UM1 Copyright 2007 Cirrus Logic I2S Controller EP93xx User s Guide 2121 21 ...
Page 790: ...27 20 DS785UM1 Copyright 2007 Cirrus Logic IDE Interface EP93xx User s Guide 2727 27 ...
Page 808: ...28 18 DS785UM1 Copyright 2007 Cirrus Logic GPIO Interface EP93xx User s Guide 2828 28 ...