Datasheet

10
AVR32416
32105-AVR32-07/08
Table 3-1. Frame buffer data ordering 24-bit resolution not packed
MSB LSB
31 – 24 23 – 16 15 – 8 7 - 0
Unused Blue Green
Red
The packed 24-bit resolution removes the unneeded empty 8-bit which results in a
smaller frame buffer. Table 3-2 shows how the data must be placed in the frame
buffer in order to be compliant with a packed 24-bit configuration. The second blue
component belongs to the next pixel.
Table 3-2. Frame buffer data ordering 24-bit resolution packed
MSB LSB
31 – 24 23 – 16 15 – 8 7 - 0
Blue Green Red
Blue
In a 16-bit resolution configuration a BGR-555.1 format is used by the LCD controller.
This means each color component uses 5-bits and the whole pixel gets one intensity
bit. Table 3-3 describes the needed data ordering in the frame buffer for a 16-bit
resolution configuration.
Table 3-3. Frame buffer data ordering 16-bit resolution
MSB LSB
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
I B4 B3 B2 B1 B0 G4 G3 G2 G1 G0 R4 R3 R2 R1 R0
If a graphics library does not support the frame buffer layout natively it has to swap
the colors accordingly. This will decrease the performance.
The formats RGB-888 and RGB-565 for instance can be supported by a special
hardware wiring and software configuration. The chapter 2.1.2 describes the needed
hardware wiring and 3.6.2.1 the needed software configuration for these examples.
3.6 Board setup code
Two things must be done to add the LCD controller and the LCD driver in the board
setup code. These are the registering of the LCD controller as a platform device and
the registering of the LCD driver as a platform driver.
3.6.1 Registering the LCD controller as platform device
Three structures must be edited and combined to form the information for the frame
buffer driver and the LCD controller driver. The LCD configuration of the STK1000
serves here as an example to explain the needed editing. The first structure specifies
the default mode (configuration) of the LCD controller.
static struct fb_videomode __initdata ltv350qv_modes[] = {
{
.name = "320x240 @ 75",
.refresh = 75,
.xres = 320,
.yres = 240,
.pixclock = KHZ2PICOS(6891),
.left_margin = 17,