[Tinyos Core WG] Proposed addition to GeneralIO interface

Cory Sharp cory at moteiv.com
Mon Sep 11 13:37:58 PDT 2006


Martin,

I think you're confusing IO state with Output state.  IO state is
either INTPUT or OUTPUT, where you MIGHT consider INPUT equivalent to
FLOATING in the context of OUTPUT.  The output state can be enumerated
as HIGH, LOW, or FLOATING.  However, you probably even want to
eliminate FLOATING as an optional return for the output state query,
because you want to know what the output state is when/if the pin is
made output.

Hope that makes sense,
Cory

On 9/11/06, Martin Turon <mturon at xbow.com> wrote:
>
>
>
>
> Should this useful interface return a bool, or be changed to return an enum:
>
>  Gpio :: getState()
>    returns
>      GPIO_INPUT,
>      GPIO_OUTPUT,
>      GPIO_FLOATING
>
>  // there may be various floating states we should define based on common
> hardware configurations.
>
>  Perhaps this is more HPL than HIL...
>
>  Martin
>
>
>  -----Original Message-----
>  From: tinyos-2.0wg-bounces at Mail.Millennium.Berkeley.EDU on
> behalf of Gilman Tolle
>  Sent: Fri 6/9/2006 10:00 AM
>  To: tinyos-2.0wg at Mail.Millennium.Berkeley.EDU
>  Subject: [Tinyos Core WG] Proposed addition to GeneralIO interface
>
>  The GeneralIO interface doesn't provide a command that can be used to
>  determine the current input/output state of the pin.
>
>  Here's a suggestion for a new command to be added to GeneralIO:
>
>     async command bool isOutput();
>
>  This information is accessible by reading the register bit on the MSP430,
> and
>  I believe it's similarly accessible on the ATmega.
>
>  I found myself wanting this command when building an application to control
>  the states of the GPIO pins remotely.
>
>  Thoughts?
>
>  Gil
>
>  (Obviously, this proposal is intended for after the beta release)
>  _______________________________________________
>  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
>
>


More information about the Tinyos-2.0wg mailing list