CN112905512A - DIO interface configuration method, device, equipment and storage medium based on Windows system - Google Patents

DIO interface configuration method, device, equipment and storage medium based on Windows system Download PDF

Info

Publication number
CN112905512A
CN112905512A CN202110158300.2A CN202110158300A CN112905512A CN 112905512 A CN112905512 A CN 112905512A CN 202110158300 A CN202110158300 A CN 202110158300A CN 112905512 A CN112905512 A CN 112905512A
Authority
CN
China
Prior art keywords
dio
interface
dio interface
identification information
information
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.)
Granted
Application number
CN202110158300.2A
Other languages
Chinese (zh)
Other versions
CN112905512B (en
Inventor
周路曾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Yuankong Electronic Technology Co ltd
Original Assignee
Suzhou Yuankong Electronic Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suzhou Yuankong Electronic Technology Co ltd filed Critical Suzhou Yuankong Electronic Technology Co ltd
Priority to CN202110158300.2A priority Critical patent/CN112905512B/en
Publication of CN112905512A publication Critical patent/CN112905512A/en
Application granted granted Critical
Publication of CN112905512B publication Critical patent/CN112905512B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application provides a DIO interface configuration method, a device, equipment and a storage medium based on a Windows system, wherein the method comprises the following steps: responding to the configuration triggering operation of the DIO interface, and displaying a DIO interface configuration interface on the electronic equipment; acquiring identification information of a mainboard and configuration information input on a DIO interface configuration interface; the configuration information comprises identification information of a DIO interface to be configured and state information configured for the DIO interface; according to the identification information of the mainboard, the identification information of all DIO interfaces of the mainboard and the physical addresses corresponding to the DIO interfaces are obtained; acquiring a physical address of a corresponding DIO interface according to identification information of the DIO interface to be configured; and configuring the physical address of the DIO interface according to the state information configured for the DIO interface and the mapping relation between the preset state information and the address information. The configuration operation of the DIO interface is simple and convenient, and even non-professional personnel are not easy to cause the problem of configuration errors.

Description

DIO interface configuration method, device, equipment and storage medium based on Windows system
Technical Field
The embodiment of the application relates to the field of computer hardware interface configuration, in particular to a DIO interface configuration method, a DIO interface configuration device, DIO interface configuration equipment and a storage medium based on a Windows system.
Background
The industrial automation and the downstream device sets are usually connected to each downstream device set through a Digital In and Out (DIO) interface reserved by the master device for interaction, and the master device generally reads and writes a physical address of the DIO interface through a Read-Write (RW) tool to configure an input/output state of the DIO interface. In the process of implementing the invention, the inventor finds that at least the following problems exist in the traditional technology: since the physical address of the DIO interface generally consists of 32-bit addresses, when the DIO interface is configured by the RW tool, it is necessary to know the structure of the physical address of the DIO interface of the master device, and then change some address bits in the physical address, which is troublesome to operate, and especially, it is easy for some unskilled persons to perform misoperation.
Disclosure of Invention
In order to overcome the problems in the related art, the application provides a DIO interface configuration method, device, equipment and storage medium based on a Windows system, and has the advantage of conveniently configuring the DIO interface.
According to a first aspect of the embodiments of the present application, a DIO interface configuration method based on a Windows system is provided, which is applied to an electronic device, wherein a main board for controlling other devices is arranged in the electronic device; the method comprises the following steps:
responding to the configuration triggering operation of the DIO interface, and displaying a DIO interface configuration interface on the electronic equipment;
acquiring identification information of the mainboard and configuration information input on the DIO interface configuration interface; the configuration information comprises identification information of a DIO interface to be configured and state information configured for the DIO interface;
acquiring identification information of all DIO interfaces of the mainboard and a physical address corresponding to the DIO interface according to the identification information of the mainboard;
acquiring a physical address of the corresponding DIO interface according to the identification information of the DIO interface to be configured;
and configuring the physical address of the DIO interface according to the state information configured for the DIO interface and the mapping relation between the preset state information and the address information.
According to a second aspect of the embodiments of the present application, there is provided a DIO interface configuration device based on a Windows system, which is applied to an electronic device, where the electronic device includes a motherboard, and the device includes:
the configuration interface display module is used for responding to configuration triggering operation of the DIO interface and displaying a DIO interface configuration interface on the electronic equipment;
the first information acquisition module is used for acquiring the identification information of the mainboard and the configuration information input on the DIO interface configuration interface; the configuration information comprises identification information of a DIO interface to be configured and state information configured for the DIO interface;
the second information acquisition module is used for acquiring identification information of all DIO interfaces of the mainboard and physical addresses corresponding to the DIO interfaces according to the identification information of the mainboard;
the physical address acquisition module is used for acquiring a corresponding physical address of the DIO interface according to the identification information of the DIO interface to be configured;
and the configuration module is used for configuring the physical address of the DIO interface according to the state information configured for the DIO interface and the mapping relation between the preset state information and the address information.
According to a third aspect of embodiments herein, there is provided an electronic device comprising a display, a processor, and a memory; the memory stores a computer program adapted to be loaded by the processor and to perform the DIO interface configuration method based on Windows system as described above.
According to a fourth aspect of embodiments of the present application, there is provided a computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the DIO interface configuration method based on the Windows system as described above.
In the embodiment of the application, the DIO interface configuration interface is displayed on the electronic equipment, so that a user can conveniently input the identification information of the DIO interface to be configured and the state information of the DIO interface configuration, therefore, the electronic device can automatically obtain the identification information of all DIO interfaces of the mainboard and the corresponding physical addresses of the DIO interfaces according to the identification information of the mainboard, obtaining the physical address of the corresponding DIO interface according to the identification information of the DIO interface to be configured, and then according to the state information configured for the DIO interface and the mapping relation between the preset state information and the address information, automatically configuring the physical address of the DIO interface, realizing the configuration of the DIO interface, having simple and convenient configuration operation, needing no knowledge of the professional knowledge of the DIO interface and being not easy to cause the problem of configuration errors even for non-professionals.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
For a better understanding and practice, the invention is described in detail below with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic block diagram of an application environment of a DIO interface configuration method based on a Windows system according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a DIO interface configuration method based on a Windows system according to an embodiment of the present application;
FIG. 3 is a flow chart illustrating a method of obtaining configuration information according to one embodiment of the present application;
FIG. 4 is a diagram illustrating an exemplary display effect of a DIO interface configuration interface according to an embodiment of the present disclosure;
FIG. 5 is a diagram illustrating an exemplary display effect after configuration information is input in a configuration interface according to an embodiment of the present disclosure;
fig. 6 is a flowchart illustrating a method for obtaining DIO interface identification information and a physical address according to an embodiment of the present application;
FIG. 7 is a flow diagram illustrating a method for changing a physical address of a DIO interface according to one embodiment of the present application;
FIG. 8 is a flow chart illustrating changing a virtual memory address according to one embodiment of the present application;
FIG. 9 is a diagram illustrating an effect of displaying a state of a DIO interface of a read configuration according to an embodiment of the present application;
FIG. 10 is a schematic block diagram of a DIO interface configuration device of a Windows-based system according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
In the description of the present application, it is to be understood that the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not necessarily used to describe a particular order or sequence, nor are they to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The word "if/if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination". Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Referring to fig. 1, which is a schematic diagram of an application scenario of a DIO interface configuration method based on a Windows system according to an embodiment of the present application, the DIO interface configuration method based on a Windows system according to an embodiment of the present application is applied to an automation control scenario, and specifically includes a main control device 10 for sending a control instruction and at least one downstream device 20 for receiving the control instruction and executing a corresponding action; a main board 11 is arranged in the main control device 10, the main board 11 has a plurality of DIO interfaces, the downstream device 20 is connected with at least one DIO interface, and the main control device 10 realizes the control of the downstream device 20 through the DIO interface.
The main control device 10 may implement the DIO interface configuration method based on the Windows system in a software and/or hardware manner, where the main control device 10 may be formed by two or more physical entities, or may be formed by one physical entity, for example, a computer, a mobile phone, a tablet or an intelligent interactive tablet and other devices with DIO interfaces, where a DIO (Digital in and out) interface provided in the embodiment of the present application is mainly a GPIO (General purpose input/output) interface provided by an Intel PCH (Platform Controller Hub) bridge. Obviously, the main control device 10 is installed with a Windows system. The main control device 10 may run an application program for the DIO interface configuration method based on the Windows system, where the application program may be presented in a form adapted to the processing unit, for example, may be an APP application program, and in some examples, may also be presented in a form of, for example, a system plug-in, a web plug-in, and the like. The downstream device 20 may be any device that can perform control, i.e., is controllable, and may be a PLC device, for example. Specifically, the downstream device 20 may be a PLC (Programmable Logic Controller) device used in a factory, and the main control device 10 may be a computer, so that a factory worker may configure a DIO interface of the computer, thereby implementing control over the PLC device, for example, controlling on or off of the PLC device.
Example 1
The following describes in detail a DIO interface configuration method based on a Windows system according to an embodiment of the present application with reference to fig. 2 to 9.
Referring to fig. 2, the DIO interface configuration method based on the Windows system according to the embodiment of the present application is applied to an electronic device, where the electronic device may be a main control device with a DIO interface, such as a computer, a mobile phone, a tablet or an intelligent interactive tablet; a main board used for sending a control instruction to control other equipment is arranged in the electronic equipment; the DIO interface configuration method based on the Windows system comprises the following steps:
step S110: and responding to the configuration triggering operation of the DIO interface, and displaying the DIO interface configuration interface on the electronic equipment.
In the embodiment of the application, the main control device is provided with an application program of a DIO interface configuration method based on a Windows system, the configuration of the DIO interface is triggered when the application program is opened by clicking, and then the DIO interface configuration interface is triggered to be displayed on the electronic device, so that a user can conveniently input identification information of the DIO interface to be configured and state information of the DIO interface configuration on the DIO interface configuration interface to configure the DIO interface.
Step S120: acquiring identification information of the mainboard and configuration information input on the DIO interface configuration interface; the configuration information includes identification information of a DIO interface to be configured and state information configured for the DIO interface.
The identification information of the motherboard is used for uniquely identifying the motherboard, and may be serial number information of the motherboard, or the like. In the embodiment of the present application, the identification information of the electronic motherboard is obtained by reading SMBIOS (System Management BIOS) table information in the electronic device, so as to uniquely identify the motherboard, where SMBIOS is a Unified specification that a motherboard or a System manufacturer needs to display product Management information in a standard format, and is a set of structured tables about System information collected by BIOS (Basic Input Output System) or UEFI (Unified Extensible Firmware Interface) when initializing a System of the electronic device, and is stored in a memory, and obviously, the identification information of the motherboard of the electronic device is stored in SMBIOS, and the identification information of the motherboard can be obtained by reading SMBIOS.
Step S130: and acquiring identification information of all DIO interfaces of the mainboard and a physical address corresponding to the DIO interface according to the identification information of the mainboard.
In this embodiment, the physical address of the DIO interface is an address of a register that can be directly accessed by a CPU of the electronic device in the interface circuit, and the peripheral device and the electronic device are both performed by reading and writing the register on the electronic device, and the electronic device sends a command to the register in the interface circuit through these addresses, i.e., the interface, to read and transfer data from the peripheral device.
Step S140: and acquiring the corresponding physical address of the DIO interface according to the identification information of the DIO interface to be configured.
The identification information of the DIO interface is used to uniquely identify the DIO interface, which may be the DIO interface number, such as DIO Port1, DIO Port2, and the like.
Step S150: and configuring the physical address of the DIO interface according to the state information configured for the DIO interface and the mapping relation between the preset state information and the address information.
In the embodiment of the application, the DIO interface configuration interface is displayed on the electronic equipment, so that a user can conveniently input the identification information of the DIO interface to be configured and the state information of the DIO interface configuration, therefore, the electronic device can automatically obtain the identification information of all DIO interfaces of the mainboard and the corresponding physical addresses of the DIO interfaces according to the identification information of the mainboard, obtaining the physical address of the corresponding DIO interface according to the identification information of the DIO interface to be configured, and then according to the state information configured for the DIO interface and the mapping relation between the preset state information and the address information, automatically configuring the physical address of the DIO interface, realizing the configuration of the DIO interface, having simple and convenient configuration operation, needing no knowledge of the professional knowledge of the DIO interface and being not easy to cause the problem of configuration errors even for non-professionals.
Referring to fig. 3 and 4, in an embodiment, the interface configuration interface in step S110 includes a DIO interface identification information input box, an input state trigger button, an output high level state trigger button, and an output low level state trigger button; the state information configured for the DIO interface in step S120 includes an input state, an output high level state, or an output low level state; the step S120 of acquiring the configuration information input in the interface configuration interface includes:
step S121: and determining the DIO interface identification information input in the DIO interface identification information input box as the identification information of the DIO interface to be configured.
Step S122: and determining the trigger key operation of the input state trigger key, the output high level state trigger key or the output low level state trigger key as the configuration of the DIO interface into an input state, an output high level state or an output low level state.
Referring to fig. 5, when a DIO Port1 is input in the DIO interface identification information input box and a trigger button for outputting a high level state is clicked, the input of configuration information of the DIO Port1 is realized.
According to the embodiment of the application, the DIO interface to be configured can be conveniently input by a user through the setting of the DIO interface identification information input box, and the DIO interface can be conveniently and visually configured by the user through the input state trigger key, the output high level state trigger key and the output low level state trigger key.
In another exemplary embodiment, before the electronic device displays the DIO interface configuration interface in step S110, the method further includes the following steps: acquiring identification information of the mainboard; acquiring identification information of all DIO interfaces of the mainboard according to the identification information of the mainboard; in step S110, when the electronic device displays a DIO interface configuration interface display DIO interface identification information input box, displaying identification information of all DIO interfaces of the motherboard on the DIO interface identification information input box; in step S120, the acquiring the configuration information input in the interface configuration interface includes: and determining the identification information of the DIO interface selected on the DIO interface identification information input box as the identification information of the DIO interface to be configured. Specifically, in the step of displaying the identification information of all DIO interfaces of the motherboard in the DIO interface identification information input box, the identification information of the clicked DIO interface may be determined as the configuration information of the DIO interface to be configured by detecting an operation of clicking one or more identification information of the DIO interface by a user, or a selection box may be provided in front of the identification information of all DIO interfaces of the motherboard, and the identification information of the DIO interface corresponding to the selection box may be determined as the identification information of the DIO interface to be configured by detecting that the user clicks one or more selection boxes. According to the embodiment of the application, the identification information of all DIO interfaces of the mainboard is displayed, so that a user can conveniently determine the DIO interfaces needing to be configured, and meanwhile, the DIO interfaces can be selected in batches, so that the DIO interfaces are configured in batches, and the configuration efficiency of the DIO interfaces is improved.
Referring to fig. 6, in an embodiment, the obtaining, according to the identification information of the motherboard, all DIO interfaces of the motherboard and physical addresses corresponding to the DIO interfaces in step S130 includes:
step S131: and matching in a preset mainboard identification information list according to the identification information of the mainboard.
The embodiment of the application stores identification information of a plurality of mainboards in a database and forms a mainboard identification information list, and simultaneously, the database also stores all DIO interface information of the mainboards and physical addresses corresponding to the DIO interfaces, and the mainboard used by the current electronic equipment can be identified by matching the identification information of the mainboard in the electronic equipment in the mainboard identification information list, so that all DIO interface identification information of the mainboard and the physical addresses corresponding to the DIO interfaces can be obtained.
Step S132: and when the main board identification information is matched, acquiring all DIO interface identification information preset by the main board and a physical address corresponding to the DIO interface.
If the mainboard identification information cannot be matched, a message that configuration cannot be performed can be prompted.
According to the embodiment of the application, the identification information of the mainboard is matched in a preset mainboard identification information list, and is matched with the mainboard identification information, all DIO interface identification information of the mainboard and the physical address corresponding to the DIO interface can be obtained quickly, and therefore a data source is provided for the physical address of the DIO interface for subsequent configuration.
Referring to fig. 7, in an embodiment, the changing the physical address of the DIO interface according to the state information configured for the DIO interface and the mapping relationship between the preset state information and the address information in step S150 includes:
step S151: and acquiring the virtual memory address distributed by the Windows system according to the physical address of the DIO interface.
Generally, the Windows operating system manages the physical address of the application program process access by using a virtual memory management technology, each process allocates a 4GB virtual address space, and the virtual address space of each process is divided into a null pointer assignment partition, a user mode partition, a 64k no-entry partition and a kernel mode partition depending on the operating system bottom layer; the null pointer assignment partition is used for helping a programmer to capture assignment of a null pointer, cannot be allocated, accessed or used by a program dynamic memory allocator, and causes access violation if a thread in a process tries to read or write a memory address located in the partition. The user mode partition is that all exe and dynamic link libraries in the Windows operating system are loaded to the area, and simultaneously, the accessible resources of the process are loaded to the area. The purpose of the 64k exclusion partition is to isolate the user mode partition from the kernel mode partition, preventing the user program from crossing into the kernel space. Kernel mode partitioning is where the code for the operating system resides; the code for the threads, memory management, file system, network support, and driver related programs is loaded into this area, and this portion of the code is common to all processes. In the embodiment of the present application, the virtual address space may be mapped to the physical address space for access by writing a kernel driver in a kernel mode partition. Specifically, after the physical address of the DIO interface is obtained, the system of the electronic device may take the physical address of the DIO interface as a virtual memory address, and at this time, the virtual memory address may be directly changed.
Step S152: and changing the virtual memory address according to the mapping relation between the state information configured for the DIO interface, the preset state information and the address information.
Step S153: and calling a kernel driver to change the physical address of the DIO interface according to the changed virtual memory address and the mapping relation between the preset virtual memory address and the physical address of the DIO interface.
Specifically, a kernel driver is loaded by calling a function ZwMapViewOfSection () provided in a system core file ntdll, and the kernel driver is notified of which specific virtual memory address the mapped address is, so as to establish mapping between the virtual memory address and the physical address of the DIO interface, thereby realizing the change of the physical address of the DIO interface.
According to the method and the device, the preset mapping relation between the state information and the address information and the mapping relation between the preset virtual memory address and the physical address of the DIO interface are used, so that the state information of the DIO interface is configured on the DIO interface configuration interface, the physical address of the DIO interface can be configured, and the configuration of the DIO interface is rapidly realized.
Referring to FIG. 8, in one embodiment, the address information includes address bits to be changed and values corresponding to the address bits; in step S152, the changing the virtual memory address according to the mapping relationship between the state information configured for the DIO interface, the preset state information, and the address information includes:
step S1521: and determining the address bit of the virtual memory address to be changed and the value on the corresponding address bit according to the state information configured on the DIO interface and the mapping relation between the preset state information and the address information.
For the state of the DIO interface, the state change can be realized only according to the Value of the motherboard model on some address BITs, for example, for the motherboard with the model of CIS-RKBU-LW01, if the DIO interface is to be changed to the input state, the Value of the address BITs of the 0 th BIT, the 1 st BIT, the 8 th BIT and the 9 th BIT of the DIO interface is only changed to x, x, 1,0, that is, BIT [9,8,1,0] is changed to Value [0,1, x, x ], and the DIO interface can be changed to the input loading.
Step S1522: and changing the virtual memory address according to the address bits of the virtual memory address to be changed and the values on the corresponding address bits.
According to the embodiment of the application, the address can be automatically changed according to the state information configured for the DIO interface through the preset mapping relation between the state information and the address information.
In an embodiment, the DIO interface configuration method based on the Windows system may further include the following steps:
step S160: calling a kernel driver to read the configured physical address of the DIO interface;
step S170: acquiring the state information of the DIO interface according to the physical address of the DIO interface and the mapping relation between the preset state information and the address information;
step S180: and displaying the identification information of the DIO interface and the state information of the DIO interface on the main control equipment.
After the display is finished, the kernel driver is cancelled and loaded through ZwUnmapViewOfSection (), so that the memory occupation is reduced.
Referring to fig. 9, after the DIO Port1 is input in the DIO interface id input box and the output high level state trigger button is clicked to complete the configuration of the DIO Port1, the DIO Port1 configuration success and the current state of the DIO Port1 are fed back to the DIO configuration interface.
According to the method and the device, the state information of the DIO interface is fed back by reading the physical address of the DIO interface after configuration, so that a user can learn the configuration condition of the DIO interface in real time.
Example 2
The following is an example of the apparatus of the present application, which may be used to perform the method of example 1 of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, please refer to the contents of the method in embodiment 1 of the present application.
Referring to fig. 10, a DIO interface configuration apparatus 200 based on a Windows system disclosed in the embodiment of the present application is applied to an electronic device, where the electronic device includes a motherboard, and includes:
a configuration interface display module 210, configured to respond to a configuration trigger operation of a DIO interface, and display a DIO interface configuration interface on the electronic device;
a first information obtaining module 220, configured to obtain identification information of the motherboard and configuration information input on the DIO interface configuration interface; the configuration information comprises identification information of a DIO interface to be configured and state information configured for the DIO interface;
a second information obtaining module 230, configured to obtain, according to the identification information of the motherboard, identification information of all DIO interfaces of the motherboard and a physical address corresponding to the DIO interface;
a physical address obtaining module 240, configured to obtain a physical address of the DIO interface according to the identification information of the DIO interface to be configured;
a configuration module 250, configured to configure a physical address of the DIO interface according to the state information configured for the DIO interface and a mapping relationship between preset state information and address information.
In the embodiment of the application, the DIO interface configuration interface is displayed on the electronic equipment, so that a user can conveniently input the identification information of the DIO interface to be configured and the state information of the DIO interface configuration, therefore, the electronic device can automatically obtain the identification information of all DIO interfaces of the mainboard and the corresponding physical addresses of the DIO interfaces according to the identification information of the mainboard, obtaining the physical address of the corresponding DIO interface according to the identification information of the DIO interface to be configured, and then according to the state information configured for the DIO interface and the mapping relation between the preset state information and the address information, automatically configuring the physical address of the DIO interface, realizing the configuration of the DIO interface, having simple and convenient configuration operation, needing no knowledge of the professional knowledge of the DIO interface and being not easy to cause the problem of configuration errors even for non-professionals.
In one embodiment, the interface configuration interface comprises a DIO interface identification information input box, an input state trigger key, an output high level state trigger key and an output low level state trigger key; the state information configured for the DIO interface includes an input state, an output high level state, or an output low level state, and the first information obtaining module 220 includes:
and the identification information determining module is used for determining the DIO interface identification information input in the DIO interface identification information input box as the identification information of the DIO interface to be configured.
And the state information determining module is used for determining the trigger key operation of the input state trigger key, the output high level state trigger key or the output low level state trigger key as the configuration of the DIO interface into an input state, an output high level state or an output low level state.
In another exemplary embodiment, the DIO interface configuration apparatus 200 based on the Windows system further includes a third information obtaining module, configured to obtain the identification information of the motherboard; acquiring identification information of all DIO interfaces of the mainboard according to the identification information of the mainboard; the configuration interface display module 210 is configured to, when the electronic device displays a DIO interface configuration interface display DIO interface identification information input box, include: displaying identification information of all DIO interfaces of the mainboard on the DIO interface identification information input box; the first information obtaining module 220, when obtaining the configuration information input in the interface configuration interface, includes: and determining the identification information of the DIO interface selected on the DIO interface identification information input box as the identification information of the DIO interface to be configured.
In one embodiment, the second information obtaining module 230 includes:
and the matching module is used for matching in a preset mainboard identification information list according to the identification information of the mainboard.
And the mainboard information acquisition module is used for acquiring all DIO interface identification information preset by the mainboard and the physical address corresponding to the DIO interface when the mainboard identification information is matched.
In one embodiment, the configuration module 250 includes:
and the virtual memory address acquisition module is used for acquiring the virtual memory address allocated by the Windows system according to the physical address of the DIO interface.
And the first changing module is used for changing the virtual memory address according to the mapping relation between the state information configured on the DIO interface, the preset state information and the address information.
And the second changing module is used for calling a kernel driver to change the physical address of the DIO interface according to the changed virtual memory address and the mapping relation between the preset virtual memory address and the physical address of the DIO interface.
In one embodiment, the address information includes address bits that need to be changed and values on corresponding address bits; the first altering module includes:
and determining the address bit of the virtual memory address to be changed and the value on the corresponding address bit according to the state information configured on the DIO interface and the mapping relation between the preset state information and the address information.
And changing the virtual memory address according to the address bits of the virtual memory address to be changed and the values on the corresponding address bits.
In one embodiment, the DIO interface configuration apparatus based on Windows system may further include:
the read configuration information module is used for calling a kernel driver to read the configured physical address of the DIO interface;
the state information acquisition module is used for acquiring the state information of the DIO interface according to the physical address of the DIO interface and the mapping relation between the preset state information and the address information;
and the state display module is used for displaying the identification information of the DIO interface and the state information of the DIO interface on the main control equipment.
Example 3
The following is an embodiment of the apparatus of the present application, which may be used to perform the method of embodiment 1 of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, please refer to the contents of the method in embodiment 1 of the present application.
Referring to fig. 11, the present application further provides an electronic device 300, where the electronic device 300 may be any smart terminal including a touch display screen, for example, a computer, a mobile phone, a tablet computer, an interactive tablet, and the like. The electronic device 300 may include: at least one processor 301, at least one memory 302, at least one display 303, at least one network interface 304, a user interface 305, and at least one communication bus 306.
The user interface 305 is mainly used for providing an input interface for a user to acquire data input by the user. Optionally, the user interface 305 may also include a standard wired interface, a wireless interface.
The network interface 303 may optionally include a standard wired interface or a wireless interface (e.g., WI-FI interface).
Wherein the communication bus 303 is used for enabling connection communication between these components.
The processor 301 may include one or more processing cores. The processor 301, using various interfaces and lines to connect various parts throughout the electronic device 300, performs various functions of the electronic device 300 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 302, and calling data stored in the memory 302. Optionally, the processor 301 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 301 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display layer; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 301, but may be implemented by a single chip.
The Memory 302 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 302 includes a non-transitory computer-readable medium. The memory 302 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 302 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described method embodiments, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 302 may alternatively be at least one storage device located remotely from the processor 301. As shown in fig. 11, the memory 302, which is a kind of computer storage medium, may include an operating system, a network communication module, and a user therein.
The processor 301 may be configured to call an application program of the DIO interface configuration method based on the Windows system stored in the memory 302, and specifically execute the DIO interface configuration method based on the Windows system described in embodiment 1, which is not described herein again.
Example 4
The present application further provides a computer-readable storage medium, on which a computer program is stored, where the instructions are suitable for being loaded by a processor and executing the method steps of embodiment 1 shown above, and specific execution processes may refer to specific descriptions shown in embodiment 1 and are not described herein again. The device where the storage medium is located can be an electronic device such as a personal computer, a notebook computer, a smart phone and a tablet computer.
For the apparatus embodiment, since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment for relevant points. The above-described device embodiments are merely illustrative, wherein the components described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart block or blocks and/or flowchart block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A DIO interface configuration method based on Windows system, apply to the electronic device, there is mainboard used for realizing controlling other apparatuses in the said electronic device; characterized in that the method comprises the following steps:
responding to the configuration triggering operation of the DIO interface, and displaying a DIO interface configuration interface on the electronic equipment;
acquiring identification information of the mainboard and configuration information input on the DIO interface configuration interface; the configuration information comprises identification information of a DIO interface to be configured and state information configured for the DIO interface;
acquiring identification information of all DIO interfaces of the mainboard and a physical address corresponding to the DIO interface according to the identification information of the mainboard;
acquiring a physical address of the corresponding DIO interface according to the identification information of the DIO interface to be configured;
and configuring the physical address of the DIO interface according to the state information configured for the DIO interface and the mapping relation between the preset state information and the address information.
2. The DIO interface configuration method based on Windows system as claimed in claim 1,
configuring the physical address of the DIO interface according to the state information configured for the DIO interface and a mapping relationship between preset state information and address information, including:
acquiring a virtual memory address distributed by the Windows system according to the physical address of the DIO interface;
changing the virtual memory address according to the mapping relation between the state information configured for the DIO interface, the preset state information and the address information;
and calling a kernel driver to change the physical address of the DIO interface according to the changed virtual memory address and the mapping relation between the preset virtual memory address and the physical address of the DIO interface.
3. The DIO interface configuration method based on Windows system as claimed in claim 2,
the address information comprises address bits needing to be changed and values on the corresponding address bits; the changing the virtual memory address according to the mapping relationship between the state information configured for the DIO interface, the preset state information and the address information includes:
determining the address bit of the virtual memory address to be changed and the value on the corresponding address bit according to the state information configured for the DIO interface and the mapping relation between the preset state information and the address information;
and changing the virtual memory address according to the address bits of the virtual memory address to be changed and the values on the corresponding address bits.
4. The DIO interface configuration method based on Windows system as claimed in claim 1,
the obtaining, according to the identification information of the motherboard, all DIO interfaces of the motherboard and physical addresses corresponding to the DIO interfaces includes:
matching in a preset mainboard identification information list according to the identification information of the mainboard;
and when the main board identification information is matched, acquiring all DIO interface identification information preset by the main board and a physical address corresponding to the DIO interface.
5. The DIO interface configuration method based on Windows system as claimed in claim 1,
the state information configured for the DIO interface comprises an input state, an output high level state or an output low level state;
the interface configuration interface comprises a DIO interface identification information input frame, an input state trigger key, an output high level state trigger key and an output low level state trigger key;
the step of obtaining the configuration information input in the interface configuration interface comprises the following steps:
determining the DIO interface identification information input in the DIO interface identification information input box as the identification information of the DIO interface to be configured;
and determining the trigger key operation of the input state trigger key, the output high level state trigger key or the output low level state trigger key as the configuration of the DIO interface into an input state, an output high level state or an output low level state.
6. The DIO interface configuration method based on Windows system as claimed in claim 5,
before the electronic device displays the DIO interface configuration interface, the method further comprises the following steps: acquiring identification information of the mainboard; acquiring identification information of all DIO interfaces of the mainboard according to the identification information of the mainboard;
when the electronic equipment displays a DIO interface configuration interface display DIO interface identification information input box, displaying identification information of all DIO interfaces of the mainboard on the DIO interface identification information input box;
the acquiring the configuration information input in the interface configuration interface comprises: and determining the identification information of the DIO interface selected on the DIO interface identification information input box as the identification information of the DIO interface to be configured.
7. The DIO interface configuration method based on Windows system as claimed in any one of claims 1-6, further comprising the steps of:
calling a kernel driver to read the configured physical address of the DIO interface;
acquiring the state information of the DIO interface according to the physical address of the DIO interface and the mapping relation between the preset state information and the address information;
and displaying the identification information of the DIO interface and the state information of the DIO interface on the main control equipment.
8. A DIO interface configuration device based on Windows system, applied to electronic equipment, the electronic equipment includes a mainboard, characterized in that the device includes:
the configuration interface display module is used for responding to configuration triggering operation of the DIO interface and displaying a DIO interface configuration interface on the electronic equipment;
the first information acquisition module is used for acquiring the identification information of the mainboard and the configuration information input on the DIO interface configuration interface; the configuration information comprises identification information of a DIO interface to be configured and state information configured for the DIO interface;
the second information acquisition module is used for acquiring identification information of all DIO interfaces of the mainboard and physical addresses corresponding to the DIO interfaces according to the identification information of the mainboard;
the physical address acquisition module is used for acquiring a corresponding physical address of the DIO interface according to the identification information of the DIO interface to be configured;
and the configuration module is used for configuring the physical address of the DIO interface according to the state information configured for the DIO interface and the mapping relation between the preset state information and the address information.
9. An electronic device comprising a display, a processor, and a memory; characterized in that the memory stores a computer program adapted to be loaded by the processor and to execute the DIO interface configuration method based on Windows system as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the DIO interface configuration method based on the Windows system according to any one of claims 1 to 7.
CN202110158300.2A 2021-02-05 2021-02-05 DIO interface configuration method, device and equipment based on Windows system and storage medium Active CN112905512B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110158300.2A CN112905512B (en) 2021-02-05 2021-02-05 DIO interface configuration method, device and equipment based on Windows system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110158300.2A CN112905512B (en) 2021-02-05 2021-02-05 DIO interface configuration method, device and equipment based on Windows system and storage medium

Publications (2)

Publication Number Publication Date
CN112905512A true CN112905512A (en) 2021-06-04
CN112905512B CN112905512B (en) 2024-05-14

Family

ID=76122610

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110158300.2A Active CN112905512B (en) 2021-02-05 2021-02-05 DIO interface configuration method, device and equipment based on Windows system and storage medium

Country Status (1)

Country Link
CN (1) CN112905512B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113721765A (en) * 2021-08-26 2021-11-30 苏州浪潮智能科技有限公司 Method, device and equipment for controlling input/output port of equipment

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5564052A (en) * 1991-06-27 1996-10-08 Integrated Device Technology, Inc. Logically disconnectable virtual-to-physical address translation unit and method for such disconnection
US20030040881A1 (en) * 2001-08-14 2003-02-27 Perry Steger Measurement system including a programmable hardware element and measurement modules that convey interface information
US20070094427A1 (en) * 2005-10-26 2007-04-26 Hon Hai Precision Industry Co., Ltd. System and method for verifying the coupled locations of computer devices
WO2011107053A2 (en) * 2011-04-20 2011-09-09 华为终端有限公司 Configuration method for data interface and terminal device
US20130219093A1 (en) * 2012-02-21 2013-08-22 Zih Corp. Electrically Configurable Option Board Interface
US9128742B1 (en) * 2010-11-19 2015-09-08 Symantec Corporation Systems and methods for enhancing virtual machine backup image data
CN104950741A (en) * 2014-03-26 2015-09-30 洛克威尔自动控制技术股份有限公司 Multiple controllers configuration management interface for system connectivity
WO2016082755A1 (en) * 2014-11-25 2016-06-02 Hangzhou H3C Technologies Co., Ltd. Displaying setup interface
US20180074956A1 (en) * 2016-09-09 2018-03-15 Alibaba Group Holding Limited Method, apparatus, and electronic device for modifying memory data of a virtual machine
CN108334465A (en) * 2018-02-06 2018-07-27 深圳壹账通智能科技有限公司 Configuration method, device, equipment and the computer readable storage medium of communication interface
CN109614157A (en) * 2018-12-27 2019-04-12 联想(北京)有限公司 A kind of configuration method of system, device and storage medium
CN110399165A (en) * 2019-06-25 2019-11-01 苏州浪潮智能科技有限公司 A kind of display methods, device and the equipment of Onboard NIC network interface parameter
CN110770708A (en) * 2017-06-16 2020-02-07 阿里巴巴集团控股有限公司 Method and apparatus for hardware virtualization
CN110895518A (en) * 2019-07-01 2020-03-20 研祥智能科技股份有限公司 GPIO (general purpose input/output) interface configuration method and system
US20200145528A1 (en) * 2017-12-27 2020-05-07 Pax S&T Co.,Ltd. Terminal, service method and integrated identifier management system for integrated identifier and user interface
CN111786825A (en) * 2020-06-23 2020-10-16 京东数字科技控股有限公司 Method, device, system and storage medium for dynamically configuring interface service
CN111782330A (en) * 2020-07-07 2020-10-16 赞同科技股份有限公司 Web application-based page data acquisition method, device and equipment

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5564052A (en) * 1991-06-27 1996-10-08 Integrated Device Technology, Inc. Logically disconnectable virtual-to-physical address translation unit and method for such disconnection
US20030040881A1 (en) * 2001-08-14 2003-02-27 Perry Steger Measurement system including a programmable hardware element and measurement modules that convey interface information
US20070094427A1 (en) * 2005-10-26 2007-04-26 Hon Hai Precision Industry Co., Ltd. System and method for verifying the coupled locations of computer devices
US9128742B1 (en) * 2010-11-19 2015-09-08 Symantec Corporation Systems and methods for enhancing virtual machine backup image data
WO2011107053A2 (en) * 2011-04-20 2011-09-09 华为终端有限公司 Configuration method for data interface and terminal device
CN102216917A (en) * 2011-04-20 2011-10-12 华为终端有限公司 Configuration method for data interface and terminal device
US20130219093A1 (en) * 2012-02-21 2013-08-22 Zih Corp. Electrically Configurable Option Board Interface
CN104950741A (en) * 2014-03-26 2015-09-30 洛克威尔自动控制技术股份有限公司 Multiple controllers configuration management interface for system connectivity
WO2016082755A1 (en) * 2014-11-25 2016-06-02 Hangzhou H3C Technologies Co., Ltd. Displaying setup interface
US20180074956A1 (en) * 2016-09-09 2018-03-15 Alibaba Group Holding Limited Method, apparatus, and electronic device for modifying memory data of a virtual machine
CN110770708A (en) * 2017-06-16 2020-02-07 阿里巴巴集团控股有限公司 Method and apparatus for hardware virtualization
US20200145528A1 (en) * 2017-12-27 2020-05-07 Pax S&T Co.,Ltd. Terminal, service method and integrated identifier management system for integrated identifier and user interface
CN108334465A (en) * 2018-02-06 2018-07-27 深圳壹账通智能科技有限公司 Configuration method, device, equipment and the computer readable storage medium of communication interface
CN109614157A (en) * 2018-12-27 2019-04-12 联想(北京)有限公司 A kind of configuration method of system, device and storage medium
CN110399165A (en) * 2019-06-25 2019-11-01 苏州浪潮智能科技有限公司 A kind of display methods, device and the equipment of Onboard NIC network interface parameter
CN110895518A (en) * 2019-07-01 2020-03-20 研祥智能科技股份有限公司 GPIO (general purpose input/output) interface configuration method and system
CN111786825A (en) * 2020-06-23 2020-10-16 京东数字科技控股有限公司 Method, device, system and storage medium for dynamically configuring interface service
CN111782330A (en) * 2020-07-07 2020-10-16 赞同科技股份有限公司 Web application-based page data acquisition method, device and equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113721765A (en) * 2021-08-26 2021-11-30 苏州浪潮智能科技有限公司 Method, device and equipment for controlling input/output port of equipment
CN113721765B (en) * 2021-08-26 2023-07-25 苏州浪潮智能科技有限公司 Control method, device and equipment for input/output port of equipment

Also Published As

Publication number Publication date
CN112905512B (en) 2024-05-14

Similar Documents

Publication Publication Date Title
TWI480802B (en) Platform system, universal extension firmware interface Basic input and output system Support for hardware configuration changes, recording media and computer program products
US8108665B2 (en) Decoupled hardware configuration manager
CN100504784C (en) Optional ROM characterization method and device
CN108549532A (en) Webpage construction method, device, electronic equipment and storage medium
CN101819538A (en) The requests of operating systems in virtual machine is carried out in management
CN114153779B (en) I2C communication method, system, equipment and storage medium
CN110781067A (en) Method, device, equipment and storage medium for calculating starting time consumption
CN112905512B (en) DIO interface configuration method, device and equipment based on Windows system and storage medium
CN112068911A (en) Method, device, system, equipment and medium for generating electronic form
CN113485791B (en) Configuration method, access method, device, virtualization system and storage medium
CN112905373B (en) Startup abnormity detection method, device and system of OPS equipment and interactive flat plate
CN116346781B (en) Address space allocation method, server, electronic equipment and storage medium
CN111400035A (en) Video memory allocation method and device, electronic equipment and storage medium
CN1312583C (en) Simulation apparatus, simulation program, and recording medium
CN115878327A (en) Bus reservation method, device, server, electronic equipment and storage medium
CN111651194A (en) iOS-based adaptation method and device
CN114594945A (en) Method, device, system, equipment and medium for generating advanced popup selection frame
CN105468527A (en) Test method and device of assembly in application
CN112783562B (en) Display equipment selection method and device
CN112580086A (en) Access protection method, device, equipment and storage medium for configuration file
TWI795950B (en) Hard disk monitoring method, electronic device, and storage medium
CN114594946A (en) Method, device, system, equipment and medium for generating check box control
CN114692578A (en) Electronic form approval opinion generation method, device, equipment and storage medium
US10768942B1 (en) Option ROM dispatch policy configuration interface
CN113110876A (en) Method and device for running general software package based on android system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant