]> git.ipfire.org Git - people/ms/u-boot.git/blob - board/esd/common/lcd.h
drivers, block: remove sil680 driver
[people/ms/u-boot.git] / board / esd / common / lcd.h
1 /*
2 * (C) Copyright 2003-2004
3 * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8 /*
9 * Neutralize little endians.
10 */
11 #define SWAP_LONG(data) ((unsigned long) \
12 (((unsigned long)(data) >> 24) | \
13 ((unsigned long)(data) << 24) | \
14 (((unsigned long)(data) >> 8) & 0x0000ff00 ) | \
15 (((unsigned long)(data) << 8) & 0x00ff0000 )))
16 #define SWAP_SHORT(data) ((unsigned short) \
17 (((unsigned short)(data) >> 8 ) | \
18 ((unsigned short)(data) << 8 )))
19 #define LOAD_LONG(data) SWAP_LONG(data)
20 #define LOAD_SHORT(data) SWAP_SHORT(data)
21
22 #define S1D_WRITE_PALETTE(p,i,r,g,b) \
23 { \
24 out_8(&((uchar*)(p))[palette_index], (uchar)(i)); \
25 out_8(&((uchar*)(p))[palette_index], (uchar)(r)); \
26 out_8(&((uchar*)(p))[palette_index], (uchar)(g)); \
27 out_8(&((uchar*)(p))[palette_index], (uchar)(b)); \
28 }
29
30 typedef struct
31 {
32 ushort Index;
33 uchar Value;
34 } S1D_REGS;
35
36 typedef struct /**** BMP file info structure ****/
37 {
38 unsigned int biSize; /* Size of info header */
39 int biWidth; /* Width of image */
40 int biHeight; /* Height of image */
41 unsigned short biPlanes; /* Number of color planes */
42 unsigned short biBitCount; /* Number of bits per pixel */
43 unsigned int biCompression; /* Type of compression to use */
44 unsigned int biSizeImage; /* Size of image data */
45 int biXPelsPerMeter; /* X pixels per meter */
46 int biYPelsPerMeter; /* Y pixels per meter */
47 unsigned int biClrUsed; /* Number of colors used */
48 unsigned int biClrImportant; /* Number of important colors */
49 } BITMAPINFOHEADER;