CN115129282A - Display module identification method and device, terminal and storage medium - Google Patents

Display module identification method and device, terminal and storage medium Download PDF

Info

Publication number
CN115129282A
CN115129282A CN202110328621.2A CN202110328621A CN115129282A CN 115129282 A CN115129282 A CN 115129282A CN 202110328621 A CN202110328621 A CN 202110328621A CN 115129282 A CN115129282 A CN 115129282A
Authority
CN
China
Prior art keywords
display module
terminal
hardware
module
model parameter
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.)
Pending
Application number
CN202110328621.2A
Other languages
Chinese (zh)
Inventor
李成钢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202110328621.2A priority Critical patent/CN115129282A/en
Publication of CN115129282A publication Critical patent/CN115129282A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1407General aspects irrespective of display type, e.g. determination of decimal point position, display with fixed or driving decimal point, suppression of non-significant zeros
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/328Computer systems status display
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Abstract

The disclosure relates to a display module identification method and device, a terminal and a storage medium. Wherein, the method comprises the following steps: a display module of a terminal reads a hardware information character string and analyzes the hardware information character string to obtain a target model parameter corresponding to the display module, wherein the hardware information character string records the model parameter of each hardware module in the terminal; the display module of the terminal stores the target model parameter into a preset calling variable; and the touch module of the terminal acquires the target model parameter from the calling variable so as to identify the hardware model of the display module.

Description

Display module identification method and device, terminal and storage medium
Technical Field
The present disclosure relates to the field of computers, and in particular, to a display module identification method and apparatus, a terminal, and a storage medium.
Background
In the starting process of the terminal, the terminal can be normally started only by identifying the model of each hardware module. Among them, in a terminal operated through a touch screen, identification of a display module is very important. Especially, the touch module is required to identify the model of the display module so as to adapt the touch module, otherwise, the touch module is not adapted to the display module, so that the terminal cannot be normally used.
In the related art, a GPIO (general purpose input/output) interface needs to be additionally reserved in the terminal, and the display module is connected to the GPIO interface, so that other hardware modules can determine the hardware model of the display module according to the voltage value detected by the GPIO interface. Obviously, the method needs to reserve additional GPIO interface, which not only increases hardware cost, but also occupies the internal space of the terminal, reduces the available design space in the terminal, and further increases the difficulty of hardware design.
Disclosure of Invention
The disclosure provides a display module identification method and device, a terminal and a storage medium, which can identify the model of a display module on the premise of not using a GPIO interface.
According to a first aspect of the present disclosure, a display module identification method is provided, including:
a display module of a terminal reads a hardware information character string and analyzes the hardware information character string to obtain a target model parameter corresponding to the display module, wherein the hardware information character string records the model parameter of each hardware module in the terminal;
the display module of the terminal stores the target model parameter into a preset calling variable;
and the touch module of the terminal acquires the target model parameter from the calling variable so as to identify the hardware model of the display module.
According to a second aspect of the present disclosure, there is provided a terminal comprising:
a central processing unit configured to store a pre-recorded hardware information character string into a memory, the hardware information character string recording model parameters of each hardware module included in the terminal;
the display module is assembled to read the hardware information character string from the memory and analyze the hardware information character string to obtain a target model parameter corresponding to the display module; and storing the target model parameter into a preset calling variable, wherein the touch module in the terminal has the authority of acquiring information from the calling variable.
According to a third aspect of the present disclosure, there is provided a display module identification method applied to a display module in a terminal, including:
reading a hardware information character string; the hardware information character string records the model parameters of each hardware module contained in the terminal;
analyzing the read hardware information character string to obtain a target model parameter corresponding to the display module, and storing the target model parameter into a preset calling variable, so that the touch module of the terminal can obtain the target model parameter from the calling variable, wherein the target model parameter is used by the touch module to identify the hardware model of the display module.
According to a fourth aspect of the present disclosure, a display module identification apparatus is provided, which is applied to a display module in a terminal, and includes:
a reading unit which reads the hardware information character string; the hardware information character string records the model parameters of each hardware module contained in the terminal;
the analysis unit is used for analyzing the read hardware information character string to obtain a target model parameter corresponding to the display module, and storing the target model parameter into a preset calling variable so that the touch module of the terminal can obtain the target model parameter from the calling variable, and the target model parameter is used for identifying the hardware model of the display module by the touch module.
According to a fifth aspect of the present disclosure, there is provided a terminal comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the method according to the third aspect by executing the executable instructions.
According to a sixth aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of the method according to the third aspect.
In the technical scheme of the disclosure, the display module of the terminal can read the hardware information character string, and a target model parameter for representing the model of the display module is obtained in a mode of analyzing the hardware information character string. On the basis, the display module can store the target model parameter into a calling variable with access authority of the touch module, so that the touch module can read the target model parameter from the calling variable, and further determine the hardware model of the display module.
It should be understood that, in the related art, a GPIO interface needs to be reserved in the terminal, and the display module needs to be connected to the GPIO interface, so that when the hardware model of the display module needs to be known, each hardware module in the terminal can determine the hardware model of the display module by reading the voltage value of the GPIO interface. However, with the adoption of the mode disclosed by the invention, the display module can read the hardware information character string and store the target model parameter obtained by analyzing the hardware information character string into the preset calling variable, so that when the hardware model of the display module needs to be determined, the touch module directly calls the target model parameter from the calling variable to determine the hardware model. Obviously, through the technical scheme disclosed herein, the GPIO interface does not need to be reserved to identify the model of the display module as in the related art, so that on one hand, the hardware cost of the terminal is reduced, on the other hand, the design space inside the terminal is saved, and further, the difficulty of hardware design is reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart illustrating a display module identification method according to an exemplary embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating another display module identification method according to an exemplary embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating a further method for identifying a display module according to an exemplary embodiment of the disclosure;
fig. 4 is a block diagram of a terminal shown in an exemplary embodiment of the present disclosure;
fig. 5 is a block diagram illustrating a display module recognition apparatus according to an exemplary embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a terminal in an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In the production process of the terminal, due to the problem of source of goods, two or more models are often adopted to assemble the terminal for the same type of hardware module. For hardware modules of different models, developers need to design different logics, so that the hardware module can be adapted to other hardware modules, and further normal use of the terminal is not affected. Correspondingly, in the process of starting up the terminal, each hardware module also needs to identify the hardware models of other hardware modules so as to adopt corresponding logic for adaptation.
Among them, in a terminal operated through a touch screen, identification of a display module is very important. Especially, the hardware model of the display module can be identified by the touch module to adapt the display module, otherwise, the terminal cannot be normally used due to the fact that the touch module is not adapted to the display module.
In the related art, a GPIO (General-purpose input/output) interface is usually required to be additionally reserved in the terminal, and the display module is connected to the GPIO interface, so that other hardware modules can determine the model of the display module according to the voltage value detected by the GPIO interface. Obviously, the method needs to reserve additional GPIO interface, which not only increases hardware cost, but also occupies internal space of the terminal, reduces available design space in the terminal, and further increases difficulty of hardware design.
Therefore, the disclosure provides a display module identification method to avoid the problems that the cost of terminal hardware is increased and the internal space of the terminal is occupied due to the fact that a GPIO interface needs to be additionally reserved in a terminal in the related technology.
Fig. 1 is a diagram illustrating a display module identification method according to an exemplary embodiment of the disclosure. As shown in fig. 1, the method may include the steps of:
102, reading a hardware information character string by a display module of the terminal, and analyzing the hardware information character string to obtain a target model parameter corresponding to the display module, wherein the model parameter of each hardware module in the terminal is recorded in the hardware information character string.
In the present disclosure, the display module and the touch module are hardware modules rather than logic modules. In the field of touch control, a touch screen of a terminal usually includes a plurality of layers superimposed on each other. The touch screen comprises a display layer and a touch layer. The display module in the present disclosure refers to the display layer, and the touch module refers to the touch layer.
As can be seen from the above, in the related art, a GPIO interface needs to be reserved inside the terminal for identifying the display module. Specifically, the display module can be connected with the GPIO interface, when the touch module needs to identify the hardware model of the display module, the touch module can read the voltage value detected by the GPIO interface, and the hardware model of the display module is determined according to the voltage value. For example, when the voltage value is high voltage, the hardware model of the display module is determined to be model A; and when the voltage value is low voltage, determining that the hardware signal of the display module is type B. Obviously, the method needs a certain hardware foundation, and hardware cost is increased.
In view of this, the present disclosure does not use the GPIO interface to identify the display module, but identifies the display module on a software level. Specifically, under the condition that the terminal is started, the central processing unit of the terminal can store the pre-stored hardware information character strings recorded with the model parameters of each hardware module into the memory, so that the display module can extract the hardware information character strings from the memory and identify and obtain the target model parameters for representing the hardware model of the display module. On the basis, the display module can store the target model parameter into a preset calling variable with access authority of the touch module. Then, when the touch module needs to identify the hardware model of the display module to carry out fitting, the target model parameter can be obtained from the calling variable, and then the hardware model of the display module is identified. Obviously, according to the method and the device, only the target model parameter for representing the hardware model of the display module needs to be identified from the hardware information character string and stored into the preset calling variable, the touch module can determine the hardware model of the display module by accessing the calling variable, and the problems that in the related technology, the hardware cost is high and the internal space is occupied due to the fact that the GPIO interface needs to be reserved are solved.
In this disclosure, not all variables in the memory may be accessible to the hardware module, and based on this, the central processing unit should store the hardware information character string in the variable having the access right of the display module after determining that the terminal is started and obtains the pre-recorded hardware information character string. For example, the hardware information character string may be saved in a system environment variable of a memory, and the character string saved in the system environment variable may be called by each hardware module in the terminal. On the basis, the display module can read the hardware information character string from the system environment variable and further analyze the hardware information character string to obtain a target model parameter for representing the hardware model of the display module.
In this disclosure, any character string recorded with the hardware model of each hardware module may be used as a hardware information character string, for example, when a developer designs a terminal, the developer usually debugs each hardware module of the terminal continuously, and records the hardware information of each hardware module in cmdline, and a parameter value in the variable is also corrected continuously along with the debugging of the developer until the final design of the terminal is determined, and the terminal enters a production stage. Therefore, the parameter value stored in the cmdline variable is stable after the cmdline enters the production phase, and therefore, the cmdline value stored in the cmdline variable can be used as the hardware information character string in the present disclosure.
And step 104, the display module of the terminal stores the target model parameter into a preset calling variable.
In the present disclosure, after the hardware information character string is stored in the memory, the hardware information character string can be read by the display module to determine the hardware type of the display module. The hardware information of each hardware module is recorded in the hardware information character string, so that after the hardware information character string is read by the display module, the hardware information character string can be analyzed to obtain a target model parameter for representing the hardware type of the display module, for example, the model parameter of each hardware module is usually recorded in a fixed character segment of the hardware information character string, so that when the hardware information character string is analyzed by the display module, the character segment recorded with the information of the display module can be preferentially determined, characters recorded in the character segment can be read out, and the read characters are the target model parameter for representing the hardware type of the display module. The display module in this disclosure can save the target model parameter obtained by the analysis to any variable that can be accessed by the touch module, so that the touch module reads the target model parameter from the variable to identify the hardware model of the display module. Since the variable is used for storing the target model parameter to be called (or read) by the touch module, the variable is named as a calling variable and can be predefined by a developer.
In practical applications, since the touch module needs to have the right to access the call variable, the display module can store the target model parameter into the call variable through the export _ symbol method. The parameter value stored by the method is added with an export _ symbol identifier, the parameter value added with the identifier is disclosed for all kernel codes, namely, any hardware module in the terminal can call a variable with the identifier in the process of executing the codes. In other words, the target model parameter stored by the export _ symbol method enables each hardware module including the touch module to have the right to call the target model parameter by accessing the call variable.
And 106, acquiring the target model parameter from the calling variable by the touch module of the terminal so as to identify the hardware model of the display module.
In the disclosure, after the display module in the terminal obtains the target model parameter through analysis, the hardware model of the terminal can be determined. On the basis, the operation required to be completed by the display module in the starting-up stage can be completed. For example, after determining the hardware model of the display module, the display module can obtain a driving code corresponding to the hardware model, and drive the display module by executing the driving code, so that the display module can realize functions such as screen lightening.
In addition, after the display module analyzes the target model parameter and stores the target model parameter to the calling variable, the touch module can call the target model parameter value by accessing the calling variable in the driving process, and further the hardware model of the display module is determined. On the basis, the touch module can acquire adaptive parameters matched with the hardware model of the display module and adapt to the display module; or the operation logic of the display module is adjusted to be matched with the display module.
Furthermore, besides the adaptation with the display module, the touch module can further adjust the driving code of the touch module according to the hardware model of the display module, and drives the touch module by executing the adjusted driving code. It is not difficult to understand that the touch module adjusts the driving code of the touch module, which is equivalent to adjusting the running logic of the touch module according to the hardware model of the display module, so as to ensure the stability of interaction between the touch module and the display module.
The execution subject of the technical solution of the present disclosure may be any type of terminal, for example, the terminal may be any one of a smart phone, a tablet Computer, a smart television, and a PC (Personal Computer). It should be understood that only a terminal configured with a touch screen may serve as an execution subject of the present disclosure, and specifically, which type of terminal is used as the execution subject of the present disclosure may be determined by those skilled in the art according to actual needs, and the present disclosure does not limit this.
According to the technical scheme, in the disclosure, under the condition that the central processing unit of the terminal determines that the terminal is started, the hardware information character strings recorded with the model parameters of each hardware module are stored in the memory, so that the display module of the terminal can read the hardware information character strings from the memory, and the target model parameters for representing the model of the display module are obtained in a manner of analyzing the hardware information character strings. On the basis, the display module can store the target model parameter into a calling variable with access authority of the touch module, so that the touch module can read the target model parameter from the calling variable, and further determine the hardware model of the display module.
It should be understood that, in the related art, a GPIO interface needs to be reserved in the terminal, and the display module needs to be connected to the GPIO interface, so that when the hardware model of the display module needs to be known, each hardware module in the terminal can determine the hardware model of the display module by reading the voltage value of the GPIO interface. However, with the adoption of the mode disclosed by the invention, the display module can read the hardware information character string and store the target model parameter obtained by analyzing the hardware information character string into the preset calling variable, so that when the hardware model of the display module needs to be determined, the touch module directly calls the target model parameter from the calling variable to determine the hardware model. Therefore, through the technical scheme disclosed by the invention, the GPIO interface does not need to be reserved to identify the model of the display module in the related technology, so that the hardware cost of the terminal is reduced, the space inside the terminal is saved, and the difficulty of hardware design is reduced.
Furthermore, after the display module in the present disclosure analyzes the hardware information character string to obtain the target model parameter, the target model parameter may be stored in the calling variable through the export _ symbol method, and since the parameter value stored through the export _ symbol method may be accessed by each hardware module, by the method, each hardware module in the terminal may call the target model parameter in a manner of accessing the calling variable when the hardware model of the display module needs to be identified, thereby determining the hardware model of the display module.
The disclosure also provides a display module identification method applied to the display module of the terminal. In the method, most operation modes of the display module, for example, where to read the hardware information character string, how to analyze the read hardware information character string, and the like, are similar to those of the previous embodiment, and therefore, details are not described in the next embodiment, and specific operation modes can refer to the description of the previous embodiment.
Fig. 2 is a flowchart illustrating another display module identification method according to an exemplary embodiment of the disclosure. As shown in fig. 2, the method comprises the steps of:
step 202, reading a hardware information character string; the hardware information character string records model parameters of each hardware module contained in the terminal.
As described above, after determining that the terminal is started and acquires the pre-recorded hardware information character string, the central processing unit may store the hardware information character string in the system environment variable of the memory, and the character string stored in the system environment variable may be called by each hardware module in the terminal. On the basis, the display module can read the hardware information character string from the system environment variable and further analyze to obtain a target model parameter for representing the hardware model of the display module.
As described above, the present disclosure may use the cmdlene value stored in the cmdlene variable as the hardware information string.
Step 204, analyzing the read hardware information character string to obtain a target model parameter corresponding to the display module, and storing the target model parameter into a preset calling variable, so that the touch module of the terminal can obtain the target model parameter from the calling variable, wherein the target model parameter is used by the touch module to identify the hardware model of the display module.
As described above, the display module may store the target model parameter into the call variable by using the export _ symbol method, so that each hardware module including the touch module has a right to call the target model parameter by accessing the call variable.
As described above, after determining the hardware model of the display module, the display module may obtain the driving code corresponding to the hardware model, and drive the display module by executing the driving code, so that the display module can realize functions such as screen brightening. In addition, the display module is in the target model parameter that will resolve to save to and call the variable after, the touch module can be through visiting this call variable at the driven in-process, in order to call the target model parameter value, and then confirms the hardware model of display module. On this basis, the touch module can acquire the adaptation parameter matched with the hardware model of the display module and adapt to the display module.
According to the technical scheme, through the technical scheme, the display module in the terminal only needs to read the hardware information character string and analyze the hardware information character string, and the target model parameter for representing the hardware model of the display module can be obtained. On the basis, the display module only needs to store the target model parameter into a calling variable with access authority of the touch module, and the touch module can read the target model parameter from the calling variable so as to determine the hardware model of the display module, thereby avoiding the problem of high hardware cost caused by the need of reserving a GPIO interface in the related technology.
In the following, a smart phone is taken as an example to introduce the technical scheme of the present disclosure.
Fig. 3 is a flowchart illustrating another display module identification method according to an exemplary embodiment of the disclosure. As shown in fig. 3, the method comprises the steps of:
step 301, the CPU acquires a cmdline value when it is determined that the smartphone is activated.
The smart phone usually includes hardware modules such as a motherboard, a CPU, a memory, a display module, and a touch module. The main board can include a power supply control module, when a user presses a power-on key for a long time, the power supply control module can detect the power-on signal and control the power supply to supply power to the CPU, so that the CPU starts to operate.
Step 302, the CPU saves the acquired cmdlene value to a system environment variable of the memory.
The cmdlene value in this embodiment may be stored in a memory space (i.e., in a ROM) of the smartphone in advance. After the CPU starts to operate, the cmdlene value can be read from the storage space, and the cmdlene value is stored in system environment variables of a memory (in an RAM), so that each hardware module in the smart phone can read the cmdlene value.
Step 303, the display module reads the cmdlene value from the system environment variable of the memory.
In this embodiment, after the display module starts to operate, the cmdlene value may be read from the system environment variable of the memory, and the cmdlene value may be analyzed to obtain a target model parameter for characterizing the hardware model of the display module.
For example, the display module may analyze the cmdlet value by calling a dsi _ display _ part _ cmdlet _ topology function, and the obtained target model parameter may be: qcom, mds _ dsi _ k9_36_02_0a _ p2_ dsc _ cmd.
And step 304, the display module analyzes the read cmdlene value to determine the target model parameter.
Step 305, the display module stores the target model parameter into the calling variable through the export _ symbol method.
After the target model parameter is obtained, the target model parameter can be stored in a calling variable.
Taking the above example, the calling variable may be a global _ panle _ info variable. Then, the target model parameter qcom, mdss _ dsi _ k9_36_02_0a _ p2_ dsc _ cmd, can be saved to the global _ pan _ info variable by the export _ symbol method. Of course, the naming of the calling variable can be determined according to actual requirements, and the disclosure does not limit the calling variable.
In step 306, the touch module accesses the call variable to read the target model parameter.
After the target model parameter is stored in the calling variable, the touch module can access the calling variable to obtain the target model parameter, and the hardware model of the display module is determined according to the target model parameter.
For the above example, the touch module can access the global _ tile _ info variable to read a target model parameter, qcom, mdss _ dsi _ k9_36_02_0a _ p2_ dsc _ cmd, and determine the model of the display module according to the target model parameter. For example, the character position of "36" in the target model parameter represents the hardware model of the display module, so that the touch module can determine the hardware model of the display module according to the two character values of "36". Assume that an originally designed smartphone will employ two display modules with hardware models a and B, where a character value "36" is used to represent model a and a character value "48" represents model B. Then, in this embodiment, the hardware model of the display module can be determined to be model a.
And 307, the touch module determines the hardware model of the display module according to the acquired target model parameter.
In this embodiment, after determining the hardware model of the display module, the touch module may adjust its own operating logic according to the hardware model to adapt to the display module.
According to the technical scheme, after the smart phone is started, the CPU can store the pre-stored cmdline value into the memory so that the display module can read the cmdline value and analyze the target model parameter to represent the hardware model of the smart phone. The display module can save the target model parameter obtained by analysis to a preset calling variable, on the basis, the touch module can identify the hardware model of the display module by accessing the calling variable, and then the display module is adapted, so that the problems that the hardware cost is increased due to the fact that GPIO interfaces are required to be reserved in the related technology and the design difficulty is increased are solved.
Fig. 4 is a block diagram of a terminal shown in an exemplary embodiment of the present disclosure. Referring to fig. 4, the terminal includes a central processor 401 and a display module 402.
A central processing unit 401 configured to store a pre-recorded hardware information character string into a memory, the hardware information character string recording model parameters of each hardware module included in the terminal;
a display module 402 configured to read the hardware information string from the memory and analyze the hardware information string to obtain a target model parameter corresponding to the display module; and storing the target model parameter into a preset calling variable, wherein the touch module in the terminal has the authority of acquiring information from the calling variable.
Optionally, the central processor 401 is further configured to:
under the condition that the terminal is started, acquiring a pre-recorded hardware information character string, and storing the hardware information character string into a system environment variable of a memory;
and the character strings stored in the system environment variables can be read by each hardware module in the terminal.
Optionally, the hardware information string is a cmdlene variable.
Optionally, the display module 402 is further configured to:
and storing the target model parameter into the calling variable through an export _ symbol method so that the target model parameter can be read by the touch module.
Optionally, the display module 402 is further configured to:
and acquiring a driving code corresponding to the hardware model of the display module according to the target model parameter so as to drive the display module by executing the driving code.
Optionally, the method further includes:
the touch module 403 is configured to call the target model parameter to determine a hardware model of the display module, and adapt to the display module according to an adaptation parameter corresponding to the hardware model.
Optionally, the method further includes: the touch module 403 is further configured to:
calling the target model parameter to determine the hardware model of the display module, and adjusting a drive code of the display module according to the hardware model;
fig. 5 is a block diagram illustrating a display module identification apparatus according to an exemplary embodiment of the disclosure. Referring to fig. 5, the display module recognition apparatus includes a reading unit 501 and an analyzing unit 502. Wherein the content of the first and second substances,
a reading unit 501 configured to read a hardware information character string; the hardware information character string records the model parameters of each hardware module contained in the terminal;
the analyzing unit 502 is configured to analyze the read hardware information character string to obtain a target model parameter corresponding to the display module, and store the target model parameter into a preset calling variable, so that the touch module of the terminal obtains the target model parameter from the calling variable, and the target model parameter is used by the touch module to identify the hardware model of the display module.
For the device embodiment, since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. One of ordinary skill in the art can understand and implement it without inventive effort.
Correspondingly, this disclosure still provides a display module identification apparatus, includes: a processor; a memory for storing processor-executable instructions; the processor is configured to implement the display module identification method according to any one of the above embodiments, for example, the method may include: a display module of a terminal reads a hardware information character string and analyzes the hardware information character string to obtain a target model parameter corresponding to the display module, wherein the hardware information character string records the model parameter of each hardware module in the terminal; the display module of the terminal stores the target model parameter into a preset calling variable; and the touch module of the terminal acquires the target model parameter from the calling variable so as to identify the hardware model of the display module.
Accordingly, the present disclosure also provides a terminal including a memory, and one or more programs, where the one or more programs are stored in the memory, and configured to be executed by one or more processors, where the one or more programs include instructions for implementing the display module identifying method according to any one of the above embodiments, such as the method may include: a display module of a terminal reads a hardware information character string and analyzes the hardware information character string to obtain a target model parameter corresponding to the display module, wherein the hardware information character string records the model parameter of each hardware module in the terminal; the display module of the terminal stores the target model parameter into a preset calling variable; and the touch module of the terminal acquires the target model parameter from the calling variable so as to identify the hardware model of the display module.
Fig. 6 is a block diagram illustrating an apparatus 600 for implementing a display module identification method according to an exemplary embodiment. For example, the apparatus 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, apparatus 600 may include one or more of the following components: processing component 602, memory 604, power component 606, multimedia component 608, audio component 610, input/output (I/O) interface 612, sensor component 614, and communication component 616.
The processing component 602 generally controls overall operation of the device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 can include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operations at the apparatus 600. Examples of such data include instructions for any application or method operating on device 600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 604 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power supply component 606 provides power to the various components of device 600. The power components 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 600.
The multimedia component 608 includes a screen that provides an output interface between the device 600 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 600 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 610 is configured to output and/or input audio signals. For example, audio component 610 includes a Microphone (MIC) configured to receive external audio signals when apparatus 600 is in an operating mode, such as a call mode, a record mode, and a voice recognition mode. The received audio signal may further be stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 614 includes one or more sensors for providing status assessment of various aspects of the apparatus 600. For example, the sensor component 614 may detect an open/closed state of the device 600, the relative positioning of components, such as a display and keypad of the device 600, the sensor component 614 may also detect a change in position of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, orientation or acceleration/deceleration of the device 600, and a change in temperature of the device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communication between the apparatus 600 and other devices in a wired or wireless manner. The apparatus 600 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR (New Radio), or a combination thereof. In an exemplary embodiment, the communication component 616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 604 comprising instructions, executable by the processor 620 of the apparatus 600 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
The above description is only exemplary of the present disclosure and should not be taken as limiting the disclosure, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (12)

