CN104102512B - Embedded platform IO equipment dynamic identification system based on external interruption and IO equipment dynamic identification method of system - Google Patents
Embedded platform IO equipment dynamic identification system based on external interruption and IO equipment dynamic identification method of system Download PDFInfo
- Publication number
- CN104102512B CN104102512B CN201410340191.6A CN201410340191A CN104102512B CN 104102512 B CN104102512 B CN 104102512B CN 201410340191 A CN201410340191 A CN 201410340191A CN 104102512 B CN104102512 B CN 104102512B
- Authority
- CN
- China
- Prior art keywords
- interface
- interrupt signal
- identification
- unit
- signal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Stored Programmes (AREA)
- Bus Control (AREA)
Abstract
基于外部中断的嵌入式平台IO设备动态识别系统及该系统的IO设备动态识别方法,涉及嵌入式平台的IO设备动态识别技术。它为了解决现有嵌入式平台的IO设备动态识别技术通用性不高的问题。当有IO设备插入对应的接口子板上时,接口子板产生相应的识别信号,该识别信号发送至识别模块后,识别模块产生相应的中断信号,处理器根据该中断信号判断IO设备的种类,并加载相应的驱动程序,使主机系统能够与IO设备进行通信。本发明不需要对设备增加电子数据表格、不需要添加识别所用的存储器件、不需要定制设备,更不需要改造设备的接口物理结构,且能够识别多种IO设备,提高了系统的通用性。本发明适用于嵌入式平台的IO设备动态识别。
An embedded platform IO device dynamic identification system based on external interrupts and an IO device dynamic identification method of the system relate to the embedded platform IO device dynamic identification technology. It aims to solve the problem of low versatility of the IO device dynamic identification technology of the existing embedded platform. When an IO device is inserted into the corresponding interface sub-board, the interface sub-board generates a corresponding identification signal, and after the identification signal is sent to the identification module, the identification module generates a corresponding interrupt signal, and the processor judges the type of the IO device according to the interrupt signal , and load the corresponding driver to enable the host system to communicate with the IO device. The invention does not need to add an electronic data table to the equipment, does not need to add a storage device for identification, does not need to customize the equipment, and does not need to modify the interface physical structure of the equipment, and can identify various IO equipment, thereby improving the generality of the system. The invention is applicable to the dynamic identification of IO equipment of the embedded platform.
Description
技术领域technical field
本发明涉及嵌入式平台IO设备动态识别技术。The invention relates to a dynamic identification technology of an embedded platform IO device.
背景技术Background technique
所谓动态识别是指当IO设备接入目标系统时,CPU能够自动获得插入设备的信息(如接口的类型、相关参数等)并且正确配置或安装驱动程序以达到正常通信的目的。同时,当IO设备拔出后,CPU同样也能得到通知,并卸载驱动或释放相关资源,以减少资源开销。The so-called dynamic identification means that when the IO device is connected to the target system, the CPU can automatically obtain the information of the inserted device (such as the type of interface, related parameters, etc.) and correctly configure or install the driver to achieve the purpose of normal communication. At the same time, when the IO device is pulled out, the CPU can also be notified, and unload the driver or release related resources to reduce resource overhead.
现有的CPU只支持少部分设备能够支持动态识别功能(如USB设备),对其他设备(如RS232接口)并不能做到动态识别。目前的解决方案,主要集中在对设备增加电子数据表格,不可避免地添加识别所用的存储器件、要定制设备,甚至需要改造设备的接口物理结构,通用性不高。Existing CPUs only support a small number of devices that can support dynamic identification functions (such as USB devices), and cannot dynamically identify other devices (such as RS232 interfaces). The current solutions mainly focus on adding electronic data sheets to the equipment, inevitably adding storage devices for identification, customizing the equipment, and even modifying the physical interface structure of the equipment, which is not very versatile.
发明内容Contents of the invention
本发明的目的是为了解决现有嵌入式平台的IO设备动态识别技术通用性不高的问题,提供一种基于外部中断的嵌入式平台IO设备动态识别系统及该系统的IO设备动态识别方法。The purpose of the present invention is to provide a dynamic identification system for embedded platform IO devices based on external interrupts and a dynamic identification method for IO devices of the system in order to solve the problem of low versatility of the IO device dynamic identification technology of the existing embedded platform.
本发明所述的基于外部中断的嵌入式平台IO设备动态识别系统包括由n个驱动电路构成的接口电路驱动模块、识别模块、公共物理接口以及由n个接口子板构成的子板模块,n为大于1的正整数,n个接口子板分别对应n种IO设备,n个驱动电路分别对应n种IO设备;The embedded platform IO device dynamic identification system based on external interrupts of the present invention comprises an interface circuit drive module, an identification module, a public physical interface and a sub-board module composed of n interface sub-boards composed of n drive circuits, n is a positive integer greater than 1, n interface sub-boards correspond to n types of IO devices, and n drive circuits correspond to n types of IO devices;
每个接口子板均包括有能够产生编码信息的电路,该电路包括有用于连接标准接口的物理插槽和编码信号输出端,与公共物理接口相连接的接口子板的编码信号输出端为子板模块的识别信号输出端;Each interface sub-board includes a circuit that can generate coded information. The circuit includes a physical slot for connecting to a standard interface and a coded signal output terminal. The coded signal output terminal of the interface daughter board connected to the public physical interface is a The identification signal output terminal of the board module;
所述子板模块的识别信号输出端通过公共物理接口连接识别模块的识别信号输入端,识别模块的中断信号输出端连接嵌入式平台的处理器的中断信号输入端,该处理器依次通过接口电路驱动模块、公共物理接口以及子板模块与IO设备进行数据传输。The identification signal output end of the sub-board module is connected to the identification signal input end of the identification module through a public physical interface, and the interruption signal output end of the identification module is connected to the interruption signal input end of the processor of the embedded platform, and the processor passes through the interface circuit in turn. The driver module, the public physical interface and the sub-board module perform data transmission with the IO device.
所述的处理器内嵌入有软件实现的IO设备动态识别模块,该IO设备动态识别包括以下单元:The processor is embedded with a software-implemented IO device dynamic identification module, and the IO device dynamic identification includes the following units:
休眠单元:处理器处于休眠状态,直到接收到识别模块发来的中断信号;并在该单元运行结束之后启动中断信号判断单元;Sleeping unit: the processor is in a sleeping state until it receives an interrupt signal from the identification module; and starts the interrupt signal judging unit after the unit finishes running;
中断信号判断单元:判断识别模块发来的中断信号是否为有效的中断信号,并在判断结果为是时启动设备类型推断单元,判断结果为否时启动休眠单元;Interrupt signal judging unit: judge whether the interrupt signal sent by the identification module is an effective interrupt signal, and start the device type inference unit when the judgment result is yes, and start the sleep unit when the judgment result is no;
所述的有效的中断信号为预先定义好的中断信号;The effective interrupt signal is a predefined interrupt signal;
设备类型识别单元:根据中断信号与设备类型的映射关系推断出识别模块发来的中断信号所对应的设备类型;并在该单元运行结束之后启动接口驱动程序搜索单元;Device type identification unit: infer the device type corresponding to the interrupt signal sent by the identification module according to the mapping relationship between the interrupt signal and the device type; and start the interface driver search unit after the unit runs;
上述映射关系是预先设定好的映射关系,该映射关系中,不同的中断信号对应不同的设备类型;The above mapping relationship is a preset mapping relationship. In this mapping relationship, different interrupt signals correspond to different device types;
接口驱动程序搜索单元:在存储介质中搜索识别模块发来的中断信号所对应的接口驱动程序;并在该单元运行结束之后启动接口驱动程序加载单元;Interface driver search unit: search the storage medium for the interface driver corresponding to the interrupt signal sent by the identification module; and start the interface driver loading unit after the unit runs;
接口驱动程序加载单元:加载接口驱动程序;并在该单元运行结束之后启动配置成功信号发送单元;Interface driver loading unit: load the interface driver; and start the configuration success signal sending unit after the unit finishes running;
配置成功信号发送单元:发送配置成功信号给通信进程;并在该单元运行结束之后启动休眠单元。The configuration success signal sending unit: sends the configuration success signal to the communication process; and starts the dormant unit after the unit finishes running.
本发明所述的基于外部中断的嵌入式平台IO设备动态识别系统的IO设备动态识别方法为,所述的处理器嵌入有软件实现的IO设备动态识别过程,该过程包括以下步骤:The IO equipment dynamic identification method of the embedded platform IO equipment dynamic identification system based on external interrupt of the present invention is, described processor is embedded with the IO equipment dynamic identification process that software realizes, and this process comprises the following steps:
休眠步骤:处理器处于休眠状态,直到接收到识别模块发来的中断信号;并在该步骤结束之后执行中断信号判断步骤;Dormancy step: the processor is in a dormant state until it receives an interrupt signal from the identification module; and after the step ends, the interrupt signal judging step is executed;
中断信号判断步骤:判断识别模块发来的中断信号是否为有效的中断信号,并在判断结果为是时执行设备类型推断步骤,判断结果为否时返回执行休眠步骤;Interrupt signal judging step: judging whether the interrupt signal sent by the identification module is an effective interrupt signal, and executing the device type inference step when the judgment result is yes, and returning to the dormancy step when the judgment result is no;
所述的有效的中断信号为预先定义好的中断信号;The effective interrupt signal is a predefined interrupt signal;
设备类型识别步骤:根据中断信号与设备类型的映射关系推断出识别模块发来的中断信号所对应的设备类型;并在该步骤结束之后执行接口驱动程序搜索步骤;Device type identification step: infer the device type corresponding to the interrupt signal sent by the identification module according to the mapping relationship between the interrupt signal and the device type; and perform the interface driver search step after the step ends;
上述映射关系是预先设定好的映射关系,该映射关系中,不同的中断信号对应不同的设备类型;The above mapping relationship is a preset mapping relationship. In this mapping relationship, different interrupt signals correspond to different device types;
接口驱动程序搜索步骤:在存储介质中搜索识别模块发来的中断信号所对应的接口驱动程序;并在该步骤结束之后执行接口驱动程序加载步骤;Interface driver search step: search the storage medium for the interface driver corresponding to the interrupt signal sent by the identification module; and perform the interface driver loading step after this step ends;
接口驱动程序加载步骤:加载接口驱动程序;并在该步骤结束之后执行配置成功信号发送步骤;The interface driver loading step: loading the interface driver; and executing the configuration success signal sending step after this step ends;
配置成功信号发送步骤:发送配置成功信号给通信进程;并在该步骤结束之后返回执行休眠步骤。The step of sending a successful configuration signal: sending a successful configuration signal to the communication process; and returning to the dormant step after the step ends.
本发明所述的基于外部中断的嵌入式平台IO设备动态识别系统,通过对主机系统的硬件结构进行改进,当有IO设备插入对应的接口子板上时,接口子板产生相应的识别信号,该识别信号发送至识别模块后,识别模块产生相应的中断信号,处理器根据该中断信号判断IO设备的种类,并加载相应的驱动程序,使主机系统能够与IO设备进行通信。与现有的IO设备动态识别技术相比,本发明不需要对设备增加电子数据表格、不需要添加识别所用的存储器件、不需要定制设备,更不需要改造设备的接口物理结构,且能够识别多种IO设备,提高了系统的通用性。The embedded platform IO device dynamic identification system based on external interrupts of the present invention, by improving the hardware structure of the host system, when an IO device is inserted into the corresponding interface sub-board, the interface sub-board generates a corresponding identification signal, After the identification signal is sent to the identification module, the identification module generates a corresponding interrupt signal, and the processor judges the type of the IO device according to the interrupt signal, and loads the corresponding driver, so that the host system can communicate with the IO device. Compared with the existing IO device dynamic identification technology, the present invention does not need to add electronic data sheets to the device, does not need to add storage devices used for identification, does not need to customize the device, and does not need to modify the interface physical structure of the device, and can identify A variety of IO devices improve the versatility of the system.
上述基于外部中断的嵌入式平台IO设备动态识别系统的IO设备动态识别方法,通过对识别模块发来的中断信号进行判断,以确定IO设备的种类。该方法与现有的IO设备动态识别技术相比,不需要对设备增加电子数据表格、不需要添加识别所用的存储器件、不需要定制设备,更不需要改造设备的接口物理结构,且能够识别多种IO设备,提高了系统的通用性。The above-mentioned IO device dynamic identification method of the embedded platform IO device dynamic identification system based on external interrupt determines the type of the IO device by judging the interrupt signal sent by the identification module. Compared with the existing IO equipment dynamic identification technology, this method does not need to add electronic data sheets to the equipment, does not need to add storage devices for identification, does not need to customize equipment, and does not need to modify the interface physical structure of equipment, and can identify A variety of IO devices improve the versatility of the system.
附图说明Description of drawings
图1为实施方式一所述的基于外部中断的嵌入式平台IO设备动态识别系统的原理框图;Fig. 1 is the functional block diagram of the embedded platform IO device dynamic identification system based on external interrupt described in embodiment one;
图2为实施方式三和四所述的基于外部中断的嵌入式平台IO设备动态识别系统的原理框图;Fig. 2 is the functional block diagram of the embedded platform IO device dynamic identification system based on external interrupt described in embodiment three and four;
图3为本发明所述的基于外部中断的嵌入式平台IO设备动态识别系统的IO设备动态识别方法的流程图。FIG. 3 is a flow chart of an IO device dynamic identification method of the external interrupt-based embedded platform IO device dynamic identification system of the present invention.
具体实施方式detailed description
具体实施方式一:结合图1说明本实施方式,本实施方式所述的基于外部中断的嵌入式平台IO设备动态识别系统包括由n个驱动电路构成的接口电路驱动模块1、识别模块2、公共物理接口3以及由n个接口子板构成的子板模块4,n为大于1的正整数,n个接口子板分别对应n种IO设备,n个驱动电路分别对应n种IO设备;Specific Embodiment 1: This embodiment is described in conjunction with FIG. 1. The embedded platform IO device dynamic identification system based on external interrupts described in this embodiment includes an interface circuit drive module 1, an identification module 2, and a public drive module composed of n drive circuits. The physical interface 3 and the sub-board module 4 composed of n interface sub-boards, n is a positive integer greater than 1, the n interface sub-boards correspond to n types of IO devices, and the n drive circuits correspond to n types of IO devices;
每个接口子板均包括有能够产生编码信息的电路,该电路包括有用于连接标准接口的物理插槽和编码信号输出端,与公共物理接口3相连接的接口子板的编码信号输出端为子板模块4的识别信号输出端;Each interface sub-board includes a circuit capable of generating coded information, the circuit includes a physical slot for connecting to a standard interface and a coded signal output end, and the coded signal output port of the interface daughter board connected to the public physical interface 3 is The identification signal output terminal of the sub-board module 4;
所述子板模块4的识别信号输出端通过公共物理接口3连接识别模块2的识别信号输入端,识别模块2的中断信号输出端连接嵌入式平台的处理器的中断信号输入端,该处理器依次通过接口电路驱动模块1、公共物理接口3以及子板模块4与IO设备进行数据传输。The identification signal output end of the sub-board module 4 is connected to the identification signal input end of the identification module 2 through the public physical interface 3, and the interruption signal output end of the identification module 2 is connected to the interruption signal input end of the processor of the embedded platform, the processor Data transmission is performed with the IO device through the interface circuit driver module 1, the public physical interface 3, and the sub-board module 4 in sequence.
如图1所示,本实施方式中,处理器与接口电路驱动模块1之间通过发送数据线和接收数据线这两根信号线连接在一起。识别模块2通过n根数据线分别连接到处理器的n个具有中断功能的IO管脚上。识别模块2的N根信号线与公共物理接口3相连,识别模块2的电源线与公共物理接口3相连。接口电路驱动模块1中,n个驱动电路的共En根输出信号线与公共物理接口3相连,其中En=e1+e2+...+en,ei为对应于第i种IO设备的接口的物理连接线数量,i=1,2,……,n。公共物理接口3上设置有公共物理插槽,接口子板中与公共物理接口3可通过上述物理插槽直接相连,连接线分为三部分:第一部分是用于通信的数据线,不同接口子板使用的公共物理插槽的有效引针是不一样的,例如一号接口子板使用的是其中的1~3号线,而二号接口子板使用的是2~4号线;第二部分是用于识别的信号线,此时每个接口子板使用的是相同的引针,即一号接口子板到n号接口子板使用的都是公共物理插槽的10~13号线;最后一部分是电源线,同样,所有接口子板的电源线都是使用公共物理插槽的相同线序。识别模块2通过公共物理接口3向接口子板供电。As shown in FIG. 1 , in this embodiment, the processor and the interface circuit driving module 1 are connected together through two signal lines, a sending data line and a receiving data line. The identification module 2 is respectively connected to n IO pins with interrupt function of the processor through n data lines. The N signal lines of the identification module 2 are connected to the public physical interface 3, The power line of the identification module 2 is connected to the public physical interface 3 . In the interface circuit driving module 1, a total of E n output signal lines of n driving circuits are connected to the public physical interface 3, wherein E n =e 1 +e 2 +...+ en, e i is corresponding to the ith The number of physical connection lines of the interface of an IO device, i=1, 2,..., n. The public physical interface 3 is provided with a public physical slot, and the interface sub-board can be directly connected with the public physical interface 3 through the physical slot. The effective pins of the public physical slots used by the boards are different. For example, the No. 1 interface sub-board uses lines 1 to 3, while the No. 2 interface daughter board uses lines 2 to 4; the second interface sub-board uses lines 2 to 4; Part of it is the signal line for identification. At this time, each interface sub-board uses the same pin, that is, the No. 1 interface sub-board to No. n interface sub-boards use the 10-13 lines of the public physical slot. ; The last part is the power cord, similarly, the power cords of all interface sub-boards use the same line sequence of the common physical slot. The identification module 2 supplies power to the interface sub-board through the public physical interface 3 .
本实施方中,接口电路驱动模块1主要完成系统内部信号到各种接口信号的电气标准以及物理接口标准的转换。例如系统内部只使用两根信号线作为数据通信线(发送线和接收线),经过RS485接口的驱动电路就转换成了三根(RS485+、RS485-、GND),若经过RS422接口的驱动电路则转换成了五根(RS422TXD+、RS422TXD-、RS422RXD+、RS422RXD-、GND)。识别模块2用于将插入的接口设备的型号进行编码,并将该编码传递给处理器。公共物理接口3包含有用于识别的信号线和用于数据通信的信号线,用来连接接口子板和对应的驱动电路,以及将信号线分配到识别模块2。接口子板带有产生编码信息的电路,并且该电路的一端是与标准接口相连的物理插槽,另一端与公共物理接口3相连。需要注意的是同一时间,只能有1个接口子板与公共物理接口3相连。处理器模块除了处理计算任务外,还需要接收识别的信号,以及加载与插入设备对应的驱动程序。In this embodiment, the interface circuit driving module 1 mainly completes the conversion of the system internal signals to the electrical standards of various interface signals and the physical interface standards. For example, only two signal lines are used in the system as data communication lines (sending line and receiving line), and the drive circuit through the RS485 interface is converted into three (RS485+, RS485-, GND), and if the drive circuit through the RS422 interface is converted to Becomes five (RS422TXD+, RS422TXD-, RS422RXD+, RS422RXD-, GND). The identification module 2 is used to encode the model of the inserted interface device, and transmit the code to the processor. The public physical interface 3 includes a signal line for identification and a signal line for data communication, which are used to connect the interface sub-board and the corresponding driving circuit, and distribute the signal line to the identification module 2 . The interface sub-board has a circuit for generating coded information, and one end of the circuit is a physical slot connected to a standard interface, and the other end is connected to the public physical interface 3 . It should be noted that only one interface sub-board can be connected to the public physical interface 3 at the same time. In addition to processing computing tasks, the processor module also needs to receive identification signals and load drivers corresponding to the inserted devices.
本实施方式所述的基于外部中断的嵌入式平台IO设备动态识别系统的工作过程如下:首先,将IO设备插入对应的接口子板,然后将接口子板与公共物理接口3相连。此时,子板模块4会产生识别信号至识别模块2。识别模块2将信号线进行编码,同时拉低与处理器的连接线中的一根。处理器根据拉低的信号线产生中断。处理器根据不同的中断源,判断插入设备的接口类型,并将预先存储的驱动程序文件加载至内存。The working process of the embedded platform IO device dynamic identification system based on external interrupt described in this embodiment is as follows: firstly, the IO device is inserted into the corresponding interface sub-board, and then the interface sub-board is connected to the public physical interface 3 . At this time, the sub-board module 4 will generate an identification signal to the identification module 2 . The identification module 2 encodes the signal line, and at the same time pulls down one of the connection lines with the processor. The processor generates an interrupt based on the signal line being pulled low. The processor judges the interface type of the inserted device according to different interrupt sources, and loads the pre-stored driver program file into the memory.
具体实施方式二:本实施方式是对实施方式一所述的基于外部中断的嵌入式平台IO设备动态识别系统的进一步限定,本实施方式中,所述的处理器内嵌入有软件实现的IO设备动态识别模块,该IO设备动态识别包括以下单元:Specific Embodiment 2: This embodiment is a further limitation of the external interrupt-based embedded platform IO device dynamic identification system described in Embodiment 1. In this embodiment, the processor is embedded with a software-implemented IO device A dynamic identification module, the dynamic identification of the IO device includes the following units:
休眠单元:处理器处于休眠状态,直到接收到识别模块2发来的中断信号;并在该单元运行结束之后启动中断信号判断单元;Sleep unit: the processor is in a sleep state until it receives an interrupt signal from the identification module 2; and starts the interrupt signal judging unit after the unit finishes running;
中断信号判断单元:判断识别模块2发来的中断信号是否为有效的中断信号,并在判断结果为是时启动设备类型推断单元,判断结果为否时启动休眠单元;Interrupt signal judging unit: judge whether the interrupt signal sent by the identification module 2 is an effective interrupt signal, and start the device type inference unit when the judgment result is yes, and start the sleep unit when the judgment result is no;
所述的有效的中断信号为预先定义好的中断信号;The effective interrupt signal is a predefined interrupt signal;
设备类型识别单元:根据中断信号与设备类型的映射关系推断出识别模块2发来的中断信号所对应的设备类型;并在该单元运行结束之后启动接口驱动程序搜索单元;Device type recognition unit: infer the device type corresponding to the interrupt signal sent by the identification module 2 according to the mapping relationship between the interrupt signal and the device type; and start the interface driver search unit after the unit has finished running;
上述映射关系是预先设定好的映射关系,该映射关系中,不同的中断信号对应不同的设备类型;The above mapping relationship is a preset mapping relationship. In this mapping relationship, different interrupt signals correspond to different device types;
接口驱动程序搜索单元:在存储介质中搜索识别模块2发来的中断信号所对应的接口驱动程序;并在该单元运行结束之后启动接口驱动程序加载单元;Interface driver search unit: search the storage medium for the interface driver corresponding to the interrupt signal sent by the identification module 2; and start the interface driver loading unit after the unit runs;
接口驱动程序加载单元:加载接口驱动程序;并在该单元运行结束之后启动配置成功信号发送单元;Interface driver loading unit: load the interface driver; and start the configuration success signal sending unit after the unit finishes running;
配置成功信号发送单元:发送配置成功信号给通信进程;并在该单元运行结束之后启动休眠单元。The configuration success signal sending unit: sends the configuration success signal to the communication process; and starts the dormant unit after the unit finishes running.
本实施方式需要预先定义好能够识别的各种IO设备所对应的中断信号,这些定义好的中断信号即为有效的中断信号。当处理器接收到中断信号时,判断该中断信号是否为有效的中断信号,如果是,则能够确定该中断信号所对应的IO设备的各种类。In this embodiment, interrupt signals corresponding to various identifiable IO devices need to be defined in advance, and these defined interrupt signals are effective interrupt signals. When the processor receives the interrupt signal, it judges whether the interrupt signal is a valid interrupt signal, and if so, can determine various types of IO devices corresponding to the interrupt signal.
具体实施方式三:结合图2说明本实施方式,本实施方式是对实施方式一所述的基于外部中断的嵌入式平台IO设备动态识别系统的进一步限定,本实施方式中,所述的能够产生编码信息的电路采用编码器实现。Specific embodiment three: This embodiment is described in conjunction with FIG. 2. This embodiment is a further limitation of the external interrupt-based embedded platform IO device dynamic identification system described in embodiment one. In this embodiment, the described can generate The circuit that encodes information is implemented using an encoder.
如图2所示,将接口子板插上公共物理接口3的插槽时,由于电源线相连接,接口子板中的编码器开始工作,编码器的输出端与公共物理接口3的N根识别信号线相连,此时产生编码信号。不同的接口子板的产生的编码信号是不相同的。As shown in Figure 2, when the interface sub-board is plugged into the slot of the public physical interface 3, the encoder in the interface sub-board starts to work due to the connection of the power cord, and the output end of the encoder is connected to the N terminals of the public physical interface 3. The identification signal lines are connected, and a coded signal is generated at this time. The coded signals generated by different interface daughter boards are different.
具体实施方式四:结合图2说明本实施方式,本实施方式是对实施方式一所述的基于外部中断的嵌入式平台IO设备动态识别系统的进一步限定,本实施方式中,所述的识别模块2采用译码器实现。Specific Embodiment 4: This embodiment is described in conjunction with FIG. 2. This embodiment is a further limitation of the external interrupt-based embedded platform IO device dynamic identification system described in Embodiment 1. In this embodiment, the identification module 2 is implemented using a decoder.
如图2所示,识别模块2接收到了识别信号线的变化信息,该信息作为译码器的输入,此时识别模块2就会拉低其中一根输出信号线,进而产生IO中断信号。As shown in Figure 2, the identification module 2 has received the change information of the identification signal line, which is used as the input of the decoder. At this time, the identification module 2 will pull down one of the output signal lines, and then generate an IO interrupt signal.
具体实施方式五:结合图3说明本实施方式,本实施方式是实施方式一所述的基于外部中断的嵌入式平台IO设备动态识别系统的IO设备动态识别方法,该方法为:所述的处理器嵌入有软件实现的IO设备动态识别过程,该过程包括以下步骤:Specific embodiment five: this embodiment is described in conjunction with Fig. 3, this embodiment is the IO device dynamic identification method of the embedded platform IO device dynamic identification system based on external interrupt described in embodiment one, this method is: described processing The device is embedded with a software-implemented IO device dynamic identification process, which includes the following steps:
休眠步骤:处理器处于休眠状态,直到接收到识别模块2发来的中断信号;并在该步骤结束之后执行中断信号判断步骤;Dormancy step: the processor is in a dormant state until it receives an interrupt signal from the identification module 2; and after the step ends, the interrupt signal judging step is executed;
中断信号判断步骤:判断识别模块2发来的中断信号是否为有效的中断信号,并在判断结果为是时执行设备类型推断步骤,判断结果为否时返回执行休眠步骤;Interrupt signal judging step: judge whether the interrupt signal sent by the identification module 2 is an effective interrupt signal, and execute the device type inference step when the judgment result is yes, and return to perform the dormancy step when the judgment result is no;
所述的有效的中断信号为预先定义好的中断信号;The effective interrupt signal is a predefined interrupt signal;
设备类型识别步骤:根据中断信号与设备类型的映射关系推断出识别模块2发来的中断信号所对应的设备类型;并在该步骤结束之后执行接口驱动程序搜索步骤;Device type identification step: infer the device type corresponding to the interrupt signal sent by the identification module 2 according to the mapping relationship between the interrupt signal and the device type; and perform the interface driver search step after the step ends;
上述映射关系是预先设定好的映射关系,该映射关系中,不同的中断信号对应不同的设备类型;The above mapping relationship is a preset mapping relationship. In this mapping relationship, different interrupt signals correspond to different device types;
接口驱动程序搜索步骤:在存储介质中搜索识别模块2发来的中断信号所对应的接口驱动程序;并在该步骤结束之后执行接口驱动程序加载步骤;Interface driver search step: search the storage medium for the corresponding interface driver of the interrupt signal sent by the recognition module 2; and perform the interface driver loading step after this step ends;
接口驱动程序加载步骤:加载接口驱动程序;并在该步骤结束之后执行配置成功信号发送步骤;The interface driver loading step: loading the interface driver; and executing the configuration success signal sending step after this step ends;
配置成功信号发送步骤:发送配置成功信号给通信进程;并在该步骤结束之后返回执行休眠步骤。The step of sending a successful configuration signal: sending a successful configuration signal to the communication process; and returning to the dormant step after the step ends.
本实施方式预先建立中断信号与IO设备的映射关系,该映射关系中,中断信号与IO设备一一对应,进行IO设备动态识别时,可根据配置文件(存放映射关系的数据结构)返回IO设备的ID标识信息。如图3所示,本实施方式通过在处理器内加载IO设备动态识别过程,该IO设备动态识别过程能够对接收到的中断信号进行判断,与预先设定好的中断信号进行比对,如果该中断信号为预先设定好的某个中断信号,则认为IO设备为该中断信号所对应的IO设备的类别,然后加载这种IO设备的驱动程序,使主机系统能够与IO设备进行通信。上述方法与现有的IO设备动态识别技术相比,不需要对设备增加电子数据表格、不需要添加识别所用的存储器件、不需要定制设备,更不需要改造设备的接口物理结构,且能够识别多种IO设备,提高了系统的通用性。This embodiment pre-establishes the mapping relationship between the interrupt signal and the IO device. In the mapping relationship, the interrupt signal corresponds to the IO device one by one. When performing dynamic identification of the IO device, the IO device can be returned according to the configuration file (data structure storing the mapping relationship) ID identification information. As shown in Figure 3, this embodiment loads the IO device dynamic identification process in the processor. The IO device dynamic identification process can judge the received interrupt signal and compare it with the preset interrupt signal. If If the interrupt signal is a preset interrupt signal, then the IO device is considered to be the type of IO device corresponding to the interrupt signal, and then the driver of this IO device is loaded to enable the host system to communicate with the IO device. Compared with the existing IO equipment dynamic identification technology, the above method does not need to add electronic data sheets to the equipment, does not need to add storage devices used for identification, does not need to customize equipment, and does not need to modify the interface physical structure of equipment, and can identify A variety of IO devices improve the versatility of the system.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410340191.6A CN104102512B (en) | 2014-07-17 | 2014-07-17 | Embedded platform IO equipment dynamic identification system based on external interruption and IO equipment dynamic identification method of system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410340191.6A CN104102512B (en) | 2014-07-17 | 2014-07-17 | Embedded platform IO equipment dynamic identification system based on external interruption and IO equipment dynamic identification method of system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104102512A CN104102512A (en) | 2014-10-15 |
CN104102512B true CN104102512B (en) | 2017-04-26 |
Family
ID=51670685
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410340191.6A Active CN104102512B (en) | 2014-07-17 | 2014-07-17 | Embedded platform IO equipment dynamic identification system based on external interruption and IO equipment dynamic identification method of system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104102512B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106502844A (en) * | 2016-10-11 | 2017-03-15 | 郑州云海信息技术有限公司 | A kind of method of the sAS port bandwidths of test RAID memory Is O |
CN107315695A (en) * | 2017-06-28 | 2017-11-03 | 浪潮金融信息技术有限公司 | Input and output driving method and device, computer-readable recording medium, terminal |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1996021974A1 (en) * | 1995-01-11 | 1996-07-18 | Aristocrat Leisure Industries Pty. Ltd. | Serial peripheral interface |
CN1512335A (en) * | 2002-12-31 | 2004-07-14 | 北京科泰世纪科技有限公司 | Drive method based on structure operation system dynamic equipment |
CN102122156A (en) * | 2010-12-24 | 2011-07-13 | 福州大学 | Novel I/O (Input/Output) bus |
-
2014
- 2014-07-17 CN CN201410340191.6A patent/CN104102512B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1996021974A1 (en) * | 1995-01-11 | 1996-07-18 | Aristocrat Leisure Industries Pty. Ltd. | Serial peripheral interface |
CN1512335A (en) * | 2002-12-31 | 2004-07-14 | 北京科泰世纪科技有限公司 | Drive method based on structure operation system dynamic equipment |
CN102122156A (en) * | 2010-12-24 | 2011-07-13 | 福州大学 | Novel I/O (Input/Output) bus |
Also Published As
Publication number | Publication date |
---|---|
CN104102512A (en) | 2014-10-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8862790B2 (en) | Method for identifying version type of windows operating system on a host by a USB device | |
US10721309B2 (en) | System and method for supporting data communication in a heterogeneous environment | |
EP2492776A2 (en) | Remote wakeup of application processor of mobile device | |
US8639985B2 (en) | USB testing apparatus and method | |
CN106412293B (en) | Foreign matter detection method and device and terminal equipment | |
WO2024113767A1 (en) | Power-on method and power-on apparatus for smart network interface cards | |
CN104102512B (en) | Embedded platform IO equipment dynamic identification system based on external interruption and IO equipment dynamic identification method of system | |
US9619411B2 (en) | Polling determination | |
CN110990116B (en) | Method, device and system for transmitting data between intelligent network card and virtual machine | |
US7549009B2 (en) | High-speed PCI interface system and a reset method thereof | |
CN116069701A (en) | PCIE resource identification method, device, equipment and storage medium | |
US20150186317A1 (en) | Method and apparatus for detecting the initiator/target orientation of a smart bridge | |
US9645627B2 (en) | Computer stick docking system and power management method thereof | |
CN103226523B (en) | The system of a kind of external equipment and mobile terminal and composition thereof | |
CN108055212B (en) | Method and device compatible with PSE chip | |
CN105404543A (en) | Simulation machine | |
CN109857469B (en) | Display control method and related products | |
CN114442765A (en) | Fan control method for computer equipment, baseboard management controller and storage medium | |
CN105068952A (en) | SD interface multiplexing apparatus and method and electronic device | |
CN105446903A (en) | Information processing method and electronic device | |
TW201643734A (en) | SSIC device and link control method for SSIC device | |
CN111552617A (en) | NAND Flash temperature acquisition method and device, computer equipment and storage medium | |
TWI587150B (en) | Electronic device with multiple interfaces | |
CN114676085B (en) | A CCIX bus control method, device and medium | |
CN103049420A (en) | Internal memory multiplexing method and portable terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |