Disclosure of Invention
The invention provides a mobile terminal rear cover detection method, a mobile terminal rear cover detection device and a computer readable storage medium, which can greatly increase the difficulty of imitating a rear cover by a more perfect rear cover identification method, thereby ensuring that a user uses a correct rear cover when replacing the rear cover and perfecting the performance of a mobile terminal.
In order to solve the above problem, in a first aspect, the present application provides a method for detecting a rear cover of a mobile terminal, where the method for detecting a rear cover of a mobile terminal is applied to a mobile terminal, and the method for detecting a rear cover of a mobile terminal includes:
receiving a signal of a first pin of a rear cover interface;
determining a first target control logic according to the signal of the first pin;
outputting an amplitude signal to a second pin of the rear cover interface according to the first target control logic;
determining a second target control logic according to the signal of the second pin;
acquiring signal amplitude according to the second target control logic, and determining a third target control logic and a fourth target control logic according to the signal amplitude;
enabling the mobile terminal according to the third target control logic, and disabling the mobile terminal according to the fourth target control logic.
The rear cover interface is a point contact type interface and comprises a first pin and a second pin, wherein when the rear cover interface is powered on, the first pin outputs a voltage signal, and the second pin is connected with the mobile terminal.
Wherein the determining a first target control logic according to the signal of the first pin comprises:
detecting a rising edge interrupt state of the first pin;
judging whether a first pre-stored control logic matched with the rising edge interrupt state of the first pin is stored or not;
and if a first pre-stored control logic matched with the rising edge interrupt state of the first pin is stored, determining connection of a rear cover, and determining the first pre-stored control logic matched with the rising edge interrupt state of the first pin as the first target control logic.
Wherein the determining a first target control logic according to the signal of the first pin further comprises:
if a first pre-stored control logic matched with the rising edge interruption state of the first pin is not stored, detecting the falling edge interruption state of the first pin;
judging whether a fifth pre-stored control logic matched with the falling edge interruption state of the first pin is stored or not;
if a fifth pre-stored control logic matched with the falling edge interruption state of the first pin is stored, determining that a rear cover is not connected, and determining the fifth pre-stored control logic matched with the falling edge interruption state of the first pin as a fifth target control logic;
and stopping outputting the amplitude signal to a second pin of the rear cover interface according to a fifth target control logic.
Wherein the determining a second target control logic according to the signal of the second pin comprises:
detecting the effective edge change state of the second pin;
judging whether a second pre-stored control logic matched with the effective edge change state of the second pin is stored or not;
and if a second pre-stored control logic matched with the effective edge change state of the second pin is stored, determining the second pre-stored control logic matched with the effective edge change state of the second pin as the second target control logic.
Wherein the obtaining a signal amplitude according to the second target control logic and determining a third target control logic and a fourth target control logic according to the signal amplitude includes:
detecting a time difference between two identical and adjacent effective edge change states of the second pin according to the second target control logic;
acquiring signal amplitude according to the time difference;
judging whether a third pre-stored control logic matched with the signal amplitude is stored or not;
if a third pre-stored control logic matched with the signal amplitude is stored, determining the third pre-stored control logic matched with the signal amplitude as the third target control logic;
and if the third pre-stored control logic matched with the signal amplitude is not stored, determining the signal amplitude as the fourth target control logic.
In order to solve the above problem, in a second aspect, the present application provides a mobile terminal rear cover detection device, where the mobile terminal rear cover detection device is applied to a mobile terminal, and the mobile terminal rear cover detection device includes:
the signal receiving module is used for receiving a signal of a first pin of the rear cover interface;
the first determining module is used for determining a first target control logic according to the signal of the first pin;
the signal output module is used for outputting an amplitude signal to a second pin of the rear cover interface according to the first target control logic;
the second determining module is used for determining a second target control logic according to the signal of the second pin;
the third determining module is used for acquiring signal amplitude according to the second target control logic and determining a third target control logic and a fourth target control logic according to the signal amplitude;
and the enabling module is used for enabling the mobile terminal according to the third target control logic and forbidding the mobile terminal according to the fourth target control logic.
The mobile terminal rear cover detection device further comprises a first detection module, a first judgment module, a first control logic storage module, a second detection module, a second judgment module, a second control logic storage module, a third detection module, a third judgment module, a third control logic storage module and an amplitude acquisition module;
the first detection module is used for detecting the rising edge interrupt state of the first pin;
the first judgment module is used for judging whether a first pre-stored control logic matched with the rising edge interrupt state of the first pin is stored or not;
the first control logic storage module is used for storing first pre-stored control logic matched with the rising edge interrupt state of the first pin;
the first determining module is further configured to determine a connection of a rear cover when a first pre-stored control logic matched with the interruption state of the rising edge of the first pin is stored, and determine the first pre-stored control logic matched with the interruption state of the rising edge of the first pin as the first target control logic;
the second detection module is used for detecting the effective edge change state of the second pin;
the second judgment module is used for judging whether a second pre-stored control logic matched with the effective edge change state of the second pin is stored or not;
the second control logic storage module is used for storing second pre-stored control logic matched with the effective edge change state of the second pin;
the second determining module is further configured to determine, when a second pre-stored control logic matching the effective edge change state of the second pin is stored, the second pre-stored control logic matching the effective edge change state of the second pin as the second target control logic;
a third detection module, configured to detect a time difference between two identical and adjacent effective edge change states of the second pin according to the second target control logic;
the amplitude acquisition module is used for acquiring the signal amplitude according to the time difference;
the third judging module is used for judging whether a third pre-stored control logic matched with the signal amplitude is stored or not;
the third control logic storage module is used for storing third pre-stored control logic matched with the signal amplitude;
the third determining module is further configured to determine a third pre-stored control logic matched with the signal amplitude as the third target control logic when the third pre-stored control logic matched with the signal amplitude is stored; and when a third prestored control logic matched with the signal amplitude is not stored, determining the signal amplitude as the fourth target control logic.
The mobile terminal rear cover detection device also comprises a fourth detection module, a fourth judgment module,
The fourth control logic storage module, the fourth determination module and the stop output module;
the fourth detection module is used for detecting the falling edge interrupt state of the first pin when a third pre-stored control logic matched with the signal amplitude is not stored;
the fourth judging module is used for judging whether a fifth pre-stored control logic matched with the falling edge interruption state of the first pin is stored or not;
the fourth control logic storage module is used for storing fifth pre-stored control logic matched with the falling edge interrupt state of the first pin;
a fourth determining module, configured to determine that a rear cover is not connected when a fifth pre-stored control logic matching the falling edge interrupt state of the first pin is stored, and determine the fifth pre-stored control logic matching the falling edge interrupt state of the first pin as a fifth target control logic;
and the stop output module is used for stopping outputting the amplitude signal to the second pin of the rear cover interface according to a fifth target control logic.
In order to solve the above problem, in a third aspect, the present application provides a computer-readable storage medium having stored therein a plurality of instructions adapted to be loaded by a processor to execute the mobile terminal back cover detection method described above.
The beneficial effect of this application is:
through a relatively perfect rear cover identification method, the difficulty of imitating the rear cover is greatly increased, so that the correct rear cover is ensured to be used when a user replaces the rear cover, and the performance of the mobile terminal is perfected.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the description of the present application, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like indicate orientations or positional relationships based on those shown in the drawings, and are used merely for convenience of description and for simplicity of description, and do not indicate or imply that the referenced device or element must have a particular orientation, be constructed in a particular orientation, and be operated, and thus should not be considered as limiting the present application. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
In this application, the word "exemplary" is used to mean "serving as an example, instance, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for the purpose of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known structures and processes are not set forth in detail in order to avoid obscuring the description of the present application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
The application provides a mobile terminal rear cover detection method, a mobile terminal rear cover detection device and a computer readable storage medium, wherein the mobile terminal rear cover detection method is applied to a mobile terminal, and comprises the following steps: receiving a signal of a first pin of a rear cover interface; determining a first target control logic according to the signal of the first pin; outputting an amplitude signal to a second pin of the rear cover interface according to the first target control logic; determining a second target control logic according to the signal of the second pin; acquiring signal amplitude according to the second target control logic, and determining a third target control logic and a fourth target control logic according to the signal amplitude; enabling the mobile terminal according to the third target control logic, and disabling the mobile terminal according to the fourth target control logic. The following are detailed below.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for detecting a rear cover of a mobile terminal according to a first embodiment of the present disclosure. The method for detecting the rear cover of the mobile terminal in the embodiment can be applied to the mobile terminal, and the mobile terminal can be intelligent equipment such as a smart phone, a smart watch, an ipad and a tablet computer, which is not limited in the application. The specific flow of the mobile terminal rear cover detection method can be as follows:
and S11, receiving a signal of a first pin of the rear cover interface.
In this embodiment, the rear cover interface is a point-contact interface, and the rear cover interface includes a first pin (LDO) and a second pin (INTERFACEA or interface b), where the first pin outputs a voltage signal when the rear cover interface is powered on, the second pin is connected to the mobile terminal, that is, the LDO pin outputs a 5V voltage as long as the rear cover is powered on, and the INTERFACEA or interface b pin is used to connect the mobile terminal to receive a signal output by the mobile terminal.
And S12, determining a first target control logic according to the signal of the first pin.
In this embodiment, the connection (or referred to as the closing) or the removal (or referred to as the pulling) of the rear cover is determined by the signal of the first pin.
And S13, outputting an amplitude signal to a second pin of the rear cover interface according to the first target control logic.
In this embodiment, when the connection of the rear cover (or called as the closing of the rear cover) is detected, an amplitude signal is output to the rear cover interface, specifically to the INTERFACEA pin or the interface pin; when the connection removal (or called back cover pull-out) of the back cover is detected, the output of the amplitude signal to the back cover interface is stopped.
And S14, determining a second target control logic according to the signal of the second pin.
In this embodiment, the amplitude of the input signal is obtained when a rising edge or falling edge interrupt is detected at the signal input terminal.
And S15, acquiring signal amplitude according to the second target control logic, and determining a third target control logic and a fourth target control logic according to the signal amplitude.
In this embodiment, the amplitude output by the standard mobile terminal is pre-stored in the back cover, and if the acquired amplitude of the input signal is the same as the pre-stored amplitude, the mobile terminal is considered as the standard mobile terminal, otherwise, the mobile terminal is considered as the non-standard mobile terminal.
And S16, enabling the mobile terminal according to the third target control logic, and disabling the mobile terminal according to the fourth target control logic.
In this embodiment, it is determined whether the amplitude is an amplitude output by the standard mobile terminal, and if so, the mobile terminal is enabled, otherwise, the mobile terminal is disabled.
Different from the prior art, the application provides a mobile terminal rear cover detection method, which is applied to a mobile terminal and comprises the following steps: receiving a signal of a first pin of a rear cover interface; determining a first target control logic according to the signal of the first pin; outputting an amplitude signal to a second pin of the rear cover interface according to the first target control logic; determining a second target control logic according to the signal of the second pin; acquiring signal amplitude according to the second target control logic, and determining a third target control logic and a fourth target control logic according to the signal amplitude; enabling the mobile terminal according to the third target control logic, and disabling the mobile terminal according to the fourth target control logic. The method for identifying the rear cover is relatively perfect, so that the difficulty of imitating the rear cover is greatly increased, the correct rear cover is guaranteed to be used when a user replaces the rear cover, and the performance of the mobile terminal is perfected.
For more clearly explaining the method for detecting the rear cover of the mobile terminal of the present application, please refer to fig. 2, and fig. 2 is a flowchart illustrating a second embodiment of a method for detecting the rear cover of the mobile terminal according to the present application.
As shown in fig. 2, the specific flow of the method for detecting the rear cover of the mobile terminal is as follows:
s201, receiving a signal of a first pin of the rear cover interface.
In this embodiment, the rear cover interface is a point-contact interface, and the rear cover interface includes a first pin (LDO) and a second pin (INTERFACEA or interface b), where the first pin outputs a voltage signal when the rear cover interface is powered on, the second pin is connected to the mobile terminal, that is, the LDO pin outputs a 5V voltage as long as the rear cover is powered on, and the INTERFACEA or interface b pin is used to connect the mobile terminal to receive a signal output by the mobile terminal.
S202, detecting the rising edge interrupt state of the first pin.
In this embodiment, whether the LDO pin generates a rising edge interrupt state is detected. In a digital circuit, the moment (time) when the digital level changes from low (digital "0") to high (digital "1") is called a rising edge.
S203, judging whether a first pre-stored control logic matched with the rising edge interrupt state of the first pin is stored or not; if the first pre-stored control logic matched with the rising edge interruption state of the first pin is stored, determining that the rear cover is connected, and executing step S204, and if the first pre-stored control logic matched with the rising edge interruption state of the first pin is not stored, executing step S205.
In this embodiment, when detecting that the rising edge interrupt occurs on the LDO pin, the back cover is considered to be connected, and when not detecting that the rising edge interrupt occurs on the LDO pin, the falling edge interrupt continues to be detected.
S204, determining the first pre-stored control logic matched with the rising edge interrupt state of the first pin as the first target control logic.
In this embodiment, when detecting that the rising edge interrupt occurs on the LDO pin, the back cover is considered to be connected, thereby outputting an amplitude signal to the second pin of the back cover interface.
And S205, detecting the falling edge interrupt state of the first pin.
In this embodiment, whether the LDO pin generates a falling edge interrupt state is detected. In a digital circuit, the instant at which the digital level changes from high (digital "1") to low (digital "0") is called a falling edge.
S206, judging whether a fifth pre-stored control logic matched with the falling edge interruption state of the first pin is stored or not; and if the fifth pre-stored control logic matched with the falling edge interrupt state of the first pin is stored, determining that the rear cover is not connected, and executing the step S207, otherwise, not executing any step.
In this embodiment, whether the LDO pin generates a falling edge interrupt is detected.
And S207, determining the fifth pre-stored control logic matched with the falling edge interrupt state of the first pin as a fifth target control logic.
In this embodiment, the back cover connection is considered removed when a falling edge interrupt is detected on the LDO pin.
And S208, stopping outputting the amplitude signal to the second pin of the rear cover interface according to a fifth target control logic.
In this embodiment, if the rear cover is pulled out (i.e., the rear cover is removed from the connection), the amplitude signal is no longer output to the second pin of the rear cover interface.
And S209, outputting an amplitude signal to a second pin of the rear cover interface according to the first target control logic.
In this embodiment, when the connection of the rear cover (or called as the closing of the rear cover) is detected, an amplitude signal is output to the rear cover interface, specifically to the INTERFACEA pin or the interface pin; when the connection removal (or called back cover pull-out) of the back cover is detected, the output of the amplitude signal to the back cover interface is stopped.
S210, detecting the effective edge change state of the second pin.
In this embodiment, it is detected whether the INTERFACEA pin or the interrupt pin generates a rising edge or falling edge interrupt. The active edge transition state includes a rising edge interrupt state or a falling edge interrupt state.
S211, judging whether a second pre-stored control logic matched with the effective edge change state of the second pin is stored or not; if the second pre-stored control logic matching the active edge change status of the second pin is stored, step S212 is executed, otherwise, no step is executed.
In this embodiment, it is detected INTERFACEA whether a rising edge or falling edge interrupt is generated and matched to the second pre-stored control logic.
S212, determining the second pre-stored control logic matched with the effective edge change state of the second pin as the second target control logic.
In this embodiment, the second target control logic is determined when detecting that pin INTERFACEA generates a rising edge or falling edge interrupt.
S213, detecting a time difference between two identical and adjacent active edge change states of the second pin according to the second target control logic.
In this embodiment, a specific detection method is to detect a time difference T1 between two consecutive rising edges (or falling edges) of the input signal.
And S214, acquiring the signal amplitude according to the time difference.
In this embodiment, 1/T1 is the amplitude of the input signal.
S215, judging whether a third pre-stored control logic matched with the signal amplitude is stored or not; if a third pre-stored control logic matched with the signal amplitude is stored, executing step S216; if the third pre-stored control logic matching the signal amplitude is not stored, step S217 is performed.
In this embodiment, the amplitude is matched to the third pre-stored control logic.
S216, determining a third pre-stored control logic matched with the signal amplitude as the third target control logic;
in this embodiment, whether the amplitude is an amplitude output by the standard mobile terminal is determined as the third target control logic if the amplitude is the amplitude output by the standard mobile terminal.
And S217, determining the target control logic as the fourth target control logic.
In this embodiment, whether the amplitude is an amplitude output by the standard mobile terminal is determined, and if not, the amplitude is determined as the fourth target control logic.
And S218, enabling the mobile terminal according to the third target control logic.
In this embodiment, it is determined whether the amplitude is an amplitude output by the standard mobile terminal, and if so, the mobile terminal is further enabled.
And S219, disabling the mobile terminal according to the fourth target control logic.
In this embodiment, it is determined whether the amplitude is an amplitude output by the standard mobile terminal, and if not, the mobile terminal is further disabled.
Different from the prior art, the application provides a mobile terminal rear cover detection method, which is applied to a mobile terminal and comprises the following steps: receiving a signal of a first pin of a rear cover interface; determining a first target control logic according to the signal of the first pin; outputting an amplitude signal to a second pin of the rear cover interface according to the first target control logic; determining a second target control logic according to the signal of the second pin; acquiring signal amplitude according to the second target control logic, and determining a third target control logic and a fourth target control logic according to the signal amplitude; enabling the mobile terminal according to the third target control logic, and disabling the mobile terminal according to the fourth target control logic. This application distinguishes through the range of the signal of back lid discernment mobile terminal output whether to connect mobile terminal for the standard matching to the detection to the back lid can be perfect, makes the back lid end also can just start mobile terminal through discerning the exact mobile terminal, thereby greatly increased the degree of difficulty of imitating the back lid, thereby it is the exact back lid to use when guaranteeing the user to change the back lid, guarantees that mobile terminal's performance is perfect.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a rear cover detection device of a mobile terminal according to an embodiment of the present application. As shown in fig. 3, the mobile terminal rearcover detection apparatus 600 is applied to a mobile terminal, and the mobile terminal rearcover detection apparatus 600 includes: a signal receiving module 601, a first determiningmodule 605, a second determining module 610, a third determiningmodule 615, asignal output module 606, an enabling module 616, a first detecting module 602, a first judging module 603, a first control logic storage module 604, a second detecting module 607, asecond judging module 608, a second control logic storage module 609, a third detectingmodule 611, athird judging module 613, a third control logic storage module 614, an amplitude obtaining module 612, a fourth detecting module 617, afourth judging module 618, a fourth control logic storage module 619, a fourth determiningmodule 620 and a stop output module 621; wherein:
the signal receiving module 601 is configured to receive a signal of the first pin of the rear cover interface 622.
In this embodiment, the rear cover interface 622 is a point contact interface, and the rear cover interface 622 includes a first pin (LDO) and a second pin (INTERFACEA or interrupt), where the first pin outputs a voltage signal when the rear cover interface is powered on, the second pin is connected to the mobile terminal, that is, the LDO pin outputs a 5V voltage as long as the rear cover is powered on, and the INTERFACEA or interrupt pin is used to connect the mobile terminal to receive a signal output by the mobile terminal.
A first detecting module 602, configured to detect a rising edge interrupt status of the first pin.
In this embodiment, whether the LDO pin generates a rising edge interrupt state is detected. In a digital circuit, the moment (time) when the digital level changes from low (digital "0") to high (digital "1") is called a rising edge.
The first determining module 603 is configured to determine whether a first pre-stored control logic matched with the interrupt status of the rising edge of the first pin is stored.
In this embodiment, when detecting that the rising edge interrupt occurs on the LDO pin, the back cover is considered to be connected, and when not detecting that the rising edge interrupt occurs on the LDO pin, the falling edge interrupt continues to be detected.
A first control logic storage module 604, configured to store a first pre-stored control logic matched to the interrupt status of the rising edge of the first pin.
The first determiningmodule 605 is configured to determine a back cover connection when a first pre-stored control logic matching the rising edge interrupt state of the first pin is stored, and determine the first pre-stored control logic matching the rising edge interrupt state of the first pin as the first target control logic.
In this embodiment, when detecting that the rising edge interrupt occurs on the LDO pin, the back cover is considered to be connected, thereby outputting an amplitude signal to the second pin of the back cover interface.
Asignal output module 606, configured to output an amplitude signal to a second pin of the rear cover interface according to the first target control logic.
In this embodiment, when the connection of the rear cover (or called as the closing of the rear cover) is detected, an amplitude signal is output to the rear cover interface, specifically to the INTERFACEA pin or the interface pin; when the connection removal (or called back cover pull-out) of the back cover is detected, the output of the amplitude signal to the back cover interface is stopped.
A second detecting module 607, configured to detect a valid edge change state of the second pin.
In this embodiment, it is detected whether the INTERFACEA pin or the interrupt pin generates a rising edge or falling edge interrupt. The active edge transition state includes a rising edge interrupt state or a falling edge interrupt state.
A second determiningmodule 608, configured to determine whether a second pre-stored control logic matching the effective edge variation state of the second pin is stored.
In this embodiment, it is detected INTERFACEA whether a rising edge or falling edge interrupt is generated and matched to the second pre-stored control logic.
And a second control logic storage block 609, configured to store a second pre-stored control logic matched with the active edge change state of the second pin.
The second determining module 610 is further configured to, when a second pre-stored control logic matching the effective edge change state of the second pin is stored, determine the second pre-stored control logic matching the effective edge change state of the second pin as the second target control logic.
In this embodiment, the second target control logic is determined when detecting that pin INTERFACEA generates a rising edge or falling edge interrupt.
A third detectingmodule 611, configured to detect a time difference between two identical and adjacent active edge change states of the second pin according to the second target control logic.
In this embodiment, a specific detection method is to detect a time difference T1 between two consecutive rising edges (or falling edges) of the input signal.
An amplitude obtaining module 612, configured to obtain a signal amplitude according to the time difference.
In this embodiment, 1/T1 is the amplitude of the input signal.
A third determiningmodule 613 is configured to determine whether a third pre-stored control logic matched with the signal amplitude is stored.
In this embodiment, the amplitude is matched to the third pre-stored control logic.
And a third control logic storage module 614, configured to store a third pre-stored control logic matched to the signal amplitude.
In this embodiment, whether the amplitude is an amplitude output by the standard mobile terminal is determined as the third target control logic if the amplitude is the amplitude output by the standard mobile terminal.
A third determiningmodule 615, configured to determine, when a third pre-stored control logic matching the signal amplitude is stored, the third pre-stored control logic matching the signal amplitude as the third target control logic; and when a third prestored control logic matched with the signal amplitude is not stored, determining the signal amplitude as the fourth target control logic.
In this embodiment, whether the amplitude is an amplitude output by the standard mobile terminal is determined as the third target control logic if the amplitude is the amplitude output by the standard mobile terminal, and the fourth target control logic if the amplitude is the amplitude output by the standard mobile terminal.
A fourth detecting module 617, configured to detect a falling edge interrupt status of the first pin when a third pre-stored control logic matching the signal amplitude is not stored.
In this embodiment, whether the LDO pin generates a falling edge interrupt state is detected. In a digital circuit, the instant at which the digital level changes from high (digital "1") to low (digital "0") is called a falling edge.
A fourth determiningmodule 618, configured to determine whether a fifth pre-stored control logic matched with the falling edge interrupt status of the first pin is stored.
In this embodiment, whether the LDO pin generates a falling edge interrupt is detected.
And a fourth control logic storage module 619, configured to store a fifth pre-stored control logic matched with the falling edge interrupt state of the first pin.
A fourth determiningmodule 620, configured to determine that the rear cover is not connected when a fifth pre-stored control logic matching the falling edge interrupt state of the first pin is stored, and determine the fifth pre-stored control logic matching the falling edge interrupt state of the first pin as a fifth target control logic.
In this embodiment, the back cover connection is considered removed when a falling edge interrupt is detected on the LDO pin.
The stop output module 621 is configured to stop outputting the amplitude signal to the second pin of the rear cover interface according to a fifth target control logic.
In this embodiment, if the rear cover is pulled out (i.e., the rear cover is removed from the connection), the amplitude signal is no longer output to the second pin of the rear cover interface.
An enabling module 616, configured to enable the mobile terminal according to the third target control logic, and disable the mobile terminal according to the fourth target control logic.
In this embodiment, it is determined whether the amplitude is an amplitude output by the standard mobile terminal, if so, the mobile terminal is further enabled, and if not, the mobile terminal is further disabled.
Different from the prior art, the application provides a mobile terminal rear cover detection device, which is applied to a mobile terminal and receives a signal of a first pin of a rear cover interface; determining a first target control logic according to the signal of the first pin; outputting an amplitude signal to a second pin of the rear cover interface according to the first target control logic; determining a second target control logic according to the signal of the second pin; acquiring signal amplitude according to the second target control logic, and determining a third target control logic and a fourth target control logic according to the signal amplitude; enabling the mobile terminal according to the third target control logic, and disabling the mobile terminal according to the fourth target control logic. This application distinguishes through the range of the signal of back lid discernment mobile terminal output whether to connect mobile terminal for the standard matching to the detection to the back lid can be perfect, makes the back lid end also can just start mobile terminal through discerning the exact mobile terminal, thereby greatly increased the degree of difficulty of imitating the back lid, thereby it is the exact back lid to use when guaranteeing the user to change the back lid, guarantees that mobile terminal's performance is perfect.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure. The mobile terminal can be a smart phone, a tablet computer and other devices. As shown in fig. 4, themobile terminal 400 includes a processor 401, amemory 402. The processor 401 is electrically connected to thememory 402.
The processor 401 is a control center of themobile terminal 400, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or loading an application program stored in thememory 402 and calling data stored in thememory 402, thereby integrally monitoring the mobile terminal.
In this embodiment, the processor 401 in the mobile terminal 400 loads instructions corresponding to processes of one or more application programs into thememory 402 according to the following steps, and the processor 401 runs the application programs stored in thememory 402, thereby implementing various functions:
receiving a signal of a first pin of a rear cover interface;
determining a first target control logic according to the signal of the first pin;
outputting an amplitude signal to a second pin of the rear cover interface according to the first target control logic;
determining a second target control logic according to the signal of the second pin;
acquiring signal amplitude according to the second target control logic, and determining a third target control logic and a fourth target control logic according to the signal amplitude;
enabling the mobile terminal according to the third target control logic, and disabling the mobile terminal according to the fourth target control logic.
Referring to fig. 5, fig. 5 is another schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure. Fig. 5 shows a specific structural block diagram of a mobile terminal provided in an embodiment of the present application, where the mobile terminal 300 may be used to implement the method for detecting a rear cover of a mobile terminal provided in the foregoing embodiment. The mobile terminal 300 may be a smart phone or a tablet computer.
TheRF circuit 310 is used for receiving and transmitting electromagnetic waves, and performing interconversion between the electromagnetic waves and electrical signals, thereby communicating with a communication network or other devices.RF circuitry 310 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth.RF circuit 310 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices over a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The Wireless network may use various Communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), enhanced Mobile Communication (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (e.g., IEEE802.1 a, IEEE802.11 b, IEEE802.1 g and/or IEEE802.1 n standards), Voice over Internet Protocol (VoIP), world wide interoperability for Microwave, and other short message protocols, as well as any other suitable communication protocols, and may even include those that have not yet been developed.
Thememory 320 may be used to store software programs and modules, such as program instructions/modules corresponding to the mobile terminal back cover detection method and the terminal positioning device in the foregoing embodiments, and theprocessor 380 executes various functional applications and data processing by running the software programs and modules stored in thememory 320, so as to implement the function of positioning the terminal. Thememory 320 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, thememory 320 may further include memory located remotely from theprocessor 380, which may be connected to the mobile terminal 300 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Theinput unit 330 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, theinput unit 330 may include a touch-sensitive surface 331 as well asother input devices 332. The touch-sensitive surface 331, also referred to as a touch screen or touch pad, may collect touch operations by a user on or near the touch-sensitive surface 331 (e.g., operations by a user on or near the touch-sensitive surface 331 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, the touchsensitive surface 331 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to theprocessor 380, and can receive and execute commands sent by theprocessor 380. In addition, the touch-sensitive surface 331 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. Theinput unit 330 may compriseother input devices 332 in addition to the touchsensitive surface 331. In particular,other input devices 332 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
Thedisplay unit 340 may be used to display information input by or provided to the user and various graphical user interfaces of the mobile terminal 300, which may be made up of graphics, text, icons, video, and any combination thereof. TheDisplay unit 340 may include aDisplay panel 341, and optionally, theDisplay panel 341 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, touch-sensitive surface 331 mayoverlay display panel 341, and when touch-sensitive surface 331 detects a touch operation thereon or thereabout, communicate toprocessor 380 to determine the type of touch event, andprocessor 380 then provides a corresponding visual output ondisplay panel 341 in accordance with the type of touch event. Although in FIG. 5, touch-sensitive surface 331 anddisplay panel 341 are implemented as two separate components for input and output functions, in some embodiments, touch-sensitive surface 331 anddisplay panel 341 may be integrated for input and output functions.
The mobile terminal 300 includes at least onesensor 350, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of thedisplay panel 341 according to the brightness of ambient light, and a proximity sensor that may turn off thedisplay panel 341 and/or the backlight when the mobile terminal 300 is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured on the mobile terminal 300, detailed descriptions thereof are omitted.
Audio circuitry 360,speaker 361, andmicrophone 362 may provide an audio interface between a user and the mobile terminal 300. Theaudio circuit 360 may transmit the electrical signal converted from the received audio data to thespeaker 361, and the audio signal is converted by thespeaker 361 and output; on the other hand, themicrophone 362 converts the collected sound signal into an electrical signal, which is received by theaudio circuit 360 and converted into audio data, which is then processed by the audiodata output processor 380 and then transmitted to, for example, another terminal via theRF circuit 310, or the audio data is output to thememory 320 for further processing. Theaudio circuit 360 may also include an earbud jack to provide communication of a peripheral headset with the mobile terminal 300.
The mobile terminal 300, which may assist the user in e-mail, web browsing, streaming media access, etc., through the transmission module 370 (e.g., a Wi-Fi module), provides the user with wireless broadband internet access. Although fig. 5 shows thetransmission module 370, it is understood that it does not belong to the essential constitution of the mobile terminal 300 and may be omitted entirely within the scope not changing the essence of the invention as needed.
Theprocessor 380 is a control center of the mobile terminal 300, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the mobile terminal 300 and processes data by operating or executing software programs and/or modules stored in thememory 320 and calling data stored in thememory 320, thereby integrally monitoring the mobile phone. Optionally,processor 380 may include one or more processing cores; in some embodiments,processor 380 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated intoprocessor 380.
The mobile terminal 300 includes a power supply 390 (e.g., a battery) for powering the various components, which may be logically coupled to theprocessor 380 via a power management system in some embodiments to manage charging, discharging, and power consumption management functions via the power management system. Thepower supply 390 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the mobile terminal 300 may further include a camera (e.g., a front camera, a rear camera), a bluetooth module, etc., which will not be described herein. Specifically, in this embodiment, the display unit of the mobile terminal is a touch screen display, the mobile terminal further includes a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for:
receiving a signal of a first pin of a rear cover interface;
determining a first target control logic according to the signal of the first pin;
outputting an amplitude signal to a second pin of the rear cover interface according to the first target control logic;
determining a second target control logic according to the signal of the second pin;
acquiring signal amplitude according to the second target control logic, and determining a third target control logic and a fourth target control logic according to the signal amplitude;
enabling the mobile terminal according to the third target control logic, and disabling the mobile terminal according to the fourth target control logic.