OEMKitlStartup (Compact 7)

3/12/2014

This function is implemented by the OEM as the platform entry point for the kernel independent transport layer (KITL).

Syntax

BOOL OEMKitlStartup(void);

Return Value

Returns true if the function is successful; otherwise, false.

Remarks

This function is the platform entry point for KITL; in previous versions of Windows Embedded Compact, this function was named OALKitlStart.

OEMKitlStartup is called when the KITLIoctl function is called in the kernel with IOCTL_KITL_STARTUP as a parameter. The other two functions that interact with the kernel, OEMKitlInit and OEMKitlIoctl, are provided for you in the common KITL library (OAL_Kitl.lib). You do not have to fill out a KITLTRANSPORT structure or implement KITLTRANSPORT functions that are specific to the Ethernet, serial, or USB transport but not specific to the BSP. An example of such a function is the KitlEthEncode function, which wraps an outgoing frame in an Ethernet debug header. This function is provided in OAL_kitl.lib.

For an example implementation of this function, see %_WINCEROOT%\Platform\BSPTemplate\tutorial\3\kitl\init.c.

You must implement the OEMKitlStartup function to perform the following tasks:

  • Read any boot arguments.

  • Determine which KITL transport to use (Ethernet, serial, or USB).

  • Initialize device hardware such as the bus.

  • Set any options necessary for the kernel debugger.

  • Create OAL_KITL_ARGS and OAL_KITL_DEVICE structures as defined in %_WINCEROOT\Platform\Common\Src\Inc\OAL_kitl.h.

  • You must intialize the appropriate structure for the transport option, Ethernet, serial, or USB, that you implement. The structure contains function pointers to the KITL driver functions that are necessary to support the common KITL library (OAL_Kitl.lib). The following table lists the transport options, the structure to initialize, and locations of the function prototypes and implementations.

    • Transport
    • Structure to Initialize
    • Locations of Functions under %_WINCEROOT%\Platform\Common\Src\
    • Ethernet
    • OAL_KITL_ETH_DRIVER
    • Inc\OAL_ethdrv.h
    • Common\Ethdrv\
    • Serial
    • OAL_KITL_SERIAL_DRIVER
    • Inc\OAL_BLserial.h
    • Common\
    • USB serial
    • OAL_KITL_SERIAL_DRIVER
    • Inc\USBdbgSer.h
    • Common\KitlDrv\USBdbg\USBdbgSerMdd\Serifc.c
    • USB Ethernet
    • OAL_KITL_ETH_DRIVER
    • Inc\USBdbgEth.h
    • Common\KitlDrv\USBdbg\USBdbgEthMdd\Serifc.c
    • USB RNDIS
    • OAL_KITL_ETH_DRIVER
    • Inc\USBdbgRNDIS.h
    • Common\KitlDrv\USBdbg\USBdbgRNDISMdd\RNDISmin.c.

    Note that for Ethernet, OAL_Kitl.lib provides KitlEthEncode, KitlEthDecode, KitlEthGetFrameHdrSize, KitlEthGetDevCfg, and KitlEthSetHostCfg for you. For serial, OAL_Kitl.lib provides SerialEncode, SerialDecode, SerialGetDevCfg, and SerialSetHostCfg for you.

  • Last, before the OEMKitlStartup function exits, call the OALKitlInit function, which initializes the KITL subsystem.

See Also

Reference

KITL Functions for Any Driver