Arm keyboard scanner Problems

Source: Internet
Author: User
Arm keyboard scanner-general Linux technology-Linux technology and application information. For more information, see the following. Ladies and gentlemen, arm U8 Key_Scan Function
RGPGDAT = rGPGDAT &(~ (1 <6) | (1 <2) | (1 <6) | (0 <2); // GPG6, 2 output 0
RGPEDAT = rGPEDAT &(~ (1 <13) | (1 <11) | (1 <13) | (1 <11); // GPE13, 11 output 0
If (rGPFDAT & (1 <0) = 0) return 16;
Else if (rGPFDAT & (1 <2) = 0) return 15;
Else if (rGPGDAT & (1 <3) = 0) return 14;
Else if (rGPGDAT & (1 <11) = 0) return 13;

RGPGDAT = rGPGDAT &(~ (1 <6) | (1 <2) | (0 <6) | (1 <2); // GPG6, 2 output 0
RGPEDAT = rGPEDAT &(~ (1 <13) | (1 <11) | (1 <13) | (1 <11); // GPE13, 11 output 0
If (rGPFDAT & (1 <0) = 0) return 11;
Else if (rGPFDAT & (1 <2) = 0) return 8;
Else if (rGPGDAT & (1 <3) = 0) return 5;
Else if (rGPGDAT & (1 <11) = 0) return 2;

RGPGDAT = rGPGDAT &(~ (1 <6) | (1 <2) | (1 <6) | (1 <2); // GPG6, 2 output 0
RGPEDAT = rGPEDAT &(~ (1 <13) | (1 <11) | (1 <13) | (0 <11); // GPE13, 11 output 0
If (rGPFDAT & (1 <0) = 0) return 10;
Else if (rGPFDAT & (1 <2) = 0) return 7;
Else if (rGPGDAT & (1 <3) = 0) return 4;
Else if (rGPGDAT & (1 <11) = 0) return 1;

RGPGDAT = rGPGDAT &(~ (1 <6) | (1 <2) | (1 <6) | (1 <2); // GPG6, 2 output 0
RGPEDAT = rGPEDAT &(~ (1 <13) | (1 <11) | (0 <13) | (1 <11); // GPE13, 11 output 0
If (rGPFDAT & (1 <0) = 0) return 12;
Else if (rGPFDAT & (1 <2) = 0) return 9;
Else if (rGPGDAT & (1 <3) = 0) return 6;
Else if (rGPGDAT & (1 <11) = 0) return 3;
Else return 0xff;
I haven't understood it for a long time. I hope someone can give me some advice.

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.