[Tinyos Core WG] Meeting: September 27
Martin Turon
mturon at xbow.com
Wed Sep 27 01:09:12 PDT 2006
What was the reaction to my suggestion of combining these into one command:
GeneralIO.getState()
returns an enum of possible states: GPIO_INPUT, GPIO_OUTPUT, ...
Then all about the GPIO pin can be gleaned from one call.
Martin
-----Original Message-----
From: tinyos-2.0wg-bounces at Mail.Millennium.Berkeley.EDU on behalf of Jonathan Hui
Sent: Tue 9/26/2006 11:09 PM
To: Joe Polastre
Cc: TinyOS Core WG; Philip Levis
Subject: Re: [Tinyos Core WG] Meeting: September 27
Okay. Makes sense to have both. So for the TEP, it suffices to say that
if it's neither input or output then the pin is in some other MCU
defined state. Whether it be a hardware limitation or it is configured
to function with some module, etc.
--
Jonathan Hui
jhui at archrock.com
Joe Polastre wrote:
> Not all I/O's have the capability of being both input and output.
> Just because the pin is not input does not mean it is output, and vice
> versa. If my pin is an ADC (and configured as such using something
> like ADC.bindPort by another module in the system), such as on the
> MSP430, and I call "isInput()" and it returns false, what does that
> mean? The pin is NOT output!
>
> Furthermore, if I care about whether a pin is output, writing a
> statement like:
> if (!call GeneralIO.isInput()) {
> //
> }
> is not a natural method or intuitive of programming.
>
>
>
> -Joe
>
> On 9/26/06, Jonathan Hui <jhui at archrock.com> wrote:
>>
>> Is this to support cases where a pin is set to neither an input or
>> output? e.g. module-func? It's easy to add. But how do you set it to
>> something other than input or output? Is this microcontroller specific?
>>
>> --
>> Jonathan Hui
>> jhui at archrock.com
>>
>> Joe Polastre wrote:
>> > Please add isOutput() in addition to isInput().
>> >
>> > On 9/26/06, Jonathan Hui <jhui at archrock.com> wrote:
>> >>
>> >> Checked in to the devel branch.
>> >>
>> >> --
>> >> Jonathan Hui
>> >> jhui at archrock.com
>> >>
>> >> Philip Levis wrote:
>> >> > On Sep 26, 2006, at 9:54 PM, Jonathan Hui wrote:
>> >> >
>> >> >>
>> >> >> Updated TEP117.
>> >> >>
>> >> >> - added UART
>> >> >> - updated interfaces to match tinyos-2.x (though SpiByte still
>> returns
>> >> >> error_t in the code).
>> >> >> - added isInput() to GeneralIO.
>> >> >>
>> >> >> Is there something else that we agreed to update before looking
>> at it
>> >> >> again?
>> >> >>
>> >> >
>> >> > I don't see it in the repository.
>> >> >
>> >> > Phil
>> >> >
>> >> _______________________________________________
>> >> Tinyos-2.0wg mailing list
>> >> Tinyos-2.0wg at Mail.Millennium.Berkeley.EDU
>> >>
>> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-2.0wg
>>
>> >>
>> >>
>> >
>>
>
_______________________________________________
Tinyos-2.0wg mailing list
Tinyos-2.0wg at Mail.Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-2.0wg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-2.0wg/attachments/20060927/8e67d2a7/attachment.htm
More information about the Tinyos-2.0wg
mailing list