CN112306292B - Unified compatible method and device for multiple touch interfaces, storage medium and all-in-one machine - Google Patents

Unified compatible method and device for multiple touch interfaces, storage medium and all-in-one machine Download PDF

Info

Publication number
CN112306292B
CN112306292B CN202011155121.5A CN202011155121A CN112306292B CN 112306292 B CN112306292 B CN 112306292B CN 202011155121 A CN202011155121 A CN 202011155121A CN 112306292 B CN112306292 B CN 112306292B
Authority
CN
China
Prior art keywords
touch
usb
interface
frame
processing program
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
Application number
CN202011155121.5A
Other languages
Chinese (zh)
Other versions
CN112306292A (en
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.)
Guangzhou Lango Electronic Science and Technology Co Ltd
Original Assignee
Guangzhou Lango Electronic Science and Technology 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 Guangzhou Lango Electronic Science and Technology Co Ltd filed Critical Guangzhou Lango Electronic Science and Technology Co Ltd
Priority to CN202011155121.5A priority Critical patent/CN112306292B/en
Publication of CN112306292A publication Critical patent/CN112306292A/en
Application granted granted Critical
Publication of CN112306292B publication Critical patent/CN112306292B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Systems (AREA)

Abstract

The invention discloses a unified compatible method, a unified compatible device, a storage medium and an all-in-one machine of multiple touch interfaces, wherein the method comprises the following steps: reading the touch configuration file, initializing the touch configuration file, and obtaining the initialized touch configuration file; generating a detection instruction for detecting the touch frame based on the initialized touch configuration file and sending the detection instruction to the touch interface; if response feedback is received, determining an interface touch type based on the response feedback, and starting a touch processing program of the corresponding interface touch type to perform touch response; if the response feedback is not received, determining that the touch type is a double-USB interface touch type, and obtaining the vid/pid of the external USB touch frame; and starting a corresponding USB touch processing program to perform touch response based on the vid/pid of the external USB touch frame. In the embodiment of the invention, the touch frame compatible with the USB + MCU interface, the UART + USB interface and the double USB interfaces is realized.

Description

Unified compatible method and device for multiple touch interfaces, storage medium and all-in-one machine
Technical Field
The invention relates to the technical field of all-in-one machines, in particular to a unified and compatible method and device for multiple touch interfaces, a storage medium and an all-in-one machine.
Background
The all-in-one machine equipment commonly supports a double-touch function, can be used simultaneously by connecting android touch and signal source touch, and commonly comprises a UART + USB, a USB + MCU, a double USB and the like; for UART + USB touch, UART touch is used on the android system, a UART touch data protocol needs to be adapted, and 1 path of USB touch equipment is connected to the android system when the USB + MCU or double USB touches. The USB touch uses packets of the HID protocol. And the signal source touches a touch frame straight-sending mode and an android forwarding mode on the equipment node for acquiring the touch data. To support dual touch (android platform and PC platform), the implementation is adapted according to the actual protocol. With dual USB touch frames, there may be differences in touch data protocols.
Thus, corresponding android firmware needs to be provided for the touch frames of different interfaces. Or adding a touch type user menu, defaulting to an interface mode, and switching the corresponding type through menu setting when the touch frame interfaces used by the actual complete machine are not matched.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and provides a unified compatible method, a unified compatible device, a storage medium and an all-in-one machine of multiple touch interfaces, so that an android firmware can be compatible with a USB + MCU interface, a UART + USB interface and a double-USB interface touch frame.
In order to solve the above technical problem, an embodiment of the present invention provides a unified and compatible method for multiple touch interfaces, where the method includes:
reading a touch configuration file of a built-in mainboard of the all-in-one machine, initializing the touch configuration file, and obtaining the initialized touch configuration file;
generating a detection instruction for detecting the touch frame based on the initialized touch configuration file and sending the detection instruction to the touch interface;
if response feedback returned by the touch interface based on the detection instruction is received, determining that the touch type is a UART + USB interface touch type or a USB + MCU interface touch type based on the response feedback, and starting a touch processing program of the corresponding interface touch type to perform touch response;
if response feedback returned by the touch interface based on the detection instruction is not received, determining that the touch type is a double-USB interface touch type, and obtaining the vid/pid of an external USB touch frame;
and starting a corresponding USB touch processing program to perform touch response based on the vid/pid of the external USB touch frame.
Optionally, the touch configuration file includes a serial device node for touch, a serial baud rate, a vid/pid of the adapted non-drive-free USB touch frame, and a private drive or executable program name corresponding to the adapted non-drive-free USB touch frame.
Optionally, the generating a detection instruction for detecting the touch frame based on the initialized touch configuration file includes:
and generating a detection instruction for detecting the touch frame interface based on the serial device node and the serial baud rate for touch in the initialized touch configuration file.
Optionally, the determining, based on the response feedback, that the touch type is a UART + USB interface touch type or a USB + MCU interface touch type includes:
and matching the response feedback with a preset response feedback of a predefined UART + USB interface touch type and a predefined USB + MCU interface touch type, and determining that the touch type of the response feedback is the UART + USB interface touch type or the USB + MCU interface touch type based on a matching result.
Optionally, the starting the touch processing program of the corresponding interface touch type to perform touch response includes:
when the UART + USB interface touch class is determined, starting a serial port touch processing program to perform touch response;
when the touch type of the USB + MCU interface is determined, starting a USB + MCU touch processing program to perform touch response;
the serial port touch processing program is used for receiving, analyzing and reporting serial port touch data to an operation system of the all-in-one machine, and is also used for serial port communication with the touch frame;
the USB + MCU touch processing program is used for acquiring touch data of the touch frame in a USB mode, analyzing and reporting the touch data to an operation system of the all-in-one machine, and the USB mode controls the function of the touch frame; the MCU is also used for forwarding touch data to the signal source equipment through the serial port; but also for touch penetration processing under the signal source.
Optionally, the obtaining the vid/pid of the external USB touch frame includes:
and obtaining the native data of the external USB touch frame through a hidraw node, and obtaining the vid and the pid in the external USB touch frame based on the native data of the external USB touch frame.
Optionally, the starting of the corresponding USB touch processing program based on the vid/pid of the external USB touch frame to perform touch response includes:
judging whether the vid/pid of the external USB touch frame is contained in the initialized touch configuration file or not;
if so, reading touch configuration information of the USB touch processing program, initializing and configuring the USB touch processing program according to the read touch configuration information and the vid/pid of the external USB touch frame, and starting the initialized and configured USB touch processing program to perform touch response;
if not, configuring a hidmulttouch touch driver using a kernel standard, and starting the hidmulttouch touch driver to control a USB touch processing program to perform touch response after the configuration is finished;
the touch configuration information of the USB touch processing program comprises a USB touch data interface, a return touch data interface and a USB touch frame control interface.
In addition, an embodiment of the present invention further provides a unified and compatible device for multiple touch interfaces, where the device includes:
an initialization module: the all-in-one machine touch configuration file processing method comprises the steps that a touch configuration file of a built-in mainboard of the all-in-one machine is read, the touch configuration file is initialized, and the initialized touch configuration file is obtained;
the touch interface detection module: generating a detection instruction for detecting the touch frame based on the initialized touch configuration file and sending the detection instruction to the touch interface;
a first touch response module: the touch processing module is used for determining that the touch type is a UART + USB interface touch type or a USB + MCU interface touch type based on response feedback if the response feedback returned by the touch interface based on the detection instruction is received, and starting a corresponding interface touch type touch processing program to perform touch response;
an obtaining module: the USB interface touch control device is used for determining that the touch type is a double-USB interface touch type and obtaining the vid/pid of an external USB touch frame if response feedback returned by the touch interface based on the detection instruction is not received;
a second touch response module: and the USB touch processing program is started to perform touch response based on the vid/pid of the external USB touch frame.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the unified compatibility method described in any one of the above.
In addition, an embodiment of the present invention further provides an all-in-one machine device, which includes:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to: performing the unified compatibility method of any of the above.
In the embodiment of the invention, whether the touch frame is touched by a serial port touch frame or a USB + MCU is determined by a serial port handshake detection mode, and if the touch frame is not the serial port touch frame or the USB + MCU, double USB touch is performed; searching in a touch configuration file of the platform through the actually acquired vid/pid, and if not, configuring the vid/pid into a drive-free touch frame; otherwise, initializing a double-USB touch processing program module according to the vid/pid and the associated configuration in the configuration file; finally, one android firmware is compatible with a uart + USB interface, a USB + mcu interface and a double-USB interface touch frame.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart illustrating a unified compatibility method for multiple touch interfaces in an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a unified compatible device with multiple touch interfaces according to an embodiment of the present invention;
fig. 3 is a schematic structural composition diagram of the all-in-one machine device in the embodiment of the present invention.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Examples
In order to realize the uniform compatibility, the software module running on the all-in-one machine equipment at least comprises a module for uniformly detecting the interface type of the touch frame, a touch processing program module and a touch related configuration file and analysis module, wherein the module for detecting the interface type of the touch frame is used for detecting that the interface type of the touch frame is a serial port touch interface type USB touch interface type; the touch processing program module is used for a serial port touch processing module, a double USB touch processing module and a USB + MCU touch processing module; the touch related configuration file and analysis module is used for serial port touch serial port configuration and a path of a serial port device node; the 1-path serial port is used by both UART + USB touch and USB + MCU; the vid/pid of the supported USB touch frame and a touch processing program corresponding to the vid/pid. The method specifically comprises the following steps: the USB touch data of the touch frame is not standard HID data, and thus requires special processing; the corresponding touch processing program may be: A. a touch driver provided by a touch frame supplier; B. an executable program provided by a touch frame supplier; C. and the touch data processing program is realized at the mainboard end. The signal source touch data may be in a forwarding mode (android accepts data and then returns to the touch frame) or the touch frame is directly sent to the signal source device.
Referring to fig. 1, fig. 1 is a flowchart illustrating a unified compatibility method for multiple touch interfaces according to an embodiment of the present invention.
As shown in fig. 1, a method for unified compatibility of multiple touch interfaces, the method comprising:
s11: reading a touch configuration file of a built-in mainboard of the all-in-one machine, initializing the touch configuration file, and obtaining the initialized touch configuration file;
in the specific implementation process of the invention, the touch configuration file comprises a serial device node for touch, a serial baud rate, a vid/pid of the adapted non-drive-free USB touch frame, and a private drive or executable program name corresponding to the adapted non-drive-free USB touch frame.
Specifically, after the all-in-one machine device is started, a touch configuration file on a built-in mainboard of the all-in-one machine device needs to be read, wherein a corresponding all-in-one machine chip is arranged on the built-in mainboard, and the touch configuration file at least comprises a serial device node for touch, a serial baud rate, a vid/pid of an adapted non-drive-free USB touch frame and a private drive or executable program name corresponding to the adapted non-drive-free USB touch frame; when the subsequent touch interface type is detected, the detection is carried out according to the serial device node and the serial baud rate. Therefore, the touch profile needs to be initialized, and the initialized touch profile is finally obtained.
S12: generating a detection instruction for detecting the touch frame based on the initialized touch configuration file and sending the detection instruction to the touch interface;
in a specific implementation process of the present invention, the generating a detection instruction for detecting a touch frame based on an initialized touch profile includes: and generating a detection instruction for detecting the touch frame interface based on the serial device node and the serial baud rate for touch in the initialized touch configuration file.
Specifically, a serial device node and a serial baud rate for touch are extracted from the initialized touch configuration file, and then a detection instruction for detecting the touch frame interface is generated according to the serial device node and the serial baud rate for touch; and then sending the detection instruction to a corresponding touch interface to detect the type of the touch interface.
S13: judging whether the touch interface is based on response feedback returned by the detection instruction;
in the specific implementation process of the invention, when the touch interface receives the detection instruction, a response feedback may be returned according to the detection instruction, and no response feedback may be returned; therefore, it is necessary to determine whether the touch interface returns a corresponding response feedback according to the detection instruction.
S14: if response feedback returned by the touch interface based on the detection instruction is received, determining that the touch type is a UART + USB interface touch type or a USB + MCU interface touch type based on the response feedback, and starting a touch processing program of the corresponding interface touch type to perform touch response;
in a specific implementation process of the present invention, the determining, based on the response feedback, that the touch type is a UART + USB interface touch type or a USB + MCU interface touch type includes: and matching the response feedback with a preset response feedback of a predefined UART + USB interface touch type and a predefined USB + MCU interface touch type, and determining that the touch type of the response feedback is the UART + USB interface touch type or the USB + MCU interface touch type based on a matching result.
Further, the starting of the touch processing program of the corresponding interface touch type for touch response includes: when the UART + USB interface touch class is determined, starting a serial port touch processing program to perform touch response; when the touch type of the USB + MCU interface is determined, starting a USB + MCU touch processing program to perform touch response; the serial port touch processing program is used for receiving, analyzing and reporting serial port touch data to an operation system of the all-in-one machine, and is also used for serial port communication with the touch frame; the USB + MCU touch processing program is used for acquiring touch data of the touch frame in a USB mode, analyzing and reporting the touch data to an operation system of the all-in-one machine, and the USB mode controls the function of the touch frame; the MCU is also used for forwarding touch data to the signal source equipment through the serial port; but also for touch penetration processing under the signal source.
Specifically, after response feedback returned by the touch interface according to the detection instruction is received, the response feedback is matched with preset response feedback of a predefined UART + USB interface touch type and a predefined USB + MCU interface touch type, and then the touch type of the response feedback is determined to be the UART + USB interface touch type or the USB + MCU interface touch type according to a matching result.
And the UART + USB or USB + MCU interface touch type defines the response feedback for identifying the serial port touch frame and the MCU. The method comprises the steps that a main chip of the all-in-one machine sends a specified detection instruction (UART instruction), and according to response feedback fed back by the received detection instruction, the touch type is determined to be a UART + USB interface touch type or a USB + MCU interface touch type; and if the returned message comprises 'uarttoch', the type is UART + USB interface touch, and if the message is 'MCUTouch', the type is USB + MCU interface touch.
When the UART + USB interface touch class is determined, starting a serial port touch processing program to perform touch response; when the touch type of the USB + MCU interface is determined, starting a USB + MCU touch processing program to perform touch response; the serial port touch processing program on the touch processing program module is mainly used for receiving, analyzing and reporting serial port touch data to an operation system of the all-in-one machine, and is also used for serial port communication with the touch frame, such as inquiring information of the touch frame and controlling functional instructions of the touch frame. The USB + MCU touch processing program is used for acquiring touch data of the touch frame in a USB mode, analyzing and reporting the touch data to an operation system of the all-in-one machine, and the USB mode controls the function of the touch frame; the MCU is also used for forwarding touch data to the signal source equipment through the serial port; but also for touch penetration processing under the signal source.
S15: if response feedback returned by the touch interface based on the detection instruction is not received, determining that the touch type is a double-USB interface touch type, and obtaining the vid/pid of an external USB touch frame;
in a specific implementation process of the present invention, the obtaining of the vid/pid of the external USB touch frame includes: and obtaining the native data of the external USB touch frame through a hidraw node, and obtaining the vid and the pid in the external USB touch frame based on the native data of the external USB touch frame.
Specifically, when the response feedback returned by the touch interface according to the detection instruction is not received, it may be determined that the touch type is a dual USB interface touch type, that is, the vid/pid of the external USB touch frame is obtained by a corresponding method, and the method for specifically reading the vid/pid of the external USB device includes: and obtaining the native data of the external USB touch frame through the hidraw node to obtain the vid and pid information in the native data.
Opening all/dev/hidraw device nodes; the following were used:
Figure BDA0002742474720000081
Figure BDA0002742474720000091
s16: and starting a corresponding USB touch processing program to perform touch response based on the vid/pid of the external USB touch frame.
In a specific implementation process of the present invention, the starting of the corresponding USB touch processing program based on the vid/pid of the external USB touch frame to perform touch response includes: judging whether the vid/pid of the external USB touch frame is contained in the initialized touch configuration file or not; if so, reading touch configuration information of the USB touch processing program, initializing and configuring the USB touch processing program according to the read touch configuration information and the vid/pid of the external USB touch frame, and starting the initialized and configured USB touch processing program to perform touch response; if not, configuring a hidmulttouch touch driver using a kernel standard, and starting the hidmulttouch touch driver to control a USB touch processing program to perform touch response after the configuration is finished; the touch configuration information of the USB touch processing program comprises a USB touch data interface, a return touch data interface and a USB touch frame control interface.
Specifically, after the vid/pid of the external USB touch frame is obtained, by judging whether the vid/pid of the external USB touch frame is included in the initialized touch configuration file, the method can be implemented by the following procedures:
Figure BDA0002742474720000092
if so, reading touch configuration information of the USB touch processing program, initializing and configuring the USB touch processing program according to the read touch configuration information and the vid/pid of the external USB touch frame, and starting the initialized and configured USB touch processing program to perform touch response; if not, configuring a hidmulttouch touch driver using a kernel standard, and starting the hidmulttouch touch driver to control a USB touch processing program to perform touch response after the configuration is finished; the touch configuration information of the USB touch processing program comprises a USB touch data interface, a return touch data interface and a USB touch frame control interface.
That is, the USB touch handler is used for the transmission mode of USB data touched by the signal source: a hair-straightening mode or a forwarding mode; acquiring, analyzing and reporting the touch data to an android system; signal source touch data forwarding (in the case of a configuration in a forwarding mode or in the case where the touch frame only supports the forwarding mode); controlling the function of the touch frame in a USB mode; touch penetration processing under a signal source; when judging whether the USB external touch frame is drive-free, if the vid/pid of the USB external touch frame is not in the touch configuration file of the platform, the default is the drive-free touch frame; it decides whether to use the USB touch driver of the kernel or a special touch program. In the touch data processing mode, the original data mode is as follows: the main board end touch processing program processes data acquisition, analysis and reporting to an android, returns touch data to the touch frame and realizes the control function of the touch frame; the private program reporting mode of the touch frame is as follows: the main board end only needs to realize the function of the touch frame control program.
Configuring required information in each touch processing program: a UART + USB touch processing program needs to configure a UART equipment node and a Baud rate; a USB + MCU touch processing program needs to configure a UART equipment node, a baud rate and a USB touch data node; the double-USB touch processing program needs to be configured with a USB touch data interface, a return touch data interface and a USB touch frame control interface.
In the embodiment of the invention, whether the touch frame is touched by a serial port touch frame or a USB + MCU is determined by a serial port handshake detection mode, and if the touch frame is not the serial port touch frame or the USB + MCU, double USB touch is performed; searching in a touch configuration file of the platform through the actually acquired vid/pid, and if not, configuring the vid/pid into a drive-free touch frame; otherwise, initializing a double-USB touch processing program module according to the vid/pid and the associated configuration in the configuration file; finally, one android firmware is compatible with a uart + USB interface, a USB + mcu interface and a double-USB interface touch frame.
Examples
Referring to fig. 2, fig. 2 is a schematic structural composition diagram of a unified compatible device with multiple touch interfaces according to an embodiment of the present invention.
As shown in fig. 2, a unified compatible apparatus for multiple touch interfaces, the apparatus comprising:
the initialization module 21: the all-in-one machine touch configuration file processing method comprises the steps that a touch configuration file of a built-in mainboard of the all-in-one machine is read, the touch configuration file is initialized, and the initialized touch configuration file is obtained;
in the specific implementation process of the invention, the touch configuration file comprises a serial device node for touch, a serial baud rate, a vid/pid of the adapted non-drive-free USB touch frame, and a private drive or executable program name corresponding to the adapted non-drive-free USB touch frame.
Specifically, after the all-in-one machine device is started, a touch configuration file on a built-in mainboard of the all-in-one machine device needs to be read, wherein a corresponding all-in-one machine chip is arranged on the built-in mainboard, and the touch configuration file at least comprises a serial device node for touch, a serial baud rate, a vid/pid of an adapted non-drive-free USB touch frame and a private drive or executable program name corresponding to the adapted non-drive-free USB touch frame; when the subsequent touch interface type is detected, the detection is carried out according to the serial device node and the serial baud rate. Therefore, the touch profile needs to be initialized, and the initialized touch profile is finally obtained.
Touch interface detection module 22: generating a detection instruction for detecting the touch frame based on the initialized touch configuration file and sending the detection instruction to the touch interface;
in a specific implementation process of the present invention, the generating a detection instruction for detecting a touch frame based on an initialized touch profile includes: and generating a detection instruction for detecting the touch frame interface based on the serial device node and the serial baud rate for touch in the initialized touch configuration file.
Specifically, a serial device node and a serial baud rate for touch are extracted from the initialized touch configuration file, and then a detection instruction for detecting the touch frame interface is generated according to the serial device node and the serial baud rate for touch; and then sending the detection instruction to a corresponding touch interface to detect the type of the touch interface.
In the specific implementation process of the invention, when the touch interface receives the detection instruction, a response feedback may be returned according to the detection instruction, and no response feedback may be returned; therefore, it is necessary to determine whether the touch interface returns a corresponding response feedback according to the detection instruction.
The first touch response module 23: the touch processing module is used for determining that the touch type is a UART + USB interface touch type or a USB + MCU interface touch type based on response feedback if the response feedback returned by the touch interface based on the detection instruction is received, and starting a corresponding interface touch type touch processing program to perform touch response;
in a specific implementation process of the present invention, the determining, based on the response feedback, that the touch type is a UART + USB interface touch type or a USB + MCU interface touch type includes: and matching the response feedback with a preset response feedback of a predefined UART + USB interface touch type and a predefined USB + MCU interface touch type, and determining that the touch type of the response feedback is the UART + USB interface touch type or the USB + MCU interface touch type based on a matching result.
Further, the starting of the touch processing program of the corresponding interface touch type for touch response includes: when the UART + USB interface touch class is determined, starting a serial port touch processing program to perform touch response; when the touch type of the USB + MCU interface is determined, starting a USB + MCU touch processing program to perform touch response; the serial port touch processing program is used for receiving, analyzing and reporting serial port touch data to an operation system of the all-in-one machine, and is also used for serial port communication with the touch frame; the USB + MCU touch processing program is used for acquiring touch data of the touch frame in a USB mode, analyzing and reporting the touch data to an operation system of the all-in-one machine, and the USB mode controls the function of the touch frame; the MCU is also used for forwarding touch data to the signal source equipment through the serial port; but also for touch penetration processing under the signal source.
Specifically, after response feedback returned by the touch interface according to the detection instruction is received, the response feedback is matched with preset response feedback of a predefined UART + USB interface touch type and a predefined USB + MCU interface touch type, and then the touch type of the response feedback is determined to be the UART + USB interface touch type or the USB + MCU interface touch type according to a matching result.
And the UART + USB or USB + MCU interface touch type defines the response feedback for identifying the serial port touch frame and the MCU. The method comprises the steps that a main chip of the all-in-one machine sends a specified detection instruction (UART instruction), and according to response feedback fed back by the received detection instruction, the touch type is determined to be a UART + USB interface touch type or a USB + MCU interface touch type; and if the returned message comprises 'uarttoch', the type is UART + USB interface touch, and if the message is 'MCUTouch', the type is USB + MCU interface touch.
When the UART + USB interface touch class is determined, starting a serial port touch processing program to perform touch response; when the touch type of the USB + MCU interface is determined, starting a USB + MCU touch processing program to perform touch response; the serial port touch processing program on the touch processing program module is mainly used for receiving, analyzing and reporting serial port touch data to an operation system of the all-in-one machine, and is also used for serial port communication with the touch frame, such as inquiring information of the touch frame and controlling functional instructions of the touch frame. The USB + MCU touch processing program is used for acquiring touch data of the touch frame in a USB mode, analyzing and reporting the touch data to an operation system of the all-in-one machine, and the USB mode controls the function of the touch frame; the MCU is also used for forwarding touch data to the signal source equipment through the serial port; but also for touch penetration processing under the signal source.
The obtaining module 24: the USB interface touch control device is used for determining that the touch type is a double-USB interface touch type and obtaining the vid/pid of an external USB touch frame if response feedback returned by the touch interface based on the detection instruction is not received;
in a specific implementation process of the present invention, the obtaining of the vid/pid of the external USB touch frame includes: and obtaining the native data of the external USB touch frame through a hidraw node, and obtaining the vid and the pid in the external USB touch frame based on the native data of the external USB touch frame.
Specifically, when the response feedback returned by the touch interface according to the detection instruction is not received, it may be determined that the touch type is a dual USB interface touch type, that is, the vid/pid of the external USB touch frame is obtained by a corresponding method, and the method for specifically reading the vid/pid of the external USB device includes: and obtaining the native data of the external USB touch frame through the hidraw node to obtain the vid and pid information in the native data.
Opening all/dev/hidraw device nodes; the following were used:
Figure BDA0002742474720000131
the second touch response module 25: and the USB touch processing program is started to perform touch response based on the vid/pid of the external USB touch frame.
In a specific implementation process of the present invention, the starting of the corresponding USB touch processing program based on the vid/pid of the external USB touch frame to perform touch response includes: judging whether the vid/pid of the external USB touch frame is contained in the initialized touch configuration file or not; if so, reading touch configuration information of the USB touch processing program, initializing and configuring the USB touch processing program according to the read touch configuration information and the vid/pid of the external USB touch frame, and starting the initialized and configured USB touch processing program to perform touch response; if not, configuring a hidmulttouch touch driver using a kernel standard, and starting the hidmulttouch touch driver to control a USB touch processing program to perform touch response after the configuration is finished; the touch configuration information of the USB touch processing program comprises a USB touch data interface, a return touch data interface and a USB touch frame control interface.
Specifically, after the vid/pid of the external USB touch frame is obtained, by judging whether the vid/pid of the external USB touch frame is included in the initialized touch configuration file, the method can be implemented by the following procedures:
Figure BDA0002742474720000141
if so, reading touch configuration information of the USB touch processing program, initializing and configuring the USB touch processing program according to the read touch configuration information and the vid/pid of the external USB touch frame, and starting the initialized and configured USB touch processing program to perform touch response; if not, configuring a hidmulttouch touch driver using a kernel standard, and starting the hidmulttouch touch driver to control a USB touch processing program to perform touch response after the configuration is finished; the touch configuration information of the USB touch processing program comprises a USB touch data interface, a return touch data interface and a USB touch frame control interface.
That is, the USB touch handler is used for the transmission mode of USB data touched by the signal source: a hair-straightening mode or a forwarding mode; acquiring, analyzing and reporting the touch data to an android system; signal source touch data forwarding (in the case of a configuration in a forwarding mode or in the case where the touch frame only supports the forwarding mode); controlling the function of the touch frame in a USB mode; touch penetration processing under a signal source; when judging whether the USB external touch frame is drive-free, if the vid/pid of the USB external touch frame is not in the touch configuration file of the platform, the default is the drive-free touch frame; it decides whether to use the USB touch driver of the kernel or a special touch program. In the touch data processing mode, the original data mode is as follows: the main board end touch processing program processes data acquisition, analysis and reporting to an android, returns touch data to the touch frame and realizes the control function of the touch frame; the private program reporting mode of the touch frame is as follows: the main board end only needs to realize the function of the touch frame control program.
Configuring required information in each touch processing program: a UART + USB touch processing program needs to configure a UART equipment node and a Baud rate; a USB + MCU touch processing program needs to configure a UART equipment node, a baud rate and a USB touch data node; the double-USB touch processing program needs to be configured with a USB touch data interface, a return touch data interface and a USB touch frame control interface.
In the embodiment of the invention, whether the touch frame is touched by a serial port touch frame or a USB + MCU is determined by a serial port handshake detection mode, and if the touch frame is not the serial port touch frame or the USB + MCU, double USB touch is performed; searching in a touch configuration file of the platform through the actually acquired vid/pid, and if not, configuring the vid/pid into a drive-free touch frame; otherwise, initializing a double-USB touch processing program module according to the vid/pid and the associated configuration in the configuration file; finally, one android firmware is compatible with a uart + USB interface, a USB + mcu interface and a double-USB interface touch frame.
The computer-readable storage medium provided by the embodiments of the present invention stores thereon a computer program, and when the computer program is executed by a processor, the computer program implements the unified compatibility method of any one of the embodiments. The computer-readable storage medium includes, but is not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks, ROMs (Read-Only memories), RAMs (Random AcceSS memories), EPROMs (EraSable Programmable Read-Only memories), EEPROMs (Electrically EraSable Programmable Read-Only memories), flash memories, magnetic cards, or optical cards. That is, a storage device includes any medium that stores or transmits information in a form readable by a device (e.g., a computer, a cellular phone), and may be a read-only memory, a magnetic or optical disk, or the like.
The embodiment of the invention also provides a computer application program which runs on a computer and is used for executing the unified compatibility method of any one of the embodiments.
In addition, fig. 3 is a schematic structural composition diagram of the all-in-one machine device in the embodiment of the present invention.
The embodiment of the invention also provides all-in-one machine equipment, as shown in fig. 3. The all-in-one machine device comprises a processor 302, a memory 303, an input unit 304, a display unit 305 and the like. Those skilled in the art will appreciate that the unitary device structure illustrated in fig. 3 does not constitute a limitation of all devices and may include more or fewer components than those illustrated, or some of the components may be combined. The memory 303 may be used to store the application 301 and various functional modules, and the processor 302 executes the application 301 stored in the memory 303, thereby performing various functional applications of the device and data processing. The memory may be internal or external memory, or include both internal and external memory. The memory may comprise read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), flash memory, or random access memory. The external memory may include a hard disk, a floppy disk, a ZIP disk, a usb-disk, a magnetic tape, etc. The disclosed memory includes, but is not limited to, these types of memory. The disclosed memory is by way of example only and not by way of limitation.
The input unit 304 is used for receiving input of signals and receiving keywords input by a user. The input unit 304 may include a touch panel and other input devices. The touch panel can collect touch operations of a user on or near the touch panel (for example, operations of the user on or near the touch panel by using any suitable object or accessory such as a finger, a stylus and the like) and drive the corresponding connecting device according to a preset program; other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., play control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like. The display unit 305 may be used to display information input by a user or information provided to the user and various menus of the terminal device. The display unit 305 may take the form of a liquid crystal display, an organic light emitting diode, or the like. The processor 302 is a control center of the terminal device, connects various parts of the entire device using various interfaces and lines, and performs various functions and processes data by operating or executing software programs and/or modules stored in the memory 302 and calling data stored in the memory.
As an embodiment, the all-in-one machine device includes: one or more processors 302, a memory 303, one or more applications 301, wherein the one or more applications 301 are stored in the memory 303 and configured to be executed by the one or more processors 302, the one or more applications 301 configured to perform the unified compatibility method of any of the above embodiments.
In the embodiment of the invention, whether the touch frame is touched by a serial port touch frame or a USB + MCU is determined by a serial port handshake detection mode, and if the touch frame is not the serial port touch frame or the USB + MCU, double USB touch is performed; searching in a touch configuration file of the platform through the actually acquired vid/pid, and if not, configuring the vid/pid into a drive-free touch frame; otherwise, initializing a double-USB touch processing program module according to the vid/pid and the associated configuration in the configuration file; finally, one android firmware is compatible with a uart + USB interface, a USB + mcu interface and a double-USB interface touch frame.
In addition, the above detailed descriptions of the unified and compatible method, device, storage medium and all-in-one machine for multiple touch interfaces provided by the embodiment of the present invention are provided, and a specific example should be used herein to explain the principle and the implementation manner of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (9)

