Hi All
I would really appreciate if someone can reply and guide me with this

I have read that readDone is signaled when no more buffers are left posted,

and if we post multiple buffers in bufferDone then readStream.read continue
reading from the ADC and does not need to be called again  ? (Please correct
me if I am wrong ?)

I have the following code inside bufferDone where isBuf has been initialised
to 1 in Boot.booted()
when I run this code on a MICAZ I only have bufferDone running once and then
readDone gets signalled (not included here but I just checked that using an
LED)

Can someone please tell me what I am doing wrong here ? plzzzzzzzzzzzz

I am doing high sampling .. ReadStream.read(128) ... and ReadStream is wired
to MicStreamC.... I have changed the ATM128_ADC_PRESCALE_32 to give me such
high sampling.
===============

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


Thanks
Akankshu Dhawan
-- 
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