Share via


HWOBJ (Compact 2013)

3/26/2014

This structure describes the characteristics of serial devices.

Syntax

#ifdef USE_NEW_SERIAL_MODEL
typedef struct __HWOBJ {
  ULONG BindFlags;
  DWORD dwIntID;
  PHW_VTBL pFuncTbl;
} HWOBJ, *PHWOBJ;
#else
typedef struct __HWOBJ {
  PVOID pDeviceParent;
  ULONG BindFlags;
  DWORD dwIntID;
  PVOID pReserved;
  PHW_VTBL pFuncTbl;
} HWOBJ, *PHWOBJ;
#endif

Members

  • pDeviceParent
    Pointer back to the DEVICE_LIST structure, which refers to the HWOBJ structure in its DeviceArray member.
  • BindFlags
    One of the following values, which control how the upper layer behaves with respect to the driver's interrupt service thread (IST).

    The following table shows the possible values.

    Value

    Description

    THREAD_IN_PDD

    The upper layer does nothing; interrupt handling is done in the lower layer.

    THREAD_AT_INIT

    The upper layer starts the interrupt service thread (IST) when the driver is initialized.

    THREAD_AT_OPEN

    The upper layer starts the IST when the driver opens.

  • dwIntID
    Interrupt identifier.
  • pReserved
    Not used; set to NULL.
  • pFuncTbl
    Pointer to an HW_VTBL structure that contains a table of function pointers for each of the serial device functions, such as HWOpen, HWClearBreak, HWSetDTR, and so on. HW_VTBL and the full list of functions are declared in the Serhw.h header file.

Remarks

Define USE_NEW_SERIAL_MODEL to use the updated serial driver model.

This structure enables one serial driver upper layer to use multiple lower layers for hardware serial ports that have different physical behavior, but identical logical behavior, such as a USB serial port or a standard 9-pin serial port.

Requirements

Header

serhw.h

See Also

Reference

Serial Port Driver Structures
DEVICE_LIST
HW_VTBL
HWOpen
HWClearBreak
HWSetDTR