A N 9 3
282
Rev. 1.4
dcb.fDtrControl = RTS_CONTROL_DISABLE; // dis-assert RTS
bSuccess = SetCommState(hCom, &dcb);
if (!bSuccess)
{ // Handle the error.
printf ("SetCommState failed with error %d.\n", GetLastError());
exit(1);
}
return;
}
void Delay(long iMs)
{
clock_t wait;
// covert ms's to clock_t by mutiplying by CLOCKS_PER_SEC/1000
wait = (clock_t)(iMs*CLOCKS_PER_SEC)/1000;
clock_t goal;
goal = wait + clock();
while( goal > clock() )
;
}
void LoadAndSendPatch(void)
{
char caOutGoing[256];
cpInputRd_temp = SendAndWaitFor("AT&T7\r", cpInputRd, "OK\r\n", 300); // Reset the modem
printf ("Current %s \n", cpInputRd); cpInputRd=cpInputRd_temp;
printf ("Loading patch:%s...\n", fnamePatch);
if ((hpPatchFile = fopen(fnamePatch, "rb")) == NULL)
{
fprintf(stderr, "The Patch File is missing.\n");
exit(1);
}
AssertRTS(true );
cpInputRd=SendAndWaitFor("ATE1\r", cpInputRd, "OK\r\n", 300);
bool bValidLine = true;
while(bValidLine)
{
bValidLine = GetFileTextLine(caOutGoing);
if(bValidLine)
cpInputRd = SendAndWaitFor(caOutGoing, cpInputRd, "OK\r\n", 3000);
}
cpInputRd = SendAndWaitFor("ATE1\r", cpInputRd, "OK\r\n", 300);
cpInputRd_temp = SendAndWaitFor("AT&T6\r", cpInputRd, "OK\r\n", 300);
printf ("Finish Loading, %s \n", cpInputRd); cpInputRd=cpInputRd_temp;
fclose(hpPatchFile);
}
Summary of Contents for Si2404
Page 2: ...AN93 2 Rev 1 4 ...
Page 200: ...AN93 200 Rev 1 4 Figure 31 TAM Handset and Speakerphone Voice Paths ...
Page 201: ...AN93 Rev 1 4 201 Figure 32 Si3000 Codec Gain and Signal Selection Options ...
Page 290: ...AN93 290 Rev 1 4 Figure 57 256 Band Spectral Display Figure 58 2048 Band Spectral Display ...
Page 305: ...AN93 Rev 1 4 305 Figure 76 Parallel or SPI Port Interrupt Service Flowchart ...