A kind of collocation method of mobile terminal pin and system
Technical field
The present invention relates to technical field of mobile terminals, more particularly to a kind of collocation method of mobile terminal pin and it is
System.
Background technology
In prior art, mobile terminal can sometimes adopt such design:Multiple pins for detecting difference in functionality connect
It is connected together, then by same trigger source carrying out down trigger.
Fig. 1 is a kind of design schematic diagram of the common Kato of two SIM cards in typical case's application.As shown in figure 1, in advance will
The detection foot of SIM 1, the detection foot of SIM 2 are configured to double edge interrupts, and the bilateral edge includes:Rising edge and trailing edge, it is described
Rising edge becomes the process of high level for low level, and the trailing edge becomes low level process for high level, either rises
Along or trailing edge can all trigger interruptions, after SIM 1 and SIM 2 are all put into Kato, then by Kato insertion draw-in groove so as to and
Y is made to be connected with X points, while trigger the detection foot of SIM 1 and detect to produce on foot with SIM 2 interrupting the inspection carried out to two cards
Survey, also can carry out to pulling out card while triggering the detection foot of SIM 1 and interrupting with generation on the detection foot of SIM 2 equally when Kato is extracted
Detection.
Fig. 2 is the design schematic diagram of SD card and the common Katos of SIM in a kind of typical case's application.As shown in Fig. 2 in advance will
SIM detection foot, SD card detection foot are configured to double edge interrupts, after SIM/SD cards are put into Kato, then Kato are inserted draw-in groove
So that Y is connected with X points, while trigger SIM detection foot and detect to produce on foot with SD card interrupt the inspection carried out to two cards
Survey, also can examine to pulling out card while triggering SIM detection foot and interrupting with generation on SD card detection foot equally when Kato is extracted
Survey.
Though above two design energy save space, makes multiple cards put together, also brings a problem, each card
Detection module starting up's time does not know, and certainly exists the time order and function problem of startup, for giving an example, once opens at certain
During machine, such as SD card detection module starts prior to SIM detection module, and after SD card starting module starts, SD card is detected by which
Foot configuration is correct, then starts the interruption detection of SD card pin, but at this moment SIM is also not actuated, and SIM detects foot not yet by just
Really configure, the level of SIM detection is uncertain, because SIM detects that foot is linked together with SD card detection foot, which will
SD card can be affected always to detect the state of foot, will be SIM detection foot configuration correct after SIM detection module starts till.
In some special cases, for example, SIM detection foot level is placed exactly in interruption near threshold, and thresholding is a magnitude of voltage,
In general thresholding has two, such as thresholding one, thresholding two, and the former is more than the latter, when voltage is considered high for the moment higher than thresholding
Level, is considered low level when voltage is less than thresholding two;This will make SD card detection module start to SIM detection module to open
Interruption is frequently produced in dynamic this period, makes SD card detection module be triggered, so that system is busy with interrupt processing so that open
Machine is slack-off, or even situation about crashing.
Therefore, prior art has yet to be improved and developed.
The content of the invention
The technical problem to be solved in the present invention is, for the drawbacks described above of prior art, there is provided a kind of mobile terminal draws
The collocation method of foot and system, it is intended to by mobile terminal-opening, can correctly configure multiple for detecting difference in functionality
Pin link together, then by same trigger source carrying out down trigger, to each detection when enabling mobile terminal-opening
Foot carries out reasonable disposition, can save the space of the mobile terminal of mobile terminal, can also make system working properly.
The technical proposal for solving the technical problem of the invention is as follows:
A kind of collocation method of mobile terminal pin, wherein, including:
Step A, stores pin number and the corresponding leaded molded row of the pin number of predetermined number in advance in the terminal
Table;
The list for prestoring is replicated during mobile terminal-opening by step B, when mobile terminal has detected pin mold
When block starts, judge described leaded molded with the presence or absence of in the list;
Step C, when it is described it is leaded molded be present in the list, the leaded molded pin number corresponding in lists is entered
Remaining pin number in the list is done identical configuration with postponing by row.
The collocation method of the mobile terminal pin, wherein, also includes after step C:
Step D, after the completion of the pin number in the list is all configured, by complete to configure in list it is described leaded molded with
And corresponding pin number is deleted.
The collocation method of the mobile terminal pin, wherein, step A is specifically included:
A1, by the pin number of predetermined number and it is leaded molded be numbered after, by the pin number and leaded molded carry out one by one
Correspondence;
A2, arranges all leaded molded circuits for being commonly connected to a generation interruption, when the circuit for producing interruption produces interruption
When, all leaded molded pin numbers interrupted by detection receive interruption;
A3, forms a complete list, storage to mobile terminal after the completion of the pin number and leaded molded correspondence.
The collocation method of the mobile terminal pin, wherein, step B is specifically included:
B1, obtains the list for prestoring in the way of replicating when mobile terminal-opening;
B2, when mobile terminal has detected leaded molded startup, judges described leaded molded with the presence or absence of in the list.
The collocation method of the mobile terminal pin, wherein, step C is specifically included:
C1, when it is described it is leaded molded be not present in the list, then do not deal with;
C2, when it is described it is leaded molded be present in the list, the leaded molded pin number corresponding in lists is carried out
Configuration;
C3, after the completion of the leaded molded pin number configuration corresponding in lists, by remaining pin number in the list
Do identical configuration.
The collocation method of the mobile terminal pin, wherein, also includes after step D:
Step E, mobile terminal complete current leaded molded with postponing, when mobile terminal has detected leaded molded startup again
When, step C and D is repeated, till the list is for sky.
A kind of configuration system of mobile terminal pin, wherein, including:
Module is prestored, for storing the pin number of predetermined number in advance in the terminal and the pin number is corresponding draws
The list of foot module;
Detection judge module, for being replicated the list for prestoring during mobile terminal-opening, when mobile terminal is examined
When having measured leaded molded startup, judge described leaded molded with the presence or absence of in the list;
Configuration module, for when it is described it is leaded molded be present in the list, will be described leaded molded corresponding in lists
Pin number is carried out with postponing, and remaining pin number in the list is done identical configuration;
Removing module, after the completion of all configuring when the pin number in the list, by leaded molded described in list and
Corresponding pin number is deleted;
Circulation performing module, completes current leaded molded with postponing for mobile terminal, draws when mobile terminal has been detected again
When foot module starts, configuration and deletion action is repeated, till the list is for sky.
The configuration system of the mobile terminal pin, wherein, the module that prestores is specifically included:
Numbering corresponding unit, for by the pin number of predetermined number and it is leaded molded be numbered after, the pin number and will draw
Foot module is corresponded;
Pin setting unit, for arranging all leaded molded circuits for being commonly connected to a generation interruption, when generation interruption
Circuit produce interruption when, it is all it is leaded molded by detection interruption pin numbers receive interruption;
Memory element, for forming a complete list after the completion of the pin number and leaded molded correspondence, storage is to movement
Terminal.
The configuration system of the mobile terminal pin, wherein, the detection judge module is specifically included:
Acquiring unit is replicated, for the list for prestoring being obtained in the way of replicating when mobile terminal-opening;
Contrast judging unit, for described leaded molded whether deposit when mobile terminal has detected leaded molded startup, judged
In being the list.
The configuration system of the mobile terminal pin, wherein, the configuration module is specifically included:
Normal process unit, for when it is described it is leaded molded be not present in the list, then do not deal with;
First dispensing unit, for when it is described it is leaded molded be present in the list, will be described leaded molded right in lists
The pin number answered is configured;
Second dispensing unit, for after the completion of the leaded molded pin number configuration corresponding in lists, by the list
In remaining pin number do identical configuration.
The invention discloses a kind of collocation method of mobile terminal pin and system, methods described includes:Moving in advance
Pin number and the corresponding leaded molded list of the pin number of predetermined number is stored in terminal;Will be pre- during mobile terminal-opening
The list for first storing is replicated, when mobile terminal has detected leaded molded startup, judge described leaded molded be
It is no to be present in the list;When it is described it is leaded molded be present in the list, leaded molded correspond to described in lists
Pin number carry out with postponing, remaining pin number in the list is done into identical configuration.The present invention is by mobile terminal
During start, can correctly configure multiple pins for detecting difference in functionality and link together, then by same trigger source entering
Row down trigger, carries out reasonable disposition to each detection foot when enabling mobile terminal-opening, makes system working properly.
Description of the drawings
Fig. 1 is a kind of design schematic diagram of the common Kato of two SIM cards in typical case's application.
Fig. 2 is the design schematic diagram of SD card and the common Katos of SIM in a kind of typical case's application.
Fig. 3 is the flow chart of the preferred embodiment of the collocation method of mobile terminal pin of the present invention.
Fig. 4 be mobile terminal pin of the present invention collocation method in multiple pin numbers for storing in mobile terminal and pin number
The list schematic diagram of corresponding pin module.
Fig. 5 is the functional schematic block diagram of the preferred embodiment of the configuration system of mobile terminal pin of the present invention.
Specific embodiment
For making the objects, technical solutions and advantages of the present invention clearer, clear and definite, develop simultaneously embodiment pair referring to the drawings
The present invention is further described.It should be appreciated that specific embodiment described herein is only to explain the present invention, and without
It is of the invention in limiting.
Fig. 3 is referred to, Fig. 3 is the flow chart of the preferred embodiment of the collocation method of mobile terminal pin of the present invention.
As shown in figure 3, a kind of collocation method of mobile terminal pin provided in an embodiment of the present invention, comprises the following steps:
Step S100, the pin number and the pin number for storing predetermined number in advance in the terminal are corresponding leaded molded
List.
Step S100 is specifically included:By the pin number of predetermined number and it is leaded molded be numbered after, draw described
Foot number is corresponded with leaded molded;All leaded molded circuits for being commonly connected to a generation interruption are set, work as product
When the raw circuit for interrupting produces interruption, all leaded molded pin numbers interrupted by detection receive interruption;Draw when described
A complete list, storage to mobile terminal is formed after the completion of foot number and leaded molded correspondence.
In the present invention, the pin number of the SIM or SD card before dispatching from the factory all has determined, manages for convenience
Reason, will first have determined the pin number of quantity and it is leaded molded be numbered after corresponded, and by all pins
Module is commonly connected to one and produces the circuit for interrupting, in order to when the circuit generation interruption interrupted is produced, Suo Youyin
Foot module receives interruption by detecting the pin number interrupted, and leaded molded detection for convenience, by pin number and pin
A complete list storage is formed after the completion of module correspondence to mobile terminal, is preserved as raw information and is easy to subsequent movement end
Replicated when needing at end.
The list for prestoring is replicated during mobile terminal-opening by step S200, when mobile terminal is detected
When having leaded molded startup, judge described leaded molded with the presence or absence of in the list.
In the present invention, specifically include in step S200:Obtained in advance in the way of replicating when mobile terminal-opening
The list of storage;When mobile terminal has detected leaded molded startup, judge described leaded molded with the presence or absence of in institute
State in list.
During mobile terminal-opening, the list for starting to store in the terminal is replicated into portion for judging that other draw later
Whether foot module belongs to leaded molded in the list when starting.
Step S300, when it is described it is leaded molded be present in the list, will be described leaded molded corresponding in lists
Pin number is carried out with postponing, and remaining pin number in the list is done identical configuration.
In the present invention, step S300 is specifically included:When it is described it is leaded molded be not present in the list, then do not make
Process, that is, be not present in the leaded molded reasonable disposition for system not being interfered with to each detection foot in the list;Draw when described
Foot module is present in the list, and the leaded molded pin number corresponding in lists is configured;When the pin
Remaining pin number in the list after the completion of corresponding pin number configuration, is done identical configuration by module in lists.
Also include after step S300:
After the completion of the pin number in the list is all configured, the described leaded molded and correspondence that will complete to configure in list
Pin number deleted;To delete, be to prevent the module for starting below will be the detection of above starting module
Foot is configured with.
When mobile terminal completes current leaded molded with postponing, when mobile terminal has detected leaded molded startup again
When, step S200 and S300 is repeated, till the list is for sky.
In order that the collocation method of the mobile terminal pin of the present invention is clearer, clear, one is given below specifically in fact
Apply example to be illustrated, refer to Fig. 4, Fig. 4 be mobile terminal pin of the present invention collocation method in store in mobile terminal
Multiple pin numbers and pin number corresponding pin module list schematic diagram.
As shown in figure 4, the list of be such as stored with the terminal 5 pin numbers and pin number corresponding pin module is such as
Under:
The pin number and it is leaded molded corresponded, wherein GPIO represents pin number, and corresponding relation is as follows:
Leaded molded 1:GPIO1
Leaded molded 2:GPIO2
Leaded molded 3:GPIO3
Leaded molded 4:GPIO4
Leaded molded 5:GPIO5
In the list, there are 5 modules, respectively:Leaded molded 1, leaded molded 2, leaded molded 3, leaded molded 4, pin mold
Block block 5, respectively using GPIO1, GPIO2, GPIO3, GPIO4, GPIO5 as interrupt pin, this five it is leaded molded and its
The connection of GPIO is illustrated in fig. 4 shown below, and this five leaded molded GPIO for being received interruption detection are commonly connected to a product
The raw circuit for interrupting, when the circuit generation interruption interrupted is produced, five modules can be received by the GPIO that its detection is interrupted
To interruption.
By the list for prestoring during mobile terminal-opening(Above-mentioned 5 leaded molded corresponding lists)Carry out multiple
System, it is assumed that when mobile terminal has detected leaded molded 8 startup, judge that described leaded molded 8 are not present in the list,
Therefore without the need for processing;When assuming leaded molded 5 startup, judge that described leaded molded 5 are present in the list, then obtain and draw
5 corresponding pin number GPIO5 of foot module, then configures to GPIO5, then to remaining GPIO in the list of duplication
(GPIO1、GPIO2、GPIO3、GPIO4)Similarly configure by GPIO5;Then by the list copy in leaded molded 5 and its
Corresponding pin GPIO5 is deleted.
Assume after leaded molded 5 start, mobile terminal detects leaded molded 3 again and starts, then obtain leaded molded 3 pairs
Pin number GPIO3 is answered, then GPIO3 is configured;Again to remaining GPIO in the list of duplication(GPIO1、GPIO2、
GPIO4)Similarly configure by GPIO3;Then it is equal by the list of the duplication leaded molded 3 and its corresponding pin GPIO3
Delete.The like.
Until mobile terminal-opening next time, these leaded molded boot sequences are also possible to change, such as first start
Be leaded molded 2, what is restarted is leaded molded 1, but step is still to carry out by abovementioned steps.
Hypothesis is SD card and the common Kato of SIM, and the purpose for so performing is that the detection module start for avoiding each card is opened
The dynamic time does not know, and starts to SD card detection module and frequently produce in this period of SIM detection module startup interruption, makes
SD card detection module is triggered, so that system occurs being busy with interrupt processing so that start is slack-off, or even situation about crashing.
Based on above-described embodiment, the present invention also provides a kind of configuration system of mobile terminal pin, refers to Fig. 5, and Fig. 5 is
The functional schematic block diagram of the preferred embodiment of the configuration system of mobile terminal pin of the present invention.
As shown in figure 5, the system includes:
Module 510 is prestored, for storing pin number and the pin number correspondence of predetermined number in advance in the terminal
Leaded molded list;As detailed above.
Detection judge module 520, for being replicated the list for prestoring during mobile terminal-opening, works as movement
When terminal has detected leaded molded startup, judge described leaded molded with the presence or absence of in the list;As detailed above.
Configuration module 530, for when it is described it is leaded molded be present in the list, by it is described it is leaded molded in lists
Corresponding pin number is carried out with postponing, and remaining pin number in the list is done identical configuration;As detailed above.
Removing module 540, after the completion of all configuring when the pin number in the list, by pin mold described in list
Block and corresponding pin number are deleted;As detailed above.
Circulation performing module 550, completes current leaded molded with postponing for mobile terminal, when mobile terminal is detected again
When having leaded molded startup, configuration and deletion action is repeated, till the list is for sky;As detailed above.
Further, the configuration system of the mobile terminal pin, wherein, the module that prestores is specifically included:
Numbering corresponding unit, for by the pin number of predetermined number and it is leaded molded be numbered after, the pin number and will draw
Foot module is corresponded;As detailed above.
Pin setting unit, for arranging all leaded molded circuits for being commonly connected to a generation interruption, works as generation
When the circuit of interruption produces interruption, all leaded molded pin numbers interrupted by detection receive interruption;Concrete as above institute
State.
Memory element, for forming a complete list after the completion of the pin number and leaded molded correspondence, storage is arrived
Mobile terminal;As detailed above.
The configuration system of the mobile terminal pin, wherein, the detection judge module is specifically included:
Acquiring unit is replicated, for the list for prestoring being obtained in the way of replicating when mobile terminal-opening;Specifically
As mentioned above.
Contrast judging unit, for when mobile terminal has detected leaded molded startup, judging described leaded molded to be
It is no to be present in the list;As detailed above.
The configuration system of the mobile terminal pin, wherein, the configuration module is specifically included:
Normal process unit, for when it is described it is leaded molded be not present in the list, then do not deal with;
First dispensing unit, for when it is described it is leaded molded be present in the list, will be described leaded molded right in lists
The pin number answered is configured;As detailed above.
Second dispensing unit, after the completion of configuring when the leaded molded pin number corresponding in lists, will be described
In list, remaining pin number does identical configuration;As detailed above.
In sum, the invention discloses a kind of collocation method of mobile terminal pin and system, methods described includes:In advance
Pin number and the pin number corresponding leaded molded list of predetermined number are stored in the terminal first;Mobile terminal is opened
The list for prestoring is replicated during machine, when mobile terminal has detected leaded molded startup, drawn described in judgement
Foot module is with the presence or absence of in the list;When it is described it is leaded molded be present in the list, will it is described it is leaded molded row
In table, corresponding pin number is carried out with postponing, and remaining pin number in the list is done identical configuration.The present invention by
During mobile terminal-opening, can correctly configure multiple pins for detecting difference in functionality and link together, then be touched by same
Rise to carry out down trigger, reasonable disposition is carried out to each detection foot when enabling mobile terminal-opening, makes system working properly.
Certainly, one of ordinary skill in the art will appreciate that all or part of flow process in realizing above-described embodiment method,
Can be by computer program to instruct related hardware(Such as processor, controller etc.)To complete, described program can be stored
In the storage medium of an embodied on computer readable, the program is may include upon execution such as the flow process of above-mentioned each method embodiment.Its
Described in storage medium can be for memorizer, magnetic disc, CD etc..
It should be appreciated that the application of the present invention is not limited to above-mentioned citing, and for those of ordinary skills, can
To be improved according to the above description or be converted, all these modifications and variations should all belong to the guarantor of claims of the present invention
Shield scope.