diff options
Diffstat (limited to 'MdePkg/Include/Library/SmbusLib.h')
-rw-r--r-- | MdePkg/Include/Library/SmbusLib.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/MdePkg/Include/Library/SmbusLib.h b/MdePkg/Include/Library/SmbusLib.h index 484ab90144..6d214aaa8e 100644 --- a/MdePkg/Include/Library/SmbusLib.h +++ b/MdePkg/Include/Library/SmbusLib.h @@ -18,9 +18,9 @@ #define __SMBUS_LIB__
//
-// PEC BIT is bit 21 in SMBUS address
+// PEC BIT is bit 22 in SMBUS address
//
-#define SMBUS_LIB_PEC_BIT (1 << 21)
+#define SMBUS_LIB_PEC_BIT (1 << 22)
/**
Macro that converts SMBUS slave address, SMBUS command, SMBUS data length,
@@ -32,7 +32,7 @@ @param SlaveAddress SMBUS Slave Address. Range 0..127.
@param Command SMBUS Command. Range 0..255.
- @param Length SMBUS Data Length. Range 0..31.
+ @param Length SMBUS Data Length. Range 0..32.
@param Pec TRUE if Packet Error Checking is enabled. Otherwise FALSE.
**/
@@ -40,7 +40,7 @@ ( ((Pec) ? SMBUS_LIB_PEC_BIT: 0) | \
(((SlaveAddress) & 0x7f) << 1) | \
(((Command) & 0xff) << 8) | \
- (((Length) & 0x1f) << 16) \
+ (((Length) & 0x3f) << 16) \
)
/**
@@ -296,7 +296,7 @@ SmBusProcessCall ( Bytes are read from the SMBUS and stored in Buffer.
The number of bytes read is returned, and will never return a value larger than 32-bytes.
If Status is not NULL, then the status of the executed command is returned in Status.
- It is the caller¡¯s responsibility to make sure Buffer is large enough for the total number of bytes read.
+ It is the caller's responsibility to make sure Buffer is large enough for the total number of bytes read.
SMBUS supports a maximum transfer size of 32 bytes, so Buffer does not need to be any larger than 32 bytes.
If Length in SmBusAddress is not zero, then ASSERT().
If Buffer is NULL, then ASSERT().
@@ -355,19 +355,19 @@ SmBusWriteBlock ( Executes an SMBUS block process call command on the SMBUS device specified by SmBusAddress.
The SMBUS slave address, SMBUS command, and SMBUS length fields of SmBusAddress are required.
- Bytes are written to the SMBUS from OutBuffer. Bytes are then read from the SMBUS into InBuffer.
+ Bytes are written to the SMBUS from WriteBuffer. Bytes are then read from the SMBUS into ReadBuffer.
If Status is not NULL, then the status of the executed command is returned in Status.
- It is the caller¡¯s responsibility to make sure InBuffer is large enough for the total number of bytes read.
+ It is the caller's responsibility to make sure ReadBuffer is large enough for the total number of bytes read.
SMBUS supports a maximum transfer size of 32 bytes, so Buffer does not need to be any larger than 32 bytes.
- If OutBuffer is NULL, then ASSERT().
- If InBuffer is NULL, then ASSERT().
+ If Length in SmBusAddress is zero or greater than 32, then ASSERT().
+ If WriteBuffer is NULL, then ASSERT().
+ If ReadBuffer is NULL, then ASSERT().
If any reserved bits of SmBusAddress are set, then ASSERT().
-
@param SmBusAddress Address that encodes the SMBUS Slave Address,
SMBUS Command, SMBUS Data Length, and PEC.
- @param OutBuffer Pointer to the buffer of bytes to write to the SMBUS.
- @param InBuffer Pointer to the buffer of bytes to read from the SMBUS.
+ @param WriteBuffer Pointer to the buffer of bytes to write to the SMBUS.
+ @param ReadBuffer Pointer to the buffer of bytes to read from the SMBUS.
@param Status Return status for the executed command.
This is an optional parameter and may be NULL.
@@ -378,10 +378,11 @@ UINTN EFIAPI
SmBusBlockProcessCall (
IN UINTN SmBusAddress,
- IN VOID *OutBuffer,
- OUT VOID *InBuffer,
+ IN VOID *WriteBuffer,
+ OUT VOID *ReadBuffer,
OUT RETURN_STATUS *Status OPTIONAL
)
;
+
#endif
|