Hey:
How come a few lines of code in my program is not letting windows recognize my board even though the code is not even being run. Its using the CMX-USB stack.
-Tic Counter is a timer intterupt.
-Sending bits back and forth between my board and PC
Here is the code :
ticCounter = 0 ;
while ( ticCounter < 10 )
{ }
hid_write_report(in_report, &opcode2[0]);
hid_process();
ticCounter = 0 ;
while ( ticCounter < 10 )
{ }
while (!hid_report_pending(out_report))
{
}
ticCounter = 0 ;
while ( indata[0] != 0xc0 && ticCounter < 100 )
{
hid_read_report(out_report, &indata[0]);
}
ticCounter = 0 ;
while ( ticCounter < 10 )
{ }
hid_write_report(in_report, &opcode2[8]);
hid_process();
ticCounter = 0 ;
while ( ticCounter < 10 )
{ }
while (!hid_report_pending(out_report))
{
}
ticCounter = 0 ;
while ( indata[0] != 0xc1 && ticCounter < 100 )
{
hid_read_report(out_report, &indata[0]);
}
Everytime I comment this portion of my code out, my USB is correctly recognized by windows but with this code in, my fails to initialize in windows. This portion of my code is not even supposed to be reached without a command from the PC. How can this inured code cause this? I can give more information. Thanks