CN104714810A - Drive method and device for optical distance sensor in mobile terminal and drive generating method for optical distance sensor in mobile terminal - Google Patents

Drive method and device for optical distance sensor in mobile terminal and drive generating method for optical distance sensor in mobile terminal Download PDF

Info

Publication number
CN104714810A
CN104714810A CN201310681003.1A CN201310681003A CN104714810A CN 104714810 A CN104714810 A CN 104714810A CN 201310681003 A CN201310681003 A CN 201310681003A CN 104714810 A CN104714810 A CN 104714810A
Authority
CN
China
Prior art keywords
sensor
light
mobile terminal
apart
configuration file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201310681003.1A
Other languages
Chinese (zh)
Inventor
冯嘉鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai 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 Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN201310681003.1A priority Critical patent/CN104714810A/en
Publication of CN104714810A publication Critical patent/CN104714810A/en
Pending legal-status Critical Current

Links

Landscapes

  • Optical Radar Systems And Details Thereof (AREA)

Abstract

The invention discloses a drive method and device for an optical distance sensor in a mobile terminal and a drive generating method for the optical distance sensor in the mobile terminal. The drive method for the optical distance sensor in the mobile terminal comprises the steps that identification information of the optical distance sensor in the mobile terminal is obtained; configuration data corresponding to the identification information are selected in a preset configuration file, the preset configuration file stores identification information of a plurality of optical distance sensors and configuration data of the optical distance sensors, and the identification information of the optical distance sensors corresponds to the configuration data of the optical distance sensors in a one-to-one mode; the optical distance sensor in the mobile terminal is driven through the selected configuration data. By means of the method and the devices, the developing efficiency of research personnel can be improved.

Description

In mobile terminal, light is apart from driving method, the driving generation method and apparatus of sensor
Technical field
The present invention relates to Driving technique field, particularly in a kind of mobile terminal light apart from sensor driving method, drive generate method and apparatus.
Background technology
Optical flame detector and range sensor can be collectively referred to as light apart from sensor, wherein: optical flame detector can according to the brightness of external environment, the brightness of adjustment mobile terminal screen automatically; Range sensor is found range by infrared ray or other modes, extinguishes screen background lamp, light background light again when mobile terminal is removed after the distance of mobile terminal and people face reaches certain value.Use optical flame detector and range sensor can the operation of convenient user.
Light is usually on one module integrated apart from sensor, utilizes drive unit to carry out work to drive light apart from sensor.In prior art, there is a corresponding drive unit apart from sensor in the light of a model, the drive unit that the light of different model is corresponding apart from sensor may not be identical, needs the sensor for each model to prepare a corresponding drive unit.When changing light apart from sensor, needing again to debug apart from sensor drive device light, when adjusting light apart from sensor parameters, needing to revise code, recompilating and download, cause research staff's development efficiency lower.
Summary of the invention
The problem that the embodiment of the present invention solves how to improve the development efficiency of research staff.
For solving the problem, the embodiment of the present invention provides light in a kind of mobile terminal apart from the driving method of sensor, to comprise: the identification information obtaining light distance sensor in described mobile terminal; In the configuration file preset, choose the configuration data corresponding with described identification information, the identification information of multiple light apart from sensor and the configuration data of often kind of light distance sensor is preserved, the identification information of described light apart from sensor and the configuration data one_to_one corresponding of described light distance sensor in described default configuration file; The configuration data chosen described in utilization drives light distance sensor in described mobile terminal.
Optionally, described light comprises apart from the identification information of sensor: described light is apart from the hardware identifier information of sensor.
For solving the problem, the embodiment of the present invention provides light in a kind of mobile terminal apart from the driving generation method of sensor, to comprise: obtain the identical configurable data of multiple light apart from sensor, and extract in the first configuration file by described identical configurable data; Described first configuration file is resolved, generate the second configuration file, configuration data in described first configuration file and described second configuration file comprises: multiple light apart from the identification information of sensor and often kind of light apart from the configuration data of sensor, the identification information of described light apart from sensor and the configuration data one_to_one corresponding of described light distance sensor; Described second configuration file is transferred in mobile terminal read-only memory ROM, makes the configuration data chosen described in the utilization of described mobile terminal drive light distance sensor in described mobile terminal.
Optionally, described first configuration file is .config formatted file, and described second configuration file is .bin formatted file.
Optionally, when described mobile terminal is opened, described second configuration file stored in described read-only memory ROM is write in the random access memory ram of described mobile terminal, from described default random access memory ram, choose the configuration data corresponding apart from sensor with light in described mobile terminal, the configuration data chosen described in described mobile terminal utilizes drives light distance sensor in described mobile terminal.
For solving the problem, the embodiment of the present invention also provides light in a kind of mobile terminal apart from the drive unit of sensor, to comprise: the first acquiring unit, for obtaining the identification information of light distance sensor in described mobile terminal; Choose unit, for in the configuration file preset, choose the configuration data corresponding with described identification information, the identification information of multiple light apart from sensor and the configuration data of often kind of light distance sensor is preserved, the identification information of described light apart from sensor and the configuration data one_to_one corresponding of described light distance sensor in described default configuration file; Driver element, the configuration data for choosing unit selection described in utilizing to drive in described mobile terminal light apart from sensor.
Optionally, described light comprises apart from the identification information of sensor: described light is apart from the hardware identifier information of sensor.
For solving the problem, the embodiment of the present invention also provides a kind of driving generating apparatus of light apart from sensor of mobile terminal, comprising: second acquisition unit, for obtaining the identical configurable data of multiple light apart from sensor, and described identical configurable data being extracted in the first configuration file; Resolution unit, for resolving described first configuration file, generate the second configuration file, configuration data in described first configuration file and described second configuration file comprises: multiple light apart from the identification information of sensor and often kind of light apart from the configuration data of sensor, the identification information of described light apart from sensor and the configuration data one_to_one corresponding of described light distance sensor; Transmission unit, transfers in mobile terminal read-only memory ROM for described second configuration file described resolution unit generated, and makes the configuration data chosen described in the utilization of described mobile terminal drive light distance sensor in described mobile terminal.
Optionally, described first configuration file is .config formatted file, and described second configuration file is .bin formatted file.
Compared with prior art, the technical scheme of the embodiment of the present invention has the following advantages:
By reading the identification information of light apart from sensor, the configuration data corresponding with described identification information is chosen to drive described light apart from sensor in the configuration file preset, due to the configuration data of multiple driving can be configured in default configuration file, and configuration data can be modified as required, the development efficiency of research staff therefore effectively can be improved.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the driving method of light distance sensor in a kind of mobile terminal in the embodiment of the present invention;
Fig. 2 is the process flow diagram of the driving generation method of light distance sensor in a kind of mobile terminal in the embodiment of the present invention;
Fig. 3 is the process flow diagram of the driving method of light distance sensor in the another kind of mobile terminal in the embodiment of the present invention;
Fig. 4 is the structural representation of the drive unit of light distance sensor in a kind of mobile terminal in the embodiment of the present invention;
Fig. 5 is the structural representation of the driving generating apparatus of light distance sensor in a kind of mobile terminal in the embodiment of the present invention.
Embodiment
In prior art, the drive unit that the light of different model is corresponding apart from sensor may be different, when changing light apart from sensor, need again to debug the drive unit of light apart from sensor, when adjusting light apart from sensor parameters, need the code of amendment drive unit and recompilate download, causing research staff's development efficiency lower.
In embodiments of the present invention, by reading the identification information of light apart from sensor, the configuration data corresponding with described identification information is chosen to drive described light apart from sensor in the configuration file preset, due to the configuration data of multiple driving can be configured in default configuration file, and configuration data can be modified as required, the development efficiency of research staff therefore effectively can be improved.
For enabling above-mentioned purpose, the feature and advantage of the embodiment of the present invention more become apparent, below in conjunction with accompanying drawing, specific embodiments of the invention are described in detail.
Embodiments provide light in a kind of mobile terminal, apart from the driving method of sensor, with reference to Fig. 1, to be described in detail below by way of concrete steps.
Step S101, obtains the identification information of light distance sensor in described mobile terminal.
In concrete enforcement, in mobile terminal, light can comprise the hardware identifier information of light apart from sensor apart from the identification information of sensor.
Step S102, in the configuration file preset, choose the configuration data corresponding with described identification information, the identification information of multiple light apart from sensor and the configuration data of often kind of light distance sensor is preserved, the identification information of described light apart from sensor and the configuration data one_to_one corresponding of described light distance sensor in described default configuration file.
Step S103, the configuration data chosen described in utilization drives light distance sensor in described mobile terminal.
Adopt the method in the embodiment of the present invention, by reading the identification information of light apart from sensor, the configuration data corresponding with described identification information is chosen to drive described light apart from sensor in the configuration file preset, due to the configuration data of multiple driving can be configured in default configuration file, and configuration data can be modified as required, the development efficiency of research staff therefore effectively can be improved.
The embodiment of the present invention additionally provides light in a kind of mobile terminal and, apart from the driving generation method of sensor, with reference to Fig. 2, is described in detail below by way of concrete steps.
Step S201, obtains the identical configurable data of multiple light apart from sensor, is extracted in the first configuration file by described identical configurable data.
In concrete enforcement, the light of existing different model can be extracted apart from identical configurable data in sensor in the configurable file of PC end, identical configurable data can comprise: the operation threshold scope of optical flame detector, the operation threshold scope of range sensor, light, apart from the Interrupt Processing Model etc. of sensor, also can comprise other identical configurable datas.
Step S202, resolves described first configuration file, generates the second configuration file.
In concrete enforcement, configuration data in described first configuration file and described second configuration file comprises: multiple light is apart from the identification information of sensor and often kind of light apart from configuration data, the identification information of described light apart from sensor and the configuration data one_to_one corresponding of described light distance sensor of sensor.
In concrete enforcement, described first configuration file can be .config formatted file, and described second configuration file can be .bin formatted file.
Step S203, transfers to described second configuration file in mobile terminal read-only memory ROM.
In concrete enforcement, described second configuration file can be transferred in the ROM of mobile terminal.When described mobile terminal is opened, described second configuration file in mobile terminal ROM is write in the RAM of described mobile terminal, utilize the rule preset from described default random access memory ram, choose the configuration data corresponding apart from sensor with light in described mobile terminal, the configuration data chosen described in described mobile terminal utilizes drives light distance sensor in described mobile terminal.
Illustrate with a concrete application scenarios below, with reference to Fig. 3, concrete steps are as follows:
Step S301, obtains the identical configurable data of multiple light apart from sensor, is extracted by described identical configurable data in the first configuration file of PC end.
Step S302, resolves the first configuration file, generates the second configuration file.
Step S303, transfers to the second configuration file in mobile terminal read-only memory ROM.
Step S304, when detecting that mobile terminal is opened, by the second configuration file write RAM in ROM.
In embodiments of the present invention, when mobile terminal is opened, the second configuration file stored can be write in the ram region preset in ROM.
Step S305, obtains the hardware identifier information of light distance sensor in mobile terminal.
Step S306, in the ram region preset, chooses the configuration data corresponding with described hardware identifier information.
Step S307, utilizes the configuration data chosen to drive light distance sensor in mobile terminal.
By adopting scheme of the invention process, the identical configuration data of multiple light in sensor is extracted in the configurable file of PC end, when research staff changes light apart from sensor, do not need again to download the driving of corresponding light apart from sensor, only needing modifies to the configurable file of PC end can drive light apart from working sensor, effectively can improve the work efficiency of research staff, shorten the construction cycle.
Embodiments provide the drive unit 40 apart from sensor of light in a kind of mobile terminal, comprising: the first acquiring unit 401, choose unit 402 and driver element 403, wherein:
First acquiring unit 401, for obtaining the identification information of light distance sensor in described mobile terminal;
Choose unit 402, for in the configuration file preset, choose the configuration data corresponding with described identification information, the identification information of multiple light apart from sensor and the configuration data of often kind of light distance sensor is preserved, the identification information of described light apart from sensor and the configuration data one_to_one corresponding of described light distance sensor in described default configuration file;
Driver element 403, the configuration data chosen for choosing unit 402 described in utilizing to drive in described mobile terminal light apart from sensor.
In concrete enforcement, described light comprises apart from the identification information of sensor: described light is apart from the hardware identifier information of sensor.
The embodiment of the present invention additionally provides light in a kind of mobile terminal and, apart from the driving generating apparatus 50 of sensor, comprising: second acquisition unit 501, resolution unit 502 and transmission unit 503, wherein:
Second acquisition unit 501, user obtains the identical configurable data of multiple light apart from sensor, and extracts in the first configuration file by described identical configurable data;
Resolution unit 502, for resolving described first configuration file, generate the second configuration file, configuration data in described first configuration file and described second configuration file comprises: multiple light apart from the identification information of sensor and often kind of light apart from the configuration data of sensor, the identification information of described light apart from sensor and the configuration data one_to_one corresponding of described light distance sensor;
In concrete enforcement, described first configuration file is .config formatted file, and described second configuration file is .bin formatted file.
Transmission unit 503, transfers to mobile terminal for described second configuration file described resolution unit 502 generated, and makes the configuration data chosen described in the utilization of described mobile terminal drive light distance sensor in described mobile terminal.
In concrete enforcement, described second configuration file, for when described mobile terminal is opened, writes in the random access memory ram of described mobile terminal by described transmission unit 503.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is that the hardware that can carry out instruction relevant by program has come, this program can be stored in a computer-readable recording medium, and storage medium can comprise: ROM, RAM, disk or CD etc.
Although the present invention discloses as above, the present invention is not defined in this.Any those skilled in the art, without departing from the spirit and scope of the present invention, all can make various changes or modifications, and therefore protection scope of the present invention should be as the criterion with claim limited range.

Claims (9)

1. in mobile terminal, light, apart from a driving method for sensor, is characterized in that, comprising:
Obtain the identification information of light distance sensor in described mobile terminal;
In the configuration file preset, choose the configuration data corresponding with described identification information, the identification information of multiple light apart from sensor and the configuration data of often kind of light distance sensor is preserved, the identification information of described light apart from sensor and the configuration data one_to_one corresponding of described light distance sensor in described default configuration file;
The configuration data chosen described in utilization drives light distance sensor in described mobile terminal.
2. in mobile terminal as claimed in claim 1, light is apart from the driving method of sensor, and it is characterized in that, described light comprises apart from the identification information of sensor: described light is apart from the hardware identifier information of sensor.
3. in a mobile terminal, light, apart from the driving generation method of sensor, is characterized in that, comprising:
Obtain the identical configurable data of multiple light apart from sensor, and described identical configurable data is extracted in the first configuration file;
Described first configuration file is resolved, generate the second configuration file, configuration data in described first configuration file and described second configuration file comprises: multiple light apart from the identification information of sensor and often kind of light apart from the configuration data of sensor, the identification information of described light apart from sensor and the configuration data one_to_one corresponding of described light distance sensor;
Described second configuration file is transferred in mobile terminal read-only memory ROM, makes the configuration data chosen described in the utilization of described mobile terminal drive light distance sensor in described mobile terminal.
4. in mobile terminal as claimed in claim 3, light is apart from the driving generation method of sensor, and it is characterized in that, described first configuration file is .config formatted file, and described second configuration file is .bin formatted file.
5. in mobile terminal as claimed in claim 3 light apart from the driving generation method of sensor, it is characterized in that, when described mobile terminal is opened, described second configuration file stored in described read-only memory ROM is write in the random access memory ram of described mobile terminal, from described default random access memory ram, choose the configuration data corresponding apart from sensor with light in described mobile terminal, the configuration data chosen described in described mobile terminal utilizes drives light distance sensor in described mobile terminal.
6. in mobile terminal, light, apart from a drive unit for sensor, is characterized in that, comprising:
First acquiring unit, for obtaining the identification information of light distance sensor in described mobile terminal;
Choose unit, for in the configuration file preset, choose the configuration data corresponding with described identification information, the identification information of multiple light apart from sensor and the configuration data of often kind of light distance sensor is preserved, the identification information of described light apart from sensor and the configuration data one_to_one corresponding of described light distance sensor in described default configuration file;
Driver element, the configuration data for choosing unit selection described in utilizing to drive in described mobile terminal light apart from sensor.
7. in mobile terminal as claimed in claim 6, light is apart from the drive unit of sensor, and it is characterized in that, described light comprises apart from the identification information of sensor: described light is apart from the hardware identifier information of sensor.
8. in mobile terminal, light, apart from a driving generating apparatus for sensor, is characterized in that, comprising:
Second acquisition unit, for obtaining the identical configurable data of multiple light apart from sensor, and extracts in the first configuration file by described identical configurable data;
Resolution unit, for resolving described first configuration file, generate the second configuration file, configuration data in described first configuration file and described second configuration file comprises: multiple light apart from the identification information of sensor and often kind of light apart from the configuration data of sensor, the identification information of described light apart from sensor and the configuration data one_to_one corresponding of described light distance sensor;
Transmission unit, transfers in mobile terminal read-only memory ROM for described second configuration file described resolution unit generated, and makes the configuration data chosen described in the utilization of described mobile terminal drive light distance sensor in described mobile terminal.
9. in mobile terminal as claimed in claim 8, light is apart from the driving generating apparatus of sensor, and it is characterized in that, described first configuration file is .config formatted file, and described second configuration file is .bin formatted file.
CN201310681003.1A 2013-12-12 2013-12-12 Drive method and device for optical distance sensor in mobile terminal and drive generating method for optical distance sensor in mobile terminal Pending CN104714810A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310681003.1A CN104714810A (en) 2013-12-12 2013-12-12 Drive method and device for optical distance sensor in mobile terminal and drive generating method for optical distance sensor in mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310681003.1A CN104714810A (en) 2013-12-12 2013-12-12 Drive method and device for optical distance sensor in mobile terminal and drive generating method for optical distance sensor in mobile terminal

Publications (1)

Publication Number Publication Date
CN104714810A true CN104714810A (en) 2015-06-17

Family

ID=53414186

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310681003.1A Pending CN104714810A (en) 2013-12-12 2013-12-12 Drive method and device for optical distance sensor in mobile terminal and drive generating method for optical distance sensor in mobile terminal

Country Status (1)

Country Link
CN (1) CN104714810A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260195A (en) * 2015-11-23 2016-01-20 小米科技有限责任公司 Terminal software configuration method and device
CN105279003A (en) * 2015-11-23 2016-01-27 小米科技有限责任公司 Terminal software configuration method and apparatus
CN112506571A (en) * 2020-10-29 2021-03-16 浙江吉利控股集团有限公司 Drive adaptation method and device for road end sensor in vehicle-road cooperation, storage medium and equipment
CN113259888A (en) * 2021-04-25 2021-08-13 黑芝麻智能科技(上海)有限公司 Sensor configuration method and device, computer equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102148940A (en) * 2010-02-05 2011-08-10 凹凸电子(武汉)有限公司 Method and equipment for controlling image sensor, and image pick-up system
CN102355682A (en) * 2011-06-29 2012-02-15 中国联合网络通信集团有限公司 Sensor adapting method, sensor adapting device and IOT (Internet Of Things) system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102148940A (en) * 2010-02-05 2011-08-10 凹凸电子(武汉)有限公司 Method and equipment for controlling image sensor, and image pick-up system
CN102355682A (en) * 2011-06-29 2012-02-15 中国联合网络通信集团有限公司 Sensor adapting method, sensor adapting device and IOT (Internet Of Things) system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260195A (en) * 2015-11-23 2016-01-20 小米科技有限责任公司 Terminal software configuration method and device
CN105279003A (en) * 2015-11-23 2016-01-27 小米科技有限责任公司 Terminal software configuration method and apparatus
CN105260195B (en) * 2015-11-23 2019-09-17 小米科技有限责任公司 A kind of method and device of terminal software configuration
CN112506571A (en) * 2020-10-29 2021-03-16 浙江吉利控股集团有限公司 Drive adaptation method and device for road end sensor in vehicle-road cooperation, storage medium and equipment
CN113259888A (en) * 2021-04-25 2021-08-13 黑芝麻智能科技(上海)有限公司 Sensor configuration method and device, computer equipment and storage medium
US11789882B2 (en) 2021-04-25 2023-10-17 Black Sesame Technologies Inc. Sensor configuration method, apparatus, computer equipment and storage medium
CN113259888B (en) * 2021-04-25 2024-04-30 黑芝麻智能科技(上海)有限公司 Sensor configuration method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US10732611B2 (en) System and method for generating machining control data of numerical control machine tool
AU2016219677A1 (en) Methods and apparatus to monitor media presentations
CN104317622A (en) Embedded device program burn processing method and system
CN109101269A (en) A kind of Software Delivery method and device, electronic equipment
US9600298B2 (en) Active and efficient monitoring of a graphical user interface
CN104869304A (en) Method of displaying focus and electronic device applying the same
CN104714810A (en) Drive method and device for optical distance sensor in mobile terminal and drive generating method for optical distance sensor in mobile terminal
US11403202B2 (en) Power monitoring system for virtual platform simulation
Blunck et al. On heterogeneity in mobile sensing applications aiming at representative data collection
ES2552881A1 (en) Portable device and gesture control method (Machine-translation by Google Translate, not legally binding)
CN102722391A (en) Automatic integrated system configuration and software installation method
CN109871312A (en) A kind of interface test method, device, equipment and readable storage medium storing program for executing
CN105790999A (en) Equipment configuration method and device
CN106648792A (en) Method and device for installing virtualized operating system on server
CN106293849A (en) A kind of application update method and terminal
KR102128472B1 (en) Storage device for performing in-storage computing operations, method thereof, and system including same
CN105550114A (en) Automated testing method and apparatus and mobile terminal
KR20150124530A (en) Application build system, control method thereof, and recording medium for recording program for executing the control method
WO2016000547A1 (en) Method, apparatus and mobile terminal for triggering widget in application
CN105224347A (en) data configuration method and device
WO2018040271A1 (en) Thread processor and thread processing method
KR102188685B1 (en) Apparatas and method for generating application packages
US20120117117A1 (en) Aiding report construction based on inference of implicit application level relationships
US9547775B2 (en) Device and method for data privacy management
US8495033B2 (en) Data processing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150617

RJ01 Rejection of invention patent application after publication