简体   繁体   English

如何将MmMapIoSpace从Windows CE 5.0移植到6.0或XP Embedded?

[英]How can can I port MmMapIoSpace from Windows CE 5.0 to 6.0 or XP Embedded?

We currently have a custom board with a microcontroller on it that speaks to a PC/104 windows CE 5.0 board through a dual port ram. 我们目前有一个定制板,上面有一个微控制器,通过双端口柱塞与PC / 104 windows CE 5.0板对话。 Currently we use MmMapIoSpace to map the dual port ram in windows CE so we can read and write directly to it. 目前我们使用MmMapIoSpace在windows CE中映射双端口ram,以便我们可以直接读取和写入它。 We are looking to join the modern era of windows CE 6.0 or even windows XP embedded. 我们正在寻求加入Windows CE 6.0甚至Windows XP嵌入式的现代时代。 A big concern of ours is that according to Microsoft's documentation MmMapIoSpace in windows CE 6.0 and in Windows XP Embedded are now driver level functions not accessible to in a user space program which is how we have been using it. 我们的一个大问题是根据微软的文档,Windows CE 6.0和Windows XP Embedded中的MmMapIoSpace现在是用户空间程序无法访问的驱动程序级功能,这就是我们使用它的方式。

Before we go out and buy a lot of hardware and possibly a copy of platform builder we have been trying to figure out if it will actually be a problem and if so what we can do about it. 在我们出去购买大量硬件和可能的平台构建器副本之前,我们一直试图弄清楚它是否真的会成为一个问题,如果是这样我们可以做些什么呢。 None of us have experience writing windows drivers so that seems like a large undertaking however we would literally be writing a driver just to handle this one function. 我们没有人有编写Windows驱动程序的经验,所以这似乎是一项艰巨的任务,但我们只是为了处理这一功能而编写驱动程序。

Is it simple to port MmMapIoSpace from Windows CE 5.0 to Windows CE 6.0 or Windows XP Embedded . 将MmMapIoSpace从Windows CE 5.0移植到Windows CE 6.0Windows XP Embedded是否很简单。 (links to Microsoft documentation). (链接到Microsoft文档)。

Thanks! 谢谢!

MmMapIoSpace really should only be used by a driver in the first place, so earlier CE versions were simply a bit promiscuous in letting you use it from an app. MmMapIoSpace实际上应该只由驱动程序使用,所以早期的CE版本只是让你在应用程序中使用它有点混乱。 I'd create a simple stream interface driver that interfaces with the RAM using MmMapIoSpace , and then call that driver from you app either using ReadFile or DeviceIoControl . 我创建了一个简单的流接口驱动程序,使用MmMapIoSpace与RAM MmMapIoSpace ,然后使用ReadFileDeviceIoControl从您的应用程序调用该驱动程序。

Stream interface drivers in Windows CE are very simple and straightforward. Windows CE中的流接口驱动程序非常简单明了。 It's just a DLL with some specific entry points defined, and then registry entries to tell device.exe to load it. 它只是一个定义了一些特定入口点的DLL,然后是注册表项,告诉device.exe加载它。 MSDN has lots of examples, but if you want even easier, there's a wizard on Codeplex that can generate the files for you too. MSDN有很多例子,但如果你想要更容易, Codeplex上一个向导也可以为你生成文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM