kerneltest/e32test/dma/dmasim.cpp
branchRCL_3
changeset 87 2f92ad2dc5db
parent 0 a41df078684a
child 256 c1f20ce4abcf
equal deleted inserted replaced
81:e7d2d738d3c2 87:2f92ad2dc5db
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
   369 	__DMA_ASSERTA(Timer.OneShot(KPeriod, EFalse) == KErrNone);
   369 	__DMA_ASSERTA(Timer.OneShot(KPeriod, EFalse) == KErrNone);
   370 	}
   370 	}
   371 
   371 
   372 void DmacSim::StopEmulation()
   372 void DmacSim::StopEmulation()
   373 	{
   373 	{
   374 	Timer.Cancel();
   374 	// Ensure that timer really is cancelled.
       
   375 	TBool cancelled = EFalse;
       
   376 	do
       
   377 		{
       
   378 		cancelled = Timer.Cancel();
       
   379 		}
       
   380 	while(!cancelled);
   375 	}
   381 	}
   376 
   382 
   377 void DmacSim::TickCB(TAny*)
   383 void DmacSim::TickCB(TAny*)
   378 	{
   384 	{
   379 	DmacSb::DoTransfer();
   385 	DmacSb::DoTransfer();