[background technology]
Present portable terminal on the market has specific hardware configuration, has specific resolution such as LCD, needs special drive software.Other hardware configuration of portable terminal all have needs corresponding software to mate, if changed hardware, then needs to reselect or work out corresponding software.
In the prior art, model and a batch different variation often occur for different clients in the hardware of portable terminal, the LCD of portable terminal particularly, because LCD manufacturer is numerous, also there is different models in each manufacturer, for different LCD models, portable terminal will design different software and adapt to it.
Analyze prior art, find to exist following weak point:
After portable terminal was replaced with the LCD of the larger resolution of same model, the resolution of demonstration can not adjusted thereupon.
After portable terminal is changed the LCD of different vendor, because the difference of driver causes LCD to work.
Portable terminal might cause LCD to show after changing the LCD of different color pattern.
Given this, be necessary to propose in fact a kind of new solution.
[summary of the invention]
The technical problem to be solved in the present invention is to provide a kind of LCD self-reacting device and method, then need not to change corresponding software when LCD changes.
The present invention solves above-mentioned technical matters by such technical scheme:
A kind of LCD self-reacting device comprises an initialization module and the LCD that is attached thereto, and described LCD self-reacting device comprises a storer, has preserved all initiation parameters adaptive with LCD in the storer.
As further improvement, the LCD self-reacting device further comprises an adaptation module, and it is connected with LCD, initialization module and storer respectively, and it can obtain the configuration information of LCD, in storer, obtain corresponding initiation parameter according to this configuration information, and send to initialization module.
As further improvement, described configuration parameter comprises manufacturer's model, resolution and the color mode of this LCD.
As further improvement, described initiation parameter is driver, resolution parameters and the color mode parameters corresponding with configuration information.
As further improvement, after adaptation module 12 finds the adaptive driver of this LCD, can record a driver zone bit and issue initialization module.
The present invention also provides a kind of LCD adaptive approach, and the method comprises the steps:
Step 1 is obtained the configuration information of LCD;
Step 2 is obtained initiation parameter corresponding to LCD configuration information;
Step 3 is finished the LCD self-adaptation.
As further improvement, need judge also before step 1 whether the LCD initialization is failed, and if so, then execution in step 1.
As further improvement, described configuration parameter comprises manufacturer's model, resolution and the color mode of this LCD.
As further improvement, described initiation parameter is driver, resolution parameters and the color mode parameters corresponding with configuration information.
As further improvement, the method further comprises the steps:
At first obtain manufacturer's model of LCD, call driver corresponding to manufacturer's model therewith and record the zone bit of this driver;
Obtain the resolution of LCD, call and resolution parameters corresponding to log resolution;
Obtain the color mode of LCD, call and record color parameters corresponding to color mode.
The software that does not need again to change portable terminal when compared with prior art, the driver of the present invention by adaptive main flow LCD manufacturer in the storer and the parameter of foreseeable LCD model are accomplished the different main flow LCD of follow-up renewal can realize that LCD adapts to automatically.
[embodiment]
Describe the specific embodiment of the present invention in detail below in conjunction with accompanying drawing.
Fig. 1 is the structural representation of LCD self-reacting device provided by the invention.For convenience of explanation, only show part related to the present invention.
Described device comprises an initialization module 10 and the LCD11, adaptation module 12 and the storer 16 that connect successively.Initialization module 10 is connected with LCD 11, adaptation module 12 and storer 16 respectively.
Adaptation module 12 is used for reading the configuration parameter of LCD 11, and searches the initiation parameter corresponding with configuration parameter in storer 16, and sends to initialization module 10.Described configuration parameter comprises manufacturer's model, resolution and the color mode of this LCD 11.
Storer 16 is interior has preserved all initiation parameters adaptive with portable terminal, and these initiation parameters comprise driver, resolution parameters and color mode parameters.
When portable terminal started, initialization module 10 was transferred the LCD initiation parameter from storer 16 LCD 11 is carried out initialization.If initialization failure, illustrate that then LCD 11 changes, then initialization module 10 starts adaptation module 12, and adaptation module 12 reads the concrete configuration parameter among the LCD 11, and searches the initiation parameter of LCD 11 correspondences in storer 16 according to these configuration parameters.
Described initiation parameter comprises driver, resolution parameters and color parameters.
In preferred embodiment of the present invention, after adaptation module 12 finds the adaptive driver of this LCD, can record a driver zone bit and issue initialization module 10, find resolution parameters and color parameters and also can issue initialization module 10 records.When initialization module 10 starts again, at first in storer 16, transfer corresponding driver according to the driver zone bit, then according to resolution parameters and color parameters initialization LCD 11.
In preferred embodiment of the present invention, adaptation module 12 further comprises parameter read module 121, driver adaptation module 123, resolution adaptation module 124 and the color adaptation module 125 that is connected with initialization module 10 respectively.Parameter read module 121 read LCD 11 manufacturer's model, resolution and color mode and respectively correspondence issue driver adaptation module 123, resolution adaptation module 124 and color adaptation module 125.
Driver adaptation module 123 detects whether there is this LCD manufacturer model in storer 16, if there is this manufacturer's model, then driver adaptation module 123 calls driver corresponding to LCD manufacturer model therewith and with the zone bit of this driver and issue initialization module 10 records from storer 16.In the time of portable terminal start next time, initialization module 10 can be according to the direct call driver of driver zone bit.
Resolution adaptation module 124 calls resolution parameters corresponding to resolution and issues initialization module 10 records from storer 16.
Color adaptation module 125 calls the color parameters of LCD 11 correspondences and issues initialization module 10 records from storer 16.
See also Fig. 2, if can not normally start LCD 11 behind the mobile terminal-opening, the present invention also provides a kind of LCD adaptive approach, and the method comprises the steps:
Step 101, beginning LCD self-adaptation;
Step 102, the self-adaptation driver;
Step 103, adaptive resolution;
Step 104, the self-adaptation color mode;
Step 106 is finished the LCD self-adaptation.
Fig. 3 is the detail flowchart of LCD adaptive approach of the present invention, and described method comprises the steps:
S101. mobile terminal-opening, initialization module 10 initialization LCD 11 failures, then start-up parameter read module 121 reads manufacturer's model, resolution and color mode from LCD 11;
S102. driver adaptation module 123 obtains manufacturer's model from parameter read module 12;
S103. driver adaptation module 123 detects the driver that whether has this manufacturer's model in storer 16, if not, then forwards step S115 to, if so, then forwards step S105 to;
S105. driver adaptation module 123 calls driver corresponding to manufacturer's model therewith and the zone bit of this driver is issued initialization module 10 records from storer 16;
S106. resolution adaptation module 124 obtains resolution from parameter read module 121;
S107. resolution adaptation module 124 detects whether there is the resolution that matches in storer 16, if not, then forwards step S115 to, if so, then forwards step S109 to;
S109. resolution adaptation module 124 calls resolution parameters corresponding to resolution from storer 16 and carries out resolution and arrange in detail;
S110. color adaptation module 125 obtains color mode from parameter read module 121;
S111. color adaptation module 125 detects whether there is the color mode that matches in storer 16; If not, then forward step S115 to; If so, then forward step S113 to;
S113. color adaptation module 14 calls the color parameters from storer 16 and carries out color mode and arrange in detail;
The success of S114.LCD self-adaptation;
The failure of S115.LCD self-adaptation.
The above only is better embodiment of the present invention; protection scope of the present invention is not limited with above-mentioned embodiment; as long as the equivalence that those of ordinary skills do according to disclosed content is modified or changed, all should include in the protection domain of putting down in writing in claims.