CN105808479A - Compatibility configuration method and dynamic configuration method of peripheral port, and electronic device - Google Patents

Compatibility configuration method and dynamic configuration method of peripheral port, and electronic device Download PDF

Info

Publication number
CN105808479A
CN105808479A CN201410849318.7A CN201410849318A CN105808479A CN 105808479 A CN105808479 A CN 105808479A CN 201410849318 A CN201410849318 A CN 201410849318A CN 105808479 A CN105808479 A CN 105808479A
Authority
CN
China
Prior art keywords
peripheral hardware
hardware information
peripheral
information
electronic installation
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.)
Pending
Application number
CN201410849318.7A
Other languages
Chinese (zh)
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.)
Shanghai Simcom Ltd
Original Assignee
Shanghai Simcom 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 Shanghai Simcom Ltd filed Critical Shanghai Simcom Ltd
Priority to CN201410849318.7A priority Critical patent/CN105808479A/en
Publication of CN105808479A publication Critical patent/CN105808479A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to a method for making multiple pieces of peripheral equipment compatible in the same terminal, and discloses a compatibility configuration method and a dynamic configuration method of a peripheral port, and an electronic device. The compatibility configuration method of the peripheral port comprises the following steps: obtaining peripheral information stored in the electronic device, wherein the peripheral information represents the type of peripheral equipment; adding the peripheral information into a kernel stored in the electronic device; in a kernel loading process, carrying out driver layer configuration corresponding to the peripheral equipment according to the peripheral information in the kernel; adding the peripheral information into system attribute information stored in the electronic device; and in a system initialization process, according to the peripheral information in the system attribution information, carrying out application layer configuration corresponding to the peripheral equipment. Therefore, the peripheral port has compatibility, at the time, the dimension of a PCBA (Printed Circuit Board Assembly) is reduced, hardware cost is lowered, and software maintenance cost is lowered.

Description