1. A method for unified compatibility of multiple touch interfaces, the method comprising:
reading a touch configuration file of a built-in mainboard of the all-in-one machine, initializing the touch configuration file, and obtaining the initialized touch configuration file;
generating a detection instruction for detecting the touch frame based on the initialized touch configuration file and sending the detection instruction to the touch interface;
if response feedback returned by the touch interface based on the detection instruction is received, determining that the touch type is a UART + USB interface touch type or a USB + MCU interface touch type based on the response feedback, and starting a touch processing program of the corresponding interface touch type to perform touch response;
if response feedback returned by the touch interface based on the detection instruction is not received, determining that the touch type is a double-USB interface touch type, and obtaining the vid/pid of an external USB touch frame;
starting a corresponding USB touch processing program to perform touch response based on the vid/pid of the external USB touch frame;
the step of starting a corresponding USB touch processing program to perform touch response based on the vid/pid of the external USB touch frame comprises the following steps:
judging whether the vid/pid of the external USB touch frame is contained in the initialized touch configuration file or not;
if so, reading touch configuration information of the USB touch processing program, initializing and configuring the USB touch processing program according to the read touch configuration information and the vid/pid of the external USB touch frame, and starting the initialized and configured USB touch processing program to perform touch response;
if not, configuring a hidmulttouch touch driver using a kernel standard, and starting the hidmulttouch touch driver to control a USB touch processing program to perform touch response after the configuration is finished;
the touch configuration information of the USB touch processing program comprises a USB touch data interface, a return touch data interface and a USB touch frame control interface.
2. The unified and compatible method according to claim 1, wherein the touch configuration file includes a serial device node for touch, a serial baud rate, a vid/pid of the adapted non-driver USB touch box, and a private driver or executable program name corresponding to the adapted non-driver USB touch box.
3. The unified compatibility method according to claim 2, wherein the generating a detection instruction for detecting a touch frame based on the initialized touch profile comprises:
and generating a detection instruction for detecting the touch frame interface based on the serial device node and the serial baud rate for touch in the initialized touch configuration file.
4. The unified compatibility method according to claim 1, wherein said determining the touch type as UART + USB interface touch type or USB + MCU interface touch type based on said response feedback comprises:
and matching the response feedback with a preset response feedback of a predefined UART + USB interface touch type and a predefined USB + MCU interface touch type, and determining that the touch type of the response feedback is the UART + USB interface touch type or the USB + MCU interface touch type based on a matching result.
5. The unified compatibility method according to claim 1, wherein the starting a touch handler of a corresponding interface touch type for touch response comprises:
when the UART + USB interface touch class is determined, starting a serial port touch processing program to perform touch response;
when the touch type of the USB + MCU interface is determined, starting a USB + MCU touch processing program to perform touch response;
the serial port touch processing program is used for receiving, analyzing and reporting serial port touch data to an operation system of the all-in-one machine, and is also used for serial port communication with the touch frame;
the USB + MCU touch processing program is used for acquiring touch data of the touch frame in a USB mode, analyzing and reporting the touch data to an operation system of the all-in-one machine, and the USB mode controls the function of the touch frame; the MCU is also used for forwarding touch data to the signal source equipment through the serial port; but also for touch penetration processing under the signal source.
6. The unified compatibility method according to claim 1, wherein said obtaining vid/pid of the external USB touch frame comprises:
and obtaining the native data of the external USB touch frame through a hidraw node, and obtaining the vid and the pid in the external USB touch frame based on the native data of the external USB touch frame.
7. A unified compatible apparatus for multiple touch interfaces, the apparatus comprising:
an initialization module: the all-in-one machine touch configuration file processing method comprises the steps that a touch configuration file of a built-in mainboard of the all-in-one machine is read, the touch configuration file is initialized, and the initialized touch configuration file is obtained;
the touch interface detection module: generating a detection instruction for detecting the touch frame based on the initialized touch configuration file and sending the detection instruction to the touch interface;
a first touch response module: the touch processing module is used for determining that the touch type is a UART + USB interface touch type or a USB + MCU interface touch type based on response feedback if the response feedback returned by the touch interface based on the detection instruction is received, and starting a corresponding interface touch type touch processing program to perform touch response;
an obtaining module: the USB interface touch control device is used for determining that the touch type is a double-USB interface touch type and obtaining the vid/pid of an external USB touch frame if response feedback returned by the touch interface based on the detection instruction is not received;
a second touch response module: the USB touch processing program is started to perform touch response based on the vid/pid of the external USB touch frame;
the step of starting a corresponding USB touch processing program to perform touch response based on the vid/pid of the external USB touch frame comprises the following steps:
judging whether the vid/pid of the external USB touch frame is contained in the initialized touch configuration file or not;
if so, reading touch configuration information of the USB touch processing program, initializing and configuring the USB touch processing program according to the read touch configuration information and the vid/pid of the external USB touch frame, and starting the initialized and configured USB touch processing program to perform touch response;
if not, configuring a hidmulttouch touch driver using a kernel standard, and starting the hidmulttouch touch driver to control a USB touch processing program to perform touch response after the configuration is finished;
the touch configuration information of the USB touch processing program comprises a USB touch data interface, a return touch data interface and a USB touch frame control interface.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the unified compatibility method according to any one of claims 1 to 6.
9. An all-in-one machine device, characterized in that it comprises:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to: performing the unified compatibility method according to any of claims 1 to 6.
CN202011155121.5A 2020-10-26 2020-10-26 Unified compatible method and device for multiple touch interfaces, storage medium and all-in-one machine Active CN112306292B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011155121.5A CN112306292B (en) 2020-10-26 2020-10-26 Unified compatible method and device for multiple touch interfaces, storage medium and all-in-one machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011155121.5A CN112306292B (en) 2020-10-26 2020-10-26 Unified compatible method and device for multiple touch interfaces, storage medium and all-in-one machine

