The sample program KPDEFLT.C in the D" />
參數(shù)資料
型號: 20-101-0732
廠商: Rabbit Semiconductor
文件頁數(shù): 107/126頁
文件大?。?/td> 0K
描述: INTERFACE SMART SCREEN OP7100
標(biāo)準(zhǔn)包裝: 1
系列: SBC
模塊/板類型: 單板計(jì)算機(jī)模塊
適用于相關(guān)產(chǎn)品: OP7100
其它名稱: 20-101-732
20-101-732-ND
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描述
395-030-527-804 CARD EDGE 30POS DL .100X.200 BLK
395-030-527-802 CARD EDGE 30POS DL .100X.200 BLK
395-030-527-801 CARD EDGE 30POS DL .100X.200 BLK
395-030-527-204 CARD EDGE 30POS DL .100X.200 BLK
395-030-527-202 CARD EDGE 30POS DL .100X.200 BLK
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
20-101-0737 制造商:Digi International 功能描述:SMARTBLOCK OEM W/RTC - MOQ: 50 - Bulk 制造商:Digi International Inc 功能描述:SMARTBLOCK OEM W/RTC MOQ: 50 制造商:Rabbit Semiconductor 功能描述:Smartblock OEM w/RTC
20-101-0738 功能描述:單板計(jì)算機(jī) SR9150 Eth 512K SRAM 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-0739 制造商:Digi International 功能描述:BL1700 16IN/16OUT 512K SRAM 256K FLASH - MOQ: 25 - Boxed Product (Development Kits) 制造商:Digi International Inc 功能描述:ETH CTLR BL1700 16I/O 256K FLASH 制造商:Rabbit Semiconductor 功能描述:BL1700 512K SRAM 16 In/Out 256K Flash
20-101-0743 制造商:Digi International Inc 功能描述:SMARTBLOCK OEM W/RTC (ROHS) 制造商:Digi International 功能描述:SMARTBLOCK OEM W/RTC - MOQ: 50 - Bulk 制造商:Digi International Inc 功能描述:SMARTBLOCK OEM W/RTC MOQ: 50 制造商:Rabbit Semiconductor 功能描述:Smartblock OEM w/RTC
20-101-0749 功能描述:單板計(jì)算機(jī) 16 I/O 128K SRAM 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