Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

what this code do pleas

Status
Not open for further replies.

tareqlover

Newbie level 3
Joined
Jul 25, 2009
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
jordan
Activity points
1,311
void Write_To_Modem(struct pak *P);



#int_rda

void serial_isr(){

// c=toupper(getc());
c=fgetc(UART1);
if(!GPRS)
{
rcvbuffer[rcvptr++]=c;
rcvbuffer[rcvptr]='\0';

if (rcvptr==199)
rcvptr=50;
}


if(GPRS)
{
if (c == 0x7e )
{
if(ctr == 0)
{
cnt=0;
ctr=1;
}
else if (ctr == 1)
{
ctr = 0;
Packet.Size=cnt;
cnt=0;
//Packet_Finished=1;
processpacket();
}
} //End of if (c == 0x7e )
else
{

if (ctr==1)
{
if(c==0x7d) //if escaped char
{Pre_7d=1; //Set the flag true
}
else
{
if(Pre_7d==1){c=c^0x20;Pre_7d=0;}//unescape character
Packet.data[cnt]=c;
cnt++;}
}
} //End of else

}

}
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top