From: [email protected]
To: [email protected]
Subject: LogWrite and interruptions
Date: Thu, 13 Aug 2009 16:59:21 -0400








Hi, i am working with LogStorage implementation of tinyos 2.1 using Tmote Sky 
plataform, i need to enabling interruption of ADC when i am writing a log, 
checking the code of the implementation i found that the bloking code of the 
interruption is here:

  void continueOp() 
  {
    uint8_t end;
    uint8_t tmp;
    atomic 
    {
             call Usart.tx( m_tx_buf ? m_tx_buf[ m_pos ] : 0 );
        end = m_pos + SPI_ATOMIC_SIZE;
        if ( end > m_len )
            end = m_len;
        while ( ++m_pos < end ) 
        {
            while( !call Usart.isRxIntrPending() );
            tmp = call Usart.rx();
            if ( m_rx_buf )
                m_rx_buf[ m_pos - 1 ] = tmp;
            call Usart.tx( m_tx_buf ? m_tx_buf[ m_pos ] : 0 );
        }
    }
  }

This fragment of code belong to the Msp430SpiNoDmaP.nc archive, cheking the 
code i think (i am not sure) that its blocking to avoid the radio to take 
control of the usart (i read in somewhere that flash and radio used the same 
usart port), its safe to make this code no-blocking or i have to considerate 
some restriccion (like disable the radio before using the log write or 
something else)

Guarda correos, fotos, archivos, documentos, todo. ¡Ahora Hotmail te da espacio 
ILIMITADO!
_________________________________________________________________
Ten Messenger en tu celular ahora - Clic Aquí
http://www.messengerentucelu.com
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to