[Tinyos Core WG] Small gotcha in UartStream interface

Philip Levis pal at cs.stanford.edu
Fri Oct 20 19:41:57 PDT 2006


On Oct 20, 2006, at 1:36 PM, Phil Buonadonna wrote:

> One of the objective of using UartStream was to enable DMA based data
> transfers.
>
> However the 'receivedByte()' event conflicts with the ability to  
> use DMA
> based receives.  Specifically, there's no way to grab each  
> individual byte
> if a DMA is in progress.
>
> I think the fix is just to change the 'semantics' of this  
> functionality so
> that it CAN'T be used in conjuction with the receive() call.
>
> Thoughts?

Hm. This interface is weird. I sense a race condition. What if you're  
in a receive() call and a new byte arrives? E.g., is the assumption  
that receive() implicitly calls disableReceiveInterrupt()? I think  
that would work. This means that there should be an accessor, though,  
to tell if there are interrupts enabled.

Phil


More information about the Tinyos-2.0wg mailing list