ReactOS  0.4.15-dev-489-g75a0787
smbus.h File Reference

Go to the source code of this file.

Classes

struct  _SMB_REQUEST
 
struct  _SMB_REGISTER_ALARM
 
struct  _SMB_CLASS
 

Macros

#define SMBCLASSAPI   DECLSPEC_IMPORT
 
#define SMB_BUS_REQUEST   CTL_CODE(FILE_DEVICE_UNKNOWN, 0, METHOD_NEITHER, FILE_ANY_ACCESS)
 
#define SMB_DEREGISTER_ALARM_NOTIFY   CTL_CODE(FILE_DEVICE_UNKNOWN, 2, METHOD_NEITHER, FILE_ANY_ACCESS)
 
#define SMB_REGISTER_ALARM_NOTIFY   CTL_CODE(FILE_DEVICE_UNKNOWN, 1, METHOD_NEITHER, FILE_ANY_ACCESS)
 
#define SMB_MAX_DATA_SIZE   32
 
#define SMB_STATUS_OK   0x00
 
#define SMB_UNKNOWN_FAILURE   0x07
 
#define SMB_ADDRESS_NOT_ACKNOWLEDGED   0x10
 
#define SMB_DEVICE_ERROR   0x11
 
#define SMB_COMMAND_ACCESS_DENIED   0x12
 
#define SMB_UNKNOWN_ERROR   0x13
 
#define SMB_DEVICE_ACCESS_DENIED   0x17
 
#define SMB_TIMEOUT   0x18
 
#define SMB_UNSUPPORTED_PROTOCOL   0x19
 
#define SMB_BUS_BUSY   0x1A
 
#define SMB_WRITE_QUICK   0x00
 
#define SMB_READ_QUICK   0x01
 
#define SMB_SEND_BYTE   0x02
 
#define SMB_RECEIVE_BYTE   0x03
 
#define SMB_WRITE_BYTE   0x04
 
#define SMB_READ_BYTE   0x05
 
#define SMB_WRITE_WORD   0x06
 
#define SMB_READ_WORD   0x07
 
#define SMB_WRITE_BLOCK   0x08
 
#define SMB_READ_BLOCK   0x09
 
#define SMB_PROCESS_CALL   0x0A
 
#define SMB_MAXIMUM_PROTOCOL   0x0A
 
#define SMB_CLASS_MAJOR_VERSION   0x0001
 
#define SMB_CLASS_MINOR_VERSION   0x0000
 

Typedefs

typedef struct _SMB_REQUEST SMB_REQUEST
 
typedef struct _SMB_REQUESTPSMB_REQUEST
 
typedef VOID(NTAPISMB_ALARM_NOTIFY) (PVOID Context, UCHAR Address, USHORT Data)
 
typedef struct _SMB_REGISTER_ALARM SMB_REGISTER_ALARM
 
typedef struct _SMB_REGISTER_ALARMPSMB_REGISTER_ALARM
 
typedef NTSTATUS(NTAPISMB_RESET_DEVICE) (IN struct _SMB_CLASS *SmbClass, IN PVOID SmbMiniport)
 
typedef VOID(NTAPISMB_START_IO) (IN struct _SMB_CLASS *SmbClass, IN PVOID SmbMiniport)
 
typedef NTSTATUS(NTAPISMB_STOP_DEVICE) (IN struct _SMB_CLASS *SmbClass, IN PVOID SmbMiniport)
 
typedef struct _SMB_CLASS SMB_CLASS
 
typedef struct _SMB_CLASSPSMB_CLASS
 
typedef NTSTATUS(NTAPIPSMB_INITIALIZE_MINIPORT) (IN PSMB_CLASS SmbClass, IN PVOID MiniportExtension, IN PVOID MiniportContext)
 

Functions

SMBCLASSAPI VOID NTAPI SmbClassAlarm (IN PSMB_CLASS SmbClass, IN UCHAR Address, IN USHORT Data)
 
SMBCLASSAPI VOID NTAPI SmbClassCompleteRequest (IN PSMB_CLASS SmbClass)
 
SMBCLASSAPI NTSTATUS NTAPI SmbClassCreateFdo (IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PDO, IN ULONG MiniportExtensionSize, IN PSMB_INITIALIZE_MINIPORT MiniportInitialize, IN PVOID MiniportContext, OUT PDEVICE_OBJECT *FDO)
 
SMBCLASSAPI NTSTATUS NTAPI SmbClassInitializeDevice (IN ULONG MajorVersion, IN ULONG MinorVersion, IN PDRIVER_OBJECT DriverObject)
 
SMBCLASSAPI VOID NTAPI SmbClassLockDevice (IN PSMB_CLASS SmbClass)
 
SMBCLASSAPI VOID NTAPI SmbClassUnlockDevice (IN PSMB_CLASS SmbClass)
 

Macro Definition Documentation

◆ SMB_ADDRESS_NOT_ACKNOWLEDGED

#define SMB_ADDRESS_NOT_ACKNOWLEDGED   0x10

Definition at line 53 of file smbus.h.

◆ SMB_BUS_BUSY

#define SMB_BUS_BUSY   0x1A

Definition at line 60 of file smbus.h.

◆ SMB_BUS_REQUEST

Definition at line 36 of file smbus.h.

◆ SMB_CLASS_MAJOR_VERSION

#define SMB_CLASS_MAJOR_VERSION   0x0001

Definition at line 99 of file smbus.h.

◆ SMB_CLASS_MINOR_VERSION

#define SMB_CLASS_MINOR_VERSION   0x0000

Definition at line 100 of file smbus.h.

◆ SMB_COMMAND_ACCESS_DENIED

#define SMB_COMMAND_ACCESS_DENIED   0x12

Definition at line 55 of file smbus.h.

◆ SMB_DEREGISTER_ALARM_NOTIFY

#define SMB_DEREGISTER_ALARM_NOTIFY   CTL_CODE(FILE_DEVICE_UNKNOWN, 2, METHOD_NEITHER, FILE_ANY_ACCESS)

Definition at line 39 of file smbus.h.

◆ SMB_DEVICE_ACCESS_DENIED

#define SMB_DEVICE_ACCESS_DENIED   0x17

Definition at line 57 of file smbus.h.

◆ SMB_DEVICE_ERROR

#define SMB_DEVICE_ERROR   0x11

Definition at line 54 of file smbus.h.

◆ SMB_MAX_DATA_SIZE

#define SMB_MAX_DATA_SIZE   32

Definition at line 48 of file smbus.h.

◆ SMB_MAXIMUM_PROTOCOL

#define SMB_MAXIMUM_PROTOCOL   0x0A

Definition at line 74 of file smbus.h.

◆ SMB_PROCESS_CALL

#define SMB_PROCESS_CALL   0x0A

Definition at line 73 of file smbus.h.

◆ SMB_READ_BLOCK

#define SMB_READ_BLOCK   0x09

Definition at line 72 of file smbus.h.

◆ SMB_READ_BYTE

#define SMB_READ_BYTE   0x05

Definition at line 68 of file smbus.h.

◆ SMB_READ_QUICK

#define SMB_READ_QUICK   0x01

Definition at line 64 of file smbus.h.

◆ SMB_READ_WORD

#define SMB_READ_WORD   0x07

Definition at line 70 of file smbus.h.

◆ SMB_RECEIVE_BYTE

#define SMB_RECEIVE_BYTE   0x03

Definition at line 66 of file smbus.h.

◆ SMB_REGISTER_ALARM_NOTIFY

#define SMB_REGISTER_ALARM_NOTIFY   CTL_CODE(FILE_DEVICE_UNKNOWN, 1, METHOD_NEITHER, FILE_ANY_ACCESS)

Definition at line 42 of file smbus.h.

◆ SMB_SEND_BYTE

#define SMB_SEND_BYTE   0x02

Definition at line 65 of file smbus.h.

◆ SMB_STATUS_OK

#define SMB_STATUS_OK   0x00

Definition at line 51 of file smbus.h.

◆ SMB_TIMEOUT

#define SMB_TIMEOUT   0x18

Definition at line 58 of file smbus.h.

◆ SMB_UNKNOWN_ERROR

