Implementing CEDDK.dll
CEDDK.dll exposes functions typically used by drivers for handling bus address translations, allocating and mapping device memory, setting up DMA buffers, and so on. You can implement CEDDK.dll to support any bus that your platform contains.
While you are completing your OAL, you implement CEDDK.dll. To implement CEDDK.dll, you can use the default files, or you can create your own to support your platform. Many platforms only implement a unique Ddk_bus.c file and link to the other libraries built from the public tree.
For more information about the files included in CEDDK.dll, see %_WINCEROOT%\Public\Common\DDK\Inc\CEDDK.h.
The following table shows the functions contained in %_WINCEROOT%\Public\Common\Oak\Drivers\CEDDK\Ddk_dma.c.
Function | Description |
---|---|
HalAllocateCommonBuffer | Allocates and locks-down memory and maps it so that it is simultaneously accessible from both the processor and a device for DMA operations. |
HalFreeCommonBuffer | Frees a common buffer allocated by HalAllocateCommonBuffer, along with all resources the buffer uses. |
The following table shows the functions contained in %_WINCEROOT%\Public\Common\Oak\Drivers\CEDDK\Ddk_bus.c.
Function | Description |
---|---|
HalGetBusData | Retrieves configuration information about a specified slot or address on a particular I/O bus. |
HalGetBusDataByOffset | Retrieves information, starting at the specified offset, about a specified slot or address on a particular I/O bus. |
HalSetBusData | Sets bus-configuration data for a specified slot or address on a particular bus. |
HalSetBusDataByOffset | Sets bus-configuration data for a device on a dynamically configurable I/O bus with a published, standard interface. |
HalTranslateBusAddress | Translates a bus-specific address into the corresponding system logical address. |
HalTranslateSystemAddress | Translates a system physical address to a bus-relative, logical address, which this function hands off to a bus controller, for example, a DMA bus controller. |
The following table shows the functions implemented in %_WINCEROOT%\Public\Common\Oak\Drivers\CEDDK\Ddk_io.c.
Function | Description |
---|---|
READ_PORT_BUFFER_UCHAR | Reads a number of bytes from the specified port I/O address into a buffer. |
READ_PORT_BUFFER_ULONG | Reads a number of ULONG values from the specified port address into a buffer. |
READ_PORT_BUFFER_USHORT | Reads a number of USHORT values from the specified port address into a buffer. |
READ_PORT_UCHAR | Reads a byte from the specified port address. |
READ_PORT_ULONG | Reads a ULONG value from the specified port address. |
READ_PORT_USHORT | Reads a USHORT value from the specified port address. |
READ_REGISTER_BUFFER_UCHAR | Reads a number of bytes from the specified register memory address into a buffer. |
READ_REGISTER_BUFFER_ULONG | Reads a number of ULONG values from the specified register address into a buffer. |
READ_REGISTER_BUFFER_USHORT | Reads a number of USHORT values from the specified register address into a buffer. |
READ_REGISTER_UCHAR | Reads a byte from the specified register address. |
READ_REGISTER_ULONG | Reads a ULONG value from the specified register address. |
READ_REGISTER_USHORT | Reads a USHORT value from the specified register address. |
WRITE_PORT_BUFFER_UCHAR | Writes a number of bytes from a buffer to the specified port. |
WRITE_PORT_BUFFER_ULONG | Writes a number of ULONG values from a buffer to the specified port address. |
WRITE_PORT_BUFFER_USHORT | Writes a number of USHORT values from a buffer to the specified port address. |
WRITE_PORT_UCHAR | Writes a byte to the specified port address. |
WRITE_PORT_ULONG | Writes a ULONG value to the specified port address. |
WRITE_PORT_USHORT | Writes a USHORT value to the specified port address. |
WRITE_REGISTER_BUFFER_UCHAR | Writes a number of bytes from a buffer to the specified register. |
WRITE_REGISTER_BUFFER_ULONG | Writes a number of ULONG values from a buffer to the specified register. |
WRITE_REGISTER_BUFFER_USHORT | Writes a number of USHORT values from a buffer to the specified register. |
WRITE_REGISTER_UCHAR | Writes a byte to the specified address. |
WRITE_REGISTER_ULONG | Writes a ULONG value to the specified address. |
WRITE_REGISTER_USHORT | Writes a USHORT value to the specified address. |
The following table shows the functions contained in %_WINCEROOT%\Public\Common\Oak\Drivers\CEDDK\Ddk_map.c.
Function | Description |
---|---|
MmMapIoSpace | Maps the specified physical address range to nonpaged process-dependent address space, providing a directly mapped virtual address to the device. |
MmUnmapIoSpace | Unmaps a specified address range previously mapped by MmMapIoSpace. |
TransBusAddrToStatic | Translates a bus-relative address to a system or physical address, then it creates a static, process-independent, virtual address mapping for that location. |
TransBusAddrToVirtual | Translates a bus-relative address to a system virtual address. |
See Also
Completing an OAL | Driver Development
Last updated on Wednesday, April 13, 2005
© 2005 Microsoft Corporation. All rights reserved.