Light sensing module control method, device, display device and storage medium

By detecting and configuring the device number information and bus mode of the light-sensing module, the problem of low applicability of the light-sensing module and bus deadlock in the display device is solved, and adaptive matching and exception handling of multiple types of light-sensing modules are realized to ensure startup Start normally.

CN115834970BActive Publication Date: 2024-10-01SHENZHEN SKYWORTH RGB ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211370598.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-03
Publication Date
2024-10-01
Estimated Expiration
2042-11-03

AI Technical Summary

Technical Problem

In the existing technology, the light-sensing module equipped with the display device has low applicability, and the damage of a single light-sensing module will affect the startup, causing the I2C bus to deadlock, affecting product mass production and after-sales processing.

Method used

By detecting the matching of each light-sensing module when the device is started, obtaining the device number information, configuring the bus and signal lines to the specified transmission mode, releasing the deadlock state, and realizing adaptive matching and exception handling of multiple different types of light-sensing modules.

Benefits of technology

It improves the applicability of the light-sensing module, ensures adaptive matching at startup, prevents anomalies in a single light-sensing module from affecting startup, and promptly restores the bus communication status to return to normal from a deadlock state.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115834970B_ABST
    Figure CN115834970B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of display devices, and discloses a method, device, display device and storage medium for controlling a light sensing module. The method includes: matching each light sensing module when detecting that the device is started, and obtaining the device number information of each light sensing module; configuring each light sensing module according to the device number information, so that each light sensing module is started and works, and detecting whether there is an abnormality in each light sensing module in the device; when the detection result is that the light sensing module is abnormal, configuring the bus and each signal line of the light sensing module to a specified transmission mode; completing a read operation on each light sensing module in the specified transmission mode to release the deadlock state of the bus corresponding to each light sensing module. Through the above-mentioned method, the applicability of the light sensing module on the display device is improved. And when the light sensing module is abnormal, the bus and each signal line are automatically configured and the normal startup is completed to prevent the abnormality of a single light sensing module from affecting the startup.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of display devices, and in particular to a light sensing module control method, device, display device and storage medium. Background Art

[0002] A common function of TV sets is to automatically adjust the backlight. This function requires a light sensor module, which is used to obtain the intensity of the ambient light, and then adjust the backlight brightness accordingly according to the configured mapping relationship between the light intensity and the backlight brightness. Common light sensor modules use a bus (I2C) interface to communicate with the host. The host can send instructions to the light sensor module through I2C, or read the light value detected by the current light sensor module through I2C. Different light values ​​correspond to different light intensities. In this way, the TV determines the light intensity of the current environment by reading the light value. Then, according to the pre-configured mapping relationship between the light value and the backlight brightness, the platform is called to set the backlight brightness value of the display, and finally the function of automatically adjusting the backlight is realized.

[0003] Due to the uncertainty of light sensor module supply, for example, if a certain model of TV is only equipped with one type of light sensor, the supplier suddenly cannot supply it normally. Since there is no substitute, only other types of light sensors can be imported, and the software must be re-adapted. It can only be imported into mass production after subjective review. Since only one type of light sensor module is configured, it will be troublesome to have no substitute. This will not only affect the time for mass production and listing of the product, but also affect the after-sales processing to solve the problem of the light sensor module. And usually, the damage of the light sensor module will kill the I2C bus, resulting in slow startup.

