In my copy of the T2.1 tree I have
./tos/chips/atm128/Atm128Uart0C.nc:
configuration Atm128Uart0C {
provides interface StdControl;
provides interface UartByte;
provides interface UartStream;
uses interface Counter<TMicro, uint32_t>;
}
implementation{
components new Atm128UartP() as UartP;
StdControl = UartP;
UartByte = UartP;
UartStream = UartP;
UartP.Counter = Counter;
components HplAtm128UartC as HplUartC;
UartP.HplUartTxControl -> HplUartC.Uart0TxControl;
UartP.HplUartRxControl -> HplUartC.Uart0RxControl;
UartP.HplUart -> HplUartC.HplUart0;
components MainC;
MainC.SoftwareInit -> UartP;
}
It references UartP, which is an instance of the generic Atm128UartP. When
we look at ./tos/chips/atm128/Atm128UartP.nc:
we see that it provides Init. The configurage above then wires
MainC.SoftwareInit to UartP.Init and it then gets called when
the system initilizes.
Your module information below says it uses Init and you configuration
doesn't wire it so a few things don't make sense
there.
Take a look at how the Atm Uart code I've reference above deals with Init
and make you code an example of that.
eric
On Mon, Oct 20, 2008 at 3:12 PM, Li, Zhen Li <[EMAIL PROTECTED]> wrote:
> Hi everyone:
>
> I want to use the Atm128Uart0C in T2.1 to control the UART0 in Mica motes
> like micaz or IRIS. Right now my wiring is like this:
>
> In the configuratuon:
>
> components Atm128Uart0C;
> App.UartStdControl -> Atm128Uart0C.StdControl;
> App.UartByte -> Atm128Uart0C.UartByte;
> App.UartStream -> Atm128Uart0C.UartStream;
>
> And in the module file:
> uses {
> interface UartByte;
> interface UartStream;
> interface StdControl as UartStdControl;
> interface Init as Uart0Init;
> }
>
> However, when I compile, there's an error says: Uart0Init.init not
> connected.
>
> How can I wire or connect the Init.init within Atm128UartP.nc? Are the rest
> of the wiring correct? Thanks!
>
> Zhen Li
>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
--
Eric B. Decker
Senior (over 50 :-) Researcher
Autonomous Systems Lab
Jack Baskin School of Engineering
UCSC
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help