---------- Forwarded message ----------
From: SANG Junjun <[EMAIL PROTECTED]>
Date: Apr 22, 2007 4:15 PM
Subject: Question about HplAt45dbByte.waitIdle() and command bool
HplAt45dbByte.getCompareStatus()
To: David Gay <[EMAIL PROTECTED]>
Hi, David
In file: tinyos-2.x/tos/platforms/mica2/chips/at45db/HplAt45dbIOP.nc
In command void HplAt45dbByte.waitIdle() , why In.get() can get the status
of the flash chip?
command void HplAt45dbByte.waitIdle() {
// Setup interrupt on rising edge of flash in
atomic
{
call InInterrupt.clear();
call InInterrupt.enable();
call Clk.clr();
// We need to wait at least 2 cycles here (because of the signal
// acquisition delay). It's also good to wait a few microseconds
// to get the fast ("FAIL") exit from wait (reads are twice as fast
// with a 2us delay...)
call BusyWait.wait(2);
if (call In.get())
signal InInterrupt.fired(); // already high
}
}
and in command bool HplAt45dbByte.getCompareStatus() why In.get() can
indicate the status?
command bool HplAt45dbByte.getCompareStatus() {
call Clk.set();
call Clk.clr();
// Wait for compare value to propagate
asm volatile("nop");
asm volatile("nop");
return !call In.get();
}
Thank you very much!
--
Best Regards,
SANG JUNJUN
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help