[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of the present invention is to provide a light sensing module control method, device, display device and storage medium, aiming to solve the technical problems that the light sensing modules equipped in the prior art display devices have low applicability and the startup will be affected by damage to a single light sensing module.

[0006] To achieve the above object, the present invention provides a light sensing module control method, the method comprising the following steps:

[0007] When the device is detected to be started, each light sensing module is matched to obtain the device number information of each light sensing module;

[0008] Configuring each light sensing module according to the device number information so that each light sensing module starts and works, and detecting whether each light sensing module in the device has an abnormality;

[0009] When the detection result shows that the light sensing module is abnormal, configuring the bus and each signal line of the light sensing module to a specified transmission mode;

[0010] The read operation is completed for each photosensitive module in the specified transmission mode to release the deadlock state of the bus corresponding to each photosensitive module.

[0011] Optionally, when the device is detected to be started, each light sensing module is matched to obtain device number information of each light sensing module, including:

[0012] When the device is detected to be started, the information of supported light sensing devices is obtained;

[0013] Generate a device address configuration strategy according to the supported photosensitive device information;

[0014] Each photosensitive module is matched according to the device address configuration strategy to obtain device number information of each photosensitive module.

[0015] Optionally, matching each light sensing module according to the device address configuration strategy to obtain device number information of each light sensing module includes:

[0016] Determining a device address configuration order according to the device address configuration strategy;

[0017] Obtain module device information of each photosensitive module;

[0018] Determine a device number comparison table for each light sensing module according to the module device information;

[0019] Each photosensitive module is matched according to the device address configuration sequence and the device number comparison table to obtain device number information of each photosensitive module.

[0020] Optionally, the detecting whether there is an abnormality in the light sensing module in the device includes:

[0021] Get bus information;

[0022] configuring the data signal line to a universal input mode according to the bus information, transmitting a working signal through the data signal line in the universal input mode, and detecting a signal level of the working signal on the data signal line;

[0023] Whether there is an abnormality in the light sensing module is determined according to the detected signal level of the data signal line.

[0024] Optionally, when the detection result indicates that the light sensing module is abnormal, configuring the bus and each signal line of the light sensing module to a specified transmission mode according to the detection result includes:

[0025] When the detection result indicates that the light sensing module is abnormal, the clock signal line of the light sensing module is configured as a general output mode, and a target clock signal is transmitted through the clock signal line in the general output mode;

[0026] When the number of consecutive clocks of the target clock signal is within the cycle threshold range and the number of consecutive clocks changes and is at a low level, detecting the level of the data signal line of the light sensing module to obtain a first level detection result;

[0027] The bus and each signal line of the light sensing module are configured to a specified transmission mode according to the first level detection result.

[0028] Optionally, when the detection result indicates that the light sensing module is abnormal, after configuring the clock signal line of the light sensing module to a general input mode and outputting a target clock signal, the method further includes:

[0029] When the number of consecutive clocks of the target clock signal is not within the cycle threshold range, detecting the level of the data signal line to obtain a second level detection result;

[0030] The bus and each signal line of the light sensing module are configured to a specified transmission mode according to the second level detection result.

[0031] Optionally, configuring the bus and each signal line of the light sensing module to a specified transmission mode according to the first level detection result includes:

[0032] When the first level detection result is that the data signal line is at a high level, configuring the data signal line to a general output mode;

[0033] In the general output mode, the signal states of the data signal line and the clock signal line are adjusted according to the level adjustment strategy to configure the bus and each signal line of the light sensing module into a specified transmission mode.

[0034] In addition, to achieve the above-mentioned purpose, the present invention further provides a light sensing module control device, the light sensing module control device comprising:

[0035] The information matching module is used to match each light sensing module when the device is started and obtain the device number information of each light sensing module;

[0036] A configuration startup module is used to configure each light sensing module according to the device number information so that each light sensing module is started and works, and detect whether each light sensing module in the device has an abnormality;

[0037] An exception handling module, configured to configure the bus and each signal line of the light sensing module to a specified transmission mode when the detection result indicates that the light sensing module is abnormal;

[0038] The bus recovery module is used to complete the read operation on each light sensing module in the specified transmission mode to release the deadlock state of the bus corresponding to each light sensing module.

[0039] In addition, to achieve the above-mentioned purpose, the present invention also proposes a display device, which includes: a memory, a processor, and a light sensing module control program stored in the memory and executable on the processor, wherein the light sensing module control program is configured to implement the steps of the light sensing module control method described above.

[0040] In addition, to achieve the above purpose, the present invention also proposes a storage medium, on which a light sensing module control program is stored, and when the light sensing module control program is executed by a processor, the steps of the light sensing module control method described above are implemented.

[0041] The present invention detects that when the device is started, it matches each photosensitive module to obtain the device number information of each photosensitive module; configures each photosensitive module according to the device number information so that each photosensitive module starts and works, and detects whether each photosensitive module in the device has an abnormality; when the detection result is that the photosensitive module is abnormal, the bus and each signal line of the photosensitive module are configured to a specified transmission mode; in the specified transmission mode, a read operation is completed for each photosensitive module to release the deadlock state of the bus corresponding to each photosensitive module. In this way, not only can a plurality of photosensitive modules of different models be mounted on the display device and adaptively matched at startup, but also the applicability of the photosensitive module on the display device is improved. And when the photosensitive module is abnormal, the bus and each signal line can be automatically configured and normal startup can be completed to prevent the abnormality of a single photosensitive module from affecting the startup, and when there is an abnormality in the photosensitive module, it can be discovered in time and the communication state of the bus can be restored from the deadlock state. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a structural schematic diagram of a display device in a hardware operating environment involved in an embodiment of the present invention;

[0043] Figure 2 It is a flowchart of the first embodiment of the light sensing module control method of the present invention;

[0044] Figure 3 It is a flowchart of a second embodiment of a method for controlling a light sensing module according to the present invention;

[0045] Figure 4 This is a complete flow chart of abnormality detection of a light sensing module in an embodiment of a light sensing module control method of the present invention;

[0046] Figure 5 It is a structural block diagram of the first embodiment of the light sensing module control device of the present invention.

[0047] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0048] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0049] Reference Figure 1 , Figure 1 The figure is a schematic diagram of the structure of a display device in a hardware operating environment involved in an embodiment of the present invention.

[0050] like Figure 1 As shown, the display device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0051] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the display device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0052] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a light sensing module control program.

[0053] exist Figure 1In the display device shown, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the display device of the present invention can be set in the display device, and the display device calls the light sensing module control program stored in the memory 1005 through the processor 1001, and executes the light sensing module control method provided in an embodiment of the present invention.

[0054] The embodiment of the present invention provides a method for controlling a light sensing module. Figure 2 , Figure 2 It is a flowchart diagram of a first embodiment of a light sensing module control method of the present invention.

[0055] In this embodiment, the light sensing module control method includes the following steps:

[0056] Step S10: When it is detected that the device is started, each light sensing module is matched to obtain the device number information of each light sensing module.

[0057] It should be noted that the executor of this embodiment is a processor or other information processing device on a display device, which can be any display device, including but not limited to: main chips, processors, onboard computers, etc. on televisions, monitors, projectors and other devices, or other devices that can achieve this function. This embodiment does not impose any restrictions on this.

[0058] It should be understood that at present, the display devices are basically equipped with the same type of light sensing module, but since only one type of light sensing module is configured, it will be troublesome if there is no substitute, which will not only affect the time for mass production and listing of the product, but also affect the after-sales processing to solve the problem of the light sensing module. And under normal circumstances, the damage of the light sensing module will pull the I2C bus to death, thereby causing the light sensing module to be damaged and causing the problem of slow startup. The solution of this embodiment can automatically detect whether there is an abnormality in the light sensing module when the device is started, and when the light sensing module is abnormal, the bus and each signal line of the light sensing module can be configured to a specified transmission mode. In the specified transmission mode, the light sensing module of the device is read and restored to normal from the deadlock state, thereby avoiding abnormal damage to the light sensing module and not pulling the bus to death. In this way, it is not only realized that multiple light sensing modules of different models can be carried on the display device and adaptively matched at startup, but also the applicability of the light sensing module on the display device is improved. And when the light sensing module is abnormal, the bus and each signal line can be automatically configured and normal startup can be completed to prevent the abnormality of a single light sensing module from affecting the startup.

[0059] In the specific implementation, when the device is detected to be started, firstly, whether the light sensing module configured inside the device is abnormal is detected. The device can be any display device, and this embodiment does not limit this. Detecting that the device is started means that the device power is turned on and the main processor starts to operate.

[0060] It should be noted that the light sensing module in this embodiment can be a light sensing module of any brand and any model, and can be a light sensing module of different models.

[0061] It should be understood that when it is detected that the device is started, the process of matching each light sensing module is first started, that is, the device number information corresponding to the device component information of each light sensing module is determined.

[0062] Furthermore, in order to obtain the device number information of each photosensitive module, step S30 includes: when detecting that the device is started, obtaining the supported photosensitive device information; generating a device address configuration strategy based on the supported photosensitive device information; matching each photosensitive module according to the device address configuration strategy to obtain the device number information of each photosensitive module.

[0063] In a specific implementation, the supported photosensitive device information refers to the device information of the photosensitive module devices supported by the current display device, including the device device address, function register address, register address length, data length, etc. of each supported photosensitive module.

[0064] It should be noted that, in the device address configuration strategy generated according to the supported photosensitive device information, the device address configuration strategy refers to the address configuration strategy required for matching each photosensitive module installed on the device with the photosensitive modules supported by the device, wherein the matching of the photosensitive modules is achieved by configuring different addresses for verification.

[0065] It should be understood that matching each photosensitive module according to the device address configuration strategy to obtain the device number information of each photosensitive module means: executing the device address configuration strategy on each photosensitive module and verifying the signal through I2C to determine the device number information corresponding to each photosensitive module.

[0066] In this way, matching is achieved based on the supported photosensitive device information of all photosensitive modules supported by the display device, thereby obtaining the device number information of each photosensitive module.

[0067] Furthermore, in order to determine how to perform matching, each photosensitive module is matched according to the device address configuration strategy to obtain the device number information of each photosensitive module, including: determining the device address configuration order according to the device address configuration strategy; obtaining the module device information of each photosensitive module; determining the device number comparison table of each photosensitive module according to the module device information; matching each photosensitive module according to the device address configuration order and the device number comparison table to obtain the device number information of each photosensitive module.

[0068] In a specific implementation, determining the device address configuration order according to the device address configuration strategy means: the photosensitive device module hardware is connected to the I2C channel of the host, and there are generally multiple I2C channels. The device address configuration order is set as follows: first configure the photosensitive device address in the device to the device address of photosensitive module 1, write data through I2C, and read back the photosensitive module device ID through I2C after the write is successful. If the read-back is successful and the read photosensitive module device ID is the same as that of photosensitive module 1, it is considered that the photosensitive module 1 has been successfully matched and identified, and other photosensitive modules will not be matched further; if photosensitive module 1 is not successfully identified, photosensitive module 2 will continue to be identified. If photosensitive module 2 is successfully identified, other photosensitive modules will not be matched further, otherwise photosensitive module 3 will continue to be identified, and so on until the match is successful.

[0069] It should be noted that obtaining the module device information of each photosensitive module means obtaining the module device information of each photosensitive module including the device device address, function register address, register address length, data length, etc. The module device information can be obtained by querying the DATASHEET of the photosensitive device module. The device device address of the photosensitive module includes the read address and the write address.

[0070] It should be understood that determining the device number comparison table of each photosensitive module according to the module device information refers to: constructing and determining the comparison relationship table corresponding to the device and device ID number of each photosensitive module according to the module device information.

[0071] In a specific implementation, each photosensitive module is matched according to the device address configuration sequence and the device number comparison table to obtain the device number information of each photosensitive module, which means: each photosensitive module is matched according to the device address configuration sequence and the device comparison table to determine the device number information of each photosensitive module.

[0072] In this way, accurate matching and determination of the device number information of each light sensing module is achieved, so that the light sensing modules can be started and controlled normally to work normally later.

[0073] Step S20: configuring each light sensing module according to the device number information, so that each light sensing module is started and works, and detecting whether each light sensing module in the device has an abnormality.

[0074] It should be noted that after the device number information is determined, the device address corresponding to the device number information of each photosensitive module is correctly configured, so that each photosensitive module can be driven to work normally from the bus.

[0075] Furthermore, in order to detect whether there is an abnormality in the light sensing module, step S10 includes: obtaining bus information; configuring the data signal line to a universal input mode according to the bus information, transmitting a working signal through the data signal line in the universal input mode, and detecting the signal level of the working signal on the data signal line; determining whether there is an abnormality in the light sensing module according to the detected signal level of the data signal line.

[0076] It should be understood that for all the light sensing modules supported by the TV, the I2C bus is pulled dead, resulting in slow startup and other problems. The hardware measured the I2C waveform. The I2C bus has SDA and SCL signals. When the light sensing module supported by the TV is damaged, the SDA signal of the I2C bus will be pulled low, resulting in slow startup. I2C is a multi-master and multi-slave serial synchronous communication bus composed of two signal lines (clock signal line SCL + data signal line SDA). The specification requires that the SCL clock and SDA data lines of the devices connected to I2C must be bidirectional open-drain structures, and pulled to a logical high level through the pull-up resistor on the bus. Such a structure can realize the line and (&) function. Because of this feature, as long as any device on the bus pulls down SDA or SCL, other devices cannot pull them up, and all they see are low levels. If a device does not release the bus, the communication on the entire bus will be suspended, which is called I2C bus dead.

[0077] In a specific implementation, the bus information refers to the configuration information of each signal line on the bus to which the light sensing module is connected.

[0078] It should be noted that configuring the data signal line to a universal input mode according to the bus information, transmitting a working signal through the data signal line in the universal input mode, and detecting the signal level of the working signal on the data signal line means: first, configuring the SDA of the I2C for communication between the TV main chip (or other equipment or device as the execution subject) and the light sensing module to a GPIO port input mode, and then transmitting a working signal on the data signal line SDA, and then detecting the signal level on the data signal line in real time.

[0079] It should be understood that when the signal level of the data signal line is low, or the signal level is pulled down compared to the normal working state, it is determined that the light sensing module is abnormal, otherwise the light sensing module is working normally.

[0080] In this way, it is possible to intuitively determine whether an optical sensor module has an abnormality that causes a bus abnormality based on the signal level on the data signal line.

[0081] Step S30: When the detection result shows that the light sensing module is abnormal, the bus and each signal line of the light sensing module are configured to a specified transmission mode.

[0082] In the specific implementation, after the light sensing module is determined to be abnormal according to the detection results, the data transmission state and mode of the bus and each signal line of the light sensing module are adjusted and tested, and finally adjusted to the specified transmission mode. Among them, the signal line includes two lines: the data signal line SDA and the clock signal line SCL.

[0083] It should be noted that the specified transmission mode is to configure SDA and SCL to I2C mode, through which the light sensor module can be adaptively matched.

[0084] Step S40: completing a read operation on each light sensing module in the specified transmission mode to release a deadlock state of the bus corresponding to each light sensing module.

[0085] It should be understood that after the bus and each signal line are configured to a specified transmission mode, a read operation is performed on each photosensitive module under the specified transmission mode, that is, the bus performs a read operation on each photosensitive module, thereby restoring the communication status of the bus and recovering from a deadlock state to avoid bus lock caused by abnormalities in a single or individual photosensitive module, thereby affecting the normal startup of the device.

[0086] This embodiment detects that the device is started, matches each photosensitive module, obtains the device number information of each photosensitive module; configures each photosensitive module according to the device number information, so that each photosensitive module starts and works. Detect whether there is an abnormality in the photosensitive module in the device; when the detection result is that the photosensitive module is abnormal, configure the bus and each signal line of the photosensitive module to a specified transmission mode; in the specified transmission mode, the read operation of the device photosensitive module is completed, and it is restored to normal from the deadlock state, thereby avoiding abnormal damage to the photosensitive module and not pulling the bus to death. In this way, not only can multiple photosensitive modules of different models be installed on the display device and adaptively matched at startup, but also the applicability of the photosensitive module on the display device is improved. And when the photosensitive module is abnormal, the bus and each signal line can be automatically configured and normal startup can be completed, preventing the abnormality of a single photosensitive module from affecting the startup, and timely discovering and restoring the communication state of the bus from the deadlock state when there is an abnormality in the photosensitive module.

[0087] refer to Figure 3 , Figure 3 It is a flow chart of a second embodiment of a light sensing module control method of the present invention.

[0088] Based on the first embodiment, the light sensing module control method of this embodiment includes in step S20:

[0089] Step S301: When the detection result indicates that the light sensing module is abnormal, the clock signal line of the light sensing module is configured as a general output mode, and a target clock signal is transmitted through the clock signal line in the general output mode.

[0090] It should be noted that when it is determined that there is an abnormality in the light sensing module, the clock signal line of the I2C connected to the light sensing module is first configured as the GPIO (general purpose input / output) port output mode, and then the target clock signal is transmitted in the general output mode. Specifically, the target clock signal is a continuous CLK clock signal of the analog output.

