다음을 통해 공유


OALKitlInit (Windows Embedded CE 6.0)

1/5/2010

This function initializes the KITL subsystem*.* It is called from the OEMKitlStartup function.

Syntax

BOOL OALKitlInit(
  LPCSTR deviceId,
  OAL_KITL_ARGS *pArgs,
  OAL_KITL_DEVICE *pDevice
);

Parameters

  • deviceId
    [in] User-readable device or driver name.

Return Value

TRUE indicates success.

FALSE indicates failure.

Remarks

The pArgs parameter can be used to set KITL to use active or passive mode, and interrupt or polled transport.

In active mode, the device boots the OEM Adaptation Layer (OAL), which calls KitlIoctl with IOCTL_KITL_STARTUP to initialize KITL, and initializes all default KITL clients like the kernel debugger. The kernel then calls the OEMKitlStartup function and registers all default clients that are used by the system. Active KITL is the default.

In passive mode, KITL is initialized but not connected until an exception occurs. To initialize KITL in passive mode, implement the OEMKitlStartup function so that it calls OALKitlInit with OAL_KITL_FLAGS_PASSIVE in the flags member of the pArgs parameter. The OEMKitlStartup function may do this in response to the KTS_PASSIVE_MODE flag set by Platform Builder, or to override the Platform Builder flag.

Interrupt transport is faster than polled transport. It is useful for a completed KITL driver. Polled transport is less complicated than interrupt transport, but slower. It is useful for developing the KITL driver. When an interrupt model is in place, the kernel calls PFN_ENABLEINT to enable or disable the KITL transport interrupt. The interrupt is enabled when KITL is started, on a system resume, and when the kernel is started. Interrupt transport is the default.

To set up polling, the OEMKitlStartup function must call OALKitlInit with OAL_KITL_FLAGS_POLL in the flags member of the pArgs parameter. This value may be passed to the KITL initialization code by the boot loader, or it may be set in OEMKitlStartup as an override. If you are using the common KITL library (OAL_Kitl.lib), you do not need to do anything else; the rest is handled in the OALKitlEthInit or OALKitlSerialInit function. When a polling model is in place, the kernel will not call TransportEnableInt to enable or disable the KITL transport interrupt. Rather, KITL actively calls PFN_RECVFRAME in a polling manner to retrieve data from the development computer.

Requirements

Header oal_kitl.h
Library Developer Implemented
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

KITL Functions for Any Driver
KITL Functions for Production-Quality OAL