CN103853383A - Method of realizing touch screen driver in Uboot (Universal Bootloader Loader) - Google Patents

Method of realizing touch screen driver in Uboot (Universal Bootloader Loader) Download PDF

Info

Publication number
CN103853383A
CN103853383A CN201410078635.3A CN201410078635A CN103853383A CN 103853383 A CN103853383 A CN 103853383A CN 201410078635 A CN201410078635 A CN 201410078635A CN 103853383 A CN103853383 A CN 103853383A
Authority
CN
China
Prior art keywords
screen
touch
uboot
touch screen
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.)
Granted
Application number
CN201410078635.3A
Other languages
Chinese (zh)
Other versions
CN103853383B (en
Inventor
熊永华
陈娅
吴敏
张尧学
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Central South University
Original Assignee
Central South University
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 Central South University filed Critical Central South University
Priority to CN201410078635.3A priority Critical patent/CN103853383B/en
Publication of CN103853383A publication Critical patent/CN103853383A/en
Application granted granted Critical
Publication of CN103853383B publication Critical patent/CN103853383B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • User Interface Of Digital Computer (AREA)
  • Position Input By Displaying (AREA)

Abstract

The invention discloses a method of realizing a touch screen driver in Uboot (Universal Bootloader Loader). The method comprises the steps of modifying and cutting the touch screen driver in an operating system nucleus, transplanting the touch screen driver in the Uboot, compiling the Uboot after transplantation, transplant the compiled Uboot into a development board, operating the Uboot after the development board is powered on and starts, and initializing a touch screen. If a user operates the touch screen during the operation of the Uboot, the user continues the operation, the touch screen can show the application programs available to the user in a list, the user clicks the screen and selects the needed application program, the application program jumps to the corresponding program entry and executes after the coordinate of the touching point is detected and the mapping relation between the application program and the coordinate range of the touching point is compared, the operation to the touch screen exits after execution, Uboot code continues to execute and the operating system is started. If the user does not operate the touch screen during the operation of the Uboot, the operation to the touch screen exits, the Uboot code continues to execute and the operating system is started. The method of realizing the touch screen driver in the Uboot solves the problem that the touch screen can only be used after the operating system is started.

Description

A kind of method that realizes touch-screen driving in Uboot
Technical field
The present invention relates to field of embedded technology, particularly a kind of method that realizes touch-screen driving in Uboot.
Background technology
In the equipment of the miniaturization such as panel computer, smart mobile phone, input and output device has occupied very large volume, touch-screen is a kind of equipment that integrates input and output, can effectively reduce the volume of equipment, sturdy and durable, make people break away from the operation of keyboard and mouse, make man-machine interaction more direct, be widely used in all kinds of embedded products.
Current touch-screen driver is mainly integrated in the kernel of operating system with the form of module, also can the simple touch-screen driver of operation function under bare machine environment.After operating system successfully starts, user could operate touch-screen, after the mobile devices such as flat board power on, first operational system Bootloader Uboot starts the operating system by Boot Dernel and to kernel Transfer Parameters, in Uboot, do not possess touch-screen driver, therefore cannot use at Uboot operation phase touch-screen, user need to carry out associative operation by key-press input.
Uboot(Universal Bootloader Loader) be the one of starting up's boot Bootloader, can support multiple embedded system, mainly be responsible for initiating hardware equipment before os starting, set up the work such as memory headroom mapping graph, take the hardware environment of system to a suitable state, for final call operation system kernel is ready to correct environment.Therefore realizing touch-screen at Uboot layer drives and strengthens mobile device man-machine interaction can be at Uboot unloading phase, user friendly selection operation, realize the use to touch-screen before os starting, provide convenience for user develops other function application in the Uboot stage.
Current touch screen technology mainly uses aspect os starting descendant and ambulatory handheld or fixed equipment mutual, or the dependence test aspect of under bare machine environment, touch-screen being carried out, at home and abroad there is no and drive the research of carrying out at Uboot layer for touch-screen.
Summary of the invention
Technical matters to be solved by this invention is, for prior art deficiency, a kind of method that touch-screen drives that realizes in Uboot is provided, the unloading phase of Uboot, realizes the operation to touch panel device, solve touch-screen and can only use the problem after os starting.
For solving the problems of the technologies described above, the technical solution adopted in the present invention is: a kind of method that realizes touch-screen driving in Uboot, and the method is:
1) touch-screen in deletion action system kernel drives the part relevant to kernel in code, obtains amended touch-screen and drives code, drives code to be transplanted in Uboot amended touch-screen, configuration Uboot, the Uboot after compiling configuration;
2) Uboot after compiling is downloaded in development board, after development board powers on, order is carried out Uboot code;
3) in Uboot operational process, touch-screen is carried out to initialization;
4) operation touch-screen display driver, if user uses touch-screen in the Uboot operation phase, enters step 4), otherwise enters step);
5) touch-screen list demonstrates at user option the application list;
6) touch screen controller judges that whether touch-screen is clicked, and if so, touch screen controller produces a look-at-me of pressing, and enters step 7); Otherwise, return to step 5);
7) touch screen controller enters interrupt service routine, suitable coordinate conversion pattern is set and register is set the position of reading contact, and after coordinate conversion completes, touch screen controller is got back to wait interrupt mode; Set up the mapping relations of contact coordinate scope and application program, after user's point touching screen is selected application program, the contact coordinate value obtaining according to analog to digital conversion, the mapping relations of contrast contact coordinate scope and application program are carried out corresponding application program; Described contact refers to the point of External Force Acting on touch-screen;
8) judge whether user continues to operate touch-screen or whether application program is finished, if not, exit touch screen operation; If so, return to step 5);
9) continue to carry out Uboot code, start the operating system.
Compared with prior art, the beneficial effect that the present invention has is: the present invention makes the use of touch-screen break away from the dependence to operating system, realize the support of bottom to touch-screen, Uboot operation phase user at approximate bare machine environment still can operate with touch-screen rather than by button etc., screen can demonstrate the optional list of application of user, and user can realize the detection of touch-screen contact, enter the functions such as corresponding operation after determining contact coordinate information after selecting; Method of the present invention has strengthened mobile device man-machine interaction, has facilitated user's selection operation, has realized the use to touch-screen before os starting, provides convenience for user develops other function application in the Uboot stage.
Accompanying drawing explanation
Fig. 1 is one embodiment of the invention system chart;
Fig. 2 is one embodiment of the invention method flow diagram;
Fig. 3 is one embodiment of the invention analog to digital converter and touch screen interface FBD (function block diagram);
Fig. 4 is that one embodiment of the invention touch-screen drives process flow diagram.
Embodiment
The present invention, by driving code to carry out being transplanted in Uboot after the operations such as a series of additions and deletions, modification the touch-screen in operating system nucleus, has realized without the support to touch-screen under operating system environment.Adopt the method to make the use of touch-screen break away from the dependence to operating system, realize the support of bottom to touch-screen, Uboot operation phase user at approximate bare machine environment still can operate with touch-screen rather than by button etc., screen can demonstrate the optional list of application of user, and user can realize the detection of touch-screen contact, enter the functions such as corresponding operation after determining contact coordinate information after selecting.System chart as shown in Figure 1.
For the system chart structure shown in Fig. 1, the technology used in the present invention method overview flow chart as shown in Figure 2, specifically comprises following step:
1): touch-screen is driven and is transplanted in Uboot, configure and under relevant file directory, increase touch-screen and drive in the plate level of Uboot the inside.After completing, transplanting recompilates Uboot.
2): the Uboot after recompilating is downloaded in development board.
3): development board powers on, order is carried out Uboot code, and Uboot code is divided into assembly language and C language stage, and the call function that touch-screen drives is positioned at the C language stage, the subordinate phase that Uboot carries out.
4): configuration and initialization touch-screen: the initialized program that increases touch-screen in the C file corresponding with development board under Uboot catalogue.Initialization procedure comprises establishment event, and initialization touch-screen interrupts and timer interrupts.If under normal condition, have External Force Acting in touch-screen a bit, can correspondingly produce a voltage signal, by analog to digital converter signal conversion voltage and then obtain the coordinate of contact point, analog to digital converter and touch screen interface FBD (function block diagram) are as shown in Figure 3.
5): select whether to continue, if user need to the Uboot operation phase use touch-screen just selection continue to enter step 6), if user need to be at this stage running touch-screen, select to exit entering step 9).
6): select screen after continuing can demonstrate the application of option list that can supply user's choice for use, user selects the application of option oneself needing according to list.
7): if now user clicks screen, enter 8),, if can't detect user's clicking operation, continue to perform step 6).
8): touch screen controller is generally in waiting under interrupt mode, stylus is pressed rear program and can enter interrupt service routine and read the position of contact, and after coordinate conversion completes, controller is got back to wait interrupt mode.The mapping relations that need set up application program and coordinate points scope at this, after determining the coordinate of contact, jump to the porch run time version of corresponding application programs according to the scope at its coordinate figure place.
9): whether completely detect application program, if fail execution, return to step 6), if complete, enter step 10).
10): if user select do not continue operation or application program complete after; exit touch screen operation.
11): continue to carry out Uboot and start the operating system.
Below in conjunction with an example, the present invention is further elaborated.
This example is that this mobility device comprises based on intelligent mobile terminal development board OK6410: 4.3 cun of TFT LCD, and ARM framework CPU, 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 models.
This example adopts the example of Uboot1.6 as Uboot, after the touch-screen driving in kernel is modified, sheared, is transplanted in Uboot1.6, realizes user user in the time that Uboot1.6 starts touch-screen is operated.
S1: touch-screen is driven and is transplanted in Uboot1.6, under the board/smdk6410 catalogue of Uboot1.6 the inside, increase touch-screen and drive file, in smdk6410.c file, increase touch-screen initialize routine, the hardware parameter of touch-screen is set in include.Revise the C language function start_armboot of Uboot1.6, increase and call the function that touch-screen drives, start_armboot is the function that C language starts, and is also the principal function of C language and the principal function of whole Uboot1.6 in whole start-up code.After transplanting completes, recompilate Uboot1.6, input command #arm-linux-gcc – V checks cross-compiler version number successively; The link generating before #Make distclean removes; #make xxx_config compiling; #make CROSS-COMPILE=arm-linux-, can generate uboot.bin file.
S2: the Uboot1.6 after recompilating is downloaded in development board.
S3: development board powers on, order is carried out Uboot1.6 code.
S4: configuration and initialization touch-screen: increase the initialized program to touch-screen in the C file relevant to development board, initialization procedure comprises establishment event, initialization touch-screen interrupts and timer interrupts.Touch-screen drives process flow diagram as shown in Figure 4.
S5: select whether to continue.Operation LCD display driver, whether the option inquiry user that screen can demonstrate " whether continuing operation " continues to carry out touch-screen driving code, if user need to use touch-screen just to select to continue in the Uboot1.6 operation phase, if user need to, at this stage running touch-screen, not select to exit.
S6: select screen after continuing can demonstrate the application program that can supply user's choice for use, user selects the application program oneself needing according to the application list.
S7: user is by own required application program of stylus point touching screen choosing, detects that stylus presses rear touch screen controller and produce a look-at-me of pressing and enter step S8, if do not detect that stylus is by next continuation execution step S6.
S8: touch screen controller is generally in waiting under interrupt mode, when program after the look-at-me that touch screen controller generation stylus is pressed can enter interrupt service routine, suitable translative mode is set and register is set the position of reading contact, two kinds of coordinate conversion pattern separative X/Y axial coordinate translative mode or automatically X/Y axial coordinate translative mode, convert rear controller and get back to wait interrupt mode.Set up the mapping relations of application program and coordinate points scope, when determining after the coordinate of contact, jump to the porch run time version of corresponding application programs according to the scope at its coordinate figure place.
S9: whether completely detect application program, if fail execution, return to step S6, if complete, enter step S10.
S10: if after user selects not continue operation or application program downloaded, exited touch screen operation.
S11: continue to carry out Uboot1.6 and start the operating system.
Compared with prior art, a kind of method that touch-screen drives that realizes in Uboot of the present invention, drive by writing, revise touch-screen, transplant touch-screen and be driven into Uboot, revise Uboot start-up code, recompilate Uboot etc., realized user without the operation to touch-screen under operating system environment.The use that has realized touch-screen does not rely on the characteristic of operating system, has facilitated intelligent terminal user.

