]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Bus/Pci/CirrusLogic/Dxe/CirrusLogic5430UgaDraw.c
Obsoleted by new schema and new build tools.
[mirror_edk2.git] / EdkModulePkg / Bus / Pci / CirrusLogic / Dxe / CirrusLogic5430UgaDraw.c
index c33918b67549e0859168066b2f7a4bf8cdd242ab..60e0582cf07b21ff9bf0a792c262fe7de449d5cb 100644 (file)
@@ -1,31 +1,24 @@
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. 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
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-Module Name:\r
-\r
-  CirrusLogic5430UgaDraw.c\r
-\r
-Abstract:\r
-\r
+/** @file\r
   This file produces the graphics abstration of UGA Draw. It is called by \r
   CirrusLogic5430.c file which deals with the EFI 1.1 driver model. \r
   This file just does graphics.\r
 \r
---*/\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. 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
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+**/\r
 \r
 #include "CirrusLogic5430.h"\r
 \r
-//\r
-// Video Mode structure\r
-//\r
+///\r
+/// Video Mode structure\r
+///\r
 typedef struct {\r
   UINT32  Width;\r
   UINT32  Height;\r
@@ -36,18 +29,18 @@ typedef struct {
   UINT8   MiscSetting;\r
 } CIRRUS_LOGIC_5430_VIDEO_MODES;\r
 \r
-//\r
-// Generic Attribute Controller Register Settings\r
-//\r
+///\r
+/// Generic Attribute Controller Register Settings\r
+///\r
 static UINT8                          AttributeController[21] = {\r
   0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, \r
   0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, \r
   0x41, 0x00, 0x0F, 0x00, 0x00\r
 };\r
 \r
-//\r
-// Generic Graphics Controller Register Settings\r
-//\r
+///\r
+/// Generic Graphics Controller Register Settings\r
+///\r
 static UINT8 GraphicsController[9] = {\r
   0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F, 0xFF\r
 };\r
@@ -97,9 +90,9 @@ static UINT16                         Seq_1024_768_256_60[15] = {
   0x5b0c, 0x450d, 0x760e, 0x2b1b, 0x2f1c, 0x301d, 0x341e\r
 };\r
 \r
-//\r
-// Table of supported video modes\r
-//\r
+///\r
+/// Table of supported video modes\r
+///\r
 static CIRRUS_LOGIC_5430_VIDEO_MODES  CirrusLogic5430VideoModes[] = {\r
   {  640, 480, 8, 60, Crtc_640_480_256_60,  Seq_640_480_256_60,  0xe3 },\r
   {  800, 600, 8, 60, Crtc_800_600_256_60,  Seq_800_600_256_60,  0xef }, \r
@@ -169,6 +162,20 @@ inw (
 //\r
 // UGA Draw Protocol Member Functions\r
 //\r
+/**\r
+  TODO: Add function description\r
+\r
+  @param  This TODO: add argument description\r
+  @param  HorizontalResolution TODO: add argument description\r
+  @param  VerticalResolution TODO: add argument description\r
+  @param  ColorDepth TODO: add argument description\r
+  @param  RefreshRate TODO: add argument description\r
+\r
+  @retval  EFI_NOT_STARTED TODO: Add description for return value\r
+  @retval  EFI_INVALID_PARAMETER TODO: Add description for return value\r
+  @retval  EFI_SUCCESS TODO: Add description for return value\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CirrusLogic5430UgaDrawGetMode (\r
@@ -178,27 +185,6 @@ CirrusLogic5430UgaDrawGetMode (
   OUT UINT32                *ColorDepth,\r
   OUT UINT32                *RefreshRate\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  This                  - TODO: add argument description\r
-  HorizontalResolution  - TODO: add argument description\r
-  VerticalResolution    - TODO: add argument description\r
-  ColorDepth            - TODO: add argument description\r
-  RefreshRate           - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  EFI_NOT_STARTED - TODO: Add description for return value\r
-  EFI_INVALID_PARAMETER - TODO: Add description for return value\r
-  EFI_SUCCESS - TODO: Add description for return value\r
-\r
---*/\r
 {\r
   CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private;\r
 \r
@@ -223,6 +209,20 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  TODO: Add function description\r
+\r
+  @param  This TODO: add argument description\r
+  @param  HorizontalResolution TODO: add argument description\r
+  @param  VerticalResolution TODO: add argument description\r
+  @param  ColorDepth TODO: add argument description\r
+  @param  RefreshRate TODO: add argument description\r
+\r
+  @retval  EFI_OUT_OF_RESOURCES TODO: Add description for return value\r
+  @retval  EFI_SUCCESS TODO: Add description for return value\r
+  @retval  EFI_NOT_FOUND TODO: Add description for return value\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CirrusLogic5430UgaDrawSetMode (\r
@@ -232,27 +232,6 @@ CirrusLogic5430UgaDrawSetMode (
   IN  UINT32                ColorDepth,\r
   IN  UINT32                RefreshRate\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  This                  - TODO: add argument description\r
-  HorizontalResolution  - TODO: add argument description\r
-  VerticalResolution    - TODO: add argument description\r
-  ColorDepth            - TODO: add argument description\r
-  RefreshRate           - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  EFI_OUT_OF_RESOURCES - TODO: Add description for return value\r
-  EFI_SUCCESS - TODO: Add description for return value\r
-  EFI_NOT_FOUND - TODO: Add description for return value\r
-\r
---*/\r
 {\r
   CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private;\r
   UINTN                           Index;\r
@@ -299,6 +278,29 @@ Returns:
   return EFI_NOT_FOUND;\r
 }\r
 \r
+/**\r
+  TODO: Add function description\r
+\r
+  @param  This TODO: add argument description\r
+  @param  BltBuffer TODO: add argument description\r
+  @param  BltOperation TODO: add argument description\r
+  @param  SourceX TODO: add argument description\r
+  @param  SourceY TODO: add argument description\r
+  @param  DestinationX TODO: add argument description\r
+  @param  DestinationY TODO: add argument description\r
+  @param  Width TODO: add argument description\r
+  @param  Height TODO: add argument description\r
+  @param  Delta TODO: add argument description\r
+\r
+  @retval  EFI_INVALID_PARAMETER TODO: Add description for return value\r
+  @retval  EFI_INVALID_PARAMETER TODO: Add description for return value\r
+  @retval  EFI_INVALID_PARAMETER TODO: Add description for return value\r
+  @retval  EFI_INVALID_PARAMETER TODO: Add description for return value\r
+  @retval  EFI_INVALID_PARAMETER TODO: Add description for return value\r
+  @retval  EFI_INVALID_PARAMETER TODO: Add description for return value\r
+  @retval  EFI_SUCCESS TODO: Add description for return value\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 CirrusLogic5430UgaDrawBlt (\r
@@ -313,36 +315,6 @@ CirrusLogic5430UgaDrawBlt (
   IN  UINTN                     Height,\r
   IN  UINTN                     Delta\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  This          - TODO: add argument description\r
-  BltBuffer     - TODO: add argument description\r
-  BltOperation  - TODO: add argument description\r
-  SourceX       - TODO: add argument description\r
-  SourceY       - TODO: add argument description\r
-  DestinationX  - TODO: add argument description\r
-  DestinationY  - TODO: add argument description\r
-  Width         - TODO: add argument description\r
-  Height        - TODO: add argument description\r
-  Delta         - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  EFI_INVALID_PARAMETER - TODO: Add description for return value\r
-  EFI_INVALID_PARAMETER - TODO: Add description for return value\r
-  EFI_INVALID_PARAMETER - TODO: Add description for return value\r
-  EFI_INVALID_PARAMETER - TODO: Add description for return value\r
-  EFI_INVALID_PARAMETER - TODO: Add description for return value\r
-  EFI_INVALID_PARAMETER - TODO: Add description for return value\r
-  EFI_SUCCESS - TODO: Add description for return value\r
-\r
---*/\r
 {\r
   CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private;\r
   EFI_TPL                         OriginalTPL;\r
@@ -597,23 +569,16 @@ Returns:
 // Construction and Destruction functions\r
 //\r
 \r
+/**\r
+  CirrusLogic5430UgaDrawConstructor\r
+\r
+  TODO:    Private - add argument and description to function comment\r
+  TODO:    EFI_SUCCESS - add return value to function comment\r
+**/\r
 EFI_STATUS\r
 CirrusLogic5430UgaDrawConstructor (\r
   CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
-// TODO:    Private - add argument and description to function comment\r
-// TODO:    EFI_SUCCESS - add return value to function comment\r
 {\r
   EFI_UGA_DRAW_PROTOCOL *UgaDraw;\r
   UINTN                 Index;\r
@@ -657,50 +622,36 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  CirrusLogic5430UgaDrawDestructor\r
+\r
+  TODO:    Private - add argument and description to function comment\r
+  TODO:    EFI_SUCCESS - add return value to function comment\r
+**/\r
 EFI_STATUS\r
 CirrusLogic5430UgaDrawDestructor (\r
   CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
-// TODO:    Private - add argument and description to function comment\r
-// TODO:    EFI_SUCCESS - add return value to function comment\r
 {\r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  TODO: Add function description\r
+\r
+  @param  Private TODO: add argument description\r
+  @param  Address TODO: add argument description\r
+  @param  Data TODO: add argument description\r
+\r
+  TODO: add return values\r
+\r
+**/\r
 VOID\r
 outb (\r
   CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private,\r
   UINTN                           Address,\r
   UINT8                           Data\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  Private - TODO: add argument description\r
-  Address - TODO: add argument description\r
-  Data    - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
 {\r
   Private->PciIo->Io.Write (\r
                       Private->PciIo,\r
@@ -712,29 +663,22 @@ Returns:
                       );\r
 }\r
 \r
+/**\r
+  TODO: Add function description\r
+\r
+  @param  Private TODO: add argument description\r
+  @param  Address TODO: add argument description\r
+  @param  Data TODO: add argument description\r
+\r
+  TODO: add return values\r
+\r
+**/\r
 VOID\r
 outw (\r
   CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private,\r
   UINTN                           Address,\r
   UINT16                          Data\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  Private - TODO: add argument description\r
-  Address - TODO: add argument description\r
-  Data    - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
 {\r
   Private->PciIo->Io.Write (\r
                       Private->PciIo,\r
@@ -746,27 +690,20 @@ Returns:
                       );\r
 }\r
 \r
-UINT8\r
-inb (\r
-  CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private,\r
-  UINTN                           Address\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  Private - TODO: add argument description\r
-  Address - TODO: add argument description\r
-\r
-Returns:\r
+  @param  Private TODO: add argument description\r
+  @param  Address TODO: add argument description\r
 \r
   TODO: add return values\r
 \r
---*/\r
+**/\r
+UINT8\r
+inb (\r
+  CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private,\r
+  UINTN                           Address\r
+  )\r
 {\r
   UINT8 Data;\r
 \r
@@ -781,27 +718,20 @@ Returns:
   return Data;\r
 }\r
 \r
-UINT16\r
-inw (\r
-  CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private,\r
-  UINTN                           Address\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  Private - TODO: add argument description\r
-  Address - TODO: add argument description\r
-\r
-Returns:\r
+  @param  Private TODO: add argument description\r
+  @param  Address TODO: add argument description\r
 \r
   TODO: add return values\r
 \r
---*/\r
+**/\r
+UINT16\r
+inw (\r
+  CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private,\r
+  UINTN                           Address\r
+  )\r
 {\r
   UINT16  Data;\r
 \r
@@ -816,6 +746,18 @@ Returns:
   return Data;\r
 }\r
 \r
+/**\r
+  TODO: Add function description\r
+\r
+  @param  Private TODO: add argument description\r
+  @param  Index TODO: add argument description\r
+  @param  Red TODO: add argument description\r
+  @param  Green TODO: add argument description\r
+  @param  Blue TODO: add argument description\r
+\r
+  TODO: add return values\r
+\r
+**/\r
 VOID\r
 SetPaletteColor (\r
   CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private,\r
@@ -824,25 +766,6 @@ SetPaletteColor (
   UINT8                           Green,\r
   UINT8                           Blue\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  Private - TODO: add argument description\r
-  Index   - TODO: add argument description\r
-  Red     - TODO: add argument description\r
-  Green   - TODO: add argument description\r
-  Blue    - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
 {\r
   outb (Private, PALETTE_INDEX_REGISTER, (UINT8) Index);\r
   outb (Private, PALETTE_DATA_REGISTER, (UINT8) (Red >> 2));\r
@@ -850,25 +773,18 @@ Returns:
   outb (Private, PALETTE_DATA_REGISTER, (UINT8) (Blue >> 2));\r
 }\r
 \r
-VOID\r
-SetDefaultPalette (\r
-  CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  Private - TODO: add argument description\r
-\r
-Returns:\r
+  @param  Private TODO: add argument description\r
 \r
   TODO: add return values\r
 \r
---*/\r
+**/\r
+VOID\r
+SetDefaultPalette (\r
+  CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private\r
+  )\r
 {\r
   UINTN Index;\r
   UINTN RedIndex;\r
@@ -886,26 +802,19 @@ Returns:
   }\r
 }\r
 \r
-STATIC\r
-VOID\r
-ClearScreen (\r
-  CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  Private - TODO: add argument description\r
-\r
-Returns:\r
+  @param  Private TODO: add argument description\r
 \r
   TODO: add return values\r
 \r
---*/\r
+**/\r
+STATIC\r
+VOID\r
+ClearScreen (\r
+  CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private\r
+  )\r
 {\r
   UINT32  Color;\r
 \r
@@ -920,25 +829,18 @@ Returns:
                         );\r
 }\r
 \r
-VOID\r
-DrawLogo (\r
-  CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  Private - TODO: add argument description\r
-\r
-Returns:\r
+  @param  Private TODO: add argument description\r
 \r
   TODO: add return values\r
 \r
---*/\r
+**/\r
+VOID\r
+DrawLogo (\r
+  CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private\r
+  )\r
 {\r
   UINTN Offset;\r
   UINTN X;\r
@@ -968,27 +870,20 @@ Returns:
   }\r
 }\r
 \r
-VOID\r
-InitializeGraphicsMode (\r
-  CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private,\r
-  CIRRUS_LOGIC_5430_VIDEO_MODES   *ModeData\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
   TODO: Add function description\r
 \r
-Arguments:\r
-\r
-  Private   - TODO: add argument description\r
-  ModeData  - TODO: add argument description\r
-\r
-Returns:\r
+  @param  Private TODO: add argument description\r
+  @param  ModeData TODO: add argument description\r
 \r
   TODO: add return values\r
 \r
---*/\r
+**/\r
+VOID\r
+InitializeGraphicsMode (\r
+  CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private,\r
+  CIRRUS_LOGIC_5430_VIDEO_MODES   *ModeData\r
+  )\r
 {\r
   UINT8 Byte;\r
   UINTN Index;\r