[Tinyos Core WG] Proposed addition to GeneralIO interface

Martin Turon mturon at xbow.com
Mon Sep 11 13:09:30 PDT 2006


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-2.0wg/attachments/20060911/f5f3f4a5/attachment.html


More information about the Tinyos-2.0wg mailing list