The compatible collocation method of peripheral port, Dynamic Configuration and electronic installation
Technical field
The present invention relates to multiple external equipment compatible method in same terminal, particularly to the compatible collocation method of a kind of peripheral port, to the Dynamic Configuration of peripheral hardware port compatibility and the electronic installation applying it.
Background technology
Due to the particularity of sector terminal, it is more diversified to the demand of external equipment, it is necessary to often updates and changes different types of external equipment.This results in or uses multiple printed circuit-board assembly (PCBA) to support, or compatible multiple external equipment in same PCBA, based on the consideration of hardware cost, often selects the latter.
But the equipment of compatibility is many, frequently can lead to PCBA board and become large-sized, affect terminal overall dimensions and outward appearance.In order to solve such contradiction, it is necessary for during hardware designs considering multiple external equipment multiplexing universal input output (GPIO) resource, the same external deck of multiplexing, multiplexing same flexible PCB (FPC) adapter.
But, this brings again another contradiction, the hardware resource of multiplexing need different software version supports in case hardware can normal operation, if but select different software versions to support, certainly will can strengthen again software maintenance cost, and extremely inconvenient.
Summary of the invention
It is an object of the invention to provide the compatible collocation method of a kind of peripheral port, Dynamic Configuration and electronic installation, the peripheral port making electronic installation can while compatible different types of external equipment, not only reduce PCBA size, reduce hardware cost, and reduce software maintenance cost.
For solving above-mentioned technical problem, embodiments of the present invention provide the compatible collocation method of a kind of peripheral port, it is applied to comprise the electronic installation of described peripheral port, described peripheral port can compatible different types of external equipment, comprise the steps of the peripheral hardware information obtaining described electronic installation internal reservoir, the type of external equipment described in described peripheral hardware information representation;Described peripheral hardware information is added in the kernel of described electronic installation internal reservoir;In loading in Kernel-Process, carry out configuring corresponding to the driving layer of described external equipment according to the described peripheral hardware information in described kernel;Described peripheral hardware information is added in the system property information of described electronic installation internal reservoir;In system initialization process, carry out configuring corresponding to the application layer of described external equipment according to the described peripheral hardware information in described system property information.
Embodiments of the present invention additionally provide the Dynamic Configuration of a kind of peripheral port, comprise the steps of reception peripheral hardware information and reset order to provide peripheral hardware information to reset interface;Reset interface from described peripheral hardware information and obtain and store the peripheral hardware information reseted;Apply electronic installation provided by the invention compatible collocation method to peripheral port in start process, described peripheral port is carried out compatible configuration.
Embodiments of the present invention additionally provide a kind of electronic installation, comprising can the peripheral port of compatible multiple external equipment, described electronic installation also comprises memorizer, comprise peripheral hardware information storage area, kernel memory area and system property memory block, be respectively used to store peripheral hardware information, kernel and system property information;Controller, is connected to described peripheral port and described memorizer.
In terms of existing technologies, memorizer comprises peripheral hardware information storage area to store peripheral hardware information to embodiment of the present invention;In start process, obtain the peripheral hardware information of described electronic installation internal reservoir, and carry out configuring corresponding to the driving layer of described external equipment and application layer configuration according to peripheral hardware information;Electronic installation can also receive peripheral hardware information and reset order to provide peripheral hardware information to reset interface, and resets interface from described peripheral hardware information and obtain and store the peripheral hardware information reseted so that peripheral port to be reconfigured.Thus so that the peripheral port of electronic installation while compatible different types of external equipment, can not only reduce PCBA size, reduce hardware cost, and reduce software maintenance cost.
Accompanying drawing explanation
Fig. 1 is the flow chart of the compatible collocation method of a kind of peripheral port according to first embodiment of the invention;
Fig. 2 is the flow chart of the Dynamic Configuration of a kind of peripheral port according to second embodiment of the invention;
Fig. 3 is the circuit block diagram of a kind of electronic installation according to second embodiment of the invention.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, the embodiments of the present invention are explained in detail.But, it will be understood by those skilled in the art that in each embodiment of the present invention, propose many ins and outs in order to make reader be more fully understood that the application.But, even without these ins and outs with based on the many variations of following embodiment and amendment, it is also possible to realize the application each claim technical scheme required for protection.
First embodiment of the present invention relates to a kind of electronic installation compatible collocation method to peripheral port in start process, and wherein, the peripheral port of electronic installation can compatible different types of external equipment.In present embodiment, electronic installation performs start process after receiving starting-up signal;And in this start process, completing the compatible configuration to peripheral port, idiographic flow is as it is shown in figure 1, comprise step S11 to step S15.
Step S11: obtain the peripheral hardware information of electronic installation internal reservoir.
Specifically, in the start process of electronic installation, before loading kernel, the Boot loader (Bootloader) of electronic installation obtains the peripheral hardware information of electronic installation internal reservoir.Wherein, the type of peripheral hardware information representation external equipment, peripheral hardware information is that designer is stored in the specific region within electronic installation in advance according to the actually used demand of this peripheral port.Such as, this peripheral port of electronic installation is used for connecting probe, and wherein the type of probe comprises one-dimensional scanning head and two-dimensional scan head.Actually used situation according to industry finds, on this electronic installation use one-dimensional scanning head account for 80% ratio, use two-dimensional scan head account for 10% ratio, and also have 10% electronic installation on do not use this peripheral port.Thus, the peripheral hardware information corresponding to probe is divided into three kinds: one-dimensional scanning head (1D), two-dimensional scan head (2D), do not use (unknow).From the foregoing, use one-dimensional scanning head to account for the overwhelming majority, therefore, the peripheral hardware information stored in advance inside electronic installation is one-dimensional scanning head.But, this is not intended to be limited in any by the present invention, and peripheral port can be configured to other different types of external equipment compatible by those skilled in the art according to actual needs, and presets different peripheral hardware information.
Step S12: peripheral hardware information is added in the kernel of electronic installation internal reservoir.
Specifically, electronic installation internal reservoir has in kernel and kernel to comprise cmdline (kernel order line), and wherein, cmdline is a variable in kernel, preserves the multiple configuration informations needed in kernel loads process in cmdline.This peripheral hardware information is added in cmdline after obtaining peripheral hardware information by electronic installation, and its form is such as scanner_type=1D, namely represents that peripheral hardware information is one-dimensional scanning head.
Step S13: in loading in Kernel-Process, carry out configuring corresponding to the driving layer of external equipment according to the peripheral hardware information in kernel.
Specifically, after adding peripheral hardware information to cmdline, electronic installation starts to load kernel.In loading procedure, parsing cmdline to obtain multiple configuration information, is comprised the peripheral hardware information added in step S12 by electronic installation in multiple configuration informations.Electronic installation preserves this peripheral hardware information and configures corresponding to the application layer of external equipment according to the loading of this peripheral hardware information.Wherein, the layer configuration that drive corresponding to external equipment includes the configuration of configuration and device drives of the configuration of each pin of external-connected port, power supply.Substantial, in loading in Kernel-Process, electronic installation first configures each pin of the external-connected port corresponding to external equipment and power supply;The device drives corresponding to external equipment is loaded further according to peripheral hardware information.That is, different types of external equipment is corresponding to different device drives, and electronic installation external equipment representated by peripheral hardware information loads corresponding device drives.Such as, when peripheral hardware information is one-dimensional scanning head, loads one-dimensional scanning head and drive;When peripheral hardware information is two-dimensional scan head, loads two-dimensional scan head and drive;When peripheral hardware information is not for using, it is not loaded with associated drives.
Step S14: peripheral hardware information is added in the system property information of electronic installation internal reservoir.
Specifically, after kernel loads completes and before entering system initialization, electronic installation parses this peripheral hardware information by cmdline, and this peripheral hardware information is added in the system property information of electronic installation internal reservoir.Wherein, system property information comprises the multiple system property values needed in system initialization process.
Step S15: in system initialization process, carries out configuring corresponding to the application layer of external equipment according to the peripheral hardware information in system property information.
Specifically, after peripheral hardware information adds system property information to, enter system initialisation phase.In system initialization process, electronic installation obtains the peripheral hardware information in system property information by system interface and produces the system property value corresponding to this external equipment, such as ro.scannertype=1D (the peripheral hardware information in present embodiment is one-dimensional scanning head), thus, electronic installation carries out configuring corresponding to the application layer of external equipment according to this peripheral hardware information.Wherein, the configuration including at least the system service program corresponding to external equipment and the configuration that program is set are configured corresponding to the application layer of external equipment.Such as, when peripheral hardware information is one-dimensional scanning head, starts one-dimensional scanning head service routine and one-dimensional scanning head be installed program is set;When peripheral hardware information is two-dimensional scan head, starts two-dimensional scan head service routine and two-dimensional scan head be installed program is set;When peripheral hardware information is not for using, it is not loaded with the configuration of related application layer.
Second embodiment of the present invention relates to the Dynamic Configuration of the peripheral port of a kind of electronic installation.That is, when the external equipment connected when the peripheral port of electronic installation changes, it is possible to again this peripheral port is carried out compatible configuration so that this peripheral port compatible can be different from the another type of external equipment of the peripheral hardware information of its internal reservoir.In present embodiment, electronic installation realizes the dynamic configuration to peripheral port in running.Idiographic flow is as in figure 2 it is shown, comprise step S21 to step S25.
Step S21: receive peripheral hardware information and reset order to provide peripheral hardware information to reset interface.That is, electronic installation receives the peripheral hardware information of user's input and resets order, and resets order display peripheral hardware information according to this peripheral hardware information and reset interface.Wherein, this peripheral hardware information is reseted the form of order and can be preset by inside electronic installation;Such as: it can be the private mark " * * 72268973## " inputted by dial that this peripheral hardware information resets order.Peripheral hardware information is reseted interface and is comprised peripheral hardware information display unit and reset unit.But this is not intended to be limited in any by the present invention.
Step S22: obtain the peripheral hardware information of electronic installation internal reservoir to be shown in peripheral hardware information display unit.
That is, electronic installation obtains the peripheral hardware information of its internal reservoir and is shown in peripheral hardware information display unit.Thus, user it will be seen that Current electronic device internal reservoir peripheral hardware information, to confirm according to actual needs the need of reseting peripheral hardware information.Reset unit for resetting peripheral hardware information for user's input.
Step S23: obtain and store the peripheral hardware information reseted from reseting unit.That is, electronic installation obtains unit and stores the peripheral hardware information that user resets from reseting, and, the internal original peripheral hardware information stored of the peripheral hardware information overlay electronic device reseted.
Step S24: produce to turn back on signal command to turn back on.
Step S25: the application compatible collocation method to peripheral port in start process of the electronic installation described in first embodiment of the invention, carries out compatible configuration again to this peripheral port.Thus, this peripheral port can support another type of external device.This step as described for the first embodiment of the invention, repeats no more herein.
The step of various methods divides above, is intended merely to description clear, it is achieved time can be merged into a step or some step is split, and is decomposed into multiple step, as long as comprising identical logical relation, all in the protection domain of this patent;To adding inessential amendment in algorithm or in flow process or introducing inessential design, but do not change the core design of its algorithm and flow process all in the protection domain of this patent.
Third embodiment of the invention relates to a kind of electronic installation, as shown in Figure 3.Electronic installation comprises: peripheral port 1, memorizer 2, controller 4, display 5 and input equipment 6, and controller 4 is electrically connected at peripheral port 1, memorizer 2, display 5 and input equipment 6.But, this is not intended to be limited in any by the present invention.
In present embodiment, peripheral port 1 is used for connecting external equipment and can compatible different types of external equipment.Memorizer 2 comprises peripheral hardware information storage area 21, kernel memory area 22 and system property memory block 23, is respectively used to store peripheral hardware information, kernel and system property information.
In start process, peripheral port is carried out compatible configuration by electronic installation, and concrete grammar is as follows.Controller 4 obtains peripheral hardware information from peripheral hardware memory block 21, and peripheral hardware information is added in the kernel of kernel memory area, and in loading in Kernel-Process, controller 4 carries out configuring corresponding to the driving layer of external equipment according to peripheral hardware information;Peripheral hardware information is added in the system property information of system property memory block 23 by controller 4, and in initialization procedure, controller 4 carries out configuring corresponding to the application layer of external equipment according to the peripheral hardware information in system property information.
When the external equipment that the peripheral port of electronic installation connects changes, it is necessary to this peripheral port carries out compatible configuration again, and in running, this peripheral port is dynamically configured by electronic installation, and concrete grammar is as follows.User resets order by input equipment 6 input peripheral information, and controller 4 resets order according to the peripheral hardware information received provides peripheral hardware information to reset interface, and is shown by display 5.Wherein, peripheral hardware information is reseted interface and is comprised peripheral hardware information display unit and reset unit.Controller 4 obtains the peripheral hardware information of its internal reservoir and is shown in peripheral hardware information display unit;User inputs the peripheral hardware information reseted in reseting in unit, controller 4 is from reseting the peripheral hardware information that user resets that obtains unit, and stores this peripheral hardware information reseted to peripheral hardware information storage area 21 to cover the peripheral hardware information of original storage;Meanwhile, controller 4 produces to turn back on order, so that electronic installation turns back on, thus peripheral port carries out compatible configuration again.
It is seen that, present embodiment is the system embodiment corresponding with first, second embodiment, and present embodiment can be worked in coordination enforcement with first, second embodiment.The relevant technical details mentioned in first, second embodiment is still effective in the present embodiment, in order to reduce repetition, repeats no more here.Correspondingly, the relevant technical details mentioned in present embodiment is also applicable in the first embodiment.
It is noted that each module involved in present embodiment is logic module, in actual applications, a logical block can be a physical location, it is also possible to be a part for a physical location, it is also possible to realize with the combination of multiple physical locations.Additionally, for the innovative part highlighting the present invention, do not introduced by the unit less close with solving technical problem relation proposed by the invention in present embodiment, but this is not intended that in present embodiment to be absent from other unit.
It will be understood by those skilled in the art that the respective embodiments described above are to realize specific embodiments of the invention, and in actual applications, it is possible in the form and details it is done various change, without departing from the spirit and scope of the present invention.

