]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/DxeSmbusLib/SmbusLib.c
Minor grammatical work--mostly adding periods. Items with ONLY period added did...
[mirror_edk2.git] / MdePkg / Library / DxeSmbusLib / SmbusLib.c
index 58733e6ee4c59ff6729c9a33ebd21cbfb83472e0..fe1a0944dc0ebab67f76ca484eaad6015460515f 100644 (file)
@@ -1,11 +1,11 @@
 /** @file\r
 Implementation of SmBusLib class library for DXE phase.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2010, 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
+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
@@ -30,13 +30,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
                         SMBUS Command, SMBUS Data Length, and PEC.\r
   @param  Status        Return status for the executed command.\r
                         This is an optional parameter and may be NULL.\r
-                        RETURN_SUCCESS  The SMBUS command was executed.\r
-                        RETURN_TIMEOUT  A timeout occurred while executing the SMBUS command.\r
-                        RETURN_DEVICE_ERROR The request was not completed because a failure\r
-                        reflected in the Host Status Register bit.  Device errors are a result\r
-                        of a transaction collision, illegal command field, unclaimed cycle\r
-                        (host initiated), or bus errors (collisions).\r
-                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
+                        RETURN_SUCCESS:  The SMBUS command was executed.\r
+                        RETURN_TIMEOUT:  A timeout occurred while executing the \r
+                        SMBUS command. \r
+                        RETURN_DEVICE_ERROR: The request was not \r
+                        completed because a failure reflected in the Host Status \r
+                        Register bit.  Device errors are a result of a transaction \r
+                        collision, illegal command field, unclaimed cycle (host \r
+                        initiated), or bus errors (collisions). \r
+                        RETURN_UNSUPPORTED: The SMBus operation is not supported.\r
 \r
 **/\r
 VOID\r
