kerneltest/e32test/iic/iic_psl/spi.cpp
changeset 90 947f0dc9f7a8
parent 33 0173bcd7697c
child 257 3e88ff8f41d5
child 261 4dbffe5c974e
--- a/kerneltest/e32test/iic/iic_psl/spi.cpp	Tue Feb 02 01:24:03 2010 +0200
+++ b/kerneltest/e32test/iic/iic_psl/spi.cpp	Fri Apr 16 16:24:37 2010 +0300
@@ -19,6 +19,7 @@
 #include <drivers/iic_trace.h>
 #endif
 
+#ifndef STANDALONE_CHANNEL
 #define NUM_CHANNELS 4 // Arbitrary
 
 // Macros to be updated(?) with interaction with Configuration Repository
@@ -26,6 +27,7 @@
 #define CHANNEL_TYPE(n) (KChannelTypeArray[n])	
 const DIicBusChannel::TChannelDuplex KChannelDuplexArray[NUM_CHANNELS] = {DIicBusChannel::EHalfDuplex, DIicBusChannel::EHalfDuplex, DIicBusChannel::EHalfDuplex, DIicBusChannel::EFullDuplex};
 #define CHANNEL_DUPLEX(n) (KChannelDuplexArray[n]) 
+#endif/*STANDALONE_CHANNEL*/
 
 #ifdef LOG_SPI
 #define SPI_PRINT(str) Kern::Printf str
@@ -122,8 +124,10 @@
 	aDes.Copy((TUint8*)&caps,size);
     }
 
+#ifndef STANDALONE_CHANNEL
 // supported channels for this implementation
 static DIicBusChannel* ChannelPtrArray[NUM_CHANNELS];
+#endif
 
 //DECLARE_EXTENSION_WITH_PRIORITY(BUS_IMPLMENTATION_PRIORITY)	
 DECLARE_STANDARD_PDD()		// SPI test driver to be explicitly loaded as an LDD, not kernel extension
@@ -487,10 +491,7 @@
 TInt DSimulatedIicBusChannelMasterSpi::DoSimulatedTransaction()
 	{
 	TInt r = AsynchStateMachine(EHwTransferDone);
-	if(iTimeoutTimer.Cancel() == FALSE)
-		{
-		SPI_PRINT(("timer is not cancelled"));
-		}
+	CancelTimeOut();
 	return r;
 	}