Claims (9)

1. a compatible collocation method for peripheral port, is applied to comprise the electronic installation of described peripheral port, and described peripheral port can compatible different types of external equipment, it is characterised in that in start process, comprise the steps of
Obtain the peripheral hardware information of described electronic installation internal reservoir, the type of external equipment described in described peripheral hardware information representation;
Described peripheral hardware information is added in the kernel of described electronic installation internal reservoir;
In loading in Kernel-Process, carry out configuring corresponding to the driving layer of described external equipment according to the described peripheral hardware information in described kernel;
Described peripheral hardware information is added in the system property information of described electronic installation internal reservoir;
In system initialization process, carry out configuring corresponding to the application layer of described external equipment according to the described peripheral hardware information in described system property information.
2. the compatible collocation method of peripheral port according to claim 1, it is characterised in that drive layer configuration including at least the configuration of the configuration of each pin of described external-connected port, the configuration of power supply and device drives corresponding to described external equipment.
3. the compatible collocation method of peripheral port according to claim 1, it is characterised in that the application layer corresponding to described external equipment configures the configuration including at least the system service corresponding to described external equipment and the configuration arranging program.
4. the compatible collocation method of peripheral port according to claim 1, it is characterised in that described peripheral hardware information comprises one-dimensional scanning head or two-dimensional scan head.
5. the Dynamic Configuration of a peripheral port, it is characterised in that comprise the steps of
Receive peripheral hardware information and reset order to provide peripheral hardware information to reset interface;
Reset interface from described peripheral hardware information and obtain and store the peripheral hardware information reseted;
The compatible collocation method of application peripheral port according to any one of Claims 1-4, carries out compatible configuration to described peripheral port.
6. the Dynamic Configuration of the peripheral port according to claim 5, it is characterised in that: described peripheral hardware information is reseted interface and is comprised peripheral hardware information display unit and reset unit;
Order is reseted, after the step that provides peripheral hardware information and reset interface, also to comprise: obtain the peripheral hardware information of described electronic installation internal reservoir and be shown in described peripheral hardware information display unit in described reception peripheral hardware information;
Reset interface from described peripheral hardware information to obtain and store the step of the peripheral hardware information reseted and be: obtain and store, from described unit of reseting, the peripheral hardware information reseted.
7. the Dynamic Configuration of the peripheral port according to claim 5, it is characterised in that: after reseting, from described peripheral hardware information, the step that interface obtained and stored the peripheral hardware information reseted, also comprise:
Generation turns back on order so that electronic installation turns back on.
8. an electronic installation, comprising can the peripheral port of compatible multiple external equipment, it is characterised in that described electronic installation also comprises:
Memorizer, comprises peripheral hardware information storage area, kernel memory area and system property memory block, is respectively used to store peripheral hardware information, kernel and system property information;And
Controller, is connected to described peripheral port and described memorizer,
Wherein, in start process, described controller obtains described peripheral hardware information from described peripheral hardware memory block, and described peripheral hardware information is added in the described kernel of described kernel memory area, in loading in Kernel-Process, described controller carries out configuring corresponding to the driving layer of described external equipment according to the described peripheral hardware information in described kernel, described peripheral hardware information is added in the described system property information of described system property memory block by described controller, in system initialization process, described controller carries out configuring corresponding to the application layer of described external equipment according to the described peripheral hardware information in described system property information.
9. electronic installation according to claim 8, it is characterized in that, described electronic installation also comprises display and input equipment, it is connected to described controller, described input equipment resets order for input peripheral information, described controller resets order according to the described peripheral hardware information received provides peripheral hardware information to reset interface, and described display is used for showing that described peripheral hardware information resets interface.
CN201410849318.7A 2014-12-29 2014-12-29 Compatibility configuration method and dynamic configuration method of peripheral port, and electronic device Pending CN105808479A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410849318.7A CN105808479A (en) 2014-12-29 2014-12-29 Compatibility configuration method and dynamic configuration method of peripheral port, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410849318.7A CN105808479A (en) 2014-12-29 2014-12-29 Compatibility configuration method and dynamic configuration method of peripheral port, and electronic device