Claims (2)

1. in Uboot, realize the method that touch-screen drives, it is characterized in that, the method is:
1) touch-screen in deletion action system kernel drives the part relevant to kernel in code, obtains amended touch-screen and drives code, drives code to be transplanted in Uboot amended touch-screen, configuration Uboot, the Uboot after compiling configuration;
2) Uboot after compiling is downloaded in development board, after development board powers on, order is carried out Uboot code;
3) in Uboot operational process, touch-screen is carried out to initialization;
4) operation touch-screen display driver, if user uses touch-screen in the Uboot operation phase, enters step 5), otherwise enters step 8);
5) touch-screen list demonstrates at user option the application list;
6) touch screen controller judges that whether touch-screen is clicked, and if so, touch screen controller produces a look-at-me of pressing, and enters step 7); Otherwise, return to step 5);
7) touch screen controller enters interrupt service routine, suitable coordinate conversion pattern is set and register is set the position of reading contact, and after coordinate conversion completes, touch screen controller is got back to wait interrupt mode; Set up the mapping relations of contact coordinate scope and application program, after user's point touching screen is selected application program, the contact coordinate value obtaining according to analog to digital conversion, the mapping relations of contrast contact coordinate scope and application program are carried out corresponding application program; Described contact refers to the point of External Force Acting on touch-screen;
8) determining step 4) in user whether continue to operate touch-screen or 7) in application program whether be finished, if not, exit touch screen operation; If so, return to step 5);
9) continue to carry out Uboot code, start the operating system.
2. in Uboot according to claim 1, realize the method that touch-screen drives, it is characterized in that, the method that realizes the driving of LCD touch-screen in Uboot1.6 is as follows:
1) LCD touch-screen is driven and is transplanted in Uboot1.6, under the board/smdk6410 catalogue of Uboot1.6 the inside, increase LCD touch-screen and drive file, in smdk6410.c file, increase touch-screen initialize routine, the hardware parameter of LCD touch-screen is set in include; The C language function start_armboot that revises Uboot1.6 increases the function that calls touch-screen driving; After transplanting completes, recompilate Uboot1.6, input command #arm-linux-gcc – V checks the version number of cross-compiler successively; The link generating before #Make distclean removes; Compiling #make xxx_config; #make CROSS-COMPILE=arm-linux-, generates uboot.bin file;
2) Uboot1.6 after recompilating is downloaded in development board, development board powers on, and order is carried out Uboot1.6 code;
3) in the C of the Uboot1.6 relevant to development board file, increase the initialized program of LCD to touch-screen, initialization procedure comprises establishment event, and initialization touch-screen interrupts and timer interrupts;
4) operation LCD touch-screen display driver, if user uses LCD touch-screen in the Uboot1.6 operation phase, enters step 5); Otherwise, enter step 8);
5) LCD touch-screen demonstrates the application program that can supply user's choice for use;
6) LCD touch screen controller judges that whether LCD touch-screen is clicked, and if so, LCD touch screen controller produces a look-at-me of pressing, and enters step 7); Otherwise, return to step 5);
7) touch screen controller enters interrupt service routine, suitable coordinate conversion pattern is set and register is set the position of reading contact, described coordinate conversion pattern adopts the X/Y axial coordinate translative mode or the automatic X/Y axial coordinate translative mode that separate, and after coordinate conversion completes, LCD touch screen controller is got back to wait interrupt mode; Set up the mapping relations of OS Type and coordinate points scope, after determining the coordinate of contact, jump to according to the scope at contact coordinate value place the porch run time version down load application program that application program is downloaded;
8) if in step 4) user select do not continue operation or step 7) in application program downloaded, exit the touch screen operation to LCD; Otherwise, return to step 5);
9) continuing to carry out Uboot1.6 starts the operating system.
CN201410078635.3A 2014-03-05 2014-03-05 A kind of method realizing touch-screen driving in Uboot Expired - Fee Related CN103853383B (en)

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 true CN103853383A (en) 2014-06-11
CN103853383B 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)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346205A (en) * 2014-10-28 2015-02-11 深圳市元征科技股份有限公司 USB equipment upgrading method
CN104408653A (en) * 2014-11-11 2015-03-11 浪潮软件集团有限公司 Network billing all-in-one machine building method based on open platform
CN106293233A (en) * 2016-08-12 2017-01-04 武汉华星光电技术有限公司 The driving method of touch control display and drive system
CN107077435A (en) * 2014-09-19 2017-08-18 株式会社艾拉博 The register method of the device driver of device driver register device and use the device driver register device
CN107203444A (en) * 2016-03-16 2017-09-26 中国航天科工集团第四研究院指挥自动化技术研发与应用中心 A kind of control of intelligent terminal method of testing and device based on Uboot
CN108563467A (en) * 2018-03-23 2018-09-21 北京轩宇信息技术有限公司 It is a kind of to meet safe and secret band touch screen PAD and implementation method
CN109298889A (en) * 2017-07-24 2019-02-01 Tcl集团股份有限公司 A kind of method, startup advertisement update method and terminal device generating bootstrap
CN110703948A (en) * 2019-10-09 2020-01-17 展讯通信(上海)有限公司 Touch screen operation recording and broadcasting system and method
CN110716660A (en) * 2019-09-02 2020-01-21 Oppo(重庆)智能科技有限公司 Touch screen starting method, terminal and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120023319A1 (en) * 2010-07-23 2012-01-26 Brocade Communications Systems, Inc. Persisting data across warm boots
CN202931390U (en) * 2012-11-29 2013-05-08 上海理工大学 Household internet of things monitoring system based on built-in Linux

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120023319A1 (en) * 2010-07-23 2012-01-26 Brocade Communications Systems, Inc. Persisting data across warm boots
CN202931390U (en) * 2012-11-29 2013-05-08 上海理工大学 Household internet of things monitoring system based on built-in Linux

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
何宾: "《Xilinx All Programmable Zynq-7000 SoC 设计指南》", 31 May 2013 *
凌明: "《嵌入式系统高级C语言编程》", 31 January 2011 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107077435A (en) * 2014-09-19 2017-08-18 株式会社艾拉博 The register method of the device driver of device driver register device and use the device driver register device
CN107077435B (en) * 2014-09-19 2020-03-31 株式会社艾拉博 Device driver registration apparatus and device driver registration method using the same
CN104346205A (en) * 2014-10-28 2015-02-11 深圳市元征科技股份有限公司 USB equipment upgrading method
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
CN108563467A (en) * 2018-03-23 2018-09-21 北京轩宇信息技术有限公司 It is a kind of to meet safe and secret band touch screen PAD and implementation method
CN110716660A (en) * 2019-09-02 2020-01-21 Oppo(重庆)智能科技有限公司 Touch screen starting method, terminal and storage medium
CN110716660B (en) * 2019-09-02 2023-05-09 Oppo(重庆)智能科技有限公司 Touch screen starting method, terminal and storage medium
CN110703948A (en) * 2019-10-09 2020-01-17 展讯通信(上海)有限公司 Touch screen operation recording and broadcasting system and method

