struct _com_buffer{
int buffer[com_buffer_max+2];
int rbcnt; //counter to read from buffer
int wbcnt; //counter to write from buffer
int1 ok; //buffer data is ok
}com_buffer;
//**data to the buffer**//
void com_buffer_w(int c){
com_buffer.buffer[com_buffer.wbcnt++] =c;
if (com_buffer.wbcnt > com_buffer_max) com_buffer.wbcnt=0;
}
//**read one char from the buffer, the buffer pointer move one step forward**//
int com_buffer_r(void){
int c;
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum