]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.h
Patch from open source community for CryptoPkg to allow it to build for ARM using...
[mirror_edk2.git] / OptionRomPkg / CirrusLogic5430Dxe / CirrusLogic5430.h
index 8ff302ac2b97fc8ff4a45a0e13664962093b60fc..3050bd8a202626447d95041af9029c32006e22fc 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Cirrus Logic 5430 Controller Driver\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   http://opensource.org/licenses/bsd-license.php\r
@@ -40,7 +40,7 @@
 #include <Library/DevicePathLib.h>\r
 #include <Library/TimerLib.h>\r
 \r
-#include <IndustryStandard/Pci22.h>\r
+#include <IndustryStandard/Pci.h>\r
 //\r
 // Cirrus Logic 5430 PCI Configuration Header values\r
 //\r
@@ -62,6 +62,24 @@ typedef struct {
   UINT32  RefreshRate;\r
 } CIRRUS_LOGIC_5430_MODE_DATA;\r
 \r
+#define PIXEL_RED_SHIFT   0\r
+#define PIXEL_GREEN_SHIFT 3\r
+#define PIXEL_BLUE_SHIFT  6\r
+\r
+#define PIXEL_RED_MASK    (BIT7 | BIT6 | BIT5)\r
+#define PIXEL_GREEN_MASK  (BIT4 | BIT3 | BIT2)\r
+#define PIXEL_BLUE_MASK   (BIT1 | BIT0)\r
+\r
+#define PIXEL_TO_COLOR_BYTE(pixel, mask, shift) ((UINT8) ((pixel & mask) << shift))\r
+#define PIXEL_TO_RED_BYTE(pixel) PIXEL_TO_COLOR_BYTE(pixel, PIXEL_RED_MASK, PIXEL_RED_SHIFT)\r
+#define PIXEL_TO_GREEN_BYTE(pixel) PIXEL_TO_COLOR_BYTE(pixel, PIXEL_GREEN_MASK, PIXEL_GREEN_SHIFT)\r
+#define PIXEL_TO_BLUE_BYTE(pixel) PIXEL_TO_COLOR_BYTE(pixel, PIXEL_BLUE_MASK, PIXEL_BLUE_SHIFT)\r
+\r
+#define RGB_BYTES_TO_PIXEL(Red, Green, Blue) \\r
+  (UINT8) ( (((Red) >> PIXEL_RED_SHIFT) & PIXEL_RED_MASK) | \\r
+            (((Green) >> PIXEL_GREEN_SHIFT) & PIXEL_GREEN_MASK) | \\r
+            (((Blue) >> PIXEL_BLUE_SHIFT) & PIXEL_BLUE_MASK) )\r
+\r
 #define GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER  0xffff\r
 \r
 //\r
@@ -249,7 +267,7 @@ CirrusLogic5430ControllerDriverStop (
                                 languages specified in SupportedLanguages. The\r
                                 number of languages supported by a driver is up\r
                                 to the driver writer. Language is specified\r
-                                in RFC 3066 or ISO 639-2 language code format.\r
+                                in RFC 4646 or ISO 639-2 language code format.\r
 \r
   @param  DriverName[out]       A pointer to the Unicode string to return.\r
                                 This Unicode string is the name of the\r
@@ -314,7 +332,7 @@ CirrusLogic5430ComponentNameGetDriverName (
                                 languages specified in SupportedLanguages. The\r
                                 number of languages supported by a driver is up\r
                                 to the driver writer. Language is specified in\r
-                                RFC 3066 or ISO 639-2 language code format.\r
+                                RFC 4646 or ISO 639-2 language code format.\r
 \r
   @param  ControllerName[out]   A pointer to the Unicode string to return.\r
                                 This Unicode string is the name of the\r