Windows Mobile驱动开发.pptVIP

  • 26
  • 0
  • 约1.1万字
  • 约 62页
  • 2017-09-22 发布于广东
  • 举报
加载流接口驱动程 在启动时进行。在基于WINDOWS CE的平台启动时,就启动设备管理程序。设备管理程序读取 HKEY_LOCAL_MACHINE\Drivers\BUILTIN键的内容并加载已列出的流接口驱动程序、例如.在许多基于WINDOWS CE的平台上,设备管理程序通过这个机制加载内部串行口(Serialdll)的驱动程序 在设备管理程序自动检测外围设备与基于 Wndows CE平台的连接时进行的. 设备管理程序不能识别设备时,应用程序自己加载: 启动应用程序, 检测驱动是否加载, 调用RegisterDevice函数来加载驱动并锁入内存 应用程序进行正常操作. 卸载流接口驱动 设备管理程序卸载 用户程序自行卸载: DeRegisterDevice函数从文件系统卸载设备文件,通知FreeLibrary函数卸载DLL 流接口驱动程序入口点 XXX_Close XXX_Deinit XXX_Init XXX_IOControl XXX_Open XXX_PowerDown XXX_PowerUp XXX_Read XXX_Seek XX_Write 单访问和多访问 多个应用可以同时访问驱动 多访问对XXX_Open的调用返回不同的hOpenContext值.单访问返回相同值.以后的调用使用这个值. 串行设备驱动设计 创建一个流接口驱动程序 在应用程序中直接对串口读写,并处理数据 串行设备驱动的考虑因素 单点或多点访问:若要支持多个应用的同时访问,使用流接口实现,简化用户级程序设计; 数据流的复杂性:复杂的处理需要相当的处理。最好使用流接口方式。 数据速率:高速的数据处理,可能流接口驱动没有足够的处理时间,可能使用用户程序处理比较好。 安装流接口驱动程序 安装程序必须执行下列步骤: 1. 与基于Windows CE的平合连接.或检测连接已存在。 2.把流接口驱动程序DLL拷贝到平台的\WINDOWS目录下。 3.如果需要的话 为驱动程序建立注册键和注册值 流接口驱动程序例子 Pager Card Illustrates a device driver for the Motorola NewsCard pager Modem Card Illustrates a device driver for a PC Card modem RAM Card Illustrates a device driver for a Static RAM PC Card PC Card Test Illustrates a device driver for testing PC Cards Serial Illustrates a device driver for devices that connect to a serial port Touch Screen Illustrates a device driver that interacts with the screen NDIS网络驱动程序 提供一组抽象层,用于把网络驱动和协议栈或网络适配器相连. 网络驱动程序模型 CE支持的NDIS功能 NDIS4.0的一个子集 以太网和IrDA介质类型 标准的小端口卡驱动程序 中性小端口卡驱动程序的一个子集.] Plug and Play loading of miniport drivers for PC Card–based NICs CE不支持的NDIS功能 单片或全功能的NDIS 直接内存存取(DMA) 连续的物理内存分配 既提供小端口给已有的协议栈,又提供协议接口给其它应用的中性小端口卡驱动程序 通过NDIS的广域网互联 PC卡属性空间 多包传送 Windows CE Miniport Driver largely compatible with Windows NT miniport driver for Windows CE is compiled as a dynamic-link library (DLL) that exports the DriverEntry function DriverEntry typically performs any general or platform-specific initializations. It also registers the miniport driver with the NDIS system by calling the NdisMRegisterMiniport function. CE does not support the Common Network .inf file format ND

文档评论(0)

1亿VIP精品文档

相关文档