المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Code seems to loops indefinitely



C# Programming
12-13-2009, 04:11 PM
I am trying to transmit about 75Kbytes of image data at 115200 baud. Ideally it should take about 5 secs. But this code seems to loop forever. Am I missing something obvious here?


#define rows 288
#define cols 352

for (j=rows-2; j>=0; j-=2)
{
for (i = (j*cols); i> 24) & 0xff;
SendBuffer[1] = (cam_output >> 16) & 0xff;
SendBuffer[2] = (cam_output >> 8) & 0xff;

uart_send(&SendBuffer, 3);

}
}


void uart_send(u8 *DataBufferPtr, unsigned int NumBytes)
{
int i;

for (i=0; i