Also Published As

Publication number Publication date
CN103853383B (en) 2016-08-31

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
CN101770268B (en) Method and device for resetting of intelligent terminal
EP2876537B1 (en) Power-save mode in electronic apparatus
CN105677305A (en) Icon management method, device and terminal
CN105511781B (en) Start the method, apparatus and user equipment of application program
CN103777947B (en) The management method at the main interface of a kind of mobile terminal and device
CN107924283A (en) Method, equipment and the graphical interface of user of human-computer interaction
CN103634169A (en) A household electrical appliance control system realized based on intelligent terminals
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
CN103677587A (en) Method and system for rapidly switching main interfaces in Android system
CN103942002A (en) Method and device for controlling virtual mouse based on mobile terminal
WO2022022566A1 (en) Graphic code identification method and apparatus and electronic device
CN104572078A (en) Realization method and system of Bluetooth function under Android recovery mode
CN109243158A (en) A kind of household intelligent control terminal
CN103761129A (en) Method of implementing SDIO (secure digital input/output) interface drive in Boot loader layer
CN104836869A (en) Mobile communication terminal and mobile communication terminal power-on method
CN104580705A (en) Terminal
CN102855064B (en) A kind of method of functional control help document of quick display application program
CN103902329A (en) Electronic device capable of updating basic input and output system and updating method thereof
CN106095274A (en) Interface display method and device are set
CN105472679A (en) Communication terminal network switching method and device
CN102736734A (en) Electronic device and function execution method applied thereto
CN103577360A (en) Device and method for enabling intelligent terminal to enter downloading and upgrading mode

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