| Цитата(Иваныч @ 29.12.2008, 11:39) | | Код | TJvHidDevice *CurrentDevice;
void __fastcall TForm1::HidCtlArrival(TJvHidDevice *HidDev) { // Check if it is the target HID interface if((HidDev->Attributes.VendorID == VID) && (HidDev->Attributes.ProductID == PID)) { CurrentDevice = HidDev; // Assign peripheral handle } }
void __fastcall TForm1::SendPacket(unsigned char *Src,unsigned char Length) // Length must be <= 58 ! { unsigned char Buff[60];
Buff[0] = 0x02; // OUT_DATA Buff[1] = Length; // Data size memcpy(&Buff[2],Src,Length); CurrentDevice->SetOutputReport(Buff,61); }
|
|
Иваныч, а откуда этот пример ? |