| 数据搜索系统,热门电子元器件搜索 |
|
AN3224 数据表(PDF) 23 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3224 数据表(HTML) 23 Page - STMicroelectronics |
|
23 / 49 page ![]() AN3224 PR101-USB and MR101-USB reader detection Doc ID 17559 Rev 2 23/49 '- txtDeviceID.Text = "Device-ID : " & lngDeviceId(i) Next i End If '--- analysis if FEIG USB readers are connected and how much If (lngReaderNumber = 0) Then '--- NO FEIG USB device detected ‘txtDetectResult.Text = "No FEIG USB Reader detected" detect_USB_FEIG_reader = False ElseIf (lngReaderNumber > 1) Then '--- TOO MUCH DETECTED FEIG USB READERs ‘txtDetectResult.Text = "Too much FEIG USB Reader detected" detect_USB_FEIG_reader = False ElseIf (lngReaderNumber = 1) Then '--- only One FEIG USB device detected OK glngFEUSBhandle = FEUSB_OpenDevice(lngDeviceId(1)) If (glngFEUSBhandle < 0) Then error = FEUSB_CloseDevice(glngFEUSBhandle) detect_USB_FEIG_reader = False Else lngAttachedDeviceHandle(0) = FEISC_NewReader(glngFEUSBhandle) detect_USB_FEIG_reader = True End If End If End Function 4.4 C/C++ source code example /* global variables */ int iDeviceHandle; int iFeiscHandle; int main () { char sDeviceHandle[32]; char sDeviceName[32]; char sDeviceSerialNumber[32]; char sDeviceFamilyName[32]; char sDevicePresence[2]; DWORD dwDeviceSerialNumber = 0; FEUSB_ClearScanList();/* check USB device connected */ while (FEUSB_Scan(FEUSB_SCAN_FIRST,NULL) < 0) { /* time out to be added toexit while loop If no reader connected */ /*return 0; } /* GetScanListPara : Get Detected FEIG USB device parameters */ FEUSB_GetScanListPara( 0, "DeviceName", sDeviceName ) ; FEUSB_GetScanListPara( 0, "Device-ID", sDeviceSerialNumber ) ; FEUSB_GetScanListPara( 0, "DeviceHnd", sDeviceHandle ) ; |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |