XenevaOS
Loading...
Searching...
No Matches
SmbusLib.h
Go to the documentation of this file.
1
16#ifndef __SMBUS_LIB__
17#define __SMBUS_LIB__
18
33#define SMBUS_LIB_ADDRESS(SlaveAddress,Command,Length,Pec) \
34 ( ((Pec) ? BIT22: 0) | \
35 (((SlaveAddress) & 0x7f) << 1) | \
36 (((Command) & 0xff) << 8) | \
37 (((Length) & 0x3f) << 16) \
38 )
39
45#define SMBUS_LIB_SLAVE_ADDRESS(SmBusAddress) (((SmBusAddress) >> 1) & 0x7f)
46
52#define SMBUS_LIB_COMMAND(SmBusAddress) (((SmBusAddress) >> 8) & 0xff)
53
59#define SMBUS_LIB_LENGTH(SmBusAddress) (((SmBusAddress) >> 16) & 0x3f)
60
66#define SMBUS_LIB_PEC(SmBusAddress) ((BOOLEAN) (((SmBusAddress) & BIT22) != 0))
67
73#define SMBUS_LIB_RESERVED(SmBusAddress) ((SmBusAddress) & ~(BIT23 - 2))
74
99VOID
100EFIAPI
102 IN UINTN SmBusAddress,
104 );
105
130VOID
131EFIAPI
133 IN UINTN SmBusAddress,
135 );
136
164UINT8
165EFIAPI
167 IN UINTN SmBusAddress,
169 );
170
199UINT8
200EFIAPI
202 IN UINTN SmBusAddress,
203 IN UINT8 Value,
205 );
206
233UINT8
234EFIAPI
236 IN UINTN SmBusAddress,
238 );
239
268UINT8
269EFIAPI
271 IN UINTN SmBusAddress,
272 IN UINT8 Value,
274 );
275
302UINT16
303EFIAPI
305 IN UINTN SmBusAddress,
307 );
308
337UINT16
338EFIAPI
340 IN UINTN SmBusAddress,
341 IN UINT16 Value,
343 );
344
373UINT16
374EFIAPI
376 IN UINTN SmBusAddress,
377 IN UINT16 Value,
379 );
380
412UINTN
413EFIAPI
415 IN UINTN SmBusAddress,
416 OUT VOID *Buffer,
418 );
419
448UINTN
449EFIAPI
451 IN UINTN SmBusAddress,
452 OUT VOID *Buffer,
454 );
455
487UINTN
488EFIAPI
490 IN UINTN SmBusAddress,
491 IN VOID *WriteBuffer,
492 OUT VOID *ReadBuffer,
494 );
495
496
497#endif
UINT64 UINTN
Definition ProcessorBind.h:118
#define EFIAPI
Definition ProcessorBind.h:172
#define IN
Definition Base.h:347
UINTN RETURN_STATUS
Definition Base.h:965
#define OUT
Definition Base.h:352
#define OPTIONAL
Definition Base.h:358
UINT16 EFIAPI SmBusReadDataWord(IN UINTN SmBusAddress, OUT RETURN_STATUS *Status OPTIONAL)
UINT8 EFIAPI SmBusWriteDataByte(IN UINTN SmBusAddress, IN UINT8 Value, OUT RETURN_STATUS *Status OPTIONAL)
UINTN EFIAPI SmBusWriteBlock(IN UINTN SmBusAddress, OUT VOID *Buffer, OUT RETURN_STATUS *Status OPTIONAL)
UINT16 EFIAPI SmBusProcessCall(IN UINTN SmBusAddress, IN UINT16 Value, OUT RETURN_STATUS *Status OPTIONAL)
VOID EFIAPI SmBusQuickWrite(IN UINTN SmBusAddress, OUT RETURN_STATUS *Status OPTIONAL)
UINTN EFIAPI SmBusReadBlock(IN UINTN SmBusAddress, OUT VOID *Buffer, OUT RETURN_STATUS *Status OPTIONAL)
UINT8 EFIAPI SmBusReceiveByte(IN UINTN SmBusAddress, OUT RETURN_STATUS *Status OPTIONAL)
VOID EFIAPI SmBusQuickRead(IN UINTN SmBusAddress, OUT RETURN_STATUS *Status OPTIONAL)
UINT16 EFIAPI SmBusWriteDataWord(IN UINTN SmBusAddress, IN UINT16 Value, OUT RETURN_STATUS *Status OPTIONAL)
UINTN EFIAPI SmBusBlockProcessCall(IN UINTN SmBusAddress, IN VOID *WriteBuffer, OUT VOID *ReadBuffer, OUT RETURN_STATUS *Status OPTIONAL)
UINT8 EFIAPI SmBusSendByte(IN UINTN SmBusAddress, IN UINT8 Value, OUT RETURN_STATUS *Status OPTIONAL)
UINT8 EFIAPI SmBusReadDataByte(IN UINTN SmBusAddress, OUT RETURN_STATUS *Status OPTIONAL)
#define VOID
Definition acefi.h:190
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS Status
Definition acpixf.h:1303
unsigned short UINT16
Definition actypes.h:237
unsigned char UINT8
Definition actypes.h:236