But when I try writing to the chip it either fails writing zero bytes or hangs depending on which pipe I write to. For example, I am trying to retrieve the power status. Here is my code:
Code: Select all
char arrReport[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
unsigned long intReturn;
arrReport[0] = 20;
intReturn = IowKitWrite( hndIOW, 1, arrReport, sizeof(arrReport) );
if ( intReturn != sizeof(arrReport) ) {
memLog->Lines->Add( "Failed to write to the IOW. Return = " + String( intReturn ) );
}
else {
memLog->Lines->Add( "Response = " + String( (int)arrReport[1] ) );
}
It just hangs at the write. Am I doing something wrong? I have verified that the handle is open and working at this point.
Here is the information I was able to retrieve from the chip:
Code: Select all
IowKit Version IO-Warrior Kit V1.5
Opening Device...
Opened the device.
There is/are 1 device(s) connected.
Device #1
13697044: Is an unknown IOW (5394)
13697044: Revision 4131
13697044: Serial #00000224
Thanks for the help.