Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/06/01 02:41
Read: times


 
#13062 - RE: Circural buffer
Try this circular buffer,

#define SLEN 64
unsigned char xdata serin_buff[SLEN];
unsigned char data sihead,sitail;

initialize:
sihead = sitail = 0;

to store data:
serin_buff[sihead++ & (SLEN-1)] = SBUF;

to get data:
tmp = serin_buff[sitail++ & (SLEN-1)];


Sakri

List of 7 messages in thread
TopicAuthorDate
Circural buffer            01/01/70 00:00      
RE: Circural buffer            01/01/70 00:00      
RE: Circural buffer            01/01/70 00:00      
RE: Circural buffer            01/01/70 00:00      
RE: Circular buffer            01/01/70 00:00      
RE: Circural buffer            01/01/70 00:00      
RE: Circural buffer            01/01/70 00:00      

Back to Subject List