~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to roms/u-boot/board/esd/common/lcd.h

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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;