Publications (2)

Publication Number Publication Date
CN112306292A CN112306292A (en) 2021-02-02
CN112306292B true CN112306292B (en) 2021-08-27

Family

ID=74331011

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011155121.5A Active CN112306292B (en) 2020-10-26 2020-10-26 Unified compatible method and device for multiple touch interfaces, storage medium and all-in-one machine

Country Status (1)

Country Link
CN (1) CN112306292B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881236A (en) * 2015-06-12 2015-09-02 武汉精测电子技术股份有限公司 Scribing detection system and method based on USB interface capacitive touch screen
CN107451086A (en) * 2017-07-12 2017-12-08 广州视源电子科技股份有限公司 A kind of all-in-one
CN107479745A (en) * 2017-07-31 2017-12-15 北京雷石天地电子技术有限公司 A kind of method, module and operating system for configuring touch-screen
US10698522B2 (en) * 2016-04-27 2020-06-30 Qualcomm Incorporated Variable rate display interfaces
CN111399678A (en) * 2020-03-06 2020-07-10 广州视源电子科技股份有限公司 Data processing method, device and system, computer storage medium and related equipment
CN111522405A (en) * 2019-02-02 2020-08-11 深圳富创通科技有限公司 Mainboard integrating multifunctional TYPE-C interface

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8898443B2 (en) * 2010-10-01 2014-11-25 Z124 Multi-operating system
TW201421253A (en) * 2012-11-16 2014-06-01 Princeton Technology Corp Transmission interface for touch system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881236A (en) * 2015-06-12 2015-09-02 武汉精测电子技术股份有限公司 Scribing detection system and method based on USB interface capacitive touch screen
US10698522B2 (en) * 2016-04-27 2020-06-30 Qualcomm Incorporated Variable rate display interfaces
CN107451086A (en) * 2017-07-12 2017-12-08 广州视源电子科技股份有限公司 A kind of all-in-one
CN107479745A (en) * 2017-07-31 2017-12-15 北京雷石天地电子技术有限公司 A kind of method, module and operating system for configuring touch-screen
CN111522405A (en) * 2019-02-02 2020-08-11 深圳富创通科技有限公司 Mainboard integrating multifunctional TYPE-C interface
CN111399678A (en) * 2020-03-06 2020-07-10 广州视源电子科技股份有限公司 Data processing method, device and system, computer storage medium and related equipment

