diff -r a5496987b1da -r 189ece41fa29 kerneltest/e32test/iic/iic_psl/i2c.h --- a/kerneltest/e32test/iic/iic_psl/i2c.h Thu Jul 01 17:57:33 2010 +0100 +++ b/kerneltest/e32test/iic/iic_psl/i2c.h Fri Jul 09 13:13:20 2010 +0100 @@ -42,15 +42,15 @@ #endif/*STANDALONE_CHANNEL*/ -#if defined(MASTER_MODE) const TInt KI2cThreadPriority = 5; // Arbitrary, can be 0-7, 7 highest -#endif const TInt16 KI2cSlaveChannelIdBase = 0x1D00; // Arbitrary const TInt KI2cSlaveAsyncDelaySim = 20; // Arbitrary delay, for timer to simulate asynchronous processing -#ifdef MASTER_MODE +//Macros MASTER_MODE and SLAVE_MODE are intentionally omitted from this file +//This is for master and slave stubs to exercise the channel class, +//and we need these stubs for code coverage tests. class DSimulatedIicBusChannelMasterI2c : public DIicBusChannelMaster { // platform specific implementation @@ -87,9 +87,7 @@ #ifndef STANDALONE_CHANNEL TInt8 DSimulatedIicBusChannelMasterI2c::iCurrentChanNum = KI2cChannelNumBase; // Initialise static member of DSimulatedIicBusChannelMasterI2c #endif -#endif/*MASTER_MODE*/ -#ifdef SLAVE_MODE class DSimulatedIicBusChannelSlaveI2c : public DIicBusChannelSlave { public: @@ -150,9 +148,7 @@ NTimer iSlaveTimer; // Used to simulate an asynchronous capture operation TSpinLock iEventSpinLock; // To serialise simulated bus events - Rx, Tx or Rx+Tx }; -#endif/*SLAVE_MODE*/ -#if defined(MASTER_MODE) && defined(SLAVE_MODE) class DSimulatedIicBusChannelMasterSlaveI2c : public DIicBusChannelMasterSlave { public: @@ -163,6 +159,5 @@ TInt StaticExtension(TUint aFunction, TAny* aParam1, TAny* aParam2); }; -#endif/*(MASTER_MODE) && (SLAVE_MODE)*/ #endif /*I2C_H_*/