vorweg die Kontrolle, ob ich alles richtig verstanden habe:"Ich benutze Delphi zum Programmieren für den IOW40. Procedure TForm1.HidCtlDeviceData wird ja immer ausgelöst wenn ein ReportByte vom Warrior bei Windows ankommt. Der Vorteil ist, dass die procedure if IOWarrior.ReadFile... siehe unten nicht den Prozess blockiert, weil die if-schleife wartet bis ein byte ankommt.
Code: Select all
procedure TForm1.HidCtlDeviceData(HidDev: TJvHidDevice; ReportID: Byte;
const Data: Pointer; Size: Word);
var
IOWarriorInputReport: TIOWarriorIOReport;
BytesRead: Cardinal;
ByteX: integer;
begin
if IOWarrior.ReadFile(IOWarriorInputReport,
IOWarrior.Caps.InputReportByteLength, BytesRead) then
begin
ByteX:= IOWarriorInputReport.IOBits[0];
{Auswertung des Byte}
end;
Ciao Xenar
