Hi Sid, Because it's platform independent. HplAtm128GeneralIOC maps the IO port of the microcontroller, but there's no guarantee that PW0 is connected to the same microcontroller pin on every mote. Furthermore, it's theoretically possible to create an msp430 based mote with 51 pin connector, and msp430 has the gpio drivers somewhere else.
Andris On Tue, Jan 8, 2013 at 11:50 PM, Sid <[email protected]> wrote: > This works! Thanks a lot for the help. I am using MicaBusC now, but I > didn't understand why I shouldn't use HplAtm128GeneralIOC? I checked with > HplAtm128GeneralIOC and > it works too,though. > > > On Tue, Jan 8, 2013 at 3:21 AM, András Bíró <[email protected]>wrote: > >> Hi, >> >> >> On Tue, Jan 8, 2013 at 1:09 AM, Sid <[email protected]> wrote: >> >>> Hi All, >>> >>> I am fairly new to tinyos 2.x and cannot figure this problem out. I hope >>> someone helps me out with this "dumb question". I am trying to send a pulse >>> using the GPIO(Port C0) of mica2 mote. But when I am trying to compile the >>> code, it gives the error: >>> >>> In file included from MyProgramAppC.nc:10: >>> In component `MyProgramC': >>> MyProgramC.nc:7: interface HplAtm128GeneralIO not found >>> In component `MyProgramAppC': >>> MyProgramAppC.nc:18: no match >>> make: *** [exe0] Error 1 >>> >>> >>> Following are the code snippets: >>> >>> *Wiring:* >>> implementation { >>> .... >>> components HplAtm128GeneralIOC; >>> components MyProgramC as App; >>> >>> .... >>> App.Out1 -> HplAtm128GeneralIOC.PortC0; >>> ..... >>> } >>> >>> *Implementation:* >>> module MyProgramC { >>> ... >>> uses interface HplAtm128GeneralIO as Out1; >>> >> >> Here's your problem. there's no HplAtm128GeneralIO interface, you should >> use the GeneralIO interface here. (By the way, if this gpio is on the 51 >> pin connector, you shouldn't use the component HplAtm128GeneralIOC eighter, >> use the MicaBusC) >> >> Andris >> >> >>> .... >>> } >>> >>> >>> Any help would be greatly appreciated. I could not find anything in the >>> mailing list which will answer this issue. >>> >>> Thanks, >>> John >>> >>> >>> _______________________________________________ >>> Tinyos-help mailing list >>> [email protected] >>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >>> >> >> >
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
