]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Refine EFI_DARKGRAY definition and comments for EFI_TEXT_ATTR
authorRuiyu Ni <ruiyu.ni@intel.com>
Fri, 8 May 2015 07:29:18 +0000 (07:29 +0000)
committerniruiyu <niruiyu@Edk2>
Fri, 8 May 2015 07:29:18 +0000 (07:29 +0000)
It's to follow UEFI spec 2.5.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Jin <eric.jin@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17366 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Protocol/SimpleTextOut.h

index 15ae968e6402586a558a783cc78e1fa77e29e7c7..5f64b64c2f7d55866a4c920d7fd468df29a86864 100644 (file)
@@ -6,7 +6,7 @@
   a single hardware device or a virtual device that is an aggregation\r
   of multiple physical devices.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
 The full text of the license may be found at\r
@@ -115,7 +115,7 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   SIMPLE_TEXT_OUTPUT_INTERFACE;
 #define EFI_BROWN                 (EFI_GREEN | EFI_RED)\r
 #define EFI_LIGHTGRAY             (EFI_BLUE | EFI_GREEN | EFI_RED)\r
 #define EFI_BRIGHT                0x08\r
-#define EFI_DARKGRAY              (EFI_BRIGHT)\r
+#define EFI_DARKGRAY              (EFI_BLACK | EFI_BRIGHT)\r
 #define EFI_LIGHTBLUE             (EFI_BLUE | EFI_BRIGHT)\r
 #define EFI_LIGHTGREEN            (EFI_GREEN | EFI_BRIGHT)\r
 #define EFI_LIGHTCYAN             (EFI_CYAN | EFI_BRIGHT)\r
@@ -124,7 +124,18 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   SIMPLE_TEXT_OUTPUT_INTERFACE;
 #define EFI_YELLOW                (EFI_BROWN | EFI_BRIGHT)\r
 #define EFI_WHITE                 (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT)\r
 \r
-#define EFI_TEXT_ATTR(f, b)       ((f) | ((b) << 4))\r
+//\r
+// Macro to accept color values in their raw form to create \r
+// a value that represents both a foreground and background \r
+// color in a single byte.\r
+// For Foreground, and EFI_* value is valid from EFI_BLACK(0x00) to\r
+// EFI_WHITE (0x0F).\r
+// For Background, only EFI_BLACK, EFI_BLUE, EFI_GREEN, EFI_CYAN,\r
+// EFI_RED, EFI_MAGENTA, EFI_BROWN, and EFI_LIGHTGRAY are acceptable\r
+//\r
+// Do not use EFI_BACKGROUND_xxx values with this macro.\r
+//\r
+#define EFI_TEXT_ATTR(Foreground,Background) ((Foreground) | ((Background) << 4))\r
 \r
 #define EFI_BACKGROUND_BLACK      0x00\r
 #define EFI_BACKGROUND_BLUE       0x10\r