[0091] Furthermore, in order to configure the bus and each signal line when the number of consecutive clocks is not within the cycle threshold range, after step S301, it also includes: when the number of consecutive clocks of the target clock signal is not within the cycle threshold range, detecting the level of the data signal line to obtain a second level detection result; and configuring the bus and each signal line of the photosensitive module to a specified transmission mode according to the second level detection result.

[0092] It should be understood that when the number of consecutive clocks of the target clock signal is greater than or equal to 9, that is, when it is not within the cycle threshold range, the level of the data signal line is detected.

[0093] In a specific implementation, when the second level detection result is a low level, SDA and SCL are directly configured as I2C mode to adaptively match the light sensing module.

[0094] In this way, when the number of consecutive clocks of the target clock signal is not within the cycle threshold range, the bus and each signal line can be configured to realize normal startup and execution of each photosensitive module.

[0095] Step S302: When the number of consecutive clocks of the target clock signal is within the cycle threshold range and the number of consecutive clocks changes and is at a low level, the level of the data signal line of the light sensing module is detected to obtain a first level detection result.

[0096] It should be understood that the cycle threshold range refers to a range within which the number of CLKs is greater than or equal to 1 and less than 9. When the number of consecutive clocks of the target clock signal is within the cycle threshold range and the number of consecutive clocks changes to a low level, it means that if less than 9 consecutive CLKs are output, the level of each CLK is continuously detected and changes to a low level, that is, the level on the data signal line at the moment after each CLK, and a first level detection result is obtained.

[0097] Step S303: configuring the bus and each signal line of the light sensing module to a specified transmission mode according to the first level detection result.

[0098] In a specific implementation, configuring the bus and each signal line of the photosensitive module to a specified transmission mode according to the first level detection result means: when the first level detection result is a high level, configuring the signal state of the data signal line and the clock signal line, and then configuring the bus and each signal line to the specified transmission mode.

[0099] Furthermore, in order to accurately configure the status of the bus and each signal line, step S303 includes: when the first level detection result is that the data signal line is at a high level, configuring the data signal line to a general output mode; in the general output mode, adjusting the signal status of the data signal line and the clock signal line according to the level adjustment strategy to configure the bus and each signal line of the photosensitive module to a specified transmission mode.

[0100] It should be noted that if Figure 4 The figure shows a complete flow chart of this embodiment, in which, when the first level detection result is that the data signal line is at a high level, the data signal line is configured to the GPIO port output mode, and then the SDA is set to a low level, the SCL is set to a high level, and then the SDA is set to a high level. Finally, the SDA and SCL of the main chip are configured to the I2C mode to adaptively match the corresponding light sensing module, thereby realizing the configuration of the bus and each signal line to the specified transmission mode.

[0101] In this way, when the first evaluation result shows that the data signal line is at a high level, the level adjustment strategy is used to adjust the data signal lines and clock signal lines in sequence, thereby releasing the locked state of the bus and allowing the device to operate normally.

[0102] In this embodiment, when the detection result is that the photosensitive module is abnormal, the clock signal line of the photosensitive module is configured to a general output mode, and the target clock signal is transmitted through the clock signal line in the general output mode; when the number of continuous clocks of the target clock signal is within the cycle threshold range and the number of continuous clocks changes to a low level, the level of the data signal line of the photosensitive module is detected to obtain a first level detection result; according to the first level detection result, the bus and each signal line of the photosensitive module are configured to a specified transmission mode. In this way, when an abnormality occurs in the photosensitive module, the configuration of the data signal line and the clock signal line can be adjusted and tested, so that the I2C slave device photosensitive module completes the read operation and recovers from the deadlock state. In this way, even if the photosensitive module is damaged, the I2C bus will not be pulled to death, thereby avoiding the problem of slow startup caused by damage to the photosensitive module, and improving the user experience. This method is not only fast, but also deterministic.

[0103] In addition, an embodiment of the present invention further provides a storage medium, on which a light sensing module control program is stored. When the light sensing module control program is executed by a processor, the steps of the light sensing module control method described above are implemented.

[0104] Since the storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.

[0105] Reference Figure 5 , Figure 5 It is a structural block diagram of the first embodiment of the light sensing module control device of the present invention.

[0106] like Figure 5 As shown, the light sensing module control device proposed in the embodiment of the present invention includes:

[0107] The information matching module 10 is used to match each light sensing module when detecting that the device is started, and obtain the device number information of each light sensing module.

[0108] The configuration startup module 20 is used to configure each light sensing module according to the device number information so that each light sensing module is started and works, and detect whether each light sensing module in the device has an abnormality.

[0109] The abnormality processing module 30 is used to configure the bus and each signal line of the light sensing module to a specified transmission mode when the detection result shows that the light sensing module is abnormal.

[0110] The bus recovery module 40 is used to complete the read operation on each photosensitive module in the specified transmission mode to release the deadlock state of the bus corresponding to each photosensitive module.

[0111] This embodiment detects that the device is started, matches each photosensitive module, obtains the device number information of each photosensitive module; configures each photosensitive module according to the device number information, so that each photosensitive module starts and works. Detect whether there is an abnormality in the photosensitive module in the device; when the detection result is that the photosensitive module is abnormal, configure the bus and each signal line of the photosensitive module to a specified transmission mode; in the specified transmission mode, the read operation of the device photosensitive module is completed, and it is restored to normal from the deadlock state, thereby avoiding abnormal damage to the photosensitive module and not pulling the bus to death. In this way, not only can multiple photosensitive modules of different models be installed on the display device and adaptively matched at startup, but also the applicability of the photosensitive module on the display device is improved. And when the photosensitive module is abnormal, the bus and each signal line can be automatically configured and normal startup can be completed, preventing the abnormality of a single photosensitive module from affecting the startup, and timely discovering and restoring the communication state of the bus from the deadlock state when there is an abnormality in the photosensitive module.

[0112] In one embodiment, the information matching module 10 is further used to obtain supported photosensitive device information when detecting that the device is started; generate a device address configuration strategy based on the supported photosensitive device information; match each photosensitive module according to the device address configuration strategy to obtain device number information of each photosensitive module.

[0113] In one embodiment, the information matching module 10 is also used to determine the device address configuration order according to the device address configuration strategy; obtain module device information of each photosensitive module; determine the device number comparison table of each photosensitive module according to the module device information; match each photosensitive module according to the device address configuration order and the device number comparison table to obtain the device number information of each photosensitive module.

[0114] In one embodiment, the configuration startup module 20 is also used to obtain bus information; configure the data signal line to a universal input mode according to the bus information, transmit a working signal through the data signal line in the universal input mode, and detect the signal level of the working signal on the data signal line; determine whether there is an abnormality in the light sensing module based on the detected signal level of the data signal line.

[0115] In one embodiment, the exception handling module 30 is also used to configure the clock signal line of the photosensitive module to a general output mode when the detection result is that the photosensitive module is abnormal, and transmit the target clock signal through the clock signal line in the general output mode; when the number of consecutive clocks of the target clock signal is within a cycle threshold range and the number of consecutive clocks changes to a low level, detect the level of the data signal line of the photosensitive module to obtain a first level detection result; and configure the bus and each signal line of the photosensitive module to a specified transmission mode according to the first level detection result.

[0116] In one embodiment, the exception handling module 30 is also used to detect the level of the data signal line to obtain a second level detection result when the number of consecutive clocks of the target clock signal is not within the cycle threshold range; and configure the bus and each signal line of the photosensitive module to a specified transmission mode according to the second level detection result.

[0117] In one embodiment, the exception handling module 30 is also used to configure the data signal line to a general output mode when the first level detection result is that the data signal line is at a high level; in the general output mode, the signal states of the data signal line and the clock signal line are adjusted according to the level adjustment strategy to configure the bus and each signal line of the photosensitive module to a specified transmission mode.

[0118] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.

[0119] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.

[0120] In addition, for technical details that are not described in detail in this embodiment, reference can be made to the light sensing module control method provided in any embodiment of the present invention, and will not be repeated here.

[0121] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0122] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0123] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0124] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A light sensing module control method, characterized in that: The light sensing module startup method comprises: When the device is detected to be started, each light sensing module is matched to obtain the device number information of each light sensing module; Configuring each light sensing module according to the device number information so that each light sensing module starts and works, and detecting whether each light sensing module in the device has an abnormality; When the detection result shows that the light sensing module is abnormal, the clock signal line of the light sensing module is configured as a general output mode, and the target clock signal is transmitted through the clock signal line in the general output mode; When the number of consecutive clocks of the target clock signal is within the cycle threshold range and the number of consecutive clocks changes and is at a low level, detecting the level of the data signal line of the light sensing module to obtain a first level detection result; When the first level detection result is that the data signal line is at a high level, the data signal line is configured as a general output mode, and the general output mode is to configure SDA as a GPIO port input mode; In the general output mode, the signal states of the data signal line and the clock signal line are adjusted according to the level adjustment strategy to configure the bus and each signal line of the light sensing module to a specified transmission mode, wherein the specified transmission mode is to configure SDA and SCL to I2C mode; The read operation is completed for each photosensitive module in the specified transmission mode to release the deadlock state of the bus corresponding to each photosensitive module.

2. The method according to claim 1, characterized in that When the device is detected to be started, each light sensing module is matched to obtain the device number information of each light sensing module, including: When the device is detected to be started, the information of supported light sensing devices is obtained; Generate a device address configuration strategy according to the supported photosensitive device information; Each photosensitive module is matched according to the device address configuration strategy to obtain device number information of each photosensitive module.

3. The method according to claim 2, characterized in that The step of matching each photosensitive module according to the device address configuration strategy to obtain device number information of each photosensitive module includes: Determining a device address configuration order according to the device address configuration strategy; Obtain module device information of each photosensitive module; Determine a device number comparison table for each light sensing module according to the module device information; Each photosensitive module is matched according to the device address configuration sequence and the device number comparison table to obtain device number information of each photosensitive module.

4. The method according to claim 1, characterized in that The detecting whether there is an abnormality in the light sensing module in the device includes: Get bus information; configuring the data signal line to a universal input mode according to the bus information, transmitting a working signal through the data signal line in the universal input mode, and detecting a signal level of the working signal on the data signal line; Whether there is an abnormality in the light sensing module is determined according to the detected signal level of the data signal line.

5. The method according to claim 1, characterized in that When the detection result indicates that the light sensing module is abnormal, the clock signal line of the light sensing module is configured as a general input mode, and a target clock signal is output, the method further includes: When the number of consecutive clocks of the target clock signal is not within the cycle threshold range, detecting the level of the data signal line to obtain a second level detection result; The bus and each signal line of the light sensing module are configured to a specified transmission mode according to the second level detection result.

6. A light sensing module control device, characterized in that: The light sensing module control device comprises: The information matching module is used to match each light sensing module when the device is started and obtain the device number information of each light sensing module; A configuration startup module is used to configure each light sensing module according to the device number information so that each light sensing module is started and works, and detects whether each light sensing module in the device has an abnormality; an exception handling module, for, when the detection result is that the light sensing module is abnormal, configuring the clock signal line of the light sensing module to a general output mode, and transmitting the target clock signal through the clock signal line in the general output mode; when the number of consecutive clocks of the target clock signal is within the cycle threshold range and the number of consecutive clocks changes to a low level, detecting the level of the data signal line of the light sensing module to obtain a first level detection result; when the first level detection result is that the data signal line is at a high level, configuring the data signal line to a general output mode, and the general output mode is to configure SDA to a GPIO port input mode; in the general output mode, adjusting the signal states of the data signal line and the clock signal line according to the level adjustment strategy, so as to configure the bus and each signal line of the light sensing module to a specified transmission mode, and the specified transmission mode is to configure SDA and SCL to an I2C mode; The bus recovery module is used to complete the read operation on each light sensing module in the specified transmission mode to release the deadlock state of the bus corresponding to each light sensing module.

7. A display device, characterized in that: The display device comprises: a memory, a processor, and a light sensing module control program stored in the memory and executable on the processor, wherein the light sensing module control program is configured to implement the light sensing module control method according to any one of claims 1 to 5.

8. A storage medium, characterized in that: The storage medium stores a light sensing module control program, and when the light sensing module control program is executed by the processor, the light sensing module control method according to any one of claims 1 to 5 is implemented.