The sample program KPDEFLT.C in the D" />
參數(shù)資料
型號: 20-101-0303
廠商: Rabbit Semiconductor
文件頁數(shù): 107/126頁
文件大小: 0K
描述: SMARTSCREEN OP7100 W/TOUCHSCREEN
標準包裝: 1
顯示器類型: STN - 超扭轉(zhuǎn)向列,帶觸摸面板
可視范圍: 121.00mm L x 91.00mm W
背光: CCFL - 白
點象素: 320 x 240(QVGA)
接口: 串行
點間距: 0.36mm x 0.36mm
產(chǎn)品目錄頁面: 618 (CN2011-ZH PDF)
其它名稱: 20-101-0303-ND
20-101-303
20-101-303-ND
316-1175
OP7100
Graphics Programming
81
Keypad Programming
The sample program KPDEFLT.C in the Dynamic C SAMPLES\QVGA subdi-
rectory demonstrates how to read the keypad. Add the following directives at
the top of the program to make it possible to use the keypad routines.
#use op71l.lib
(landscape orientation) OR
#use op71p.lib
(portrait orientation)
#use op71hw.lib
#use kp_op71.lib
Initialization
To initialize the keypad driver, call kpDefInit(). This must be per-
formed before other keypad operations.
Scanning the Keypad
The function kpScanState() must be called periodically to scan the
keypad for changes. In a cooperative multitasking (big-loop style), this
function should be called every 25 ms or so. If you are using a real-time
kernel, you can also attach this function to one of the tasks and have it
invoked approximately every 25 ms. Note that this function scans for
changes, but it does not report what was changed.
Reading Keypad Activities
The function kpDefGetKey() returns the interpretation of the state
change detected by kpScanState() into key activities. The means that
the kpDefGetKey() function must be called no less frequently than
kpScanState()
to ensure no key activity is lost. The function
kpDefGetKey()
returns an integer. If the integer is –1, no key activity
was detected. Otherwise, bit 0 to bit 3 indicates the index of the sense line
of the key, and bit 4 to bit 7 indicate the index of the drive line of the key.
Bit 8 indicates whether the key has been "pressed"—the key was pressed if
bit 8 is a 1.
Note that if two key activities occur between two calls to kpScanState(),
only one key activity is interpreted by the kpDefGetKey() function even
though both activities may be registered by the kpScanState() function.
The priority of key interpretation is from drive line 0 (highest priority) to
drive line 7. On the same drive line, the priority is from sense line 0
(highest priority) to sense line 7.
Once a key activity is detected by kpScanState(), no further key
activities will be detected by further calls to kpScanState() unless
kpDefGetKey()
is called.
相關(guān)PDF資料
PDF描述
TPSW107M004R0100 CAP TANT 100UF 4V 20% 2312
GLK24064-25-VPT LCD GRAPHIC DISPL 240X64 Y/G BK
MK-GT380N KIT MODULE 3.8" MONOCHROME DISP
MK-GT380T KIT MODULE 3.8" TRANSFLECTV DISP
CWX823-060.0M OSC 60.0000MHZ 3.3V +-50PPM SMD
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
20-101-0343 功能描述:電纜組件 BL1800 proto board RoHS:否 制造商:Molex 產(chǎn)品:Power Assemblies 類型:Cable Assembly 連接器端口 A:No Connector 連接器端口 A 管腳計數(shù):4 連接器端口 B:No Connector 連接器端口 B 管腳計數(shù): 型式:Male 線規(guī) - 美國線規(guī)(AWG):20, 28 長度:0.305 m 顏色:Black, Red
20-101-0356 功能描述:單板計算機 BL1800 RoHS:否 制造商:Ampro By ADLINK 外觀尺寸:EPIC 處理器類型:Intel Atom D510 頻率:1.66 GHz 存儲容量:2 GB (max) 存儲類型:DDR2, L2 Cache 接口類型:Ethernet, PS/2, SATA, Serial, USB 工作電源電壓:5 V, 12 V 功耗:13 W 最大工作溫度:+ 70 C 尺寸:165.1 mm x 114.3 mm
20-101-0357 功能描述:單板計算機 BL1810 SINGLE BOARD COMPUTER RoHS:否 制造商:Ampro By ADLINK 外觀尺寸:EPIC 處理器類型:Intel Atom D510 頻率:1.66 GHz 存儲容量:2 GB (max) 存儲類型:DDR2, L2 Cache 接口類型:Ethernet, PS/2, SATA, Serial, USB 工作電源電壓:5 V, 12 V 功耗:13 W 最大工作溫度:+ 70 C 尺寸:165.1 mm x 114.3 mm
20-101-0358 功能描述:單板計算機 BL1820 RoHS:否 制造商:Ampro By ADLINK 外觀尺寸:EPIC 處理器類型:Intel Atom D510 頻率:1.66 GHz 存儲容量:2 GB (max) 存儲類型:DDR2, L2 Cache 接口類型:Ethernet, PS/2, SATA, Serial, USB 工作電源電壓:5 V, 12 V 功耗:13 W 最大工作溫度:+ 70 C 尺寸:165.1 mm x 114.3 mm
20-101-0383 功能描述:模塊化系統(tǒng) - SOM RCM2020 RabbitCore RoHS:否 制造商:Digi International 外觀尺寸:ConnectCore 9P 處理器類型:ARM926EJ-S 頻率:150 MHz 存儲容量:8 MB, 16 MB 存儲類型:NOR Flash, SDRAM 接口類型:I2C, SPI, UART 工作電源電壓:3.3 V 最大工作溫度:+ 85 C 尺寸:1.97 in x 1.97 in x 6.1 in