#define SMB_UNKNOWN_ERROR   0x13

Definition at line 56 of file smbus.h.

◆ SMB_UNKNOWN_FAILURE

#define SMB_UNKNOWN_FAILURE   0x07

Definition at line 52 of file smbus.h.

◆ SMB_UNSUPPORTED_PROTOCOL

#define SMB_UNSUPPORTED_PROTOCOL   0x19

Definition at line 59 of file smbus.h.

◆ SMB_WRITE_BLOCK

#define SMB_WRITE_BLOCK   0x08

Definition at line 71 of file smbus.h.

◆ SMB_WRITE_BYTE

#define SMB_WRITE_BYTE   0x04

Definition at line 67 of file smbus.h.

◆ SMB_WRITE_QUICK

#define SMB_WRITE_QUICK   0x00

Definition at line 63 of file smbus.h.

◆ SMB_WRITE_WORD

#define SMB_WRITE_WORD   0x06

Definition at line 69 of file smbus.h.

◆ SMBCLASSAPI

#define SMBCLASSAPI   DECLSPEC_IMPORT

Definition at line 31 of file smbus.h.

Typedef Documentation

◆ PSMB_CLASS

◆ PSMB_INITIALIZE_MINIPORT

typedef NTSTATUS(NTAPI * PSMB_INITIALIZE_MINIPORT) (IN PSMB_CLASS SmbClass, IN PVOID MiniportExtension, IN PVOID MiniportContext)

Definition at line 146 of file smbus.h.

◆ PSMB_REGISTER_ALARM

◆ PSMB_REQUEST

◆ SMB_ALARM_NOTIFY

typedef VOID(NTAPI * SMB_ALARM_NOTIFY) (PVOID Context, UCHAR Address, USHORT Data)

Definition at line 86 of file smbus.h.

◆ SMB_CLASS

◆ SMB_REGISTER_ALARM

◆ SMB_REQUEST

◆ SMB_RESET_DEVICE

typedef NTSTATUS(NTAPI * SMB_RESET_DEVICE) (IN struct _SMB_CLASS *SmbClass, IN PVOID SmbMiniport)

Definition at line 103 of file smbus.h.

◆ SMB_START_IO

typedef VOID(NTAPI * SMB_START_IO) (IN struct _SMB_CLASS *SmbClass, IN PVOID SmbMiniport)

Definition at line 108 of file smbus.h.

◆ SMB_STOP_DEVICE

typedef NTSTATUS(NTAPI * SMB_STOP_DEVICE) (IN struct _SMB_CLASS *SmbClass, IN PVOID SmbMiniport)

Definition at line 113 of file smbus.h.

Function Documentation

◆ SmbClassAlarm()

SMBCLASSAPI VOID NTAPI SmbClassAlarm ( IN PSMB_CLASS  SmbClass,
IN UCHAR  Address,
IN USHORT  Data 
)

◆ SmbClassCompleteRequest()

SMBCLASSAPI VOID NTAPI SmbClassCompleteRequest ( IN PSMB_CLASS  SmbClass)

◆ SmbClassCreateFdo()

SMBCLASSAPI NTSTATUS NTAPI SmbClassCreateFdo ( IN PDRIVER_OBJECT  DriverObject,
IN PDEVICE_OBJECT  PDO,
IN ULONG  MiniportExtensionSize,
IN PSMB_INITIALIZE_MINIPORT  MiniportInitialize,
IN PVOID  MiniportContext,
OUT PDEVICE_OBJECT FDO 
)

◆ SmbClassInitializeDevice()

SMBCLASSAPI NTSTATUS NTAPI SmbClassInitializeDevice ( IN ULONG  MajorVersion,
IN ULONG  MinorVersion,
IN PDRIVER_OBJECT  DriverObject 
)

◆ SmbClassLockDevice()

SMBCLASSAPI VOID NTAPI SmbClassLockDevice ( IN PSMB_CLASS  SmbClass)

◆ SmbClassUnlockDevice()

SMBCLASSAPI VOID NTAPI SmbClassUnlockDevice ( IN PSMB_CLASS  SmbClass)