[Tinyos-devel] Proposed UART Changes

Eric Decker cire831 at gmail.com
Fri Jun 19 11:26:57 PDT 2009


On Fri, Jun 19, 2009 at 10:16 AM, Philip Levis <pal at cs.stanford.edu> wrote:

>
> On Jun 18, 2009, at 9:41 PM, Eric Decker wrote:
>
>  So does enableRX/enableTX enable interrupts?  Or does it simply set things
>> up for byte send/receive etc.
>>
>> So is the intent something like:
>>
>> call xxx.enableRX()
>> call UartByte.receive()
>>
>> call xxx.enableTX()
>> call UartByte.send(uint8_t byte)
>>
>> eric
>>
>
> It's at the same level as SerialByteComm; so transmits are split-phase
> operations, receives are events.


That seems to me to argue for interrupts.

This is the crux of the point I'm doing a not very good job of getting
across.

I think which ever way enable/disable{RX,TX} goes, its semantics should be
clear.

I do agree a nice simple presentation that makes it easy for a person
somewhat new to TinyOS to make use of the UART functionality would be very
nice.

I see two ways to go,

one doesn't involve interrupts (not split phase).

the other approach does involve interrupts, is split phase.  I don't see how
to do receive as split phase without
interrupts.  (polling mechanism?  yuck).

Anyway, I'm arguing that the definition of enable{RX,TX}/disable{RX,TX}
spell out what it provides and how to use it.

I'm not attached to whether it involves interrupts or not.

eric



> It's probably more helpful to think of the interface in terms of its
> effects on interface state machines, rather than an implementation. E.g., I
> would assume that disableRx() would prevent future get() events, while
> disableTx() would cause put() calls to return EOFF or some other error code.
>
> Phil
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
Autonomous Systems Lab
Jack Baskin School of Engineering
UCSC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-devel/attachments/20090619/1d255e9f/attachment-0001.htm 


More information about the Tinyos-devel mailing list