VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/PeiSmbusLibSmbus2Ppi/InternalSmbusLib.h@ 77599

Last change on this file since 77599 was 58466, checked in by vboxsync, 10 years ago

EFI/Firmware: Merged in the svn:eol-style, svn:mime-type and trailing whitespace cleanup that was done after the initial UDK2014.SP1 import: svn merge /vendor/edk2/UDK2014.SP1 /vendor/edk2/current .

  • Property svn:eol-style set to native
File size: 2.5 KB
Line 
1/** @file
2Internal header file for Smbus library.
3
4Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
5This program and the accompanying materials
6are licensed and made available under the terms and conditions of the BSD License
7which accompanies this distribution. The full text of the license may be found at
8http://opensource.org/licenses/bsd-license.php
9
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11WITHOUT 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 <PiPei.h>
21
22#include <Ppi/Smbus2.h>
23
24#include <Library/SmbusLib.h>
25#include <Library/DebugLib.h>
26#include <Library/PeiServicesLib.h>
27#include <Library/BaseMemoryLib.h>
28
29//
30// Declaration for internal functions
31//
32
33/**
34 Gets Smbus PPIs.
35
36 This internal function retrieves Smbus PPI from PPI database.
37
38 @param VOID
39
40 @return The pointer to Smbus PPI.
41
42**/
43EFI_PEI_SMBUS2_PPI *
44InternalGetSmbusPpi (
45 VOID
46 );
47
48/**
49 Executes an SMBus operation to an SMBus controller.
50
51 This function provides a standard way to execute Smbus script
52 as defined in the SmBus Specification. The data can either be of
53 the Length byte, word, or a block of data.
54
55 @param SmbusOperation Signifies which particular SMBus hardware protocol
56 instance that it will use to execute the SMBus transactions.
57 @param SmBusAddress The address that encodes the SMBUS Slave Address,
58 SMBUS Command, SMBUS Data Length, and PEC.
59 @param Length Signifies the number of bytes that this operation will
60 do. The maximum number of bytes can be revision specific
61 and operation specific.
62 @param Buffer Contains the value of data to execute to the SMBus slave
63 device. Not all operations require this argument. The
64 length of this buffer is identified by Length.
65 @param Status Return status for the executed command.
66 This is an optional parameter and may be NULL.
67
68 @return The actual number of bytes that are executed for this operation.
69
70**/
71UINTN
72InternalSmBusExec (
73 IN EFI_SMBUS_OPERATION SmbusOperation,
74 IN UINTN SmBusAddress,
75 IN UINTN Length,
76 IN OUT VOID *Buffer,
77 OUT RETURN_STATUS *Status OPTIONAL
78 );
79
80#endif
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette