Disclosure of Invention
In view of the above, embodiments of the present invention provide a driving method and apparatus for a touch module, and a display device.
In a first aspect, an embodiment of the present invention provides a method for driving a touch module, where the method includes:
in the starting process of the first stage, determining a first model set corresponding to a touch module currently included in the display equipment;
updating a second model set stored in the display equipment according to the first model set;
and determining driving data matched with the touch module currently included by the display equipment from a pre-configured driving file according to the updated second type number set so as to drive the touch module currently included by the display equipment by using the driving data.
In a possible implementation manner, the determining a first model set corresponding to a touch module currently included in the display device includes:
reading the model of at least one device included in the touch module from a specified storage medium of the display device;
and classifying the read models into a first model set.
In a possible embodiment, the method further comprises:
if the model of the device is not read from the specified storage medium, starting an upper computer tool preset in the display equipment;
receiving an externally input model number of the device through the upper computer tool;
the model of the device input externally is classified into the first model set.
In a possible implementation manner, at least one device included in the touch module is a display screen; the reading of the model of at least one device included in the touch module from the specified storage medium of the display device includes:
reading extended display identification data EDID of the display screen from a display data channel DDC memory of the display device;
and analyzing the EDID to obtain the model of the display screen.
In a possible implementation, the updating the set of second models stored in the display device according to the set of first models includes:
comparing a first model in the first model set with a target second model in the second model set, wherein the first model and the target second model correspond to the same device;
if the first model is not consistent with the target second model through comparison, the target second model in the second model set is updated to be the first model.
In a possible embodiment, the determining, according to the updated second type number set, driving data matching a touch module currently included in the display device from a preconfigured driving file includes:
splicing the second model in the updated second model set with a set character string to obtain a target character string;
searching a pre-configured driving file according to the target character string;
and determining the searched drive data corresponding to the target character string as the drive data matched with the device corresponding to the second type number.
In a second aspect, an embodiment of the present invention provides a driving apparatus for a touch module, including:
the model determining module is used for determining a first model set corresponding to a touch module currently included in the display equipment in the starting process of the first stage;
the updating module is used for updating a second model set stored in the display equipment according to the first model set;
and the driving determining module is used for determining driving data matched with the touch module currently included by the display equipment from a pre-configured driving file according to the updated second type number set so as to drive the touch module currently included by the display equipment by using the driving data.
In a possible implementation, the drive determination module includes:
the splicing submodule is used for splicing the second model in the updated second model set with a set character string to obtain a target character string;
the searching submodule is used for searching a pre-configured driving file according to the target character string;
and the determining submodule is used for determining the searched drive data corresponding to the target character string as the drive data matched with the device corresponding to the second type number.
In a third aspect, an embodiment of the present invention provides a display device, where the display device includes a touch module; the display device is configured to drive the touch module when the display device is powered on by applying the method according to any one of the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method according to any one of the first aspect.
According to the technical scheme provided by the embodiment of the invention, the driving data of a plurality of devices with different models are integrated in one driving file, the display equipment determines the first model set corresponding to the touch module currently included by the display equipment in the first stage of starting up, the second model set stored in the display equipment is updated according to the first model set, and then the driving data matched with the touch module currently included by the display equipment is determined from the pre-configured driving file according to the updated second model set, so that the touch module currently included by the display equipment is driven by using the driving data, when the type of the device adopted by the touch module is changed, software developers are not required to recompile the driving software, and factory production personnel are not required to burn and produce the driving software again, therefore, compared with the prior art, the touch control module has the advantages that unnecessary troubles brought to software developers and factory production personnel due to model replacement of devices adopted by the touch control module are avoided, and the phenomenon that driver software is disordered due to too many versions of the driver software can be avoided.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart of an embodiment of a driving method of a touch module according to an embodiment of the present invention is shown. As shown in fig. 1, the method may include the steps of:
step 101, in a starting process of a first stage, determining a first model set corresponding to a touch module currently included in a display device.
In an embodiment, the first stage is a production stage before the display device leaves the factory. It is noted that the production stage here refers to a stage after the display device has been assembled.
In an embodiment, the first stage is a use stage after the display device leaves a factory.
In step 101, during a first stage of power-on process, the display device determines a model set (hereinafter referred to as a first model set for convenience of description) corresponding to a touch module currently included in the display device. Here, the first model set includes a model of at least one device included in the touch module. The touch module at least comprises a display screen, a touch chip and other devices.
It should be noted that the first model set includes models of devices currently and actually used by the touch module in the display device, which may be different from models of devices planned by a manufacturer for the display device in a product design stage. For example, in the product design stage, a product worker plans in advance to use a display screen of model M00 on a display device, but in the actual production process, because the display screen of model M00 on the market is in short supply, the mass production requirement of the display device cannot be met, and finally, the display screen of model M01 is actually used on the display device.
In an embodiment, determining a first model set corresponding to a touch module currently included in a display device includes: the method comprises the steps of reading the model of at least one device included in a touch module from a specified storage medium of the display device, and classifying the read model into a first model set.
Taking the Display screen as an example, the specified storage medium may be a DDC (Display Data Channel) memory. The DDC memory stores EDID (Extended Display Identification Data) of the Display screen. Parameters related to the display screen and its capabilities are contained in the EDID including, but not limited to, vendor information, product code, product serial number, maximum image size, color settings, frequency range limits, etc.
Based on this, in this step 101, the display device may read the EDID of the display screen from the DDC memory of the display device, and then parse the EDID to obtain the model of the display screen. In practice, the model of the display screen, i.e., the product code, may be stored in the 10 th and 11 th bytes of the EDID described above.
Further, it should be noted that, in practice, for some types of devices, or some special models of devices, the model of the device may not be read from a specified storage medium of the display device in the above manner.
At this time, as an optional implementation manner, an upper computer tool preset in the display device may be started, and then the model of the externally input device is received through the upper computer tool. Specifically, when the model of the device cannot be read from the specified storage medium of the display device in the above manner, a user (e.g., a manufacturer) may input the model of the device to the display device through a visualization interface provided by the upper computer, and correspondingly, the display device receives the model of the device input by the user in the visualization interface through a built-in upper computer tool, and puts the received model of the device into the first model set.
And 102, updating the stored second model set in the display device according to the first model set.
And 103, determining driving data matched with the touch module currently included by the display device from the pre-configured driving file according to the updated second type number set, so as to drive the touch module currently included by the display device by using the driving data.
Step 102 and step 103 are explained below collectively:
the drive file may include drive data corresponding to a plurality of devices and a plurality of devices of different models, that is, in the embodiment of the present invention, the drive data corresponding to a plurality of devices and a plurality of devices of different models may be integrated into the same drive file in advance, and then the drive file is burned into the display device.
In one example, the driver file is a DTS file. The DTS file is a resource configuration file in the Linux ARM framework, which is used for the kernel to analyze, and may include the number of CPUs, the types of the CPUs, the base address of the memories, the size of the memories, the peripheral connections, the Clock controller, the Clock usage, and the like, in addition to the driving data. Referring to fig. 2, a schematic diagram of the drive data contained in the DTS file is shown.
As can be seen from the descriptions in step 102 and step 103, in the embodiment of the present invention, the second model set stored in the display device is updated according to the first model set, that is, the model of the device currently and actually used by the touch module in the display device, and then the second model set stored in the display device includes the model of the device currently and actually used by the touch module in the display device.
Based on the above description, the display device may determine, according to the updated second type number set, driving data that matches with a device currently and actually used by a touch module in the display device from the preconfigured driving file, that is, determine, from the preconfigured driving file, driving data that matches with the touch module currently included in the display device.
It can be understood that after determining the driving data matched with the device actually adopted by the touch module in the display device, the driving data matched with the device actually adopted by the touch module can be used for driving the device actually adopted by the touch module, so that the touch module is driven, and the display device can be normally turned on by a bright screen.
As can be seen from fig. 2, the driving data corresponding to different models is stored in the DTS file in the form of a structure, and the name of the structure is formed by splicing the set character string "edp _ panel" and a specific model value. For example, edp _ panel00 corresponds to drive data of a display screen of model M00.
Based on this, as an optional implementation manner, in step 103, determining, according to the updated second type number set, driving data that matches the touch module currently included in the display device from the preconfigured driving file includes: and splicing the model (called as a second model for convenient description) in the updated second model set with the set character string to obtain a target character string, searching a pre-configured driving file according to the target character string, and determining the searched driving data corresponding to the target character string as the driving data matched with the device corresponding to the second model.
According to the technical scheme provided by the embodiment of the invention, the driving data of a plurality of devices with different models are integrated in one driving file, the display equipment determines the first model set corresponding to the touch module currently included by the display equipment in the first stage of starting up, the second model set stored in the display equipment is updated according to the first model set, and then the driving data matched with the touch module currently included by the display equipment is determined from the pre-configured driving file according to the updated second model set, so that the touch module currently included by the display equipment is driven by using the driving data, when the type of the device adopted by the touch module is changed, software developers are not required to recompile the driving software, and factory production personnel are not required to burn and produce the driving software again, therefore, compared with the prior art, the touch control module has the advantages that unnecessary troubles brought to software developers and factory production personnel due to model replacement of devices adopted by the touch control module are avoided, and the phenomenon that driver software is disordered due to too many versions of the driver software can be avoided.
In one embodiment, the second type number set may be implemented in the form of a character string. Specifically, the total length of the character string may be predefined, and fields corresponding to different bytes in the character string may be defined. The fields referred to herein include, but are not limited to, the model number, manufacturer, project name, etc. of the device. As an alternative implementation, the data in the field of the device model number may be null or a preset default value in the initial case.
Optionally, the string may also have some reserved fields for later expansion.
Based on this, in the embodiment of the present invention, updating the second model set stored in the display device according to the first model set includes: for a model (hereinafter referred to as a first model for convenience of description) in the first model set, a field corresponding to the model is determined in the character string, and then data in the field is updated to the first model.
In addition, in this embodiment, the display device may further receive a character string input from outside through the upper computer tool, and then directly update the locally stored default character string with the received character string.
Referring to fig. 3, a flowchart of another driving method of a touch module according to an embodiment of the invention is shown. As shown in fig. 3, the method may include the steps of:
step 301, in the first stage of the booting process, a first model set corresponding to a touch module currently included in the display device is determined.
For the description of step 301, refer to the description of step 101 in the embodiment shown in fig. 1, which is not repeated herein.
Step 302, compare a first model in the first model set with a target second model in the second model set, wherein the first model and the target second model correspond to a same device.
Step 303, if the first model is not consistent with the target second model by comparison, updating the target second model in the second model set to the first model.
As can be seen from the descriptions of step 302 and step 303, in the embodiment of the present invention, after step 301 is executed to obtain the first model set corresponding to the touch module currently included in the display device, the first model in the first model set may be compared with the target second model in the second model set, and if the first model is not consistent with the target second model, the target second model in the second model set is updated to the first model. Of course, if the comparison shows that the first model is consistent with the target second model, the target second model in the second model set may not need to be updated.
Through the processing, the second type number set is not updated when the type of the adopted device of the touch module is not changed, and the computing resources are saved.
And step 304, determining driving data matched with the touch module currently included by the display device from a pre-configured driving file according to the updated second type number set, so as to drive the touch module currently included by the display device by using the driving data.
According to the technical scheme provided by the embodiment of the invention, the driving data of a plurality of devices with different models are integrated in one driving file, the display equipment determines the first model set corresponding to the touch module currently included by the display equipment in the first stage of starting up, the second model set stored in the display equipment is updated according to the first model set, and then the driving data matched with the touch module currently included by the display equipment is determined from the pre-configured driving file according to the updated second model set, so that the touch module currently included by the display equipment is driven by using the driving data, when the type of the device adopted by the touch module is changed, software developers are not required to recompile the driving software, and factory production personnel are not required to burn and produce the driving software again, therefore, compared with the prior art, the touch control module has the advantages that unnecessary troubles brought to software developers and factory production personnel due to model replacement of devices adopted by the touch control module are avoided, and the phenomenon that driver software is disordered due to too many versions of the driver software can be avoided.
Referring to fig. 4, a block diagram of an embodiment of a driving apparatus of a touch module according to an embodiment of the present invention is shown. As shown in fig. 4, the apparatus includes: a model determination module 41, an update module 42, and a drive determination module 43.
The model determining module 41 is configured to determine, in a first stage of a power-on process, a first model set corresponding to a touch module currently included in the display device;
an updating module 42, configured to update the stored second model set in the display device according to the first model set;
and a driving determining module 43, configured to determine, according to the updated second type number set, driving data matched with the touch module currently included in the display device from a preconfigured driving file, so as to drive the touch module currently included in the display device by using the driving data.
In a possible implementation, the model determining module 41 is specifically configured to:
reading the model of at least one device included in the touch module from a specified storage medium of the display device; and classifying the read models into a first model set.
In a possible implementation, the model determining module 41 is further configured to:
if the model of the device is not read from the specified storage medium, starting an upper computer tool preset in the display equipment; receiving an externally input model number of the device through the upper computer tool; the model of the device input externally is classified into the first model set.
In a possible implementation manner, at least one device included in the touch module is a display screen; the model determining module 41 reads the model of at least one device included in the touch module from a specified storage medium of the display device, and includes:
reading extended display identification data EDID of the display screen from a display data channel DDC memory of the display device; and analyzing the EDID to obtain the model of the display screen.
In a possible implementation, the updating the set of second models stored in the display device according to the set of first models includes:
comparing a first model in the first model set with a target second model in the second model set, wherein the first model and the target second model correspond to the same device;
if the first model is not consistent with the target second model through comparison, the target second model in the second model set is updated to be the first model.
In a possible implementation, the update module 42 is specifically configured to:
splicing the second model in the updated second model set with a set character string to obtain a target character string; searching a pre-configured driving file according to the target character string; and determining the searched drive data corresponding to the target character string as the drive data matched with the device corresponding to the second type number.
In a possible embodiment, the actuation determination module 43 comprises (not shown in the figures):
the splicing submodule is used for splicing the second model in the updated second model set with a set character string to obtain a target character string;
the searching submodule is used for searching a pre-configured driving file according to the target character string;
and the determining submodule is used for determining the searched drive data corresponding to the target character string as the drive data matched with the device corresponding to the second type number.
In a specific implementation, the modules/sub-modules described above may be implemented by a processor. Here, the Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), a Micro Control Unit (MCU), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
The embodiment of the present invention further provides a display device, as shown in fig. 5, which includes a processor 501, a communication interface 502, a memory 503, a touch module 504 and a communication bus 505, wherein the processor 501, the communication interface 502, the memory 503, and the touch module 504 complete mutual communication through the communication bus 505,
a memory 503 for storing a computer program;
the processor 501, when executing the program stored in the memory 503, implements the following steps:
in the starting process of the first stage, determining a first model set corresponding to a touch module currently included in the display equipment;
updating a second model set stored in the display equipment according to the first model set;
and determining driving data matched with the touch module currently included by the display equipment from a pre-configured driving file according to the updated second type number set so as to drive the touch module currently included by the display equipment by using the driving data.
The communication bus mentioned above may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the server and other devices.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
The present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the driving method for a touch module provided in the embodiments of the present invention.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.