]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/DxeSmbusLib/InternalSmbusLib.h
Minor grammatical work--mostly adding periods. Items with ONLY period added did...
[mirror_edk2.git] / MdePkg / Library / DxeSmbusLib / InternalSmbusLib.h
1 /** @file
2 Internal header file for Smbus library.
3
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13
14 **/
15
16 #ifndef __INTERNAL_SMBUS_LIB_H_
17 #define __INTERNAL_SMBUS_LIB_H_
18
19
20 #include <PiDxe.h>
21
22 #include <Protocol/SmbusHc.h>
23
24 #include <Library/SmbusLib.h>
25 #include <Library/DebugLib.h>
26 #include <Library/UefiBootServicesTableLib.h>
27 #include <Library/BaseMemoryLib.h>
28
29 #include <IndustryStandard/SmBus.h>
30
31 //
32 // Declaration for internal functions
33 //
34 /**
35 Executes an SMBus operation to an SMBus controller.
36
37 This function provides a standard way to execute Smbus script
38 as defined in the SmBus Specification. The data can either be of
39 the Length byte, word, or a block of data.
40
41 @param SmbusOperation Signifies which particular SMBus hardware protocol instance that it will use to
42 execute the SMBus transactions.
43 @param SmBusAddress The address that encodes the SMBUS Slave Address,
44 SMBUS Command, SMBUS Data Length, and PEC.
45 @param Length Signifies the number of bytes that this operation will do. The maximum number of
46 bytes can be revision specific and operation specific.
47 @param Buffer Contains the value of data to execute to the SMBus slave device. Not all operations
48 require this argument. The length of this buffer is identified by Length.
49 @param Status Return status for the executed command.
50 This is an optional parameter and may be NULL.
51
52 @return The actual number of bytes that are executed for this operation.
53
54 **/
55 UINTN
56 InternalSmBusExec (
57 IN EFI_SMBUS_OPERATION SmbusOperation,
58 IN UINTN SmBusAddress,
59 IN UINTN Length,
60 IN OUT VOID *Buffer,
61 OUT RETURN_STATUS *Status OPTIONAL
62 );
63
64 /**
65 The constructor function caches the pointer to Smbus protocol.
66
67 The constructor function locates Smbus protocol from protocol database.
68 It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.
69
70 @param ImageHandle The firmware allocated handle for the EFI image.
71 @param SystemTable A pointer to the EFI System Table.
72
73 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
74
75 **/
76 EFI_STATUS
77 EFIAPI
78 SmbusLibConstructor (
79 IN EFI_HANDLE ImageHandle,
80 IN EFI_SYSTEM_TABLE *SystemTable
81 );
82
83 #endif