1. A display module identification method is characterized by comprising the following steps:
a display module of a terminal reads a hardware information character string and analyzes the hardware information character string to obtain a target model parameter corresponding to the display module, wherein the hardware information character string records the model parameter of each hardware module in the terminal;
the display module of the terminal stores the target model parameter into a preset calling variable;
and the touch module of the terminal acquires the target model parameter from the calling variable so as to identify the hardware model of the display module.
2. The method of claim 1, further comprising:
and the central processing unit of the terminal stores the pre-recorded hardware information character string into the memory under the condition that the terminal is started.
3. The method of claim 2, wherein the step of storing the pre-recorded hardware information string in the memory by the central processing unit of the terminal when the terminal is activated comprises:
a central processing unit of the terminal acquires a pre-recorded hardware information character string under the condition that the terminal is started, and stores the hardware information character string into a system environment variable of a memory;
and the character strings stored in the system environment variables can be read by each hardware module in the terminal.
4. The method according to claim 1, wherein the step of storing the target model parameter into a preset calling variable by a display module of the terminal comprises:
and the display module of the terminal stores the target model parameter into the calling variable through an export _ symbol method so that the target model parameter can be read by the touch module.
5. The method of claim 1, further comprising:
and the display module of the terminal acquires a driving code corresponding to the hardware model of the display module according to the target model parameter so as to drive the display module by executing the driving code.
6. The method of claim 1, further comprising:
and the touch module of the terminal calls the target model parameter to determine the hardware model of the display module, and adapts to the display module according to the adaptation parameter corresponding to the hardware model.
7. The method of claim 1, further comprising:
the touch module of the terminal calls the target model parameter to determine the hardware model of the display module, and adjusts a driving code of the touch module according to the hardware model;
and the touch module of the terminal executes the adjusted driving code so as to drive the touch module.
8. A terminal, comprising:
the central processing unit is assembled to store a pre-recorded hardware information character string into the memory, wherein the hardware information character string records the model parameters of each hardware module contained in the terminal;
the display module is assembled to read the hardware information character string from the memory and analyze the hardware information character string to obtain a target model parameter corresponding to the display module; and storing the target model parameter into a preset calling variable, wherein the touch module in the terminal has the authority of acquiring information from the calling variable.
9. The display module identification method is characterized in that the display module applied to the terminal comprises the following steps:
reading a hardware information character string; the hardware information character string records the model parameters of each hardware module contained in the terminal;
analyzing the read hardware information character string to obtain a target model parameter corresponding to the display module, and storing the target model parameter into a preset calling variable, so that the touch module of the terminal can obtain the target model parameter from the calling variable, wherein the target model parameter is used by the touch module to identify the hardware model of the display module.
10. The utility model provides a display module identification device which characterized in that is applied to the display module in the terminal, includes:
a reading unit which reads the hardware information character string; the hardware information character string records the model parameters of each hardware module contained in the terminal;
the analysis unit is used for analyzing the read hardware information character string to obtain a target model parameter corresponding to the display module, and storing the target model parameter into a preset calling variable, so that the touch module of the terminal can obtain the target model parameter from the calling variable, and the target model parameter is used by the touch module to identify the hardware model of the display module.
11. A terminal, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the method of claim 9 by executing the executable instructions.
12. A computer-readable storage medium having stored thereon computer instructions, which when executed by a processor, perform the steps of the method of claim 9.
CN202110328621.2A 2021-03-26 2021-03-26 Display module identification method and device, terminal and storage medium Pending CN115129282A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110328621.2A CN115129282A (en) 2021-03-26 2021-03-26 Display module identification method and device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110328621.2A CN115129282A (en) 2021-03-26 2021-03-26 Display module identification method and device, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN115129282A true CN115129282A (en) 2022-09-30

Family

ID=83373784

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110328621.2A Pending CN115129282A (en) 2021-03-26 2021-03-26 Display module identification method and device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN115129282A (en)

Similar Documents

Publication Publication Date Title
US10715761B2 (en) Method for providing video content and electronic device for supporting the same
US10659684B2 (en) Apparatus and method for providing dynamic panorama function
JP6072362B2 (en) Application program processing method, apparatus, program, and storage medium
CN107153541B (en) Browsing interaction processing method and device
US9942690B2 (en) Method and device for information push
EP2991275A1 (en) Making router management application compatible with router firmware
EP3128411B1 (en) Interface display method, terminal, computer program and recording medium
EP3133466A1 (en) Method and device for reminding in shutdown state
EP3118729A1 (en) Method and device for presenting tasks
CN107402756B (en) Method, device and terminal for drawing page
CN107506496B (en) Defragmentation method, defragmentation device and computer-readable storage medium
CN105468606B (en) Webpage saving method and device
CN107632835B (en) Application installation method and device
CN108829473B (en) Event response method, device and storage medium
CN112667852B (en) Video-based searching method and device, electronic equipment and storage medium
CN106060253B (en) Information presentation method and device
CN115129282A (en) Display module identification method and device, terminal and storage medium
CN110569037B (en) Data writing method and device
CN110213062B (en) Method and device for processing message
CN114510342A (en) Cache processing method and device and storage medium
CN107423060B (en) Animation effect presenting method and device and terminal
CN112230982A (en) Material processing method and device, electronic equipment and storage medium
CN107360315B (en) Information display method and device
CN107526683B (en) Method and device for detecting functional redundancy of application program and storage medium
CN111104110A (en) Global style sharing method, global style sharing device and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination