Mobile terminal can sometimes use such design in the prior art: multiple pins for detecting different function connect
It is connected together, down trigger is then carried out by same trigger source.
Fig. 1 is the design scheme schematic diagram that two SIM cards are total to Kato in a kind of typical case.As shown in Figure 1, in advance will
SIM card 1 detects foot, SIM card 2 detects foot and is configured to double edge interrupts, and the bilateral edge includes: rising edge and failing edge, described
Rising edge is the process that low level becomes high level, and the failing edge is that high level becomes low level process, is either risen
Along or failing edge can all trigger interruptions, after SIM card 1 and SIM card 2 are all put into Kato, then Kato is inserted into card slot thus and
So that Y is connected with X point, while triggering and generating the inspection interrupted and carried out to two cards on the detection foot of SIM card 1 and the detection foot of SIM card 2
It surveys, equally can also trigger SIM card 1 simultaneously when extracting Kato and detect foot and SIM card 2 and detect to generate on foot and interrupt to pulling out card progress
Detection.
Fig. 2 is the design scheme schematic diagram that SD card and SIM are total to Kato in a kind of typical case.As shown in Fig. 2, in advance will
SIM card detection foot, SD card detection foot are configured to double edge interrupts, are inserted into card slot after SIM/SD card is put into Kato, then by Kato
To make Y be connected with X point, while triggering and generating the inspection interrupted and carry out blocking to two on SIM card detection foot and SD card detection foot
It surveys, equally can also trigger generation interruption on SIM card detection foot and SD card detection foot simultaneously when extracting Kato and examine to pulling out card
It surveys.
Though above two design can save space, so that multiple cards is put together, also bring a problem, each card
Detection module starting up's time is uncertain, certainly exists the time order and function problem of starting, for example for, once open at certain
When machine, for example SD card detection module starts prior to SIM card detection module, and after the starting of SD card starting module, SD card is detected
Foot configuration is correct, then starts the interruption detection of SD card pin, but at this moment SIM card is also inactive, SIM card detects foot not yet by just
Really configuration, the level of SIM card detection is uncertain, will because SIM card detects foot and links together with SD card detection foot
The state that will affect SD card detection foot always, until after the starting of SIM card detection module that SIM card detection foot configuration is correct.
In some special cases, for example, SIM card detection foot level is placed exactly in interruption near threshold, and thresholding is a voltage value,
In general there are two thresholdings, such as thresholding one, thresholding two, the former is greater than the latter, is considered high for the moment when voltage is higher than thresholding
Level is considered low level when voltage is lower than thresholding two;This will make SD card detection module start to SIM card detection module to open
Interruption is frequently generated in dynamic this period, so that SD card detection module is triggered, to make system be busy with interrupt processing, so that opening
Machine is slack-off, or even the case where crash.
Therefore, the existing technology needs to be improved and developed.
Summary of the invention
The technical problem to be solved in the present invention is that in view of the above drawbacks of the prior art, a kind of mobile terminal is provided and is drawn
The configuration method and system of foot, it is intended to multiple for detecting different function by can correctly configure in mobile terminal-opening
Pin link together, down trigger is then carried out by same trigger source, to each detection when enabling mobile terminal-opening
Foot carries out reasonable disposition, can save the space of the mobile terminal of mobile terminal, also system can be made working properly.
The technical proposal for solving the technical problem of the invention is as follows:
A kind of configuration method of mobile terminal pin, wherein include:
Step A, pin number and the pin number for storing preset quantity in the terminal in advance are corresponding leaded molded
List;
Step B, when mobile terminal-opening, replicate the pre-stored list, draw when mobile terminal has detected
When foot module 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, by the leaded molded pin corresponding in lists
It number carries out that pin number remaining in the list to be done identical configuration with postponing.
The configuration method of the mobile terminal pin, wherein after the step C further include:
Step D will complete the pin mold of configuration after the completion of the pin number in the list all configuration in list
Block and corresponding pin number are deleted.
The configuration method of the mobile terminal pin, wherein the step A is specifically included:
A1, by the pin number of preset quantity and it is leaded molded be numbered after, by the pin number and leaded molded progress
It corresponds;
A2 is arranged all leaded molded circuits for being commonly connected to a generation and interrupting, generates when generating the circuit interrupted
When interruption, it is all it is leaded molded by detection interrupt pin number receive interruption;
A3, forms a complete list after the completion of the pin number and leaded molded correspondence, and mobile terminal is arrived in storage.
The configuration method of the mobile terminal pin, wherein the step B is specifically included:
B1 obtains the pre-stored list when mobile terminal-opening in a manner of replicating;
B2 judges described leaded molded with the presence or absence of in the column when mobile terminal has detected leaded molded starting
In table.
The configuration method of the mobile terminal pin, wherein the 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, by the leaded molded pin number corresponding in lists
It is configured;
C3 draws after the completion of the leaded molded pin number configuration corresponding in lists by remaining in the list
Foot number does identical configuration.
The configuration method of the mobile terminal pin, wherein after the step D further include:
Step E, mobile terminal complete currently leaded molded with postponing, when mobile terminal has detected leaded molded open again
When dynamic, repeat step C and D, until it is described list is empty until.
A kind of configuration system of mobile terminal pin, wherein include:
Module is stored in advance, the pin number and the pin number for storing preset quantity in the terminal in advance are corresponding
Leaded molded list;
Judgment module is detected, replicates the pre-stored list when for mobile terminal-opening, when mobile whole
When end has detected leaded molded starting, 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 right in lists
The pin number answered carries out that pin number remaining in the list is done identical configuration with postponing;
Removing module will be leaded molded described in list after the completion of the pin number for working as in the list all configures
And corresponding pin number is deleted;
Execution module is recycled, completes currently leaded molded with postponing, when mobile terminal detects again for mobile terminal
When having leaded molded starting, repeat configuration and deletion movement, until it is described list is empty until.
The configuration system of the mobile terminal pin, wherein the module that is stored in advance specifically includes:
Number corresponding unit, for by the pin number of preset quantity and it is leaded molded be numbered after, by the pin number
It is corresponded with leaded molded;
Pin setting unit works as generation for all leaded molded circuits for being commonly connected to a generation and interrupting to be arranged
It is all leaded molded interruption to be received by the pin number of detection interruption when the circuit of interruption generates interruption;
Storage unit, for forming a complete list after the completion of the pin number and leaded molded correspondence, storage is arrived
Mobile terminal.
The configuration system of the mobile terminal pin, wherein the detection judgment module specifically includes:
Acquiring unit is replicated, for obtaining the pre-stored list in a manner of replicating when mobile terminal-opening;
Judging unit is compared, described leaded molded is for judging when mobile terminal has detected leaded molded starting
It is no to be present in the list.
The configuration system of the mobile terminal pin, wherein the configuration module specifically includes:
Normal processing unit, for when it is described it is leaded molded be not present in the list, then do not deal with;
First configuration unit, for when it is described it is leaded molded be present in the list, will be described leaded molded in list
In corresponding pin number configured;
Second configuration unit will be described after the completion of working as the leaded molded pin number configuration corresponding in lists
Remaining pin number does identical configuration in list.
The invention discloses the configuration methods and system of a kind of mobile terminal pin, which comprises in advance in movement
The pin number and the corresponding leaded molded list of the pin number of preset quantity are stored in terminal;It will be pre- when mobile terminal-opening
The list first stored is replicated, when mobile terminal has detected leaded molded starting, 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 corresponded to described in lists
Pin number carry out that pin number remaining in the list is done identical configuration with postponing.The present invention passes through in mobile terminal
When booting, can correctly configure multiple pins for detecting different function and link together, then by same trigger source come into
Row down trigger enables to carry out reasonable disposition to each detection foot when mobile terminal-opening, keeps system working properly.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer and more explicit, right as follows in conjunction with drawings and embodiments
The present invention is further described.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and do not have to
It is of the invention in limiting.
Referring to Fig. 3, Fig. 3 is the flow chart of the preferred embodiment of the configuration method of mobile terminal pin of the present invention.
As shown in figure 3, a kind of configuration method of mobile terminal pin provided in an embodiment of the present invention, comprising the following steps:
Step S100 stores the pin number and the corresponding pin mold of the pin number of preset quantity in the terminal in advance
The list of block.
The step S100 is specifically included: by the pin number of preset quantity 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 and interrupting are set, production is worked as
It is all leaded molded interruption to be received by the pin number of detection interruption when the raw circuit interrupted generates interruption;Draw when described
A complete list is formed after the completion of foot number and leaded molded correspondence, mobile terminal is arrived in storage.
In the present invention, the pin number of the SIM or SD card before factory is all had determined, is managed for convenience
Reason, first by the pin number for having determined quantity and it is leaded molded be numbered after correspond, and by all pins
Module is commonly connected to one and generates the circuit interrupted, in order to when generating the circuit interrupted generation interruption, Suo Youyin
Foot module passes through the pin number that detection is interrupted and receives interruption, leaded molded detection for convenience, by pin number and pin
A complete list storage is formed after the completion of module is corresponding to mobile terminal, is saved as raw information convenient for subsequent movement end
It is replicated when needing at end.
Step S200, when mobile terminal-opening, replicate the pre-stored list, when mobile terminal detects
When having leaded molded starting, judge described leaded molded with the presence or absence of in the list.
It in the present invention, specifically includes: is obtained in a manner of replicating when mobile terminal-opening in advance in the step S200
The list of storage;When mobile terminal has detected leaded molded starting, judge described leaded molded with the presence or absence of in institute
It states in list.
When mobile terminal-opening, it will start to store list duplication portion in the terminal for judging other later draw
It is leaded molded in the list whether foot module belongs to 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 carries out that pin number remaining in the list is done identical configuration with postponing.
In the present invention, the step S300 is specifically included: when it is described it is leaded molded be not present in the list, then do not make
Processing, that is, be not present in the list it is leaded molded will not influence system to it is each detection foot reasonable disposition;Draw when described
Foot module is present in the list, and the leaded molded pin number corresponding in lists is configured;When the pin
Pin number remaining in the list after the completion of corresponding pin number configuration, is done identical configuration in lists by module.
After the step S300 further include:
When in the list pin number all configuration after the completion of, will be completed in list configuration it is described leaded molded and
Corresponding pin number is deleted;To be deleted, be that the module started below in order to prevent will be front starting module
Detection foot is configured with.
When mobile terminal completes currently leaded molded with postponing, when mobile terminal has detected leaded molded starting again
When, repeat step S200 and S300, until it is described list is empty until.
In order to be clearer and more clear the configuration method of mobile terminal pin of the invention, it is given below one specifically in fact
It applies example to be illustrated, refers to Fig. 4, Fig. 4 is stored in mobile terminal in the configuration method of mobile terminal pin of the present invention
Multiple pin numbers and pin number corresponding pin module list schematic diagram.
As shown in figure 4, being such as stored with the list of 5 pin numbers and pin number corresponding pin module in the terminal such as
Under:
The pin number and it is leaded molded corresponded, wherein GPIO represents pin number, and corresponding relationship 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, is respectively as follows: leaded molded 1, is leaded molded 2, is leaded molded 3, is leaded molded 4, drawing
Foot module block 5 uses GPIO1, GPIO2, GPIO3, GPIO4, GPIO5 as interrupt pin respectively, this five it is leaded molded and
The connection of its GPIO is illustrated in fig. 4 shown below, this five leaded molded GPIO for interrupting and detecting that received are commonly connected to one
The circuit interrupted is generated, when generating the circuit interrupted generation interruption, the GPIO that five modules can be interrupted by its detection is connect
Receive interruption.
The pre-stored list (above-mentioned 5 leaded molded corresponding lists) is answered when mobile terminal-opening
System, it is assumed that when mobile terminal has detected leaded molded 8 starting, judge that described leaded molded 8 are not present in the list,
There is no need to handle;Assuming that judging that described leaded molded 5 are present in the list when leaded molded 5 starting, then obtains and draw
The corresponding pin number GPIO5 of foot module 5, then configures GPIO5, then to remaining GPIO in the list of duplication
(GPIO1, GPIO2, GPIO3, GPIO4) is similarly configured by GPIO5;Then by the list copy in leaded molded 5 and its
Corresponding pin GPIO5 is deleted.
Assuming that mobile terminal detects leaded molded 3 starting after leaded molded 5 starting again, then leaded molded 3 pairs are obtained
Pin number GPIO3 is answered, then GPIO3 is configured;Again to remaining GPIO(GPIO1, GPIO2 in the list of duplication,
GPIO4 it) is similarly configured by GPIO3;Then in the list of the duplication leaded molded 3 and its corresponding pin GPIO3 is equal
It deletes.And so on.
Until mobile terminal-opening next time, these leaded molded boot sequences are also possible to change, for example first start
Be leaded molded 2, what is restarted is leaded molded 1, but step is still to carry out by abovementioned steps.
Assuming that being SD card and SIM card is total to Kato, the purpose executed in this way is that avoiding the detection module of each card from being switched on opens
The dynamic time is uncertain, starts to SD card detection module and frequently generates interruption in this period of SIM card detection module starting, makes
SD card detection module is triggered, to make system occur being busy with interrupt processing, so that booting is slack-off, or even the case where crash.
Based on the above embodiment, the present invention also provides a kind of configuration systems of mobile terminal pin, referring to Fig. 5, 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 comprises:
Module 510 is stored in advance, for storing the pin number and the pin number of preset quantity in the terminal in advance
Corresponding leaded molded list;As detailed above.
Judgment module 520 is detected, the pre-stored list is replicated when for mobile terminal-opening, works as movement
When terminal has detected leaded molded starting, 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 carries out that pin number remaining in the list is done identical configuration with postponing;As detailed above.
Removing module 540, after the completion of the pin number for working as in the list all configures, by pin mold described in list
Block and corresponding pin number are deleted;As detailed above.
Execution module 550 is recycled, completes currently leaded molded with postponing, when mobile terminal detects again for mobile terminal
To when having leaded molded starting, repeat configuration and deletion movement, until it is described list is empty until;As detailed above.
Further, the configuration system of the mobile terminal pin, wherein the module that is stored in advance specifically includes:
Number corresponding unit, for by the pin number of preset quantity and it is leaded molded be numbered after, by the pin number
It is corresponded with leaded molded;As detailed above.
Pin setting unit works as generation for all leaded molded circuits for being commonly connected to a generation and interrupting to be arranged
It is all leaded molded interruption to be received by the pin number of detection interruption when the circuit of interruption generates interruption;Specific institute as above
It states.
Storage unit, 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 judgment module specifically includes:
Acquiring unit is replicated, for obtaining the pre-stored list in a manner of replicating when mobile terminal-opening;
As detailed above.
Judging unit is compared, described leaded molded is for judging when mobile terminal has detected leaded molded starting
It is no to be present in the list;As detailed above.
The configuration system of the mobile terminal pin, wherein the configuration module specifically includes:
Normal processing unit, for when it is described it is leaded molded be not present in the list, then do not deal with;
First configuration unit, for when it is described it is leaded molded be present in the list, will be described leaded molded in list
In corresponding pin number configured;As detailed above.
Second configuration unit will be described after the completion of working as the leaded molded pin number configuration corresponding in lists
Remaining pin number does identical configuration in list;As detailed above.
In conclusion the invention discloses the configuration methods and system of a kind of mobile terminal pin, which comprises pre-
The pin number and the corresponding leaded molded list of the pin number of preset quantity are first stored in the terminal;Mobile terminal is opened
The pre-stored list is replicated when machine, when mobile terminal has detected leaded molded starting, is drawn described in judgement
Foot module whether there is in the list;When it is described it is leaded molded be present in the list, leaded molded arranged described
Corresponding pin number carries out that pin number remaining in the list is done identical configuration with postponing in table.The present invention by
When mobile terminal-opening, it can correctly configure multiple pins for detecting different function and link together, then by same touching
It rises to carry out down trigger, enables to carry out reasonable disposition to each detection foot when mobile terminal-opening, keep system working properly.
Certainly, those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method,
It is that related hardware (such as processor, controller etc.) can be instructed to complete by computer program, the program can store
In a computer-readable storage medium, which may include the process such as above-mentioned each method embodiment when being executed.Its
Described in storage medium can be for memory, magnetic disk, CD etc..
It should be understood that the application of the present invention is not limited to the above for those of ordinary skills can
With improvement or transformation based on the above description, all these modifications and variations all should belong to the guarantor of appended claims of the present invention
Protect range.