Publications (1)

Publication Number Publication Date
CN105808479A true CN105808479A (en) 2016-07-27

Family

ID=56420422

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410849318.7A Pending CN105808479A (en) 2014-12-29 2014-12-29 Compatibility configuration method and dynamic configuration method of peripheral port, and electronic device

Country Status (1)

Country Link
CN (1) CN105808479A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6560660B1 (en) * 1999-06-07 2003-05-06 Microsoft Corporation Facilitating communications port sharing
CN1538311A (en) * 2003-04-15 2004-10-20 ������������ʽ���� Contrl metod, controlled device and control system
CN1734423A (en) * 2004-08-10 2006-02-15 兄弟工业株式会社 Computer-readable program product, process and apparatus for installing device driver
CN1975701A (en) * 2006-12-22 2007-06-06 中国建设银行股份有限公司 Master machine driving external equipment method and system
CN102622312A (en) * 2011-12-19 2012-08-01 广东步步高电子工业有限公司 Method for automatically identifying driving devices
CN103500113A (en) * 2013-10-12 2014-01-08 上海斐讯数据通信技术有限公司 Compatibility method and system of peripheral equipment of mobile terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6560660B1 (en) * 1999-06-07 2003-05-06 Microsoft Corporation Facilitating communications port sharing
CN1538311A (en) * 2003-04-15 2004-10-20 ������������ʽ���� Contrl metod, controlled device and control system
CN1734423A (en) * 2004-08-10 2006-02-15 兄弟工业株式会社 Computer-readable program product, process and apparatus for installing device driver
CN1975701A (en) * 2006-12-22 2007-06-06 中国建设银行股份有限公司 Master machine driving external equipment method and system
CN102622312A (en) * 2011-12-19 2012-08-01 广东步步高电子工业有限公司 Method for automatically identifying driving devices
CN103500113A (en) * 2013-10-12 2014-01-08 上海斐讯数据通信技术有限公司 Compatibility method and system of peripheral equipment of mobile terminal