Also Published As

Publication number Publication date
CN112306292A (en) 2021-02-02

Similar Documents

Publication Publication Date Title
US11461111B2 (en) Method for running applets, and electronic device
CN103412769B (en) External card parameter configuration, equipment and system
US7380116B2 (en) System for real-time adaptation to changes in display configuration
CN108605220B (en) Application processing method and device for embedded universal integrated circuit card
CN107992308B (en) Plug-in management method for android terminal application program
KR20150128671A (en) Application scenario identification method, power consumption management method, apparatus, and terminal device
US10152660B2 (en) Smart card read/write method and apparatus
JP7320016B2 (en) Vehicle call command transmission method, device and electronic device
US11269663B2 (en) Method and apparatus for adapting handle device to third-party application, and storage medium
WO2020019490A1 (en) Interface testing method, electronic device and storage medium
US9215271B2 (en) Method and apparatus for executing application of mobile device
US20160077831A1 (en) Accurate and performant code design using memoization
WO2020134899A1 (en) Method for generating network search list, network search method and corresponding apparatus
CN104679239A (en) Terminal input method
CN113836089A (en) Application program display method and device, electronic equipment and readable storage medium
CN112306292B (en) Unified compatible method and device for multiple touch interfaces, storage medium and all-in-one machine
CN108241510B (en) Display card switching method
CN104679506A (en) Terminal
US20190258370A1 (en) Electronic apparatus and method for controlling information reading
CN110825370B (en) Mobile terminal application development method, device and system
CN110832449B (en) Control method and electronic equipment
US20210223920A1 (en) Shortcut Key Control Method and Terminal
JP5524260B2 (en) Communication terminal and communication system
KR20140102339A (en) Method and terminal of calling application using mapping information of preferred function
CN114968627A (en) System anomaly detection method and device and electronic equipment

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
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Room 238, room 406, No.1, Yichuang street, Huangpu District, Guangzhou, Guangdong 510000

Patentee after: Guangzhou langguo Electronic Technology Co.,Ltd.

Address before: 510000 unit a and B, zone 02, 4th floor, No. 136, Gaopu Road, high tech Development Zone, Tianhe District, Guangzhou City, Guangdong Province

Patentee before: GUANGZHOU LANGO ELECTRONIC SCIENCE & TECHNOLOGY Co.,Ltd.