Enable and disable the touch screen

Source: Internet
Author: User

 

* ****************************** Loongembedded ******* *************************

Author: loongembedded (Kandi)

Time: 2011.11.18

Category: Wince-driven development

* ****************************** Loongembedded ******* *************************

 

Remarks: Systems Based on wince6.0 + cloud6410

 

According to the project's needs, in order to save power consumption, when the product does not need to watch the LCD screen display, We need to disable the LCD screen display and at the same time disable the touch screen response; restore the display of the LCD screen when necessary. At the same time, you must reply to the touch screen's normal response to the touch screen. How to implement it?

 

First, let's take a look at the interrupt description of the vector Interrupt Controller part of the courseware 6410 when the pen is pressed and lifted.

Figure 1

It can be seen that the physical interrupt number of the touch pen press and lift is 62, which corresponds to the VIC [30] of the vic1 group. next, let's look at the description of the interrupt enable register vicintenable and interrupt enable clear register vicintenclear in the vector interrupt controller section.

Figure 2

The touch function of the touch screen can be disabled by disabling the int_pendnup interrupt through the [30] position of the vic1intenclear register, the int_pendnup interrupt can be made through the [30] Location of the vic1intenable register to enable the normal touch response of the touch screen. The Code is as follows:

Disable:

G_pvic1reg-> vicintenclear = (0x1 <30 );

Enable:

G_pvic1reg-> vicintenable = (0x1 <30 );

In this way, you can enable the touch screen function.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.