Similar Documents

Publication Publication Date Title
CN103281689B (en) Method for network switching and version upgrading and terminal equipment
CN110908682B (en) Firmware upgrading method and system for vehicle controller, vehicle and storage medium
CN112256348B (en) Cloud service platform creation method and system, electronic equipment and storage medium
CN104239098A (en) Automatic software upgrading method and device and mobile terminal
CN106648563B (en) Dependency decoupling processing method and device for shared module in application program
CN104636165A (en) Mobile equipment starting method and device
US11880695B2 (en) Plug-in implementation method and plug-in implementation system
CN104267981A (en) Method and device for loading application layout on desktop
CN103425234B (en) The method of dynamic adjustments image procossing performance and display terminal
CN106325879A (en) Method and device for installing driver and electronic equipment
CN105511936A (en) Test system, method and device
CN105677445A (en) Application installation managing method, device and intelligent terminal
CN105068747A (en) Generation method and device of desktop member
CN105138352A (en) Method and apparatus for installing application plugins
CN104978378A (en) Webpage access method and device
CN111092626B (en) Antenna adjusting method and device and terminal equipment
CN104133701A (en) Application installation method and device
CN105323309A (en) Method and device for pushing bubble resources
CN103079107A (en) Loading method for operating system of set top box and set top box
CN105138365A (en) Upgrading method and device for interface converter
CN105573796A (en) Function switching method and function switching device for FPGA
CN105808479A (en) Compatibility configuration method and dynamic configuration method of peripheral port, and electronic device
CN105813138A (en) Information processing method and first electronic device
CN105159714A (en) PMIC initialization method and electronic equipment
CN105373384A (en) Software development method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160727

WD01 Invention patent application deemed withdrawn after publication