[Tinyos-commits] CVS: tinyos-1.x/tos/platform/telos HPLFlashM.nc,
1.1, 1.2
Jonathan Hui
jwhui at users.sourceforge.net
Thu Jul 21 00:00:18 PDT 2005
Update of /cvsroot/tinyos/tinyos-1.x/tos/platform/telos
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2527
Modified Files:
HPLFlashM.nc
Log Message:
- Poll interrupt bit rather than waiting for some amount of time.
Index: HPLFlashM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/platform/telos/HPLFlashM.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** HPLFlashM.nc 23 Jun 2004 21:07:02 -0000 1.1
--- HPLFlashM.nc 21 Jul 2005 07:00:15 -0000 1.2
***************
*** 87,99 ****
async command uint8_t FlashSPI.txByte(uint8_t spiOut) {
! uint8_t spiIn = 0;
! atomic {
! call USARTControl.isTxIntrPending();
! call USARTControl.rx();
! call USARTControl.tx(spiOut);
! TOSH_uwait(20);
! spiIn = call USARTControl.rx();
! }
! return spiIn;
}
--- 87,94 ----
async command uint8_t FlashSPI.txByte(uint8_t spiOut) {
! call USARTControl.rx();
! call USARTControl.tx(spiOut);
! while( !call USARTControl.isRxIntrPending() );
! return call USARTControl.rx();
}
More information about the Tinyos-commits
mailing list