@@ -69,13 +71,15 @@ SmBusQuickRead (
                         SMBUS Command, SMBUS Data Length, and PEC.\r
   @param  Status        Return status for the executed command.\r
                         This is an optional parameter and may be NULL.\r
-                        RETURN_SUCCESS The SMBUS command was executed.\r
-                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
-                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
-                        reflected in the Host Status Register bit.  Device errors are a result\r
-                        of a transaction collision, illegal command field, unclaimed cycle\r
-                        (host initiated), or bus errors (collisions).\r
-                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
+                        RETURN_SUCCESS: The SMBUS command was executed.\r
+                        RETURN_TIMEOUT: A timeout occurred while executing the \r
+                        SMBUS command.\r
+                        RETURN_DEVICE_ERROR:  The request was not completed because \r
+                        a failure reflected in the Host Status Register bit.  \r
+                        Device errors are a result of a transaction collision, \r
+                        illegal command field, unclaimed cycle (host initiated), \r
+                        or bus errors (collisions).\r
+                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.\r
 \r
 **/\r
 VOID\r
@@ -108,14 +112,16 @@ SmBusQuickWrite (
                         SMBUS Command, SMBUS Data Length, and PEC.\r
   @param  Status        Return status for the executed command.\r
                         This is an optional parameter and may be NULL.\r
-                        RETURN_SUCCESS The SMBUS command was executed.\r
-                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
-                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
-                        reflected in the Host Status Register bit.  Device errors are a result\r
-                        of a transaction collision, illegal command field, unclaimed cycle\r
-                        (host initiated), or bus errors (collisions).\r
-                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
-                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
+                        RETURN_SUCCESS: The SMBUS command was executed.\r
+                        RETURN_TIMEOUT: A timeout occurred while executing the \r
+                        SMBUS command.\r
+                        RETURN_DEVICE_ERROR:  The request was not completed because \r
+                        a failure reflected in the Host Status Register bit.  Device\r
+                        errors are a result of a transaction collision, illegal \r
+                        command field, unclaimed cycle(host initiated), or bus \r
+                        errors (collisions).\r
+                        RETURN_CRC_ERROR:  The checksum is not correct. (PEC is incorrect.)\r
+                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.\r
 \r
   @return The byte received from the SMBUS.\r
 \r
@@ -154,14 +160,16 @@ SmBusReceiveByte (
   @param  Value         The 8-bit value to send.\r
   @param  Status        Return status for the executed command.\r
                         This is an optional parameter and may be NULL.\r
-                        RETURN_SUCCESS The SMBUS command was executed.\r
-                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
-                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
-                        reflected in the Host Status Register bit.  Device errors are a result\r
-                        of a transaction collision, illegal command field, unclaimed cycle\r
-                        (host initiated), or bus errors (collisions).\r
-                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
-                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
+                        RETURN_SUCCESS: The SMBUS command was executed.\r
+                        RETURN_TIMEOUT: A timeout occurred while executing the \r
+                        SMBUS command.\r
+                        RETURN_DEVICE_ERROR:  The request was not completed because\r
+                        a failure reflected in the Host Status Register bit.  Device \r
+                        errors are a result of a transaction collision, illegal \r
+                        command field, unclaimed cycle(host initiated), or bus \r
+                        errors (collisions).\r
+                        RETURN_CRC_ERROR:  The checksum is not correct (PEC is incorrect)\r
+                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.\r
 \r
   @return The parameter of Value.\r
 \r
@@ -196,18 +204,20 @@ SmBusSendByte (
   If Length in SmBusAddress is not zero, then ASSERT().\r
   If any reserved bits of SmBusAddress are set, then ASSERT().\r
 \r
-  @param  SmBusAddress    The address that encodes the SMBUS Slave Address,\r
-                          SMBUS Command, SMBUS Data Length, and PEC.\r
+  @param  SmBusAddress  The address that encodes the SMBUS Slave Address,\r
+                        SMBUS Command, SMBUS Data Length, and PEC.\r
   @param  Status        Return status for the executed command.\r
                         This is an optional parameter and may be NULL.\r
-                        RETURN_SUCCESS The SMBUS command was executed.\r
-                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
-                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
-                        reflected in the Host Status Register bit.  Device errors are a result\r
-                        of a transaction collision, illegal command field, unclaimed cycle\r
-                        (host initiated), or bus errors (collisions).\r
-                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
-                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
+                        RETURN_SUCCESS: The SMBUS command was executed.\r
+                        RETURN_TIMEOUT: A timeout occurred while executing the \r
+                        SMBUS command.\r
+                        RETURN_DEVICE_ERROR:  The request was not completed because \r
+                        a failurereflected in the Host Status Register bit.  Device \r
+                        errors are a result of a transaction collision, illegal \r
+                        command field, unclaimed cycle (host initiated), or bus \r
+                        errors (collisions).\r
+                        RETURN_CRC_ERROR:  The checksum is not correct (PEC is incorrect)\r
+                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.\r
 \r
   @return The byte read from the SMBUS.\r
 \r
@@ -245,14 +255,16 @@ SmBusReadDataByte (
   @param  Value         The 8-bit value to write.\r
   @param  Status        Return status for the executed command.\r
                         This is an optional parameter and may be NULL.\r
-                        RETURN_SUCCESS The SMBUS command was executed.\r
-                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
-                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
-                        reflected in the Host Status Register bit.  Device errors are a result\r
-                        of a transaction collision, illegal command field, unclaimed cycle\r
-                        (host initiated), or bus errors (collisions).\r
-                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
-                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
+                        RETURN_SUCCESS: The SMBUS command was executed.\r
+                        RETURN_TIMEOUT: A timeout occurred while executing the \r
+                        SMBUS command.\r
+                        RETURN_DEVICE_ERROR:  The request was not completed because \r
+                        a failure reflected in the Host Status Register bit.  Device \r
+                        errors are a result of a transaction collision, illegal \r
+                        command field, unclaimed cycle host initiated), or bus \r
+                        errors (collisions).\r
+                        RETURN_CRC_ERROR:  The checksum is not correct. (PEC is incorrect.)\r
+                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.\r
 \r
   @return The parameter of Value.\r
 \r
@@ -290,14 +302,17 @@ SmBusWriteDataByte (
                         SMBUS Command, SMBUS Data Length, and PEC.\r
   @param  Status        Return status for the executed command.\r
                         This is an optional parameter and may be NULL.\r
-                        RETURN_SUCCESS The SMBUS command was executed.\r
-                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
-                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
-                        reflected in the Host Status Register bit.  Device errors are a result\r
-                        of a transaction collision, illegal command field, unclaimed cycle\r
-                        (host initiated), or bus errors (collisions).\r
-                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
-                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
+                        RETURN_SUCCESS: The SMBUS command was executed.\r
+                        RETURN_TIMEOUT: A timeout occurred while executing the \r
+                        SMBUS command.\r
+                        RETURN_DEVICE_ERROR:  The request was not completed because \r
+                        a failure reflected in the Host Status Register bit.  \r
+                        Device errors are a result of a transaction collision, \r
+                        illegal command field, unclaimed cycle (host initiated), \r
+                        or bus errors (collisions).\r
+                        RETURN_CRC_ERROR:  The checksum is not correct. (PEC is \r
+                        incorrect.)\r
+                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.\r
 \r
   @return The byte read from the SMBUS.\r
 \r
@@ -335,14 +350,17 @@ SmBusReadDataWord (
   @param  Value         The 16-bit value to write.\r
   @param  Status        Return status for the executed command.\r
                         This is an optional parameter and may be NULL.\r
-                        RETURN_SUCCESS The SMBUS command was executed.\r
-                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
-                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
-                        reflected in the Host Status Register bit.  Device errors are a result\r
-                        of a transaction collision, illegal command field, unclaimed cycle\r
-                        (host initiated), or bus errors (collisions).\r
-                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
-                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
+                        RETURN_SUCCESS: The SMBUS command was executed.\r
+                        RETURN_TIMEOUT: A timeout occurred while executing the SMBUS \r
+                        command.\r
+                        RETURN_DEVICE_ERROR:  The request was not completed because \r
+                        a failure reflected in the Host Status Register bit.  \r
+                        Device errors are a result of a transaction collision, \r
+                        illegal command field, unclaimed cycle (host initiated), \r
+                        or bus errors (collisions).\r
+                        RETURN_CRC_ERROR:  The checksum is not correct. \r
+                        (PEC is incorrect.)\r
+                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.\r
 \r
   @return The parameter of Value.\r
 \r
@@ -382,14 +400,17 @@ SmBusWriteDataWord (
   @param  Value         The 16-bit value to write.\r
   @param  Status        Return status for the executed command.\r
                         This is an optional parameter and may be NULL.\r
-                        RETURN_SUCCESS The SMBUS command was executed.\r
-                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
-                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
-                        reflected in the Host Status Register bit.  Device errors are a result\r
-                        of a transaction collision, illegal command field, unclaimed cycle\r
-                        (host initiated), or bus errors (collisions).\r
-                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
-                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
+                        RETURN_SUCCESS: The SMBUS command was executed.\r
+                        RETURN_TIMEOUT: A timeout occurred while executing the \r
+                        SMBUS command.\r
+                        RETURN_DEVICE_ERROR:  The request was not completed because \r
+                        a failure reflected in the Host Status Register bit.  \r
+                        Device errors are a result of a transaction collision, \r
+                        illegal command field, unclaimed cycle (host initiated), \r
+                        or bus errors (collisions).\r
+                        RETURN_CRC_ERROR:  The checksum is not correct. (PEC is \r
+                        incorrect.)\r
+                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.\r
 \r
   @return The 16-bit value returned by the process call command.\r
 \r
@@ -426,17 +447,21 @@ SmBusProcessCall (
 \r
   @param  SmBusAddress  The address that encodes the SMBUS Slave Address,\r
                         SMBUS Command, SMBUS Data Length, and PEC.\r
-  @param  Buffer        The pointer to the buffer to store the bytes read from the SMBUS.\r
+  @param  Buffer        The pointer to the buffer to store the bytes read from \r
+                        the SMBUS.\r
   @param  Status        Return status for the executed command.\r
                         This is an optional parameter and may be NULL.\r
-                        RETURN_SUCCESS The SMBUS command was executed.\r
-                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
-                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
-                        reflected in the Host Status Register bit.  Device errors are a result\r
-                        of a transaction collision, illegal command field, unclaimed cycle\r
-                        (host initiated), or bus errors (collisions).\r
-                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
-                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
+                        RETURN_SUCCESS: The SMBUS command was executed.\r
+                        RETURN_TIMEOUT: A timeout occurred while executing the SMBUS \r
+                        command.\r
+                        RETURN_DEVICE_ERROR:  The request was not completed because \r
+                        a failure reflected in the Host Status Register bit.  Device \r
+                        errors are a result of a transaction collision, illegal \r
+                        command field, unclaimed cycle (host initiated), or bus \r
+                        errors (collisions).\r
+                        RETURN_CRC_ERROR:  The checksum is not correct. (PEC is \r
+                        incorrect.)\r
+                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.\r
 \r
   @return The number of bytes read.\r
 \r
@@ -470,16 +495,20 @@ SmBusReadBlock (
 \r
   @param  SmBusAddress  The address that encodes the SMBUS Slave Address,\r
                         MBUS Command, SMBUS Data Length, and PEC.\r
-  @param  Buffer        The pointer to the buffer to store the bytes read from the SMBUS.\r
+  @param  Buffer        The pointer to the buffer to store the bytes read from \r
+                        the SMBUS.\r
   @param  Status        Return status for the executed command.\r
                         This is an optional parameter and may be NULL.\r
-                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
-                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
-                        reflected in the Host Status Register bit.  Device errors are a result\r
-                        of a transaction collision, illegal command field, unclaimed cycle\r
-                        (host initiated), or bus errors (collisions).\r
-                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
-                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
+                        RETURN_TIMEOUT: A timeout occurred while executing the \r
+                        SMBUS command.\r
+                        RETURN_DEVICE_ERROR:  The request was not completed because \r
+                        a failure reflected in the Host Status Register bit.  Device \r
+                        errors are a result of a transaction collision, illegal \r
+                        command field, unclaimed cycle (host initiated), or bus \r
+                        errors (collisions).\r
+                        RETURN_CRC_ERROR:  The checksum is not correct. (PEC is \r
+                        incorrect.)\r
+                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.\r
 \r
   @return The number of bytes written.\r
 \r
@@ -523,13 +552,16 @@ SmBusWriteBlock (
   @param  ReadBuffer    The pointer to the buffer of bytes to read from the SMBUS.\r
   @param  Status        Return status for the executed command.\r
                         This is an optional parameter and may be NULL.\r
-                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
-                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
-                        reflected in the Host Status Register bit.  Device errors are a result\r
-                        of a transaction collision, illegal command field, unclaimed cycle\r
-                        (host initiated), or bus errors (collisions).\r
-                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
-                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
+                        RETURN_TIMEOUT: A timeout occurred while executing the \r
+                        SMBUS command.\r
+                        RETURN_DEVICE_ERROR: The request was not completed because \r
+                        a failure reflected in the Host Status Register bit.  Device \r
+                        errors are a result of a transaction collision, illegal \r
+                        command field, unclaimed cycle (host initiated), or bus \r
+                        errors (collisions).\r
+                        RETURN_CRC_ERROR:  The checksum is not correct. (PEC is \r
+                        incorrect.)\r
+                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.\r
 \r
   @return The number of bytes written.\r
 \r