Hi,
You can access GPIO by using "GeneralIO" interface... you can use it
something like that....
Module TestC
{
uses interface GeneralIO as Data;
}
and in your configuration file you can do something like this:
components HplGpioC as Pins;
TestC.Data --- > Pins.Data
Further you make another file "HplGpioC.nc" (probably place it in your
platform directory) and here you need to define port definitions
something like this:
configuration HplGpioC {
provides {
interface GeneralIO as Data;
}
}
implementation {
components HplAtm128GeneralIOC as IO; /* This is for an ATMEL based
platform, so should be same for micaz */
Data = IO.PortC0; /* which ever GPIO pin you want to use */
}
I hope this helps. If it works for you, then you can send a confirmation
reply to the help-list about correct operation using the above code so
that if someone else searches the archive list and they get the answer
straight away.
Cheers,
Varun Jain
From: [email protected]
[mailto:[email protected]] On Behalf Of
swaroopa
Sent: Thursday, 5 March 2009 11:06 PM
To: [email protected]
Subject: [Tinyos-help] Programming GPIO in Micaz
I have got Micaz motes with MIB520 gateway and MTS400 sensorboard.I have
to develop application such that some commands are sent to the GPIO of
Micaz But i'm not able to find how the GPIO's can be programmed,the
interfaces used.I'm using the moteworks provided by crossbow itself,but
i'm not able to figure out how some digital commands can be outputted
.Kindly suggest me as to how to proceed.
With regards.
swaroopa
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help