Hi All
I am trying to get a continuous sampling using ReadStream and thus I need to
post multiple buffers

I know I need to post the buffers when bufferDone gets signalled. To switch
between the two buffers I am using an IF condition.
I would be grateful to anyone who can tell me what I am doing wrong since
this code piece is not working
After the first set of buffers gets filled it never calls the second buffer
so there is no loop

THanks in advance

Sincerely
Akankshu

=======================================================

 event void ReadStream.bufferDone( error_t result, uint16_t* buffer,
uint16_t count )
  {
if(isBuf1)
     {call ReadStream.postBuffer(buf2,BUF_SIZE);
      isBuf1=0;
     }
else
{call ReadStream.postBuffer(buf1,BUF_SIZE);
isBuf1=1;}

call ReadStream.read(samplePeriod);
  }

-- 
First they ignore you, then they laugh at you, then they fight you, then you
win.
- Mahatma Gandhi
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to