}
async command void ResourceConfigure.unconfigure[ uint8_t id ]() {
+ call Usart.resetUsart(TRUE);
call Usart.disableSpi();
+ call Usart.resetUsart(FALSE);
}
event void UsartResource.granted[ uint8_t id ]() {
async command uint8_t SpiByte.write( uint8_t tx ) {
uint8_t byte;
- call Usart.disableRxIntr();
+ // we are in spi mode which is configured to have turned off interrupts
+ //call Usart.disableRxIntr();
call Usart.tx( tx );
while( !call Usart.isRxIntrPending() );
+ call Usart.clrRxIntr();
byte = call Usart.rx();
- call Usart.enableRxIntr();
+ //call Usart.enableRxIntr();
return byte;
}
default async command error_t UsartResource.request[ uint8_t id ]() { return FAIL; }
default async command error_t UsartResource.immediateRequest[ uint8_t id ]() { return FAIL; }
default async command error_t UsartResource.release[ uint8_t id ]() { return FAIL; }
- default async command msp430_spi_config_t* Msp430SpiConfigure.getConfig[uint8_t id]() {
+ default async command msp430_spi_union_config_t* Msp430SpiConfigure.getConfig[uint8_t id]() {
return &msp430_spi_default_config;
}
while ( ++m_pos < end ) {
while( !call Usart.isTxIntrPending() );
+ call Usart.clrTxIntr();
call Usart.tx( m_tx_buf ? m_tx_buf[ m_pos ] : 0 );
while( !call Usart.isRxIntrPending() );
+ call Usart.clrRxIntr();
tmp = call Usart.rx();
if ( m_rx_buf )
m_rx_buf[ m_pos - 1 ] = tmp;