次の方法で共有


NKCreateStaticMapping (Compact 2013)

10/16/2014

This function creates a static virtual memory address that maps to a physical address. This function can be called from the OAL but not from the user code.

Syntax

LPVOID NKCreateStaticMapping(
  DWORD dwPhysBase,
  DWORD dwSize
);

Parameters

  • dwPhysBase
    [in] Starting physical address to map.

    The address passed in must be shifted to the right by eight bit positions.

  • dwSize
    [in] Number of bytes to map, starting from dwPhysBase.

Return Value

If the memory can be mapped, a valid static virtual memory pointer is returned.

The virtual memory address that is returned represents an uncached memory region.

Remarks

This function allows the OAL to map a physical address to a static virtual memory address, which can then be used in an ISR. An ISR can only access a static mapped virtual address. In previous releases, a static mapping could only be created at boot time and not created dynamically.

After the static mapping is created, it is active until the device reboots, or until NKDeleteStaticMapping is called.

This function can also be called from the OAL to create a static mapping.

To use this function, set WINCEOEM = 1.

Link Library: Coredll.lib.

Requirements

Header

pkfuncs.h

Library

coredll.lib

See Also

Reference

Kernel Functions Available to the OAL