Hi,
You should use UARTC component, I have sample code for msp430 tmote:
You use the interface UartByte or UartStream
##############################
configuration UartGPSC {
provides interface StdControl;
provides interface UartStream;
provides interface UartByte;
}
implementation {
components new Msp430Uart0C() as UartC, MainC;
UartStream = UartC;
UartByte = UartC;
components UartGPSP;
StdControl = UartGPSP;
UartGPSP.Msp430UartConfigure <- UartC.Msp430UartConfigure;
UartGPSP.Resource -> UartC.Resource;
}
module UartGPSP {
provides interface StdControl;
provides interface Msp430UartConfigure;
uses interface Resource;
}
implementation {
msp430_uart_union_config_t msp430_uart_gps_config = { {ubr: UBR_1MHZ_4800,
umctl: UMCTL_1MHZ_4800, ssel: 0x02, pena: 0, pev: 0, spb: 0, clen: 1,
listen: 0, mm: 0, ckpl: 0, urxse: 0, urxeie: 1, urxwie: 0, utxe : 1, urxe :
1} };
command error_t StdControl.start(){
return call Resource.immediateRequest();
}
command error_t StdControl.stop(){
call Resource.release();
return SUCCESS;
}
event void Resource.granted(){}
async command msp430_uart_union_config_t* Msp430UartConfigure.getConfig()
{
return &msp430_uart_gps_config;
}
}
################################
On Mon, Jul 19, 2010 at 9:41 PM, Wally <[email protected]> wrote:
> Hey guys,
>
> Sorry this is most likely a very easy question to answer, however the
> abstractions are leading me in circles.
>
> Is there a way to directly write a byte to serial (platform-independently)
> and also receive a byte, without any of the headers, ack, or any other
> overheads? Code example?
>
> Thankyou for the assistance,
> Wally
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
--
Ing. Guillermo De Cesco
Invenio Ingenieria srl.
tel: (54)2944 442119
cel:(54)2944 15534750
web: www.invenioing.com
Av. Pioneros 4163 Dpto 6. CP(R8402AMH)
San Carlos de Bariloche.
Rio Negro, Argentina.
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help