CN106897244A - A kind of expansion module recognition methods and device - Google Patents
A kind of expansion module recognition methods and device Download PDFInfo
- Publication number
- CN106897244A CN106897244A CN201710117278.0A CN201710117278A CN106897244A CN 106897244 A CN106897244 A CN 106897244A CN 201710117278 A CN201710117278 A CN 201710117278A CN 106897244 A CN106897244 A CN 106897244A
- Authority
- CN
- China
- Prior art keywords
- expansion module
- interface
- gpio interface
- gpio
- module
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
Abstract
A kind of expansion module recognition methods and device are the embodiment of the invention provides, including:First kind GPIO interface is configured to input state, the first kind GPIO interface is to be connected with the expansion module and as the GPIO interface of output interface, then the level signal of the first kind GPIO interface is read, the level signal finally according to the first kind GPIO interface determines the type of the expansion module.First kind GPIO is output interface in the embodiment of the present invention, for carrying out data transmission with expansion module, the level signal of first kind GPIO interface is read after first kind GPIO interface is configured into input state to determine the type of expansion module, it is achieved thereby that the multiplexing of first kind GPIO interface, has saved the resource of GPIO interface.
Description
Technical field
The present embodiments relate to electronic device field, more particularly to a kind of expansion module recognition methods and device.
Background technology
In the electronic equipment of prior art, a system is often to that should have different types of external expansion module, and these
Otherness between external expansion module may only be merely different way or number of ports, such as in security protection or onboard system,
It is frequently necessary to use external alert input/output module.Under normal circumstances different clients to alarm way and demand less
Cause, some need 4 tunnels to be input into the output of 2 tunnels, some need 8 tunnels to be input into the output of 3 tunnels again, and going back some may just should not alarm module.
Based on such applicable cases, security protection or onboard system need flexibly to recognize the information and classification of external expansion module.Existing skill
The main judgment mechanism by software is come the type of automatic identification external module in art, particular by multigroup universal input/defeated
Go out (General Purpose Input Output, referred to as GPIO) mouth to be combined to know external expansion module
Not, wherein being 2 using the quantity that GPIO interface is combined identification external expansion moduleN, N is the quantity of GPIO interface.When outer
When the quantity of portion's expansion module is more, GPIO interface for recognizing external expansion module be accomplished by it is more, but system
The quantity of GPIO interface is limited, and GPIO interface is mainly used in the data transfer between system and external expansion module,
So as to when the species of external expansion module is a lot, specially for identification expansion module, distributing other GPIO interfaces causes GPIO
The waste of interface.
The content of the invention
The embodiment of the present invention provides a kind of expansion module recognition methods and device, is used to solve in the prior art for identification is expanded
Open up the problem that the type of module is specially distributed GPIO interface and causes GPIO interface to waste.
The embodiment of the present invention provides a kind of expansion module recognition methods, including:
First kind GPIO interface is configured to input state, the first kind GPIO interface is to be connected with the expansion module
And as the GPIO interface of output interface;
Read the level signal of the first kind GPIO interface;
Level signal according to the first kind GPIO interface determines the type of the expansion module.
Alternatively, the level signal according to the first kind GPIO interface determines the type of the expansion module, including:
The level signal of the first kind GPIO interface is contrasted with preset reference;
It is true according to the preset reference when the level signal of the first kind GPIO interface is matched with the preset reference
The type of the fixed expansion module.
Alternatively, also include:
When the level signal of the first kind GPIO interface is mismatched with the preset reference, by Equations of The Second Kind GPIO interface
IC bus IIC interfaces are configured to, the Equations of The Second Kind GPIO interface is in addition to the first kind GPIO interface, with the expansion
Exhibition module is connected and as the GPIO interface of input interface;
The memory block of the expansion module is read by the IIC interfaces, the memory block preserves the expansion module
Type information.
Alternatively, it is described the type of the expansion module is determined according to the preset reference after, also include:
The first kind GPIO interface is configured as output to state;
The pending data that expansion module described in type of process according to the expansion module is uploaded;
By the first kind GPIO interface by result data is activation to the expansion module.
Alternatively, after the memory block by the IIC interfaces reading expansion module, also include:
The pending data uploaded by expansion module described in the IIC interfaces;
The pending data that expansion module described in type of process according to the expansion module is uploaded;
By the IIC interfaces by result data is activation to the expansion module.
Correspondingly, a kind of mainboard is the embodiment of the invention provides, including:Processor, first kind GPIO interface and Equations of The Second Kind
GPIO interface;The first kind GPIO interface is the output interface being connected with expansion module, the Equations of The Second Kind GPIO interface with expand
The input interface of exhibition module connection;
Each first kind GPIO interface in the first kind GPIO interface is respectively equipped with pull-up resistor;
The processor, for when the first kind GPIO interface is configured to input state;Read the first kind
The level signal of GPIO interface;Level signal according to the first kind GPIO interface determines the type of the expansion module, institute
The level signal of first kind GPIO interface is stated by the upper of the pull down resistor in the expansion module and the first kind GPIO interface
Pull-up resistor is determined.
Alternatively, the processor is additionally operable to for the Equations of The Second Kind GPIO interface to be configured to IC bus IIC interfaces;
The memory block of the expansion module is read by the IIC interfaces, the memory block preserves the type information of the expansion module.
Alternatively, the mainboard is provided with six GPIO interfaces, and the first output interface and the second output interface are described the
One class GPIO interface, with the extension in the first input interface, the second input interface, the 3rd input interface and the 4th input interface
The input interface of module connection is the Equations of The Second Kind GPIO interface;
First output interface and second output interface are respectively equipped with the first pull-up resistor and the second pull-up resistor;
The processor, if the voltage and second output interface of first output interface specifically for reading
Voltage is high voltage, then the not connected expansion module of the mainboard;If the voltage of first output interface for reading and described
The voltage of the second output interface is low-voltage, then the expansion module of the mainboard connection is first kind expansion module;If reading
First output interface voltage for the voltage of low-voltage and second output interface be high voltage, then the mainboard connects
The expansion module for connecing is Equations of The Second Kind expansion module;If the voltage of first output interface for reading is high voltage and described second
The voltage of output interface is low-voltage, then the expansion module of the mainboard connection is the 3rd class expansion module.
Alternatively, the processor is additionally operable to when it is determined that the expansion module is the 3rd class expansion module, by described the
Two class GPIO interfaces are configured to IIC interfaces, and the memory block of the expansion module, the memory block are read by the IIC interfaces
Preserve the type information of the expansion module.
Correspondingly, also a kind of expansion module identifying device of the embodiment of the present invention, including:
Configuration module, for first kind GPIO interface to be configured into input state, the first kind GPIO interface is and institute
State expansion module connection and the GPIO interface in output state;
Read module, the level signal for reading the first kind GPIO interface;
Processing module, the type for determining the expansion module according to the level signal of the first kind GPIO interface.
Alternatively, the processing module specifically for:
The level signal of the first kind GPIO interface is contrasted with preset reference;
It is true according to the preset reference when the level signal of the first kind GPIO interface is matched with the preset reference
The type of the fixed expansion module.
Alternatively, the processing module is additionally operable to:
When the level signal of the first kind GPIO interface is mismatched with the preset reference, by Equations of The Second Kind GPIO interface
Middle any two GPIO interface is configured to IC bus IIC interfaces, and the Equations of The Second Kind GPIO interface is except the first kind
Outside GPIO interface, it is connected with the expansion module and as the GPIO interface of input interface;
The memory block of the expansion module is read by the IIC interfaces, the memory block preserves the expansion module
Type information.
Alternatively, the processing module is additionally operable to:
After determining the type of the expansion module according to the preset reference, the first kind GPIO interface is configured to
Output state;
The pending data that expansion module described in type of process according to the expansion module is uploaded;By described
First kind GPIO interface is by result data is activation to the expansion module.
Alternatively, the processing module is additionally operable to:
After memory block by the IIC interfaces reading expansion module, expand by described in the IIC interfaces
The pending data that exhibition module is uploaded;
The pending data that expansion module described in type of process according to the expansion module is uploaded;
By the IIC interfaces by result data is activation to the expansion module.
The embodiment of the present invention shows that first kind GPIO interface is configured into input state, and the first kind GPIO interface is
It is connected with the expansion module and as the GPIO interface of output interface, then reads the level letter of the first kind GPIO interface
Number, the level signal finally according to the first kind GPIO interface determines the type of the expansion module.In the embodiment of the present invention
First kind GPIO is output interface, defeated by the way that first kind GPIO interface is configured to for carrying out data transmission with expansion module
Enter to read after state the level signal of first kind GPIO interface to determine the type of expansion module, it is achieved thereby that first kind GPIO
The multiplexing of interface, has saved the resource of GPIO interface.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, below will be to that will make needed for embodiment description
Accompanying drawing is briefly introduced.
Fig. 1 is a kind of schematic flow sheet of expansion module recognition methods provided in an embodiment of the present invention;
Fig. 2 is the schematic flow sheet of another expansion module recognition methods provided in an embodiment of the present invention;
Fig. 3 is a kind of structural representation of mainboard provided in an embodiment of the present invention;
Fig. 4 is a kind of structural representation of mainboard provided in an embodiment of the present invention;
Fig. 5 is a kind of structural representation of expansion module identifying device provided in an embodiment of the present invention.
Specific embodiment
In order that the purpose of the present invention, technical scheme and beneficial effect become more apparent, below in conjunction with accompanying drawing and implementation
Example, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only used to explain this hair
It is bright, it is not intended to limit the present invention.
In the embodiment of the present invention
Fig. 1 property shows a kind of flow of expansion module recognition methods provided in an embodiment of the present invention, and the flow can be with
Performed by expansion module identifying device.
As shown in figure 1, the specific steps of the flow include:
Step S101, input state is configured to by first kind GPIO interface;
Step S102, reads the level signal of first kind GPIO interface;
Step S103, the level signal according to first kind GPIO interface determines the type of expansion module.
First kind GPIO interface is to be connected with expansion module and as the GPIO interface of output interface in above-described embodiment.Tool
During body is implemented, the first kind GPIO interface default setting on mainboard is output interface, the result data for exporting mainboard.
The first kind GPIO interface on mainboard can be configured to input state on mainboard during electricity;Can also on mainboard electricity and examine
After having measured expansion module access, first kind GPIO interface is configured to input state.Due to result number will be originally used for
It is used to recognize the type of expansion module according to the GPIO interface of output, therefore need not specially in order to the identification of expansion module distributes other
GPIO interface, so as to save GPIO interface resource.
Specifically, when the type of expansion module is determined according to the level signal of first kind GPIO interface, first by first
The level signal of class GPIO interface is contrasted with preset reference, in level signal and the preset reference of first kind GPIO interface
Timing, the type of expansion module is determined according to preset reference, and preset reference determines according to actual conditions.The embodiment of the present invention is provided
A kind of example of the type for determining expansion module, set on mainboard that to have two GPIO interfaces be first kind GPIO interface, distinguishes
It is GPIO1 and GPIO2.Mainboard is when the level signal of first kind GPIO interface is read, in fact it could happen that 4 kinds of situations, specific such as table 1
It is shown,
The level signal example of the first kind GPIO interface of table 1
GPIO1 | GPIO2 | |
Situation one | 1 | 1 |
Situation two | 0 | 1 |
Situation three | 0 | 0 |
Situation four | 1 | 0 |
Wherein, 1 high level is represented, 0 represents low level.
When determining to have on mainboard two first kind GPIO interfaces, setting preset reference is as shown in table 2:
The preset reference example of table 2
GPIO1 | GPIO2 | Matching state | Correspondence expansion module type |
1 | 1 | Matching | Do not connect expansion module |
0 | 1 | Matching | Expansion module 1 |
0 | 0 | Matching | Expansion module 2 |
1 | 0 | Mismatch | Other expansion modules |
Wherein, 1 high level is represented, 0 represents low level.
As shown in Table 2, the level signal of GPIO1 and GPIO2 be 11,01,00 when, the level signal of GPIO1 and GPIO2 with
Preset reference is matched;When the level signal of GPIO1 and GPIO2 is 01, the level signal of GPIO1 and GPIO2 is with preset reference not
Matching.According to table 2 correspondence can draw GPIO1 and GPIO2 level signal be 11 when, mainboard does not have external expansion module;
When the level signal of GPIO1 and GPIO2 is 01, the external expansion module 1 of mainboard;When the level signal of GPIO1 and GPIO2 is 00,
The external expansion module 2 of mainboard;When the level signal of GPIO1 and GPIO2 is 10, other external expansion modules of mainboard, but expand
The particular type for opening up module does not know.In specific implementation, the input interface of expansion module A and the GPIO1 and GPIO2 of mainboard are set
After connection, the level signal that mainboard reads GPIO1 and GPIO2 is 00, then the type that can draw expansion module A according to table 2 is
Expansion module 2.Determined by above-described embodiment after the type of expansion module, be configured as output to for first kind GPIO interface by mainboard
State;Then the pending data that the type of process expansion module according to expansion module is uploaded;Will by first kind GPIO interface
Result data is activation is to expansion module, therefore first kind GPIO interface can be also used for after for recognizing expansion module type
The result data of mainboard are exported, so as to save the resource of GPIO interface.
In specific implementation, when the level signal of first kind GPIO interface is mismatched with preset reference, then by Equations of The Second Kind
GPIO interface is configured to IC bus IIC interfaces;The memory block of expansion module is read by IIC interfaces, memory block preserves
The type information of expansion module, wherein Equations of The Second Kind GPIO interface are to be connected with expansion module in addition to first kind GPIO interface and conduct
The GPIO interface of input interface.The embodiment of the present invention provides another example for determining expansion module type, setting expansion module B
Be according to preset reference can not certain type of expansion module, then pre-set memory block on extension blocks B for storing extension
The memory block of the type information of module B, wherein expansion module can be EEPROM (Electrically
Erasable Programmable Read-Only Memory, abbreviation EEPROM), it is also possible to monolithic is set in expansion module
Movement piece, the memory block in singlechip chip is used for preserve expansion module type information.Pre-set on expansion module B simultaneously
There are three interfaces, two of which output interface is connected with two Equations of The Second Kind GPIO interfaces on mainboard, two on mainboard second
Class GPIO interface is respectively GPIO3 and GPIO4;Another interface is connected with the GPIO1 in first kind GPIO interface on mainboard.
After expansion module B is connected with mainboard, electricity reads the level signal of GPIO1 and GPIO2 on mainboard, obtains level signal and is combined as
10.The GPIO1 and the level signal of GPIO2 that can be drawn according to table 2 are mismatched with preset reference, then mainboard by GPIO3 and
GPIO4 is configured to IIC interfaces, the expansion module B for then being preserved in memory block of the mainboard by IIC interfaces reading expansion module B
Type information, the type of expansion module B is then determined according to the type information for reading.Expanded mode is determined by above-described embodiment
After the type of block, the pending data that mainboard is uploaded by IIC interfaces expansion module, then according to the type of expansion module
The pending data that treatment expansion module is uploaded, finally by IIC interfaces by result data is activation to expansion module.This hair
When expansion module is matched with preset reference, mainboard determines the class of expansion module according to the level signal of GPIO interface to bright embodiment
Type, therefore memory block need not be set in expansion module, the structure of expansion module is on the one hand simplified, on the other hand reduce expansion
Open up the cost of module.When expansion module and preset reference are mismatched, mainboard reads the class of expansion module by configuring IIC interfaces
Type information simultaneously determines expansion module type, therefore mainboard need not additionally increase GPIO interface for recognizing expansion module, so that real
The external expansion module that all kinds are recognized using limited GPIO interface is showed.
In order to preferably explain the embodiment of the present invention, describe the embodiment of the present invention below by specific implement scene and provide
A kind of expansion module recognition methods flow, as shown in Fig. 2 comprising the following steps:
Step S201, electricity on mainboard;
Step S202, input state is configured to by first kind GPIO interface;
Step S203, reads the level signal of first kind GPIO interface;
Step S204, judges whether the level signal of first kind GPIO interface matches with preset reference, if so, then performing step
Rapid S205, otherwise performs step S209;
Step S205, the type of expansion module is determined according to preset reference;
Step S206, state is configured as output to by first kind GPIO interface;
Step S207, the pending data that the type of process expansion module according to expansion module is uploaded;
Step S208, by first kind GPIO interface by result data is activation to expansion module;
Step S209, IC bus IIC interfaces are configured to by Equations of The Second Kind GPIO interface;
Step S210, the memory block of expansion module is read by IIC interfaces;
Step S211, the type of expansion module is determined according to the type information preserved in memory block;
Step S212, the pending data uploaded by IIC interfaces expansion module;
Step S213, the pending data that the type of process expansion module according to expansion module is uploaded;
Step S214, by IIC interfaces by result data is activation to expansion module.
Preset reference is set in the embodiment of the present invention, whether preset reference is met using software automatic identification expansion module,
When preset reference is met, the type of expansion module is directly determined using the level signal of GPIO interface, do not meeting default base
On time, read the type information of expansion module using IIC interfaces and determine expansion module type, it is achieved thereby that all kinds of expanded modes
The flexible configuration of block and identification.
Above method flow is introduced in order to clearer, the embodiment of the present invention provides a kind of example of mainboard, the knot of mainboard
Structure is as shown in Figure 3.
The mainboard 101 includes:Processor 1011, first kind GPIO interface 1012 and Equations of The Second Kind GPIO interface 1013;It is described
First kind GPIO interface 1012 is the output interface being connected with expansion module 102, the Equations of The Second Kind GPIO interface 1013 with extension
The input interface of the connection of module 102;Each first kind GPIO interface 1012 in the first kind GPIO interface 1012 sets respectively
There is pull-up resistor 103;
The processor 1011, for the first kind GPIO interface 1012 to be configured into input state when upper electric;Read
Take the level signal of the first kind GPIO interface 1012;Level signal according to the first kind GPIO interface 1012 determines institute
The type of expansion module 102 is stated, the level signal of the first kind GPIO interface 1012 is by drop-down in the expansion module 102
The pull-up resistor 103 of resistance 1021 and the first kind GPIO interface is determined.
The processor 1011 is additionally operable to for the Equations of The Second Kind GPIO interface 1013 to be configured to IC bus IIC to connect
Mouthful;The memory block of the expansion module 102 is read by the IIC interfaces, the memory block preserves the expansion module 102
Type information.
Further, as shown in figure 4, mainboard 101 is provided with six GPIO interfaces, the first output interface 10121 and second
Output interface 10122 is the first kind GPIO interface, and the first input interface 10131, the second input interface the 10132, the 3rd are defeated
The input interface being connected with the expansion module 102 in the input interface 10134 of incoming interface 10133 and the 4th is the Equations of The Second Kind
GPIO interface, such as the delivery outlet of expansion module 102 are connected with the first input interface 10131, the second input interface 10132, then
First input interface 10131, the second input interface 10132 are determined into Equations of The Second Kind GPIO interface;
First output interface 10121 and second output interface 10122 are respectively equipped with the first pull-up resistor 1031
With the second pull-up resistor 1032;The first pull down resistor 10211 and the second pull down resistor 10212 are provided with the expansion module 102.
In specific implementation, if the first output interface 10121 is connected with expansion module 102, the voltage of the first output interface 10121 according to
The voltage at the two ends of the first pull down resistor 10211 determines.If the first output interface 10121 disconnects with expansion module 102, first is defeated
The voltage of outgoing interface 10121 determines according to the voltage at the two ends of the first pull-up resistor 1031.Similarly, second output interface 10122
Voltage can determine according to same method.
If the voltage and second output interface of first output interface 10121 that the processor 1011 reads
10122 voltage is high voltage, then the mainboard 101 is not connected with expansion module 102;If first output interface for reading
The voltage of 10121 voltage and second output interface 10122 is low-voltage, then the expanded mode of the connection of the mainboard 101
Block 102 is first kind expansion module;If the voltage of first output interface 10121 for reading is low-voltage and described second defeated
The voltage of outgoing interface 10122 is high voltage, then the expansion module 102 of the connection of the mainboard 101 is Equations of The Second Kind expansion module;If reading
The voltage of first output interface 10121 for taking is low-voltage for the voltage of high voltage and second output interface 10122,
Then the expansion module 102 of the connection of the mainboard 101 is the 3rd class expansion module.
It is that first kind expansion module and Equations of The Second Kind expand that the processor 1011 is set in advance in the determination expansion module 102
During exhibition module, the processor 1011 directly processes the pending number of the upload of expansion module 102 according to the type of expansion module 102
According to.The processor 1011 it is determined that the expansion module 102 be the 3rd class expansion module when, by the Equations of The Second Kind GPIO interface
IIC interfaces are configured to, the memory block of the expansion module 102 is read by the IIC interfaces, the memory block preserves the expansion
Open up the type information of module.In specific implementation, if the delivery outlet of expansion module 102 and the first input interface 10131, second are input into
Interface 10132 is connected, then the first input interface 10131, the second input interface 10132 are configured into IIC interfaces, is connect by IIC
Mouth reads the particular type of determination expansion module 102 after expansion module type information.
By being multiplexed six fixed GPIO interfaces in the embodiment of the present invention, pre-set in expansion module type and mainboard
Expansion module type matching when, directly using GPIO interface recognize expansion module type;In expansion module type and mainboard
When the expansion module type for pre-setting is mismatched, GPIO interface is configured to IIC interfaces identification expansion module type, realizes appointing
The identification of various expansion module types of anticipating.
Based on same idea, Fig. 5 it is exemplary show a kind of expansion module identifying device provided in an embodiment of the present invention
Structure, the device can with expansion module recognize flow.
As shown in figure 5, the device includes:
Configuration module 501, for first kind GPIO interface to be configured into input state, the first kind GPIO interface be with
The expansion module connection and the GPIO interface in output state;
Read module 502, the level signal for reading the first kind GPIO interface;
Processing module 503, the class for determining the expansion module according to the level signal of the first kind GPIO interface
Type.
Alternatively, the processing module 503 specifically for:
The level signal of the first kind GPIO interface is contrasted with preset reference;
It is true according to the preset reference when the level signal of the first kind GPIO interface is matched with the preset reference
The type of the fixed expansion module.
Alternatively, the processing module 503 is additionally operable to:
When the level signal of the first kind GPIO interface is mismatched with the preset reference, by Equations of The Second Kind GPIO interface
Middle any two GPIO interface is configured to IC bus IIC interfaces, and the Equations of The Second Kind GPIO interface is except the first kind
Outside GPIO interface, it is connected with the expansion module and as the GPIO interface of input interface;
The memory block of the expansion module is read by the IIC interfaces, the memory block preserves the expansion module
Type information.
Alternatively, the processing module 503 is additionally operable to:
After determining the type of the expansion module according to the preset reference, the first kind GPIO interface is configured to
Output state;
The pending data that expansion module described in type of process according to the expansion module is uploaded;By the first kind
GPIO interface is by result data is activation to the expansion module.
Alternatively, the processing module 503 is additionally operable to:
After memory block by the IIC interfaces reading expansion module, expand by described in the IIC interfaces
The pending data that exhibition module is uploaded;
The pending data that expansion module described in type of process according to the expansion module is uploaded;
By the IIC interfaces by result data is activation to the expansion module.
The embodiment of the present invention shows that first kind GPIO interface is configured into input state, and the first kind GPIO interface is
It is connected with the expansion module and as the GPIO interface of output interface, then reads the level letter of the first kind GPIO interface
Number, the level signal finally according to the first kind GPIO interface determines the type of the expansion module.In the embodiment of the present invention
First kind GPIO is output interface, defeated by the way that first kind GPIO interface is configured to for carrying out data transmission with expansion module
Enter to read after state the level signal of first kind GPIO interface to determine the type of expansion module, it is achieved thereby that first kind GPIO
The multiplexing of interface, has saved the resource of GPIO interface.Level signal according further to first kind GPIO interface can recognize all expansions
The type of module is opened up, so as to can also realize the identification of expansion module type when the species of external expansion module is a lot.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method or computer program product.
Therefore, the present invention can be using the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Form.And, the present invention can be used to be can use in one or more computers for wherein including computer usable program code and deposited
The shape of the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product
Figure and/or block diagram are described.It should be understood that every first-class during flow chart and/or block diagram can be realized by computer program instructions
The combination of flow and/or square frame in journey and/or square frame and flow chart and/or block diagram.These computer programs can be provided
The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced for reality by the instruction of computer or the computing device of other programmable data processing devices
The device of the function of being specified in present one flow of flow chart or multiple one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or other programmable data processing devices with spy
In determining the computer-readable memory that mode works so that instruction of the storage in the computer-readable memory is produced and include finger
Make the manufacture of device, the command device realize in one flow of flow chart or multiple one square frame of flow and/or block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented treatment, so as in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
, but those skilled in the art once know basic creation although preferred embodiments of the present invention have been described
Property concept, then can make other change and modification to these embodiments.So, appended claims are intended to be construed to include excellent
Select embodiment and fall into having altered and changing for the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification without deviating from essence of the invention to the present invention
God and scope.So, if these modifications of the invention and modification belong to the scope of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to comprising these changes and modification.
Claims (14)
1. a kind of expansion module recognition methods, it is characterised in that including:
First kind GPIO interface is configured to input state, the first kind GPIO interface is to be connected and make with the expansion module
It is the GPIO interface of output interface;
Read the level signal of the first kind GPIO interface;
Level signal according to the first kind GPIO interface determines the type of the expansion module.
2. the method for claim 1, it is characterised in that the level signal according to the first kind GPIO interface determines institute
The type of expansion module is stated, including:
The level signal of the first kind GPIO interface is contrasted with preset reference;
When the level signal of the first kind GPIO interface is matched with the preset reference, institute is determined according to the preset reference
State the type of expansion module.
3. method as claimed in claim 2, it is characterised in that also include:
When the level signal of the first kind GPIO interface is mismatched with the preset reference, by the configuration of Equations of The Second Kind GPIO interface
It is IC bus IIC interfaces, the Equations of The Second Kind GPIO interface is in addition to the first kind GPIO interface, with the expanded mode
Block is connected and as the GPIO interface of input interface;
The memory block of the expansion module is read by the IIC interfaces, the memory block preserves the type of the expansion module
Information.
4. method as claimed in claim 2, it is characterised in that described that the expansion module is determined according to the preset reference
After type, also include:
The first kind GPIO interface is configured as output to state;
The pending data that expansion module described in type of process according to the expansion module is uploaded;
By the first kind GPIO interface by result data is activation to the expansion module.
5. method as claimed in claim 3, it is characterised in that described that the expansion module is read by the IIC interfaces
After memory block, also include:
The pending data uploaded by expansion module described in the IIC interfaces;
The pending data that expansion module described in type of process according to the expansion module is uploaded;
By the IIC interfaces by result data is activation to the expansion module.
6. a kind of mainboard, it is characterised in that including:Processor, first kind GPIO interface and Equations of The Second Kind GPIO interface;Described first
Class GPIO interface is the output interface being connected with expansion module, and the input that the Equations of The Second Kind GPIO interface is connected with expansion module connects
Mouthful;
Each first kind GPIO interface in the first kind GPIO interface is respectively equipped with pull-up resistor;
The processor, for the first kind GPIO interface to be configured into input state;Read the first kind GPIO interface
Level signal;Level signal according to the first kind GPIO interface determines the type of the expansion module, the first kind
The level signal of GPIO interface is determined by the pull-up resistor of the pull down resistor in the expansion module and the first kind GPIO interface
It is fixed.
7. mainboard as claimed in claim 6, it is characterised in that the processor is additionally operable to match somebody with somebody the Equations of The Second Kind GPIO interface
It is set to IC bus IIC interfaces;The memory block of the expansion module is read by the IIC interfaces, the memory block is protected
Deposit the type information of the expansion module.
8. mainboard as claimed in claim 6, it is characterised in that the mainboard is provided with six GPIO interfaces, the first output connects
Mouthful and the second output interface be the first kind GPIO interface, the first input interface, the second input interface, the 3rd input interface and
The input interface being connected with the expansion module in 4th input interface is the Equations of The Second Kind GPIO interface;
First output interface and second output interface are respectively equipped with the first pull-up resistor and the second pull-up resistor;It is described
The first pull down resistor and the second pull down resistor are provided with expansion module;
The processor, if the voltage and the voltage of second output interface of first output interface specifically for reading
High voltage is, then the not connected expansion module of the mainboard;If the voltage and described second of first output interface for reading
The voltage of output interface is low-voltage, then the expansion module of the mainboard connection is first kind expansion module;If the institute for reading
The voltage of the first output interface is stated for the voltage of low-voltage and second output interface is high voltage, then the mainboard is connected
Expansion module is Equations of The Second Kind expansion module;If the voltage of first output interface for reading is high voltage and second output
The voltage of interface is low-voltage, then the expansion module of the mainboard connection is the 3rd class expansion module.
9. mainboard as claimed in claim 8, it is characterised in that the processor is additionally operable to it is determined that the expansion module is the
During three class expansion modules, the Equations of The Second Kind GPIO interface is configured to IIC interfaces, the extension is read by the IIC interfaces
The memory block of module, the memory block preserves the type information of the expansion module.
10. a kind of expansion module identifying device, it is characterised in that including:
Configuration module, for first kind GPIO interface to be configured into input state, the first kind GPIO interface is and the expansion
The connection of exhibition module and the GPIO interface in output state;
Read module, the level signal for reading the first kind GPIO interface;
Processing module, the type for determining the expansion module according to the level signal of the first kind GPIO interface.
11. devices as claimed in claim 10, it is characterised in that the processing module specifically for:
The level signal of the first kind GPIO interface is contrasted with preset reference;
When the level signal of the first kind GPIO interface is matched with the preset reference, institute is determined according to the preset reference
State the type of expansion module.
12. devices as claimed in claim 10, it is characterised in that the processing module is additionally operable to:
When the level signal of the first kind GPIO interface is mismatched with the preset reference, will appoint in Equations of The Second Kind GPIO interface
Two GPIO interfaces of meaning are configured to IC bus IIC interfaces, and the Equations of The Second Kind GPIO interface is except the first kind GPIO
Outside interface, it is connected with the expansion module and as the GPIO interface of input interface;
The memory block of the expansion module is read by the IIC interfaces, the memory block preserves the type of the expansion module
Information.
13. devices as claimed in claim 11, it is characterised in that the processing module is additionally operable to:
After determining the type of the expansion module according to the preset reference, the first kind GPIO interface is configured as output to
State;
The pending data that expansion module described in type of process according to the expansion module is uploaded;By the first kind GPIO
Interface is by result data is activation to the expansion module.
14. devices as claimed in claim 12, it is characterised in that the processing module is additionally operable to:
After memory block by the IIC interfaces reading expansion module, by expanded mode described in the IIC interfaces
The pending data that block is uploaded;
The pending data that expansion module described in type of process according to the expansion module is uploaded;
By the IIC interfaces by result data is activation to the expansion module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710117278.0A CN106897244B (en) | 2017-03-01 | 2017-03-01 | Extended module identification method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710117278.0A CN106897244B (en) | 2017-03-01 | 2017-03-01 | Extended module identification method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106897244A true CN106897244A (en) | 2017-06-27 |
CN106897244B CN106897244B (en) | 2021-02-26 |
Family
ID=59185455
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710117278.0A Active CN106897244B (en) | 2017-03-01 | 2017-03-01 | Extended module identification method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106897244B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108108323A (en) * | 2018-01-05 | 2018-06-01 | 湖南弘睿盛智能科技有限公司 | Signal picker and its method for multiplexing interface |
CN109270342A (en) * | 2018-11-13 | 2019-01-25 | 江苏斯菲尔电气股份有限公司 | Multifunctional electric meter with external expansion module self-identifying technology |
CN111737183A (en) * | 2020-08-05 | 2020-10-02 | 苏州浪潮智能科技有限公司 | Server and communication fault processing method and system of I2C bus |
CN113535623A (en) * | 2021-06-11 | 2021-10-22 | 中国长城科技集团股份有限公司 | Port configuration circuit, method and server |
CN113870657A (en) * | 2021-09-28 | 2021-12-31 | 北京易真学思教育科技有限公司 | Recognition device of functional module |
CN113868159A (en) * | 2020-06-30 | 2021-12-31 | 中车株洲电力机车研究所有限公司 | IO module, in-module master control device and in-module interface device identification method |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102650975A (en) * | 2012-03-31 | 2012-08-29 | 中国人民解放军国防科学技术大学 | Realization method of I2C bus for multi-hardware platform FT server |
CN202488619U (en) * | 2012-03-16 | 2012-10-10 | 青岛海信宽带多媒体技术有限公司 | Hardware configuration identification circuit and set top box |
CN202551158U (en) * | 2012-03-20 | 2012-11-21 | 惠州Tcl移动通信有限公司 | Mobile terminal capable of detecting hardware types conveniently |
US8990347B2 (en) * | 1999-09-01 | 2015-03-24 | Esdr Network Solutions Llc | Method, product, and apparatus for processing a data request |
CN104581527A (en) * | 2014-11-18 | 2015-04-29 | 青岛海信移动通信技术股份有限公司 | Interface circuit, as well as external detection method and external sensor based on circuit |
CN106292342A (en) * | 2015-05-15 | 2017-01-04 | 北京四维拓智教育科技有限公司 | Processor, external device, control system and hot-plug method thereof |
-
2017
- 2017-03-01 CN CN201710117278.0A patent/CN106897244B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8990347B2 (en) * | 1999-09-01 | 2015-03-24 | Esdr Network Solutions Llc | Method, product, and apparatus for processing a data request |
CN202488619U (en) * | 2012-03-16 | 2012-10-10 | 青岛海信宽带多媒体技术有限公司 | Hardware configuration identification circuit and set top box |
CN202551158U (en) * | 2012-03-20 | 2012-11-21 | 惠州Tcl移动通信有限公司 | Mobile terminal capable of detecting hardware types conveniently |
CN102650975A (en) * | 2012-03-31 | 2012-08-29 | 中国人民解放军国防科学技术大学 | Realization method of I2C bus for multi-hardware platform FT server |
CN104581527A (en) * | 2014-11-18 | 2015-04-29 | 青岛海信移动通信技术股份有限公司 | Interface circuit, as well as external detection method and external sensor based on circuit |
CN106292342A (en) * | 2015-05-15 | 2017-01-04 | 北京四维拓智教育科技有限公司 | Processor, external device, control system and hot-plug method thereof |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108108323A (en) * | 2018-01-05 | 2018-06-01 | 湖南弘睿盛智能科技有限公司 | Signal picker and its method for multiplexing interface |
CN108108323B (en) * | 2018-01-05 | 2019-04-23 | 湖南弘睿盛智能科技有限公司 | Signal picker and its method for multiplexing interface |
CN109270342A (en) * | 2018-11-13 | 2019-01-25 | 江苏斯菲尔电气股份有限公司 | Multifunctional electric meter with external expansion module self-identifying technology |
CN109270342B (en) * | 2018-11-13 | 2024-03-26 | 江苏斯菲尔电气股份有限公司 | Multifunctional ammeter with function expansion module self-identification technology |
CN113868159A (en) * | 2020-06-30 | 2021-12-31 | 中车株洲电力机车研究所有限公司 | IO module, in-module master control device and in-module interface device identification method |
CN111737183A (en) * | 2020-08-05 | 2020-10-02 | 苏州浪潮智能科技有限公司 | Server and communication fault processing method and system of I2C bus |
CN113535623A (en) * | 2021-06-11 | 2021-10-22 | 中国长城科技集团股份有限公司 | Port configuration circuit, method and server |
CN113870657A (en) * | 2021-09-28 | 2021-12-31 | 北京易真学思教育科技有限公司 | Recognition device of functional module |
Also Published As
Publication number | Publication date |
---|---|
CN106897244B (en) | 2021-02-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106897244A (en) | A kind of expansion module recognition methods and device | |
CN108830138B (en) | Livestock identification method, device and storage medium | |
US20090193165A1 (en) | Communication circuit of serial peripheral interface devices | |
CN108376077A (en) | The upgrade method and device of control unit | |
CN100583076C (en) | Hot plug detection method of mobile memory card | |
CN105320490A (en) | Method and apparatus for asynchronous FIFO circuit | |
CN106569557A (en) | Intelligent board card Bypass control system and method | |
CN103412838B (en) | A kind of expanding system, communication means, address configuration method, equipment and device | |
CN105676726A (en) | Serial peripheral interface (SPI)-based multi-MEMS sensor fast data access system and method | |
CN103164357B (en) | The remove strategies establishing method of electronic installation and USB device | |
EP3166009A1 (en) | Data processing method and device for storage card | |
US11762976B2 (en) | USB mass storage device access control method and access control apparatus | |
CN111274197B (en) | Data processing apparatus and method | |
US20020095437A1 (en) | Information processing apparatus, method for utilizing the same and program for information processing apparatus | |
CN104090631A (en) | PCI (Peripheral Component Interconnect) device and electronic device with PCI interface | |
CN107526814A (en) | Mobile terminal document storage method and device | |
CN108228250A (en) | The display methods and terminal of a kind of application interface | |
CN107203332A (en) | Data storage device, flash memory controller and operation method thereof | |
CN107544949A (en) | Template merging method and device | |
CN106997275B (en) | Buffer memory management method and the electronic device for using this method | |
CN109189707A (en) | The detection circuit and detection method of USB device type | |
CN108681869A (en) | The automatic checking method of inventory and Related product | |
EP1150189A3 (en) | Control systems, devices and methods | |
CN115604366B (en) | Method and device for data transmission, near field communication chip and storage medium | |
CN114359904B (en) | Image recognition method, image recognition device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
CB03 | Change of inventor or designer information |
Inventor after: Shan Haifeng Inventor after: Liu Chao Inventor before: Shan Haifeng |
|
CB03 | Change of inventor or designer information | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |