CN103853383B - A kind of method realizing touch-screen driving in Uboot - Google Patents
A kind of method realizing touch-screen driving in Uboot Download PDFInfo
- Publication number
- CN103853383B CN103853383B CN201410078635.3A CN201410078635A CN103853383B CN 103853383 B CN103853383 B CN 103853383B CN 201410078635 A CN201410078635 A CN 201410078635A CN 103853383 B CN103853383 B CN 103853383B
- Authority
- CN
- China
- Prior art keywords
- screen
- touch
- uboot
- user
- application program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Stored Programmes (AREA)
- User Interface Of Digital Computer (AREA)
- Position Input By Displaying (AREA)
Abstract
The invention discloses a kind of method realizing touch-screen driving in Uboot, including: the touch-screen in amendment, shearing manipulation system kernel drives;Touch-screen is driven and is transplanted in Uboot;Transplanting compiles Uboot after completing;Compiled Uboot is transplanted in development board;Run Uboot after development board electrifying startup, initialize touch-screen.If the user while touch-screen is had operation just to select to continue operation by the Uboot operation phase, touch-screen can list demonstrate user can application program, user clicks on the application program that screen selects oneself to need, by comparison application program and the mapping relations of contact coordinate scope after the coordinate of detection contact, program jumps to perform at the program entry of corresponding application programs, has performed backed off after random and has continued executing with Uboot code startup operating system.If the user while touch-screen is not operated by the Uboot operation phase, then exit, continue executing with Uboot code and start operating system.The present invention solves touch-screen and only can be used in the problem after os starting.
Description
Technical field
The present invention relates to field of embedded technology, a kind of method realizing touch-screen driving in Uboot.
Background technology
In the equipment of the miniaturization such as panel computer, smart mobile phone, input and output device occupies the biggest volume, touch-screen is a kind of equipment integrating input and output, the volume of equipment can be effectively reduced, sturdy and durable, make people break away from the operation of keyboard and mouse, make man-machine interaction the most direct, be widely used in all kinds of embedded product.
Current touch-screen driver is integrated in the kernel of operating system the most in modular form, can also operation function simple touch-screen driver under bare machine environment.After operating system successfully starts up, touch-screen could be operated by user, first the mobile devices such as flat board run system Bootloader Uboot by Boot Dernel and to kernel Transfer Parameters startup operating system after powering on, Uboot does not possess touch-screen driver, therefore cannot use at Uboot operation phase touch-screen, user needs to carry out associative operation by key-press input.
Uboot(Universal Bootloader Loader) it is the one of starting up's bootstrap Bootloader, multiple embedded system can be supported, mainly it is responsible for initiating hardware equipment before os starting, set up the work such as memory headroom mapping graph, the hardware environment of system is brought in a suitable state, gets out correct environment for final call operation system kernel.Therefore Uboot layer realize touch-screen drive can at Uboot startup stage strengthen mobile device man-machine interaction, user friendly selection operates, realize the use to touch-screen before os starting, develop the application of other functions for user in the Uboot stage and provide conveniently.
Current touch screen technology is mainly used in os starting descendant and ambulatory handheld or the mutual aspect of fixing equipment, or the dependence test aspect under bare machine environment carried out touch-screen, at home and abroad there is no and drives, at Uboot layer, the research carried out for touch-screen.
Summary of the invention
The technical problem to be solved is, not enough for prior art, there is provided a kind of in Uboot, realize the method that touch-screen drives, Uboot startup stage, realize the operation to touch panel device, solve touch-screen and only can be used in the problem after os starting.
For solving above-mentioned technical problem, the technical solution adopted in the present invention is: a kind of method realizing touch-screen driving in Uboot, and the method is:
1) part that the touch-screen in deletion action system kernel is relevant to kernel in driving code, obtains amended touch-screen and drives code, by amended touch-screen driving code migrating to Uboot, configures Uboot, the Uboot after compiling configuration;
2) downloading in development board by the Uboot after compiling, after development board powers on, order performs Uboot code;
3) in Uboot running, touch-screen is initialized;
4) run touch-screen display to drive, if the user while the Uboot operation phase uses touch-screen, then enter step 5), otherwise enter step 8);
5) touch-screen list demonstrates at user option the application list;
6) touch screen controller judges that touch-screen is the most clicked, the most then touch screen controller produces an interrupt signal pressed, and enters step 7);Otherwise, step 5) is returned;
7) touch screen controller enters interrupt service routine, arranges suitable Coordinate Conversion pattern and arranges register to read the position of contact, and after Coordinate Conversion completes, touch screen controller returns to wait interrupt mode;Setting up the mapping relations of contact coordinate scope and application program, after user's point touching screen selects application program, the contact coordinate value obtained according to analog-to-digital conversion, the mapping relations of comparison contact coordinate scope and application program perform corresponding application program;Described contact refers to the point of External Force Acting on touch-screen;
8) judge in step 4) whether user continues to operate touch-screen or 7) in application program whether be finished, if it is not, then exit touch screen operation;The most then return step 5);
9) continue executing with Uboot code, start operating system.
Compared with prior art, the had the beneficial effect that present invention of the present invention makes the use of touch-screen break away from the dependence to operating system, achieve the bottom support to touch-screen, Uboot operation phase user at approximation bare machine environment still can be used touch-screen rather than be operated by button etc., screen will reveal whether the optional list of application of user, user can realize after selecting touch-screen contact detection, determine contact coordinate information after enter the functions such as corresponding operation;The method of the present invention enhances mobile device man-machine interaction, facilitates the selection operation of user, it is achieved that use to touch-screen before os starting, develops the application of other functions for user in the Uboot stage and provides conveniently.
Accompanying drawing explanation
Fig. 1 is one embodiment of the invention system block diagram;
Fig. 2 is one embodiment of the invention method flow diagram;
Fig. 3 is one embodiment of the invention analog-digital converter and touch screen interface FBD;
Fig. 4 is that one embodiment of the invention touch-screen drives flow chart.
Detailed description of the invention
The present invention is transplanted in Uboot after carrying out the operation such as a series of additions and deletions, amendment by the touch-screen in operating system nucleus drives code, it is achieved that without support to touch-screen under operating system environment.The method is used to make the use of touch-screen break away from the dependence to operating system, achieve the bottom support to touch-screen, Uboot operation phase user at approximation bare machine environment still can be used touch-screen rather than be operated by button etc., screen will reveal whether the optional list of application of user, user can realize after selecting touch-screen contact detection, determine contact coordinate information after enter the functions such as corresponding operation.System block diagram is as shown in Figure 1.
For the system block diagram structure shown in Fig. 1, the technology used in the present invention method overview flow chart is as in figure 2 it is shown, specifically include following step:
1) increase touch-screen under the file directory that: touch-screen is driven and is transplanted in Uboot, the plate level configuration inside Uboot is correlated with to drive.Transplanting recompilates Uboot after completing.
2): the Uboot after recompilating downloads in development board.
3): development board powers on, order performs Uboot code, and Uboot code is divided into assembler language and C language stage, and the function that calls of touch-screen driving is positioned at the C language stage, i.e. the second stage that Uboot performs.
4): configure and initialize touch-screen: the C file corresponding with development board under Uboot catalogue increases the initialized program of touch-screen.Initialization procedure includes establishment event, initializes touch-screen and interrupts and timer interruption.If have in normal state External Force Acting in touch-screen a bit, correspondence can produce a voltage signal, by analog-digital converter conversion voltage signal and then the coordinate that obtains contact point, analog-digital converter is with touch screen interface FBD as shown in Figure 3.
5): choose whether to continue, if user needs to use touch-screen just to select to go successively to step 6 in the Uboot operation phase), if user need not, at this stage running touch-screen, select to exit into step 9).
6): after selecting to continue, screen will reveal whether to be available for the application option list that user selects to use, and user selects the application option oneself needed according to list.
7): if now user clicks on screen, enter 8), if can't detect the clicking operation of user, step 6 is continued executing with).
8): touch screen controller is typically under wait interrupt mode, stylus presses rear program can enter the position of interrupt service routine reading contact, and after Coordinate Conversion completes, controller returns to wait interrupt mode.Need to set up the mapping relations of application program and coordinate points scope at this, after the coordinate determining contact, the porch jumping to corresponding application programs according to the scope at its coordinate value place performs code.
9): whether detection application program has performed, failing to successful execution then returns step 6), if performed, enters step 10).
10): if after user selects not continue operation or application program performed, exited touch screen operation.
11): continue executing with Uboot and start operating system.
Below in conjunction with an example, the present invention is further elaborated.
This example is based on intelligent mobile terminal development board OK6410, and this mobility device includes: 4.3 cun of TFT LCD, ARM framework CPU, and model is S3C6410;Wired network adapter, model DM9000;Key-press module;Memory module is the Nand Flash of 2G, is four-wire resistance type touch screen, supports from 3.5 to 10.4 inches of LCD type number.
This example uses Uboot1.6 as the example of Uboot, is transplanted in Uboot1.6, it is achieved touch-screen is operated by user user when Uboot1.6 starts after the touch-screen driving in kernel is modified, sheared.
S1: touch-screen is driven and is transplanted in Uboot1.6, increases touch-screen and drives file under the board/smdk6410 catalogue inside Uboot1.6, increase touch-screen and initialize program, arrange the hardware parameter of touch-screen in include in smdk6410.c file.The C language function start_armboot of amendment Uboot1.6, increases and calls the function that touch-screen drives, and start_armboot is the function that C language starts, and is also principal function and the principal function of whole Uboot1.6 of C language in whole startup code.Transplanting recompilates Uboot1.6 after completing, and sequentially inputs order #arm-linux-gcc V and checks cross-compiler version number;The link that #Make distclean generates before removing;#make xxx_config compiles;#make CROSS-COMPILE=arm-linux-, can generate uboot.bin file.
S2: the Uboot1.6 after recompilating downloads in development board.
S3: development board powers on, order performs Uboot1.6 code.
S4: configure and initialize touch-screen: increase the initialized program to touch-screen in the C file relevant to development board, initialization procedure includes establishment event, initializes touch-screen and interrupts and timer interruption.Touch-screen drives flow chart as shown in Figure 4.
S5: choose whether to continue.Run LCD display to drive, screen will reveal whether that the option of " whether continuing operation " asks the user whether that continuing executing with touch-screen drives code, if user needs to use touch-screen just to select to continue, if user need not, at this stage running touch-screen, select to exit in the Uboot1.6 operation phase.
S6: after selecting to continue, screen will reveal whether to be available for the application program that user selects to use, and user selects the application program oneself needed according to the application list.
S7: user, by stylus point touching screen choosing then oneself required application program, detects that stylus is pressed rear touch screen controller and produced interrupt signal entrance step S8 pressed, pressing if being not detected by stylus, continuing executing with step S6.
S8: touch screen controller is typically under wait interrupt mode, after touch screen controller produces the interrupt signal that stylus is pressed, program can enter interrupt service routine, suitable translative mode is set and register is set to read the position of contact, Coordinate Conversion pattern has the X/Y axial coordinate translative mode of separation or automatic X/Y axial coordinate translative mode two kinds, converts rear controller and returns to wait interrupt mode.Set up the mapping relations of application program and coordinate points scope, when, after the coordinate determining contact, the porch jumping to corresponding application programs according to the scope at its coordinate value place performs code.
S9: whether detection application program has performed, failing to successful execution then returns step S6, if performed, enters step S10.
S10: if after user selects not continue operation or application program downloaded, exited touch screen operation.
S11: continue executing with Uboot1.6 and start operating system.
Compared with prior art, the a kind of of the present invention realizes the method that touch-screen drives in Uboot, drive by writing, revise touch-screen, transplant touch-screen and be driven into Uboot, amendment Uboot starts code, recompilate Uboot etc., it is achieved that user's operation to touch-screen under without operating system environment.The use achieving touch-screen is independent of the characteristic of operating system, facilitates intelligent terminal user.
Claims (2)
1. one kind realizes the method that touch-screen drives in Uboot, it is characterised in that the method is:
1) part that the touch-screen in deletion action system kernel is relevant to kernel in driving code, obtains amended touch-screen and drives code, by amended touch-screen driving code migrating to Uboot, configures Uboot, the Uboot after compiling configuration;
2) downloading in development board by the Uboot after compiling, after development board powers on, order performs Uboot code;
3) in Uboot running, touch-screen is initialized;
4) run touch-screen display to drive, if the user while the Uboot operation phase uses touch-screen, then enter step 5), otherwise enter step 8);
5) touch-screen list demonstrates at user option the application list;
6) touch screen controller judges that touch-screen is the most clicked, the most then touch screen controller produces an interrupt signal pressed, and enters step 7);Otherwise, step 5) is returned;
7) touch screen controller enters interrupt service routine, arranges suitable Coordinate Conversion pattern and arranges register to read the position of contact, and after Coordinate Conversion completes, touch screen controller returns to wait interrupt mode;Setting up the mapping relations of contact coordinate scope and application program, after user's point touching screen selects application program, the contact coordinate value obtained according to analog-to-digital conversion, the mapping relations of comparison contact coordinate scope and application program perform corresponding application program;Described contact refers to the point of External Force Acting on touch-screen;
8) judge in step 4) whether user continues to operate touch-screen or 7) in application program whether be finished, if it is not, then exit touch screen operation;The most then return step 5);
9) continue executing with Uboot code, start operating system.
Uboot the most according to claim 1 realizes the method that touch-screen drives, it is characterised in that the method realizing LCD touch screen driving in Uboot1.6 is as follows:
1) LCD touch screen driving is transplanted in Uboot1.6, increase LCD touch screen under board/smdk6410 catalogue inside Uboot1.6 and drive file, in smdk6410.c file, increase touch-screen initialize program, include arranges the hardware parameter of LCD touch screen;The C language function start_armboot of amendment Uboot1.6 increases the function calling touch-screen driving;Transplanting recompilates Uboot1.6 after completing, and sequentially inputs order #arm-linux-gcc V and checks the version number of cross-compiler;The link that #Make distclean generates before removing;Compiling #make xxx_config;#make
CROSS-COMPILE=arm-linux-, generates uboot.bin file;
2) Uboot1.6 after recompilating downloads in development board, and development board powers on, and order performs Uboot1.6 code;
3) increasing the LCD initialized program to touch-screen in the C file of the Uboot1.6 relevant to development board, initialization procedure includes establishment event, initializes touch-screen and interrupts and timer interruption;
4) run LCD touch screen display to drive, if user uses LCD touch screen in the Uboot1.6 operation phase, then enter step 5);Otherwise, step 8) is entered;
5) LCD touch screen demonstrates and is available for the application program that user selects to use;
6) LCD touch screen controller judges that LCD touch screen is the most clicked, the most then LCD touch screen controller produces an interrupt signal pressed, and enters step 7);Otherwise, step 5) is returned;
7) touch screen controller enters interrupt service routine, suitable Coordinate Conversion pattern is set and register is set to read the position of contact, described Coordinate Conversion pattern uses the X/Y axial coordinate translative mode separated or automatic X/Y axial coordinate translative mode, and after Coordinate Conversion completes, LCD touch screen controller returns to wait interrupt mode;Set up the mapping relations of OS Type and coordinate points scope, after the coordinate determining contact, jump to, according to the scope at contact coordinate value place, the porch execution code download application program that application program is downloaded;
8) if in step 4) user select do not continue operation or step 7) in application program has downloaded, then exit to LCD touch screen operation;Otherwise, step 5) is returned;
9) continue executing with Uboot1.6 and start operating system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410078635.3A CN103853383B (en) | 2014-03-05 | 2014-03-05 | A kind of method realizing touch-screen driving in Uboot |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410078635.3A CN103853383B (en) | 2014-03-05 | 2014-03-05 | A kind of method realizing touch-screen driving in Uboot |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103853383A CN103853383A (en) | 2014-06-11 |
CN103853383B true CN103853383B (en) | 2016-08-31 |
Family
ID=50861132
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410078635.3A Expired - Fee Related CN103853383B (en) | 2014-03-05 | 2014-03-05 | A kind of method realizing touch-screen driving in Uboot |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103853383B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107077435B (en) * | 2014-09-19 | 2020-03-31 | 株式会社艾拉博 | Device driver registration apparatus and device driver registration method using the same |
CN104346205B (en) * | 2014-10-28 | 2018-09-18 | 深圳市元征科技股份有限公司 | USB device upgrade method |
CN104408653A (en) * | 2014-11-11 | 2015-03-11 | 浪潮软件集团有限公司 | Network billing all-in-one machine building method based on open platform |
CN107203444A (en) * | 2016-03-16 | 2017-09-26 | 中国航天科工集团第四研究院指挥自动化技术研发与应用中心 | A kind of control of intelligent terminal method of testing and device based on Uboot |
CN106293233A (en) * | 2016-08-12 | 2017-01-04 | 武汉华星光电技术有限公司 | The driving method of touch control display and drive system |
CN109298889A (en) * | 2017-07-24 | 2019-02-01 | Tcl集团股份有限公司 | A kind of method, startup advertisement update method and terminal device generating bootstrap |
CN108563467B (en) * | 2018-03-23 | 2021-12-07 | 北京轩宇信息技术有限公司 | PAD (PAD application) with touch screen conforming to security and confidentiality and implementation method |
CN110716660B (en) * | 2019-09-02 | 2023-05-09 | Oppo(重庆)智能科技有限公司 | Touch screen starting method, terminal and storage medium |
CN110703948B (en) * | 2019-10-09 | 2022-09-27 | 展讯通信(上海)有限公司 | Touch screen operation recording and broadcasting system and method |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN202931390U (en) * | 2012-11-29 | 2013-05-08 | 上海理工大学 | Household internet of things monitoring system based on built-in Linux |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9104619B2 (en) * | 2010-07-23 | 2015-08-11 | Brocade Communications Systems, Inc. | Persisting data across warm boots |
-
2014
- 2014-03-05 CN CN201410078635.3A patent/CN103853383B/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN202931390U (en) * | 2012-11-29 | 2013-05-08 | 上海理工大学 | Household internet of things monitoring system based on built-in Linux |
Also Published As
Publication number | Publication date |
---|---|
CN103853383A (en) | 2014-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103853383B (en) | A kind of method realizing touch-screen driving in Uboot | |
US8924702B2 (en) | Method for switching dual operating system on docking system | |
EP3379812B1 (en) | Apparatus and method for controlling operation of mobile terminal | |
CN105117265B (en) | A kind of method, apparatus and terminal of document upgrading | |
CN108388451B (en) | Mobile terminal starting method and device and mobile terminal | |
CN105824662B (en) | Application program unloading method and electronic equipment | |
CN102912589A (en) | Full-automatic washing machine without display control device and control method for full-automatic washing machine | |
WO2015117301A1 (en) | Method and apparatus for operating touch screen device | |
CN104951328A (en) | Embedded equipment and starting method thereof | |
CN106227453A (en) | The control method of a kind of mobile terminal and mobile terminal | |
CN103942002A (en) | Method and device for controlling virtual mouse based on mobile terminal | |
CN101923480B (en) | Method and device for starting terminal equipment | |
CN107506121A (en) | A kind of key control method, storage medium and intelligent terminal | |
CN102855064B (en) | A kind of method of functional control help document of quick display application program | |
CN111766987B (en) | Application program management method and device and electronic equipment | |
CN103024928A (en) | Terminal wireless connection method and wireless terminal | |
US9182880B2 (en) | Method of displaying images via touching and electronic apparatus thereof | |
KR101859977B1 (en) | The method for returning home screen in portable terminal with multi-software platform and device thereof | |
CN103677373A (en) | Touch control display method and electronic device thereof | |
CN102999382A (en) | Electronic device and switching method thereof | |
CN109683792A (en) | A kind of voice interactive method, device, storage medium and mobile terminal | |
CN206431612U (en) | One kind touches screen pointing device, terminal and system | |
CN101630200B (en) | Method for executing programs in computer system and correlative computer system | |
CN108388179A (en) | Household appliance control method and household electrical appliance | |
CN108337377A (en) | Terminal control method, device, terminal based on pressure sensor and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20160831 Termination date: 20170305 |