title: Jedi USB project read and write Delphi
body: <p><p>I am using the Jedi usb hid component to connect to, read and write from a HID device. I have been unable to write to the device. I have been using this code.<br /></p>
  
  <pre><code>type
  TReport = Packed record
   ReportID: byte;
   Data: array [0..64] of byte;
   end;
  
  procedure TForm1.Button1Click(Sender: TObject);
  var
   I:integer;
   HidData:TReport;
   written:DWORD;
  begin
  hiddata.ReportID:=0;
  hiddata.Data[0]:=0;
  hiddata.Data[1]:=$80;
    for I := 2 to 64 do
      hiddata.Data[I]:=$FF;
  currentdevice.WriteFile(hiddata,currentdevice.Caps.OutputReportByteLength,written);
  end;
  </code></pre>