CN106055455B - The anti-interference method and device of a kind of button - Google Patents
The anti-interference method and device of a kind of button Download PDFInfo
- Publication number
- CN106055455B CN106055455B CN201610404928.5A CN201610404928A CN106055455B CN 106055455 B CN106055455 B CN 106055455B CN 201610404928 A CN201610404928 A CN 201610404928A CN 106055455 B CN106055455 B CN 106055455B
- Authority
- CN
- China
- Prior art keywords
- state
- gpio interface
- button
- physical button
- terminal device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3041—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is an input/output interface
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3055—Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3485—Performance evaluation by tracing or monitoring for I/O devices
Abstract
The embodiment of the invention discloses a kind of anti-interference method of button and device, method therein may include:The state of the universal input of detection terminal equipment/output GPIO interface is in the object time of low level state, the physical button of the terminal device is connected by the GPIO interface with the CPU of the terminal device, wherein, when the physical button is not pressed, the state of the GPIO interface is in high level state, and when the physical button is pressed, the state of the GPIO interface is in low level state;When the object time exceeding preset time threshold, drawing high the level of the GPIO interface makes the state of the GPIO interface at the appointed time be in high level state in section.Using the present invention can prevent in the prior art physical button may due to caused by interference can not normal use the problem of, improve Consumer's Experience.
Description
Technical field
The present invention relates to the anti-interference method and device of electronic technology field, more particularly to a kind of button.
Background technology
Universal input/output (General Purpose Input Output, GPIO) interface is a kind of general programmable
I/O ports, it is understood that for the electronic original part for input/output, major function is that side is extended to input/output
Help, there is no enough I/O ports in microcontroller or chipset generally, or when system needs to use distal end serial communication or control
When extra control and function for monitoring are provided.For example, it is frequently necessary to control many outsides simple in construction in embedded systems
Equipment or circuit, these equipment some need to control by CPU, and some needs CPU to provide input signal, also, many is set
Standby or circuit has only required ON/OFF two states, therefore, corresponding control function, such as LED can be provided by GPIO interface
Light on and off, output low and high level, control buzzer and detection button etc..
When GPIO interface applies the button detection function in terminal device, principle is as follows:(GPIO when button is not pressed
Interface status is in high level state), when user pushes button, (GPIO interface state is in low level state) is reported to CPU
Button is pressed, and when user unclamps button, (GPIO interface state returns to high level state) is reported to CPU buttons to unclamp, and waits
Treat to press next time.But during user pushes button, once button receives electrostatic interference or other interference, just
The state of GPIO interface can be caused seemingly-dead, i.e., GPIO state can be continuously maintained in low level state, even if now button continues
Press or unclamp, GPIO state also all keeps constant, and then so that the GPIO interface state for being reported to CPU is low electricity always
Level state, and button is then shown as on software and is constantly in the state of being pressed, ultimately result in terminal device can not normal use, shadow
Ring Consumer's Experience.
The content of the invention
Technical problem to be solved of the embodiment of the present invention is, there is provided the anti-interference method and device of a kind of button, solution
Determine the problem of button is frequently present of interference in the prior art.
In a first aspect, the embodiments of the invention provide a kind of anti-interference method of button, it may include:
The state of the universal input of detection terminal equipment/output GPIO interface is in the object time of low level state, institute
The physical button for stating terminal device is connected by the GPIO interface with the CPU of the terminal device, wherein, when the physics is pressed
The state of the GPIO interface is in high level state when key is not pressed, and when the physical button is pressed, the GPIO connects
The state of mouth is in low level state;
When the object time exceeding preset time threshold, drawing high the level of the GPIO interface makes the GPIO interface
State be at the appointed time in high level state in section.
With reference in a first aspect, in the first possible implementation, methods described also includes:In the specified time section
Inside stop reporting the state of the GPIO interface of the terminal device to the CPU.
With reference to the possible implementation of the first of first aspect or first aspect, in second of possible implementation
In, the level for drawing high the GPIO interface makes the state of the GPIO interface at the appointed time be in high level state in section
Afterwards, including:Delay when default, detect the state of the GPIO interface of the terminal device;When detecting the GPIO interface
State when being in high level state, report the physical button not to be pressed to the CPU;When detecting the GPIO interface
State when being in low level state, report the physical button to be pressed to the CPU.
With reference to second of possible implementation of first aspect, in the third possible implementation, the detection
After the state of the GPIO interface of the terminal device, in addition to:When the state for detecting the GPIO interface is in high level
During state, physical button described in user is prompted to there is currently interference.
With reference in a first aspect, in the 4th kind of possible implementation, the physical button is with unlocked by fingerprint function
Button.
Second aspect, the embodiments of the invention provide a kind of interference preventer of button, it may include:
First detection module, the state for universal input/output GPIO interface of detection terminal equipment are in low level
The object time of state, the physical button of the terminal device are connected by the GPIO interface with the CPU of the terminal device,
Wherein, when the physical button is not pressed, the state of the GPIO interface is in high level state, when the physical button
The state of the GPIO interface is in low level state when being pressed;
Module is drawn high, for when the object time exceeding preset time threshold, drawing high the level of the GPIO interface
The state of the GPIO interface is set at the appointed time to be in high level state in section.
With reference to second aspect, in the first possible implementation, described device also includes:
Stopping modular, for stopping reporting the GPIO of the terminal device to connect to the CPU in the specified time section
The state of mouth.
With reference to the possible implementation of the first of second aspect or second aspect, in second of possible implementation
In, described device, in addition to:
Second detection module, for delaying when default, detect the state of the GPIO interface of the terminal device;
First reporting module, for when the state for detecting the GPIO interface is in high level state, to the CPU
The physical button is reported not to be pressed;
Second reporting module, for when the state for detecting the GPIO interface is in low level state, to the CPU
The physical button is reported to be pressed.
With reference to second of possible implementation of second aspect, in the third possible implementation, described device,
Also include:
Reminding module, for when the state for detecting the GPIO interface is in high level state, prompting described in user
Physical button there is currently interference.
With reference to second aspect, in the 4th kind of possible implementation, the physical button is with unlocked by fingerprint function
Button.
The third aspect, the embodiments of the invention provide a kind of terminal device, including:
It is stored with the memory of executable program code;
The processor coupled with the memory;
The processor calls the executable program code stored in the memory, performs such as the embodiment of the present invention
Part or all of step described in first aspect either method.
Fourth aspect, the present invention provides a kind of computer-readable storage medium, for saving as second aspect of the embodiment of the present invention
Computer software instructions used in the interference preventer of the button of offer, it, which is included, is used to perform the journey designed by above-mentioned aspect
Sequence.
Implement the embodiment of the present invention, have the advantages that:
The embodiment of the present invention, low level is in by the state of universal input/output GPIO interface of detection terminal equipment
The object time of state, when the object time exceeding preset time threshold, drawing high the level of GPIO interface makes the shape of GPIO interface
State is at the appointed time in high level state in section.The GPIO that scheme i.e. provided in an embodiment of the present invention passes through detection terminal equipment
The state of interface is in whether low level state exceedes certain time length, when more than certain time length, is then judged as the physical button
Interference (such as electrostatic interference) is may currently exist, now, by forcing to draw high the level of GPIO interface, and then shorter
GPIO is reset in time, so as to eliminate due to logic error caused by electrostatic interference, solves physics in the prior art
Button may due to caused by interference can not normal use the problem of, improve Consumer's Experience.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of the anti-interference method of button provided in an embodiment of the present invention;
Fig. 2 is the schematic flow sheet of the anti-interference method of another button provided in an embodiment of the present invention;
Fig. 3 is the structural representation of the anti-interference method device of button provided in an embodiment of the present invention;
Fig. 4 is the structural representation of another embodiment of the interference preventer of button provided by the invention;
Fig. 5 is the structural representation of another embodiment of the interference preventer of button provided by the invention;
Fig. 6 is the structural representation of another embodiment of the interference preventer of button provided by the invention;
Fig. 7 is the structural representation of terminal device provided in an embodiment of the present invention;
Fig. 8 is the structural representation of another embodiment of terminal device provided by the invention.
Embodiment
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention
Accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, rather than whole embodiments.Based on the embodiment in the present invention, ordinary skill people
The every other embodiment that member is obtained under the premise of creative work is not made, it should all belong to the model that the present invention protects
Enclose.
It is described in detail individually below.
Term " first ", " second ", " the 3rd " in description and claims of this specification and the accompanying drawing and "
Four " etc. be to be used to distinguish different objects, rather than for describing particular order.In addition, term " comprising " and " having " and it
Any deformation, it is intended that cover non-exclusive include.Such as contain the process of series of steps or unit, method, be
The step of system, product or equipment are not limited to list or unit, but alternatively also including the step of not listing or list
Member, or alternatively also include for the intrinsic other steps of these processes, method, product or equipment or unit.
Referenced herein " embodiment " is it is meant that the special characteristic, structure or the characteristic that describe can wrap in conjunction with the embodiments
In at least one embodiment of the present invention.Each position in the description occur the phrase might not each mean it is identical
Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and
Implicitly understand, embodiment described herein can be combined with other embodiments.
Hereinafter, the part term in the application is explained, in order to skilled artisan understands that.
1), terminal device, also referred to as user equipment (User Equipment, UE), are that one kind provides a user voice
And/or the equipment of data connectivity, for example, portable equipment, mobile unit with wireless connecting function etc..Common terminal
Equipment for example including:Mobile phone, tablet personal computer, notebook computer, palm PC, mobile internet device (Mobile Internet
Device, MID), wearable device, Intelligent bracelet, pedometer, MP3 player (Moving Picture Experts Group
Audio Layer III, dynamic image expert's compression standard audio aspect 3), MP4 (Moving Picture Experts
Group Audio Layer IV, dynamic image expert's compression standard audio aspect 3) player, personal digital assistant
(Personal Digital Assistant, PDA) and pocket computer on knee etc..
2), " multiple " refer to two or more."and/or", describes the incidence relation of affiliated partner, and expression can deposit
In three kinds of relations, for example, A and/or B, can be represented:Individualism A, while A and B be present, these three situations of individualism B.
It is a kind of relation of "or" that character "/", which typicallys represent forward-backward correlation object,.
Fig. 1 is a kind of schematic flow sheet of the anti-interference method of button provided in an embodiment of the present invention, below in conjunction with attached
Fig. 1 describes in detail from terminal equipment side to a kind of anti-interference method of button in the embodiment of the present invention, and this method can be with
Comprise the following steps S101- steps S102.
Step S101:The state of the universal input of detection terminal equipment/output GPIO interface is in the mesh of low level state
Between timestamp.
Specifically, the physical button of terminal device is connected by the GPIO interface with the CPU of terminal device, wherein, when
The state of GPIO interface is in high level state when physical button is not pressed, the shape of GPIO interface when physical button is pressed
State is in low level state.Terminal device (specific functional modules or CPU in such as terminal device are in itself) continues detection terminal and set
The operating time that standby physical button is pressed, the i.e. state of the GPIO interface of detection terminal equipment are in the target of low level state
Time.It is appreciated that the object time refers to that the state of GPIO interface is continuously in the time of low level state, rather than
Every the time of accumulation, if centre returns to high level state or other states, the object time resets, recalculated.Further
Ground, the physical button in various embodiments of the present invention can be the button with unlocked by fingerprint function.
It should be noted that it is to need (to press) by button because GPIO interface level state drags down (low level state)
Drag down, and it is that the processing inside CPU acts to draw high (high level state), therefore the low level shape by high level state to after dragging down
State will not be interfered (because must have the action pressed), and can be then interfered by low level state to high level state
(can be that electrostatic leads to not return to high level state), therefore, be only possible to by electrostatic after user pushes button
Deng interference, and button will not be disturbed by electrostatic etc. before user does not push button, therefore how the main discussion of the present invention solves
Certainly after user pushes button, button starts the interference being subject to, i.e. GPIO Interface status can not normally return to from low level
The problem of high level state.
Step S102:When the object time exceeding preset time threshold, drawing high the level of the GPIO interface makes institute
The state for stating GPIO interface is at the appointed time in high level state in section.
Specifically, when detecting that the object time exceedes preset time threshold (such as 5s), then it is judged as that the physical button is worked as
Before there may be interference such as electrostatic interference, now, the physical button or other functions that may result in terminal device can not be just
Often use, and the level for drawing high the GPIO interface makes the state of the GPIO interface at the appointed time be in high level state in section,
Equivalent to indirectly GPIO interface is restarted or reset, then now, GPIO interface recovers normal operating conditions again, you can with
Physical button is avoided to cause the seemingly-dead situation of GPIO interface due to interference such as electrostatic.Wherein, the electricity of GPIO interface is specifically drawn high
Quadratic method is prior art, be will not be repeated here.
The embodiment of the present invention, low level is in by the state of universal input/output GPIO interface of detection terminal equipment
The object time of state, when the object time exceeding preset time threshold, drawing high the level of GPIO interface makes the shape of GPIO interface
State is at the appointed time in high level state in section.The GPIO that scheme i.e. provided in an embodiment of the present invention passes through detection terminal equipment
The state of interface is in whether low level state exceedes certain time length, when more than certain time length, is then judged as the physical button
Interference (such as electrostatic interference) is may currently exist, now, by forcing to draw high the level of GPIO interface, and then shorter
GPIO is reset in time, so as to eliminate due to logic error caused by electrostatic interference, solves physics in the prior art
Button may due to caused by interference can not normal use the problem of, improve Consumer's Experience.
Fig. 2 is the schematic flow sheet of the anti-interference method of another button provided in an embodiment of the present invention, below in conjunction with
Accompanying drawing 2 describes in detail from terminal equipment side to the anti-interference method of another button in the embodiment of the present invention, this method
It may comprise steps of S201- steps S206.
Step S201:The state of the universal input of detection terminal equipment/output GPIO interface is in the mesh of low level state
Between timestamp.
Step S202:When the object time exceeding preset time threshold, drawing high the level of the GPIO interface makes institute
The state for stating GPIO interface is at the appointed time in high level state in section.
Specifically, step S201 to step S202 refers to the step S101 to step S102 in above-mentioned Fig. 1 embodiments, this
In repeat no more.
Step S203:Delay when default, detect the state of the GPIO interface of the terminal device.
Specifically, the level of the GPIO interface is drawn high in step S202 makes the state of the GPIO interface when specified
Between be in high level state in section after, delay when default, detect the state of the GPIO interface of the terminal device.Forcing
After drawing high the default time delay (such as 200ms) after GPIO interface level, just go to detect the current state of GPIO interface, allow GPIO to connect
Mouth state has the regular hour to return to normal condition, avoids in (restarting process) in the short time for drawing high GPIO interface level
Non-genuine state reporting to CPU, cause to judge by accident.
In a kind of possible implementation, stop reporting the terminal to set to the CPU in the specified time section
The state of standby GPIO interface.Specifically, because terminal device in the prior art periodically can report the GPIO to connect to CPU
The state of mouth, now is forced to draw high (high level state) because in the specified time section, the state of GPIO interface is in,
Therefore the time of day of physical button is not represented, for example, when button is pressed 10s by user, i.e. truth is in the 10s
The state of GPIO interface is low level state, if but start pressure in 5s and draw high GPIO, and by the state of GPIO interface
CPU is reported, then can report truth by mistake, allows CPU to take for now physical button and unclamps (not being pressed), and substantially now
Physical button is the state being pressed always, and the system for ultimately resulting in terminal device produces logic error.Therefore, the present invention is implemented
In the scheme that example provides, in the specified time section that this is drawn high, the level state of GPIO interface is not reported to CPU, and when drawing
Height action reports to CPU again after completing, and avoids judging by accident.
Step S204:When the state for detecting the GPIO interface is in high level state, reported to the CPU described
Physical button is not pressed.
Specifically, when the state for detecting GPIO interface is in high level state, then show physical button really
It is released, i.e., reports physical button not to be pressed to CPU.
Step S205:When the state for detecting the GPIO interface is in high level state, physics described in user is prompted
Button there is currently interference.
Specifically, the level of the GPIO interface is drawn high in step S202 makes the state of the GPIO interface when specified
Between be in high level state in section after, delay when default, detect the state of the GPIO interface of the terminal device, when detecting
When the state of the GPIO interface is in high level state, physical button described in user is prompted to there is currently interference.Because force
After drawing high the level of GPIO interface, if the state still high level state that GPIO interface is current, can be shown that the object time
The reason for more than predetermined threshold value is not that user presses physical button and exceedes preset time threshold, but presses physical button in user
Afterwards, physical button receives interference (such as electrostatic interference), just causes to force to draw high in the very short time after GPIO interface,
The state of GPIO interface has been then restored to normal high level state, it is therefore desirable to makes prompting, present physical button to user
Interference be there may be, it is necessary to which user carries out some adjustment.It should be noted that without execution between this step S205 and step S204
Precedence relationship, you can with step S204 simultaneously perform can also be performed before or after step S204, the present invention to this not
Make specific limit.
Step S206:When the state for detecting the GPIO interface is in low level state, reported to the CPU described
Physical button is pressed.
Specifically, when the state for detecting GPIO interface is in low level state, then possible user is represented in fact always
Physical button is being pressed, or physical button is pressed again in of short duration release, i.e., is reporting the physical button to CPU
It is pressed.
The embodiment of the present invention, low level is in by the state of universal input/output GPIO interface of detection terminal equipment
The object time of state, when the object time exceeding preset time threshold, drawing high the level of GPIO interface makes the shape of GPIO interface
State is at the appointed time in high level state in section.The GPIO that scheme i.e. provided in an embodiment of the present invention passes through detection terminal equipment
The state of interface is in whether low level state exceedes certain time length, when more than certain time length, is then judged as the physical button
Interference (such as electrostatic interference) is may currently exist, now, by forcing to draw high the level of GPIO interface, and then shorter
GPIO is reset in time, so as to eliminate due to logic error caused by electrostatic interference, solves physics in the prior art
Button may due to caused by interference can not normal use the problem of, improve Consumer's Experience.
Fig. 3 is the structural representation of the interference preventer of button provided in an embodiment of the present invention, below in conjunction with accompanying drawing 3,
The structure of the interference preventer 10 of button is described in detail.The device 10 may include:First detection module 101 and draw high mould
Block 102, wherein
First detection module 101, the state for universal input/output GPIO interface of detection terminal equipment are in low electricity
The object time of level state, the CPU phases that the physical button of the terminal device passes through the GPIO interface and the terminal device
Even, wherein, when the physical button is not pressed, the state of the GPIO interface is in high level state, when the physics is pressed
The state of the GPIO interface is in low level state when key is pressed;
Module 102 is drawn high, for when the object time exceeding preset time threshold, drawing high the electricity of the GPIO interface
The flat state for making the GPIO interface is at the appointed time in high level state in section.
Specifically, the structural representation of another embodiment of the interference preventer of button provided by the invention as shown in Figure 4
Figure, the device 10 may also include:Stopping modular 103, wherein
Stopping modular 103, for stopping reporting the GPIO of the terminal device in the specified time section to the CPU
The state of interface.
Further, the structure of the another embodiment of the interference preventer of button provided by the invention as shown in Figure 5 is shown
It is intended to, the device 10 may also include:Second detection module 104, the first reporting module 105 and the second reporting module 106, wherein
Second detection module 104, for delaying when default, detect the state of the GPIO interface of the terminal device;
First reporting module 105, for when the state for detecting the GPIO interface is in high level state, to described
CPU reports the physical button not to be pressed;
Second reporting module 106, for when the state for detecting the GPIO interface is in low level state, to described
CPU reports the physical button to be pressed.
Yet further, the structure of the another embodiment of the interference preventer of button provided by the invention as shown in Figure 6
Schematic diagram, the device 10 may also include:Reminding module 107, wherein
Reminding module 107, for when the state for detecting the GPIO interface is in high level state, prompting user institute
State physical button and there is currently interference.
Yet further, the physical button is the button with unlocked by fingerprint function.
It will be appreciated that the function of each module can be corresponded to reference in above-mentioned Fig. 1 and Fig. 2 in the interference preventer 10 of button
Specific implementation in each method embodiment, is repeated no more here.
In the present embodiment, the interference preventer 10 of button is to present in modular form.Here " module " can be with
Refer to ASIC (application-specific integrated circuit, ASIC), perform one or more
The processor and memory of individual software or firmware program, integrated logic circuit, and/or other can provide the device of above-mentioned function
Part.In addition, first detection module 101 and drawing high module 102 and can be realized by the processor 201 of the terminal device shown in Fig. 7.
The embodiment of the present invention additionally provides a kind of terminal device 20, as shown in fig. 7, Fig. 7 is the end in the embodiment of the present invention
The structural representation of end equipment, the structure of terminal device 20 is described in detail below in conjunction with accompanying drawing 7.The terminal device 20
Including at least one processor 201, at least one memory 202, at least one communication interface 203.The processor 201, institute
Memory 202 is stated to connect by the communication bus with the communication interface 203 and complete mutual communication.
Processor 201 can be general central processor (CPU), microprocessor, ASIC
(application-specific integrated circuit, ASIC), or it is one or more for controlling above scheme journey
The integrated circuit that sequence performs.
Communication interface 203, for other equipment or communication, such as Ethernet, wireless access network (RAN), nothing
Line LAN (Wireless Local Area Networks, WLAN) etc..
Memory 202 can be read-only storage (read-only memory, ROM) or can store static information and instruction
Other kinds of static storage device, random access memory (random access memory, RAM) or letter can be stored
Breath and other kinds of dynamic memory or the EEPROM (Electrically of instruction
Erasable Programmable Read-Only Memory, EEPROM), read-only optical disc (Compact Disc Read-
Only Memory, CD-ROM) or other optical disc storages, laser disc storage (including compression laser disc, laser disc, laser disc, digital universal
Laser disc, Blu-ray Disc etc.), magnetic disk storage medium or other magnetic storage apparatus or can be used in carrying or store with referring to
The desired program code of order or data structure form simultaneously can be by any other medium of computer access, but not limited to this.
Memory can be individually present, and be connected by bus with processor.Memory can also integrate with processor.
Wherein, the memory 202 be used for store perform above scheme application code, and by processor 201
Control performs.The processor 201 is used to perform the application code stored in the memory 202.
The code that memory 202 stores can perform the anti-tampering of the button in Fig. 1 that terminal device provided above performs
Method, such as the state of universal input/output GPIO interface of detection terminal equipment are in object time of low level state, institute
The physical button for stating terminal device is connected by the GPIO interface with the CPU of the terminal device, wherein, when the physics is pressed
The state of the GPIO interface is in high level state when key is not pressed, and when the physical button is pressed, the GPIO connects
The state of mouth is in low level state;When the object time exceeding preset time threshold, the electricity of the GPIO interface is drawn high
The flat state for making the GPIO interface is at the appointed time in high level state in section.
Referring to Fig. 8, Fig. 8 is the structural representation of another embodiment of terminal device provided by the invention.The terminal is set
Standby 30 can be intelligent mobile terminal equipment (such as mobile phone), and terminal device 30 includes:Radio frequency (English:Radio frequency,
RF) circuit 301, the memory 302 for being stored with one or more computer programs, input unit 303, output device 304, sensing
Device 305, voicefrequency circuit 306, Wireless Fidelity (English:Wireless fidelity, WiFi) module 307, include one or more
The parts such as the processor 308 and power supply 303 of individual processing core.It will be understood by those skilled in the art that the end shown in Fig. 8
End equipment structure does not form the restriction to terminal device, can include parts more more or less than diagram, or combine certain
A little parts, or different parts arrangement.Wherein:
RF circuits 301 can be used for receive and send messages or communication process in, the reception and transmission of signal, especially, by base station
After downlink information receives, one or more processors 308 are transferred to handle;In addition, it is sent to base station by up data are related to.It is logical
Often, RF circuits 301 include but is not limited to antenna, at least one amplifier, tuner, one or more oscillators, user identity
Module (English:Subscriber identity module, SIM) card, transceiver, coupler, low-noise amplifier (English
Text:Low noise amplifier, LNA), duplexer etc..In addition, RF circuits 301 can also by radio communication and network or
Other-end equipment is communicated.The radio communication can use any communication standard or agreement, include but is not limited to the whole world
Mobile communcations system (English:Global system of mobile communication, GSM), general packet radio service
(English:General packet radio service, GPRS), CDMA (English:code division multiple
Access, CDMA), WCDMA (English:Wideband code division multiple access, WCDMA),
Long Term Evolution (English:Long term evolution, LTE), Email, Short Message Service (English:short
Messaging service, SMS) etc..
Memory 302 can be used for storage computer program and module, and processor 308 is stored in memory by operation
302 computer program and module, so as to perform various function application and data processing.Memory 302 can mainly include
Storing program area and storage data field, wherein, storing program area can storage program area, the application journey needed at least one function
Sequence (such as sound-playing function, image player function etc.) etc.;Storage data field can store uses institute according to terminal device 30
Data (such as photo, voice data, the video data etc. shot) of establishment etc..In addition, memory 302 can include at a high speed with
Machine accesses memory, can also include nonvolatile memory, a for example, at least disk memory, flush memory device or its
His volatile solid-state part.Correspondingly, memory 302 can also include Memory Controller, to provide the He of processor 308
Access of the input unit 303 to memory 302.
Input unit 303 can be used for the numeral or character information for receiving input, and generation is set with user and function
Control relevant keyboard, mouse, action bars, optics or the input of trace ball signal.Specifically, input unit 303 may include to touch
Sensitive surfaces 3031 and other input equipments 3032.Touch sensitive surface 3031, also referred to as touch display panel or Trackpad, it can receive
Collecting touch operation of the user on or near it, (for example user is being touched using any suitable object or annex such as finger, stylus
Operation on sensitive surfaces 3031 or near touch sensitive surface 3031), and corresponding connection dress is driven according to formula set in advance
Put.Optionally, touch sensitive surface 3031 may include both touch detecting apparatus and touch controller.Wherein, touch detection fills
The touch orientation of detection user is put, and detects the signal that touch operation is brought, transmits a signal to touch controller;Touch control
Device receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processor 308, and can receive
Order that processor 308 is sent simultaneously is performed.Furthermore, it is possible to using resistance-type, condenser type, infrared ray and surface acoustic wave etc.
Polytype realizes touch sensitive surface 3031.Except touch sensitive surface 3031, input unit 303 can also include other input equipments
3032.Specifically, other input equipments 3032 can include but is not limited to physical button, physical keyboard, function key (such as volume
Control button, switch key etc.), trace ball, mouse, the one or more in action bars etc..
Output device 304 can be used for display by the information of user's input or be supplied to the information and terminal device 30 of user
Various graphic user interfaces, these graphic user interfaces can by figure, text, icon, video and its any combination come structure
Into.Output device 304 may include display panel 3041, and optionally, display panel 3041 can use liquid crystal display (English:
Liquid crystal display, LCD), Organic Light Emitting Diode (English:Organic light-emitting diode,
) etc. OLED form configures.Further, touch sensitive surface 3031 can cover display panel 3041, when touch sensitive surface 3031 detects
To after the touch operation on or near it, processor 308 is sent to determine the type of touch event, is followed by subsequent processing device 308
Corresponding visual output is provided on display panel 3041 according to the type of touch event.Although in figure 3, touch sensitive surface 3031
Input and input function are realized with display panel 3041 is the part independent as two, but in certain embodiments, can
Input and output function are realized so that touch sensitive surface 3031 and display panel 3041 is integrated.
Terminal device 30 may also include at least one sensor 305, such as range sensor, optical sensor, motion-sensing
Device and other sensors.Specifically, range sensor is used to detect the terminal device screen with covering the terminal device
The distance between object, optical sensor is used for the optical signal for detecting the terminal device external environment condition.As motion sensor
One kind, gravity accelerometer can detect the size of (generally three axles) acceleration in all directions, can detect when static
Go out size and the direction of gravity, application (such as horizontal/vertical screen switching, dependent game, magnetic available for the posture of identification terminal equipment 30
Power meter pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;The top that can also configure as terminal device 30
The other sensors such as spiral shell instrument, barometer, hygrometer, thermometer, infrared ray sensor, here is omitted.
The audio that voicefrequency circuit 306, loudspeaker 3061, microphone 3062 can be provided between user and terminal device 30 connects
Mouthful.Electric signal after the voice data received conversion can be transferred to loudspeaker 3061, by loudspeaker by voicefrequency circuit 306
3061 are converted to voice signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 3062, by audio
Circuit 306 is converted to voice data after receiving, then after voice data output processor 308 is handled, through RF circuits 301 to send
Exported to such as another equipment, or by voice data to memory 302 further to handle.Voicefrequency circuit 306 is also possible to
Including earphone jack, to provide the communication of peripheral hardware earphone and terminal device 30.
WiFi belongs to short range wireless transmission technology, and terminal device 30 can help user to receive and dispatch by WiFi module 307
Email, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and accessed.Although Fig. 3
WiFi module 307 is shown, but it is understood that, it is simultaneously not belonging to must be configured into for terminal device 30, completely can root
Omitted according to needs in the essential scope for do not change invention.
Processor 308 is the control centre of terminal device 30, utilizes various interfaces and the whole terminal device 30 of connection
Various pieces, by running or performing the computer program being stored in memory 302 and/or module, and call storage
Data in memory 302, the various functions and processing data of terminal device 30 are performed, it is whole so as to be carried out to terminal device 30
Body monitors.Optionally, processor 308 may include one or more processing cores;Preferably, processor 308 can be integrated at
Device and modem processor are managed, wherein, application processor mainly handles operating system, user interface and application program etc., adjusts
Demodulation processor processed mainly handles radio communication.It is understood that above-mentioned modem processor can not also integrate everywhere
Manage in device 308.
Terminal device 30 also includes the power supply 303 (such as battery) to all parts power supply, it is preferred that power supply can pass through
Power-supply management system and processor 308 are logically contiguous, so as to realize management charging, electric discharge, Yi Jigong by power-supply management system
The functions such as consumption management.Power supply 303 can also include one or more direct currents or AC power, recharging system, power failure inspection
The random component such as slowdown monitoring circuit, power supply changeover device or inverter, power supply status indicator.
Although being not shown, terminal device 30 can also include camera, bluetooth module etc., and here is omitted.Specifically exist
In the embodiment of the present invention, the output device 304 (or input unit 303) of terminal device is touch-screen display, terminal device 30
Also include the computer program of memory 302, processor 308 and one or more, wherein one or more computer journeys
Sequence is stored in memory 302, and processor 308 is used for the anti-of the button for calling memory 302 (nonvolatile memory) to store
The program of interference performs the various method steps flow in preceding method embodiment, will not be repeated here.
The embodiment of the present invention also provides a kind of computer-readable storage medium, wherein, the computer-readable storage medium can be stored with journey
Sequence, the anti-interference method including any button described in above method embodiment is part or all of when the program performs
Step.
It should be noted that for foregoing each method embodiment, in order to be briefly described, therefore it is all expressed as a series of
Combination of actions, but those skilled in the art should know, the present invention not by
The limitation of described sequence of movement, because according to the present invention, some steps can use other orders or same
Shi Jinhang.Secondly, those skilled in the art should also know, embodiment described in this description belongs to preferred embodiment,
Necessary to involved action and the module not necessarily present invention.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not have the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed device, can be by another way
Realize.For example, device embodiment described above is only schematical, such as the division of the unit, it is only one kind
Division of logic function, can there is an other dividing mode when actually realizing, such as multiple units or component can combine or can
To be integrated into another system, or some features can be ignored, or not perform.Another, shown or discussed is mutual
Coupling direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING or communication connection of device or unit,
Can be electrical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit
The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also
That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list
Member can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or use
When, it can be stored in a computer-readable access to memory.Based on such understanding, technical scheme substantially or
Person say the part to be contributed to prior art or the technical scheme all or part can in the form of software product body
Reveal and, the computer software product is stored in a memory, including some instructions are causing a computer equipment
(can be personal computer, server or network equipment etc.) performs all or part of each embodiment methods described of the present invention
Step.And foregoing memory includes:USB flash disk, read-only storage (ROM, Read-Only Memory), random access memory
(RAM, Random Access Memory), mobile hard disk, magnetic disc or CD etc. are various can be with the medium of store program codes.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can
To instruct the hardware of correlation to complete by program, the program can be stored in a computer-readable memory, memory
It can include:Flash disk, read-only storage (English:Read-Only Memory, referred to as:ROM), random access device (English:
Random Access Memory, referred to as:RAM), disk or CD etc..
The embodiment of the present invention is described in detail above, specific case used herein to the principle of the present invention and
Embodiment is set forth, and the explanation of above example is only intended to help the method and its core concept for understanding the present invention;
Meanwhile for those of ordinary skill in the art, according to the thought of the present invention, can in specific embodiments and applications
There is change part, in summary, this specification content should not be construed as limiting the invention.
Claims (11)
- A kind of 1. anti-interference method of button, it is characterised in that including:The state of the universal input of detection terminal equipment/output GPIO interface is in the object time of low level state, the end The physical button of end equipment is connected by the GPIO interface with the CPU of the terminal device, wherein, when the physical button not The state of the GPIO interface is in high level state when being pressed, the GPIO interface when the physical button is pressed State is in low level state;When the object time exceeding preset time threshold, drawing high the level of the GPIO interface makes the shape of the GPIO interface State is at the appointed time in high level state in section;The specified time section includes the GPIO interface and restarts or resets required Time.
- 2. the method as described in claim 1, it is characterised in that methods described also includes:Stop reporting the state of the GPIO interface of the terminal device in the specified time section to the CPU.
- 3. method as claimed in claim 1 or 2, it is characterised in that the level for drawing high the GPIO interface makes described The state of GPIO interface is at the appointed time in after high level state in section, including:Delay when default, detect the state of the GPIO interface of the terminal device;When the state for detecting the GPIO interface is in high level state, to the CPU report the physical button not by Press;When the state for detecting the GPIO interface is in low level state, to the CPU report the physical button by by Under.
- 4. method as claimed in claim 3, it is characterised in that the state of the GPIO interface of the detection terminal device it Afterwards, in addition to:When the state for detecting the GPIO interface is in high level state, physical button described in user is prompted to there is currently dry Disturb.
- 5. the method as described in claim 1, it is characterised in that the physical button is the button with unlocked by fingerprint function.
- A kind of 6. interference preventer of button, it is characterised in that including:First detection module, the state for universal input/output GPIO interface of detection terminal equipment are in low level state Object time, the physical button of the terminal device is connected by the GPIO interface with the CPU of the terminal device, its In, when the physical button is not pressed, the state of the GPIO interface is in high level state, when the physical button quilt The state of the GPIO interface is in low level state when pressing;Module is drawn high, for when the object time exceeding preset time threshold, drawing high the level of the GPIO interface to make institute The state for stating GPIO interface is at the appointed time in high level state in section;The specified time section includes the GPIO interface weight Open or reset the required time.
- 7. device as claimed in claim 6, it is characterised in that described device, in addition to:Stopping modular, for stopping in the specified time section reporting the GPIO interface of the terminal device to the CPU State.
- 8. device as claimed in claims 6 or 7, it is characterised in that described device, in addition to:Second detection module, for delaying when default, detect the state of the GPIO interface of the terminal device;First reporting module, for when the state for detecting the GPIO interface is in high level state, being reported to the CPU The physical button is not pressed;Second reporting module, for when the state for detecting the GPIO interface is in low level state, being reported to the CPU The physical button is pressed.
- 9. device as claimed in claim 8, it is characterised in that described device, in addition to:Reminding module, for when the state for detecting the GPIO interface is in high level state, prompting physics described in user Button there is currently interference.
- 10. device as claimed in claim 6, it is characterised in that the physical button is the button with unlocked by fingerprint function.
- A kind of 11. terminal device, it is characterised in that including:It is stored with the memory of executable program code;The processor coupled with the memory;The processor calls the executable program code stored in the memory, performs as claim 1 to 5 is any Method described in.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610404928.5A CN106055455B (en) | 2016-06-08 | 2016-06-08 | The anti-interference method and device of a kind of button |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610404928.5A CN106055455B (en) | 2016-06-08 | 2016-06-08 | The anti-interference method and device of a kind of button |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106055455A CN106055455A (en) | 2016-10-26 |
CN106055455B true CN106055455B (en) | 2017-11-24 |
Family
ID=57170666
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610404928.5A Active CN106055455B (en) | 2016-06-08 | 2016-06-08 | The anti-interference method and device of a kind of button |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106055455B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106951850B (en) * | 2017-03-15 | 2019-06-28 | Oppo广东移动通信有限公司 | A kind of method and mobile terminal controlling fingerprint recognition mould group |
CN107273843A (en) * | 2017-06-12 | 2017-10-20 | 哈尔滨理工大学 | Fingerprint network management system based on ARM Cortex M4 |
CN109190415B (en) * | 2018-07-05 | 2021-08-27 | 天津众达智腾科技有限公司 | Data destruction triggering method and device based on physical protection |
CN114296364A (en) * | 2021-11-19 | 2022-04-08 | 珠海格力电器股份有限公司 | Control method, control device, electronic equipment, cleaning machine and storage medium |
CN114780324B (en) * | 2022-06-20 | 2022-09-13 | 深圳市华曦达科技股份有限公司 | Media delay testing method and device for android system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101465963A (en) * | 2008-12-04 | 2009-06-24 | 北京中星微电子有限公司 | Camera head, computer and network call implementing method |
CN103516850A (en) * | 2013-10-22 | 2014-01-15 | 上海斐讯数据通信技术有限公司 | Physical button based method for controlling rapid switch of smartphone |
CN104360725A (en) * | 2014-12-05 | 2015-02-18 | 上海斐讯数据通信技术有限公司 | Dual-SoC (System on Chip) resetting system and method |
CN104794023A (en) * | 2015-03-18 | 2015-07-22 | 深圳市杰和科技发展有限公司 | One touch backup method |
CN105306038A (en) * | 2015-11-02 | 2016-02-03 | 浙江漫思网络科技有限公司 | Capacitive sensing touch control key and key judging method thereof |
-
2016
- 2016-06-08 CN CN201610404928.5A patent/CN106055455B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101465963A (en) * | 2008-12-04 | 2009-06-24 | 北京中星微电子有限公司 | Camera head, computer and network call implementing method |
CN103516850A (en) * | 2013-10-22 | 2014-01-15 | 上海斐讯数据通信技术有限公司 | Physical button based method for controlling rapid switch of smartphone |
CN104360725A (en) * | 2014-12-05 | 2015-02-18 | 上海斐讯数据通信技术有限公司 | Dual-SoC (System on Chip) resetting system and method |
CN104794023A (en) * | 2015-03-18 | 2015-07-22 | 深圳市杰和科技发展有限公司 | One touch backup method |
CN105306038A (en) * | 2015-11-02 | 2016-02-03 | 浙江漫思网络科技有限公司 | Capacitive sensing touch control key and key judging method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN106055455A (en) | 2016-10-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106055455B (en) | The anti-interference method and device of a kind of button | |
CN106203290B (en) | A kind of fingerprint image acquisition method and terminal | |
CN105786878B (en) | Display method and device of browsing object | |
CN106250163B (en) | A kind of application control method and device | |
CN106055408B (en) | A kind of application control method and mobile terminal | |
CN107025399B (en) | Unlocking control method and related product | |
CN106200970B (en) | The method and terminal of a kind of split screen display available | |
CN104423996B (en) | View method for refreshing and device | |
CN103500063A (en) | Virtual keyboard display method and device and terminal | |
CN106851754B (en) | A kind of cell registration method and device | |
CN106655381A (en) | Wireless charging method and device | |
CN106095489B (en) | A kind of application control method and mobile terminal | |
CN104077184B (en) | A kind of course control method and computer system of application program | |
CN106453511A (en) | Data backup method and data backup device | |
CN106786899B (en) | Charge mode selection method and device | |
CN106658753B (en) | Data migration method and terminal equipment | |
CN107422962A (en) | A kind of bright screen control method and equipment | |
CN106445721B (en) | The method and mobile terminal of house dog fault-tolerant processing | |
CN108932093A (en) | Split screen application switching method, device, storage medium and electronic equipment | |
CN106951850A (en) | The method and mobile terminal of a kind of control fingerprint recognition module | |
CN106886702A (en) | A kind of unlocked by fingerprint method and relevant device | |
CN103197944B (en) | Method for determining performance of process of application program and computer system | |
CN106066769B (en) | A kind of processing method and mobile terminal of mobile terminal | |
CN106020962B (en) | A kind of course control method and terminal device | |
CN109688611B (en) | Frequency band parameter configuration method, device, terminal and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd. |