Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

AN2328 Datasheet(PDF) 4 Page - STMicroelectronics

Part # AN2328
Description  HID device coding example
PDF  7 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2328 Datasheet(HTML) 4 Page - STMicroelectronics

  AN2328 Datasheet HTML 1Page - STMicroelectronics AN2328 Datasheet HTML 2Page - STMicroelectronics AN2328 Datasheet HTML 3Page - STMicroelectronics AN2328 Datasheet HTML 4Page - STMicroelectronics AN2328 Datasheet HTML 5Page - STMicroelectronics AN2328 Datasheet HTML 6Page - STMicroelectronics AN2328 Datasheet HTML 7Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 4 / 7 page
background image
Coding example
AN2328
4/7
//Read Attributes from the current device
HIDD_ATTRIBUTES Attributes;
Attributes.Size = sizeof(Attributes);
try {
Result = HidD_GetAttributes (DeviceHandle,&Attributes);
if (!Result)
{
CloseHandle(DeviceHandle);
continue;
}
} catch (...) {
continue;
}
// All information obtained
// Attributes.VendorID
// Attributes.ProductID
// detailData.DevicePath <- Remember for future use
// easy example can be:
if ((Attributes.VendorID
== YOUR_VENDOR_ID) &&
(Attributes.ProductID == YOUR_PRODUCT_ID))
strcpy(your_devicePath, detailData.DevicePath);
} //end of while
1.3
Open device
ReadHandle = CreateFile (your_devicePath,
GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE,
(LPSECURITY_ATTRIBUTES)NULL,
OPEN_EXISTING,
0,
NULL);
1.4
Read device
DWORD BytesRead = 0;
char Report[INPUT_REPORT_SIZE];
bool Result;
memset(&Report, 0, INPUT_REPORT_SIZE);
Result = ReadFile (ReadHandle,Report,sizeof(Report),&BytesRead,NULL);



Html Pages

1 2 3 4 5 6 7


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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