Revision: 201005 PDK_3.0.g
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 01:39:10 +0200
changeset 0 cec860690d41
child 1 d315ea46deb5
child 4 d17b4c0804b9
child 5 991e374445d0
child 11 95831389e787
Revision: 201005 Kit: 201005
boardsupport_info/boardsupport_metadata/boardsupport_metadata.mrp
emulator/emulatorbsp/base_wins.history.xml
emulator/emulatorbsp/base_wins.mrp
emulator/emulatorbsp/bld.inf
emulator/emulatorbsp/bwins/econsnoguiU.def
emulator/emulatorbsp/bwins/vwinsu.def
emulator/emulatorbsp/bwins/winsguiu.def
emulator/emulatorbsp/cakdwins.mmp
emulator/emulatorbsp/displayldd.mmp
emulator/emulatorbsp/documentation/wins_ether_drv_howto.txt
emulator/emulatorbsp/econsnogui.mmp
emulator/emulatorbsp/emuldrives.zip
emulator/emulatorbsp/enet.mmp
emulator/emulatorbsp/epbusv.mmp
emulator/emulatorbsp/estart.mmp
emulator/emulatorbsp/estart/estart.txt
emulator/emulatorbsp/estart/estartmain.cpp
emulator/emulatorbsp/hal/config.hcf
emulator/emulatorbsp/hal/hal.cpp
emulator/emulatorbsp/hal/hal.mmp
emulator/emulatorbsp/hal/values.hda
emulator/emulatorbsp/hcr/hcr.mmp
emulator/emulatorbsp/hcr/hcr_psl.cpp
emulator/emulatorbsp/hcr/hcr_psl_config.cpp
emulator/emulatorbsp/hcr/hcrconfig.h
emulator/emulatorbsp/inc/display_chan.h
emulator/emulatorbsp/inc/display_dev.h
emulator/emulatorbsp/inc/displayhandler.h
emulator/emulatorbsp/inc/gui.h
emulator/emulatorbsp/inc/mconf.h
emulator/emulatorbsp/inc/monitors.h
emulator/emulatorbsp/inc/nand_fbr_offset.h
emulator/emulatorbsp/inc/nand_plat.h
emulator/emulatorbsp/inc/variant.h
emulator/emulatorbsp/inc/variantmediadef.h
emulator/emulatorbsp/inc/vwins.h
emulator/emulatorbsp/inc/winsgui.h
emulator/emulatorbsp/medlfs.mmp
emulator/emulatorbsp/serialldd.mmp
emulator/emulatorbsp/serialpdd.mmp
emulator/emulatorbsp/soundsc.mmp
emulator/emulatorbsp/specific/display_chan.cpp
emulator/emulatorbsp/specific/display_dev.cpp
emulator/emulatorbsp/specific/econsnogui.cpp
emulator/emulatorbsp/specific/epoc32.ico
emulator/emulatorbsp/specific/ethernet.cpp
emulator/emulatorbsp/specific/gui.cpp
emulator/emulatorbsp/specific/gui.rc
emulator/emulatorbsp/specific/hand.cur
emulator/emulatorbsp/specific/keyboard.cpp
emulator/emulatorbsp/specific/keymap.cpp
emulator/emulatorbsp/specific/lffsdev.cpp
emulator/emulatorbsp/specific/mmc.cpp
emulator/emulatorbsp/specific/mmci.h
emulator/emulatorbsp/specific/mmcv.cpp
emulator/emulatorbsp/specific/multitouch.cpp
emulator/emulatorbsp/specific/multitouch.h
emulator/emulatorbsp/specific/multitouchwindowsheader.h
emulator/emulatorbsp/specific/nanddev.cpp
emulator/emulatorbsp/specific/property.cpp
emulator/emulatorbsp/specific/resource.h
emulator/emulatorbsp/specific/sdcard/sdcard3c/pp_sdc.cpp
emulator/emulatorbsp/specific/sdcard/sdcard3c/pp_sdc.h
emulator/emulatorbsp/specific/sdcard/sdcard3c/pp_sdcv.cpp
emulator/emulatorbsp/specific/sdcard/sdcard3c/sdio/pp_sdio.cpp
emulator/emulatorbsp/specific/sdcard/sdcard3c/sdio/pp_sdio.h
emulator/emulatorbsp/specific/sdcard/sdcard3c/sdio/pp_sdiov.cpp
emulator/emulatorbsp/specific/sdcard/sdcard4c/pp_cprm.cpp
emulator/emulatorbsp/specific/sdcard/sdcard4c/pp_cprm.h
emulator/emulatorbsp/specific/sdcard/sdcard4c/pp_cprmv.cpp
emulator/emulatorbsp/specific/serialldd.cpp
emulator/emulatorbsp/specific/serialpdd.cpp
emulator/emulatorbsp/specific/soundsc_rx.cpp
emulator/emulatorbsp/specific/soundsc_tx.cpp
emulator/emulatorbsp/specific/timer.cpp
emulator/emulatorbsp/specific/variant.cpp
emulator/emulatorbsp/specific/winscomm.h
emulator/emulatorbsp/specific/winscomm.inl
emulator/emulatorbsp/specific/winssoundsc.h
emulator/emulatorbsp/test/bld.inf
emulator/emulatorbsp/test/exdriver/exdriver_pio/group/d_expio_pdd_emul.mmp
emulator/emulatorbsp/test/exdriver/exdriver_pio/inc/d_expio_emul.h
emulator/emulatorbsp/test/exdriver/exdriver_pio/src/d_expio_emul.cpp
emulator/emulatorbsp/test/exdriver/exdriver_wins.inf
emulator/emulatorbsp/test/variant_test.mmh
emulator/emulatorbsp/variant.mmh
emulator/emulatorbsp/vwins.mmp
emulator/emulatorbsp/win_drive.mmp
emulator/emulatorbsp/win_drive/common.h
emulator/emulatorbsp/win_drive/generic_block_media.cpp
emulator/emulatorbsp/win_drive/readme.txt
emulator/emulatorbsp/win_drive/settings_manager.cpp
emulator/emulatorbsp/win_drive/settings_manager.h
emulator/emulatorbsp/win_drive/win_drive.ini
emulator/emulatorbsp/win_drive/win_drive_ext.cpp
emulator/emulatorbsp/win_drive/win_drive_ext.h
emulator/emulatorbsp/win_drive/win_media.h
emulator/emulatorbsp/win_drive/win_media_device.cpp
emulator/emulatorbsp/win_drive/win_media_device.h
emulator/emulatorbsp/wins.mbc
emulator/emulatorbsp/winscw.mbc
emulator/emulatorbsp/winsgui.mmp
emulator/emulatorbsp/wpdpack/drivers/winpcap.exe
emulator/emulatorbsp/wpdpack/include/Win32-Extensions.h
emulator/emulatorbsp/wpdpack/include/bittypes.h
emulator/emulatorbsp/wpdpack/include/bucket_lookup.h
emulator/emulatorbsp/wpdpack/include/count_packets.h
emulator/emulatorbsp/wpdpack/include/devioctl.h
emulator/emulatorbsp/wpdpack/include/gnuc.h
emulator/emulatorbsp/wpdpack/include/ip6_misc.h
emulator/emulatorbsp/wpdpack/include/memory_t.h
emulator/emulatorbsp/wpdpack/include/normal_lookup.h
emulator/emulatorbsp/wpdpack/include/ntddndis.h
emulator/emulatorbsp/wpdpack/include/ntddpack.h
emulator/emulatorbsp/wpdpack/include/packet32.h
emulator/emulatorbsp/wpdpack/include/pcap-bpf.h
emulator/emulatorbsp/wpdpack/include/pcap-int.h
emulator/emulatorbsp/wpdpack/include/pcap-stdinc.h
emulator/emulatorbsp/wpdpack/include/pcap.h
emulator/emulatorbsp/wpdpack/include/remote-ext.h
emulator/emulatorbsp/wpdpack/include/tcp_session.h
emulator/emulatorbsp/wpdpack/include/time_calls.h
emulator/emulatorbsp/wpdpack/include/tme.h
emulator/emulatorbsp/wpdpack/lib/libwpcap.a
emulator/emulatorbsp/wpdpack/lib/packet.a
emulator/emulatorbsp/wpdpack/lib/packet.lib
emulator/emulatorbsp/wpdpack/lib/wpcap.lib
emulator/emulatorbsp/wpdpack/readme-cygwin.txt
emulator/emulatorbsp/wpdpack/readme.txt
haitest/bspsvs/group/bspsvs.mrp
haitest/bspsvs/group/release.txt
haitest/bspsvs/suite/bsp/digitiser/group/bld.inf
haitest/bspsvs/suite/bsp/digitiser/group/t_digitiser.iby
haitest/bspsvs/suite/bsp/digitiser/group/t_digitiser.mmp
haitest/bspsvs/suite/bsp/digitiser/group/t_digitiser.oby
haitest/bspsvs/suite/bsp/digitiser/group/t_digitiser_binaries.iby
haitest/bspsvs/suite/bsp/digitiser/group/t_digitiser_testdata.iby
haitest/bspsvs/suite/bsp/digitiser/group/user_input.oby
haitest/bspsvs/suite/bsp/digitiser/group/user_romfiles.txt
haitest/bspsvs/suite/bsp/digitiser/inc/T_DigitiserDriverData.h
haitest/bspsvs/suite/bsp/digitiser/inc/T_DigitiserDriverServer.h
haitest/bspsvs/suite/bsp/digitiser/inc/T_DigitiserDriverServer.inl
haitest/bspsvs/suite/bsp/digitiser/pkg/t_digitiser.bat
haitest/bspsvs/suite/bsp/digitiser/scripts/base-bsp-digitiser-driver-automated.script
haitest/bspsvs/suite/bsp/digitiser/scripts/base-bsp-digitiser-driver-manual.script
haitest/bspsvs/suite/bsp/digitiser/scripts/base-bsp-digitiser-driver.script
haitest/bspsvs/suite/bsp/digitiser/src/T_DigitiserDriverData.cpp
haitest/bspsvs/suite/bsp/digitiser/src/T_DigitiserDriverServer.cpp
haitest/bspsvs/suite/bsp/digitiser/testdata/base-bsp-digitiser-driver-automated.ini
haitest/bspsvs/suite/bsp/digitiser/testdata/base-bsp-digitiser-driver-manual.ini
haitest/bspsvs/suite/bsp/digitiser/testdata/devlon52/t_digitiser.ini
haitest/bspsvs/suite/bsp/digitiser/testdata/devlon52/t_digitiser.tcs
haitest/bspsvs/suite/bsp/digitiser/testdata/h4hrp/t_digitiser.ini
haitest/bspsvs/suite/bsp/digitiser/testdata/h4hrp/t_digitiser.tcs
haitest/bspsvs/suite/bsp/digitiser/testdata/h6hrp/t_digitiser.ini
haitest/bspsvs/suite/bsp/digitiser/testdata/h6hrp/t_digitiser.tcs
haitest/bspsvs/suite/bsp/group/bld.inf
haitest/bspsvs/suite/bsp/keypad/group/T_Keypad.mmp
haitest/bspsvs/suite/bsp/keypad/group/bld.inf
haitest/bspsvs/suite/bsp/keypad/group/t_keypad.iby
haitest/bspsvs/suite/bsp/keypad/group/t_keypad.oby
haitest/bspsvs/suite/bsp/keypad/group/t_keypad_binaries.iby
haitest/bspsvs/suite/bsp/keypad/group/t_keypad_testdata.iby
haitest/bspsvs/suite/bsp/keypad/group/user_input.oby
haitest/bspsvs/suite/bsp/keypad/inc/T_KeypadDriverData.h
haitest/bspsvs/suite/bsp/keypad/inc/T_KeypadDriverServer.h
haitest/bspsvs/suite/bsp/keypad/inc/T_KeypadDriverServer.inl
haitest/bspsvs/suite/bsp/keypad/pkg/t_keypad.bat
haitest/bspsvs/suite/bsp/keypad/scripts/BASE-BSP-KEYPAD-DRIVER-AUTOMATED.script
haitest/bspsvs/suite/bsp/keypad/scripts/BASE-BSP-KEYPAD-DRIVER-MANUAL.script
haitest/bspsvs/suite/bsp/keypad/scripts/BASE-BSP-KEYPAD-DRIVER.script
haitest/bspsvs/suite/bsp/keypad/src/T_KeypadDriverData.cpp
haitest/bspsvs/suite/bsp/keypad/src/T_KeypadDriverServer.cpp
haitest/bspsvs/suite/bsp/keypad/testdata/BASE-BSP-KEYPAD-DRIVER.ini
haitest/bspsvs/suite/bsp/keypad/testdata/devlon52/t_keypad.ini
haitest/bspsvs/suite/bsp/keypad/testdata/devlon52/t_keypad.tcs
haitest/bspsvs/suite/bsp/keypad/testdata/h4hrp/t_keypad.ini
haitest/bspsvs/suite/bsp/keypad/testdata/h4hrp/t_keypad.tcs
haitest/bspsvs/suite/bsp/keypad/testdata/h6hrp/t_keypad.ini
haitest/bspsvs/suite/bsp/keypad/testdata/h6hrp/t_keypad.tcs
haitest/bspsvs/suite/bsp/keypad/testdata/merlin/t_keypad.ini
haitest/bspsvs/suite/bsp/keypad/testdata/merlin/t_keypad.tcs
haitest/bspsvs/suite/bsp/lcd/group/T_Screen.mmp
haitest/bspsvs/suite/bsp/lcd/group/bld.inf
haitest/bspsvs/suite/bsp/lcd/group/t_screen.iby
haitest/bspsvs/suite/bsp/lcd/group/t_screen.oby
haitest/bspsvs/suite/bsp/lcd/group/t_screen_binaries.iby
haitest/bspsvs/suite/bsp/lcd/group/t_screen_testdata.iby
haitest/bspsvs/suite/bsp/lcd/group/user_input.oby
haitest/bspsvs/suite/bsp/lcd/group/user_romfiles.txt
haitest/bspsvs/suite/bsp/lcd/inc/T_ScreenDriverData.h
haitest/bspsvs/suite/bsp/lcd/inc/T_ScreenDriverServer.h
haitest/bspsvs/suite/bsp/lcd/inc/T_ScreenDriverServer.inl
haitest/bspsvs/suite/bsp/lcd/pkg/t_screen.bat
haitest/bspsvs/suite/bsp/lcd/scripts/base-bsp-screen-driver-mode-automated.script
haitest/bspsvs/suite/bsp/lcd/scripts/base-bsp-screen-driver-mode-manual.script
haitest/bspsvs/suite/bsp/lcd/scripts/base-bsp-screen-driver-modeless-automated.script
haitest/bspsvs/suite/bsp/lcd/scripts/base-bsp-screen-driver.script
haitest/bspsvs/suite/bsp/lcd/src/T_ScreenDriverData.cpp
haitest/bspsvs/suite/bsp/lcd/src/T_ScreenDriverServer.cpp
haitest/bspsvs/suite/bsp/lcd/testdata/base-bsp-screen-driver-mode.ini
haitest/bspsvs/suite/bsp/lcd/testdata/base-bsp-screen-driver-modeless.ini
haitest/bspsvs/suite/bsp/lcd/testdata/devlon52/armv5/t_screen.ini
haitest/bspsvs/suite/bsp/lcd/testdata/devlon52/armv5/t_screen.tcs
haitest/bspsvs/suite/bsp/lcd/testdata/h4hrp/armv5/t_screen.ini
haitest/bspsvs/suite/bsp/lcd/testdata/h4hrp/armv5/t_screen.tcs
haitest/bspsvs/suite/bsp/lcd/testdata/h6hrp/armv5/t_screen.ini
haitest/bspsvs/suite/bsp/lcd/testdata/h6hrp/armv5/t_screen.tcs
haitest/bspsvs/suite/bsp/mmc/group/bld.inf
haitest/bspsvs/suite/bsp/mmc/group/t_mmcsd.iby
haitest/bspsvs/suite/bsp/mmc/group/t_mmcsd.mmp
haitest/bspsvs/suite/bsp/mmc/group/t_mmcsd.oby
haitest/bspsvs/suite/bsp/mmc/group/t_mmcsd_binaries.iby
haitest/bspsvs/suite/bsp/mmc/group/t_mmcsd_testdata.iby
haitest/bspsvs/suite/bsp/mmc/group/user_input.oby
haitest/bspsvs/suite/bsp/mmc/group/user_romfiles.txt
haitest/bspsvs/suite/bsp/mmc/inc/ActiveCallbackWrap.h
haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDDriverData.h
haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDDriverServer.h
haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDDriverServer.inl
haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDMediaChangeDriverData.h
haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDPsuBaseDriverData.h
haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDPsuDriverData.h
haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDSessionData.h
haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDSocketDriverData.h
haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDStackDriverData.h
haitest/bspsvs/suite/bsp/mmc/ldd/group/bld.inf
haitest/bspsvs/suite/bsp/mmc/ldd/group/d_mmcsdif.mmp
haitest/bspsvs/suite/bsp/mmc/ldd/inc/LddAsyncRequest.h
haitest/bspsvs/suite/bsp/mmc/ldd/inc/MmcTestUtils.h
haitest/bspsvs/suite/bsp/mmc/ldd/inc/d_mmcsdif.h
haitest/bspsvs/suite/bsp/mmc/ldd/inc/d_mmcsdif.inl
haitest/bspsvs/suite/bsp/mmc/ldd/inc/mmcldd.h
haitest/bspsvs/suite/bsp/mmc/ldd/src/LddAsyncRequest.cpp
haitest/bspsvs/suite/bsp/mmc/ldd/src/MMcKernelTestUtils.cpp
haitest/bspsvs/suite/bsp/mmc/ldd/src/d_mmcsdif.cpp
haitest/bspsvs/suite/bsp/mmc/ldd/src/mmclddmediachange.cpp
haitest/bspsvs/suite/bsp/mmc/ldd/src/mmclddpsu.cpp
haitest/bspsvs/suite/bsp/mmc/ldd/src/mmclddsocket.cpp
haitest/bspsvs/suite/bsp/mmc/ldd/src/mmclddstack.cpp
haitest/bspsvs/suite/bsp/mmc/pkg/t_mmc.bat
haitest/bspsvs/suite/bsp/mmc/pkg/t_sd.bat
haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.script
haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-MMC-MEDIACHANGE-DRIVER.script
haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-MMC-PSU-DRIVER.script
haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-MMC-PSUBASE-DRIVER.script
haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.script
haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-MMC-SOCKET-DRIVER.script
haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-MMC-STACK-DRIVER-MANUAL.script
haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-MMC-STACK-DRIVER.script
haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.script
haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-SD-MEDIACHANGE-DRIVER.script
haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-SD-PSU-DRIVER.script
haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-SD-PSUBASE-DRIVER.script
haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-SD-SOCKET-DRIVER-MANUAL.script
haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-SD-SOCKET-DRIVER.script
haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-SD-STACK-DRIVER-MANUAL.script
haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-SD-STACK-DRIVER.script
haitest/bspsvs/suite/bsp/mmc/src/ActiveCallbackWrap.cpp
haitest/bspsvs/suite/bsp/mmc/src/T_MmcSDDriverData.cpp
haitest/bspsvs/suite/bsp/mmc/src/T_MmcSDDriverServer.cpp
haitest/bspsvs/suite/bsp/mmc/src/T_MmcSDMediaChangeDriverData.cpp
haitest/bspsvs/suite/bsp/mmc/src/T_MmcSDPsuBaseDriverData.cpp
haitest/bspsvs/suite/bsp/mmc/src/T_MmcSDPsuDriverData.cpp
haitest/bspsvs/suite/bsp/mmc/src/T_MmcSDSessionData.cpp
haitest/bspsvs/suite/bsp/mmc/src/T_MmcSDSocketDriverData.cpp
haitest/bspsvs/suite/bsp/mmc/src/T_MmcSDStackDriverData.cpp
haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.ini
haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-MMC-MEDIACHANGE-DRIVER.ini
haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-MMC-PSU-DRIVER.ini
haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-MMC-PSUBASE-DRIVER.ini
haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.ini
haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-MMC-SOCKET-DRIVER.ini
haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-MMC-STACK-DRIVER-MANUAL.ini
haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-MMC-STACK-DRIVER.ini
haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.ini
haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-SD-MEDIACHANGE-DRIVER.ini
haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-SD-PSU-DRIVER.ini
haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-SD-PSUBASE-DRIVER.ini
haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-SD-SOCKET-DRIVER-MANUAL.ini
haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-SD-SOCKET-DRIVER.ini
haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-SD-STACK-DRIVER-MANUAL.ini
haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-SD-STACK-DRIVER.ini
haitest/bspsvs/suite/bsp/mmc/testdata/devlon52/mmc/t_mmc.ini
haitest/bspsvs/suite/bsp/mmc/testdata/devlon52/sd/t_sd.ini
haitest/bspsvs/suite/bsp/mmc/testdata/devlon52/t_mmcsd.tcs
haitest/bspsvs/suite/bsp/mmc/testdata/h4hrp/mmc/t_mmc.ini
haitest/bspsvs/suite/bsp/mmc/testdata/h4hrp/sd/t_sd.ini
haitest/bspsvs/suite/bsp/mmc/testdata/h4hrp/t_mmcsd.tcs
haitest/bspsvs/suite/bsp/mmc/testdata/h6hrp/mmc/t_mmc.ini
haitest/bspsvs/suite/bsp/mmc/testdata/h6hrp/sd/t_sd.ini
haitest/bspsvs/suite/bsp/mmc/testdata/h6hrp/t_mmcsd.tcs
haitest/bspsvs/suite/bsp/sound/group/bld.inf
haitest/bspsvs/suite/bsp/sound/group/t_sound.iby
haitest/bspsvs/suite/bsp/sound/group/t_sound.mmp
haitest/bspsvs/suite/bsp/sound/group/t_sound.oby
haitest/bspsvs/suite/bsp/sound/group/t_sound_binaries.iby
haitest/bspsvs/suite/bsp/sound/group/t_sound_testdata.iby
haitest/bspsvs/suite/bsp/sound/group/user_input.oby
haitest/bspsvs/suite/bsp/sound/group/user_romfiles.txt
haitest/bspsvs/suite/bsp/sound/inc/sound_util.h
haitest/bspsvs/suite/bsp/sound/inc/t_currentsoundformatdata.h
haitest/bspsvs/suite/bsp/sound/inc/t_mdadevsounddata.h
haitest/bspsvs/suite/bsp/sound/inc/t_soundactivecallback.h
haitest/bspsvs/suite/bsp/sound/inc/t_sounddriverserver.h
haitest/bspsvs/suite/bsp/sound/inc/t_sounddriverserver.inl
haitest/bspsvs/suite/bsp/sound/inc/t_soundformatssupporteddata.h
haitest/bspsvs/suite/bsp/sound/pkg/t_sound.bat
haitest/bspsvs/suite/bsp/sound/scripts/base-bsp-sound-driver-automated.script
haitest/bspsvs/suite/bsp/sound/scripts/base-bsp-sound-driver-manual.script
haitest/bspsvs/suite/bsp/sound/scripts/base-bsp-sound-driver.script
haitest/bspsvs/suite/bsp/sound/src/sound_util.cpp
haitest/bspsvs/suite/bsp/sound/src/t_currentsoundformatdata.cpp
haitest/bspsvs/suite/bsp/sound/src/t_mdadevsounddata.cpp
haitest/bspsvs/suite/bsp/sound/src/t_soundactivecallback.cpp
haitest/bspsvs/suite/bsp/sound/src/t_sounddriverserver.cpp
haitest/bspsvs/suite/bsp/sound/src/t_soundformatssupporteddata.cpp
haitest/bspsvs/suite/bsp/sound/testdata/base-bsp-sound-driver.ini
haitest/bspsvs/suite/bsp/sound/testdata/h4hrp/armv5/t_sound.ini
haitest/bspsvs/suite/bsp/sound/testdata/h4hrp/armv5/t_sound.tcs
haitest/bspsvs/suite/bsp/sound/testdata/h6hrp/t_sound.ini
haitest/bspsvs/suite/bsp/sound/testdata/h6hrp/t_sound.tcs
haitest/bspsvs/suite/bsp/uart/group/bld.inf
haitest/bspsvs/suite/bsp/uart/group/t_serial.iby
haitest/bspsvs/suite/bsp/uart/group/t_serial.mmp
haitest/bspsvs/suite/bsp/uart/group/t_serial.oby
haitest/bspsvs/suite/bsp/uart/group/t_serial_binaries.iby
haitest/bspsvs/suite/bsp/uart/group/t_serial_testdata.iby
haitest/bspsvs/suite/bsp/uart/group/uartscript.mk
haitest/bspsvs/suite/bsp/uart/group/uartscript.pl
haitest/bspsvs/suite/bsp/uart/group/user_input.oby
haitest/bspsvs/suite/bsp/uart/group/user_romfiles.txt
haitest/bspsvs/suite/bsp/uart/inc/T_SerialDriverServer.h
haitest/bspsvs/suite/bsp/uart/inc/T_SerialDriverServer.inl
haitest/bspsvs/suite/bsp/uart/pkg/t_serial.bat
haitest/bspsvs/suite/bsp/uart/scripts/base-bsp-serial-driver-baud.script
haitest/bspsvs/suite/bsp/uart/scripts/base-bsp-serial-driver-port.script
haitest/bspsvs/suite/bsp/uart/scripts/base-bsp-serial-driver-stress.script
haitest/bspsvs/suite/bsp/uart/scripts/base-bsp-serial-driver.script
haitest/bspsvs/suite/bsp/uart/src/T_SerialDriverServer.cpp
haitest/bspsvs/suite/bsp/uart/testdata/base-bsp-serial-driver-baud.ini
haitest/bspsvs/suite/bsp/uart/testdata/base-bsp-serial-driver-port.ini
haitest/bspsvs/suite/bsp/uart/testdata/base-bsp-serial-driver-stress.ini
haitest/bspsvs/suite/bsp/uart/testdata/devlon52/armv5/t_serial.ini
haitest/bspsvs/suite/bsp/uart/testdata/devlon52/armv5/t_serial.tcs
haitest/bspsvs/suite/bsp/uart/testdata/devlon52/armv5/t_serialdevice.iby
haitest/bspsvs/suite/bsp/uart/testdata/h4hrp/armv5/t_serial.ini
haitest/bspsvs/suite/bsp/uart/testdata/h4hrp/armv5/t_serial.tcs
haitest/bspsvs/suite/bsp/uart/testdata/h4hrp/armv5/t_serialdevice.iby
haitest/bspsvs/suite/bsp/uart/testdata/h6hrp/armv5/t_serial.ini
haitest/bspsvs/suite/bsp/uart/testdata/h6hrp/armv5/t_serial.tcs
haitest/bspsvs/suite/bsp/uart/testdata/h6hrp/armv5/t_serialdevice.iby
haitest/bspsvs/suite/bsp/uart/testdata/t_echoserver.ini
haitest/bspsvs/suite/bsp/usb/group/bld.inf
haitest/bspsvs/suite/bsp/usb/group/t_usb.iby
haitest/bspsvs/suite/bsp/usb/group/t_usb.mmp
haitest/bspsvs/suite/bsp/usb/group/t_usb.oby
haitest/bspsvs/suite/bsp/usb/group/t_usb_binaries.iby
haitest/bspsvs/suite/bsp/usb/group/t_usb_testdata.iby
haitest/bspsvs/suite/bsp/usb/inc/t_e32Server.h
haitest/bspsvs/suite/bsp/usb/inc/t_e32server.inl
haitest/bspsvs/suite/bsp/usb/pkg/t_usb.bat
haitest/bspsvs/suite/bsp/usb/scripts/base-bsp-usb-validation-automated.script
haitest/bspsvs/suite/bsp/usb/src/t_e32server.cpp
haitest/bspsvs/suite/bsp/usb/testdata/base-bsp-usb-validation-automated.ini
haitest/bspsvs/suite/bsp/usb/testdata/devlon52/t_usb.ini
haitest/bspsvs/suite/bsp/usb/testdata/devlon52/t_usb.tcs
haitest/bspsvs/suite/bsp/usb/testdata/h4hrp/t_usb.ini
haitest/bspsvs/suite/bsp/usb/testdata/h4hrp/t_usb.tcs
haitest/bspsvs/suite/bsp/usb/testdata/h6hrp/t_usb.ini
haitest/bspsvs/suite/bsp/usb/testdata/h6hrp/t_usb.tcs
haitest/bspsvs/suite/bsp/usb/testdata/t_usb_environment.ini
haitest/bspsvs/suite/bsp/usb/testdata/tube/t_usb.ini
haitest/bspsvs/suite/bsp/usb/testdata/tube/t_usb.tcs
haitest/bspsvs/suite/common/inc/ActiveCallbackBase.h
haitest/bspsvs/suite/common/inc/DataWrapperBase.h
haitest/bspsvs/suite/common/inc/DataWrapperBase.inl
haitest/bspsvs/suite/common/inc/DrawUtils.h
haitest/bspsvs/suite/common/src/ActiveCallbackBase.cpp
haitest/bspsvs/suite/common/src/DataWrapperBase.cpp
haitest/bspsvs/suite/common/src/DrawUtils.cpp
haitest/bspsvs/suite/e32/inc/T_ActiveCallbackIO.h
haitest/bspsvs/suite/e32/inc/T_ActiveRConsoleRead.h
haitest/bspsvs/suite/e32/inc/T_RBusDevCommData.h
haitest/bspsvs/suite/e32/inc/T_RBusLogicalChannelData.h
haitest/bspsvs/suite/e32/inc/T_RConsoleData.h
haitest/bspsvs/suite/e32/inc/T_RDevUsbcClientData.h
haitest/bspsvs/suite/e32/inc/T_RHandleBaseData.h
haitest/bspsvs/suite/e32/inc/T_RSessionBaseData.h
haitest/bspsvs/suite/e32/inc/T_TCommCapsV01Data.h
haitest/bspsvs/suite/e32/inc/T_TCommCapsV02Data.h
haitest/bspsvs/suite/e32/inc/T_TCommCapsV03Data.h
haitest/bspsvs/suite/e32/inc/T_TCommConfigV01Data.h
haitest/bspsvs/suite/e32/inc/T_TCommConfigV02Data.h
haitest/bspsvs/suite/e32/inc/USBConstants.h
haitest/bspsvs/suite/e32/src/T_ActiveCallbackIO.cpp
haitest/bspsvs/suite/e32/src/T_ActiveRConsoleRead.cpp
haitest/bspsvs/suite/e32/src/T_RBusDevCommData.cpp
haitest/bspsvs/suite/e32/src/T_RBusLogicalChannelData.cpp
haitest/bspsvs/suite/e32/src/T_RConsoleData.cpp
haitest/bspsvs/suite/e32/src/T_RDevUsbcClientData.cpp
haitest/bspsvs/suite/e32/src/T_RHandleBaseData.cpp
haitest/bspsvs/suite/e32/src/T_RSessionBaseData.cpp
haitest/bspsvs/suite/e32/src/T_TCommCapsV01Data.cpp
haitest/bspsvs/suite/e32/src/T_TCommCapsV02Data.cpp
haitest/bspsvs/suite/e32/src/T_TCommCapsV03Data.cpp
haitest/bspsvs/suite/e32/src/T_TCommConfigV01Data.cpp
haitest/bspsvs/suite/e32/src/T_TCommConfigV02Data.cpp
haitest/bspsvs/suite/group/bld.inf
haitest/bspsvs/suite/group/device.cfg
haitest/bspsvs/suite/group/t_salt.oby
haitest/bspsvs/suite/hal/inc/T_HALData.h
haitest/bspsvs/suite/hal/src/T_HALData.cpp
haitest/bspsvs/suite/testsuites/base/base.driver
haitest/bspsvs/suite/testsuites/group/autoexec.bat
haitest/bspsvs/suite/testsuites/group/bld.inf
haitest/bspsvs/suite/testsuites/group/statserial.ini
haitest/bspsvs/suite/testsuites/group/statusb.ini
haitest/bspsvs/suite/testsuites/group/td_salt.oby
haitest/bspsvs/suite/testsuites/group/testdriverlitesetup.bat
haitest/bspsvs/suite/testsuites/group/testdriversetup.bat
haitest/bspsvs/suite/testsuites/group/testdriversetup.pl
haitest/bspsvs/suite/testsuites/group/user_input.oby
haitest/bspsvs/testdata/bsp/common/devlon51/t_prompt.ini
haitest/bspsvs/testdata/bsp/common/devlon52/t_prompt.ini
haitest/bspsvs/testdata/bsp/common/group/bld.inf
haitest/bspsvs/testdata/bsp/common/group/t_prompt.iby
haitest/bspsvs/testdata/bsp/common/h4hrp/t_prompt.ini
haitest/bspsvs/testdata/bsp/common/h6hrp/t_prompt.ini
haitest/bspsvs/testdata/bsp/common/merlin/t_prompt.ini
haitest/bspsvs/testdata/bsp/common/tube/t_prompt.ini
haitest/bspsvs/testdata/bsp/sound/alaw8bit_mono_8khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/alaw8bit_stereo_24khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/mulaw8bit_mono_12khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/mulaw8bit_stereo_32khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_mono_11khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_mono_12khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_mono_16khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_mono_22khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_mono_24khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_mono_32khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_mono_44.1khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_mono_48khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_mono_8khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_11khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_12khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_16khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_22khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_24khz_320kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_24khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_32khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_44.1khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_48khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_8khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/pcm8_mono_8khz_32kb.raw
haitest/bspsvs/testdata/bsp/sound/zero_filled_2_bytes.raw
haitest/bspsvs/testdata/bsp/sound/zero_filled_32kb.raw
haitest/bspsvs/testdata/bsp/uart/stress8bits.txt
haitest/bspsvs/tools/java/UartEchoServer/bin/UartEchoServer$EStatus.class
haitest/bspsvs/tools/java/UartEchoServer/bin/UartEchoServer.class
haitest/bspsvs/tools/java/UartEchoServer/bin/logging.properties
haitest/bspsvs/tools/java/UartEchoServer/bin/rxtxSerial.dll
haitest/bspsvs/tools/java/UartEchoServer/group/buildechoserver.bat
haitest/bspsvs/tools/java/UartEchoServer/group/startechoserver.bat
haitest/bspsvs/tools/java/UartEchoServer/lib/RXTXcomm.jar
haitest/bspsvs/tools/java/UartEchoServer/lib/commons-cli-1.1.jar
haitest/bspsvs/tools/java/UartEchoServer/lib/rxtxSerial.dll
haitest/bspsvs/tools/java/UartEchoServer/src/UartEchoServer.java
haitest/bspsvs/tools/perl/BuildOrbiter/BuildOrbiter.bat
haitest/bspsvs/tools/perl/BuildOrbiter/BuildOrbiter.pl
package_definition.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boardsupport_info/boardsupport_metadata/boardsupport_metadata.mrp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,6 @@
+component           boardsupport_metadata
+source   \sf\os\boardsupport\boardsupport_info\boardsupport_metadata 
+source   \sf\os\boardsupport\package_definition.xml
+source   \sf\os\boardsupport\distribution.policy.s60
+notes_source      \component_defs\release.src
+ipr T 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/base_wins.history.xml	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<relnotes name="Emulator">
+  <purpose>
+    In Kernel Architecture, treated as a hardware target variant, Symbian OS emulation which maps OS services and logical devices to Win32 APIs and local hardware e.g. network devices and comms ports on the Windows host machine. Single process implementation using Windows threads to emulate Symbian OS processes, valuable high level programming platform which creates infidelities for low level and device dependent programming compared to hardware targets.
+  </purpose>
+</relnotes>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/base_wins.mrp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+# component name "Emulator"
+
+component	base_wins
+
+source	\sf\os\boardsupport\emulator\emulatorbsp
+binary	\sf\os\boardsupport\emulator\emulatorbsp all
+exports	\sf\os\boardsupport\emulator\emulatorbsp
+
+-export_file	\sf\os\boardsupport\emulator\emulatorbsp\documentation\wins_ether_drv_howto.txt	\epoc32\engdoc\ethernet\wins_ether_drv_howto.txt
+
+notes_source	\component_defs\release.src
+
+
+# ==   comments appear after the line they describe  ==
+ipr E 
+ipr B \sf\os\boardsupport\emulator\emulatorbsp\specific\sdcard
+# Must only be distributed to parties who have signed an agreement with the SD-3C LLC
+ipr B \sf\os\boardsupport\emulator\emulatorbsp\specific\sdcard\sdcard4c
+# Must only be distributed to parties who have signed an agreement with the 4C LLC
+ipr T \sf\os\boardsupport\emulator\emulatorbsp\test
+ipr T \sf\os\boardsupport\emulator\emulatorbsp\win_drive
+ipr F \sf\os\boardsupport\emulator\emulatorbsp\wpdpack
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/bld.inf	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,88 @@
+// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins/bld.inf
+// 
+//
+
+PRJ_PLATFORMS
+WINS WINSCW
+
+PRJ_EXPORTS
+
+documentation/wins_ether_drv_howto.txt	/epoc32/engdoc/ethernet/	//
+
+
+inc/variantmediadef.h					SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins/variantmediadef.h)		
+variant.mmh						SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins/variant.mmh)
+specific/winscomm.h					SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins/winscomm.h)
+specific/winscomm.inl					SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins/winscomm.inl)
+inc/nand_fbr_offset.h					SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins/nand/nand_fbr_offset.h)
+inc/winsgui.h						SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins/winsgui.h)
+:zip emuldrives.zip
+wpdpack/drivers/winpcap.exe				/epoc32/tools/winpcap.exe	//
+wpdpack/lib/packet.lib					/epoc32/release/tools/udeb/packet.lib	//
+wpdpack/lib/wpcap.lib					/epoc32/release/tools/udeb/wpcap.lib	//
+
+PRJ_MMPFILES
+../../../kernelhwsrv/kernel/eka/kernel/ekern
+../../../kernelhwsrv/kernel/eka/kernel/kc_exe
+vwins
+winsgui
+displayldd
+cakdwins
+// SYM_BRANCH : Delete old sound driver
+//dasnwins
+../../../kernelhwsrv/kernel/eka/drivers/medint/medint
+medlfs
+serialldd
+serialpdd
+epbusv
+enet
+soundsc
+estart
+econsnogui
+../../../kernelhwsrv/kernel/eka/drivers/trace/btracex
+
+win_drive
+
+hcr/hcr
+
+PRJ_EXTENSIONS
+start		extension		base/config
+
+option		PREFIX
+option		SOURCE			$(EXTENSION_ROOT)/hal
+option		HALPATH			$(EXTENSION_ROOT)/../../../kernelhwsrv/halservices/hal/../.
+
+end
+
+PRJ_MMPFILES
+hal/hal
+
+// NAND selectable page offset for FBR
+
+PRJ_EXTENSIONS
+start		extension		base/nand_fbr_offset
+
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+option INC_PATH   /epoc32/include
+#else
+option INC_PATH  /epoc32/include/platform
+#endif
+
+option		SRCDIR			$(EXTENSION_ROOT)/inc
+option		TARGETDIR		$(INC_PATH)/wins/nand
+
+end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/bwins/econsnoguiU.def	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,3 @@
+EXPORTS
+	NewConsole @ 1 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/bwins/vwinsu.def	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,10 @@
+EXPORTS
+	?VariantInitialise@@YAPAVAsic@@H@Z @ 1 NONAME ; class Asic * __cdecl VariantInitialise(int)
+	??0DWinsUiBase@@IAE@XZ @ 2 NONAME ; protected: __thiscall DWinsUiBase::DWinsUiBase(void)
+	?AssertWakeupSignal@Wins@@QAEXXZ @ 3 NONAME ; public: void __thiscall Wins::AssertWakeupSignal(void)
+	?WakeupEvent@Wins@@QAEXXZ @ 4 NONAME ; public: void __thiscall Wins::WakeupEvent(void)
+	?CurrentPBusDevicePtr@Wins@@SAPAHXZ @ 5 NONAME ; public: static int * __cdecl Wins::CurrentPBusDevicePtr(void)
+	?MediaChangeCallBack@Wins@@SAXXZ @ 6 NONAME ; public: static void __cdecl Wins::MediaChangeCallBack(void)
+	?MediaDoorOpenPtr@Wins@@SAPAHXZ @ 7 NONAME ; public: static int * __cdecl Wins::MediaDoorOpenPtr(void)
+	?SetMediaChangeCallBackPtr@Wins@@SAXP6AXPAX@Z0@Z @ 8 NONAME ; public: static void __cdecl Wins::SetMediaChangeCallBackPtr(void (__cdecl*)(void *),void *)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/bwins/winsguiu.def	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,3 @@
+EXPORTS
+	?CurrentConfiguration@WinsGui@@SAHXZ @ 1 NONAME ; public: static int __cdecl WinsGui::CurrentConfiguration(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/cakdwins.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,35 @@
+// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins/cakdwins.mmp
+// 
+//
+
+target				ekdata.dll
+targettype			dll
+
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+sourcepath			specific
+source				keymap.cpp
+
+library				euser.lib
+
+linkas				ekdata.dll
+deffile				../../../kernelhwsrv/kernel/eka/bwins/ekdata.def
+nostrictdef
+
+uid					0x1000008d 0x100039e0
+VENDORID 0x70000001
+
+capability			all
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/displayldd.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,45 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins/displayldd.mmp
+// 
+//
+
+#include <kernel/kern_ext.mmh>
+
+SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
+USERINCLUDE inc
+userinclude			inc
+
+target				display0.ldd
+targettype			ldd
+
+sourcepath			specific
+source				display_dev.cpp
+source				display_chan.cpp
+
+start wins
+win32_headers
+win32_library			kernel32.lib user32.lib gdi32.lib
+#if defined(VC32)
+win32_library			msvcrt.lib
+#endif
+
+end
+
+uid					0x100000af
+
+capability			all
+
+VENDORID 0x70000001
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/documentation/wins_ether_drv_howto.txt	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,193 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+HOWTO for Wins Ethernet Driver
+
+0. Pre-requisities
+The implementation of Wins Ethernet driver makes use of packet capturing library: 
+WinPcap, Release 2.2. This software sets the network card of the PC, on which Epoc 
+Emulator is working, into so called promiscuous mode. The user must be confident that 
+the environment she/he works in doesn’t forbid such settings. The quickest way 
+to ensure about it is to contact network administrator.
+
+
+1. Trouble Shooting
+The following problems may occur when attempting to use WINS version of Ethernet driver:
+* Network application doesn’t send nor receive any packets: two potential reasons:
+  - bad settings in CommDB - refer to point 4
+  - Wpcap not installed - refer to point 2
+
+* A panic is raised of category: 'D32ETHER' with one of the following reasons:
+   1	meaning: bad MAC address in ini file or entry for it missing or ini file missing
+   2	meaning: entry for network interface name missing in ini file or ini file missing
+   3	meaning: Wpcap couldn't be initialised - potentially not installed or name 
+	of network interface in .ini file wrong
+Panics occur if system is not configured properly, remedy can be found in notes below.
+
+* Wpcap error may occur - refer to http://winpcap.polito.it/misc/changelog.htm 
+  for advice how to fix the problem (this will require usually upgrading WinPcap 
+  package on user'’ machine).
+
+
+2. Wpcap
+Wpcap must be installed on a machine that wishes to use driver. Installation is simple: 
+WinPcap.exe (located in: \epoc32\tools)
+should be run and then instructions should be followed. 
+If user has already Wpcap installed on his workstation then should try to use 
+Ethernet driver with this version. In case when it fails he must uninstall existing 
+Wpcap and install the one from Epoc directory mentioned above.
+
+
+3. Netcards
+When Wpcap is already installed, a program called Netcards.exe should be run. 
+It can be found in \epoc32\tools. 
+(Note: Netcards uses Wpcap so the latter must be installed first). 
+It will request user to select network card. Netcards writes a few entries 
+into \epoc32\data\ethernet.ini file which are read by Epoc Emulator at startup 
+(ensure that \epoc32\data directory exists). In particular MAC address value for use 
+by Emulator is determined by the entry named 'ETHER_MAC' (it is recommended that 
+network administrator was aware of the value of MAC address written there and authorise 
+it if necessary; according to local conditions any other value preferred 
+by administrator can be written manually instead of the value written by Netcards). 
+Ethernet driver for WINS was originally 
+designed for use in Techview environment which uses ethernet.ini file. Other environments 
+(like Quartz) may use different .ini file (e.g. \epoc32\data\quartz.ini). A user can 
+still run Ethernet module in these environments provided that .ini files appropriate 
+for these environments contain entries written by netcards.exe to ethernet.ini - user can 
+simply copy them - they are easy to recognise as they begin with ‘ETHER_‘ prefix .
+
+
+4. CommDB
+CommDB settings should indicate use of the NIF: ethint.nif and the agent: nullagt.agt. 
+In current release of Epoc Networking software, data in the database are written by program 
+called ced.exe, which takes wanted settings from text file: ced.cfg.
+Example settings to be put in this file are shown below. In the example it is assumed 
+that IP address and network mask will be acquired by DHCP protocol:
+
+############################################################
+## LANBearer
+## 
+[LANBearer]
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=Wins Ethernet
+	Agent=nullagt.agt
+	IfName=ethint
+	LDDFilename=enet
+	LDDName=Ethernet
+	PDDFilename=ethernet
+	PDDName=Ethernet.Wins
+	PacketDriverName=EtherPkt.drv
+	LastSocketActivityTimeout=-1
+	LastSessionClosedTimeout=-1
+	LastSocketClosedTimeout=-1
+	FIELD_COUNT=8
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Name=Assabet on-board Ethernet
+	Agent=nullagt.agt
+	IfName=ethint
+	LDDFilename=enet
+	LDDName=Ethernet
+	PDDFilename=ethernet
+	PDDName=Ethernet.Assabet
+	PacketDriverName=EtherPkt.drv
+	LastSocketActivityTimeout=-1
+	LastSessionClosedTimeout=-1
+	LastSocketClosedTimeout=-1
+	FIELD_COUNT=8
+END_ADD
+
+############################################################
+## LANService
+## 
+[LANService]
+
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=Ethernet
+	#IfNetworks=ip,ip6
+	IfNetworks=ip
+	IpNetMask=0.0.0.0
+	IpGateway=0.0.0.0
+	IpAddrFromServer=TRUE
+	IpAddr=0.0.0.0
+	IpDNSAddrFromServer=TRUE
+	IpNameServer1=0.0.0.0
+	IpNameServer2=0.0.0.0
+	FIELD_COUNT=9
+END_ADD
+
+
+############################################################
+## IAP
+## 
+[IAP]
+ADD_SECTION
+# COMMDB_ID = 1
+	Name=Ethernet IAP
+	IAPService=1
+	IAPServiceType=LANService
+	IAPBearer=1
+	IAPBearerType=LANBearer
+	IAPNetwork=1
+	IAPNetworkWeighting=0
+	Location=2
+	FIELD_COUNT=8
+END_ADD
+
+ADD_SECTION
+# COMMDB_ID = 2
+	Name=NT RAS with Null Modem
+	IAPService=2
+	IAPServiceType=DialOutISP
+	IAPBearer=2
+	IAPBearerType=ModemBearer
+	IAPNetwork=1
+	IAPNetworkWeighting=0
+	Location=2
+	FIELD_COUNT=8
+END_ADD
+
+############################################################
+## ConnectionPreferences
+## 
+[ConnectionPreferences]
+
+
+ADD_SECTION
+	Ranking=0
+	Direction=OUTGOING
+	DialogPref=PROMPT
+	BearerSet=LAN
+	#IAP=Ethernet IAP
+	IAP=1
+	FIELD_COUNT=5
+END_ADD
+
+ADD_SECTION
+	Ranking=1
+	Direction=OUTGOING
+	DialogPref=DONOTPROMPT
+	BearerSet=LAN
+#IAP=Ethernet IAP
+	IAP=1
+	FIELD_COUNT=5
+END_ADD
+
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/econsnogui.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,37 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins/econsnogui.mmp
+// econsnogui.dll Implementation of console used when running without a GUI
+// 
+//
+
+/**
+ @file
+*/
+
+TARGET			econsnogui.dll
+TARGETTYPE		dll
+UID				0x1000008d 0x100039e7
+DEFFILE			bwins/econsnogui.def
+
+CAPABILITY		All
+
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+SOURCEPATH		specific
+SOURCE			econsnogui.cpp
+
+LIBRARY			euser.lib
+
+VENDORID		0x70000001
Binary file emulator/emulatorbsp/emuldrives.zip has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/enet.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,43 @@
+// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins/enet.mmp
+// 
+//
+
+#include "kernel/kern_ext.mmh"
+
+USERINCLUDE         inc
+USERINCLUDE          wpdpack/include
+SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
+
+target                          ethernet.pdd
+targettype                      pdd
+
+sourcepath                      specific
+source                          ethernet.cpp
+
+start wins
+
+#ifdef WINSCW
+win32_library	kernel32.lib wpdpack/lib/wpcap.lib 
+#else
+win32_library		kernel32.lib wpdpack/lib/wpcap.lib msvcrt.lib
+#endif
+
+end
+
+capability all
+
+
+VENDORID 0x70000001
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/epbusv.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,71 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include "kernel/kern_ext.mmh"
+
+//#define MMC_SD		// Include for MMC+SD build 
+//#define MMC_SD_CPRM		// Include for MMC+SD+CPRM build
+//#define MMC_SD_SDIO		// Include for MMC+SDIO build
+
+USERINCLUDE		inc
+SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
+
+target				epbusv.dll
+targettype			kext
+
+#if defined(MMC_SD)
+USERINCLUDE ../../../kernelhwsrv/kernel/eka/drivers/pbus/mmc/sdcard/sdcard3c
+sourcepath			specific/sdcard/sdcard3c
+source				pp_sdc.cpp
+source				pp_sdcv.cpp
+library				epbussd.lib
+#elif defined(MMC_SD_CPRM)
+USERINCLUDE ../../../kernelhwsrv/kernel/eka/drivers/pbus/mmc/sdcard/sdcard3c
+USERINCLUDE ../../../kernelhwsrv/kernel/eka/drivers/pbus/mmc/sdcard/sdcard4c
+sourcepath			specific/sdcard/sdcard4c
+source				pp_cprm.cpp
+source				pp_cprmv.cpp
+library				epbussdp.lib
+#elif defined(MMC_SD_SDIO)
+USERINCLUDE ../../../kernelhwsrv/kernel/eka/drivers/pbus/mmc/sdcard/sdcard3c
+USERINCLUDE ../../../kernelhwsrv/kernel/eka/drivers/pbus/mmc/sdcard/sdcard4c
+USERINCLUDE ../../../kernelhwsrv/kernel/eka/drivers/pbus/mmc/sdcard/sdcard3c/sdio
+sourcepath			specific/sdcard/sdcard3c/sdio
+source				pp_sdio.cpp
+source				pp_sdiov.cpp
+library				epbussdio.lib
+#else
+sourcepath			specific
+source				mmc.cpp
+source				mmcv.cpp
+library				epbusmmc.lib
+#endif
+
+library				ecust.lib
+library				emulator.lib
+
+epocallowdlldata
+
+start wins
+win32_library			kernel32.lib
+#if defined(VC32)
+win32_library			msvcrt.lib
+#endif
+end
+
+uid 				0x1000008d 0x10004187
+VENDORID 0x70000001
+
+capability			all
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/estart.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,53 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins/estart.mmp
+// estart.exe Base Symbian OS startup process
+// 
+//
+
+/**
+ @file
+*/
+
+
+TARGET			e32strt.exe
+CAPABILITY		TCB WriteDeviceData DiskAdmin ProtServ AllFiles PowerMgmt
+
+TARGETTYPE		exe
+
+
+SOURCEPATH		../../../kernelhwsrv/userlibandfileserver/fileserver/estart
+SOURCE			estart.cpp
+SOURCEPATH		estart
+SOURCE			estartmain.cpp
+
+STRICTDEPEND
+
+USERINCLUDE	../../../kernelhwsrv/userlibandfileserver/fileserver/estart
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY			efsrv.lib euser.lib hal.lib
+LIBRARY			domaincli.lib
+
+#ifdef WINS
+LIBRARY			emulator.lib
+#endif
+
+START WINS
+BASEADDRESS		0x62000000
+win32_library	kernel32.lib
+END
+
+UID		0 0x10272C04
+VENDORID 0x70000001
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/estart/estart.txt	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,67 @@
+# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+#R:	2	EFAT32 FAT  0       FS_FORMAT_CORRUPT              # MMC - Slot 0, partition 1
+#S:	4	EFAT32 FAT  0       FS_FORMAT_CORRUPT              # MMC - Slot 1, partition 1
+T:	3	EFAT32 FAT  0       FS_FORMAT_CORRUPT              # MMC - Slot 1, partition 0
+U: 	5  	EFAT32 FAT  0       FS_FORMAT_CORRUPT              # NAND - USER DATA
+V:	6	EROFS  ROFS 0       FS_DISMNT_CORRUPT              # NAND - CODE
+W:	8	ELFFS  LFFS 0       FS_FORMAT_CORRUPT              # LFFS 
+X:	1	EFAT32 FAT  0       FS_FORMAT_CORRUPT              # MMC - Slot 0, partition 0
+Y:	0	EFAT32 FAT  0       FS_FORMAT_COLD,FS_SYNC_DRIVE   # IRAM
+
+
+[DriveT]
+FAT_LeafDirCacheSize	32
+FAT_DirCacheSizeMin  128
+FAT_DirCacheSizeMax  256
+
+FileCacheSize 16
+FileCacheRead ON
+
+[DriveU]
+FAT_LeafDirCacheSize 32
+FAT_DirCacheSizeMin  128
+FAT_DirCacheSizeMax  256
+
+[DriveX]
+FAT_LeafDirCacheSize	32
+FAT_DirCacheSizeMin  128
+FAT_DirCacheSizeMax  256
+
+FileCacheSize 256
+FairSchedulingLen 64
+
+FileCacheRead ON
+FileCacheReadAhead ON
+FileCacheWrite ON
+
+ClosedFileKeepAliveTime 3000
+DirtyDataFlushTime 3000
+
+[DriveW]
+FileCacheRead ON
+FileCacheWrite ENABLED
+FairSchedulingLen 64
+
+[FileCache]
+GlobalCacheEnabled ON
+GlobalCacheSize 32768
+GlobalCacheMaxLockedSize 768
+LowMemoryThreshold 10
+
+[CacheMemory]
+GlobalCacheMemorySize	32768
+LowMemoryThreshold 	10
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/estart/estartmain.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,331 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\estart\estartmain.cpp
+// 
+//
+
+#include <e32std.h>
+#include <f32fsys.h>
+#include <e32uid.h>
+#include "estart.h"
+
+#include <e32wins.h>
+#include <emulator.h>
+#define WIN32_LEAN_AND_MEAN
+#pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union
+#include <windows.h>
+#pragma warning( default : 4201 ) // nonstandard extension used : nameless struct/union
+
+
+
+_LIT(KLitAddFsFail,"Add fs fail");
+_LIT(KLitConnectFsFail2,"Connect fs 2 fail");
+_LIT(KLitNoWS,"No WSERV");
+_LIT(KStartupModeFail,"Get startup mode failed");
+_LIT(KLocalFsName,"elocal");
+
+class TWinsFSStartup : public TFSStartup
+	{
+public:
+	virtual TInt StartSystem();
+	virtual TInt DefaultLocalDrive(TInt aLocalDrive);
+	virtual TPtrC LocalDriveMappingFileName();
+#if !defined(AUTODETECT_DISABLE)		
+	virtual TInt GetNextStandardFSInfoEntry(const SFileSystemInfo** anEntry,TInt aPos);
+#endif
+public:	
+	void LocalFSInitialisation();
+protected:
+	TInt GetStartupMode();
+	};
+
+#if !defined(AUTODETECT_DISABLE)
+TInt DetectEmulRAM(RLocalDrive ld, TInt cr, TLocalDriveCapsV2& caps)
+	{
+	(void)ld;
+	(void)cr;
+	if (caps.iType==EMediaRam)
+		return KErrNone;
+	return KErrGeneral;
+	}
+
+TInt DetectEmul_CF_FAT(RLocalDrive ld, TInt cr, TLocalDriveCapsV2& caps)
+	{
+	(void)ld;
+	(void)cr;
+	if (caps.iType!=EMediaHardDisk || !(caps.iDriveAtt & KDriveAttRemovable))
+		return KErrGeneral;
+	if (cr==KErrNotReady)
+		return KErrNone;	// removable and not ready - assume fat
+	if (cr==KErrNone && PartitionIsFAT(caps.iPartitionType))
+		return KErrNone;
+	return KErrGeneral;
+	}
+
+TInt DetectEmul_CF_FAT32(RLocalDrive ld, TInt cr, TLocalDriveCapsV2& caps)
+	{
+	(void)ld;
+	(void)cr;
+	if (caps.iType!=EMediaHardDisk || !(caps.iDriveAtt & KDriveAttRemovable))
+		return KErrGeneral;
+	if (cr==KErrNotReady)
+		return KErrNone;	// removable and not ready - assume fat
+	if (cr==KErrNone && (PartitionIsFAT32(caps.iPartitionType) || PartitionIsFAT(caps.iPartitionType)) )
+		return KErrNone;
+	return KErrGeneral;
+	}
+#endif
+	
+	
+_LIT(KLocalDriveMappingFileSysBin,"Z:\\SYS\\DATA\\ESTART.TXT");
+TPtrC TWinsFSStartup::LocalDriveMappingFileName()
+	{	
+	__ASSERT_ALWAYS(InitCompositeFileSystem()==KErrNone,User::Panic(_L("InitCompositeFileSystem failed."),0));
+	return(KLocalDriveMappingFileSysBin());
+	}
+	
+LOCAL_C void AutoRun()
+	{
+	// Ensure that any background initialisation completes before auto-running
+	RProcess me;
+	me.SetPriority(EPriorityLow);
+	const char* autorun = EmulatorAutoRun();
+	if (autorun)
+		{
+		TInt r = KErrNone;
+		const char* cmdline = EmulatorCommandLine();
+		TFileName exe;
+		exe.Copy(TPtrC8((const TText8*)autorun));
+		TPtrC8 c((const TText8*)cmdline);
+		HBufC* command = HBufC::New(c.Length());
+		if (!command)
+			r = KErrNoMemory;
+		else
+			{
+			TPtr ptr(command->Des());
+			ptr.Copy(c);
+			RProcess p;
+			r = p.Create(exe, *command);
+			if (r == KErrNone)
+				{
+				TRequestStatus s;
+				p.Logon(s);
+				me.SetPriority(EPriorityHigh);	// ensure we detect termination early
+				p.Resume();
+				p.Close();
+				User::WaitForRequest(s);
+				r = s.Int();
+				}
+			}
+		Emulator::Escape();	// make sure we don't get suspended while exiting
+		ExitProcess(r);
+		}
+	}
+	
+const TInt WinsDefaultLocalDrives[KMaxLocalDrives]=
+			{
+			EDriveY,               //0
+			EDriveX,               //1 MMC - Slot 0, partition 0
+			KDriveInvalid,         //2 MMC - Slot 0, partition 1
+			EDriveT,               //3 MMC - Slot 1, partition 0
+			KDriveInvalid,         //4 MMC - Slot 1, partition 1
+			EDriveU,               //5 NAND - USER DATA
+			EDriveV,               //6 NAND - CODE
+			KDriveInvalid,         //7
+			EDriveW,	           //8
+			KDriveInvalid,         //9
+			KDriveInvalid,         //10
+			KDriveInvalid,         //11
+			KDriveInvalid,         //12
+			KDriveInvalid,         //13
+			KDriveInvalid,         //14
+			KDriveInvalid          //15
+			};
+			
+TInt TWinsFSStartup::DefaultLocalDrive(TInt aLocalDrive)
+	{
+	
+	return(WinsDefaultLocalDrives[aLocalDrive]);
+	}
+
+#if !defined(AUTODETECT_DISABLE)	
+const TInt KMaxWinsFSInfoTableEntries=7;	
+LOCAL_D const SFileSystemInfo FileSystems[KMaxWinsFSInfoTableEntries] =
+	{
+		{DetectEmulRAM,      _S("efat32"),      _S("fat"),      0,             FS_FORMAT_CORRUPT},
+		{DetectEmul_CF_FAT32,_S("efat32"),      _S("fat"),      0,             FS_FORMAT_CORRUPT},
+		{DetectFtl,          _S("efat32"),      _S("fat"),      0,             FS_FORMAT_CORRUPT},
+		{DetectRofs,         _S("erofs"),       _S("rofs"),     0,             FS_DISMNT_CORRUPT},
+		{DetectEneaLFFS,     _S("elffs"),       _S("lffs"),     0,             FS_FORMAT_CORRUPT},
+		{DetectIso9660,      _S("iso9660"),     0,              0,             0},
+		{DetectNtfs,         _S("ntfs"),        0,              0,             0},
+	};
+
+// additional structure for DetectFtl entry with extension set to "0"
+LOCAL_D const SFileSystemInfo FileSystemForDetectFtl =
+		{DetectFtl,         _S("efat32"),         _S("fat"),      0,	 			  FS_FORMAT_CORRUPT};
+
+
+TInt TWinsFSStartup::GetNextStandardFSInfoEntry(const SFileSystemInfo** anEntry,TInt aPos)
+	{
+    if (aPos<KMaxWinsFSInfoTableEntries)
+		{
+		*anEntry=&FileSystems[aPos];
+		return(KErrNone);
+		}
+	else
+		return(KErrNotFound);	
+	}
+#endif		
+	
+void TWinsFSStartup::LocalFSInitialisation()
+//
+// Add and mount local file system
+//
+	{
+	
+	DEBUGPRINT("LocalFSInitialisation");
+
+	// Add local file system
+	TInt r=iFs.AddFileSystem(KLocalFsName);
+	if (r!=KErrNone)
+		User::Panic(KLitAddFsFail,r);
+
+	// Close and reopen to make sure the session path is updated
+	iFs.Close();
+	r = iFs.Connect();
+	if (r!=KErrNone)
+		User::Panic(KLitConnectFsFail2,r);
+
+	TInt i;
+	_LIT(KLitLocalFsName,"Win32");
+	TChar drive;
+	TBuf<4> root=_L("?:\\");
+	for(i=0;i<KMaxDrives-1;++i)
+		{
+		r=RFs::DriveToChar(i,drive);
+		if(r!=KErrNone)
+			continue;
+		root[0]=(TText)drive;
+		TFileName dummy;
+		if (MapEmulatedFileName(dummy,root)==KErrNone)
+			{
+			r=iFs.MountFileSystem(KLitLocalFsName,i);
+			DEBUGPRINT2("MountFileSystem() on drive %d r=%d",i,r);
+			}
+		}
+	}
+
+_LIT(KWindowServerRootName1, "EWSRV.EXE");
+_LIT(KWindowServerRootName2, "WSERV.EXE");	
+_LIT(KSystemStarterName, "z:\\sys\\bin\\SYSSTART.EXE");
+_LIT(KSystemStateManager, "z:\\sys\\bin\\SYSSTATEMGR.EXE");
+_LIT(KPropertyError, "RProperty return error");
+
+TInt TWinsFSStartup::StartSystem()
+	{
+	// Get boot mode with need to access file server
+	TInt r = GetStartupModeFromFile();
+	if (r != KErrNotSupported)
+        {
+        if (r != KErrNone)
+		    User::Panic(KStartupModeFail,r);
+        // Update startup mode property value
+        r = RProperty::Set(KUidSystemCategory, KSystemStartupModeKey, iStartupMode);
+        if (r != KErrNone)
+            User::Panic(KPropertyError, r);
+        }
+
+	// Launch system starter and return unless in noGui or textshell mode
+	TBool noSysStart = EFalse;
+	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalBoolProperty,  (TAny*)"_NOSYSSTART",  &noSysStart);
+	
+	if (!EmulatorNoGui() && !EmulatorTextShell() && !EmulatorMiniGui() && !noSysStart)
+		{
+		RProcess ws;
+		r=ws.Create(KSystemStateManager, KNullDesC);
+		if (r!=KErrNone)
+			{
+			r=ws.Create(KSystemStarterName, KNullDesC);
+			if (r==KErrNone)
+				{
+				TRequestStatus status;
+				ws.Rendezvous(status);
+				ws.Resume();		
+				User::WaitForRequest(status);
+				// Some system starters may not exit on completion.
+				if (ws.ExitType() != EExitKill && ws.ExitType() != EExitPending)
+					User::Panic(_L("SysStart died"),status.Int());
+				ws.Close();
+				return KErrNone;
+				}
+			}
+		else
+			{
+			TRequestStatus status;
+			ws.Rendezvous(status);
+			ws.Resume();		
+			User::WaitForRequest(status);
+			if (ws.ExitType() != EExitKill && ws.ExitType() != EExitPending)
+				User::Panic(_L("SysStart died"),status.Int());
+			ws.Close();
+			return KErrNone;
+			}
+		}
+
+	// Start system agent 2, continue if executable not found, otherwise panic
+	r = StartSysAgt2();
+	if (r!=KErrNone && r!=KErrNotFound)
+		User::Panic(_L("Error launching System Agent"),r);
+
+	// If noGui specifed, then we're done
+	if (EmulatorNoGui())
+		return KErrNone;
+
+	// Attempt to start the appropriate window server
+	TDriveList list;
+	iFs.DriveList(list);
+	if (!EmulatorTextShell() && CreateServer(list,KWindowServerRootName2))
+		return KErrNone;
+	if (!CreateServer(list,KWindowServerRootName1))
+		User::Panic(KLitNoWS,KErrNotFound);
+
+	return KErrNone;
+	}
+
+TInt TWinsFSStartup::GetStartupMode()
+    {
+	UserSvr::HalFunction(EHalGroupEmulator, EEmulatorHalIntProperty, 
+						 (TAny*)"StartupMode", &iStartupMode);
+	return(KErrNone);
+    }
+	
+GLDEF_C TInt E32Main()
+	{
+	
+	TWinsFSStartup fsStart;
+	fsStart.Init();
+	
+	fsStart.LocalFSInitialisation();
+	fsStart.Run();
+	
+	fsStart.StartSystem();
+	
+	fsStart.Close();
+	
+	AutoRun();
+	
+	return(0);
+	}
+		
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/hal/config.hcf	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,88 @@
+EManufacturer=0
+EManufacturerHardwareRev=0
+EManufacturerSoftwareRev=0
+EManufacturerSoftwareBuild=0
+EModel=0
+EMachineUid=0
+EDeviceFamily=0
+EDeviceFamilyRev=0
+ECPU=0
+ECPUArch=0
+ECPUABI=0
+ECPUSpeed : set = ProcessCPUSpeed
+// ESystemStartupReason = GetSystemStartupReason
+// ESystemException = GetSystemException
+ESystemTickPeriod=0
+EMemoryRAM = GetRAMSize
+EMemoryRAMFree = GetFreeRAM
+EMemoryROM = GetROMSize
+EMemoryPageSize=0
+EPowerGood=0
+EPowerBackup=0
+EPowerExternal=0
+EKeyboard=0
+EKeyboardDeviceKeys=0
+EKeyboardAppKeys=0
+EKeyboardClick=0
+EKeyboardClickState : set = ProcessKeyboardClickState
+EKeyboardClickVolume : set = ProcessKeyboardClickVolume
+EKeyboardClickVolumeMax=0
+EDisplayXPixels=ProcessDisplayCurrentModeInfo
+EDisplayYPixels=ProcessDisplayCurrentModeInfo
+EDisplayXTwips=ProcessDisplayCurrentModeInfo
+EDisplayYTwips=ProcessDisplayCurrentModeInfo
+EDisplayColors=ProcessDisplayColors
+EDisplayState : set =ProcessDisplayState
+EDisplayContrast : set = ProcessDisplayContrast
+EDisplayContrastMax=ProcessDisplayMaxContrast
+EBacklight=0
+EPen=0
+EMouse=0
+EMouseState : set = ProcessMouseState
+EMouseSpeed : set = ProcessMouseSpeed
+EMouseAcceleration : set = ProcessMouseAcceleration
+EMouseButtons=0
+EMouseButtonState = GetMouseButtonState
+ECaseSwitch=0
+ELEDs=0
+ELEDmask : set = ProcessLEDMask
+EIntegratedPhone=0
+ELanguageIndex : set = 0
+EMaxRAMDriveSize=0
+EDisplayNumModes = ProcessDisplayNumModes
+EDisplayMode : set = ProcessDisplayMode
+EDisplayIsMono=ProcessDisplaySpecifiedModeInfo
+EDisplayIsPalettized=ProcessDisplaySpecifiedModeInfo
+EDisplayBitsPerPixel=ProcessDisplaySpecifiedModeInfo
+EDisplayMemoryAddress=ProcessDisplayCurrentModeInfo
+EDisplayOffsetToFirstPixel=ProcessDisplaySpecifiedModeInfo
+EDisplayOffsetBetweenLines=ProcessDisplaySpecifiedModeInfo
+EDisplayIsPixelOrderRGB=ProcessDisplayCurrentModeInfo
+EDisplayIsPixelOrderLandscape=ProcessDisplayCurrentModeInfo
+EClipboardDrive=0
+ESystemDrive : set = 0
+ECustomRestart : set = ProcessCustomRestart
+ECustomRestartReason = ProcessCustomRestartReason
+EDisplayNumberOfScreens=GetDisplayNumberOfScreens
+ENanoTickPeriod=ProcessNanoTickPeriod
+EFastCounterFrequency=ProcessFastCounterFrequency
+EFastCounterCountsUp=0
+ECustomResourceDrive : set = 0
+ETimeNonSecureOffset : set = NonsecureClockOffset
+EPointer3D=0
+EPointer3DMaxProximity : set = 0
+EPointer3DThetaSupported=0
+EPointer3DPhiSupported=0
+EPointer3DRotationSupported=0
+EPointer3DPressureSupported=0
+EPointer3DProximityStep=0
+EPointerMaxPointers=0
+EPointerNumberOfPointers : set = 0
+EPointer3DMaxPressure=0
+EPointer3DPressureStep=0
+EPointer3DEnterHighPressureThreshold : set = 0
+EPointer3DExitHighPressureThreshold : set = 0
+EPointer3DEnterCloseProximityThreshold : set = 0
+EPointer3DExitCloseProximityThreshold : set = 0
+EDisplayMemoryHandle=GetDisplayMemoryHandle
+ENumCpus=GetNumCpus
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/hal/hal.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,31 @@
+// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// hal\wins\hal.cpp
+// 
+//
+
+#include <kernel/hal_int.h>
+#include <u32std.h>
+
+// ECPUSpeed
+TInt ProcessCPUSpeed(TInt /*aDeviceNumber*/, TInt /*aAttrib*/, TBool aSet, TAny* aInOut)
+	{
+	return UserSvr::HalFunction(EHalGroupEmulator, EEmulatorHalCPUSpeed, (TAny*)aSet, aInOut);
+	}
+
+//
+TInt GetDisplayNumberOfScreens(TInt /*aDeviceNumber*/, TInt /*aAttrib*/, TBool /*aSet*/, TAny* aInOut)
+	{
+	return UserSvr::HalFunction(EHalGroupEmulator, EEmulatorHalNumberOfScreens, NULL, aInOut);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/hal/hal.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,53 @@
+// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins/hal/hal.mmp
+// hal.dll Dummy HAL library
+// 
+//
+
+/**
+ @file
+*/
+
+#include <variant.mmh>
+
+TARGET			hal.dll
+TARGETTYPE		dll
+linkas			hal.dll
+noexportlibrary
+
+SOURCEPATH	../../../../kernelhwsrv/halservices/hal/src
+SOURCE			hal_main.cpp userhal.cpp
+
+SOURCEPATH	.
+SOURCE			hal.cpp
+
+SOURCEPATH	/epoc32/build/generatedcpp/hal
+SOURCE			VariantTarget(values,cpp) VariantTarget(config,cpp)
+
+
+SYMBIAN_BASE_SYSTEMINCLUDE(kernel)
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+LIBRARY		euser.lib
+DEFFILE			../../../../kernelhwsrv/halservices/hal/bwins/hal.def
+
+UID		0x1000008d 0x100039e8
+VENDORID 0x70000001
+
+START WINS
+BASEADDRESS	0x6b000000
+END
+
+capability			all
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/hal/values.hda	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,68 @@
+EManufacturer=psion
+EManufacturerHardwareRev=0x1
+EManufacturerSoftwareRev=0x100
+EManufacturerSoftwareBuild=0x250
+EModel=0x4d24
+EMachineUid=Win32Emulator
+EDeviceFamily=crystal
+EDeviceFamilyRev=0x001
+ECPU=x86
+ECPUArch=0x700
+ECPUABI=msvc
+// ESystemStartupReason=cold
+// ESystemException=0
+ESystemTickPeriod=15625
+EMemoryRAM=128
+EMemoryRAMFree=128
+EMemoryROM=16
+EMemoryPageSize=0x1000
+EPowerGood=1
+EPowerBackup=0
+EPowerExternal=1
+EKeyboard=full
+EKeyboardDeviceKeys=3
+EKeyboardAppKeys=9
+EKeyboardClick=1
+EKeyboardClickState=1
+EKeyboardClickVolume=0
+EKeyboardClickVolumeMax=1
+EDisplayState=1
+EBacklight=0
+EPen=0
+EPenDisplayOn=1
+EMouse=1
+EMouseState=1
+EMouseSpeed=1
+EMouseAcceleration=1
+EMouseButtons=2
+EMouseButtonState=0
+ECaseSwitch=0
+ECaseSwitchDisplayOn=1
+ECaseSwitchDisplayOff=1
+ELEDs=2
+ELEDmask=0
+EIntegratedPhone=0
+ELanguageIndex=0
+EMaxRAMDriveSize=4194304
+EClipboardDrive=2
+ESystemDrive=0xffffffff
+EDisplayNumberOfScreens=1
+EFastCounterCountsUp=1
+ECustomResourceDrive=0xffff
+ETimeNonSecureOffset=0
+EPointer3D=1
+EPointer3DMaxProximity=-100
+EPointer3DThetaSupported=1
+EPointer3DPhiSupported=1
+EPointer3DRotationSupported=1
+EPointer3DPressureSupported=1
+EPointer3DProximityStep=5
+EPointerMaxPointers=8
+EPointerNumberOfPointers=6
+EPointer3DMaxPressure=5000
+EPointer3DPressureStep=500
+EPointer3DEnterHighPressureThreshold=0x7fffffff
+EPointer3DExitHighPressureThreshold=-0x7fffffff
+EPointer3DEnterCloseProximityThreshold=0x7fffffff
+EPointer3DExitCloseProximityThreshold=-0x7fffffff
+ENumCpus=1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/hcr/hcr.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,52 @@
+// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// This file is part of the EPOC Emulator Variant Base Port
+// Hardware Configuration Respoitory Platform Specific Layer (PSL) 
+//
+
+
+// Uncomment and rebuild if you require trace messages from the HCR extension
+// macro HCR_TRACE
+
+// Uncomment if you want HCR PIL to load 'z:\sys\data\hcr.dat' as the Core
+// Image file repository because rombuild tool not yet updating ROM header.
+// Must always be defined on Emulator based HCR projects.
+macro HCRTEST_COREIMG_DONTUSE_ROMHDR
+
+
+// -- PIL Statements ----------------------------------------------------------
+//
+
+
+#include            "../../../../kernelhwsrv/kernel/eka/drivers/hcr/hcr.mmh"
+
+deffile             ../../../../kernelhwsrv/kernel/eka/~/hcr.def 
+
+userinclude         ../../../../kernelhwsrv/kernel/eka/drivers/hcr
+
+sourcepath          ../../../../kernelhwsrv/kernel/eka/drivers/hcr
+source              HCR_PIL_SOURCE
+
+
+// -- PSL Statements ----------------------------------------------------------
+//
+
+sourcepath          .
+source              hcr_psl.cpp
+source              hcr_psl_config.cpp
+
+start wins
+win32_headers
+end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/hcr/hcr_psl.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,114 @@
+// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// This file is part of the EPOC Emulator Variant Base Port
+// Hardware Configuration Repository Platform Specific Layer (PSL) 
+//
+
+
+// -- INCLUDES ----------------------------------------------------------------
+
+
+#include "hcr_debug.h"
+
+#include "hcr_hai.h"
+
+
+
+// -- GLOBALS -----------------------------------------------------------------
+
+
+GLREF_C HCR::SRepositoryCompiled gRepository;
+
+
+// -- CLASSES- ----------------------------------------------------------------
+
+
+class HCRVariant : public HCR::MVariant
+    {    
+    
+public:
+
+    HCRVariant();
+    virtual ~HCRVariant();
+    
+public:    
+    
+    TInt Initialise();
+    
+    TBool IgnoreCoreImgRepository();
+	TInt GetCompiledRepositoryAddress( TAny* & aAddr);
+    TInt GetOverrideRepositoryAddress( TAny* & aAddr);
+    
+    };
+    
+    
+
+
+// -- METHODS -----------------------------------------------------------------
+
+
+HCRVariant::HCRVariant()
+    {
+    HCR_FUNC("HCRVariant");
+    }
+
+
+HCRVariant::~HCRVariant()
+    {
+    HCR_FUNC("~HCRVariant");
+    }
+
+
+TInt HCRVariant::Initialise()
+    {
+    HCR_FUNC("HCRVariant::Initialise");
+    
+    HCR_TRACE_RETURN(KErrNone);
+    }
+    
+    
+TInt HCRVariant::GetCompiledRepositoryAddress( TAny* & aAddr)
+    {
+    HCR_FUNC("HCRVariant::GetCompiledRepositoryAddress");
+        
+    aAddr = static_cast<TAny*>(&gRepository);
+    HCR_TRACE_RETURN(KErrNone);
+    }
+
+TBool HCRVariant::IgnoreCoreImgRepository()
+    {
+    HCR_FUNC("HCRVariant::IgnoreCoreImgRepository");
+        
+    HCR_TRACE_RETURN(EFalse);
+    }
+
+TInt HCRVariant::GetOverrideRepositoryAddress( TAny* &)
+    {
+    HCR_FUNC("HCRVariant::GetRAMRepositoryAddress");
+    
+    // OverrideRepository not supported in EPOC Emulator version
+    
+    HCR_TRACE_RETURN(KErrNotSupported);
+    }
+
+ 
+// -- ENTRY POINTS ------------------------------------------------------------
+
+
+GLDEF_C HCR::MVariant* CreateHCRVariant()
+    {
+    HCR_FUNC("CreateHCRVariant");
+
+    return new HCRVariant;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/hcr/hcr_psl_config.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,80 @@
+// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// This file is part of the EPOC Emulator Variant Base Port
+// Hardware Configuration Respoitory Platform Specific Layer (PSL) 
+//
+
+
+/** 
+@file hcr_psl_config.cpp
+File provides the compiled repository (currently empty) EPOC Emulator platform. 
+
+@internalTechnology
+*/
+
+// -- HCR INCLUDES ------------------------------------------------------------
+
+#include "hcrconfig.h"
+
+#include "hcr_hai.h"
+#include "hcr_uids.h"
+
+
+using namespace HCR;
+
+
+
+// -- HCR BSP SETTING INCLUDES ------------------------------------------------
+
+// Includes for setting published by base port ASSP/SOC interconnections
+// e.g. #include "hcr_psl_config_mha_inc.inl"
+
+
+
+
+// -- HCR BSP LARGE SETTING DATA (LSD) VALUES ---------------------------------
+
+// Includes for setting published by base port ASSP/SOC interconnections
+// e.g. #include "hcr_psl_config_mha_lsd.inl"
+
+
+
+
+// -- HCR BSP SETTINGS LIST ---------------------------------------------------
+
+SSettingC gSettingsList[] = 
+    {
+    
+// Includes for setting published by base port ASSP/SOC interconnections
+// e.g. #include "hcr_psl_config_mha.inl"
+
+	HCR_LAST_SETTING
+	};
+	
+	
+SRepositoryBase gHeader = 
+    {
+    HCR_FINGER_PRINT, 
+    EReposCompiled, 
+    KRepositoryFirstVersion,
+    EReposReadOnly,
+    HCR_SETTING_COUNT(gSettingsList)
+    };
+
+
+GLDEF_C SRepositoryCompiled gRepository = 
+    { 
+    &gHeader, 
+    gSettingsList 
+    };
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/hcr/hcrconfig.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,46 @@
+// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// This file is part of the EPOC Emulator Variant Base Port
+// Hardware Configuration Repository Published Setting IDs header. 
+//
+
+/** 
+@file hcrconfig.h
+File provides const uint definitions for the published set of HCR settings
+identifiers applicable to the EPOC Emulator base port.
+The settings defined in the HCR are examples for "device configuration" for
+the platform and not an exhustive list. The HCR is not intended to hold
+"feature configuration" which if varied would required significant code 
+changes in the hardware consumer component. 
+
+@publishedPartner
+@prototype
+*/
+
+#ifndef HCR_CONFIG_H
+#define HCR_CONFIG_H
+
+
+
+// -- INCLUDES ----------------------------------------------------------------
+
+#include  <drivers/hcr.h>
+
+
+// -- CATEGORY UIDs -----------------------------------------------------------
+
+// No category UIDs defined yet
+
+
+#endif // HCR_CONFIG_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/inc/display_chan.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,242 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+/**
+ @file
+ @publishedPartner
+ @prototype
+*/
+
+#ifndef __DISPLAY_CHAN_H__
+#define __DISPLAY_CHAN_H__
+
+#include "nk_priv.h"
+#include <dispchannel.h>
+#include <videodriver.h>
+#include "displayhandler.h"
+
+struct TBufferAddressA;
+class TScreenBuffer;
+/**
+Logical Channel kernel side class for Display
+*/
+
+
+class DDisplayChannel : public DLogicalChannel
+	{
+public:
+	// constants
+	enum { KDisplayChMajorVersionNumber = 1 };
+	enum { KDisplayChMinorVersionNumber = 2 };
+	enum { KDisplayChBuildVersionNumber = 1 };
+public:
+	// Duplicate of RDisplayChannel structure, as the header file cannot be used.
+	class TCaps
+    {
+      public:
+          TVersion iVersion;
+    };
+
+	class TRequest
+		{
+	public:
+		inline TRequest(void) : iThread(0), iStatus(0) {}
+		TBool SetStatus(TThreadMessage& aMsg);
+		void Complete(TInt aResult);
+	public:
+		DThread* iThread;
+		TRequestStatus* iStatus;
+		};
+
+	class TBufferInfo
+		{
+	public:
+		TAny* iAddress;
+		DChunk* iChunk;
+		TRequest iRequest;
+		};
+
+	enum TDisplayPanic
+		{
+		EDisplayPanicNullThreadOnSet = 1,
+		EDisplayPanicInUse = 2,
+		EDisplayPanicThreadAlreadySet = 3,
+		EDisplayPanicNullThreadOnComplete = 4,
+		EDisplayPanicThreadOpenFailed = 5,
+		EDisplayPanicWaitForPostMissed = 6,
+		EDisplayPanicNullArgument = 7,
+		EDisplayPanicNotYetImplemented = 8,
+		EDisplayPanicInvalidDimensions = 9,
+		EDisplayPanicInvalidRotation = 10,
+		EDisplayPanicInvalidBitDepth = 11,
+		EDisplayPanicInvalidStride = 12,
+		EDisplayPanicInvalidWindowHandle = 13,
+		EDisplayPanicInvalidFrameBuffers = 14,
+		EDisplayPanicInvalidRefreshRate = 15,
+		EDisplayPanicInvalidOffset = 16,
+		EDisplayPanicNoLegacyBuffer = 17
+		};
+
+public:
+	DDisplayChannel(void);
+	~DDisplayChannel(void);
+
+	// DLogicalChannel implementation
+	virtual TInt DoCreate(TInt aUnit, const TDesC8* aInfo, const TVersion& aVer);
+	virtual void HandleMsg(TMessageBase* aMsg);
+
+	// Function used by the UI code to set up the buffers.
+	virtual TInt Initialize(RDisplayChannel::TDisplayInfo& aInfo, 
+							RDisplayChannel::TDisplayRotation aRotation,
+							HWND aHwnd, RPointerArray<TAny>& aFrameBuffers, 
+							RPointerArray<TBufferAddressA>& aChunks,
+							TScreenBuffer& aDsaBuffer,
+							TSize aResolution, 
+							TSize aTwips,
+							const RDisplayChannel::TPixelFormat aPixelFormatArray[],
+							const TInt aPixelFormatArraySize,
+							const RDisplayChannel::TBufferFormat& aBufferFormat);
+	virtual void SetLegacyBuffer(void *aAddress);
+
+private:
+	DDisplayChannel(const DDisplayChannel&);
+
+	// Handlers for the three classes of channel message sent
+	TInt DoControl(TInt aFunction);
+	void DoRequest(TInt aFunction);
+	TInt DoCancel(TInt aRequestMask);
+	TInt NumberOfResolutions();
+	TInt SafePut(TAny* aDst, TAny* aSrc, TInt aBytes);
+
+	void ValidateSpecificInfo(TInt aBytesPerPixel, RDisplayChannel::TOrientationSpecificInfo& aInfo);
+	static void Panic(TDisplayPanic aPanic);
+	void ClientPanic(RDisplayChannel::TPanic aPanic);
+
+	inline TBool IsCompositionBuffer(RDisplayChannel::TBufferId aId);
+	static inline TBool IsLegacyBuffer(RDisplayChannel::TBufferId aId);
+	static inline TBool IsUserBuffer(RDisplayChannel::TBufferId aId);
+	inline TBool IsValidBuffer(RDisplayChannel::TBufferId aId);
+    inline RDisplayChannel::TBufferId NextCompositionBuffer(RDisplayChannel::TBufferId aId);
+
+	static inline TBool IsFlipped(RDisplayChannel::TDisplayRotation aRotation);
+
+	static void VSyncTimerFn(TAny* aDisplayChannel);
+	void DoVSyncTimer(void);
+	static void VSyncDfcFn(TAny* aDisplayChannel);
+	void DoVSync(void);
+
+	TInt PostCompositionBuffer(TAny* aRegion, RDisplayChannel::TPostCount* aPostCount);
+	TInt PostLegacyBuffer(TAny* aRegion, RDisplayChannel::TPostCount* aPostCount);
+	TInt GetCompositionBuffer(TAny** aAddress);
+	TInt PostUserBuffer(RDisplayChannel::TBufferId* aBufferId, TAny* aRegion, RDisplayChannel::TPostCount* aPostCount);
+	TInt WaitForPost(RDisplayChannel::TPostCount* aPostCount);
+	TInt WaitForDisplayConnect();
+	TInt SetRotation(RDisplayChannel::TDisplayRotation* aNewRotation, TBool* aIsBufferPreserved);
+	TInt RegisterUserBuffer(TInt aChunkHandle, TInt aOffset, RDisplayChannel::TBufferId* aBufferId);
+	TInt DeregisterUserBuffer(RDisplayChannel::TBufferId* aBufferId);
+	TInt GetResolutions();
+	TInt SetResolution(TSize* aSize);
+	TInt GetResolution(TSize* aSize);
+	TInt GetTwips(TSize* aSize);
+	TInt GetIndexForSize(const TSize& aSize,TInt& aSpinnerOut);
+	TInt GetPixelFormats();
+	TInt SetBufferFormat(RDisplayChannel::TBufferFormat* aBufferFormat);
+	TInt NextPlaneOffset(RDisplayChannel::TBufferFormat* aBufferFormat, 
+			            RDisplayChannel::TBufferFormatContext* aContext);
+	TInt NextLineOffset(RDisplayChannel::TBufferFormat* aBufferFormat, 
+			            RDisplayChannel::TBufferFormatContext* aContext);
+	TInt ValidateBufferFormat(const RDisplayChannel::TBufferFormat& aBufferFormat,
+						 	  const RDisplayChannel::TResolution& aResolution);
+private:
+	// Constants
+	enum {KDfcPriority = 6};
+
+	enum {KBufferNotSet = -1};
+
+	// Buffer index points. The legacy buffer is first, followed by the user
+	// buffers, followed by a variable number of composition buffers.
+	enum { KLegacyBuffer = 0};
+	enum { KFirstUserBuffer = KLegacyBuffer + 1};
+	enum { KFirstCompositionBuffer = KFirstUserBuffer + RDisplayChannel::TDisplayInfo::KMaxUserBuffers};
+	enum { KMaxBufferSizeHeightAndWidth = KMaxTInt16 };
+
+private:
+	TInt iScreenNumber;
+	TThreadMessage* iMsg;
+	TInt iVSyncTicks;					// Number of nanokernel ticks between frames
+	TUint iNumCompositionBuffers;		// Number of composition buffers
+	TUint iTotalBuffers;				// KFirstCompositionBuffer + iNumCompositionBuffers
+	RDisplayChannel::TDisplayInfo iChannelInfo;
+	RDisplayChannel::TPostCount iPostCount;				// Count of Post... calls
+	RDisplayChannel::TPostCount iLastPostCount;			// Value of iPostCount when last buffer was actually posted
+	TBufferInfo* iBuffer;				// Allocated to contain iTotalBuffers
+	TBufferAddressA* iChunks;
+	DThread* iClient;
+
+	// Posting support
+	NTimer iVSync;						// Emulated VSync signal using a timer
+	TDfc iVSyncDfc;						// DFC queued on DfcQue0 when iVSync triggers
+	RDisplayChannel::TBufferId iPostedBuffer;			// Index of buffer to be posted on next frame
+	RDisplayChannel::TDisplayRotation iCurrentRotation;	// Rotation of buffer being posted
+	RDisplayChannel::TDisplayRotation iNewRotation;	// Rotation of buffer being posted
+	TSize iCurrentResolution;			// Display resolution (normal rotation) to be posted
+	TSize iNewResolution;			    // Display resolution (normal rotation) for buffer being posted
+	TSize iCurrentTwips;
+	TInt iPostedRectCount;				// Number of rectangles defined in region
+	RECT iPostedRect[RDisplayChannel::TDisplayInfo::KMaxRectangles];	//
+
+	// Paint support
+	HWND iHwnd;							// Window to be painted
+	RDisplayChannel::TBufferId iDisplayBuffer;			// Index of buffer to be painted
+	RDisplayChannel::TDisplayRotation iDisplayRotation;	// Rotation of buffer to be painted
+	TSize iDisplayResolution;			// Display resolution (normal rotation) on screen
+
+	// GetCompositionBuffer support
+	TUint iGetBuffer;					// Index of next composition buffer
+
+	// WaitForPost support
+	RDisplayChannel::TPostCount iWaitForPost;			// Post count being awaited
+	TRequest iWaitForPostRequest;		// Request to complete when post count reached
+	
+	// WaitForDisplayConnect support 
+	TRequest iWaitForDisplayConnect;		// Request to complete when display connection state changes
+	
+	TInt iDisplayStateSpinner;
+	
+	TVersion iVersion;
+	const RDisplayChannel::TPixelFormat* iPixelFormatArray;
+	TInt iPixelFormatArraySize;
+	RDisplayChannel::TBufferFormat iInitialBufferFormat;
+	RDisplayChannel::TBufferFormat iCurrentBufferFormat;
+	RDisplayChannel::TBufferFormat iDisplayBufferFormat;
+	RDisplayChannel::TBufferFormat iNewBufferFormat;
+	};
+
+inline TBool DDisplayChannel::IsCompositionBuffer(RDisplayChannel::TBufferId aId)
+	{ return (aId >= KFirstCompositionBuffer && aId < iTotalBuffers); }
+inline TBool DDisplayChannel::IsLegacyBuffer(RDisplayChannel::TBufferId aId)
+	{ return (aId == KLegacyBuffer); }
+inline TBool DDisplayChannel::IsUserBuffer(RDisplayChannel::TBufferId aId)
+	{ return (aId >= KFirstUserBuffer && aId < (KFirstUserBuffer + RDisplayChannel::TDisplayInfo::KMaxUserBuffers)); }
+inline TBool DDisplayChannel::IsValidBuffer(RDisplayChannel::TBufferId aId)
+	{ return (aId >= 0 && aId < iTotalBuffers); }
+inline RDisplayChannel::TBufferId DDisplayChannel::NextCompositionBuffer(RDisplayChannel::TBufferId aId)
+	{ TUint r = (aId + 1); return (r >= iTotalBuffers) ? KFirstCompositionBuffer : r; }
+
+inline TBool DDisplayChannel::IsFlipped(RDisplayChannel::TDisplayRotation aRotation)
+	{ return !(aRotation & (RDisplayChannel::ERotationNormal | RDisplayChannel::ERotation180)); }
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/inc/display_dev.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,39 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+/**
+ @file
+ @publishedPartner
+ @prototype
+*/
+
+#ifndef __DISPLAY_DEV_H__
+#define __DISPLAY_DEV_H__
+
+/**
+  Logical Device (factory class) for display
+*/
+class DDisplayDevice : public DLogicalDevice
+	{
+public:
+	DDisplayDevice();
+	~DDisplayDevice();
+	TInt Install();
+	void GetCaps(TDes8& aDes) const;
+	TInt Create(DLogicalChannelBase*& aChannel);
+	};
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/inc/displayhandler.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,48 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+/**
+ @file
+ @publishedPartner
+ @prototype
+*/
+
+#ifndef __DISPLAYHANDLER_H__
+#define __DISPLAYHANDLER_H__
+
+/**
+Display request handler interface
+*/
+class MDisplayHandler
+	{
+public:
+	/**
+	Process a request on this logical channel.
+	
+	@param aReqNo	Request number:
+			== KMaxTInt, a 'DoCancel' message
+			>= 0, a 'DoControl' message with function number equal to aReqNo
+			< 0, a 'DoRequest' message with function number equal to ~aReqNo
+	@param a1		First argument. For DoRequest requests this is a pointer to
+			the TRequestStatus.
+	@param a2     Second argument. For DoRequest this is a pointer to the 2
+			actual TAny* arguments.
+	@return	Result. Ignored by device driver framework for DoRequest requests.
+	*/
+	virtual TInt HandleRequest(TInt aReqNo, TAny* a1, TAny* a2) = 0;
+	};
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/inc/gui.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,523 @@
+// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\inc\gui.h
+// 
+//
+
+#ifndef __EX_GUI_H__
+#define __EX_GUI_H__
+
+#define _CRTIMP			// we want to use the win32 static runtime library
+
+#include "platform.h"
+#include <kernel/win32/property.h>
+#include "nk_priv.h"
+#include "vwins.h"
+#include <e32keys.h>
+#include <stdlib.h>
+#include <videodriver.h>
+#include <dispchannel.h>
+
+GLREF_C const char* skipws(const char* aPtr);
+GLREF_C const char* skiptok(const char* aPtr);
+
+// keyboard mapping
+
+const TUint KKeyExtendedBit=0x100;
+const TUint KKeyNormalBits=0xFF;
+const TInt KMaxExtendedKey=0x5d;
+const TInt KExtendedKeyBase=0x1c;
+const TInt KStandardKeyMapSize = 89;
+const TInt KExtendedKeyMapSize = KMaxExtendedKey + 1 - KExtendedKeyBase;
+const TUint KMaxHotKeyCombinationLength=10;
+const TInt KDatFileVersion= 1000;
+
+enum TEmulCommand
+	{
+	ENoCommand,
+	EKey,
+	ENextConfig,
+	ESelectConfig,
+	};
+
+class VirtualKey
+	{
+public:
+	VirtualKey(const TInt aCommandData, TEmulCommand aCommand);
+	virtual TBool Contains(TInt aX, TInt aY) const = 0;
+	virtual void Draw(HDC aHdc,COLORREF aColor) const =0;
+	inline TInt Value() const {return iData;};
+	inline TEmulCommand Command() const {return iCommand;};
+private:
+	TEmulCommand iCommand;
+	TInt iData;
+	};
+
+typedef TStdScanCode KeyArray[KMaxHotKeyCombinationLength];
+class KeyCombination
+	{
+public:
+	KeyCombination(const TInt aCommandData, TEmulCommand aCommand);
+	TBool AddKey(TStdScanCode);
+	TBool CheckCombinationPressed();
+
+	TEmulCommand iCommand;
+	TInt iData;
+private:
+	KeyArray iCombination;
+	};
+
+class VKRect : public VirtualKey
+	{
+public:
+	VKRect(const TInt aCommandData, TEmulCommand aCommand, TInt aX, TInt aY, TInt aWidth, TInt aHeight);
+	// From VirtualKey
+	TBool Contains(TInt aX, TInt aY) const;
+	virtual void Draw(HDC aHdc,COLORREF aColor) const;
+private:
+	TInt iLeft,iTop,iRight,iBottom;
+	VKRect();
+	};
+
+
+
+class Alias
+	{
+public:
+	Alias();
+//
+	TInt Add(const TDesC8& aAlias, const TDesC8& aName);
+	const TDesC8* operator[](const TDesC8& aAlias);
+private:
+	struct SEntry
+		{
+		TDesC8* iAlias;
+		TDesC8* iName;
+		};
+	static TBool Compare(const SEntry& aLhs, const SEntry& aRhs);
+private:
+	RArray<SEntry> iMap;
+	};
+
+// GUI settings
+
+const TInt KPowerTimerId=1;
+
+const TInt KRomMajorVersionNumber=1;
+const TInt KRomMinorVersionNumber=0;
+const TInt KRomBuildVersionNumber=1;
+//
+const TInt KScreenOffsetX=90;
+const TInt KScreenOffsetY=51;
+const TInt KScreenWidth=640;
+const TInt KScreenHeight=240;
+const TInt KWinPosX=10;
+const TInt KWinPosY=10;
+
+const TInt KCompositionBuffers=2;	// Default to double-buffering
+const TInt KRefreshRateHz=30;	// Default to 30fps
+
+const TInt KMaxNameSize=80;	//size of window title string
+
+//
+// window style
+const DWORD KInvisibleControlWinStyle=WS_CAPTION|WS_CLIPCHILDREN|WS_MINIMIZEBOX|WS_OVERLAPPED|WS_SYSMENU;
+const DWORD KControlWinStyle=KInvisibleControlWinStyle|WS_VISIBLE;
+
+const DWORD KInvisibleWinStyle=WS_CAPTION|WS_CLIPCHILDREN|WS_OVERLAPPED|WS_HSCROLL|WS_VSCROLL|WS_SIZEBOX|
+	WS_MAXIMIZEBOX|WS_MINIMIZEBOX|WS_SYSMENU;
+const DWORD KWinStyle=KInvisibleWinStyle|WS_VISIBLE;
+//
+// Scaling factors to use if PhysicalScreenWidth or Height are not specified
+const TReal KDefaultPixelsToTwipsX=11.90625;
+const TReal KDefaultPixelsToTwipsY=11.9083333334;
+//
+const TInt KHeapSize=0x2000;
+const TInt KWindowServerHeapSize=0x40000;
+const TInt KKeyDown=0x80;
+//
+const TInt KLedTop=45;
+const TInt KLedLeft=36;
+const TInt KLedSize=14;
+const TInt KLedGap=5;
+const TBool KLedVertical=ETrue;
+
+GLREF_C TInt MultiProperty(TInt (*aHandler)(TAny* aObj, const char*), TAny* aPtr, const char* aProperty);
+
+const TInt KSecureLedColor = 0xFFFF;
+
+class DWinsKeyboard : public DBase
+	{
+public:
+	DWinsKeyboard();
+	TInt Init(TInt aId);
+//
+	TInt ScanCodeToRemappedKey(TInt aScanCode);
+	static TInt ScanCodeToStandardKey(TInt aScanCode);
+//
+	TInt GetEPOCKeyCode(const TDesC8& aStr);
+	TInt GetScanCode(const TDesC8& aStr);
+private:
+	static TInt ScanCodeToKey(TInt aScanCode, const TUint8* aStandardMap, const TUint8* aExtendedMap);
+	TInt DefineAlias(const char* aValue);
+	static TInt DoDefineAlias(TAny* aObj, const char* aValue);
+	TInt MapKey(const char* aValue);
+	static TInt DoMapKey(TAny* aObj, const char* aValue);
+private:
+	TUint8 iStandardKeyMap[KStandardKeyMapSize];
+	TUint8 iExtendedKeyMap[KExtendedKeyMapSize];
+	TUint8 iAltStandardKeyMap[KStandardKeyMapSize];
+	TUint8 iAltExtendedKeyMap[KExtendedKeyMapSize];
+	TUint8 iCtrlStandardKeyMap[KStandardKeyMapSize];
+	TUint8 iCtrlExtendedKeyMap[KExtendedKeyMapSize];
+	Alias iAliasedKeys;
+	};
+
+struct TWindowState
+	{
+public:
+	WINDOWPLACEMENT iWinPlace;
+	TInt iXoffset;
+	TInt iYoffset;
+	TEmulatorFlip iFlipstate;
+	};
+
+class DScreenProperties;
+class TViewport 
+	{
+public:
+	TViewport();
+	TViewport(DScreenProperties* aScreenProps);
+	~TViewport();
+		
+	void UpdateScrollBarH(HWND aHwnd);
+	void UpdateScrollBarV(HWND aHwnd);
+	
+	TInt GetMaxWindowWidth() const;
+	TInt GetMaxWindowHeight() const;
+	TInt GetMaxWidth() const;
+	TInt GetMaxHeight() const;
+	
+	TInt GetViewportOffsetX() const;
+	TInt GetViewportOffsetY() const;
+		
+	void SetViewportWidth(TInt aWidth);
+	void SetViewportHeight(TInt aHeight);
+	TInt GetViewportWidth() const;
+	TInt GetViewportHeight() const;
+	
+	void ScrollToY(TInt aPosition,HWND aHwnd);
+	void ScrollToX(TInt aPosition, HWND aHwnd);
+	
+	void UpdateChildPos(HWND aHwnd);
+		
+private:
+	
+	void SetViewportOffsetX(TInt aOffset);
+	void SetViewportOffsetY(TInt aOffset);
+	
+	/**
+	The DScreenProperties object which owns this viewport
+	*/
+	DScreenProperties* iScreenProps;
+	
+	/**
+	Width in pixels of the client area of the window through which the emulator is being viewed
+	*/
+	TInt iViewportWidth;
+	/**
+	Height in pixels of the client area of the window through which the emulator is being viewed
+	*/
+	TInt iViewportHeight;
+	/**
+	X Offset of viewport edge from emulator image ie. How far viewport is translated
+	*/
+	TInt iViewportOffsetX;
+	/**
+	Y Offset of viewport edge from emulator image ie. How far viewport is translated
+	*/
+	TInt iViewportOffsetY;
+	
+	};
+
+class DScreenProperties
+	{
+friend class TViewport;
+public:
+	DScreenProperties();
+	~DScreenProperties();
+	TInt SetupProperties(TInt aConf, TInt aScreen);
+	TWindowState GetWindowState();
+public:
+	TInt iScreenWidth;
+	TInt iScreenHeight;
+	TInt iMaxScreenWidth;
+	TInt iMaxScreenHeight;
+    TInt iXYInputWidth;
+    TInt iXYInputHeight;
+	TInt iPhysicalScreenWidth;
+	TInt iPhysicalScreenHeight;
+	TInt iMaxPhysicalScreenWidth;
+	TInt iMaxPhysicalScreenHeight;
+	TInt iScreenOffsetX; 
+	TInt iScreenOffsetY;
+	TUint iColorDepth; 			///<In emulator this is a bitfield of the available modes. All other aspects of each mode are identical.
+	TInt iDisplayContrast;
+	TEmulatorFlip iScreenRotation;
+	CHAR iFasciaFileName[MAX_PATH];
+	HWND iWindowHandle;
+	WINDOWPLACEMENT iWinPlace; ///<Used to store the window's WINDOWPLACEMENT struct.
+	RECT iWinRect;
+	TBool iScreenOff;
+	TInt  iCurrentMode;		   ///<Indicates the current mode when multiple modes are supported
+	TInt  iMaxModes;
+	TInt  iModeDepths[KEmulMaxNumModes];
+	TInt iCompositionBuffers;
+	TInt iRefreshRateHz;
+	/**
+	The viewport owned by the screen
+	*/
+	TViewport iViewport;
+
+	};
+	
+
+class DDisplayChannel;
+
+class DWinsUi : public DWinsUiBase
+	{
+public:
+	DWinsUi();
+	TInt Create(TInt aId);
+//
+	TInt GetVirtualKey(TEmulCommand& aCommand, TInt aX, TInt aY);
+	void SetVirtualKey(const TBool aProcessing, const TInt aCommandData, const TEmulCommand aCommand);
+	TBool WasVirtualKey(TInt& aCommandData, TEmulCommand& aCommand);
+	void TranslateMouseCoords(const TEmulatorFlip aFlipState, const TInt aX, const TInt aY, const TInt aRegionWidth, const TInt aRegionHeight, TInt& aNewX, TInt& aNewY);
+
+	//
+	TBool OnScreen(TInt aScreen, TInt aX, TInt aY) const;
+	TBool OnDigitizer(TInt aX, TInt aY) const;
+	TBool MultiTouchEnabled() const;
+	TBool GCEEnabled() const;
+	TInt MultiTouchPressureStep() const;
+	TInt MultiTouchProximityStep() const;
+//private:
+	void ScreenInfo(TScreenInfoV01& aInfo);
+	TBool VideoInfo(TInt aDeviceNumber, TVideoInfoV01& aInfo);
+	TBool VideoInfo(TInt aDeviceNumber,TInt aModeNumber, TVideoInfoV01& aInfo);
+	TBool VideoInfoForDisplayDriver(TInt aDeviceNumber,TInt aModeNumber, TVideoInfoV01& aInfo, TBool aRealWidthAndHeight = EFalse);
+//
+	TInt SetupProperties(TInt aId);
+	TInt DefineVirtualKey(const char* aValue);
+	static TInt DoDefineVirtualKey(TAny* aObj, const char* aValue);
+	TInt DefineEmulatorControl(const char* aValue);
+	static TInt DoDefineEmulatorControl(TAny* aObj, const char* aValue);
+
+	static TInt DoDefineEmulatorControlHotKey(TAny* aPtr, const char* aValue);
+	TInt DefineEmulatorControlHotKey(const char* aValue);
+//	implementing DWinsUiBase
+	TUint ColorDepth(TInt aScreenNumber);
+	TInt SetFlip(TEmulatorFlip aFlip, TInt aScreenNumber);
+	void Info(TVariantInfoV01& aInfo);
+	HWND HWnd();
+	void SwitchDisplay(TBool aSecure);
+	TInt NumberOfScreens();
+	virtual TInt SetDisplayChannel(TInt aScreenNumber, DDisplayChannel* aDisplay);
+	TInt SetDisplayChannelImpl(TInt aScreenNumber, DDisplayChannel* aDisplay);
+public:
+	DWinsKeyboard iKeyboard;
+//
+	TInt iLedSize;
+	TInt iLedGap;
+	TInt iLedOffsetX;
+	TInt iLedOffsetY;
+	TBool iLedVertical;
+	TBuf8<0x10> iPointerType;
+	TXYInputType iXYInputType;
+	CHAR iSysIniFileName[MAX_PATH];
+	WINDOWPLACEMENT iWinPlace;
+    RPointerArray<VirtualKey> iVirtualKeys;
+	RPointerArray<KeyCombination> iControlHotKeys;
+	TInt iDigitizerWidth;
+	TInt iDigitizerHeight;
+	TInt iDigitizerOffsetX;	//offset from the epoc screen 0!
+	TInt iDigitizerOffsetY;//offset from the epoc screen 0!
+	TBool iDigitizerEnabled;
+	CHAR iWindowTitle[KMaxNameSize+1];
+	TBool iDisplayVersionInfo;
+	TInt aId;			//configuration number;
+	TInt iInitialFlipMsg;
+	TBool iProcessingVirtualKey;
+	TUint iFakedVirtualKey;
+	TEmulCommand iVirtualKeyCommand;
+	RPointerArray<DScreenProperties> iScreens;
+private:
+	TBool iMultiTouchEnabled;
+	TBool iGCEEnabled;
+	TInt iMultiTouchProximityStep;
+	TInt iMultiTouchPressureStep;
+	};
+
+struct TBufferAddressA
+	{
+	DChunk* iChunk;
+	TAny* iAddress;
+	};
+	
+class TScreenBuffer
+	{
+public:	
+	RPointerArray<TAny> iFrameBuffers;
+	RPointerArray<TBufferAddressA> iMemChunks;
+	TInt 	iDisplayBufferOffset;    //offset to pixel data in current mode for display buffer. Mode of display buffer doesn't change we presume!
+	};
+
+
+// Chunk cleanup object - used to clean up the process/addr table when the process goes away.
+class TChunkCleanup : public TDfc
+    {
+public:
+    TChunkCleanup(DProcess* aProcess, TInt aScreenNumber);
+    void Cancel();
+    inline void SetIndex(TUint aIndex) { iIndex = aIndex; }
+private:
+    static void ChunkDestroyed(TChunkCleanup* aSelf);
+private:
+    DProcess* iProcess;
+    TInt      iScreenNumber;
+    TInt	  iIndex;
+    };
+
+
+// Entry to hold the process/disp.memory address, as we need to find the address of the display
+// memory when requested. A new entry would be added when a process first requests the address of display
+// memory. When the process dies, we remove the process entry (by way of a DFC for a chunk that is 
+// created on behalf of that process).
+class TProcessAddrEntry 
+    {
+public:
+	TProcessAddrEntry(DProcess *aProcess, TUint8* aAddress);
+public:
+	DProcess* iProcess;
+	TUint8* iAddress;
+	};
+
+
+
+class TBufferSet
+	{
+public:
+	TAny* iDisplayBuffer;		//current display buffer
+	BITMAPV4HEADER iInfo;		// This can be cast to a BITMAPINFOHEADER
+	TInt           iDisplayDriverCount;
+	TScreenBuffer  iScreenBuffer;
+	TScreenBuffer  iDsaBuffer;
+	RArray<TProcessAddrEntry> iProcAddrTable;
+	TInt iDisplayState;
+	TInt iStateChangeCount;
+	RDisplayChannel::TBufferFormat iBufferFormat;
+	DDisplayChannel* iDisplayChannel;
+	};
+
+class DMasterIni : public DBase
+	{
+public:
+	TInt SetupProperties();
+	TInt Create();
+	static TInt DoHalFunction(TAny* aPtr, TInt aFunction, TAny* a1, TAny* a2);
+	TInt HalFunction(TInt aDeviceNumber, TInt aFunction, TAny* a1, TAny* a2);
+	static TInt DoXYHalFunction(TAny* aThis, TInt aFunction, TAny* a1, TAny* a2);
+	TInt XYHalFunction(TInt aFunction, TAny* a1, TAny* a2);
+	static TInt DoMouseHalFunction(TAny* aThis, TInt aFunction, TAny* a1, TAny* a2);
+	TInt MouseHalFunction(TInt aFunction, TAny* a1, TAny* a2);
+	static TInt DoKbdHalFunction(TAny* aThis, TInt aFunction, TAny* a1, TAny* a2);
+
+	void InitBitmapHeader(DScreenProperties& aScreenProperties, LPBITMAPV4HEADER aInfo);
+	void InitBufferFormat(DScreenProperties& aScreenProperties, RDisplayChannel::TBufferFormat& aBufferFormat);
+	TInt AllocateFrameBuffers(TInt aScreenNumber, TInt aCount, TInt aSize);
+	void ReleaseFrameBuffers(TInt aScreenNumber);
+
+	
+	TInt DisplayMemoryAddress(TInt aScreenNumber, TInt& aAddress);
+	TInt DisplayMemoryHandle(TInt aScreenNumber, TInt& aHandle);
+	
+	void ProcessDeletedDFC();
+
+	void SetDisplaySize(TInt aDisplayNumber, TInt aWidth, TInt aHeight);
+	void SetBufferFormat(TInt aDisplayNumber, TUint aAgregatSize, RDisplayChannel::TPixelFormat aPixelFormat);
+	void SetImageSize(TInt aScreenNumber);
+
+public:
+	//not set or used: TInt iConfigurationCount;
+	RPointerArray<DWinsUi> iSystemInis;	//Indexed by config
+	RArray<TBufferSet>     iBufferSet;
+	// Fast mutex used to control access to the process/address table in the 
+	// TBufferSet. 
+	NFastMutex iLock;
+	TUint iMaxSizeInBytes;
+	static const RDisplayChannel::TPixelFormat iSupportedPixelFormatTable[];
+	static const TInt iSupportedPixelFormatTableSize;
+private:
+	TInt NumberOfResolutions(TInt aDeviceNumber, TAny* a1, TAny* a2);
+	TInt SpecificScreenInfo(TInt aDeviceNumber, TAny* a1, TAny* a2);
+	TInt CurrentScreenInfo(TInt aDeviceNumber, TAny* a1, TAny* a2);
+};
+
+
+GLREF_C TInt CompareI(const TDesC8& aLhs, const TDesC8& aRhs);
+
+// user-defined messages ...
+// flip the emulator window
+#define WM_FLIP_MESSAGE 0x7FFF
+// emulator window power state
+#define WM_EMUL_POWER_ON 0x7FFE
+
+//redraw client window from the internal buffer
+#define WM_REDRAW_WINDOW 	(WM_USER + 1)
+
+// Set the display frame buffer for this window to lParam
+#define WMU_SET_DISPLAY_BUFFER	(WM_USER + 2)
+
+// Set the display size for this window to (wParam,lParam)
+// Rotation (flip) is ignored. Current display state is used.
+// Configurations are searched to find a match, message is ignored if none found.
+#define WMU_SET_DISPLAY_SIZE	(WM_USER + 3)
+
+//modifies the header of the bitmap that is getting painted, updating the size
+#define WMU_SET_BUFFER_FORMAT	(WM_USER + 4)
+
+enum TGuiPanic
+	{
+	EGuiGetModuleHandle=21,
+	EGuiRegisterWindow=22,
+	EGuiKernelWindowCreate=23,
+	EGuiRegisterChildWindow=24,
+	EGuiKernelChildWindowCreate=25,
+	EGuiCreateBitmap=26,
+	EGuiChildWinProc=27,
+	EGuiEnterCS=28,
+	EGuiLeaveCS=29,
+	EGuiStandbyWhilstOff=30,
+	EGuiResetPowerEvent=31,
+	EGuiSetPowerEvent=32,
+	EGuiWaitPowerOnFailed=33,
+	EGuiNoDisplayChannel=34,
+	EGuiVideoInfoUnavailable=35,
+	EGuiInvalidMultiTouch=36
+	};
+
+GLREF_C void Fault(TGuiPanic aPanic);
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/inc/mconf.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,39 @@
+// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\inc\mconf.h
+// Brutus Persistent Machine Configuration
+// 
+//
+
+#ifndef __MCONF_H__
+#define __MCONF_H__
+#include <kernel/kernel.h>
+
+class TWinsMachineConfig : public TMachineConfig
+	{
+public:
+	TSoundInfoV1 iSoundInfo;
+    TOnOffInfoV1 iOnOffInfo;
+	TTimeK iMainBatteryInsertionTime;
+    Int64 iMainBatteryInUseMicroSeconds;
+	Int64 iExternalPowerInUseMicroSeconds;
+	Int64 iMainBatteryMilliAmpTicks;
+	};
+
+typedef TWinsMachineConfig TActualMachineConfig;
+
+inline TActualMachineConfig& TheActualMachineConfig()
+	{return (TActualMachineConfig&)Kern::MachineConfig();}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/inc/monitors.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,78 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\inc\monitors.h
+// Declare stuff we need for multiple monitor support.
+// (Not available in the version of windows.h we use.)
+// 
+//
+
+#ifndef __MONITORS_H__
+#define __MONITORS_H__
+
+#ifndef SM_CMONITORS
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define SM_XVIRTUALSCREEN       76
+#define SM_YVIRTUALSCREEN       77
+#define SM_CXVIRTUALSCREEN      78
+#define SM_CYVIRTUALSCREEN      79
+#define SM_CMONITORS            80
+#define SM_SAMEDISPLAYFORMAT    81
+
+DECLARE_HANDLE(HMONITOR);
+
+typedef struct tagMONITORINFO
+{
+    DWORD   cbSize;
+    RECT    rcMonitor;
+    RECT    rcWork;
+    DWORD   dwFlags;
+} MONITORINFO, *LPMONITORINFO;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif		// ifndef SM_CMONITORS
+
+/* CodeWarrior include files have SM_CMONITORS defined unconditionally,
+ * but MONITOR_DEFAULTTONULL etc depend upon _WIN32_WINDOWS values.
+ */
+#ifndef MONITOR_DEFAULTTONULL
+
+#define MONITOR_DEFAULTTONULL       0x00000000
+#define MONITOR_DEFAULTTOPRIMARY    0x00000001
+#define MONITOR_DEFAULTTONEAREST    0x00000002
+
+#endif		// ifndef MONITOR_DEFAULTTONULL
+
+class SystemMonitors
+	{
+public:
+	SystemMonitors(void);
+	inline TInt Count(void) { return iCount; };
+	TBool RectAllOnOne(RECT& rect);
+	HMONITOR MonitorFromRect(const RECT& rect, UINT flags=MONITOR_DEFAULTTONULL);
+	TBool GetMonitorInfo(HMONITOR monitor, LPMONITORINFO pMonInfo);
+private:
+	TBool iHaveMultiMonFunctions;
+	TBool iCount;
+	HMONITOR (WINAPI *ipMonitorFromRect)(LPCRECT lprcScreenCoords, UINT uFlags);
+	BOOL (WINAPI *ipGetMonitorInfo)(HMONITOR hMonitor, LPMONITORINFO lpMonitorInfo);
+	};
+
+#endif		// ifndef __MONITORS_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/inc/nand_fbr_offset.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,30 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\inc\NAND_FBR_OFFSET.H
+// 
+// WARNING: This file contains some APIs which are internal and are subject
+//          to change without notice. Such APIs should therefore not be used
+//          outside the Kernel and Hardware Services package.
+//
+
+#ifndef __NAND_FBR_OFFSET_H__
+#define __NAND_FBR_OFFSET_H__
+
+/**
+Defines the sector offset at which the FBR appears in the first block
+@publishedPartner
+*/
+const TInt KNandFbrSectorOffset=0;
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/inc/nand_plat.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,52 @@
+// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\NAND_PLAT.H
+// 
+// WARNING: This file contains some APIs which are internal and are subject
+//          to change without notice. Such APIs should therefore not be used
+//          outside the Kernel and Hardware Services package.
+//
+
+#ifndef __NAND_PLAT_H__
+#define __NAND_PLAT_H__
+
+#include <nanddevice.h>
+#include <nand_fbr_offset.h>
+
+/**
+This table contains a list of all of the NAND flash devices currently
+supported by the NAND flash solution.
+@internalTechnology
+*/
+const TNandDeviceInfo gDeviceTable[] = {
+		{ ESamsungId, 0x73, 1024, 32, 512, 16, 9, 14,  20, 5, 0, 6, TDeviceFlags(0) },				// 16MB
+		// Last entry
+		{ TManufacturerId(0),    0,    0,  0,   0,  0, 0,  0, TDeviceFlags(0) }
+		};
+
+/**
+Defining __USE_CUSTOM_ALLOCATOR enables the use of the NAND Flash Allocator.
+@internalTechnology
+*/
+#define __USE_CUSTOM_ALLOCATOR
+
+/**
+The following constants support relocation of the NAND FBR for this platform
+KNandFbrSectorOffset is the third of three constants required - it is defined in nand_fbr_offset.h
+@publishedPartner
+*/
+const TInt KNandMinibootUsed		=	ETrue;
+const TInt KNandCoreldrRelocatable	=	ETrue;
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/inc/variant.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,192 @@
+// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\inc\variant.h
+// Wins Variant Header
+// 
+//
+
+#ifndef __VA_STD_H__
+#define __VA_STD_H__
+
+#include <assp.h>
+#include "vwins.h"
+#include "nk_priv.h"
+#pragma warning(disable : 4201) // nonstandard extension used : nameless struct/union
+#include <mmsystem.h>
+#pragma warning(default : 4201)
+#include <kernel/kpower.h>
+
+#ifdef _DEBUG
+const TInt KDefaultDebugMask = 1<<KPANIC; //KPANIC, override this with "DebugMask 0" in EPOC.INI
+#else
+const TInt KDefaultDebugMask = 0;
+#endif
+
+typedef void (*TMediaChangeCallBack)(TAny*);
+
+class WinsTimer
+	{
+public:
+	enum
+		{
+		EDefaultPeriod = 5,		// milliseconds
+		EMaxLag = 100,			// milliseconds
+		};
+public:
+	WinsTimer();
+	void Init(TUint aPeriod);
+	void Enable();
+	inline TUint Period() const
+		{return iPeriod;}
+	inline void SetIdleThread()
+		{if (!iIdleThread) iIdleThread = NKern::CurrentThread();}
+	inline void Nobble(TUint aNobbleFactor)
+		{iNobbleNanos = aNobbleFactor * iPeriod;}
+	TInt SystemTime() const;
+	void SetSystemTime(TInt aTime);
+	void Standby();
+	void Wakeup();
+private:
+	void EventThread(NTimerQ& aTimerQ);
+	static DWORD WINAPI Thread(LPVOID);
+	static void CALLBACK Tick(UINT, UINT, DWORD, DWORD, DWORD);
+private:
+	TUint iPeriod;
+	TUint iNobbleNanos;
+	TInt iMaxLagTicks;
+	HANDLE iSemaphore;
+	UINT iTimer;
+	TInt iSuspend;
+	Int64 iTime;
+	NThread* iIdleThread;
+	TBool iStandby;
+	};
+
+class Properties
+	{
+	struct SEntry
+		{
+		char* iProperty;
+		char* iValue;
+		};
+public:
+	Properties();
+	const char* Append(const char* aProperty, const char* aValue);
+	const char* Replace(const char* aProperty, const char* aValue);
+	TInt GetString(const char* aProperty, const char*& aValue) const;
+	TInt GetInt(const char* aProperty, TInt& aValue) const;
+	TInt GetBool(const char* aProperty, TBool& aValue, TBool aDefaultValue=EFalse) const;
+	//
+	void Dump() const;
+private:
+	TInt Find(const char* aProperty) const;
+	const char* Insert(TInt aIndex, const char* aProperty, const char* aValue);
+private:
+	SEntry* iEntries;
+	TInt iCount;
+	TInt iSize;
+	};
+
+class Wins : public Asic
+	{
+public:
+	Wins();
+	//
+	TInt Init(TBool aRunExe);
+	inline void InstallUi(DWinsUiBase& aUi);
+	TInt EmulatorHal(TInt aFunction, TAny* a1, TAny* a2);
+private:
+	// initialisation
+	void Init1();
+	void Init3();
+	void AddressInfo(SAddressInfo& anInfo);
+
+	// power management
+	void Idle();
+
+	// timing
+	TInt MsTickPeriod();
+	TInt SystemTimeInSecondsFrom2000(TInt& aTime);
+	TInt SetSystemTimeInSecondsFrom2000(TInt aTime);
+
+	// HAL
+	TInt VariantHal(TInt aFunction, TAny* a1, TAny* a2);
+
+	// Machine configuration
+	TPtr8 MachineConfiguration();
+	const char* EmulatorMediaPath();
+
+	// Debug trace
+	void DebugPrint(const TDesC8& aDes);
+	TBool ErrorDialog(TError aType, const TDesC8& aPanic, TInt aVal);
+	void EarlyLogging(const char* aMessage1,const char* aMessage2);
+private:
+	TInt InitProperties(TBool aRunExe);
+	TInt DebugMask();
+	TUint32 KernelConfigFlags();
+	TInt ParseCapabilitiesArg(SCapabilitySet& aCapabilities, const char *aText);
+	void DisabledCapabilities(SCapabilitySet& aCapabilities);
+	void CalibrateCpuSpeed();
+	TInt SetCpuSpeed(TUint aSpeed);
+	TInt AddProperty(char* aProperty, const char* aEol);
+	TInt ProcessCommandLine(TBool aRunExe, char* aCDrive);
+	TInt LoadProperties();
+	TInt ReadProperties(char* aData);
+	TInt ReadIniFile(const char* aFileName, char*& aContents);
+	TInt SetupPaths();
+	TInt SetupMediaPath();
+	TInt SetupDrive(int aDrive, const char* aPath);
+	TInt MapFilename(const TDesC& aFilename, TDes& aBuffer) const;
+	TInt MapDrive(int aDrive, TDes& aBuffer) const;
+	HANDLE DebugOutput();
+	void PurgeImages();
+	TBool ConfigSpecificProperty(const char * aProperty);
+	TInt LoadConfigSpecificProperties(const char * pFile);
+	TBool ScreenSpecificProperty(const char * aProperty);
+
+private:
+	friend class DWinsPowerController;
+	DWinsUiBase* iUi;
+	WinsTimer iTimer;
+	Properties iProperties;
+	TUint iRealCpuSpeed;
+	TUint iCpuSpeed;
+	HANDLE iDebugOutput;
+	TBool iLogTimeStamp;
+	TBool iPurgedImages;
+	TBool iLogToDebugger;
+	TBool iLogToFile;
+	TBool iConfigPropertySet;
+	TInt iConfigId;
+
+	class DWinsPowerController* iPowerController;
+	// For MMC emulation
+	static TBool MediaDoorOpen;
+	static TInt CurrentPBusDevice;
+	static TAny* MediaChangeCallbackParam;
+	static TMediaChangeCallBack MediaChangeCallBackPtr;
+public:
+	static Wins* Self()
+		{ return (Wins*) Arch::TheAsic();}
+	IMPORT_C void AssertWakeupSignal();
+	IMPORT_C void WakeupEvent();
+	IMPORT_C static TBool* MediaDoorOpenPtr();
+	IMPORT_C static TInt* CurrentPBusDevicePtr();
+	IMPORT_C static void SetMediaChangeCallBackPtr(TMediaChangeCallBack aPtr, TAny* aParam);
+	IMPORT_C static void MediaChangeCallBack();
+	};
+
+GLREF_D Wins TheVariant;
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/inc/variantmediadef.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,60 @@
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\inc\variantmediadef.h
+// Media definitions for the Wins Variant.
+// Each Media Driver requires the following definitions
+// DRIVECOUNT - The total number of local drive object to be assigned to the Media Driver (1-KMaxLocalDrives)
+// DRIVELIST - A list of the local drive numbers (each separated with a comma) to be assigned to the Media Driver.
+// Each in the range 0 - (KMaxLocalDrives-1). Total number of drive numbers must equal the value
+// of DRIVECOUNT.
+// NUMMEDIA - The total number of media objects to be assigned to the Media Driver.
+// DRIVENAME - A name for the drive group.
+// For the complete set of media definitions
+// - The total number of local drive objects assigned should not exceed KMaxLocalDrives.
+// - Each Media Driver should be assigned a unique set of drive numbers - no conflicts between Media Drivers.
+// - The total number of media objects assigned should not exceed KMaxLocalDrives.
+// 
+// WARNING: This file contains some APIs which are internal and are subject
+//          to change without notice. Such APIs should therefore not be used
+//          outside the Kernel and Hardware Services package.
+//
+ 
+#ifndef __VARIANTMEDIADEF_H__
+#define __VARIANTMEDIADEF_H__
+
+// Variant parameters for IRAM Media Driver (MEDINT.PDD)
+#define IRAM_DRIVECOUNT 1
+#define IRAM_DRIVELIST 0
+#define IRAM_NUMMEDIA 1	
+#define IRAM_DRIVENAME "IRam"
+
+// Variant parameters for LFFS Media Driver (MEDLFS.PDD)
+#define LFFS_DRIVECOUNT 1
+#define LFFS_DRIVELIST 8
+#define LFFS_NUMMEDIA 1	
+#define LFFS_DRIVENAME "Flash"
+
+// Variant parameters for the MMC Controller (EPBUSMMC.DLL)
+#define MMC0_DRIVECOUNT 4
+#define MMC0_DRIVELIST 1,2,3,4
+#define MMC0_NUMMEDIA 4	
+#define MMC0_DRIVENAME "MultiMediaCard0"
+
+// Variant parameters for NAND flash media driver 
+#define NAND_DRIVECOUNT 3
+#define NAND_DRIVELIST 5,6,9
+#define NAND_NUMMEDIA 1
+#define NAND_DRIVENAME "Nand"
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/inc/vwins.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,43 @@
+// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\inc\vwins.h
+// Wins Variant 'public' Header
+// 
+//
+
+#ifndef __VWINS_H__
+#define __VWINS_H__
+
+#include <winsdef.h>
+#include "nk_priv.h"
+
+const TUint KDefaultColorDepth = 0xffffffffu;
+const TUint KDefaultColorDepthGCE = 24;
+
+class DDisplayChannel;
+
+class DWinsUiBase : public DBase
+	{
+public:
+	virtual TUint ColorDepth(TInt aScreenNumber) =0;
+	virtual TInt SetFlip(TEmulatorFlip aFlip, TInt aScreenNumber) =0;
+	virtual void Info(TVariantInfoV01& aInfo) =0;
+	virtual HWND HWnd() =0;
+	virtual TInt NumberOfScreens() =0;
+	virtual TInt SetDisplayChannel(TInt aScreenNumber, DDisplayChannel* aDisplay) = 0;
+protected:
+	IMPORT_C DWinsUiBase();
+	};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/inc/winsgui.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,37 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\inc\winsgui.h
+// 
+// WARNING: This file contains some APIs which are internal and are subject
+//          to change without notice. Such APIs should therefore not be used
+//          outside the Kernel and Hardware Services package.
+//
+
+#ifndef __WINSGUI_H__
+#define __WINSGUI_H__
+
+#include <e32def.h>
+
+class WinsGui
+	{
+public:
+	/**
+	Returns the current emulator GUI configuration
+	@publishedPartner
+	*/
+	IMPORT_C static TInt CurrentConfiguration();
+	};
+
+
+#endif //__WINSGUI_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/medlfs.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,47 @@
+// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins/medlfs.mmp
+// 
+//
+
+#include "kernel/kern_ext.mmh"
+
+USERINCLUDE inc
+SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
+
+
+target				medlfs.pdd
+targettype			pdd
+
+sourcepath			../../../kernelhwsrv/kernel/eka/drivers/medlfs
+source				flash_media.cpp
+
+sourcepath			specific
+source				lffsdev.cpp
+
+library				elocd.lib emulator.lib
+
+epocallowdlldata
+
+start wins
+
+win32_library		kernel32.lib
+#if defined(VC32)
+win32_library		msvcrt.lib
+#endif
+end
+
+capability			all
+
+VENDORID 0x70000001
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/serialldd.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,47 @@
+// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins/winscomm.mmp
+// ecomm.ldd Serial port logical device driver
+// 
+//
+
+/**
+ @file
+*/
+
+
+#include "kernel/kern_ext.mmh"
+SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
+
+SYMBIAN_BASE_SYSTEMINCLUDE(wins)
+
+target			ecomm.ldd
+targettype		ldd
+
+
+
+sourcepath			specific
+source				serialldd.cpp
+
+start wins
+baseaddress		0x59000000
+win32_library	kernel32.lib
+end
+
+epocallowdlldata
+
+
+capability			all
+
+VENDORID 0x70000001
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/serialpdd.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,44 @@
+// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins/ecdrv.mmp
+// 
+//
+
+#include "kernel/kern_ext.mmh"
+SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
+
+SYMBIAN_BASE_SYSTEMINCLUDE(wins)
+
+target			ecdrv.pdd
+
+targettype		pdd
+
+
+sourcepath		specific
+source			serialpdd.cpp
+
+
+library			 emulator.lib
+
+start wins
+baseaddress		0x59000000
+win32_library	kernel32.lib
+end
+
+uid		0x100039d0
+VENDORID 0x70000001
+
+epocallowdlldata
+
+capability			all
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/soundsc.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,47 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins/soundsc.mmp
+// soundsc.pdd Shared chunk sound physical device driver.
+// 
+//
+
+/**
+ @file
+*/
+
+#include "kernel/kern_ext.mmh"
+
+USERINCLUDE	inc
+SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
+
+target          soundsc.pdd
+targettype      pdd
+
+sourcepath	specific
+source          soundsc_tx.cpp
+source          soundsc_rx.cpp
+
+library         emulator.lib
+
+uid             0x100039d0 0x1000015c
+VENDORID 0x70000001
+
+start wins
+baseaddress     0x5a000000
+win32_library	kernel32.lib winmm.lib
+end
+
+capability			all
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/display_chan.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1554 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+
+#include <kernel/kern_priv.h>
+#include <kernel/kernel.h>
+#include <winsdef.h>
+#include <emulator.h>
+#include <pixelformats.h>
+#include "gui.h"
+#include "display_chan.h"
+
+#define WIN32_LEAN_AND_MEAN
+#pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union
+#include <windows.h>
+#pragma warning( default : 4201 ) // nonstandard extension used : nameless struct/union
+
+#ifndef DD_TRACE
+#ifdef DD_TRACE_ENABLED
+#define DD_TRACE(X) X
+#else
+#define DD_TRACE(X)
+#endif
+#endif
+
+
+
+DDisplayChannel::DDisplayChannel() :
+		iVSync(&DDisplayChannel::VSyncTimerFn, this),
+		iVSyncDfc(&DDisplayChannel::VSyncDfcFn, this, Kern::DfcQue0(), KDfcPriority),
+		iPostedBuffer((TUint)KBufferNotSet),
+		iGetBuffer((TUint)KFirstCompositionBuffer),
+		iDisplayStateSpinner(0),
+		iVersion(KDisplayChMajorVersionNumber, 
+			     KDisplayChMinorVersionNumber, 
+			     KDisplayChBuildVersionNumber)
+	{
+	DD_TRACE(Kern::Printf("DDisplayChannel Creation");)
+	}
+
+
+DDisplayChannel::~DDisplayChannel()
+	{
+	DD_TRACE(Kern::Printf("DDisplayChannel Destruction");)
+	//clean up.
+
+	NKern::ThreadEnterCS();
+	Kern::Free(iBuffer);
+	NKern::ThreadLeaveCS();
+
+	}
+
+
+/**
+  Second stage constructor called by the kernel's device driver framework.
+  This is called in the context of the user thread (client) which requested the creation of a Logical Channel
+  (E.g. through a call to RBusLogicalChannel::DoCreate)
+  The thread is in a critical section.
+
+  @param aUnit The unit argument supplied by the client to RBusLogicalChannel::DoCreate
+  @param aInfo The info argument supplied by the client to RBusLogicalChannel::DoCreate
+  @param aVer The version argument supplied by the client to RBusLogicalChannel::DoCreate
+
+  @return KErrNone if successful, otherwise one of the other system wide error codes.
+*/
+TInt DDisplayChannel::DoCreate(TInt aUnit, const TDesC8* /*aInfo*/, const TVersion& aVer)
+	{
+	// Check version
+	if (!Kern::QueryVersionSupported(iDevice->iVersion, aVer))
+		{
+		return KErrNotSupported;
+		}
+
+	iScreenNumber = aUnit;	/*aUnit?*/
+	SetDfcQ(Kern::DfcQue0());
+	iMsgQ.Receive();
+
+	// Ask the GUI code to initialize the rest of the object.
+	return Kern::HalFunction(EHalGroupEmulator, EEmulatorHalSetDisplayChannel,
+			(TAny*)iScreenNumber, this);
+	}
+
+
+void DDisplayChannel::ValidateSpecificInfo(TInt aBytesPerPixel, RDisplayChannel::TOrientationSpecificInfo& aInfo)
+	{
+	__ASSERT_DEBUG(aInfo.iWidth > 0 && aInfo.iHeight > 0, Panic(EDisplayPanicInvalidDimensions));
+	__ASSERT_DEBUG(aInfo.iOffsetBetweenLines > 0, Panic(EDisplayPanicInvalidStride));
+	__ASSERT_DEBUG(aInfo.iWidth * aBytesPerPixel <= (TUint)aInfo.iOffsetBetweenLines, Panic(EDisplayPanicInvalidStride));
+	
+	//this is just to stop compiler complaining..
+	(TAny)aBytesPerPixel;
+	(TAny)aInfo;
+	}
+
+/**
+Finish creating the display channel object.
+
+@param aInfo			Display description object
+@param aRotation		Initial rotation
+@param aHwnd			Associated window handle
+@param aFrameBuffers	Array of one or more pointers to frame buffers
+@param aResolution		Initial resolution
+@param aTwips           Size in twips
+@return	KErrNone if successful, or a system-wide error otherwise.
+*/
+TInt DDisplayChannel::Initialize(RDisplayChannel::TDisplayInfo& aInfo, 
+		                         RDisplayChannel::TDisplayRotation aRotation,
+		                         HWND aHwnd, RPointerArray<TAny>& aFrameBuffers, 
+		                         RPointerArray<TBufferAddressA>& aChunks,
+								 TScreenBuffer& aDsaBuffer,
+		                         TSize aResolution, 
+		                         TSize aTwips,
+		                         const RDisplayChannel::TPixelFormat aPixelFormatArray[],
+								 const TInt aPixelFormatArraySize,
+								 const RDisplayChannel::TBufferFormat& aBufferFormat)
+
+	{
+	__ASSERT_DEBUG(aInfo.iBitsPerPixel >= 12 && aInfo.iBitsPerPixel <= 32, Panic(EDisplayPanicInvalidBitDepth));
+	__ASSERT_DEBUG(aInfo.iRefreshRateHz > 0, Panic(EDisplayPanicInvalidRefreshRate));
+	__ASSERT_DEBUG(aInfo.iAvailableRotations & aRotation, Panic(EDisplayPanicInvalidRotation));
+	__ASSERT_DEBUG(aInfo.iNormal.iWidth == aInfo.iFlipped.iHeight, Panic(EDisplayPanicInvalidDimensions));
+	__ASSERT_DEBUG(aInfo.iNormal.iHeight == aInfo.iFlipped.iWidth, Panic(EDisplayPanicInvalidDimensions));
+	__ASSERT_DEBUG(aRotation == RDisplayChannel::ERotationNormal ||
+					aRotation == RDisplayChannel::ERotation90CW ||
+					aRotation == RDisplayChannel::ERotation180 ||
+					aRotation == RDisplayChannel::ERotation270CW, Panic(EDisplayPanicInvalidRotation));
+	__ASSERT_DEBUG(aFrameBuffers.Count() > 0, Panic(EDisplayPanicInvalidFrameBuffers));
+	__ASSERT_DEBUG(aHwnd, Panic(EDisplayPanicInvalidWindowHandle));
+
+	ValidateSpecificInfo((aInfo.iBitsPerPixel > 16) ? 4 : 2, aInfo.iNormal);
+	ValidateSpecificInfo((aInfo.iBitsPerPixel > 16) ? 4 : 2, aInfo.iFlipped);
+
+	// aFrameBuffers includes the legacy buffer at index 0.
+	iNumCompositionBuffers = aFrameBuffers.Count() - 1;
+	iTotalBuffers = KFirstCompositionBuffer + iNumCompositionBuffers;
+	iBuffer = (TBufferInfo*)Kern::AllocZ(iTotalBuffers * sizeof(TBufferInfo));
+	iChunks = (TBufferAddressA*)Kern::AllocZ(iTotalBuffers * sizeof(TBufferAddressA));
+	if (!iBuffer)
+		{
+		return KErrNoMemory;
+		}
+
+	aInfo.iNumCompositionBuffers = iNumCompositionBuffers;
+	for (TUint index = 0; index < iNumCompositionBuffers; index++)
+		{
+		iBuffer[index + KFirstCompositionBuffer].iAddress = aFrameBuffers[index + 1];
+		iChunks[index + KFirstCompositionBuffer].iChunk = aChunks[index + 1]->iChunk;
+		}
+		
+	iChannelInfo = aInfo;
+	
+	iDisplayRotation = iCurrentRotation = aRotation;
+	iDisplayResolution = iCurrentResolution = aResolution;
+	iCurrentTwips = aTwips;
+	iHwnd = aHwnd;
+	
+	// Ensure the VSync DFC is on the same queue as the message handling.
+	iVSyncTicks = NKern::TimerTicks(1000 / aInfo.iRefreshRateHz);
+    iVSync.OneShot(iVSyncTicks);
+
+	if (aDsaBuffer.iMemChunks.Count() != 0)
+		{	
+		iBuffer[KLegacyBuffer].iAddress = aDsaBuffer.iFrameBuffers[0];
+		}
+	else
+		{
+		iBuffer[KLegacyBuffer].iAddress = NULL;
+		}
+    
+	iPixelFormatArray = aPixelFormatArray;
+	iPixelFormatArraySize = aPixelFormatArraySize;
+
+	// copy the initial buffer format
+	iInitialBufferFormat = aBufferFormat;
+	iDisplayBufferFormat = iInitialBufferFormat;
+	iCurrentBufferFormat = iDisplayBufferFormat;
+	return KErrNone;
+	}
+
+
+/**
+Set the address of the legacy buffer. 
+ 
+@param aAddress			Pointer to the legacy buffer. 
+*/
+void DDisplayChannel::SetLegacyBuffer(void *aAddress)
+	{ 
+	iBuffer[KLegacyBuffer].iAddress = aAddress;
+	}
+
+
+
+/**
+Handle a message on this display for the logical channel.
+
+@param aMsg	The message to process. The iValue member of this distinguishes the
+		message type:
+		iValue == ECloseMsg, channel close message
+		iValue == KMaxTInt, a 'DoCancel' message
+		iValue >= 0, a 'DoControl' message with function number equal to iValue
+		iValue < 0, a 'DoRequest' message with function number equal to ~iValue
+*/
+void DDisplayChannel::HandleMsg(TMessageBase* aMsg)
+	{
+	iMsg = (TThreadMessage*)aMsg;
+	TInt id = iMsg->iValue;
+	TInt r = KErrNone;
+
+    if (id == (TInt)ECloseMsg)
+       {
+       iVSync.Cancel();
+	   iWaitForPostRequest.Complete(KErrCancel);
+	   iWaitForDisplayConnect.Complete(KErrCancel);
+       if (iBuffer)
+	       	{
+    		// Unhook display channel from the GUI code if initialized.
+    		if (iBuffer[KLegacyBuffer].iAddress)
+	       		{
+    		      	Kern::HalFunction(EHalGroupEmulator, EEmulatorHalSetDisplayChannel,
+	   					(TAny*)iScreenNumber, NULL);
+        	   		PostMessage(iHwnd, WMU_SET_DISPLAY_BUFFER, 0, 0);
+		      	    InvalidateRect(iHwnd, NULL, FALSE);
+    			}
+
+	       	RDisplayChannel::TBufferId index = iTotalBuffers;
+
+    		while (index-- > 0)
+	       		{
+		          	iBuffer[index].iRequest.Complete(KErrCancel);
+
+        			if (IsUserBuffer(index))
+		          		{
+        				// Close chunk
+		          		if (iBuffer[index].iChunk)
+        					{
+		              			NKern::ThreadEnterCS();
+            					Kern::ChunkClose(iBuffer[index].iChunk);
+            					NKern::ThreadLeaveCS();
+        					}
+				        }
+			     }
+
+            }
+			iMsg->Complete(KErrNone, EFalse);
+			return;
+        }
+
+	if (id < 0)
+		{
+		DoRequest(~id);
+		r = KErrNone;
+		}
+	else
+		{
+		r = (id == KMaxTInt) ? DoCancel(iMsg->Int0()) : DoControl(id);
+		}
+
+	iMsg->Complete(r, (id != ECloseMsg));
+	}
+
+
+/**
+Process synchronous 'control' requests. Parameters are in the first two
+arguments of iMsg.
+*/
+TInt DDisplayChannel::DoControl(TInt aFunction)
+	{
+	DD_TRACE(Kern::Printf(">DDisplayChannel::DoControl fn=%d\n", aFunction);)
+
+	TInt r = KErrNotSupported;
+	TPckgBuf<RDisplayChannel::TDisplayInfo> pkg(iChannelInfo);
+	switch(aFunction)
+		{
+		case RDisplayChannel::ECtrlGetDisplayInfo:
+			// a1: TDisplayInfo* info [out]
+			Kern::KUDesPut(*(TDes8*)iMsg->Ptr0(), pkg); ///*&iChannelInfo*/);
+			r = KErrNone;
+			break;
+
+		case RDisplayChannel::ECtrlOpen:
+			// Everything is done in Construct
+			r = KErrNone;
+			break;
+
+		case RDisplayChannel::ECtrlClose:
+			// Nothing to do?
+			r = KErrNone;
+			break;
+
+		case RDisplayChannel::ECtrlPostCompositionBuffer:
+			// a1: const TRegionFix<KMaxRectangles>* region [in]
+			// a2: TPostCount* post count [out]
+			r = PostCompositionBuffer(iMsg->Ptr0(), (RDisplayChannel::TPostCount*)iMsg->Ptr1());
+			break;
+
+		case RDisplayChannel::ECtrlPostLegacyBuffer:
+			// a1: const TRegionFix<KMaxRectangles>* region [in]
+			// a2: TPostCount* post count [out]
+			r = PostLegacyBuffer(iMsg->Ptr0(), (RDisplayChannel::TPostCount*)iMsg->Ptr1());
+			break;
+
+		case RDisplayChannel::ECtrlRegisterUserBuffer:
+			// a1: { TInt Chunk handle, TInt offset }* [in]
+			// a2: TInt* buffer ID [out]
+			{
+			__ASSERT_DEBUG(iMsg->Ptr0(), Panic(EDisplayPanicNullArgument));
+			TInt arg[2];
+			kumemget(arg, iMsg->Ptr0(), sizeof(arg));
+			r = RegisterUserBuffer(arg[0], arg[1], (RDisplayChannel::TBufferId*)iMsg->Ptr1());
+			}
+			break;
+
+		case RDisplayChannel::ECtrlDeregisterUserBuffer:
+			// a1: TBufferId* buffer ID [in]
+			r = DeregisterUserBuffer((RDisplayChannel::TBufferId*)iMsg->Ptr0());
+			break;
+
+		case RDisplayChannel::ECtrlSetRotation:
+			// a1: TDisplayRotation* new rotation [in]
+			// a2: TBool* display config has changed [out]
+			r = SetRotation((RDisplayChannel::TDisplayRotation*)iMsg->Ptr0(), (TBool*)iMsg->Ptr1());
+			break;
+
+		case RDisplayChannel::ECtrlCurrentRotation:
+			// a1: TDisplayRotation* current rotation [out]
+			r = SafePut(iMsg->Ptr0(), &iCurrentRotation, sizeof(iCurrentRotation));
+			break;
+
+		case ECloseMsg:
+			r = KErrNone;
+			break;
+
+	    case RDisplayChannel::ECtrlGetCompositionBufferInfo:
+    	    {
+    	    TInt arg[2];
+    	    TInt index = *((TInt*)(iMsg->Ptr0()));
+            r = Kern::MakeHandleAndOpen(iMsg->Client(), iChunks[index + KFirstCompositionBuffer].iChunk);
+            if(r >= 0)
+                {
+	            arg[0] = r;
+	            arg[1] = 0;
+				SafePut(iMsg->Ptr1(),&arg,(sizeof(TInt)*2));
+                r = KErrNone;
+                }
+             }
+    	    break;
+    	 // added to v1.0
+	    case RDisplayChannel::ECtrlVersion:
+			r = SafePut(iMsg->Ptr0(), &iVersion, sizeof(iVersion));
+	    	break;
+    	//v1_1
+	    case RDisplayChannel::ECtrlNumberOfResolutions:
+	    	{
+	    	r = NumberOfResolutions();
+	    	}
+	    	break;
+	    case RDisplayChannel::ECtrlGetResolutions:
+	    	{
+	    	r = GetResolutions();
+	    	if(r == KErrCorrupt) //Resolution list changed during GetResolutions
+	    		{//second go
+	    		r = GetResolutions();
+	    		}
+	    	}
+	    	break;
+	    case RDisplayChannel::ECtrlSetResolution:
+	    	{
+	    	r = SetResolution((TSize*)iMsg->Ptr0());
+	    	}
+	    	break;
+	    case RDisplayChannel::ECtrlGetResolution:
+	    	{
+	    	r = GetResolution((TSize*)iMsg->Ptr0());
+	    	}
+	    	break;
+	    case RDisplayChannel::ECtrlGetTwips:
+	    	{
+	    	r = GetTwips((TSize*)iMsg->Ptr0());
+	    	}
+	    	break;
+	    case RDisplayChannel::ECtrlNumberOfPixelFormats:
+			r = iPixelFormatArraySize;
+	    	break;
+	    case RDisplayChannel::ECtrlGetPixelFormats:
+	    	r = GetPixelFormats();
+	    	break;
+	    case RDisplayChannel::ECtrlSetBufferFormat:
+	    	r = SetBufferFormat((RDisplayChannel::TBufferFormat*)iMsg->Ptr0());
+	    	break;
+	    case RDisplayChannel::ECtrlGetBufferFormat:
+			r = SafePut(iMsg->Ptr0(), &iCurrentBufferFormat, sizeof(iCurrentBufferFormat));
+	    	break;
+	    case RDisplayChannel::ECtrlNextPlaneOffset:
+	    	// we support, for moment only packed pixel formats
+	    	r = NextPlaneOffset((RDisplayChannel::TBufferFormat*)iMsg->Ptr0(), NULL);
+	    	break;
+	    case RDisplayChannel::ECtrlNextLineOffset:
+	    	// use the internal current resolution and current rotation
+	    	r = NextLineOffset((RDisplayChannel::TBufferFormat*)iMsg->Ptr0(), NULL);
+	    	break;
+	    case RDisplayChannel::ECtrlNextPlaneOffsetExtended:
+	    	// we support, for moment only packed pixel formats
+	    	r = NextPlaneOffset((RDisplayChannel::TBufferFormat*)iMsg->Ptr0(),
+	    			            (RDisplayChannel::TBufferFormatContext*)iMsg->Ptr1());
+	    	break;
+	    case RDisplayChannel::ECtrlNextLineOffsetExtended:
+	    	r = NextLineOffset((RDisplayChannel::TBufferFormat*)iMsg->Ptr0(),
+	    			           (RDisplayChannel::TBufferFormatContext*)iMsg->Ptr1());
+	    	break;
+		}
+	DD_TRACE(Kern::Printf("<DDisplayChannel::DoControl result=%d\n",r);)
+	return r;
+	}
+
+TInt DDisplayChannel::GetIndexForSize(const TSize& aSize,TInt& aSpinnerOut)
+	{
+	TInt numberOfResolutions = 0;
+	TInt spinner1 = 0;
+	TInt r = Kern::HalFunction(EHalGroupDisplay, EDisplayHalNumberOfResolutions, &numberOfResolutions, &spinner1, iScreenNumber);
+	if(r < KErrNone)
+		return r;
+	TVideoInfoV01 info;
+	TPckg<TVideoInfoV01> infoPckg(info);
+
+	for (TInt res=0;res<numberOfResolutions;res++)
+		{
+		//pass info package to be filled in, also sending the config to read, and the screen within that
+		Kern::HalFunction(EHalGroupDisplay, EDisplayHalSpecificScreenInfo, (TAny*)&res, (TAny*)&infoPckg, iScreenNumber);
+		if (info.iSizeInPixels.iWidth==aSize.iWidth && info.iSizeInPixels.iHeight==aSize.iHeight)
+			{
+			r = Kern::HalFunction(EHalGroupDisplay, EDisplayHalNumberOfResolutions, &numberOfResolutions, &aSpinnerOut, iScreenNumber);
+			if(r < KErrNone)
+				return r;
+			if (aSpinnerOut!=spinner1)
+				{
+				return KErrCorrupt;
+				}
+			else
+				{
+				return res;
+				}
+			}
+		}
+	return KErrArgument;
+	}
+
+/**
+Process asynchronous requests. TRequestStatus is at iMsg->Ptr0(), and the other
+two parameters are in iMsg->Ptr1() and iMsg->Ptr2().
+*/
+void DDisplayChannel::DoRequest(TInt aFunction)
+	{
+	DD_TRACE(Kern::Printf(">DDisplayChannel::DoRequest fn=%d\n", aFunction);)
+
+	TInt r = KErrNotSupported;
+
+	switch(aFunction)
+		{
+		case RDisplayChannel::EReqGetCompositionBuffer:
+			// a1: TAny** buffer address [out]
+			r = GetCompositionBuffer(static_cast<TAny**>(iMsg->Ptr1()));
+			break;
+
+		case RDisplayChannel::EReqPostUserBuffer:
+			// a1: { TBufferId* buffer ID, const TRegionFix<KMaxRectangles>* region }* [in]
+			// a2: TPostCount* post count [out]
+			{
+			TAny* arg[2];
+			__ASSERT_DEBUG(iMsg->Ptr1(), Panic(EDisplayPanicNullArgument));
+			kumemget(arg, iMsg->Ptr1(), sizeof(arg));
+			r = PostUserBuffer(reinterpret_cast<RDisplayChannel::TBufferId*>(arg[0]), arg[1],
+					reinterpret_cast<RDisplayChannel::TPostCount*>(iMsg->Ptr2()));
+			}
+			break;
+
+		case RDisplayChannel::EReqWaitForPost:
+			// a1: TInt* post to wait for [in]
+			r = WaitForPost(static_cast<RDisplayChannel::TPostCount*>(iMsg->Ptr1()));
+			break;
+	    	//v1_1
+		case RDisplayChannel::EReqWaitForDisplayConnect:
+			r = WaitForDisplayConnect();
+			break;
+		}
+
+	DD_TRACE(Kern::Printf("<DDisplayChannel::DoRequest result=%d\n",r);)
+
+	if (r != KRequestPending)
+		{
+		TRequestStatus* status = reinterpret_cast<TRequestStatus*>(iMsg->Ptr0());
+		Kern::RequestComplete(iMsg->Client(), status, r);
+		}
+	}
+
+
+/**
+Process asynchronous request cancellations
+*/
+TInt DDisplayChannel::DoCancel(TInt aRequestMask)
+	{
+	DD_TRACE(Kern::Printf(">DDisplayChannel::DoCancel mask=%x\n", aRequestMask);)
+
+	if (aRequestMask & (1 << RDisplayChannel::ECtrlCancelGetCompositionBuffer))
+		{
+		if (IsCompositionBuffer(iGetBuffer))
+			{
+			iBuffer[iGetBuffer].iRequest.Complete(KErrCancel);
+			}
+		}
+
+	if (aRequestMask & (1 << RDisplayChannel::ECtrlCancelPostUserBuffer))
+		{
+		if (IsUserBuffer(iPostedBuffer))
+			{
+			iBuffer[iPostedBuffer].iRequest.Complete(KErrCancel);
+			}
+		}
+
+	if (aRequestMask & (1 << RDisplayChannel::ECtrlCancelWaitForPost))
+		{
+		iWaitForPostRequest.Complete(KErrCancel);
+		}
+	if (aRequestMask & (1 << RDisplayChannel::ECtrlCancelWaitForDisplayConnect))
+		{
+		iWaitForDisplayConnect.Complete(KErrCancel);
+		}
+
+	DD_TRACE(Kern::Printf("<DDisplayChannel::DoCancel\n",r);)
+	return KErrNone;
+	}
+
+
+/**
+Get the number of resolutions on this screen
+@return Number of resolutions if successful, otherwise a system wide error code.
+*/
+TInt DDisplayChannel::NumberOfResolutions()
+	{
+	TInt numberOfResolutions = 0;
+	TInt error = Kern::HalFunction(EHalGroupDisplay, EDisplayHalNumberOfResolutions, &numberOfResolutions, NULL, iScreenNumber);
+	if (error != KErrNone)
+		{
+		return error;
+		}
+	return numberOfResolutions;
+	}
+
+
+/**
+Safely write from kernel to user memory.
+@param aDst	Pointer to destination, user memory.
+@param aSrc	Pointer to source, kernel memory.
+@param aBytes	Number of bytes to write.
+@return KErrNone if successful, KErrArgument if either pointer is NULL.
+*/
+TInt DDisplayChannel::SafePut(TAny* aDst, TAny* aSrc, TInt aBytes)
+	{
+	if (!aDst || !aSrc)
+		{
+		return KErrArgument;
+		}
+
+	kumemput(aDst, aSrc, aBytes);
+	return KErrNone;
+	}
+
+
+/**
+Driver panic.
+@param	aPanic	The cause of the panic.
+*/
+void DDisplayChannel::Panic(TDisplayPanic aPanic)
+	{
+	Kern::Fault("DISPLAY", aPanic);
+	}
+
+
+/**
+Client panic.
+@param	aPanic	The cause of the panic.
+*/
+void DDisplayChannel::ClientPanic(RDisplayChannel::TPanic aPanic)
+	{
+	_LIT(KLitDisplayChannel, "DISPLAYCHANNEL");
+	Kern::ThreadKill(iClient, EExitPanic, aPanic, KLitDisplayChannel);
+	}
+
+
+/**
+VSync is emulated by using a nanokernel timer to call this function at the
+frame rate.
+*/
+void DDisplayChannel::VSyncTimerFn(TAny* aDisplayChannel)
+	{
+	reinterpret_cast<DDisplayChannel*>(aDisplayChannel)->DoVSyncTimer();
+	}
+
+/**
+Instance function called on the timer thread. Queues the VSyncDfc to run on its
+thread.
+*/
+void DDisplayChannel::DoVSyncTimer(void)
+	{
+	iVSyncDfc.Add();
+	iVSync.Again(iVSyncTicks);
+	}
+
+
+/**
+DFC function to post the current buffer to the display.
+@param aDisplayImpl	The display object to be posted.
+*/
+void DDisplayChannel::VSyncDfcFn(TAny* aDisplayChannel)
+	{
+	reinterpret_cast<DDisplayChannel*>(aDisplayChannel)->DoVSync();
+	}
+
+
+/**
+Post the current buffer to the display. Signal waiting threads under various
+conditions. This is run off the same DFC queue as message handling, so there is
+no need to protect the fields.
+*/
+void DDisplayChannel::DoVSync(void)
+	{
+	if(iWaitForDisplayConnect.iStatus)
+		{
+		TInt currentSpinner;
+		Kern::HalFunction(EHalGroupDisplay, EDisplayHalGetStateSpinner, &currentSpinner, NULL, iScreenNumber);
+		//display state changed
+		if(currentSpinner != iDisplayStateSpinner)
+			iWaitForDisplayConnect.Complete(KErrNone);
+		}
+		
+	if (IsValidBuffer(iPostedBuffer))
+		{
+		// Complete any outstanding request for the buffer which was displayed.
+		// This either signifies the user or composition buffer becoming
+		// available 
+		if (iDisplayBuffer != iPostedBuffer)
+			{
+			iBuffer[iDisplayBuffer].iRequest.Complete(KErrNone);
+			}
+
+		iDisplayBuffer = (RDisplayChannel::TBufferId)iPostedBuffer;
+		iPostedBuffer = (RDisplayChannel::TBufferId)KBufferNotSet;
+
+		// Update the pixel pointer used when painting the client window		
+		PostMessage(iHwnd, WMU_SET_DISPLAY_BUFFER, 0,
+				(LPARAM)iBuffer[iDisplayBuffer].iAddress);
+
+		// check if the buffer format is modified
+	if ((iDisplayBufferFormat.iSize.iHeight != iNewBufferFormat.iSize.iHeight) || 
+		(iDisplayBufferFormat.iSize.iWidth != iNewBufferFormat.iSize.iWidth) ||
+		(iDisplayBufferFormat.iPixelFormat != iNewBufferFormat.iPixelFormat))
+		{
+		// We post in one messages everything, but we got to pack the size
+		// speculate that the maximum width and height can be represented in 16 bit
+		TUint aggregateSize = ((TUint)iNewBufferFormat.iSize.iHeight << 16) & 0xffff0000; 
+		aggregateSize += (TUint)iNewBufferFormat.iSize.iWidth & 0x0000ffff;
+		PostMessage(iHwnd, 
+				    WMU_SET_BUFFER_FORMAT, 
+				    aggregateSize, 
+				    iNewBufferFormat.iPixelFormat);
+		iDisplayBufferFormat = iNewBufferFormat;
+		}
+	
+		if (iDisplayRotation != iNewRotation)
+			{
+			iDisplayRotation = iNewRotation;
+
+			TUint flip;
+			switch (iDisplayRotation)
+				{
+				case RDisplayChannel::ERotation90CW:
+					flip = EEmulatorFlipLeft;
+					break;
+				case RDisplayChannel::ERotation180:
+					flip = EEmulatorFlipInvert;
+					break;
+				case RDisplayChannel::ERotation270CW:
+					flip = EEmulatorFlipRight;
+					break;
+				default:	// Normal
+					flip = EEmulatorFlipRestore;
+					break;
+				}
+			PostMessage(iHwnd, WM_FLIP_MESSAGE, flip, NULL);
+
+			iPostedRectCount = 0;	// Force full invalidation
+			}
+
+		if (iDisplayResolution.iWidth != iNewResolution.iWidth ||
+				iDisplayResolution.iHeight != iNewResolution.iHeight)
+			{
+			iDisplayResolution = iNewResolution;
+			PostMessage(iHwnd, WMU_SET_DISPLAY_SIZE, 
+					iDisplayResolution.iWidth, iDisplayResolution.iHeight);
+			}
+	
+		
+		// Invalidate the window contents where necessary
+		TInt count = iPostedRectCount;
+		if (count)
+			{
+			// Order of invalidation is immaterial
+			while (count--)
+				{
+				InvalidateRect(iHwnd, &iPostedRect[count], FALSE);
+				}
+
+			iPostedRectCount = 0;
+			}
+		else
+			{
+			InvalidateRect(iHwnd, NULL, FALSE);
+			}
+
+		// Use differences to allow for wraparound
+		if ((TInt)(iWaitForPost - iLastPostCount) > 0 && (TInt)(iPostCount - iWaitForPost) >= 0)
+			{
+			// Post waited for is now being displayed or was dropped
+			iWaitForPostRequest.Complete(KErrNone);
+			}
+		iLastPostCount = iPostCount;
+		}
+	}
+
+
+/**
+Set the status object for this request and the thread to complete it on, if not
+already set.
+@param aStatus	The new request status.
+@param aThread	The thread on which to complete.
+@return EFalse if the status is already set, or ETrue if the status has now been
+set.
+*/
+TBool DDisplayChannel::TRequest::SetStatus(TThreadMessage& aMsg)
+	{
+	if (iStatus)
+		{
+		__ASSERT_DEBUG(iThread, Kern::PanicCurrentThread(RDisplayChannel::Name(), EDisplayPanicNullThreadOnSet));
+		return EFalse;	// In use
+		}
+
+	__ASSERT_DEBUG(!iThread, Kern::PanicCurrentThread(RDisplayChannel::Name(), EDisplayPanicThreadAlreadySet));
+	DThread* thread = aMsg.Client();
+	TInt r = thread->Open();
+	__ASSERT_DEBUG( r == KErrNone, Kern::PanicCurrentThread(RDisplayChannel::Name(), EDisplayPanicThreadOpenFailed));
+	(TAny)r;
+	iThread = thread;
+	iStatus = reinterpret_cast<TRequestStatus*>(aMsg.Ptr0());
+	return ETrue;
+	}
+
+
+/**
+Complete the request with the given result. If the status has not been set, or
+has already been completed, this does nothing.
+@param aResult	The result of the asynchronous request.
+*/
+void DDisplayChannel::TRequest::Complete(TInt aResult)
+	{
+	if (iStatus)
+		{
+    	__ASSERT_DEBUG(iThread, Kern::PanicCurrentThread(RDisplayChannel::Name(), EDisplayPanicNullThreadOnComplete));
+		Kern::RequestComplete(iThread, iStatus, aResult);
+		Kern::SafeClose((DObject*&)iThread, NULL);
+		}
+	}
+
+
+/**
+Post the current composition buffer to the display on the next frame tick.
+@param aRegion	NULL if the entire buffer has changed, or a user pointer to up
+to TDisplayInfo::KMaxRectagles areas that have changed.
+@param aPostCount	User pointer to an integer to receive the new post count.
+@return KErrNone, or a system-wide error code
+*/
+TInt DDisplayChannel::PostCompositionBuffer(TAny* aRegion, RDisplayChannel::TPostCount* aPostCount)
+	{
+	if (!IsCompositionBuffer(iGetBuffer))
+		{
+		return KErrNotSupported;
+		}
+
+	if (iWaitForPost == iPostCount)
+		{
+		// Complete wait for post (dropped)
+		iWaitForPostRequest.Complete(KErrNone);
+		}
+
+	if (IsUserBuffer(iPostedBuffer))
+		{
+		// Complete the user post request (not displayed)
+		iBuffer[iPostedBuffer].iRequest.Complete(KErrCancel);
+		}
+
+	iPostedBuffer = iGetBuffer;
+	iGetBuffer = NextCompositionBuffer(iGetBuffer);
+
+	if (iNumCompositionBuffers > 2 && iGetBuffer == iDisplayBuffer)
+		{
+		// With more than two buffers, there must always be one available with
+		// no waiting required, so find it.
+		iGetBuffer = NextCompositionBuffer(iGetBuffer);
+		}
+
+	// Get the region
+	if (aRegion)
+		{
+		// Set iPostedRect(Count) from aRegion.
+		Panic(EDisplayPanicNotYetImplemented);
+		}
+
+	// What to do about wrapping?
+	iPostCount++;
+	iNewRotation = iCurrentRotation;
+	iNewResolution = iCurrentResolution;
+	iNewBufferFormat = iCurrentBufferFormat;
+	SafePut(aPostCount, &iPostCount, sizeof(iPostCount));
+
+	return KErrNone;
+	}
+
+
+/**
+Post the legacy buffer to the display on the next frame tick.
+@param aRegion	NULL if the entire buffer has changed, or a user pointer to up
+to TDisplayInfo::KMaxRectagles areas that have changed.
+@param aPostCount	User pointer to an integer to receive the new post count.
+@return KErrNone, or a system-wide error code
+*/
+TInt DDisplayChannel::PostLegacyBuffer(TAny* aRegion, RDisplayChannel::TPostCount* aPostCount)
+	{
+	if (iWaitForPost == iPostCount)
+		{
+		// Complete wait for post (dropped)
+		iWaitForPostRequest.Complete(KErrNone);
+		}
+
+	if (IsUserBuffer(iPostedBuffer))
+		{
+		iBuffer[iPostedBuffer].iRequest.Complete(KErrCancel);
+		}
+
+	// iBuffer should NOT be NULL here!
+	__ASSERT_ALWAYS(iBuffer[KLegacyBuffer].iAddress, Panic(EDisplayPanicNoLegacyBuffer));
+	iPostedBuffer = KLegacyBuffer;
+
+	// Get the region into iRegion
+	if (aRegion)
+		{
+		// Set iPostedRect(Count) from aRegion.
+		Panic(EDisplayPanicNotYetImplemented);
+		}
+
+	iPostCount++;
+	iNewRotation = iCurrentRotation;
+	iNewResolution = iCurrentResolution;
+	iNewBufferFormat = iCurrentBufferFormat;
+	SafePut(aPostCount, &iPostCount, sizeof(iPostCount));
+
+	return KErrNone;
+	}
+
+
+/**
+Asynchronously request the current composition buffer. Completes immediately
+if not already being displayed, or an error occurs.
+@param aStatus	The request status to be completed.
+@param aAddress	The user pointer to the location to put the address.
+*/
+TInt DDisplayChannel::GetCompositionBuffer(TAny** aAddress)
+	{
+	if (!IsCompositionBuffer(iGetBuffer))
+		{
+		// No composition buffers available for use.
+		return KErrNotSupported;
+		}
+
+	// The address won't change, so may as well set it now.
+	TUint idx = iGetBuffer - KFirstCompositionBuffer;
+	if (SafePut(aAddress, &idx, sizeof(TUint)) != KErrNone)
+		{
+		return KErrArgument;
+		}
+
+	if (iNumCompositionBuffers > 1 && iGetBuffer == iDisplayBuffer)
+		{
+		// Multi-buffer case, and buffer is currently being displayed
+
+		if (iBuffer[iGetBuffer].iRequest.SetStatus(*iMsg))
+			{
+			return KRequestPending;
+			}
+
+		// Already set
+		return KErrInUse;
+		}
+
+	return KErrNone;
+	}
+
+
+/**
+Post a user buffer to the display on the next frame tick.
+@param aBufferId	The ID of the user buffer to post.
+@param aRegion	NULL if the entire buffer has changed, or a user pointer to up
+to TDisplayInfo::KMaxRectagles areas that have changed.
+@return KErrNone, or a system-wide error code
+*/
+TInt DDisplayChannel::PostUserBuffer(RDisplayChannel::TBufferId* aBufferId, TAny* aRegion, RDisplayChannel::TPostCount* aPostCount)
+	{
+	RDisplayChannel::TBufferId bufferId;
+	bufferId = reinterpret_cast <RDisplayChannel::TBufferId> (aBufferId);
+
+	if (!IsUserBuffer(bufferId))
+		{
+		// Not a user buffer.
+		return KErrArgument;
+		}
+
+	if (!iBuffer[bufferId].iChunk)
+		{
+		// User buffer not initialised.
+		return KErrArgument;
+		}
+
+	if (iWaitForPost == iPostCount)
+		{
+		// Complete wait for post (dropped)
+		iWaitForPostRequest.Complete(KErrNone);
+		}
+
+	if (IsUserBuffer(iPostedBuffer))
+		{
+		// Complete the user post request (not displayed)
+		iBuffer[iPostedBuffer].iRequest.Complete(KErrCancel);
+		}
+
+	if (bufferId == iDisplayBuffer)	//pathological case
+		{
+		// Complete the current display buffer as we are superceding it with the same one
+		iBuffer[bufferId].iRequest.Complete(KErrNone);
+		}
+
+	// Only one buffer can be posted at any time, and if it were this user
+	// buffer, the request will have just been completed, so this shouldn't fail.
+	TBool isSet = iBuffer[bufferId].iRequest.SetStatus(*iMsg);
+
+	__ASSERT_DEBUG(isSet, Panic(EDisplayPanicInUse));
+	(TAny)isSet;
+	iPostedBuffer = bufferId;
+
+	// Get the region
+	if (aRegion)
+		{
+		// Set iPostedRect(Count) from aRegion.
+		Panic(EDisplayPanicNotYetImplemented);
+		}
+
+	iPostCount++;
+	iNewRotation = iCurrentRotation;
+	iNewResolution = iCurrentResolution;
+	iNewBufferFormat = iCurrentBufferFormat;
+	SafePut(aPostCount, &iPostCount, sizeof(iPostCount));
+
+	return KRequestPending;
+	}
+
+/**
+Asynchronous request notification when the given post count is reached (or
+passed).
+@param aStatus	The request status to be completed.
+@param aPostCount	The count to wait for.
+*/
+TInt DDisplayChannel::WaitForPost(RDisplayChannel::TPostCount* aPostCount)
+	{
+	TInt postCount;
+
+	kumemget(&postCount, aPostCount, sizeof(RDisplayChannel::TPostCount));
+
+	if ((TInt)(iWaitForPost - iLastPostCount) > 0 && (TInt)(iPostCount - iWaitForPost) >= 0)
+		{
+		// Set up the request to be completed when the post occurs
+		if (iWaitForPostRequest.SetStatus(*iMsg))
+			{
+			iWaitForPost = postCount;
+			return KRequestPending;
+			}
+
+		// Already waiting for a post
+		return KErrInUse;
+		}
+
+	// Requested post already displayed/dropped
+	return KErrNone;
+	}
+
+/**
+Asynchronous request notification when the display connection state changes.
+This occurs when the display is disconnected, connected with no list, or a list of modes becomes available or is updated.
+*/
+TInt DDisplayChannel::WaitForDisplayConnect()
+	{
+	
+	Kern::HalFunction(EHalGroupDisplay, EDisplayHalGetStateSpinner, &iDisplayStateSpinner, NULL, iScreenNumber);
+	
+	if (iWaitForDisplayConnect.SetStatus(*iMsg))
+		{
+		return KRequestPending;
+		}
+
+	// Already waiting for a post
+	return KErrInUse;
+	}
+
+
+/**
+Set the rotation of the screen on the next frame. If the buffer contents will
+not be valid, the flag set. The validity of the buffer is down to whether the
+width and height change.
+
+@param aNewRotation	Address in user space of the new rotation setting.
+@param aDisplayConfigChanged	Address in user space of where to put whether the
+orientation specific info to use has changed following the rotation setting.
+@return KErrNone, or KErrArgument if an argument was invalid.
+*/
+TInt DDisplayChannel::SetRotation(RDisplayChannel::TDisplayRotation* aNewRotation,
+		TBool* aDisplayConfigChanged)
+	{
+	RDisplayChannel::TDisplayRotation newRotation;
+
+	__ASSERT_DEBUG(aNewRotation, Panic(EDisplayPanicNullArgument));
+
+	kumemget(&newRotation, aNewRotation, sizeof(newRotation));
+
+	if (((TInt)newRotation - 1) & newRotation)
+		{
+		// More than one bit is set, which is not valid
+		return KErrArgument;
+		}
+
+	if ((iChannelInfo.iAvailableRotations & newRotation) == 0)
+		{
+		// Rotation is not supported
+		return KErrArgument;
+		}
+
+	TBool displayConfigChanged = (IsFlipped(newRotation) != IsFlipped(iCurrentRotation));
+	iCurrentRotation = newRotation;
+
+	SafePut(aDisplayConfigChanged, &displayConfigChanged, sizeof(TBool));
+
+	return KErrNone;
+	}
+
+
+/**
+Register a user buffer. Assign an ID for it (if available) and open the chunk to
+get the address.
+@param aChunkHandle	The chunk handle.
+@param aOffset		The offset from the chunk base address to the start of the
+buffer.
+@param aBufferId	The address in user space of where to put the buffer ID.
+*/
+TInt DDisplayChannel::RegisterUserBuffer(TInt aChunkHandle, TInt aOffset,
+		RDisplayChannel::TBufferId* aBufferId)
+	{
+	if (!aBufferId)
+		{
+		return KErrArgument;
+		}
+
+	NKern::ThreadEnterCS();
+	DChunk* chunk = Kern::OpenSharedChunk(iMsg->Client(), aChunkHandle,
+			EFalse);
+	NKern::ThreadLeaveCS();
+	if (!chunk)
+		{
+		return KErrBadHandle;
+		}
+
+	TLinAddr kernelAddress;
+
+	const TInt bufferSize = (iDisplayResolution.iWidth * iDisplayResolution.iHeight);
+	TInt r = Kern::ChunkAddress(chunk,aOffset,bufferSize,kernelAddress);
+	if(r!=KErrNone)
+		{
+		NKern::ThreadEnterCS();
+		Kern::ChunkClose(chunk);
+		NKern::ThreadLeaveCS();
+		return r;
+		}
+
+	// Search for an empty slot
+	for (TInt index = KFirstUserBuffer; index < (KFirstUserBuffer + RDisplayChannel::TDisplayInfo::KMaxUserBuffers); index++)
+		{
+		if (!iBuffer[index].iChunk)
+			{
+			// Found one, so fill in the details and return the index as the ID.
+			iBuffer[index].iChunk = chunk;
+			iBuffer[index].iAddress = (TAny*)(kernelAddress);
+			kumemput(aBufferId, &index, sizeof(RDisplayChannel::TBufferId));
+			return KErrNone;
+			}
+		}
+
+	// No slots available.
+	NKern::ThreadEnterCS();
+	Kern::ChunkClose(chunk);
+	NKern::ThreadLeaveCS();
+	return KErrTooBig;
+	}
+
+
+/**
+Deregister a user buffer.
+@param aBufferId	The buffer ID.
+*/
+TInt DDisplayChannel::DeregisterUserBuffer(RDisplayChannel::TBufferId* aBufferId)
+	{
+	RDisplayChannel::TBufferId bufferId;
+	
+	__ASSERT_DEBUG(aBufferId, Panic(EDisplayPanicNullArgument));
+	kumemget(&bufferId, aBufferId, sizeof(RDisplayChannel::TBufferId));
+
+	if (!IsUserBuffer(bufferId))
+		{
+		// Not a valid ID
+		return KErrArgument;
+		}
+
+	TBufferInfo* buffer = &iBuffer[bufferId];
+	if (!buffer->iChunk)
+		{
+		// Not registered
+		return KErrArgument;
+		}
+
+	if (iDisplayBuffer == bufferId)
+		{
+		return KErrInUse;
+		}
+
+	if (iPostedBuffer == bufferId)
+		{
+		// Was queued to be posted
+		iPostedBuffer = (RDisplayChannel::TBufferId)KBufferNotSet;
+		iPostedRectCount = 0;
+		}
+
+	// Cancel any outstanding request on the buffer and clear out the fields.
+	buffer->iRequest.Complete(KErrCancel);
+	NKern::ThreadEnterCS();
+	Kern::ChunkClose(buffer->iChunk);
+	NKern::ThreadLeaveCS();
+	buffer->iChunk = NULL;
+	buffer->iAddress = NULL;
+
+	return KErrNone;
+	}
+
+/**
+Get all resolutions available for this screen and insert to a descriptor
+@return KErrNone if successful, otherwise a system wide error code.
+*/
+TInt DDisplayChannel::GetResolutions()
+	{
+	TInt r;
+	__ASSERT_DEBUG(iMsg->Ptr0(), Panic(EDisplayPanicNullArgument));
+	__ASSERT_DEBUG(iMsg->Ptr1(), Panic(EDisplayPanicNullArgument));
+	//get the number of resolutions (as above)
+	TInt numberOfResolutions = 0;
+	TInt refStateSpinner, curStateSpinner;
+	//Get the number of resolutions as well as the display state spinner at this point
+	r = Kern::HalFunction(EHalGroupDisplay, EDisplayHalNumberOfResolutions, &numberOfResolutions, &refStateSpinner, iScreenNumber);
+	if(r < KErrNone)
+		{
+		return r;
+		}
+		    	
+	TInt length;
+	TInt maxLength;
+	Kern::KUDesInfo(*(const TDesC*)iMsg->Ptr0(),length,maxLength);
+		    	
+	if ((maxLength/static_cast<TInt>(sizeof(RDisplayChannel::TResolution))) < numberOfResolutions)
+		{
+		return KErrOverflow;
+		}
+		    	
+	TVideoInfoV01 info;
+	TPckg<TVideoInfoV01> infoPckg(info);
+	RDisplayChannel::TResolution resolution = {{0,0},{0,0},RDisplayChannel::ERotationAll};
+	TPtr8 tempDes(NULL,0);
+
+	TInt i;
+	for (i=0;i<numberOfResolutions;i++)
+		{
+		//before filling the package, the display state needs to be checked for consistency
+		Kern::HalFunction(EHalGroupDisplay, EDisplayHalGetStateSpinner, &curStateSpinner, NULL, iScreenNumber);
+		    			    		
+		if(curStateSpinner != refStateSpinner)
+			{ //display state has changed, the resolution list we trying to get becomes corrupted
+			Kern::KUDesSetLength(*(TDes8*)iMsg->Ptr0(),(i)*sizeof(RDisplayChannel::TResolution));
+			return KErrCorrupt;
+			}
+
+		//pass info package to be filled in, also sending the config to read, and the screen within that
+		Kern::HalFunction(EHalGroupDisplay, EDisplayHalSpecificScreenInfo, &i, &infoPckg, iScreenNumber);
+		//save resolution
+		resolution.iPixelSize = info.iSizeInPixels;
+		resolution.iTwipsSize = info.iSizeInTwips;
+		//copy resolution
+  		tempDes.Set((TUint8*)&resolution,sizeof(RDisplayChannel::TResolution),sizeof(RDisplayChannel::TResolution));
+   		r = Kern::ThreadDesWrite(iMsg->Client(),(TDes8*)iMsg->Ptr0(),tempDes,i*sizeof(RDisplayChannel::TResolution),iMsg->Client());
+		    		
+   		if (r<KErrNone)
+   			{
+   			Kern::KUDesSetLength(*(TDes8*)iMsg->Ptr0(),(i)*sizeof(RDisplayChannel::TResolution));
+   			return r;
+   			}
+   		}
+	Kern::KUDesSetLength(*(TDes8*)iMsg->Ptr0(),(i)*sizeof(RDisplayChannel::TResolution));
+   	SafePut(iMsg->Ptr1(), &numberOfResolutions, sizeof(numberOfResolutions));
+   	return KErrNone;
+	}
+
+
+
+TInt DDisplayChannel::SetResolution(TSize* aSize)
+	{
+	if (!aSize)
+		{
+		ClientPanic(RDisplayChannel::ENullArgument);
+		return KErrArgument;
+		}
+
+	TSize size;
+	kumemget32(&size, aSize, sizeof(size));
+	if (size.iWidth < 0 || size.iHeight < 0)
+		{
+		ClientPanic(RDisplayChannel::EInvalidResolution);
+		return KErrArgument;
+		}
+	
+	if (!Kern::CurrentThreadHasCapability(ECapabilityWriteDeviceData, 
+			__PLATSEC_DIAGNOSTIC_STRING("Checked by DISPLAY0.LDD (display channel driver)")))
+		{
+		return KErrPermissionDenied;
+		}
+
+	// Validate size. Return KErrArgument on failure.
+	//Get the number of resolutions
+	TInt numberOfResolutions;
+	TInt r = Kern::HalFunction(EHalGroupDisplay, EDisplayHalNumberOfResolutions, &numberOfResolutions, NULL, iScreenNumber);
+	if(r < KErrNone)
+		{
+		return r;
+		}
+	TVideoInfoV01 info;
+	TPckg<TVideoInfoV01> infoPckg(info);
+	for (TInt i = 0; i < numberOfResolutions; i++)
+		{
+		//pass info package to be filled in, also sending the config to read, and the screen within that
+		Kern::HalFunction(EHalGroupDisplay, EDisplayHalSpecificScreenInfo, &i, &infoPckg, iScreenNumber);
+		
+		if (info.iSizeInPixels.iWidth == size.iWidth &&
+				info.iSizeInPixels.iHeight == size.iHeight)
+			{	//matched resolution
+			iCurrentResolution = size;
+			iCurrentTwips = info.iSizeInTwips;
+			
+			if (iCurrentResolution.iHeight > iNewBufferFormat.iSize.iHeight ||
+				iCurrentResolution.iWidth > iNewBufferFormat.iSize.iWidth)
+				{
+				// going back to initial settings and, we hope, 
+				// the buffers could still be displayed correctly, but we have no guarantee
+				iCurrentBufferFormat = iInitialBufferFormat;
+				}
+			return KErrNone;
+			}
+   		}
+	return KErrArgument;	//if reached here, it did not match aSize to any config resolution
+	}
+
+TInt DDisplayChannel::GetResolution(TSize* aSize)
+	{
+	TInt numberOfResolutions;
+	TInt r = Kern::HalFunction(EHalGroupDisplay, EDisplayHalNumberOfResolutions,
+			&numberOfResolutions, NULL, iScreenNumber);
+
+	if (r == KErrNone)
+		{
+		if (numberOfResolutions > 0)
+			{
+		   	SafePut(aSize, &iCurrentResolution, sizeof(iCurrentResolution));
+			}
+		else
+			{
+			TSize resolution = {0,0};
+		   	SafePut(aSize, &resolution, sizeof(resolution));
+			}
+		}
+	return r;
+	}
+
+TInt DDisplayChannel::GetTwips(TSize* aSize)
+	{
+	TInt numberOfResolutions;
+	TInt r = Kern::HalFunction(EHalGroupDisplay, EDisplayHalNumberOfResolutions,
+			&numberOfResolutions, NULL, iScreenNumber);
+
+	if (r == KErrNone)
+		{
+		if (numberOfResolutions > 0)
+			{
+		   	SafePut(aSize, &iCurrentTwips, sizeof(iCurrentTwips));
+			}
+		else
+			{
+			TSize twips = {0,0};
+		   	SafePut(aSize, &twips, sizeof(twips));
+			}
+		}
+	return r;
+	}
+/**
+Get all the pixel formats available and insert them to a descriptor
+@return KErrNone if successful, otherwise a system wide error code.
+*/
+TInt DDisplayChannel::GetPixelFormats()
+	{
+	TInt r;
+	__ASSERT_DEBUG(iMsg->Ptr0(), Panic(EDisplayPanicNullArgument));
+	__ASSERT_DEBUG(iMsg->Ptr1(), Panic(EDisplayPanicNullArgument));
+	//get the number of resolutions (as above)
+	TPtr8 pixelFormatDes(NULL,0);
+	TInt length = ((TInt)sizeof(RDisplayChannel::TPixelFormat)) * iPixelFormatArraySize;
+	pixelFormatDes.Set((TUint8*)iPixelFormatArray, length, length);
+	r = Kern::ThreadDesWrite(iMsg->Client(),(TDes8*)iMsg->Ptr0(), pixelFormatDes, 0, iMsg->Client());
+	if (r == KErrNone)
+		{
+		Kern::KUDesSetLength(*(TDes8*)iMsg->Ptr0(), length);
+		SafePut(iMsg->Ptr1(), &iPixelFormatArraySize, sizeof(iPixelFormatArraySize));
+		}
+	return r;
+	}
+
+
+TInt DDisplayChannel::SetBufferFormat(RDisplayChannel::TBufferFormat* aBufferFormat)
+	{
+	if (!aBufferFormat)
+		{
+		ClientPanic(RDisplayChannel::ENullArgument);
+		return KErrArgument;
+		}
+
+	if (!Kern::CurrentThreadHasCapability(ECapabilityWriteDeviceData, 
+			__PLATSEC_DIAGNOSTIC_STRING("Checked by DISPLAY0.LDD (display channel driver)")))
+		{
+		return KErrPermissionDenied;
+		}
+
+	RDisplayChannel::TBufferFormat bufferFormat;
+	kumemget32(&bufferFormat, aBufferFormat, sizeof(RDisplayChannel::TBufferFormat));
+	
+	// Validate Size
+	if (iCurrentResolution.iHeight > bufferFormat.iSize.iHeight ||
+		iCurrentResolution.iWidth > bufferFormat.iSize.iWidth ||
+		bufferFormat.iSize.iHeight > KMaxBufferSizeHeightAndWidth ||
+		bufferFormat.iSize.iWidth > KMaxBufferSizeHeightAndWidth)
+		{
+		//return error on failure
+		return KErrArgument;
+		}
+	
+	// check we received one of the supported formats.
+	for (TInt i = 0; i < iPixelFormatArraySize; i++)
+		{
+		if (bufferFormat.iPixelFormat == iPixelFormatArray[i])
+			{
+			// the arguments are all validated at this point, update the current format
+			iCurrentBufferFormat = bufferFormat;
+			return KErrNone;
+			}
+		}
+	
+		//return error on failure
+		return KErrArgument;
+	}
+
+TInt DDisplayChannel::ValidateBufferFormat(const RDisplayChannel::TBufferFormat& aBufferFormat,
+									 	   const RDisplayChannel::TResolution& aResolution)
+	{
+	// Validate the size reported in buffer format against the given resolution
+	if (aResolution.iPixelSize.iHeight > aBufferFormat.iSize.iHeight ||
+		aResolution.iPixelSize.iWidth > aBufferFormat.iSize.iWidth ||
+		aBufferFormat.iSize.iHeight > KMaxBufferSizeHeightAndWidth ||
+		aBufferFormat.iSize.iWidth > KMaxBufferSizeHeightAndWidth)
+		{
+		//return error on failure
+		return KErrArgument;
+		}
+	
+	// check we received one of the supported formats.
+	for (TInt i = 0; i < iPixelFormatArraySize; i++)
+		{
+		if (aBufferFormat.iPixelFormat == iPixelFormatArray[i])
+			{
+			return KErrNone;
+			}
+		}
+		
+	return KErrArgument;
+	}
+
+TInt DDisplayChannel::NextPlaneOffset(RDisplayChannel::TBufferFormat* aBufferFormat, 
+		            				 RDisplayChannel::TBufferFormatContext* aContext)
+	{
+	if (!aBufferFormat)
+		{
+		ClientPanic(RDisplayChannel::ENullArgument);
+		return KErrArgument;
+		}
+
+	if (!Kern::CurrentThreadHasCapability(ECapabilityWriteDeviceData, 
+			__PLATSEC_DIAGNOSTIC_STRING("Checked by DISPLAY0.LDD (display channel driver)")))
+		{
+		return KErrPermissionDenied;
+		}
+
+	RDisplayChannel::TBufferFormat bufferFormat;
+	kumemget32(&bufferFormat, aBufferFormat, sizeof(bufferFormat));
+	
+	RDisplayChannel::TResolution resolution;
+	RDisplayChannel::TDisplayRotation rotation;
+	
+	if (aContext)
+		{
+		RDisplayChannel::TBufferFormatContext context;
+		kumemget32(&context, aContext, sizeof(context));
+		resolution = context.iResolution;
+		rotation = context.iRotation;
+		}
+	else
+		{
+		resolution.iPixelSize = iCurrentResolution;
+		rotation = iCurrentRotation;
+		}
+	
+		TInt err = ValidateBufferFormat(bufferFormat, resolution);
+		
+		if (err != KErrNone)
+			{
+			return err;
+			}
+		//it assumes no planar pixel formats are supported by this driver implementation
+		return 0;
+	}
+
+TInt DDisplayChannel::NextLineOffset(RDisplayChannel::TBufferFormat* aBufferFormat, 
+		            				 RDisplayChannel::TBufferFormatContext* aContext)
+	{
+	if (!aBufferFormat)
+		{
+		ClientPanic(RDisplayChannel::ENullArgument);
+		return KErrArgument;
+		}
+
+	if (!Kern::CurrentThreadHasCapability(ECapabilityWriteDeviceData, 
+			__PLATSEC_DIAGNOSTIC_STRING("Checked by DISPLAY0.LDD (display channel driver)")))
+		{
+		return KErrPermissionDenied;
+		}
+
+	RDisplayChannel::TBufferFormat bufferFormat;
+	kumemget32(&bufferFormat, aBufferFormat, sizeof(bufferFormat));
+	
+	RDisplayChannel::TResolution resolution;
+	RDisplayChannel::TDisplayRotation rotation;
+	
+	if (aContext)
+		{
+		RDisplayChannel::TBufferFormatContext context;
+		kumemget32(&context, aContext, sizeof(context));
+		resolution = context.iResolution;
+		rotation = context.iRotation;
+		}
+	else
+		{
+		resolution.iPixelSize = iCurrentResolution;
+		rotation = iCurrentRotation;
+		}
+
+	TInt err = ValidateBufferFormat(bufferFormat, resolution);
+	
+	if (err != KErrNone)
+		{
+		return err;
+		}
+	
+	TInt bpp = 0;
+	//validating the pixel format and getting the pixel size in bits
+	switch (bufferFormat.iPixelFormat)
+		{
+		case EUidPixelFormatXRGB_4444:	// RGB4444
+		case EUidPixelFormatARGB_4444:
+		case EUidPixelFormatRGB_565:	// RGB565
+			bpp = 16;
+			break;
+		case EUidPixelFormatXRGB_8888:	// Really 32bpp, but top 8 unused
+		case EUidPixelFormatARGB_8888:
+		case EUidPixelFormatARGB_8888_PRE:
+			bpp = 32;
+			break;
+		default:
+			// We got an error, it seems. The pixel format is not supported 
+			// Let's panic because the pixel format has just been validated
+			Panic(EDisplayPanicInvalidBitDepth);
+			break;
+		}
+		
+	TInt widthInPixel = 0;	// pixels
+		
+	// let's take in consideration the given rotation
+	switch (rotation)
+		{
+		case RDisplayChannel::ERotation90CW:
+		case RDisplayChannel::ERotation270CW:
+			widthInPixel = bufferFormat.iSize.iHeight;
+			break;
+		default:	// Normal
+			widthInPixel = bufferFormat.iSize.iWidth;
+			break;
+		}
+	
+	// we have to round up to 32 bits word. This is a Ms Windows limitation 
+	TInt stride = _ALIGN_UP((widthInPixel * bpp), 32) >> 3;
+	return stride;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/display_dev.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,79 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+
+#include <kernel/kern_priv.h>
+#include "display_dev.h"
+#include "display_chan.h"
+
+
+DECLARE_STANDARD_LDD()
+	{
+	return new DDisplayDevice;
+	}
+
+
+DDisplayDevice::DDisplayDevice()
+	{
+	iVersion = TVersion(KDisplayChMajorVersionNumber,
+			KDisplayChMinorVersionNumber, KDisplayChBuildVersionNumber);
+	iParseMask=KDeviceAllowUnit;
+	}
+
+
+DDisplayDevice::~DDisplayDevice()
+	{
+	}
+
+
+TInt DDisplayDevice::Install()
+	{
+	return SetName(&RDisplayChannel::Name());
+	}
+
+
+/**
+Called by the kernel's device driver framework to create a Logical Channel.
+This is called in the context of the user thread (client) which requested the
+creation of a Logical Channel (e.g. through a call to RBusLogicalChannel::DoCreate)
+The thread is in a critical section.
+
+@param aChannel Set to point to the created Logical Channel
+
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/
+TInt DDisplayDevice::Create(DLogicalChannelBase*& aChannel)
+	{
+	aChannel = new DDisplayChannel();
+
+	return aChannel ? KErrNone : KErrNoMemory;
+	}
+
+
+/**
+Return the drivers capabilities.
+Called in the response to an RDevice::GetCaps() request.
+
+@param aDes User-side descriptor to write capabilities information into
+*/
+void DDisplayDevice::GetCaps(TDes8& aDes) const
+	{
+	// Create a capabilities object
+	DDisplayChannel::TCaps caps;
+	caps.iVersion = iVersion;
+	// Write it back to user memory
+	Kern::InfoCopy(aDes,reinterpret_cast<TUint8*>(&caps),sizeof(caps));
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/econsnogui.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,115 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include <e32std.h>
+#include <e32cons.h>
+#include <e32keys.h>
+
+class CNoGuiConsole : public CConsoleBase
+	{
+public:
+	CNoGuiConsole();
+	virtual ~CNoGuiConsole();
+	virtual TInt Create(const TDesC &aTitle,TSize aSize);
+	virtual void Read(TRequestStatus &aStatus);
+	virtual void ReadCancel();
+	virtual void Write(const TDesC &aDes);
+	virtual TPoint CursorPos() const;
+	virtual void SetCursorPosAbs(const TPoint &aPoint);
+	virtual void SetCursorPosRel(const TPoint &aPoint);
+	virtual void SetCursorHeight(TInt aPercentage);
+	virtual void SetTitle(const TDesC &aTitle);
+	virtual void ClearScreen();
+	virtual void ClearToEndOfLine();
+	virtual TSize ScreenSize() const;
+	virtual TKeyCode KeyCode() const;
+	virtual TUint KeyModifiers() const;
+	};
+
+CNoGuiConsole::CNoGuiConsole()
+	{
+	}
+
+CNoGuiConsole::~CNoGuiConsole()
+	{
+	}
+
+TInt CNoGuiConsole::Create(const TDesC& /*aTitle*/, TSize /*aSize*/)
+	{
+	return(KErrNone);
+	}
+
+void CNoGuiConsole::Read(TRequestStatus &aStatus)
+	{
+	TRequestStatus *pS=(&aStatus);
+	User::RequestComplete(pS, KErrNotSupported);
+	}
+
+void CNoGuiConsole::ReadCancel()
+	{
+	}
+
+void CNoGuiConsole::Write(const TDesC& /*aDes*/)
+	{
+	}
+
+TPoint CNoGuiConsole::CursorPos() const
+	{
+	return TPoint(0,0);
+	}
+
+void CNoGuiConsole::SetCursorPosAbs(const TPoint& /*aPoint*/)
+	{
+	}
+
+void CNoGuiConsole::SetCursorPosRel(const TPoint& /*aPoint*/)
+	{
+	}
+
+void CNoGuiConsole::SetCursorHeight(TInt /*aPercentage*/)
+	{
+	}
+
+void CNoGuiConsole::SetTitle(const TDesC& /*aTitle*/)
+	{
+	}
+
+void CNoGuiConsole::ClearScreen()
+	{
+	}
+
+void CNoGuiConsole::ClearToEndOfLine()
+	{
+	}
+
+TSize CNoGuiConsole::ScreenSize() const
+	{
+	return TSize(10,10);
+	}
+
+TKeyCode CNoGuiConsole::KeyCode() const
+	{
+	return EKeyNull;
+	}
+
+TUint CNoGuiConsole::KeyModifiers() const
+	{
+	return 0;
+	}
+
+extern "C" EXPORT_C TAny *NewConsole()
+	{
+	return(new CNoGuiConsole);
+	}
Binary file emulator/emulatorbsp/specific/epoc32.ico has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/ethernet.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,996 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\ethernet.cpp
+// PDD for the Ethernet under the windows emulator
+// 
+//
+
+/**
+ @file wins/specific/ethernet.cpp
+*/
+
+
+#include <ethernet.h>
+#include "nk_priv.h"
+#include "nk_plat.h"
+#include <property.h>
+
+#include "pcap.h"
+
+
+/** @addtogroup enet Ethernet Drivers
+ *  Kernel Ethernet Support
+ */
+
+/** @addtogroup enet_pdd Driver PDD's
+ * @ingroup enet
+ */
+
+/** @addtogroup enet_byplatform Ethernet support by platform
+ * @ingroup enet
+ */
+
+/** @addtogroup enet_wins WINS (Emulator) Ethernet support
+ * @ingroup enet_byplatform
+ */
+
+
+// strings potentially written to ethernet.ini by netcards.exe
+#define	KEpocIniEthSpeed10Mbps	"10Mbps"
+#define	KEpocIniEthSpeed100Mbps	"100Mbps"
+
+// entries in epoc.ini file:
+#define	KEpocIniEthSpeedEntry	"ETHER_SPEED"
+#define	KEpocIniEthNIFEntry	"ETHER_NIF"
+#define	KEpocIniEthMACEntry	"ETHER_MAC"
+
+#define KEthDrvPanicCategory "D32ETHER"
+
+#define KLocalDriverNameMax				256
+
+#define PCAP_FILTER "ether dst %x:%x:%x:%x:%x:%x or ether multicast and ether src not %x:%x:%x:%x:%x:%x"
+
+_LIT(KPddName, "Ethernet.Wins");
+
+// needs ldd version..
+const TInt KMinimumLddMajorVersion=1;
+const TInt KMinimumLddMinorVersion=0;
+const TInt KMinimumLddBuild=122;
+
+/** @addtogroup enet_windows Windows Emulator Ethernet Pdd
+ * @ingroup enet_pdd
+ * @ingroup enet_wins
+ * @{
+ */
+
+/**
+ * The Windows specific Ethernet physical device (factory) class 
+ * @internalTechnology belongs to PDD which sits internally in kernel 
+ */
+class DDriverEthernet : public DPhysicalDevice
+    {
+public:
+
+    /**
+     * The constructor
+     * Sets the drivers version number. Limits possible
+	 * number of units to one only (unit 0)
+     */
+    DDriverEthernet();
+
+    /**
+     * Inherited from DPhysicalDevice.
+	 * Install the driver by setting it's name
+	 * @return KErrNone on success, other error code on failure
+     */
+    virtual TInt Install();
+
+    /**
+     * Inherited from DPhysicalDevice.
+	 * Get the Capabilites of the driver
+     * NOT supported but required as implementation of
+	 * pure virtual in base class
+     */
+    virtual void GetCaps(TDes8 &aDes) const;
+
+    /**
+     * Inherited from DPhysicalDevice.
+	 * Create a channel to a device
+	 * @param aChannel a reference to a newly created channel object
+	 * @param aUnit a unit for which the channel is being created
+	 * @param anInfo pointer to a descriptor with additional info (may be NULL)
+	 * @param aVer a requested version
+     * @return KErrNone on success, other error code on failure
+     */
+    virtual TInt Create(DBase*& aChannel, TInt aUnit, 
+						const TDesC8* anInfo, const TVersion &aVer);
+
+    /**
+     * Inherited from DPhysicalDevice.
+	 * Validate that the info supplied would create a valid channel
+	 * @param aUnit a unit for which validation is to be done
+	 * @param anInfo pointer to a descriptor with additional info (may be NULL)
+	 * @param aVer a version to be validated
+     * @return KErrNone if valid, KErrNotSupported otherwise
+	 */
+    virtual TInt Validate(TInt aUnit, const TDesC8* anInfo, const TVersion &aVer);
+	};
+
+
+/**
+ * The WINS specific Ethernet channel class for the libpcap library
+ * @internalTechnology belongs to PDD which sits internally in kernel 
+ */
+class DEthernetWins : public DEthernet
+    {
+
+	/**
+     * The Worker Thread
+     * @param aDEthernetWins Pointer to this object
+     * @return Should never return
+     */
+    friend TInt WorkThread(DEthernetWins * aDEthernetWins);
+
+public:
+
+	enum TWinsEtherPanic
+	{
+	EBadMacAddress = 1, // means bad MAC address in ini file or entry for it missing or ini file missing
+	ENoNetInterface, // means entry for network interface name missing in ini file or ini file missing
+	EPcapNull	// means Wpcap couldn't be initialised - potentially not installed or name of network interface in ini file wrong
+	};
+
+    /**
+     * The Constructor.
+     */
+    DEthernetWins();
+
+    /**
+     * The Destructor.
+     */
+    ~DEthernetWins();
+
+	/**
+     * The Isr plays a role of the pcap callback.
+     * Do NOT call the function directly
+     * @param thisObject a pointer to this object
+     * @param header the received packet's pcap header
+     * @param pkt_data the received packet
+	 * @post new packet is copied to LDD's RX buffers' queue
+	 */
+    static void Isr(u_char *thisObject,   
+                     const struct pcap_pkthdr *header, 
+                     const u_char *pkt_data);
+
+    /**
+     * The DoCreate Method.
+     * Sets up the channel as part of the object creation
+     * and retrieves the MAC address from epoc.ini file.
+	 * Also creates wpcap handler and thread for wpcap loop.
+	 * @pre epoc32\\data\\epoc.ini must exist with entries: "ETHER-NIF=..", "ETHER-MAC=..", "ETHER-SPEED=.."
+	 * @param aUnit a unit for which the channel is being created
+	 * @panic D32ETHER reason: (1) can't get proper MAC address (2) can't get
+	 * network interface name (3) can't initialise wpcap
+	 * @return KErrNone on success, other error code on failure
+	 */
+    TInt DoCreate(TInt aUnit); 
+
+    /**
+     * DEthernet implementation.
+	 * Start the receiver.
+     * Resumes pcap thread. Sets status to ready.
+	 * @return KErrNone on success or suitable error code on failure
+     */
+    virtual TInt Start();
+
+    /**
+     * DEthernet implementation.
+	 * Stop the receiver.
+     * @param aMode possible values are: EStopNormal (=0), EStopEmergency (=1)
+	 * @post pcap thread suspended, status set to not ready
+     */
+    virtual void Stop(TStopMode aMode);
+
+    /**
+     * DEthernet implementation.
+	 * Validates a new configuration - should be called before Configure()
+     * @param aConfig is the configuration to be validated
+     * @return KErrNone if aConfig valid, KErrNotSupported otherwise
+     * @see Configure()
+     */
+    virtual TInt ValidateConfig(const TEthernetConfigV01 &aConfig) const;
+
+    /**
+     * DEthernet implementation.
+	 * Configure the PDD and pcap library
+     * Reconfigure the library using the new configuration supplied.
+	 * Sets pcap filter to read only frames with destination address set to
+	 * broadcast, multicast or MAC addresss from defaultConfig.
+     * This will not change the MAC address.
+     * @param aConfig The new configuration
+	 * @return KErrNone on success, suitable error code otherwise
+     * @see ValidateConfig()
+     * @see MacConfigure()
+     */
+    virtual TInt Configure(TEthernetConfigV01 &aConfig);
+
+    /**
+     * DEthernet implementation.
+	 * Change the MAC address - writes new MAC address in defaultConfig.
+	 * If new settings are to have any effect then pcap filter
+	 * ought to be set again which is done by 'Configure()'
+	 * @param aConfig a configuration structure containing the new MAC
+     * @see Configure()
+     */
+    virtual void MacConfigure(TEthernetConfigV01 &aConfig);
+
+	/**
+     * DEthernet implementation.
+	 * Get the current config from defaultConfig member varaiable
+	 * which is assumed to be up to date.
+     * Fills in the following fields:
+     * The Transmit Speed
+     * The Duplex Setting
+     * The MAC address
+     * @param aConfig is a TEthernetConfigV01 reference that will be filled in
+     */
+    virtual void GetConfig(TEthernetConfigV01 &aConfig) const;
+
+	/**
+     * DEthernet implementation.
+	 * Dummy method, required as pure virtual in base class
+     */
+    virtual void CheckConfig(TEthernetConfigV01 &aConfig);
+
+	/**
+     * DEthernet implementation.
+	 * Should query the capabilites.
+     * NOT supported but required as pure virtual in base class
+     */
+    virtual void Caps(TDes8 &aCaps) const;
+
+    /**
+     * DEthernet implementation.
+	 * Transmit data via wpcap
+     * @param aBuffer reference to the data to be sent
+     * @return KErrNone on success, other error code on failure
+     */
+    virtual TInt Send(TBuf8<KMaxEthernetPacket+32> &aBuffer);
+
+    /**
+     * DEthernet implementation.
+	 * Retrieve data
+     * Pull the received data out of the pcap library and into the supplied buffer. 
+     * Need to be told if the buffer is OK 
+     * @param aBuffer Reference to the buffer to be used to store the data in
+     * @param okToUse Bool to indicate if the buffer is usable
+     * @return KErrNone on success, other error code on failure
+     */
+    virtual TInt ReceiveFrame(TBuf8<KMaxEthernetPacket+32> &aBuffer, TBool okToUse);
+
+	/**
+     * DEthernet implementation.
+	 * Disables all IRQ's 
+     * @return The IRQ level before it was changed
+     * @see RestoreIrqs()
+     */
+    virtual TInt DisableIrqs();
+
+    /**
+     * DEthernet implementation.
+	 * Restore the IRQ's to the supplied level
+	 * @param aIrq The level to set the irqs to.
+     * @see DisableIrqs()
+     */
+    virtual void RestoreIrqs(TInt aIrq);
+
+	/**
+     * DEthernet implementation.
+	 * Return the DFC Queue that this device should use
+     * @param aUnit a channel's unit number (ignored - only one unit possible)
+     * @return a DFC Queue to use
+     */
+    virtual TDfcQue* DfcQ(TInt aUnit);
+    
+		
+private:
+ 	static TBool DEthernetWins::IsTcp(TDesC8 &aFrame);
+ 	static TInt DEthernetWins::GetTcpAckNumber(TDesC8 &frame);
+ 	static TInt DEthernetWins::GetTcpSeqNumber(TDesC8 &frame);
+	/**
+     * Read network interface to be used from configuration file. Panic if
+	 * pre-conditions are not satisfied.
+	 * @pre epoc32\\data\\epoc.ini must exist with entry: "ETHER-NIF=existing_nif_name"
+	 * @post network interface name put in a member variable: iNetInterfaceName
+	 * @panic D32ETHER reason: (2) can't get network interface name 
+     */
+	void  SetDriverName();
+
+	/**
+	 * Read MAC address from a configuration file and put it
+	 * into defaultConfig member variable checking before if the
+	 * one from the file is correct. Panic if pre-conditions are not satisfied
+	 * (although in case when MAC address is improper).
+	 * @pre epoc32\\data\\epoc.ini must exist with entry: "ETHER-MAC=proper_mac_address"
+	 * @panic D32ETHER reason:  EBadMacAddress
+	 * @return KErrNone on success (panics on failure)
+	 */
+	TInt SetMacAddress();
+
+    
+private:
+
+    /**
+     * The handle to the pcap interface - wpcap specific
+     */
+    pcap_t * iPcapPtr;
+
+    /**
+     * Saved received packet information - wpcap specific:
+	 * pointer to a structure that holds general information about the packet:
+	 * the time in which it was sniffed, the length of this packet, 
+	 * and the length of his specific portion (in case it is fragmented)
+     */
+    const struct pcap_pkthdr * iPcapHeader; 
+
+    /**
+     * Saved receive packet data - wpcap specific
+     */
+    const u_char * iPcapPktData;
+
+    /**
+     * Id of the receiver - wpcap thread
+     */
+    unsigned long iWorkerThreadId;
+
+	/**
+     * Contains the handle to wpcap thread. 
+     */
+	HANDLE				iThreadHandle;
+
+    /**
+     * Stores the unit number (only one interface possible in 
+	 * this implementation, so it will have value "0")
+     */
+    TInt  iUnit;
+	
+    /**
+     * Is ETrue if the chip has been fully configured and is ready
+	 * for receiving frames. Is set to ETrue in Start(), to EFalse
+	 * in Stop(). Initialized in constructor as EFalse.
+     */
+    TBool iReady;
+
+    /**
+     * Contains the default/current configuration of the driver.
+	 * Updated whenever configuration is to be changed.
+     */
+    TEthernetConfigV01 defaultConfig;
+
+	/**
+     * Contains the network interface name to be used 
+	 * @see SetDriverName()
+     */
+	char	iNetInterfaceName[KLocalDriverNameMax];
+	
+    };
+
+/** @} */ // End of wins ethernet pdd
+
+
+ 
+DDriverEthernet::DDriverEthernet()
+// Constructor
+    {
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DDriverEthernet::DDriverEthernet()"));
+    iUnitsMask=0x1;	// support unit 0 only
+    iVersion=TVersion(KEthernetMajorVersionNumber,
+                      KEthernetMinorVersionNumber,
+                      KEthernetBuildVersionNumber);
+	
+	}
+
+
+TInt DDriverEthernet::Install()
+// Install the driver
+    {
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DDriverEthernet::Install()"));
+    return SetName(&KPddName);
+    }
+
+
+void GetWinsEthernetsCaps(TDes8 &aCaps, TInt aUnit=0)
+    {
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("GetWinsEthernetsCaps(TDes8 &aCaps, TInt aUnit)"));
+    TEthernetCaps capsBuf;
+	
+	aUnit=0;
+
+    aCaps.FillZ(aCaps.MaxLength());
+    aCaps=capsBuf.Left(Min(capsBuf.Length(),aCaps.MaxLength()));
+    }
+
+void PanicFromWinsEtherDrv(TInt aReason)
+	{
+	Kern::Fault(KEthDrvPanicCategory, aReason);
+	}
+
+void DDriverEthernet::GetCaps(TDes8 &aDes) const
+// Return the driver's capabilities
+    {
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DDriverEthernet::GetCaps(TDes8 &aDes) const"));
+    GetWinsEthernetsCaps(aDes);	
+    }
+
+
+TInt DDriverEthernet::Create(DBase*& aChannel, 
+                             TInt aUnit, 
+                             const TDesC8* aInfo, 
+                             const TVersion& aVer)
+// Create a driver
+    {
+    __KTRACE_OPT(KHARDWARE, 
+		Kern::Printf("DDriverEthernet::Create(DBase*& aChannel, TInt aUnit, const TDesC8* nInfo, const TVersion& aVer)"));
+	
+    TInt ret;
+
+	ret = Validate( aUnit, aInfo, aVer);
+	if ( KErrNone != ret )
+		return ret;
+
+	ret = KErrNoMemory;
+
+	DEthernetWins* ptrPdd = new DEthernetWins;
+
+	
+	if ( ptrPdd )
+        {
+        ret = ptrPdd->DoCreate(aUnit);
+        if ( ret != KErrNone)
+			{
+            delete ptrPdd;
+			}	
+		else
+			aChannel = ptrPdd;
+        }
+
+	
+    return ret;
+    }
+
+
+TInt DDriverEthernet::Validate(TInt aUnit, 
+                               const TDesC8* /*aInfo*/, 
+                               const TVersion& aVer)
+//	Validate the requested configuration
+    {
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DDriverEthernet::Validate(TInt aUnit, const TDesC8* /*aInfo*/, const TVersion& aVer)"));
+    if ((!Kern::QueryVersionSupported(iVersion,aVer)) || 
+        (!Kern::QueryVersionSupported(aVer,TVersion(KMinimumLddMajorVersion,
+                                                    KMinimumLddMinorVersion,
+                                                    KMinimumLddBuild))))
+		{
+        return KErrNotSupported;
+		}
+    
+	if (aUnit != 0)
+		{
+        return KErrNotSupported;
+		}
+
+	return KErrNone;
+    }
+
+
+DEthernetWins::DEthernetWins()
+// Constructor
+	{
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::DEthernetWins()"));
+
+    iReady = EFalse;
+    
+	// set default configuration - must be set before DoCreate gets called
+	defaultConfig.iEthSpeed  = KEthSpeedUnknown;
+    defaultConfig.iEthDuplex = KEthDuplexUnknown;
+							
+	// MAC address initially set to NULL
+	defaultConfig.iEthAddress[0] = 0; 
+    defaultConfig.iEthAddress[1] = 0; 
+    defaultConfig.iEthAddress[2] = 0; 
+	defaultConfig.iEthAddress[3] = 0; 
+    defaultConfig.iEthAddress[4] = 0; 
+    defaultConfig.iEthAddress[5] = 0; 
+	
+	iNetInterfaceName[0] = '\0';
+
+	// wpcap
+	iPcapPtr = NULL;
+
+	}
+
+DEthernetWins::~DEthernetWins()
+// Destructor
+	{
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::~DEthernetWins()"));
+
+	if (iPcapPtr)
+		{
+		pcap_close(iPcapPtr);
+		iPcapPtr = NULL;
+		}
+  
+	}
+
+
+TInt DEthernetWins::DoCreate(TInt aUnit)//, const TDesC8* /*anInfo*/)
+// Sets up the PDD
+	{
+	__KTRACE_OPT(KHARDWARE, 
+		Kern::Printf("DEthernetWins::DoCreate(TInt aUnit, const TDesC8* /*anInfo*/)"));
+   
+	iUnit = aUnit;
+
+	TInt ret = KErrNone;
+
+	SetMacAddress(); // will panic if can't get proper MAC address
+
+	const char* speedProperty = Property::GetString(KEpocIniEthSpeedEntry);
+
+	if( (NULL==speedProperty) ? 0 : (0 == strcmp( speedProperty, KEpocIniEthSpeed10Mbps )) )
+		{
+		defaultConfig.iEthSpeed = KEthSpeed10BaseT;
+		}
+	else if ( (NULL==speedProperty) ? 0 : (0 == strcmp( speedProperty, KEpocIniEthSpeed100Mbps )) )
+		{
+		defaultConfig.iEthSpeed = KEthSpeed100BaseTX;
+		}
+
+	SetDriverName();
+
+	char errPcap[PCAP_ERRBUF_SIZE];
+
+	if( iPcapPtr == NULL )
+		{
+		
+		if((iPcapPtr = pcap_open_live( iNetInterfaceName,
+									   2000, 
+                                      1, 
+                                      20, 
+                                      errPcap)) != NULL)
+			{
+	 	    
+			if ((iThreadHandle = CreateThread(NULL,
+                                           0,
+                                           (LPTHREAD_START_ROUTINE)WorkThread,
+                                           this,
+                                           CREATE_SUSPENDED,
+                                           &iWorkerThreadId)) != NULL)
+				{
+    			ret = Configure(defaultConfig);
+				}
+			else
+				{
+				__KTRACE_OPT(KHARDWARE, Kern::Printf("CreateThread() failed to create worker thread"));
+				ret = KErrBadHandle; 
+				}
+			}
+		else
+			{
+		    __KTRACE_OPT(KHARDWARE, Kern::Printf("pcap_open_live() failed to open"));
+			//ret = KErrCouldNotConnect;
+			PanicFromWinsEtherDrv( EPcapNull );
+			}
+    
+		}
+	
+    if(ret != KErrNone)
+		{
+		// Failed to init all so tidy up
+		if( iPcapPtr )
+			{
+			pcap_close(iPcapPtr);
+			iPcapPtr = NULL;
+			}
+		__KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::DoCreate() returned with ERROR"));
+		return ret;
+		}
+
+
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::DoCreate %2x:%2x:%2x:%2x:%2x:%2x",
+                                         defaultConfig.iEthAddress[0], 
+                                         defaultConfig.iEthAddress[1],
+                                         defaultConfig.iEthAddress[2], 
+                                         defaultConfig.iEthAddress[3],
+                                         defaultConfig.iEthAddress[4], 
+                                         defaultConfig.iEthAddress[5]));
+
+	return ret;
+	}
+
+
+void  DEthernetWins::SetDriverName()
+	{
+	__KTRACE_OPT(KHARDWARE, 
+		Kern::Printf("DEthernetWins::SetDriverName()"));
+
+	const char* property = Property::GetString(KEpocIniEthNIFEntry);
+
+	__ASSERT_ALWAYS( (NULL != property),
+		PanicFromWinsEtherDrv(ENoNetInterface) );
+
+	memcpy( iNetInterfaceName, property, strlen(property) );
+	}
+
+
+TInt DEthernetWins::SetMacAddress()
+// reads MAC address from epoc.ini file and writes into defaultConfig
+	{
+	
+	__KTRACE_OPT(KHARDWARE, 
+		Kern::Printf("DEthernetWins::SetMacAddress()"));
+
+	TUint8 tempAddress[6];
+
+	const char *tempBuffer = Property::GetString(KEpocIniEthMACEntry);
+
+	__ASSERT_ALWAYS( ((tempBuffer != NULL) && (strlen(tempBuffer) >= 6)),
+		PanicFromWinsEtherDrv(EBadMacAddress) );
+
+
+	TBuf<20> validCharsLower(_L("0123456789abcdef"));
+	TBuf<20> validCharsUpper(_L("0123456789ABCDEF"));
+	TUint8 value;
+	TUint8 upper=0;
+	TChar c;
+	TInt pos; 
+	TInt i;
+	for( i=0; i<6; i++)
+		{
+		c = tempBuffer[2*i];
+		if(((pos = validCharsLower.Locate(c)) == KErrNotFound) &&
+			((pos = validCharsUpper.Locate(c)) == KErrNotFound))
+			{
+			PanicFromWinsEtherDrv( EBadMacAddress );
+			}
+		upper = (TUint8)pos;
+		c = tempBuffer[(2*i)+1];
+		if( ((pos = validCharsLower.Locate(c)) == KErrNotFound) &&
+			((pos = validCharsUpper.Locate(c)) == KErrNotFound) )
+			{
+			PanicFromWinsEtherDrv( EBadMacAddress );
+			}
+
+		value = (TUint8)pos;
+		value = (TUint8)((upper<<4) | value);
+		tempAddress[i] = value;
+		}
+
+	for( i=0; i<6; i++ )
+		{
+		defaultConfig.iEthAddress[i] = tempAddress[i];
+		}
+
+	return KErrNone;
+
+	}
+
+
+TDfcQue* DEthernetWins::DfcQ(TInt /*aUnit*/)
+// Return the DFC queue to be used for this device
+	{
+    __KTRACE_OPT(KHARDWARE, 
+		Kern::Printf("DEthernetWins::DfcQ(TInt )"));
+    return Kern::DfcQue0();
+	}
+
+
+TInt DEthernetWins::Start()
+// Start receiving frames
+	{
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::Start()"));
+
+	TInt32 ret;
+	
+	// Start thread
+	// ResumeThread() - from MSDN help:
+	// This function decrements a thread’s suspend count. 
+	// When the suspend count is decremented to zero, 
+	// the execution of the thread is resumed. 
+	// Return value: The thread’s previous suspend count indicates success. 0xFFFFFFFF indicates failure
+	ret = ResumeThread( iThreadHandle );
+	if( (0xFFFFFFFF == ret) )//|| (ret > 1) )
+		return KErrGeneral;
+	
+    iReady = ETrue;
+
+    return KErrNone;
+	}
+
+
+void DEthernetWins::Stop(TStopMode aMode)
+// Stop receiving frames
+	{
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::Stop(TStopMode aMode)"));
+
+	
+    switch (aMode)
+		{
+        case EStopNormal:
+        case EStopEmergency:
+			SuspendThread(iThreadHandle);
+			iReady = EFalse;
+			break;
+		default:
+			SuspendThread(iThreadHandle);
+			iReady = EFalse;
+			break;
+		}
+
+	}
+
+
+TInt DEthernetWins::ValidateConfig(const TEthernetConfigV01 &aConfig) const
+// Validate a config structure.
+	{
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::ValidateConfig(const TEthernetConfigV01 &aConfig) const"));
+    switch(aConfig.iEthSpeed)
+        {
+        case KEthSpeedUnknown:
+		case KEthSpeedAuto: 
+        case KEthSpeed10BaseT:
+        case KEthSpeed100BaseTX:
+			break;
+        default:		
+        	return KErrNotSupported;
+        }
+
+    switch(aConfig.iEthDuplex)
+        {
+        case KEthDuplexUnknown:
+		case KEthDuplexAuto:
+        case KEthDuplexHalf:
+        case KEthDuplexFull:
+			break;
+        default:
+        	return KErrNotSupported;
+        }
+
+    return KErrNone;
+	}
+
+
+void DEthernetWins::CheckConfig(TEthernetConfigV01& /*aConfig*/)
+// dummy implementation of pure virtual function
+	{
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::CheckConfig(TEthernetConfigV01& aConfig)"));
+	}
+
+TInt DEthernetWins::Send(TBuf8<KMaxEthernetPacket+32> &aBuffer)
+	{
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::Send(TBuf8<KMaxEthernetPacket+32> &aBuffer)"));
+    TUint16 * dataP = (TUint16 *)aBuffer.Ptr();
+    TUint16 length = TUint16(aBuffer.Length());
+
+	TInt ret;
+
+    if (iPcapPtr)
+	    {
+		__KTRACE_OPT2(KHARDWARE, KSCRATCH, Kern::Printf("  >pdd tx: sending tcp seq=%u ack=%u", GetTcpSeqNumber(aBuffer), GetTcpAckNumber(aBuffer) ));
+        if(pcap_sendpacket(iPcapPtr, (unsigned char *)dataP, length))
+		    {
+            __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::Send - pcap_sendpacket() failed "));
+
+		    ret = KErrWrite; 
+	        }
+        else
+		    {
+            __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::Send: \n*** completed pcap_sendpacket() ***\n"));
+            ret = KErrNone;
+            }
+		}
+    else
+		{
+        __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::Send() pcap adapter NOT open\n"));
+        ret = KErrNotReady; 
+		}
+    
+    return ret;
+	}
+
+
+TInt DEthernetWins::DisableIrqs()
+// Disable normal interrupts
+	{
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::DisableIrqs()"));
+    return NKern::DisableInterrupts(1);
+	}
+
+
+void DEthernetWins::RestoreIrqs(TInt aLevel)
+// Restore normal interrupts
+	{
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::RestoreIrqs(TInt aLevel)"));
+    NKern::RestoreInterrupts(aLevel);
+	}
+
+
+void DEthernetWins::MacConfigure(TEthernetConfigV01 &aConfig)
+	{
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::MacConfigure(TEthernetConfigV01 &aConfig)"));
+    defaultConfig.iEthAddress[0] = aConfig.iEthAddress[0]; 
+	defaultConfig.iEthAddress[1] = aConfig.iEthAddress[1];
+	defaultConfig.iEthAddress[2] = aConfig.iEthAddress[2];
+	defaultConfig.iEthAddress[3] = aConfig.iEthAddress[3];
+	defaultConfig.iEthAddress[4] = aConfig.iEthAddress[4];
+	defaultConfig.iEthAddress[5] = aConfig.iEthAddress[5];
+	}
+
+
+TInt DEthernetWins::Configure(TEthernetConfigV01 & /*aConfig*/)
+// Set a wpcap filter
+	{
+
+	__KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::Configure(TEthernetConfigV01 &aConfig)"));
+	
+    char errPcap[PCAP_ERRBUF_SIZE];
+	TInt ret = KErrNone;
+    char filter[128];
+    struct bpf_program fcode;
+    bpf_u_int32 SubNet,NetMask;
+
+	//obtain the subnet
+    pcap_lookupnet(	iNetInterfaceName, &SubNet, &NetMask, errPcap);
+
+    sprintf(filter, 
+            PCAP_FILTER, //pcap_filter, 
+            defaultConfig.iEthAddress[0],
+            defaultConfig.iEthAddress[1],
+            defaultConfig.iEthAddress[2],
+            defaultConfig.iEthAddress[3],
+            defaultConfig.iEthAddress[4],
+            defaultConfig.iEthAddress[5],
+            defaultConfig.iEthAddress[0],
+            defaultConfig.iEthAddress[1],
+            defaultConfig.iEthAddress[2],
+            defaultConfig.iEthAddress[3],
+            defaultConfig.iEthAddress[4],
+            defaultConfig.iEthAddress[5]);
+
+
+	//compile the filter
+    if( 0 != pcap_compile(iPcapPtr, &fcode, filter, 1, NetMask) )
+		{
+		// failed to compile:
+		__KTRACE_OPT(KHARDWARE, Kern::Printf("pcap_compile() failed"));
+		ret = KErrUnknown; 
+		}
+	else
+		{
+		// compiled successfully: set the filter
+		if( 0 != pcap_setfilter(iPcapPtr, &fcode))
+			{
+			__KTRACE_OPT(KHARDWARE, Kern::Printf("pcap_setfilter() failed"));
+			ret = KErrUnknown; 
+			}
+		}
+
+    return ret; 
+	}
+
+
+void DEthernetWins::GetConfig(TEthernetConfigV01 &aConfig) const
+// Get the current config from defaultConfig member
+	{
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::GetConfig(TEthernetConfigV01 &aConfig) const"));
+    aConfig = defaultConfig;
+	}
+
+
+void DEthernetWins::Caps(TDes8 &aCaps) const
+// return PDD's capabilites
+    {
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::Caps(TDes8 &aCaps) const"));
+    GetWinsEthernetsCaps(aCaps,iUnit); 
+    }
+
+
+void DEthernetWins::Isr( u_char *thisObject,  
+                       	const struct pcap_pkthdr *header, 
+                        const u_char *pkt_data)
+// pcap callback fuction
+	{
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::Isr()"));
+
+	DEthernetWins& thisPdd = *(DEthernetWins*) thisObject;
+    	
+	StartOfInterrupt();
+
+	thisPdd.iPcapHeader = header;
+	thisPdd.iPcapPktData = pkt_data;
+
+    thisPdd.ReceiveIsr();
+	
+	EndOfInterrupt();
+
+    return;
+	}
+
+
+TInt DEthernetWins::ReceiveFrame(TBuf8<KMaxEthernetPacket+32> &aBuffer, TBool okToUse)
+	{
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("DEthernetWins::ReceiveFrame(TBuf8<KMaxEthernetPacket+32> &aBuffer)"));
+
+	// If no buffer available dump frame
+    if(!okToUse)
+		{
+        return KErrGeneral;
+		}
+
+    aBuffer.Copy(iPcapPktData, iPcapHeader->len);
+    aBuffer.SetLength(iPcapHeader->len);
+	__KTRACE_OPT2(KHARDWARE, KSCRATCH, Kern::Printf("  >pdd rx: tcp seq=%u ack=%u", GetTcpSeqNumber(aBuffer), GetTcpAckNumber(aBuffer) ));
+    
+	return KErrNone;
+	}
+
+#ifdef _DEBUG
+const TUint8 ETHER2_TYPE_IP_MSB = 0x08;
+const TUint8 ETHER2_TYPE_IP_LSB = 0x00;
+const TUint8 IP_TYPE_TCP        = 0x06;
+
+TBool DEthernetWins::IsTcp(TDesC8 &aFrame)
+	{
+ 	return (aFrame[12] == ETHER2_TYPE_IP_MSB && aFrame[13] == ETHER2_TYPE_IP_LSB && aFrame[23] == IP_TYPE_TCP);
+	}
+
+TInt DEthernetWins::GetTcpSeqNumber(TDesC8 &aFrame)
+	{
+ 	TInt seqNum = 0;
+ 	if (IsTcp(aFrame))
+ 		seqNum = aFrame[38] << 24 | aFrame[39] << 16 | aFrame[40] << 8| aFrame[41];
+ 	return seqNum;
+ 	}
+
+TInt DEthernetWins::GetTcpAckNumber(TDesC8 &aFrame)
+ 	{
+ 	TInt ackNum = 0;
+ 	if (IsTcp(aFrame))
+ 		ackNum = aFrame[42] << 24 | aFrame[43] << 16 | aFrame[44] << 8| aFrame[45];
+ 	return ackNum;
+ 	}
+#endif
+
+TInt WorkThread(DEthernetWins * aDEthernetWins)
+	{
+    __KTRACE_OPT(KHARDWARE, Kern::Printf("WorkThread(DEthernetWins * aDEthernetWins)"));
+
+    return pcap_loop(aDEthernetWins->iPcapPtr, 0, DEthernetWins::Isr, (unsigned char *)aDEthernetWins);
+	}
+
+/**
+ * @addtogroup enet_windows
+ * @{
+ */
+
+/**
+ * Real entry point from the Kernel: return a new driver
+ * (Macro wrapping: EXPORT_C DPhysicalDevice *CreatePhysicalDevice() )
+ */
+DECLARE_STANDARD_PDD()
+	{
+	return new DDriverEthernet;
+	}
+
+
+/** @} */ // end of windows group
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/gui.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,4920 @@
+// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\gui.cpp
+// 
+//
+#define WINVER 0x0500
+
+#include "gui.h"
+#include <emulator.h>
+#include <assp.h>
+#include <kernel/kern_priv.h>
+#include <kernel/kpower.h>
+#include "variant.h"
+#include "resource.h"
+#include "winsgui.h"
+#include "display_chan.h"
+#include "pixelformats.h"
+#include "multitouch.h"
+
+#include "monitors.h"
+
+//Define these so that emulator generates varying values for gce stride and offset.
+//By default in emulator, stride is exactly right for display resolution and offset is zero
+//Setting these will identify code which incorrectly calculates these factors instead of requesting them
+//Note that multiples of 4 bytes are preferred for various reasons.
+//[3/5/07 The Secure presentation burffer ignores stride extra because it uses a windows bitmap header to render.]
+// #define TEST_GCE_VARIABLE_STRIDE_EXTRA	16		 	//This constant is added to each mode's scanline length in bytes. It may cause a break if enabled because the iDisplayBufferOffset is not being set
+// #define TEST_GCE_VARIABLE_START_EXTRA	16			//A multiple of this is added to each mode's start address in bytes
+// #define ASSYMETRIC_SQUARE_STRIDE						//If this is defined and the width==height the the stride will not be the same!
+
+enum  
+	{
+		KMaskModeNum=0x0FFFFFFF,
+		KMaskModeFlag8=0x80000000,
+		KMaskModeFlag4=0x40000000,
+		KMaskModeFlag2=0x20000000,
+		KMaskModeFlag1=0x10000000,
+		
+		KModeFlagFlipped=KMaskModeFlag8,
+		
+	};
+enum  
+	{
+		KMaskScreenNum=0x0FFF,
+		KMaskScreenFlag8=0x8000,
+		KMaskScreenFlag4=0x4000,
+		KMaskScreenFlag2=0x2000,
+		KMaskScreenFlag1=0x1000,
+		
+		KScreenFlagSecure=KMaskScreenFlag8,
+		
+	};
+const TInt KMaxDisplayColors=16777216;
+const TInt KMaxDisplayContrast=1;
+
+static TEmulatorFlip* CurrentFlipState=NULL;
+static TInt CurrentConfiguration = 0;
+static TInt SavedFlipMessage = 0;
+
+DWinsUi *systemIni=NULL;
+DMasterIni* masterIni;
+
+DMultiTouch* TheMultiTouch;
+static HWND TheControlWin;
+static HWND* TheChildWin=NULL;
+static HWND* TheWin=NULL;
+static HWND hwndStatus; // To display the X,Y,Z information of each mouse
+static TInt VirtualKeyPressed = EStdKeyNull;
+static HBITMAP* TheScreenBitmap=NULL;
+static TUint LedMask;
+static TBool WsSwitchOnScreen;
+
+const char * DefaultWindowTitle = "Symbian OS Emulator";
+
+#ifdef __VC32__
+
+#ifdef _DEBUG
+const char * VersionText = " - wins udeb";
+#else
+const char * VersionText = " - wins urel";
+#endif
+
+#else
+#ifdef __CW32__
+
+#ifdef _DEBUG
+const char * VersionText = " - winscw udeb";
+#else
+const char * VersionText = " - winscw urel";
+#endif
+
+#else
+//not winscw or wins!
+#ifdef _DEBUG
+const char * VersionText = " - unknown udeb";
+#else
+const char * VersionText = " - unknown urel");
+#endif
+
+#endif
+#endif
+
+void Inactive();
+void Active();
+void DrawLeds();
+void UpdateModifiers(); 
+TInt DisplayHalFunction(TAny*, TInt aFunction, TAny* a1, TAny* a2);
+LOCAL_C TBool PaintWindowFromBuffer(HWND hWnd);
+
+GLDEF_C const char* skipws(const char* aPtr)
+	{
+	while (isspace(*aPtr))
+		++aPtr;
+	return aPtr;
+	}
+
+GLDEF_C const char* skiptok(const char* aPtr)
+	{
+	while (isalnum(*aPtr))
+		++aPtr;
+	return aPtr;
+	}
+
+GLDEF_C TInt CompareI(const TDesC8& aLhs, const TDesC8& aRhs)
+//
+// Case insensitive comparison of descriptors
+// (TDesC::CompareF not available to kernel side code)
+//
+	{
+	TInt ll = aLhs.Length();
+	TInt rl = aRhs.Length();
+	TInt len = Min(ll, rl);
+	TInt k = _strnicmp((const char*)aLhs.Ptr(), (const char*)aRhs.Ptr(), len);
+	return k != 0 ? k : ll - rl;
+	}
+
+GLDEF_C TInt MultiProperty(TInt (*aHandler)(TAny* aObj, const char*), TAny* aPtr, const char* aProperty)
+	{
+	const char* value = Property::GetString(aProperty);
+	if (!value)
+		return KErrNone;
+	for (;;)
+		{
+		TInt r = aHandler(aPtr, value);
+		if (r != KErrNone)
+			return r;
+		const char* ev = strchr(value, ';');
+		if (!ev)
+			break;
+		value = ev + 1;
+		}
+	return KErrNone;
+	}
+
+class DWinsGuiPowerHandler : public DPowerHandler
+	{
+public: // from DPowerHandler
+	void PowerDown(TPowerState);
+	void PowerUp();
+public:
+	static DWinsGuiPowerHandler* New();
+	void ScreenOn();
+	void ScreenOff();
+	void ScreenOn(TInt aScreen);
+	void ScreenOff(TInt aScreen);
+public:
+	DWinsGuiPowerHandler();
+	TBool ProcessEvent(const TRawEvent* aEvent);
+	TBool ProcessEventDfc(const TRawEvent* aEvent);
+	TBool	iStandby;
+	};
+
+static DWinsGuiPowerHandler* WinsGuiPowerHandler;
+
+_LIT(KWinsGuiName, "WinsGui");
+
+DWinsGuiPowerHandler* DWinsGuiPowerHandler::New()
+	{
+	DWinsGuiPowerHandler* self = new DWinsGuiPowerHandler();
+	if (!self)
+		return NULL;
+	self->Add();
+
+	return self;
+	}
+
+DWinsGuiPowerHandler::DWinsGuiPowerHandler() : DPowerHandler(KWinsGuiName)
+	{
+	}
+
+void DWinsGuiPowerHandler::ScreenOff()
+	{
+	for(TInt ix=0;ix<systemIni->iScreens.Count();ix++)
+		ScreenOff(ix);
+	}
+
+void DWinsGuiPowerHandler::ScreenOn()
+	{
+	for(TInt ix=0;ix<systemIni->iScreens.Count();ix++)
+		ScreenOn(ix);
+	}
+
+void DWinsGuiPowerHandler::ScreenOff(TInt aScreen)
+	{
+	PostMessageA(TheWin[aScreen], WM_EMUL_POWER_ON, FALSE, NULL);
+	systemIni->iScreens[aScreen]->iScreenOff = ETrue;
+	}
+
+void DWinsGuiPowerHandler::ScreenOn(TInt aScreen)
+	{
+	PostMessageA(TheWin[aScreen], WM_EMUL_POWER_ON, TRUE, NULL);
+	systemIni->iScreens[aScreen]->iScreenOff = EFalse;
+	}
+
+void DWinsGuiPowerHandler::PowerDown(TPowerState aState)
+	{
+	if (aState == EPwStandby)
+		iStandby = ETrue;
+	ScreenOff();
+	PowerDownDone();
+	}
+
+
+void DWinsGuiPowerHandler::PowerUp()
+	{
+	iStandby = EFalse;
+	ScreenOn();
+	PowerUpDone();
+	}
+
+// called in the interrupt context
+TBool DWinsGuiPowerHandler::ProcessEvent(const TRawEvent* aEvent)
+	{
+	if (!iStandby)
+		// Pass through 
+		return EFalse;
+
+	if ((aEvent->Type() == TRawEvent::EKeyDown))
+			{
+			Wins::Self() -> AssertWakeupSignal();
+			}
+	
+	// Ignore
+	return ETrue;
+	}
+
+// called in DFC
+TBool DWinsGuiPowerHandler::ProcessEventDfc(const TRawEvent* aEvent)
+	{
+	if (aEvent->Type() == TRawEvent::EKeyDown)
+		{
+		Wins::Self() -> WakeupEvent();
+		if (aEvent->ScanCode() == EStdKeyF5)
+			{
+			// Simulate a media change interrupt (media removed)
+			Wins::MediaChangeCallBack();
+			*Wins::MediaDoorOpenPtr()=ETrue;
+			// Ignore
+			return ETrue;
+			}
+		if (aEvent->ScanCode() == EStdKeyF8)
+			{
+			TRawEvent v;
+			v.Set(TRawEvent::ECaseClose);
+			Kern::AddEvent(v);
+			// Ignore
+			return ETrue;
+			}
+		if (aEvent->ScanCode() == EStdKeyF8)
+			{
+			TRawEvent v;
+			v.Set(TRawEvent::ECaseClose);
+			Kern::AddEvent(v);
+			// Ignore
+			return ETrue;
+			}
+		if (aEvent->ScanCode() == EStdKeyOff)
+			{
+			// Pass through
+			return EFalse;
+			}
+		if (aEvent->ScanCode() == EStdKeyF10)
+			{
+			TRawEvent v;
+			v.Set(TRawEvent::ESwitchOff);
+			Kern::AddEvent(v);
+			// Ignore
+			return ETrue;
+			}
+		if (aEvent->ScanCode() == EStdKeyF11)
+			{
+			TRawEvent v;
+			v.Set(TRawEvent::ECaseOpen);
+			Kern::AddEvent(v);
+			// Ignore
+			return ETrue;
+			}
+		}
+	else if (aEvent->Type() == TRawEvent::EKeyUp)
+		{
+		if (aEvent->ScanCode() == EStdKeyF10)
+			// Ignore
+			return ETrue;
+
+		if (aEvent->ScanCode() == EStdKeyF5)
+			{
+			// Simulate a media change interrupt (media Present)
+			*Wins::MediaDoorOpenPtr()=EFalse;
+			return ETrue;
+			}
+		}
+
+	// Path through
+	return EFalse;
+	}
+
+class EventQ
+	{
+	enum {ESize = 16};
+public:
+	EventQ();
+	void Add(const TRawEvent& aEvent);
+private:
+	static void Dfc(TAny* aPtr);
+	void Empty();
+private:
+	TDfc iDfc;
+	TRawEvent* iTail;
+	TRawEvent iQ[ESize];
+	};
+
+EventQ::EventQ()
+	:iDfc(&EventQ::Dfc, this, Kern::DfcQue0(), 6), iTail(iQ)
+	{}
+
+
+void EventQ::Add(const TRawEvent& aEvent)
+	{
+	StartOfInterrupt();	
+	if (WinsGuiPowerHandler->ProcessEvent(&aEvent)) 
+		{
+		EndOfInterrupt();
+		return;
+		}
+
+	TRawEvent* pE = iTail;
+	if (pE != &iQ[ESize])
+		{
+		*pE = aEvent;
+		iTail = pE + 1;
+		if (pE == iQ)
+			iDfc.Add();
+		}
+	EndOfInterrupt();
+	}
+
+void EventQ::Dfc(TAny* aPtr)
+	{
+	static_cast<EventQ*>(aPtr)->Empty();
+	}
+
+void EventQ::Empty()
+//
+// Called in the DFC
+//
+	{
+	TInt irq;
+	TRawEvent* pE = iQ;
+	for (;;)
+		{
+		if (!WinsGuiPowerHandler->ProcessEventDfc(pE)) 
+			Kern::AddEvent(*pE);
+		++pE;
+		irq = NKern::DisableAllInterrupts();
+		if (pE == iTail)
+			break;
+		NKern::RestoreInterrupts(irq);
+		}
+	iTail = iQ;
+	NKern::RestoreInterrupts(irq);
+	}
+
+LOCAL_D EventQ TheEventQ;
+
+// Virtual keys
+
+
+VirtualKey::VirtualKey(const TInt aCommandData, const TEmulCommand aCommand) : iCommand(aCommand), iData(aCommandData)
+	{
+	}
+
+TBool VKRect::Contains(TInt aX, TInt aY) const
+	{
+	return (aX >= iLeft && aX < iRight && aY >= iTop && aY < iBottom);
+	}
+
+VKRect::VKRect(const TInt aCommandData, const TEmulCommand aCommand, TInt aX, TInt aY, TInt aWidth, TInt aHeight) :
+	VirtualKey(aCommandData, aCommand)
+	{
+	iLeft = aX;
+	iTop = aY;
+	iRight = aX + aWidth;
+	iBottom = aY + aHeight;
+	}
+
+
+
+void VKRect::Draw(HDC aHdc,COLORREF aColor) const
+	{
+	HPEN pen;
+	pen=CreatePen(PS_SOLID, 2, aColor);
+	SelectObject(aHdc, pen);
+	POINT point;
+
+	MoveToEx(aHdc, (int)iLeft, (int)iTop, &point);
+	LineTo(aHdc, (int)iLeft, (int)iBottom);
+	LineTo(aHdc, (int)iRight, (int)iBottom);
+	LineTo(aHdc, (int)iRight, (int)iTop);
+	LineTo(aHdc, (int)iLeft, (int)iTop);
+	}
+
+
+KeyCombination::KeyCombination(const TInt aCommandData, TEmulCommand aCommand):
+	iData(aCommandData),
+	iCommand(aCommand)
+{
+	for (TInt i=0;i<KMaxHotKeyCombinationLength;i++) 
+		{
+		iCombination[i]=EStdKeyNull;
+		}
+}
+
+TBool KeyCombination::CheckCombinationPressed()
+{
+	for (TInt j=0;(j<KMaxHotKeyCombinationLength && iCombination[j]!=0);j++)
+		{
+		if (GetAsyncKeyState(MapVirtualKey(iCombination[j],1))>=0)//if at least one key is not pressed, we return false
+			return EFalse;				
+		}
+	return ETrue;	
+}
+
+TBool KeyCombination::AddKey(TStdScanCode aKey)
+{
+	TInt i;
+	for (i=0;i<KMaxHotKeyCombinationLength;i++) 
+		{
+		if (iCombination[i]==EStdKeyNull) 
+			break;
+		}
+	if (KMaxHotKeyCombinationLength==i)
+		return EFalse;
+	else		
+		iCombination[i]=aKey;	
+
+	return ETrue;
+}
+
+
+DScreenProperties::DScreenProperties()
+	{
+	memset(this,0,sizeof(DScreenProperties));
+	iColorDepth=KDefaultColorDepth;
+	
+	iViewport = TViewport(this);
+	}
+
+
+LOCAL_C TInt MaskGceOnly(TInt aModeBits)
+	{	   //All HAL modes are now reported. The GCE may refuse to register the surfaces.
+	return aModeBits&KEmulModes;	//previous useful settings: //(KEmulPixPerLong2|KEmulPixPerLong1);	//|KEmulPixPerLong4;
+	}
+	
+LOCAL_C TInt BitsForSingleMode(TInt aModeColor)
+	{	//only 1 bit should be set in aModeColor
+	switch (aModeColor)
+		{
+		case KEmulGray2:	return 1;	
+		case KEmulGray4:	return 2;	
+		case KEmulGray16:	return 4;
+		case KEmulGray256:	return 8;
+		case KEmulColor16:	return 4;
+		case KEmulColor256:	return 8;
+		case KEmulColor4K:	return 12;
+		case KEmulColor64K:	return 16;
+		case KEmulColor16M:	return 24;
+		default:	return 32;
+		}
+	
+	}
+
+DScreenProperties::~DScreenProperties() 
+	{
+	}
+
+TWindowState DScreenProperties::GetWindowState()
+	{
+	TWindowState state;
+	state.iWinPlace = iWinPlace;
+	state.iFlipstate = iScreenRotation;
+	state.iXoffset = iViewport.GetViewportOffsetX();
+	state.iYoffset = iViewport.GetViewportOffsetY();
+	return state;
+	}
+	
+TInt DScreenProperties::SetupProperties(TInt aConf, TInt aScreen)
+	{
+	char property[50];
+
+	// Calculate maximum dimensions
+	TInt configurations = Property::GetInt("ConfigCount", 0);
+	if (configurations == 0)
+		return KErrGeneral;
+
+	TInt count, screenWidth, screenHeight, physicalScreenWidth, physicalScreenHeight;
+	for (count = 0; count < configurations; ++count)
+		{
+		wsprintfA(property, "Configuration[%d][%d]ScreenWidth", count, aScreen);
+		screenWidth = Property::GetInt(property, KScreenWidth);
+		screenWidth = (screenWidth + 3) & ~3;
+		if (screenWidth > iMaxScreenWidth)
+			iMaxScreenWidth = screenWidth;
+		wsprintfA(property, "Configuration[%d][%d]ScreenHeight", count, aScreen);
+		screenHeight = Property::GetInt(property, KScreenHeight);
+		screenHeight = (screenHeight + 3) & ~3;
+		if (screenHeight > iMaxScreenHeight)
+			iMaxScreenHeight = screenHeight;
+//
+		wsprintfA(property, "Configuration[%d][%d]PhysicalScreenWidth", count, aScreen);
+		physicalScreenWidth = Property::GetInt(property);
+		if (physicalScreenWidth > iMaxPhysicalScreenWidth)
+			iMaxPhysicalScreenWidth = physicalScreenWidth;
+		wsprintfA(property, "Configuration[%d][%d]PhysicalScreenHeight", count, aScreen);
+		physicalScreenHeight = Property::GetInt(property);
+		if (physicalScreenHeight > iMaxPhysicalScreenHeight)
+			iMaxPhysicalScreenHeight = physicalScreenHeight;
+		}
+
+	// Read figures for current configuration
+	TInt givenWidth, givenHeight;
+	wsprintfA(property, "Configuration[%d][%d]ScreenWidth",aConf,aScreen);
+	givenWidth = Property::GetInt(property, KScreenWidth);
+	iScreenWidth = (givenWidth + 3) & ~3;
+	wsprintfA(property, "Configuration[%d][%d]ScreenHeight",aConf,aScreen);
+	givenHeight = Property::GetInt(property, KScreenHeight);
+	iScreenHeight = (givenHeight + 3) & ~3;
+	// Width of screen should be multiple number of 4 pixels.
+	if (givenWidth & 3 || givenHeight & 3)
+		{
+		Kern::Printf("Width and Height of Screen should be multiple number of 4 pixels.\n"
+				"\tWidth of screen[%d] set to: %d\n\tHeight of screen[%d] set to: %d", 
+				aScreen, iScreenWidth, aScreen, iScreenHeight);
+		}
+
+//
+	wsprintfA(property, "Configuration[%d][%d]PhysicalScreenWidth",aConf,aScreen);
+	iPhysicalScreenWidth = Property::GetInt(property);
+	wsprintfA(property, "Configuration[%d][%d]PhysicalScreenHeight",aConf,aScreen);
+	iPhysicalScreenHeight = Property::GetInt(property);
+//
+	wsprintfA(property, "Configuration[%d][%d]ScreenOffsetX",aConf,aScreen);
+	iScreenOffsetX = Property::GetInt(property, KScreenOffsetX);
+	wsprintfA(property, "Configuration[%d][%d]ScreenOffsetY",aConf,aScreen);
+	iScreenOffsetY = Property::GetInt(property, KScreenOffsetY);
+	
+	wsprintfA(property, "Configuration[%d][%d]CompositionBuffers",aConf,aScreen);
+	iCompositionBuffers = Property::GetInt(property, KCompositionBuffers);
+
+	wsprintfA(property, "Configuration[%d][%d]RefreshRateHz",aConf,aScreen);
+	iRefreshRateHz = Property::GetInt(property, KRefreshRateHz);
+
+
+	wsprintfA(property, "Configuration[%d][%d]ColorDepth",aConf,aScreen);
+	const char* colors = Property::GetString(property);
+	if (colors)
+		{
+		TUint colorDepth=0;
+		const char* end = colors;
+		for (;;)
+			{
+			const char* beg = skipws(end);
+			if(*beg==';')
+				break;
+			if (!*beg)
+				break;
+			end	= skiptok(beg);
+			if (_strnicmp("Gray2",beg,end-beg) == 0)
+				{
+				colorDepth|=KEmulGray2|KEmulIsBitMask;
+				}
+			else if (_strnicmp("Gray4",beg,end-beg) == 0)
+				{
+				colorDepth|=KEmulGray4|KEmulIsBitMask;
+				}
+			else if (_strnicmp("Gray16",beg,end-beg) == 0)
+				{
+				colorDepth|=KEmulGray16|KEmulIsBitMask;
+				}
+			else if (_strnicmp("Gray256",beg,end-beg) == 0)
+				{
+				colorDepth|=KEmulGray256|KEmulIsBitMask;
+				}
+			else if (_strnicmp("Color16",beg,end-beg) == 0)
+				{
+				colorDepth|=KEmulColor16|KEmulIsBitMask;
+				}
+			else if (_strnicmp("Color256",beg,end-beg) == 0)
+				{
+				colorDepth|=KEmulColor256|KEmulIsBitMask;
+				}
+			else if (_strnicmp("Color4K",beg,end-beg) == 0)
+				{
+				colorDepth|=KEmulColor4K|KEmulIsBitMask;
+				}
+			else if (_strnicmp("Color64K",beg,end-beg) == 0)
+				{
+				colorDepth|=KEmulColor64K|KEmulIsBitMask;
+				}
+			else if (_strnicmp("Color16M",beg,end-beg) == 0)
+				{
+				colorDepth|=KEmulColor16M|KEmulIsBitMask;
+				}
+			else
+				return KErrArgument;
+			}
+		iColorDepth = colorDepth;
+		
+		}
+	//multiple mode support is currently only for GCE. 
+	//I fill this array in before knowing if GCE will be instanced.
+	if (iColorDepth&KEmulIsBitMask)
+		{
+		//iModeDepths is only used by GCE
+		TInt colorDepth=MaskGceOnly(iColorDepth);
+		TInt setMode=0;
+		for (TInt i=1;i!=KEmulIsBitMask;i+=i)
+			if (colorDepth&i)
+				iModeDepths[setMode++]=BitsForSingleMode(i);
+		iMaxModes= setMode;	
+		iModeDepths[setMode++]=0;	//a bit width of 0 is illegal	
+		}
+	else
+		{
+		iModeDepths[0]=iColorDepth;
+		iMaxModes=1;
+		iModeDepths[1]=0;	//a bit width of 0 is illegal
+		}
+
+	wsprintfA(property, "Configuration[%d][%d]FasciaBitmap",aConf,aScreen);
+	const char* fascia = Property::GetString(property);
+	if (fascia)
+		{
+		TInt len = strlen(fascia);
+		//the path may have quotes at the start and end
+		//need to work out if this is an absolute or relative path
+		if (fascia[0] == '\"')
+			{
+			++fascia;
+			--len;
+			if (--len > 0 && fascia[len-1] == '\"')
+				--len;
+			}
+		char* p = iFasciaFileName;
+		if (fascia[0] != '\\' && (len < 3 || fascia[1] != ':'))
+			{
+			//relative path
+			strcpy(p, Property::GetString("EmulatorDataPath"));
+			p += strlen(p);
+			}
+		memcpy(p, fascia, len);
+		p[len] = '\0';
+		}
+	else
+		{
+		// default to machine name
+		strcpy(iFasciaFileName, Property::GetString("EmulatorDataPath"));
+		strcat(iFasciaFileName, Property::GetString("MachineName"));
+		strcat(iFasciaFileName, ".bmp");
+		}
+	return KErrNone;
+	}
+
+TViewport::TViewport() 
+	:iScreenProps(NULL),iViewportWidth(0), iViewportHeight(0), iViewportOffsetX(0), iViewportOffsetY(0)
+	{
+	}
+
+TViewport::TViewport(DScreenProperties* aScreenProps)
+	:iScreenProps(aScreenProps),iViewportWidth(0), iViewportHeight(0), iViewportOffsetX(0), iViewportOffsetY(0)
+	{	
+	}	
+TViewport::~TViewport()
+	{
+	}
+	
+
+/**
+Changes the logical position of the viewport within the input area
+of the emulator screen. The method may adjust the position so that
+the viewport stays within the input area.
+@param aPosition The new Y position of the top left hand corner of the viewport.
+@param aHwnd The window associated with the viewport
+*/
+void TViewport::ScrollToY(TInt aPosition, HWND aHwnd)
+	{
+
+	SCROLLINFO scrollinfo;
+	scrollinfo.cbSize=sizeof(scrollinfo);
+
+	//save for later
+	scrollinfo.fMask=SIF_POS;
+	GetScrollInfo(aHwnd, SB_VERT, &scrollinfo);
+	TInt oldY=scrollinfo.nPos;
+
+	if(aPosition<0)
+	{
+		scrollinfo.nPos = 0;
+	}
+	else if( (aPosition+GetViewportHeight())>GetMaxHeight())
+	{
+		scrollinfo.nPos = max(0,GetMaxHeight() - GetViewportHeight() );
+	}
+	else
+	{
+		scrollinfo.nPos=aPosition;
+	}
+
+	SetViewportOffsetY(scrollinfo.nPos);
+	scrollinfo.fMask=SIF_POS;
+	SetScrollInfo(aHwnd,SB_VERT, &scrollinfo, TRUE );
+	ScrollWindowEx(aHwnd, 0, oldY-scrollinfo.nPos, 0, 0, NULL, NULL, SW_INVALIDATE);
+	
+	UpdateChildPos(aHwnd);
+	}
+	
+/**
+As for ScrollToY but for the X direction
+*/
+void TViewport::ScrollToX(TInt aPosition, HWND aHwnd)
+	{
+	SCROLLINFO scrollinfo;
+	scrollinfo.cbSize=sizeof(scrollinfo);
+	
+	//save for later
+	scrollinfo.fMask=SIF_POS;
+	GetScrollInfo(aHwnd, SB_HORZ, &scrollinfo);
+	TInt oldX=scrollinfo.nPos;
+
+	if(aPosition<0)
+	{
+		scrollinfo.nPos = 0;
+	}
+	else if( (aPosition+GetViewportWidth())>GetMaxWidth())
+	{
+		scrollinfo.nPos = max(0,GetMaxWidth() - GetViewportWidth() );
+	}
+	else
+	{
+		scrollinfo.nPos=aPosition;
+	}
+
+	SetViewportOffsetX(scrollinfo.nPos);
+	scrollinfo.fMask=SIF_POS;
+	SetScrollInfo(aHwnd,SB_HORZ, &scrollinfo, TRUE );
+	ScrollWindowEx(aHwnd, oldX-scrollinfo.nPos, 0, 0, 0, NULL, NULL, SW_INVALIDATE);
+
+	UpdateChildPos(aHwnd);
+	}
+	
+//Forward declaration
+LOCAL_C TInt ScreenFromHWND(HWND aHwnd,HWND* pWin);
+
+/**
+Move the child window to it's correct position.
+
+@param aHwnd The HWND of the parent window
+*/
+void TViewport::UpdateChildPos(HWND aHwnd)
+	{
+	TInt screenNumber = ::ScreenFromHWND(aHwnd,TheWin);
+	HWND childWin = TheChildWin[screenNumber];
+
+	switch (iScreenProps->iScreenRotation)
+		{
+		case EEmulatorFlipRestore:
+			MoveWindow(
+				childWin,
+				iScreenProps->iScreenOffsetX - GetViewportOffsetX(),
+				iScreenProps->iScreenOffsetY - GetViewportOffsetY(),
+				iScreenProps->iScreenWidth,
+				iScreenProps->iScreenHeight,
+				TRUE
+				);
+			break;
+		case EEmulatorFlipInvert:
+			MoveWindow(
+				childWin,
+				iScreenProps->iXYInputWidth-(iScreenProps->iScreenOffsetX+iScreenProps->iScreenWidth) - GetViewportOffsetX(),
+				iScreenProps->iXYInputHeight-(iScreenProps->iScreenOffsetY+iScreenProps->iScreenHeight) - GetViewportOffsetY(),
+				iScreenProps->iScreenWidth,
+				iScreenProps->iScreenHeight,
+				TRUE
+				);
+			break;
+		case EEmulatorFlipLeft:
+			MoveWindow(
+				childWin,
+				iScreenProps->iScreenOffsetY - GetViewportOffsetX(),
+				iScreenProps->iXYInputWidth-(iScreenProps->iScreenOffsetX+iScreenProps->iScreenWidth)- GetViewportOffsetY(),
+				iScreenProps->iScreenHeight,
+				iScreenProps->iScreenWidth,
+				TRUE
+				);
+			break;
+		case EEmulatorFlipRight:
+			MoveWindow(
+				childWin,
+				iScreenProps->iXYInputHeight-(iScreenProps->iScreenOffsetY+iScreenProps->iScreenHeight) - GetViewportOffsetX(),
+				iScreenProps->iScreenOffsetX - GetViewportOffsetY(),
+				iScreenProps->iScreenHeight,
+				iScreenProps->iScreenWidth,
+				TRUE
+				);
+			break;
+		}
+
+	}
+	
+/**
+Update the range of the horizontal scrollbar,
+to take account of the current viewport width.
+
+@param aHwnd The window to be updated
+*/
+void TViewport::UpdateScrollBarH(HWND aHwnd)
+	{
+
+	SCROLLINFO scrollinfoHor;
+	scrollinfoHor.cbSize=sizeof(scrollinfoHor);
+	scrollinfoHor.fMask=SIF_RANGE|SIF_PAGE;
+	scrollinfoHor.nMin=0;
+	scrollinfoHor.nMax= GetMaxWidth()-1;
+	
+	
+	TInt newPage = GetViewportWidth() ;
+	TBool redraw=EFalse; //redraw window if a resize has caused a scrollbar to disappear and reveal image.
+	if ( newPage>= scrollinfoHor.nMax -GetSystemMetrics(SM_CXVSCROLL)
+		&& newPage < scrollinfoHor.nMax+1)
+		{
+		redraw=ETrue;
+		newPage=GetMaxWidth();
+
+		}
+	scrollinfoHor.nPage= newPage;
+
+	SetScrollInfo(aHwnd,SB_HORZ, &scrollinfoHor, TRUE );
+	if(redraw)
+		{
+		ScrollToX(0, aHwnd); //in case egde of fascia was against edge of vertical scrollbar
+		InvalidateRect(aHwnd, NULL, TRUE);
+		}
+	}
+	
+/**
+Update the range of the vertical scrollbar,
+to take account of the current viewport width.
+
+@param aHwnd The window to be updated
+*/	
+void TViewport::UpdateScrollBarV(HWND aHwnd)
+	{
+	SCROLLINFO scrollinfoVer;
+	scrollinfoVer.cbSize=sizeof(scrollinfoVer);
+	scrollinfoVer.fMask=SIF_RANGE|SIF_PAGE;
+	scrollinfoVer.nMin=0;
+	scrollinfoVer.nMax= GetMaxHeight()-1;
+	
+	TInt newPage = GetViewportHeight() ;
+	TBool redraw=EFalse; //redraw window if a resize has caused a scrollbar to disappear and reveal image.
+	if ( newPage>= scrollinfoVer.nMax -GetSystemMetrics(SM_CYHSCROLL)
+		&& newPage < scrollinfoVer.nMax+1)
+		{
+		redraw=ETrue;
+		newPage=GetMaxHeight();
+		}
+	scrollinfoVer.nPage= newPage;
+
+	SetScrollInfo(aHwnd,SB_VERT, &scrollinfoVer, TRUE );
+	if(redraw)
+		{
+		ScrollToY(0, aHwnd); //in case egde of fascia was against edge of vertical scrollbar
+		InvalidateRect(aHwnd, NULL, TRUE);
+		}
+	}
+
+/**
+Returns the max width for the viewport window (non-client area) so that it
+may be bounded. Takes account of scrollbar.
+
+@return Max width
+*/	
+TInt TViewport::GetMaxWindowWidth() const
+	{
+	
+	RECT rect = {0,0,0,0};
+	
+	switch(iScreenProps->iScreenRotation)
+		{
+		case EEmulatorFlipRestore:
+		case EEmulatorFlipInvert:
+			{
+			rect.right=iScreenProps->iXYInputWidth;
+			rect.bottom=iScreenProps->iXYInputHeight;
+			break;
+			}
+		case EEmulatorFlipLeft:
+		case EEmulatorFlipRight:
+			{
+			rect.right=iScreenProps->iXYInputHeight;
+			rect.bottom=iScreenProps->iXYInputWidth;
+			break;
+			}
+		}
+	AdjustWindowRect(//take account of window decorations
+		&rect,
+		KWinStyle,
+		FALSE
+		);
+	
+	
+	return (rect.right-rect.left);
+	}
+	
+/**
+Returns the max height for the viewport window (non-client area) so that it
+may be bounded. Takes account of scrollbar.
+
+@return Max height
+*/
+TInt TViewport::GetMaxWindowHeight() const
+	{
+	
+	RECT rect ={0,0,0,0};
+
+	switch(iScreenProps->iScreenRotation)
+		{
+		case EEmulatorFlipRestore:
+		case EEmulatorFlipInvert:
+			{
+			rect.right=iScreenProps->iXYInputWidth;
+			rect.bottom=iScreenProps->iXYInputHeight;
+			break;
+			}
+		case EEmulatorFlipLeft:
+		case EEmulatorFlipRight:
+			{
+			rect.right=iScreenProps->iXYInputHeight;
+			rect.bottom=iScreenProps->iXYInputWidth;
+			break;
+			}
+		}
+	AdjustWindowRect(//take account of window decorations
+		&rect,
+		KWinStyle,
+		FALSE
+		);
+	return (rect.bottom-rect.top);
+	}
+
+/**
+Returns the maximum width for the viewport (client area only).
+Allowing for the orientation of the emulator.
+
+@return Max width
+*/
+TInt TViewport::GetMaxWidth() const
+	{
+	TInt width=0;
+	switch(iScreenProps->iScreenRotation)
+		{
+		case EEmulatorFlipRestore:
+		case EEmulatorFlipInvert:
+			{
+			width = iScreenProps->iXYInputWidth;
+			break;
+			}
+		case EEmulatorFlipLeft:
+		case EEmulatorFlipRight:
+			{
+			width = iScreenProps->iXYInputHeight;
+			break;
+			}
+		}
+	
+	return width;
+	}
+
+/**
+Returns the maximum height for the viewport (client area only).
+Allowing for the orientation of the emulator.
+
+@return Max height
+*/
+TInt TViewport::GetMaxHeight() const
+	{
+	TInt height=0;
+	switch(iScreenProps->iScreenRotation)
+		{
+		case EEmulatorFlipRestore:
+		case EEmulatorFlipInvert:
+			{
+			height = iScreenProps->iXYInputHeight;
+			break;
+			}
+		case EEmulatorFlipLeft:
+		case EEmulatorFlipRight:
+			{
+			height =  iScreenProps->iXYInputWidth;
+			break;
+			}
+		}
+	
+	return height;
+	
+	}
+
+/**
+Sets the X offset of the viewport from the edge of the input area
+@param aOffset The X offset
+*/
+void TViewport::SetViewportOffsetX(TInt aOffset)
+	{
+	iViewportOffsetX = aOffset;
+	}
+
+/**
+Sets the Y offset of the viewport from the edge of the input area
+@param aOffset The Y offset
+*/
+void TViewport::SetViewportOffsetY(TInt aOffset)
+	{
+	iViewportOffsetY = aOffset;
+	}
+
+TInt TViewport::GetViewportOffsetX() const
+	{
+	return iViewportOffsetX;	
+	}
+TInt TViewport::GetViewportOffsetY() const
+	{
+	return iViewportOffsetY;
+	}
+	
+/**
+Sets the viewport width, this is equal to the width
+of the window's client area
+@param aWidth The width
+*/
+void TViewport::SetViewportWidth(TInt aWidth)
+	{
+	iViewportWidth=aWidth;
+	}
+
+/**
+Sets the viewport height, this is equal to the height
+of the window's client area
+@param aHeight The height
+*/
+void TViewport::SetViewportHeight(TInt aHeight)
+	{
+	iViewportHeight=aHeight;
+	}
+
+TInt TViewport::GetViewportWidth() const
+	{
+	return iViewportWidth;
+	}
+TInt TViewport::GetViewportHeight() const
+	{
+	return iViewportHeight;
+	}
+
+// the UI class
+
+DWinsUi::DWinsUi()
+	:iVirtualKeys(10),
+	iControlHotKeys(10)
+	{}
+
+/// Returns the current mode's depth. Remember current mode is never set!
+TUint DWinsUi::ColorDepth(TInt aScreenNumber)
+	{
+	TVideoInfoV01 info;
+	VideoInfo(aScreenNumber, info);
+	return info.iBitsPerPixel;
+	}
+
+TInt DWinsUi::SetFlip(TEmulatorFlip aFlip, TInt aScreenNumber)
+	{
+	if(TUint(aScreenNumber)>=TUint(systemIni->iScreens.Count()))
+		return KErrArgument;
+	int r1 = PostMessageA(TheChildWin[aScreenNumber],WM_FLIP_MESSAGE,(TUint)aFlip,NULL);
+	return r1 ? KErrNone : KErrGeneral;
+	}
+
+void DWinsUi::Info(TVariantInfoV01& aInfo)
+	{
+	aInfo.iLedCapabilities=0x3;
+	}
+
+HWND DWinsUi::HWnd()
+	{
+	return TheControlWin;
+	}
+
+TInt DWinsUi::SetupProperties(TInt aId)
+	
+//
+// load UI settings from the emulator properties
+//
+	{
+	//setup the screens
+	TInt screens = Property::GetInt("[screens]", 1);
+ 
+ 	for (TInt x = 0; x < screens; ++x)
+ 		{
+ 		DScreenProperties * pScr = new DScreenProperties();
+ 		if (!pScr)
+ 			return KErrNoMemory;
+ 		
+ 		TInt ret = pScr->SetupProperties(aId,x);
+ 		if (KErrNone == ret)
+ 			ret = iScreens.Append(pScr);
+ 
+ 		if (KErrNone != ret)
+ 			{
+ 			delete pScr;
+ 			return ret;
+ 			}
+ 		}
+//
+	char property[50];
+	wsprintfA(property, "Configuration[%d]LedSize",aId);
+	iLedSize = Property::GetInt(property, KLedSize);
+	wsprintfA(property, "Configuration[%d]LedArrangeVertically",aId);
+	iLedVertical = Property::GetBool(property, KLedVertical);
+	wsprintfA(property, "Configuration[%d]LedArrangeHorizontally",aId);
+	if (Property::GetBool(property))
+		iLedVertical = EFalse;
+	wsprintfA(property, "Configuration[%d]LedOffsetX",aId);
+	iLedOffsetX = Property::GetInt(property, KLedLeft);
+	wsprintfA(property, "Configuration[%d]LedOffsetY",aId);
+	iLedOffsetY = Property::GetInt(property, KLedTop);
+	wsprintfA(property, "Configuration[%d]LedGap",aId);
+	iLedGap = Property::GetInt(property, KLedGap);
+//
+	wsprintfA(property, "Configuration[%d]PointerType",aId);
+	const char* pointer = Property::GetString(property, "Pen");
+	if (_stricmp(pointer, "None") == 0)
+		{
+		iPointerType=_S8("NONE");
+		iXYInputType=EXYInputNone;
+		}
+	else if (_stricmp(pointer,"Pen") == 0)
+		{
+		iPointerType=_S8("PEN");
+		iXYInputType=EXYInputPointer;
+		}
+	else if (_stricmp(pointer,"Mouse") == 0)
+		{
+		iPointerType=_S8("MOUSE");
+		iXYInputType=EXYInputMouse;
+		}
+	else if (_stricmp(pointer,"Delta-Mouse") == 0)
+		{
+		iPointerType=_S8("MOUSE");
+		iXYInputType=EXYInputDeltaMouse;
+		}
+	else
+		return KErrArgument;
+//
+	wsprintfA(property, "Configuration[%d]DigitizerOffsetX",aId);
+	iDigitizerOffsetX = Property::GetInt(property, -iScreens[0]->iScreenOffsetX);
+	wsprintfA(property, "Configuration[%d]DigitizerOffsetY",aId);
+	iDigitizerOffsetY = Property::GetInt(property, -iScreens[0]->iScreenOffsetY);
+	wsprintfA(property, "Configuration[%d]DigitizerWidth",aId);
+	iDigitizerWidth = Property::GetInt(property,-1);
+	wsprintfA(property, "Configuration[%d]DigitizerHeight",aId);
+	iDigitizerHeight = Property::GetInt(property,-1);
+	wsprintfA(property, "Configuration[%d]DisableDigitizer",aId);
+	iDigitizerEnabled = !Property::GetBool(property);
+//	To enable the multitouch 
+	wsprintfA(property, "EnableMultiTouch");
+	iMultiTouchEnabled = Property::GetBool(property,EFalse);
+	wsprintfA(property, "SYMBIAN_BASE_USE_GCE");
+	iGCEEnabled = Property::GetBool(property,EFalse);
+	wsprintfA(property, "MultiTouchProximityStep");
+	iMultiTouchProximityStep = Property::GetInt(property,-1);
+	wsprintfA(property, "MultiTouchPressureStep");
+	iMultiTouchPressureStep = Property::GetInt(property,-1);
+//
+	strcpy(iSysIniFileName, Property::GetString("EmulatorDataPath"));
+	strcat(iSysIniFileName, "emulator\\");
+	if (!Emulator::CreateAllDirectories(iSysIniFileName))
+		return Emulator::LastError();
+	strcat(iSysIniFileName, Property::GetString("MachineName"));
+	strcat(iSysIniFileName, ".sys.ini");
+//
+	TInt r = iKeyboard.Init(aId);
+	if (r != KErrNone)
+		return r;
+
+	wsprintfA(property, "Configuration[%d]VirtualKey",aId);
+	r = MultiProperty(&DWinsUi::DoDefineVirtualKey, this, property);
+	if (r != KErrNone)
+		return r;
+//
+
+	wsprintfA(property, "Configuration[%d]NoVersionInfo",aId);
+	iDisplayVersionInfo = !Property::GetBool(property);
+	
+	wsprintfA(property, "Configuration[%d]WindowTitle",aId);
+	const char * p = Property::GetString(property);
+	if (p && (strlen(p) <= KMaxNameSize))
+		strcpy(iWindowTitle, p);
+	else
+		strcpy(iWindowTitle, DefaultWindowTitle);
+
+	if (iDisplayVersionInfo)
+		{
+		TInt wtLen = strlen(iWindowTitle);
+		TInt vtLen = strlen(VersionText);
+		if ((wtLen + vtLen) > KMaxNameSize)
+			iWindowTitle[KMaxNameSize-vtLen] = '\0';
+		strcat(iWindowTitle, VersionText);
+		}
+
+	wsprintfA(property, "Configuration[%d]OnActivation",aId);
+	pointer = Property::GetString(property);	
+	//example	OnActivation 270 EKeyScreenDimension1
+	//params are rotation(int) and key(string)
+	if (pointer)
+		{
+		char * next;
+	
+		//skip any white space
+		const char* beg = skipws(pointer);
+		
+		//get the number
+		long rotation = strtol(beg, &next, 0);
+		if (next == beg)
+			return KErrArgument;
+
+		switch (rotation)
+			{
+			case 0:
+				iScreens[0]->iScreenRotation = EEmulatorFlipRestore;
+				break;
+			case 90:
+				iScreens[0]->iScreenRotation = EEmulatorFlipRight;
+				break;
+			case 180:
+				iScreens[0]->iScreenRotation = EEmulatorFlipInvert;
+				break;
+			case 270:
+				iScreens[0]->iScreenRotation = EEmulatorFlipLeft;
+				break;
+			default:
+				r = KErrArgument;
+			}
+		if (r != KErrNone)
+			return r;
+		
+		beg = skipws(next);
+		
+		//beg should now point to the keycode
+		TInt key = iKeyboard.GetEPOCKeyCode(TPtrC8((const TUint8*)beg, strlen(beg)));
+		if (key == KErrNotFound)
+			return key;
+		iInitialFlipMsg = key;
+		}
+
+	//EmulatorControl messages are a bit like virtual keys
+	wsprintfA(property, "Configuration[%d]EmulatorControl",aId);
+	r = MultiProperty(&DWinsUi::DoDefineEmulatorControl, this, property);
+	if (r != KErrNone)
+		return r;
+
+	wsprintfA(property, "Configuration[%d]EmulatorControlHotKey",aId);
+	r = MultiProperty(&DWinsUi::DoDefineEmulatorControlHotKey, this, property);
+	if (r != KErrNone)
+		return r;
+	
+	return KErrNone;
+	}
+
+TInt DWinsUi::NumberOfScreens()
+	{
+	return iScreens.Count();
+	}
+
+/**
+Return the highest bit depth from an emulator mode mask.
+@param aModeMask	A bitwise combination of KEmul... display mode mask values.
+@return A color depth in bits per pixel.
+*/
+LOCAL_C TInt MaximumBitDepthFromMask(TInt aModeMask)
+	{
+	// Choose the highest bits per pixel based on the display mode mask.
+	if (aModeMask & KEmulColor16M)
+		{
+		return 24;
+		}
+	if (aModeMask & KEmulColor64K)
+		{
+		return 16;
+		}
+	if (aModeMask & KEmulColor4K)
+		{
+		return 12;
+		}
+
+	// Lower bit depths are not supported, so use the default
+	return 24;
+	}
+
+
+/**
+Return the TDisplayRotation corresponding to the given TEmulatorFlip.
+@param aFlip	A screen rotation as a TEmulatorFlip.
+@return The screen rotation as a TDisplayRotation.
+*/
+LOCAL_C RDisplayChannel::TDisplayRotation FlipToDisplayRotation(TEmulatorFlip aFlip)
+	{
+	switch (aFlip)
+		{
+		case EEmulatorFlipLeft:
+			return RDisplayChannel::ERotation90CW;
+		case EEmulatorFlipInvert:
+			return RDisplayChannel::ERotation180;
+		case EEmulatorFlipRight:
+			return RDisplayChannel::ERotation270CW;
+		}
+	return RDisplayChannel::ERotationNormal;
+	}
+
+
+TInt DWinsUi::SetDisplayChannel(TInt aScreenNumber, DDisplayChannel* aDisplay)
+	{
+	return systemIni->SetDisplayChannelImpl(aScreenNumber,aDisplay);
+	}
+
+
+TInt DWinsUi::SetDisplayChannelImpl(TInt aScreenNumber, DDisplayChannel* aDisplay)
+	{
+	if (TUint(aScreenNumber) >= TUint(NumberOfScreens()))
+		{
+		// Screen number is either negative or too big.
+		return KErrArgument;
+		}
+
+	TInt r = KErrNone;
+	HWND hWnd = TheChildWin[aScreenNumber];
+	TBufferSet& buffer = masterIni->iBufferSet[aScreenNumber];
+	
+	if (aDisplay)
+		{
+		// Display driver connecting
+		DScreenProperties* screen = iScreens[aScreenNumber];
+		RDisplayChannel::TDisplayInfo info;
+
+		TInt pixelBytes = 2;
+		info.iBitsPerPixel = MaximumBitDepthFromMask(screen->iColorDepth);
+
+		switch (info.iBitsPerPixel)
+			{
+			case 12:	// XRGB4444
+				info.iPixelFormat = EUidPixelFormatXRGB_4444;
+				break;
+			case 16:	// RGB565
+				info.iPixelFormat = EUidPixelFormatRGB_565;
+				break;
+			default:
+				// Force anything else to packed RGB888
+				pixelBytes = 4;
+				info.iBitsPerPixel = 24;
+				info.iPixelFormat = EUidPixelFormatXRGB_8888;
+				break;
+			}
+
+		TInt width = screen->iMaxScreenWidth;
+		TInt height = screen->iMaxScreenHeight;
+
+		info.iRefreshRateHz = screen->iRefreshRateHz;
+		info.iAvailableRotations = RDisplayChannel::ERotationNormal | RDisplayChannel::ERotation90CW |
+									RDisplayChannel::ERotation180 | RDisplayChannel::ERotation270CW;
+		info.iNormal.iWidth = width;
+		info.iNormal.iHeight = height;
+		// Windows requires rounding up to 4-bytes words
+		info.iNormal.iOffsetBetweenLines = _ALIGN_UP(width * pixelBytes, 4);
+		info.iFlipped.iWidth = height;
+		info.iFlipped.iHeight = width;
+		// Windows requires rounding up to 4-bytes words
+		info.iFlipped.iOffsetBetweenLines = _ALIGN_UP(height * pixelBytes, 4);
+	
+		TInt maxSize=0;	 
+		//ensure legacy buffer is large enough for all supported modes.
+		//It would be a very strange setup for the max size to not be the max bpp,
+		//but we don't know which mode is max bpp anyway!
+		TVideoInfoV01 videoInfo;
+		for (TInt mode=0,maxMode=screen->iMaxModes;mode<maxMode;mode++)
+			{
+			if (systemIni->VideoInfoForDisplayDriver(aScreenNumber,mode, videoInfo))	//can't actually fail currently
+				{
+				TInt dwSize=videoInfo.iOffsetToFirstPixel+videoInfo.iOffsetBetweenLines*videoInfo.iSizeInPixels.iHeight;
+				if (dwSize>maxSize)
+					maxSize=dwSize;
+				}
+			else
+				{
+				Fault(EGuiVideoInfoUnavailable);
+				}
+			//rotated mode may use more RAM?? Height may be >Width or may not be a multiple of stride quantum
+			if (systemIni->VideoInfoForDisplayDriver(aScreenNumber,mode|KModeFlagFlipped, videoInfo))	//can't actually fail currently
+				{
+				TInt dwSize=videoInfo.iOffsetToFirstPixel+videoInfo.iOffsetBetweenLines*videoInfo.iSizeInPixels.iWidth;
+				if (dwSize>maxSize)
+					{
+					maxSize=dwSize;
+					}
+				}
+			else
+				{
+				Fault(EGuiVideoInfoUnavailable);
+				}
+			}
+
+		masterIni->iMaxSizeInBytes = maxSize;
+		if (__e32_atomic_add_ord32(&buffer.iDisplayDriverCount, 1) == 0)
+			{
+			// First driver to connect, allocate frame buffers.
+			// +1 frame buffer is ui legacy buffer at [0], so does need to take account of stride and offset
+			r = masterIni->AllocateFrameBuffers(aScreenNumber, screen->iCompositionBuffers + 1, maxSize);
+			}
+
+		if (r == KErrNone)
+			{
+			buffer.iScreenBuffer.iDisplayBufferOffset = 0;
+			masterIni->iBufferSet[aScreenNumber].iDisplayChannel = aDisplay;
+			masterIni->InitBitmapHeader(*screen, &buffer.iInfo);
+			masterIni->InitBufferFormat(*screen, buffer.iBufferFormat);
+			if(systemIni->VideoInfoForDisplayDriver(aScreenNumber,screen->iCurrentMode, videoInfo, ETrue))
+				{
+					r = aDisplay->Initialize(info,
+											 FlipToDisplayRotation(screen->iScreenRotation),
+											 hWnd, buffer.iScreenBuffer.iFrameBuffers,
+											 buffer.iScreenBuffer.iMemChunks,
+											 buffer.iDsaBuffer,
+						                     videoInfo.iSizeInPixels,videoInfo.iSizeInTwips,
+						                     masterIni->iSupportedPixelFormatTable,
+						                     masterIni->iSupportedPixelFormatTableSize,
+						                     buffer.iBufferFormat);
+				}
+			else
+				{
+				Fault(EGuiVideoInfoUnavailable);
+				}
+			}
+
+		if (r != KErrNone && __e32_atomic_tas_ord32(&buffer.iDisplayDriverCount, 1, -1, 0) == 1)
+			{
+			// Release any that were allocated
+			masterIni->ReleaseFrameBuffers(aScreenNumber);
+			}
+		}
+	else
+		{
+		// Display driver disconnected
+		if (__e32_atomic_tas_ord32(&buffer.iDisplayDriverCount, 1, -1, 0) == 1)
+			{
+			// All drivers disconnected, deallocate memory.
+			masterIni->ReleaseFrameBuffers(aScreenNumber);
+			}
+		}
+
+	return r;
+	}
+
+
+void DWinsUi::SetVirtualKey(const TBool aProcessing, const TInt aCommandData, const TEmulCommand aCommand)
+	{
+	iProcessingVirtualKey = aProcessing;
+	iFakedVirtualKey = aCommandData;
+	iVirtualKeyCommand = aCommand;
+	}
+
+TBool DWinsUi::WasVirtualKey(TInt& aCommandData, TEmulCommand& aCommand)
+	{
+	if (iProcessingVirtualKey)
+		{
+
+		aCommandData = iFakedVirtualKey;
+		aCommand = iVirtualKeyCommand;
+		}
+	return iProcessingVirtualKey;
+	}
+
+
+TInt DWinsUi::DoDefineEmulatorControl(TAny* aPtr, const char* aValue)
+	{
+	return static_cast<DWinsUi*>(aPtr)->DefineEmulatorControl(aValue);
+	}
+
+
+TInt DWinsUi::DefineEmulatorControl(const char* aValue)
+	{
+
+	//example EmulatorControl SelectConfig 2 rect 223,640 29,22
+	//example EmulatorControl NextConfig rect 223,640 29,22
+	const char* beg = skipws(aValue);
+	const char* end = skiptok(beg);
+	TInt err = KErrNone;
+	
+	TEmulCommand command = ENoCommand;
+	TInt data = 0;
+	if (_strnicmp(beg, "SelectConfig", end-beg) == 0)
+		{
+		//get the int param which is the config to switch to
+		beg = end;
+		char * e;
+		data = strtol(beg, &e,0);
+		if (beg == e)
+			err = KErrArgument;
+		end = e;
+		command = ESelectConfig;
+		}
+	else if(_strnicmp(beg, "NextConfig", end-beg) == 0)
+
+		{
+		command = ENextConfig;
+		}
+	else
+		err = KErrArgument;
+
+	if (err != KErrNone)
+		return err;
+	
+	//get the shape
+	beg = skipws(end);
+	end = skiptok(beg);
+	if (end - beg != 4 || _strnicmp(beg, "rect", 4) != 0)
+		return KErrArgument;
+		
+	// get the parameters
+	beg = skipws(end);
+	char* end2;
+	TInt x = strtol(beg, &end2, 10);
+	if (beg == end2 || *end2++ != ',')
+		return KErrArgument;
+	beg = end2;
+	TInt y = strtol(beg, &end2, 10);
+	if (beg == end2)
+		return KErrArgument;
+	beg = skipws(end2);
+	TInt w = strtol(beg, &end2, 10);
+	if (beg == end2 || *end2++ != ',')
+		return KErrArgument;
+	beg = end2;
+	TInt h = strtol(beg, &end2, 10);
+	if (beg == end2)
+		return KErrArgument;
+	
+	VKRect* pRect = new VKRect(data, command, x, y, w, h);
+	if (!pRect)
+		return KErrNoMemory;
+	return iVirtualKeys.Append(pRect);
+
+	}
+
+
+TInt DWinsUi::DoDefineVirtualKey(TAny* aPtr, const char* aValue)
+	{
+	return static_cast<DWinsUi*>(aPtr)->DefineVirtualKey(aValue);
+	}
+
+TInt DWinsUi::DefineVirtualKey(const char* aValue)
+	{
+	// Get the key to map
+	const char* beg = skipws(aValue);
+	const char* end = skiptok(beg);
+	TInt key = iKeyboard.GetEPOCKeyCode(TPtrC8((const TUint8*)beg, end-beg));
+	if (key == KErrNotFound)
+		return key;
+
+	//get the shape
+	beg = skipws(end);
+	end = skiptok(beg);
+	if (end - beg != 4 || _strnicmp(beg, "rect", 4) != 0)
+		return KErrArgument;
+		
+	// get the parameters
+	beg = skipws(end);
+	char* end2;
+	TInt x = strtol(beg, &end2, 10);
+	if (beg == end2 || *end2++ != ',')
+		return KErrArgument;
+	beg = end2;
+	TInt y = strtol(beg, &end2, 10);
+	if (beg == end2)
+		return KErrArgument;
+	beg = skipws(end2);
+	TInt w = strtol(beg, &end2, 10);
+	if (beg == end2 || *end2++ != ',')
+		return KErrArgument;
+	beg = end2;
+	TInt h = strtol(beg, &end2, 10);
+	if (beg == end2)
+		return KErrArgument;
+	
+	VKRect* pRect = new VKRect(key, EKey, x, y, w, h);
+	if (!pRect)
+		return KErrNoMemory;
+	return iVirtualKeys.Append(pRect);
+	}
+
+
+LOCAL_C TInt readBitmapInfo(PBITMAPINFOHEADER aHeader, const char* aFileName)
+	{
+	PBITMAPFILEHEADER pbmfh=NULL;
+	PBITMAPINFOHEADER pbmih=NULL;
+	TInt bfOffBits;
+
+	HANDLE fh=CreateFileA(aFileName,GENERIC_READ,NULL,NULL,OPEN_EXISTING,NULL,NULL);
+	if (!fh || fh==INVALID_HANDLE_VALUE)
+		return KErrNotFound;
+
+	TInt r=KErrNone;
+
+	// read in the bitmap file header.  save the offset to bits.
+	pbmfh = (PBITMAPFILEHEADER)LocalAlloc(LPTR, sizeof(BITMAPFILEHEADER));
+	if (pbmfh==NULL)
+		{
+		r=KErrNotFound;
+        goto exit;
+		}
+	DWORD bytesRead;
+	ReadFile(fh, (LPVOID)pbmfh, sizeof(BITMAPFILEHEADER), &bytesRead, NULL);
+	bfOffBits=pbmfh->bfOffBits;
+
+	// read in the bitmap info header and the color table right after it.
+	pbmih = (PBITMAPINFOHEADER)LocalAlloc(LPTR, bfOffBits- sizeof(BITMAPFILEHEADER));
+	if (pbmih==NULL)
+		{
+		r=KErrNotFound;
+        goto exit;
+		}
+	ReadFile(fh, (LPVOID)pbmih, bfOffBits-sizeof(BITMAPFILEHEADER),&bytesRead,NULL);
+	*aHeader=*pbmih;
+exit:
+	LocalFree(LocalHandle ((LPSTR)pbmih));
+	LocalFree(LocalHandle ((LPSTR)pbmfh));
+	CloseHandle(fh);
+	return r;
+	}
+
+HBITMAP readBitmap(HDC aHdc, const char* aFileName)
+//
+// reads a BMP file from disk and returns a HBITMAP
+//
+	{
+	HBITMAP hbm=NULL;
+	PBITMAPFILEHEADER pbmfh=NULL;
+	PBITMAPINFOHEADER pbmih=NULL;
+	TUint8 *pBits=NULL;
+	TInt bfOffBits;
+	TInt nbytes;
+
+	HANDLE fh=CreateFileA(aFileName, GENERIC_READ, NULL, NULL, OPEN_EXISTING, NULL, NULL);
+	if (!fh || fh==INVALID_HANDLE_VALUE)
+		return NULL;
+
+	nbytes=GetFileSize((HANDLE)fh, NULL);
+	// read in the bitmap file header.  save the offset to bits.
+	pbmfh = (PBITMAPFILEHEADER)LocalAlloc(LPTR, sizeof(BITMAPFILEHEADER));
+	if (pbmfh==NULL)
+        goto exit;
+	DWORD bytesRead;
+	ReadFile(fh, (LPVOID)pbmfh, sizeof(BITMAPFILEHEADER),&bytesRead,NULL);
+	bfOffBits=pbmfh->bfOffBits;
+
+	// read in the bitmap info header and the color table right after it.
+	pbmih = (PBITMAPINFOHEADER)LocalAlloc(LPTR, bfOffBits- sizeof(BITMAPFILEHEADER));
+	if (pbmih==NULL)
+        goto exit;
+	ReadFile(fh, (LPVOID)pbmih, bfOffBits-sizeof(BITMAPFILEHEADER),&bytesRead,NULL);
+
+	// finally read in the bit data.
+	pBits = (PBYTE)LocalAlloc (LPTR, (nbytes - bfOffBits));
+	if (pBits==NULL)
+        goto exit;
+	ReadFile(fh, (LPVOID)pBits, nbytes-bfOffBits,&bytesRead,NULL);
+		
+	hbm=CreateDIBitmap(aHdc, pbmih, CBM_INIT, pBits,(PBITMAPINFO) pbmih, DIB_RGB_COLORS);
+exit:
+	LocalFree(LocalHandle ((LPSTR)pBits));
+	LocalFree(LocalHandle ((LPSTR)pbmih));
+	LocalFree(LocalHandle ((LPSTR)pbmfh));
+	CloseHandle(fh);
+	return hbm;
+	}
+
+void LoadFasciaBitmap(TInt aScreen)
+	{
+	HDC hdc=GetDC(TheWin[aScreen]);
+	RECT windowRect = {0};
+	windowRect.right=systemIni->iScreens[aScreen]->iXYInputWidth;
+	windowRect.bottom=systemIni->iScreens[aScreen]->iXYInputHeight;
+	HBITMAP screenBitmap=readBitmap(hdc, systemIni->iScreens[aScreen]->iFasciaFileName);
+	if (screenBitmap==NULL)
+		{
+		screenBitmap=CreateCompatibleBitmap(hdc, windowRect.right-windowRect.left, windowRect.bottom-windowRect.top);
+		HDC hdcMem=CreateCompatibleDC(hdc);
+		SelectObject(hdcMem, screenBitmap);
+		PatBlt(hdcMem, 0, 0, windowRect.right-windowRect.left, windowRect.bottom-windowRect.top, BLACKNESS);
+		DeleteDC(hdcMem);
+		}
+	__ASSERT_ALWAYS(screenBitmap!=NULL,Fault(EGuiCreateBitmap));
+	TheScreenBitmap[aScreen]=screenBitmap;
+
+	DrawLeds();
+
+	ReleaseDC(TheWin[aScreen], hdc);
+	}
+TBool DWinsUi::MultiTouchEnabled() const
+	{
+	return iMultiTouchEnabled;
+	}
+
+TBool DWinsUi::GCEEnabled() const
+	{
+	return iGCEEnabled;
+	}
+
+TInt DWinsUi::MultiTouchProximityStep() const
+	{
+	return iMultiTouchProximityStep;
+	}
+
+TInt DWinsUi::MultiTouchPressureStep() const
+	{
+	return iMultiTouchPressureStep;
+	}
+
+TBool DWinsUi::OnDigitizer(TInt aX, TInt aY) const
+	{
+	if (!iDigitizerEnabled)
+		return EFalse;
+	switch(CurrentFlipState[0])
+		{
+		case EEmulatorFlipRestore:
+			{
+			aX -= iDigitizerOffsetX;
+			aY -= iDigitizerOffsetY;
+			break;
+			}
+		case EEmulatorFlipInvert:
+			{
+			aX -= systemIni->iScreens[0]->iScreenWidth - iDigitizerOffsetX - iDigitizerWidth;
+			aY -= systemIni->iScreens[0]->iScreenHeight - iDigitizerOffsetY - iDigitizerHeight;
+			break;
+			}
+		case EEmulatorFlipRight:
+			{
+			TInt oldY = aY;
+			aY = aX - (systemIni->iScreens[0]->iScreenHeight - iDigitizerOffsetY - iDigitizerHeight);
+			aX = oldY - iDigitizerOffsetX;
+			break;
+			}
+		case EEmulatorFlipLeft:
+			{
+			TInt oldY = aY;
+			aY = aX - iDigitizerOffsetY;
+			aX = oldY - (systemIni->iScreens[0]->iScreenWidth - iDigitizerOffsetX - iDigitizerWidth);
+			break;
+			}
+		}
+	return (TUint(aX) < TUint(iDigitizerWidth) && TUint(aY) < TUint(iDigitizerHeight));
+	}
+
+LOCAL_C void addMouseEvent(TRawEvent::TType aType,TInt aXpos,TInt aYpos)
+//
+// Add a mouse event.
+//
+	{
+	if (systemIni->OnDigitizer(aXpos, aYpos))
+		{
+		TRawEvent v;
+		v.Set(aType,aXpos,aYpos);
+		TheEventQ.Add(v);
+		}
+	}
+
+LOCAL_C void addMouseEvent(TRawEvent::TType aType,TInt aXpos,TInt aYpos,TInt aZpos, TInt aPointerId=0)
+//
+// Add a multitouch mouse event.
+//
+	{
+	if (systemIni->OnDigitizer(aXpos, aYpos))
+		{
+		TRawEvent v;
+		v.Set(aType,aXpos,aYpos, aZpos);
+		v.SetPointerNumber(static_cast<const TUint8>(aPointerId));
+		TheEventQ.Add(v);
+		}
+	}
+LOCAL_C void addKeyEvent(TRawEvent::TType aType,TInt aKey)
+	{
+	TRawEvent v;
+	v.Set(aType, aKey);
+	TheEventQ.Add(v);
+	}
+
+
+LOCAL_C void SwitchConfiguration(TInt aData, TBool aSendFlipKey = ETrue)
+	{
+	if (aData < 0 || aData >= masterIni->iSystemInis.Count())
+		return;
+
+	CurrentConfiguration = aData;
+	systemIni = masterIni->iSystemInis[aData];
+	
+	//get the correct fascia bitmaps
+	TInt screens=systemIni->iScreens.Count();
+	TInt i;
+	TUint disabledWinType=ENormalResolution;
+	for(i=0;i<screens;i++)
+		{
+		DeleteObject(TheScreenBitmap[i]);
+		LoadFasciaBitmap(i);
+		if (masterIni->iBufferSet[i].iDisplayState!=ENormalResolution)
+			{
+			disabledWinType=masterIni->iBufferSet[i].iDisplayState;
+			}
+		}
+	
+	//update the window title
+	if (disabledWinType!=ENormalResolution && disabledWinType < 4)	//hardwired 4 because the code below is hardwired
+		{	//string may be multi-part indexed by disable type, or it may not
+		CHAR* firstsemi=strchr(systemIni->iWindowTitle,';');
+		CHAR* secondsemi=NULL;
+		if (firstsemi)
+			{
+			secondsemi=strchr(firstsemi+1,';');
+			}
+		if (firstsemi&&secondsemi)
+			{
+			*firstsemi='\0';
+			*secondsemi='\0';
+			char* ptr[4]={0,systemIni->iWindowTitle,firstsemi+1,secondsemi+1};
+			SetWindowTextA(TheControlWin, ptr[disabledWinType]);
+			*firstsemi=';';
+			*secondsemi=';';
+			}
+		else
+			{
+			SetWindowTextA(TheControlWin, systemIni->iWindowTitle);
+			}
+		
+		}
+	else
+		{
+		SetWindowTextA(TheControlWin, systemIni->iWindowTitle);
+		}
+	//resize and repaint the current window anyway.
+	//the text window server doesn't respond to orientation messages
+	for(i=0;i<screens;i++)
+		{
+		InvalidateRect(TheWin[i], NULL, false);
+		SendMessage(TheWin[i], WM_FLIP_MESSAGE, systemIni->iScreens[i]->iScreenRotation,0);
+		}
+
+	//pass on the orientation key to the windows server
+	if (aSendFlipKey)
+		{
+		if (!WinsGuiPowerHandler->iStandby)
+			{
+			addKeyEvent(TRawEvent::EKeyDown, systemIni->iInitialFlipMsg);
+			addKeyEvent(TRawEvent::EKeyUp, systemIni->iInitialFlipMsg);
+			}
+		else
+			{
+			//remember the flip message so we can send it to the window server when we come out of standby
+			SavedFlipMessage = systemIni->iInitialFlipMsg;
+			}
+		}
+	}
+/**
+Sets the specified screen to the given width and height, if available.
+
+The configurations are searched to find a match, taking the display state into
+account. If no configuration is available, the request is ignored.
+
+@param aScreenNumber	the screen index
+@param aWidth 			the desired width
+@param aHeight			the desired height
+**/
+void DMasterIni::SetDisplaySize(TInt aDisplayNumber, TInt aWidth, TInt aHeight)
+	{
+	TInt displayCount = iBufferSet.Count();
+
+	if (aDisplayNumber < 0 || aDisplayNumber >= displayCount)
+		{
+		// Invalid screen number, discard.
+		return;
+		}
+
+	if (iBufferSet[aDisplayNumber].iDisplayState != ENormalResolution)
+		{
+		// No (non-zero) resolutions available, discard.
+		return;
+		}
+
+	TInt count = iSystemInis.Count();
+	TInt index;
+	for (index = 0; index < count; index++)
+		{
+		DWinsUi* newIni = masterIni->iSystemInis[index];
+		DScreenProperties* newProps = newIni->iScreens[aDisplayNumber];
+
+		if (newProps->iScreenWidth == aWidth && newProps->iScreenHeight == aHeight)
+			{
+			// Found a potential match. Check other screens match their current size.
+			if (newIni == systemIni)
+				{
+				// Current configuration, already in use. Nothing to do.
+				break;
+				}
+			
+			TInt display;
+			for (display = 0; display < displayCount; display++)
+				{
+				if (display == aDisplayNumber)
+					{
+					// No need to check the display we are changing
+					continue;
+					}
+
+				DScreenProperties* currentPropsN = systemIni->iScreens[display];
+				DScreenProperties* newPropsN = newIni->iScreens[display];
+				
+				if (newPropsN->iScreenWidth != currentPropsN->iScreenWidth ||
+						newPropsN->iScreenHeight != currentPropsN->iScreenHeight)
+					{
+					// Resolution mismatch, try next configuration.
+					break;
+					}
+				}
+			
+			if (display == displayCount)
+				{
+				// Match found, switch to this configuration and stop. Force
+				// rotation to the same as the current rotation.
+				newProps->iScreenRotation = systemIni->iScreens[aDisplayNumber]->iScreenRotation;
+				SwitchConfiguration(index);
+				break;
+				}
+			}
+		}
+	}
+
+
+void DMasterIni::SetBufferFormat(TInt aDisplayNumber, TUint aAggregateSize, RDisplayChannel::TPixelFormat aPixelFormat)
+	{
+	TInt displayCount = iBufferSet.Count();
+
+	if (aDisplayNumber < 0 || aDisplayNumber >= displayCount)
+		{
+		// Invalid screen number, discard.
+		return;
+		}
+	
+	LPBITMAPV4HEADER info = &iBufferSet[aDisplayNumber].iInfo;
+	
+	// update the bitmap header taking in consideration the new pixel format
+	switch (aPixelFormat)
+		{
+		case EUidPixelFormatXRGB_4444:
+		case EUidPixelFormatARGB_4444:
+			info->bV4BitCount=16;
+			info->bV4V4Compression = BI_BITFIELDS;
+			info->bV4RedMask   = 0x0F00;
+			info->bV4GreenMask = 0x00F0;
+			info->bV4BlueMask  = 0x000F;
+			break;
+		case EUidPixelFormatRGB_565:
+			info->bV4BitCount=16;
+			info->bV4V4Compression = BI_BITFIELDS;
+			info->bV4RedMask   = 0xF800;
+			info->bV4GreenMask = 0x07E0;
+			info->bV4BlueMask  = 0x001F;
+			break;
+		case EUidPixelFormatXRGB_8888:	// Really 32bpp, but top 8 unused
+		case EUidPixelFormatARGB_8888:
+		case EUidPixelFormatARGB_8888_PRE:
+			info->bV4BitCount=32;
+			info->bV4V4Compression = BI_RGB;
+			// Mask is implicit for BI_RGB compression
+			break;
+		default:
+			// We got an error, it seems. Let's ignore the message
+			return;
+		}
+	iBufferSet[aDisplayNumber].iBufferFormat.iPixelFormat = aPixelFormat;
+	
+	// taking advantage of limiting the width and size to KMaxTInt16
+	TInt width = aAggregateSize & 0x0000ffff;
+	TInt height = (aAggregateSize >> 16) & 0x0000ffff;
+
+	// let's deal with the new size just received
+	iBufferSet[aDisplayNumber].iBufferFormat.iSize.iWidth = width;
+	iBufferSet[aDisplayNumber].iBufferFormat.iSize.iHeight = height;
+	
+	// update the bitmap header, taking in consideration the rotation
+	switch (CurrentFlipState[aDisplayNumber])
+		{
+		case EEmulatorFlipRestore:
+		case EEmulatorFlipInvert:
+			info->bV4Width = width;
+			info->bV4Height = -height;
+			break;
+		case EEmulatorFlipLeft:
+		case EEmulatorFlipRight:
+			info->bV4Width = height;
+			info->bV4Height = -width;
+			break;
+		}
+	// finally, update the image size
+	SetImageSize(aDisplayNumber);
+	}
+
+void DMasterIni::SetImageSize(TInt aScreenNumber)
+	{
+	TInt displayCount = iBufferSet.Count();
+
+	if (aScreenNumber >= 0 && aScreenNumber < displayCount)
+		{
+		LPBITMAPV4HEADER info = &iBufferSet[aScreenNumber].iInfo;
+		TInt bpp = _ALIGN_UP(info->bV4BitCount, 16); //12 & 16 --> 16 ; 24 & 32 --> 32
+		TInt widthInBpp = info->bV4Width * bpp;
+		//rounding to 32 bits (4 octets) and converting, then, bits to octets;
+		TInt scanLineInBytes = _ALIGN_UP(widthInBpp, 32) >> 3;
+		// info->bV4Height is negative or zero
+		info->bV4SizeImage = -info->bV4Height * scanLineInBytes;
+		}
+	}
+
+LOCAL_C void NextConfiguration()
+	{
+	TInt config = CurrentConfiguration;
+	if (++config == masterIni->iSystemInis.Count())
+		config = 0;
+	SwitchConfiguration(config);
+	}
+
+
+
+LOCAL_C TBool ProcessedByEmulatorKey(TInt aScanCode, HWND hWnd,TUint message,TUint wParam,TUint lParam)
+	{
+
+	TBool rVal = EFalse;
+	rVal = ETrue;
+	for (TInt i=0;i<systemIni->iControlHotKeys.Count();i++)//check key combinations
+		{
+		if (systemIni->iControlHotKeys[i]->CheckCombinationPressed()) 
+			{				
+			switch (systemIni->iControlHotKeys[i]->iCommand)
+				{
+				
+				case ENextConfig:
+					NextConfiguration();
+					break;
+		
+				case ESelectConfig:
+					SwitchConfiguration(systemIni->iControlHotKeys[i]->iData);
+					break;
+							
+				}
+			return ETrue;
+			}
+		}
+	switch (aScanCode)
+	{
+	
+	case EStdKeyF4:
+		{
+		// Simulate a change of media card
+		TInt irq = NKern::DisableAllInterrupts();
+		if (*Wins::MediaDoorOpenPtr())
+			{
+			*Wins::CurrentPBusDevicePtr() += 1;
+			if (*Wins::CurrentPBusDevicePtr() == 2)
+				{
+				*Wins::CurrentPBusDevicePtr() = -1;
+				}
+			}
+		NKern::RestoreInterrupts(irq);
+		
+		// pass on to the windows system so that if
+		// Alt-F4 is pressed the window will close
+		if (hWnd)
+			DefWindowProcA(hWnd,message,wParam,lParam);
+		break;
+		}
+
+	default:
+		rVal = EFalse;
+		break;
+	}
+	return rVal;
+	}
+
+LOCAL_C void MultiChildWndPointer(TUint aMessage,TInt aXpos,TInt aYpos, TInt aZ, TInt aPointerId)
+//
+// Handle a multi-touch pointer event in the Symbian OS screen window 
+//
+	{
+	TRawEvent::TType eventType=TRawEvent::ENone;
+	CHAR buf[50];
+	
+	if (aZ <= TheMultiTouch->iZMaxRange) //negative
+		{
+		eventType = TRawEvent::EPointer3DOutOfRange;
+		wsprintf((LPTSTR)buf, (LPCTSTR)TEXT("Out Of Range"));
+		SendMessage(hwndStatus, SB_SETTEXT, aPointerId , (LPARAM)(buf));					
+		}
+	else 
+		{
+		wsprintf((LPTSTR)buf, (LPCTSTR)TEXT("%d: %d,%d,%d"), aPointerId, aXpos,aYpos,aZ);
+		SendMessage(hwndStatus, SB_SETTEXT, aPointerId , (LPARAM)(buf));					
+		switch (aMessage)
+	    	{
+			case WM_MOUSEMOVE:
+				{
+				eventType=TRawEvent::EPointerMove;
+				break;
+				}
+			case WM_LBUTTONDOWN:
+				{
+				SetCapture(TheChildWin[0]);
+				eventType = TRawEvent::EButton1Down;
+				}
+				break;
+			case WM_LBUTTONUP:
+				{
+				ReleaseCapture();
+				eventType = TRawEvent::EButton1Up;
+				break;
+				}
+			case WM_RBUTTONDOWN:
+				{
+				eventType = TRawEvent::EButton3Down;
+				break;
+				}
+			case WM_RBUTTONUP:
+				{
+				eventType = TRawEvent::EButton3Up;
+				break;
+				}
+			case WM_MOUSEWHEEL:
+				{
+				eventType = TRawEvent::EPointerMove;
+				break;
+				}
+			default:
+				return;
+			}
+		}
+
+	if (!WinsGuiPowerHandler->iStandby)
+		{
+		addMouseEvent(eventType, aXpos, aYpos, aZ, aPointerId);
+		}
+	}
+
+LOCAL_C void ChildWndPointer(TUint message,TInt aXpos,TInt aYpos)
+//
+// Handle a pointer event in the Symbian OS screen window
+//
+	{
+	// Enable the multitouch if the cursor is inside the main client window
+	if (DMultiTouch::iMultiTouchCreated)
+		{
+		RECT client;
+		WINDOWINFO info;
+		GetWindowInfo(TheChildWin[0], &info);
+		POINT pt = {aXpos+(TInt)info.rcClient.left, aYpos+(TInt)info.rcClient.top};
+		if (GetWindowRect(TheChildWin[0], &client) &&
+				(PtInRect(&client,pt)!=NULL) && !DMultiTouch::iMultiTouchTempEnabled)	// within the window
+			{
+			if (systemIni->MultiTouchEnabled() && systemIni->GCEEnabled())
+				{
+				if(TheMultiTouch->Register())	// Register successfully
+					{
+					DMultiTouch::iMultiTouchTempEnabled = TRUE;
+					//Show the status bars at the bottom of the emulator
+					SetWindowPos(hwndStatus,0,0,0,0,0,SWP_SHOWWINDOW);
+					SetFocus(TheWin[0]);
+					SetCursor(LoadCursorA(NULL,MAKEINTRESOURCEA(32512)));
+					}
+				}
+			}
+		}
+	TRawEvent::TType eventType=TRawEvent::ENone;
+	switch (message)
+    	{
+	case WM_MOUSEMOVE:
+		eventType=TRawEvent::EPointerMove;
+		break;
+	case WM_LBUTTONDOWN:
+		{
+		SetCapture(TheChildWin[0]);
+		eventType=TRawEvent::EButton1Down;
+		}
+		break;
+	case WM_LBUTTONUP:
+		ReleaseCapture();
+		eventType=TRawEvent::EButton1Up;
+		break;
+	case WM_RBUTTONDOWN:
+		eventType=TRawEvent::EButton3Down;
+		break;
+	case WM_RBUTTONUP:
+		eventType=TRawEvent::EButton3Up;
+		break;
+	case WM_MBUTTONDOWN:
+		eventType=TRawEvent::EButton2Down;
+		break;
+	case WM_MBUTTONUP:
+		eventType=TRawEvent::EButton2Up;
+		break;
+		}
+	if (!WinsGuiPowerHandler->iStandby)
+		{
+		addMouseEvent(eventType, aXpos, aYpos);
+		}
+	}
+
+LOCAL_C void FrameWndPointer(TUint message,TInt aXpos,TInt aYpos, TInt aScreenNumber, TInt aPointerId = 0)
+//
+// Handle a frame wnd pointer event.
+//
+	{
+	static bool	processingScreenOn=FALSE;
+	TEmulCommand command = ENoCommand;
+	TInt commandData = 0;
+	TBool mouseEvent = ETrue;
+	
+	TRawEvent::TType eventType=TRawEvent::ENone;
+	
+	TViewport& viewport = systemIni->iScreens[aScreenNumber]->iViewport;
+	aXpos += viewport.GetViewportOffsetX(); // make mouse-coords relative to fascia edge even if window is scrolled
+	aYpos += viewport.GetViewportOffsetY();
+	
+	switch (message)
+    	{
+	case WM_MOUSEMOVE:
+		{
+		TInt newX, newY;
+		systemIni->TranslateMouseCoords(CurrentFlipState[0], aXpos, aYpos, systemIni->iScreens[0]->iXYInputWidth, systemIni->iScreens[0]->iXYInputHeight, newX, newY);
+
+		if (aPointerId == 0)
+			{ // only system pointer changes shape
+		if (systemIni->GetVirtualKey(command, newX, newY) >= 0)
+			{
+			HMODULE hmodule = GetModuleHandleA("winsgui.dll");
+			SetCursor(LoadCursorA((HINSTANCE)hmodule,MAKEINTRESOURCEA(OVERKEY)));		//hand cursor
+			}
+		else
+			SetCursor(LoadCursorA(NULL,MAKEINTRESOURCEA(32512))); //ICD_ARROW
+				}
+
+		eventType=TRawEvent::EPointerMove;
+		
+		}
+		break;
+	case WM_LBUTTONDOWN:
+		{
+		SetCapture(TheWin[0]);
+		//check the configuration
+		TInt newX, newY;
+		
+		//if the emulator screen is rotated, rotate/flip the current mouse cursor position
+		//so it can be checked to see if it is in a key region.
+		systemIni->TranslateMouseCoords(CurrentFlipState[0], aXpos, aYpos, systemIni->iScreens[0]->iXYInputWidth, systemIni->iScreens[0]->iXYInputHeight, newX, newY);
+		commandData = systemIni->GetVirtualKey(command, newX, newY);
+		
+		if (commandData >= 0)
+			{
+			eventType=TRawEvent::EKeyDown;
+			mouseEvent = EFalse;
+			systemIni->SetVirtualKey(ETrue, commandData, command);
+			}
+		else
+			eventType=TRawEvent::EButton1Down;
+		}
+		break;
+	case WM_LBUTTONUP:
+		ReleaseCapture();
+		if (processingScreenOn)
+			{
+			// ignore button up - button down was switching things on
+			processingScreenOn=FALSE;
+			return;
+			}
+		if (systemIni->WasVirtualKey(commandData, command))
+			{
+			eventType=TRawEvent::EKeyUp;
+			mouseEvent = EFalse;
+			systemIni->SetVirtualKey(EFalse, EStdKeyNull, ENoCommand);
+			}
+		else
+			eventType=TRawEvent::EButton1Up;
+		break;
+	case WM_RBUTTONDOWN:
+		eventType=TRawEvent::EButton3Down;
+		break;
+	case WM_RBUTTONUP:
+		eventType=TRawEvent::EButton3Up;
+		break;
+	case WM_MBUTTONDOWN:
+		eventType=TRawEvent::EButton2Down;
+		break;
+	case WM_MBUTTONUP:
+		eventType=TRawEvent::EButton2Up;
+		break;
+		}
+	if (mouseEvent)
+		{
+		
+		if (!WinsGuiPowerHandler->iStandby)
+			{
+			/*
+			mouse events are relative to the child window position
+			and are clipped to the digitzer region in addMouseEvent
+			so all the mouse clicks are passed on here after being translated 
+			to the child window coordinate system (under the current rotation)
+			*/
+			TInt newX, newY;
+			switch (CurrentFlipState[0])
+				{
+				case EEmulatorFlipRestore:
+				default:
+					newX = aXpos - systemIni->iScreens[0]->iScreenOffsetX;
+					newY = aYpos - systemIni->iScreens[0]->iScreenOffsetY;
+					break;
+				case EEmulatorFlipInvert:
+					newX = aXpos - (systemIni->iScreens[0]->iXYInputWidth - systemIni->iScreens[0]->iScreenWidth - systemIni->iScreens[0]->iScreenOffsetX);
+					newY = aYpos - (systemIni->iScreens[0]->iXYInputHeight - systemIni->iScreens[0]->iScreenHeight - systemIni->iScreens[0]->iScreenOffsetY);
+					break;
+				case EEmulatorFlipLeft:
+					newX = aXpos - systemIni->iScreens[0]->iScreenOffsetY;
+					newY = aYpos - (systemIni->iScreens[0]->iXYInputWidth - systemIni->iScreens[0]->iScreenWidth - systemIni->iScreens[0]->iScreenOffsetX);
+					break;	
+				case EEmulatorFlipRight:
+					newX = aXpos - (systemIni->iScreens[0]->iXYInputHeight - systemIni->iScreens[0]->iScreenHeight - systemIni->iScreens[0]->iScreenOffsetY);
+					newY = aYpos - systemIni->iScreens[0]->iScreenOffsetX;
+					break;
+				}
+			addMouseEvent(eventType, newX, newY);
+			}
+		}
+	else if ((((message == WM_LBUTTONDOWN && command == EKey) && !ProcessedByEmulatorKey((TUint8)commandData,0,0,0,0)))
+			|| (message == WM_LBUTTONUP))
+		{
+			switch (command)
+			{
+			case EKey:
+				if (!WinsGuiPowerHandler->iStandby)
+					addKeyEvent(eventType, (TUint8)commandData);
+				break;
+
+			case ENextConfig:
+				NextConfiguration();
+				break;
+			
+			case ESelectConfig:
+				SwitchConfiguration(commandData);
+				break;
+			}
+		}
+	}
+
+LOCAL_C TInt ScreenFromHWND(HWND aHwnd,HWND* pWin)
+	{
+	TInt screens=systemIni->iScreens.Count();
+	TInt r=-1;
+	for(TInt i=0;i<screens;i++)
+		{
+		if(pWin[i]==aHwnd)
+			{
+			r=i;
+			break;
+			}
+		}
+	return r;
+	}
+void MultiTouchWndPointer(TUint message,TInt aXpos,TInt aYpos, TInt aZ, TInt aPointerId)
+	{
+	WINDOWINFO info;
+	info.cbSize = sizeof(WINDOWINFO);
+	if (GetWindowInfo(TheWin[0], &info))
+		{
+		POINT pt = {aXpos,aYpos};
+		if (PtInRect(&info.rcWindow,pt))
+			{
+			RECT client;
+			if (GetWindowRect(TheChildWin[0], &client) && PtInRect(&client,pt))	// within the window
+				{
+				MultiChildWndPointer(message, aXpos-client.left, aYpos-client.top, aZ, aPointerId);
+				}
+			else  
+				{		
+				//	Disable the multitouch if the cursor is outside the application window
+				if (DMultiTouch::iMultiTouchTempEnabled)	// within the window
+					{
+					DMultiTouch::iMultiTouchTempEnabled = FALSE;
+					if(TheMultiTouch->UnRegister())
+						{
+						SetWindowPos(hwndStatus,0,0,0,0,0,SWP_HIDEWINDOW);
+						}
+					}
+				FrameWndPointer(message, aXpos-info.rcClient.left, aYpos-info.rcClient.top, 0, aPointerId);	
+				}
+			}
+		}
+	}
+
+LOCAL_C DScreenProperties* ScreenPropsFromHWND(HWND aHwnd, HWND* pWin)
+	{
+	TInt screenNumber =  ScreenFromHWND(aHwnd, pWin);
+	
+	if(screenNumber >=0)
+		{
+		return systemIni->iScreens[screenNumber];
+		}
+	return NULL;
+
+	}
+
+
+TInt APIENTRY childWinProc(HWND hWnd,TUint message,TUint wParam,TUint lParam)
+//
+// The child window function.
+//
+	{
+	TInt screenNumber = 0;
+	TRawEvent v;
+    switch (message)
+    	{
+	case WM_FLIP_MESSAGE: // pass the flip message onto the parent window
+		{
+		screenNumber =ScreenFromHWND(hWnd,TheChildWin);
+		if(TUint(screenNumber) < TUint(systemIni->iScreens.Count()))
+			PostMessageA(TheWin[screenNumber],WM_FLIP_MESSAGE,wParam,NULL);
+		break;
+		}
+	case WM_LBUTTONDOWN:
+	case WM_LBUTTONUP:
+	case WM_MOUSEMOVE:
+	case WM_RBUTTONDOWN:
+	case WM_RBUTTONUP:
+	case WM_MBUTTONDOWN:
+	case WM_MBUTTONUP:
+		{
+		if (DMultiTouch::iMultiTouchTempEnabled)
+			{
+			DMultiTouch::iMultiTouchTempEnabled = FALSE;
+			}
+		screenNumber=ScreenFromHWND(hWnd,TheChildWin);
+		if(screenNumber==0)
+			{
+			ChildWndPointer(message,(TInt16)(lParam&0xFFFF),(TInt16)((lParam>>16)&0xFFFF));
+			}
+		break;
+		}
+    case WM_PAINT:
+		if (!PaintWindowFromBuffer(hWnd))
+			{
+			// Original behaviour
+			ValidateRect(hWnd,NULL);
+			v.Set(TRawEvent::ERedraw);
+			TheEventQ.Add(v);
+			}
+        break;
+    case WM_ACTIVATE:
+	case WM_SYSKEYDOWN:
+	case WM_KEYDOWN:
+	case WM_SYSKEYUP:
+	case WM_KEYUP:
+		Fault(EGuiChildWinProc);
+		break;
+    case WM_DESTROY:
+		break;
+
+	case WM_CHAR:
+	case WM_SYSCHAR:
+	case WM_DEADCHAR:
+	case WM_SYSDEADCHAR:
+        break;
+
+	case WMU_SET_DISPLAY_BUFFER:
+		screenNumber = ScreenFromHWND(hWnd, TheChildWin);
+		if (TUint(screenNumber) < TUint(systemIni->iScreens.Count()))
+			{
+			masterIni->iBufferSet[screenNumber].iDisplayBuffer = (LPVOID)lParam;
+			}
+		break;
+	case WMU_SET_DISPLAY_SIZE:
+		screenNumber = ScreenFromHWND(hWnd, TheChildWin);
+		masterIni->SetDisplaySize(screenNumber, wParam, lParam);
+		break;
+		
+	case WMU_SET_BUFFER_FORMAT:
+		screenNumber = ScreenFromHWND(hWnd, TheChildWin);
+		masterIni->SetBufferFormat(screenNumber, wParam, (RDisplayChannel::TPixelFormat) lParam);
+		break;
+		
+ 	default:
+        return(DefWindowProcA(hWnd,message,wParam,lParam));
+	    }
+    return(FALSE);
+	}
+
+
+LOCAL_C TBool PaintWindowFromBuffer(HWND hWnd)
+	{
+	TInt screenNumber = ScreenFromHWND(hWnd,TheChildWin);
+	if (TUint(screenNumber) >= TUint(masterIni->iBufferSet.Count()))
+		{
+		return EFalse;
+		}
+
+	LPVOID displayBuffer = masterIni->iBufferSet[screenNumber].iDisplayBuffer;
+	if (!displayBuffer)
+		{
+		return EFalse;
+		}
+
+	TInt   frameOffset = masterIni->iBufferSet[screenNumber].iScreenBuffer.iDisplayBufferOffset;
+	displayBuffer=LPVOID(frameOffset+(char*)displayBuffer);
+
+	PAINTSTRUCT ps;
+	BeginPaint(hWnd, &ps);
+
+	// Paint directly from the buffer to the window
+	LPBITMAPINFO info = (LPBITMAPINFO)&masterIni->iBufferSet[screenNumber].iInfo;
+	WORD width = (WORD)info->bmiHeader.biWidth;
+	WORD height = (WORD)-info->bmiHeader.biHeight;	// stored -ve in info
+	SetDIBitsToDevice(ps.hdc,
+						0, 0, 	// Dst X, Y
+						width, height,	// Src W, H
+						0, 0,	// Src X, Y
+						0,		// Src offset to first line
+						height,	// Src lines available
+						displayBuffer,	// Src pointer to pixels
+						info,			// Src info
+						DIB_RGB_COLORS);
+
+	EndPaint(hWnd, &ps);
+
+	return TRUE;
+	}
+
+
+LOCAL_C void CalcTextPos(TInt aScreen, TInt& aX, TInt& aY)
+	{
+	switch (CurrentFlipState[aScreen])
+		{
+	case EEmulatorFlipInvert:
+		aX = systemIni->iScreens[aScreen]->iXYInputWidth-(systemIni->iScreens[aScreen]->iScreenOffsetX+systemIni->iScreens[aScreen]->iScreenWidth);
+		aY = systemIni->iScreens[aScreen]->iXYInputHeight-(systemIni->iScreens[aScreen]->iScreenOffsetY+systemIni->iScreens[aScreen]->iScreenHeight);
+		break;
+	case EEmulatorFlipLeft:
+		aX = systemIni->iScreens[aScreen]->iScreenOffsetY;
+		aY = systemIni->iScreens[aScreen]->iXYInputWidth-(systemIni->iScreens[aScreen]->iScreenOffsetX+systemIni->iScreens[aScreen]->iScreenWidth);
+		break;
+	case EEmulatorFlipRight:
+		aX = systemIni->iScreens[aScreen]->iXYInputHeight-(systemIni->iScreens[aScreen]->iScreenOffsetY+systemIni->iScreens[aScreen]->iScreenHeight);
+		aY = systemIni->iScreens[aScreen]->iScreenOffsetX;
+		break;
+	case EEmulatorFlipRestore:
+	default:
+		aX = systemIni->iScreens[aScreen]->iScreenOffsetX;
+		aY = systemIni->iScreens[aScreen]->iScreenOffsetY;
+	break;
+		}
+	//subtract viewport offset here
+	aX -= systemIni->iScreens[aScreen]->iViewport.GetViewportOffsetX();
+	aY -= systemIni->iScreens[aScreen]->iViewport.GetViewportOffsetY();
+	}
+
+TInt APIENTRY ctrlwinProc(HWND hWnd,TUint message,TUint wParam,TUint lParam)
+//
+// The control window function
+//
+	{
+	switch(message)
+	{
+		case WM_SYSCOMMAND:
+			{
+				switch(wParam)
+				{
+					case 1:
+						{
+						NextConfiguration();
+						return 0;
+						}
+					case SC_MINIMIZE:
+					case SC_RESTORE:
+						{
+						if (wParam == SC_RESTORE) 
+							Active();
+						for(TInt ix=0;ix<systemIni->iScreens.Count();ix++)
+							{
+							SendMessage(TheWin[ix],message,wParam,lParam);
+							}
+						if (wParam == SC_MINIMIZE) 
+							Inactive();
+						}			
+				}
+				return(DefWindowProcA(hWnd,message,wParam,lParam));
+			}
+		case WM_CLOSE: // tell all emulator screen windows to close
+			{
+			for(TInt i=0;i<systemIni->iScreens.Count();i++)
+				{
+				DestroyWindow(TheWin[i]);
+				}
+			DestroyWindow(hWnd);
+			break;
+			}
+		case WM_DESTROY:
+			{
+			// save the main window position information
+			HANDLE hSysIni;
+			hSysIni = CreateFileA(systemIni->iSysIniFileName, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0);
+			DScreenProperties* screenProps;
+			if (hSysIni != INVALID_HANDLE_VALUE)
+				{
+				DWORD numWritten;
+				//write an identifier into file so that program can avoid loading old version
+				WriteFile(hSysIni, &KDatFileVersion, sizeof(TInt), &numWritten, 0);
+				
+				//record current configuration at start of file.
+				WriteFile(hSysIni, &CurrentConfiguration, sizeof(TInt), &numWritten, 0);
+				
+				//Write out the state for each window.
+				for(TInt i=0;i<systemIni->iScreens.Count();i++)
+					{
+					screenProps= systemIni->iScreens[i];
+					
+					TWindowState winState= screenProps->GetWindowState();
+					WriteFile(hSysIni, &winState, sizeof(TWindowState), &numWritten, 0);
+					
+					
+					}
+				}
+			CloseHandle(hSysIni);
+
+			PostQuitMessage(KErrNone);
+			break;
+			}
+		case WM_INPUT:
+			{
+			if (!DMultiTouch::iMultiTouchTempEnabled)
+				{
+				for(TInt ix=0;ix<systemIni->iScreens.Count();ix++)
+					{
+					DMultiTouch::iMultiTouchTempEnabled = TRUE;
+
+					SendMessage(TheWin[ix],message,wParam,lParam);
+					}
+				}
+			else if (systemIni->MultiTouchEnabled() && DMultiTouch::iMultiTouchSupported && systemIni->GCEEnabled())
+				{
+			   	TheMultiTouch->OnWmInput(hWnd, message, wParam, lParam,TheChildWin[0]);	
+				}
+			else
+				{
+				Fault(EGuiInvalidMultiTouch);
+				}
+		   	break;
+			}	
+		default:
+			return(DefWindowProcA(hWnd,message,wParam,lParam));
+	}
+	return(FALSE);
+	}
+
+TInt APIENTRY winProc(HWND hWnd,TUint message,TUint wParam,TUint lParam)
+//
+// The border window function.
+//
+	{
+
+	TRawEvent v;
+	
+	switch (message)
+    	{
+		case WM_GETMINMAXINFO:
+			{
+			DScreenProperties* screenProps = ScreenPropsFromHWND(hWnd, TheWin);
+			if(screenProps == NULL)
+				{
+				return DefWindowProcA(hWnd, message, wParam, lParam);
+				}
+						
+			MINMAXINFO* minMaxInfo = reinterpret_cast<MINMAXINFO*>(lParam);
+			minMaxInfo->ptMaxTrackSize.x = screenProps->iViewport.GetMaxWindowWidth();
+			minMaxInfo->ptMaxTrackSize.y = screenProps->iViewport.GetMaxWindowHeight();
+
+			minMaxInfo->ptMaxSize.x = minMaxInfo->ptMaxTrackSize.x;
+			minMaxInfo->ptMaxSize.y = minMaxInfo->ptMaxTrackSize.y;
+			DefWindowProcA(hWnd, message, wParam, lParam);
+			
+			break;
+			}
+	   
+    	    		
+ 	    	
+    	case WM_SIZE:
+    		{
+    		DScreenProperties* screenProps = ScreenPropsFromHWND(hWnd, TheWin);
+			if(screenProps == NULL)
+				{
+				return DefWindowProcA(hWnd, message, wParam, lParam);
+				}
+    		TViewport& viewport = screenProps->iViewport;
+    		//update size of viewport
+    		viewport.SetViewportWidth(LOWORD(lParam));
+    		viewport.SetViewportHeight(HIWORD(lParam));
+    		
+    		
+			//If resize goes beyond boundary of emulator then scroll to compensate
+			TInt ox = viewport.GetViewportOffsetX();
+    		TInt xs = ox + LOWORD(lParam) - viewport.GetMaxWidth();
+    		if (xs>0) 
+    			{    			
+    			viewport.ScrollToX(ox-xs, hWnd);
+    			}
+    		
+    		TInt oy = viewport.GetViewportOffsetY();
+    		TInt ys = oy + HIWORD(lParam) - viewport.GetMaxHeight();
+    		if (ys>0) 
+    			{    			
+    			viewport.ScrollToY(oy-ys, hWnd);
+    			}
+    	
+    		//Adjust ranges of scroll bars
+    	   	viewport.UpdateScrollBarH(hWnd);
+    		viewport.UpdateScrollBarV(hWnd);
+    		    		
+    		
+    		
+    		break;    		
+    		}
+    	case WM_HSCROLL:
+    		{
+    		DScreenProperties* screenProps = ScreenPropsFromHWND(hWnd, TheWin);
+			if(screenProps == NULL)
+				{
+				return DefWindowProcA(hWnd, message, wParam, lParam);
+				}
+    		TViewport& viewport = screenProps->iViewport;
+    		
+    		switch (LOWORD(wParam)) 
+    			{
+    			case SB_THUMBTRACK:
+    				{
+    				viewport.ScrollToX(HIWORD(wParam),hWnd);
+    				break;
+    				}
+				case SB_PAGELEFT:
+					{
+					viewport.ScrollToX(viewport.GetViewportOffsetX() - viewport.GetViewportWidth(), hWnd );
+					break;
+					}
+				case SB_PAGERIGHT:
+					{
+					viewport.ScrollToX(viewport.GetViewportOffsetX() + viewport.GetViewportWidth() , hWnd);
+					break;
+					}
+				case SB_LINEUP:
+					{
+					viewport.ScrollToX(viewport.GetViewportOffsetX() - 1, hWnd);
+					break;
+					}
+				case SB_LINEDOWN:
+					{
+					viewport.ScrollToX(viewport.GetViewportOffsetX() + 1, hWnd);
+					break;
+					}
+    			
+    			}
+    		   		
+   
+    		break;
+    		}
+    	
+    	case WM_VSCROLL:
+    		{
+    		DScreenProperties* screenProps = ScreenPropsFromHWND(hWnd, TheWin);
+			if(screenProps == NULL)
+				{
+				return DefWindowProcA(hWnd, message, wParam, lParam);
+				}
+    		TViewport& viewport = screenProps->iViewport;
+    		
+			
+			switch (LOWORD(wParam)) 
+    			{
+    			case SB_THUMBTRACK:
+    				{
+    				viewport.ScrollToY(HIWORD(wParam), hWnd);
+    				break;
+    				}
+				case SB_PAGELEFT:
+					{
+					viewport.ScrollToY(viewport.GetViewportOffsetY() - viewport.GetViewportHeight() , hWnd);
+					break;
+					}
+				case SB_PAGERIGHT:
+					{
+					viewport.ScrollToY(viewport.GetViewportOffsetY() + viewport.GetViewportHeight(), hWnd );
+					break;
+					}
+				case SB_LINEUP:
+					{
+					viewport.ScrollToY(viewport.GetViewportOffsetY() - 1, hWnd);
+					break;
+					}
+				case SB_LINEDOWN:
+					{
+					viewport.ScrollToY(viewport.GetViewportOffsetY() + 1, hWnd);
+					break;
+					}
+    			
+    			}
+    		
+    		break;
+    		
+    		}
+    	
+    	 		
+		case WM_FLIP_MESSAGE:
+			{
+			DScreenProperties* screenProps = ScreenPropsFromHWND(hWnd, TheWin);
+			if(screenProps == NULL)
+				{
+				return DefWindowProcA(hWnd, message, wParam, lParam);
+
+				}
+			
+			TViewport& viewport = screenProps->iViewport;
+			RECT windowRect={0,0,0,0};
+			GetClientRect(hWnd, &windowRect);
+			
+			TInt screenNumber=ScreenFromHWND(hWnd,TheWin);
+			if(TUint(screenNumber) >= TUint(systemIni->iScreens.Count()))
+				break;
+			PBITMAPV4HEADER info = &masterIni->iBufferSet[screenNumber].iInfo;
+			CurrentFlipState[screenNumber]=(TEmulatorFlip)wParam;
+			TBufferSet* bufferSet = &masterIni->iBufferSet[screenNumber];
+			switch (CurrentFlipState[screenNumber])
+				{
+				case EEmulatorFlipRestore:
+				case EEmulatorFlipInvert:
+					windowRect.right=systemIni->iScreens[screenNumber]->iXYInputWidth;
+					windowRect.bottom=systemIni->iScreens[screenNumber]->iXYInputHeight;
+					info->bV4Width = bufferSet->iBufferFormat.iSize.iWidth;
+					info->bV4Height = -bufferSet->iBufferFormat.iSize.iHeight;
+					break;
+				case EEmulatorFlipLeft:
+				case EEmulatorFlipRight:
+					windowRect.right=systemIni->iScreens[screenNumber]->iXYInputHeight;
+					windowRect.bottom=systemIni->iScreens[screenNumber]->iXYInputWidth;
+					info->bV4Width = bufferSet->iBufferFormat.iSize.iHeight;
+					info->bV4Height = -bufferSet->iBufferFormat.iSize.iWidth;
+					break;
+				}
+			AdjustWindowRect(&windowRect,KWinStyle,FALSE);
+    		
+    		
+			viewport.ScrollToX(0, hWnd);
+			viewport.ScrollToY(0, hWnd);
+
+			
+			screenProps->iScreenRotation = (TEmulatorFlip)wParam; 
+			
+						
+			RECT currentWindowRect;
+			GetWindowRect(hWnd,&currentWindowRect);
+			InvalidateRect(hWnd,NULL,FALSE);
+			MoveWindow(
+				TheWin[screenNumber],
+				max(currentWindowRect.left,0), // so the window doesn't disappear off the screen
+				max(currentWindowRect.top,0),
+				windowRect.right-windowRect.left,
+				windowRect.bottom-windowRect.top,
+				TRUE
+				);
+			// move the child window
+			screenProps->iViewport.UpdateChildPos(hWnd);
+			
+			viewport.UpdateScrollBarH(hWnd);
+    		viewport.UpdateScrollBarV(hWnd);
+
+			InvalidateRect(hWnd,NULL,TRUE);
+			UpdateWindow(hWnd);
+			
+			break;
+			}
+		case WM_SYSKEYDOWN:
+		case WM_KEYDOWN:
+			if (!(HIWORD(lParam)&KF_REPEAT))
+				{
+				
+				
+				TUint scanCode=DWinsKeyboard::ScanCodeToStandardKey(HIWORD(lParam));
+				TUint newScanCode = systemIni->iKeyboard.ScanCodeToRemappedKey(HIWORD(lParam));
+				MSG msg={hWnd,message,wParam,lParam,GetMessageTime(),GetMessagePos()};
+				TranslateMessage(&msg);
+				TUint charCode=0;
+				// look in the message queue to get character associated with keypress
+				// so long as the control, shift and alt keys aren't depressed
+				if (!(HIBYTE(GetKeyState(VK_CONTROL)) && HIBYTE(GetKeyState(VK_MENU)) && HIBYTE(GetKeyState(VK_SHIFT))))
+					if (PeekMessageA(&msg,hWnd,WM_CHAR,WM_CHAR,PM_NOREMOVE) &&
+						scanCode == newScanCode) //no remapping
+						charCode=msg.wParam;
+				// Pass the character as the HIWORD of the Epoc scan code
+				
+				scanCode = newScanCode;
+				v.Set(TRawEvent::EKeyDown,(charCode<<16)|scanCode);
+				if (!ProcessedByEmulatorKey(scanCode,hWnd,message,wParam,lParam))
+   					TheEventQ.Add(v);
+				
+				}
+			break;
+		case WM_TIMER:
+			break;
+		case WM_EMUL_POWER_ON:
+			{
+			TInt screenNumber=ScreenFromHWND(hWnd,TheWin);
+			if(TUint(screenNumber) >= TUint(systemIni->iScreens.Count()))
+				break;
+//			HWND win = systemIni->iSecureDisplay ? TheSecureChildWin : TheChildWin;
+			HWND win = TheChildWin[screenNumber];
+			if (wParam==TRUE)
+				{
+				ShowWindow(win, SW_HIDE);
+				ShowWindow(win, SW_SHOWNORMAL);
+				if (SavedFlipMessage)
+					{
+					addKeyEvent(TRawEvent::EKeyDown, SavedFlipMessage);
+					addKeyEvent(TRawEvent::EKeyUp, SavedFlipMessage);
+					SavedFlipMessage = 0;
+					}
+				}
+			else
+				{
+				ShowWindow(win, SW_SHOWNORMAL);
+				ShowWindow(win, SW_HIDE);
+				}
+			}
+			break;
+		case WM_SYSKEYUP:
+		case WM_KEYUP:
+			{
+			//get the key code, this will pick up if it has been remapped or not.
+			TUint scanCode = systemIni->iKeyboard.ScanCodeToRemappedKey(HIWORD(lParam));
+	   /*
+		* We could do this to support generation of special characters using Alt+KeyPadNum
+		* combinations, but we would need to find a way to suppress the generation of
+		* home/end scancodes etc., so leave it for the moment.
+					MSG msg={hWnd,message,wParam,lParam,GetMessageTime(),GetMessagePos()};
+					TranslateMessage(&msg);
+					TUint charCode=0;
+					// look in the message queue to get character associated with keypress
+					if (PeekMessageU()(&msg,hWnd,WM_CHAR,WM_CHAR,PM_NOREMOVE))
+						charCode=msg.wParam;
+					// Pass the character as the HIWORD of the Epoc scan code
+					v.Set(TRawEvent::EKeyUp,(charCode<<16)|scanCode);
+		*/
+					v.Set(TRawEvent::EKeyUp,scanCode);
+	    			TheEventQ.Add(v);
+			break;
+			}
+		case WM_MOUSEMOVE:
+		case WM_LBUTTONDOWN:
+		case WM_LBUTTONUP:
+		case WM_RBUTTONDOWN:
+		case WM_RBUTTONUP:
+		case WM_MBUTTONDOWN:
+		case WM_MBUTTONUP:
+				{
+				//only handle mouse clicks on screen 0
+				TInt xpos=((TInt16)(lParam&0xffff));
+				TInt ypos = (TInt16)((lParam>>16)&0xFFFF);
+				if (DMultiTouch::iMultiTouchTempEnabled)
+					{
+					MultiChildWndPointer(message,xpos,ypos,0,0);
+					DMultiTouch::iMultiTouchTempEnabled = FALSE;				
+					}
+				else
+					{
+					TInt screenNumber=ScreenFromHWND(hWnd,TheWin);
+					if(screenNumber!=0)
+						break;
+					FrameWndPointer(message,xpos,ypos,screenNumber);
+					}
+				break;
+				}
+		case WM_PAINT:
+			{
+			DScreenProperties* screenProps = ScreenPropsFromHWND(hWnd, TheWin);
+			if(screenProps == NULL)
+				{
+				return DefWindowProcA(hWnd, message, wParam, lParam);
+				}
+    		TViewport& viewport = screenProps->iViewport;
+    		TInt screenNumber=ScreenFromHWND(hWnd,TheWin);
+
+			PAINTSTRUCT p;
+
+			BeginPaint(hWnd,&p);
+	   		HDC hdcBits;
+			BITMAP bm;
+    		hdcBits=CreateCompatibleDC(p.hdc);
+			GetObjectA(TheScreenBitmap[screenNumber],sizeof(BITMAP),&bm);
+    		SelectObject(hdcBits,TheScreenBitmap[screenNumber]);
+		
+			RECT windowRect;
+			GetClientRect(TheWin[screenNumber],&windowRect);
+			
+			viewport.SetViewportHeight(windowRect.bottom);
+			viewport.SetViewportWidth(windowRect.right);
+			
+			
+			switch (CurrentFlipState[screenNumber])
+				{
+				case EEmulatorFlipRestore:
+					{
+					BitBlt(p.hdc,0,0,windowRect.right,windowRect.bottom,hdcBits,
+						viewport.GetViewportOffsetX(),viewport.GetViewportOffsetY(),SRCCOPY);
+					break;
+					}
+				case EEmulatorFlipInvert:
+					{
+					TInt sourceX = screenProps->iXYInputWidth - viewport.GetViewportWidth() - viewport.GetViewportOffsetX();
+					if(sourceX<0)
+						sourceX=0;
+					TInt sourceY = screenProps->iXYInputHeight - viewport.GetViewportHeight() - viewport.GetViewportOffsetY();
+					if(sourceY<0)
+						sourceY=0;
+					TInt sourceWidth = viewport.GetMaxWidth()-sourceX - viewport.GetViewportOffsetX();
+					TInt sourceHeight = viewport.GetMaxHeight()-sourceY - viewport.GetViewportOffsetY();
+					
+					//when inverted it is necessary to translate the image by 1 pixel up and to the left,
+					//to avoid a glitch when scrolling using ScrollWindowEx()
+					POINT arrayPoints[3]={
+						{sourceWidth-1,sourceHeight-1},
+						{-1,sourceHeight-1},
+						{sourceWidth-1,-1}
+						};
+					PlgBlt(p.hdc,arrayPoints,hdcBits,sourceX,sourceY,sourceWidth,sourceHeight,NULL,NULL,NULL);
+					break;
+					}
+				case EEmulatorFlipLeft:
+					{
+					TInt offsetX = screenProps->iXYInputWidth- viewport.GetViewportHeight()  - viewport.GetViewportOffsetY(); 	
+					TInt offsetY = viewport.GetViewportOffsetX(); 	
+		
+					POINT arrayPoints[3]={{0,windowRect.bottom},{0,0},{windowRect.right,windowRect.bottom}};
+					PlgBlt(p.hdc,arrayPoints,hdcBits,offsetX,offsetY,viewport.GetViewportHeight(),viewport.GetViewportWidth(),NULL,NULL,NULL);
+					break;
+					}
+				case EEmulatorFlipRight:
+					{
+					TInt offsetX = viewport.GetViewportOffsetY(); 
+					TInt offsetY = screenProps->iXYInputHeight - viewport.GetViewportWidth() - viewport.GetViewportOffsetX(); 	
+									
+					POINT arrayPoints[3]={{windowRect.right,0},{windowRect.right,windowRect.bottom},{0,0}};
+					PlgBlt(p.hdc,arrayPoints,hdcBits,offsetX,offsetY,viewport.GetViewportHeight(),viewport.GetViewportWidth(),NULL,NULL,NULL);
+					break;
+					}
+				}
+
+			
+			DeleteDC(hdcBits);
+			if (WinsGuiPowerHandler->iStandby)
+				{
+				TInt x,y;
+				CalcTextPos(screenNumber, x, y);
+				TextOutA(p.hdc, x, y, "Standby", 7);
+				}
+			else if (systemIni->iScreens[screenNumber]->iScreenOff)
+				{
+				TInt x,y;
+				CalcTextPos(screenNumber, x, y);
+				TextOutA(p.hdc, x, y, "Screen Off", 10);
+				}
+ 			EndPaint(hWnd,&p);
+			break;
+			}
+		case WM_ACTIVATE:
+			//Added so that change in modifier keys can be detected without sending
+			//EActive/EInActive to wserv as it results in switching the timers
+   			if((wParam & 0xffff)!= WA_INACTIVE)
+   				UpdateModifiers();
+			break;
+		case WM_CHAR:
+		case WM_SYSCHAR:
+		case WM_DEADCHAR:
+		case WM_SYSDEADCHAR:
+			break;
+		case WM_CLOSE: //pass on message to control window, it will then destroy all e,ulator windows
+			SendMessage(TheControlWin,WM_CLOSE, NULL, NULL);
+			break;
+		case WM_DESTROY:
+			{
+			DScreenProperties* screenProps = ScreenPropsFromHWND(hWnd, TheWin);
+			if(screenProps == NULL)
+				{
+				return DefWindowProcA(hWnd, message, wParam, lParam);
+				}
+    					
+			// save window's position information
+			screenProps->iWinPlace.length = sizeof(WINDOWPLACEMENT);
+			GetWindowPlacement(hWnd, &screenProps->iWinPlace);
+			
+			break;
+			}
+		case WM_INPUT:
+			{
+			if (systemIni->MultiTouchEnabled() && DMultiTouch::iMultiTouchSupported && systemIni->GCEEnabled())
+				{
+				TInt screenNumber=ScreenFromHWND(hWnd,TheWin);
+				if(screenNumber==0)
+					{
+					TheMultiTouch->OnWmInput(hWnd, message, wParam, lParam,TheChildWin[screenNumber]);	
+					}
+				}
+			else
+				{
+				Fault(EGuiInvalidMultiTouch);
+				}
+		   	break;
+			}
+		default:
+	        return(DefWindowProcA(hWnd,message,wParam,lParam));
+	    }
+    return(FALSE);
+	
+	}
+
+void SetStatusBarFont(HWND& aStatusBar)
+	{
+	int statwidths[] = {100,200,300,400,500,600,700,800};
+	SendMessage(aStatusBar, SB_SETPARTS, sizeof(statwidths)/sizeof(int), (LPARAM)statwidths);
+	HFONT hOrigFont = (HFONT) SendMessage(aStatusBar, WM_GETFONT, 0, 0);
+	SetProp(aStatusBar, TEXT("PROP_ORIGINAL_FONT"), (HANDLE) hOrigFont);
+	LOGFONT lf;
+	GetObject(hOrigFont, sizeof(lf), &lf);
+	lf.lfHeight = (long)(lf.lfHeight / 1.5);
+	lf.lfWeight = FW_NORMAL;
+	HFONT hFont = CreateFontIndirect(&lf);
+	SetProp(aStatusBar, TEXT("PROP_ITALIC_FONT"), (HANDLE) hFont);
+	hFont = (HFONT) GetProp(hwndStatus, TEXT("PROP_ITALIC_FONT"));
+	SendMessage(aStatusBar, WM_SETFONT, (WPARAM) hFont, FALSE);
+	}
+
+DWORD WINAPI KernelWindowThread(LPVOID aArg)
+//
+// The kernel window thread.
+//
+	{
+	HMODULE hmodule = GetModuleHandleA("winsgui.dll");
+	__ASSERT_ALWAYS(hmodule!=NULL,Fault(EGuiGetModuleHandle));
+
+	WNDCLASSA w;
+	memclr(&w, sizeof(WNDCLASSA));
+   	w.style=CS_OWNDC|CS_VREDRAW|CS_HREDRAW;
+   	w.lpfnWndProc=(WNDPROC)ctrlwinProc;
+   	w.hInstance=(HINSTANCE)aArg;
+   	w.hIcon=LoadIconA((HINSTANCE)hmodule,MAKEINTRESOURCEA(EPOC_ICON));
+   	w.hbrBackground=(HBRUSH)GetStockObject(WHITE_BRUSH);
+   	w.lpszClassName="E32KernelControlWindow";
+	
+	ATOM a=RegisterClassA(&w);
+	__ASSERT_ALWAYS(a!=0,Fault(EGuiRegisterWindow));
+
+	RECT ctlrwindowRect={0,0,270,0};
+	AdjustWindowRect(&ctlrwindowRect,KControlWinStyle,FALSE);
+	TInt ctrlwindowWidth=ctlrwindowRect.right-ctlrwindowRect.left;
+	TInt ctrlwindowHeight=ctlrwindowRect.bottom-ctlrwindowRect.top;
+
+    TheControlWin=CreateWindowA(
+		"E32KernelControlWindow",
+		systemIni->iWindowTitle,
+		KInvisibleControlWinStyle,
+		KWinPosX,
+		KWinPosY,
+		ctrlwindowWidth,
+		ctrlwindowHeight,
+		(HWND)NULL,
+		NULL,
+		(HINSTANCE)aArg,
+		(LPSTR)NULL
+		);
+	__ASSERT_ALWAYS(TheControlWin!=NULL,Fault(EGuiKernelWindowCreate));
+
+	memclr(&w, sizeof(WNDCLASSA));
+   	w.style=CS_OWNDC;
+   	w.lpfnWndProc=(WNDPROC)winProc;
+   	w.hInstance=(HINSTANCE)aArg;
+   	w.hIcon=LoadIconA((HINSTANCE)hmodule,MAKEINTRESOURCEA(EPOC_ICON));
+   	w.hbrBackground=(HBRUSH)GetStockObject(WHITE_BRUSH);
+   	w.lpszClassName="E32KernelWindow";
+
+	a=RegisterClassA(&w);
+	__ASSERT_ALWAYS(a!=0,Fault(EGuiRegisterWindow));
+
+	memclr(&w, sizeof(WNDCLASSA));
+	w.style=CS_OWNDC;
+	w.lpfnWndProc=(WNDPROC)childWinProc;
+	w.hInstance=(HINSTANCE)aArg;
+	w.hCursor=LoadCursorA(NULL,MAKEINTRESOURCEA(32512)); //ICD_ARROW
+	w.hbrBackground=(HBRUSH)GetStockObject(WHITE_BRUSH);
+	w.lpszMenuName=NULL;
+	w.lpszClassName="E32KernelChildWindow";
+	a=RegisterClassA(&w);
+	__ASSERT_ALWAYS(a!=0,Fault(EGuiRegisterChildWindow));
+
+	if (masterIni && masterIni->iSystemInis.Count() > 1)	
+		{
+		//add Configuration Items to the system menu if there's > 1 config
+		HMENU hMenu = GetSystemMenu(TheControlWin, FALSE);
+		InsertMenu(hMenu,5, MF_BYPOSITION|MF_SEPARATOR,0,NULL);
+		InsertMenuA(hMenu,6, MF_BYPOSITION|MF_STRING, 1, "Next Config...");
+		}
+	
+	ShowWindow(TheControlWin,SW_SHOWDEFAULT);
+	UpdateWindow(TheControlWin);
+
+	//Create frame windows and child windows
+	for(TInt screen=0;screen<systemIni->iScreens.Count();screen++)
+		{
+	
+		RECT windowRect={0,0,systemIni->iScreens[screen]->iXYInputWidth,systemIni->iScreens[screen]->iXYInputHeight};
+		AdjustWindowRect(&windowRect,KWinStyle,FALSE);
+		TInt windowWidth=windowRect.right-windowRect.left;
+		TInt windowHeight=windowRect.bottom-windowRect.top;
+    
+		CHAR title[20];
+		wsprintfA(title, "Screen %d", screen);
+
+		TheWin[screen]=CreateWindowA(
+			"E32KernelWindow",
+			title,
+			KInvisibleWinStyle,
+			KWinPosX,
+			KWinPosY,
+			windowWidth,
+			windowHeight,
+			(HWND)NULL,
+			NULL,
+			(HINSTANCE)aArg,
+			(LPSTR)NULL
+			);
+		__ASSERT_ALWAYS(TheWin[screen]!=NULL,Fault(EGuiKernelWindowCreate));
+		
+		LoadFasciaBitmap(screen);
+
+		TheChildWin[screen]=CreateWindowA(
+			"E32KernelChildWindow",
+			"",
+			WS_CHILDWINDOW|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS,
+			systemIni->iScreens[screen]->iScreenOffsetX,
+			systemIni->iScreens[screen]->iScreenOffsetY,
+			systemIni->iScreens[screen]->iScreenWidth,
+			systemIni->iScreens[screen]->iScreenHeight,
+			TheWin[screen],
+			NULL,
+			(HINSTANCE)aArg,
+			(LPSTR)NULL
+			);
+		__ASSERT_ALWAYS(TheChildWin[screen]!=NULL,Fault(EGuiKernelChildWindowCreate));
+		
+		// Create status bars
+		if (systemIni->MultiTouchEnabled() && systemIni->GCEEnabled())
+			{
+			HMODULE hmodComCtl = LoadLibrary(TEXT("comctl32.dll"));
+			typedef int (WINAPI* FNINITCC)();
+			FNINITCC pfnInitCommonControls = GetProcAddress(hmodComCtl, "InitCommonControls");
+			pfnInitCommonControls();
+			hwndStatus = CreateWindowExA(0, STATUSCLASSNAMEA, NULL,
+								WS_CHILD | WS_VISIBLE | CCS_BOTTOM ,
+									0,0,0,0,
+									TheWin[0], NULL, GetModuleHandle(NULL), NULL);                 
+			SetStatusBarFont(hwndStatus);
+			SetWindowPos(hwndStatus,NULL, 0,0,0,0,SWP_HIDEWINDOW);
+			}
+		}
+	
+	//Restore window data from ini file if it exists. 
+	HANDLE hSysIni = CreateFileA(systemIni->iSysIniFileName, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0);
+	TBool success=(hSysIni != INVALID_HANDLE_VALUE) ? ETrue : EFalse;
+	
+	DWORD numRead;
+	TInt fileVersion=0;
+	if(success) 
+		{
+		ReadFile(hSysIni, &fileVersion, sizeof(TInt), &numRead, 0);
+		}
+	
+	//Check we are using a dat file created by this version of the program.
+	if(success && (fileVersion==KDatFileVersion) )
+		{
+				
+		TInt savedConfiguration=0; //set this to default configuration
+				
+		if(ReadFile(hSysIni, &savedConfiguration, sizeof(TInt), &numRead, 0) && (numRead>0) )
+			{
+			//Don't restore the saved configuration, see INC114502.
+			//This could be reenabled in future as an optional operation
+			//dependent on an entry in the epoc.ini file.
+
+			//SwitchConfiguration(savedConfiguration);
+			}
+	
+		//restore each window to saved state
+		for(TInt screen=0;screen<systemIni->iScreens.Count();screen++)
+			{
+		
+			//	If the .ini file was opened, get the saved settings for the windows position the last time
+			//	this emulator was run, if any, and move the window accordingly.
+			
+			TWindowState savedState;
+			
+			TBool stateLoaded = ReadFile(hSysIni, &savedState, sizeof(TWindowState), &numRead, 0) && (numRead>0);
+			 			
+			if (stateLoaded)
+				{				
+				//only allow window to be restored to 
+				//maximized or normal mode,
+				//this prevents it being restored in minimized mode
+				//or others.
+				if(savedState.iWinPlace.showCmd != SW_MAXIMIZE)
+						savedState.iWinPlace.showCmd= SW_NORMAL;
+				
+				//if starting in same configuration and/or rotation as last time emulator was run
+				//it makes sense to restore scroll offset, window position,
+				//and dimensions, if not, only restore position and window (ie. maximized/normal) state.
+				if(savedConfiguration == CurrentConfiguration &&
+					savedState.iFlipstate == CurrentFlipState[screen])
+					{
+					//Restore window placement
+					SetWindowPlacement(TheWin[screen], &savedState.iWinPlace);
+					
+					TViewport& viewport = systemIni->iScreens[screen]->iViewport;
+								
+					viewport.ScrollToX(savedState.iXoffset, TheWin[screen]);
+					viewport.ScrollToY(savedState.iYoffset, TheWin[screen]);
+					}
+				else
+					{
+					
+					RECT oldRect;
+					GetWindowRect(TheWin[screen], &oldRect);
+					//save default window dimensions
+					TInt width=oldRect.right-oldRect.left;
+					TInt height=oldRect.bottom - oldRect.top;
+
+					//restore position and window state from file
+					SetWindowPlacement(TheWin[screen], &savedState.iWinPlace);
+					
+					RECT currentRect;
+					GetWindowRect(TheWin[screen], &currentRect);
+					//keep default size.
+					MoveWindow(TheWin[screen],currentRect.left, currentRect.top, width, height, TRUE);
+					
+					}
+
+
+				// Check that enough of the recorded window position is visible on the screen
+
+				TBool enoughVisible = false;
+
+				// vague values for ensuring we have enough of the window title bar to grab
+				// if the window is partly off screen 
+				const TInt KTitleBarGrabX=80;
+				const TInt KTitleBarGrabY=50;
+
+				//inspect dimensions of the window to be restored.
+				RECT savedRect;
+				GetWindowRect(TheWin[screen], &savedRect);
+
+				SystemMonitors monitors;
+
+				if (monitors.Count() == 1)		/* Original algorithm */
+					{
+					RECT rcIntersect, rcScreen;
+
+					SetRect(&rcScreen, KTitleBarGrabX, savedRect.bottom-savedRect.top,
+						GetSystemMetrics(SM_CXSCREEN)-KTitleBarGrabX, GetSystemMetrics(SM_CYSCREEN)-KTitleBarGrabY);
+
+					enoughVisible = IntersectRect(&rcIntersect, &savedRect, &rcScreen);
+					}
+				else							/* > 1 monitor; do it differently */
+					{
+					RECT cornerBox1, cornerBox2;
+
+					// The top-left corner box
+					SetRect(&cornerBox1, savedRect.left, savedRect.top,
+						savedRect.left + KTitleBarGrabX, savedRect.top + KTitleBarGrabY);
+
+					// The top-right corner box
+					SetRect(&cornerBox2, savedRect.right - KTitleBarGrabX, savedRect.top,
+						savedRect.right, savedRect.top + KTitleBarGrabY);
+
+					// Require one of these rectangles to be all on one monitor
+					enoughVisible = monitors.RectAllOnOne(cornerBox1) || monitors.RectAllOnOne(cornerBox2);
+					}
+
+				if (!enoughVisible)
+					{
+					SetWindowPos(TheWin[screen], HWND_TOP, 0,0,0,0, SWP_NOSIZE);
+					}
+
+				}
+			else //if there was no stored info for this screen
+				{
+				ShowWindow(TheWin[screen],SW_MAXIMIZE);
+				}
+			}
+		}
+	else
+		{
+		//use default configuration and make windows visible
+		SwitchConfiguration(CurrentConfiguration);
+		for(TInt screen=0;screen<systemIni->iScreens.Count();screen++)
+			{
+			ShowWindow(TheWin[screen],SW_MAXIMIZE);
+			UpdateWindow(TheWin[screen]);
+			}
+		}
+
+	//close file if it was opened	
+	if(success) 
+		{
+		CloseHandle(hSysIni);
+		}
+		
+			
+	if (systemIni->iInitialFlipMsg != 0)
+		{
+		addKeyEvent(TRawEvent::EKeyDown,systemIni->iInitialFlipMsg);
+		addKeyEvent(TRawEvent::EKeyUp,systemIni->iInitialFlipMsg);
+		}
+
+	SetFocus(TheWin[0]);
+
+	MSG m;
+	while (GetMessageA(&m,NULL,0,0))
+    	{
+        DispatchMessageA(&m);
+	    }
+	
+	ExitProcess(m.wParam);
+	return 0;
+	}
+
+SystemMonitors::SystemMonitors(void)
+	{
+	TInt n;
+
+	iCount = 1;
+	iHaveMultiMonFunctions = false;
+
+	if ((n = GetSystemMetrics(SM_CMONITORS)) <= 1)
+		{
+		return;
+		}
+
+	HMODULE huser32 = GetModuleHandleA("user32.dll");
+
+	// Get pointers to the APIs we want
+	if (huser32 == NULL ||
+		(ipMonitorFromRect =
+		(HMONITOR (WINAPI *)(LPCRECT lprcScreenCoords, UINT uFlags))
+		GetProcAddress(huser32, "MonitorFromRect")) == NULL ||
+		(ipGetMonitorInfo =
+		(BOOL (WINAPI *)(HMONITOR hMonitor, LPMONITORINFO lpMonitorInfo))
+		GetProcAddress(huser32, "GetMonitorInfoA")) == NULL)
+		{
+		return;
+		}
+
+	iCount = n;
+	iHaveMultiMonFunctions = true;
+	}
+
+TBool SystemMonitors::RectAllOnOne(RECT& rect)
+	{
+	HMONITOR monitor = MonitorFromRect(rect);
+	if (monitor == NULL)
+		{
+		return false;
+		}
+
+	MONITORINFO monInfo;
+	monInfo.cbSize = sizeof(MONITORINFO);
+
+	if (! GetMonitorInfo(monitor, &monInfo))
+		{
+		return false;
+		}
+
+	RECT overlap;
+
+	if (IntersectRect(&overlap, &rect, &monInfo.rcWork) &&
+		EqualRect(&overlap, &rect))
+		{
+		return true;
+		}
+
+	return false;
+	}
+
+HMONITOR SystemMonitors::MonitorFromRect(const RECT& rect, UINT flags)
+	{
+	if (! iHaveMultiMonFunctions)
+		{
+		return NULL;
+		}
+
+	return (*ipMonitorFromRect)(&rect, flags);
+	}
+
+TBool SystemMonitors::GetMonitorInfo(HMONITOR monitor, LPMONITORINFO pMonInfo)
+	{
+	if (! iHaveMultiMonFunctions)
+		{
+		return false;
+		}
+
+	return (*ipGetMonitorInfo)(monitor, pMonInfo);
+	}
+
+void DrawLeds()
+	{
+	HDC winDC = GetDC(TheWin[0]);
+	HDC hdcBits;
+	hdcBits=CreateCompatibleDC(winDC);
+	SelectObject(hdcBits,TheScreenBitmap[0]);
+	HPEN pen=CreatePen(PS_SOLID,0,RGB(0,0,0));
+	SelectObject(hdcBits,pen);
+	HBRUSH brush;
+	LOGBRUSH redbrush={BS_SOLID, RGB(0xff,0,0)};
+	LOGBRUSH greenbrush={BS_SOLID, RGB(0,0xff,0)};
+	LOGBRUSH blackbrush={BS_SOLID, RGB(0,0,0)};
+	// red
+	if (LedMask & KLedMaskRed1)
+		brush=CreateBrushIndirect(&redbrush);
+	else
+		brush=CreateBrushIndirect(&blackbrush);
+	SelectObject(hdcBits,brush);
+	DWinsUi *ini=systemIni;
+	Ellipse(hdcBits, ini->iLedOffsetX, ini->iLedOffsetY, ini->iLedOffsetX+ini->iLedSize, ini->iLedOffsetY+ini->iLedSize);
+	DeleteObject(brush);
+	// green
+	if (LedMask & KLedMaskGreen1)
+		brush=CreateBrushIndirect(&greenbrush);
+	else
+		brush=CreateBrushIndirect(&blackbrush);
+	SelectObject(hdcBits,brush);
+	if (ini->iLedVertical)
+		Ellipse(hdcBits, ini->iLedOffsetX, ini->iLedOffsetY+ini->iLedSize+ini->iLedGap,
+		ini->iLedOffsetX+ini->iLedSize, ini->iLedOffsetY+ini->iLedSize+ini->iLedGap+ini->iLedSize);
+	else
+		Ellipse(hdcBits, ini->iLedOffsetX+ini->iLedSize+ini->iLedGap, ini->iLedOffsetY,
+		ini->iLedOffsetX+ini->iLedSize+ini->iLedGap+ini->iLedSize, ini->iLedOffsetY+ini->iLedSize);
+	DeleteObject(brush);
+	DeleteObject(pen);
+	DeleteDC(hdcBits);
+	ReleaseDC(TheWin[0], winDC);
+	if (ini->iLedVertical)
+		{
+		RECT r={ini->iLedOffsetX,
+			ini->iLedOffsetY,
+			ini->iLedOffsetX+ini->iLedSize,
+			ini->iLedOffsetY+ini->iLedSize+ini->iLedGap+ini->iLedSize};
+		InvalidateRect(TheWin[0], &r, FALSE);
+		}
+	else
+		{
+		RECT r={ini->iLedOffsetX,
+			ini->iLedOffsetY,
+			ini->iLedOffsetX+ini->iLedSize+ini->iLedGap+ini->iLedSize,
+			ini->iLedOffsetY+ini->iLedSize};
+		InvalidateRect(TheWin[0], &r, FALSE);
+		}
+	}
+
+void DWinsUi::ScreenInfo(TScreenInfoV01& aInfo)
+//
+// Return screen 0 info to the window server.
+//
+	{
+	aInfo.iWindowHandleValid=ETrue;
+	aInfo.iWindowHandle=TheChildWin[0];
+	aInfo.iScreenAddressValid=EFalse;
+	aInfo.iScreenAddress=NULL;
+	aInfo.iScreenSize.iWidth = iScreens[0]->iMaxScreenWidth;
+	aInfo.iScreenSize.iHeight = iScreens[0]->iMaxScreenHeight;
+	}
+	
+	
+TBool DWinsUi::VideoInfo(TInt aScreenNumber, TVideoInfoV01& aInfo)
+	{
+	return VideoInfo(aScreenNumber,iScreens[aScreenNumber&KMaskScreenNum]->iCurrentMode,aInfo);
+	}
+	
+/// Could fail if flip mode is not supported
+TBool DWinsUi::VideoInfo(TInt aScreenNumber,TInt aModeNumber, TVideoInfoV01& aInfo)
+	{
+	aScreenNumber &= KMaskScreenNum;
+	if (aScreenNumber>=iScreens.Count())
+		return EFalse;
+	if (masterIni->iBufferSet.Count() && masterIni->iBufferSet[aScreenNumber].iDisplayDriverCount > 0)
+		{
+			return VideoInfoForDisplayDriver(aScreenNumber,aModeNumber,aInfo);
+		}
+	else
+		{
+		if ((aModeNumber&KMaskModeNum)>=1)
+			return EFalse;	//non-gce emulator doesn't support changing the mode number.
+		DScreenProperties* screenProperties=iScreens[aScreenNumber];
+		aInfo.iSizeInPixels.iWidth = screenProperties->iMaxScreenWidth;
+		aInfo.iSizeInPixels.iHeight = screenProperties->iMaxScreenHeight;
+		aInfo.iSizeInTwips.iWidth = screenProperties->iMaxPhysicalScreenWidth ? screenProperties->iMaxPhysicalScreenWidth : TInt(screenProperties->iScreenWidth*KDefaultPixelsToTwipsX);
+		aInfo.iSizeInTwips.iHeight = screenProperties->iMaxPhysicalScreenHeight ? screenProperties->iMaxPhysicalScreenHeight : TInt(screenProperties->iScreenHeight*KDefaultPixelsToTwipsY);
+		aInfo.iIsMono = EFalse;
+		aInfo.iIsPalettized = EFalse;
+		aInfo.iDisplayMode=screenProperties->iCurrentMode;
+		aInfo.iIsPixelOrderRGB = ETrue;
+		aInfo.iIsPixelOrderLandscape=ETrue;
+
+		aInfo.iVideoAddress =  (TInt)TheChildWin[aScreenNumber];
+		aInfo.iBitsPerPixel = screenProperties->iColorDepth;
+		aInfo.iOffsetToFirstPixel=0;
+		aInfo.iOffsetBetweenLines=0;
+		}
+	return ETrue;	
+	}
+
+/** Could fail if flip mode is not supported.
+ Note that this method is inteneded to be called directly to parameterise the setting up of the display driver,
+ so it must survive absense of the display driver installation!
+**/
+ 
+TBool DWinsUi::VideoInfoForDisplayDriver(TInt aScreenNumber,TInt aModeNumber, TVideoInfoV01& aInfo,  TBool aRealWidthAndHeight)
+	{
+	aScreenNumber &= KMaskScreenNum;
+	DScreenProperties* screenProperties = iScreens[aScreenNumber];
+	if ((aModeNumber&KMaskModeNum) >= screenProperties->iMaxModes)
+		{
+		return EFalse;
+		}
+		
+	aInfo.iSizeInPixels.iWidth = aRealWidthAndHeight ? screenProperties->iScreenWidth : screenProperties->iMaxScreenWidth;
+	aInfo.iSizeInPixels.iHeight = aRealWidthAndHeight ? screenProperties->iScreenHeight : screenProperties->iMaxScreenHeight;
+	
+	if (aRealWidthAndHeight==EFalse)
+		{
+		aInfo.iSizeInTwips.iWidth = screenProperties->iMaxPhysicalScreenWidth ?	screenProperties->iMaxPhysicalScreenWidth : TInt(screenProperties->iScreenWidth*KDefaultPixelsToTwipsX);
+		aInfo.iSizeInTwips.iHeight = screenProperties->iMaxPhysicalScreenHeight ? screenProperties->iMaxPhysicalScreenHeight : TInt(screenProperties->iScreenHeight*KDefaultPixelsToTwipsY);
+		}
+	else
+		{
+		aInfo.iSizeInTwips.iWidth = screenProperties->iPhysicalScreenWidth ? screenProperties->iPhysicalScreenWidth : TInt(screenProperties->iScreenWidth*KDefaultPixelsToTwipsX);
+		aInfo.iSizeInTwips.iHeight = screenProperties->iPhysicalScreenHeight ? screenProperties->iPhysicalScreenHeight : TInt(screenProperties->iScreenHeight*KDefaultPixelsToTwipsY);
+		}
+	
+	aInfo.iIsMono = EFalse;
+	aInfo.iIsPalettized = EFalse;
+	aInfo.iDisplayMode=screenProperties->iCurrentMode;
+	aInfo.iIsPixelOrderRGB = ETrue;
+	aInfo.iIsPixelOrderLandscape=ETrue;
+	
+	// Set memory to iVideoAddress to NULL to trigger the HAL code into querying the video address
+	// separately
+	aInfo.iVideoAddress = NULL;
+
+	TInt bpp=screenProperties->iModeDepths[aModeNumber&KMaskModeNum];												
+	aInfo.iBitsPerPixel=bpp;
+	if (bpp>8)
+		{
+		bpp=(bpp+15)&-16;	//12 & 16 --> 16 ; 24 & 32 --> 32
+		}
+	
+	aInfo.iOffsetToFirstPixel=0;
+#ifdef TEST_GCE_VARIABLE_START_EXTRA
+	aInfo.iOffsetToFirstPixel+= TEST_GCE_VARIABLE_START_EXTRA*(1+aModeNumber&KMaskScreenModeNum);
+	if ((aModeNumber& KModeFlagFlipped)
+		{
+#ifndef ASSYMETRIC_SQUARE_STRIDE		
+		if (aInfo.iSizeInPixels.iWidth!=aInfo.iSizeInPixels.iHeight)
+#endif
+			aInfo.iOffsetToFirstPixel+= TEST_GCE_VARIABLE_START_EXTRA*KEmulMaxNumModes;	
+		}
+#endif
+	if (aModeNumber& KModeFlagFlipped)
+		{
+		// we calculate the number of bytes per scanline that MUST be a multiple of 32 bits word (alignment)
+		// screenProperties->iMaxScreenHeight * bpp represnts the number of bits per scanline
+		// +31 is the ceiling
+		// we shift right (>>3) because there are 8 bits/byte
+		// we mask with ~3 because we are intrested in the octet value
+		aInfo.iOffsetBetweenLines=((screenProperties->iMaxScreenHeight * bpp + 31) >> 3) & ~3;
+		}
+	else
+		{
+		// please see the comment above
+		aInfo.iOffsetBetweenLines=((screenProperties->iMaxScreenWidth * bpp + 31) >> 3) & ~3;
+		}
+#ifdef  TEST_GCE_VARIABLE_STRIDE_EXTRA
+	aInfo.iOffsetBetweenLines+=TEST_GCE_VARIABLE_STRIDE_EXTRA;
+#endif	
+
+	return ETrue;	
+	}
+
+TInt DMasterIni::DoHalFunction(TAny* aPtr, TInt aFunction, TAny* a1, TAny* a2)
+	{
+	return masterIni->HalFunction((TInt)aPtr,aFunction,a1,a2);
+	}
+
+
+TInt DMasterIni::HalFunction(TInt aDeviceNumber, TInt aFunction, TAny* a1, TAny* a2)
+	{
+	if (TUint(aDeviceNumber) >= TUint(systemIni->iScreens.Count()))
+		return KErrArgument;
+	
+	TInt mode;
+	TInt maxMode=1;
+	TInt r=KErrNone;
+	switch(aFunction)
+		{
+		case EDisplayHalScreenInfo:
+			{
+			TPckgBuf<TScreenInfoV01> vPckg;
+			systemIni->ScreenInfo(vPckg());
+			Kern::InfoCopy(*(TDes8*)a1,vPckg);
+			break;
+			}
+		case EDisplayHalWsRegisterSwitchOnScreenHandling:
+			WsSwitchOnScreen=(TBool)a1;
+			break;
+		case EDisplayHalSetState:
+			{
+			if(!Kern::CurrentThreadHasCapability(ECapabilityPowerMgmt,__PLATSEC_DIAGNOSTIC_STRING("Checked by Hal function EDisplayHalSetState")))
+				return KErrPermissionDenied;
+			if ((TBool)a1)
+				WinsGuiPowerHandler->ScreenOn(aDeviceNumber);
+			else
+				WinsGuiPowerHandler->ScreenOff(aDeviceNumber);
+			}
+			break;
+
+		case EDisplayHalState:
+			*(TInt*)a1=!systemIni->iScreens[aDeviceNumber]->iScreenOff;
+			break;
+		case EDisplayHalWsSwitchOnScreen:
+			WinsGuiPowerHandler->ScreenOn();
+			break;
+		case EDisplayHalMaxDisplayContrast:
+			kumemput32(a1,&KMaxDisplayContrast,sizeof(KMaxDisplayContrast));
+			break;
+		case EDisplayHalDisplayContrast:
+			kumemput32(a1,&systemIni->iScreens[aDeviceNumber]->iDisplayContrast,sizeof(systemIni->iScreens[aDeviceNumber]->iDisplayContrast));
+			break;
+		case EDisplayHalSetDisplayContrast:
+			if(!Kern::CurrentThreadHasCapability(ECapabilityWriteDeviceData,__PLATSEC_DIAGNOSTIC_STRING("Checked by Hal function EDisplayHalSetDisplayContrast")))
+				return KErrPermissionDenied;
+			if (TUint(a1) <= TUint(KMaxDisplayContrast))
+				systemIni->iScreens[aDeviceNumber]->iDisplayContrast = TInt(a1);
+			else
+				r = KErrArgument;
+			break;
+		case EDisplayHalBacklightOn:
+			{
+			TBool c = EFalse;
+			kumemput32(a1,&c,sizeof(TBool));
+			}
+			break;
+		
+		case EDisplayHalCurrentModeInfo:
+			{
+			//a1 has ptr to buffer for results
+			TPckgBuf<TVideoInfoV01> vPckg;
+			if (systemIni->VideoInfo(aDeviceNumber, vPckg()))
+				Kern::InfoCopy(*(TDes8*)a1,vPckg);
+			else
+				r=KErrNotSupported;
+			}
+			break;
+
+		case EDisplayHalSpecifiedModeInfo:
+			{
+			kumemget32(&mode, a1, sizeof(mode));
+			TPckgBuf<TVideoInfoV01> vPckg;
+			if (!systemIni->VideoInfo(aDeviceNumber, mode, vPckg()))
+				return KErrArgument;
+			Kern::InfoCopy(*(TDes8*)a2, vPckg);
+			}
+			break;
+
+		case EDisplayHalSetMode:
+// 			if(!Kern::CurrentThreadHasCapability(ECapabilityMultimediaDD,__PLATSEC_DIAGNOSTIC_STRING("Checked by Hal function EDisplayHalSetMode")))
+// 				return KErrPermissionDenied;
+
+			//Note that at present the HAL mode does not apparently get set when the CFbsScreenDevice requires a different mode.
+			//At least in the emulator and default h4 implementation...
+			
+			mode=KMaskModeNum&(TInt) a1;
+			maxMode=1;
+			//can't avoid this behaviour change test against gce loaded 
+			if (masterIni->iBufferSet.Count() &&  masterIni->iBufferSet[aDeviceNumber].iDisplayDriverCount > 0)
+				maxMode=systemIni->iScreens[aDeviceNumber]->iMaxModes;
+			if (mode >=maxMode || mode<0)
+				{
+				r = KErrArgument;
+				break;
+				}
+			//Harmless/Pointless in vanilla wins mode.
+			systemIni->iScreens[aDeviceNumber]->iCurrentMode=mode;
+			
+			break;
+		
+		case EDisplayHalMode:
+			{
+			//This is always 0 in non-gce emulator
+			kumemput32(a1,&systemIni->iScreens[aDeviceNumber]->iCurrentMode,sizeof(systemIni->iScreens[aDeviceNumber]->iCurrentMode));
+			}
+			break;
+
+		case EDisplayHalModeCount:
+			{
+			//Need to actually count them here!
+			//GCE will ignore modes<=8
+			TInt encodedMode=1;
+			if (masterIni->iBufferSet.Count() &&  masterIni->iBufferSet[aDeviceNumber].iDisplayDriverCount > 0)
+				encodedMode=systemIni->iScreens[aDeviceNumber]->iMaxModes;
+			kumemput32(a1,&encodedMode,sizeof(encodedMode));
+			}
+			break;
+
+		case EDisplayHalColors:
+			{
+			TInt deepestMode=0;
+			if (masterIni->iBufferSet.Count()==0 ||  masterIni->iBufferSet[aDeviceNumber].iDisplayDriverCount <= 0)
+				{
+				deepestMode = KMaxDisplayColors;  	//I could try and work it out, but this is what used to happen!
+				}
+			else
+				{
+				TInt maxBpp=0;
+				for (TInt i=0,maxI=systemIni->iScreens[aDeviceNumber]->iMaxModes;i<maxI;i++)	
+					if (systemIni->iScreens[aDeviceNumber]->iModeDepths[i]>maxBpp)
+						maxBpp=systemIni->iScreens[aDeviceNumber]->iModeDepths[i];
+				deepestMode= 1<<maxBpp;
+				}
+
+			kumemput32(a1,&deepestMode,sizeof(deepestMode));
+			}
+			break;
+		case EDisplayHalGetDisplayMemoryHandle:
+			{
+			TInt val = 0;
+			TInt passedIn = 0;
+			kumemget32(&passedIn, a1, sizeof(TInt));
+			if (passedIn != -1)	//not from a getall
+				{
+				NKern::ThreadEnterCS();
+				if (!(masterIni->iBufferSet.Count() == 0 || masterIni->iBufferSet[aDeviceNumber].iDisplayDriverCount <= 0 ))
+					{
+						r = masterIni->DisplayMemoryHandle(aDeviceNumber, val); 
+					}
+				else
+					{
+					r = KErrArgument;
+					}
+				NKern::ThreadLeaveCS();
+				}
+			kumemput32(a1, &val, sizeof(TInt));
+
+			}
+			break;
+
+		case EDisplayHalGetDisplayMemoryAddress:
+			{
+			TInt val = 0;
+			TInt passedIn = 0;
+			kumemget32(&passedIn, a1, sizeof(TInt));
+			if (passedIn != -1)	//not from a getall
+				{
+				if (!(masterIni->iBufferSet.Count() == 0 || masterIni->iBufferSet[aDeviceNumber].iDisplayDriverCount <= 0 ))
+					{
+					r = masterIni->DisplayMemoryAddress(aDeviceNumber, val);
+					}
+				else
+					{
+					r = KErrArgument;
+					}
+				}
+			kumemput32(a1, &val, sizeof(TInt));
+			}
+			break;
+
+		case EDisplayHalNumberOfResolutions:
+			{
+			r = NumberOfResolutions(aDeviceNumber, a1, a2);
+			}
+			break;
+		case EDisplayHalSpecificScreenInfo:
+			{
+			r = SpecificScreenInfo(aDeviceNumber, a1, a2);
+			}
+			break;
+		case EDisplayHalCurrentScreenInfo:
+			{
+			r = CurrentScreenInfo(aDeviceNumber, a1, a2);			
+			}
+			break;
+		case EDisplayHalSetDisplayState:
+			{
+			//increase the spinner at both beginning and end of resetting the display state
+			NKern::LockedInc(iBufferSet[aDeviceNumber].iStateChangeCount);
+			kumemget32(&iBufferSet[aDeviceNumber].iDisplayState, a1, sizeof(TInt));
+
+			switch(iBufferSet[aDeviceNumber].iDisplayState)
+				{
+				case ENoResolution:
+				case EDisconnect:
+				case ESingleResolution:
+					// the fascia effect of 0x0 resolution
+					SetDisplaySize(aDeviceNumber, 0, 0);
+					break;
+				}
+
+			NKern::LockedInc(iBufferSet[aDeviceNumber].iStateChangeCount);
+			}
+			break;
+		case EDisplayHalGetStateSpinner:
+			{
+			kumemput32(a1,&iBufferSet[aDeviceNumber].iStateChangeCount,
+					sizeof(iBufferSet[aDeviceNumber].iStateChangeCount));
+			}
+			break;
+		default:
+			r=KErrNotSupported;
+			break;
+		}
+	return r;
+	}
+
+TInt DMasterIni::NumberOfResolutions(TInt aDeviceNumber, TAny* a1, TAny* a2)
+	{
+	TInt numberOfConfigs;
+	switch(iBufferSet[aDeviceNumber].iDisplayState)
+		{
+		case ENoResolution:
+			{
+			numberOfConfigs = 0;
+			}
+			break;
+		case EDisconnect:
+			{
+			return KErrDisconnected;
+			}
+			break;
+		case ESingleResolution:
+			{
+			numberOfConfigs = 1;
+			}
+			break;
+		case ENormalResolution:
+		default:
+			{
+			numberOfConfigs = iSystemInis.Count();
+			if (numberOfConfigs > 1)
+				{
+				TVideoInfoV01 info1;
+				TVideoInfoV01 info2;
+				iSystemInis[0]->VideoInfoForDisplayDriver(aDeviceNumber, 0, info1, ETrue);
+				iSystemInis[1]->VideoInfoForDisplayDriver(aDeviceNumber, 0, info2, ETrue);
+				if (info1.iSizeInPixels.iWidth == info2.iSizeInPixels.iWidth &&
+						info1.iSizeInPixels.iHeight == info2.iSizeInPixels.iHeight)
+					{
+					numberOfConfigs = 1;	//It looks like all resolutions for this device are the same
+					}
+				}
+			}
+		}
+	kumemput32(a1,&numberOfConfigs,sizeof(numberOfConfigs));
+	if(a2)
+		{
+		kumemput32(a2,&(iBufferSet[aDeviceNumber].iStateChangeCount),sizeof(iBufferSet[aDeviceNumber].iStateChangeCount));
+		}
+	return KErrNone;
+	}
+
+TInt DMasterIni::SpecificScreenInfo(TInt aDeviceNumber, TAny* a1, TAny* a2)
+	{
+	TInt config;
+	switch(iBufferSet[aDeviceNumber].iDisplayState)
+		{
+		case ENoResolution: //Do Nothing
+			break;
+		case EDisconnect:
+			{
+			return KErrDisconnected;
+			}
+			break;
+		case ESingleResolution: //fill (0,0) as the only element in resolution array
+			{
+			if(*(TInt*)a1 == 0)
+				{
+				TVideoInfoV01 info;
+				info.iSizeInPixels.iHeight = 0;
+				info.iSizeInPixels.iWidth = 0;
+				info.iSizeInTwips.iHeight = 0;
+				info.iSizeInTwips.iWidth = 0;
+				TPtr8 infoPtr((TUint8*)&info, sizeof(info), sizeof(info));
+				Kern::InfoCopy(*(TDes8*)a2, infoPtr);
+				}
+			}
+			break;
+		case ENormalResolution:
+		default:
+			{
+			kumemget32(&config, a1, sizeof(config));
+			TPckgBuf<TVideoInfoV01> vPckg;
+			iSystemInis[config]->VideoInfoForDisplayDriver(aDeviceNumber, 0, vPckg(), ETrue);
+			Kern::InfoCopy(*(TDes8*)a2,vPckg);
+			}
+		}
+	return KErrNone;
+	}
+
+TInt DMasterIni::CurrentScreenInfo(TInt aDeviceNumber, TAny* a1, TAny* /*a2*/)
+	{
+	switch(iBufferSet[aDeviceNumber].iDisplayState)
+		{
+		case ENoResolution: //Do Nothing
+			break;
+		case EDisconnect:
+			{
+			return KErrDisconnected;
+			}
+			break;
+		case ESingleResolution: //fill (0,0)
+			{
+			TVideoInfoV01 info;
+			info.iSizeInPixels.iHeight = 0;
+			info.iSizeInPixels.iWidth = 0;
+			info.iSizeInTwips.iHeight = 0;
+			info.iSizeInTwips.iWidth = 0;
+			TPtr8 infoPtr((TUint8*)&info, sizeof(info), sizeof(info));
+			Kern::InfoCopy(*(TDes8*)a1, infoPtr);
+			}
+			break;
+		case ENormalResolution:
+		default:
+			{
+			TPckgBuf<TVideoInfoV01> vPckg;
+			systemIni->VideoInfoForDisplayDriver(aDeviceNumber, 0, vPckg(), ETrue);
+			Kern::InfoCopy(*(TDes8*)a1,vPckg);
+			}
+		}
+	return KErrNone;
+	}
+
+TInt DMasterIni::DoXYHalFunction(TAny* aThis, TInt aFunction, TAny* a1, TAny* a2)
+	{
+	return static_cast<DMasterIni*>(aThis)->XYHalFunction(aFunction,a1,a2);
+	}
+
+TInt DMasterIni::XYHalFunction(TInt aFunction, TAny* a1, TAny* /*a2*/)
+	{
+	TInt r=KErrNone;
+	switch(aFunction)
+		{
+		case EDigitiserHalXYInfo:
+			{
+			if(systemIni->iXYInputType==EXYInputPointer)
+				{
+				TPckgBuf<TDigitiserInfoV01> vPckg;
+				TDigitiserInfoV01& xyinfo=vPckg();
+				xyinfo.iDigitiserSize.iWidth=max(systemIni->iScreens[0]->iXYInputWidth,systemIni->iScreens[0]->iMaxScreenWidth+systemIni->iScreens[0]->iScreenOffsetX);		
+				xyinfo.iDigitiserSize.iHeight=max(systemIni->iScreens[0]->iXYInputHeight,systemIni->iScreens[0]->iMaxScreenHeight+systemIni->iScreens[0]->iScreenOffsetY);
+				xyinfo.iOffsetToDisplay.iX=systemIni->iScreens[0]->iScreenOffsetX;
+				xyinfo.iOffsetToDisplay.iY=systemIni->iScreens[0]->iScreenOffsetY;
+				Kern::InfoCopy(*(TDes8*)a1,vPckg);
+				}
+			else
+				r=KErrNotSupported;
+			}
+			break;
+		default:
+			r=KErrNotSupported;
+			break;
+		}
+	return r;
+	}
+
+TInt DMasterIni::DoMouseHalFunction(TAny* aThis, TInt aFunction, TAny* a1, TAny* a2)
+	{
+	return static_cast<DMasterIni*>(aThis)->MouseHalFunction(aFunction,a1,a2);
+	}
+
+TInt DMasterIni::MouseHalFunction(TInt aFunction, TAny* a1, TAny* /*a2*/)
+	{
+	TInt r=KErrNone;
+	switch(aFunction)
+		{
+		case EMouseHalMouseInfo:
+			{
+			if(systemIni->iXYInputType==EXYInputMouse || systemIni->iXYInputType==EXYInputDeltaMouse)
+				{
+				TPckgBuf<TMouseInfoV01> vPckg;
+				TMouseInfoV01& xyinfo=vPckg();
+				xyinfo.iMouseButtons=2;
+				xyinfo.iMouseAreaSize.iWidth=max(systemIni->iScreens[0]->iXYInputWidth,systemIni->iScreens[0]->iMaxScreenWidth+systemIni->iScreens[0]->iScreenOffsetX);		
+				xyinfo.iMouseAreaSize.iHeight=max(systemIni->iScreens[0]->iXYInputHeight,systemIni->iScreens[0]->iMaxScreenHeight+systemIni->iScreens[0]->iScreenOffsetY);
+				xyinfo.iOffsetToDisplay.iX=systemIni->iScreens[0]->iScreenOffsetX;
+				xyinfo.iOffsetToDisplay.iY=systemIni->iScreens[0]->iScreenOffsetY;
+				Kern::InfoCopy(*(TDes8*)a1,vPckg);
+				}
+			else
+				r=KErrNotSupported;
+			}
+			break;
+		default:
+			r=KErrNotSupported;
+			break;
+		}
+	return r;
+	}
+
+TInt DMasterIni::DoKbdHalFunction(TAny* /*aThis*/, TInt aFunction, TAny* /*a1*/, TAny* /*a2*/)
+	{
+	// don't actually do anything, just enough to report a Keyboard is present
+	TInt r=KErrNone;
+	if(aFunction!=EKeyboardHalKeyboardInfo)
+		r=KErrNotSupported;
+	return r;
+	}
+
+void Inactive()
+//
+// Window has been minimised.
+//
+    {
+
+	TRawEvent v;
+	v.Set(TRawEvent::EInactive);
+    TheEventQ.Add(v);
+    }
+
+void UpdateModifiers()
+//Updates the modifier key states and sends an event to wserv about the 
+//change in state
+	{
+	TRawEvent v;
+	TInt modifiers=0;
+    if(GetKeyState(VK_SCROLL)&1)
+        modifiers|=EModifierScrollLock;
+    if(GetKeyState(VK_NUMLOCK)&1)
+        modifiers|=EModifierNumLock;
+    if(GetKeyState(VK_CAPITAL)&1)
+        modifiers|=EModifierCapsLock;
+    v.Set(TRawEvent::EUpdateModifiers,modifiers);
+    TheEventQ.Add(v);
+	}
+	
+void Active()
+//
+// Window has been restored.
+// Update the toggling modifiers, reset any others
+//
+    {
+	TRawEvent v;
+    UpdateModifiers();
+    v.Set(TRawEvent::EActive);
+    TheEventQ.Add(v);
+    }
+
+
+void ClearScreen()
+    {
+
+    }
+
+
+TInt DWinsUi::GetVirtualKey(TEmulCommand& aCommand, TInt aX, TInt aY)
+	{
+	//if the point is in the list of shapes, set the key and return true
+	for (TInt keyCount = iVirtualKeys.Count(); --keyCount >= 0; )
+		{
+		const VirtualKey& vk = *iVirtualKeys[keyCount];
+		if (vk.Contains(aX, aY))
+			{
+			aCommand = vk.Command();
+			return vk.Value();
+			}
+		}
+	return -1;
+	}
+
+void DWinsUi::TranslateMouseCoords(const TEmulatorFlip aFlipState, const TInt aX, const TInt aY, const TInt aRegionWidth, const TInt aRegionHeight, TInt& aNewX, TInt& aNewY)
+	{
+	switch (aFlipState)
+		{
+		case EEmulatorFlipRestore:
+			aNewX = aX;
+			aNewY = aY;
+			break;
+		
+		case EEmulatorFlipInvert:
+			aNewX = aRegionWidth - aX;
+			aNewY = aRegionHeight - aY;
+			break;
+		
+		case EEmulatorFlipLeft:
+			aNewX = aRegionWidth - aY;
+			aNewY = aX;
+			break;
+
+		case EEmulatorFlipRight:
+			aNewX = aY;
+			aNewY = aRegionHeight - aX;
+			break;
+		}
+	}
+
+
+TBool DWinsUi::OnScreen(TInt aScreen, TInt ax, TInt ay) const
+//
+// Checks if a point within the Emulator window is on the screen
+//
+	{
+	return (TUint(ax) < TUint(systemIni->iScreens[aScreen]->iScreenWidth) && TUint(ay) < TUint(systemIni->iScreens[aScreen]->iScreenHeight));
+	}
+
+TInt DWinsUi::Create(TInt aId)
+	{
+	TInt r = SetupProperties(aId);
+	if (r != KErrNone)
+		return r;
+	TInt screen;
+	DScreenProperties* currentScreen = NULL;
+	for(screen=0;screen<iScreens.Count();screen++)
+		{
+		BITMAPINFOHEADER bitmapinfo;
+		currentScreen = iScreens[screen];
+		if (readBitmapInfo(&bitmapinfo, currentScreen->iFasciaFileName) == KErrNone)
+			{
+			currentScreen->iXYInputWidth=bitmapinfo.biWidth;
+			currentScreen->iXYInputHeight=bitmapinfo.biHeight;
+			}
+		currentScreen->iXYInputWidth=max(currentScreen->iXYInputWidth,currentScreen->iScreenWidth+currentScreen->iScreenOffsetX);
+		currentScreen->iXYInputHeight=max(currentScreen->iXYInputHeight,currentScreen->iScreenHeight+currentScreen->iScreenOffsetY);
+		}
+
+	currentScreen = iScreens[0];
+	//note digitizer offsets are relative to EPOC screen 0
+	if (-1 == iDigitizerWidth)
+		iDigitizerWidth = currentScreen->iXYInputWidth - 
+			(currentScreen->iScreenOffsetX + iDigitizerOffsetX);
+	else
+		currentScreen->iXYInputWidth=max(currentScreen->iXYInputWidth,iDigitizerWidth);
+
+	if (-1 == iDigitizerHeight)
+		iDigitizerHeight = currentScreen->iXYInputHeight - 
+			(currentScreen->iScreenOffsetY + iDigitizerOffsetY);
+	else
+		currentScreen->iXYInputHeight=max(currentScreen->iXYInputHeight,iDigitizerHeight);
+
+	return r;
+	}
+
+const RDisplayChannel::TPixelFormat DMasterIni::iSupportedPixelFormatTable[] =
+	{
+		EUidPixelFormatXRGB_8888,
+		EUidPixelFormatARGB_8888,
+		EUidPixelFormatARGB_8888_PRE,
+		EUidPixelFormatXRGB_4444,
+		EUidPixelFormatARGB_4444,
+		EUidPixelFormatRGB_565 
+	};
+
+const TInt DMasterIni::iSupportedPixelFormatTableSize = static_cast<TInt>(sizeof(iSupportedPixelFormatTable)/
+		                                                                  sizeof(iSupportedPixelFormatTable[0]));
+
+void DMasterIni::InitBufferFormat(DScreenProperties& aScreenProperties, RDisplayChannel::TBufferFormat& aBufferFormat)
+	{
+	TUint bitsPerPixel = MaximumBitDepthFromMask(aScreenProperties.iColorDepth);
+	
+	aBufferFormat.iSize.iWidth = aScreenProperties.iMaxScreenWidth;
+	aBufferFormat.iSize.iHeight = aScreenProperties.iMaxScreenHeight;
+	switch (bitsPerPixel)
+		{
+	case 12:	// XRGB4444
+		aBufferFormat.iPixelFormat = EUidPixelFormatXRGB_4444;
+		break;
+	case 16:	// RGB565
+		aBufferFormat.iPixelFormat = EUidPixelFormatRGB_565;
+			break;
+	case 24:	// Really 32bpp, but top 8 unused
+	case 32:	// While 32bpp, top 8 will not be used
+	default:
+		aBufferFormat.iPixelFormat = EUidPixelFormatXRGB_8888;
+			break;
+		}
+	}
+
+TInt DMasterIni::Create()
+	{
+	TInt configurations = Property::GetInt("ConfigCount", 0);
+	if (configurations == 0)
+		return KErrGeneral;
+
+	// the pixel formats table is, at present, configuration independent
+	TInt count;
+	TInt r = KErrNone;
+	for (count = 0; count < configurations && r == KErrNone; ++count)
+		{
+		DWinsUi* dwi = new DWinsUi;
+		if (dwi)
+			r = dwi->Create(count);
+
+		if (r == KErrNone)
+			iSystemInis.Append(dwi);
+		}
+	if (r != KErrNone)
+		return r;
+
+	systemIni = masterIni->iSystemInis[0];
+
+	WinsGuiPowerHandler = DWinsGuiPowerHandler::New();
+	if (!WinsGuiPowerHandler)
+		return KErrNoMemory;
+
+	TheWin=new HWND[systemIni->iScreens.Count()];
+	TheChildWin=new HWND[systemIni->iScreens.Count()];
+	TheScreenBitmap=new HBITMAP[systemIni->iScreens.Count()];
+	CurrentFlipState=new TEmulatorFlip[systemIni->iScreens.Count()];
+
+	if(!TheWin || !TheChildWin || !TheScreenBitmap || !CurrentFlipState)
+		return KErrNoMemory;
+	memset(CurrentFlipState,EEmulatorFlipRestore,systemIni->iScreens.Count());
+
+	TBufferSet buffer;
+	buffer.iDisplayDriverCount = 0;
+	buffer.iDisplayState = ENormalResolution;
+	buffer.iDisplayBuffer = 0;
+	buffer.iDisplayChannel = NULL;
+
+
+	TInt i;
+	for(i=0;i<systemIni->iScreens.Count();i++)
+		{
+		DScreenProperties *pScr = systemIni->iScreens[i];
+
+		masterIni->InitBitmapHeader(*pScr, &buffer.iInfo);
+		masterIni->InitBufferFormat(*pScr, buffer.iBufferFormat);
+
+		r = masterIni->iBufferSet.Append(buffer);
+		if (r != KErrNone)
+			return r;
+		}
+
+	if (CreateWin32Thread(EThreadEvent, &KernelWindowThread, NULL, ETrue) == NULL)
+		return KErrGeneral;
+
+	for(i=0;i<systemIni->iScreens.Count();i++)
+		{
+		r = Kern::AddHalEntry(EHalGroupDisplay,&DoHalFunction,(TAny*)i,i);
+		if (r != KErrNone)
+			return r;
+		}
+
+	// should really come from Keyboard driver, but not doing it now...
+	r = Kern::AddHalEntry(EHalGroupKeyboard,&DoKbdHalFunction,this);
+	if (r != KErrNone)
+		return r;
+
+	if(systemIni->iXYInputType==EXYInputPointer)
+		{
+		r = Kern::AddHalEntry(EHalGroupDigitiser,&DoXYHalFunction,this);
+		if (r != KErrNone)
+			return r;
+		}
+	else if(systemIni->iXYInputType==EXYInputMouse || systemIni->iXYInputType==EXYInputDeltaMouse)
+		{
+		r = Kern::AddHalEntry(EHalGroupMouse,&DoMouseHalFunction,this);
+		if (r != KErrNone)
+			return r;
+		}
+
+	return r;
+	}
+
+void DMasterIni::InitBitmapHeader(DScreenProperties& aScreenProperties, LPBITMAPV4HEADER aInfo)
+	{
+	TInt width = aScreenProperties.iMaxScreenWidth; 
+	TInt height = aScreenProperties.iMaxScreenHeight;
+	TUint bitsPerPixel = MaximumBitDepthFromMask(aScreenProperties.iColorDepth);
+
+	memset(aInfo, 0, sizeof(BITMAPV4HEADER));
+
+	switch (bitsPerPixel)
+		{
+	case 12:	// XRGB4444
+			aInfo->bV4BitCount = 16;
+			aInfo->bV4V4Compression = BI_BITFIELDS;
+			aInfo->bV4RedMask   = 0x0F00;
+			aInfo->bV4GreenMask = 0x00F0;
+			aInfo->bV4BlueMask  = 0x000F;
+			break;
+	case 16:	// RGB565
+			aInfo->bV4BitCount = 16;
+			aInfo->bV4V4Compression = BI_BITFIELDS;
+			aInfo->bV4RedMask   = 0xF800;
+			aInfo->bV4GreenMask = 0x07E0;
+			aInfo->bV4BlueMask  = 0x001F;
+			break;
+	case 24:	// Really 32bpp, but top 8 unused
+	case 32:	// While 32bpp, top 8 will not be used
+	default:
+			aInfo->bV4BitCount = 32;
+			aInfo->bV4V4Compression = BI_RGB;
+			// Mask is implicit for BI_RGB compression
+			break;
+		}
+	
+	aInfo->bV4Size = sizeof(BITMAPV4HEADER);
+	aInfo->bV4Width = width;
+	aInfo->bV4Height = -height;	// Bitmap runs top to bottom
+	aInfo->bV4Planes = 1;
+	
+	TInt bpp = _ALIGN_UP(aInfo->bV4BitCount, 16); //12 & 16 --> 16 ; 24 & 32 --> 32
+	TInt widthInPixel = aInfo->bV4Width * bpp;
+	//rounding to 32 bits (4 octets) and converting, then, bits to octets;
+	TInt scanLineInBytes = _ALIGN_UP(widthInPixel, 32) >> 3; 
+	aInfo->bV4SizeImage = -aInfo->bV4Height * scanLineInBytes;
+
+	// Set color space as uncalibrated. All other members are then ignored.
+#if defined(LCS_DEVICE_RGB)
+	aInfo->bV4CSType = LCS_DEVICE_RGB;
+#elif defined(LCS_sRGB)
+	aInfo->bV4CSType = LCS_sRGB;
+#endif
+	}
+
+// Helper function that allocates a single frame buffer. 
+static TInt AllocateOneFrameBuffer(TInt aSize, TScreenBuffer &aScreenBuffer)
+	{
+    // Open shared chunk to the composition framebuffer
+	DChunk* chunk = 0;
+	// round to page size
+	if (aSize <= 0)
+		return KErrArgument;
+	TUint round = Kern::RoundToPageSize(aSize);
+	TLinAddr chunkKernelAddr = 0;
+	TUint32 physicalAddress = 0;
+	TUint32 chunkMapAttr = 0;
+
+	// create shared chunk
+	NKern::ThreadEnterCS();
+
+	TChunkCreateInfo info;
+	info.iType = TChunkCreateInfo::ESharedKernelMultiple;
+	info.iMaxSize = round;
+	info.iMapAttr = 0;
+	info.iOwnsMemory = ETrue;
+	info.iDestroyedDfc = 0;
+
+	TInt r = Kern::ChunkCreate(info, chunk, chunkKernelAddr, chunkMapAttr);
+	if (r == KErrNone)
+		{
+		// map our chunk to specific 
+		r = Kern::ChunkCommitContiguous(chunk, 0, aSize, physicalAddress);
+		if (r != KErrNone)
+			{
+			Kern::ChunkClose(chunk);
+			}
+		}
+
+	if (r == KErrNone)
+		{
+		TBufferAddressA* bufferAddress = new TBufferAddressA;
+		if (!bufferAddress)
+			{
+			r = KErrNoMemory;
+			}
+		else 
+			{
+			bufferAddress->iAddress = (TAny*)chunkKernelAddr;
+			bufferAddress->iChunk = chunk;
+
+			if ((r = aScreenBuffer.iFrameBuffers.Append(bufferAddress->iAddress)) == KErrNone)
+				{
+				r = aScreenBuffer.iMemChunks.Append(bufferAddress);
+				}
+			}
+		}
+	if (r != KErrNone)
+		{
+		Kern::ChunkClose(chunk);
+		}
+	NKern::ThreadLeaveCS();
+	return KErrNone;
+	}
+
+TInt DMasterIni::AllocateFrameBuffers(TInt aScreenNumber, TInt aCount, TInt aSize)
+	{
+	while (aCount--)
+		{
+		TInt r = AllocateOneFrameBuffer(aSize, masterIni->iBufferSet[aScreenNumber].iScreenBuffer);
+		if (r != KErrNone)
+			{
+			return r;
+			}
+		}
+	return KErrNone;
+	}
+
+void DMasterIni::ReleaseFrameBuffers(TInt aScreenNumber)
+	{
+	RPointerArray<TAny>& frameBuffers = masterIni->iBufferSet[aScreenNumber].iScreenBuffer.iFrameBuffers;
+	RPointerArray<TBufferAddressA>& memChunks = masterIni->iBufferSet[aScreenNumber].iScreenBuffer.iMemChunks;
+	RPointerArray<TBufferAddressA>& dsaChunks = masterIni->iBufferSet[aScreenNumber].iDsaBuffer.iMemChunks;
+
+   	NKern::ThreadEnterCS();
+	TInt index;
+	TInt count = memChunks.Count();
+	for (index = 0; index < count; index++)
+		{
+		Kern::ChunkClose(memChunks[index]->iChunk);
+		}
+	count = dsaChunks.Count();
+	for (index = 0; index < count; index++)
+		{
+		Kern::ChunkClose(dsaChunks[index]->iChunk);
+		}
+	NKern::ThreadLeaveCS();
+	
+	frameBuffers.Reset();
+	memChunks.Reset();
+	dsaChunks.Reset();
+	}
+
+
+TProcessAddrEntry::TProcessAddrEntry(DProcess *aProcess, TUint8* aAddress): 
+	iProcess(aProcess), iAddress(aAddress)
+	{
+	}
+
+
+/**
+Contruct a Shared Chunk cleanup object which will be used to clean up 
+after the process/address table entry. 
+*/
+TChunkCleanup::TChunkCleanup(DProcess* aProcess, TInt aScreenNumber)
+    : TDfc((TDfcFn)TChunkCleanup::ChunkDestroyed,this,Kern::SvMsgQue(),0)
+    , iProcess(aProcess)
+    , iScreenNumber(aScreenNumber)
+    , iIndex(-1)
+    {}
+
+/**
+Cancel the action of the cleanup object.
+*/
+void TChunkCleanup::Cancel()
+    {
+    // Clear iProcess which means that when the DFC gets queued on chunk destruction
+    // our ChunkDestroyed method will do nothing other than cleanup itself.
+    iProcess = NULL;
+    }
+
+/**
+Callback function called when the DFC runs, i.e. when a chunk is destroyed.
+*/
+void TChunkCleanup::ChunkDestroyed(TChunkCleanup* aSelf)
+    {
+    DProcess* process = aSelf->iProcess;
+    TInt screenNumber = aSelf->iScreenNumber;
+    TUint index = aSelf->iIndex;
+    // If we haven't been Cancelled...
+    if(process && index != -1)
+        {
+    	if (masterIni->iBufferSet[screenNumber].iProcAddrTable[index].iProcess == process)
+    		{
+    		masterIni->iBufferSet[screenNumber].iProcAddrTable[index].iProcess = 0;
+    		}
+    	else
+    		{
+    		__KTRACE_OPT(KEXTENSION,Kern::Printf("Oops! Someone has messed up our process index!"));
+    		}
+        }
+
+    // We've finished so now delete ourself
+    delete aSelf;
+    }
+
+
+TInt DMasterIni::DisplayMemoryHandle(TInt aScreenNumber, TInt& aHandle)
+	{
+	if (iBufferSet[aScreenNumber].iDsaBuffer.iMemChunks.Count() == 0)
+		{	
+		int r;
+		r = AllocateOneFrameBuffer(iMaxSizeInBytes, iBufferSet[aScreenNumber].iDsaBuffer);
+		if (KErrNone != r)
+			{
+			return r;
+			}
+		__ASSERT_DEBUG(iBufferSet[aScreenNumber].iDisplayChannel, Fault(EGuiNoDisplayChannel));
+		iBufferSet[aScreenNumber].iDisplayChannel->SetLegacyBuffer(iBufferSet[aScreenNumber].iDsaBuffer.iFrameBuffers[0]);
+		}
+	
+	aHandle = Kern::MakeHandleAndOpen(&Kern::CurrentThread(), 
+			iBufferSet[aScreenNumber].iDsaBuffer.iMemChunks[0]->iChunk);
+	
+	if (aHandle < 0)
+		{
+		return aHandle;
+		}
+	
+	return KErrNone;
+	}
+
+
+
+// Find the address of the display memory. 
+TInt DMasterIni::DisplayMemoryAddress(TInt aScreenNumber, TInt& aAddress)
+	{
+	TBufferSet &bufferSet = iBufferSet[aScreenNumber]; 
+	DProcess *process = &Kern::CurrentProcess();
+	TInt firstFree = -1;
+	NKern::FMWait(&iLock);
+	TUint count = bufferSet.iProcAddrTable.Count();
+	for(TUint i = 0; i < count; ++i)
+		{
+		DProcess *curProcess = bufferSet.iProcAddrTable[i].iProcess;
+		if (curProcess == process)
+			{
+			aAddress = reinterpret_cast<TInt>(bufferSet.iProcAddrTable[i].iAddress);
+			NKern::FMSignal(&iLock);
+			return KErrNone;
+			}
+		if (curProcess == 0 && firstFree == -1)
+			{
+			firstFree = i;
+			}
+		}
+	NKern::FMSignal(&iLock);
+	// If we get here, we couldn't find the process in the iProcAddrTable. 
+	// Create a new Process Address entry. 
+	// Step 1
+	// Create a dummy chunk so that we can detect when the process dies, 
+	// give a handle to the user [but don't actually let the process KNOW what the handle is
+	// so the user process can't do anything silly with the chunk]. Close our side of the
+	// chunk to make sure there is only one reference to it. 
+	DChunk* chunk = 0;
+	// find page size for one page. 
+	TUint round = Kern::RoundToPageSize(1);
+	TLinAddr chunkKernelAddr = 0;
+	TUint32 chunkMapAttr = 0;
+	
+	// create shared chunk
+	NKern::ThreadEnterCS();
+	// Cleanup object, used to issue a DFC when the chunk is closed (and 
+	// as the handle of the chunk is not given to the process, it can only
+	// be closed when the process terminates!)
+	TChunkCleanup *cleanup = new TChunkCleanup(process, aScreenNumber);
+	if (!cleanup)
+		{
+		NKern::ThreadLeaveCS();
+		return KErrNoMemory;
+		}
+
+	TChunkCreateInfo info;
+	info.iType = TChunkCreateInfo::ESharedKernelMultiple;
+	info.iMaxSize = round;
+	info.iMapAttr = 0;
+	info.iOwnsMemory = ETrue;
+	info.iDestroyedDfc = cleanup;
+
+	TInt r = Kern::ChunkCreate(info, chunk, chunkKernelAddr, chunkMapAttr);
+	
+	if (r != KErrNone)
+		{
+		delete cleanup;
+		NKern::ThreadLeaveCS();
+		return r;
+		}
+	
+	
+	// Create a new handle for the user thread. 
+    r = Kern::MakeHandleAndOpen(&Kern::CurrentThread(), chunk);
+	Kern::ChunkClose(chunk);
+	if (r <= 0)
+		{
+		NKern::ThreadLeaveCS();
+		return r;
+		}
+
+	// Step 2
+	// Create a second handle for the chunk to the DSA buffer.
+	// First part: Make sure there is a DisplayMemoryHandle;
+	TInt handle = 0;
+	r = DisplayMemoryHandle(aScreenNumber, handle); 
+	if (r != KErrNone)
+		{
+		Kern::ChunkClose(chunk);
+		NKern::ThreadLeaveCS();
+		return r;
+		}
+	
+	DChunk *dsaChunk = bufferSet.iDsaBuffer.iMemChunks[0]->iChunk;
+	
+	// Step 3
+	// Get the base addrss and insert into table. 
+	TUint8* baseAddress = Kern::ChunkUserBase(dsaChunk, &Kern::CurrentThread());
+	NKern::FMWait(&iLock);
+	// Optimistically, the place we found earlier in the table is still free.
+	if (firstFree != -1 && bufferSet.iProcAddrTable[firstFree].iProcess != 0)
+		{
+		// If not, we go find another one.
+		firstFree = -1;
+		TUint count = bufferSet.iProcAddrTable.Count();
+		for(TUint i = 0; i < count; ++i)
+			{
+			if (bufferSet.iProcAddrTable[i].iProcess == 0)
+				{
+				firstFree = i;
+				break;
+				}
+			}
+		}
+	// Check if there is a free entry - if so, re-use it. 
+	if (firstFree != -1)
+		{
+		bufferSet.iProcAddrTable[firstFree].iProcess = process;
+		bufferSet.iProcAddrTable[firstFree].iAddress = baseAddress;
+		cleanup->SetIndex(firstFree);
+		NKern::FMSignal(&iLock);
+		}
+	else
+		{
+		// No free entry. Append it to the list. 
+		NKern::FMSignal(&iLock);
+		TProcessAddrEntry entry(process, baseAddress);
+		r = bufferSet.iProcAddrTable.Append(entry);
+		if (r != KErrNone)
+			{
+			Kern::ChunkClose(chunk);
+			NKern::ThreadLeaveCS();
+			return r;
+			}
+		// We added it at the end - so we start from the back and check for the 
+		// process, as some other process COULD have added one after us, so we 
+		// can't just use the count for index!
+		TUint index;
+		for(index = bufferSet.iProcAddrTable.Count()-1; index; --index)
+			{
+			if (bufferSet.iProcAddrTable[index].iProcess == process 
+					&& bufferSet.iProcAddrTable[index].iAddress != baseAddress)
+				{
+				break;
+				}
+			}
+		cleanup->SetIndex(index);
+		}
+	aAddress = reinterpret_cast<TInt>(baseAddress);
+
+	NKern::ThreadLeaveCS();
+	return KErrNone;
+	}
+
+EXPORT_C TInt WinsGui::CurrentConfiguration()
+	{
+	return ::CurrentConfiguration;
+	}
+
+GLDEF_C void Fault(TGuiPanic aPanic)
+	{
+	Kern::Fault("WINS-UI",aPanic);
+	}
+
+DECLARE_STANDARD_EXTENSION()
+	{
+	__KTRACE_OPT(KEXTENSION,Kern::Printf("Starting Emulator GUI"));
+
+	// if NoGui property == true do nothing
+	if (Property::GetBool("NoGui",EFalse))
+		return KErrNone;
+
+	// create keyboard driver
+	TInt r=KErrNoMemory;
+	masterIni = new DMasterIni;
+	if (masterIni)
+		{
+		r = masterIni->Create();
+		if (r!= KErrNone)
+			{
+			return r;
+			}
+		}
+	
+	DMultiTouch::iMultiTouchSupported = DMultiTouch::Init();
+
+	// Create multitouch when necessary
+	if (systemIni->MultiTouchEnabled() && systemIni->GCEEnabled() && DMultiTouch::iMultiTouchSupported)
+		{
+		TheMultiTouch = new DMultiTouch(systemIni->MultiTouchProximityStep(),systemIni->MultiTouchPressureStep());
+		if(!TheMultiTouch)
+			{
+			r = KErrNoMemory;
+			__KTRACE_OPT(KEXTENSION,Kern::Printf("Returns %d",r));
+			return r;
+			}
+		DMultiTouch::iMultiTouchCreated = TRUE;
+		}
+
+	__KTRACE_OPT(KEXTENSION,Kern::Printf("Returns %d",r));
+	return r;
+	}
+
+TInt DWinsUi::DoDefineEmulatorControlHotKey(TAny* aPtr, const char* aValue)
+	{
+	return static_cast<DWinsUi*>(aPtr)->DefineEmulatorControlHotKey(aValue);
+	}
+
+
+TInt DWinsUi::DefineEmulatorControlHotKey(const char* aValue)
+	{
+	const char* beg = skipws(aValue);
+	const char* end = skiptok(beg);
+	TInt err = KErrNone;
+	
+	TEmulCommand command = ENoCommand;
+	TInt data = 0;
+	if (_strnicmp(beg, "SelectConfig", end-beg) == 0)
+		{
+		//get the int param which is the config to switch to
+		beg = end;
+		char * e;
+		data = strtol(beg, &e,0);
+		if (beg == e)
+			err = KErrArgument;
+		end = e;
+		command = ESelectConfig;
+		}
+	else if(_strnicmp(beg, "NextConfig", end-beg) == 0)
+		{
+		command = ENextConfig;
+		}
+	else
+		{
+		err = KErrArgument;
+		}
+	if (err != KErrNone)
+		return err;
+	
+	// get the keys	
+	KeyCombination* pCombination = new KeyCombination(data, command);
+	if (!pCombination)
+		return KErrNoMemory;	
+	
+	beg = skipws(end);
+	const char* end2;	
+	for (TInt i=0;i<KMaxHotKeyCombinationLength;i++)
+		{
+		TInt key=KErrNotFound;		
+		end2 = skiptok(beg);
+		TPtrC8 name((const TUint8*)beg, end2-beg);
+		if ((key=iKeyboard.GetScanCode(name))!=KErrNotFound)
+			pCombination->AddKey((TStdScanCode)key);
+		
+		if (beg == end2 || *end2++ != ',') 
+			break;		
+		beg = end2;
+		}
+	return iControlHotKeys.Append(pCombination);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/gui.rc	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,79 @@
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include <windows.h>
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.K.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+EPOC_ICON               ICON    DISCARDABLE     "epoc32.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Cursor
+//
+
+OVERKEY                 CURSOR  DISCARDABLE     "hand.cur"
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+#endif    // English (U.K.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
Binary file emulator/emulatorbsp/specific/hand.cur has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/keyboard.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,817 @@
+// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\keyboard.cpp
+// 
+//
+
+#include "gui.h"
+
+class KeySet
+	{
+public:
+	struct SEntry
+		{
+		const char* iName;
+		TInt iVal;
+		};
+public:
+	inline KeySet(const SEntry aMap[], TInt aSize)
+		:iMap(aMap), iSize(aSize)
+		{}
+	TInt operator[](const TDesC8& aName) const;
+private:
+	const SEntry* iMap;
+	TInt iSize;
+	};
+
+
+const TUint8 StandardKeyMap[KStandardKeyMapSize]=
+	{
+	EStdKeyNull,
+	EStdKeyEscape,
+	'1',
+	'2',
+	'3',
+	'4',
+	'5',
+	'6',
+	'7',
+	'8',
+	'9',
+	'0',
+	EStdKeyMinus,
+	EStdKeyEquals,
+	EStdKeyBackspace,
+	EStdKeyTab,
+	'Q',
+	'W',
+	'E',
+	'R',
+	'T',
+	'Y',
+	'U',
+	'I',
+	'O',
+	'P',
+	EStdKeySquareBracketLeft,
+	EStdKeySquareBracketRight,
+	EStdKeyEnter,
+	EStdKeyLeftCtrl,
+	'A',
+	'S',
+	'D',
+	'F',
+	'G',
+	'H',
+	'J',
+	'K',
+	'L',
+	EStdKeySemiColon,
+	EStdKeySingleQuote,
+	EStdKeyXXX,
+	EStdKeyLeftShift,
+	EStdKeyHash,
+	'Z',
+	'X',
+	'C',
+	'V',
+	'B',
+	'N',
+	'M',
+	EStdKeyComma,
+	EStdKeyFullStop,
+	EStdKeyForwardSlash,
+	EStdKeyRightShift,
+	EStdKeyNkpAsterisk,
+	EStdKeyLeftFunc,        // Alt key used as Func Key
+	EStdKeySpace,
+	EStdKeyCapsLock,
+	EStdKeyMenu,
+	EStdKeyHelp,
+	EStdKeyDial,
+	EStdKeyF4,
+	EStdKeyF5,
+    EStdKeyF6,
+    EStdKeyF7,
+    EStdKeyF8,
+	EStdKeyOff,
+	EStdKeyF10,
+	EStdKeyPause,
+	EStdKeyScrollLock,
+	EStdKeyNkp7,
+	EStdKeyNkp8,
+	EStdKeyNkp9,
+	EStdKeyNkpMinus,
+	EStdKeyNkp4,
+	EStdKeyNkp5,
+	EStdKeyNkp6,
+	EStdKeyNkpPlus,
+	EStdKeyNkp1,
+	EStdKeyNkp2,
+	EStdKeyNkp3,
+	EStdKeyNkp0,
+	EStdKeyNkpFullStop,
+	EStdKeyNull,
+	EStdKeyNull,
+	EStdKeyBackSlash,
+	EStdKeyF11,
+	EStdKeyF12
+	};
+
+const TUint8 ExtendedKeyMap[]=
+	{
+//	EStdKeyNumLock,
+//	EStdKeyNull,
+//	EStdKeyHome,
+//	EStdKeyUpArrow,
+//	EStdKeyPageUp,
+//	EStdKeyNull,
+//	EStdKeyLeftArrow,
+//	EStdKeyNull,
+//	EStdKeyRightArrow,
+//	EStdKeyNull,
+//	EStdKeyEnd,
+//	EStdKeyDownArrow,
+//	EStdKeyPageDown,
+//	EStdKeyInsert,
+//	EStdKeyDelete
+	/*1c*/	EStdKeyNkpEnter,
+	/*1d*/	EStdKeyRightCtrl,
+	/*1e*/	EStdKeyNull,
+	/*1f*/	EStdKeyNull,
+	/*20*/	EStdKeyNull,
+	/*21*/	EStdKeyNull,
+	/*22*/	EStdKeyNull,
+	/*23*/	EStdKeyNull,
+	/*24*/	EStdKeyNull,
+	/*25*/	EStdKeyNull,
+	/*26*/	EStdKeyNull,
+	/*27*/	EStdKeyNull,
+	/*28*/	EStdKeyNull,
+	/*29*/	EStdKeyNull,
+	/*2a*/	EStdKeyNull,
+	/*2b*/	EStdKeyNull,
+	/*2c*/	EStdKeyNull,
+	/*2d*/	EStdKeyNull,
+	/*2e*/	EStdKeyNull,
+	/*2f*/	EStdKeyNull,
+	/*30*/	EStdKeyNull,
+	/*31*/	EStdKeyNull,
+	/*32*/	EStdKeyNull,
+	/*33*/	EStdKeyNull,
+	/*34*/	EStdKeyNull,
+	/*35*/	EStdKeyNkpForwardSlash,
+	/*36*/	EStdKeyNull,
+	/*37*/	EStdKeyPrintScreen, // Actually e0 2a e0 37
+	/*38*/	EStdKeyRightFunc,
+	/*39*/	EStdKeyNull,
+	/*3a*/	EStdKeyNull,
+	/*3b*/	EStdKeyNull,
+	/*3c*/	EStdKeyNull,
+	/*3d*/	EStdKeyNull,
+	/*3e*/	EStdKeyNull,
+	/*3f*/	EStdKeyNull,
+	/*40*/	EStdKeyNull,
+	/*41*/	EStdKeyNull,
+	/*42*/	EStdKeyNull,
+	/*43*/	EStdKeyNull,
+	/*44*/	EStdKeyNull,
+	/*45*/	EStdKeyNumLock,
+	/*46*/	EStdKeyNull,
+	/*47*/	EStdKeyHome,
+	/*48*/	EStdKeyUpArrow,
+	/*49*/	EStdKeyPageUp,
+	/*4a*/	EStdKeyNull,
+	/*4b*/	EStdKeyLeftArrow,
+	/*4c*/	EStdKeyNull,
+	/*4d*/	EStdKeyRightArrow,
+	/*4e*/	EStdKeyNull,
+	/*4f*/	EStdKeyEnd,
+	/*50*/	EStdKeyDownArrow,
+	/*51*/	EStdKeyPageDown,
+	/*52*/	EStdKeyInsert,
+	/*53*/	EStdKeyDelete,
+	/*54*/	EStdKeyNull,
+	/*55*/	EStdKeyNull,
+	/*56*/	EStdKeyNull,
+	/*57*/	EStdKeyNull,
+	/*58*/	EStdKeyNull,
+	/*59*/	EStdKeyNull,
+	/*5a*/	EStdKeyNull,
+	/*5b*/	EStdKeyLeftAlt,	//left windows key
+	/*5c*/	EStdKeyMenu,	//right windows key
+	/*5d*/	EStdKeyHelp		//right mouse button key
+	};
+
+
+const KeySet::SEntry EPOCKeyNameToKeyMap[] =
+	{
+	{"EStdKeyNull",EStdKeyNull},
+	{"EStdKeyBackspace",EStdKeyBackspace},
+	{"EStdKeyTab",EStdKeyTab},
+	{"EStdKeyEnter",EStdKeyEnter},
+	{"EStdKeyEscape",EStdKeyEscape},
+	{"EStdKeySpace",EStdKeySpace},
+	{"EStdKeyPrintScreen",EStdKeyPrintScreen},
+	{"EStdKeyPause",EStdKeyPause},
+	{"EStdKeyHome",EStdKeyHome},
+	{"EStdKeyEnd",EStdKeyEnd},
+	{"EStdKeyPageUp",EStdKeyPageUp},
+	{"EStdKeyPageDown",EStdKeyPageDown},
+	{"EStdKeyInsert",EStdKeyInsert},
+	{"EStdKeyDelete",EStdKeyDelete},
+	{"EStdKeyLeftArrow",EStdKeyLeftArrow},
+	{"EStdKeyRightArrow",EStdKeyRightArrow},
+	{"EStdKeyUpArrow",EStdKeyUpArrow},
+	{"EStdKeyDownArrow",EStdKeyDownArrow},
+	{"EStdKeyLeftShift",EStdKeyLeftShift},
+	{"EStdKeyRightShift",EStdKeyRightShift},
+	{"EStdKeyLeftAlt",EStdKeyLeftAlt},
+	{"EStdKeyRightAlt",EStdKeyRightAlt},
+	{"EStdKeyLeftCtrl",EStdKeyLeftCtrl},
+	{"EStdKeyRightCtrl",EStdKeyRightCtrl},
+	{"EStdKeyLeftFunc",EStdKeyLeftFunc},
+	{"EStdKeyRightFunc",EStdKeyRightFunc},
+	{"EStdKeyCapsLock",EStdKeyCapsLock},
+	{"EStdKeyNumLock",EStdKeyNumLock},
+	{"EStdKeyScrollLock",EStdKeyScrollLock},
+	{"EStdKeyF1",EStdKeyF1},
+	{"EStdKeyF2",EStdKeyF2},
+	{"EStdKeyF3",EStdKeyF3},
+	{"EStdKeyF4",EStdKeyF4},
+	{"EStdKeyF5",EStdKeyF5},
+	{"EStdKeyF6",EStdKeyF6},
+	{"EStdKeyF7",EStdKeyF7},
+	{"EStdKeyF8",EStdKeyF8},
+	{"EStdKeyF9",EStdKeyF9},
+	{"EStdKeyF10",EStdKeyF10},
+	{"EStdKeyF11",EStdKeyF11},
+	{"EStdKeyF12",EStdKeyF12},
+	{"EStdKeyF13",EStdKeyF13},
+	{"EStdKeyF14",EStdKeyF14},
+	{"EStdKeyF15",EStdKeyF15},
+	{"EStdKeyF16",EStdKeyF16},
+	{"EStdKeyF17",EStdKeyF17},
+	{"EStdKeyF18",EStdKeyF18},
+	{"EStdKeyF19",EStdKeyF19},
+	{"EStdKeyF20",EStdKeyF20},
+	{"EStdKeyF21",EStdKeyF21},
+	{"EStdKeyF22",EStdKeyF22},
+	{"EStdKeyF23",EStdKeyF23},
+	{"EStdKeyF24",EStdKeyF24},
+	{"EStdKeyXXX",EStdKeyXXX},
+	{"EStdKeyComma",EStdKeyComma},
+	{"EStdKeyFullStop",EStdKeyFullStop},
+	{"EStdKeyForwardSlash",EStdKeyForwardSlash},
+	{"EStdKeyBackSlash",EStdKeyBackSlash},
+	{"EStdKeySemiColon",EStdKeySemiColon},
+	{"EStdKeySingleQuote",EStdKeySingleQuote},
+	{"EStdKeyHash",EStdKeyHash},
+	{"EStdKeySquareBracketLeft",EStdKeySquareBracketLeft},
+	{"EStdKeySquareBracketRight",EStdKeySquareBracketRight},
+	{"EStdKeyMinus",EStdKeyMinus},
+	{"EStdKeyEquals",EStdKeyEquals},
+	{"EStdKeyNkpForwardSlash",EStdKeyNkpForwardSlash},
+	{"EStdKeyNkpAsterisk",EStdKeyNkpAsterisk},
+	{"EStdKeyNkpMinus",EStdKeyNkpMinus},
+	{"EStdKeyNkpPlus",EStdKeyNkpPlus},
+	{"EStdKeyNkpEnter",EStdKeyNkpEnter},
+	{"EStdKeyNkp1",EStdKeyNkp1},
+	{"EStdKeyNkp2",EStdKeyNkp2},
+	{"EStdKeyNkp3",EStdKeyNkp3},
+	{"EStdKeyNkp4",EStdKeyNkp4},
+	{"EStdKeyNkp5",EStdKeyNkp5},
+	{"EStdKeyNkp6",EStdKeyNkp6},
+	{"EStdKeyNkp7",EStdKeyNkp7},
+	{"EStdKeyNkp8",EStdKeyNkp8},
+	{"EStdKeyNkp9",EStdKeyNkp9},
+	{"EStdKeyNkp0",EStdKeyNkp0},
+	{"EStdKeyNkpFullStop",EStdKeyNkpFullStop},
+	{"EStdKeyMenu",EStdKeyMenu},
+	{"EStdKeyBacklightOn",EStdKeyBacklightOn},
+	{"EStdKeyBacklightOff",EStdKeyBacklightOff},
+	{"EStdKeyBacklightToggle",EStdKeyBacklightToggle},
+	{"EStdKeyIncContrast",EStdKeyIncContrast},
+	{"EStdKeyDecContrast",EStdKeyDecContrast},
+	{"EStdKeySliderDown",EStdKeySliderDown},
+	{"EStdKeySliderUp",EStdKeySliderUp},
+	{"EStdKeyDictaphonePlay",EStdKeyDictaphonePlay},
+	{"EStdKeyDictaphoneStop",EStdKeyDictaphoneStop},
+	{"EStdKeyDictaphoneRecord",EStdKeyDictaphoneRecord},
+	{"EStdKeyHelp",EStdKeyHelp},
+	{"EStdKeyOff",EStdKeyOff},
+	{"EStdKeyDial",EStdKeyDial},
+	{"EStdKeyIncVolume",EStdKeyIncVolume},
+	{"EStdKeyDecVolume",EStdKeyDecVolume},
+	{"EStdKeyDevice0",EStdKeyDevice0},
+	{"EStdKeyDevice1",EStdKeyDevice1},
+	{"EStdKeyDevice2",EStdKeyDevice2},
+	{"EStdKeyDevice3",EStdKeyDevice3},
+	{"EStdKeyDevice4",EStdKeyDevice4},
+	{"EStdKeyDevice5",EStdKeyDevice5},
+	{"EStdKeyDevice6",EStdKeyDevice6},
+	{"EStdKeyDevice7",EStdKeyDevice7},
+	{"EStdKeyDevice8",EStdKeyDevice8},
+	{"EStdKeyDevice9",EStdKeyDevice9},
+	{"EStdKeyDeviceA",EStdKeyDeviceA},
+	{"EStdKeyDeviceB",EStdKeyDeviceB},
+	{"EStdKeyDeviceC",EStdKeyDeviceC},
+	{"EStdKeyDeviceD",EStdKeyDeviceD},
+	{"EStdKeyDeviceE",EStdKeyDeviceE},
+	{"EStdKeyDeviceF",EStdKeyDeviceF},
+	{"EStdKeyDevice10",EStdKeyDevice10},
+	{"EStdKeyDevice11",EStdKeyDevice11},
+	{"EStdKeyDevice12",EStdKeyDevice12},
+	{"EStdKeyDevice13",EStdKeyDevice13},
+	{"EStdKeyDevice14",EStdKeyDevice14},
+	{"EStdKeyDevice15",EStdKeyDevice15},
+	{"EStdKeyDevice16",EStdKeyDevice16},
+	{"EStdKeyDevice17",EStdKeyDevice17},
+	{"EStdKeyDevice18",EStdKeyDevice18},
+	{"EStdKeyDevice19",EStdKeyDevice19},
+	{"EStdKeyDevice1A",EStdKeyDevice1A},
+	{"EStdKeyDevice1B",EStdKeyDevice1B},
+	{"EStdKeyDevice1C",EStdKeyDevice1C},
+	{"EStdKeyDevice1D",EStdKeyDevice1D},
+	{"EStdKeyDevice1E",EStdKeyDevice1E},
+	{"EStdKeyDevice1F",EStdKeyDevice1F},
+	{"EStdKeyDevice20",EStdKeyDevice20},
+	{"EStdKeyDevice21",EStdKeyDevice21},
+	{"EStdKeyDevice22",EStdKeyDevice22},
+	{"EStdKeyDevice23",EStdKeyDevice23},
+	{"EStdKeyDevice24",EStdKeyDevice24},
+	{"EStdKeyDevice25",EStdKeyDevice25},
+	{"EStdKeyDevice26",EStdKeyDevice26},
+	{"EStdKeyDevice27",EStdKeyDevice27},
+	{"EStdKeyApplication0",EStdKeyApplication0},
+	{"EStdKeyApplication1",EStdKeyApplication1},
+	{"EStdKeyApplication2",EStdKeyApplication2},
+	{"EStdKeyApplication3",EStdKeyApplication3},
+	{"EStdKeyApplication4",EStdKeyApplication4},
+	{"EStdKeyApplication5",EStdKeyApplication5},
+	{"EStdKeyApplication6",EStdKeyApplication6},
+	{"EStdKeyApplication7",EStdKeyApplication7},
+	{"EStdKeyApplication8",EStdKeyApplication8},
+	{"EStdKeyApplication9",EStdKeyApplication9},
+	{"EStdKeyApplicationA",EStdKeyApplicationA},
+	{"EStdKeyApplicationB",EStdKeyApplicationB},
+	{"EStdKeyApplicationC",EStdKeyApplicationC},
+	{"EStdKeyApplicationD",EStdKeyApplicationD},
+	{"EStdKeyApplicationE",EStdKeyApplicationE},
+	{"EStdKeyApplicationF",EStdKeyApplicationF},
+	{"EStdKeyApplication10",EStdKeyApplication10},
+	{"EStdKeyApplication11",EStdKeyApplication11},
+	{"EStdKeyApplication12",EStdKeyApplication12},
+	{"EStdKeyApplication13",EStdKeyApplication13},
+	{"EStdKeyApplication14",EStdKeyApplication14},
+	{"EStdKeyApplication15",EStdKeyApplication15},
+	{"EStdKeyApplication16",EStdKeyApplication16},
+	{"EStdKeyApplication17",EStdKeyApplication17},
+	{"EStdKeyApplication18",EStdKeyApplication18},
+	{"EStdKeyApplication19",EStdKeyApplication19},
+	{"EStdKeyApplication1A",EStdKeyApplication1A},
+	{"EStdKeyApplication1B",EStdKeyApplication1B},
+	{"EStdKeyApplication1C",EStdKeyApplication1C},
+	{"EStdKeyApplication1D",EStdKeyApplication1D},
+	{"EStdKeyApplication1E",EStdKeyApplication1E},
+	{"EStdKeyApplication1F",EStdKeyApplication1F},
+	{"EStdKeyApplication20",EStdKeyApplication20},
+	{"EStdKeyApplication21",EStdKeyApplication21},
+	{"EStdKeyApplication22",EStdKeyApplication22},
+	{"EStdKeyApplication23",EStdKeyApplication23},
+	{"EStdKeyApplication24",EStdKeyApplication24},
+	{"EStdKeyApplication25",EStdKeyApplication25},
+	{"EStdKeyApplication26",EStdKeyApplication26},
+	{"EStdKeyApplication27",EStdKeyApplication27},
+	{"EStdKeyYes",EStdKeyYes},
+	{"EStdKeyNo",EStdKeyNo},
+	{"EStdKeyIncBrightness",EStdKeyIncBrightness},
+	{"EStdKeyDecBrightness",EStdKeyDecBrightness},
+	{"A", 'A'},
+	{"B", 'B'},
+	{"C", 'C'},
+	{"D", 'D'},
+	{"E", 'E'},
+	{"F", 'F'},
+	{"G", 'G'},
+	{"H", 'H'},
+	{"I", 'I'},
+	{"J", 'J'},
+	{"K", 'K'},
+	{"L", 'L'},
+	{"M", 'M'},
+	{"N", 'N'},
+	{"O", 'O'},
+	{"P", 'P'},
+	{"Q", 'Q'},
+	{"R", 'R'},
+	{"S", 'S'},
+	{"T", 'T'},
+	{"U", 'U'},
+	{"V", 'V'},
+	{"W", 'W'},
+	{"X", 'X'},
+	{"Y", 'Y'},
+	{"Z", 'Z'},
+	{"0", '0'},
+	{"1", '1'},
+	{"2", '2'},
+	{"3", '3'},
+	{"4", '4'},
+	{"5", '5'},
+	{"6", '6'},
+	{"7", '7'},
+	{"8", '8'},
+	{"9", '9'},
+	{"EKeyScreenDimension0",EKeyScreenDimension0<<16},
+	{"EKeyScreenDimension1",EKeyScreenDimension1<<16},
+	{"EKeyScreenDimension2",EKeyScreenDimension2<<16},
+	{"EKeyScreenDimension3",EKeyScreenDimension3<<16}
+	};
+
+const KeySet::SEntry RealKeyNames[] = 
+	{
+	{"Escape",1},
+	{"1",2},
+	{"2",3},
+	{"3",4},
+	{"4",5},
+	{"5",6},
+	{"6",7},
+	{"7",8},
+	{"8",9},
+	{"9",10},
+	{"0",11},
+	{"Minus",12},
+	{"Equals",13},
+	{"BackSpace",14},
+	{"Tab",15},
+	{"Q",16},
+	{"W",17},
+	{"E",18},
+	{"R",19},
+	{"T",20},
+	{"Y",21},
+	{"U",22},
+	{"I",23},
+	{"O",24},
+	{"P",25},
+	{"SquareBracketLeft",26},
+	{"SquareBracketRight",27},
+	{"Enter",28},
+	{"LeftCtrl",29},
+	{"A",30},
+	{"S",31},
+	{"D",32},
+	{"F",33},
+	{"G",34},
+	{"H",35},
+	{"J",36},
+	{"K",37},
+	{"L",38},
+	{"SemiColon",39},
+	{"SingleQuote",40},
+	{"BackTick",41},
+	{"LeftShift",42},
+	{"Hash",43},
+	{"Z",44},
+	{"X",45},
+	{"C",46},
+	{"V",47},
+	{"B",48},
+	{"N",49},
+	{"M",50},
+	{"Comma",51},
+	{"FullStop",52},
+	{"ForwardSlash",53},
+	{"RightShift",54},
+	{"NkpAsterisk",55},
+	{"LeftAlt",56},        // Alt key used as Func Key
+	{"Space",57},
+	{"CapsLock",58},
+	{"F1",59},
+	{"F2",60},
+	{"F3",61},
+	{"F4",62},
+	{"F5",63},
+    {"F6",64},
+    {"F7",65},
+    {"F8",66},
+	{"F9",67},
+	{"F10",68},
+	{"Pause",69},
+	{"ScrollLock",70},
+	{"Nkp7",71},
+	{"Nkp8",72},
+	{"Nkp9",73},
+	{"NkpMinus",74},
+	{"Nkp4",75},
+	{"Nkp5",76},
+	{"Nkp6",77},
+	{"NkpPlus",78},
+	{"Nkp1",79},
+	{"Nkp2",80},
+	{"Nkp3",81},
+	{"Nkp0",82},
+	{"NkpFullStop",83},
+	{"BackSlash",86},
+	{"F11",87},
+	{"F12",88}
+	};
+
+const KeySet::SEntry RealExtendedKeyNames[] = 
+	{
+	{"NkpEnter",0},
+	{"RightCtrl",1},
+	{"NkpForwardSlash", 25},
+	{"PrintScreen",27},
+	{"RightAlt", 28},
+	{"NumLock", 41},
+	{"Home",43},
+	{"UpArrow",44},
+	{"PageUp",45},
+	{"LeftArrow",47},
+	{"RightArrow",49},
+	{"End",51},
+	{"DownArrow",52},
+	{"PageDown",53},
+	{"Insert",54},
+	{"Delete",55},
+	{"LeftWindows",63},
+	{"RightWindows",64},
+	{"ContextMenu",65}
+	};
+
+const KeySet EpocKeys(EPOCKeyNameToKeyMap, sizeof(EPOCKeyNameToKeyMap)/sizeof(KeySet::SEntry));
+const KeySet StandardKeys(RealKeyNames, sizeof(RealKeyNames)/sizeof(KeySet::SEntry));
+const KeySet ExtendedKeys(RealExtendedKeyNames, sizeof(RealExtendedKeyNames)/sizeof(KeySet::SEntry));
+
+TInt KeySet::operator[](const TDesC8& aName) const
+	{
+	TInt len = aName.Length();
+	const char* p = (const char*)aName.Ptr();
+	for (const SEntry* e = iMap + iSize; --e >= iMap; )
+		{
+		if (_strnicmp(e->iName, p, len) == 0 && e->iName[len] == '\0')
+			return e->iVal;
+		}
+	return KErrNotFound;
+	}
+
+// Class Alias
+
+Alias::Alias()
+	:iMap(10)
+	{}
+
+TInt Alias::Add(const TDesC8& aAlias, const TDesC8& aName)
+//
+// add a new alias
+//
+	{
+	TInt r = KErrNoMemory;
+	SEntry e;
+	e.iAlias = HBuf8::New(aAlias);
+	if (e.iAlias)
+		{
+		e.iName = HBuf8::New(aName);
+		if (e.iName)
+			{
+			r = iMap.InsertInOrder(e, &Alias::Compare);
+			if (r == KErrNone)
+				return KErrNone;
+			delete e.iName;
+			}
+		delete e.iAlias;
+		}
+	return r;
+	}
+
+const TDesC8* Alias::operator[](const TDesC8& aAlias)
+//
+// Look up an alias
+//
+	{
+	SEntry e;
+	e.iAlias = const_cast<TDesC8*>(&aAlias);
+	TInt ix = iMap.FindInOrder(e, &Alias::Compare);
+	return ix >= 0 ? iMap[ix].iName : NULL;
+	}
+
+TInt Alias::Compare(const SEntry& aLhs, const SEntry& aRhs)
+	{
+	return CompareI(*aLhs.iAlias, *aRhs.iAlias);
+	}
+
+
+
+// keyboard mapping
+
+DWinsKeyboard::DWinsKeyboard()
+	{
+	memcpy(iStandardKeyMap, StandardKeyMap, KStandardKeyMapSize);
+	memcpy(iExtendedKeyMap, ExtendedKeyMap, KExtendedKeyMapSize);
+	memcpy(iAltStandardKeyMap, StandardKeyMap, KStandardKeyMapSize);
+	memcpy(iAltExtendedKeyMap, ExtendedKeyMap, KExtendedKeyMapSize);
+	memcpy(iCtrlStandardKeyMap, StandardKeyMap, KStandardKeyMapSize);
+	memcpy(iCtrlExtendedKeyMap, ExtendedKeyMap, KExtendedKeyMapSize);
+	}
+
+TInt DWinsKeyboard::Init(TInt aId)
+//
+// Initialise the alias and key maps from the properties
+//
+	{
+	char property[50];
+	wsprintfA(property, "Configuration[%d]DefineKeyName",aId);
+	TInt r = MultiProperty(&DWinsKeyboard::DoDefineAlias, this, property);
+	if (r != KErrNone)
+		return r;
+	wsprintfA(property, "Configuration[%d]KeyMap",aId);
+	r = MultiProperty(&DWinsKeyboard::DoMapKey, this, property);
+	return r;
+	}
+
+TInt DWinsKeyboard::DoDefineAlias(TAny* aPtr, const char* aValue)
+	{
+	return static_cast<DWinsKeyboard*>(aPtr)->DefineAlias(aValue);
+	}
+
+TInt DWinsKeyboard::DefineAlias(const char* aValue)
+//
+// The character string terminates in a ';' or a '\0'
+//
+	{
+	//get the alias name
+	const char* beg = skipws(aValue);
+	const char* end = skiptok(beg);
+	TPtrC8 alias((const TUint8*)beg, end-beg);
+
+	//get the real name
+	beg = skipws(end);
+	end = skiptok(beg);
+	TPtrC8 name((const TUint8*)beg, end-beg);
+
+	//prevent an alias being made of an alias
+	if (iAliasedKeys[name] != NULL)
+		return KErrArgument;
+
+	// ensure this is valid name
+	TInt r = GetEPOCKeyCode(name);
+	if (r == KErrNotFound)
+		return r;
+
+	//now we need to record the alias name and the real key name
+	return iAliasedKeys.Add(alias, name);
+	}
+
+
+TInt DWinsKeyboard::DoMapKey(TAny* aPtr, const char* aValue)
+	{
+	return static_cast<DWinsKeyboard*>(aPtr)->MapKey(aValue);
+	}
+
+TInt DWinsKeyboard::MapKey(const char* aValue)
+	{
+	//get the win32 name
+	const char* beg = skipws(aValue);
+	const char* end = skiptok(beg);
+
+	// check to see if a modifier key has been specified
+	TBool altModifier = !_strnicmp(beg, "LeftAlt", 7);
+	altModifier |= !_strnicmp(beg, "RightAlt", 8);
+	TBool ctrlModifier = !_strnicmp(beg, "LeftCtrl", 8);
+	ctrlModifier |= !_strnicmp(beg, "RightCtrl", 9);
+
+	// if modifier was found, skip to next token
+	if (altModifier || ctrlModifier)
+		{
+		beg = skipws(end);
+		end = skiptok(beg);
+		}
+
+	TPtrC8 name((const TUint8*)beg, end-beg);
+
+	//get the epoc key
+	beg = skipws(end);
+	end = skiptok(beg);
+	TInt key = GetEPOCKeyCode(TPtrC8((const TUint8*)beg, end-beg));
+	if (key == KErrNotFound)
+		return key;
+
+	TInt scancode = StandardKeys[name];
+
+	// if alt modifier was specified, change the alt key map
+	if (altModifier)
+		{
+		if (scancode >= 0)
+			iAltStandardKeyMap[scancode] = (TUint8)key;
+		else
+			{
+			scancode = ExtendedKeys[name];
+			if (scancode >= 0)
+				iAltExtendedKeyMap[scancode] = (TUint8)key;
+			else
+				return KErrNotFound;
+			}
+		}
+
+	// if ctrl modifier was specified, change the ctrl key map
+	else if (ctrlModifier)
+		{
+		if (scancode >= 0)
+			iCtrlStandardKeyMap[scancode] = (TUint8)key;
+		else
+			{
+			scancode = ExtendedKeys[name];
+			if (scancode >= 0)
+				iCtrlExtendedKeyMap[scancode] = (TUint8)key;
+			else
+				return KErrNotFound;
+			}
+		}
+
+	// no modifier, change the default key map
+	else
+		{
+		if (scancode >= 0)
+			iStandardKeyMap[scancode] = (TUint8)key;
+		else
+			{
+			scancode = ExtendedKeys[name];
+			if (scancode >= 0)
+				iExtendedKeyMap[scancode] = (TUint8)key;
+			else
+				return KErrNotFound;
+			}
+		}
+
+	return KErrNone;
+	}
+
+TInt DWinsKeyboard::GetEPOCKeyCode(const TDesC8& aStr)
+	{
+	// look for an alias
+	const TDesC8* arg = iAliasedKeys[aStr];
+	return EpocKeys[arg ? *arg : aStr];
+	}
+
+TInt DWinsKeyboard::ScanCodeToKey(TInt aScanCode, const TUint8* aStandardMap, const TUint8* aExtendedMap)
+//
+// Map Windows scan codes to Epoc key
+//
+	{
+	TInt stdCode = EStdKeyNull;
+	TInt extended = aScanCode&KKeyExtendedBit;
+	aScanCode &= KKeyNormalBits;
+	if (extended)
+		{
+		if (aScanCode >= KExtendedKeyBase && aScanCode <= KMaxExtendedKey)
+			stdCode = aExtendedMap[aScanCode - KExtendedKeyBase];
+		}
+	else if (aScanCode < KStandardKeyMapSize)
+		stdCode = aStandardMap[aScanCode];
+	return stdCode;
+	}
+
+TInt DWinsKeyboard::ScanCodeToStandardKey(TInt aScanCode)
+//
+// Map Windows scan codes to standard keys
+//
+	{
+	return ScanCodeToKey(aScanCode, StandardKeyMap, ExtendedKeyMap );
+	}
+
+TInt DWinsKeyboard::ScanCodeToRemappedKey(TInt aScanCode)
+//
+// Map Windows scan codes to remapped keys
+//
+	{
+	if (HIBYTE(GetKeyState(VK_MENU)))      // Alt key is pressed
+		return ScanCodeToKey(aScanCode, iAltStandardKeyMap, iAltExtendedKeyMap );
+
+	if (HIBYTE(GetKeyState(VK_CONTROL)))   // Ctrl key is pressed
+		return ScanCodeToKey(aScanCode, iCtrlStandardKeyMap, iCtrlExtendedKeyMap );
+
+	return ScanCodeToKey(aScanCode, iStandardKeyMap, iExtendedKeyMap );
+	}
+
+
+
+
+TInt DWinsKeyboard::GetScanCode(const TDesC8& aStr)
+	{
+	return  StandardKeys[aStr];	
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/keymap.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1905 @@
+// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\keymap.cpp
+// The lookup tables giving the function to be carried out
+// and the new state of the keyboard
+// 
+//
+
+
+#include <k32keys.h>
+
+// the "array" parameter must be a true array and not a pointer
+#define ARRAY_LENGTH(array) (sizeof(array)/sizeof(array[0]))
+
+#define TABLE_ENTRY_ANOTHER_CTRL_DIGIT					\
+	{  													\
+		{												\
+		EModifierKeyUp|EModifierFunc,	                \
+		0												\
+		},												\
+		{												\
+		EKeyNull,										\
+		EAnyDigitGivenRadix								\
+		},												\
+		{												\
+		EStateCtrlDigits,								\
+		EAddOnCtrlDigit,								\
+		0												\
+		}												\
+	}
+
+// This table is searched for a match if a match has not been
+// found in the current state's table
+
+LOCAL_D const SFuncTableEntry defaultTable[]=
+	{
+		{ // prevent key up events generating keycodes
+			{
+			EModifierKeyUp,
+			EModifierKeyUp
+			},
+			{
+			EKeyNull,
+			EAnyKey
+			},
+			{
+			EStateUnchanged,
+			EDoNothing,
+			0
+			}
+		},
+		{ // prevent any modifer key from changing state
+			{
+			0,
+			0
+			},
+			{
+			EKeyNull,
+			EAnyModifierKey
+			},
+			{
+			EStateUnchanged,
+			EDoNothing,
+			0
+			}
+		},
+		{ // filter out any unprocessed codes???
+			{
+			0,
+			0
+			},
+			{
+			EKeyNull,
+			EAnyKey
+			},
+			{
+			EStateNormal,
+			EDoNothing,
+			0
+			}
+		}
+	};
+
+// The table indicating which keys change which modifiers;
+// the state field in this table is ignored
+LOCAL_D const SFuncTableEntry modifierTable[]=
+	{
+        {
+			{
+			EModifierKeyUp,
+			0
+			},
+			{
+			EKeyCapsLock,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			EToggleModifier,
+			EModifierCapsLock
+			}
+		},
+		{
+			{
+			EModifierKeyUp,
+			0
+			},
+			{
+			EKeyNumLock,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			EToggleModifier,
+			EModifierNumLock
+			}
+		},
+		{
+			{
+			EModifierKeyUp,
+			0
+			},
+			{
+			EKeyScrollLock,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			EToggleModifier,
+			EModifierScrollLock
+			}
+		},
+		{
+			{
+			EModifierKeyUp,
+			0
+			},
+			{
+			EKeyLeftAlt,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			ETurnOnModifier,
+			EModifierAlt|EModifierLeftAlt
+			}
+		},
+		{
+			{
+			EModifierKeyUp,
+			EModifierKeyUp
+			},
+			{
+			EKeyLeftAlt,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			ETurnOffModifier,
+			EModifierLeftAlt
+			}
+		},
+		{
+			{
+			EModifierKeyUp,
+			0
+			},
+			{
+			EKeyLeftFunc,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			ETurnOnModifier,
+			EModifierFunc|EModifierLeftFunc
+			}
+		},
+		{
+			{
+			EModifierKeyUp,
+			EModifierKeyUp
+			},
+			{
+			EKeyLeftFunc,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			ETurnOffModifier,
+			EModifierLeftFunc
+			}
+		},
+		{
+			{
+			EModifierKeyUp,
+			0
+			},
+			{
+			EKeyLeftShift,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			ETurnOnModifier,
+			EModifierShift|EModifierLeftShift
+			}
+		},
+		{
+			{
+			EModifierKeyUp,
+			EModifierKeyUp
+			},
+			{
+			EKeyLeftShift,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			ETurnOffModifier,
+			EModifierLeftShift
+			}
+		},
+		{
+			{
+			EModifierKeyUp,
+			0
+			},
+			{
+			EKeyLeftCtrl,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			ETurnOnModifier,
+			EModifierCtrl|EModifierLeftCtrl
+			}
+		},
+		{
+			{
+			EModifierKeyUp,
+			EModifierKeyUp
+			},
+			{
+			EKeyLeftCtrl,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			ETurnOffModifier,
+			EModifierLeftCtrl
+			}
+        },
+		{
+			{
+			EModifierKeyUp,
+			0
+			},
+			{
+			EKeyRightAlt,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			ETurnOnModifier,
+			EModifierAlt|EModifierRightAlt
+			}
+		},
+		{
+			{
+			EModifierKeyUp,
+			EModifierKeyUp
+			},
+			{
+			EKeyRightAlt,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			ETurnOffModifier,
+			EModifierRightAlt
+			}
+		},
+		{
+			{
+			EModifierKeyUp,
+			0
+			},
+			{
+			EKeyRightFunc,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			ETurnOnModifier,
+			EModifierFunc|EModifierRightFunc
+			}
+		},
+		{
+			{
+			EModifierKeyUp,
+			EModifierKeyUp
+			},
+			{
+			EKeyRightFunc,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			ETurnOffModifier,
+			EModifierRightFunc
+			}
+		},
+		{
+			{
+			EModifierKeyUp,
+			0
+			},
+			{
+			EKeyRightShift,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			ETurnOnModifier,
+			EModifierShift|EModifierRightShift
+			}
+		},
+		{
+			{
+			EModifierKeyUp,
+			EModifierKeyUp
+			},
+			{
+			EKeyRightShift,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			ETurnOffModifier,
+			EModifierRightShift
+			}
+		},
+		{
+			{
+			EModifierKeyUp,
+			0
+			},
+			{
+			EKeyRightCtrl,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			ETurnOnModifier,
+			EModifierCtrl|EModifierRightCtrl
+			}
+		},
+		{
+			{
+			EModifierKeyUp,
+			EModifierKeyUp
+			},
+			{
+			EKeyRightCtrl,
+			EMatchKey
+			},
+			{
+			EStateUnchanged,
+			ETurnOffModifier,
+			EModifierRightCtrl
+			}
+		}
+	};
+
+// table0 to table12 are the tables corresponding to states
+// 0 to 12 respectively
+
+LOCAL_D const SFuncTableEntry table0[]=
+	{
+	TABLE_ENTRY_ANOTHER_CTRL_DIGIT
+	};
+
+LOCAL_D const SFuncTableEntry table1[]=
+	{
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'e',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcAe
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'c',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcCcedilla
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			's',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1EsTset
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'o',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcOslash
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'd',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcThorn
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			't',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcSoftTh
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'l',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LeftChevron
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'r',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1RightChevron
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'x',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1InvExclam
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'q',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1InvQuest
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'a',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcAo
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'p',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1Pound
+			}
+		},
+	TABLE_ENTRY_ANOTHER_CTRL_DIGIT
+	};
+
+LOCAL_D const SFuncTableEntry table2[]=
+	{
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'a',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcAumlaut
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'e',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcEumlaut
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'i',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcIumlaut
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'o',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcOumlaut
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'u',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcUumlaut
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'y',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcYumlaut
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			' ',
+			EMatchKey
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1SpaceUmlaut
+			}
+		},
+	TABLE_ENTRY_ANOTHER_CTRL_DIGIT
+	};
+
+LOCAL_D const SFuncTableEntry table3[]=
+	{
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'a',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcAgrave
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'e',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcEgrave
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'i',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcIgrave
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'o',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcOgrave
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'u',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcUgrave
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			' ',
+			EMatchKey
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1SpaceGrave
+			}
+		},
+	TABLE_ENTRY_ANOTHER_CTRL_DIGIT
+	};
+
+LOCAL_D const SFuncTableEntry table4[]=
+	{
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'a',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcAacute
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'e',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcEacute
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'i',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcIacute
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'o',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcOacute
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'u',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcUacute
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'y',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcYacute
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			' ',
+			EMatchKey
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcSpaceAcute
+			}
+		},
+	TABLE_ENTRY_ANOTHER_CTRL_DIGIT
+	};
+
+LOCAL_D const SFuncTableEntry table5[]=
+	{
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'a',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcAtilde
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'n',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcNtilde
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'o',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcOtilde
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			' ',
+			EMatchKey
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcSpaceTilde
+			}
+		},
+	TABLE_ENTRY_ANOTHER_CTRL_DIGIT
+	};
+
+LOCAL_D const SFuncTableEntry table6[]=
+	{
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'a',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcAcirc
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'e',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcEcirc
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'i',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcIcirc
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'o',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcOcirc
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			'u',
+			EMatchKeyCaseInsens
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcUcirc
+			}
+		},
+		{
+			{
+			EModifierFunc|EModifierKeyUp,
+			0
+			},
+			{
+			' ',
+			EMatchKey
+			},
+			{
+			EStateNormal,
+			EPassSpecialKeyThru,
+			ELatin1LcSpaceCirc
+			}
+		},
+	TABLE_ENTRY_ANOTHER_CTRL_DIGIT
+	};
+
+LOCAL_D const SFuncTableEntry table7[]=
+	{
+	TABLE_ENTRY_ANOTHER_CTRL_DIGIT
+	};
+
+LOCAL_D const SFuncTableEntry table8[]=
+	{
+	TABLE_ENTRY_ANOTHER_CTRL_DIGIT
+	};
+
+LOCAL_D const SFuncTableEntry table9[]=
+	{
+	TABLE_ENTRY_ANOTHER_CTRL_DIGIT
+	};
+
+LOCAL_D const SFuncTableEntry table10[]=
+	{
+		{ // check for ctrl-number presses
+			{
+			EModifierCtrl|EModifierFunc|EModifierKeyUp,
+			EModifierCtrl
+			},
+			{
+			EKeyNull,
+			EAnyDecimalDigit
+			},
+			{
+			EStateDerivedFromDigitEntered,
+			EAddOnCtrlDigit,
+			0
+			}
+		},
+		{ // filter out up key strokes
+			{
+			EModifierKeyUp,
+			EModifierKeyUp
+			},
+			{
+			EKeyNull,
+			EAnyKey
+			},
+			{
+			EStateUnchanged,
+			EDoNothing,
+			0
+			}
+		},
+		{ // pass thru any non-processed keys
+			{
+			0,
+			0
+			},
+			{
+			EKeyNull,
+			EAnyKey
+			},
+			{
+			EStateUnchanged,
+			EPassKeyThru,
+			0
+			}
+		}
+	};
+
+//LOCAL_D const SFuncTableEntry table11[]=
+//	{
+//	TABLE_ENTRY_ANOTHER_CTRL_DIGIT
+//	};
+
+LOCAL_D const SFuncTableEntry table12[]=
+	{  
+		{
+			{
+			EModifierKeyUp,
+			EModifierKeyUp
+			},
+			{
+			EKeyLeftCtrl,
+			EMatchLeftOrRight
+			},
+			{
+			EStateNormal,
+			EPassCtrlDigitsThru,
+			0
+			}
+		},
+	TABLE_ENTRY_ANOTHER_CTRL_DIGIT
+	};
+
+LOCAL_D const SFuncTable genFuncTables[]=
+	{
+		{
+		ARRAY_LENGTH(table0),
+		&table0[0]
+		},
+		{
+		ARRAY_LENGTH(table1),
+		&table1[0]
+		},
+		{
+		ARRAY_LENGTH(table2),
+		&table2[0]
+		},
+		{
+		ARRAY_LENGTH(table3),
+		&table3[0]
+		},
+		{
+		ARRAY_LENGTH(table4),
+		&table4[0]
+		},
+		{
+		ARRAY_LENGTH(table5),
+		&table5[0]
+		},
+		{
+		ARRAY_LENGTH(table6),
+		&table6[0]
+		},
+		{
+		ARRAY_LENGTH(table7),
+		&table7[0]
+		},
+		{
+		ARRAY_LENGTH(table8),
+		&table8[0]
+		},
+		{
+		ARRAY_LENGTH(table9),
+		&table9[0]
+		},
+		{
+		ARRAY_LENGTH(table10),
+		&table10[0]
+		},
+		{
+		0,
+		NULL
+		},
+		{
+		ARRAY_LENGTH(table12),
+		&table12[0]
+		}
+	};
+
+LOCAL_D const SFuncTables FuncTables=
+	{
+		{
+		ARRAY_LENGTH(defaultTable),
+		&defaultTable[0]
+		},
+		{
+		ARRAY_LENGTH(modifierTable),
+		&modifierTable[0]
+		},
+	ARRAY_LENGTH(genFuncTables),
+	&genFuncTables[0]
+	};
+
+LOCAL_D const SScanCodeBlock scanCodeBlock_unmodifiable[]=
+	{
+	{EStdKeyLeftShift, EStdKeyScrollLock}
+	};
+
+LOCAL_D const TUint16 convKeyCodes_unmodifiable[]=
+	{
+	EKeyLeftShift,
+	EKeyRightShift,
+	EKeyLeftAlt,
+	EKeyRightAlt,
+	EKeyLeftCtrl,
+	EKeyRightCtrl,
+	EKeyLeftFunc,
+	EKeyRightFunc,
+	EKeyCapsLock,
+	EKeyNumLock,
+	EKeyScrollLock
+	};
+
+// base: this table traps all of the keyboard's scanCodes except those in convKeyCodes_unmodifiable
+LOCAL_D const SScanCodeBlock scanCodeBlock_base[]=
+	{
+	{EStdKeyNull, EStdKeyDownArrow},
+	{'0', '9'},
+	{'A', 'Z'},
+	{EStdKeyF1, EStdKeyDial},
+	{EStdKeyIncVolume, EStdKeyDecVolume},
+	{EStdKeyDevice0,EStdKeyDeviceF},
+	{EStdKeyApplication0, EStdKeyApplicationF},
+	{EStdKeyYes, EStdKeyDecBrightness},
+	{EStdKeyDevice10,EStdKeyDevice1F},
+	{EStdKeyApplication10, EStdKeyApplication1F},
+	{EStdKeyDevice20,EStdKeyDevice27},
+	{EStdKeyApplication20, EStdKeyApplication27}
+	};
+
+//
+//	This table is internatioalizable
+//
+LOCAL_D const TUint16 convKeyCodes_base[]=
+	{
+	EKeyNull,
+	EKeyBackspace,
+	EKeyTab,
+	EKeyEnter,
+	EKeyEscape,
+	' ',
+	EKeyPrintScreen,
+	EKeyPause,
+	EKeyHome,
+	EKeyEnd,
+	EKeyPageUp,
+	EKeyPageDown,
+	EKeyInsert,
+	EKeyDelete,
+	EKeyLeftArrow,
+	EKeyRightArrow,
+	EKeyUpArrow,
+	EKeyDownArrow,
+	'0',
+	'1',
+	'2',
+	'3',
+	'4',
+	'5',
+	'6',
+	'7',
+	'8',
+	'9',
+	'a',
+	'b',
+	'c',
+	'd',
+	'e',
+	'f',
+	'g',
+	'h',
+	'i',
+	'j',
+	'k',
+	'l',
+	'm',
+	'n',
+	'o',
+	'p',
+	'q',
+	'r',
+	's',
+	't',
+	'u',
+	'v',
+	'w',
+	'x',
+	'y',
+	'z',
+	EKeyF1,
+	EKeyF2,
+	EKeyF3,
+	EKeyF4,
+	EKeyF5,                 // Media change emulation
+    EKeyF6,
+    EKeyF7,
+    EKeyF8,					// Case close
+	EKeyF9,					// KeyOff
+    EKeyF10,                // SwitchOff
+    EKeyF11,                // Case open
+	EKeyF12,
+	EKeyF13,
+	EKeyF14,
+	EKeyF15,
+	EKeyF16,
+	EKeyF17,
+	EKeyF18,
+	EKeyF19,
+	EKeyF20,
+	EKeyF21,
+	EKeyF22,
+	EKeyF23,
+	EKeyF24,
+	'`',
+	',',
+	'.',
+	'/',
+	'\\',
+	';',
+	'\'',
+	'#',
+	'[',
+	']',
+	'-',
+	'=',
+	'/',
+	'*',
+	'-',
+	'+',
+	EKeyEnter,
+	EKeyEnd,
+	EKeyDownArrow,
+	EKeyPageDown,
+	EKeyLeftArrow,
+	EKeyNull, // numeric keypad '5'
+	EKeyRightArrow,
+	EKeyHome,
+	EKeyUpArrow,
+	EKeyPageUp,
+	EKeyInsert,
+	EKeyDelete,
+    EKeyMenu,
+    EKeyBacklightOn,
+    EKeyBacklightOff,
+    EKeyBacklightToggle,
+    EKeyIncContrast,
+    EKeyDecContrast,
+    EKeySliderDown,
+    EKeySliderUp,
+    EKeyDictaphonePlay,
+    EKeyDictaphoneStop,
+    EKeyDictaphoneRecord,
+    EKeyHelp,
+    EKeyOff,
+    EKeyDial,
+	EKeyIncVolume,
+	EKeyDecVolume,
+	EKeyDevice0,
+	EKeyDevice1,
+	EKeyDevice2,
+	EKeyDevice3,
+	EKeyDevice4,
+	EKeyDevice5,
+	EKeyDevice6,
+	EKeyDevice7,
+	EKeyDevice8,
+	EKeyDevice9,
+	EKeyDeviceA,
+	EKeyDeviceB,
+	EKeyDeviceC,
+	EKeyDeviceD,
+	EKeyDeviceE,
+	EKeyDeviceF,
+	EKeyApplication0,
+	EKeyApplication1,
+	EKeyApplication2,
+	EKeyApplication3,
+	EKeyApplication4,
+	EKeyApplication5,
+	EKeyApplication6,
+	EKeyApplication7,
+	EKeyApplication8,
+	EKeyApplication9,
+	EKeyApplicationA,
+	EKeyApplicationB,
+	EKeyApplicationC,
+	EKeyApplicationD,
+	EKeyApplicationE,
+	EKeyApplicationF,
+	EKeyYes,
+	EKeyNo,
+	EKeyIncBrightness,
+	EKeyDecBrightness,
+	EKeyDevice10,
+	EKeyDevice11,
+	EKeyDevice12,
+	EKeyDevice13,
+	EKeyDevice14,
+	EKeyDevice15,
+	EKeyDevice16,
+	EKeyDevice17,
+	EKeyDevice18,
+	EKeyDevice19,
+	EKeyDevice1A,
+	EKeyDevice1B,
+	EKeyDevice1C,
+	EKeyDevice1D,
+	EKeyDevice1E,
+	EKeyDevice1F,
+	EKeyApplication10,
+	EKeyApplication11,
+	EKeyApplication12,
+	EKeyApplication13,
+	EKeyApplication14,
+	EKeyApplication15,
+	EKeyApplication16,
+	EKeyApplication17,
+	EKeyApplication18,
+	EKeyApplication19,
+	EKeyApplication1A,
+	EKeyApplication1B,
+	EKeyApplication1C,
+	EKeyApplication1D,
+	EKeyApplication1E,
+	EKeyApplication1F,
+	EKeyDevice20,
+	EKeyDevice21,
+	EKeyDevice22,
+	EKeyDevice23,
+	EKeyDevice24,
+	EKeyDevice25,
+	EKeyDevice26,
+	EKeyDevice27,
+	EKeyApplication20,
+	EKeyApplication21,
+	EKeyApplication22,
+	EKeyApplication23,
+	EKeyApplication24,
+	EKeyApplication25,
+	EKeyApplication26,
+	EKeyApplication27
+	};
+
+// caps-lock: this table traps those scanCodes which are affected by caps-lock
+LOCAL_D const SScanCodeBlock scanCodeBlock_capsLock[]=
+	{
+	{'A', 'Z'}
+	};
+
+LOCAL_D const TUint16 convKeyCodes_capsLock[]=
+	{
+	'A',
+	'B',
+	'C',
+	'D',
+	'E',
+	'F',
+	'G',
+	'H',
+	'I',
+	'J',
+	'K',
+	'L',
+	'M',
+	'N',
+	'O',
+	'P',
+	'Q',
+	'R',
+	'S',
+	'T',
+	'U',
+	'V',
+	'W',
+	'X',
+	'Y',
+	'Z'
+	};
+
+// shift: this table traps those scanCodes which are affected
+// by shift EXCEPT for those scanCodes affected by caps-lock
+LOCAL_D const SScanCodeBlock scanCodeBlock_shift[]=
+	{
+	{'0', '9'},
+	{EStdKeyXXX, EStdKeyEquals},
+	};
+
+//
+//	This table is internatioalizable
+//
+LOCAL_D const TUint16 convKeyCodes_shift[]=
+	{
+	')',
+	'!',
+	'"',
+	ELatin1Pound,
+	'$',
+	'%',
+	'^',
+	'&',
+	'*',
+	'(',
+	ELatin1LogicNot,
+	'<',
+	'>',
+	'?',
+	'|',
+	':',
+	'@',
+	'~',
+	'{',
+	'}',
+	'_',
+	'+'
+	};
+
+// numlock: this table traps those scanCodes which are affected by numlock
+LOCAL_D const SScanCodeBlock scanCodeBlock_numLock[]=
+	{
+	{EStdKeyNkpForwardSlash, EStdKeyNkpFullStop}
+	};
+
+LOCAL_D const TUint16 convKeyCodes_numLock[]=
+	{
+	'/',
+	'*',
+	'-',
+	'+',
+	EKeyEnter,
+	'1',
+	'2',
+	'3',
+	'4',
+	'5',
+	'6',
+	'7',
+	'8',
+	'9',
+	'0',
+	'.'
+	};
+
+// ctrl: this table traps those scanCodes which are affected by ctrl
+LOCAL_D const SScanCodeBlock scanCodeBlock_ctrl[]=
+	{
+// The space key gets handled else where, otherwise it gets
+// thrown away as a NULL key
+//	{EStdKeySpace, EStdKeySpace},
+
+	{'A', 'Z'}
+	};
+
+LOCAL_D const TUint16 convKeyCodes_ctrl[]=
+	{
+//	0,
+	1,
+	2,
+	3,
+	4,
+	5,
+	6,
+	7,
+	8,
+	9,
+	10,
+	11,
+	12,
+	13,
+	14,
+	15,
+	16,
+	17,
+	18,
+	19,
+	20,
+	21,
+	22,
+	23,
+	24,
+	25,
+	26
+	};
+
+// Rotate by 90: this table traps those scancodes which are affected by the RotateBy90 modifier
+LOCAL_D const SScanCodeBlock scanCodeBlock_rotate[]=
+	{
+	{'Q', 'Q'},
+	{'W', 'W'},
+	{'E', 'E'},
+	{'A', 'A'},
+	{'S', 'S'},
+	{'D', 'D'},
+	{'Z', 'Z'},
+	{'X', 'X'},
+	{'C', 'C'},
+	};
+
+//rotate this 3x3 block of keys 90 degrees clockwise
+LOCAL_D const TUint16 convKeyCodes_rot90[]=
+	{
+	'z',
+	'a',
+	'q',
+	'x',
+	's',
+	'w',
+	'c',
+	'd',
+	'e',
+	};
+
+//rotate this 3x3 block of keys 180 degrees clockwise
+LOCAL_D const TUint16 convKeyCodes_rot180[]=
+	{
+	'c',
+	'x',
+	'z',
+	'd',
+	's',
+	'a',
+	'e',
+	'w',
+	'q',
+	};
+
+//rotate this 3x3 block of keys 90 degrees clockwise
+LOCAL_D const TUint16 convKeyCodes_rot270[]=
+	{
+	'e',
+	'd',
+	'c',
+	'w',
+	's',
+	'x',
+	'q',
+	'a',
+	'z',
+	};
+
+LOCAL_D const SConvSubTable
+	convSubTable_unmodifiable=
+		{
+		&convKeyCodes_unmodifiable[0],
+			{
+			ARRAY_LENGTH(scanCodeBlock_unmodifiable),
+			&scanCodeBlock_unmodifiable[0]
+			}
+		},
+    convSubTable_base=
+		{
+		&convKeyCodes_base[0],
+			{
+			ARRAY_LENGTH(scanCodeBlock_base),
+			&scanCodeBlock_base[0]
+			}
+		},
+	convSubTable_capsLock=
+		{
+		&convKeyCodes_capsLock[0],
+			{
+			ARRAY_LENGTH(scanCodeBlock_capsLock),
+			&scanCodeBlock_capsLock[0]
+			}
+		},
+	convSubTable_shift=
+		{
+		&convKeyCodes_shift[0],
+			{
+			ARRAY_LENGTH(scanCodeBlock_shift),
+			&scanCodeBlock_shift[0]
+			}
+		},
+	convSubTable_numLock=
+		{
+		&convKeyCodes_numLock[0],
+			{
+			ARRAY_LENGTH(scanCodeBlock_numLock),
+			&scanCodeBlock_numLock[0]
+			}
+        },
+	convSubTable_ctrl=
+		{
+		&convKeyCodes_ctrl[0],
+			{
+			ARRAY_LENGTH(scanCodeBlock_ctrl),
+			&scanCodeBlock_ctrl[0]
+			}
+		},
+	convSubTable_rot90=
+		{
+		&convKeyCodes_rot90[0],
+			{
+			ARRAY_LENGTH(scanCodeBlock_rotate),
+			&scanCodeBlock_rotate[0]
+			}
+		},	
+	convSubTable_rot180=
+		{
+		&convKeyCodes_rot180[0],
+			{
+			ARRAY_LENGTH(scanCodeBlock_rotate),
+			&scanCodeBlock_rotate[0]
+			}
+		},
+	convSubTable_rot270=
+		{
+		&convKeyCodes_rot270[0],
+			{
+			ARRAY_LENGTH(scanCodeBlock_rotate),
+			&scanCodeBlock_rotate[0]
+			}
+		};
+
+// Some modifiers, e.g. shift, may required more than one table (other than "base")
+// to be searched; therefore arrays of tables are required
+LOCAL_D const SConvSubTable
+	* const convSubTableArray_unmodifiable[]={&convSubTable_unmodifiable},
+	* const convSubTableArray_base[]={&convSubTable_base},
+	* const convSubTableArray_capsLock[]={&convSubTable_capsLock},
+	* const convSubTableArray_shift[]={&convSubTable_capsLock, &convSubTable_shift},
+	* const convSubTableArray_capsLockShift[]={&convSubTable_shift},
+	* const convSubTableArray_numLock[]={&convSubTable_numLock},
+	* const convSubTableArray_ctrl[]={&convSubTable_ctrl},
+	* const convSubTableArray_rot90[]={&convSubTable_rot90},
+	* const convSubTableArray_rot180[]={&convSubTable_rot180},
+	* const convSubTableArray_rot270[]={&convSubTable_rot270};
+
+// The order of these nodes is VITAL, as the scanCode/modifiers are
+// searched for a match in this order
+LOCAL_D const SConvTableNode convTableNodes[]=
+	{
+		{
+			{
+			0, /* iMask */
+			0  /* iValue */
+			}, /* maskedModifiers */
+		ARRAY_LENGTH(convSubTableArray_unmodifiable), /* numSubTables */
+		&convSubTableArray_unmodifiable[0]
+		}, /* pnodes[i] */
+		{
+			{
+			EModifierCtrl,
+			EModifierCtrl
+			},
+		ARRAY_LENGTH(convSubTableArray_ctrl),
+		&convSubTableArray_ctrl[0]
+		},
+		{
+			{
+			EModifierNumLock,
+			EModifierNumLock
+			},
+		ARRAY_LENGTH(convSubTableArray_numLock),
+		&convSubTableArray_numLock[0]
+		},
+		{
+			{
+			EModifierCapsLock|EModifierShift,
+			EModifierCapsLock
+			},
+		ARRAY_LENGTH(convSubTableArray_capsLock),
+		&convSubTableArray_capsLock[0]
+		},
+		{
+			{
+			EModifierShift|EModifierCapsLock,
+			EModifierShift
+			},
+		ARRAY_LENGTH(convSubTableArray_shift),
+		&convSubTableArray_shift[0]
+		},
+		{
+			{
+			EModifierCapsLock|EModifierShift,
+			EModifierCapsLock|EModifierShift
+			},
+		ARRAY_LENGTH(convSubTableArray_capsLockShift),
+		&convSubTableArray_capsLockShift[0]
+		},
+		{
+			{
+			EModifierRotateBy90,
+			EModifierRotateBy90
+			},
+		ARRAY_LENGTH(convSubTableArray_rot90),
+		&convSubTableArray_rot90[0]
+		},
+		{
+			{
+			EModifierRotateBy180,
+			EModifierRotateBy180
+			},
+		ARRAY_LENGTH(convSubTableArray_rot180),
+		&convSubTableArray_rot180[0]
+		},
+		{
+			{
+			EModifierRotateBy270,
+			EModifierRotateBy270
+			},
+		ARRAY_LENGTH(convSubTableArray_rot270),
+		&convSubTableArray_rot270[0]
+		},
+		{
+			{
+			0,
+			0
+			},
+		ARRAY_LENGTH(convSubTableArray_base),
+		&convSubTableArray_base[0]
+		}
+	};
+
+// The top-level exported data structure of all the conversion tables
+LOCAL_D const SConvTable ConvTable=
+	{
+	ARRAY_LENGTH(convTableNodes),
+	&convTableNodes[0]
+	};
+
+// The list of scan-codes on the numeric keypad
+LOCAL_D const SScanCodeBlock keypadScanCodeBlockArray[]=
+	{
+	{EStdKeyNumLock, EStdKeyNumLock},
+	{EStdKeyNkpForwardSlash, EStdKeyNkpFullStop}
+	};
+
+LOCAL_D const SScanCodeBlockList ConvTableKeypadScanCodes=
+	{
+	ARRAY_LENGTH(keypadScanCodeBlockArray),
+	&keypadScanCodeBlockArray[0]
+	};
+
+// The list of non-autorepeating key-codes
+LOCAL_D const TUint16 nonAutorepKeyCodeArray[]=
+	{
+	EKeyEscape,
+	EKeyPrintScreen,
+	EKeyPause,
+	EKeyInsert,
+	EKeyLeftShift,
+	EKeyRightShift,
+	EKeyLeftAlt,
+	EKeyRightAlt,
+	EKeyLeftCtrl,
+	EKeyRightCtrl,
+	EKeyLeftFunc,
+	EKeyRightFunc,
+	EKeyCapsLock,
+	EKeyNumLock,
+	EKeyScrollLock,
+    EKeyMenu,
+    EKeyDictaphonePlay,
+    EKeyDictaphoneStop,
+    EKeyDictaphoneRecord
+	};
+
+LOCAL_D const SKeyCodeList ConvTableNonAutorepKeyCodes=
+	{
+	ARRAY_LENGTH(nonAutorepKeyCodeArray),
+	&nonAutorepKeyCodeArray[0]
+	};
+
+EXPORT_C void KeyDataSettings(TRadix &aRadix,TCtrlDigitsTermination &aCtrlDigitsTermination,TInt &aDefaultCtrlDigitsMaxCount,
+							  TInt &aMaximumCtrlDigitsMaxCount)
+	{
+	aRadix=EDecimal;
+	aCtrlDigitsTermination=ETerminationByCtrlUp;
+	aDefaultCtrlDigitsMaxCount=3;
+	aMaximumCtrlDigitsMaxCount=10;
+	}
+
+EXPORT_C void KeyDataFuncTable(SFuncTables &aFuncTables)
+	{
+	aFuncTables=FuncTables;
+	}
+
+EXPORT_C void KeyDataConvTable(SConvTable &aConvTable, TUint &aConvTableFirstScanCode,TUint &aConvTableLastScanCode,
+							 SScanCodeBlockList &aKeypadScanCode,SKeyCodeList &aNonAutorepKeyCodes)
+	{
+	aConvTable=ConvTable;
+	aConvTableFirstScanCode=scanCodeBlock_base[0].firstScanCode;
+	aConvTableLastScanCode=scanCodeBlock_base[ARRAY_LENGTH(scanCodeBlock_base)-1].lastScanCode;
+	aKeypadScanCode=ConvTableKeypadScanCodes;
+	aNonAutorepKeyCodes=ConvTableNonAutorepKeyCodes;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/lffsdev.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,642 @@
+// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\lffsdev.cpp
+// 
+//
+
+#include <flash_media.h>
+#include <emulator.h>
+#include <property.h>
+
+#define FLASH_FAULT()	Kern::Fault("LFFSDEV",__LINE__)
+
+//#define M18_EMULATION // Test for Control Mode operation
+
+/********************************************
+ * Driver definitions
+ ********************************************/
+
+/** LFFS image name */
+const CHAR KLfsFileName[] = "LFSLDRV.BIN";
+
+
+//-- default values for LFFS related entries in "epoc.ini" file
+const TInt      KDefaultFlashSize = 0x400000;   //-- "FlashSize"        entry, default 4MB
+const TInt      KEraseBlockSize   = 0x20000;	//-- "FlashEraseSize"   entry, default 128KB
+const TUint32   KFlashEraseTime   =	1000000;	//-- "FlashEraseTime"   entry, default 1s
+const TInt      KWriteBlockSize   = 64;         //-- "FlashWriteSize"   entry
+const TInt      KFlashWriteTime   = 406;		//-- "FlashWriteTime"   entry, default 406us
+const TInt      KResumeTime       = 5000;		//-- "FlashResumeTime"  entry, default 5ms
+
+//-- other possible LFFS related entries in "epoc.ini" file:
+//-- "FlashHoldOffTime"   default value = iEraseTime/10
+
+//-- "FlashForceImgMount" default value = 0. If not 0 LFFS image will be mounted as it is, even if it doesn't have TLfsParams structure in the end.
+//-- Moreover, it won't be zero filled and TLfsParams structure won't be written at the end of the image file.
+//-- shall be useful for dealing with real images from the real devices
+
+
+/** 
+    This cunning structure is supposed to be at the very end of the LFFS image file. If it is not foung there, 
+    the image gets zero-filled (depends on "FlashForceImgMount" flag in epoc.ini). 
+*/
+
+struct TLfsParams
+	{
+	TInt iEraseSize;
+	};
+
+#ifdef _DEBUG
+/***************************************************
+ * ControlIO command types - for debug builds, only
+ ***************************************************/
+
+enum TCtrlIoTypes
+	{
+	//KCtrlIoRww=0,
+	KCtrlIoTimeout=1
+	};
+#endif
+
+
+const TInt KDataBufSize=1024;
+
+/********************************************
+ * Media driver class
+ ********************************************/
+class DMediaDriverFlashWin32 : public DMediaDriverFlash
+	{
+public:
+	enum TState
+		{
+		EIdle=0,
+		EWriting=1,
+		EEraseNoSuspend=2,
+		EErase=3,
+		ESuspendPending=4,
+		ESuspending=5,
+		ESuspended=6,
+		EErasePending=7
+		};
+public:
+	DMediaDriverFlashWin32(TInt aMediaId);
+public:
+	// replacing pure virtual - FLASH device specific stuff
+	virtual TInt Initialise();
+	virtual TUint32 EraseBlockSize();
+	virtual TUint32 TotalSize();
+	virtual TInt DoRead();
+	virtual TInt DoWrite();
+	virtual TInt DoErase();
+	virtual TInt Caps(TLocalDriveCapsV2& caps);
+public:
+	void HandleEvent();
+	void StartTimer(TInt aMicros);
+	void StartErase();
+	void SuspendErase();
+	void CompleteErase();
+	void CompleteWrite();
+	void CompleteSuspend();
+	void StartPendingRW();
+	void ReadFlashParameters();
+public:
+	static void TimerFn(TAny* aPtr);
+	static void EventDfc(TAny* aPtr);
+#ifdef _DEBUG
+public:
+    enum TCtrlIoState {/*EIdle=0,ECtrlIoWaitWr=1,ECtrlIoWaitRd=2,ECtrlIoWrActive=3,*/ECtrlIoTimeOutPrep=4};
+    TInt ControlIO(TInt aCommand,TAny* aParam1,TAny* /*aParam2*/);
+	TInt Request(TLocDrvRequest& m);
+#endif
+public:
+	TState iState;
+	
+	TInt iSize;
+	TInt iEraseBlockSize;
+	TInt iEraseTime;
+	TInt iSuspendHoldOffTime;
+	TInt iResumeTime;
+	TInt iWriteBlockSize;
+	TInt iWriteTime;
+    
+	HANDLE iFile;
+	HANDLE iMapping;
+	TUint8* iBase;
+	TUint8* iData;		// data being written
+	
+	NTimer iTimer;
+	TDfc iEventDfc;
+	TUint32 iTickPeriod;
+	TUint32 iEraseCounter;
+	TUint32 iErasePos;
+	TInt iTimerExtra;
+
+#ifdef _DEBUG
+public:
+    TUint8 iCtrlIoState;
+#endif
+	};
+
+DMediaDriverFlashWin32::DMediaDriverFlashWin32(TInt aMediaId)
+	:	DMediaDriverFlash(aMediaId),
+		iTimer(&TimerFn,this),
+		iEventDfc(&EventDfc,this,NULL,2),
+		iTickPeriod(NKern::TickPeriod())
+	{
+	// iState=EIdle;
+#ifdef _DEBUG
+    //iCtrlIoState=EIdle;
+#endif
+
+	}
+
+void DMediaDriverFlashWin32::ReadFlashParameters()
+//
+// Read the flash parameters from the ini file, or use defaults
+//
+	{
+   
+	iSize = Property::GetInt("FlashSize", KDefaultFlashSize);
+
+	TInt nblocks = Property::GetInt("FlashEraseBlocks", 0);
+	if (nblocks == 0)
+		nblocks = iSize/Property::GetInt("FlashEraseSize", KEraseBlockSize);
+
+	iEraseBlockSize = iSize / nblocks;
+	__ASSERT_ALWAYS(iEraseBlockSize * nblocks == iSize, FLASH_FAULT());
+	__ASSERT_ALWAYS((iEraseBlockSize & (iEraseBlockSize-1)) == 0, FLASH_FAULT());
+
+	iEraseTime = Property::GetInt("FlashEraseTime", KFlashEraseTime);
+	
+	iSuspendHoldOffTime = Property::GetInt("FlashHoldOffTime", iEraseTime/10);
+	iResumeTime = Property::GetInt("FlashResumeTime", KResumeTime);
+	iWriteBlockSize = Property::GetInt("FlashWriteSize", KWriteBlockSize);
+	__ASSERT_ALWAYS((iWriteBlockSize & (iWriteBlockSize-1)) == 0, FLASH_FAULT());
+
+	iWriteTime = Property::GetInt("FlashWriteTime", KFlashWriteTime);
+	
+	}
+
+TInt DMediaDriverFlashWin32::Initialise()
+	{
+	iEventDfc.SetDfcQ(iPrimaryMedia->iDfcQ);
+	iData=(TUint8*)Kern::Alloc(KDataBufSize);
+	if (!iData)
+		return KErrNoMemory;
+
+	ReadFlashParameters();
+
+	// locate/open the file that models the flash
+	CHAR filename[MAX_PATH];
+	strcpy(filename, Property::GetString("EmulatorMediaPath"));
+	if (!Emulator::CreateAllDirectories(filename))
+		return Emulator::LastError();
+	strcat(filename, KLfsFileName);
+	
+	iFile = CreateFileA(filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_FLAG_RANDOM_ACCESS, NULL);
+	if (iFile == INVALID_HANDLE_VALUE)
+		return Emulator::LastError();
+
+	TLfsParams p;
+	p.iEraseSize = -1;
+	DWORD bytes;
+	TBool valid;
+	
+    //-- try to read TLfsParams structure from the end of the image file.
+	if (SetFilePointer(iFile, iSize, NULL, FILE_BEGIN) != -1
+		&& ReadFile(iFile, &p, sizeof(TLfsParams), &bytes, NULL)
+		&& p.iEraseSize == iEraseBlockSize)
+	{
+        valid = ETrue; //-- read it OK.
+	}
+	else
+	{//-- couldn't read TLfsParams structure from the end of the image file.
+     //-- if "FlashForceImgMount" parameter from epoc.ini is 0 or not present,
+     //-- zero-fill the lffs image file and write TLfsParams structure at the end of the file.
+
+		const TInt forceImgMount = Property::GetInt("FlashForceImgMount", 0);
+        if(!forceImgMount)
+		{
+		p.iEraseSize = iEraseBlockSize;
+		if (SetFilePointer(iFile,iSize, NULL, FILE_BEGIN) == -1
+			|| !WriteFile(iFile, &p, sizeof(p), &bytes, NULL)
+			|| !SetEndOfFile(iFile))
+			return Emulator::LastError();
+		    
+		valid = EFalse;
+		}
+        else
+        {//-- mount LFFS image forcingly.
+            valid = ETrue;
+        }
+	}
+
+	iMapping = CreateFileMappingA(iFile, NULL, PAGE_READWRITE, 0, iSize, NULL);
+	if (iMapping == NULL)
+		return Emulator::LastError();
+
+	iBase = (TUint8*)MapViewOfFile(iMapping, FILE_MAP_WRITE, 0, 0, iSize);
+	if (iBase == NULL)
+		return Emulator::LastError();
+
+	//-- zero-fill media image it doesn't contain TLfsParams data at the very end.
+	if (!valid)
+	    {
+		memclr(iBase, iSize);
+        }
+
+	return KErrNone;
+	}
+
+TUint32 DMediaDriverFlashWin32::EraseBlockSize()
+	{
+	return iEraseBlockSize;
+	}
+
+TUint32 DMediaDriverFlashWin32::TotalSize()
+	{
+	return iSize;
+	}
+
+TInt DMediaDriverFlashWin32::DoRead()
+	{
+	if (iWriteReq)
+		return 1;	// write in progress so defer read
+	
+	__KTRACE_OPT(KLOCDRV,Kern::Printf("Flash:DoRead"));
+
+	if (iState==EErasePending)
+		{
+		iTimer.Cancel();
+		iState = ESuspended;
+		}
+	if (iState==EIdle || iState==ESuspended)
+		{
+		// can do the read now
+		TInt pos=(TInt)iReadReq->Pos();
+		TInt len=(TInt)iReadReq->Length();
+
+		TPtrC8 des(iBase+pos,len);
+		TInt r=iReadReq->WriteRemote(&des,0);
+		Complete(EReqRead,r);
+		if (iState==ESuspended)
+			StartErase();
+		}
+	else if (iState==EErase)
+		{
+		// erase in progress - suspend it
+		SuspendErase();
+		}
+	else if (iState==EEraseNoSuspend)
+		iState=ESuspendPending;
+	// wait for suspend to complete
+	return KErrNone;
+	}
+
+TInt DMediaDriverFlashWin32::DoWrite()
+	{
+	if (iReadReq)
+		return 1;	// read in progress so defer write
+
+	if (iState==EErasePending)
+		{
+		iTimer.Cancel();
+		iState = ESuspended;
+		}
+	if (iState==EIdle || iState==ESuspended)
+		{
+		// can start the write now
+		__KTRACE_OPT(KLOCDRV,Kern::Printf("Flash:Write Pos=%08x Length=%08x RemDesOff=%08x",
+											(TInt)iWriteReq->Pos(),(TInt)iWriteReq->Length(),iWriteReq->RemoteDesOffset()));
+		if (iState==EIdle)
+			iState=EWriting;
+		TInt pos = (TInt)iWriteReq->Pos();
+		TInt end = pos + (TInt)iWriteReq->Length();
+		pos &= ~(iWriteBlockSize-1);
+		end = (end + iWriteBlockSize-1) & ~(iWriteBlockSize-1);
+		StartTimer(((end-pos)/iWriteBlockSize) * iWriteTime);
+		}
+	else if (iState==EErase)
+		{
+		// erase in progress - suspend it
+		SuspendErase();
+		}
+	else if (iState==EEraseNoSuspend)
+		iState=ESuspendPending;
+	// wait for suspend to complete
+	return KErrNone;
+	}
+
+void DMediaDriverFlashWin32::CompleteWrite()
+//
+// Do the actual write in the completion
+// Transfer data in blocks from the client and AND it to the 'flash'
+//
+	{
+	__KTRACE_OPT(KLOCDRV,Kern::Printf("Flash:WriteComplete"));
+
+	TInt r = KErrNone;
+	TUint8* flash = iBase + (TInt)iWriteReq->Pos();
+	TInt len = (TInt)iWriteReq->Length();
+	TInt offset = 0;
+	while (len > 0)
+		{
+		TInt size = Min(len, KDataBufSize);
+		TPtr8 des(iData,size);
+		r = iWriteReq->ReadRemote(&des, offset);
+		if (r!=KErrNone)
+			break;
+		len -= size;
+		offset += size;
+		const TUint8* ptr = iData;
+		do
+			{
+			*flash++ &= *ptr++;
+			} while (--size > 0);
+		}
+
+	if (iState == EWriting)
+		iState = EIdle;
+	Complete(EReqWrite,r);
+	if (iState == ESuspended)
+		StartErase();
+	}
+
+TInt DMediaDriverFlashWin32::DoErase()
+	{
+	if (iReadReq || iWriteReq)
+		return 1;		// read or write in progress so defer this request
+	TInt pos=(TUint32)iEraseReq->Pos();
+	TInt len=(TUint32)iEraseReq->Length();
+	__KTRACE_OPT(KLOCDRV,Kern::Printf("Flash:DoErase %d@%08x",len,pos));
+	if (len!=iEraseBlockSize)
+		return KErrArgument;	// only allow single-block erase
+	if (pos & (iEraseBlockSize-1))
+		return KErrArgument;	// start position must be on erase block boundary
+	__ASSERT_ALWAYS(iState==EIdle,FLASH_FAULT());
+	iErasePos=pos;
+	StartErase();
+	return KErrNone;
+	}
+
+void DMediaDriverFlashWin32::StartTimer(TInt aMicros)
+	{
+	aMicros += iTimerExtra - (iTickPeriod>>1);
+	if (aMicros < 0)
+		{
+		iTimerExtra = aMicros + (iTickPeriod>>1);
+		iEventDfc.Enque();		// go off 'immediately'
+		}
+	else
+		{
+		iTimerExtra = 0;
+		iTimer.OneShot(aMicros / iTickPeriod);
+		}
+	}
+
+void DMediaDriverFlashWin32::TimerFn(TAny* aPtr)
+	{
+	((DMediaDriverFlashWin32*)aPtr)->iEventDfc.Add();
+	}
+
+void DMediaDriverFlashWin32::EventDfc(TAny* aPtr)
+	{
+	((DMediaDriverFlashWin32*)aPtr)->HandleEvent();
+	}
+
+void DMediaDriverFlashWin32::HandleEvent()
+	{
+	__KTRACE_OPT(KLOCDRV,Kern::Printf("Flash:Event %d", iState));
+	switch (iState)
+		{
+	case ESuspended:
+	case EWriting:	// write completed
+		{
+#ifdef _DEBUG
+		if(iCtrlIoState==ECtrlIoTimeOutPrep)
+			{
+			iState=EIdle;
+			iCtrlIoState=EIdle;
+			Complete(EReqWrite,KErrNotReady);
+			}
+		else
+#endif
+			CompleteWrite();
+		break;
+		}
+	case EEraseNoSuspend:
+		{
+#ifdef _DEBUG
+		if(iCtrlIoState==ECtrlIoTimeOutPrep)
+			{
+			iState=EIdle;
+			iCtrlIoState=EIdle;
+			Complete(EReqErase,KErrNotReady);
+			}
+		else
+			{
+#endif
+		TInt remain = iEraseCounter - NKern::TickCount();
+		if (remain <= 0)
+			CompleteErase();
+		else
+			{
+			iState=EErase;
+			StartTimer(remain * iTickPeriod);
+			}
+#ifdef _DEBUG
+			}
+#endif
+		break;
+		}
+	case EErasePending:
+		StartErase();
+		break;
+	case EErase:	// erase completed
+		CompleteErase();
+		break;
+	case ESuspendPending:
+		if (TInt(iEraseCounter - NKern::TickCount()) <= 0)
+			CompleteErase();
+		else
+			SuspendErase();
+		break;
+	case ESuspending:
+		CompleteSuspend();
+		break;
+	default:
+		__KTRACE_OPT(KPANIC,Kern::Printf("iState=%d",iState));
+		FLASH_FAULT();
+		}
+	}
+
+void DMediaDriverFlashWin32::StartErase()
+//
+// Continue an erase - iEraseCounter has the remaining time for the erase
+//
+	{
+	__KTRACE_OPT(KLOCDRV,Kern::Printf("Flash:StartErase %08x",iBase+iErasePos));
+	switch (iState)
+		{
+	case ESuspended:
+		iState = EErasePending;
+		StartTimer(iResumeTime);
+		break;
+	case EIdle:	// starting to erase
+		iEraseCounter = iEraseTime;
+	case EErasePending:
+		{
+		iState = EEraseNoSuspend;
+		TUint32 remain = iEraseCounter;
+		iEraseCounter = NKern::TickCount() + remain/iTickPeriod;
+		StartTimer(Min(remain, iSuspendHoldOffTime));
+		}
+		break;
+	default:
+		__KTRACE_OPT(KPANIC,Kern::Printf("iState=%d",iState));
+		FLASH_FAULT();
+		}
+	}
+
+void DMediaDriverFlashWin32::SuspendErase()
+	{
+	__ASSERT_ALWAYS(iState==EErase || iState==ESuspendPending,FLASH_FAULT());
+	__KTRACE_OPT(KLOCDRV,Kern::Printf("Flash:SuspendErase %08x",iBase+iErasePos));
+	iTimer.Cancel();
+	TInt remain = Max(0, TInt(iEraseCounter - NKern::TickCount()));
+	iEraseCounter = remain * iTickPeriod;
+	iState = ESuspending;
+	StartTimer(0);
+	}
+
+void DMediaDriverFlashWin32::CompleteSuspend()
+	{
+	// erase suspend completion
+	__KTRACE_OPT(KLOCDRV,Kern::Printf("Flash:SuspendComplete"));
+
+	iState = ESuspended;
+	// start any pending read or write requests
+	StartPendingRW();
+	}
+
+void DMediaDriverFlashWin32::CompleteErase()
+//
+// Do the actual erase in the completion
+//
+	{
+	// erase completion
+	__KTRACE_OPT(KLOCDRV,Kern::Printf("Flash:EraseComplete"));
+
+	memset(iBase + iErasePos, 0xff, iEraseBlockSize);
+
+	// complete the erase request
+	iState = EIdle;
+	Complete(EReqErase,KErrNone);
+
+	// start any pending read or write requests
+	StartPendingRW();
+	}
+
+
+void DMediaDriverFlashWin32::StartPendingRW()
+	{
+	// start any pending read or write requests
+	if (iReadReq)
+		DoRead();
+	if (iWriteReq)
+		DoWrite();
+	}
+
+#ifdef _DEBUG
+// Override the base class version in order to provide access to ControlIO
+//
+TInt DMediaDriverFlashWin32::Request(TLocDrvRequest& m)
+	{
+	TInt r;
+	TInt id=m.Id();
+	__KTRACE_OPT(KLOCDRV,Kern::Printf(">DMediaDriverFlashWin32::Request %d",id));
+	if (id!=DLocalDrive::EControlIO)
+		{
+		r=DMediaDriverFlash::Request(m);
+		return r;
+		}
+	r=ControlIO((TInt)m.iArg[0],m.iArg[1],m.iArg[2]);
+	DMediaDriver::Complete(m,r);
+	return r;
+	}
+
+TInt DMediaDriverFlashWin32::ControlIO(TInt aCommand,TAny* /*aParam1*/,TAny* /*aParam2*/)
+	{
+	switch (aCommand)
+		{
+		case(KCtrlIoTimeout):
+			{
+			__KTRACE_OPT(KLOCDRV,Kern::Printf("Flash:DoControlIO invoked for KCtrlIoTimeout"));
+			// The aim of this test is simulate a flash timeout (and so exercise the consequent
+			// actions of the software that initiated the request)				
+			if(iCtrlIoState!=EIdle)
+				{
+				__KTRACE_OPT(KLOCDRV,Kern::Printf("Flash: ControlIO request before previous completed"));
+				return KErrServerBusy;
+				}
+			else
+				{
+				__KTRACE_OPT(KLOCDRV,Kern::Printf("Flash: ControlIO timeout initiated"));
+				iCtrlIoState=ECtrlIoTimeOutPrep;
+				}
+			break;
+			}
+		
+		default:
+			{
+			__KTRACE_OPT(KLOCDRV,Kern::Printf("Flash: ERROR - unrecognised ControlIO command %d",aCommand));
+			FLASH_FAULT();
+			break;
+			}
+		}
+	return KErrNone;
+	}
+	
+#endif
+
+TInt DMediaDriverFlashWin32::Caps(TLocalDriveCapsV2& aCaps)
+// On return, aCaps data contains capability information about the 
+// flash device, in the form of a class derived from TLocalDriveCapsV2. 
+// The size of the derived class should not exceed KMaxLocalDriveCapsLength 
+// which is defined and used in e32\drivers\locmedia\locmedia.cpp. If a 
+// larger sized capabilities class is used, and this code is modified to 
+// write to member data beyond KMaxLocalDriveCapsLength this will cause a 
+// fault.
+	{
+	// Invoke the base class method then update the sizes for
+	// Control Mode and Object Mode as required.
+	DMediaDriverFlash::Caps(aCaps);
+#if defined (M18_EMULATION)
+	TLocalDriveCapsV7* caps = &((TLocalDriveCapsV7&)(aCaps));
+	caps->iControlModeSize=16;
+	caps->iObjectModeSize=1024;
+    __KTRACE_OPT( KLOCDRV, Kern::Printf("MLFS: ) ControlModeSize UPDATED as=0x%x", caps->iControlModeSize) );
+    __KTRACE_OPT( KLOCDRV, Kern::Printf("MLFS: ) ObjectModeSize UPDATED as=0x%x", caps->iObjectModeSize) );
+#endif
+	return KErrCompletion;	// synchronous completion
+	}
+
+DMediaDriverFlash* DMediaDriverFlash::New(TInt aDevice)
+	{
+	return new DMediaDriverFlashWin32(aDevice);
+	}
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/mmc.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1444 @@
+// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// PP_MMC.CPP
+// 
+//
+
+#include "plat_priv.h"
+#include <property.h>
+#include "variant.h"
+#include "variantmediadef.h"
+#include "mmci.h" 
+
+//#define  __CARD0_NOT_LOCKABLE__
+//#define  __CARD1_NOT_LOCKABLE__
+
+const TInt  KDiskSectorSize=512;
+
+TInt  DWinsMMCStack::TotalMDiskSize=0;		///< mmc card size for emulator
+TUint DWinsMMCStack::CSIZE=0;				///< mmc card size field
+TUint DWinsMMCStack::CSIZE_MULT=0;			///< mmc card size field
+
+TInt  DWinsMMCStack::TotalWinsMMC_CardSlots = KDefault_TotalWinsCardSlots; ///< total number of MMC card slots for the emulator
+TInt  DWinsMMCStack::TotalWinsMMC_Cards     = KDefault_TotalWinsCards;     ///< total number of MMC cards for the emulator
+
+
+const TUint32 KCsdStructure = 0x01;	/* CSD Version No 1.1 */
+const TUint32 KCsdSpecVers  = 0x03;	/* Version 3.1 */
+
+TInt MapLastErrorEpoc()
+//
+// Map an NT error to an Epoc/32 error.
+//
+	{
+	TInt res=KErrGeneral;
+	switch (GetLastError())
+		{
+		case ERROR_SHARING_VIOLATION : res=KErrAccessDenied; break;
+		case ERROR_LOCK_VIOLATION : res=KErrLocked; break;
+		case ERROR_FILE_NOT_FOUND: res=KErrNotFound; break;
+		case ERROR_PATH_NOT_FOUND: res=KErrPathNotFound; break;
+		case ERROR_ALREADY_EXISTS:
+		case ERROR_FILE_EXISTS:
+			res=KErrAlreadyExists;
+			break;
+		case ERROR_NOT_READY: res=KErrNotReady; break;
+		case ERROR_UNRECOGNIZED_VOLUME:
+		case ERROR_NOT_DOS_DISK:
+			res=KErrUnknown;
+			break;
+		case ERROR_UNRECOGNIZED_MEDIA: res=KErrCorrupt; break;
+		case ERROR_INVALID_NAME: res=KErrBadName; break;
+		case ERROR_NO_MORE_FILES: res=KErrEof; break;
+		}
+	return(res);
+	}
+
+TMMCErr MapLastErrorMmc()
+//
+// Map an NT error to a TMMCErr error.
+//
+	{
+	DWORD r=GetLastError();
+	TInt res=KErrGeneral;
+	switch (r)
+		{
+		case ERROR_SHARING_VIOLATION:
+		case ERROR_LOCK_VIOLATION:
+			res=KMMCErrLocked;			// KErrLocked
+			break;
+		case ERROR_FILE_NOT_FOUND:
+		case ERROR_PATH_NOT_FOUND:
+			res=KMMCErrNotFound;		// KErrNotFound
+			break;
+		case ERROR_ALREADY_EXISTS:
+		case ERROR_FILE_EXISTS:
+			res=KMMCErrAlreadyExists;	// KErrAlreadyExists
+			break;
+		case ERROR_NOT_READY: res=KMMCErrNoCard; break;
+		case ERROR_UNRECOGNIZED_VOLUME:
+		case ERROR_NOT_DOS_DISK:
+			res=KMMCErrGeneral;			// KErrGeneral
+			break;
+		case ERROR_UNRECOGNIZED_MEDIA:
+		case ERROR_INVALID_NAME:
+		case ERROR_NO_MORE_FILES:
+			res=KMMCErrResponseCRC; 	// KErrCorrupt
+			break;
+		}
+	return(res);
+	}
+
+
+void DWinsMMCStack::MachineInfo(TMMCMachineInfo& aMachineInfo)
+//
+// Return machine info relating to this MultiMediaCard Stack
+//
+	{
+	aMachineInfo.iTotalSockets=TotalWinsMMC_CardSlots;
+	aMachineInfo.iTotalMediaChanges=0;  		// Not used at present
+	aMachineInfo.iTotalPrimarySupplies=0;		// Not used at present
+
+	aMachineInfo.iFlags = TMMCMachineInfo::ESupportsDoubleBuffering;
+    aMachineInfo.iBaseBusNumber=0;
+
+	__KTRACE_OPT(KPBUS1,Kern::Printf("<WinsMMC:MachineInfo"));
+	__KTRACE_OPT(KPBUS1,Kern::Printf(" %d stacks",aMachineInfo.iTotalSockets));
+
+	__ASSERT_DEBUG(aMachineInfo.iTotalSockets<=KMaxMMCardsPerStack,Panic(EWinsMMCBadMachineInfo));
+	}
+
+void DWinsMMCStack::AdjustPartialRead(
+	const TMMCard* aCard, TUint32 aStart, 
+#ifdef _DEBUG
+	TUint32 aEnd, 
+#else
+	TUint32 /*aEnd*/, 
+#endif
+	TUint32* aPhysStart, TUint32* aPhysEnd) const
+	{
+	const TUint32 blkLen = 1 << aCard->MaxReadBlLen();
+	const TUint32 blkMsk = blkLen - 1;
+#ifdef _DEBUG
+	__ASSERT_DEBUG(aCard->CSD().ReadBlPartial(), Panic(EWinsMMCAPRNotSupp));
+	__ASSERT_DEBUG(aEnd - aStart <= blkLen, Panic(EWinsMMCAPRRange));
+	__ASSERT_DEBUG((aEnd & ~blkMsk) > (aStart & ~blkMsk), Panic(EWinsMMCAPRBoundary));
+#endif
+
+	*aPhysStart = aStart & ~blkMsk;
+	*aPhysEnd = *aPhysStart + blkLen;
+	}
+
+void DWinsMMCStack::GetBufferInfo(TUint8** aMDBuf, TInt* aMDBufLen)
+	{
+	*aMDBuf = iMDBuf;
+	*aMDBufLen = iMDBufLen;
+	}
+
+void DWinsMMCStack::Panic(TWinsMMCPanic aPanic)
+	{
+	_LIT(KPncNm,"PBUS-MMC-WINS");
+	Kern::PanicCurrentThread(KPncNm,aPanic);
+	}
+
+DWinsMMCStack::DWinsMMCStack(TInt aBus, DMMCSocket* aSocket)
+	          :DMMCStack(aBus, aSocket)
+	{
+	
+//	iAddressedCard=0;
+//	iSecureArgDevAddr=0;
+//	iSecureArgTotalLength=0;
+//	iCMD42Failed=EFalse;
+	}
+
+
+/**
+    Allocate cards.  Only called at bootup, so no cleanup if fails.
+*/
+TInt DWinsMMCStack::Init()
+	{
+	 
+    //-- try to read number of mmc cards and slots from epoc.ini file
+    const TInt MmcSlots = Property::GetInt("MultiMediaCardSlots");
+    const TInt MmcCards = Property::GetInt("MultiMediaCardsNum");
+    
+    if(MmcSlots == 0 && MmcCards == 0)
+        {//-- parameters not specified, do nothing; static variables are initialized with default values
+        }
+    else
+        {
+        if((MmcSlots == 0 && MmcCards >0) || (MmcSlots > 0 && MmcCards ==0))
+            {//-- only one of the parameters is specified. use it as "Cards quantity"
+            TotalWinsMMC_Cards     = Max(MmcSlots, MmcCards); //-- chose non zero value
+            TotalWinsMMC_CardSlots = Max(1, TotalWinsMMC_Cards-1);
+            }
+        else
+            {//-- both parameters are specified
+            TotalWinsMMC_Cards     = MmcCards;
+            TotalWinsMMC_CardSlots = MmcSlots;
+            }
+    
+        }//if(!MmcSlots && !MmcCards)
+
+    TotalWinsMMC_Cards      = Min(TotalWinsMMC_Cards, KMax_TotalWinsCards);
+    TotalWinsMMC_CardSlots  = Min(TotalWinsMMC_CardSlots, KMax_TotalWinsCardSlots);
+
+    
+    if((iCardArray = new TMMCardArray(this)) == NULL)
+		return KErrNoMemory;
+
+	TInt r=DMMCStack::Init();
+	if(r!=KErrNone)
+		return r;
+
+	DMediaChangeBase* pMCBase = MMCSocket()->iMediaChange;
+	static_cast<DWinsMMCMediaChange*>(pMCBase)->SetStackP(this);
+	Wins::SetMediaChangeCallBackPtr(DWinsMMCMediaChange::MediaChangeCallBack, (TAny*)pMCBase);
+
+	//
+	// Over time memory can become fragmented, and so it is not possible to
+	// allocate physically contiguous pages.  Therefore, the buffers for IO
+	// are allocated at startup.
+	//
+	// For the WINS implementation, fragmentation does not matter because
+	// DMA is not used.  The memory must still be allocated here so MEDMMC is
+	// able to use it.
+	//
+	// The constant calculations could be folded, but this illustrates how the
+	// values are derived.
+	//
+
+	// MMC only - values from Hitachi 16Mb card, datasheet HB288016MM1
+
+	// minor buffer must contain enough space for MBR or block
+	const TUint mmcBlkSzLog2 = 9;				// READ_BLK_LEN and WRITE_BLK_LEN
+	const TUint mmcBlkSz = 1 << mmcBlkSzLog2;
+	const TInt mmcMinorBufLen = Max(KDiskSectorSize, mmcBlkSz);
+
+	// There are 2 slots each with up to 2 media drivers; we allocate 8 blocks for each driver.
+	// It is the media drivers' responsibility to devide up the buffer space according 
+	// to which slot number is allocated to it (DMmcMediaDriverFlash::iCardNumber)
+	const TInt KMinMMCBlocksInBuffer = 16 * MMC0_NUMMEDIA;
+	const TInt mmcCchBufLen = KMinMMCBlocksInBuffer << mmcBlkSzLog2;
+
+	const TInt mmcTotalBufLen = mmcMinorBufLen + mmcCchBufLen;
+
+	const TInt totalBufLen = mmcTotalBufLen;
+
+	iMDBuf = reinterpret_cast<TUint8*>(Kern::Alloc(totalBufLen));
+	iMDBufLen = totalBufLen;
+
+	// setup card size parameters from epoc.ini
+	if (TotalMDiskSize==0)
+		{
+		// Static member variable TotalMDiskSize initialised to zero by default. Set 
+		// up static member variables TotalMDiskSize, CSIZE and CSIZE_MULT once and 
+		// once only. Use INI file setting if available. Else set to default, IMb.
+		TUint cardSize = Property::GetInt("MultiMediaCardSize");
+		if (cardSize)
+			{
+			// set values to match epoc.ini settings
+			SetupDiskParms(cardSize);
+			}		
+		else
+			{
+			// set default values for 1 MB drive
+			TotalMDiskSize=0x100000;
+			CSIZE=127;
+			CSIZE_MULT=2;
+			}
+		}
+
+	// Initialise each virtual card that will be used on this stack.
+	TInt i;
+	for (i=0 ; i<TotalWinsMMC_Cards; i++)
+		{
+		if ((r=SetupSimulatedCard(i))!=KErrNone)
+			return(r);
+		}
+
+	// initialize pointers to currently present cards
+
+	// Slot zero can toggle between no card; card 0 and card 1.  The current state is
+	// determined by *Kern::CurrentPBusDevicePtr() and toggled by pressing F4 when F5
+	// (door open) is held down.  Because this function is only executed at startup,
+	// assume start with card zero.
+	iCardInfo[0] = iCardPool[0];
+	for (i = 1; i < TotalWinsMMC_CardSlots; ++i)
+		{
+		iCardInfo[i]=iCardPool[i+1];
+		}
+
+	return(KErrNone);
+	}
+
+
+TInt DWinsMMCStack::CreateBinFileForCard(TInt aCardNum,HANDLE* aHandle,TBool aCreateNew)
+//
+// create .bin file in temp directory to contain media area of card.
+//
+	{
+	const char* emulatorPath = Property::GetString("EmulatorMediaPath");
+	if (!Emulator::CreateAllDirectories(emulatorPath))
+		return Emulator::LastError();
+
+	TBuf8<KMaxFileName> fn8(_L8(emulatorPath));
+	fn8.Append(_L8("MMCCRD"));
+	fn8.AppendNum(aCardNum);
+	fn8.Append(_L8("A.BIN"));
+	fn8.Append('\0');
+	*aHandle = CreateFileA(
+		(LPCSTR) fn8.Ptr(),							// LPCSTR lpFileName,
+		GENERIC_READ | GENERIC_WRITE,				// DWORD dwDesiredAccess
+		FILE_SHARE_READ | FILE_SHARE_WRITE,			// DWORD dwShareMode
+		NULL,										// LPSECURITY_ATTRIBUTES lpSecurityAttributes
+		aCreateNew ? CREATE_ALWAYS : OPEN_ALWAYS,	// DWORD dwCreationDisposition
+		FILE_FLAG_RANDOM_ACCESS,					// DWORD dwFlagsAndAttributes
+			NULL);									// HANDLE hTemplateFile
+	
+	TInt fileSize=GetFileSize(*aHandle,NULL);
+	if (fileSize>TotalMDiskSize)
+		//
+		// The Drive file already exists and size of emulated drive as configured in 
+		// epoc.ini has been reduced. Musn't corrupt the emulated drive so delete the 
+		// drive file and start from scratch. The emulated drive contents will be 
+		// erased.
+		//
+		{
+		CloseHandle(*aHandle);
+		DeleteFileA(
+			(LPCSTR) fn8.Ptr());						// LPCSTR lpFileName,			
+		*aHandle = CreateFileA(
+			(LPCSTR) fn8.Ptr(),							// LPCSTR lpFileName,
+			GENERIC_READ | GENERIC_WRITE,				// DWORD dwDesiredAccess
+			FILE_SHARE_READ | FILE_SHARE_WRITE,			// DWORD dwShareMode
+			NULL,										// LPSECURITY_ATTRIBUTES lpSecurityAttributes
+			aCreateNew ? CREATE_ALWAYS : OPEN_ALWAYS,	// DWORD dwCreationDisposition
+			FILE_FLAG_RANDOM_ACCESS,					// DWORD dwFlagsAndAttributes
+				NULL);									// HANDLE hTemplateFile
+		}
+
+	if (*aHandle==INVALID_HANDLE_VALUE)
+		return(MapLastErrorEpoc());
+
+	if (SetFilePointer(*aHandle,TotalMDiskSize,NULL,FILE_BEGIN)==0xffffffffu
+		||	! SetEndOfFile(*aHandle) )
+		{
+		CloseHandle(*aHandle);
+	    return(MapLastErrorEpoc());
+		}
+
+	return KErrNone;
+	}
+
+
+TInt DWinsMMCStack::SetupSimulatedCard(TInt aCardNum)
+//
+// allocate individual card with Win32 file.  Only called at bootup, so no cleanup if fails.
+//
+	{
+	TWinsCardInfo* cip = new TWinsCardInfo;
+	if (cip == 0)
+		return(KErrNoMemory);
+
+	TUint8 cid[KMMCCIDLength];
+	cid[0] = 'C';
+	cid[1] = 'I';
+	cid[2] = 'D';
+	cid[3] = TUint8('0' + aCardNum);
+	TInt j;
+	for (j = 4; j < KMMCCIDLength - 1; ++j)
+		cid[j] = 'c';
+	cid[KMMCCIDLength - 1] = '#';				// '#' = 0x23, bit zero must be 1
+	cip->iCID=cid;
+
+	cip->iPWD=new TMediaPassword;
+	if (!cip->iPWD)
+		{
+		delete cip;
+		return(KErrNoMemory);
+		}
+
+	cip->iState=ECardStateIdle;
+
+	HANDLE h=NULL;
+	TInt err;
+	if ( (err=CreateBinFileForCard(aCardNum,&h))!=KErrNone )
+		{
+		delete cip;
+		return(err);
+		}
+	cip->iWinHandle=h;
+	iCardPool[aCardNum]=cip;
+	return(KErrNone);
+	}
+
+void DWinsMMCStack::SetBusConfigDefaults(TMMCBusConfig& aConfig, TUint aClock)
+//
+// Fills BusConfig structure with default values
+//
+	{
+	const TUint KWinsMaxHwInterfaceClk=104000;
+	const TUint KWinsResponseTimeOut=6400;
+	const TUint KWinsDataTimeOut=40000;
+	const TUint KWinsBusyTimeOut=200000;
+
+	aConfig.iBusClock = (aClock > KWinsMaxHwInterfaceClk) ? KWinsMaxHwInterfaceClk : aClock;
+	aConfig.iResponseTimeOut=KWinsResponseTimeOut;
+	aConfig.iDataTimeOut=KWinsDataTimeOut;
+	aConfig.iBusyTimeOut=KWinsBusyTimeOut;
+	}
+
+void DWinsMMCStack::InitClockOff()
+//
+// Switch of the identification mode clock and enable the data transfer mode
+// clock instead.
+//
+	{
+	// empty.
+	}
+
+void DWinsMMCStack::ASSPReset()
+//
+// Stop all activities on the host stack
+//
+	{
+	// empty.
+	}
+
+void DWinsMMCStack::ASSPDisengage()
+//
+// Forced release of all ASSP resources
+//
+	{
+	}
+
+void DWinsMMCStack::DoPowerDown()
+//
+// Power down the bus
+//
+	{
+	// Change the state of all virtual cards present to Idle
+	for (TInt i=0 ; i<TotalWinsMMC_CardSlots ; i++)
+		iCardInfo[i]->iState=ECardStateIdle;
+	}
+
+
+LOCAL_C TInt SetMediaPasswordEnvironmentVar(TInt aSocketNum,TInt aCardNum,const TDesC8& aPasswd)
+// 
+// Set the password for local drive 'aLocalDrive', card number 'aCardNum' to 'aPasswd' - as an
+// environment variable. Note that the card number is only relevant where the emulated drive
+// supports card hot-swapping (i.e. F4 whilst F5 is held down).
+//
+	{
+	// Setup the appropriate environment variable string '_EPOC_LocDrv_<locDrvNum>_PWORD_<cardNum>'
+	TUint16 envVar[]=L"_EPOC_Socket_X_PWORD_Y";
+
+	envVar[13]=(TUint16)('0'+aSocketNum);
+	envVar[21]=(TUint16)('0'+aCardNum);
+	
+	// Setup the new value of the environment variable
+	TUint16	envVal[100];
+	TInt len=aPasswd.Length();
+
+	// the password may be empty if a card's password is cleared
+	if (len>(100-1))
+		return(KErrArgument);
+	memcpy(&envVal[0],reinterpret_cast<const TUint16 *>(aPasswd.Ptr()),len);
+	envVal[len>>1]='\0';
+
+	// Now set the new value for the environment variable
+	if (SetEnvironmentVariable(envVar,&envVal[0]))
+		return(KErrNone);
+
+	return KErrGeneral;
+	}
+
+LOCAL_C TInt MediaPasswordEnvironmentVar(TInt aSocketNum,TInt aCardNum,TDes8& aPasswd)
+// 
+// Get the password for local drive 'aLocalDrive', card number 'aCardNum' into 'aPasswd' - from
+// an environment variable. Note that the card number is only relevant where the emulated drive
+// supports card hot-swapping (i.e. F4 whilst F5 is held down).
+//
+	{
+	TUint16 envVar[]=L"_EPOC_Socket_X_PWORD_Y";
+
+	envVar[13]=(TUint16)('0'+aSocketNum);
+	envVar[21]=(TUint16)('0'+aCardNum);
+	
+	TUint16 envVal[100];	// To hold the value of the retreived environment variable
+	
+	DWORD len=GetEnvironmentVariable(envVar,&envVal[0],100);
+	if (len>(TUint)100)
+		return(KErrGeneral);
+	if (len)
+		{
+		// Found the requested environment variable so there is a password for this local drive / card. 
+		if ((len<<1)<=KMaxMediaPassword)
+			{
+			aPasswd.FillZ(KMaxMediaPassword);
+			aPasswd.Zero();
+			aPasswd.Copy(reinterpret_cast<TUint8*>(&envVal[0]),len<<1);
+			return(KErrNone);	
+			}
+		else	
+			return(KErrGeneral);	
+		}
+
+	return(KErrNotFound);
+	}
+
+TMMCErr DWinsMMCStack::DoPowerUpSM()
+//
+//	State Machine functions implemented in ASSP layer
+//
+	{
+	enum states
+		{
+		EStBegin=0,
+		EStEnd
+		};
+
+	SMF_BEGIN
+
+	__KTRACE_OPT(KPBUS1, Kern::Printf("DoPowerUpSM: BEGIN"));
+
+	if( MMCSocket()->iVcc->SetState(EPsuOnCurLimit) != KErrNone )
+		return( KMMCErrHardware );
+
+	for (TInt i=0 ; i<TotalWinsMMC_CardSlots ; i++)
+		{
+		// Attempt to retrieve a password for this card from environment settings (as long as this
+		// isn't card0 and we are simulating this is not present)
+		TInt cardNum=(i==0) ? *Wins::CurrentPBusDevicePtr() : i;
+		if (cardNum>=0 && MediaPasswordEnvironmentVar(MMCSocket()->iSocketNumber,cardNum,*(iCardInfo[i]->iPWD))==KErrNone)
+			{
+			// Card has a password so lock it automatically on power up.		
+			iCardInfo[i]->iIsLocked=(iCardInfo[i]->iPWD->Length() > 0);
+			}
+		else	
+			iCardInfo[i]->iIsLocked=EFalse;
+			
+		iCardInfo[i]->iRCA=0x0001;		// Default RCA - spec 2.2, s4.2.1, 5.4
+		}
+
+		ReportPowerUp();
+
+	SMF_END
+	}
+
+TMMCErr DWinsMMCStack::InitClockOnSM()
+//
+// Switch on the identification mode clock
+//
+	{
+	enum states
+		{
+		EStBegin=0,
+		EStEnd
+		};
+	SMF_BEGIN
+
+	SMF_END
+	}
+
+TMMCErr DWinsMMCStack::ModifyCardCapabilitySM()
+//
+// This function provides a chance to modify the capability of paticular cards.
+// Licensee may overide this function to modify certain card's capability as needed.
+// A state machine is needed in derived function and function of base class should be
+// called in order to act more generic behaviour.
+//
+    {
+		enum states
+			{
+			EStBegin=0,
+            EStDone,
+			EStEnd
+			};
+
+    SMF_BEGIN
+
+        SMF_INVOKES( DMMCStack::BaseModifyCardCapabilitySMST, EStDone )
+
+    SMF_STATE(EStDone)
+
+    SMF_END
+    }
+
+TInt DWinsMMCStack::GetTargetSlotNumber(TBool anRCASupplied,const TRCA& anRCA)
+// 
+// Attempt to determine the slot number of the target card. If the received command
+// contained an RCA then 'anRCASupplied' will be ETrue - in which case, 'anRCA'
+// contains the RCA in question.
+// 
+	{
+	TInt selCardIdx = KBroadcastToAllCards;
+
+	// if an RCA was supplied, then work out which card slot it corresponds to
+	if (anRCASupplied)
+		{
+		for (TInt i = 0 ; i < TotalWinsMMC_CardSlots ; ++i)
+			{
+			if (iCardInfo[i]->iRCA==anRCA)
+				{
+				selCardIdx=i;
+				break;
+				}
+			}
+		}
+	// else search for currently selected card
+	else
+		{
+		for (TInt i = 0; i < TotalWinsMMC_CardSlots; ++i)
+			{
+			if (iCardInfo[i]->iState == ECardStateTran)
+				{
+				selCardIdx = i;
+				break;
+				}
+			}
+		}
+
+	return(selCardIdx);
+	}
+
+TMMCErr DWinsMMCStack::IssueMMCCommandSM()
+//
+// Top level ASSP command executor
+//
+	{
+	enum states
+		{
+		EStBegin=0,
+		EStDoubleBuffer,
+		EStCommandDone,
+		EStEnd
+		};
+
+	TMMCCommandDesc& cmd = Command();
+
+	TRCA tgtRCA=0;
+	TBool supRCA=EFalse;
+	// Record the RCA if it is embedded in the argument [31:16].
+	if (cmd.iCommand == ECmdSetRelativeAddr	||	cmd.iCommand == ECmdSelectCard
+	||	cmd.iCommand == ECmdSendCSD			||	cmd.iCommand == ECmdSendCID
+	||	cmd.iCommand == ECmdSendStatus		||	cmd.iCommand == ECmdGoInactiveState
+	||	cmd.iCommand == ECmdFastIO 			||  cmd.iCommand == ECmdAppCmd )
+		{
+		supRCA=ETrue;
+		tgtRCA=TUint16(cmd.iArgument >> 16);
+		}
+
+	// Attempt to determine the target card using supplied RCA
+	TInt selCardIdx=GetTargetSlotNumber(supRCA,tgtRCA);
+	
+	// Simulation of card swapping (i.e. F4/F5) is performed on slot 0. If this is currently
+	// set to simulate no card present and the issued command is targetted specifically at the
+	// card in slot 0 (i.e. not a broadcast command) then timeout.
+	if (selCardIdx==0 && *Wins::CurrentPBusDevicePtr() < 0)
+		return(KMMCErrResponseTimeOut);
+	 
+	// If an RCA was supplied but didn't coincide with the RCAs of any cards present 
+	// then timeout (Ignore SET_RCA and APP_CMD as these are sent before RCAs are assigned).
+	if (supRCA && selCardIdx==KBroadcastToAllCards &&
+		cmd.iCommand != ECmdSetRelativeAddr && cmd.iCommand != ECmdAppCmd)
+		return(KMMCErrResponseTimeOut);
+
+	HANDLE winHandle=NULL;
+
+	// CMD42 is a data transfer command.  That means the R1 response that it returns
+	// immediately is the state it is in on receiving the data block, and not after
+	// processing it.  If the data block is invalid then LOCK_UNLOCK_FAILED will be
+	// set in the R1 response which is sent in reply to the next command.
+
+	TBool nextCMD42Failed = EFalse;
+	TBool lock_unlock_failed=EFalse;
+
+	// When the card is locked, it will only respond to basic command class (0) and
+	// lock card command class (7).  An exception is CMD16.  This is sent before CMD42,
+	// but is classified (MMC Spec 23.2, table 5) as belonging to classes 2 and 4.
+	// For data transfer commands, LOCK_UNLOCK_FAIL is set in response to the following
+	const TMMCCommandEnum origCmd(cmd.iCommand);
+	if (	selCardIdx != KBroadcastToAllCards
+		&&	iCardInfo[selCardIdx]->iIsLocked			// If locked and not in CCC 0 or 7 then skip
+		&&	(	((cmd.iSpec.iCommandClass & (KMMCCmdClassBasic | KMMCCmdClassLockCard)) == 0)
+			&&	cmd.iCommand != ECmdSetBlockLen ) )
+		{
+		lock_unlock_failed = ETrue;				// try to access locked card
+		cmd.iCommand = TMMCCommandEnum(-1);		// skip command processing
+		}
+
+	SMF_BEGIN
+
+	TBool rto = EFalse;							// response timeout
+	switch (cmd.iCommand)
+		{
+		case ECmdGoIdleState:	// CMD0
+			{
+			for (TInt i = 0; i < TotalWinsMMC_CardSlots; ++i)
+				iCardInfo[i]->iState = ECardStateIdle;
+			}
+			break;
+
+		case ECmdSendOpCond:	// CMD1
+			{
+			for (TInt i = 0; i < TotalWinsMMC_CardSlots; ++i)
+				iCardInfo[i]->iState = ECardStateReady;
+
+			// bit32 is set to indicate cards are not still powering up
+			TUint32 r3 = KMMCWinsCardOCRValue | KMMCOCRBusy;
+			TMMC::BigEndian4Bytes(cmd.iResponse, r3);
+			}
+			break;
+
+		case ECmdAllSendCID:	// CMD2
+			{
+			TInt idx = FindAnyCardInStack(ECardStateReady);
+
+			if (idx == -1)
+				rto = ETrue;
+			else
+				{
+				iCardInfo[idx]->iCID.Copy(cmd.iResponse);
+				iCardInfo[idx]->iState = ECardStateIdent;
+				}
+			}
+			break;
+
+		case ECmdSetRelativeAddr:	// CMD3
+			{
+			TInt idx = FindOneCardInStack(ECardStateIdent);
+			iCardInfo[idx]->iRCA = tgtRCA;
+			iCardInfo[idx]->iState=ECardStateStby;
+			selCardIdx = idx;					// set R1 response at end
+			}
+			break;
+
+		case ECmdSelectCard:		// CMD7
+			{
+			// switch to broadcast mode so the currently selected and new cards
+			// receive the command simultaneously.
+
+			TInt idx = FindAnyCardInStack(ECardStateTran);
+			if (idx != -1)
+				iCardInfo[idx]->iState = ECardStateStby;
+			iCardInfo[selCardIdx]->iState = ECardStateTran;
+			}
+			break;
+
+		case ECmdSendStatus:
+			// R1 response so status return as for any other R1 command.
+			break;
+
+		case ECmdReadSingleBlock:
+		case ECmdReadMultipleBlock:
+			{
+			winHandle=iCardInfo[selCardIdx]->iWinHandle;
+
+			if ( cmd.iSpec.iUseStopTransmission && cmd.iBlockLength >= cmd.iTotalLength)
+				return( KMMCErrNotSupported );
+
+    		TMMCErr err;
+			TInt pos = cmd.iArgument;
+    		if (SetFilePointer(winHandle,pos,NULL,FILE_BEGIN)==0xffffffffu)
+        		err=MapLastErrorMmc();
+    		else
+        		{
+				iBytesToTransfer = cmd.BufferLength();
+				err = ReadWriteData(selCardIdx, cmd.iDataMemoryP, iBytesToTransfer, cmd.iSpec.iDirection);
+				if(err == KMMCErrNone)
+					{
+					Session().RequestMoreData();
+					SMF_WAITS(EStDoubleBuffer);
+					}
+				}
+			if (err!=KMMCErrNone)
+				return(err);
+			}
+			break;
+
+		// ------------------------------------------------------------------
+		case ECmdWriteBlock:
+		case ECmdWriteMultipleBlock:
+			{
+			HANDLE h = iCardInfo[selCardIdx]->iWinHandle;
+
+    		TMMCErr err;
+			TInt pos = cmd.iArgument;
+    		if (SetFilePointer(h, pos, NULL, FILE_BEGIN)==0xffffffffu)
+        		err = MapLastErrorMmc();
+    		else
+        		{
+				iBytesToTransfer = cmd.BufferLength();
+				err = ReadWriteData(selCardIdx, cmd.iDataMemoryP, iBytesToTransfer, cmd.iSpec.iDirection);
+				if(err == KMMCErrNone)
+					{
+					Session().RequestMoreData();
+					SMF_WAITS(EStDoubleBuffer);
+					}
+				}
+
+			if (err!=KMMCErrNone)
+				return(err);
+			}
+			break;
+
+		case ECmdAppCmd:
+			rto = ETrue;
+			break;
+
+		case ECmdSendCSD:
+			{
+			iCardInfo[selCardIdx]->GetCSD(cmd.iResponse);
+			break;
+			}
+
+		// ------------------------------------------------------------------
+		case ECmdLockUnlock:
+			// in EPOC, Lock() does not actually lock the card.  It just sets the
+			// password.  This means that the card is still accessible to the user,
+			// but must be unlocked the next time it is powered up.
+
+			// a real card will transiently go into rcv and prg state while processing
+			// this command.  When finished, it will fall back into tran state.
+			// The R1 response is sent immediately after CMD42.  CIMReadWriteBlocksSM()
+			// sends CMD13 to find out whether or not LOCK_UNLOCK_FAIL was set.
+
+			// the asserts in this case protect against invalid data being sent from the
+			// media driver.  A real card would fail these corrupt data blocks.
+
+			{
+#ifdef __CARD0_NOT_LOCKABLE__
+			if (*Wins::CurrentPBusDevicePtr() == 0)
+				return KMMCErrNotSupported;
+#endif
+#ifdef __CARD1_NOT_LOCKABLE__
+			if (*Wins::CurrentPBusDevicePtr() == 1)
+				return KMMCErrNotSupported;
+#endif
+			const TInt8 cmd_byte(*cmd.iDataMemoryP);
+			__ASSERT_DEBUG(										// ensure not CLR_PWD && SET_PWD
+				!((cmd_byte & KMMCLockUnlockClrPwd) && (cmd_byte & KMMCLockUnlockSetPwd)),
+				DWinsMMCStack::Panic(DWinsMMCStack::EWinsMMCCorruptCommand) );
+			
+			__ASSERT_DEBUG(										// ensure not FORCE_ERASE with CLR_PWD or SET_PWD
+				!((cmd_byte & KMMCLockUnlockErase) && (cmd_byte & (KMMCLockUnlockSetPwd | KMMCLockUnlockClrPwd))),
+				DWinsMMCStack::Panic(DWinsMMCStack::EWinsMMCCorruptCommand) );
+			
+			__ASSERT_DEBUG(										// not actually lock a card while setting the password
+				((cmd_byte & (KMMCLockUnlockLockUnlock | KMMCLockUnlockSetPwd)) != (KMMCLockUnlockLockUnlock | KMMCLockUnlockSetPwd)),
+				DWinsMMCStack::Panic(DWinsMMCStack::EWinsMMCLockAttempt) );
+
+			if (cmd_byte & KMMCLockUnlockErase)								// Forced Erase of a locked card
+				{
+				if (iCardInfo[selCardIdx]->iIsLocked)						// Forced erase when locked
+					{
+					iCardInfo[selCardIdx]->iPWD->Zero();					// Remove the password
+					iCardInfo[selCardIdx]->iIsLocked = EFalse;
+					nextCMD42Failed = EFalse;
+					
+					TInt cardNum = (selCardIdx==0) ? *Wins::CurrentPBusDevicePtr() : selCardIdx;
+					SetMediaPasswordEnvironmentVar(MMCSocket()->iSocketNumber,cardNum,*(iCardInfo[selCardIdx]->iPWD));
+
+					// Erase then entire contents of the emulated drive
+					HANDLE handle = iCardInfo[selCardIdx]->iWinHandle;
+					CloseHandle(handle);
+					iCardInfo[selCardIdx]->iWinHandle = NULL;
+					if(CreateBinFileForCard(selCardIdx, &handle, ETrue) != KErrNone)
+						return(MapLastErrorMmc());
+					iCardInfo[selCardIdx]->iWinHandle = handle;
+					}
+				else														// Forced erase when unlocked (illegal)
+					{
+					nextCMD42Failed = ETrue;
+					}
+				}
+			else
+				{
+				const TInt8 pwd_len = *(cmd.iDataMemoryP + 1);
+				const TPtrC8 pwd(cmd.iDataMemoryP + 2, pwd_len);
+
+				if ((cmd_byte & KMMCLockUnlockClrPwd) != 0)			// CLR_PWD == 1
+					{
+					__ASSERT_DEBUG(
+						pwd_len >= 0 && pwd_len <= KMaxMediaPassword,
+						DWinsMMCStack::Panic(DWinsMMCStack::EWinsMMCCorruptCommand));
+
+					if (iCardInfo[selCardIdx]->iIsLocked)						// clear when locked
+						nextCMD42Failed = ETrue;
+					else														// clear when unlocked
+						{
+						if (iCardInfo[selCardIdx]->iPWD->Compare(pwd) != 0)		// clear when unlocked with wrong password
+							{
+							nextCMD42Failed = ETrue;
+							lock_unlock_failed = ETrue;
+							}
+						else													// clear when unlocked with right password
+							{
+							// Clear from password store 
+							iCardInfo[selCardIdx]->iPWD->Zero();
+							iCardInfo[selCardIdx]->iIsLocked = EFalse;
+							nextCMD42Failed = EFalse;
+							
+							// Clear from environment settings
+							TInt cardNum=(selCardIdx==0) ? *Wins::CurrentPBusDevicePtr() : selCardIdx; // Can't be -1 at this stage
+							SetMediaPasswordEnvironmentVar(MMCSocket()->iSocketNumber,cardNum,*(iCardInfo[selCardIdx]->iPWD));
+							}
+						}
+					}
+				else if ((cmd_byte & KMMCLockUnlockSetPwd) == 0)	// SET_PWD == 0: unlock
+					{
+					__ASSERT_DEBUG(
+						pwd_len >= 0 && pwd_len <= KMaxMediaPassword,
+						DWinsMMCStack::Panic(DWinsMMCStack::EWinsMMCCorruptCommand) );
+					
+					if (! iCardInfo[selCardIdx]->iIsLocked)						// unlock when unlocked
+						nextCMD42Failed = ETrue;
+					else
+						{
+						if (iCardInfo[selCardIdx]->iPWD->Compare(pwd) != 0)		// unlock when locked with wrong password
+							{
+							nextCMD42Failed = ETrue;
+							lock_unlock_failed = ETrue;
+							}
+						else													// unlock when locked with right password
+							{
+							iCardInfo[selCardIdx]->iIsLocked = EFalse;
+							nextCMD42Failed = EFalse;
+							}
+						}
+					}
+				else  if ((cmd_byte & KMMCLockUnlockSetPwd) == KMMCLockUnlockSetPwd)	// SET_PWD == 1
+					{
+					__ASSERT_DEBUG(
+						cmd_byte & KMMCLockUnlockSetPwd,
+						DWinsMMCStack::Panic(DWinsMMCStack::EWinsMMCCorruptCommand) );
+
+					// if pwd_len < iCardInfo[selCardIdx]->iPWD->Length() then data block must be invalid.
+					// This can be caused by bad user input rather than inaccurate formation.
+					if (!(	pwd_len >= iCardInfo[selCardIdx]->iPWD->Length()
+						&&	pwd_len <= iCardInfo[selCardIdx]->iPWD->Length() + KMaxMediaPassword ))
+						{
+						nextCMD42Failed = ETrue;
+						}
+					else
+						{
+						TUint16 env_Var[]=L"_EPOC_PWD_LEN";
+						TUint16 env_Val[2];
+						TInt r=GetEnvironmentVariable(env_Var,&env_Val[0],2);
+						r=r;//This code is added to suppress WINS warnings
+						__ASSERT_DEBUG(r!=0,Kern::PanicCurrentThread(_L("PBUS-MMC-WINS-GETENV"),0));			
+						const TInt old_pwd_len=env_Val[0]-1;
+						TPtrC8 old_pwd(cmd.iDataMemoryP + 2, old_pwd_len);
+						TPtrC8 new_pwd(cmd.iDataMemoryP + 2 + old_pwd_len, pwd_len - old_pwd_len);
+						
+						// card must not be locked and supplied current password must be correct
+						if (iCardInfo[selCardIdx]->iIsLocked || iCardInfo[selCardIdx]->iPWD->Compare(old_pwd) != 0)
+							{
+							nextCMD42Failed = ETrue;
+							lock_unlock_failed = ETrue;
+							}
+						else
+							{
+							// Set in password store
+							iCardInfo[selCardIdx]->iPWD->Copy(new_pwd);
+							nextCMD42Failed = EFalse;
+							
+							// Set in environment settings
+							TInt cardNum=(selCardIdx==0) ? *Wins::CurrentPBusDevicePtr() : selCardIdx; // Can't be -1 at this stage
+							SetMediaPasswordEnvironmentVar(MMCSocket()->iSocketNumber,cardNum,*(iCardInfo[selCardIdx]->iPWD));
+							}
+						}
+					}
+				else  if ((cmd_byte & KMMCLockUnlockLockUnlock) == KMMCLockUnlockLockUnlock)
+					{
+					__ASSERT_DEBUG(
+						pwd_len >= 0 && pwd_len <= KMaxMediaPassword,
+						DWinsMMCStack::Panic(DWinsMMCStack::EWinsMMCCorruptCommand) );
+					
+					if (iCardInfo[selCardIdx]->iIsLocked)						// lock when locked
+						nextCMD42Failed = ETrue;
+					else
+						{
+						if (iCardInfo[selCardIdx]->iPWD->Compare(pwd) != 0)		// lock with wrong password
+							{
+							nextCMD42Failed = ETrue;
+							lock_unlock_failed = ETrue;
+							}
+						else													// lock with right password
+							{
+							iCardInfo[selCardIdx]->iIsLocked = ETrue;
+							nextCMD42Failed = EFalse;
+							}
+						}
+					}
+				else
+					{
+					__ASSERT_DEBUG(EFalse, DWinsMMCStack::Panic(DWinsMMCStack::EWinsMMCLockAttempt) );
+					}
+				}
+			}	// case ECmdLockUnlock
+			break;
+		
+		case ECmdSetBlockCount:		
+			{
+			// Only supported in version 3.1
+			if(Session().iCardP->CSD().SpecVers() != 3)
+				{
+				return(KMMCErrNotSupported);
+				}
+			}
+			break;
+			
+		// ------------------------------------------------------------------
+		default:
+			break;
+		}
+
+		if (rto)
+			{
+			return(KMMCErrResponseTimeOut);
+			}
+
+	// drop through to command done...
+
+	SMF_STATE(EStCommandDone)
+
+		cmd.iCommand = origCmd;
+		// If this is an R1 or R1b response type command then return card status as a response
+		if (	selCardIdx != KBroadcastToAllCards
+			&&	(cmd.iSpec.iResponseType==ERespTypeR1 || cmd.iSpec.iResponseType==ERespTypeR1B) )
+			{
+			TUint32 resp(
+					iCardInfo[selCardIdx]->iState
+				|	((iCardInfo[selCardIdx]->iIsLocked ? 1 : 0) << 25)
+				|	((lock_unlock_failed ? 1 : 0) << 24) );
+
+			if (iCMD42Failed)								// previous CMD42
+				{
+				resp |= KMMCStatErrLockUnlock;
+				nextCMD42Failed = EFalse;
+				}
+			iCMD42Failed = nextCMD42Failed;
+			TMMC::BigEndian4Bytes(&cmd.iResponse[0],resp); // Ignore bits 47-40
+			}
+
+		SMF_GOTOS(EStEnd);
+
+	SMF_STATE(EStDoubleBuffer)
+
+		cmd.iBytesDone += iBytesToTransfer;
+
+        if(cmd.iBytesDone < cmd.iTotalLength)
+			{
+			iBytesToTransfer = cmd.BufferLength();
+			TMMCErr err = ReadWriteData(selCardIdx, cmd.iDataMemoryP, iBytesToTransfer, cmd.iSpec.iDirection);
+			if(err == KMMCErrNone)
+				{
+				Session().RequestMoreData();
+				SMF_WAITS(EStDoubleBuffer);
+				}
+			else
+				{
+				return(err);
+				}
+			}
+		else
+			{
+			SMF_GOTOS(EStCommandDone);
+			}
+
+	SMF_END
+	}
+
+
+TMMCErr DWinsMMCStack::ReadWriteData(TInt aCardIdx, TUint8* aDataP, TUint32 aLength, TMMCCmdDirEnum aDir)
+	{
+	TMMCErr err = KMMCErrNone;
+
+	HANDLE h = iCardInfo[aCardIdx]->iWinHandle;
+
+	DWORD res;
+	TBool success;
+	
+	if(aDir == EDirWrite)
+		{
+		success = WriteFile(h, (LPCVOID)aDataP, aLength, &res, NULL);
+		}
+	else
+		{
+		success = ReadFile(h, (LPVOID)aDataP, aLength, &res, NULL);
+		}
+
+	if (!success)
+		{
+		err=MapLastErrorMmc();
+		}
+	else if (res != (DWORD)aLength)
+		{
+		err=KMMCErrGeneral;
+		}
+
+	return(err);
+	}
+
+
+TInt DWinsMMCStack::FindAnyCardInStack(TMMCardStateEnum aState)
+//
+// first first active card in supplied state.  Return -1 if
+// no active card is in supplied state.
+//
+	{
+	for (TInt i = 0; i < TotalWinsMMC_CardSlots; ++i)
+		{
+		if (iCardInfo[i]->iState == aState)
+			return i;
+		}
+	return -1;
+	}
+
+TInt DWinsMMCStack::FindFirstCardInStack(TMMCardStateEnum aState)
+//
+// find card which is active on bus and in supplied state.
+// There can be more than one active card in the the supplied state,
+// but there should be at least one.
+//
+	{
+	TInt idx = -1;
+	for (TInt i = 0; idx != -1 && i < TotalWinsMMC_CardSlots; ++i)
+		{
+		if (iCardInfo[i]->iState == aState)
+			idx = i;
+		}
+
+	__ASSERT_DEBUG(idx != -1, DWinsMMCStack::Panic(DWinsMMCStack::EStkFFCNoneSel));
+	return idx;
+	}
+
+TInt DWinsMMCStack::FindOneCardInStack(TMMCardStateEnum aState)
+//
+// find card which is active on bus and in supplied state.
+// There should be exactly one active card in the supplied state.
+//
+	{
+	TInt idx = -1;
+	for (TInt i = 0; i < TotalWinsMMC_CardSlots; ++i)
+		{
+		if (iCardInfo[i]->iState == aState)
+			{
+			__ASSERT_DEBUG(idx == -1, DWinsMMCStack::Panic(DWinsMMCStack::EStkFOCMultiSel));
+			idx = i;
+			}
+		}
+
+	__ASSERT_DEBUG(idx != -1, DWinsMMCStack::Panic(DWinsMMCStack::EStkFOCNoneSel));
+	return idx;
+	}
+
+void DWinsMMCStack::SetupDiskParms(TUint aDiskSize)
+	{	
+//
+//	setup parms for emulated mmc disk size
+//
+	// force a minimum of 32 KB total size
+	if (aDiskSize<32)
+		aDiskSize=32;
+	// first setup the CSD parameters
+	CSIZE_MULT = 0;
+	TUint newCSIZE = aDiskSize>>1;	// with zero multiplier 1 + size parameter = size in KB / 2
+	while((newCSIZE>0xfff)&&(CSIZE_MULT<7))	
+		// size parameter 12 bits, multiplier 3 bits
+		{
+		// size parameter too big and multiplier still has room to
+		// grow so increase multiplier and reduce size parameter
+		CSIZE_MULT++; 
+		newCSIZE = aDiskSize>>(1+CSIZE_MULT);
+		}
+	CSIZE = newCSIZE;
+	// as CSIZE = 1 + CSIZE
+	CSIZE--;
+	// restrict to 12 bits
+	if (CSIZE>0xfff)
+		CSIZE=0xfff;
+	// now setup TotalDiskSize
+	TotalMDiskSize = 512 * (1+CSIZE) * (1<<(2+CSIZE_MULT));
+	}
+
+// ======== TWinsMMCMediaChange ========
+
+#pragma warning( disable : 4355 )	// this used in initializer list
+DWinsMMCMediaChange::DWinsMMCMediaChange(TInt aMediaChangeNum)
+//
+// Constructor
+//
+	: DMMCMediaChange(aMediaChangeNum),
+	  iMediaChangeEnable(ETrue)
+	{
+
+	iMediaDoorCloseReload=2; 	// Units: In theory-20ms, Actual-100ms
+	}
+#pragma warning( default : 4355 )
+
+TInt DWinsMMCMediaChange::Create()
+//
+// Initialiser.
+//
+	{	
+	return(DMediaChangeBase::Create());
+	}
+
+void DWinsMMCMediaChange::DoorOpenService()
+//
+// Handle the media change (this function, never postponed is called on media
+// change interrupt). 
+//
+	{
+	Disable();		// Disable interrupt until door closes again.
+	iDoorOpenDfc.Enque();
+	}
+
+void DWinsMMCMediaChange::DoDoorOpen()
+//
+// Handle media door open (called on media door open interrupt). 
+//
+	{
+	iDoorClosedCount=iMediaDoorCloseReload;
+	// Just start a ticklink to poll for door closing
+	iTickLink.Periodic(KMediaChangeTickInterval,DWinsMMCMediaChange::Tick,this);
+    }
+
+void DWinsMMCMediaChange::DoDoorClosed()
+//
+// Handle media door closing
+//
+	{
+	iTickLink.Cancel();	// Doesn't matter if wasn't enabled
+	Enable();	// Re-enable door interrupts
+
+	// While the door was open the user may have changed the card in slot 0
+	if (iStackP && *Wins::CurrentPBusDevicePtr() >= 0)
+		iStackP->iCardInfo[0]=iStackP->iCardPool[*Wins::CurrentPBusDevicePtr()];
+	}
+
+void DWinsMMCMediaChange::ForceMediaChange()
+//
+// Force media change
+//
+	{
+	DoorOpenService();
+	}
+
+TMediaState DWinsMMCMediaChange::MediaState()
+//
+// Return status of media changed signal.
+//
+	{
+	if (iDoorClosedCount>0)
+		return(EDoorOpen);
+	return( (*Wins::MediaDoorOpenPtr())?EDoorOpen:EDoorClosed);
+	}
+
+void DWinsMMCMediaChange::Tick(TAny *aPtr)
+//
+// Called on the tick to poll for door closing (called on DFC).
+//
+	{
+
+	((DWinsMMCMediaChange*)aPtr)->TickService();
+	}
+
+void DWinsMMCMediaChange::TickService()
+//
+// Called on the tick to poll for door closing (called on DFC).
+//
+	{
+
+	__ASSERT_DEBUG(iDoorClosedCount>=0,DWinsMMCStack::Panic(DWinsMMCStack::EWinsMMCMediaChangeTickFault));
+
+	if (!(*Wins::MediaDoorOpenPtr()))
+		{
+		if (iDoorClosedCount > 0)
+			{
+			if (--iDoorClosedCount == 0)
+				{
+				iTickLink.Cancel();		// cancel door closed timer
+				DoorClosedService();
+				}
+			}
+		}
+	else
+		iDoorClosedCount=iMediaDoorCloseReload; // Door open so start again.
+	}
+
+void DWinsMMCMediaChange::Enable()
+//
+// Enable media change 
+//
+	{
+
+	iMediaChangeEnable=ETrue;
+	}
+
+void DWinsMMCMediaChange::Disable()
+//
+// Disable media change
+//
+	{
+
+	iMediaChangeEnable=EFalse;
+	}
+
+void DWinsMMCMediaChange::MediaChangeCallBack(TAny *aPtr)
+//
+// Static called on media change
+//
+	{
+	DWinsMMCMediaChange* mc=(DWinsMMCMediaChange*)aPtr;
+	if (mc!=NULL&&mc->iMediaChangeEnable)
+		mc->DoorOpenService();
+	}
+
+// ======== TWinsCardInfo ========
+
+void TWinsCardInfo::GetCSD(TUint8* aResp) const
+	{
+	// Bits 127-96
+	TUint32 csd=(KCsdStructure<<30); 	/* CSD_STRUCTURE */
+	csd|=		(KCsdSpecVers<<26); 	/* SPEC_VERS */
+	csd|=		(0x0E<<16);				/* TAAC: 1mS */  
+	csd|=		(0x0A<<8);				/* NSAC: 1000 */  
+	csd|=		(0x59);					/* TRAN_SPEED: 5.0Mbit/s */  
+	TMMC::BigEndian4Bytes(&aResp[0],csd);
+
+	// Bits 95-64
+	TUint32 lockBit = KMMCCmdClassLockCard;
+#ifdef __CARD0_NOT_LOCKABLE__
+	if (*Wins::CurrentPBusDevicePtr() == 0)
+		lockBit = 0;
+#endif
+#ifdef __CARD1_NOT_LOCKABLE__
+	if (*Wins::CurrentPBusDevicePtr() == 1)
+		lockBit = 0;
+#endif
+	const TUint32 ccc = 
+			KMMCCmdClassBasic | KMMCCmdClassBlockRead
+		|	KMMCCmdClassBlockWrite | lockBit;
+	csd=		(ccc<<20); 	/* CCC: classes 0, 2, 4, and 7 */
+	csd|=		(0x9<<16); 	/* READ_BL_LEN: 512 bytes */
+	csd|=		(0x0<<15);	/* READ_BL_PARTIAL: No */  
+	csd|=		(0x0<<14);	/* WRITE_BLK_MISALIGN: No */  
+	csd|=		(0x0<<13);	/* READ_BLK_MISALIGN: No */  
+	csd|=		(0x0<<12);	/* DSR_IMP: No DSR */ 
+	csd|=		((DWinsMMCStack::CSIZE>>10&3)<<8);			/* C_SIZE: MMCSz Kb */
+	csd|=		((DWinsMMCStack::CSIZE>>2) & 0xFF);			/* C_SIZE: MMCSz Kb */
+	TMMC::BigEndian4Bytes(&aResp[4],csd); 
+	// Bits 63-32
+	csd=		((DWinsMMCStack::CSIZE&3)<<30); 			/* C_SIZE: MMCSz Kb */
+	csd|=		(0x1<<27); 	/* VDD_R_CURR_MIN: 1mA */
+	csd|=		(0x1<<24);	/* VDD_R_CURR_MAX: 5mA */  
+	csd|=		(0x2<<21); 	/* VDD_W_CURR_MIN: 5mA */
+	csd|=		(0x3<<18);	/* VDD_W_CURR_MAX: 25mA */  
+	csd|=		((DWinsMMCStack::CSIZE_MULT&0x07)<<15);		/* C_SIZE_MULT: 0 */  
+	csd|=		(0x0<<10);	/* SECTOR_SIZE: 1 write block */  
+	csd|=		(0x0<<5);	/* ERASE_GRP_SIZE: 1 secotr */  
+	csd|=		(0x0);		/* WP_GRP_SIZE: 1 erase group */  
+	TMMC::BigEndian4Bytes(&aResp[8],csd); 
+	// Bits 31-0
+	csd=		(0x0<<31); 	/* WP_GRP_ENABLE: No */
+	csd|=		(0x0<<29); 	/* DEFAULT_ECC: ? */
+	csd|=		(0x3<<26);	/* R2W_FACTOR: 8 */  
+	csd|=		(0x9<<22); 	/* WRITE_BL_LEN: 512 bytes */
+	csd|=		(0x0<<21);	/* WRITE_BL_PARTIAL: No */  
+	csd|=		(0x0<<15);	/* FILE_FORMAT_GRP: Hard disk */  
+	csd|=		(0x0<<14);	/* COPY: original */  
+	csd|=		(0x0<<13);	/* PERM_WRITE_PROTECT: No */  
+	csd|=		(0x0<<12);	/* TMP_WRITE_PROTECT: No */  
+	csd|=		(0x0<<10);	/* FILE_FORMAT: Hard disk */  
+	csd|=		(0x0<<8);	/* ECC: None */  
+	csd|=		(0x0<<1);	/* CRC: ? */  
+	csd|=		(0x1);		/* not used */  
+	TMMC::BigEndian4Bytes(&aResp[12],csd);
+	}
+
+// ======== TWinsMMCPsu ========
+
+
+DWinsMMCPsu::DWinsMMCPsu(TInt aVccNum, TInt aMcId)
+//
+// Constructor.
+//
+	: DMMCPsu(aVccNum, aMcId)
+	{}
+
+TInt DWinsMMCPsu::DoCreate()
+//
+// Initialise the PSU
+//
+    {
+	// Nothing to do
+	return KErrNone;
+    }
+
+void DWinsMMCPsu::DoSetState(TPBusPsuState aState)
+//
+// Turn on/off the PSU. If it is possible to adjust the output voltage on this
+// PSU then retreive the required voltage level from TMMCPsu::iVoltageSetting
+// (which is in OCR register format).
+//
+    {
+
+    switch (aState)
+        {
+        case EPsuOff:
+            break;
+        case EPsuOnFull:
+            break;
+        case EPsuOnCurLimit:
+            break;
+        }
+    }
+
+TInt DWinsMMCPsu::VoltageInMilliVolts()
+//
+// Return the level of the PSU (in mV) or -ve if error.
+//
+    {
+
+    return(0);
+    }
+
+void DWinsMMCPsu::DoCheckVoltage()
+//
+// Check the voltage level of the PSU is as expected. Returns either KErrNone, KErrGeneral 
+// to indicate the pass/fail state or KErrNotReady if the voltage check isn't complete.
+//
+    {
+	ReceiveVoltageCheckResult(KErrNone);
+    }
+
+void DWinsMMCPsu::PsuInfo(TPBusPsuInfo &anInfo)
+//
+// Return machine info relating to the MMC PSU supply
+//
+    {
+
+	anInfo.iVoltageSupported=0x00040000; // 3.0V (OCR reg. format).
+	anInfo.iMaxCurrentInMicroAmps=0;
+	anInfo.iVoltCheckInterval=0;
+	anInfo.iVoltCheckMethod=EPsuChkComparator;
+	anInfo.iNotLockedTimeOut=0;
+	anInfo.iInactivityTimeOut=5;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/mmci.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,167 @@
+// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// PP_MMC.H
+// 
+//
+
+#ifndef __PP_MMC_H__
+
+#if defined(_UNICODE) && !defined(UNICODE)
+	#define UNICODE
+#endif
+
+#include <mmc.h>
+#include <emulator.h>
+
+//	MultiMedia Card Controller - platform specific layer.
+
+GLREF_C TInt MapLastErrorEpoc();
+GLREF_C TMMCErr MapLastErrorMmc();
+
+const TInt KMediaChangeTickInterval=20000;	// Units 1uS
+
+
+const TInt KMax_TotalWinsCardSlots=8; ///< Maximal number of MMC cards supported by the emulator
+const TInt KMax_TotalWinsCards=(KMax_TotalWinsCardSlots+1); ///< Maximal number of MMC slots, supported by the emulator. Need 2 cards for slot 0
+
+const TInt KDefault_TotalWinsCardSlots=2; ///< Default number of MMC cards supported by the emulator
+const TInt KDefault_TotalWinsCards=(KDefault_TotalWinsCardSlots+1); ///< Default number of MMC slots, supported by the emulator. Need 2 cards for slot 0
+
+
+const TUint32 KMMCWinsCardOCRValue = 0x00FFFF00;
+
+class TWinsCardInfo
+	{
+public:
+	void GetCSD(TUint8* aResp) const;
+public:
+	TCID iCID;
+	TMediaPassword* iPWD;				// PWD_LEN calculated from PWD.
+	TBool iIsLocked;					// Could use iCurrentCardIsLocked
+	TMMCardStateEnum iState;			// Simulation of card's current state
+	HANDLE iWinHandle;
+	TRCA iRCA;
+	};
+
+class DWinsMMCStack : public DMMCStack
+	{
+private:
+	DWinsMMCStack(TInt aBus, DMMCSocket* aSocket);
+	TInt Init();
+private:
+	virtual void  MachineInfo(TMMCMachineInfo& aMachineInfo);
+public:
+	virtual void  AdjustPartialRead(const TMMCard* aCard, TUint32 aStart, TUint32 aEnd, TUint32* aPhysStart, TUint32* aPhysEnd) const;
+	virtual void  GetBufferInfo(TUint8** aMDBuf, TInt* aMDBufLen);
+
+	enum TWinsMMCPanic
+		{
+	    EWinsMMCLidOpenIntBind=0,
+		EWinsMMCBadMachineInfo=1,
+		EWinsMMCMediaChangeTickFault = 2,
+		EWinsMMCCorruptCommand = 3,
+		EWinsMMCLockAttempt = 4,
+		EWinsMMCAPRNotSupp = 5,
+		EWinsMMCAPRRange = 6,
+		EWinsMMCAPRBoundary = 7,
+
+		EStkFFCNotSelCard = 0x010, EStkFFCNoneSel,
+		EStkFOCNotSelCard = 0x011, EStkFOCMultiSel, EStkFOCNoneSel
+		};
+	
+    static TInt  TotalMDiskSize;		// mmc card size for emulator
+	static TUint CSIZE;					// mmc card size field
+	static TUint CSIZE_MULT;			// mmc card size field
+    
+    static TInt TotalWinsMMC_CardSlots; // total number of MMC card slots for the emulator
+    static TInt TotalWinsMMC_Cards;     // total number of MMC cards for the emulator
+
+    static void Panic(TWinsMMCPanic aPanic);
+
+private:
+	TUint8* iMDBuf;
+	TInt iMDBufLen;
+
+private:
+	// Stack service provided by ASSP layer
+	void SetBusConfigDefaults(TMMCBusConfig&, TUint aClock);
+	void InitClockOff();
+	void ASSPReset();
+	void ASSPDisengage();
+	void DoPowerDown();
+	// State Machine functions implemented in ASSP layer
+	TMMCErr DoPowerUpSM();
+	TMMCErr InitClockOnSM();
+	TMMCErr IssueMMCCommandSM();
+	TMMCErr ModifyCardCapabilitySM();
+private:
+	TInt SetupSimulatedCard(TInt aCardNum);						// init
+	TInt CreateBinFileForCard(TInt aCardNum, HANDLE* aHandle, TBool aCreateNew = EFalse);
+	TInt GetTargetSlotNumber(TBool anRCASupplied, const TRCA& anRCA);
+	TInt FindAnyCardInStack(TMMCardStateEnum aState);
+	TInt FindFirstCardInStack(TMMCardStateEnum aState);
+	TInt FindOneCardInStack(TMMCardStateEnum aState);
+	void SetupDiskParms(TUint);
+	TMMCErr ReadWriteData(TInt aCardIdx, TUint8* aDataP, TUint32 aLength, TMMCCmdDirEnum aDir);
+private:
+	TWinsCardInfo* iCardPool[KMax_TotalWinsCards]; 		// All the cards created
+	TWinsCardInfo* iCardInfo[KMax_TotalWinsCardSlots]; 	// Cards currently present (1 per slot)
+	TBool iCMD42Failed;
+	TUint32 iBytesToTransfer;
+	friend class DWinsMMCMediaChange;
+	friend class TMMCardControllerInterfaceWins;			
+	};
+
+class DWinsMMCStack;
+class DWinsMMCMediaChange : public DMMCMediaChange
+	{
+public:
+	DWinsMMCMediaChange(TInt aMediaChangeNum);
+	virtual TInt Create();
+	virtual void ForceMediaChange();
+	virtual void DoDoorOpen();
+	virtual void DoDoorClosed();
+	virtual TMediaState MediaState();
+	inline void SetStackP(DWinsMMCStack* aStackP) {iStackP=aStackP;}	
+protected:
+	void DoorOpenService();
+private:
+	static void Tick(TAny *aPtr);
+	void TickService();
+	void Enable();
+	void Disable();
+	static void MediaChangeCallBack(TAny *aPtr);
+	static void MediaChangeDFC(TAny* aPtr);
+private:
+	TTickLink iTickLink;
+	TInt iDoorClosedCount;
+	TBool iMediaChangeEnable;
+	TInt iMediaDoorCloseReload; 	// Units: In theory-20ms, Actual-100ms  
+	DWinsMMCStack* iStackP;
+	friend class DWinsMMCStack;
+	};
+
+class DWinsMMCPsu : public DMMCPsu 
+    {
+public:
+    DWinsMMCPsu(TInt aVccNum, TInt aMcId);
+    virtual TInt DoCreate();
+	virtual void DoSetState(TPBusPsuState aState);
+	virtual TInt VoltageInMilliVolts();
+private:
+	virtual void DoCheckVoltage();
+    virtual void PsuInfo(TPBusPsuInfo &anInfo);
+    };
+
+#endif	// #ifndef __PP_MMC_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/mmcv.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,135 @@
+// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\mmcv.cpp
+// WINS variant
+// 
+//
+
+#include <mmccd_ifc.h>
+#include "mmci.h"
+#include "variantmediadef.h"
+
+//
+// Factory class for creation of platform specifics
+//
+class TMMCardControllerInterfaceWins : public TMMCardControllerInterface
+	{
+	// Factory functions
+	virtual DMMCSocket* NewSocket(TInt aSocketNum, TMMCPasswordStore* aPasswordStore);
+	virtual DMMCStack* NewStack(TInt aStackNum, DMMCSocket* aSocket);
+	virtual DMMCMediaChange* NewMediaChange(TInt aMcId);
+	virtual DMMCPsu* NewVcc(TInt aVccNum, TInt aMcId);
+	// Stack initialisation
+	virtual TInt Init();
+	// Machine configuration
+	virtual TBool IsMMCSocket(TInt aSocket,SMediaDeviceInfo& aMediaDeviceInfo);
+	virtual TInt  MediaChangeID(TInt aSocket);
+	virtual TInt  VccID(TInt aSocket);
+    };
+
+
+TInt TMMCardControllerInterfaceWins::Init()
+//
+// Initialise the Controller h/w
+// 
+	{
+	return KErrNone;
+	}
+
+TInt TMMCardControllerInterfaceWins::MediaChangeID(TInt aSocket)
+//
+// Return the socket's media change index
+//
+	{
+	return aSocket;
+	}
+
+TInt TMMCardControllerInterfaceWins::VccID(TInt aSocket)
+//
+// Return the socket's PSU index
+//
+	{
+	return aSocket;
+	}
+
+static const TInt DriveNumbers[MMC0_DRIVECOUNT]={MMC0_DRIVELIST};
+_LIT(KLitMmcSocketName,MMC0_DRIVENAME);
+TBool TMMCardControllerInterfaceWins::IsMMCSocket(TInt aSocket,SMediaDeviceInfo& aMediaDeviceInfo)
+//
+// Confirm whether an MMC stack is supported on the specified
+// socket and if it is, the Media Info. for that socket.
+//
+	{
+	
+	if (aSocket==0)
+		{
+		aMediaDeviceInfo.iDevice=MEDIA_DEVICE_MMC;
+		aMediaDeviceInfo.iDriveCount=MMC0_DRIVECOUNT;
+		aMediaDeviceInfo.iDriveList=&DriveNumbers[0];
+		aMediaDeviceInfo.iNumMedia=MMC0_NUMMEDIA;
+		aMediaDeviceInfo.iDeviceName=&KLitMmcSocketName;
+		return(ETrue);
+		}
+	else
+		return(EFalse);	
+	}
+
+DMMCSocket* TMMCardControllerInterfaceWins::NewSocket(TInt aSocketNum, TMMCPasswordStore* aPasswordStore)
+//
+// Create a new platform-specific socket
+//
+	{
+	return new DMMCSocket(aSocketNum, aPasswordStore);
+	}
+
+DMMCStack* TMMCardControllerInterfaceWins::NewStack(TInt aStackNum, DMMCSocket* aSocket)
+//
+// Create a new platform-specific stack
+//
+	{
+	return new DWinsMMCStack(aStackNum, aSocket);
+	}
+
+DMMCMediaChange* TMMCardControllerInterfaceWins::NewMediaChange(TInt aMcId)
+//
+// Create a new platform-specific media change
+//
+	{
+	return new DWinsMMCMediaChange(aMcId);
+	}
+
+DMMCPsu* TMMCardControllerInterfaceWins::NewVcc(TInt aVccNum, TInt aMcId)
+//
+// Create a new platform-specific PSU
+//
+	{
+	return new DWinsMMCPsu(aVccNum, aMcId);
+	}
+
+DECLARE_STANDARD_EXTENSION()
+//
+// Extension Entry Point
+//
+	{
+	__KTRACE_OPT(KPBUS1,Kern::Printf("Starting MMC interface"));
+
+	TInt r=KErrNoMemory;
+	TMMCardControllerInterfaceWins* pI=new TMMCardControllerInterfaceWins;
+	if (pI)
+		r=pI->Create();
+
+	__KTRACE_OPT(KPBUS1,Kern::Printf("Returns %d",r));
+	return r;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/multitouch.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,522 @@
+// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\multitouch.cpp
+// 
+//
+#include "multitouch.h"
+#include "resource.h"
+
+#define KDefaultMaxProximity -100
+#define KDefaultMaxPressure 5000
+#define KDefaultPressureStep 500
+#define KDefaultProximityStep 5
+
+// Static members
+DMultiMouse DMultiMouse::iMice[KMaxMice];
+int DMultiMouse::iNumMice = 0;
+DMultiMouse* DMultiMouse::iPrimary = 0;
+int DMultiMouse::iMouseId = 0;
+int DMultiTouch::iNumberOfMice = 0;
+bool DMultiTouch::iMultiTouchSupported= FALSE;
+bool DMultiTouch::iMultiTouchCreated= FALSE;
+bool DMultiTouch::iMultiTouchTempEnabled= FALSE;
+
+// Function pointers for raw input APIs
+TYPEOF_RegisterRawInputDevices pfnRegisterRawInputDevices= NULL;
+TYPEOF_GetRawInputData pfnGetRawInputData= NULL;
+TYPEOF_GetRawInputDeviceList pfnGetRawInputDeviceList=NULL;
+
+/**
+ *  Initialise the proximity and pressure information if undefined by the user
+ */
+DMultiTouch::DMultiTouch(TInt aProximityStep, TInt aPressureStep)
+	{
+	iZMaxRange = KDefaultMaxProximity;
+	iMaxPressure = KDefaultMaxPressure;
+	iProximityStep = (aProximityStep == -1) ? KDefaultProximityStep : aProximityStep;
+	iPressureStep = (aPressureStep == -1) ? KDefaultPressureStep : aPressureStep;
+	}
+
+/** 
+ * Register all the mice 
+*/
+BOOL DMultiTouch::Register()
+	{
+	RAWINPUTDEVICE device;
+	device.usUsagePage = 0x01;
+	device.usUsage = 0x02;
+	device.dwFlags = RIDEV_NOLEGACY; // adds HID mouse and also ignores legacy mouse messages
+	device.hwndTarget = 0;
+	ShowCursors();
+	return pfnRegisterRawInputDevices(&device, 1, sizeof(RAWINPUTDEVICE));
+	}
+
+/**
+ * Unregister mice devices
+ */
+BOOL DMultiTouch::UnRegister()
+	{
+	RAWINPUTDEVICE device;
+	device.usUsagePage = 0x01;
+	device.usUsage = 0x02;
+	device.dwFlags = RIDEV_REMOVE;
+	device.hwndTarget = NULL;
+	HideCursors();
+	return pfnRegisterRawInputDevices(&device, 1, sizeof(RAWINPUTDEVICE));
+	}
+
+
+/* * Handle multi-input Window messages
+ */
+void DMultiTouch::OnWmInput(HWND aHWnd,TUint aMessage,TUint aWParam,TUint aLParam,HWND aParentHwnd)
+	{
+	RAWINPUT ri;
+	UINT dwSize = sizeof(ri);
+	if (pfnGetRawInputData((HRAWINPUT)aLParam, RID_INPUT, &ri, &dwSize, sizeof(RAWINPUTHEADER))==(UINT)-1)
+		{
+		OutputDebugString(TEXT("GetRawInputData has an error !\n"));
+		}
+	else if (ri.header.dwType == RIM_TYPEMOUSE) 
+		{
+		DMultiMouse* mouse = DMultiMouse::Find(ri.header.hDevice);
+		if (mouse)
+			{
+			if (!DMultiMouse::iPrimary)
+				{
+				DMultiMouse::iPrimary = mouse;
+				DMultiMouse::iPrimary->iIsPrimary = TRUE;
+				}
+			mouse->HandleRawMouseEvent(ri.data.mouse, aParentHwnd);
+			}
+		}
+	DefWindowProcA(aHWnd, aMessage, aWParam, aLParam);
+	}
+
+void DMultiTouch::HideCursors()
+	{
+	for (int ii=0; ii<DMultiMouse::iNumMice; ii++)
+		{
+		DMultiMouse::iMice[ii].iCursorWnd.Hide();
+		}
+	}
+
+void DMultiTouch::ShowCursors()
+	{
+	for (int ii=0; ii<DMultiMouse::iNumMice; ii++)
+		{
+		DMultiMouse::iMice[ii].iCursorWnd.Show();
+		}
+	}
+
+/**
+ * The cursor window procedure
+ */
+static LRESULT CALLBACK CursorWndProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
+	{
+	if (msg==WM_PAINT)
+		{
+		PAINTSTRUCT ps;
+		HDC hdc = BeginPaint(hwnd, &ps);
+		CursorWindow* wnd = (CursorWindow*)GetWindowLong(hwnd, GWL_USERDATA);
+		DrawIconEx(hdc,0,0, wnd->iCursor,0,0,0,NULL, DI_NORMAL | DI_DEFAULTSIZE);
+		EndPaint(hwnd, &ps);
+		return 0;
+		}
+	return DefWindowProc(hwnd, msg, wp, lp);
+	}
+
+CursorWindow::CursorWindow(): iHwnd(NULL),iCursor(NULL),iNumber(0)
+	{
+	}
+
+HWND CursorWindow::Create(HMODULE hm, HWND hwndParent, int number)
+	{
+	// Create the window
+	static ATOM atom = NULL;
+	if (!atom) 
+		{
+		WNDCLASSEX wcex;
+		ZeroMemory(&wcex, sizeof(wcex));
+		wcex.cbSize = sizeof(WNDCLASSEX); 
+		wcex.style			= CS_OWNDC;
+		wcex.lpfnWndProc	= (WNDPROC)CursorWndProc;
+		wcex.hInstance		= (HINSTANCE)hm;
+		wcex.lpszClassName	= TEXT("CursorWndClass");
+		wcex.hbrBackground = CreateSolidBrush(RGB(255,0,0));//Background color is also for the number
+		atom = RegisterClassEx(&wcex);
+		}
+	iHwnd = CreateWindowA((LPCSTR)atom, NULL, WS_CHILD|WS_CLIPSIBLINGS, 0,0,64,64, hwndParent, NULL, hm, NULL);
+	SetWindowLong(iHwnd, GWL_USERDATA, (LONG)this);
+	iNumber = number;
+	return iHwnd;
+	}
+
+void CursorWindow::Show()
+	{
+	ShowWindow(iHwnd, SW_NORMAL);
+	}
+
+void CursorWindow::Hide()
+	{
+	ShowWindow(iHwnd, SW_HIDE);
+	}
+
+BOOL CursorWindow::SetCursor(HCURSOR hc)
+	{
+	// Duplicate the cursor (because we're going to draw a number on the mask)
+	if (iCursor) 
+		{
+		DestroyCursor(iCursor);
+		iCursor = NULL;
+		}
+	iCursor = CopyCursor(hc);
+
+	// Get information about the cursor, and select its mask bitmap into a temporary DC.
+	ICONINFO ii;
+	GetIconInfo(iCursor, &ii);
+	iHotspot.x = ii.xHotspot;
+	iHotspot.y = ii.yHotspot;
+	HDC hdc = CreateCompatibleDC(NULL);
+	SelectObject(hdc, ii.hbmMask);
+
+	// Get the cursor's pixel size	
+	BITMAPINFO bmi;
+	bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+	bmi.bmiHeader.biBitCount = 0;
+	GetDIBits(hdc, ii.hbmMask, 0, 0, NULL, &bmi, DIB_RGB_COLORS);
+	int cx = bmi.bmiHeader.biWidth;
+	int cy = bmi.bmiHeader.biHeight;
+
+	// Monochrome cursors have a double-height hbmMask. The top half contains the AND 
+	// bitmap (which we do want) and the bottom half contains the XOR bitmap (which we 
+	// dont want). Colour cursors have a single normal-height AND mask.
+	BOOL isMonochrome = (ii.hbmColor==NULL);
+	int cyy = isMonochrome ? (cy>>1) : cy; 
+
+	// Draw the number into the mask
+	char ach[4];
+	int ld = iNumber/10;
+	int rd = iNumber % 10;
+	if (ld > 0)
+		{
+		wsprintf((LPTSTR)ach, (LPCTSTR)TEXT("%d%d"), ld,rd);
+		}
+	else 
+		{
+		wsprintf((LPTSTR)ach, (LPCTSTR)TEXT("%d"), rd);
+		}
+
+	HFONT hf = CreateFontA(12,0, 0,0,FW_THIN, FALSE,FALSE,FALSE, 0,DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, 0, "Arial");
+	SelectObject(hdc, hf);
+	SetBkMode(hdc, TRANSPARENT);
+	TextOutA(hdc, 0,cyy-12, ach, 2);
+	DeleteObject(hf);
+
+	// Get the bits of the mask (in 32-bit colour)
+	HANDLE heap = GetProcessHeap();
+	bmi.bmiHeader.biBitCount = 32;
+	DWORD* bits = (DWORD*)HeapAlloc(heap, 0, cx*cy*4);
+	GetDIBits(hdc, ii.hbmMask, 0, cy, bits, &bmi, DIB_RGB_COLORS);
+
+	// Set the window to the size of the cursor
+	SetWindowPos(iHwnd, NULL,0,0,cx,cyy, SWP_NOMOVE);
+
+	// Create a cursor-shaped region by starting out with an empty region
+	// and ORing in each zero-valued mask pixel.
+	HRGN rgn = CreateRectRgn(0,0,0,0);
+	for (int y=0 ; y<cyy ; y++) 
+		{
+		for (int x=0 ; x<cx ; x++) 
+			{
+			if (bits[(cy-y-1)*cx+x]==0) 
+				{
+				HRGN rgnPix = CreateRectRgn(x,y, x+1,y+1);
+				CombineRgn(rgn, rgn, rgnPix, RGN_OR);
+				DeleteObject(rgnPix);
+				}
+			}
+		}
+
+	// Cleanup
+	HeapFree(heap, 0, bits);
+	DeleteDC(hdc);
+
+	// Set the window's clipping region to the cursor-shaped region
+	SetWindowRgn(iHwnd, rgn, TRUE);
+	return TRUE;
+	}
+	
+void CursorWindow::GetPosition(POINT& pt)
+	{
+	pt.x = 0;
+	pt.y = 0;
+	MapWindowPoints(iHwnd, GetParent(iHwnd), &pt, 1);
+	pt.x += iHotspot.x;
+	pt.y += iHotspot.y;
+	}
+
+void CursorWindow::SetPosition(POINT& pt)
+	{
+	SetWindowPos(iHwnd, NULL, pt.x - iHotspot.x, pt.y - iHotspot.y, 0, 0, SWP_NOSIZE);
+	}
+
+/** 
+ * Add the mouse device to the collection
+ */
+TInt DMultiMouse::Add(RAWINPUTDEVICELIST& aDev)
+	{
+	if (iNumMice < KMaxMice)
+		{
+		DMultiMouse& mouse = iMice[iNumMice];
+		mouse.iDevice = aDev.hDevice;
+		iNumMice++;
+		return KErrNone;
+		}
+	else
+		{
+		return KErrOverflow;
+		}
+	}
+
+DMultiMouse::DMultiMouse() :
+	iX(-1), iY(-1), iZ(0), iDevice(0),iId(-1) 
+	{
+	}
+
+DMultiMouse* DMultiMouse::Find(HANDLE aHandle)
+	{
+	for (TInt ii=0; ii<iNumMice; ii++)
+		{
+		DMultiMouse& mouse = iMice[ii];
+		if (mouse.iDevice == aHandle)
+			return &mouse;
+		}
+	return NULL;
+	}
+
+void DMultiMouse::HandleRawMouseEvent(RAWMOUSE& aEvent, HWND aWnd)
+	{
+	// give this pointer an id, if it doesn't already have one
+	if (iId == -1)
+		{
+		iId = iMouseId++;
+		}
+
+	// Create the cursor window and set the cursor if not done yet
+	if (iCursorWnd.iHwnd == NULL)
+		{
+		iCursorWnd.Create((HINSTANCE)0, aWnd,iId);
+		iCursorWnd.SetCursor(LoadCursorA(NULL, (LPCSTR)IDC_ARROW));
+		}
+
+	CorrectSystemMouse();
+			
+	// recalc mouse position
+	if (iX == -1)
+		{
+		// initial position
+		iX = iPrimary->iX;
+		iY = iPrimary->iY;
+		}
+
+	if (aEvent.usFlags & MOUSE_MOVE_ABSOLUTE)
+		{
+		// absolute position info can update all pointers
+		iX = aEvent.lLastX;
+		iY = aEvent.lLastY;
+		}
+	else if (!iIsPrimary)
+			{
+			// relative position info updates non-primary pointers,
+			iX += aEvent.lLastX;
+			iY += aEvent.lLastY;
+			}
+
+	// Show the cursor window
+	ShowMousePos(aWnd);
+
+	TInt message = WM_MOUSEMOVE;
+
+	// get button state
+	if (aEvent.usButtonFlags & RI_MOUSE_LEFT_BUTTON_DOWN)
+		{
+		message = WM_LBUTTONDOWN;
+		iZ = 0;
+		}
+	
+	if (aEvent.usButtonFlags & RI_MOUSE_LEFT_BUTTON_UP)
+		{
+		message = WM_LBUTTONUP;
+		iZ = 0;
+		}
+	
+	if (aEvent.usButtonFlags & RI_MOUSE_RIGHT_BUTTON_DOWN)
+		{
+		message = WM_RBUTTONDOWN;
+		}
+	
+	if (aEvent.usButtonFlags & RI_MOUSE_RIGHT_BUTTON_UP)
+		{
+		message = WM_RBUTTONUP;
+		}
+	
+	if (aEvent.usButtonFlags & RI_MOUSE_WHEEL)
+		{
+		message = WM_MOUSEWHEEL;
+		if ((TInt16)(aEvent.usButtonData&0x8000)== 0) // positive number
+			{
+			if (iZ < TheMultiTouch->iMaxPressure)
+				{
+				if (iZ>=0)
+					{ // pressure range 
+					iZ += TheMultiTouch->iPressureStep;//Pressure step
+					if (iZ > TheMultiTouch->iMaxPressure)
+						{
+						iZ = TheMultiTouch->iMaxPressure;
+						}
+					}
+				else
+					{ // proximity range
+					iZ += TheMultiTouch->iProximityStep; //Proximity step
+					}
+				}
+			}
+		else
+			{
+			if (iZ > TheMultiTouch->iZMaxRange)
+				{
+				if (iZ <= 0)
+					{// proximity range 
+					iZ -= TheMultiTouch->iProximityStep;//Proximity step
+					if (iZ < TheMultiTouch->iZMaxRange)
+						{
+						iZ = TheMultiTouch->iZMaxRange;
+						}
+					}
+				else
+					{// pressure range
+					iZ -= TheMultiTouch->iPressureStep;//Pressure step
+					}
+				}
+			}
+		}
+	
+	MultiTouchWndPointer(message, iX, iY, iZ, iId);
+	
+	}
+
+/**
+ * Show the cursor window when the cursor is inside the client area
+ */
+void DMultiMouse::ShowMousePos(HWND aHWnd)
+	{
+	RECT client = {0,0,0,0};
+	if(aHWnd)
+		{
+		GetWindowRect(aHWnd, &client); 
+		POINT pt = {iX-client.left,iY-client.top};
+		iCursorWnd.SetPosition(pt);
+		}
+	iCursorWnd.Show();
+	}
+
+void DMultiMouse::CorrectSystemMouse()
+	{
+	if (iIsPrimary)
+		{
+		POINT pos;
+		if (GetCursorPos(&pos)) // if failed, pos contains garbage.
+			{
+			iX = pos.x;
+			iY = pos.y;	
+			}
+		}
+	else
+		{
+		SetCursorPos(iPrimary->iX,iPrimary->iY);
+		}
+	}
+	
+/** 
+ * a static function to check how many mice are connected 
+*/
+bool DMultiTouch::Init()
+	{
+	HMODULE hModule = GetModuleHandleA("user32.dll");
+	if(hModule == NULL)
+		return FALSE;
+	
+	OSVERSIONINFO osvi;
+	ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
+	osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+	
+	GetVersionEx(&osvi);
+	// Check for Win 2K or higher version
+	if (osvi.dwMajorVersion < 5)
+		{
+		return FALSE;
+		}
+	
+	// Not supported on Win2K
+	if ((osvi.dwMajorVersion == 5) && (osvi.dwMinorVersion == 0))
+		{
+		return FALSE;
+		}
+		
+	pfnRegisterRawInputDevices 	= (TYPEOF_RegisterRawInputDevices)GetProcAddress(hModule, "RegisterRawInputDevices");
+	pfnGetRawInputData 			= (TYPEOF_GetRawInputData)GetProcAddress(hModule, "GetRawInputData");
+	pfnGetRawInputDeviceList 	= (TYPEOF_GetRawInputDeviceList)GetProcAddress(hModule, "GetRawInputDeviceList");
+	
+	if((pfnRegisterRawInputDevices == NULL) || (pfnGetRawInputData == NULL) || (pfnGetRawInputDeviceList == NULL))
+		{
+		return FALSE;
+		}
+		
+	UINT nDevices;
+	
+	if (pfnGetRawInputDeviceList(NULL, &nDevices, sizeof(RAWINPUTDEVICELIST)) != 0)
+		{
+		return FALSE;
+		}
+
+	RAWINPUTDEVICELIST* pRawInputDeviceList = new RAWINPUTDEVICELIST[ nDevices ];
+	if (!pRawInputDeviceList)
+		{
+		return FALSE;
+		}
+
+	pfnGetRawInputDeviceList(pRawInputDeviceList, &nDevices,
+			sizeof(RAWINPUTDEVICELIST));
+
+	
+	for (UINT i=0; i<nDevices; i++)
+		{
+		RAWINPUTDEVICELIST& dev = pRawInputDeviceList[i];
+		if (dev.dwType == RIM_TYPEMOUSE)
+			{
+			if (DMultiMouse::Add(dev)!=KErrNone)
+				{
+				//free the device list
+				delete[] pRawInputDeviceList;
+				return FALSE;
+				}
+			}
+		}
+
+	delete[] pRawInputDeviceList;
+
+	// Multitouch is supported when more than 2 mice are connected (including the hidden RID mouse)
+	return DMultiMouse::iNumMice > 2;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/multitouch.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,113 @@
+// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\multitouch.h
+// 
+//
+#ifndef MULTITOUCH_H
+#define MULTITOUCH_H
+
+#include <e32err.h>
+#include <emulator.h>
+#include <commctrl.h>
+#include "multitouchwindowsheader.h"
+
+#ifndef WM_INPUT
+#define WM_INPUT 0x00ff
+#endif
+
+/**
+ * The main class for Multitouch
+*/
+class DMultiTouch
+	{
+public:
+	DMultiTouch(TInt aProximityStep, TInt aPressureStep);
+	void OnWmInput(HWND aHWnd,TUint aMessage,TUint aWParam,TUint aLParam,HWND aParentHwnd);
+	void ShowPrimaryCursor(HWND aHWnd);
+	static bool Init();
+	static void ShowCursors();
+	static void HideCursors();
+	BOOL Register();
+	BOOL UnRegister();
+
+public:
+	static int iNumberOfMice;
+	static bool iMultiTouchSupported;
+	static bool iMultiTouchCreated;
+	static bool iMultiTouchTempEnabled;
+	int iZMaxRange;
+	int iPressureStep;
+	int iProximityStep;
+	int iMaxPressure;	
+	};
+
+extern DMultiTouch* TheMultiTouch;
+extern void MultiTouchWndPointer(TUint message,TInt aXpos,TInt aYpos, TInt aPointerId, TInt aZ);
+
+/**
+ * The class of the Cursor Window
+ */
+class CursorWindow
+{
+public:
+	CursorWindow();
+	HWND Create(HMODULE hm, HWND hwndParent, int number);
+	BOOL SetCursor(HCURSOR hc);
+	void GetPosition(POINT& pt);
+	void SetPosition(POINT& pt);
+	void Show();
+	void Hide();
+
+	HWND iHwnd;
+	int iNumber;
+	HCURSOR iCursor;
+	POINT iHotspot;
+};
+
+/**
+ * The class encapsulating each mouse device
+ */
+class DMultiMouse
+	{
+public:
+	DMultiMouse();
+	static TInt Add(RAWINPUTDEVICELIST& aDev);
+	static DMultiMouse* Find(HANDLE aHandle);
+	void HandleRawMouseEvent(RAWMOUSE& aEvent, HWND aWnd);
+	void CreateCursor(LPVOID aArg, HWND aWnd);
+	enum
+		{KMaxMice = 8};
+
+private:
+	void CorrectSystemMouse();
+	void ShowMousePos(HWND aHWnd);
+
+private:
+	int iX;
+	int iY;
+	int iZ;
+	HANDLE iDevice;
+	int iId;
+
+public:
+	bool iIsPrimary;
+	CursorWindow iCursorWnd;
+
+	static DMultiMouse iMice[KMaxMice];
+	static int iNumMice;
+	static DMultiMouse* iPrimary;
+	static int iMouseId;
+	};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/multitouchwindowsheader.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,108 @@
+// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\multitouchwindowsheader.h
+// 
+//
+/** 
+ * This header file includes some Windows API declarations
+ */
+#ifndef MULTITOUCHWINDOWSHEADER_H
+#define MULTITOUCHWINDOWSHEADER_H
+
+#pragma warning(disable:4201) // ignore the anonymous struct warning in this file
+#define _ANONYMOUS_UNION
+#define _ANONYMOUS_STRUCT
+
+#undef WM_MOUSEWHEEL
+#define WM_MOUSEWHEEL 0x020A
+
+#define RID_INPUT  0x10000003
+#define RID_HEADER 0x10000005
+#define RIDEV_REMOVE       0x00000001
+#define RIDEV_PAGEONLY     0x00000020
+#define RIDEV_NOLEGACY     0x00000030
+#define MOUSE_MOVE_ABSOLUTE      0x00000001
+#define RI_MOUSE_LEFT_BUTTON_DOWN   0x0001
+#define RI_MOUSE_LEFT_BUTTON_UP     0x0002
+#define RI_MOUSE_RIGHT_BUTTON_DOWN  0x0004
+#define RI_MOUSE_RIGHT_BUTTON_UP    0x0008
+#define RI_MOUSE_WHEEL              0x0400
+#define RIM_TYPEMOUSE    0x00000000
+
+DECLARE_HANDLE(HRAWINPUT);
+typedef struct tagRAWINPUTHEADER {
+	DWORD dwType;
+	DWORD dwSize;
+	HANDLE hDevice;
+	WPARAM wParam;
+} RAWINPUTHEADER,*PRAWINPUTHEADER;
+
+typedef struct tagRAWMOUSE {
+	USHORT usFlags;
+	_ANONYMOUS_UNION union {
+		ULONG ulButtons;
+		_ANONYMOUS_STRUCT struct {
+			USHORT usButtonFlags;
+			USHORT usButtonData;
+		};
+	};
+	ULONG ulRawButtons;
+	LONG lLastX;
+	LONG lLastY;
+	ULONG ulExtraInformation;
+} RAWMOUSE,*PRAWMOUSE,*LPRAWMOUSE;
+
+typedef struct tagRAWKEYBOARD {
+	USHORT MakeCode;
+	USHORT Flags;
+	USHORT Reserved;
+	USHORT VKey;
+	UINT Message;
+	ULONG ExtraInformation;
+} RAWKEYBOARD,*PRAWKEYBOARD,*LPRAWKEYBOARD;
+
+typedef struct tagRAWHID {
+	DWORD dwSizeHid;
+	DWORD dwCount;
+	BYTE bRawData;
+} RAWHID,*PRAWHID,*LPRAWHID;
+
+typedef struct tagRAWINPUT {
+	RAWINPUTHEADER header;
+	union {
+		RAWMOUSE    mouse;
+		RAWKEYBOARD keyboard;
+		RAWHID      hid;
+	} data;
+} RAWINPUT,*PRAWINPUT,*LPRAWINPUT;
+
+typedef struct tagRAWINPUTDEVICE {
+	USHORT usUsagePage;
+	USHORT usUsage;
+	DWORD dwFlags;
+	HWND hwndTarget;
+} RAWINPUTDEVICE,*PRAWINPUTDEVICE,*LPRAWINPUTDEVICE;
+
+typedef const RAWINPUTDEVICE *PCRAWINPUTDEVICE;
+
+typedef struct tagRAWINPUTDEVICELIST {
+	HANDLE hDevice;
+	DWORD dwType;
+} RAWINPUTDEVICELIST,*PRAWINPUTDEVICELIST;
+
+typedef WINUSERAPI BOOL (WINAPI *TYPEOF_RegisterRawInputDevices)(PCRAWINPUTDEVICE,UINT,UINT);
+typedef WINUSERAPI UINT (WINAPI *TYPEOF_GetRawInputData)(HRAWINPUT,UINT,LPVOID,PUINT,UINT);
+typedef WINUSERAPI UINT (WINAPI *TYPEOF_GetRawInputDeviceList)(PRAWINPUTDEVICELIST,PUINT,UINT);
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/nanddev.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,416 @@
+// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// D_MEDNAND.CPP
+// 
+//
+
+#define _MEDIA_DRIVER
+#include <nand_media.h>
+#include <emulator.h>
+#include <property.h>
+
+/********************************************
+ * Driver definitions
+ ********************************************/
+const TInt KSimulatedDeviceId = 0xEC73;
+const CHAR KNandFileName[] = "NANDDRV.BIN";
+
+//
+// Platform dependent media driver class
+//
+class DMediaDriverNandWin32 : public DMediaDriverNand
+	{
+public:
+	DMediaDriverNandWin32(TMediaDevice aDevice);
+
+	// replacing pure virtual - NAND device specific stuff
+	virtual TInt Initialise();
+	virtual TInt GetDeviceId(TUint8& aDeviceId, TUint8& aManufacturerId);
+	virtual TInt DeviceRead(const TUint aPageAddress, TAny* aBuf, const TUint aLength);
+	virtual TInt DeviceWrite(const TUint aPageAddress, TAny* aBuf, const TUint aLength);
+	virtual TInt DeviceErase(const TUint aBlockAddress);
+	virtual TInt DeviceClose();
+
+public:
+	HANDLE iFile;
+	HANDLE iMapping;
+	TUint8* iBase;
+	};
+
+LOCAL_C TInt MapLastError()
+//
+// Map an NT error to an Epoc/32 error.
+//
+	{
+	__PATH_NOT_YET_TESTED;
+	DWORD r=GetLastError();
+	TInt res;
+	switch (r)
+		{
+	    case ERROR_SHARING_VIOLATION : res=KErrAccessDenied; break;
+	    case ERROR_LOCK_VIOLATION : res=KErrLocked; break;
+	    case ERROR_FILE_NOT_FOUND: res=KErrNotFound; break;
+	    case ERROR_PATH_NOT_FOUND: res=KErrPathNotFound; break;
+	    case ERROR_ALREADY_EXISTS:
+	    case ERROR_FILE_EXISTS:
+            res=KErrAlreadyExists;
+		    break;
+	    case ERROR_NOT_READY: res=KErrNotReady; break;
+	    case ERROR_UNRECOGNIZED_VOLUME:
+	    case ERROR_NOT_DOS_DISK:
+		    res=KErrUnknown;
+		    break;
+	    case ERROR_UNRECOGNIZED_MEDIA: res=KErrCorrupt; break;
+	    case ERROR_INVALID_NAME: res=KErrBadName; break;
+	    case ERROR_NO_MORE_FILES: res=KErrEof; break;
+		case ERROR_DISK_FULL: res=KErrDiskFull; break;
+		default: res=KErrGeneral;
+		}
+	return(res);
+	}
+
+TInt DMediaDriverNandWin32::Initialise()
+//
+// Create the simulated NAND file if necessary and
+// map it into memory.
+//
+	{
+	__PATH_TESTED;
+
+	// locate/open the file that models the flash
+	CHAR filename[MAX_PATH];
+	strcpy(filename, Property::GetString("EmulatorMediaPath"));
+	if (!Emulator::CreateAllDirectories(filename))
+		{
+		__PATH_NOT_YET_TESTED;
+		return Emulator::LastError();
+		}
+	strcat(filename, KNandFileName);
+	iFile = CreateFileA(filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, NULL);
+
+	if (iFile == INVALID_HANDLE_VALUE)
+		{
+		__PATH_NOT_YET_TESTED;
+		return Emulator::LastError();
+		}
+
+	const TUint32 flashSizeInBytes = iNumBlocks * iNumPagesPerBlock * (iNumBytesMain + iNumBytesSpare);
+
+	SetFilePointer(iFile, flashSizeInBytes, NULL, FILE_BEGIN);
+	SetEndOfFile(iFile);
+	
+	iMapping = CreateFileMappingA(iFile, NULL, PAGE_READWRITE, 0, flashSizeInBytes, NULL);
+	if (iMapping == NULL)
+		{
+		__PATH_NOT_YET_TESTED;
+		return Emulator::LastError();
+		}
+
+	iBase = (TUint8*)MapViewOfFile(iMapping, FILE_MAP_WRITE, 0, 0, flashSizeInBytes);
+	if (iBase == NULL)
+		{
+		__PATH_NOT_YET_TESTED;
+		return Emulator::LastError();
+		}
+
+	return KErrNone;
+	}
+
+TInt DMediaDriverNandWin32::GetDeviceId(TUint8& aDeviceId, TUint8& aManufacturerId)
+	{
+	__PATH_TESTED;
+	
+	aManufacturerId = (KSimulatedDeviceId & 0xFF00) >> 8;
+	aDeviceId       = (KSimulatedDeviceId & 0xFF);
+	return KErrNone;
+	}
+
+TInt DMediaDriverNandWin32::DeviceRead(const TUint aPageAddress, TAny* aBuf, const TUint aLength)
+	{
+	__PATH_TESTED;
+
+	__NAND_ASSERT(aPageAddress < (iNumBlocks * iNumPagesPerBlock));
+	__NAND_ASSERT(   (aLength == iNumBytesMain)
+				  || (aLength == iNumBytesMain + iNumBytesSpare)
+				  || (aLength == iNumBytesSpare)				 );
+	
+#ifdef __TEST_MEDIA_DRIVER__
+		extern TBool gNoPower;
+		if(gNoPower)
+			return KErrBadPower;
+#endif
+
+	TUint8* readPoint;
+	if (aLength == iNumBytesMain)
+		{
+		__PATH_TESTED;
+		readPoint = iBase + (aPageAddress * (iNumBytesMain + iNumBytesSpare));
+		}
+	else if (aLength == iNumBytesSpare)
+		{
+		__PATH_TESTED;
+		readPoint = iBase + (aPageAddress * (iNumBytesMain + iNumBytesSpare)) + iNumBytesMain;
+		}
+	else if (aLength == (iNumBytesMain + iNumBytesSpare))
+		{
+		__PATH_TESTED;
+		readPoint = iBase + (aPageAddress * (iNumBytesMain + iNumBytesSpare));
+		}
+	else
+		{
+		__PATH_NOT_YET_TESTED;
+		return KErrArgument;
+		}
+
+	for (TUint i = 0; i < aLength; i++)
+		{
+		((TUint8*)aBuf)[i] = readPoint[i];
+		}
+
+#ifdef __TEST_MEDIA_DRIVER__
+	extern TBool gECCFail;
+		if(gECCFail)
+		{
+			//introduce a random one bit error
+			TUint8* p=(TUint8*)aBuf;
+			TUint32 key=Kern::Random() % aLength;
+			TUint32 shift=1<<(Kern::Random() % 8);
+			p[key]=(TUint8)(p[key]&shift?p[key]-shift:p[key]+shift);
+			gECCFail=EFalse;
+		}
+#endif
+
+	return KErrNone;
+	}
+
+#ifdef __TEST_MEDIA_DRIVER__
+extern "C" TUint32 gbbm_get_sphy_blknum(TUint32, TUint32);
+#endif
+TInt DMediaDriverNandWin32::DeviceWrite(const TUint aPageAddress, TAny* aBuf, const TUint aLength)
+	{
+	__PATH_TESTED;
+
+	__NAND_ASSERT(aPageAddress < (iNumBlocks * iNumPagesPerBlock));
+	__NAND_ASSERT(   (aLength == iNumBytesMain)
+				  || (aLength == iNumBytesMain + iNumBytesSpare)
+				  || (aLength == iNumBytesSpare)				 );
+
+#ifdef __TEST_MEDIA_DRIVER__
+		extern TBool gNoPower;
+		extern TBool gPowerFail;
+		extern TUint32 gPowerFailAfter;
+		if(gNoPower)
+			return KErrBadPower;
+		if(gPowerFail)
+			{
+			if(gPowerFailAfter)
+				--gPowerFailAfter;
+			else
+				{
+				gPowerFail=EFalse;
+				gNoPower=ETrue;
+				extern TUint32 gNotificationType;
+				extern TUint32 KNandDbgNotifyPowerDown;
+				extern TInt NotifyThread();
+				if(gNotificationType==KNandDbgNotifyPowerDown)
+					NotifyThread();
+				return KErrBadPower;
+				}
+			}
+#endif
+	
+	TUint8* writePoint;
+	
+	if (aLength == iNumBytesMain)
+		{
+		__PATH_TESTED;
+		writePoint = iBase + (aPageAddress * (iNumBytesMain + iNumBytesSpare));
+		}
+	else if (aLength == iNumBytesSpare)
+		{
+		__PATH_TESTED;
+		writePoint = iBase + (aPageAddress * (iNumBytesMain + iNumBytesSpare)) + iNumBytesMain;
+		}
+	else if (aLength == (iNumBytesMain + iNumBytesSpare))
+		{
+		__PATH_TESTED;
+		writePoint = iBase + (aPageAddress * (iNumBytesMain + iNumBytesSpare));
+		}
+	else
+		{
+		__PATH_NOT_YET_TESTED;
+		return KErrArgument;
+		}
+	
+	for (TUint i = 0; i < aLength; i++)
+		{
+		writePoint[i] &= ((TUint8*)aBuf)[i];
+		}
+
+#ifdef __TEST_MEDIA_DRIVER__
+		extern TUint32 gFailAfter;
+		extern TUint32 gFailAfterCnt;
+		extern TBool gFailureType; //true-WriteFail, false-EraseFail
+		extern TBool gFailON;
+		if(gFailON && gFailureType)
+			{
+			if(gFailAfterCnt)
+				--gFailAfterCnt;
+			else
+				{
+				extern TUint32 FirstReadPUN;
+				extern DMediaDriverNand* gMediaDriverPtr;		
+				if(gbbm_get_sphy_blknum(0,aPageAddress/gMediaDriverPtr->iNumPagesPerBlock)==FirstReadPUN)
+					{
+					gFailAfterCnt=gFailAfter;
+					//notify failure
+					extern TUint32 gNotificationType;
+					extern TUint32 KNandDbgNotifyWriteFail;
+					extern TInt NotifyThread();
+					if(gNotificationType==KNandDbgNotifyWriteFail)
+						NotifyThread();
+
+					return KErrCorrupt;
+					}
+				}
+			}
+#endif
+
+	return KErrNone;
+	}
+
+TInt DMediaDriverNandWin32::DeviceErase(const TUint aBlockAddress)
+	{
+	__PATH_TESTED;
+	
+	__NAND_ASSERT(aBlockAddress < iNumBlocks);
+#ifdef __TEST_MEDIA_DRIVER__
+		extern TBool gNoPower;
+		extern TBool gPowerFail;
+		extern TUint32 gPowerFailAfter;
+		if(gNoPower)
+			return KErrBadPower;
+		if(gPowerFail)
+			{
+			if(gPowerFailAfter)
+				--gPowerFailAfter;
+			else
+				{
+				gPowerFail=EFalse;
+				gNoPower=ETrue;
+				extern TUint32 gNotificationType;
+				extern TUint32 KNandDbgNotifyPowerDown;
+				extern TInt NotifyThread();
+				if(gNotificationType==KNandDbgNotifyPowerDown)
+					NotifyThread();
+				return KErrBadPower;
+				}
+			}
+#endif
+	
+	const TUint bytesPerEraseBlock = iNumPagesPerBlock * (iNumBytesMain + iNumBytesSpare);
+	const TUint erasePos = aBlockAddress * bytesPerEraseBlock;
+	
+	TUint8* temp = iBase + erasePos;
+	for (TUint i=0; i < bytesPerEraseBlock; i++)
+		{
+		temp[i]=0xFF;
+		}
+	return KErrNone;
+	}
+
+TInt DMediaDriverNandWin32::DeviceClose()
+	{
+	__PATH_NOT_YET_TESTED;
+	TBool bRtn=UnmapViewOfFile(iBase);
+	if(!bRtn)
+		{
+		__PATH_NOT_YET_TESTED;
+		return(MapLastError());
+		}
+
+	bRtn=CloseHandle(iMapping);
+	if (!bRtn)
+		{
+		__PATH_NOT_YET_TESTED;
+		return(MapLastError());
+		}
+
+	bRtn=CloseHandle(iFile);
+	if (!bRtn)
+		{
+		__PATH_NOT_YET_TESTED;
+		return(MapLastError());
+		}
+
+	return KErrNone;
+	}
+
+DMediaDriverNandWin32::DMediaDriverNandWin32(TMediaDevice aDevice)
+	:	DMediaDriverNand(aDevice)
+	{
+	__PATH_TESTED;
+	}
+
+DMediaDriverNand* DMediaDriverNand::New(TMediaDevice aDevice)
+	{
+	__PATH_TESTED;
+	return new DMediaDriverNandWin32(aDevice);
+	}
+
+#ifdef __USE_CUSTOM_ALLOCATOR
+/**	
+	Concrete implementation of the NAND buffer allocator class
+		- Uses Kern::Alloc based allocation
+
+	@internalTechnology
+ */
+class TNandAllocatorWins : public TNandAllocatorBase
+	{
+public:
+	virtual TInt AllocateBuffers(SBufferInfo& aBufferInfo);	// Initialise the allocator
+	};
+
+/**	Concrete implementation of the NAND buffer allocator class
+	Creates a customallocator (using Kern::Alloc)
+
+	@param aBufferInfo A reference to a SBufferInfo containing the details of the PSL allocated buffer
+	@return Standard Symbian OS error code
+	@see TNandAllocatorBase::SCellInfo
+ */
+TInt TNandAllocatorWins::AllocateBuffers(SBufferInfo& aBufferInfo)
+	{
+	const TUint32 KNumBuffers		= 4;
+	const TUint32 KMaxNumBytesSpare = 16;
+	const TUint32 KMaxNumBytesMain	= 512;
+	const TUint32 KMaxNumBytesPage	= KMaxNumBytesSpare + KMaxNumBytesMain;
+
+	aBufferInfo.iBytesPerSpareArray = KMaxNumBytesSpare;
+	aBufferInfo.iBytesPerMainArray = KMaxNumBytesMain;
+	aBufferInfo.iBufferCount = KNumBuffers;
+
+	aBufferInfo.iBufferP = reinterpret_cast<TUint8*>(Kern::Alloc(KMaxNumBytesPage * KNumBuffers));
+
+	return(aBufferInfo.iBufferP ? KErrNone : KErrNoMemory);
+	}
+
+/**
+Create an allocator suitable for use on this target
+@internalComponent
+*/
+TNandAllocatorBase* DMediaDriverNand::ExtensionInitAllocator()
+	{
+	return new TNandAllocatorWins;
+	}
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/property.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1390 @@
+// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\property.cpp
+// Emulator property management for emulator settings
+// 
+//
+
+#define _CRTIMP			// we want to use the static runtime library
+
+#define __INCLUDE_CAPABILITY_NAMES__
+#include "variant.h"
+#include <string.h>
+#include <stdlib.h>
+#include <emulator.h>
+
+#ifdef _DEBUG
+#define _DUMP_PROPERTY
+#endif
+
+const char* KDefaultMachineName = "epoc";
+const char* KDefaultTestMachineName = "defaulttest";
+
+// name of the environment variable to check for default path
+const char* KDefaultEpocRootName = "EPOCROOT";
+
+TInt ScreenId=0;
+
+// At the point this is created there is no kernel heap available
+// So all memory allocation is done from a custom allocator
+
+const TInt KMaxTokenLength = 255;
+
+class Allocator
+	{
+	enum {ETotalMemory=0x10000};	// 64K
+public:
+	Allocator();
+	TAny* Alloc(TInt aSize);
+	TAny* Realloc(TAny* aCell, TInt aSize);
+	void Free(TAny* aCell);
+private:
+	TUint iBuf[ETotalMemory];
+	TUint* iFree;
+	};
+
+Allocator::Allocator()
+	:iFree(iBuf)
+	{}
+
+TAny* Allocator::Alloc(TInt aSize)
+	{
+	aSize = (aSize + 7) >> 2;
+	if (iFree + aSize > iBuf + ETotalMemory)
+		return NULL;
+	TUint* p = iFree;
+	iFree += aSize;
+	*p++ = aSize;
+	return p;
+	}
+
+TAny* Allocator::Realloc(TAny* aCell, TInt aSize)
+	{
+	if (!aCell)
+		return Alloc(aSize);
+
+	TUint* p = (TUint*)aCell;
+	TInt size = *--p;
+	if (iFree == p + size)
+		{
+		aSize = (aSize + 7) >> 2;
+		if (p + aSize > iBuf + ETotalMemory)
+			return NULL;
+		iFree = p + aSize;
+		*p = aSize;
+		return aCell;
+		}
+
+	TAny* newp = Alloc(aSize);
+	if (newp)
+		{
+		memcpy(newp, aCell, size*sizeof(TUint));
+		Free(aCell);
+		}
+	return newp;
+	}
+
+void Allocator::Free(TAny* )
+	{
+	}
+
+Allocator TheAllocator;
+
+///////
+
+char* Duplicate(const char* aString)
+	{
+	if (aString == NULL)
+		aString = "";
+
+	TInt size = strlen(aString) + 1;
+	char* p = (char*)TheAllocator.Alloc(size);
+	if (p)
+		memcpy(p, aString, size);
+	return p;
+	}
+
+// Properties class implementation
+
+Properties::Properties()
+	:iEntries(NULL),iCount(0),iSize(0)
+	{}
+
+const char* Properties::Insert(TInt aIndex, const char* aProperty, const char* aValue)
+	{
+	if (iCount == iSize)
+		{
+		TInt size = iSize == 0 ? 8 : iSize*2;
+		TAny* array = TheAllocator.Realloc(iEntries, size*sizeof(SEntry));
+		if (array == NULL)
+			return NULL;
+		iEntries = (SEntry*)array;
+		iSize = size;
+		}
+
+	char* prop = Duplicate(aProperty);
+	if (prop == NULL)
+		return NULL;
+	char* value = Duplicate(aValue);
+	if (value == NULL)
+		TheAllocator.Free(prop);
+	else
+		{
+		SEntry* e = &iEntries[aIndex];
+		memmove(e+1, e, (iCount-aIndex)*sizeof(SEntry));
+		e->iProperty = prop;
+		e->iValue = value;
+		++iCount;
+		}
+	return value;
+	}
+
+const char* Properties::Replace(const char* aProperty, const char* aValue)
+	{
+	TInt ix = Find(aProperty);
+	if (ix < 0)
+		return Insert(~ix, aProperty, aValue);
+	// replacing a property
+	SEntry& e = iEntries[ix];
+	char* value = Duplicate(aValue);
+	if (value != NULL)
+		{
+		TheAllocator.Free(e.iValue);
+		e.iValue = value;
+		}
+	return value;
+	}
+
+const char* Properties::Append(const char* aProperty, const char* aValue)
+	{
+	TInt ix = Find(aProperty);
+	if (ix < 0)
+		return Insert(~ix, aProperty, aValue);
+
+	// append a property
+	SEntry& e = iEntries[ix];
+	TInt size = strlen(e.iValue) + strlen(aValue) + 2;
+	char* value = (char*)TheAllocator.Realloc(e.iValue, size);
+	if (value != NULL)
+		{
+		strcat(value, ";");
+		strcat(value, aValue);
+		e.iValue = value;
+		}
+	return value;
+	}
+
+TInt Properties::GetString(const char* aProperty, const char*& aValue) const
+	{
+	TInt ix = Find(aProperty);
+	if (ix < 0)
+		return KErrNotFound;
+	aValue = iEntries[ix].iValue;
+	return KErrNone;
+	}
+
+TInt Properties::GetInt(const char* aProperty, TInt& aValue) const
+	{
+	TInt ix = Find(aProperty);
+	if (ix < 0)
+		return KErrNotFound;
+	char* value = iEntries[ix].iValue;
+	char* end;
+	TBool neg = *value=='-';
+	value += neg;
+	long val = strtoul(value, &end, 0);
+	if(neg)
+		{
+		if(val<0)
+			return KErrArgument;
+		val = -val;
+		}
+	if (*end != '\0')
+		return KErrArgument;
+	aValue = val;
+	return KErrNone;
+	}
+
+TInt Properties::GetBool(const char* aProperty, TBool& aValue, TBool aDefaultValue) const
+	{
+	TInt ix = Find(aProperty);
+	if (ix < 0)
+		{
+		aValue = aDefaultValue;
+		return KErrNone;
+		}
+	const char* value=iEntries[ix].iValue;
+	if (_stricmp(value, "on")==0 || _stricmp(value, "yes")==0 || _stricmp(value, "1")==0 || strlen(value)==0)
+		{
+		aValue = ETrue;
+		return KErrNone;
+		}
+	if (_stricmp(value, "off")==0 || _stricmp(value, "no")==0 || _stricmp(value, "0")==0 )
+		{
+		aValue = EFalse;
+		return KErrNone;
+		}
+
+	// Bool property has an illegal value!
+	return KErrArgument;
+	}
+
+TInt Properties::Find(const char* aProperty) const
+//
+// Lookup a property in the table
+// return index (>=0) if found, ~insertion-point (<0) if not
+//
+	{
+	TInt l = 0, r = iCount;
+	while (l < r)
+		{
+		TInt m = (l + r) >> 1;
+		const SEntry& e = iEntries[m];
+		TInt k = _stricmp(aProperty,e.iProperty);
+		if (k < 0)
+			r = m;
+		else if (k > 0)
+			l = m + 1;
+		else
+			return m;
+		}
+	return ~l;
+	}
+
+#ifdef _DUMP_PROPERTY
+void Properties::Dump() const
+	{
+	for (TInt i = 0; i < iCount; ++i)
+		{
+		const SEntry& e = iEntries[i];
+		char buf[512];
+		strcpy(buf, e.iProperty);
+		TInt len = strlen(e.iValue);
+		if (len)
+			{
+			strcat(buf, " = ");
+			if (len <= 256)
+				strcat(buf, e.iValue);
+			else
+				{
+				strncat(buf, e.iValue, 256);
+				strcat(buf, "...");
+				}
+			}
+		strcat(buf, "\r\n");
+		OutputDebugStringA(buf);
+		}
+	}
+#endif
+
+// Property related variant functions
+
+TInt Wins::EmulatorHal(TInt aFunction, TAny* a1, TAny* a2)
+	{
+	TInt r=KErrNone;
+	switch(aFunction)
+		{
+		case EEmulatorHalStringProperty:
+			return iProperties.GetString((const char*)a1,*(const char**)a2);
+		case EEmulatorHalIntProperty:
+			return iProperties.GetInt((const char*)a1,*(TInt*)a2);
+		case EEmulatorHalBoolProperty:
+			return iProperties.GetBool((const char*)a1,*(TBool*)a2);
+		case EEmulatorHalMapFilename:
+			return MapFilename(*(const TDesC*)a1,*(TDes*)a2);
+		case EEmulatorHalSetFlip:
+			{
+			if (iUi)
+				{
+				TInt screen = (TInt)a2;
+				if((TUint)screen < (TUint)iUi->NumberOfScreens())
+					return iUi->SetFlip(TEmulatorFlip(TInt(a1)),screen);
+				}
+			break;
+			}
+		case EEmulatorHalColorDepth:
+			{
+			TUint colorDepth = KDefaultColorDepth;
+			if(iUi)
+				{
+				if((TUint)a2 < (TUint)iUi->NumberOfScreens())
+					colorDepth = iUi->ColorDepth((TInt)a2);
+				}
+			*(TUint*)a1 = colorDepth;
+			return KErrNone;
+			}
+		case EEmulatorHalCPUSpeed:
+			if (a1)
+				return SetCpuSpeed(TUint(a2)/1000);
+			*(TInt*)a2 = iCpuSpeed ? iCpuSpeed * 1000 : 1;
+			return KErrNone;
+		case EEmulatorHalNumberOfScreens:
+			*(TInt*)a2 = iUi ? iUi->NumberOfScreens() : 1;
+			return KErrNone;
+		case EEmulatorHalSetDisplayChannel:
+			if (iUi && (TUint)a1 < (TUint)iUi->NumberOfScreens())
+				{
+				r = iUi->SetDisplayChannel((TInt)a1, static_cast<DDisplayChannel*>(a2));
+				}
+			else
+				{
+				r = KErrNotSupported;
+				}
+			break;
+		default:
+			r=KErrNotSupported;
+			break;
+		}
+	return r;
+	}
+
+const char* KExtensionListNormal = "btracex.ldd;hcr.dll;winsgui;elocd.ldd;medint.pdd;medlfs.pdd;medmmc.pdd;epbusmmc.dll;epbusv.dll";
+const char* KExtensionUsiiNand = "?medusiiw.pdd";
+const char* KExtensionUsiiNandLoader = "?medusiiws.pdd";
+const char* KExtensionUsiiNandTest = "?medusiiwt.pdd";
+
+
+
+
+const int KMaxEpocRootSize = 120;
+
+TInt Wins::InitProperties(TBool aRunExe)
+	{
+	if (iProperties.Replace("MachineName", KDefaultMachineName) == NULL)
+		return KErrNoMemory;
+
+    char epocRoot[KMaxEpocRootSize];
+
+    TInt total = GetEnvironmentVariableA( KDefaultEpocRootName, epocRoot, KMaxEpocRootSize);
+
+    if (total != 0)
+		{
+	    if (iProperties.Replace("EpocRoot", epocRoot) == NULL)
+    	    return KErrNoMemory;
+		}
+
+	if (iProperties.Append("Extension", KExtensionListNormal) == NULL)
+		return KErrNoMemory;
+
+	char overrideCDrive[MAX_PATH];
+	overrideCDrive[0] = '\0';
+	TInt r = ProcessCommandLine(aRunExe, overrideCDrive);
+	if (r != KErrNone)
+		return r;
+
+	r = SetupPaths();
+	if (r != KErrNone)
+		return r;
+
+	r = LoadProperties();
+	if (r != KErrNone)
+		return r;
+
+	//	get Unistore II Media Driver type from epoc.ini
+	const char* value = NULL;
+	
+
+	iProperties.GetString("NandDriverType", value);
+	if (value)
+		{
+		if (value && _stricmp("XSR",value)==0)
+			{
+			// epoc.ini "NandDriverType=XSR" for XSR/Unistore-II driver
+			if (iProperties.Append("Extension", KExtensionUsiiNand) == NULL)
+				return KErrNoMemory;		
+			}
+		else if (value && _stricmp("XSRNandloader",value)==0)
+			{
+			// epoc.ini "NandDriverType=XSRNandloader" for XSR/Unistore-II nandloader driver
+			if (iProperties.Append("Extension", KExtensionUsiiNandLoader) == NULL)
+				return KErrNoMemory;		
+			}
+		else if (value && _stricmp("XSRTest",value)==0)
+			{
+			// epoc.ini "NandDriverType=XSRTest" for XSR/Unistore-II test driver
+			if (iProperties.Append("Extension", KExtensionUsiiNandTest) == NULL)
+				return KErrNoMemory;
+			}
+		else	
+			{
+			// If epoc.ini contains "NandDriverType=???" but ??? not equal to any
+			// of above XSR driver types then load production/release XSR
+			// driver
+			if (iProperties.Append("Extension", KExtensionUsiiNand) == NULL)
+				return KErrNoMemory;
+
+			}
+		}
+	else
+		{
+		// Load the production/release XSR driver, if value is NULL
+		if (iProperties.Append("Extension", KExtensionUsiiNand) == NULL)
+			return KErrNoMemory;
+
+		}
+	
+
+//	load additional configuration specific properties
+
+//	get the multi property "configuration"
+	value = NULL;
+	iProperties.GetString("configuration", value);
+	
+//	load each one of these
+//	check for any screen specific properties in the main epoc.ini
+//	if configuration property is set
+	if (value && !iConfigPropertySet)	//configuration
+		{
+		iConfigId = 0;
+		char configFileName[100];
+		do
+			{
+			//load each set of properties
+
+		   const char * pdest = strchr(value, ';');
+		   TInt result = pdest - value;
+		   if(pdest)
+			   {
+			   strncpy(configFileName, value, result);
+			   configFileName[result] = '\0';
+			   value = value + result + 1;
+			   }
+		   else
+			   {
+			   strcpy(configFileName, value);
+			   value += strlen(value);
+			   }
+
+			r = LoadConfigSpecificProperties(configFileName);
+			if (r == KErrNone)
+				iConfigId++;
+			}
+		while(*value);
+		}
+
+	char scr[30];
+	//if iConfigId is zero, there is only 1 configuration
+	wsprintfA(scr, "ConfigCount %d", iConfigId ? iConfigId : 1);
+	r = AddProperty(scr, scr+strlen(scr));
+	if (r != KErrNone)
+		return r;
+
+	r = SetupMediaPath();
+	if (r != KErrNone)
+		return r;
+
+	if (overrideCDrive[0] != '\0')
+		SetupDrive('c', overrideCDrive);
+
+	if (iProperties.Append("Extension", "exstart") == NULL)
+		return KErrNoMemory;
+
+#ifdef _DUMP_PROPERTY
+	iProperties.Dump();
+#endif
+
+	return KErrNone;
+	}
+
+char* skipws(char* aPtr)
+	{
+	while (isspace(*aPtr))
+		++aPtr;
+	return aPtr;
+	}
+
+char* skiptok(char* aPtr)
+	{
+	if (*aPtr == '\"')
+		{
+		++aPtr;
+		while (*aPtr && *aPtr++ != '\"')
+			{}
+		}
+	else
+		{
+		while (*aPtr && !isspace(*aPtr))
+			++aPtr;
+		}
+	return aPtr;
+	}
+
+#ifdef _DEBUG
+struct TDebugTrace
+	{
+	const char* iName;
+	TInt iMask;
+	};
+
+// Only the first 32 trace bits can be defined using these values
+// "ALWAYS" in this context means all of the first 32 bits not all 256 bits
+const TDebugTrace KTraceValues[] =
+	{
+	{"ALWAYS", KALWAYS},
+	{"BOOT", 1<<KBOOT},
+	{"DEVICE", 1<<KDEVICE},
+	{"DFC", 1<<KDFC},
+	{"DLL", 1<<KDLL},
+	{"EVENT", 1<<KEVENT},      
+	{"EXEC", 1<<KEXEC},
+	{"DEBUGGER", 1<<KDEBUGGER},
+	{"EXTENSION", 1<<KEXTENSION},
+	{"FAIL", 1<<KFAIL},
+	{"HARDWARE", 1<<KHARDWARE},
+	{"IPC", 1<<KIPC},
+	{"LOCDRV", 1<<KLOCDRV},
+	{"MEMTRACE", 1<<KMEMTRACE},
+	{"MMU", 1<<KMMU},
+	{"NKERN", 1<<KNKERN},
+	{"OBJECT", 1<<KOBJECT},
+	{"PANIC", 1<<KPANIC},
+	{"PBUS1", 1<<KPBUS1},
+	{"PBUS2", 1<<KPBUS2},
+	{"PBUSDRV", 1<<KPBUSDRV},
+	{"POWER", 1<<KPOWER},      
+	{"PROC", 1<<KPROC},
+	{"SCHED", 1<<KSCHED},
+	{"SCHED2", 1<<KSCHED2},
+	{"SCRATCH", 1<<KSCRATCH},
+	{"SEMAPHORE", 1<<KSEMAPHORE},
+	{"SERVER", 1<<KSERVER},
+	{"THREAD", 1<<KTHREAD},
+	{"THREAD2", 1<<KTHREAD2},
+	{"TIMING", 1<<KTIMING},
+	{"DMA", 1<<KDMA},
+	{"MMU2", 1<<KMMU2}
+	};
+const TInt KMaxTraceName = 9;
+const TInt KCountTraceValues = sizeof(KTraceValues)/sizeof(TDebugTrace);
+
+static const TDebugTrace* TraceType(const char* aTrace, TInt aLen)
+	{
+	if (aLen > KMaxTraceName)
+		return 0;
+
+	char name[KMaxTraceName + 1];
+	strncpy(name, aTrace, aLen);
+	name[aLen] = '\0';
+
+	for (TInt i=KCountTraceValues; --i>=0;)
+		{
+		if (_stricmp(name, KTraceValues[i].iName)==0)
+			return &KTraceValues[i];
+		}
+	return 0;
+	}
+#endif
+
+TInt Wins::DebugMask()
+	{
+	TInt mask = KDefaultDebugMask;
+	if (iProperties.GetInt("DebugMask", mask) != KErrArgument)
+		return mask;
+#ifdef _DEBUG
+	// allow text ones
+	const char* e;
+	if (iProperties.GetString("DebugMask", e) != KErrNone)
+		return mask;
+
+	for (;;)
+		{
+		char* p = skipws((char*)e);
+		if (*p == 0)
+			break;
+		e = skiptok(p);
+		TBool add = ETrue;
+		if (*p == '+')
+			++p;
+		else if (*p == '-')
+			{
+			add = EFalse;
+			++p;
+			}
+		const TDebugTrace* type = TraceType(p, e - p);
+		if (type)
+			{
+			if (add)
+				mask |= type->iMask;
+			else
+				mask &= ~type->iMask;
+			}
+		}
+#endif
+	return mask;
+	}
+
+TUint32 Wins::KernelConfigFlags()
+	{
+	TUint32 flags = 0;
+	TBool b;
+
+	b=0;
+	iProperties.GetBool("PlatSecEnforcement",b,EFalse);
+	if(b) flags |= EKernelConfigPlatSecEnforcement;
+	Wins::EarlyLogging("PlatSecEnforcement ",b?"ON":"OFF");
+
+	b=0;
+	iProperties.GetBool("PlatSecDiagnostics",b,EFalse);
+	if(b) flags |= EKernelConfigPlatSecDiagnostics;
+	Wins::EarlyLogging("PlatSecDiagnostics ",b?"ON":"OFF");
+
+	b=0;
+	iProperties.GetBool("PlatSecProcessIsolation",b,EFalse);
+	if(b) flags |= EKernelConfigPlatSecProcessIsolation;
+	Wins::EarlyLogging("PlatSecProcessIsolation ",b?"ON":"OFF");
+
+	b=0;
+	iProperties.GetBool("PlatSecEnforceSysBin",b,EFalse);
+	if(b) flags |= EKernelConfigPlatSecEnforceSysBin;
+	Wins::EarlyLogging("PlatSecEnforceSysBin ",b?"ON":"OFF");
+
+	b=0;
+	iProperties.GetBool("CrazyScheduling",b,EFalse);
+	if(b) flags |= EKernelConfigCrazyScheduling;
+	Wins::EarlyLogging("CrazyScheduling ",b?"ON":"OFF");
+
+	return flags;
+	}
+
+void Wins::DisabledCapabilities(SCapabilitySet& aCapabilities)
+	{
+	const char* text;
+	if(iProperties.GetString("PlatSecDisabledCaps", text)!=KErrNone)
+		text = "NONE";
+	Wins::EarlyLogging("PlatSecDisabledCaps ",text);
+	ParseCapabilitiesArg(aCapabilities,text);
+	}
+
+#define PARSE_CAPABILITIES_ERROR(aMessage) Wins::EarlyLogging(aMessage,0)
+#define PARSE_CAPABILITIES_ERROR2(aMessage,aArg) Wins::EarlyLogging(aMessage,aArg)
+#define strnicmp _strnicmp
+
+TInt Wins::ParseCapabilitiesArg(SCapabilitySet& aCapabilities, const char *aText)
+//
+// This is a cun'n'paste copy of the function in TOOLS\E32TOOLS\HOST\H_UTIL.CPP
+// Keep both of these versions up to date with each other
+//
+	{
+	memset(&aCapabilities,0,sizeof(aCapabilities));
+	char c;
+	while((c=*aText)!=0)
+		{
+		if(c<=' ')
+			{
+			++aText;
+			continue;
+			}
+		int invert=0;
+		if(c=='+')
+			{
+			++aText;
+			c=*aText;
+			}
+		if(c=='-')
+			{
+			invert=1;
+			++aText;
+			}
+		const char* name = aText;
+		while((c=*aText)>' ')
+			{
+			if(c=='-' || c=='+')
+				break;
+			++aText;
+			}
+		TInt n = aText-name;
+		TInt i;
+
+		if(n==3 && strnicmp("all",name,n)==0)
+			{
+			if(invert)
+				{
+				PARSE_CAPABILITIES_ERROR("Capability '-ALL' not allowed");
+				return KErrArgument;
+				}
+			for(i=0; i<ECapability_Limit; i++)
+				{
+				if(CapabilityNames[i])
+					aCapabilities[i>>5] |= (1<<(i&31));
+				}
+			continue;
+			}
+
+		if(n==4 && strnicmp("none",name,n)==0)
+			{
+			if(invert)
+				{
+				PARSE_CAPABILITIES_ERROR("Capability '-NONE' not allowed");
+				return KErrArgument;
+				}
+			memset(&aCapabilities,0,sizeof(aCapabilities));
+			continue;
+			}
+
+		for(i=0; i<ECapability_Limit; i++)
+			{
+			const char* cap = CapabilityNames[i];
+			if(!cap)
+				continue;
+			if((int)strlen(cap)!=n)
+				continue;
+			if(strnicmp(cap,name,n)!=0)
+				continue;
+			break;
+			}
+		if(i>=ECapability_Limit)
+			{
+			char badName[32];
+			if(n>=sizeof(badName)) n=sizeof(badName)-1;
+			memcpy(badName,name,n);
+			badName[n]=0;
+			PARSE_CAPABILITIES_ERROR2("Unrecognised capability name: ",badName);
+			return KErrArgument;
+			}
+		if(invert)
+			aCapabilities[i>>5] &= ~(1<<(i&31));
+		else
+			aCapabilities[i>>5] |= (1<<(i&31));
+		}
+	return KErrNone;
+	}
+
+TInt Wins::AddProperty(char* aProperty, const char* aEol)
+	{
+	const char* tok = aProperty;
+	int c;
+	do
+		{
+		if (aProperty == aEol)
+			{
+			// boolean property
+			if (_stricmp(tok, "_NewScreen_") == 0)
+ 				{
+ 				++ScreenId;
+ 				return KErrNone;
+ 				}
+			else
+				{
+				char newtok[KMaxTokenLength];
+				if (ConfigSpecificProperty(tok))
+					{
+					wsprintfA(newtok, "Configuration[%d]", iConfigId);
+					strcat(newtok, tok);
+					tok = newtok;
+					}
+				}
+			return iProperties.Replace(tok, NULL) == NULL ? KErrNoMemory : KErrNone;
+			}
+		c=*aProperty++;
+		} while (isalnum(c) || c=='_');
+	aProperty[-1]='\0';	// terminate property name
+	while (isspace(c))
+		c=*aProperty++;
+	TBool append=ETrue;
+	if (c=='=')
+		{
+		append=EFalse;
+		c=*aProperty++;
+		}
+	else if (c=='+' && *aProperty=='=')
+		{
+		++aProperty;
+		c=*aProperty++;
+		}
+	while (isspace(c))
+		c=*aProperty++;
+	--aProperty;	// point back to value
+
+	if (_strnicmp(tok, "_epoc_drive_", 12) == 0)
+		return SetupDrive(tok[12], aProperty);
+	else
+		{
+		char newtok[KMaxTokenLength];
+		if (ConfigSpecificProperty(tok))
+			{
+			if (ScreenSpecificProperty(tok))
+				{
+				wsprintfA(newtok, "Configuration[%d][%d]", iConfigId, ScreenId);
+				}
+			else
+				{
+				wsprintfA(newtok, "Configuration[%d]", iConfigId);
+				}
+			strcat(newtok, tok);
+			tok = newtok;
+			}
+		if (append)
+			return iProperties.Append(tok, aProperty) == NULL ? KErrNoMemory : KErrNone;
+		else
+			return iProperties.Replace(tok, aProperty) == NULL ? KErrNoMemory : KErrNone;
+		}
+	}
+
+TInt Wins::ProcessCommandLine(TBool aRunExe, char* aCDrive)
+	{
+	if (aRunExe)
+		{
+		char exe[MAX_PATH];
+		DWORD len=GetModuleFileNameA(NULL, exe, MAX_PATH);
+		if (len == 0)
+			return KErrGeneral;
+		exe[len] = '\0';
+		const char* base = strrchr(exe, '\\') + 1;
+		if (iProperties.Replace("AutoRun", base) == NULL)
+			return KErrNoMemory;
+		}
+
+	char* cmd = skipws(skiptok(GetCommandLineA()));
+	if (strstr(cmd, "--") != NULL)
+		{
+		for (;;)
+			{
+			cmd = strchr(cmd, '-') + 1;
+			TInt opt = *cmd++;
+			if (opt == '-')
+				break;
+			char* end = skiptok(cmd);
+			*end = '\0';
+			switch (tolower(opt))
+				{
+			    case 'd':
+				    {
+				    TInt r = AddProperty(cmd, end);
+				    if (r != KErrNone)
+				    	return r;
+				    }
+				    break;
+			    case 'm':
+			    	// specify base name for .INI file
+				    if (iProperties.Replace("MachineName", cmd) == NULL)
+				    	return KErrNoMemory;
+				    break;
+			    case 'l':
+			    	// specify language
+			    	if (iProperties.Replace("TheMachineLanguageIndex", cmd) == NULL)
+			    		return KErrNoMemory;
+			    	break;
+		    	case 'c':
+		    		// specify path for emulated C drive
+			    	{
+			    	DWORD len=GetFullPathNameA(cmd, MAX_PATH, aCDrive, NULL);
+			    	if (len==0 || len >= MAX_PATH)
+			    		aCDrive[0] = '\0';
+			    	}
+			        break;
+			    case 't':
+			    	// specify the temp path as the emulated C drive
+			    	{
+			    	DWORD len=GetTempPathA(MAX_PATH, aCDrive);
+			    	if (len==0 || len >= MAX_PATH)
+			    		aCDrive[0] = '\0';
+			    	}
+			    	break;
+				}
+			cmd = end+1;
+			}
+		cmd = skipws(cmd);
+		}
+
+	if (aRunExe && iProperties.Replace("CommandLine", cmd) == NULL)
+		return KErrNoMemory;
+
+	return KErrNone;
+	}
+
+TInt Wins::LoadConfigSpecificProperties(const char * aFile)
+	{
+	const char* path;
+	TInt r = iProperties.GetString("EmulatorDataPath", path);
+	if (r != KErrNone)
+		return r;
+
+	char file[KMaxFileName + 1];
+	strcpy(file, path);
+	strcat(file, aFile);
+
+	char* iniData;
+	r = ReadIniFile(file, iniData);
+	if (r == KErrNone)
+		{
+		r = ReadProperties(iniData);
+		VirtualFree(iniData, 0, MEM_RELEASE);
+		}
+	else if (r == KErrNotFound)
+		r = KErrNotFound;
+
+	return r;
+
+	}
+
+
+
+TInt Wins::LoadProperties()
+	{
+	const char* path;
+	TInt r = iProperties.GetString("EmulatorDataPath", path);
+	if (r != KErrNone)
+		return r;
+	const char* name;
+	r = iProperties.GetString("MachineName", name);
+	if (r != KErrNone)
+		return r;
+retry:
+	char file[KMaxFileName + 1];
+	strcpy(file, path);
+	strcat(file, name);
+	strcat(file, ".ini");
+
+	char* iniData;
+	r = ReadIniFile(file, iniData);
+	if (r == KErrNone)
+		{
+		r = ReadProperties(iniData);
+		VirtualFree(iniData, 0, MEM_RELEASE);
+		}
+	else if (r == KErrNotFound)
+		{
+		if(_stricmp(name,KDefaultMachineName)==0)
+			{
+			// try test ini file
+			name = KDefaultTestMachineName;
+			goto retry;
+			}
+		r = KErrNone;		// no ini file - oh well
+		}
+
+	return r;
+	}
+
+TInt Wins::ReadProperties(char* aData)
+	{
+	ScreenId = 0;
+	while (*aData)
+		{
+		char* beg = aData;
+		char* eol = strchr(beg, '\n');
+		aData = eol+1;
+		if (eol == beg)
+			continue;
+		if (eol[-1] == '\r' && --eol == beg)
+			continue;
+		*eol = '\0';		// terminate line
+
+		while (isspace(*beg))
+			++beg;
+		char* comment = strchr(beg, '#');
+		if (comment)
+			eol = comment;
+		while (eol > beg && isspace(eol[-1]))
+			--eol;
+		if (beg == eol)
+			continue;
+		*eol = '\0';		// terminate line
+
+		TInt r = AddProperty(beg, eol);
+		if (r != KErrNone)
+			return r;
+		}
+	char sc[5];
+ 	wsprintfA(sc, "%d", ScreenId+1);
+	TInt screens;
+	if(iProperties.GetInt("[screens]", screens) == KErrNone && screens > ScreenId)
+		return KErrNone;
+ 	else
+		return iProperties.Replace("[screens]", sc)  == NULL ? KErrNoMemory : KErrNone;
+	}
+
+TInt Wins::ReadIniFile(const char* aFileName, char*& aContents)
+	{
+	TInt r = KErrNone;
+	HANDLE file=CreateFileA(aFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+	if (!file || file==INVALID_HANDLE_VALUE)
+		r = KErrNotFound;	// More than likely !
+	else
+		{
+		TInt size=GetFileSize(file, NULL);
+		if (size==INVALID_FILE_SIZE)
+			r = KErrGeneral;
+		else
+			{
+			// fileSize+3 to ensure zero-termination of file and trailing CRLF
+			// VirtualAlloc initializes memory to zero
+			TAny* data = VirtualAlloc(NULL, size+3, MEM_COMMIT, PAGE_READWRITE);
+			if (!data)
+				r = KErrNoMemory;
+			else
+				{
+				DWORD bytesRead;
+				if (!ReadFile(file, data, size, &bytesRead, NULL))
+					{
+					VirtualFree(data, 0, MEM_RELEASE);
+					r = KErrGeneral;
+					}
+				else
+					{
+					aContents = (LPSTR)data;
+					strcpy(aContents + size,"\r\n");
+					}
+				}
+			}
+		CloseHandle(file);
+		}
+	return r;
+	}
+
+
+TInt Wins::SetupPaths()
+//
+// set up the Emulator paths
+//
+	{
+	// the Emulator path
+	CHAR path[KMaxFileName + 1];
+	DWORD len=GetModuleFileNameA(NULL, path, KMaxFileName);
+	if (len == 0)
+		return(KErrGeneral);
+	path[len] = '\0';
+	_strlwr(path);
+	*(strrchr(path, '\\') + 1) = '\0';
+	const char* emulatorPath = iProperties.Replace("EmulatorPath", path);
+	if (!emulatorPath)
+		return KErrNoMemory;
+
+	CHAR drive[KMaxFileName + 1];
+
+	// the Emulator data path
+	strcat(path, "data\\");
+	DWORD att = GetFileAttributesA(path);
+	if (att != -1 && (att&FILE_ATTRIBUTE_DIRECTORY))
+		{
+		// if Data directory exists in the emulator path, do things the new way
+		strcpy(drive, emulatorPath);
+		strcat(drive,"c\\");
+		}
+	else
+		{
+		// the old way
+#if defined(__VC32__)
+		char* p = strstr(path, "\\epoc32\\release\\wins\\");
+#elif defined(__CW32__)
+		char* p = strstr(path, "\\epoc32\\release\\winscw\\");
+#endif
+		if (p == NULL)
+			return KErrNotFound;
+		strcpy(p, "\\epoc32\\");
+		strcpy(drive, path);
+		strcat(path, "data\\");
+#if defined(__VC32__)
+		strcat(drive,"wins\\c\\");
+#elif defined(__CW32__)
+		strcat(drive,"winscw\\c\\");
+#endif
+		}
+	if (!iProperties.Replace("EmulatorDataPath", path))
+		return KErrNoMemory;
+
+	// The Emulator Image path (for temporary EXE files)
+	const char* eip;
+	TInt r = iProperties.GetString("EmulatorImagePath", eip);
+	if (r!=KErrNone)
+		{
+		len=GetTempPathA(KMaxFileName, path);
+		strcat(path, "epoc\\");
+		char* p = path + strlen(path);
+		*p++ = emulatorPath[0];
+		strcpy(p, emulatorPath+2);
+		if (!iProperties.Replace("EmulatorImagePath", path))
+			return KErrNoMemory;
+		}
+	else
+		strcpy(path, eip);
+	if (!Emulator::CreateAllDirectories(path))
+		return Emulator::LastError();
+
+	// Win32 filesystem paths mapped to local WINS drives
+	r = SetupDrive('c',drive);  // set up C here, can be overridden by system.ini settings
+	if (r)
+		return(r);
+
+	strcpy(drive, emulatorPath);
+	strcat(drive,"z\\");
+
+	r=SetupDrive('z',drive);  // set up Z here, can be overridden by system.ini settings
+	if (r)
+		return(r);
+
+	return(KErrNone);
+	}
+
+TInt Wins::SetupMediaPath()
+//
+// Set up the path for emulated media devices 'EmulatedMediaPath'
+// The default is <datapath>media/
+// The system temporary path can be set by value '%temp%'
+//
+	{
+	CHAR path[KMaxFileName + 1];
+	const char* mpath;
+	if (iProperties.GetString("EmulatorMediaPath", mpath) == KErrNotFound)
+		{
+		const char* dpath;
+		TInt r = iProperties.GetString("EmulatorDataPath", dpath);
+		if (r != KErrNone)
+			return r;
+		strcpy(path, dpath);
+		strcat(path, "media\\");
+		return iProperties.Replace("EmulatorMediaPath", path) ? KErrNone : KErrNoMemory;
+		}
+
+	if (_stricmp(mpath, "%temp%") == 0)
+		{
+		DWORD len=GetTempPathA(KMaxFileName, path);
+		if (len > 0 && len < KMaxFileName)
+			return iProperties.Replace("EmulatorMediaPath", path) ? KErrNone : KErrNoMemory;
+		}
+
+	return KErrNone;
+	}
+
+const char* Wins::EmulatorMediaPath()
+	{
+	const char* mpath = NULL;
+	iProperties.GetString("EmulatorMediaPath", mpath);
+	return mpath;
+	}
+
+TInt Wins::SetupDrive(int aDrive, const char* aPath)
+//
+// set up emulated drives
+//
+	{
+
+	// Z drive can't end in anything but "Z\\", since we chop this off and use
+	// the resulting directory to find filenames with no drive specified in
+	// MapFileName() below.
+	aDrive = tolower(aDrive);
+	if (aDrive=='z')
+		{
+		const char* end = aPath + strlen(aPath);
+		if (_stricmp(end-2,"\\z") != 0 && _stricmp(end-3,"\\z\\") != 0)
+			return KErrArgument;
+		}
+
+	char prop[] = "_epoc_drive_?";
+	*strchr(prop, '?') = char(aDrive);
+
+
+    // If the path begins with the keyword %epocroot%, replace this with EPOCROOT
+    if (_strnicmp(aPath, "%epocroot%", 10) == 0)
+        {
+		aPath += 10; // skip "%epocroot%"
+
+        const char* eRoot;
+        TInt r = iProperties.GetString("EpocRoot", eRoot);
+        if (r != KErrNone)
+            return r;
+
+		int rootSize = strlen(eRoot);
+		int pathSize = strlen(aPath);
+		if(rootSize+pathSize>MAX_PATH)
+			return KErrArgument;
+
+        char fullPath[MAX_PATH+1];
+		memcpy(fullPath,eRoot,rootSize);
+		memcpy(fullPath+rootSize,aPath,pathSize+1); // +1 to get the terminating NULL char
+
+        return iProperties.Replace(prop, fullPath) ? KErrNone : KErrNoMemory;
+
+        }
+    else
+        // otherwise, aPath is fully qualified path name. Use that.
+        return iProperties.Replace(prop, aPath) ? KErrNone : KErrNoMemory;
+  
+	}
+
+TInt Wins::MapDrive(int aDrive, TDes& aBuffer) const
+//
+// Map aDrive to a path given by environment variables or defaults
+// Use this function only in WINS builds
+//
+	{
+	char drive[KMaxFileName + 1];
+	char prop[] = "_epoc_drive_?";
+	*strchr(prop, '?') = char(tolower(aDrive));
+
+	TInt len;
+	const char* val;
+	if (iProperties.GetString(prop, val) == KErrNone)
+		{
+		len = strlen(val);
+		if (len > KMaxFileName)
+			return KErrArgument;
+		strcpy(drive, val);
+		}
+	else
+		{
+		// not in properties, so check environment
+		len = GetEnvironmentVariableA(prop, drive, KMaxFileName + 1);
+		if (len > KMaxFileName)
+			return KErrArgument;
+		}
+	while (len > 0 && isspace(drive[len-1]))
+		--len;
+	if (len == 0)
+		return KErrNotFound;
+	if (drive[len-1] != '\\') // add trailing backslash
+		drive[len++] = '\\';
+	if (drive[0] == '\\')
+		{
+		// put in the emulator drive
+		TInt r = iProperties.GetString("EmulatorPath", val);
+		if (r != KErrNone)
+			return r;
+
+		memmove(drive + 2, drive, len);
+		drive[0] = val[0];
+		drive[1] = ':';
+		len += 2;
+		}
+	else if (len < 3 || drive[1] != ':' || drive[2] != '\\')
+		return KErrArgument;
+#ifdef _UNICODE
+	TUint16* aBufPtr = (TUint16*)aBuffer.Ptr();
+	const TText* drv = (const TText*)drive;
+	for(int index=0;index<len;index++)
+		*aBufPtr++ = (TUint16)*drv++;
+	aBuffer.SetLength(len<<1);
+#else
+	aBuffer.Copy(TPtrC8((const TText8*)drive,len));
+#endif
+	return KErrNone;
+	}
+
+TInt Wins::MapFilename(const TDesC& aFilename, TDes& aBuffer) const
+//
+// Map aFileName to real windows directory - aFileName must be a full filepath
+//
+	{
+
+	// if the filename does not have a drive specified then don't imagine
+	// it describes an Epoc filepath
+	// Assume it's a subdirectory/file of the file containing the emulated Z drive
+	TInt offset;
+	if (aFilename.Length() < 4 || aFilename[2] != ':')
+		{
+		TInt r = MapDrive('z', aBuffer);
+		if (r)
+			return(r);
+		aBuffer.SetLength(aBuffer.Length()-4);	// chop "Z\\"
+		offset = aFilename[0] == '\\' ? 1 : 0; // remove the guaranteed backslash
+		}
+	else
+		{
+		TInt r = MapDrive(aFilename[0], aBuffer);
+		if (r)
+			return(r);
+		if (aFilename.Length() >= 6 && aFilename[4] == '\\')
+			offset = 3;
+		else
+			offset = 2;
+		}
+#ifdef _UNICODE
+	offset = offset<<1;
+	TUint8* ptrFilename = (TUint8*)aFilename.Ptr() + offset;
+	TUint8* ptrBuffer = (TUint8*)aBuffer.Ptr()+aBuffer.Length();
+	if (aBuffer.MaxLength()<aBuffer.Length()+aFilename.Length()-offset+1)
+		return KErrBadName;
+
+	memcpy(ptrBuffer, ptrFilename, aFilename.Length()-offset);
+	aBuffer.SetLength(aBuffer.Length()+aFilename.Length()-offset);
+#else
+	TPtrC name(aFilename.Mid(offset));
+	if (aBuffer.MaxLength()<aBuffer.Length()+name.Length()+1)
+		return KErrBadName;
+	aBuffer.Append(name);
+#endif
+	return KErrNone;
+	}
+
+
+//table of the property names which can be used in multiple configurations
+const char * KConfigSpecificProperties[] =
+	{
+	"ScreenWidth",
+	"ScreenHeight",
+	"PhysicalScreenWidth",
+	"PhysicalScreenHeight",
+	"ScreenOffsetX",
+	"ScreenOffsetY",
+	"LedSize",
+	"LedArrangeVertically",
+	"LedArrangeHorizontally",
+	"LedOffsetX",
+	"LedOffsetY",
+	"LedGap",
+	"PointerType",
+	"ColorDepth",
+	"KeyMap",
+	"DrawVirtualKeys",
+	"VirtualKeyColor",
+	"VirtualKey",
+	"MouseTarget",
+	"FasciaBitmap",
+	"DigitizerOffsetX",
+	"DigitizerOffsetY",
+	"DigitizerWidth",
+	"DigitizerHeight",
+	"DisableDigitizer",
+	"DefineKeyName",
+	"WindowTitle",
+	"NoVersionInfo",
+	"OnActivation",
+	"EmulatorControl",
+	"EmulatorControlHotKey",
+	"CompositionBuffers",
+	"RefreshRateHz",
+	};
+
+const char * KScreenSpecificProperties[] =
+ 	{
+ 	"ScreenWidth",
+ 	"ScreenHeight",
+ 	"PhysicalScreenWidth",
+ 	"PhysicalScreenHeight",
+ 	"ScreenOffsetX",
+ 	"ScreenOffsetY",
+ 	"ColorDepth",
+	"FasciaBitmap",
+	"CompositionBuffers",
+	"RefreshRateHz",
+ 	};
+
+
+TBool Wins::ConfigSpecificProperty(const char * aProperty)
+	{
+	TInt x;
+	TInt count = sizeof(KConfigSpecificProperties) / sizeof(char *);
+	for (x = 0; x < count; ++x)
+		if (_stricmp(aProperty, KConfigSpecificProperties[x]) == 0)	return ETrue;
+	return EFalse;
+	}
+
+TBool Wins::ScreenSpecificProperty(const char * aProperty)
+	{
+	TInt x;
+	TInt count = sizeof(KScreenSpecificProperties) / sizeof(char *);
+	for (x = 0; x < count; ++x)
+		if (_stricmp(aProperty, KScreenSpecificProperties[x]) == 0)	return ETrue;
+	return EFalse;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/resource.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by gui.rc
+//
+#define EPOC_ICON                       102
+#define OVERKEY                         104
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        105
+#define _APS_NEXT_COMMAND_VALUE         40001
+#define _APS_NEXT_CONTROL_VALUE         1000
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/sdcard/sdcard3c/pp_sdc.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1350 @@
+// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include "plat_priv.h"
+#include <property.h>
+#include <variant.h>
+#include "pp_sdc.h" 
+
+const TInt  KDiskSectorSize=512;
+
+const TInt KTotalMDiskSize=0x100000; // 1MB (if changing this then also change CSD response)
+
+// ======== error code conversion ========
+
+GLDEF_C TInt MapLastErrorEpoc()
+//
+// map an Win32 error code to Epoc32 value
+//
+	{
+	TInt res=KErrGeneral;
+	switch (GetLastError())
+		{
+		case ERROR_SHARING_VIOLATION : res=KErrAccessDenied; break;
+		case ERROR_LOCK_VIOLATION : res=KErrLocked; break;
+		case ERROR_FILE_NOT_FOUND: res=KErrNotFound; break;
+		case ERROR_PATH_NOT_FOUND: res=KErrPathNotFound; break;
+		case ERROR_ALREADY_EXISTS:
+		case ERROR_FILE_EXISTS:
+			res=KErrAlreadyExists;
+			break;
+		case ERROR_NOT_READY: res=KErrNotReady; break;
+		case ERROR_UNRECOGNIZED_VOLUME:
+		case ERROR_NOT_DOS_DISK:
+			res=KErrUnknown;
+			break;
+		case ERROR_UNRECOGNIZED_MEDIA: res=KErrCorrupt; break;
+		case ERROR_INVALID_NAME: res=KErrBadName; break;
+		case ERROR_NO_MORE_FILES: res=KErrEof; break;
+		}
+	return(res);
+	}
+
+GLDEF_C TMMCErr MapLastErrorMmc()
+//
+// map Win32 error to a TMMCErr error.
+//
+	{
+	DWORD r=GetLastError();
+	TInt res=KErrGeneral;
+	switch (r)
+		{
+		case ERROR_SHARING_VIOLATION:
+		case ERROR_LOCK_VIOLATION:
+			res=KMMCErrLocked;			// KErrLocked
+			break;
+		case ERROR_FILE_NOT_FOUND:
+		case ERROR_PATH_NOT_FOUND:
+			res=KMMCErrNotFound;		// KErrNotFound
+			break;
+		case ERROR_ALREADY_EXISTS:
+		case ERROR_FILE_EXISTS:
+			res=KMMCErrAlreadyExists;	// KErrAlreadyExists
+			break;
+		case ERROR_NOT_READY: res=KMMCErrNoCard; break;
+		case ERROR_UNRECOGNIZED_VOLUME:
+		case ERROR_NOT_DOS_DISK:
+			res=KMMCErrGeneral;			// KErrGeneral
+			break;
+		case ERROR_UNRECOGNIZED_MEDIA:
+		case ERROR_INVALID_NAME:
+		case ERROR_NO_MORE_FILES:
+			res=KMMCErrResponseCRC; 	// KErrCorrupt
+			break;
+		}
+	return(res);
+	}
+
+// ======== DWinsSDStack ========
+
+DWinsSDStack::DWinsSDStack(TInt aBus, DMMCSocket* aSocket)
+: DSDStack(aBus, aSocket)
+	{	
+	iAddressedCard=KBroadcastToAllCards;
+//	iCMD42Failed=EFalse;
+	}
+
+
+TInt DWinsSDStack::Init()
+//
+// Allocate any resources. Only created once on kernel initialization so dont
+// worry about cleanup if it leaves.
+//
+	{
+	if((iCardArray = new TSDCardArray(this)) == NULL)
+		return KErrNoMemory;
+
+	TInt r=DMMCStack::Init();
+	if(r!=KErrNone)
+		return r;
+
+	DMediaChangeBase* pMCBase = MMCSocket()->iMediaChange;
+	static_cast<DWinsMMCMediaChange*>(pMCBase)->SetStackP(this);
+	Wins::SetMediaChangeCallBackPtr(DWinsMMCMediaChange::MediaChangeCallBack, (TAny*)pMCBase);
+
+	//
+	// Over time memory can become fragmented, and so it is not possible to
+	// allocate physically contiguous pages.  Therefore, the buffers for IO
+	// are allocated at startup.
+	//
+	// block and erase sector size characteristics depend on the specific
+	// card model, and so the initial values are estimates based on a typical
+	// card.  If these do not match the actual card's block size (or erase
+	// size, for SD,) then the media driver just gets a reduced or increased
+	// buffer area, and its efficiency varies accordingly.
+	//
+	// For the WINS implementation, fragmentation does not matter because
+	// DMA is not used.  The memory must still be allocated here so MEDMMC is
+	// able to use it.
+	//
+	// The constant calculations could be folded, but this illustrates how the
+	// values are derived.
+	//
+
+	// MMC - values from Hitachi 16Mb card, datasheet HB288016MM1
+
+	// minor buffer must contain enough space for MBR or block
+	const TUint mmcBlkSzLog2 = 9;				// READ_BLK_LEN and WRITE_BLK_LEN
+	const TUint mmcBlkSz = 1 << mmcBlkSzLog2;
+	const TInt mmcMinorBufLen = Max(KDiskSectorSize, mmcBlkSz);
+
+	const TInt KMinMMCBlocksInBuffer = 8;
+	const TInt mmcCchBufLen = KMinMMCBlocksInBuffer << mmcBlkSzLog2;
+
+	const TInt mmcTotalBufLen = mmcMinorBufLen + mmcCchBufLen;
+
+	// SDCard - values from 64Mb Panasonic RP-SD064
+
+	const TUint sdBlkSzLog2 = 9;				// READ_BL_LEN and WRITE_BLK_LEN
+	const TUint sdBlkSz = 1 << sdBlkSzLog2;
+	const TInt sdMinorBufLen = Max(KDiskSectorSize, sdBlkSz);
+
+	const TUint ss = 0x1f;						// SECTOR_SIZE, add 1 for sector count
+	const TInt KMinSDBlocksInBuffer = 8;
+	const TInt sdCchBufLen = Max(KMinSDBlocksInBuffer, ss + 1) << sdBlkSzLog2;
+
+	const TInt sdTotalBufLen = sdMinorBufLen + sdCchBufLen;
+
+	const TInt totalBufLen = Max(mmcTotalBufLen, sdTotalBufLen);
+
+	iMDBuf = reinterpret_cast<TUint8*>(Kern::Alloc(totalBufLen));
+	iMDBufLen = totalBufLen;
+
+	// initialize each card on the stack
+	TInt i;
+	for (i = 0; i < KTotalWinsCards; ++i)
+		{
+		TInt r = SetupSimulatedCard(i);
+		if (r != KErrNone)
+			return r;
+		}
+
+	// initialize pointers to currently present cards
+
+	// Slot zero can toggle between no card; card 0 and card 1.  The current state is
+	// determined by *Wins::CurrentPBusDevicePtr() and toggled by pressing F4 when F5
+	// (door open) is held down.  Because this function is only executed at startup,
+	// assume start with card zero.
+	iCardInfo[0] = iCardPool[0];
+	for (i = 1; i < KTotalWinsCardSlots; ++i)
+		{
+		iCardInfo[i]=iCardPool[i+1];
+		}
+
+	return KErrNone;
+	}
+
+void DWinsSDStack::MachineInfo(TMMCMachineInfo& aMachineInfo)
+	{
+	aMachineInfo.iTotalSockets=KTotalWinsCardSlots;
+	aMachineInfo.iTotalMediaChanges=0;  		// Not used at present
+	aMachineInfo.iTotalPrimarySupplies=0;		// Not used at present
+
+	aMachineInfo.iSPIMode=EFalse;
+    aMachineInfo.iBaseBusNumber=0;
+
+	__ASSERT_DEBUG(aMachineInfo.iTotalSockets<=KMaxMMCardsPerStack,
+					DWinsSDStack::Panic(DWinsSDStack::EWinsMMCBadMachineInfo));
+	}
+
+void DWinsSDStack::AdjustPartialRead(
+#ifdef _DEBUG
+	const TMMCard* aCard,
+#else
+	const TMMCard* /*aCard*/,
+#endif
+	TUint32 aStart, TUint32 aEnd, TUint32* aPhysStart, TUint32* aPhysEnd) const
+	{
+#ifdef _DEBUG
+	const TUint32 blkLen = aCard->CSD().ReadBlockLength();
+	const TUint32 blkMsk = blkLen - 1;
+
+	__ASSERT_DEBUG(aCard->CSD().ReadBlPartial(), Panic(EWinsMMCAPRNotSupp));
+	__ASSERT_DEBUG(aEnd - aStart <= blkLen, Panic(EWinsMMCAPRRange));
+	__ASSERT_DEBUG((aEnd & ~blkMsk) > (aStart & ~blkMsk), Panic(EWinsMMCAPRBoundary));
+#endif
+
+	*aPhysStart = aStart & ~0x3;
+	*aPhysEnd = (aEnd + 0x3) & ~0x3;
+	}
+
+void DWinsSDStack::GetBufferInfo(TUint8** aMDBuf, TInt* aMDBufLen)
+	{
+	*aMDBuf = iMDBuf;
+	*aMDBufLen = iMDBufLen;
+	}
+
+void DWinsSDStack::Panic(TWinsMMCPanic aPanic)
+	{
+	_LIT(KPncNm,"PBUS-MMCSD-WINS");
+	Kern::PanicCurrentThread(KPncNm,aPanic);
+	}
+
+TInt DWinsSDStack::SetupSimulatedCard(TInt aCardNum)
+//
+// allocate individual card with Win32 file.  Only called at bootup, so no cleanup if fails.
+//
+	{
+	TWinsCardInfo* cip = new TWinsCardInfo;
+	if (cip == 0)
+		return KErrNoMemory;
+
+	TUint8 cid[KMMCCIDLength];
+	cid[0] = 'C';
+	cid[1] = 'I';
+	cid[2] = 'D';
+	cid[3] = TUint8('0' + aCardNum);
+	TInt j;
+	for (j = 4; j < KMMCCIDLength - 1; ++j)
+		cid[j] = 'c';
+	cid[KMMCCIDLength - 1] = '#';				// '#' = 0x23, bit zero must be 1
+	cip->iCID=cid;
+
+	cip->iPWD = new TMediaPassword;
+	if (! cip->iPWD)
+		{
+		delete cip;
+		return KErrNoMemory;
+		}
+
+	// cards in slot zero are SD
+	TInt mediaAreas;
+	if (aCardNum <= 1)
+		{
+		cip->iIsSDCard = ETrue;
+		mediaAreas = 2;
+		}
+	else
+		{
+		cip->iIsSDCard = EFalse;
+		mediaAreas = 1;
+		}
+
+	cip->iState=ECardStateIdle;
+
+	for (TInt area = 0; area < mediaAreas; ++area)
+		{
+		TInt r = CreateBinFileForCard(aCardNum, area, &cip->iAreaHandles[area]);
+		if (r != KErrNone)
+			return r;
+		}
+	iCardPool[aCardNum]=cip;
+	return(KErrNone);
+	}
+
+TInt DWinsSDStack::CreateBinFileForCard(TInt aCardNum, TInt aAreaNum, HANDLE* aHandle)
+//
+// create .bin file in temp directory to contain media area of card.
+//
+	{
+	const char* emulatorPath = Property::GetString("EmulatorMediaPath");
+	if (!Emulator::CreateAllDirectories(emulatorPath))
+		return Emulator::LastError();
+
+	TBuf8<KMaxFileName> fn8(_L8(emulatorPath));
+	fn8.Append(_L8("MMCCRD"));
+	fn8.AppendNum(aCardNum);
+	fn8.Append('A'+aAreaNum);
+	fn8.Append(_L8(".BIN"));
+	fn8.Append('\0');
+
+	*aHandle = CreateFileA(
+		(LPCSTR) fn8.Ptr(),					// LPCSTR lpFileName,
+		GENERIC_READ | GENERIC_WRITE,		// DWORD dwDesiredAccess
+		FILE_SHARE_READ | FILE_SHARE_WRITE,	// DWORD dwShareMode
+		NULL,								// LPSECURITY_ATTRIBUTES lpSecurityAttributes
+		OPEN_ALWAYS,						// DWORD dwCreationDisposition
+		FILE_FLAG_RANDOM_ACCESS,			// DWORD dwFlagsAndAttributes
+		NULL);								// HANDLE hTemplateFile
+
+	if (*aHandle == INVALID_HANDLE_VALUE)
+	    return MapLastErrorEpoc();
+	
+	if (	SetFilePointer(*aHandle, KTotalMDiskSize, NULL, FILE_BEGIN) == 0xffffffffu
+		||	! SetEndOfFile(*aHandle) )
+		{
+		CloseHandle(*aHandle);
+	    return MapLastErrorEpoc();
+		}
+
+	return KErrNone;
+	}
+
+void DWinsSDStack::SetBusConfigDefaults(TMMCBusConfig& aConfig, TUint aClock)
+	{
+	const TUint KWinsMaxHwInterfaceClk=104000;
+	const TUint KWinsResponseTimeOut=6400;
+	const TUint KWinsDataTimeOut=40000;
+	const TUint KWinsBusyTimeOut=200000;
+
+	aConfig.iBusClock = (aClock > KWinsMaxHwInterfaceClk) ? KWinsMaxHwInterfaceClk : aClock;
+	aConfig.iResponseTimeOut=KWinsResponseTimeOut;
+	aConfig.iDataTimeOut=KWinsDataTimeOut;
+	aConfig.iBusyTimeOut=KWinsBusyTimeOut;
+	}
+
+void DWinsSDStack::InitClockOff()
+	{
+	// empty.
+	}
+
+void DWinsSDStack::ASSPReset()
+	{
+	// empty.
+	}
+
+void DWinsSDStack::ASSPDisengage()
+	{
+	// empty.
+	}
+
+void DWinsSDStack::DoPowerDown()
+	{
+	// empty.
+	}
+
+
+LOCAL_C TInt SetMediaPasswordEnvironmentVar(TInt aSocketNum,TInt aCardNum,const TDesC8& aPasswd)
+// 
+// Set the password for local drive 'aLocalDrive', card number 'aCardNum' to 'aPasswd' - as an
+// environment variable. Note that the card number is only relevant where the emulated drive
+// supports card hot-swapping (i.e. F4 whilst F5 is held down).
+//
+	{
+	// Setup the appropriate environment variable string '_EPOC_LocDrv_<locDrvNum>_PWORD_<cardNum>'
+	TUint16 envVar[]=L"_EPOC_Socket_X_PWORD_Y";
+
+	envVar[13]=(TUint16)('0'+aSocketNum);
+	envVar[21]=(TUint16)('0'+aCardNum);
+	
+	// Setup the new value of the environment variable
+	TUint16	envVal[100];
+	TInt len=aPasswd.Length();
+
+	// the password may be empty if a card's password is cleared
+	if (len>(100-1))
+		return(KErrArgument);
+	memcpy(&envVal[0],reinterpret_cast<const TUint16 *>(aPasswd.Ptr()),len);
+	envVal[len>>1]='\0';
+
+	// Now set the new value for the environment variable
+	if (SetEnvironmentVariable(envVar,&envVal[0]))
+		return(KErrNone);
+
+	return KErrGeneral;
+	}
+
+LOCAL_C TInt MediaPasswordEnvironmentVar(TInt aSocketNum,TInt aCardNum,TDes8& aPasswd)
+// 
+// Get the password for local drive 'aLocalDrive', card number 'aCardNum' into 'aPasswd' - from
+// an environment variable. Note that the card number is only relevant where the emulated drive
+// supports card hot-swapping (i.e. F4 whilst F5 is held down).
+//
+	{
+	TUint16 envVar[]=L"_EPOC_Socket_X_PWORD_Y";
+
+	envVar[13]=(TUint16)('0'+aSocketNum);
+	envVar[21]=(TUint16)('0'+aCardNum);
+	
+	TUint16 envVal[100];	// To hold the value of the retreived environment variable
+	
+	DWORD len=GetEnvironmentVariable(envVar,&envVal[0],100);
+	if (len>(TUint)100)
+		return(KErrGeneral);
+	if (len)
+		{
+		// Found the requested environment variable so there is a password for this local drive / card. 
+		if ((len<<1)<=KMaxMediaPassword)
+			{
+			aPasswd.FillZ(KMaxMediaPassword);
+			aPasswd.Zero();
+			aPasswd.Copy(reinterpret_cast<TUint8*>(&envVal[0]),len<<1);
+			return(KErrNone);	
+			}
+		else	
+			return(KErrGeneral);	
+		}
+
+	return(KErrNotFound);
+	}
+
+TMMCErr DWinsSDStack::DoPowerUpSM()
+	{
+	enum states
+		{
+		EStBegin=0,
+		EStEnd
+		};
+
+	SMF_BEGIN
+
+		if(MMCSocket()->iVcc->SetState(EPsuOnCurLimit) != KErrNone)
+			return KMMCErrHardware;
+
+		for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+			{
+			// if card has a password, it will be locked on power up
+			TInt cardNum = (i==0) ? *Wins::CurrentPBusDevicePtr() : i;
+			if (	cardNum >= 0
+				&&	MediaPasswordEnvironmentVar(
+						MMCSocket()->iSocketNumber, cardNum, *(iCardInfo[i]->iPWD))
+					==	KErrNone)
+				{
+				iCardInfo[i]->iIsLocked = (iCardInfo[i]->iPWD->Length() > 0);
+				}
+			else	
+				iCardInfo[i]->iIsLocked=EFalse;
+
+			iCardInfo[i]->iState = ECardStateIdle;
+			iCardInfo[i]->iRCA=0x0001;		// Default RCA - spec 2.2, s4.2.1, 5.4
+			}
+
+		ReportPowerUp();
+
+	SMF_END
+	}
+
+TMMCErr DWinsSDStack::InitClockOnSM()
+	{
+	enum states
+		{
+		EStBegin=0,
+		EStEnd
+		};
+	SMF_BEGIN
+
+	SMF_END
+	}
+
+void DWinsSDStack::AddressCard(TInt aCardNumber)
+	{
+	iAddressedCard = aCardNumber;
+	}
+
+
+TInt DWinsSDStack::GetTargetSlotNumber(const TRCA& anRCA)
+//
+// when the controller is given a command with an embedded RCA, this function
+// works out which physical card slot it corresponds to.  If no card has been
+// assigned the RCA then it returns -1.
+//
+	{
+	TInt targetIdx = -1;
+
+	for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+		{
+		if (iCardInfo[i]->iRCA==anRCA)
+			{
+			targetIdx=i;
+			break;
+			}
+		}
+
+	return(targetIdx);
+	}
+
+TMMCErr DWinsSDStack::IssueMMCCommandSM()
+	{
+	enum states
+		{
+		EStBegin=0,
+		EStEnd
+		};
+
+	TMMCCommandDesc& cmd = Command();
+
+	// If the command contains an embedded RCA then extract it	
+	TRCA tgtRCA=0;
+	TBool supRCA=EFalse;
+	if (/*cmd.iCommand == ECmdSetRelativeAddr	||	*/cmd.iCommand == ECmdSelectCard
+	||	cmd.iCommand == ECmdSendCSD			||	cmd.iCommand == ECmdSendCID
+	||	cmd.iCommand == ECmdSendStatus		||	cmd.iCommand == ECmdGoInactiveState
+	||	cmd.iCommand == ECmdFastIO 			||  cmd.iCommand == ECmdAppCmd )
+		{
+		if ((cmd.iArgument >> 16) != 0)
+			{
+			supRCA=ETrue;
+			tgtRCA=TUint16(cmd.iArgument >> 16);
+			}
+		}
+
+	// if the card contains an embedded RCA, work out which slot it corresponds to.
+	// At the end of the function, this card is used to generate the R1 response.
+	// Assume that if rca is supplied it either corresponds to the selected card or
+	// broadcast mode is on.  (An exception is CMD7 with arg0 to deselect all cards.)
+
+	TInt targetCard = supRCA ? GetTargetSlotNumber(tgtRCA) : iAddressedCard;
+	TBool rto = EFalse;							// response timeout
+
+	// if try to access card zero has been set to holding no card via F5 / F4 then timeout.
+	if ((targetCard == 0) && *Wins::CurrentPBusDevicePtr() < 0)
+		return KMMCErrResponseTimeOut;
+	
+	HANDLE winHandle;
+
+	// CMD42 is a data transfer command.  That means the R1 response that it returns
+	// immediately is the state it is in on receiving the data block, and not after
+	// processing it.  If the data block is invalid then LOCK_UNLOCK_FAILED will be
+	// set in the R1 response which is sent in reply to the next command.
+
+	TBool nextCMD42Failed = EFalse;
+	TBool lock_unlock_failed=EFalse;
+
+	// When the card is locked, it will only respond to basic command class (0) and
+	// lock card command class (7).  An exception is CMD16.  This is sent before CMD42,
+	// but is classified (MMC Spec 23.2, table 5) as belonging to classes 2 and 4.
+	// For data transfer commands, LOCK_UNLOCK_FAIL is set in response to the following
+
+	TMMCCommandEnum origCmd = cmd.iCommand;
+
+	// if targetting locked card...
+	if (targetCard != KBroadcastToAllCards && iCardInfo[targetCard]->iIsLocked)
+		{
+		// ...and not command used in init or CMD42 sequence...
+		if (!(	((cmd.iSpec.iCommandClass & (KMMCCmdClassApplication | KMMCCmdClassBasic | KMMCCmdClassLockCard)) != 0)
+			||	(cmd.iCommand == ECmdSetBlockLen) || (cmd.iCommand == ECmdAppCmd) ))
+			{
+			lock_unlock_failed = ETrue;
+			cmd.iCommand = (TMMCCommandEnum) -1;	// skip case processing
+			}
+		}
+
+	SMF_BEGIN
+
+	switch (cmd.iCommand)
+		{
+		case ECmdGoIdleState:	// CMD0
+			if (iAddressedCard != KBroadcastToAllCards)
+				iCardInfo[iAddressedCard]->iState = ECardStateIdle;
+			else
+				{
+				for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+					iCardInfo[i]->iState = ECardStateIdle;
+				}
+			break;
+
+		case ECmd41:
+		case ECmdSendOpCond:	// CMD1
+			{
+			if (iAddressedCard != KBroadcastToAllCards)
+				iCardInfo[iAddressedCard]->iState = ECardStateReady;
+			else
+				{
+				for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+					iCardInfo[i]->iState = ECardStateReady;
+				}
+
+			// bit31 is set to indicate cards are not still powering up
+			TUint32 r3 = KMMCWinsCardOCRValue | KMMCOCRBusy;
+			TMMC::BigEndian4Bytes(cmd.iResponse, r3);
+			}
+			break;
+
+		case ECmdAllSendCID:	// CMD2
+			{
+			TInt idx;
+			if (iAddressedCard != KBroadcastToAllCards)
+				{
+				idx = iAddressedCard;
+				__ASSERT_DEBUG(
+					iCardInfo[iAddressedCard]->iState == ECardStateReady,
+					DWinsSDStack::Panic(DWinsSDStack::EStkIMCBadStateCmd2));
+				}
+			else
+				idx = FindAnyCardInStack(ECardStateReady);
+
+			if (idx == -1)
+				rto = ETrue;
+			else
+				{
+				iCardInfo[idx]->iCID.Copy(cmd.iResponse);
+				iCardInfo[idx]->iState = ECardStateIdent;
+				}
+			}
+			break;
+
+		case ECmdSetRelativeAddr:	// CMD3
+			{
+			TInt idx;
+			if (iAddressedCard != KBroadcastToAllCards)
+				{
+				__ASSERT_DEBUG(
+					iCardInfo[iAddressedCard]->iState == ECardStateIdent,
+					DWinsSDStack::Panic(DWinsSDStack::EStkIMCBadStateCmd3));
+				
+				if (iCardInfo[iAddressedCard]->iIsSDCard)
+					{
+					static TUint16 RCACounter = 0x1234;
+					// SD Cards publish RCAs
+					++RCACounter;
+					iCardInfo[iAddressedCard]->iRCA = RCACounter;
+					iCardInfo[iAddressedCard]->iState = ECardStateStby;
+					TUint32 r6 = TUint32(RCACounter) << 16;
+					TMMC::BigEndian4Bytes(&cmd.iResponse[0],r6); // Ignore bits 47-40
+					}
+				else
+					{
+					iCardInfo[iAddressedCard]->iRCA = TUint16(cmd.iArgument >> 16);
+					iCardInfo[iAddressedCard]->iState=ECardStateStby;
+					}
+				}
+			else
+				{
+				// MultiMediaCards are assigned RCAs
+				idx = FindOneCardInStack(ECardStateIdent);
+				iCardInfo[iAddressedCard]->iRCA = TUint16(cmd.iArgument >> 16);
+				iCardInfo[iAddressedCard]->iState=ECardStateStby;
+				targetCard = iAddressedCard;
+				}
+			}
+			break;
+
+		case ECmd6:
+			// if ACMD6 then change bus width
+			if (cmd.iSpec.iCommandClass == KMMCCmdClassApplication)
+				{
+				switch (cmd.iArgument)
+					{
+				case 0x00:
+					iCardInfo[iAddressedCard]->iBusWidth = 1;
+					break;
+				case 0x02:
+					iCardInfo[iAddressedCard]->iBusWidth = 4;
+					break;
+				default:
+					DWinsSDStack::Panic(DWinsSDStack::EStkIMCCmd6InvalidWidth);
+					break;
+					}
+				}
+			break;
+
+		case ECmdSelectCard:		// CMD7
+			{
+			// switch to broadcast mode so the currently selected and new cards
+			// receive the command simultaneously.
+
+			TInt idx = FindAnyCardInStack(ECardStateTran);
+			if (idx != -1)
+				iCardInfo[idx]->iState = ECardStateStby;
+			if ((iAddressedCard=targetCard) == KBroadcastToAllCards)
+				rto = ETrue;
+			else
+				{
+				iCardInfo[targetCard]->iState = ECardStateTran;
+				targetCard = targetCard;
+				}
+			}
+			break;
+
+		case ECmdSendStatus:
+			// R1 response so status return as for any other R1 command.
+			if (cmd.iSpec.iCommandClass == KMMCCmdClassApplication)
+				{
+				__ASSERT_DEBUG(
+					iCardInfo[targetCard]->iIsSDCard,
+					DWinsSDStack::Panic(DWinsSDStack::EStkICMACMD13NotSD));
+
+				memset(cmd.iDataMemoryP, 0, KSDStatusBlockLength);
+				if (iCardInfo[targetCard]->iBusWidth == 1)
+					cmd.iDataMemoryP[0] = 0x00 << 6;
+				else	// if (iCardInfo[targetCard]->iBusWidth == 4)
+					cmd.iDataMemoryP[0] = 0x02 << 6;
+				cmd.iDataMemoryP[7] = 0x28;		// PROTECTED_AREA_SIZE
+				}
+			break;
+
+		case ECmdReadSingleBlock:
+		case ECmdReadMultipleBlock:
+			{
+			winHandle=iCardInfo[targetCard]->iAreaHandles[KSDUserArea];
+
+			if ( cmd.iSpec.iUseStopTransmission && cmd.iBlockLength >= cmd.iTotalLength)
+				return( KMMCErrNotSupported );
+
+    		TMMCErr err;
+			TInt pos = cmd.iArgument;
+    		if (SetFilePointer(winHandle,pos,NULL,FILE_BEGIN)==0xffffffffu)
+        		err=MapLastErrorMmc();
+    		else
+        		{
+	    		DWORD res;
+				TInt len = cmd.iTotalLength;
+		        if (ReadFile(winHandle,(TAny*)cmd.iDataMemoryP,len,&res,NULL)==FALSE)
+                    err=MapLastErrorMmc();
+                else if (res!=(DWORD)len)
+                    err=KMMCErrGeneral;
+                else
+                    err=KMMCErrNone;
+				}
+			if (err!=KMMCErrNone)
+				return(err);
+			break;
+			}
+
+		case ECmd22:
+			if (cmd.iSpec.iCommandClass == KMMCCmdClassApplication)
+				{
+				TMMC::BigEndian4Bytes(cmd.iResponse, iMBWOKBlocks);
+				}
+			break;
+		// ------------------------------------------------------------------
+		case ECmdWriteBlock:
+		case ECmdWriteMultipleBlock:
+			{
+			TUint32 writeLen;
+
+			// periodically fail multi-block writes to test ACMD22 error recovery
+			if (cmd.iCommand != ECmdWriteMultipleBlock)
+				writeLen = cmd.iTotalLength;
+			else
+				{
+				const TInt KMaxFailCnt = 4;
+				static TInt failCnt = 0;
+				const TInt KMaxFailBlock = 4;
+				static TInt failBlocks = 0;
+				
+				failCnt = (failCnt + 1) % KMaxFailCnt;
+				if (failCnt != 0)
+					writeLen = cmd.iTotalLength;
+				else
+					{
+					failBlocks = (failBlocks + 1) % KMaxFailBlock;
+					
+					// fail at least one block
+					TInt totalBlocks = cmd.iTotalLength / cmd.iBlockLength;
+					TInt blocksToFail = Min(failBlocks + 1, totalBlocks);	// fail at least one block
+					iMBWOKBlocks = (totalBlocks - blocksToFail);
+					writeLen = iMBWOKBlocks * cmd.iBlockLength;
+					if (writeLen == 0)
+						return KMMCErrDataTimeOut;
+					}
+				}
+			
+			HANDLE h=iCardInfo[targetCard]->iAreaHandles[KSDUserArea];
+
+    		TMMCErr err;
+			TInt pos = cmd.iArgument;
+    		if (SetFilePointer(h, pos, NULL, FILE_BEGIN)==0xffffffffu)
+        		err = MapLastErrorMmc();
+    		else
+        		{
+	    		DWORD res;
+				if (! WriteFile(h, (LPCVOID)cmd.iDataMemoryP,writeLen,&res,NULL))
+                    err=MapLastErrorMmc();
+                else if (res!=(DWORD)writeLen)
+                    err=KMMCErrGeneral;
+                else
+                    err=KMMCErrNone;
+				}
+
+			if (err!=KMMCErrNone)
+				return(err);
+			if (writeLen != cmd.iTotalLength)
+				return KMMCErrDataTimeOut;
+			}
+			break;
+
+		case ECmdAppCmd:
+			// targetCard == -1 when ACMD41 being sent because not yet supplied
+			if (iAddressedCard != KBroadcastToAllCards)
+				{
+				// timeout if addressed card is not SD
+				if (! iCardInfo[iAddressedCard]->iIsSDCard)
+					rto = ETrue;
+				}
+			else
+				{
+				// request sent to specific non-SD card
+				if (targetCard != -1 && ! iCardInfo[targetCard]->iIsSDCard)
+					rto = ETrue;
+				}
+			break;
+
+		case ECmdSendCSD:
+			{
+			iCardInfo[targetCard]->GetCSD(cmd.iResponse);
+			break;
+			}
+
+		// ------------------------------------------------------------------
+		case ECmdLockUnlock:
+			// in EPOC, Lock() does not actually lock the card.  It just sets the
+			// password.  This means that the card is still accessible to the user,
+			// but must be unlocked the next time it is powered up.
+
+			// a real card will transiently go into rcv and prg state while processing
+			// this command.  When finished, it will fall back into tran state.
+			// The R1 response is sent immediately after CMD42.  CIMReadWriteBlocksSM()
+			// sends CMD13 to find out whether or not LOCK_UNLOCK_FAIL was set.
+
+			// the asserts in this case protect against invalid data being sent from the
+			// media driver.  A real card would fail these corrupt data blocks.
+
+			{
+			const TInt8 cmd_byte(*cmd.iDataMemoryP);
+			__ASSERT_DEBUG(										// ensure not CLR_PWD && SET_PWD
+				!((cmd_byte & KMMCLockUnlockClrPwd) && (cmd_byte & KMMCLockUnlockSetPwd)),
+				DWinsSDStack::Panic(DWinsSDStack::EWinsMMCCorruptCommand) );
+			
+			__ASSERT_DEBUG(										// not actually lock a card while setting the password
+				((cmd_byte & (KMMCLockUnlockLockUnlock | KMMCLockUnlockSetPwd)) != (KMMCLockUnlockLockUnlock | KMMCLockUnlockSetPwd)),
+				DWinsSDStack::Panic(DWinsSDStack::EWinsMMCLockAttempt) );
+
+			if (cmd_byte & KMMCLockUnlockErase)					// ERASE (not supported)
+				return KMMCErrNotSupported;
+
+			const TInt8 pwd_len = *(cmd.iDataMemoryP + 1);
+			const TPtrC8 pwd(cmd.iDataMemoryP + 2, pwd_len);
+
+			if ((cmd_byte & KMMCLockUnlockClrPwd) != 0)			// CLR_PWD == 1
+				{
+				__ASSERT_DEBUG(
+					pwd_len >= 0 && pwd_len <= KMaxMediaPassword,
+					DWinsSDStack::Panic(DWinsSDStack::EWinsMMCCorruptCommand));
+
+				if (iCardInfo[targetCard]->iIsLocked)						// clear when locked
+					nextCMD42Failed = ETrue;
+				else														// clear when unlocked
+					{
+					if (iCardInfo[targetCard]->iPWD->Compare(pwd) != 0)		// clear when unlocked with wrong password
+						{
+						nextCMD42Failed = ETrue;
+						lock_unlock_failed = ETrue;
+						}
+					else													// clear when unlocked with right password
+						{
+						// Clear from password store 
+						iCardInfo[targetCard]->iPWD->Zero();
+						iCardInfo[targetCard]->iIsLocked = EFalse;
+						nextCMD42Failed = EFalse;
+						
+						// Clear from environment settings
+						TInt cardNum=(targetCard==0) ? *Wins::CurrentPBusDevicePtr() : targetCard; // Can't be -1 at this stage
+						SetMediaPasswordEnvironmentVar(MMCSocket()->iSocketNumber,cardNum,*(iCardInfo[targetCard]->iPWD));
+						}
+					}
+				}
+			else if ((cmd_byte & KMMCLockUnlockSetPwd) == 0)	// SET_PWD == 0: unlock
+				{
+				__ASSERT_DEBUG(
+					pwd_len >= 0 && pwd_len <= KMaxMediaPassword,
+					DWinsSDStack::Panic(DWinsSDStack::EWinsMMCCorruptCommand) );
+				
+				if (! iCardInfo[targetCard]->iIsLocked)						// unlock when unlocked
+					nextCMD42Failed = ETrue;
+				else
+					{
+					if (iCardInfo[targetCard]->iPWD->Compare(pwd) != 0)		// unlock when locked with wrong password
+						{
+						nextCMD42Failed = ETrue;
+						lock_unlock_failed = ETrue;
+						}
+					else													// unlock when locked with right password
+						{
+						iCardInfo[targetCard]->iIsLocked = EFalse;
+						nextCMD42Failed = EFalse;
+						}
+					}
+				}
+			else  if ((cmd_byte & KMMCLockUnlockSetPwd) == KMMCLockUnlockSetPwd)	// SET_PWD == 1
+				{
+				__ASSERT_DEBUG(
+					cmd_byte & KMMCLockUnlockSetPwd,
+					DWinsSDStack::Panic(DWinsSDStack::EWinsMMCCorruptCommand) );
+
+				// if pwd_len < iCardInfo[targetCard]->iPWD->Length() then data block must be invalid.
+				// This can be caused by bad user input rather than inaccurate formation.
+				if (!(	pwd_len >= iCardInfo[targetCard]->iPWD->Length()
+					&&	pwd_len <= iCardInfo[targetCard]->iPWD->Length() + KMaxMediaPassword ))
+					{
+					nextCMD42Failed = ETrue;
+					}
+				else
+					{
+					const TInt old_pwd_len = iCardInfo[targetCard]->iPWD->Length();
+					TPtrC8 old_pwd(cmd.iDataMemoryP + 2, old_pwd_len);
+					TPtrC8 new_pwd(cmd.iDataMemoryP + 2 + old_pwd_len, pwd_len - old_pwd_len);
+
+					// card must not be locked and supplied current password must be correct
+					if (iCardInfo[targetCard]->iIsLocked || iCardInfo[targetCard]->iPWD->Compare(old_pwd) != 0)
+						{
+						nextCMD42Failed = ETrue;
+						lock_unlock_failed = ETrue;
+						}
+					else
+						{
+						// Set in password store
+						iCardInfo[targetCard]->iPWD->Copy(new_pwd);
+						nextCMD42Failed = EFalse;
+						
+						// Set in environment settings
+						TInt cardNum=(targetCard==0) ? *Wins::CurrentPBusDevicePtr() : targetCard; // Can't be -1 at this stage
+						SetMediaPasswordEnvironmentVar(MMCSocket()->iSocketNumber,cardNum,*(iCardInfo[targetCard]->iPWD));
+						}
+					}
+				}
+			else  if ((cmd_byte & KMMCLockUnlockLockUnlock) == KMMCLockUnlockLockUnlock)
+				{
+				__ASSERT_DEBUG(
+					pwd_len >= 0 && pwd_len <= KMaxMediaPassword,
+					DWinsSDStack::Panic(DWinsSDStack::EWinsMMCCorruptCommand) );
+				
+				if (iCardInfo[targetCard]->iIsLocked)						// lock when locked
+					nextCMD42Failed = ETrue;
+				else
+					{
+					if (iCardInfo[targetCard]->iPWD->Compare(pwd) != 0)		// lock with wrong password
+						{
+						nextCMD42Failed = ETrue;
+						lock_unlock_failed = ETrue;
+						}
+					else													// lock with right password
+						{
+						iCardInfo[targetCard]->iIsLocked = ETrue;
+						nextCMD42Failed = EFalse;
+						}
+					}
+				}
+			else
+				{
+				__ASSERT_DEBUG(EFalse, DWinsSDStack::Panic(DWinsSDStack::EWinsMMCLockAttempt) );
+				}
+			}	// case ECmdLockUnlock
+		// ------------------------------------------------------------------
+		default:
+			break;
+		}
+
+	if (rto)
+		return(KMMCErrResponseTimeOut);
+
+	cmd.iCommand = origCmd;
+	// If this is an R1 or R1b response type command then return card status as a response
+	if (	targetCard != -1
+		&&	(cmd.iSpec.iResponseType==ERespTypeR1 || cmd.iSpec.iResponseType==ERespTypeR1B) )
+		{
+		TUint32 resp(
+				iCardInfo[targetCard]->iState
+			|	((iCardInfo[targetCard]->iIsLocked ? 1 : 0) << 25)
+			|	((lock_unlock_failed ? 1 : 0) << 24) );
+
+		if (iCMD42Failed)								// previous CMD42
+			{
+			resp |= KMMCStatErrLockUnlock;
+			nextCMD42Failed = EFalse;
+			}
+		iCMD42Failed = nextCMD42Failed;
+		TMMC::BigEndian4Bytes(&cmd.iResponse[0],resp); // Ignore bits 47-40
+		}
+	SMF_END
+	}
+
+TMMCErr DWinsSDStack::ModifyCardCapabilitySM()
+//
+// This function provides a chance to modify the capability of paticular cards.
+// Licensee may overide this function to modify certain card's capability as needed.
+// A state machine is needed in derived function and function of base class should be
+// called in order to act more generic behaviour.
+//
+    {
+		enum states
+			{
+			EStBegin=0,
+			EStDone,
+			EStEnd
+			};
+
+    SMF_BEGIN
+
+		SMF_INVOKES( DSDStack::BaseModifyCardCapabilitySMST, EStDone )
+
+    SMF_STATE(EStDone)
+
+    SMF_END
+    }
+
+TInt DWinsSDStack::FindAnyCardInStack(TMMCardStateEnum aState)
+//
+// first first active card in supplied state.  Return -1 if
+// no active card is in supplied state.
+//
+	{
+	if (iAddressedCard != KBroadcastToAllCards)
+		return (iCardInfo[iAddressedCard]->iState == aState) ? iAddressedCard : -1;
+	else
+		{
+		for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+			{
+			if (iCardInfo[i]->iState == aState)
+				return i;
+			}
+
+		return -1;
+		}
+	}
+
+TInt DWinsSDStack::FindFirstCardInStack(TMMCardStateEnum aState)
+//
+// find card which is active on bus and in supplied state.
+// There can be more than one active card in the the supplied state,
+// but there should be at least one.
+//
+	{
+	if (iAddressedCard != KBroadcastToAllCards)
+		{
+		__ASSERT_DEBUG(iCardInfo[iAddressedCard]->iState == aState, DWinsSDStack::Panic(DWinsSDStack::EStkFFCNotSelCard));
+		return iAddressedCard;
+		}
+	else
+		{
+		TInt idx = -1;
+		for (TInt i = 0; idx != -1 && i < KTotalWinsCardSlots; ++i)
+			{
+			if (iCardInfo[i]->iState == aState)
+				idx = i;
+			}
+
+		__ASSERT_DEBUG(idx != -1, DWinsSDStack::Panic(DWinsSDStack::EStkFFCNoneSel));
+		return idx;
+		}
+	}
+
+TInt DWinsSDStack::FindOneCardInStack(TMMCardStateEnum aState)
+//
+// find card which is active on bus and in supplied state.
+// There should be exactly one active card in the supplied state.
+//
+	{
+	if (iAddressedCard != KBroadcastToAllCards)
+		{
+		__ASSERT_DEBUG(iCardInfo[iAddressedCard]->iState == aState, DWinsSDStack::Panic(DWinsSDStack::EStkFOCNotSelCard));
+		return iAddressedCard;
+		}
+	else
+		{
+		TInt idx = -1;
+		for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+			{
+			if (iCardInfo[i]->iState == aState)
+				{
+				__ASSERT_DEBUG(idx == -1, DWinsSDStack::Panic(DWinsSDStack::EStkFOCMultiSel));
+				idx = i;
+				}
+			}
+
+		__ASSERT_DEBUG(idx != -1, DWinsSDStack::Panic(DWinsSDStack::EStkFOCNoneSel));
+		return idx;
+		}
+	}
+
+
+// ======== DWinsMMCMediaChange ========
+
+#pragma warning( disable : 4355 )	// this used in initializer list
+DWinsMMCMediaChange::DWinsMMCMediaChange(TInt aMediaChangeNum)
+	: DMMCMediaChange(aMediaChangeNum),
+      iDoorClosedCount(0),
+	  iMediaChangeEnable(ETrue),
+	  iStackP(NULL)
+	{
+	iMediaDoorCloseReload=2; 	// Units: In theory-20ms, Actual-100ms
+	}
+#pragma warning( default : 4355 )
+
+TInt DWinsMMCMediaChange::Create()
+//
+// Initialiser.
+//
+	{	
+	return(DMediaChangeBase::Create());
+	}
+
+void DWinsMMCMediaChange::DoorOpenService()
+//
+// Handle the media change (this function, never postponed is called on media
+// change interrupt). 
+//
+	{
+	Disable();		// Disable interrupt until door closes again.
+	iDoorOpenDfc.Enque();
+	}
+
+void DWinsMMCMediaChange::DoDoorOpen()
+//
+// Handle media door open (called on media door open interrupt). 
+//
+	{
+	iDoorClosedCount=iMediaDoorCloseReload;
+	// Just start a ticklink to poll for door closing
+	iTickLink.Periodic(KMediaChangeTickInterval,DWinsMMCMediaChange::Tick,this);
+    }
+
+void DWinsMMCMediaChange::DoDoorClosed()
+//
+// Handle media door closing (called on media door open interrupt).
+//
+	{
+
+	iTickLink.Cancel();	// Doesn't matter if wasn't enabled
+	Enable();	// Re-enable door interrupts
+
+	// While the door was open the user may have changed the card in slot 0
+	if (iStackP && *Wins::CurrentPBusDevicePtr()>=0)
+		iStackP->iCardInfo[0]=iStackP->iCardPool[*Wins::CurrentPBusDevicePtr()];
+	}
+
+void DWinsMMCMediaChange::ForceMediaChange()
+//
+// Force media change
+//
+	{
+	DoorOpenService();
+	}
+
+TMediaState DWinsMMCMediaChange::MediaState()
+//
+// Return status of media changed signal.
+//
+	{
+
+	if (iDoorClosedCount>0)
+		return(EDoorOpen);
+	return( (*Wins::MediaDoorOpenPtr())?EDoorOpen:EDoorClosed);
+	}
+
+void DWinsMMCMediaChange::Tick(TAny *aPtr)
+//
+// Called on the tick to poll for door closing (called on DFC).
+//
+	{
+
+	((DWinsMMCMediaChange*)aPtr)->TickService();
+	}
+
+void DWinsMMCMediaChange::TickService()
+//
+// Called on the tick to poll for door closing (called on DFC).
+//
+	{
+
+	__ASSERT_DEBUG(iDoorClosedCount>=0,DWinsSDStack::Panic(DWinsSDStack::EWinsMMCMediaChangeTickFault));
+	if (!(*Wins::MediaDoorOpenPtr()))
+		{
+		if (iDoorClosedCount > 0)
+			iDoorClosedCount--;
+		if (iDoorClosedCount == 0)
+			DoorClosedService();
+		}
+	else
+		iDoorClosedCount=iMediaDoorCloseReload; // Door open so start again.
+	}
+
+void DWinsMMCMediaChange::Enable()
+//
+// Enable media change 
+//
+	{
+
+	iMediaChangeEnable=ETrue;
+	}
+
+void DWinsMMCMediaChange::Disable()
+//
+// Disable media change
+//
+	{
+
+	iMediaChangeEnable=EFalse;
+	}
+
+void DWinsMMCMediaChange::MediaChangeCallBack(TAny *aPtr)
+//
+// Static called on media change
+//
+	{
+
+	DWinsMMCMediaChange* mc=(DWinsMMCMediaChange*)aPtr;
+	if (mc!=NULL&&mc->iMediaChangeEnable)
+		mc->DoorOpenService();
+	}
+
+
+// ======== TWinsCardInfo ========
+
+void TWinsCardInfo::GetCSD(TUint8* aResp) const
+	{
+	// Bits 127-96
+	TUint32 csd=(0x1<<30); 	/* CSD_STRUCTURE: CSD Version No 1.1 */
+	csd|=		(0x2<<26); 	/* SPEC_VERS: Version 2.1 */
+	csd|=		(0x0E<<16);	/* TAAC: 1mS */  
+	csd|=		(0x0A<<8);	/* NSAC: 1000 */  
+	csd|=		(0x59);		/* TRAN_SPEED: 5.0Mbit/s */  
+	TMMC::BigEndian4Bytes(&aResp[0],csd);
+	// Bits 95-64
+	const TUint32 ccc = 
+			KMMCCmdClassBasic | KMMCCmdClassBlockRead
+		|	KMMCCmdClassBlockWrite | KMMCCmdClassLockCard;
+	csd=		(ccc<<20); 	/* CCC: classes 0, 2, 4, and 7 */
+	csd|=		(0x9<<16); 	/* READ_BL_LEN: 512 bytes */
+	csd|=		(0x0<<15);	/* READ_BL_PARTIAL: No */  
+	csd|=		(0x0<<14);	/* WRITE_BLK_MISALIGN: No */  
+	csd|=		(0x0<<13);	/* READ_BLK_MISALIGN: No */  
+	csd|=		(0x0<<12);	/* DSR_IMP: No DSR */ 
+	csd|=		(0x0<<8);	/* C_SIZE: 1Mb */
+	csd|=		(0x7F);		/* C_SIZE: 1Mb (cont)*/  
+	TMMC::BigEndian4Bytes(&aResp[4],csd); 
+	// Bits 63-32
+	csd=		(3UL<<30); 	/* C_SIZE: 2Mb (cont) */
+	csd|=		(0x1<<27); 	/* VDD_R_CURR_MIN: 1mA */
+	csd|=		(0x1<<24);	/* VDD_R_CURR_MAX: 5mA */  
+	csd|=		(0x2<<21); 	/* VDD_W_CURR_MIN: 5mA */
+	csd|=		(0x3<<18);	/* VDD_W_CURR_MAX: 25mA */  
+	csd|=		(0x0<<15);	/* C_SIZE_MULT: 0 */  
+	if (! iIsSDCard)
+		{
+		csd|=		(0x0<<10);	/* SECTOR_SIZE: 1 write block */  
+		csd|=		(0x0<<5);	/* ERASE_GRP_SIZE: 1 sector */  
+		csd|=		(0x0);		/* WP_GRP_SIZE: 1 erase group */  
+		}
+	else
+		{
+		csd |= (0x00 << (46 - 32));	// ERASE_BLK_EN
+		csd |= (0x1f << (39 - 32));	// SECTOR_SIZE: 32 write blocks
+		csd |= (0x00 << (32 - 32));	// WP_GRP_SIZE: 1 erase sector.
+		}
+	TMMC::BigEndian4Bytes(&aResp[8],csd); 
+	// Bits 31-0
+	csd=		(0x0<<31); 	/* WP_GRP_ENABLE: No */
+	csd|=		(0x0<<29); 	/* DEFAULT_ECC: ? */
+	csd|=		(0x3<<26);	/* R2W_FACTOR: 8 */  
+	csd|=		(0x9<<22); 	/* WRITE_BL_LEN: 512 bytes */
+	csd|=		(0x0<<21);	/* WRITE_BL_PARTIAL: No */  
+	csd|=		(0x0<<15);	/* FILE_FORMAT_GRP: Hard disk */  
+	csd|=		(0x0<<14);	/* COPY: original */  
+	csd|=		(0x0<<13);	/* PERM_WRITE_PROTECT: No */  
+	csd|=		(0x0<<12);	/* TMP_WRITE_PROTECT: No */  
+	csd|=		(0x0<<10);	/* FILE_FORMAT: Hard disk */  
+	csd|=		(0x0<<8);	/* ECC: None */  
+	csd|=		(0x0<<1);	/* CRC: ? */  
+	csd|=		(0x1);		/* not used */  
+	TMMC::BigEndian4Bytes(&aResp[12],csd);
+	}
+
+// ======== DWinsMMCPsu ========
+
+
+DWinsMMCPsu::DWinsMMCPsu(TInt aVccNum, TInt aMcId)
+	: DMMCPsu(aVccNum, aMcId)
+	{}
+
+void DWinsMMCPsu::Init()
+//
+// Initialise the PSU
+//
+    {
+	// Nothing to do
+    }
+
+void DWinsMMCPsu::DoSetState(TPBusPsuState aState)
+//
+// Turn on/off the PSU. If it is possible to adjust the output voltage on this
+// PSU then retreive the required voltage level from TMMCPsu::iVoltageSetting
+// (which is in OCR register format).
+//
+    {
+
+    switch (aState)
+        {
+        case EPsuOff:
+            break;
+        case EPsuOnFull:
+            break;
+        case EPsuOnCurLimit:
+            break;
+        }
+    }
+
+TInt DWinsMMCPsu::VoltageInMilliVolts()
+//
+// Return the level of the PSU (in mV) or -ve if error.
+//
+    {
+
+    return(0);
+    }
+
+void DWinsMMCPsu::DoCheckVoltage()
+//
+// Check the voltage level of the PSU is as expected. Returns either KErrNone, KErrGeneral 
+// to indicate the pass/fail state or KErrNotReady if the voltage check isn't complete.
+//
+    {
+
+	ReceiveVoltageCheckResult(KErrNone);
+    }
+
+void DWinsMMCPsu::PsuInfo(TPBusPsuInfo &anInfo)
+//
+// Return machine info relating to the MMC PSU supply
+//
+    {
+
+	anInfo.iVoltageSupported=0x00040000; // 3.0V (OCR reg. format).
+	anInfo.iMaxCurrentInMicroAmps=0;
+	anInfo.iVoltCheckInterval=0;
+	anInfo.iVoltCheckMethod=EPsuChkComparator;
+    anInfo.iNotLockedTimeOut=0;  // Not enabled
+	anInfo.iInactivityTimeOut=5; // 5 Seconds
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/sdcard/sdcard3c/pp_sdc.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,157 @@
+// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#ifndef __PP_SDC_H__
+#define __PP_SDC_H__
+#if defined(_UNICODE) && !defined(UNICODE)
+	#define UNICODE
+#endif
+
+#include <sdcard.h>
+#include <emulator.h>
+
+GLREF_C TInt MapLastErrorEpoc();
+GLREF_C TMMCErr MapLastErrorMmc();
+
+const TInt KMediaChangeTickInterval=20000;	// Units 1uS
+
+const TInt KTotalWinsCardSlots=2;
+const TInt KTotalWinsCards=(KTotalWinsCardSlots+1); // Need 2 cards for slot 0
+
+const TUint32 KMMCWinsCardOCRValue = 0x00FFFF00;
+
+const TInt KSDMediaAreasPerCard = 2;
+const TInt KSDUserArea = 0;
+const TInt KSDProtectedArea = 1;
+
+class TWinsCardInfo
+	{
+public:
+	void GetCSD(TUint8* aResp) const;
+public:
+	TCID iCID;
+	TMediaPassword* iPWD;				// PWD_LEN calculated from PWD.
+	TBool iIsLocked;					// Could use iCurrentCardIsLocked
+	TMMCardStateEnum iState;			// Simulation of card's current state
+	HANDLE iAreaHandles[KSDMediaAreasPerCard];
+	TRCA iRCA;
+	TBool iIsSDCard;
+	TInt iBusWidth;
+	};
+
+class DWinsSDStack : public DSDStack
+	{
+private:
+	DWinsSDStack(TInt aBus, DMMCSocket* aSocket);
+	TInt Init();
+private:
+	virtual void MachineInfo(TMMCMachineInfo& aMachineInfo);
+public:
+	virtual void AdjustPartialRead(const TMMCard* aCard, TUint32 aStart, TUint32 aEnd, TUint32* aPhysStart, TUint32* aPhysEnd) const;
+	virtual void GetBufferInfo(TUint8** aMDBuf, TInt* aMDBufLen);
+	virtual void AddressCard(TInt aCardNumber);
+
+	enum TWinsMMCPanic
+		{
+	    EWinsMMCLidOpenIntBind=0,
+		EWinsMMCBadMachineInfo=1,
+		EWinsMMCMediaChangeTickFault = 2,
+		EWinsMMCCorruptCommand = 3,
+		EWinsMMCLockAttempt = 4,
+		EWinsMMCAPRNotSupp = 5,
+		EWinsMMCAPRRange = 6,
+		EWinsMMCAPRBoundary = 7,
+
+		EStkFFCNotSelCard = 0x010, EStkFFCNoneSel,
+		EStkFOCNotSelCard = 0x020, EStkFOCMultiSel, EStkFOCNoneSel,
+		EStkIMCBadStateCmd2 = 0x30, EStkIMCBadStateCmd3, EStkIMCCmd6InvalidWidth,
+			EStkICMACMD13NotSD, EStkICMACMD22NotSD,
+		};
+    static void Panic(TWinsMMCPanic aPanic);
+
+private:
+	// Stack service provided by ASSP layer
+	void SetBusConfigDefaults(TMMCBusConfig&, TUint aClock);
+	void InitClockOff();
+	void ASSPReset();
+	void ASSPDisengage();
+	void DoPowerDown();
+	// State Machine functions implemented in ASSP layer
+	TMMCErr DoPowerUpSM();
+	TMMCErr InitClockOnSM();
+	TMMCErr IssueMMCCommandSM();
+    TMMCErr ModifyCardCapabilitySM();
+private:
+	TInt SetupSimulatedCard(TInt aCardNum);						// init
+	TInt CreateBinFileForCard(TInt aCardNum, TInt aAreaNum, HANDLE* aHandle);
+	TInt GetTargetSlotNumber(const TRCA& anRCA);
+	TInt FindAnyCardInStack(TMMCardStateEnum aState);
+	TInt FindFirstCardInStack(TMMCardStateEnum aState);
+	TInt FindOneCardInStack(TMMCardStateEnum aState);
+private:
+	TWinsCardInfo* iCardPool[KTotalWinsCards];		// all cards
+	TWinsCardInfo* iCardInfo[KTotalWinsCardSlots];		// present cards
+	TInt iAddressedCard;
+	TBool iCMD42Failed;
+	TInt iMBWOKBlocks;
+	TUint8* iMDBuf;
+	TInt iMDBufLen;
+
+	friend class TSDCardControllerInterfaceWins;
+	friend class DWinsMMCMediaChange;
+	};
+
+class DWinsMMCMediaChange : public DMMCMediaChange
+	{
+public:
+	DWinsMMCMediaChange(TInt aMediaChangeNum);
+	virtual TInt Create();
+	virtual void ForceMediaChange();
+	virtual void DoDoorOpen();
+	virtual void DoDoorClosed();
+	virtual TMediaState MediaState();
+protected:
+    void DoorOpenService();
+private:
+	static TInt MediaChangeDfc(TAny *aPtr);
+	static void Tick(TAny *aPtr);
+	void TickService();
+	void Enable();
+	void Disable();
+	static void MediaChangeCallBack(TAny *aPtr);
+	inline void SetStackP(DWinsSDStack* aStackP) {iStackP=aStackP;}	
+private:
+	TTickLink iTickLink;
+	TInt iDoorClosedCount;
+	TBool iMediaChangeEnable;
+	TInt iMediaDoorCloseReload; 	// Units: In theory-20ms, Actual-100ms  
+	DWinsSDStack* iStackP;
+	friend class DWinsSDStack;
+	};
+
+class DWinsMMCPsu : public DMMCPsu 
+    {
+public:
+    DWinsMMCPsu(TInt aVccNum, TInt aMcId);
+    virtual void Init();
+	virtual void DoSetState(TPBusPsuState aState);
+	virtual TInt VoltageInMilliVolts();
+private:
+	virtual void DoCheckVoltage();
+    virtual void PsuInfo(TPBusPsuInfo &anInfo);
+    };
+
+
+#endif	// #ifndef __PP_SDC_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/sdcard/sdcard3c/pp_sdcv.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,133 @@
+// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\pp_scdv.cpp
+// WINS variant
+// 
+//
+
+#include <mmccd_ifc.h>
+#include "pp_sdc.h"
+#include <variantmediadef.h>
+
+class TSDCardControllerInterfaceWins : public TMMCardControllerInterface
+	{
+	// Factory functions
+	virtual DMMCSocket* NewSocket(TInt aSocketNum, TMMCPasswordStore* aPasswordStore);
+	virtual DMMCStack* NewStack(TInt aStackNum, DMMCSocket* aSocket);
+	virtual DMMCMediaChange* NewMediaChange(TInt aMcId);
+	virtual DMMCPsu* NewVcc(TInt aVccNum, TInt aMcId);
+	// Stack initialisation
+	virtual TInt Init();
+	// Machine configuration
+	virtual TBool IsMMCSocket(TInt aSocket,SMediaDeviceInfo& aMediaDeviceInfo);
+	virtual TInt  MediaChangeID(TInt aSocket);
+	virtual TInt  VccID(TInt aSocket);
+    };
+
+
+TInt TSDCardControllerInterfaceWins::Init()
+//
+// Initialise the Controller h/w
+// 
+	{
+	return KErrNone;
+	}
+
+TInt TSDCardControllerInterfaceWins::MediaChangeID(TInt aSocket)
+//
+// Return the socket's media change index
+//
+	{
+	return aSocket;
+	}
+
+TInt TSDCardControllerInterfaceWins::VccID(TInt aSocket)
+//
+// Return the socket's PSU index
+//
+	{
+	return aSocket;
+	}
+
+static const TInt DriveNumbers[MMC0_DRIVECOUNT]={MMC0_DRIVELIST};
+_LIT(KLitMmcSocketName,MMC0_DRIVENAME);
+TBool TSDCardControllerInterfaceWins::IsMMCSocket(TInt aSocket,SMediaDeviceInfo& aMediaDeviceInfo)
+//
+// Confirm whether an MMC stack is supported on the specified
+// socket and if it is, the Media Info. for that socket.
+//
+	{
+	
+	if (aSocket==0)
+		{
+		aMediaDeviceInfo.iDevice=MEDIA_DEVICE_MMC;
+		aMediaDeviceInfo.iDriveCount=MMC0_DRIVECOUNT;
+		aMediaDeviceInfo.iDriveList=&DriveNumbers[0];
+		aMediaDeviceInfo.iNumMedia=MMC0_NUMMEDIA;
+		aMediaDeviceInfo.iDeviceName=&KLitMmcSocketName;
+		return(ETrue);
+		}
+	else
+		return(EFalse);	
+	}
+
+DMMCSocket* TSDCardControllerInterfaceWins::NewSocket(TInt aSocketNum, TMMCPasswordStore* aPasswordStore)
+//
+// Create a new platform-specific socket
+//
+	{
+	return new DMMCSocket(aSocketNum, aPasswordStore);
+	}
+
+DMMCStack* TSDCardControllerInterfaceWins::NewStack(TInt aStackNum, DMMCSocket* aSocket)
+//
+// Create a new platform-specific stack
+//
+	{
+	return new DWinsSDStack(aStackNum, aSocket);
+	}
+
+DMMCMediaChange* TSDCardControllerInterfaceWins::NewMediaChange(TInt aMcId)
+//
+// Create a new platform-specific media change
+//
+	{
+	return new DWinsMMCMediaChange(aMcId);
+	}
+
+DMMCPsu* TSDCardControllerInterfaceWins::NewVcc(TInt aVccNum, TInt aMcId)
+//
+// Create a new platform-specific PSU
+//
+	{
+	return new DWinsMMCPsu(aVccNum, aMcId);
+	}
+
+/********************************************
+ * Extension entry point
+ ********************************************/
+
+DECLARE_STANDARD_EXTENSION()
+	{
+	__KTRACE_OPT(KPBUS1,Kern::Printf("Starting SD interface"));
+	TInt r=KErrNoMemory;
+	
+	TSDCardControllerInterfaceWins* pI=new TSDCardControllerInterfaceWins;
+	if (pI)
+		r=pI->Create();
+
+	__KTRACE_OPT(KPBUS1,Kern::Printf("Returns %d",r));
+	return r;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/sdcard/sdcard3c/sdio/pp_sdio.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1920 @@
+// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include "plat_priv.h"
+#include <property.h>
+#include <variant.h>
+#include "pp_sdio.h" 
+
+const TInt  KDiskSectorSize=512;
+
+const TInt KTotalMDiskSize=0x100000; // 1MB (if changing this then also change CSD response)
+
+// ======== Register Map ========
+
+typedef TInt (*TAccessFunction)(TInt aTargetCard, TInt aVal, TAny* aThis, TBool aRead, TUint8& aData);
+
+const TInt KIoMapEnd = 0xFFFFFFFF;
+
+struct SRegisterMapInfo
+	{
+public:
+	TUint32 iRegisterID;				// Unique ID
+	
+	const SRegisterMapInfo* iChildMapP; // Pointer to child register map
+	
+	TUint32 iAddress;					// Start Address
+	TUint32 iLength;					// Register Length in Bytes
+	
+	const TAny*	iDataP;					// Data for auto-access (may be NULL)
+	TAccessFunction iAccessFunction;	// Invoked when register is accessed
+	
+	TUint8 iFlags;						// Bitmap of RO(0), R/W(1) bits (8-bit only?)
+	};
+
+// ======== Card Information Structures =========
+
+
+
+const TUint32 KCommonCisPtr = 0x1010;
+const TUint32 KCommonCisLen = 0x70;
+
+LOCAL_D const TText8 CardCommonCis[KCommonCisLen] =
+	{
+//	0x20,0x04,0xc0,0x12,0x00,0x00,0x21,0x02,0x0c,0x00,0x22,0x06,0x00,0x00,0x01,0x32,
+//	0x00,0x00,0x91,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x32,0x01,0x00,0x48,0x41,
+//	0x47,0x49,0x57,0x41,0x52,0x41,0x20,0x53,0x59,0x53,0x2d,0x43,0x4f,0x4d,0x20,0x43,
+//	0x4f,0x2e,0x2c,0x4c,0x54,0x44,0x2e,0x00,0x48,0x53,0x2d,0x53,0x44,0x44,0x4b,0x2d,
+//	0x30,0x30,0x32,0x20,0x56,0x65,0x72,0x2e,0x50,0x61,0x6e,0x61,0x00,0x00,0xff,0xff,
+//	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+//	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
+
+	0x20,0x04,0xc0,0x12,0x00,0x00,0x21,0x02,0x0c,0x00,0x22,0x04,0x00,0x00,0x01,0x2A/*79*/,
+	0x91,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x35,0x01,0x00,0x48,0x41,0x47,0x49,
+	0x57,0x41,0x52,0x41,0x20,0x53,0x59,0x53,0x2d,0x43,0x4f,0x4d,0x20,0x43,0x4f,0x2e,
+	0x2c,0x4c,0x54,0x44,0x2e,0x00,0x48,0x53,0x2d,0x53,0x44,0x44,0x4b,0x2d,0x30,0x30,
+	0x32,0x20,0x56,0x65,0x72,0x2e,0x50,0x61,0x6e,0x61,0x00,0x53,0x48,0x50,0x00,0xff,
+	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
+	};
+
+const TUint32 KFn1CisPtr = 0x2000;
+const TUint32 KFn1CisLen = 0x40;
+
+LOCAL_D const TText8 Fn1Cis[KFn1CisLen] =
+	{
+	0x21,0x02,0x0c,0x00,0x22,0x24,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
+	0x00,0x03,0x00,0x02,0x00,0x00,0x3c,0x00,0x00,0x00,0xc8,0x00,0x00,0x00,0x00,0x00,
+	0x00,0x00,0x00,0x00,0x2c,0x01,0xf4,0x01,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,
+	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xff,
+	};
+
+const TUint32 KFn2CisPtr = 0x3000;
+const TUint32 KFn2CisLen = 0x40;
+
+LOCAL_D const TText8 Fn2Cis[KFn2CisLen] =
+	{
+	0x21,0x02,0x0c,0x00,0x22,0x24,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
+	0x00,0x03,0x40,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0xc8,0x00,0x00,0x00,0x00,0x00,
+	0x00,0x00,0x00,0x00,0xfa,0x00,0xc2,0x01,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,
+	0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
+	};
+
+
+// ======== Card Common Control Registers =========
+
+TUint8 GCCCRRegSdioRevision			= 0x00;
+TUint8 GCCCRRegSdSpec				= 0x00;
+TUint8 GCCCRRegIoEnable				= 0x00;
+TUint8 GCCCRRegIoReady				= 0x00;
+TUint8 GCCCRRegIntEnable			= 0x00;
+TUint8 GCCCRRegIntPending			= 0x00;
+TUint8 GCCCRRegIoAbort				= 0x00;
+TUint8 GCCCRRegBusInterfaceControl	= 0x00;
+TUint8 GCCCRRegCardCapability		= 0x00;
+TUint8 GCCCRRegCisPtrLo				= (KCommonCisPtr & 0x0000FF);
+TUint8 GCCCRRegCisPtrMid			= (KCommonCisPtr & 0x00FF00) >> 8;
+TUint8 GCCCRRegCisPtrHi				= (KCommonCisPtr & 0xFF0000) >> 16;
+TUint8 GCCCRRegBusSuspend			= 0x00;
+TUint8 GCCCRRegFunctionSelect		= 0x00;
+TUint8 GCCCRRegExecFlags			= 0x00;
+TUint8 GCCCRRegReadyFlags			= 0x00;
+TUint8 GCCCRRegFN0BlockSizeLo		= 0x00;	// Initialises with 0x0000
+TUint8 GCCCRRegFN0BlockSizeHi		= 0x00;	// Initialises with 0x0000
+
+TUint8 GFunctionToEnable = 0x00;
+
+LOCAL_D const SRegisterMapInfo IoMapCCCR[] =
+	{
+		{KCCCRRegSdioRevision,		  NULL, 0x00, 0x01, &GCCCRRegSdioRevision,		  NULL, 0x00},
+		{KCCCRRegSdSpec,			  NULL, 0x01, 0x01, &GCCCRRegSdSpec,			  NULL, 0x00},
+		
+		{KCCCRRegIoEnable,			  NULL, 0x02, 0x01, NULL, DWinsSDIOStack::AccessIoEnable, 0x00},
+		
+		{KCCCRRegIoReady,			  NULL, 0x03, 0x01, &GCCCRRegIoReady,			  NULL, 0x00},
+		{KCCCRRegIntEnable,			  NULL, 0x04, 0x01, &GCCCRRegIntEnable,			  NULL, 0xFF},
+		{KCCCRRegIntPending,		  NULL, 0x05, 0x01, &GCCCRRegIntPending,		  NULL, 0x00},
+		{KCCCRRegIoAbort,			  NULL, 0x06, 0x01, &GCCCRRegIoAbort,			  NULL, 0xFF},
+		{KCCCRRegBusInterfaceControl, NULL, 0x07, 0x01, &GCCCRRegBusInterfaceControl, NULL, 0xFF},
+		{KCCCRRegCardCapability,	  NULL, 0x08, 0x01, &GCCCRRegCardCapability,	  NULL, 0x00},
+		{KCCCRRegCisPtrLo,			  NULL, 0x09, 0x01, &GCCCRRegCisPtrLo,			  NULL, 0x00},
+		{KCCCRRegCisPtrMid,			  NULL, 0x0a, 0x01, &GCCCRRegCisPtrMid,			  NULL, 0x00},
+		{KCCCRRegCisPtrHi,			  NULL, 0x0b, 0x01, &GCCCRRegCisPtrHi,			  NULL, 0x00},
+		{KCCCRRegBusSuspend,		  NULL, 0x0c, 0x01, &GCCCRRegBusSuspend,		  NULL, 0xFF},
+		{KCCCRRegFunctionSelect,	  NULL, 0x0d, 0x01, &GCCCRRegFunctionSelect,	  NULL, 0xFF},
+		{KCCCRRegExecFlags,			  NULL, 0x0e, 0x01, &GCCCRRegExecFlags,			  NULL, 0x00},
+		{KCCCRRegReadyFlags,		  NULL, 0x0f, 0x01, &GCCCRRegReadyFlags,		  NULL, 0x00},
+		{KCCCRRegFN0BlockSizeLo,	  NULL, 0x10, 0x01, &GCCCRRegFN0BlockSizeLo,	  NULL, 0x00},
+		{KCCCRRegFN0BlockSizeHi,	  NULL, 0x11, 0x01, &GCCCRRegFN0BlockSizeHi,	  NULL, 0x00},
+		{KIoMapEnd,					  NULL, 0,	  0,	NULL,						  NULL, 0xFF}
+	};
+
+
+// ======== Function Basic Register 1 =========
+
+TUint8 GFBR1RegInterfaceCode = KFBRRegSupportsCSA;
+TUint8 GFBR1RegExtendedCode  = 0x00;
+TUint8 GFBR1RegPowerFlags	 = 0x00;
+TUint8 GFBR1RegCisPtrLo		 = (KFn1CisPtr & 0x0000FF);
+TUint8 GFBR1RegCisPtrMid	 = (KFn1CisPtr & 0x00FF00) >> 8;
+TUint8 GFBR1RegCisPtrHi		 = (KFn1CisPtr & 0xFF0000) >> 16;
+TUint8 GFBR1RegIoBlockSizeLo = 0x00;
+TUint8 GFBR1RegIoBlockSizeHi = 0x00;
+
+TUint32 GFBR1RegCsaPtr = 0x00000000;
+
+LOCAL_D const SRegisterMapInfo IoMapFBR1[] =
+	{
+		{KFBRRegInterfaceCode, NULL, 0x100, 0x01, &GFBR1RegInterfaceCode, NULL, 0x00},
+		{KFBRRegExtendedCode,  NULL, 0x101, 0x01, &GFBR1RegExtendedCode,  NULL, 0x00},
+		{KFBRRegPowerFlags,	   NULL, 0x102, 0x01, &GFBR1RegPowerFlags,	  NULL, 0x00},
+		{KFBRRegCisPtrLo,	   NULL, 0x109, 0x01, &GFBR1RegCisPtrLo,	  NULL, 0x00},
+		{KFBRRegCisPtrMid,	   NULL, 0x10a, 0x01, &GFBR1RegCisPtrMid,	  NULL, 0x00},
+		{KFBRRegCisPtrHi,	   NULL, 0x10b, 0x01, &GFBR1RegCisPtrHi,	  NULL, 0x00},
+
+		{KFBRRegCsaPtrLo,	   NULL, 0x10c, 0x01, NULL, DWinsSDIOStack::AccessCsaPointer, 0xFF},
+		{KFBRRegCsaPtrMid,	   NULL, 0x10d, 0x01, NULL, DWinsSDIOStack::AccessCsaPointer, 0xFF},
+		{KFBRRegCsaPtrHi,	   NULL, 0x10e, 0x01, NULL, DWinsSDIOStack::AccessCsaPointer, 0xFF},
+		{KFBRRegCsaWindow,	   NULL, 0x10f, 0x01, NULL, DWinsSDIOStack::AccessCsaWindow,  0xFF},
+		
+		{KFBRRegIoBlockSizeLo, NULL, 0x110, 0x01, &GFBR1RegIoBlockSizeLo, NULL, 0xFF},
+		{KFBRRegIoBlockSizeHi, NULL, 0x111, 0x01, &GFBR1RegIoBlockSizeHi, NULL, 0xFF},
+		{KIoMapEnd,			   NULL, 0,	    0,	  NULL,					  NULL, 0x00}
+	};
+
+// ======== Function Basic Register 2 ========
+
+TUint8 GFBR2RegInterfaceCode = KFBRRegSupportsCSA | ESdioFunctionTypeUART;
+TUint8 GFBR2RegExtendedCode  = 0x00;
+TUint8 GFBR2RegPowerFlags	 = 0x00;
+TUint8 GFBR2RegCisPtrLo		 = (KFn2CisPtr & 0x0000FF);
+TUint8 GFBR2RegCisPtrMid	 = (KFn2CisPtr & 0x00FF00) >> 8;
+TUint8 GFBR2RegCisPtrHi		 = (KFn2CisPtr & 0xFF0000) >> 16;
+TUint8 GFBR2RegIoBlockSizeLo = 0x00;
+TUint8 GFBR2RegIoBlockSizeHi = 0x00;
+
+TUint32 GFBR2RegCsaPtr = 0x00000000;
+
+LOCAL_D const SRegisterMapInfo IoMapFBR2[] =
+	{
+		{KFBRRegInterfaceCode, NULL, 0x200, 0x01, &GFBR2RegInterfaceCode, NULL, 0x00},
+		{KFBRRegExtendedCode,  NULL, 0x201, 0x01, &GFBR2RegExtendedCode,  NULL, 0x00},
+		{KFBRRegPowerFlags,	   NULL, 0x202, 0x01, &GFBR2RegPowerFlags,	  NULL, 0x00},
+		{KFBRRegCisPtrLo,	   NULL, 0x209, 0x01, &GFBR2RegCisPtrLo,	  NULL, 0x00},
+		{KFBRRegCisPtrMid,	   NULL, 0x20a, 0x01, &GFBR2RegCisPtrMid,	  NULL, 0x00},
+		{KFBRRegCisPtrHi,	   NULL, 0x20b, 0x01, &GFBR2RegCisPtrHi,	  NULL, 0x00},
+
+		{KFBRRegCsaPtrLo,	   NULL, 0x20c, 0x01, NULL, DWinsSDIOStack::AccessCsaPointer, 0xFF},
+		{KFBRRegCsaPtrMid,	   NULL, 0x20d, 0x01, NULL, DWinsSDIOStack::AccessCsaPointer, 0xFF},
+		{KFBRRegCsaPtrHi,	   NULL, 0x20e, 0x01, NULL, DWinsSDIOStack::AccessCsaPointer, 0xFF},
+		{KFBRRegCsaWindow,	   NULL, 0x20f, 0x01, NULL, DWinsSDIOStack::AccessCsaWindow,  0xFF},
+		
+		{KFBRRegIoBlockSizeLo, NULL, 0x210, 0x01, &GFBR2RegIoBlockSizeLo, NULL, 0xFF},
+		{KFBRRegIoBlockSizeHi, NULL, 0x211, 0x01, &GFBR2RegIoBlockSizeHi, NULL, 0xFF},
+		{KIoMapEnd,			   NULL, 0,	    0,	  NULL,					  NULL, 0x00}
+	};
+
+// ======== Function Basic Register 1 =========
+
+const TInt KIoMapCCCR	   = 0;
+const TInt KIoMapFBR1	   = 1;
+const TInt KIoMapFBR2	   = 2;
+const TInt KIoMapCommonCis = 3;
+const TInt KIoMapFn1Cis	   = 4;
+const TInt KIoMapFn2Cis	   = 5;
+
+LOCAL_D const SRegisterMapInfo IoMapTop[] =
+	{
+		{KIoMapCCCR,	  IoMapCCCR, 0x00,			0xFF,		   NULL,		  NULL, 0x00},
+		{KIoMapFBR1,	  IoMapFBR1, 0x100,			0xFF,		   NULL,		  NULL, 0x00},		
+		{KIoMapFBR2,	  IoMapFBR2, 0x200,			0xFF,		   NULL,		  NULL, 0x00},
+		{KIoMapCommonCis, NULL,		 KCommonCisPtr, KCommonCisLen, CardCommonCis, NULL, 0x00},
+		{KIoMapFn1Cis,	  NULL,		 KFn1CisPtr,	KFn1CisLen,	   Fn1Cis,		  NULL, 0x00},
+		{KIoMapFn2Cis,	  NULL,		 KFn2CisPtr,	KFn2CisLen,	   Fn2Cis,		  NULL, 0x00},
+		{KIoMapEnd,		  NULL,		 0,				0,			   NULL,		  NULL, 0x00}
+	};
+
+const SRegisterMapInfo* FindIoEntryFromID(const SRegisterMapInfo* aIoMapP, TUint32 aID)
+	{
+	const SRegisterMapInfo* foundEntry = NULL;
+	
+	TInt currentEntry = 0;
+	
+	while((aIoMapP[currentEntry].iRegisterID != KIoMapEnd) && (foundEntry == NULL))
+		{
+		if(aIoMapP[currentEntry].iRegisterID == aID)
+			{
+			foundEntry = aIoMapP+currentEntry;
+			}
+		currentEntry++;
+		}
+
+	return(foundEntry);
+	}
+
+const SRegisterMapInfo* FindIoEntryFromAddress(const SRegisterMapInfo* aIoMapP, TUint32 aAddr)
+	{
+	const SRegisterMapInfo* foundEntry = NULL;
+	
+	TInt currentEntry = 0;
+	
+	while((aIoMapP[currentEntry].iRegisterID != KIoMapEnd) && (foundEntry == NULL))
+		{
+		const TUint32 startAddr = aIoMapP[currentEntry].iAddress;
+		const TUint32 endAddr   = startAddr + aIoMapP[currentEntry].iLength - 1;
+		
+		if((aAddr >= startAddr) && (aAddr <= endAddr))
+			{
+			if(aIoMapP[currentEntry].iChildMapP)
+				{
+				foundEntry = FindIoEntryFromAddress(aIoMapP[currentEntry].iChildMapP, aAddr);
+				}
+			else
+				{
+				foundEntry = aIoMapP+currentEntry;
+				}
+			}
+		currentEntry++;
+		}
+
+	return(foundEntry);
+	}
+
+
+
+// ======== error code conversion ========
+
+GLDEF_C TInt MapLastErrorEpoc()
+//
+// map an Win32 error code to Epoc32 value
+//
+	{
+	TInt res=KErrGeneral;
+	switch (GetLastError())
+		{
+		case ERROR_SHARING_VIOLATION : res=KErrAccessDenied; break;
+		case ERROR_LOCK_VIOLATION : res=KErrLocked; break;
+		case ERROR_FILE_NOT_FOUND: res=KErrNotFound; break;
+		case ERROR_PATH_NOT_FOUND: res=KErrPathNotFound; break;
+		case ERROR_ALREADY_EXISTS:
+		case ERROR_FILE_EXISTS:
+			res=KErrAlreadyExists;
+			break;
+		case ERROR_NOT_READY: res=KErrNotReady; break;
+		case ERROR_UNRECOGNIZED_VOLUME:
+		case ERROR_NOT_DOS_DISK:
+			res=KErrUnknown;
+			break;
+		case ERROR_UNRECOGNIZED_MEDIA: res=KErrCorrupt; break;
+		case ERROR_INVALID_NAME: res=KErrBadName; break;
+		case ERROR_NO_MORE_FILES: res=KErrEof; break;
+		}
+	return(res);
+	}
+
+GLDEF_C TMMCErr MapLastErrorMmc()
+//
+// map Win32 error to a TMMCErr error.
+//
+	{
+	DWORD r=GetLastError();
+	TInt res=KErrGeneral;
+	switch (r)
+		{
+		case ERROR_SHARING_VIOLATION:
+		case ERROR_LOCK_VIOLATION:
+			res=KMMCErrLocked;			// KErrLocked
+			break;
+		case ERROR_FILE_NOT_FOUND:
+		case ERROR_PATH_NOT_FOUND:
+			res=KMMCErrNotFound;		// KErrNotFound
+			break;
+		case ERROR_ALREADY_EXISTS:
+		case ERROR_FILE_EXISTS:
+			res=KMMCErrAlreadyExists;	// KErrAlreadyExists
+			break;
+		case ERROR_NOT_READY: res=KMMCErrNoCard; break;
+		case ERROR_UNRECOGNIZED_VOLUME:
+		case ERROR_NOT_DOS_DISK:
+			res=KMMCErrGeneral;			// KErrGeneral
+			break;
+		case ERROR_UNRECOGNIZED_MEDIA:
+		case ERROR_INVALID_NAME:
+		case ERROR_NO_MORE_FILES:
+			res=KMMCErrResponseCRC; 	// KErrCorrupt
+			break;
+		}
+	return(res);
+	}
+
+// ======== DWinsSDIOStack ========
+
+DWinsSDIOStack::DWinsSDIOStack(TInt aBus, DMMCSocket* aSocket)
+  : DSDIOStack(aBus, aSocket),
+	iEnableTimer(&DWinsSDIOStack::EnableTimerCallback,this)
+	{	
+	iAddressedCard=KBroadcastToAllCards;
+//	iCMD42Failed=EFalse;
+	}
+
+
+TInt DWinsSDIOStack::Init()
+//
+// Allocate any resources. Only created once on kernel initialization so dont
+// worry about cleanup if it leaves.
+//
+	{
+	if((iCardArray = new TSDIOCardArray(this)) == NULL)
+		return KErrNoMemory;
+
+	TInt r=DMMCStack::Init();
+	if(r!=KErrNone)
+		return r;
+
+	DMediaChangeBase* pMCBase = MMCSocket()->iMediaChange;
+	static_cast<DWinsMMCMediaChange*>(pMCBase)->SetStackP(this);
+	Wins::SetMediaChangeCallBackPtr(DWinsMMCMediaChange::MediaChangeCallBack, (TAny*)pMCBase);
+
+	//
+	// Over time memory can become fragmented, and so it is not possible to
+	// allocate physically contiguous pages.  Therefore, the buffers for IO
+	// are allocated at startup.
+	//
+	// block and erase sector size characteristics depend on the specific
+	// card model, and so the initial values are estimates based on a typical
+	// card.  If these do not match the actual card's block size (or erase
+	// size, for SD,) then the media driver just gets a reduced or increased
+	// buffer area, and its efficiency varies accordingly.
+	//
+	// For the WINS implementation, fragmentation does not matter because
+	// DMA is not used.  The memory must still be allocated here so MEDMMC is
+	// able to use it.
+	//
+	// The constant calculations could be folded, but this illustrates how the
+	// values are derived.
+	//
+
+	// MMC - values from Hitachi 16Mb card, datasheet HB288016MM1
+
+	// minor buffer must contain enough space for MBR or block
+	const TUint mmcBlkSzLog2 = 9;				// READ_BLK_LEN and WRITE_BLK_LEN
+	const TUint mmcBlkSz = 1 << mmcBlkSzLog2;
+	const TInt mmcMinorBufLen = Max(KDiskSectorSize, mmcBlkSz);
+
+	const TInt KMinMMCBlocksInBuffer = 8;
+	const TInt mmcCchBufLen = KMinMMCBlocksInBuffer << mmcBlkSzLog2;
+
+	const TInt mmcTotalBufLen = mmcMinorBufLen + mmcCchBufLen;
+
+	// SDCard - values from 64Mb Panasonic RP-SD064
+
+	const TUint sdBlkSzLog2 = 9;				// READ_BL_LEN and WRITE_BLK_LEN
+	const TUint sdBlkSz = 1 << sdBlkSzLog2;
+	const TInt sdMinorBufLen = Max(KDiskSectorSize, sdBlkSz);
+
+	const TUint ss = 0x1f;						// SECTOR_SIZE, add 1 for sector count
+	const TInt KMinSDBlocksInBuffer = 8;
+	const TInt sdCchBufLen = Max(KMinSDBlocksInBuffer, ss + 1) << sdBlkSzLog2;
+
+	const TInt sdTotalBufLen = sdMinorBufLen + sdCchBufLen;
+
+	const TInt totalBufLen = Max(mmcTotalBufLen, sdTotalBufLen);
+
+	iMDBuf = reinterpret_cast<TUint8*>(Kern::Alloc(totalBufLen));
+	iMDBufLen = totalBufLen;
+
+	// initialize each card on the stack
+	TInt i;
+	for (i = 0; i < KTotalWinsCards; ++i)
+		{
+		TInt r = SetupSimulatedCard(i);
+		if (r != KErrNone)
+			return r;
+		}
+
+	// initialize pointers to currently present cards
+
+	// Slot zero can toggle between no card; card 0 and card 1.  The current state is
+	// determined by *Wins::CurrentPBusDevicePtr() and toggled by pressing F4 when F5
+	// (door open) is held down.  Because this function is only executed at startup,
+	// assume start with card zero.
+	iCardInfo[0] = iCardPool[0];
+	for (i = 1; i < KTotalWinsCardSlots; ++i)
+		{
+		iCardInfo[i]=iCardPool[i+1];
+		}
+
+	return KErrNone;
+	}
+
+void DWinsSDIOStack::MachineInfo(TMMCMachineInfo& aMachineInfo)
+	{
+	aMachineInfo.iTotalSockets=KTotalWinsCardSlots;
+	aMachineInfo.iTotalMediaChanges=0;  		// Not used at present
+	aMachineInfo.iTotalPrimarySupplies=0;		// Not used at present
+
+	aMachineInfo.iSPIMode=EFalse;
+    aMachineInfo.iBaseBusNumber=0;
+
+	__ASSERT_DEBUG(aMachineInfo.iTotalSockets<=KMaxMMCardsPerStack,
+					DWinsSDIOStack::Panic(DWinsSDIOStack::EWinsMMCBadMachineInfo));
+	}
+
+void DWinsSDIOStack::AdjustPartialRead(
+#ifdef _DEBUG
+	const TMMCard* aCard,
+#else
+	const TMMCard* /*aCard*/,
+#endif
+	TUint32 aStart, TUint32 aEnd, TUint32* aPhysStart, TUint32* aPhysEnd) const
+	{
+#ifdef _DEBUG
+	const TUint32 blkLen = aCard->CSD().ReadBlockLength();
+	const TUint32 blkMsk = blkLen - 1;
+
+	__ASSERT_DEBUG(aCard->CSD().ReadBlPartial(), Panic(EWinsMMCAPRNotSupp));
+	__ASSERT_DEBUG(aEnd - aStart <= blkLen, Panic(EWinsMMCAPRRange));
+	__ASSERT_DEBUG((aEnd & ~blkMsk) > (aStart & ~blkMsk), Panic(EWinsMMCAPRBoundary));
+#endif
+
+	*aPhysStart = aStart & ~0x3;
+	*aPhysEnd = (aEnd + 0x3) & ~0x3;
+	}
+
+void DWinsSDIOStack::GetBufferInfo(TUint8** aMDBuf, TInt* aMDBufLen)
+	{
+	*aMDBuf = iMDBuf;
+	*aMDBufLen = iMDBufLen;
+	}
+
+void DWinsSDIOStack::Panic(TWinsMMCPanic aPanic)
+	{
+	_LIT(KPncNm,"PBUS-MMCSD-WINS");
+	Kern::PanicCurrentThread(KPncNm,aPanic);
+	}
+
+TInt DWinsSDIOStack::SetupSimulatedCard(TInt aCardNum)
+//
+// allocate individual card with Win32 file.  Only called at bootup, so no cleanup if fails.
+//
+	{
+	TWinsCardInfo* cip = new TWinsCardInfo;
+	if (cip == 0)
+		return KErrNoMemory;
+
+	TUint8 cid[KMMCCIDLength];
+	cid[0] = 'C';
+	cid[1] = 'I';
+	cid[2] = 'D';
+	cid[3] = TUint8('0' + aCardNum);
+	TInt j;
+	for (j = 4; j < KMMCCIDLength - 1; ++j)
+		cid[j] = 'c';
+	cid[KMMCCIDLength - 1] = '#';				// '#' = 0x23, bit zero must be 1
+	cip->iCID=cid;
+
+	cip->iPWD = new TMediaPassword;
+	if (! cip->iPWD)
+		{
+		delete cip;
+		return KErrNoMemory;
+		}
+
+	// cards in slot zero are SD
+	TInt mediaAreas;
+	if (aCardNum <= 1)
+		{
+		cip->iIsSDCard = ETrue;
+		mediaAreas = 3;	// +1 for SDIO area
+		}
+	else
+		{
+		cip->iIsSDCard = EFalse;
+		mediaAreas = 1;
+		}
+
+	cip->iState=ECardStateIdle;
+
+	for (TInt area = 0; area < mediaAreas; ++area)
+		{
+		TInt r = CreateBinFileForCard(aCardNum, area, &cip->iAreaHandles[area]);
+		if (r != KErrNone)
+			return r;
+		}
+	iCardPool[aCardNum]=cip;
+	return(KErrNone);
+	}
+
+TInt DWinsSDIOStack::CreateBinFileForCard(TInt aCardNum, TInt aAreaNum, HANDLE* aHandle)
+//
+// create .bin file in temp directory to contain media area of card.
+//
+	{
+	const char* emulatorPath = Property::GetString("EmulatorMediaPath");
+	if (!Emulator::CreateAllDirectories(emulatorPath))
+		return Emulator::LastError();
+
+	TBuf8<KMaxFileName> fn8(_L8(emulatorPath));
+	fn8.Append(_L8("MMCCRD"));
+	fn8.AppendNum(aCardNum);
+	fn8.Append('A'+aAreaNum);
+	fn8.Append(_L8(".BIN"));
+	fn8.Append('\0');
+
+	*aHandle = CreateFileA(
+		(LPCSTR) fn8.Ptr(),					// LPCSTR lpFileName,
+		GENERIC_READ | GENERIC_WRITE,		// DWORD dwDesiredAccess
+		FILE_SHARE_READ | FILE_SHARE_WRITE,	// DWORD dwShareMode
+		NULL,								// LPSECURITY_ATTRIBUTES lpSecurityAttributes
+		OPEN_ALWAYS,						// DWORD dwCreationDisposition
+		FILE_FLAG_RANDOM_ACCESS,			// DWORD dwFlagsAndAttributes
+		NULL);								// HANDLE hTemplateFile
+
+	if (*aHandle == INVALID_HANDLE_VALUE)
+	    return MapLastErrorEpoc();
+	
+	if (	SetFilePointer(*aHandle, KTotalMDiskSize, NULL, FILE_BEGIN) == 0xffffffffu
+		||	! SetEndOfFile(*aHandle) )
+		{
+		CloseHandle(*aHandle);
+	    return MapLastErrorEpoc();
+		}
+
+	return KErrNone;
+	}
+
+void DWinsSDIOStack::SetBusConfigDefaults(TMMCBusConfig& aConfig, TUint aClock)
+	{
+	const TUint KWinsMaxHwInterfaceClk=104000;
+	const TUint KWinsResponseTimeOut=6400;
+	const TUint KWinsDataTimeOut=40000;
+	const TUint KWinsBusyTimeOut=200000;
+
+	aConfig.iBusClock = (aClock > KWinsMaxHwInterfaceClk) ? KWinsMaxHwInterfaceClk : aClock;
+	aConfig.iResponseTimeOut=KWinsResponseTimeOut;
+	aConfig.iDataTimeOut=KWinsDataTimeOut;
+	aConfig.iBusyTimeOut=KWinsBusyTimeOut;
+	}
+
+void DWinsSDIOStack::InitClockOff()
+	{
+	// empty.
+	}
+
+void DWinsSDIOStack::ASSPReset()
+	{
+	// empty.
+	}
+
+void DWinsSDIOStack::ASSPDisengage()
+	{
+	// empty.
+	}
+
+void DWinsSDIOStack::DoPowerDown()
+	{
+	// empty.
+	}
+
+
+LOCAL_C TInt SetMediaPasswordEnvironmentVar(TInt aSocketNum,TInt aCardNum,const TDesC8& aPasswd)
+// 
+// Set the password for local drive 'aLocalDrive', card number 'aCardNum' to 'aPasswd' - as an
+// environment variable. Note that the card number is only relevant where the emulated drive
+// supports card hot-swapping (i.e. F4 whilst F5 is held down).
+//
+	{
+	// Setup the appropriate environment variable string '_EPOC_LocDrv_<locDrvNum>_PWORD_<cardNum>'
+	TUint16 envVar[]=L"_EPOC_Socket_X_PWORD_Y";
+
+	envVar[13]=(TUint16)('0'+aSocketNum);
+	envVar[21]=(TUint16)('0'+aCardNum);
+	
+	// Setup the new value of the environment variable
+	TUint16	envVal[100];
+	TInt len=aPasswd.Length();
+
+	// the password may be empty if a card's password is cleared
+	if (len>(100-1))
+		return(KErrArgument);
+	memcpy(&envVal[0],reinterpret_cast<const TUint16 *>(aPasswd.Ptr()),len);
+	envVal[len>>1]='\0';
+
+	// Now set the new value for the environment variable
+	if (SetEnvironmentVariable(envVar,&envVal[0]))
+		return(KErrNone);
+
+	return KErrGeneral;
+	}
+
+LOCAL_C TInt MediaPasswordEnvironmentVar(TInt aSocketNum,TInt aCardNum,TDes8& aPasswd)
+// 
+// Get the password for local drive 'aLocalDrive', card number 'aCardNum' into 'aPasswd' - from
+// an environment variable. Note that the card number is only relevant where the emulated drive
+// supports card hot-swapping (i.e. F4 whilst F5 is held down).
+//
+	{
+	TUint16 envVar[]=L"_EPOC_Socket_X_PWORD_Y";
+
+	envVar[13]=(TUint16)('0'+aSocketNum);
+	envVar[21]=(TUint16)('0'+aCardNum);
+	
+	TUint16 envVal[100];	// To hold the value of the retreived environment variable
+	
+	DWORD len=GetEnvironmentVariable(envVar,&envVal[0],100);
+	if (len>(TUint)100)
+		return(KErrGeneral);
+	if (len)
+		{
+		// Found the requested environment variable so there is a password for this local drive / card. 
+		if ((len<<1)<=KMaxMediaPassword)
+			{
+			aPasswd.FillZ(KMaxMediaPassword);
+			aPasswd.Zero();
+			aPasswd.Copy(reinterpret_cast<TUint8*>(&envVal[0]),len<<1);
+			return(KErrNone);	
+			}
+		else	
+			return(KErrGeneral);	
+		}
+
+	return(KErrNotFound);
+	}
+
+TMMCErr DWinsSDIOStack::DoPowerUpSM()
+	{
+	enum states
+		{
+		EStBegin=0,
+		EStEnd
+		};
+
+	SMF_BEGIN
+
+		if(MMCSocket()->iVcc->SetState(EPsuOnCurLimit) != KErrNone)
+			return KMMCErrHardware;
+
+		for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+			{
+			// if card has a password, it will be locked on power up
+			TInt cardNum = (i==0) ? *Wins::CurrentPBusDevicePtr() : i + 1;
+			if (	cardNum >= 0
+				&&	MediaPasswordEnvironmentVar(
+						MMCSocket()->iSocketNumber, cardNum, *(iCardInfo[i]->iPWD))
+					==	KErrNone)
+				{
+				iCardInfo[i]->iIsLocked = (iCardInfo[i]->iPWD->Length() > 0);
+				}
+			else	
+				iCardInfo[i]->iIsLocked=EFalse;
+
+			iCardInfo[i]->iState = ECardStateIdle;
+			iCardInfo[i]->iRCA=0x0001;		// Default RCA - spec 2.2, s4.2.1, 5.4
+			}
+
+		ReportPowerUp();
+
+	SMF_END
+	}
+
+TMMCErr DWinsSDIOStack::InitClockOnSM()
+	{
+	enum states
+		{
+		EStBegin=0,
+		EStEnd
+		};
+	SMF_BEGIN
+
+	SMF_END
+	}
+
+void DWinsSDIOStack::AddressCard(TInt aCardNumber)
+	{
+	iAddressedCard = aCardNumber;
+	}
+
+
+TInt DWinsSDIOStack::GetTargetSlotNumber(const TRCA& anRCA)
+//
+// when the controller is given a command with an embedded RCA, this function
+// works out which physical card slot it corresponds to.  If no card has been
+// assigned the RCA then it returns -1.
+//
+	{
+	TInt targetIdx = -1;
+
+	for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+		{
+		if (iCardInfo[i]->iRCA==anRCA)
+			{
+			targetIdx=i;
+			break;
+			}
+		}
+
+	return(targetIdx);
+	}
+
+TMMCErr DWinsSDIOStack::IssueMMCCommandSM()
+	{
+	enum states
+		{
+		EStBegin=0,
+		EStEnd
+		};
+
+	TMMCCommandDesc& cmd = Command();
+
+	// If the command contains an embedded RCA then extract it	
+	TRCA tgtRCA=0;
+	TBool supRCA=EFalse;
+	if (/*cmd.iCommand == ECmdSetRelativeAddr	||	*/cmd.iCommand == ECmdSelectCard
+	||	cmd.iCommand == ECmdSendCSD			||	cmd.iCommand == ECmdSendCID
+	||	cmd.iCommand == ECmdSendStatus		||	cmd.iCommand == ECmdGoInactiveState
+	||	cmd.iCommand == ECmdFastIO 			||  cmd.iCommand == ECmdAppCmd )
+		{
+		if ((cmd.iArgument >> 16) != 0)
+			{
+			supRCA=ETrue;
+			tgtRCA=TUint16(cmd.iArgument >> 16);
+			}
+		}
+
+	// if the card contains an embedded RCA, work out which slot it corresponds to.
+	// At the end of the function, this card is used to generate the R1 response.
+	// Assume that if rca is supplied it either corresponds to the selected card or
+	// broadcast mode is on.  (An exception is CMD7 with arg0 to deselect all cards.)
+
+	TInt targetCard = supRCA ? GetTargetSlotNumber(tgtRCA) : iAddressedCard;
+	TBool rto = EFalse;							// response timeout
+
+	// if try to access card zero has been set to holding no card via F5 / F4 then timeout.
+	if ((targetCard == 0) && *Wins::CurrentPBusDevicePtr() < 0)
+		return KMMCErrResponseTimeOut;
+	
+	HANDLE winHandle;
+
+	// CMD42 is a data transfer command.  That means the R1 response that it returns
+	// immediately is the state it is in on receiving the data block, and not after
+	// processing it.  If the data block is invalid then LOCK_UNLOCK_FAILED will be
+	// set in the R1 response which is sent in reply to the next command.
+
+	TBool nextCMD42Failed = EFalse;
+	TBool lock_unlock_failed=EFalse;
+
+	// When the card is locked, it will only respond to basic command class (0) and
+	// lock card command class (7).  An exception is CMD16.  This is sent before CMD42,
+	// but is classified (MMC Spec 23.2, table 5) as belonging to classes 2 and 4.
+	// For data transfer commands, LOCK_UNLOCK_FAIL is set in response to the following
+
+	TMMCCommandEnum origCmd = cmd.iCommand;
+
+	// if targetting locked card...
+	if (targetCard != KBroadcastToAllCards && iCardInfo[targetCard]->iIsLocked)
+		{
+		// ...and not command used in init or CMD42 sequence...
+		if (!(	((cmd.iSpec.iCommandClass & (KMMCCmdClassApplication | KMMCCmdClassBasic | KMMCCmdClassLockCard)) != 0)
+			||	(cmd.iCommand == ECmdSetBlockLen) || (cmd.iCommand == ECmdAppCmd) ))
+			{
+			lock_unlock_failed = ETrue;
+			cmd.iCommand = (TMMCCommandEnum) -1;	// skip case processing
+			}
+		}
+
+	SMF_BEGIN
+
+	switch (cmd.iCommand)
+		{
+		case ECmdGoIdleState:	// CMD0
+			if (iAddressedCard != KBroadcastToAllCards)
+				iCardInfo[iAddressedCard]->iState = ECardStateIdle;
+			else
+				{
+				for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+					iCardInfo[i]->iState = ECardStateIdle;
+				}
+			break;
+
+		case ECmd41:
+		case ECmdSendOpCond:	// CMD1
+			{
+			if (iAddressedCard != KBroadcastToAllCards)
+				iCardInfo[iAddressedCard]->iState = ECardStateReady;
+			else
+				{
+				for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+					iCardInfo[i]->iState = ECardStateReady;
+				}
+
+			// bit31 is set to indicate cards are not still powering up
+			TUint32 r3 = KMMCWinsCardOCRValue | KMMCOCRBusy;
+			TMMC::BigEndian4Bytes(cmd.iResponse, r3);
+			}
+			break;
+
+		case ECmdAllSendCID:	// CMD2
+			{
+			TInt idx;
+			if (iAddressedCard != KBroadcastToAllCards)
+				{
+				idx = iAddressedCard;
+				__ASSERT_DEBUG(
+					iCardInfo[iAddressedCard]->iState == ECardStateReady,
+					DWinsSDIOStack::Panic(DWinsSDIOStack::EStkIMCBadStateCmd2));
+				}
+			else
+				idx = FindAnyCardInStack(ECardStateReady);
+
+			if (idx == -1)
+				rto = ETrue;
+			else
+				{
+				iCardInfo[idx]->iCID.Copy(cmd.iResponse);
+				iCardInfo[idx]->iState = ECardStateIdent;
+				}
+			}
+			break;
+
+		case ECmdSetRelativeAddr:	// CMD3
+			{
+			TInt idx;
+			if (iAddressedCard != KBroadcastToAllCards)
+				{
+				__ASSERT_DEBUG(
+					iCardInfo[iAddressedCard]->iState == ECardStateIdent,
+					DWinsSDIOStack::Panic(DWinsSDIOStack::EStkIMCBadStateCmd3));
+				
+				if (iCardInfo[iAddressedCard]->iIsSDCard)
+					{
+					static TUint16 RCACounter = 0x1234;
+					// SD Cards publish RCAs
+					++RCACounter;
+					iCardInfo[iAddressedCard]->iRCA = RCACounter;
+					iCardInfo[iAddressedCard]->iState = ECardStateStby;
+					TUint32 r6 = TUint32(RCACounter) << 16;
+					TMMC::BigEndian4Bytes(&cmd.iResponse[0],r6); // Ignore bits 47-40
+					}
+				else
+					{
+					iCardInfo[iAddressedCard]->iRCA = TUint16(cmd.iArgument >> 16);
+					iCardInfo[iAddressedCard]->iState=ECardStateStby;
+					}
+				}
+			else
+				{
+				// MultiMediaCards are assigned RCAs
+				idx = FindOneCardInStack(ECardStateIdent);
+				iCardInfo[iAddressedCard]->iRCA = TUint16(cmd.iArgument >> 16);
+				iCardInfo[iAddressedCard]->iState=ECardStateStby;
+				targetCard = iAddressedCard;
+				}
+			}
+			break;
+
+		case ECmd6:
+			// if ACMD6 then change bus width
+			if (cmd.iSpec.iCommandClass == KMMCCmdClassApplication)
+				{
+				switch (cmd.iArgument)
+					{
+				case 0x00:
+					iCardInfo[iAddressedCard]->iBusWidth = 1;
+					break;
+				case 0x02:
+					iCardInfo[iAddressedCard]->iBusWidth = 4;
+					break;
+				default:
+					DWinsSDIOStack::Panic(DWinsSDIOStack::EStkIMCCmd6InvalidWidth);
+					break;
+					}
+				}
+			break;
+
+		case ECmdSelectCard:		// CMD7
+			{
+			// switch to broadcast mode so the currently selected and new cards
+			// receive the command simultaneously.
+
+			TInt idx = FindAnyCardInStack(ECardStateTran);
+			if (idx != -1)
+				iCardInfo[idx]->iState = ECardStateStby;
+			if ((iAddressedCard=targetCard) == KBroadcastToAllCards)
+				rto = ETrue;
+			else
+				{
+				iCardInfo[targetCard]->iState = ECardStateTran;
+				targetCard = targetCard;
+				}
+			}
+			break;
+
+		case ECmdSendStatus:
+			// R1 response so status return as for any other R1 command.
+			if (cmd.iSpec.iCommandClass == KMMCCmdClassApplication)
+				{
+				__ASSERT_DEBUG(
+					iCardInfo[targetCard]->iIsSDCard,
+					DWinsSDIOStack::Panic(DWinsSDIOStack::EStkICMACMD13NotSD));
+
+				memset(cmd.iDataMemoryP, 0, KSDStatusBlockLength);
+				if (iCardInfo[targetCard]->iBusWidth == 1)
+					cmd.iDataMemoryP[0] = 0x00 << 6;
+				else	// if (iCardInfo[targetCard]->iBusWidth == 4)
+					cmd.iDataMemoryP[0] = 0x02 << 6;
+				cmd.iDataMemoryP[7] = 0x28;		// PROTECTED_AREA_SIZE
+				}
+			break;
+
+		case ECmdReadSingleBlock:
+		case ECmdReadMultipleBlock:
+			{
+			winHandle=iCardInfo[targetCard]->iAreaHandles[KSDUserArea];
+
+			if ( cmd.iSpec.iUseStopTransmission && cmd.iBlockLength >= cmd.iTotalLength)
+				return( KMMCErrNotSupported );
+
+    		TMMCErr err;
+			TInt pos = cmd.iArgument;
+    		if (SetFilePointer(winHandle,pos,NULL,FILE_BEGIN)==0xffffffffu)
+        		err=MapLastErrorMmc();
+    		else
+        		{
+	    		DWORD res;
+				TInt len = cmd.iTotalLength;
+		        if (ReadFile(winHandle,(TAny*)cmd.iDataMemoryP,len,&res,NULL)==FALSE)
+                    err=MapLastErrorMmc();
+                else if (res!=(DWORD)len)
+                    err=KMMCErrGeneral;
+                else
+                    err=KMMCErrNone;
+				}
+			if (err!=KMMCErrNone)
+				return(err);
+			break;
+			}
+
+		case ECmd22:
+			if (cmd.iSpec.iCommandClass == KMMCCmdClassApplication)
+				{
+				TMMC::BigEndian4Bytes(cmd.iResponse, iMBWOKBlocks);
+				}
+			break;
+		// ------------------------------------------------------------------
+		case ECmdWriteBlock:
+		case ECmdWriteMultipleBlock:
+			{
+			TUint32 writeLen;
+
+			// periodically fail multi-block writes to test ACMD22 error recovery
+			if (cmd.iCommand != ECmdWriteMultipleBlock)
+				writeLen = cmd.iTotalLength;
+			else
+				{
+				const TInt KMaxFailCnt = 4;
+				static TInt failCnt = 0;
+				const TInt KMaxFailBlock = 4;
+				static TInt failBlocks = 0;
+				
+				failCnt = (failCnt + 1) % KMaxFailCnt;
+				if (failCnt != 0)
+					writeLen = cmd.iTotalLength;
+				else
+					{
+					failBlocks = (failBlocks + 1) % KMaxFailBlock;
+					
+					// fail at least one block
+					TInt totalBlocks = cmd.iTotalLength / cmd.iBlockLength;
+					TInt blocksToFail = Min(failBlocks + 1, totalBlocks);	// fail at least one block
+					iMBWOKBlocks = (totalBlocks - blocksToFail);
+					writeLen = iMBWOKBlocks * cmd.iBlockLength;
+					if (writeLen == 0)
+						return KMMCErrDataTimeOut;
+					}
+				}
+			
+			HANDLE h=iCardInfo[targetCard]->iAreaHandles[KSDUserArea];
+
+    		TMMCErr err;
+			TInt pos = cmd.iArgument;
+    		if (SetFilePointer(h, pos, NULL, FILE_BEGIN)==0xffffffffu)
+        		err = MapLastErrorMmc();
+    		else
+        		{
+	    		DWORD res;
+				if (! WriteFile(h, (LPCVOID)cmd.iDataMemoryP,writeLen,&res,NULL))
+                    err=MapLastErrorMmc();
+                else if (res!=(DWORD)writeLen)
+                    err=KMMCErrGeneral;
+                else
+                    err=KMMCErrNone;
+				}
+
+			if (err!=KMMCErrNone)
+				return(err);
+			if (writeLen != cmd.iTotalLength)
+				return KMMCErrDataTimeOut;
+			}
+			break;
+
+		case ECmdAppCmd:
+			// targetCard == -1 when ACMD41 being sent because not yet supplied
+			if (iAddressedCard != KBroadcastToAllCards)
+				{
+				// timeout if addressed card is not SD
+				if (! iCardInfo[iAddressedCard]->iIsSDCard)
+					rto = ETrue;
+				}
+			else
+				{
+				// request sent to specific non-SD card
+				if (targetCard != -1 && ! iCardInfo[targetCard]->iIsSDCard)
+					rto = ETrue;
+				}
+			break;
+
+		case ECmdSendCSD:
+			{
+			iCardInfo[targetCard]->GetCSD(cmd.iResponse);
+			break;
+			}
+
+		// ------------------------------------------------------------------
+		case ECmdLockUnlock:
+			// in EPOC, Lock() does not actually lock the card.  It just sets the
+			// password.  This means that the card is still accessible to the user,
+			// but must be unlocked the next time it is powered up.
+
+			// a real card will transiently go into rcv and prg state while processing
+			// this command.  When finished, it will fall back into tran state.
+			// The R1 response is sent immediately after CMD42.  CIMReadWriteBlocksSM()
+			// sends CMD13 to find out whether or not LOCK_UNLOCK_FAIL was set.
+
+			// the asserts in this case protect against invalid data being sent from the
+			// media driver.  A real card would fail these corrupt data blocks.
+
+			{
+			const TInt8 cmd_byte(*cmd.iDataMemoryP);
+			__ASSERT_DEBUG(										// ensure not CLR_PWD && SET_PWD
+				!((cmd_byte & KMMCLockUnlockClrPwd) && (cmd_byte & KMMCLockUnlockSetPwd)),
+				DWinsSDIOStack::Panic(DWinsSDIOStack::EWinsMMCCorruptCommand) );
+			
+			__ASSERT_DEBUG(										// not actually lock a card
+				!(cmd_byte & KMMCLockUnlockLockUnlock),
+				DWinsSDIOStack::Panic(DWinsSDIOStack::EWinsMMCLockAttempt) );
+
+			if (cmd_byte & KMMCLockUnlockErase)					// ERASE (not supported)
+				return KMMCErrNotSupported;
+
+			const TInt8 pwd_len = *(cmd.iDataMemoryP + 1);
+			const TPtrC8 pwd(cmd.iDataMemoryP + 2, pwd_len);
+
+			if ((cmd_byte & KMMCLockUnlockClrPwd) != 0)			// CLR_PWD == 1
+				{
+				__ASSERT_DEBUG(
+					pwd_len >= 0 && pwd_len <= KMaxMediaPassword,
+					DWinsSDIOStack::Panic(DWinsSDIOStack::EWinsMMCCorruptCommand));
+
+				if (iCardInfo[targetCard]->iIsLocked)						// clear when locked
+					nextCMD42Failed = ETrue;
+				else														// clear when unlocked
+					{
+					if (iCardInfo[targetCard]->iPWD->Compare(pwd) != 0)		// clear when unlocked with wrong password
+						nextCMD42Failed = ETrue;
+					else													// clear when unlocked with right password
+						{
+						// Clear from password store 
+						iCardInfo[targetCard]->iPWD->Zero();
+						iCardInfo[targetCard]->iIsLocked = EFalse;
+						nextCMD42Failed = EFalse;
+						
+						// Clear from environment settings
+						TInt cardNum=(targetCard==0) ? *Wins::CurrentPBusDevicePtr() : 0; // Can't be -1 at this stage
+						SetMediaPasswordEnvironmentVar(MMCSocket()->iSocketNumber,cardNum,*(iCardInfo[targetCard]->iPWD));
+						}
+					}
+				}
+			else if ((cmd_byte & KMMCLockUnlockSetPwd) == 0)	// SET_PWD == 0: unlock
+				{
+				__ASSERT_DEBUG(
+					pwd_len >= 0 && pwd_len <= KMaxMediaPassword,
+					DWinsSDIOStack::Panic(DWinsSDIOStack::EWinsMMCCorruptCommand) );
+				
+				if (! iCardInfo[targetCard]->iIsLocked)						// unlock when unlocked
+					nextCMD42Failed = ETrue;
+				else
+					{
+					if (iCardInfo[targetCard]->iPWD->Compare(pwd) != 0)		// unlock when locked with wrong password
+						nextCMD42Failed = ETrue;
+					else													// unlock when locked with right password
+						{
+						iCardInfo[targetCard]->iIsLocked = EFalse;
+						nextCMD42Failed = EFalse;
+						}
+					}
+				}
+			else /* ((cmd_byte & KMMCLockUnlockSetPwd) != 0) */	// SET_PWD == 1
+				{
+				__ASSERT_DEBUG(
+					cmd_byte & KMMCLockUnlockSetPwd,
+					DWinsSDIOStack::Panic(DWinsSDIOStack::EWinsMMCCorruptCommand) );
+
+				// if pwd_len < iCardInfo[targetCard]->iPWD->Length() then data block must be invalid.
+				// This can be caused by bad user input rather than inaccurate formation.
+				if (!(	pwd_len >= iCardInfo[targetCard]->iPWD->Length()
+					&&	pwd_len <= iCardInfo[targetCard]->iPWD->Length() + KMaxMediaPassword ))
+					{
+					nextCMD42Failed = ETrue;
+					}
+				else
+					{
+					const TInt old_pwd_len = iCardInfo[targetCard]->iPWD->Length();
+					TPtrC8 old_pwd(cmd.iDataMemoryP + 2, old_pwd_len);
+					TPtrC8 new_pwd(cmd.iDataMemoryP + 2 + old_pwd_len, pwd_len - old_pwd_len);
+
+					// card must not be locked and supplied current password must be correct
+					if (iCardInfo[targetCard]->iIsLocked || iCardInfo[targetCard]->iPWD->Compare(old_pwd) != 0)
+						nextCMD42Failed = ETrue;
+					else
+						{
+						// Set in password store
+						iCardInfo[targetCard]->iPWD->Copy(new_pwd);
+						nextCMD42Failed = EFalse;
+						
+						// Set in environment settings
+						TInt cardNum=(targetCard==0) ? *Wins::CurrentPBusDevicePtr() : 0; // Can't be -1 at this stage
+						SetMediaPasswordEnvironmentVar(MMCSocket()->iSocketNumber,cardNum,*(iCardInfo[targetCard]->iPWD));
+						}
+					}
+				}	// else /* ((cmd_byte & KMMCLockUnlockSetPwd) != 0) */
+			}	// case ECmdLockUnlock
+			break;
+
+		// ------------------------------------------------------------------
+		case ECmd5:
+			{
+			if (!iCardInfo[iAddressedCard]->iIsSDCard)
+				{
+				rto = ETrue;
+				}
+			else
+				{
+				// bit31 is set to indicate cards are not still powering up
+				TUint32 r5 = 0;
+				
+				r5 |= KWinsSdioFunctionCount << KSDIOFunctionCountShift;
+				r5 |= KWinsSdioMemoryPresent ? KSDIOMemoryPresent : 0;
+				r5 |= KMMCWinsCardOCRValue;
+				r5 |= KSDIOReady;
+
+				TMMC::BigEndian4Bytes(cmd.iResponse, r5);
+				}
+			}
+			break;
+
+		case ECmd52:
+			{
+			if (!iCardInfo[iAddressedCard]->iIsSDCard)
+				{
+				rto = ETrue;
+				}
+			else
+				{
+				const TUint32 address  = (cmd.iArgument >> KSdioCmdAddressShift)  & KSdioCmdAddressMask;
+				const TUint32 function = (cmd.iArgument >> KSdioCmdFunctionShift) & KSdioCmdFunctionMask;
+				
+				const TUint32 ioAddress = address + (0x100*function);
+
+				const SRegisterMapInfo* entry = NULL;
+				entry = FindIoEntryFromAddress(IoMapTop, ioAddress);
+				
+				if(!entry)
+					{
+					rto = ETrue;
+					}
+				else
+					{
+					if((cmd.iArgument & KSdioCmdDirMask) == KSdioCmdRead)
+						{
+						TUint8 dataVal = 0;
+						if(entry->iAccessFunction)
+							{
+							entry->iAccessFunction(targetCard, entry->iRegisterID, this, ETrue, dataVal);
+							}
+						
+						if(entry->iDataP)
+							{
+							TUint entryOffset = ioAddress - entry->iAddress;
+							if(entryOffset >= 0 && entryOffset < entry->iLength)
+								{
+								dataVal = ((TUint8*)entry->iDataP)[entryOffset];
+								}
+							}
+
+						TUint32 r5 = 0;
+
+						r5 |= dataVal;
+						r5 |= 0x1000;
+
+						TMMC::BigEndian4Bytes(cmd.iResponse, r5);
+						}
+					else
+						{
+						const TBool raw = (cmd.iArgument & KSdioCmdRAW) ? ETrue : EFalse;
+						TUint8 data = (TUint8)(cmd.iArgument & KSdioCmdDataMask);
+
+						if(entry->iDataP)
+							{
+							*(TUint8*)(entry->iDataP) &= ~(entry->iFlags);
+							*(TUint8*)(entry->iDataP) |= (data & entry->iFlags);
+							}
+						
+						if(entry->iAccessFunction)
+							{
+							entry->iAccessFunction(targetCard, entry->iRegisterID, this, EFalse, data);
+							}
+						
+						TUint32 r5 = 0;
+							
+						if(raw)
+							{
+							r5 |= data;
+							}
+
+//						r5 |= 0x1000;
+						r5 |= 0x2000;
+
+						TMMC::BigEndian4Bytes(cmd.iResponse, r5);
+						}			
+					}
+				}
+			}
+			break;
+
+		case ECmd53:
+			{
+			TBool a = EFalse;
+			if(a)
+				{
+				return(KMMCErrDataTimeOut);
+				}
+
+			if (!iCardInfo[iAddressedCard]->iIsSDCard)
+				{
+				rto = ETrue;
+				}
+			else
+				{
+				const TUint32 address  = (cmd.iArgument >> KSdioCmdAddressShift)  & KSdioCmdAddressMask;
+				const TUint32 function = (cmd.iArgument >> KSdioCmdFunctionShift) & KSdioCmdFunctionMask;
+				
+				const TUint32 ioAddress = address + (0x100*function);
+
+				if((cmd.iArgument & KSdioCmdBlockMode) == KSdioCmdBlockMode)
+					{
+					// Block mode not supported (yet)
+					rto = ETrue;
+					}
+				else
+					{
+					TUint32 byteCount = cmd.iArgument & KSdioCmdCountMask;
+					TUint32 count = 0;
+					TUint32 currentAddress = ioAddress;
+
+					TUint32 inc = ((cmd.iArgument & KSdioCmdAutoInc) == KSdioCmdAutoInc) ? 1 : 0;
+		
+					while(count < byteCount)
+						{
+						const SRegisterMapInfo* entry = NULL;
+						entry = FindIoEntryFromAddress(IoMapTop, currentAddress);
+
+						if(entry)
+							{
+							if((cmd.iArgument & KSdioCmdDirMask) == KSdioCmdRead)
+								{
+								TUint8 dataVal = 0;
+								if(entry->iAccessFunction)
+									{
+									entry->iAccessFunction(targetCard, entry->iRegisterID, this, ETrue, dataVal);
+									}
+								
+								if(entry->iDataP)
+									{
+									TUint entryOffset = currentAddress - entry->iAddress;
+									if(entryOffset >= 0 && entryOffset < entry->iLength)
+										{
+										dataVal = ((TUint8*)entry->iDataP)[entryOffset];
+										}
+									}
+
+								cmd.iDataMemoryP[count] = dataVal;
+								}
+							else
+								{
+								TUint8 data = cmd.iDataMemoryP[count];
+
+								if(entry->iDataP)
+									{
+									TUint entryOffset = currentAddress - entry->iAddress;
+									if(entryOffset >= 0 && entryOffset < entry->iLength)
+										{
+										((TUint8*)entry->iDataP)[entryOffset] &= ~(entry->iFlags);
+										((TUint8*)entry->iDataP)[entryOffset] |= (data & entry->iFlags);
+										}
+
+									}
+								
+								if(entry->iAccessFunction)
+									{
+									entry->iAccessFunction(targetCard, entry->iRegisterID, this, EFalse, data);
+									}								
+								}			
+							}
+							
+							count++;
+							currentAddress += inc;
+						}
+
+						TUint32 r5 = 0;
+						
+//						r5 |= 0x2000;
+						r5 |= 0x1000;
+
+						TMMC::BigEndian4Bytes(cmd.iResponse, r5);
+					}
+				}
+			}
+			break;
+
+		// ------------------------------------------------------------------
+		default:
+			break;
+		}
+
+	if (rto)
+		return(KMMCErrResponseTimeOut);
+
+	cmd.iCommand = origCmd;
+	// If this is an R1 or R1b response type command then return card status as a response
+	if (	targetCard != -1
+		&&	(cmd.iSpec.iResponseType==ERespTypeR1 || cmd.iSpec.iResponseType==ERespTypeR1B) )
+		{
+		TUint32 resp(
+				iCardInfo[targetCard]->iState
+			|	((iCardInfo[targetCard]->iIsLocked ? 1 : 0) << 25)
+			|	((lock_unlock_failed ? 1 : 0) << 24) );
+
+		if (iCMD42Failed)								// previous CMD42
+			{
+			resp |= KMMCStatErrLockUnlock;
+			nextCMD42Failed = EFalse;
+			}
+		iCMD42Failed = nextCMD42Failed;
+		TMMC::BigEndian4Bytes(&cmd.iResponse[0],resp); // Ignore bits 47-40
+		}
+	SMF_END
+	}
+
+TInt DWinsSDIOStack::AccessIoEnable(TInt /*aTargetCard*/, TInt /*aVal*/, TAny* aSelfP, TBool aRead, TUint8& aData)
+//
+// Access the IO Enable register
+//
+	{
+	DWinsSDIOStack& self = *(DWinsSDIOStack*)aSelfP;
+	
+	if(aRead)
+		{
+		aData = GCCCRRegIoEnable;
+		}
+	else
+		{
+		TUint8 mask = 0;
+		for(TInt i=0; i<KWinsSdioFunctionCount; i++)
+			{
+			mask |= (0x02 << i);
+			}
+
+		aData &= mask;
+
+		// Disable functions first...
+		GFunctionToEnable &= aData;
+		GCCCRRegIoReady   &= aData;
+		GCCCRRegIoEnable  &= aData;
+		
+		// Enabling any functions - This uses the delayed timer...
+		if((GCCCRRegIoEnable & aData) != aData)
+			{
+			GFunctionToEnable = GCCCRRegIoEnable ^ aData;
+			GCCCRRegIoEnable |= GFunctionToEnable;
+
+			self.iEnableTimer.OneShot(KFunctionEnableDelay_uS / NKern::TickPeriod());
+			}
+		}
+
+	return(KErrNone);
+	}
+
+void DWinsSDIOStack::EnableTimerCallback(TAny* /*aSelfP*/)
+	{
+	GCCCRRegIoReady |= GFunctionToEnable;
+	}
+
+TInt DWinsSDIOStack::AccessCsaWindow(TInt aTargetCard, TInt /*aVal*/, TAny* aSelfP, TBool aRead, TUint8& aData)
+//
+// Access the CSA Windoe
+//
+	{
+	TMMCErr err = KErrNone;
+
+	DWinsSDIOStack& self = *(DWinsSDIOStack*)aSelfP;
+	
+	HANDLE winHandle = self.iCardInfo[aTargetCard]->iAreaHandles[KSDIOArea];
+
+    if (SetFilePointer(winHandle, GFBR1RegCsaPtr, NULL,FILE_BEGIN) == 0xffffffffu)
+        err = MapLastErrorMmc();
+    else
+        {
+	    DWORD res;
+		TUint8 val = 0;
+		TUint len = 1;
+		
+		BOOL rwRes = FALSE;
+
+		if(aRead)
+			{
+			rwRes = ReadFile(winHandle, (TAny*)&val, len, &res, NULL);
+			}
+		else
+			{
+			val = aData;
+			rwRes = WriteFile(winHandle, (TAny*)&val, len, &res, NULL);
+			}
+
+		if(rwRes == FALSE)
+			{
+            err = MapLastErrorMmc();
+			}
+        else if(res != len)
+			{
+            err = KMMCErrGeneral;
+			}
+        else
+			{
+			if(aRead)
+				{
+				aData = val;
+				}
+
+			GFBR1RegCsaPtr++;
+            err = KMMCErrNone;
+			}
+		}
+
+	return(err);
+	}
+
+TInt DWinsSDIOStack::AccessCsaPointer(TInt /*aTargetCard*/, TInt aVal, TAny* /*aSelfP*/, TBool aRead, TUint8& aData)
+//
+// Access the CSA Windoe
+//
+	{
+	TInt err = KErrNone;
+
+	TUint32 mask  = 0;
+	TUint32 shift = 0;
+
+	switch(aVal)
+		{
+		case KFBRRegCsaPtrLo:
+			{
+			mask  = 0x0000FF;
+			shift = 0;
+			break;
+			}
+
+		case KFBRRegCsaPtrMid:
+			{
+			mask  = 0x00FF00;
+			shift = 8;
+			break;
+			}
+
+		case KFBRRegCsaPtrHi:
+			{
+			mask  = 0xFF0000;
+			shift = 16;
+			break;
+			}
+
+		default:
+			{
+			err = KErrNotSupported;
+			break;
+			}
+		}
+
+	if(err == KErrNone)
+		{
+		if(aRead)
+			{
+			aData = (TUint8)((GFBR1RegCsaPtr & mask) >> shift);
+			}
+		else
+			{
+			GFBR1RegCsaPtr &= ~mask;
+			GFBR1RegCsaPtr |= (TUint32)aData << shift;
+			}
+		}
+	
+	return(err);
+	}
+
+void DWinsSDIOStack::EnableSDIOInterrupt(TBool /*aEnable*/)
+//
+// Virtual
+//
+	{
+	}
+
+void DWinsSDIOStack::SetBusWidth(TUint32 /*aBusWidth*/)
+//
+// Virtual
+//
+	{
+	}
+
+TUint32 DWinsSDIOStack::MaxBlockSize() const
+//
+// Virtual
+//
+	{
+	return(512);
+	}
+
+
+TInt DWinsSDIOStack::FindAnyCardInStack(TMMCardStateEnum aState)
+//
+// first first active card in supplied state.  Return -1 if
+// no active card is in supplied state.
+//
+	{
+	if (iAddressedCard != KBroadcastToAllCards)
+		return (iCardInfo[iAddressedCard]->iState == aState) ? iAddressedCard : -1;
+	else
+		{
+		for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+			{
+			if (iCardInfo[i]->iState == aState)
+				return i;
+			}
+
+		return -1;
+		}
+	}
+
+TInt DWinsSDIOStack::FindFirstCardInStack(TMMCardStateEnum aState)
+//
+// find card which is active on bus and in supplied state.
+// There can be more than one active card in the the supplied state,
+// but there should be at least one.
+//
+	{
+	if (iAddressedCard != KBroadcastToAllCards)
+		{
+		__ASSERT_DEBUG(iCardInfo[iAddressedCard]->iState == aState, DWinsSDIOStack::Panic(DWinsSDIOStack::EStkFFCNotSelCard));
+		return iAddressedCard;
+		}
+	else
+		{
+		TInt idx = -1;
+		for (TInt i = 0; idx != -1 && i < KTotalWinsCardSlots; ++i)
+			{
+			if (iCardInfo[i]->iState == aState)
+				idx = i;
+			}
+
+		__ASSERT_DEBUG(idx != -1, DWinsSDIOStack::Panic(DWinsSDIOStack::EStkFFCNoneSel));
+		return idx;
+		}
+	}
+
+TInt DWinsSDIOStack::FindOneCardInStack(TMMCardStateEnum aState)
+//
+// find card which is active on bus and in supplied state.
+// There should be exactly one active card in the supplied state.
+//
+	{
+	if (iAddressedCard != KBroadcastToAllCards)
+		{
+		__ASSERT_DEBUG(iCardInfo[iAddressedCard]->iState == aState, DWinsSDIOStack::Panic(DWinsSDIOStack::EStkFOCNotSelCard));
+		return iAddressedCard;
+		}
+	else
+		{
+		TInt idx = -1;
+		for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+			{
+			if (iCardInfo[i]->iState == aState)
+				{
+				__ASSERT_DEBUG(idx == -1, DWinsSDIOStack::Panic(DWinsSDIOStack::EStkFOCMultiSel));
+				idx = i;
+				}
+			}
+
+		__ASSERT_DEBUG(idx != -1, DWinsSDIOStack::Panic(DWinsSDIOStack::EStkFOCNoneSel));
+		return idx;
+		}
+	}
+
+
+// ======== DWinsMMCMediaChange ========
+
+#pragma warning( disable : 4355 )	// this used in initializer list
+DWinsMMCMediaChange::DWinsMMCMediaChange(TInt aMediaChangeNum)
+	: DMMCMediaChange(aMediaChangeNum),
+      iDoorClosedCount(0),
+	  iMediaChangeEnable(ETrue),
+	  iStackP(NULL)
+	{
+	iMediaDoorCloseReload=2; 	// Units: In theory-20ms, Actual-100ms
+	}
+#pragma warning( default : 4355 )
+
+TInt DWinsMMCMediaChange::Create()
+//
+// Initialiser.
+//
+	{	
+	return(DMediaChangeBase::Create());
+	}
+
+void DWinsMMCMediaChange::DoorOpenService()
+//
+// Handle the media change (this function, never postponed is called on media
+// change interrupt). 
+//
+	{
+	Disable();		// Disable interrupt until door closes again.
+	iDoorOpenDfc.Enque();
+	}
+
+void DWinsMMCMediaChange::DoDoorOpen()
+//
+// Handle media door open (called on media door open interrupt). 
+//
+	{
+	iDoorClosedCount=iMediaDoorCloseReload;
+	// Just start a ticklink to poll for door closing
+	iTickLink.Periodic(KMediaChangeTickInterval,DWinsMMCMediaChange::Tick,this);
+    }
+
+void DWinsMMCMediaChange::DoDoorClosed()
+//
+// Handle media door closing (called on media door open interrupt).
+//
+	{
+
+	iTickLink.Cancel();	// Doesn't matter if wasn't enabled
+	Enable();	// Re-enable door interrupts
+
+	// While the door was open the user may have changed the card in slot 0
+	if (iStackP && *Wins::CurrentPBusDevicePtr()>=0)
+		iStackP->iCardInfo[0]=iStackP->iCardPool[*Wins::CurrentPBusDevicePtr()];
+	}
+
+void DWinsMMCMediaChange::ForceMediaChange()
+//
+// Force media change
+//
+	{
+	DoorOpenService();
+	}
+
+TMediaState DWinsMMCMediaChange::MediaState()
+//
+// Return status of media changed signal.
+//
+	{
+
+	if (iDoorClosedCount>0)
+		return(EDoorOpen);
+	return( (*Wins::MediaDoorOpenPtr())?EDoorOpen:EDoorClosed);
+	}
+
+void DWinsMMCMediaChange::Tick(TAny *aPtr)
+//
+// Called on the tick to poll for door closing (called on DFC).
+//
+	{
+
+	((DWinsMMCMediaChange*)aPtr)->TickService();
+	}
+
+void DWinsMMCMediaChange::TickService()
+//
+// Called on the tick to poll for door closing (called on DFC).
+//
+	{
+
+	__ASSERT_DEBUG(iDoorClosedCount>=0,DWinsSDIOStack::Panic(DWinsSDIOStack::EWinsMMCMediaChangeTickFault));
+	if (!(*Wins::MediaDoorOpenPtr()))
+		{
+		if (iDoorClosedCount > 0)
+			iDoorClosedCount--;
+		if (iDoorClosedCount == 0)
+			DoorClosedService();
+		}
+	else
+		iDoorClosedCount=iMediaDoorCloseReload; // Door open so start again.
+	}
+
+void DWinsMMCMediaChange::Enable()
+//
+// Enable media change 
+//
+	{
+
+	iMediaChangeEnable=ETrue;
+	}
+
+void DWinsMMCMediaChange::Disable()
+//
+// Disable media change
+//
+	{
+
+	iMediaChangeEnable=EFalse;
+	}
+
+void DWinsMMCMediaChange::MediaChangeCallBack(TAny *aPtr)
+//
+// Static called on media change
+//
+	{
+
+	DWinsMMCMediaChange* mc=(DWinsMMCMediaChange*)aPtr;
+	if (mc!=NULL&&mc->iMediaChangeEnable)
+		mc->DoorOpenService();
+	}
+
+
+// ======== TWinsCardInfo ========
+
+void TWinsCardInfo::GetCSD(TUint8* aResp) const
+	{
+	// Bits 127-96
+	TUint32 csd=(0x1<<30); 	/* CSD_STRUCTURE: CSD Version No 1.1 */
+	csd|=		(0x2<<26); 	/* SPEC_VERS: Version 2.1 */
+	csd|=		(0x0E<<16);	/* TAAC: 1mS */  
+	csd|=		(0x0A<<8);	/* NSAC: 1000 */  
+	csd|=		(0x59);		/* TRAN_SPEED: 5.0Mbit/s */  
+	TMMC::BigEndian4Bytes(&aResp[0],csd);
+	// Bits 95-64
+	const TUint32 ccc = 
+			KMMCCmdClassBasic | KMMCCmdClassBlockRead
+		|	KMMCCmdClassBlockWrite | KMMCCmdClassLockCard;
+	csd=		(ccc<<20); 	/* CCC: classes 0, 2, 4, and 7 */
+	csd|=		(0x9<<16); 	/* READ_BL_LEN: 512 bytes */
+	csd|=		(0x0<<15);	/* READ_BL_PARTIAL: No */  
+	csd|=		(0x0<<14);	/* WRITE_BLK_MISALIGN: No */  
+	csd|=		(0x0<<13);	/* READ_BLK_MISALIGN: No */  
+	csd|=		(0x0<<12);	/* DSR_IMP: No DSR */ 
+	csd|=		(0x0<<8);	/* C_SIZE: 1Mb */
+	csd|=		(0x7F);		/* C_SIZE: 1Mb (cont)*/  
+	TMMC::BigEndian4Bytes(&aResp[4],csd); 
+	// Bits 63-32
+	csd=		(3UL<<30); 	/* C_SIZE: 2Mb (cont) */
+	csd|=		(0x1<<27); 	/* VDD_R_CURR_MIN: 1mA */
+	csd|=		(0x1<<24);	/* VDD_R_CURR_MAX: 5mA */  
+	csd|=		(0x2<<21); 	/* VDD_W_CURR_MIN: 5mA */
+	csd|=		(0x3<<18);	/* VDD_W_CURR_MAX: 25mA */  
+	csd|=		(0x0<<15);	/* C_SIZE_MULT: 0 */  
+	if (! iIsSDCard)
+		{
+		csd|=		(0x0<<10);	/* SECTOR_SIZE: 1 write block */  
+		csd|=		(0x0<<5);	/* ERASE_GRP_SIZE: 1 sector */  
+		csd|=		(0x0);		/* WP_GRP_SIZE: 1 erase group */  
+		}
+	else
+		{
+		csd |= (0x00 << (46 - 32));	// ERASE_BLK_EN
+		csd |= (0x1f << (39 - 32));	// SECTOR_SIZE: 32 write blocks
+		csd |= (0x00 << (32 - 32));	// WP_GRP_SIZE: 1 erase sector.
+		}
+	TMMC::BigEndian4Bytes(&aResp[8],csd); 
+	// Bits 31-0
+	csd=		(0x0<<31); 	/* WP_GRP_ENABLE: No */
+	csd|=		(0x0<<29); 	/* DEFAULT_ECC: ? */
+	csd|=		(0x3<<26);	/* R2W_FACTOR: 8 */  
+	csd|=		(0x9<<22); 	/* WRITE_BL_LEN: 512 bytes */
+	csd|=		(0x0<<21);	/* WRITE_BL_PARTIAL: No */  
+	csd|=		(0x0<<15);	/* FILE_FORMAT_GRP: Hard disk */  
+	csd|=		(0x0<<14);	/* COPY: original */  
+	csd|=		(0x0<<13);	/* PERM_WRITE_PROTECT: No */  
+	csd|=		(0x0<<12);	/* TMP_WRITE_PROTECT: No */  
+	csd|=		(0x0<<10);	/* FILE_FORMAT: Hard disk */  
+	csd|=		(0x0<<8);	/* ECC: None */  
+	csd|=		(0x0<<1);	/* CRC: ? */  
+	csd|=		(0x1);		/* not used */  
+	TMMC::BigEndian4Bytes(&aResp[12],csd);
+	}
+
+// ======== DWinsSDIOPsu ========
+
+
+DWinsSDIOPsu::DWinsSDIOPsu(TInt aVccNum, TInt aMcId)
+	: DSDIOPsu(aVccNum, aMcId)
+	{}
+
+void DWinsSDIOPsu::Init()
+//
+// Initialise the PSU
+//
+    {
+	// Nothing to do
+    }
+
+void DWinsSDIOPsu::DoSetState(TPBusPsuState aState)
+//
+// Turn on/off the PSU. If it is possible to adjust the output voltage on this
+// PSU then retreive the required voltage level from TMMCPsu::iVoltageSetting
+// (which is in OCR register format).
+//
+    {
+
+    switch (aState)
+        {
+        case EPsuOff:
+            break;
+        case EPsuOnFull:
+            break;
+        case EPsuOnCurLimit:
+            break;
+        }
+    }
+
+TInt DWinsSDIOPsu::VoltageInMilliVolts()
+//
+// Return the level of the PSU (in mV) or -ve if error.
+//
+    {
+
+    return(0);
+    }
+
+void DWinsSDIOPsu::DoCheckVoltage()
+//
+// Check the voltage level of the PSU is as expected. Returns either KErrNone, KErrGeneral 
+// to indicate the pass/fail state or KErrNotReady if the voltage check isn't complete.
+//
+    {
+
+	ReceiveVoltageCheckResult(KErrNone);
+    }
+
+void DWinsSDIOPsu::PsuInfo(TPBusPsuInfo &anInfo)
+//
+// Return machine info relating to the MMC PSU supply
+//
+    {
+
+	anInfo.iVoltageSupported=0x00040000; // 3.0V (OCR reg. format).
+	anInfo.iMaxCurrentInMicroAmps=0;
+	anInfo.iVoltCheckInterval=0;
+	anInfo.iVoltCheckMethod=EPsuChkComparator;
+
+	anInfo.iNotLockedTimeOut=5;
+	anInfo.iInactivityTimeOut=10;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/sdcard/sdcard3c/sdio/pp_sdio.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,181 @@
+// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// PP_SDC.H
+// 
+//
+
+#ifndef __PP_SDC_H__
+#define __PP_SDC_H__
+#if defined(_UNICODE) && !defined(UNICODE)
+	#define UNICODE
+#endif
+
+#include <sdiocard.h>
+#include <emulator.h>
+
+GLREF_C TInt MapLastErrorEpoc();
+GLREF_C TMMCErr MapLastErrorMmc();
+
+const TInt KMediaChangeTickInterval=20000;	// Units 1uS
+
+const TInt KTotalWinsCardSlots=2;
+const TInt KTotalWinsCards=(KTotalWinsCardSlots+1); // Need 2 cards for slot 0
+
+const TUint32 KMMCWinsCardOCRValue = 0x00FFFF00;
+
+const TInt KSDMediaAreasPerCard = 3;
+const TInt KSDUserArea = 0;
+const TInt KSDProtectedArea = 1;
+const TInt KSDIOArea = 2;
+
+const TUint32 KWinsSdioFunctionCount = 3;
+const TUint8  KWinsSdioFunctionMask  = 0x0A;	/** TODO: Non-Contuguous functions not yet supported */
+const TBool	  KWinsSdioMemoryPresent = ETrue;
+
+const TUint32 KFunctionEnableDelay_uS = 1000000;	// 1S Second Function Enable Delay
+
+
+class TWinsCardInfo
+	{
+public:
+	void GetCSD(TUint8* aResp) const;
+public:
+	TCID iCID;
+	TMediaPassword* iPWD;				// PWD_LEN calculated from PWD.
+	TBool iIsLocked;					// Could use iCurrentCardIsLocked
+	TMMCardStateEnum iState;			// Simulation of card's current state
+	HANDLE iAreaHandles[KSDMediaAreasPerCard];
+	TRCA iRCA;
+	TBool iIsSDCard;
+	TInt iBusWidth;
+	};
+
+class DWinsSDIOStack : public DSDIOStack
+	{
+private:
+	DWinsSDIOStack(TInt aBus, DMMCSocket* aSocket);
+	TInt Init();
+private:
+	virtual void MachineInfo(TMMCMachineInfo& aMachineInfo);
+public:
+	virtual void AdjustPartialRead(const TMMCard* aCard, TUint32 aStart, TUint32 aEnd, TUint32* aPhysStart, TUint32* aPhysEnd) const;
+	virtual void GetBufferInfo(TUint8** aMDBuf, TInt* aMDBufLen);
+	virtual void AddressCard(TInt aCardNumber);
+
+	enum TWinsMMCPanic
+		{
+	    EWinsMMCLidOpenIntBind=0,
+		EWinsMMCBadMachineInfo=1,
+		EWinsMMCMediaChangeTickFault = 2,
+		EWinsMMCCorruptCommand = 3,
+		EWinsMMCLockAttempt = 4,
+		EWinsMMCAPRNotSupp = 5,
+		EWinsMMCAPRRange = 6,
+		EWinsMMCAPRBoundary = 7,
+
+		EStkFFCNotSelCard = 0x010, EStkFFCNoneSel,
+		EStkFOCNotSelCard = 0x020, EStkFOCMultiSel, EStkFOCNoneSel,
+		EStkIMCBadStateCmd2 = 0x30, EStkIMCBadStateCmd3, EStkIMCCmd6InvalidWidth,
+			EStkICMACMD13NotSD, EStkICMACMD22NotSD,
+		};
+    static void Panic(TWinsMMCPanic aPanic);
+
+	static TInt AccessIoEnable	(TInt aTargetCard, TInt aVal, TAny* aSelfP, TBool aRead, TUint8& aData);
+	static TInt AccessCsaWindow (TInt aTargetCard, TInt aVal, TAny* aSelfP, TBool aRead, TUint8& aData);
+	static TInt AccessCsaPointer(TInt aTargetCard, TInt aVal, TAny* aSelfP, TBool aRead, TUint8& aData);
+
+private:
+	// Stack service provided by ASSP layer
+	void SetBusConfigDefaults(TMMCBusConfig&, TUint aClock);
+	void InitClockOff();
+	void ASSPReset();
+	void ASSPDisengage();
+	void DoPowerDown();
+	// State Machine functions implemented in ASSP layer
+	TMMCErr DoPowerUpSM();
+	TMMCErr InitClockOnSM();
+	TMMCErr IssueMMCCommandSM();
+
+	void EnableSDIOInterrupt(TBool aEnable);
+	void SetBusWidth(TUint32 aBusWidth);
+	TUint32 MaxBlockSize() const;
+	
+
+private:
+	TInt SetupSimulatedCard(TInt aCardNum);						// init
+	TInt CreateBinFileForCard(TInt aCardNum, TInt aAreaNum, HANDLE* aHandle);
+	TInt GetTargetSlotNumber(const TRCA& anRCA);
+	TInt FindAnyCardInStack(TMMCardStateEnum aState);
+	TInt FindFirstCardInStack(TMMCardStateEnum aState);
+	TInt FindOneCardInStack(TMMCardStateEnum aState);
+
+	static void EnableTimerCallback(TAny* aPtr);
+
+private:
+	TWinsCardInfo* iCardPool[KTotalWinsCards];		// all cards
+	TWinsCardInfo* iCardInfo[KTotalWinsCardSlots];		// present cards
+	TInt iAddressedCard;
+	TBool iCMD42Failed;
+	TInt iMBWOKBlocks;
+	TUint8* iMDBuf;
+	TInt iMDBufLen;
+
+	NTimer iEnableTimer;
+
+	friend class TSDCardControllerInterfaceWins;
+	friend class DWinsMMCMediaChange;
+	};
+
+class DWinsMMCMediaChange : public DMMCMediaChange
+	{
+public:
+	DWinsMMCMediaChange(TInt aMediaChangeNum);
+	virtual TInt Create();
+	virtual void ForceMediaChange();
+	virtual void DoDoorOpen();
+	virtual void DoDoorClosed();
+	virtual TMediaState MediaState();
+protected:
+    void DoorOpenService();
+private:
+	static TInt MediaChangeDfc(TAny *aPtr);
+	static void Tick(TAny *aPtr);
+	void TickService();
+	void Enable();
+	void Disable();
+	static void MediaChangeCallBack(TAny *aPtr);
+	inline void SetStackP(DWinsSDIOStack* aStackP) {iStackP=aStackP;}	
+private:
+	TTickLink iTickLink;
+	TInt iDoorClosedCount;
+	TBool iMediaChangeEnable;
+	TInt iMediaDoorCloseReload; 	// Units: In theory-20ms, Actual-100ms  
+	DWinsSDIOStack* iStackP;
+	friend class DWinsSDIOStack;
+	};
+
+class DWinsSDIOPsu : public DSDIOPsu 
+    {
+public:
+    DWinsSDIOPsu(TInt aVccNum, TInt aMcId);
+    virtual void Init();
+	virtual void DoSetState(TPBusPsuState aState);
+	virtual TInt VoltageInMilliVolts();
+private:
+	virtual void DoCheckVoltage();
+    virtual void PsuInfo(TPBusPsuInfo &anInfo);
+    };
+
+
+#endif	// #ifndef __PP_SDC_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/sdcard/sdcard3c/sdio/pp_sdiov.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,133 @@
+// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\pp_scdv.cpp
+// WINS variant
+// 
+//
+
+#include <mmccd_ifc.h>
+#include "pp_sdio.h"
+#include <variantmediadef.h>
+
+class TSDCardControllerInterfaceWins : public TMMCardControllerInterface
+	{
+	// Factory functions
+	virtual DMMCSocket* NewSocket(TInt aSocketNum, TMMCPasswordStore* aPasswordStore);
+	virtual DMMCStack* NewStack(TInt aStackNum, DMMCSocket* aSocket);
+	virtual DMMCMediaChange* NewMediaChange(TInt aMcId);
+	virtual DMMCPsu* NewVcc(TInt aVccNum, TInt aMcId);
+	// Stack initialisation
+	virtual TInt Init();
+	// Machine configuration
+	virtual TBool IsMMCSocket(TInt aSocket,SMediaDeviceInfo& aMediaDeviceInfo);
+	virtual TInt  MediaChangeID(TInt aSocket);
+	virtual TInt  VccID(TInt aSocket);
+    };
+
+
+TInt TSDCardControllerInterfaceWins::Init()
+//
+// Initialise the Controller h/w
+// 
+	{
+	return KErrNone;
+	}
+
+TInt TSDCardControllerInterfaceWins::MediaChangeID(TInt aSocket)
+//
+// Return the socket's media change index
+//
+	{
+	return aSocket;
+	}
+
+TInt TSDCardControllerInterfaceWins::VccID(TInt aSocket)
+//
+// Return the socket's PSU index
+//
+	{
+	return aSocket;
+	}
+
+static const TInt DriveNumbers[MMC0_DRIVECOUNT]={MMC0_DRIVELIST};
+_LIT(KLitMmcSocketName,MMC0_DRIVENAME);
+TBool TSDCardControllerInterfaceWins::IsMMCSocket(TInt aSocket,SMediaDeviceInfo& aMediaDeviceInfo)
+//
+// Confirm whether an MMC stack is supported on the specified
+// socket and if it is, the Media Info. for that socket.
+//
+	{
+	
+	if (aSocket==0)
+		{
+		aMediaDeviceInfo.iDevice=MEDIA_DEVICE_MMC;
+		aMediaDeviceInfo.iDriveCount=MMC0_DRIVECOUNT;
+		aMediaDeviceInfo.iDriveList=&DriveNumbers[0];
+		aMediaDeviceInfo.iNumMedia=MMC0_NUMMEDIA;
+		aMediaDeviceInfo.iDeviceName=&KLitMmcSocketName;
+		return(ETrue);
+		}
+	else
+		return(EFalse);	
+	}
+
+DMMCSocket* TSDCardControllerInterfaceWins::NewSocket(TInt aSocketNum, TMMCPasswordStore* aPasswordStore)
+//
+// Create a new platform-specific socket
+//
+	{
+	return new DSDIOSocket(aSocketNum, aPasswordStore);
+	}
+
+DMMCStack* TSDCardControllerInterfaceWins::NewStack(TInt aStackNum, DMMCSocket* aSocket)
+//
+// Create a new platform-specific stack
+//
+	{
+	return new DWinsSDIOStack(aStackNum, aSocket);
+	}
+
+DMMCMediaChange* TSDCardControllerInterfaceWins::NewMediaChange(TInt aMcId)
+//
+// Create a new platform-specific media change
+//
+	{
+	return new DWinsMMCMediaChange(aMcId);
+	}
+
+DMMCPsu* TSDCardControllerInterfaceWins::NewVcc(TInt aVccNum, TInt aMcId)
+//
+// Create a new platform-specific PSU
+//
+	{
+	return new DWinsSDIOPsu(aVccNum, aMcId);
+	}
+
+/********************************************
+ * Extension entry point
+ ********************************************/
+
+DECLARE_STANDARD_EXTENSION()
+	{
+	__KTRACE_OPT(KPBUS1,Kern::Printf("Starting SD interface"));
+	TInt r=KErrNoMemory;
+	
+	TSDCardControllerInterfaceWins* pI=new TSDCardControllerInterfaceWins;
+	if (pI)
+		r=pI->Create();
+
+	__KTRACE_OPT(KPBUS1,Kern::Printf("Returns %d",r));
+	return r;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/sdcard/sdcard4c/pp_cprm.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1327 @@
+// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include "plat_priv.h"
+#include <property.h>
+#include <variant.h>
+#include "pp_cprm.h" 
+
+const TInt  KDiskSectorSize=512;
+
+const TInt KTotalMDiskSize=0x100000; // 1MB (if changing this then also change CSD response)
+
+// ======== error code conversion ========
+
+GLDEF_C TInt MapLastErrorEpoc()
+//
+// map an Win32 error code to Epoc32 value
+//
+	{
+	TInt res=KErrGeneral;
+	switch (GetLastError())
+		{
+		case ERROR_SHARING_VIOLATION : res=KErrAccessDenied; break;
+		case ERROR_LOCK_VIOLATION : res=KErrLocked; break;
+		case ERROR_FILE_NOT_FOUND: res=KErrNotFound; break;
+		case ERROR_PATH_NOT_FOUND: res=KErrPathNotFound; break;
+		case ERROR_ALREADY_EXISTS:
+		case ERROR_FILE_EXISTS:
+			res=KErrAlreadyExists;
+			break;
+		case ERROR_NOT_READY: res=KErrNotReady; break;
+		case ERROR_UNRECOGNIZED_VOLUME:
+		case ERROR_NOT_DOS_DISK:
+			res=KErrUnknown;
+			break;
+		case ERROR_UNRECOGNIZED_MEDIA: res=KErrCorrupt; break;
+		case ERROR_INVALID_NAME: res=KErrBadName; break;
+		case ERROR_NO_MORE_FILES: res=KErrEof; break;
+		}
+	return(res);
+	}
+
+GLDEF_C TMMCErr MapLastErrorMmc()
+//
+// map Win32 error to a TMMCErr error.
+//
+	{
+	DWORD r=GetLastError();
+	TInt res=KErrGeneral;
+	switch (r)
+		{
+		case ERROR_SHARING_VIOLATION:
+		case ERROR_LOCK_VIOLATION:
+			res=KMMCErrLocked;			// KErrLocked
+			break;
+		case ERROR_FILE_NOT_FOUND:
+		case ERROR_PATH_NOT_FOUND:
+			res=KMMCErrNotFound;		// KErrNotFound
+			break;
+		case ERROR_ALREADY_EXISTS:
+		case ERROR_FILE_EXISTS:
+			res=KMMCErrAlreadyExists;	// KErrAlreadyExists
+			break;
+		case ERROR_NOT_READY: res=KMMCErrNoCard; break;
+		case ERROR_UNRECOGNIZED_VOLUME:
+		case ERROR_NOT_DOS_DISK:
+			res=KMMCErrGeneral;			// KErrGeneral
+			break;
+		case ERROR_UNRECOGNIZED_MEDIA:
+		case ERROR_INVALID_NAME:
+		case ERROR_NO_MORE_FILES:
+			res=KMMCErrResponseCRC; 	// KErrCorrupt
+			break;
+		}
+	return(res);
+	}
+
+// ======== DWinsCPRMStack ========
+
+DWinsCPRMStack::DWinsCPRMStack(TInt aBus, DMMCSocket* aSocket)
+: DCPRMStack(aBus, aSocket)
+	{	
+	iAddressedCard=KBroadcastToAllCards;
+//	iCMD42Failed=EFalse;
+	}
+
+
+TInt DWinsCPRMStack::Init()
+//
+// Allocate any resources. Only created once on kernel initialization so dont
+// worry about cleanup if it leaves.
+//
+	{
+	if((iCardArray = new TSDCardArray(this)) == NULL)
+		return KErrNoMemory;
+
+	TInt r=DCPRMStack::Init();
+	if(r!=KErrNone)
+		return r;
+
+	DMediaChangeBase* pMCBase = MMCSocket()->iMediaChange;
+	static_cast<DWinsMMCMediaChange*>(pMCBase)->SetStackP(this);
+	Wins::SetMediaChangeCallBackPtr(DWinsMMCMediaChange::MediaChangeCallBack, (TAny*)pMCBase);
+
+	//
+	// Over time memory can become fragmented, and so it is not possible to
+	// allocate physically contiguous pages.  Therefore, the buffers for IO
+	// are allocated at startup.
+	//
+	// block and erase sector size characteristics depend on the specific
+	// card model, and so the initial values are estimates based on a typical
+	// card.  If these do not match the actual card's block size (or erase
+	// size, for SD,) then the media driver just gets a reduced or increased
+	// buffer area, and its efficiency varies accordingly.
+	//
+	// For the WINS implementation, fragmentation does not matter because
+	// DMA is not used.  The memory must still be allocated here so MEDMMC is
+	// able to use it.
+	//
+	// The constant calculations could be folded, but this illustrates how the
+	// values are derived.
+	//
+
+	// MMC - values from Hitachi 16Mb card, datasheet HB288016MM1
+
+	// minor buffer must contain enough space for MBR or block
+	const TUint mmcBlkSzLog2 = 9;				// READ_BLK_LEN and WRITE_BLK_LEN
+	const TUint mmcBlkSz = 1 << mmcBlkSzLog2;
+	const TInt mmcMinorBufLen = Max(KDiskSectorSize, mmcBlkSz);
+
+	const TInt KMinMMCBlocksInBuffer = 8;
+	const TInt mmcCchBufLen = KMinMMCBlocksInBuffer << mmcBlkSzLog2;
+
+	const TInt mmcTotalBufLen = mmcMinorBufLen + mmcCchBufLen;
+
+	// SDCard - values from 64Mb Panasonic RP-SD064
+
+	const TUint sdBlkSzLog2 = 9;				// READ_BL_LEN and WRITE_BLK_LEN
+	const TUint sdBlkSz = 1 << sdBlkSzLog2;
+	const TInt sdMinorBufLen = Max(KDiskSectorSize, sdBlkSz);
+
+	const TUint ss = 0x1f;						// SECTOR_SIZE, add 1 for sector count
+	const TInt KMinSDBlocksInBuffer = 8;
+	const TInt sdCchBufLen = Max(KMinSDBlocksInBuffer, ss + 1) << sdBlkSzLog2;
+
+	const TInt sdTotalBufLen = sdMinorBufLen + sdCchBufLen;
+
+	const TInt totalBufLen = Max(mmcTotalBufLen, sdTotalBufLen);
+
+	iMDBuf = reinterpret_cast<TUint8*>(Kern::Alloc(totalBufLen));
+	iMDBufLen = totalBufLen;
+
+	// initialize each card on the stack
+	TInt i;
+	for (i = 0; i < KTotalWinsCards; ++i)
+		{
+		TInt r = SetupSimulatedCard(i);
+		if (r != KErrNone)
+			return r;
+		}
+
+	// initialize pointers to currently present cards
+
+	// Slot zero can toggle between no card; card 0 and card 1.  The current state is
+	// determined by *Wins::CurrentPBusDevicePtr() and toggled by pressing F4 when F5
+	// (door open) is held down.  Because this function is only executed at startup,
+	// assume start with card zero.
+	iCardInfo[0] = iCardPool[0];
+	for (i = 1; i < KTotalWinsCardSlots; ++i)
+		{
+		iCardInfo[i]=iCardPool[i+1];
+		}
+
+	return KErrNone;
+	}
+
+void DWinsCPRMStack::MachineInfo(TMMCMachineInfo& aMachineInfo)
+	{
+	aMachineInfo.iTotalSockets=KTotalWinsCardSlots;
+	aMachineInfo.iTotalMediaChanges=0;  		// Not used at present
+	aMachineInfo.iTotalPrimarySupplies=0;		// Not used at present
+
+	aMachineInfo.iSPIMode=EFalse;
+    aMachineInfo.iBaseBusNumber=0;
+
+	__ASSERT_DEBUG(aMachineInfo.iTotalSockets<=KMaxMMCardsPerStack,
+					DWinsCPRMStack::Panic(DWinsCPRMStack::EWinsMMCBadMachineInfo));
+	}
+
+void DWinsCPRMStack::AdjustPartialRead(
+#ifdef _DEBUG
+	const TMMCard* aCard,
+#else
+	const TMMCard* /*aCard*/,
+#endif
+	TUint32 aStart, TUint32 aEnd, TUint32* aPhysStart, TUint32* aPhysEnd) const
+	{
+#ifdef _DEBUG
+	const TUint32 blkLen = aCard->CSD().ReadBlockLength();
+	const TUint32 blkMsk = blkLen - 1;
+
+	__ASSERT_DEBUG(aCard->CSD().ReadBlPartial(), Panic(EWinsMMCAPRNotSupp));
+	__ASSERT_DEBUG(aEnd - aStart <= blkLen, Panic(EWinsMMCAPRRange));
+	__ASSERT_DEBUG((aEnd & ~blkMsk) > (aStart & ~blkMsk), Panic(EWinsMMCAPRBoundary));
+#endif
+
+	*aPhysStart = aStart & ~0x3;
+	*aPhysEnd = (aEnd + 0x3) & ~0x3;
+	}
+
+void DWinsCPRMStack::GetBufferInfo(TUint8** aMDBuf, TInt* aMDBufLen)
+	{
+	*aMDBuf = iMDBuf;
+	*aMDBufLen = iMDBufLen;
+	}
+
+void DWinsCPRMStack::Panic(TWinsMMCPanic aPanic)
+	{
+	_LIT(KPncNm,"PBUS-MMCSD-WINS");
+	Kern::PanicCurrentThread(KPncNm,aPanic);
+	}
+
+TInt DWinsCPRMStack::SetupSimulatedCard(TInt aCardNum)
+//
+// allocate individual card with Win32 file.  Only called at bootup, so no cleanup if fails.
+//
+	{
+	TWinsCardInfo* cip = new TWinsCardInfo;
+	if (cip == 0)
+		return KErrNoMemory;
+
+	TUint8 cid[KMMCCIDLength];
+	cid[0] = 'C';
+	cid[1] = 'I';
+	cid[2] = 'D';
+	cid[3] = TUint8('0' + aCardNum);
+	TInt j;
+	for (j = 4; j < KMMCCIDLength - 1; ++j)
+		cid[j] = 'c';
+	cid[KMMCCIDLength - 1] = '#';				// '#' = 0x23, bit zero must be 1
+	cip->iCID=cid;
+
+	cip->iPWD = new TMediaPassword;
+	if (! cip->iPWD)
+		{
+		delete cip;
+		return KErrNoMemory;
+		}
+
+	// cards in slot zero are SD
+	TInt mediaAreas;
+	if (aCardNum <= 1)
+		{
+		cip->iIsSDCard = ETrue;
+		mediaAreas = 2;
+		}
+	else
+		{
+		cip->iIsSDCard = EFalse;
+		mediaAreas = 1;
+		}
+
+	cip->iState=ECardStateIdle;
+
+	for (TInt area = 0; area < mediaAreas; ++area)
+		{
+		TInt r = CreateBinFileForCard(aCardNum, area, &cip->iAreaHandles[area]);
+		if (r != KErrNone)
+			return r;
+		}
+	iCardPool[aCardNum]=cip;
+	return(KErrNone);
+	}
+
+TInt DWinsCPRMStack::CreateBinFileForCard(TInt aCardNum, TInt aAreaNum, HANDLE* aHandle)
+//
+// create .bin file in temp directory to contain media area of card.
+//
+	{
+	const char* emulatorPath = Property::GetString("EmulatorMediaPath");
+	if (!Emulator::CreateAllDirectories(emulatorPath))
+		return Emulator::LastError();
+
+	TBuf8<KMaxFileName> fn8(_L8(emulatorPath));
+	fn8.Append(_L8("MMCCRD"));
+	fn8.AppendNum(aCardNum);
+	fn8.Append('A'+aAreaNum);
+	fn8.Append(_L8(".BIN"));
+	fn8.Append('\0');
+
+	*aHandle = CreateFileA(
+		(LPCSTR) fn8.Ptr(),					// LPCSTR lpFileName,
+		GENERIC_READ | GENERIC_WRITE,		// DWORD dwDesiredAccess
+		FILE_SHARE_READ | FILE_SHARE_WRITE,	// DWORD dwShareMode
+		NULL,								// LPSECURITY_ATTRIBUTES lpSecurityAttributes
+		OPEN_ALWAYS,						// DWORD dwCreationDisposition
+		FILE_FLAG_RANDOM_ACCESS,			// DWORD dwFlagsAndAttributes
+		NULL);								// HANDLE hTemplateFile
+
+	if (*aHandle == INVALID_HANDLE_VALUE)
+	    return MapLastErrorEpoc();
+	
+	if (	SetFilePointer(*aHandle, KTotalMDiskSize, NULL, FILE_BEGIN) == 0xffffffffu
+		||	! SetEndOfFile(*aHandle) )
+		{
+		CloseHandle(*aHandle);
+	    return MapLastErrorEpoc();
+		}
+
+	return KErrNone;
+	}
+
+void DWinsCPRMStack::SetBusConfigDefaults(TMMCBusConfig& aConfig, TUint aClock)
+	{
+	const TUint KWinsMaxHwInterfaceClk=104000;
+	const TUint KWinsResponseTimeOut=6400;
+	const TUint KWinsDataTimeOut=40000;
+	const TUint KWinsBusyTimeOut=200000;
+
+	aConfig.iBusClock = (aClock > KWinsMaxHwInterfaceClk) ? KWinsMaxHwInterfaceClk : aClock;
+	aConfig.iResponseTimeOut=KWinsResponseTimeOut;
+	aConfig.iDataTimeOut=KWinsDataTimeOut;
+	aConfig.iBusyTimeOut=KWinsBusyTimeOut;
+	}
+
+void DWinsCPRMStack::InitClockOff()
+	{
+	// empty.
+	}
+
+void DWinsCPRMStack::ASSPReset()
+	{
+	// empty.
+	}
+
+void DWinsCPRMStack::ASSPDisengage()
+	{
+	// empty.
+	}
+
+void DWinsCPRMStack::DoPowerDown()
+	{
+	// empty.
+	}
+
+LOCAL_C TInt SetMediaPasswordEnvironmentVar(TInt aSocketNum,TInt aCardNum,const TDesC8& aPasswd)
+// 
+// Set the password for local drive 'aLocalDrive', card number 'aCardNum' to 'aPasswd' - as an
+// environment variable. Note that the card number is only relevant where the emulated drive
+// supports card hot-swapping (i.e. F4 whilst F5 is held down).
+//
+	{
+	// Setup the appropriate environment variable string '_EPOC_LocDrv_<locDrvNum>_PWORD_<cardNum>'
+	TUint16 envVar[]=L"_EPOC_Socket_X_PWORD_Y";
+
+	envVar[13]=(TUint16)('0'+aSocketNum);
+	envVar[21]=(TUint16)('0'+aCardNum);
+	
+	// Setup the new value of the environment variable
+	TUint16	envVal[100];
+	TInt len=aPasswd.Length();
+
+	// the password may be empty if a card's password is cleared
+	if (len>(100-1))
+		return(KErrArgument);
+	memcpy(&envVal[0],reinterpret_cast<const TUint16 *>(aPasswd.Ptr()),len);
+	envVal[len>>1]='\0';
+
+	// Now set the new value for the environment variable
+	if (SetEnvironmentVariable(envVar,&envVal[0]))
+		return(KErrNone);
+
+	return KErrGeneral;
+	}
+
+LOCAL_C TInt MediaPasswordEnvironmentVar(TInt aSocketNum,TInt aCardNum,TDes8& aPasswd)
+// 
+// Get the password for local drive 'aLocalDrive', card number 'aCardNum' into 'aPasswd' - from
+// an environment variable. Note that the card number is only relevant where the emulated drive
+// supports card hot-swapping (i.e. F4 whilst F5 is held down).
+//
+	{
+	TUint16 envVar[]=L"_EPOC_Socket_X_PWORD_Y";
+
+	envVar[13]=(TUint16)('0'+aSocketNum);
+	envVar[21]=(TUint16)('0'+aCardNum);
+	
+	TUint16 envVal[100];	// To hold the value of the retreived environment variable
+	
+	DWORD len=GetEnvironmentVariable(envVar,&envVal[0],100);
+	if (len>(TUint)100)
+		return(KErrGeneral);
+	if (len)
+		{
+		// Found the requested environment variable so there is a password for this local drive / card. 
+		if ((len<<1)<=KMaxMediaPassword)
+			{
+			aPasswd.FillZ(KMaxMediaPassword);
+			aPasswd.Zero();
+			aPasswd.Copy(reinterpret_cast<TUint8*>(&envVal[0]),len<<1);
+			return(KErrNone);	
+			}
+		else	
+			return(KErrGeneral);	
+		}
+
+	return(KErrNotFound);
+	}
+
+TMMCErr DWinsCPRMStack::DoPowerUpSM()
+	{
+	enum states
+		{
+		EStBegin=0,
+		EStEnd
+		};
+
+	SMF_BEGIN
+
+		if(MMCSocket()->iVcc->SetState(EPsuOnCurLimit) != KErrNone)
+			return KMMCErrHardware;
+
+		for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+			{
+			// if card has a password, it will be locked on power up
+			TInt cardNum = (i==0) ? *Wins::CurrentPBusDevicePtr() : i + 1;
+			if (	cardNum >= 0
+				&&	MediaPasswordEnvironmentVar(
+						MMCSocket()->iSocketNumber, cardNum, *(iCardInfo[i]->iPWD))
+					==	KErrNone)
+				{
+				iCardInfo[i]->iIsLocked = (iCardInfo[i]->iPWD->Length() > 0);
+				}
+			else	
+				iCardInfo[i]->iIsLocked=EFalse;
+
+			iCardInfo[i]->iState = ECardStateIdle;
+			iCardInfo[i]->iRCA=0x0001;		// Default RCA - spec 2.2, s4.2.1, 5.4
+			}
+
+		ReportPowerUp();
+
+	SMF_END
+	}
+
+TMMCErr DWinsCPRMStack::InitClockOnSM()
+	{
+	enum states
+		{
+		EStBegin=0,
+		EStEnd
+		};
+	SMF_BEGIN
+
+	SMF_END
+	}
+
+void DWinsCPRMStack::AddressCard(TInt aCardNumber)
+	{
+	iAddressedCard = aCardNumber;
+	}
+
+
+TInt DWinsCPRMStack::GetTargetSlotNumber(const TRCA& anRCA)
+//
+// when the controller is given a command with an embedded RCA, this function
+// works out which physical card slot it corresponds to.  If no card has been
+// assigned the RCA then it returns -1.
+//
+	{
+	TInt targetIdx = -1;
+
+	for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+		{
+		if (iCardInfo[i]->iRCA==anRCA)
+			{
+			targetIdx=i;
+			break;
+			}
+		}
+
+	return(targetIdx);
+	}
+
+TMMCErr DWinsCPRMStack::IssueMMCCommandSM()
+	{
+	enum states
+		{
+		EStBegin=0,
+		EStEnd
+		};
+
+	TMMCCommandDesc& cmd = Command();
+
+	// If the command contains an embedded RCA then extract it	
+	TRCA tgtRCA=0;
+	TBool supRCA=EFalse;
+	if (/*cmd.iCommand == ECmdSetRelativeAddr	||	*/cmd.iCommand == ECmdSelectCard
+	||	cmd.iCommand == ECmdSendCSD			||	cmd.iCommand == ECmdSendCID
+	||	cmd.iCommand == ECmdSendStatus		||	cmd.iCommand == ECmdGoInactiveState
+	||	cmd.iCommand == ECmdFastIO 			||  cmd.iCommand == ECmdAppCmd )
+		{
+		if ((cmd.iArgument >> 16) != 0)
+			{
+			supRCA=ETrue;
+			tgtRCA=TUint16(cmd.iArgument >> 16);
+			}
+		}
+
+	// if the card contains an embedded RCA, work out which slot it corresponds to.
+	// At the end of the function, this card is used to generate the R1 response.
+	// Assume that if rca is supplied it either corresponds to the selected card or
+	// broadcast mode is on.  (An exception is CMD7 with arg0 to deselect all cards.)
+
+	TInt targetCard = supRCA ? GetTargetSlotNumber(tgtRCA) : iAddressedCard;
+	TBool rto = EFalse;							// response timeout
+
+	// if try to access card zero has been set to holding no card via F5 / F4 then timeout.
+	if ((targetCard == 0) && *Wins::CurrentPBusDevicePtr() < 0)
+		return KMMCErrResponseTimeOut;
+	
+	HANDLE winHandle;
+
+	// CMD42 is a data transfer command.  That means the R1 response that it returns
+	// immediately is the state it is in on receiving the data block, and not after
+	// processing it.  If the data block is invalid then LOCK_UNLOCK_FAILED will be
+	// set in the R1 response which is sent in reply to the next command.
+
+	TBool nextCMD42Failed = EFalse;
+	TBool lock_unlock_failed=EFalse;
+
+	// When the card is locked, it will only respond to basic command class (0) and
+	// lock card command class (7).  An exception is CMD16.  This is sent before CMD42,
+	// but is classified (MMC Spec 23.2, table 5) as belonging to classes 2 and 4.
+	// For data transfer commands, LOCK_UNLOCK_FAIL is set in response to the following
+
+	TMMCCommandEnum origCmd = cmd.iCommand;
+
+	// if targetting locked card...
+	if (targetCard != KBroadcastToAllCards && iCardInfo[targetCard]->iIsLocked)
+		{
+		// ...and not command used in init or CMD42 sequence...
+		if (!(	((cmd.iSpec.iCommandClass & (KMMCCmdClassApplication | KMMCCmdClassBasic | KMMCCmdClassLockCard)) != 0)
+			||	(cmd.iCommand == ECmdSetBlockLen) || (cmd.iCommand == ECmdAppCmd) ))
+			{
+			lock_unlock_failed = ETrue;
+			cmd.iCommand = (TMMCCommandEnum) -1;	// skip case processing
+			}
+		}
+
+	SMF_BEGIN
+
+	switch (cmd.iCommand)
+		{
+		case ECmdGoIdleState:	// CMD0
+			if (iAddressedCard != KBroadcastToAllCards)
+				iCardInfo[iAddressedCard]->iState = ECardStateIdle;
+			else
+				{
+				for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+					iCardInfo[i]->iState = ECardStateIdle;
+				}
+			break;
+
+		case ECmd41:
+		case ECmdSendOpCond:	// CMD1
+			{
+			if (iAddressedCard != KBroadcastToAllCards)
+				iCardInfo[iAddressedCard]->iState = ECardStateReady;
+			else
+				{
+				for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+					iCardInfo[i]->iState = ECardStateReady;
+				}
+
+			// bit31 is set to indicate cards are not still powering up
+			TUint32 r3 = KMMCWinsCardOCRValue | KMMCOCRBusy;
+			TMMC::BigEndian4Bytes(cmd.iResponse, r3);
+			}
+			break;
+
+		case ECmdAllSendCID:	// CMD2
+			{
+			TInt idx;
+			if (iAddressedCard != KBroadcastToAllCards)
+				{
+				idx = iAddressedCard;
+				__ASSERT_DEBUG(
+					iCardInfo[iAddressedCard]->iState == ECardStateReady,
+					DWinsCPRMStack::Panic(DWinsCPRMStack::EStkIMCBadStateCmd2));
+				}
+			else
+				idx = FindAnyCardInStack(ECardStateReady);
+
+			if (idx == -1)
+				rto = ETrue;
+			else
+				{
+				iCardInfo[idx]->iCID.Copy(cmd.iResponse);
+				iCardInfo[idx]->iState = ECardStateIdent;
+				}
+			}
+			break;
+
+		case ECmdSetRelativeAddr:	// CMD3
+			{
+			TInt idx;
+			if (iAddressedCard != KBroadcastToAllCards)
+				{
+				__ASSERT_DEBUG(
+					iCardInfo[iAddressedCard]->iState == ECardStateIdent,
+					DWinsCPRMStack::Panic(DWinsCPRMStack::EStkIMCBadStateCmd3));
+				
+				if (iCardInfo[iAddressedCard]->iIsSDCard)
+					{
+					static TUint16 RCACounter = 0x1234;
+					// SD Cards publish RCAs
+					++RCACounter;
+					iCardInfo[iAddressedCard]->iRCA = RCACounter;
+					iCardInfo[iAddressedCard]->iState = ECardStateStby;
+					TUint32 r6 = TUint32(RCACounter) << 16;
+					TMMC::BigEndian4Bytes(&cmd.iResponse[0],r6); // Ignore bits 47-40
+					}
+				else
+					{
+					iCardInfo[iAddressedCard]->iRCA = TUint16(cmd.iArgument >> 16);
+					iCardInfo[iAddressedCard]->iState=ECardStateStby;
+					}
+				}
+			else
+				{
+				// MultiMediaCards are assigned RCAs
+				idx = FindOneCardInStack(ECardStateIdent);
+				iCardInfo[iAddressedCard]->iRCA = TUint16(cmd.iArgument >> 16);
+				iCardInfo[iAddressedCard]->iState=ECardStateStby;
+				targetCard = iAddressedCard;
+				}
+			}
+			break;
+
+		case ECmd6:
+			// if ACMD6 then change bus width
+			if (cmd.iSpec.iCommandClass == KMMCCmdClassApplication)
+				{
+				switch (cmd.iArgument)
+					{
+				case 0x00:
+					iCardInfo[iAddressedCard]->iBusWidth = 1;
+					break;
+				case 0x02:
+					iCardInfo[iAddressedCard]->iBusWidth = 4;
+					break;
+				default:
+					DWinsCPRMStack::Panic(DWinsCPRMStack::EStkIMCCmd6InvalidWidth);
+					break;
+					}
+				}
+			break;
+
+		case ECmdSelectCard:		// CMD7
+			{
+			// switch to broadcast mode so the currently selected and new cards
+			// receive the command simultaneously.
+
+			TInt idx = FindAnyCardInStack(ECardStateTran);
+			if (idx != -1)
+				iCardInfo[idx]->iState = ECardStateStby;
+			if ((iAddressedCard=targetCard) == KBroadcastToAllCards)
+				rto = ETrue;
+			else
+				{
+				iCardInfo[targetCard]->iState = ECardStateTran;
+				targetCard = targetCard;
+				}
+			}
+			break;
+
+		case ECmdSendStatus:
+			// R1 response so status return as for any other R1 command.
+			if (cmd.iSpec.iCommandClass == KMMCCmdClassApplication)
+				{
+				__ASSERT_DEBUG(
+					iCardInfo[targetCard]->iIsSDCard,
+					DWinsCPRMStack::Panic(DWinsCPRMStack::EStkICMACMD13NotSD));
+
+				memset(cmd.iDataMemoryP, 0, KSDStatusBlockLength);
+				if (iCardInfo[targetCard]->iBusWidth == 1)
+					cmd.iDataMemoryP[0] = 0x00 << 6;
+				else	// if (iCardInfo[targetCard]->iBusWidth == 4)
+					cmd.iDataMemoryP[0] = 0x02 << 6;
+				cmd.iDataMemoryP[7] = 0x28;		// PROTECTED_AREA_SIZE
+				}
+			break;
+
+		case ECmdReadSingleBlock:
+		case ECmdReadMultipleBlock:
+			{
+			winHandle=iCardInfo[targetCard]->iAreaHandles[KSDUserArea];
+
+			if ( cmd.iSpec.iUseStopTransmission && cmd.iBlockLength >= cmd.iTotalLength)
+				return( KMMCErrNotSupported );
+
+    		TMMCErr err;
+			TInt pos = cmd.iArgument;
+    		if (SetFilePointer(winHandle,pos,NULL,FILE_BEGIN)==0xffffffffu)
+        		err=MapLastErrorMmc();
+    		else
+        		{
+	    		DWORD res;
+				TInt len = cmd.iTotalLength;
+		        if (ReadFile(winHandle,(TAny*)cmd.iDataMemoryP,len,&res,NULL)==FALSE)
+                    err=MapLastErrorMmc();
+                else if (res!=(DWORD)len)
+                    err=KMMCErrGeneral;
+                else
+                    err=KMMCErrNone;
+				}
+			if (err!=KMMCErrNone)
+				return(err);
+			break;
+			}
+
+		case ECmd22:
+			if (cmd.iSpec.iCommandClass == KMMCCmdClassApplication)
+				{
+				TMMC::BigEndian4Bytes(cmd.iResponse, iMBWOKBlocks);
+				}
+			break;
+		// ------------------------------------------------------------------
+		case ECmdWriteBlock:
+		case ECmdWriteMultipleBlock:
+			{
+			TUint32 writeLen;
+
+			// periodically fail multi-block writes to test ACMD22 error recovery
+			if (cmd.iCommand != ECmdWriteMultipleBlock)
+				writeLen = cmd.iTotalLength;
+			else
+				{
+				const TInt KMaxFailCnt = 4;
+				static TInt failCnt = 0;
+				const TInt KMaxFailBlock = 4;
+				static TInt failBlocks = 0;
+				
+				failCnt = (failCnt + 1) % KMaxFailCnt;
+				if (failCnt != 0)
+					writeLen = cmd.iTotalLength;
+				else
+					{
+					failBlocks = (failBlocks + 1) % KMaxFailBlock;
+					
+					// fail at least one block
+					TInt totalBlocks = cmd.iTotalLength / cmd.iBlockLength;
+					TInt blocksToFail = Min(failBlocks + 1, totalBlocks);	// fail at least one block
+					iMBWOKBlocks = (totalBlocks - blocksToFail);
+					writeLen = iMBWOKBlocks * cmd.iBlockLength;
+					if (writeLen == 0)
+						return KMMCErrDataTimeOut;
+					}
+				}
+			
+			HANDLE h=iCardInfo[targetCard]->iAreaHandles[KSDUserArea];
+
+    		TMMCErr err;
+			TInt pos = cmd.iArgument;
+    		if (SetFilePointer(h, pos, NULL, FILE_BEGIN)==0xffffffffu)
+        		err = MapLastErrorMmc();
+    		else
+        		{
+	    		DWORD res;
+				if (! WriteFile(h, (LPCVOID)cmd.iDataMemoryP,writeLen,&res,NULL))
+                    err=MapLastErrorMmc();
+                else if (res!=(DWORD)writeLen)
+                    err=KMMCErrGeneral;
+                else
+                    err=KMMCErrNone;
+				}
+
+			if (err!=KMMCErrNone)
+				return(err);
+			if (writeLen != cmd.iTotalLength)
+				return KMMCErrDataTimeOut;
+			}
+			break;
+
+		case ECmdAppCmd:
+			// targetCard == -1 when ACMD41 being sent because not yet supplied
+			if (iAddressedCard != KBroadcastToAllCards)
+				{
+				// timeout if addressed card is not SD
+				if (! iCardInfo[iAddressedCard]->iIsSDCard)
+					rto = ETrue;
+				}
+			else
+				{
+				// request sent to specific non-SD card
+				if (targetCard != -1 && ! iCardInfo[targetCard]->iIsSDCard)
+					rto = ETrue;
+				}
+			break;
+
+		case ECmdSendCSD:
+			{
+			iCardInfo[targetCard]->GetCSD(cmd.iResponse);
+			break;
+			}
+
+		// ------------------------------------------------------------------
+		case ECmdLockUnlock:
+			// in EPOC, Lock() does not actually lock the card.  It just sets the
+			// password.  This means that the card is still accessible to the user,
+			// but must be unlocked the next time it is powered up.
+
+			// a real card will transiently go into rcv and prg state while processing
+			// this command.  When finished, it will fall back into tran state.
+			// The R1 response is sent immediately after CMD42.  CIMReadWriteBlocksSM()
+			// sends CMD13 to find out whether or not LOCK_UNLOCK_FAIL was set.
+
+			// the asserts in this case protect against invalid data being sent from the
+			// media driver.  A real card would fail these corrupt data blocks.
+
+			{
+			const TInt8 cmd_byte(*cmd.iDataMemoryP);
+			__ASSERT_DEBUG(										// ensure not CLR_PWD && SET_PWD
+				!((cmd_byte & KMMCLockUnlockClrPwd) && (cmd_byte & KMMCLockUnlockSetPwd)),
+				DWinsCPRMStack::Panic(DWinsCPRMStack::EWinsMMCCorruptCommand) );
+			
+			__ASSERT_DEBUG(										// not actually lock a card
+				!(cmd_byte & KMMCLockUnlockLockUnlock),
+				DWinsCPRMStack::Panic(DWinsCPRMStack::EWinsMMCLockAttempt) );
+
+			if (cmd_byte & KMMCLockUnlockErase)					// ERASE (not supported)
+				return KMMCErrNotSupported;
+
+			const TInt8 pwd_len = *(cmd.iDataMemoryP + 1);
+			const TPtrC8 pwd(cmd.iDataMemoryP + 2, pwd_len);
+
+			if ((cmd_byte & KMMCLockUnlockClrPwd) != 0)			// CLR_PWD == 1
+				{
+				__ASSERT_DEBUG(
+					pwd_len >= 0 && pwd_len <= KMaxMediaPassword,
+					DWinsCPRMStack::Panic(DWinsCPRMStack::EWinsMMCCorruptCommand));
+
+				if (iCardInfo[targetCard]->iIsLocked)						// clear when locked
+					nextCMD42Failed = ETrue;
+				else														// clear when unlocked
+					{
+					if (iCardInfo[targetCard]->iPWD->Compare(pwd) != 0)		// clear when unlocked with wrong password
+						nextCMD42Failed = ETrue;
+					else													// clear when unlocked with right password
+						{
+						// Clear from password store 
+						iCardInfo[targetCard]->iPWD->Zero();
+						iCardInfo[targetCard]->iIsLocked = EFalse;
+						nextCMD42Failed = EFalse;
+						
+						// Clear from environment settings
+						TInt cardNum=(targetCard==0) ? *Wins::CurrentPBusDevicePtr() : 0; // Can't be -1 at this stage
+						SetMediaPasswordEnvironmentVar(MMCSocket()->iSocketNumber,cardNum,*(iCardInfo[targetCard]->iPWD));
+						}
+					}
+				}
+			else if ((cmd_byte & KMMCLockUnlockSetPwd) == 0)	// SET_PWD == 0: unlock
+				{
+				__ASSERT_DEBUG(
+					pwd_len >= 0 && pwd_len <= KMaxMediaPassword,
+					DWinsCPRMStack::Panic(DWinsCPRMStack::EWinsMMCCorruptCommand) );
+				
+				if (! iCardInfo[targetCard]->iIsLocked)						// unlock when unlocked
+					nextCMD42Failed = ETrue;
+				else
+					{
+					if (iCardInfo[targetCard]->iPWD->Compare(pwd) != 0)		// unlock when locked with wrong password
+						nextCMD42Failed = ETrue;
+					else													// unlock when locked with right password
+						{
+						iCardInfo[targetCard]->iIsLocked = EFalse;
+						nextCMD42Failed = EFalse;
+						}
+					}
+				}
+			else /* ((cmd_byte & KMMCLockUnlockSetPwd) != 0) */	// SET_PWD == 1
+				{
+				__ASSERT_DEBUG(
+					cmd_byte & KMMCLockUnlockSetPwd,
+					DWinsCPRMStack::Panic(DWinsCPRMStack::EWinsMMCCorruptCommand) );
+
+				// if pwd_len < iCardInfo[targetCard]->iPWD->Length() then data block must be invalid.
+				// This can be caused by bad user input rather than inaccurate formation.
+				if (!(	pwd_len >= iCardInfo[targetCard]->iPWD->Length()
+					&&	pwd_len <= iCardInfo[targetCard]->iPWD->Length() + KMaxMediaPassword ))
+					{
+					nextCMD42Failed = ETrue;
+					}
+				else
+					{
+					const TInt old_pwd_len = iCardInfo[targetCard]->iPWD->Length();
+					TPtrC8 old_pwd(cmd.iDataMemoryP + 2, old_pwd_len);
+					TPtrC8 new_pwd(cmd.iDataMemoryP + 2 + old_pwd_len, pwd_len - old_pwd_len);
+
+					// card must not be locked and supplied current password must be correct
+					if (iCardInfo[targetCard]->iIsLocked || iCardInfo[targetCard]->iPWD->Compare(old_pwd) != 0)
+						nextCMD42Failed = ETrue;
+					else
+						{
+						// Set in password store
+						iCardInfo[targetCard]->iPWD->Copy(new_pwd);
+						nextCMD42Failed = EFalse;
+						
+						// Set in environment settings
+						TInt cardNum=(targetCard==0) ? *Wins::CurrentPBusDevicePtr() : 0; // Can't be -1 at this stage
+						SetMediaPasswordEnvironmentVar(MMCSocket()->iSocketNumber,cardNum,*(iCardInfo[targetCard]->iPWD));
+						}
+					}
+				}	// else /* ((cmd_byte & KMMCLockUnlockSetPwd) != 0) */
+			}	// case ECmdLockUnlock
+		// ------------------------------------------------------------------
+		default:
+			break;
+		}
+
+	if (rto)
+		return(KMMCErrResponseTimeOut);
+
+	cmd.iCommand = origCmd;
+	// If this is an R1 or R1b response type command then return card status as a response
+	if (	targetCard != -1
+		&&	(cmd.iSpec.iResponseType==ERespTypeR1 || cmd.iSpec.iResponseType==ERespTypeR1B) )
+		{
+		TUint32 resp(
+				iCardInfo[targetCard]->iState
+			|	((iCardInfo[targetCard]->iIsLocked ? 1 : 0) << 25)
+			|	((lock_unlock_failed ? 1 : 0) << 24) );
+
+		if (iCMD42Failed)								// previous CMD42
+			{
+			resp |= KMMCStatErrLockUnlock;
+			nextCMD42Failed = EFalse;
+			}
+		iCMD42Failed = nextCMD42Failed;
+		TMMC::BigEndian4Bytes(&cmd.iResponse[0],resp); // Ignore bits 47-40
+		}
+	SMF_END
+	}
+
+TInt DWinsCPRMStack::FindAnyCardInStack(TMMCardStateEnum aState)
+//
+// first first active card in supplied state.  Return -1 if
+// no active card is in supplied state.
+//
+	{
+	if (iAddressedCard != KBroadcastToAllCards)
+		return (iCardInfo[iAddressedCard]->iState == aState) ? iAddressedCard : -1;
+	else
+		{
+		for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+			{
+			if (iCardInfo[i]->iState == aState)
+				return i;
+			}
+
+		return -1;
+		}
+	}
+
+TInt DWinsCPRMStack::FindFirstCardInStack(TMMCardStateEnum aState)
+//
+// find card which is active on bus and in supplied state.
+// There can be more than one active card in the the supplied state,
+// but there should be at least one.
+//
+	{
+	if (iAddressedCard != KBroadcastToAllCards)
+		{
+		__ASSERT_DEBUG(iCardInfo[iAddressedCard]->iState == aState, DWinsCPRMStack::Panic(DWinsCPRMStack::EStkFFCNotSelCard));
+		return iAddressedCard;
+		}
+	else
+		{
+		TInt idx = -1;
+		for (TInt i = 0; idx != -1 && i < KTotalWinsCardSlots; ++i)
+			{
+			if (iCardInfo[i]->iState == aState)
+				idx = i;
+			}
+
+		__ASSERT_DEBUG(idx != -1, DWinsCPRMStack::Panic(DWinsCPRMStack::EStkFFCNoneSel));
+		return idx;
+		}
+	}
+
+TInt DWinsCPRMStack::FindOneCardInStack(TMMCardStateEnum aState)
+//
+// find card which is active on bus and in supplied state.
+// There should be exactly one active card in the supplied state.
+//
+	{
+	if (iAddressedCard != KBroadcastToAllCards)
+		{
+		__ASSERT_DEBUG(iCardInfo[iAddressedCard]->iState == aState, DWinsCPRMStack::Panic(DWinsCPRMStack::EStkFOCNotSelCard));
+		return iAddressedCard;
+		}
+	else
+		{
+		TInt idx = -1;
+		for (TInt i = 0; i < KTotalWinsCardSlots; ++i)
+			{
+			if (iCardInfo[i]->iState == aState)
+				{
+				__ASSERT_DEBUG(idx == -1, DWinsCPRMStack::Panic(DWinsCPRMStack::EStkFOCMultiSel));
+				idx = i;
+				}
+			}
+
+		__ASSERT_DEBUG(idx != -1, DWinsCPRMStack::Panic(DWinsCPRMStack::EStkFOCNoneSel));
+		return idx;
+		}
+	}
+
+TMMCErr DWinsCPRMStack::CIMCalculateMediaKeySM()
+//
+// Calculate the Media Key record. 
+//
+	{
+  	enum states
+  		{
+  		EStBegin=0,
+  		EStEnd
+  		};
+
+	SMF_BEGIN
+
+  	return( KMMCErrNotSupported );
+
+	SMF_END
+	}
+
+TMMCErr DWinsCPRMStack::SetSecureCommandArgumentSM()
+//
+// Auxilary state machine function called during a secure read/write blocks operation.
+// Perform random number generation and setting the secure command argument.
+//
+	{
+  	enum states
+  		{
+  		EStBegin=0,
+  		EStEnd
+  		};
+
+	SMF_BEGIN
+
+  	return( KMMCErrNotSupported );
+
+	SMF_END
+	}				  
+  
+
+// ======== DWinsMMCMediaChange ========
+
+#pragma warning( disable : 4355 )	// this used in initializer list
+DWinsMMCMediaChange::DWinsMMCMediaChange(TInt aMediaChangeNum)
+	: DMMCMediaChange(aMediaChangeNum),
+      iDoorClosedCount(0),
+	  iMediaChangeEnable(ETrue),
+	  iStackP(NULL)
+	{
+	iMediaDoorCloseReload=2; 	// Units: In theory-20ms, Actual-100ms
+	}
+#pragma warning( default : 4355 )
+
+TInt DWinsMMCMediaChange::Create()
+//
+// Initialiser.
+//
+	{	
+	return(DMediaChangeBase::Create());
+	}
+
+void DWinsMMCMediaChange::DoorOpenService()
+//
+// Handle the media change (this function, never postponed is called on media
+// change interrupt). 
+//
+	{
+	Disable();		// Disable interrupt until door closes again.
+	iDoorOpenDfc.Enque();
+	}
+
+void DWinsMMCMediaChange::DoDoorOpen()
+//
+// Handle media door open (called on media door open interrupt). 
+//
+	{
+	iDoorClosedCount=iMediaDoorCloseReload;
+	// Just start a ticklink to poll for door closing
+	iTickLink.Periodic(KMediaChangeTickInterval,DWinsMMCMediaChange::Tick,this);
+    }
+
+void DWinsMMCMediaChange::DoDoorClosed()
+//
+// Handle media door closing (called on media door open interrupt).
+//
+	{
+
+	iTickLink.Cancel();	// Doesn't matter if wasn't enabled
+	Enable();	// Re-enable door interrupts
+
+	// While the door was open the user may have changed the card in slot 0
+	if (iStackP && *Wins::CurrentPBusDevicePtr()>=0)
+		iStackP->iCardInfo[0]=iStackP->iCardPool[*Wins::CurrentPBusDevicePtr()];
+	}
+
+void DWinsMMCMediaChange::ForceMediaChange()
+//
+// Force media change
+//
+	{
+	DoorOpenService();
+	}
+
+TMediaState DWinsMMCMediaChange::MediaState()
+//
+// Return status of media changed signal.
+//
+	{
+
+	if (iDoorClosedCount>0)
+		return(EDoorOpen);
+	return( (*Wins::MediaDoorOpenPtr())?EDoorOpen:EDoorClosed);
+	}
+
+void DWinsMMCMediaChange::Tick(TAny *aPtr)
+//
+// Called on the tick to poll for door closing (called on DFC).
+//
+	{
+
+	((DWinsMMCMediaChange*)aPtr)->TickService();
+	}
+
+void DWinsMMCMediaChange::TickService()
+//
+// Called on the tick to poll for door closing (called on DFC).
+//
+	{
+
+	__ASSERT_DEBUG(iDoorClosedCount>=0,DWinsCPRMStack::Panic(DWinsCPRMStack::EWinsMMCMediaChangeTickFault));
+	if (!(*Wins::MediaDoorOpenPtr()))
+		{
+		if (iDoorClosedCount > 0)
+			iDoorClosedCount--;
+		if (iDoorClosedCount == 0)
+			DoorClosedService();
+		}
+	else
+		iDoorClosedCount=iMediaDoorCloseReload; // Door open so start again.
+	}
+
+void DWinsMMCMediaChange::Enable()
+//
+// Enable media change 
+//
+	{
+
+	iMediaChangeEnable=ETrue;
+	}
+
+void DWinsMMCMediaChange::Disable()
+//
+// Disable media change
+//
+	{
+
+	iMediaChangeEnable=EFalse;
+	}
+
+void DWinsMMCMediaChange::MediaChangeCallBack(TAny *aPtr)
+//
+// Static called on media change
+//
+	{
+
+	DWinsMMCMediaChange* mc=(DWinsMMCMediaChange*)aPtr;
+	if (mc!=NULL&&mc->iMediaChangeEnable)
+		mc->DoorOpenService();
+	}
+
+
+// ======== TWinsCardInfo ========
+
+void TWinsCardInfo::GetCSD(TUint8* aResp) const
+	{
+	// Bits 127-96
+	TUint32 csd=(0x1<<30); 	/* CSD_STRUCTURE: CSD Version No 1.1 */
+	csd|=		(0x2<<26); 	/* SPEC_VERS: Version 2.1 */
+	csd|=		(0x0E<<16);	/* TAAC: 1mS */  
+	csd|=		(0x0A<<8);	/* NSAC: 1000 */  
+	csd|=		(0x59);		/* TRAN_SPEED: 5.0Mbit/s */  
+	TMMC::BigEndian4Bytes(&aResp[0],csd);
+	// Bits 95-64
+	const TUint32 ccc = 
+			KMMCCmdClassBasic | KMMCCmdClassBlockRead
+		|	KMMCCmdClassBlockWrite | KMMCCmdClassLockCard;
+	csd=		(ccc<<20); 	/* CCC: classes 0, 2, 4, and 7 */
+	csd|=		(0x9<<16); 	/* READ_BL_LEN: 512 bytes */
+	csd|=		(0x0<<15);	/* READ_BL_PARTIAL: No */  
+	csd|=		(0x0<<14);	/* WRITE_BLK_MISALIGN: No */  
+	csd|=		(0x0<<13);	/* READ_BLK_MISALIGN: No */  
+	csd|=		(0x0<<12);	/* DSR_IMP: No DSR */ 
+	csd|=		(0x0<<8);	/* C_SIZE: 1Mb */
+	csd|=		(0x7F);		/* C_SIZE: 1Mb (cont)*/  
+	TMMC::BigEndian4Bytes(&aResp[4],csd); 
+	// Bits 63-32
+	csd=		(3UL<<30); 	/* C_SIZE: 2Mb (cont) */
+	csd|=		(0x1<<27); 	/* VDD_R_CURR_MIN: 1mA */
+	csd|=		(0x1<<24);	/* VDD_R_CURR_MAX: 5mA */  
+	csd|=		(0x2<<21); 	/* VDD_W_CURR_MIN: 5mA */
+	csd|=		(0x3<<18);	/* VDD_W_CURR_MAX: 25mA */  
+	csd|=		(0x0<<15);	/* C_SIZE_MULT: 0 */  
+	if (! iIsSDCard)
+		{
+		csd|=		(0x0<<10);	/* SECTOR_SIZE: 1 write block */  
+		csd|=		(0x0<<5);	/* ERASE_GRP_SIZE: 1 sector */  
+		csd|=		(0x0);		/* WP_GRP_SIZE: 1 erase group */  
+		}
+	else
+		{
+		csd |= (0x00 << (46 - 32));	// ERASE_BLK_EN
+		csd |= (0x1f << (39 - 32));	// SECTOR_SIZE: 32 write blocks
+		csd |= (0x00 << (32 - 32));	// WP_GRP_SIZE: 1 erase sector.
+		}
+	TMMC::BigEndian4Bytes(&aResp[8],csd); 
+	// Bits 31-0
+	csd=		(0x0<<31); 	/* WP_GRP_ENABLE: No */
+	csd|=		(0x0<<29); 	/* DEFAULT_ECC: ? */
+	csd|=		(0x3<<26);	/* R2W_FACTOR: 8 */  
+	csd|=		(0x9<<22); 	/* WRITE_BL_LEN: 512 bytes */
+	csd|=		(0x0<<21);	/* WRITE_BL_PARTIAL: No */  
+	csd|=		(0x0<<15);	/* FILE_FORMAT_GRP: Hard disk */  
+	csd|=		(0x0<<14);	/* COPY: original */  
+	csd|=		(0x0<<13);	/* PERM_WRITE_PROTECT: No */  
+	csd|=		(0x0<<12);	/* TMP_WRITE_PROTECT: No */  
+	csd|=		(0x0<<10);	/* FILE_FORMAT: Hard disk */  
+	csd|=		(0x0<<8);	/* ECC: None */  
+	csd|=		(0x0<<1);	/* CRC: ? */  
+	csd|=		(0x1);		/* not used */  
+	TMMC::BigEndian4Bytes(&aResp[12],csd);
+	}
+
+// ======== DWinsMMCPsu ========
+
+
+DWinsMMCPsu::DWinsMMCPsu(TInt aVccNum, TInt aMcId)
+	: DMMCPsu(aVccNum, aMcId)
+	{}
+
+void DWinsMMCPsu::Init()
+//
+// Initialise the PSU
+//
+    {
+	// Nothing to do
+    }
+
+void DWinsMMCPsu::DoSetState(TPBusPsuState aState)
+//
+// Turn on/off the PSU. If it is possible to adjust the output voltage on this
+// PSU then retreive the required voltage level from TMMCPsu::iVoltageSetting
+// (which is in OCR register format).
+//
+    {
+
+    switch (aState)
+        {
+        case EPsuOff:
+            break;
+        case EPsuOnFull:
+            break;
+        case EPsuOnCurLimit:
+            break;
+        }
+    }
+
+TInt DWinsMMCPsu::VoltageInMilliVolts()
+//
+// Return the level of the PSU (in mV) or -ve if error.
+//
+    {
+
+    return(0);
+    }
+
+void DWinsMMCPsu::DoCheckVoltage()
+//
+// Check the voltage level of the PSU is as expected. Returns either KErrNone, KErrGeneral 
+// to indicate the pass/fail state or KErrNotReady if the voltage check isn't complete.
+//
+    {
+
+	ReceiveVoltageCheckResult(KErrNone);
+    }
+
+void DWinsMMCPsu::PsuInfo(TPBusPsuInfo &anInfo)
+//
+// Return machine info relating to the MMC PSU supply
+//
+    {
+
+	anInfo.iVoltageSupported=0x00040000; // 3.0V (OCR reg. format).
+	anInfo.iMaxCurrentInMicroAmps=0;
+	anInfo.iVoltCheckInterval=0;
+	anInfo.iVoltCheckMethod=EPsuChkComparator;
+    anInfo.iNotLockedTimeOut=0;  // Not enabled
+	anInfo.iInactivityTimeOut=5; // 5 Seconds
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/sdcard/sdcard4c/pp_cprm.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,161 @@
+// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// PP_SDC.H
+// 
+//
+
+#ifndef __PP_CPRM_H__
+#define __PP_CPRM_H__
+#if defined(_UNICODE) && !defined(UNICODE)
+	#define UNICODE
+#endif
+
+#include <cprm.h>
+#include <emulator.h>
+
+GLREF_C TInt MapLastErrorEpoc();
+GLREF_C TMMCErr MapLastErrorMmc();
+
+const TInt KMediaChangeTickInterval=20000;	// Units 1uS
+
+const TInt KTotalWinsCardSlots=2;
+const TInt KTotalWinsCards=(KTotalWinsCardSlots+1); // Need 2 cards for slot 0
+
+const TUint32 KMMCWinsCardOCRValue = 0x00FFFF00;
+
+const TInt KSDMediaAreasPerCard = 2;
+const TInt KSDUserArea = 0;
+const TInt KSDProtectedArea = 1;
+
+class TWinsCardInfo
+	{
+public:
+	void GetCSD(TUint8* aResp) const;
+public:
+	TCID iCID;
+	TMediaPassword* iPWD;				// PWD_LEN calculated from PWD.
+	TBool iIsLocked;					// Could use iCurrentCardIsLocked
+	TMMCardStateEnum iState;			// Simulation of card's current state
+	HANDLE iAreaHandles[KSDMediaAreasPerCard];
+	TRCA iRCA;
+	TBool iIsSDCard;
+	TInt iBusWidth;
+	};
+
+class DWinsCPRMStack : public DCPRMStack
+	{
+public:
+	DWinsCPRMStack(TInt aBus, DMMCSocket* aSocket);
+	TInt Init();
+private:
+	virtual void MachineInfo(TMMCMachineInfo& aMachineInfo);
+public:
+	virtual void AdjustPartialRead(const TMMCard* aCard, TUint32 aStart, TUint32 aEnd, TUint32* aPhysStart, TUint32* aPhysEnd) const;
+	virtual void GetBufferInfo(TUint8** aMDBuf, TInt* aMDBufLen);
+	virtual void AddressCard(TInt aCardNumber);
+
+	enum TWinsMMCPanic
+		{
+	    EWinsMMCLidOpenIntBind=0,
+		EWinsMMCBadMachineInfo=1,
+		EWinsMMCMediaChangeTickFault = 2,
+		EWinsMMCCorruptCommand = 3,
+		EWinsMMCLockAttempt = 4,
+		EWinsMMCAPRNotSupp = 5,
+		EWinsMMCAPRRange = 6,
+		EWinsMMCAPRBoundary = 7,
+
+		EStkFFCNotSelCard = 0x010, EStkFFCNoneSel,
+		EStkFOCNotSelCard = 0x020, EStkFOCMultiSel, EStkFOCNoneSel,
+		EStkIMCBadStateCmd2 = 0x30, EStkIMCBadStateCmd3,
+			EStkICMACMD13NotSD, EStkIMCCmd6InvalidWidth
+		};
+    static void Panic(TWinsMMCPanic aPanic);
+
+private:
+	// Stack service provided by ASSP layer
+	void SetBusConfigDefaults(TMMCBusConfig&, TUint aClock);
+	void InitClockOff();
+	void ASSPReset();
+	void ASSPDisengage();
+	void DoPowerDown();
+	// State Machine functions implemented in ASSP layer
+	TMMCErr DoPowerUpSM();
+	TMMCErr InitClockOnSM();
+	TMMCErr IssueMMCCommandSM();
+	TMMCErr CIMCalculateMediaKeySM();
+	TMMCErr SetSecureCommandArgumentSM();
+
+private:
+	TInt SetupSimulatedCard(TInt aCardNum);						// init
+	TInt CreateBinFileForCard(TInt aCardNum, TInt aAreaNum, HANDLE* aHandle);
+	TInt GetTargetSlotNumber(const TRCA& anRCA);
+	TInt FindAnyCardInStack(TMMCardStateEnum aState);
+	TInt FindFirstCardInStack(TMMCardStateEnum aState);
+	TInt FindOneCardInStack(TMMCardStateEnum aState);
+private:
+	TWinsCardInfo* iCardPool[KTotalWinsCards];		// all cards
+	TWinsCardInfo* iCardInfo[KTotalWinsCardSlots];		// present cards
+	TInt iAddressedCard;
+	TBool iCMD42Failed;
+	TInt iMBWOKBlocks;
+	TUint8* iMDBuf;
+	TInt iMDBufLen;
+
+	friend class TSDCardControllerInterfaceWins;
+	friend class DWinsMMCMediaChange;
+	};
+
+class DWinsMMCMediaChange : public DMMCMediaChange
+	{
+public:
+	DWinsMMCMediaChange(TInt aMediaChangeNum);
+	virtual TInt Create();
+	virtual void ForceMediaChange();
+	virtual void DoDoorOpen();
+	virtual void DoDoorClosed();
+	virtual TMediaState MediaState();
+protected:
+    void DoorOpenService();
+private:
+	static TInt MediaChangeDfc(TAny *aPtr);
+	static void Tick(TAny *aPtr);
+	void TickService();
+	void Enable();
+	void Disable();
+	static void MediaChangeCallBack(TAny *aPtr);
+	inline void SetStackP(DWinsCPRMStack* aStackP) {iStackP=aStackP;}	
+private:
+	TTickLink iTickLink;
+	TInt iDoorClosedCount;
+	TBool iMediaChangeEnable;
+	TInt iMediaDoorCloseReload; 	// Units: In theory-20ms, Actual-100ms  
+	DWinsCPRMStack* iStackP;
+	friend class DWinsCPRMStack;
+	};
+
+class DWinsMMCPsu : public DMMCPsu 
+    {
+public:
+    DWinsMMCPsu(TInt aVccNum, TInt aMcId);
+    virtual void Init();
+	virtual void DoSetState(TPBusPsuState aState);
+	virtual TInt VoltageInMilliVolts();
+private:
+	virtual void DoCheckVoltage();
+    virtual void PsuInfo(TPBusPsuInfo &anInfo);
+    };
+
+
+#endif	// #ifndef __PP_CPRM_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/sdcard/sdcard4c/pp_cprmv.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,126 @@
+// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\pp_cprmv.cpp
+// WINS variant
+// 
+//
+
+#include <mmccd_ifc.h>
+#include "pp_cprm.h"
+#include <variantmediadef.h>
+
+//
+// Factory class for creation of platform specifics
+//
+class TCPRMCardControllerInterfaceWins : public TMMCardControllerInterface
+	{
+	// Factory functions
+	virtual DMMCStack* NewStack(TInt aStackNum, DMMCSocket* aSocket);
+	virtual DMMCMediaChange* NewMediaChange(TInt aMcId);
+	virtual DMMCPsu* NewVcc(TInt aVccNum, TInt aMcId);
+	// Stack initialisation
+	virtual TInt Init();
+	// Machine configuration
+	virtual TBool IsMMCSocket(TInt aSocket,SMediaDeviceInfo& aMediaDeviceInfo);
+	virtual TInt  MediaChangeID(TInt aSocket);
+	virtual TInt  VccID(TInt aSocket);
+    };
+
+TInt TCPRMCardControllerInterfaceWins::Init()
+//
+// Initialise the Controller h/w
+// 
+	{
+	return KErrNone;
+	}
+
+TInt TCPRMCardControllerInterfaceWins::MediaChangeID(TInt aSocket)
+//
+// Return the socket's media change index
+//
+	{
+	return aSocket;
+	}
+
+TInt TCPRMCardControllerInterfaceWins::VccID(TInt aSocket)
+//
+// Return the socket's PSU index
+//
+	{
+	return aSocket;
+	}
+
+
+static const TInt DriveNumbers[MMC0_DRIVECOUNT]={MMC0_DRIVELIST};
+_LIT(KLitMmcSocketName,MMC0_DRIVENAME);
+TBool TCPRMCardControllerInterfaceWins::IsMMCSocket(TInt aSocket,SMediaDeviceInfo& aMediaDeviceInfo)
+//
+// Confirm whether an MMC stack is supported on the specified
+// socket and if it is, the Media Info. for that socket.
+//
+	{
+	
+	if (aSocket==0)
+		{
+		aMediaDeviceInfo.iDevice=MEDIA_DEVICE_MMC;
+		aMediaDeviceInfo.iDriveCount=MMC0_DRIVECOUNT;
+		aMediaDeviceInfo.iDriveList=&DriveNumbers[0];
+		aMediaDeviceInfo.iNumMedia=MMC0_NUMMEDIA;
+		aMediaDeviceInfo.iDeviceName=&KLitMmcSocketName;
+		return(ETrue);
+		}
+	else
+		return(EFalse);	
+	}
+
+DMMCStack* TCPRMCardControllerInterfaceWins::NewStack(TInt aStackNum, DMMCSocket* aSocket)
+//
+// Create a new platform-specific stack
+//
+	{
+	return new DWinsCPRMStack(aStackNum, aSocket);
+	}
+
+DMMCMediaChange* TCPRMCardControllerInterfaceWins::NewMediaChange(TInt aMcId)
+//
+// Create a new platform-specific media change
+//
+	{
+	return new DWinsMMCMediaChange(aMcId);
+	}
+
+DMMCPsu* TCPRMCardControllerInterfaceWins::NewVcc(TInt aVccNum, TInt aMcId)
+//
+// Create a new platform-specific PSU
+//
+	{
+	return new DWinsMMCPsu(aVccNum, aMcId);
+	}
+
+DECLARE_STANDARD_EXTENSION()
+//
+// Extension Entry Point
+//
+	{
+	__KTRACE_OPT(KPBUS1,Kern::Printf("Starting CPRM interface"));
+	
+	TInt r=KErrNoMemory;
+	TCPRMCardControllerInterfaceWins* pI=new TCPRMCardControllerInterfaceWins;
+	if (pI)
+		r=pI->Create();
+
+	__KTRACE_OPT(KPBUS1,Kern::Printf("Returns %d",r));
+	return r;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/serialldd.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,871 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins/specific/serialldd.cpp
+// 
+//
+
+#include "winscomm.h"
+#include <kernel/kern_priv.h>
+#include <e32hal.h>
+#include <e32uid.h>
+
+_LIT(KLddName,"Comm");
+
+const TUint KBreaking=0x02;
+const TUint KBreakPending=0x04;
+
+
+enum TPanic
+	{
+	ESetConfigWhileRequestPending,
+	ESetSignalsSetAndClear,
+	EResetBuffers,
+	ESetReceiveBufferLength,
+	};
+
+
+inline TUint32 SafeSwap(TUint32 aNewValue, TUint32& aWord)
+	{ return __e32_atomic_swp_ord32(&aWord, aNewValue); }
+
+DECLARE_STANDARD_LDD()
+	{
+	return new DDeviceComm;
+	}
+
+
+DDeviceComm::DDeviceComm()
+	{
+	iParseMask = KDeviceAllowAll;
+	iUnitsMask = 0xffffffff; // Leave units decision to the PDD
+	iVersion = TVersion(KCommsMajorVersionNumber,KCommsMinorVersionNumber,KCommsBuildVersionNumber);
+	}
+
+TInt DDeviceComm::Install()
+	{
+	return(SetName(&KLddName));
+	}
+
+void DDeviceComm::GetCaps(TDes8& aDes) const
+	{
+	TPckgBuf<TCapsDevCommV01> b;
+	b().version = TVersion(KCommsMajorVersionNumber,KCommsMinorVersionNumber,KCommsBuildVersionNumber);
+	Kern::InfoCopy(aDes,b);
+	}
+
+TInt DDeviceComm::Create(DLogicalChannelBase*& aChannel)
+	{
+	aChannel = new DChannelComm;
+	return aChannel?KErrNone:KErrNoMemory;
+	}
+
+
+DChannelComm::DChannelComm()
+	:
+		iRxCompleteDfc(DChannelComm::CompleteRxDfc,this,2),
+		iTxCompleteDfc(DChannelComm::CompleteTxDfc,this,2),
+		iRxDataAvailableDfc(DChannelComm::RxDataAvailableDfc,this,2),
+		iSigNotifyDfc(DChannelComm::SignalNotifyDfc,this,2),
+//		iBreakMinMilliSeconds(0),
+//		iTurnaroundTimerRunning(EFalse),
+//		iTurnaroundTransmitDelayed(EFalse),
+		iTurnaroundTimer(DChannelComm::TurnaroundStartDfc, this),
+		iTurnaroundDfc(DChannelComm::TurnaroundTimeout, this, 2),
+//		iTurnaroundTxDesPtr(0),
+//		iTurnaroundTxDesLength(0)
+		iBreakDfc(DChannelComm::FinishBreakDfc, this, 2)
+	{
+	iConfig.iRate = EBps9600;
+	iConfig.iDataBits = EData8;
+	iConfig.iStopBits = EStop1;
+	iConfig.iParity = EParityNone;
+	iConfig.iHandshake = KConfigObeyCTS;
+	iConfig.iParityError = KConfigParityErrorFail;
+	iConfig.iFifo = EFifoEnable;
+	iConfig.iTerminatorCount = 0;
+	iConfig.iXonChar = 0x11;
+	iConfig.iXoffChar = 0x13;
+	iConfig.iSIREnable = ESIRDisable;
+
+	iTxError = KErrNone;
+	iRxError = KErrNone;
+	iRxDAError = KErrNone;
+	iSignalError = KErrNone;
+	iClientDestPtr = 0;
+	iClientSignalResultPtr = 0;
+	iClient = &Kern::CurrentThread();
+	iClient->Open();
+	}
+
+
+DChannelComm::~DChannelComm()
+	{
+	Kern::SafeClose((DObject*&)iClient, NULL);
+	}
+
+void DChannelComm::Shutdown()
+	{
+	// clean-up...
+	if (iStatus == EActive)
+		Stop(EStopPwrDown);			// stop PDD
+
+	Complete(EAll, KErrAbort);
+
+	iRxCompleteDfc.Cancel();
+	iTxCompleteDfc.Cancel();
+	iTurnaroundTimer.Cancel();
+	iTurnaroundDfc.Cancel();
+	iSigNotifyDfc.Cancel();
+	iRxDataAvailableDfc.Cancel();
+	iBreakTimer.Cancel();
+	iBreakDfc.Cancel();
+	}
+
+TInt DChannelComm::TurnaroundSet(TUint aNewTurnaroundMilliSeconds)
+	{
+	TInt r = KErrNone;
+	iTurnaroundMinMilliSeconds = aNewTurnaroundMilliSeconds;
+	return r;
+	}
+
+TBool DChannelComm::TurnaroundStopTimer()
+// Stop the timer and DFC
+	{
+	TInt irq = 0;
+	irq = NKern::DisableInterrupts(1);
+	TBool result = iTurnaroundTimerRunning;
+	if(result)
+		{
+		iTurnaroundTimerRunning = EFalse;
+		iTurnaroundTimer.Cancel();
+		iTurnaroundDfc.Cancel();
+		}
+	NKern::RestoreInterrupts(irq);
+	return result;
+	}
+
+TInt DChannelComm::TurnaroundClear()
+// Clear any old timer and start timer based on new turnaround value.
+// Called for any change: from T > 0 to T == 0 or (T = t1 > 0) to (T = t2 > 0)
+// POLICY: If a write has already been delayed, it will be started immediately if the requested 
+//  turnaround time is elapsed else will only start after it is elapsed.
+	{
+	TInt r = KErrNone;
+	TUint delta = 0;
+
+    if(iTurnaroundTimerStartTimeValid == 1)
+		{
+		//Calculate the turnaround time elapsed so far
+		delta = (NKern::TickCount() - iTurnaroundTimerStartTime) * NKern::TickPeriod();
+		}
+	if(delta < iTurnaroundMicroSeconds)
+		{
+        iTurnaroundMinMilliSeconds = (iTurnaroundMicroSeconds - delta) / 1000;
+      	TInt irq = NKern::DisableInterrupts(1);
+		// POLICY: if timer is running from a previous read, stop it and re-start it
+		if(iTurnaroundTimerRunning)
+			{
+			iTurnaroundTimer.Cancel();
+			iTurnaroundDfc.Cancel();
+			}
+		iTurnaroundTimerRunning = ETrue;
+		TInt timeout = NKern::TimerTicks(iTurnaroundMinMilliSeconds);
+		iTurnaroundTimer.OneShot(timeout);
+    	NKern::RestoreInterrupts(irq);
+	    }
+    else
+		{
+		if(TurnaroundStopTimer())
+			{
+			// if a write is waiting, start a DFC to run it
+			TurnaroundStartDfcImplementation(EFalse);
+			}
+		}
+	iTurnaroundMinMilliSeconds = 0;
+	return r;
+	}
+
+void DChannelComm::TurnaroundStartDfc(TAny* aSelf)
+	{
+	DChannelComm* self = (DChannelComm*)aSelf;
+	self->TurnaroundStartDfcImplementation(ETrue);
+	}
+
+void DChannelComm::TurnaroundStartDfcImplementation(TBool inIsr)
+	{
+	TInt irq = 0;
+	if(!inIsr)
+		{
+		irq = NKern::DisableInterrupts(1);
+		}
+	iTurnaroundTimerRunning = EFalse;
+	if(iTurnaroundTransmitDelayed || iTurnaroundBreakDelayed)
+		{
+		if(inIsr)
+			iTurnaroundDfc.Add();
+		else
+			{
+			NKern::RestoreInterrupts(irq);
+			iTurnaroundDfc.Enque();
+			}
+		return;
+		}
+	if(!inIsr)
+		{
+		NKern::RestoreInterrupts(irq);
+		}
+	}
+
+void DChannelComm::TurnaroundTimeout(TAny* aSelf)
+	{
+	DChannelComm* self = (DChannelComm*)aSelf;
+	self->TurnaroundTimeoutImplementation();
+	}
+
+void DChannelComm::TurnaroundTimeoutImplementation(void)
+	{
+	TInt irq = NKern::DisableInterrupts(1);
+	if (iTurnaroundBreakDelayed)
+		{
+		iTurnaroundBreakDelayed=EFalse;
+		if (iStatus==EClosed)
+			{
+            NKern::RestoreInterrupts(irq);
+			Complete(EBreak, KErrNotReady);
+			return;
+			}
+
+		if (LineFail())
+			{
+            NKern::RestoreInterrupts(irq);
+			Complete(EBreak, KErrCommsLineFail);
+			return;
+			}
+
+		if (iTurnaroundTransmitDelayed)
+			{
+			//delay write by break instead of turnaround
+			iBreakDelayedTx = ETrue;
+			iBreakDelayedTxDesPtr = iTurnaroundTxDesPtr;
+			iBreakDelayedTxDesLength = iTurnaroundTxDesLength;
+			iTurnaroundTxDesPtr=0;
+			iTurnaroundTxDesLength=0;
+			iTurnaroundTransmitDelayed=EFalse;
+			}
+        NKern::RestoreInterrupts(irq);
+		BreakOn();
+		}
+	else if(iTurnaroundTransmitDelayed)
+		{
+		iTurnaroundTransmitDelayed = EFalse;	// protected -> prevent reentrant ISR
+		NKern::RestoreInterrupts(irq);
+		if (iStatus==EClosed)
+			{
+			iTurnaroundTxDesPtr = 0;
+			iTurnaroundTxDesLength = 0;
+			Complete(ETx,KErrNotReady);
+			return;
+			}
+
+		// fail signals checked in the PDD
+		InitiateWrite(iTurnaroundTxDesPtr, iTurnaroundTxDesLength);
+		iTurnaroundTimerStartTime = 0;
+		iTurnaroundTimerStartTimeValid = 2;
+		iTurnaroundTxDesPtr = 0;
+		iTurnaroundTxDesLength = 0;
+		}
+	else 
+		NKern::RestoreInterrupts(irq);
+	}
+
+TInt DChannelComm::DoCreate(TInt aUnit, const TDesC8* /*aInfo*/, const TVersion &aVer)
+	{
+	if(!Kern::CurrentThreadHasCapability(ECapabilityCommDD,__PLATSEC_DIAGNOSTIC_STRING("Checked by ECOMM.LDD (Comm Driver)")))
+		return KErrPermissionDenied;
+	if (!Kern::QueryVersionSupported(TVersion(KCommsMajorVersionNumber,KCommsMinorVersionNumber,KCommsBuildVersionNumber),aVer))
+		return KErrNotSupported;
+
+	// set up the correct DFC queue
+	SetDfcQ(((DComm*)iPdd)->DfcQ(aUnit));
+	iRxCompleteDfc.SetDfcQ(iDfcQ);
+	iTxCompleteDfc.SetDfcQ(iDfcQ);
+	iRxDataAvailableDfc.SetDfcQ(iDfcQ);
+	iSigNotifyDfc.SetDfcQ(iDfcQ);
+	iTurnaroundDfc.SetDfcQ(iDfcQ);
+	iBreakDfc.SetDfcQ(iDfcQ);
+	iMsgQ.Receive();
+
+	((DComm *)iPdd)->iLdd = this;
+
+	//setup the initial port configuration
+	PddConfigure(iConfig);
+	
+	return KErrNone;
+	}
+
+
+
+
+void DChannelComm::Start()
+	{
+	if (iStatus != EClosed)
+		{
+		PddStart();
+		iStatus = EActive;
+		}
+	}
+
+
+
+
+void DChannelComm::HandleMsg(TMessageBase* aMsg)
+	{
+	TThreadMessage& m = *(TThreadMessage*)aMsg;
+	TInt id = m.iValue;
+	if (id == (TInt)ECloseMsg)
+		{
+		Shutdown();
+		iStatus = EClosed;
+		m.Complete(KErrNone, EFalse);
+		return;
+		}
+	else if (id == KMaxTInt)
+		{
+		// DoCancel
+		DoCancel(m.Int0());
+		m.Complete(KErrNone, ETrue);
+		return;
+		}
+
+	if (id < 0)
+		{
+		// DoRequest
+		TRequestStatus* pS = (TRequestStatus*)m.Ptr0();
+		TInt r = DoRequest(~id, pS, m.Ptr1(), m.Ptr2());
+		if (r != KErrNone)
+			Kern::RequestComplete(iClient, pS, r);
+		m.Complete(KErrNone, ETrue);
+		}
+	else
+		{
+		// DoControl
+		TInt r = DoControl(id, m.Ptr0(), m.Ptr1());
+		m.Complete(r, ETrue);
+		}
+	}
+
+
+TInt DChannelComm::DoRequest(TInt aReqNo, TRequestStatus* aStatus, TAny* a1, TAny* a2)
+	{
+
+	//
+	// First check if we have started
+	//
+	if (iStatus == EOpen)
+		{
+		Start();
+		}
+
+	// Now we can dispatch the request
+	TInt r = KErrNone;
+	TInt len = 0;
+	switch (aReqNo)
+		{
+		case RBusDevComm::ERequestRead:
+			if (a2)
+				//get the size of the client data 
+				r = Kern::ThreadRawRead(iClient, a2, &len, sizeof(len));
+			if (r == KErrNone)
+				{
+				if (a1)	//doing a read
+					{
+					iRxStatus = aStatus;
+					//start the read
+					InitiateRead(a1,len);
+					}
+				else	//notify read data availiable
+					{
+					iRxDAStatus = aStatus;
+					NotifyReadDataAvailable();
+					}
+				}
+			break;
+		
+		case RBusDevComm::ERequestWrite:
+			{
+			if (iStatus == EClosed)
+				return KErrNotReady;
+			if (!a1)
+				a1 = (TAny*)1;
+			r = Kern::ThreadRawRead(iClient, a2, &len, sizeof(len));	//get the length of the data to write
+			if (r == KErrNone)
+				{
+				iTxStatus = aStatus;
+				TInt irq = NKern::DisableInterrupts(1);
+				if(iTurnaroundTimerRunning)
+					{
+					iTurnaroundTransmitDelayed = ETrue;
+					iTurnaroundTxDesPtr = a1;
+					iTurnaroundTxDesLength = len;
+					NKern::RestoreInterrupts(irq);
+					}
+				else if (iFlags & KBreaking)
+					{
+					// currently breaking, delay the write
+					iBreakDelayedTx = ETrue;
+					iBreakDelayedTxDesPtr = a1;		// save these as client could could start trashing them before the
+					iBreakDelayedTxDesLength = len;	// transmission effectively starts
+					NKern::RestoreInterrupts(irq);
+					}
+				else
+					{
+					NKern::RestoreInterrupts(irq);
+					InitiateWrite(a1, len); //a1 is ptr to data to write (on client side)
+					iTurnaroundTimerStartTime = 0;
+					iTurnaroundTimerStartTimeValid = 2;
+					}
+				}
+			break;
+			}
+
+		case RBusDevComm::ERequestNotifySignalChange:
+			{
+			//a1 has place to put the result
+			//a2 has the signal mask
+			if (!a1)
+				{
+				r = KErrArgument;
+				break;
+				}
+			
+			//start the signal request
+			TInt mask = 0;
+			r = Kern::ThreadRawRead(iClient, a2, &mask, sizeof(mask));	//get the signal mask
+			if (r == KErrNone)
+				{
+				iSignalStatus = aStatus;
+				InitiateNotifySignals(a1, mask);
+				}
+			break;
+			}
+		
+		case RBusDevComm::ERequestBreak:
+			{
+			r = Kern::ThreadRawRead(iClient, a1, &iBreakTimeMicroSeconds, sizeof(TInt));	//get the time to break for
+			if (r == KErrNone)
+				{
+				iBreakStatus=aStatus;
+				
+				// check if turnaround timer running.
+				TInt irq = NKern::DisableInterrupts(1);
+				if(iTurnaroundTimerRunning)
+					{
+					iTurnaroundBreakDelayed = ETrue;
+					NKern::RestoreInterrupts(irq);
+					}
+				else
+					{
+					NKern::RestoreInterrupts(irq);
+					BreakOn();
+					}
+				}
+			break;
+			}
+				
+		default:
+			r = KErrNotSupported;
+			break;
+
+		}
+	return r;
+	}
+
+TInt DChannelComm::SetConfig(TCommConfigV01& c)
+	{
+	iConfig = c;
+	PddConfigure(iConfig);
+	return KErrNone;
+	}
+
+TInt DChannelComm::DoControl(TInt aFunction, TAny* a1, TAny* a2)
+	{
+
+	TCommConfigV01 c;
+	TInt r = KErrNone;
+
+	switch (aFunction)
+		{
+		case RBusDevComm::EControlConfig:
+			{
+			//get the current configuration
+			TPtrC8 cfg((const TUint8*)&iConfig, sizeof(iConfig));
+			r = Kern::ThreadDesWrite(iClient, a1, cfg, 0, KTruncateToMaxLength, iClient);
+			break;
+			}
+
+		case RBusDevComm::EControlSetConfig:
+			{
+			if (AreAnyPending())	
+				Kern::PanicCurrentThread(_L("D32COMM"), ESetConfigWhileRequestPending);
+			else
+				{
+				memclr(&c, sizeof(c));
+				TPtr8 cfg((TUint8*)&c, 0, sizeof(c));
+				r = Kern::ThreadDesRead(iClient, a1, cfg, 0, 0);
+				if (r == KErrNone)
+					r = SetConfig(c);	//set the new configuration
+				}
+			break;
+			}
+
+		case RBusDevComm::EControlCaps:
+			{
+			//get capabilities
+			TCommCaps2 caps;
+			PddCaps(caps);	//call ipdd->Caps
+			r = Kern::ThreadDesWrite(iClient, a1, caps, 0, KTruncateToMaxLength, iClient);
+			break;
+			}
+
+		case RBusDevComm::EControlSignals:
+			{
+			r = Signals();
+			break;
+			}
+
+		case RBusDevComm::EControlSetSignals:
+			{
+//			if (((TUint)a1)&((TUint)a2))	//can't set and clear at same time
+//				{
+//				Kern::PanicCurrentThread(_L("D32COMM"), ESetSignalsSetAndClear);
+//				}
+//			else
+				{
+
+				SetSignals((TUint)a1, (TUint)a2);
+				}
+			break;
+			}
+
+		case RBusDevComm::EControlQueryReceiveBuffer:
+			r = RxCount();
+			break;
+
+		case RBusDevComm::EControlResetBuffers:
+			if (AreAnyPending())
+				Kern::PanicCurrentThread(_L("D32COMM"), EResetBuffers);
+			else
+				ResetBuffers(ETrue);
+			break;
+
+		case RBusDevComm::EControlReceiveBufferLength:
+			r = RxBufferSize();
+			break;
+
+		case RBusDevComm::EControlSetReceiveBufferLength:
+			if (AreAnyPending())
+				Kern::PanicCurrentThread(_L("D32COMM"), ESetReceiveBufferLength);
+			else
+				r = SetRxBufferSize((TInt)a1);
+			break;
+
+		case RBusDevComm::EControlMinTurnaroundTime:
+			r = iTurnaroundMicroSeconds;			// used saved value
+			break;
+
+		case RBusDevComm::EControlSetMinTurnaroundTime:
+				{
+				if ((TInt)a1<0)
+					a1=(TAny*)0;
+				iTurnaroundMicroSeconds = (TUint)a1;			// save this
+				TUint newTurnaroundMilliSeconds = (TUint)a1/1000;	// convert to ms
+				if(newTurnaroundMilliSeconds != iTurnaroundMinMilliSeconds)
+					{
+					// POLICY: if a new turnaround time is set before the previous running timer has expired 
+  					// then the timer is adjusted depending on the new value and if any
+                    // write request has been queued, transmission will proceed after the timer has expired.
+					if(iTurnaroundTimerStartTimeValid == 0)
+						{
+						iTurnaroundTimerStartTime = NKern::TickCount();
+						iTurnaroundTimerStartTimeValid = 1;
+						}
+					if(iTurnaroundTimerStartTimeValid != 2)
+						TurnaroundClear();
+					if(newTurnaroundMilliSeconds > 0)
+						{
+						r = TurnaroundSet(newTurnaroundMilliSeconds);
+						}
+					}
+				}
+			break;
+
+		default:
+			r = KErrNotSupported;
+			}
+		return(r);
+		}
+
+
+void DChannelComm::SignalNotifyDfc(TAny* aPtr)
+	{
+	DChannelComm* pC = (DChannelComm*)aPtr;
+	pC->DoSignalNotify();
+	}
+
+void DChannelComm::RxDataAvailableDfc(TAny* aPtr)
+	{
+	DChannelComm* pC = (DChannelComm*)aPtr;
+	pC->DoRxDataAvailable();
+	}
+
+void DChannelComm::DoRxDataAvailable()
+	{
+	Complete(ERxDA, iRxDAError);
+	iRxDAError = KErrNone;
+	}
+
+void DChannelComm::DoSignalNotify()
+	{
+	//copy the data back to the client
+	if (iSignalError == KErrNone)
+		iSignalError = Kern::ThreadRawWrite(iClient, iClientSignalResultPtr,&iSignalResult, sizeof(iSignalResult), iClient);
+	Complete(ESigChg, iSignalError);
+	iSignalError = KErrNone;
+	}
+
+void DChannelComm::CompleteTxDfc(TAny* aPtr)
+	{
+	DChannelComm* pC = (DChannelComm*)aPtr;
+	pC->DoCompleteTx();
+	}
+
+void DChannelComm::DoCompleteTx()
+	{
+	Complete(ETx, iTxError);
+	iTxError = KErrNone;
+	}
+
+void DChannelComm::CompleteRxDfc(TAny* aPtr)
+	{
+	DChannelComm* pC = (DChannelComm*)aPtr;
+	pC->DoCompleteRx();
+	}
+
+void DChannelComm::DoCompleteRx()
+	{
+	if (iRxError == KErrNone)
+		{
+		//copy the data back to the client
+		iRxError = Kern::ThreadDesWrite(iClient, (TDes8*)iClientDestPtr, *RxBuffer(), 0, KChunkShiftBy0, iClient);
+		}
+	Complete(ERx, iRxError);
+	iRxError = KErrNone;
+	TInt irq = NKern::DisableInterrupts(1);
+	if(iTurnaroundMinMilliSeconds > 0)
+		{
+		// POLICY: if timer is running from a previous read, stop it and re-start it
+		if(iTurnaroundTimerRunning)
+			{
+			iTurnaroundTimer.Cancel();
+			iTurnaroundDfc.Cancel();
+			}
+		iTurnaroundTimerRunning = ETrue;
+		TInt timeout = NKern::TimerTicks(iTurnaroundMinMilliSeconds);
+		iTurnaroundTimer.OneShot(timeout);
+		//Record the timestamp of turnaround timer start.
+		iTurnaroundTimerStartTimeValid = 1;
+		iTurnaroundTimerStartTime = NKern::TickCount();
+		}
+	NKern::RestoreInterrupts(irq);
+	}
+
+void DChannelComm::DoCancel(TInt aMask)
+	{
+	if (aMask & RBusDevComm::ERequestReadCancel)
+		{
+		ReadCancel();
+		}
+
+	if (aMask & RBusDevComm::ERequestWriteCancel)
+		{
+		TInt irq = NKern::DisableInterrupts(1);
+		if(iTurnaroundTransmitDelayed)
+			{
+			iTurnaroundTxDesPtr = 0;
+			iTurnaroundTxDesLength = 0;
+			iTurnaroundTransmitDelayed = EFalse;
+			}
+		NKern::RestoreInterrupts(irq);
+
+		WriteCancel();
+		}
+
+	if (aMask & RBusDevComm::ERequestNotifySignalChangeCancel)
+		{
+		SignalChangeCancel();
+		Complete(ESigChg,KErrCancel);
+		}
+
+	if (aMask & RBusDevComm::ERequestBreakCancel)
+		{
+		TInt irq = NKern::DisableInterrupts(1);
+		if(iTurnaroundBreakDelayed)
+			iTurnaroundBreakDelayed = EFalse;
+		NKern::RestoreInterrupts(irq);
+		
+		iBreakDfc.Cancel();
+		iBreakTimer.Cancel();
+		FinishBreakImplementation(KErrCancel);
+		}
+	}
+
+
+void DChannelComm::InitiateWrite(TAny *aTxDes, TInt aLength)
+	{
+//aTxDes has client side data
+//aLength has the len
+	
+	if (!aTxDes)
+		{
+		Complete(ETx, KErrArgument);
+		return;
+		}
+	// call the pdd to fill its buffer and write the data
+	Write(iClient, aTxDes, aLength);
+	}
+
+void DChannelComm::InitiateRead(TAny *aRxDes, TInt aLength)
+	{
+
+	// Complete zero-length read immediately.  maybe not
+
+//	if (aLength == 0)
+//		{
+//		Complete(ERx, KErrNone);
+//		return;
+//		}
+	TInt max=Kern::ThreadGetDesMaxLength(iClient,aRxDes);
+
+	if (max < Abs(aLength) || max < 0)
+		Complete(ERx, KErrGeneral);
+		// do not start the Turnaround timer (invalid Descriptor this read never starts)
+	else
+		{
+		iClientDestPtr = aRxDes;
+		Read(iClient, aRxDes, aLength);
+		}
+	}
+
+void DChannelComm::InitiateNotifySignals(TAny *aSignalResultPtr, TInt aMask)
+	{
+	//aMask has the mask of signals we require
+	//aSignalResultPtr is a pointer to the clients area for the result
+	iClientSignalResultPtr = (TUint*)aSignalResultPtr;
+	NotifySignals(iClient, aMask);
+	}
+
+void DChannelComm::NotifyReadDataAvailable()
+	{
+	NotifyDataAvailable();
+	}
+
+
+void DChannelComm::Complete(TInt aMask, TInt aReason)
+	{
+	if (aMask & ERx)
+		Kern::RequestComplete(iClient, iRxStatus, aReason);
+	if (aMask & ETx)
+		Kern::RequestComplete(iClient, iTxStatus, aReason);
+	if (aMask & ESigChg)
+		Kern::RequestComplete(iClient, iSignalStatus, aReason);
+	if (aMask & ERxDA)
+		Kern::RequestComplete(iClient, iRxDAStatus, aReason);
+	if (aMask & EBreak)
+		Kern::RequestComplete(iClient, iBreakStatus, aReason);
+	}
+
+void DChannelComm::BreakOn()
+//
+// Start the driver breaking.
+//
+	{
+	iFlags&=(~KBreakPending);
+	iFlags|=KBreaking;
+	PddBreak(ETrue);
+	iBreakTimer.OneShot(iBreakTimeMicroSeconds, DChannelComm::FinishBreak, this);
+	}
+
+void DChannelComm::BreakOff()
+//
+// Stop the driver breaking.
+//
+	{
+	PddBreak(EFalse);
+	iFlags&=~KBreaking;
+	}
+
+void DChannelComm::FinishBreak(TAny* aSelf)
+	{
+	DChannelComm* self = (DChannelComm*)aSelf;
+	self->QueueFinishBreakDfc();
+	}
+
+void DChannelComm::FinishBreakDfc(TAny* aSelf)
+	{
+	DChannelComm* self = (DChannelComm*)aSelf;
+	self->FinishBreakImplementation(KErrNone);
+	}
+
+void DChannelComm::QueueFinishBreakDfc()
+	{
+	iBreakDfc.Enque();
+	}
+
+void DChannelComm::FinishBreakImplementation(TInt aBreakError)
+	{
+	if (iStatus==EClosed)
+		{
+		Complete(EBreak, KErrNotReady);
+		}
+	else if(LineFail())	// have signals changed in the meantime?
+		{
+		Complete(EBreak, KErrCommsLineFail);
+		}
+	else
+		{
+		BreakOff();
+		Complete(EBreak, aBreakError);
+
+		TInt irq = NKern::DisableInterrupts(1);
+		if(iBreakDelayedTx)
+			{
+			iBreakDelayedTx = EFalse;	// protected -> prevent reentrant ISR
+			NKern::RestoreInterrupts(irq);
+			if (iStatus==EClosed)
+				{
+				iBreakDelayedTxDesPtr = 0;
+				iBreakDelayedTxDesLength = 0;
+				Complete(ETx,KErrNotReady);
+				return;
+				}
+
+			// fail signals checked in the PDD
+			InitiateWrite(iBreakDelayedTxDesPtr, iBreakDelayedTxDesLength);
+			iBreakDelayedTxDesPtr = 0;
+			iBreakDelayedTxDesLength = 0;
+			}
+		else 
+			NKern::RestoreInterrupts(irq);
+
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/serialpdd.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1712 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins/specific/serialpdd.cpp
+// 
+//
+
+#include "winscomm.h"
+#include "nk_priv.h"
+#include "nk_plat.h"
+#include <emulator.h>
+
+#define WIN32_LEAN_AND_MEAN
+#pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union
+#include <windows.h>
+#pragma warning( default : 4201 ) // nonstandard extension used : nameless struct/union
+
+#ifdef FAULT
+#undef FAULT
+#endif
+#define FAULT() Kern::Fault(__FILE__,__LINE__)
+
+_LIT(KComName, "\\\\.\\com");
+
+// needs ldd version..
+const TInt KMinimumLddMajorVersion=1;
+const TInt KMinimumLddMinorVersion=1;
+const TInt KMinimumLddBuild=1;		
+
+//used for the read and write buffers in the driver.
+//large buffer reserved so any transfer to/from the client can fit into a driver buffer
+const TInt KSerialBufferMaxSize = 0x800000;
+const TInt KSerialBufferInitialSize = 0x10000;
+const TInt KSerialBufferIncrementSize = 0x1000;	//granularity.  must be power of 2	
+
+
+const DWORD KReadOneOrMoreTimeout = MAXDWORD-1;	//milliseconds
+
+
+//buffer sizes passed to NT for setting its own driver buffer sizes
+const TInt KDefaultWinNTReadBufSize = 1024;
+const TInt KDefaultWinNTWriteBufSize = 1024;
+
+static DWORD dummyLen=0;
+
+enum TDCommWinsFault 
+	{
+	EWindowsUnexpectedError,
+	EUnknownCommand,
+	EBadIOLen,
+	EEofOnSerial,
+	EWriteEarlyCompletion,
+	ELineErrorNotReported,
+	ESerialBufferTooBig,
+	EReadLength,
+	};
+
+
+class DDriverComm : public DPhysicalDevice
+	{
+public:
+	DDriverComm();
+	virtual TInt Install();
+	virtual TInt Remove();
+	virtual void GetCaps(TDes8 &aDes) const;
+	virtual TInt Create(DBase*& aChannel, TInt aUnit, const TDesC8* aInfo, const TVersion& aVer);
+	virtual TInt Validate(TInt aUnit, const TDesC8* aInfo, const TVersion &aVer);
+	};
+
+
+class DCommWins : public DComm
+	{
+public:
+	enum TDriverCommand {ESetBreak=1,EClearBreak,ETransmit,ETransmit0,
+						EGetSignals,ESetSignals,EConfigure,
+						EStop,EStopNoDrain,EStart,EDie,	ETransmitCancel,
+						EReceive, EReceiveOneOrMore, EReceiveCancel,ENotifyDataAvailable,
+						ENotifySignals, EInvalidCommand};
+public:
+	DCommWins();
+	~DCommWins();
+	virtual TInt Start();
+	virtual void Stop(TStopMode aMode);
+	virtual void Break(TBool aState);
+	virtual void Write(DThread* aThread, TAny *aTxDes, TInt aLength);
+	virtual void Read(DThread* aThread, TAny *aTxDes, TInt aLength);
+	virtual void NotifySignals(DThread* aThread, TInt aMask);
+	virtual void NotifyDataAvailable();
+	virtual TUint Signals() const;
+	virtual void SetSignals(TUint aSetMask,TUint aClearMask);
+	virtual TInt ValidateConfig(const TCommConfigV01 &aConfig) const;
+	virtual void Configure(TCommConfigV01 &aConfig);
+	virtual void Caps(TDes8 &aCaps) const;
+	virtual void CheckConfig(TCommConfigV01& aConfig);
+	virtual TDfcQue* DfcQ(TInt aUnit);
+
+	inline void CheckTxBuffer();
+	inline TBool Transmitting();
+	virtual TInt RxCount();
+	virtual void ResetBuffers(TBool);
+	virtual TInt SetRxBufferSize(TInt aSize);
+	virtual TInt RxBufferSize();
+	virtual TDes8* RxBuffer();
+	virtual void DoConfigure();
+	virtual TBool AreAnyPending();
+	virtual void ReadCancel();
+	virtual void WriteCancel();
+	virtual void SignalChangeCancel();
+	TInt DoCreate(TInt aUnit,const TDesC8 *aInfo);
+	void WaitForEvent();
+	void DriverCommand(TDriverCommand aCommand);
+	void DoWriteComplete(TInt aErr);
+	void DoReadComplete(TInt aErr, TInt aBytes);
+	void DoSignalCompletion(TInt aError, TUint changed, TUint aValues);
+	void DoDataAvailableCompletion();
+	void RunCommThread(TDriverCommand aCommand);
+	inline void SignalDriverThread();
+	inline TBool LineFail();
+	
+private:
+	void ReleaseBuffers();
+	void ReSizeBuffer(TUint8*& aBuf, TInt& iBufLen, TPtr8& aDes, const TInt aNewLen);
+	TBool IsATerminator(TText8 aChar);
+	void CompleteRead(TInt aLength);
+	void DataAvailableNotificationCancel();
+
+
+private:
+	TInt iWritePending;
+	TInt iReadPending;
+	TBool iStopping;
+	TBool iRunning;
+	TDriverCommand iCommand;
+	TCommConfigV01 *iConfig;
+	TUint iSignals;
+	TUint iFailSignals;
+	TUint iSavedSignals;
+	TBool iLineFail;
+	TBool iRXLineFail;
+	TBool iTXLineFail;
+
+	TUint8 * iInBufPtr;		//input buffer used by driver.
+	TInt iInBufLength;
+	TPtr8 iInDes;
+
+	TInt iReadSoFar;
+	TBool iTerminatedRead;	//true if we are reading with 1 or more terminating characters
+
+	TUint8 * iOutBufPtr;
+	TInt iOutBufLength;
+	TPtr8 iOutDes;
+
+	TInt iRxBufferSize;		//size of receivebuffer passed to windows & set by calls to SetReceiveBufferSize 
+							//used to determine xon and xoff levels
+	TUint iSignalsRequested;  //mask of signals we are waiting for
+	TUint iSignalsWanted;		//mask we are asked to check 
+	TBool iDataAvailableNotification;
+	HANDLE iThread;
+	HANDLE iCommThreadSem;
+	HANDLE iDriverThreadSem;
+	HANDLE iCommPort;
+	DWORD iThreadID;
+	DWORD iSignalStatus;
+	OVERLAPPED iReadOverLapped;
+	OVERLAPPED iWriteOverLapped;
+	OVERLAPPED iSignalOverLapped;
+
+	TInt iClientReadLength;		//how much data the client has requested in a read
+	TBool		iBreakDetected;
+	};
+
+void Panic(TDCommWinsFault aFault)
+//
+// Panic the driver 
+//
+	{
+	Kern::PanicCurrentThread(_L("DCommWins"), aFault);
+	}
+
+
+TUint commThread(DCommWins *comm)
+//
+// Comm thread entry point
+//
+	{
+
+	comm->WaitForEvent();
+	return 0;
+	}
+
+VOID WINAPI WriteCompletion(DCommWins *aDrv, DWORD aErr,DWORD /*numBytes*/)
+	{
+
+	aDrv->DoWriteComplete(aErr);
+	}
+
+
+VOID WINAPI ReadCompletion(DCommWins *aDrv, DWORD aErr,DWORD numBytes)
+	{
+
+	aDrv->DoReadComplete(aErr, numBytes);
+	}
+
+VOID WINAPI SignalCompletion(DCommWins *aDrv, TInt aError, TUint aChanged, TUint aValues)
+	{
+	aDrv->DoSignalCompletion(aError, aChanged, aValues);
+	}
+
+VOID WINAPI DataAvailableCompletion(DCommWins *aDrv)
+	{
+	aDrv->DoDataAvailableCompletion();
+	}
+
+
+
+BOOL WINAPI EscapeCommFunctionP(HANDLE hFile,DWORD dwFunc)
+	{
+	DWORD err;
+	DWORD lastError = 0;
+	BOOL res;
+	COMSTAT s;
+	
+	do
+		{
+		ClearCommError(hFile, &err, &s);
+		res = EscapeCommFunction(hFile,dwFunc);
+		if(!res)
+			lastError = GetLastError();
+		}
+	while((!res) && (lastError == ERROR_OPERATION_ABORTED));
+
+	return(res);
+	}
+
+
+BOOL WINAPI GetCommModemStatusP(HANDLE hFile,LPDWORD lpModemStat)
+	{
+	DWORD err;
+	DWORD lastError = 0;
+	BOOL res;
+	COMSTAT s;
+	
+	do
+		{
+		ClearCommError(hFile, &err, &s);
+		res = GetCommModemStatus(hFile,lpModemStat);
+		if(!res)
+			lastError  = GetLastError();
+		}
+	while((!res) && (lastError == ERROR_OPERATION_ABORTED));
+
+	return(res);
+	}
+
+
+BOOL WINAPI GetCommStateP(HANDLE hFile,LPDCB lpDCB)
+	{
+	DWORD err;
+	DWORD lastError = 0;
+	BOOL res;
+	COMSTAT s;
+	
+	do
+		{
+		ClearCommError(hFile,&err,&s);
+		res = GetCommState(hFile,lpDCB);
+		if (!res)
+			lastError = GetLastError();
+		}
+	while((!res) && (lastError == ERROR_OPERATION_ABORTED));
+
+	return(res);
+	}
+
+BOOL WINAPI SetCommStateP(HANDLE hFile,LPDCB lpDCB)
+	{
+	DWORD err;
+	DWORD lastError = 0;
+	BOOL res;
+	COMSTAT s;
+	
+	do
+		{
+		ClearCommError(hFile, &err, &s);
+		res = SetCommState(hFile, lpDCB);
+		if (!res)
+			lastError = GetLastError();
+		}
+	while((!res) && (lastError == ERROR_OPERATION_ABORTED));
+
+	return(res);
+	}
+
+BOOL WINAPI SetCommMaskP(HANDLE hFile,DWORD dwEvtMask)
+	{
+	DWORD err;
+	DWORD lastError = 0;
+	BOOL res;
+	COMSTAT s;
+	
+	do
+		{
+		ClearCommError(hFile, &err, &s);
+		res = SetCommMask(hFile, dwEvtMask);
+		if (!res)
+			lastError = GetLastError();
+		}
+	while((!res) && (lastError == ERROR_OPERATION_ABORTED));
+
+	return(res);
+	}
+
+BOOL WINAPI WriteFileP(HANDLE hFile,LPCVOID lpBuffer,DWORD nNumberOfBytesToWrite,LPDWORD lpNumberOfBytesWritten,LPOVERLAPPED lpOverlapped)
+	{
+	DWORD err;
+	DWORD lastError = 0;
+	BOOL res;
+	COMSTAT s;
+	
+	do
+		{
+		ClearCommError(hFile, &err, &s);
+		res = WriteFile(hFile, lpBuffer, nNumberOfBytesToWrite, lpNumberOfBytesWritten, lpOverlapped);
+		if (!res)
+			lastError = GetLastError();
+		}
+	while((!res) && (lastError == ERROR_OPERATION_ABORTED));
+
+	return(res);
+	}
+
+BOOL WINAPI ReadFileP(HANDLE hFile,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,LPDWORD lpNumberOfBytesRead,LPOVERLAPPED lpOverlapped)
+	{
+	DWORD err;
+	DWORD lastError = 0;
+	BOOL res;
+	COMSTAT s;
+	
+	do
+		{
+		ClearCommError(hFile, &err, &s);
+		res = ReadFile(hFile, lpBuffer, nNumberOfBytesToRead, lpNumberOfBytesRead, lpOverlapped);
+		if (!res)
+			lastError = GetLastError();
+		}
+	while((!res) && (lastError == ERROR_OPERATION_ABORTED));
+
+	return(res);
+	}
+
+
+
+
+DDriverComm::DDriverComm()
+	{
+#if defined (__COM_ONE_ONLY__)
+	iUnitsMask=0x1; // Support units 0
+#elif defined (__COM_TWO_ONLY__)
+	iUnitsMask=0x2; // Support units 1
+#else
+	iUnitsMask=0x3ff; // Support units 0 to 9
+#endif
+
+	iVersion=TVersion(KCommsMajorVersionNumber,KCommsMinorVersionNumber,KCommsBuildVersionNumber);
+	}
+
+TInt DDriverComm::Install()
+	{
+#if defined (__COM_ONE_ONLY__)
+	TPtrC buf=_L("Comm.Wins1");
+	return(SetName(&buf));
+#elif defined (__COM_TWO_ONLY__)
+	TPtrC buf=_L("Comm.Wins2");
+	return(SetName(&buf));
+#else
+	TPtrC buf=_L("Comm.Wins");
+	return(SetName(&buf));
+#endif
+	}
+
+TInt DDriverComm::Remove()
+	{
+	return(KErrNone);
+	}
+
+
+TInt DDriverComm::Validate(TInt /*aUnit*/, const TDesC8* /*aInfo*/, const TVersion& aVer)
+//
+//	Validate the requested configuration
+//
+	{
+	if ((!Kern::QueryVersionSupported(iVersion,aVer)) || (!Kern::QueryVersionSupported(aVer,TVersion(KMinimumLddMajorVersion,KMinimumLddMinorVersion,KMinimumLddBuild))))
+		return KErrNotSupported;
+#if defined (__COM_ONE_ONLY__)
+	if (aUnit!=0)
+		return KErrNotSupported;
+#elif defined (__COM_TWO_ONLY__)
+	if (aUnit!=1)
+		return KErrNotSupported;
+#endif
+	// leave Unit check to CreateFile
+	return KErrNone;
+	}
+
+
+void GetWinsCommsCaps(TDes8 &aCaps)
+	{
+	TCommCaps3 capsBuf;
+	TCommCapsV03 &c=capsBuf();
+//
+// All rates except 50,2000, 3600 and special
+//
+	c.iRate=KCapsBps75|KCapsBps110|KCapsBps134|KCapsBps150|KCapsBps300|KCapsBps600|KCapsBps1200|KCapsBps1800|KCapsBps2400|KCapsBps4800|KCapsBps7200|KCapsBps9600|KCapsBps19200|KCapsBps38400|KCapsBps57600|KCapsBps115200;
+
+	c.iDataBits=0xf; // All data sizes
+	c.iStopBits=0x3; // 1 and 2 stop bits
+	c.iParity=0x7; // None, Even and Odd
+	c.iHandshake = 0x3BF;	//all except KConfigObeyDCD
+	c.iSignals=0x3f; // All signals
+	c.iSIR=0;//No Ir
+	c.iNotificationCaps=KNotifySignalsChangeSupported|KNotifyDataAvailableSupported;
+	c.iRoleCaps=0;
+	c.iFlowControlCaps=0;
+	c.iBreakSupported=ETrue;
+	aCaps.FillZ(aCaps.MaxLength());
+	aCaps=capsBuf.Left(Min(capsBuf.Length(),aCaps.MaxLength()));
+	}
+
+void DDriverComm::GetCaps(TDes8 &aDes) const
+	{
+	GetWinsCommsCaps(aDes);
+	}
+
+TInt DDriverComm::Create(DBase*& aChannel, TInt aUnit,const TDesC8* aInfo,const TVersion& aVer)
+	{
+
+	if (!Kern::QueryVersionSupported(iVersion,aVer))
+		return KErrNotSupported;
+
+	DCommWins *pD= new DCommWins;
+	if (!pD) return KErrNoMemory;
+
+	TInt ret=pD->DoCreate(aUnit,aInfo);
+
+	if (ret!=KErrNone)
+	{
+		delete pD;
+		return ret;
+	}
+	
+	aChannel = pD;
+
+	return KErrNone;
+	}
+
+void DCommWins::DoWriteComplete(TInt aErr)
+	{
+	iWritePending = 0;
+	iTransmitting = EFalse;
+	StartOfInterrupt();
+	iLdd->iTxError = aErr;
+	iLdd->iTxCompleteDfc.Add();
+	EndOfInterrupt();
+	}
+
+
+
+void DCommWins::DoSignalCompletion(TInt aError, TUint aChanged, TUint aValues)
+	{
+	//aValues contains the signal values.  EPOC constants
+	//aChanged contains the signals which have changed
+	//we return the signal values
+	TUint res = aValues & iSignalsWanted;
+	res |= (aChanged << 12);
+	
+	iLdd->iSignalResult = res;
+	iLdd->iSignalError = aError;
+	StartOfInterrupt();
+	iLdd->iSigNotifyDfc.Add();
+	EndOfInterrupt();
+	}
+
+void DCommWins::DoDataAvailableCompletion()
+	{
+	StartOfInterrupt();
+	iLdd->iRxDataAvailableDfc.Add();
+	EndOfInterrupt();
+	}
+
+
+
+void DCommWins::CompleteRead(TInt aLength)
+	{
+	iReadPending = 0;
+	iInDes.SetLength(aLength);
+	StartOfInterrupt();
+	iLdd->iRxCompleteDfc.Add();
+	EndOfInterrupt();
+	}
+
+
+
+void DCommWins::DoReadComplete(TInt aErr, TInt aBytes)
+	{
+	iLdd->iRxError = aErr;
+	//write back the length and the data
+	//process for any terminating characters.
+	//win32 only does binary reads and ignores the eofchar, so terminated reads
+	//require reading one char at a time
+	if (iTerminatedRead && !aErr)
+		{
+		__NK_ASSERT_ALWAYS(aBytes <= 1);
+		if (aBytes == 0)
+			{
+			// not sure why we get this somtimes, but handle it anyway : read another character
+			ReadFileP(iCommPort,(void*)(iInBufPtr+iReadSoFar), 1, &dummyLen, &iReadOverLapped);
+			}
+		else if (++iReadSoFar == iClientReadLength)	//see if we have read enough characters into the buffer
+			{
+			//got them all so complete it
+			CompleteRead(iReadSoFar);
+			}
+		else if (IsATerminator(iInBufPtr[iReadSoFar-1]))	//see if the char just read was the terminator
+			{
+			//it's a terminated read and we've found one of the terminbators
+			CompleteRead(iReadSoFar);
+			}
+		else if (iReadPending == EReceive)
+			{
+			//read another character
+			ReadFileP(iCommPort,(void*)(iInBufPtr+iReadSoFar), 1, &dummyLen, &iReadOverLapped);
+			}
+		else
+			{
+			//it's a receive 1 or more with terminators, we've got 1 so that'll do
+			CompleteRead(iReadSoFar);
+			}
+		}
+	else
+		{
+		CompleteRead(aBytes);
+		}
+	}
+
+
+
+
+void DCommWins::RunCommThread(TDriverCommand aCommand)
+//
+// Wake up the comms thread
+//
+	{
+
+	__ASSERT_DEBUG(aCommand!=EInvalidCommand,Panic(EUnknownCommand));
+	iCommand=aCommand;
+//
+// Are we about to go re-entrant?
+//
+	if(GetCurrentThreadId()==iThreadID)
+		{
+		DriverCommand(aCommand);
+		WaitForSingleObject(iDriverThreadSem,INFINITE);
+		}
+	else
+		{
+		Sleep(0); // Possible deadlock solution - see MSDN Knowledge Base Article Q173260
+		if (ReleaseSemaphore(iCommThreadSem,1,NULL)==FALSE)
+			{
+			DWORD ret=GetLastError();
+			ret=ret;
+			Panic(EWindowsUnexpectedError);
+			}
+		WaitForSingleObject(iDriverThreadSem,INFINITE);
+		}
+	}
+
+inline void DCommWins::SignalDriverThread()
+//
+// Wake up the comms thread
+//
+	{
+	Sleep(0); // Possible deadlock solution - see MSDN Knowledge Base Article Q173260
+	if (ReleaseSemaphore(iDriverThreadSem,1,NULL)==FALSE)
+		{
+		DWORD ret=GetLastError();
+		ret=ret;
+		Panic(EWindowsUnexpectedError);
+		}
+	}
+
+
+
+//
+#pragma warning( disable : 4705 )	// statement has no effect
+DCommWins::DCommWins() :  iOutDes(0,0), iInDes(0,0), iRxBufferSize(KDefaultWinNTReadBufSize), iSignalsRequested(0)
+	{
+	__DECLARE_NAME(_S("DCommWins"));
+	}
+#pragma warning( default : 4705 )
+
+TInt DCommWins::DoCreate(TInt aUnit,const TDesC8 * /*aInfo*/)
+//
+// Create the comms driver.
+//
+	{
+
+#if defined (__COM_ONE_ONLY__)
+	if (aUnit!=0)
+		return KErrNotSupported;
+#elif defined (__COM_TWO_ONLY__)
+	if (aUnit!=1)
+		return KErrNotSupported;
+#endif
+
+	TBuf8<0x10> n;
+	n.Append(KComName);
+	n.AppendNum(aUnit+1);
+	n.Append('\0');
+
+	iCommPort=CreateFileA((LPCSTR)n.Ptr(),GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,FILE_FLAG_OVERLAPPED,NULL);
+	if (iCommPort==INVALID_HANDLE_VALUE)	
+		{	
+	//	Reused code from Emulator::LastError() rather than adding an extra case 
+	//	to Emulator::LastError() because mapping KErrNotSupported to the returned
+	//	FILE_NOT_FOUND is non-intuitive and special to this case only
+		DWORD winErr=GetLastError();
+		switch (winErr)
+			{
+			case ERROR_INVALID_USER_BUFFER:
+			case ERROR_NOT_ENOUGH_MEMORY:
+			case ERROR_INSUFFICIENT_BUFFER:
+				return(KErrNoMemory);
+			case ERROR_ACCESS_DENIED:
+				return(KErrAccessDenied);
+			case ERROR_FILE_NOT_FOUND:		//	Reflects value returned by
+				return(KErrNotSupported);	//	corresponding MARM Pdd  
+			case ERROR_NOT_SUPPORTED:
+				return(KErrNotSupported);
+			default:
+				return(KErrGeneral);
+			}
+		}
+	
+
+	//create the buffers.
+	//the buffers need to be as big as the client will ever use.  8mb reserved, but commit less
+	iInBufPtr = (TUint8*)VirtualAlloc(NULL, KSerialBufferMaxSize,MEM_RESERVE | MEM_TOP_DOWN, PAGE_READWRITE);
+	if (!iInBufPtr)
+		return(Emulator::LastError());
+
+	//commit the first bit of the buffer
+	if (!VirtualAlloc(iInBufPtr, KSerialBufferInitialSize, MEM_COMMIT,PAGE_READWRITE))
+		return(Emulator::LastError());
+
+	iInBufLength = KSerialBufferInitialSize;
+	iInDes.Set(iInBufPtr, 0, iInBufLength);
+
+	//reserve address space for the output buffer
+	iOutBufPtr = (TUint8*)VirtualAlloc(NULL, KSerialBufferMaxSize,MEM_RESERVE | MEM_TOP_DOWN, PAGE_READWRITE);
+	if (!iOutBufPtr)
+		return(Emulator::LastError());
+
+	//commit a smaller region of it
+	if (!VirtualAlloc(iOutBufPtr, KSerialBufferInitialSize, MEM_COMMIT,PAGE_READWRITE))
+		return(Emulator::LastError());
+
+	iOutBufLength = KSerialBufferInitialSize;
+	iOutDes.Set(iOutBufPtr, 0, iOutBufLength);
+	
+	DCB dcb;
+	//set the dcb size
+	dcb.DCBlength = sizeof(dcb);
+	if (!GetCommStateP(iCommPort,&dcb))
+		return(Emulator::LastError());
+
+	EscapeCommFunctionP(iCommPort,0);
+
+//
+	if (!SetCommMaskP(iCommPort,EV_BREAK|EV_CTS|EV_ERR|EV_DSR|EV_RLSD|EV_RXCHAR|EV_RING))
+		return(Emulator::LastError());
+
+	if(!SetupComm(iCommPort,KDefaultWinNTReadBufSize,KDefaultWinNTWriteBufSize))
+		return(Emulator::LastError());
+
+	if ((iCommThreadSem=CreateSemaphoreA(NULL,0,0x7fffffff,NULL))==NULL)
+		return(Emulator::LastError());
+
+	if ((iDriverThreadSem=CreateSemaphoreA(NULL,0,0x7fffffff,NULL))==NULL)
+		return(Emulator::LastError());
+
+//
+// The serial port seems to open with the error condition set
+//
+
+	DWORD err,res;
+	COMSTAT s;
+	if (ClearCommError(iCommPort,&err,&s)==FALSE)
+		res=GetLastError();
+
+	if ((iThread=CreateWin32Thread(EThreadEvent,(LPTHREAD_START_ROUTINE)commThread,(void *)this, FALSE))==NULL)
+		return(Emulator::LastError());
+
+	SetThreadPriority(iThread,THREAD_PRIORITY_HIGHEST);
+	return(KErrNone);
+	}
+
+
+	
+void DCommWins::ReleaseBuffers()
+	{
+	if (iInBufPtr)
+		{
+		//decommit the buffer
+		VirtualFree(iInBufPtr,KSerialBufferMaxSize, MEM_DECOMMIT);
+		//and release the region
+		VirtualFree(iInBufPtr, NULL, MEM_RELEASE);
+		iInBufPtr = NULL;
+		}
+	if (iOutBufPtr)
+		{
+		VirtualFree(iOutBufPtr,KSerialBufferMaxSize, MEM_DECOMMIT);
+		VirtualFree(iOutBufPtr, NULL, MEM_RELEASE);
+		iOutBufPtr = NULL;
+		}
+	}
+	
+
+DCommWins::~DCommWins()
+	{
+	if (iThread)
+		{
+		if (! iRunning)
+			{
+			__ASSERT_ALWAYS(
+				ResumeThread(iThread) != 0xffffffff,
+				Panic(EWindowsUnexpectedError)); 
+			}
+
+		iRunning=ETrue;
+		RunCommThread(EDie);
+		}
+
+	if (iCommPort)
+		CloseHandle(iCommPort);
+
+	if (iDriverThreadSem)
+		CloseHandle(iDriverThreadSem);
+
+	if (iCommThreadSem)
+		CloseHandle(iCommThreadSem);
+
+	if (iReadOverLapped.hEvent)
+		CloseHandle(iReadOverLapped.hEvent);
+
+	if (iWriteOverLapped.hEvent)
+		CloseHandle(iWriteOverLapped.hEvent);
+
+	if (iSignalOverLapped.hEvent)
+		CloseHandle(iSignalOverLapped.hEvent);
+
+	if (iThread)
+		CloseHandle(iThread);
+
+	//free up the memory
+	ReleaseBuffers();
+	}
+
+TInt DCommWins::Start()
+	{
+
+	__ASSERT_ALWAYS(ResumeThread(iThread)!=0xffffffff,Panic(EWindowsUnexpectedError));
+	iRunning=ETrue;
+	RunCommThread(EStart);
+	return(KErrNone);
+	}
+
+void DCommWins::Stop(TStopMode aMode)
+	{
+
+	RunCommThread((aMode==EStopEmergency) ? EStopNoDrain : EStop);
+	SuspendThread(iThread);
+	iRunning=EFalse;
+	}
+
+void DCommWins::Break(TBool aState)
+//
+// Assert a break signal
+//
+	{
+	if (aState)
+		RunCommThread(ESetBreak);
+	else
+		RunCommThread(EClearBreak);
+	}
+
+
+
+TInt DCommWins::RxCount()
+	{
+	DWORD err =0;
+	COMSTAT stat;
+	if (ClearCommError(iCommPort,&err, &stat))
+		return stat.cbInQue;
+	else
+		return Emulator::LastError();
+	}
+
+
+void DCommWins::ResetBuffers(TBool aTx)
+	{
+	PurgeComm(iCommPort, PURGE_RXCLEAR | (aTx ? PURGE_TXCLEAR : 0));
+	}
+
+
+TBool DCommWins::AreAnyPending()
+	{
+	return (iReadPending != 0) || (iWritePending != 0);
+	}
+
+
+void DCommWins::WriteCancel()
+	{
+	DriverCommand(ETransmitCancel);
+	}
+
+
+void DCommWins::ReadCancel()
+	{
+	DriverCommand(EReceiveCancel);
+	}
+
+void DCommWins::SignalChangeCancel()
+	{
+	if (iSignalsRequested)
+		{
+		iSignalsRequested = 0;
+		}
+
+	}
+
+void DCommWins::DataAvailableNotificationCancel()
+	{
+	if (iDataAvailableNotification)
+		{
+		iDataAvailableNotification = EFalse;
+		iLdd->iRxDAError = KErrCancel;
+		iLdd->iRxDataAvailableDfc.Enque();
+		}
+	}
+
+TDes8* DCommWins::RxBuffer()
+	{
+	return &iInDes;
+	}
+
+TInt DCommWins::SetRxBufferSize(TInt aSize)
+	{
+	aSize += aSize&1;	//round up to multiple of 2 bytes as windows complains if odd
+	TInt ret = SetupComm(iCommPort, aSize, KDefaultWinNTWriteBufSize);
+	if (ret)
+		{
+		iRxBufferSize = aSize;
+		
+		DCB dcb = {0};
+		dcb.DCBlength = sizeof(dcb);
+		
+		if (!GetCommStateP(iCommPort,&dcb))
+			return Emulator::LastError();
+
+		//use rx buffer size to configure xon/xoff limits
+		dcb.XoffLim = (WORD)(iRxBufferSize / 4);		//25%
+		if (iConfig->iParityError & KConfigXonXoffDebug)
+			dcb.XonLim = (WORD)((iRxBufferSize / 2) -5);	//50%-5
+		else
+			dcb.XonLim = (WORD)((iRxBufferSize / 4) * 3);	//75%
+
+		if (!SetCommStateP(iCommPort,&dcb))
+			return Emulator::LastError();
+
+		return KErrNone;
+		}
+	return Emulator::LastError();
+	}
+
+
+TInt DCommWins::RxBufferSize()
+	{
+	return iRxBufferSize;
+	}
+
+
+TBool DCommWins::IsATerminator(TText8 aChar)
+	{
+	TInt x;
+	for (x=0; x < iConfig->iTerminatorCount; x++)
+		if (aChar == iConfig->iTerminator[x])
+			return ETrue;
+	return EFalse;
+	}
+
+
+void DCommWins::ReSizeBuffer(TUint8*& aBuf, TInt& aBufLen, TPtr8& aDes, const TInt aNewLen)
+	{
+
+	if (aNewLen > KSerialBufferMaxSize)
+		Panic(ESerialBufferTooBig);
+
+	aBufLen = ((aNewLen + KSerialBufferIncrementSize-1) / KSerialBufferIncrementSize) * KSerialBufferIncrementSize;
+
+	if (aBufLen > KSerialBufferMaxSize)
+		aBufLen = KSerialBufferMaxSize;
+
+	if (!VirtualAlloc(aBuf, aBufLen, MEM_COMMIT,PAGE_READWRITE))
+		{
+		ReleaseBuffers();
+		Panic(ESerialBufferTooBig);
+		}
+	aDes.Set(aBuf, 0, aBufLen);
+	}
+
+
+void DCommWins::Write(DThread* aThread, TAny* aSrc, TInt aLength)
+
+	{
+	if (aLength==0)
+		{
+		RunCommThread(ETransmit0);
+		}
+	else
+		{
+		if (aLength > iOutBufLength)
+			ReSizeBuffer(iOutBufPtr, iOutBufLength, iOutDes, aLength);
+
+		//copy the data from the client
+		Kern::ThreadDesRead(aThread, aSrc, iOutDes, 0,0);
+		iOutDes.SetLength(aLength);
+		//tell the comms thread to write the data
+		RunCommThread(ETransmit);
+		}
+	}
+
+void DCommWins::NotifySignals(DThread* /*aThread*/, TInt aMask)
+	{
+	iSignalsWanted = aMask;
+	RunCommThread(ENotifySignals);
+	}
+
+
+void DCommWins::NotifyDataAvailable()
+	{
+	RunCommThread(ENotifyDataAvailable);
+	}
+
+
+void DCommWins::Read(DThread* /*aThread*/, TAny* /*aDest*/, TInt aLength)
+
+	{
+	TDriverCommand command;
+
+	if (aLength < 0)
+		{
+		iClientReadLength = Abs(aLength);
+		command = EReceiveOneOrMore;
+		}
+	else
+		{
+		iClientReadLength = aLength;
+		command = EReceive;
+		}
+
+	if (iClientReadLength > iInBufLength)
+		ReSizeBuffer(iInBufPtr, iInBufLength, iInDes, iClientReadLength);
+	
+	//tell the comms thread to read the data
+	RunCommThread(command);
+	}
+
+
+
+
+
+TUint DCommWins::Signals() const
+	{
+
+	ULONG signals=0;
+	GetCommModemStatusP(iCommPort,&signals);
+	TUint status=0;
+	if (signals&MS_CTS_ON)
+		status|=KSignalCTS;
+	if (signals&MS_DSR_ON)
+		status|=KSignalDSR;
+	if (signals&MS_RING_ON)
+		status|=KSignalRNG;
+	if (signals&MS_RLSD_ON)
+		status|=KSignalDCD;
+	return(status|iSignals);
+	}
+
+
+void DCommWins::SetSignals(TUint aSetMask,TUint aClearMask)
+	{
+	if (aSetMask&KSignalRTS)
+		{
+		iSignals|=KSignalRTS;
+		EscapeCommFunctionP(iCommPort,SETRTS);
+		}
+	if (aSetMask&KSignalDTR)
+		{
+		iSignals|=KSignalDTR;
+		EscapeCommFunctionP(iCommPort,SETDTR);
+		}
+	if (aClearMask&KSignalRTS)
+		{
+		iSignals&=(~KSignalRTS);
+		EscapeCommFunctionP(iCommPort,CLRRTS);
+		}
+	if (aClearMask&KSignalDTR)
+		{
+		iSignals&=(~KSignalDTR);
+		EscapeCommFunctionP(iCommPort,CLRDTR);
+		}
+	}
+
+
+
+void DCommWins::CheckConfig(TCommConfigV01& /*aConfig*/)
+	{
+	// Do nothing
+	}
+
+
+
+void DCommWins::Configure(TCommConfigV01 &aConfig)
+//
+// Ask comm thread to set up the serial port
+//
+	{
+
+	iConfig=&aConfig;
+	if (iRunning)
+		{
+		RunCommThread(EConfigure);
+		}
+	else
+		{
+//		iCommand=EConfigure;
+		DoConfigure();
+		}
+	}
+
+void DCommWins::DoConfigure()
+//
+// Set up the serial port
+//
+	{
+
+	DCB dcb = {0};
+	//set the dcb size
+	dcb.DCBlength = sizeof(dcb);
+	if (!GetCommStateP(iCommPort,&dcb))
+		return;
+
+			
+	//stop if an error happens
+	dcb.fAbortOnError = TRUE;
+	
+	//baud rate
+	switch (iConfig->iRate)
+		{
+	case EBps75:
+		dcb.BaudRate=75;
+		break;
+	case EBps110:
+		dcb.BaudRate=110;
+		break;
+	case EBps134:
+		dcb.BaudRate=134;
+		break;
+	case EBps150:
+		dcb.BaudRate=150;
+		break;
+	case EBps300:
+		dcb.BaudRate=300;
+		break;
+	case EBps600:
+		dcb.BaudRate=600;
+		break;
+	case EBps1200:
+		dcb.BaudRate=1200;
+		break;
+	case EBps1800:
+		dcb.BaudRate=1800;
+		break;
+	case EBps2400:
+		dcb.BaudRate=2400;
+		break;
+	case EBps4800:
+		dcb.BaudRate=4800;
+		break;
+	case EBps7200:
+		dcb.BaudRate=7200;
+		break;
+	case EBps9600:
+		dcb.BaudRate=9600;
+		break;
+	case EBps19200:
+		dcb.BaudRate=19200;
+		break;
+	case EBps38400:
+		dcb.BaudRate=38400;
+		break;
+	case EBps57600:
+		dcb.BaudRate=57600;
+		break;
+	case EBps115200:
+		dcb.BaudRate=115200;
+		break;
+		}
+   
+	switch (iConfig->iParity)
+		{
+	case EParityNone:
+		dcb.Parity=NOPARITY;
+		dcb.fParity = FALSE;
+		break;
+	case EParityEven:
+		dcb.Parity=EVENPARITY;
+		dcb.fParity = TRUE;
+		break;
+	case EParityOdd:
+		dcb.Parity=ODDPARITY;
+		dcb.fParity = TRUE;
+		break;
+	case EParityMark:
+		dcb.Parity = MARKPARITY;
+		dcb.fParity = TRUE;
+		break;
+	case EParitySpace:
+		dcb.Parity = SPACEPARITY;
+		dcb.fParity = TRUE;
+		break;
+		}
+
+	switch (iConfig->iParityError)
+		{
+	case KConfigParityErrorFail:
+		dcb.fErrorChar = FALSE;
+		break;
+
+	case KConfigParityErrorIgnore:
+		dcb.fErrorChar = FALSE;
+		dcb.fAbortOnError = FALSE;
+		break;
+
+	case KConfigParityErrorReplaceChar:
+		dcb.fErrorChar = TRUE;
+		dcb.ErrorChar = iConfig->iParityErrorChar;
+		break;
+		}
+
+
+	TUint& hs = iConfig->iHandshake;
+
+
+	//SOFTWARE FLOW CONTROL
+	dcb.fInX  = (hs & KConfigObeyXoff) ? TRUE : FALSE;
+	dcb.fOutX = (hs & KConfigSendXoff) ? TRUE : FALSE;
+
+	dcb.XonChar = iConfig->iXonChar;
+	dcb.XoffChar = iConfig->iXoffChar;
+	dcb.ErrorChar = iConfig->iParityErrorChar;
+
+	//use rx buffer size to configure xon/xoff limits
+	dcb.XoffLim = (WORD)(iRxBufferSize / 4);		//25%
+	if (iConfig->iParityError & KConfigXonXoffDebug)
+		dcb.XonLim = (WORD)((iRxBufferSize / 2) -5);	//50%-5
+	else
+		dcb.XonLim = (WORD)((iRxBufferSize / 4) * 3);	//75%
+
+
+
+	//OUTPUT HARDWARE FLOW CONTROL
+	//set out DSR control to be off
+	dcb.fOutxDsrFlow = FALSE;
+	dcb.fOutxCtsFlow = (hs & KConfigObeyCTS) ? TRUE : FALSE;
+	dcb.fDsrSensitivity =  (hs & KConfigObeyDSR) ? TRUE : FALSE;
+
+
+	if (hs & KConfigObeyDCD)
+		{
+		}
+
+	
+	//INPUT HARDWARE FLOW CONTROL
+	dcb.fRtsControl = (hs & KConfigFreeRTS) ? RTS_CONTROL_DISABLE : RTS_CONTROL_HANDSHAKE;
+	dcb.fDtrControl = (hs & KConfigFreeDTR) ? DTR_CONTROL_DISABLE : DTR_CONTROL_ENABLE;
+
+
+	//complete with KErrCommsLineFail if these are set and the line goes low
+	iFailSignals = 0;
+	if (hs & KConfigFailDSR)
+		iFailSignals |= KSignalDSR;
+	
+	if (hs & KConfigFailCTS)
+		iFailSignals |= KSignalCTS;
+
+	if (hs & KConfigFailDCD)
+		iFailSignals |= KSignalDCD;
+	
+	
+	iTerminatedRead = iConfig->iTerminatorCount > 0;
+
+   	switch(iConfig->iDataBits)
+		{
+	case EData5:
+		dcb.ByteSize=5;	
+		break;
+	case EData6:
+		dcb.ByteSize=6;
+		break;
+	case EData7:
+		dcb.ByteSize=7;
+		break;
+	case EData8:
+		dcb.ByteSize=8;
+		break;
+		}
+
+	switch(iConfig->iStopBits)
+		{
+	case EStop1:
+		dcb.StopBits=ONESTOPBIT;
+		break;
+	case EStop2:
+		dcb.StopBits=TWOSTOPBITS;
+		break;
+		}
+
+
+
+	TInt error_r=KErrNone;
+	if(!SetCommStateP(iCommPort,&dcb))
+		error_r=GetLastError();
+
+// Clear any error we may have caused
+//
+	DWORD err,res;
+	COMSTAT s;
+	if (ClearCommError(iCommPort,&err,&s)==FALSE)
+		res=GetLastError();
+
+	}
+
+void DCommWins::Caps(TDes8 &aCaps) const
+//
+// Return the current capabilities
+//
+	{
+
+	GetWinsCommsCaps(aCaps);
+	}
+
+
+void DCommWins::WaitForEvent()
+	{
+
+	HANDLE objects[4];
+
+
+	iReadOverLapped.hEvent=CreateEventA(NULL,FALSE,FALSE,NULL); 
+	iWriteOverLapped.hEvent=CreateEventA(NULL,FALSE,FALSE,NULL);
+	iSignalOverLapped.hEvent=CreateEventA(NULL,FALSE,FALSE,NULL);
+	objects[0]=iSignalOverLapped.hEvent; // iCommPort;
+	objects[1]=iCommThreadSem;
+	objects[2]=iWriteOverLapped.hEvent;
+	objects[3]=iReadOverLapped.hEvent;
+
+	FOREVER
+		{
+		DWORD ret=WaitForMultipleObjectsEx(4,objects,FALSE,INFINITE,TRUE);
+		switch (ret)
+			{
+		case WAIT_OBJECT_0:
+			{
+			//			EnterCritical();
+
+			if (iDataAvailableNotification)
+				{
+				DataAvailableCompletion(this);
+				iDataAvailableNotification = EFalse;	//stop us repeatedly reporting it
+				}
+
+			// Detect breaks
+			if (iSignalStatus & EV_BREAK)
+				{
+				iBreakDetected=ETrue; // the read will complete with an error
+				}
+				
+			TUint currentSignals = Signals();
+
+			//mask out all the signals but the ones we are interested in
+			iLineFail = (iFailSignals & currentSignals) != iFailSignals;
+			if (iLineFail)
+				{
+				//if we have the handshake options of
+				//KConfigFailDSR, KConfigFailDCD KFailConfigCTS set
+				//we need to do something if any of them are low so
+				//complete any outstanding ops with failure
+				if (iReadPending)
+					{
+					//we have a read to complete
+					iRXLineFail = ETrue;
+					PurgeComm(iCommPort, PURGE_RXABORT);
+					}
+
+				if (iWritePending)
+					{
+					//we have a write to complete
+					iTXLineFail = ETrue;
+					PurgeComm(iCommPort, PURGE_TXABORT);
+					}
+				}
+
+
+			//iSignalsRequested will only have bits set if outstanding request
+			TUint changed = (currentSignals ^ iSavedSignals) & iSignalsRequested;
+			if (changed) 
+				{
+				SignalCompletion(this, KErrNone, changed, currentSignals);
+				iSavedSignals = currentSignals;
+				iSignalsRequested = 0;				//stop us repeatedly reporting it.
+												//iSignalsRequested is setup in the call to notify
+				}
+			
+			if (iWritePending == ETransmit0 && (currentSignals & KSignalCTS) != 0)
+				WriteCompletion(this, KErrNone, 0);
+
+			//request another notification event.  All events are requested.
+			iSignalStatus=0;
+			DWORD commErrors;
+			BOOL res;
+			DWORD lastError = 0;
+			COMSTAT cstat;
+
+			do
+				{
+				ClearCommError(iCommPort,&commErrors,&cstat);
+				res = WaitCommEvent(iCommPort,&iSignalStatus,&iSignalOverLapped);
+				if (!res)
+					lastError = GetLastError();
+				}
+			while((!res) && (lastError != ERROR_IO_PENDING));
+
+			break;
+			}
+
+		case WAIT_OBJECT_0+1:
+//
+// iCommThreadSemaphore has been signalled
+//
+			DriverCommand(iCommand);
+			break;
+		case WAIT_OBJECT_0+2:
+			//
+			//	Write completion
+			//
+			{
+
+			DWORD len = 0;
+			TInt error = KErrNone;
+			if (!GetOverlappedResult(iCommPort, &iWriteOverLapped, &len, FALSE))
+				error = Emulator::LastError();
+			
+			COMSTAT s;
+			DWORD err = 0;
+			ClearCommError(iCommPort,&err,&s);
+
+			//if we are failing if one or more of CTS, DSR, DCD go low
+			if (iTXLineFail)
+				{
+				error = KErrCommsLineFail;
+				iTXLineFail = EFalse;
+				}
+			else if (err)
+				{
+				if (err & CE_FRAME)
+					error = KErrCommsFrame;
+				else if (err & CE_OVERRUN)
+					error = KErrCommsOverrun;
+				else if (err & CE_RXPARITY)
+					error = KErrCommsParity;
+				}
+
+			WriteCompletion(this, error, len);
+			break;
+			}
+
+		case WAIT_OBJECT_0+3:
+			//
+			//	Read completion
+			//
+			{
+			DWORD len = 0;
+			TInt error = KErrNone;
+			if (!GetOverlappedResult(iCommPort, &iReadOverLapped, &len, FALSE))
+				{
+				// May have a break already detected to report
+				if (iBreakDetected)
+					{
+					error=KErrCommsBreak;
+					iBreakDetected=EFalse;
+					}
+				else
+					error = Emulator::LastError();
+				}
+			else
+				iBreakDetected=EFalse; // No error, so any breaks have finished
+			
+			COMSTAT s;
+			DWORD err = 0;
+			ClearCommError(iCommPort,&err,&s);
+
+			//if we are failing if one or more of CTS, DSR, DCD go low
+			if (iRXLineFail)
+				{
+				error = KErrCommsLineFail;
+				iRXLineFail = EFalse;
+				}
+			else if (err)
+				{
+				if (err & CE_FRAME)
+					error = KErrCommsFrame;
+				else if (err & CE_OVERRUN)
+					error = KErrCommsOverrun;
+				else if (err & CE_RXPARITY)
+					error = KErrCommsParity;
+				}
+
+			ReadCompletion(this, error, len);
+			break;
+			}
+
+		case WAIT_IO_COMPLETION:
+			break;
+
+		default:
+			Emulator::LastError();
+			FAULT();
+			}
+		}
+	}
+
+void DCommWins::DriverCommand(TDriverCommand aCommand)
+//
+// Do a driver command - executed when the semaphore has been signalled in the comm port thread
+//
+	{
+	switch (aCommand)
+		{
+	case ESetBreak:
+		FlushFileBuffers(iCommPort);
+		SetCommBreak(iCommPort);
+		break;
+
+	case EClearBreak:
+		ClearCommBreak(iCommPort);
+		break;
+
+	case ETransmit0:
+		
+		if (!iWritePending)
+			{
+			if ((iConfig->iHandshake & KConfigObeyCTS) != 0 && (Signals() & KSignalCTS) == 0)
+				iWritePending = ETransmit0;
+			else
+				DoWriteComplete(KErrNone);
+			}
+		break;
+
+	case ETransmit:
+		
+		if (!iWritePending)
+			{
+			COMMTIMEOUTS ct;
+			int r = GetCommTimeouts(iCommPort, &ct);
+			ct.WriteTotalTimeoutConstant = 0;
+			ct.WriteTotalTimeoutMultiplier = 0;
+			r = SetCommTimeouts(iCommPort, &ct);
+
+			WriteFileP(iCommPort,iOutDes.Ptr(), iOutDes.Length(), &dummyLen, &iWriteOverLapped);
+			iWritePending = ETransmit;
+			iTransmitting= ETrue;
+			}
+		break;
+
+	case EStart:
+		{
+		iSignalStatus=0;
+		iSignalStatus=0;
+		DWORD commErrors;
+		BOOL res;
+		DWORD lastError = 0;
+		COMSTAT cstat;
+
+		do
+			{
+			ClearCommError(iCommPort,&commErrors,&cstat);
+			res = WaitCommEvent(iCommPort,&iSignalStatus,&iSignalOverLapped);
+			if (!res)
+				lastError = GetLastError();
+			}
+		while((!res) && (lastError != ERROR_IO_PENDING));
+		}
+		break;
+	
+	case EStop:
+        // Flush last write
+		if(iWritePending == ETransmit)
+			{
+			WaitForSingleObject(iWriteOverLapped.hEvent, INFINITE);
+			FlushFileBuffers(iCommPort);
+			}
+        iWritePending=0;
+        iTransmitting=EFalse;
+		// Fall through
+	case EStopNoDrain:
+		// Cancel any pending writes
+        if(iWritePending == ETransmit)
+		    {
+			PurgeComm(iCommPort, PURGE_TXABORT|PURGE_TXCLEAR);
+            WaitForSingleObject(iWriteOverLapped.hEvent, INFINITE);
+		    }   
+        iWritePending=0;
+		iTransmitting=EFalse;
+		iStopping=ETrue;
+        if(iRunning)
+            {
+            SetCommMaskP(iCommPort,EV_BREAK|EV_CTS|EV_ERR|EV_DSR|EV_RLSD|EV_RXCHAR);
+            WaitForSingleObject(iSignalOverLapped.hEvent, INFINITE);
+            }
+		break;
+
+	case EDie:	
+		SignalDriverThread();
+		ExitThread(1);
+		break;
+	
+	case EConfigure:
+		DoConfigure();
+		break;
+	
+	case ETransmitCancel:
+		if (iWritePending == ETransmit)
+			PurgeComm(iCommPort, PURGE_TXABORT);
+//		else if (iWritePending == ETransmit0)
+//			{
+			// careful - this runs in the context of the kernel thread, not the event thread
+		iLdd->iTxError = KErrCancel;
+		iLdd->iTxCompleteDfc.Enque();
+//			}
+		break;
+
+	case EReceive:
+		if (!iReadPending)
+			{
+			COMMTIMEOUTS ct;
+			int r = GetCommTimeouts(iCommPort, &ct);
+			ct.ReadIntervalTimeout = 0;
+			ct.ReadTotalTimeoutMultiplier = 0;
+			ct.ReadTotalTimeoutConstant = 0;
+			r = SetCommTimeouts(iCommPort, &ct);
+
+			//if we are doing a terminated read.... we need to do it a byte at a time!
+			if (iTerminatedRead)
+				{
+				iReadSoFar = 0;
+				ReadFileP(iCommPort,(void*)iInDes.Ptr(), 1, &dummyLen, &iReadOverLapped);
+				}
+			else
+				{
+				ReadFileP(iCommPort,(void*)iInDes.Ptr(), iClientReadLength, &dummyLen, &iReadOverLapped);
+				}
+
+			iReadPending = EReceive;
+			}
+		break;
+
+	case EReceiveOneOrMore:
+		if (!iReadPending)
+			{
+			COMMTIMEOUTS ct;
+			int r = GetCommTimeouts(iCommPort, &ct);
+			ct.ReadIntervalTimeout = MAXDWORD;
+			ct.ReadTotalTimeoutMultiplier = MAXDWORD;
+			ct.ReadTotalTimeoutConstant = KReadOneOrMoreTimeout;
+			r = SetCommTimeouts(iCommPort, &ct);
+
+			//if we are doing a terminated read....
+			if (iTerminatedRead)
+				{
+				iReadSoFar = 0;
+				ReadFileP(iCommPort,(void*)iInDes.Ptr(), 1, &dummyLen, &iReadOverLapped);
+				}
+			else
+				{
+				ReadFileP(iCommPort,(void*)iInDes.Ptr(), iClientReadLength, &dummyLen, &iReadOverLapped);
+				}
+
+			iReadPending = EReceiveOneOrMore;
+			}
+		break;
+
+	case EReceiveCancel:
+		if (iReadPending)
+			PurgeComm(iCommPort, PURGE_RXABORT);
+		else if (iDataAvailableNotification)
+			DataAvailableNotificationCancel();
+		break;
+
+	case ENotifyDataAvailable:
+		{
+		iDataAvailableNotification = ETrue;
+		//setup the comms notifications for data available
+		break;
+		}
+
+	case ENotifySignals:
+		{
+		TUint currentSignals = Signals();
+		TUint changed = (currentSignals ^ iSavedSignals) & iSignalsWanted;
+		if (changed) 
+			{
+			SignalCompletion(this, KErrNone, changed, currentSignals);
+			iSavedSignals = currentSignals;
+			iSignalsWanted = 0;				
+			}
+		else
+			iSignalsRequested = iSignalsWanted;	//checked when signals change
+		}
+		break;
+
+
+	default:
+		// Panic(EUnknownCommand);
+		break;
+		}
+	iCommand=EInvalidCommand;
+	SignalDriverThread();
+	}
+
+
+TDfcQue* DCommWins::DfcQ(TInt /*aUnit*/)
+	{
+	return Kern::DfcQue0();
+	}
+
+
+TInt DCommWins::ValidateConfig(const TCommConfigV01 &aConfig) const
+//
+// Check a config structure.
+//
+	{
+	if(aConfig.iRate & EBpsSpecial)
+		return KErrNotSupported;
+
+	switch (aConfig.iParity)
+		{
+		case EParityNone:
+		case EParityOdd:
+		case EParityEven:
+			break;
+		default:
+			return KErrNotSupported;
+		}
+	switch (aConfig.iRate)
+		{
+		case EBps50:
+		case EBps75:
+		case EBps134:
+		case EBps1800:
+		case EBps2000:
+		case EBps3600:
+		case EBps7200:
+			return KErrNotSupported;
+		default:
+			break;
+		};
+	return KErrNone;
+	}
+
+inline TBool DCommWins::LineFail()
+	{
+	return iLineFail;
+	}
+
+
+
+DECLARE_STANDARD_PDD()
+	{
+	return new DDriverComm;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/soundsc_rx.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1138 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\soundsc_rx.cpp
+// Emulator record functions for the shared chunk sound driver PDD.
+// 
+//
+
+/**
+ @file
+ @internalTechnology
+ @prototype
+*/
+
+#include "winssoundsc.h"
+
+/**
+The thread function for the record windows thread.
+This function is always executed in windows thread context.
+*/
+LOCAL_C TUint RecordThreadFunction(DWinsSoundScRxPdd *aSoundPdd)
+	{
+	aSoundPdd->RecordThread();
+	return 0;
+	}
+		
+/**
+The waveform input callback function. This can receive the following messages:-
+WIM_OPEN when the input device is opened, WIM_CLOSE when the input device is closed,
+and WIM_DATA each time a record data block has been filled (i.e. completion of waveInAddBuffer).
+This function is always executed in windows thread context.
+*/
+LOCAL_C void CALLBACK WaveInProc(HWAVEIN /*hwi*/, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD /*dwParam2*/)
+	{
+	if (uMsg == WIM_DATA)
+		{
+		DWinsSoundScRxPdd * pdd = (DWinsSoundScRxPdd*)dwInstance;
+		pdd->WaveInProc((WAVEHDR*)dwParam1);
+		}
+	}			
+
+/**
+Constructor for the WINS shared chunk record PDD.
+This function is always executed in driver thread context.
+*/
+DWinsSoundScRxPdd::DWinsSoundScRxPdd()
+	: iDfc(DWinsSoundScRxPdd::RecordDfc,this,2)
+	{		
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScRxPdd::DWinsSoundScRxPdd"));
+	
+//	iDriverThreadSem=0;
+//	iRecordThread=0;
+//	iRecordThreadMutex=0;
+//	iRecordThreadSem=0;
+//	iStopSemaphore=0;
+//	iDeathSemaphore=0;
+//	iRecordDeviceHandle=0;
+//	iRecordCommand=ERecData;
+//	iRecordCommandArg0=0;
+//	iRecordCommandArg1=0;
+//	iPendingRecord=0;
+//	iRecordThreadError=0;
+///	iWaveformBufMgr=NULL;
+//	iCompletedRecordBufHdrMask=0;
+//	iRecordBufferSize=0;
+//	iRecordEnabled=EFalse;
+//	iNoHardware=EFalse;
+//	iRecordTimerEvent=0;
+//	iTimerID=0;
+//	iTimerActive=EFalse;
+	}
+	
+/**
+Destructor for the WINS shared chunk record PDD.
+This function is always executed in driver thread context.
+*/
+DWinsSoundScRxPdd::~DWinsSoundScRxPdd()
+	{
+	// If the Windows thread started up successfully, signal it to shut down and wait for it to do so
+	if (iRecordThreadRunning)
+		{
+		// Signal the windows thread to close down the record device and exit the windows thread.
+		iDeathSemaphore = CreateSemaphore(NULL, 0, 2, NULL);
+		RecordThreadCommand(EExit);
+	
+		// Wait for the record thread to terminate.
+		if (iDeathSemaphore)
+			{
+			Emulator::Escape();
+			WaitForSingleObject(iDeathSemaphore, INFINITE); 
+			Emulator::Reenter();
+
+			__HOST_LOCK;
+			CloseHandle(iDeathSemaphore);
+			}
+		}
+		
+	if (iRecordTimerEvent)
+		CloseHandle(iRecordTimerEvent); 
+	if (iRecordThreadSem)
+		CloseHandle(iRecordThreadSem); 
+	if (iRecordThread)
+		CloseHandle(iRecordThread);
+	if (iDriverThreadSem)
+		CloseHandle(iDriverThreadSem); 	
+	
+	if (iWaveformBufMgr)
+		delete iWaveformBufMgr;
+	}
+	
+/**
+Second stage constructor for the WINS shared chunk record PDD.
+Note that this constructor is called before the second stage constructor for the LDD so it is not
+possible to call methods on the LDD here.
+This function is always executed in driver thread context.
+@param aPhysicalDevice A pointer to the factory class that is creating this PDD.
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/	
+TInt DWinsSoundScRxPdd::DoCreate(DWinsSoundScPddFactory* aPhysicalDevice)
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScRxPdd::DoCreate"));
+
+	iPhysicalDevice=aPhysicalDevice;
+	
+	// Set up the correct DFC queue.
+	iDfc.SetDfcQ(iPhysicalDevice->iDfcQ);
+	
+	SetCaps();	// Setup the capabilities of this device.
+	
+	// Setup the default audio configuration
+	iSoundConfig.iChannels=2;
+	iSoundConfig.iRate=ESoundRate48000Hz;
+	iSoundConfig.iEncoding=ESoundEncoding16BitPCM;
+	iSoundConfig.iDataFormat=ESoundDataFormatInterleaved;
+	
+	__HOST_LOCK;
+
+	// Query the waveform device capabilities using the default device identifier in order
+	// to check if there is a functioning waveform device present.  Note that some versions of
+	// Windows (such as Windows Server 2003) will actually return MMSYSERR_NOERROR when this is
+	// called, even if there is no waveform device present, so we have a further check in
+	// when waveInOpen() is called
+	WAVEINCAPS waveInCaps;
+	MMRESULT res = waveInGetDevCaps(WAVE_MAPPER,&waveInCaps,sizeof(WAVEINCAPS));
+#ifdef FORCE_NO_HARDWARE
+	res=MMSYSERR_NOERROR+1;
+#endif
+	if (res != MMSYSERR_NOERROR)
+		iNoHardware = ETrue;
+	
+	__HOST_LOCK_OFF;
+	
+	// Create the windows waveform audio buffer manager.
+	iWaveformBufMgr=new TWaveformBufMgr(ESoundDirRecord,!iNoHardware);
+	if (!iWaveformBufMgr)
+		return(KErrNoMemory);
+	
+	// Create the driver thread semaphore.
+	iDriverThreadSem = CreateSemaphore(NULL,0,0x7fffffff,NULL);
+	if (!iDriverThreadSem)
+		return(KErrNoMemory);
+	
+	// Create the record windows thread.
+	if ((iRecordThread=CreateWin32Thread(EThreadEvent,(LPTHREAD_START_ROUTINE)RecordThreadFunction,(void *)this, FALSE))==NULL)
+		return(Emulator::LastError());
+	SetThreadPriority(iRecordThread,THREAD_PRIORITY_HIGHEST);
+	__ASSERT_ALWAYS( ResumeThread(iRecordThread) != 0xffffffff, PANIC()); //Windows Unexpected Error
+	
+	// Wait to be notified of successful thread initialization
+	Emulator::Escape();
+	WaitForSingleObject(iDriverThreadSem,INFINITE);
+	Emulator::Reenter();
+
+	// If the Windows thread started up successfully, indicate this fact so that when shutting down we know
+	// to signal to the thread to exit
+	if (iRecordThreadError == KErrNone)
+		iRecordThreadRunning = ETrue;
+
+	return(iRecordThreadError);
+	}
+
+/**
+Called from the LDD to return the DFC queue to be used by this device.
+This function is always executed in driver thread context.
+@return The DFC queue to use.
+*/	
+TDfcQue* DWinsSoundScRxPdd::DfcQ(TInt /*aUnit*/)
+	{
+	return(iPhysicalDevice->iDfcQ);
+	}
+
+/** 
+Called from the LDD to return the shared chunk create information to be used by this device.
+This function is always executed in driver thread context.
+@param aChunkCreateInfo A chunk create info. object to be to be filled with the settings
+						required for this device.
+*/		
+void DWinsSoundScRxPdd::GetChunkCreateInfo(TChunkCreateInfo& aChunkCreateInfo)
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScRxPdd::GetChunkCreateInfo"));
+
+	aChunkCreateInfo.iType=TChunkCreateInfo::ESharedKernelMultiple;
+	aChunkCreateInfo.iMapAttr=0;
+	aChunkCreateInfo.iOwnsMemory=ETrue; 				// Using RAM pages.
+	aChunkCreateInfo.iDestroyedDfc=NULL; 				// No chunk destroy DFC.
+	}
+	
+/**
+Called from the LDD to return the capabilities of this device.
+This function is always executed in driver thread context.
+@param aCapsBuf A packaged TSoundFormatsSupportedV02 object to be filled with the record
+				capabilities of this device. This descriptor is in kernel memory and can be accessed directly.
+@see TSoundFormatsSupportedV02.
+*/
+void DWinsSoundScRxPdd::Caps(TDes8& aCapsBuf) const
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScRxPdd::Caps"));
+	
+	// Copy iCaps back.
+	TPtrC8 ptr((const TUint8*)&iCaps,sizeof(iCaps));
+	aCapsBuf.FillZ(aCapsBuf.MaxLength());
+	aCapsBuf=ptr.Left(Min(ptr.Length(),aCapsBuf.MaxLength()));	
+	}
+	
+/**
+Called from the LDD to return the maximum transfer length in bytes that this device can support in a single data transfer.
+@return The maximum transfer length in bytes.
+*/
+TInt DWinsSoundScRxPdd::MaxTransferLen() const
+	{
+	return(KWinsMaxAudioTransferLen);		// 32K
+	}		
+				
+/**
+Called from the LDD to power up the sound device.
+This function is always executed in driver thread context.
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/
+TInt DWinsSoundScRxPdd::PowerUp()
+	{
+	return(KErrNone);
+	}
+
+/**
+Called from the LDD to configure or reconfigure the device using the the configuration supplied.
+This function is always executed in driver thread context.
+@param aConfigBuf A packaged TCurrentSoundFormatV02 object which contains the new configuration settings.
+				  This descriptor is in kernel memory and can be accessed directly.
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+@see TCurrentSoundFormatV02.
+*/	
+TInt DWinsSoundScRxPdd::SetConfig(const TDesC8& aConfigBuf)
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScRxPdd::SetConfig"));
+
+	// Cannot change the configuration while the device is open and recording. (LDD should prevent
+	// this anyway but better safe than sorry).
+	if (iRecordDeviceHandle)
+		return(KErrInUse);
+	
+	// Save the current settings so we can restore them if there is a problem with the new ones.
+	TCurrentSoundFormatV02 saved=iSoundConfig;
+	
+	// Read the new configuration from the LDD.
+	TPtr8 ptr((TUint8*)&iSoundConfig,sizeof(iSoundConfig));
+	Kern::InfoCopy(ptr,aConfigBuf);
+	
+	// Open the record device with the new settings to check they are supported. Then close it
+	// again - don't leave it open yet.
+	TInt r = CreateRecordDevice(ETrue);
+	if (r==KErrNone)
+		CloseRecordDevice();
+	else
+		iSoundConfig=saved;	// Restore the previous settings
+	
+	return(r);
+	}
+
+/**
+Called from the LDD to set the record level.
+This function is always executed in driver thread context.
+@param aLevel The record level to be set - a value in the range 0 to 255. The value 255 equates 
+	   to the maximum record level and each value below this equates to a 0.5dB step below it.
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/
+TInt DWinsSoundScRxPdd::SetVolume(TInt /*aVolume*/)
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScRxPdd::SetVolume"));
+	
+	// There's no adjustment of the record level on the wave in device.
+	
+	return(KErrNone);
+	}
+	
+/**
+Called from the LDD to prepare the audio device for recording.
+This function is always executed in driver thread context.
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/
+TInt DWinsSoundScRxPdd::StartTransfer()
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScRxPdd::StartTransfer"));
+
+	// Convert the enum representing the current sample rate into an integer
+	TInt samplesPerSecond=RateInSamplesPerSecond(iSoundConfig.iRate);
+	if (samplesPerSecond==0)
+		return(KErrNotSupported);
+
+	// Now convert the sample rate into the number of bytes per second and save for later use
+	iBytesPerSecond=samplesPerSecond;
+	if (iSoundConfig.iChannels==2)
+		iBytesPerSecond*=2;
+	if (iSoundConfig.iEncoding==ESoundEncoding16BitPCM)
+		iBytesPerSecond*=2;
+
+	iBytesRecordedBeforeLastPause = 0;
+	iBytesSincePauseReportedToLdd = 0;
+
+	iRecordEnabled=ETrue;
+
+	// Open the record device with the current settings.
+	iPendingRecord=0;
+	iCompletedRecordBufHdrMask=0;					// Reset the completion status mask
+	TInt r = CreateRecordDevice();
+	return(r);
+	}
+	
+/**
+Called from the LDD to initiate the recording of a portion of data from the audio device. 
+When the transfer is complete, the PDD signals this event using the LDD function RecordCallback().
+This function is always executed in driver thread context.
+@param aTransferID A value assigned by the LDD to allow it to uniquely identify a particular transfer fragment.
+@param aLinAddr The linear address within the shared chunk for storing the recorded data.
+@param aPhysAddr The physical address within the shared chunk for storing the recorded data.
+@param aNumBytes The number of bytes to be recorded. 
+@return KErrNone if the transfer has been initiated successfully;
+  		KErrNotReady if the device is unable to accept the transfer for the moment;
+		otherwise one of the other system-wide error codes.
+*/
+TInt DWinsSoundScRxPdd::TransferData(TUint aTransferID,TLinAddr aLinAddr,TPhysAddr /*aPhysAddr*/,TInt aNumBytes)
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScRxPdd::TransferData(ID:%xH)",aTransferID));
+	
+	// Check that we can accept the request
+	if (aNumBytes>KWinsMaxAudioTransferLen)
+		return(KErrArgument);
+	if (iPendingRecord>=iWaveformBufMgr->iNumWaveformBufs)	// LDD may issue multiple data transfers per buffer.
+		return(KErrNotReady);
+	
+	// Signal the windows thread to initiate the recording of a buffers worth of data from the wavein device.
+	iPendingRecord++;
+	RecordThreadCommand(ERecData,aTransferID,aLinAddr,aNumBytes);
+	
+	// Although the windows thread runs at a higher priority, its not safe to assume we will always get pre-empted at this
+	// point while the the higher priority thread processes and completes the request. Instead we need to wait until it
+	// signals back completion of the command.
+	Emulator::Escape();
+	WaitForSingleObject(iDriverThreadSem,INFINITE);
+	Emulator::Reenter();	
+
+	return(iRecordThreadError);	
+	}
+
+/**
+Called from the LDD to terminate the recording of a data from the device and to release any resources necessary for
+recording.
+The LDD will leave the audio device capturing record data even when there are no record requests pending from the client.
+Transfer will only be terminated when the client either issues RSoundSc::CancelRecordData() or closes the channel. Once
+this function had been called, the LDD will not issue  any further TransferData() commands without first issueing a
+StartTransfer() command.
+This function is always executed in driver thread context.
+*/
+void DWinsSoundScRxPdd::StopTransfer()
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScRxPdd::StopTransfer"));
+	
+	// Signal the windows thread to stop it from sending any more buffers to wavein device.
+	iStopSemaphore = CreateSemaphore(NULL, 0, 1, NULL);
+	RecordThreadCommand(EStop);
+
+	// Need to wait for the record thread to finish using the record handle before it's safe to close the device and 
+	// set the handle to NULL.
+	if (iStopSemaphore)
+		{
+		// Wait for the record thread to stop.
+		Emulator::Escape();
+		WaitForSingleObject(iStopSemaphore, INFINITE);  
+		Emulator::Reenter();
+
+		__HOST_LOCK;
+		CloseHandle(iStopSemaphore);
+		iStopSemaphore = NULL;
+		}
+		
+	// Make sure the DFC is not queued.
+	iDfc.Cancel();	
+			
+	CloseRecordDevice();							// Close down the record device.
+	iPendingRecord=0;
+	iCompletedRecordBufHdrMask=0;					// Reset the completion status mask
+	}
+
+/**
+Called from the LDD to halt the recording of data from the sound device but not to release any resources necessary for
+recording.
+All active transfers should be aborted. When recording is halted the PDD signals this event with a single call of the LDD 
+function RecordCallback() - reporting back any partial data already received. If transfer is resumed later, the LDD will
+issue a new TransferData() request to re-commence data transfer.
+This function is always executed in driver thread context.
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/
+TInt DWinsSoundScRxPdd::PauseTransfer()
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScRxPdd::PauseTransfer"));
+	
+	// Signal the windows thread to stop recording on the wavein device - aborting any transfers queued.
+	RecordThreadCommand(EPause);
+	
+	// Wait for the windows thread to complete the request
+	Emulator::Escape();
+	WaitForSingleObject(iDriverThreadSem,INFINITE);
+	Emulator::Reenter();
+	
+	// Make sure the DFC is not queued.
+	iDfc.Cancel();
+	
+	// The windows thread returns the total bytes recorded since the last pause (as reported by windows). 
+	TUint totalRecordedSincePause = iRecordThreadError;
+	TUint lastTransferLength = totalRecordedSincePause - iBytesSincePauseReportedToLdd;
+	Kern::Printf("totalRecordedSincePause %d - iBytesSincePauseReportedToLdd %d = lastTransferLength %d\n",
+				 totalRecordedSincePause, iBytesSincePauseReportedToLdd, lastTransferLength);
+
+	iBytesRecordedBeforeLastPause += totalRecordedSincePause;
+	iBytesSincePauseReportedToLdd = 0;
+
+	if (iPendingRecord)
+		{
+		Ldd()->RecordCallback(0, KErrNone, lastTransferLength);	// We can use a NULL tranfer ID when pausing.
+	
+		// The LDD will abandon any other transfers queued so we can mark all buffers as not in use.
+    	for (TInt i=0 ; i<iWaveformBufMgr->iNumWaveformBufs ; i++)
+    		{
+    		TWaveformAudioBuf* buf=&iWaveformBufMgr->iWaveformAudioBuf[i];
+    		if (buf->iIsInUse)
+    			buf->iIsInUse=EFalse;
+    		}
+		iPendingRecord=0;
+		}
+
+	// Indicate that all request to Windows for recording have been cancelled
+	iCompletedRecordBufHdrMask=0;
+					
+	return(KErrNone);
+	}
+	
+/**
+Called from the LDD to resume the recording of data from the sound device following a request to halt recording.
+Any active transfer would have been aborted when the device was halted so its just a case of re-creating the same setup
+acheived following StartTransfer().
+This function is always executed in driver thread context.
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/
+TInt DWinsSoundScRxPdd::ResumeTransfer()
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScRxPdd::ResumeTransfer"));
+	
+	iPendingRecord=0;
+	iCompletedRecordBufHdrMask=0; // All buffers would have completed during pausing (waveInReset) so clear mask.
+	iRecordEnabled=ETrue; // Simply set the flag to enable the windows thread to restart sending buffers to wavein device. 
+
+	// Signal the windows thread to resume recording on the wavein device.
+	RecordThreadCommand(EResume);
+
+	return(KErrNone);
+	}
+	
+/**
+Called from the LDD to power down the sound device.
+This function is always executed in driver thread context.
+*/
+void DWinsSoundScRxPdd::PowerDown()
+	{
+	
+	}
+	
+/**
+Called from the LDD to handle a custom configuration request.
+@param aFunction A number identifying the request.
+@param aParam A 32-bit value passed to the driver. Its meaning depends on the request.
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/
+TInt DWinsSoundScRxPdd::CustomConfig(TInt /*aFunction*/,TAny* /*aParam*/)
+	{
+	return(KErrNotSupported);
+	}
+		
+/**
+Called from the LDD to find out how many microseconds of data have been recorded.  This is called
+in the context of the DFC thread.
+@param aTimeTransferred	A reference to a variable into which to place the number of microseconds of audio.
+@param aStatus			The current status of this channel
+@return KErrNone if time is valid or KErrNotSupported.
+*/
+TInt DWinsSoundScRxPdd::TimeTransferred(TInt64& aTimeRecorded, TInt aState)
+	{
+	TInt r=KErrGeneral;
+	TInt64 ms=0;
+
+	if(iRecordDeviceHandle == 0)
+		{
+		// Recording not started yet
+		aTimeRecorded = 0;
+		return KErrNone;
+		}
+
+	// Kern::Printf("DWinsSoundScRxPdd::TimeTransferred - (iBytesSincePauseReportedToLdd=%d)\n", iBytesSincePauseReportedToLdd);
+	if (aState == DSoundScLdd::EPaused)
+		{
+		// Kern::Printf("DWinsSoundScRxPdd::TimeTransferred (paused) - iBytesRecordedBeforeLastPause %d\n", iBytesRecordedBeforeLastPause);
+		// Just use the paused number of bytes
+		ms=((iBytesRecordedBeforeLastPause/iBytesPerSecond)*1000);
+		TUint remainder=(iBytesRecordedBeforeLastPause%iBytesPerSecond);
+		ms+=((remainder*1000)/iBytesPerSecond);
+		ms*=1000;
+		aTimeRecorded=ms;
+		r=KErrNone;
+		}
+
+	TInt64 bytesTransferredSincePause = 0;
+	// If no hardware is present then we need to use iBytesSincePauseReportedToLdd + a fudge factor to allow
+	// the number of bytes processed by the "hardware" within the current transfer.
+	if(iNoHardware)
+		{
+		// Determine the # of milliseconds that have passed since the last timer triggered
+		DWORD currentTime = timeGetTime();
+		DWORD timeSinceLastEvent = (currentTime - iLastTimerEventTime);
+
+		// Clamp the resulting value to the duration of the timer, to prevent the millisecond count
+		// going backwards if Windows is busy and latency becomes an issue
+		if (timeSinceLastEvent > iSimulatedMsecDuration)
+			timeSinceLastEvent = iSimulatedMsecDuration;
+
+		bytesTransferredSincePause = iBytesSincePauseReportedToLdd;
+		WAVEHDR *buf = iWaveformBufMgr->iPendingBufList[0];
+		if(buf)
+			{
+			// Add on an estimate of the progress of the current transfer
+			bytesTransferredSincePause += ((buf->dwBufferLength * timeSinceLastEvent) / iSimulatedMsecDuration);
+			}
+		}
+	else
+		{
+		// Get the number of bytes recorded by the Windows audio system
+		MMTIME time;
+		time.wType=TIME_BYTES;
+		if ((waveInGetPosition(iRecordDeviceHandle,&time,sizeof(time)) != MMSYSERR_NOERROR) ||
+			(time.wType != TIME_BYTES))
+			{
+			// If requesting the number of bytes recorded is not supported, wType will be
+			// changed to what was actually returned, so check for this and don't continue
+			// if we got anything other than bytes
+			return KErrNotSupported;
+			}
+		bytesTransferredSincePause = time.u.cb;
+		}
+
+	// Kern::Printf("DWinsSoundScRxPdd::TimeTransferred - iBytesRecordedBeforeLastPause %d + bytesTransferredSincePause %d total %d (iNoHardware %d)\n", 
+	// 			iBytesRecordedBeforeLastPause, TUint32(bytesTransferredSincePause), TUint32(bytesTransferredSincePause + iBytesRecordedBeforeLastPause), iNoHardware);
+	// Convert the number of bytes recorded into microseconds and return it
+	ms=(((bytesTransferredSincePause + iBytesRecordedBeforeLastPause)/iBytesPerSecond)*1000);
+	TUint64 remainder=((bytesTransferredSincePause + iBytesRecordedBeforeLastPause)%iBytesPerSecond);
+	ms+=((remainder*1000)/iBytesPerSecond);
+	ms*=1000;
+	aTimeRecorded=ms;
+	r=KErrNone;
+
+	return(r);
+	}
+
+/** 
+Prepare the waveform audio buffer for record.
+@param aRecordDeviceHandle The handle to the waveform audio input device.
+*/		
+void TWaveformAudioBuf::DoPrepareIn(HWAVEIN aRecordDeviceHandle)
+	{
+	MMRESULT res = waveInPrepareHeader(aRecordDeviceHandle,&iBufHdr,sizeof(WAVEHDR));
+	__KTRACE_SND(Kern::Printf("   waveInPrepareHeader(BufNo:%d Pos:%x Len:%d)-%d",iBufNum,iBufHdr.lpData,iBufHdr.dwBufferLength,res));
+	__ASSERT_ALWAYS(res==MMSYSERR_NOERROR,Kern::Fault("DWinsSoundScTxPddWIPH", res)); //WaveInPrepareHeader error.	
+	}
+	
+/**
+Cleanup the preparation performed when the waveform audio buffer was prepared for record.
+@param aRecordDeviceHandle The handle to the waveform audio input device.
+*/	
+void TWaveformAudioBuf::DoUnprepareIn(HWAVEIN aRecordDeviceHandle)
+	{
+	MMRESULT res = waveInUnprepareHeader(aRecordDeviceHandle,&iBufHdr,sizeof(WAVEHDR));
+	__KTRACE_SND(Kern::Printf("   waveInUnprepareHeader(BufNo:%d)-%d",iBufNum,res));
+	__ASSERT_ALWAYS(res==MMSYSERR_NOERROR,Kern::Fault("DWinsSoundScTxPddWIUH",res)); //WaveInUnprepareHeader error.
+	}
+															
+/**
+The waveform input callback function to handle data block transfer completion.
+This function is always executed in windows thread context.
+@param aHdr A pointer to the header for the waveform audio buffer just transferred.
+*/	
+void DWinsSoundScRxPdd::WaveInProc(WAVEHDR* aHdr)
+	{
+	TInt waveBufId=aHdr->dwUser;				// Work out which waveform audio buffer is completing.
+    // Kern::Printf("DWinsSoundScRxPdd::WaveInProc waveBufId %d", waveBufId);
+
+	StartOfInterrupt();
+	iCompletedRecordBufHdrMask|=(1<<waveBufId);	// Update the completion status mask
+	iDfc.Add();									// Queue RecordDfc().
+	EndOfInterrupt();
+	}
+	
+/**
+The DFC used to handle data block record completion.
+This function is always executed in driver thread context.
+@param aPtr A pointer to the physical channel object.
+*/	
+void DWinsSoundScRxPdd::RecordDfc(TAny* aPtr)
+	{
+	TInt i;
+	DWinsSoundScRxPdd& drv=*(DWinsSoundScRxPdd*)aPtr;
+	
+	// More than 1 transfer may have completed so loop until all completions are handled
+	while (drv.iCompletedRecordBufHdrMask)
+		{
+		// Find the buffer ID of the next transfer that has completed
+		for (i=0 ; i<32 && !(drv.iCompletedRecordBufHdrMask&(1<<i)) ; i++) {}
+		__ASSERT_ALWAYS(i<drv.iWaveformBufMgr->iNumWaveformBufs,PANIC());
+		__e32_atomic_and_ord32(&drv.iCompletedRecordBufHdrMask, ~(1u<<i)); // Clear this bit in the mask
+		
+		// Update the status of the waveform audio buffer which is completing
+		TWaveformAudioBuf& buf=drv.iWaveformBufMgr->iWaveformAudioBuf[i];
+		buf.iIsInUse=EFalse;
+	
+		// Callback the LDD passing the information for the transfer that has completed
+		drv.iPendingRecord--;
+		__KTRACE_SND(Kern::Printf("   Read complete(BufNo:%x Pos:%x Len:%d)",i,buf.iBufHdr.lpData,buf.iBufHdr.dwBufferLength));
+		drv.iBytesSincePauseReportedToLdd += buf.iBufHdr.dwBufferLength;
+		drv.Ldd()->RecordCallback(buf.iTransferID,KErrNone,buf.iBufHdr.dwBufferLength);
+		}
+	}	
+
+/**
+Issue a request from the driver thread to the windows thread to execute a command.
+@param aCommand The identifier of the command to be executed.
+@param aArg0 A first command argument, its meaning depends on the command.
+@param aArg1 A second command argument, its meaning depends on the command.
+@param aArg2 A third command argument, its meaning depends on the command.
+This function is always executed in driver thread context.
+*/
+void DWinsSoundScRxPdd::RecordThreadCommand(TThreadCommand aCommand,TInt aArg0,TInt aArg1,TInt aArg2)
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScRxPdd:RecordThreadCommand"));
+	iRecordCommand = aCommand;
+	iRecordCommandArg0 = aArg0;
+	iRecordCommandArg1 = aArg1;
+	iRecordCommandArg2 = aArg2;
+
+	__HOST_LOCK;
+
+	ReleaseSemaphore(iRecordThreadSem,1,NULL);
+	}
+
+/**
+Pass a value from the windows thread to the driver thread.
+This function is always executed in windows thread context.
+@param aError The value to the passed to the driver thread.
+*/
+void DWinsSoundScRxPdd::RecordThreadNotifyDriver(TInt aError)
+	{
+	iRecordThreadError = aError;
+	BOOL ret = ReleaseSemaphore(iDriverThreadSem,1,NULL);
+	__ASSERT_ALWAYS(ret == TRUE,PANIC()); //Unexpected Windows Error
+	}
+
+#pragma warning(disable : 4702) // unreachable code
+/**
+Open the waveform input device for record. Use a default device identifier in order to select a device
+capable of meeting the current audio configuration. 
+This function can be executed in either driver thread or windows thread context.
+@pre The data member DWinsSoundScRxPdd::iSoundConfig must be setup with the current audio configuration.
+*/
+TInt DWinsSoundScRxPdd::OpenWaveInDevice()
+	{
+	WAVEFORMATEX format;
+	format.wFormatTag = WAVE_FORMAT_PCM;
+	TUint16 bitsPerSample = 8;
+
+	switch (iSoundConfig.iEncoding)
+		{
+		case ESoundEncoding8BitPCM:
+			break;
+		case ESoundEncoding16BitPCM:
+			bitsPerSample = 16;
+			break;
+		default:
+			return KErrNotSupported;
+		};
+
+	TInt rateInSamplesPerSecond=RateInSamplesPerSecond(iSoundConfig.iRate);
+	format.nChannels = TUint16(iSoundConfig.iChannels);
+	format.nSamplesPerSec = rateInSamplesPerSecond;
+	format.nAvgBytesPerSec = rateInSamplesPerSecond * iSoundConfig.iChannels * bitsPerSample / 8;
+	format.nBlockAlign = TUint16(iSoundConfig.iChannels * bitsPerSample / 8);
+	format.wBitsPerSample = bitsPerSample;
+	format.cbSize = 0;
+
+	MMRESULT res = MMSYSERR_NOERROR;
+
+	__COND_HOST_LOCK;		
+	if (iNoHardware)
+		{
+		timeBeginPeriod(KMMTimerRes);
+		iRecordDeviceHandle = (HWAVEIN)1;	
+		}
+	else
+		{
+		res = waveInOpen(&iRecordDeviceHandle, WAVE_MAPPER, &format, (DWORD)::WaveInProc, (DWORD)this, CALLBACK_FUNCTION);
+
+		// On some builds of Windows (such as Windows Server 2003), the waveInGetDevCaps() trick in
+		// DoCreate() won't work, so we have another special check for missing hardware here
+		if ((res == MMSYSERR_NODRIVER) || (res == MMSYSERR_BADDEVICEID))
+			{
+			// Pretend there was no error and switch into hardware emulation mode
+			res = MMSYSERR_NOERROR;
+			iNoHardware = ETrue;
+			iRecordDeviceHandle = (HWAVEIN)1;	
+			iWaveformBufMgr->iIsHardware = EFalse;
+			timeBeginPeriod(KMMTimerRes);
+			}
+		}
+
+	switch (res)
+		{
+		case MMSYSERR_NOERROR: // No error
+			return(KErrNone);
+		case MMSYSERR_ALLOCATED: // Specified resource is already allocated.
+			return(KErrInUse);
+		case WAVERR_BADFORMAT: // Attempted to open with an unsupported waveform-audio format
+			return(KErrNotSupported);
+		case MMSYSERR_NOMEM: // Unable to allocate or lock memory.
+			return(KErrNoMemory);
+		default:
+			return(KErrUnknown);
+		}
+	}
+#pragma warning(default : 4702) // unreachable code
+
+/**
+Open the audio input device.
+This function is always executed in driver thread context.
+@pre The data members DWinsSoundScRxPdd::iSoundConfig must be setup with the current audio configuration.
+*/
+TInt DWinsSoundScRxPdd::CreateRecordDevice(TBool aCheckDevice)
+	{
+	// Check if the waveform input device is already open.
+	if (iRecordDeviceHandle)
+		return(KErrNone);
+
+	__HOST_LOCK;
+
+	// Open the waveform input device for recording.
+	TInt err = OpenWaveInDevice();
+	if (err != KErrNone)
+		return(err);
+	
+	__HOST_LOCK_OFF;	
+
+	if (!aCheckDevice)
+		{
+		// Now, re-allocate a set of the waveform audio blocks in advance of any recording. Also, prepare one of these
+		// for each buffer within the shared chunk. Need to be in critical section while re-allocating the audio blocks.
+		NKern::ThreadEnterCS();
+		err=iWaveformBufMgr->ReAllocAndUpdate(Ldd()->BufConfig(),Ldd()->ChunkBase(),(TInt)iRecordDeviceHandle);
+		NKern::ThreadLeaveCS(); 
+		}
+		
+	return(err);
+	}
+
+/**
+Close down the record device.
+This function is always executed in driver thread context.
+*/
+void DWinsSoundScRxPdd::CloseRecordDevice()
+	{
+	__COND_HOST_LOCK;
+
+	if (iNoHardware)
+		timeEndPeriod(KMMTimerRes);
+
+	HWAVEIN handle = iRecordDeviceHandle;
+
+	if (handle)
+		{
+		if (!iNoHardware)
+			waveInReset(handle);		// Stop recording.
+		
+		// Un-prepare all the waveform audio buffers.
+		for (TInt i=0 ; i<iWaveformBufMgr->iNumWaveformBufs ; i++)
+			iWaveformBufMgr->iWaveformAudioBuf[i].Unprepare((TInt)handle);
+		
+		if (!iNoHardware)
+			waveInClose(handle);		// Close the wavein device.
+		
+		iRecordDeviceHandle = NULL;
+		}
+	}
+		
+/**
+The thread function for the record windows thread.
+This function is always executed in windows thread context.
+@pre The data members DWinsSoundScRxPdd::iSoundConfig must be setup with the current audio configuration.
+*/
+void DWinsSoundScRxPdd::RecordThread()
+	{
+	iRecordThreadSem = CreateSemaphore(NULL,0,0x7fffffff,NULL);
+	__ASSERT_ALWAYS(iRecordThreadSem,PANIC()); //No Windows Memory
+	iRecordTimerEvent=CreateEvent(NULL,TRUE,FALSE,NULL);
+	HANDLE objects[2];
+	objects[0]=iRecordThreadSem;		// Indicates command from driver thread
+	objects[1]=iRecordTimerEvent;
+
+	// Signal driver of successful setup
+	RecordThreadNotifyDriver(KErrNone);
+	ResetEvent(iRecordTimerEvent);
+	FOREVER
+		{
+		DWORD ret=WaitForMultipleObjectsEx(2,objects,FALSE,INFINITE,TRUE);
+
+		switch (ret)
+			{
+			case WAIT_OBJECT_0:	// Command received from the driver thread.
+				if (ProcessRecordCommand(iRecordCommand,iRecordCommandArg0,iRecordCommandArg1,iRecordCommandArg2)==KErrCompletion)
+					return; // ********* Exit thread **************
+				break;
+			case WAIT_OBJECT_0+1:
+				HandleRecordTimerEvent();
+				break;
+			}
+		}
+	}
+	
+/**
+Process a request from the driver thread to execute a command.
+This function is always executed in windows thread context.
+@param aCommand The identifier of the command to be executed.
+@param aArg0 A first command argument, its meaning depends on the command.
+@param aArg1 A second command argument, its meaning depends on the command.
+@param aArg2 A third command argument, its meaning depends on the command.
+@return KErrCompletion if the command to exit the windows thread has been received;
+		KErrNone otherwise;
+*/	
+TInt DWinsSoundScRxPdd::ProcessRecordCommand(TThreadCommand aCommand,TInt aArg0,TInt aArg1,TInt aArg2)
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScRxPdd:ProcessRecordCommand(%d)",aCommand));
+	switch(aCommand)
+		{	
+		case ERecData:	// Initiate the recording of a buffers worth of data from the wavein device.
+			{
+			if (iRecordEnabled)
+				{
+				// Acquire a windows waveform audio buffer for the transfer.
+				char* startAddress=(char*)aArg1;
+				TInt bytesToRecord=aArg2; 
+				__ASSERT_ALWAYS(bytesToRecord>0,PANIC());
+				TWaveformAudioBuf* waveformAudioBuf=iWaveformBufMgr->AcquireBuf(startAddress,bytesToRecord,(TInt)iRecordDeviceHandle);
+				waveformAudioBuf->iTransferID=(TUint)aArg0;
+				waveformAudioBuf->iBufHdr.dwBufferLength=bytesToRecord;
+									
+				if (!iNoHardware)
+					{
+					// This machine has a wavein device present. Send the buffer to the wavein device.
+					waveInStart(iRecordDeviceHandle); // Start input on the wavein device - safe to call this when already started.
+					MMRESULT res = waveInAddBuffer(iRecordDeviceHandle,&waveformAudioBuf->iBufHdr,sizeof(WAVEHDR));
+					__KTRACE_SND(Kern::Printf("   waveInAddBuffer(ID:%x Pos:%x Len:%d)-%d",aArg0,startAddress,bytesToRecord,res));
+					__ASSERT_ALWAYS(res == MMSYSERR_NOERROR,PANIC());  //WaveInAddBuffer Error
+					}
+				else	
+					{
+					// This machine has no audio hardware present so simulate the wavein device using a timer.
+					AddToPendingList(&waveformAudioBuf->iBufHdr,iWaveformBufMgr->iPendingBufList); // Queue the buffer on the pending list
+				
+					// Check if the timer needs starting/re-starting
+					if (!iTimerActive)
+						{
+						iLastTimerEventTime = timeGetTime();
+						StartTimer(&waveformAudioBuf->iBufHdr);
+						}
+					} 			
+				}
+		
+			// Signal the driver thread that we have completed the command.
+			RecordThreadNotifyDriver(KErrNone);
+			break;
+			}
+			
+			
+		case EStop:	// Terminate the recording of data from the wavein device.
+			{
+			iRecordEnabled=EFalse;	// Stop the windows thread from sending any more buffers to wavein device. 
+			
+			if (iNoHardware)
+				{
+				// This machine has no audio hardware present so simulates the waveout device using a timer.
+				StopTimer(ETrue);	// Stop the timer and cancel any buffers pending
+				}
+				
+			// Leave the driver thread to close down the record device.
+				
+			// Signal the driver thread that we have completed the command.	
+			if (iStopSemaphore)
+				{
+				LONG prev;
+				ReleaseSemaphore(iStopSemaphore,1,&prev);
+				}
+			break;
+			}
+	
+		case EExit:	// Close down the record device and exit the windows thread.
+			{
+			if (!iNoHardware)
+				{
+				// This machine has a wavein device present.
+				if (iRecordDeviceHandle)
+					{
+					waveInReset(iRecordDeviceHandle);   // Stop recording on the wavein device.
+					waveInClose(iRecordDeviceHandle);	// Close the wavein device.
+					}
+				}
+			else
+				{
+				// This machine has no audio hardware present so simulates the waveout device using a timer.
+				StopTimer(ETrue);	// Stop the timer and cancel any buffers pending.
+				}	
+			// Logically the record device is now shut so clear the handle.
+			iRecordDeviceHandle = 0;
+	
+			// Signal the driver thread that we have completed the command.		
+			if (iDeathSemaphore)
+				{
+				LONG prev;
+				ReleaseSemaphore(iDeathSemaphore,1,&prev);
+				}
+			return(KErrCompletion); 		// ********* Exit thread **************
+			}
+			
+		case EPause:	// Halt the recording of data from the wavein device.
+			iRecordEnabled=EFalse;
+			
+			DWORD position;
+			if (!iNoHardware)
+				{
+				// Need to try to work out how much of the current audio buffer has been filled.
+				MMTIME time;
+				time.wType = TIME_BYTES;
+				HWAVEIN handle = iRecordDeviceHandle;
+				waveInGetPosition(handle,&time,sizeof(MMTIME));
+				position = time.u.cb;
+			
+				// Stop recording. (Windows will mark all pending audio buffers as done).
+				waveInReset(handle);
+				}
+			else
+				{
+				// This machine has no audio hardware present so simulates the waveout device using a timer.
+
+				// Determine the # of milliseconds that have passed since the last timer triggered
+				DWORD currentTime = timeGetTime();
+				DWORD timeSinceLastEvent = (currentTime - iLastTimerEventTime);
+				
+				// Clamp the resulting value to the duration of the timer, to prevent the millisecond count
+				// going backwards if Windows is busy and latency becomes an issue
+				if (timeSinceLastEvent > iSimulatedMsecDuration)
+					timeSinceLastEvent = iSimulatedMsecDuration;
+				
+				TUint bytesTransferredSincePause = iBytesSincePauseReportedToLdd;
+				WAVEHDR *buf = iWaveformBufMgr->iPendingBufList[0];
+				if(buf)
+					{
+					// Add on an estimate of the progress of the current transfer
+					bytesTransferredSincePause += ((buf->dwBufferLength * timeSinceLastEvent) / iSimulatedMsecDuration);
+					}
+				
+				position = bytesTransferredSincePause;
+ 	
+                StopTimer(ETrue);   // Stop the timer and cancel any buffers pending
+				}	
+			
+			// Signal the driver thread that we have stopped recording - returning info. on any partially filled buffer.
+			RecordThreadNotifyDriver(position);
+			break;
+
+		case EResume:
+			if (iNoHardware)
+				{
+				// Determine how long we were paused for and add that time to the time the timer last
+				// triggered.  This will allow us to continue as though we had never been paused
+				iLastTimerEventTime = timeGetTime();
+				}
+
+			break;		
+		} 
+	return(KErrNone);	
+	}
+	
+/**
+Handle a timer expiry event. This is only used when no audio hardware is present, with a timer expiry corresponding
+to the end of a data block transfer.
+This function is always executed in windows thread context.
+*/
+void DWinsSoundScRxPdd::HandleRecordTimerEvent()
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScRxPdd:HandleRecordTimerEvent"));
+	ResetEvent(iRecordTimerEvent);	// Reset the event 
+	
+	// Remove the audio buffer just filled from the pending list and save it for the driver thread.
+	WAVEHDR* buf=RemoveFromPendingList(iWaveformBufMgr->iPendingBufList);
+	__ASSERT_ALWAYS(buf != NULL,PANIC());	
+	TInt waveBufId=buf->dwUser;					// Work out which waveform audio buffer is completing.
+	
+	// Check if there are more audio buffers waiting to be played
+	buf=iWaveformBufMgr->iPendingBufList[0];
+	if (buf)
+		{
+		iLastTimerEventTime = timeGetTime();
+		StartTimer(buf);						// Re-start the timer
+		}
+	else
+		iTimerActive=EFalse;	
+		
+	// Notify that another audio buffer has been filled.
+	StartOfInterrupt();
+	iCompletedRecordBufHdrMask|=(1<<waveBufId);	// Update the completion status mask
+	iDfc.Add();
+	EndOfInterrupt();
+	return;
+	}
+				
+/**
+Initialise the data member DWinsSoundScRxPdd::iCaps with the capabilities of this audio device.
+*/	
+void DWinsSoundScRxPdd::SetCaps()
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScRxPdd::SetCaps"));
+	
+	// The data transfer direction for this unit is record.
+	iCaps.iDirection=ESoundDirRecord;
+	
+	// Assume this unit supports mono or stereo.
+	iCaps.iChannels=KSoundMonoChannel|KSoundStereoChannel;
+	
+	// Assume this unit supports all sample rates.
+	iCaps.iRates=(KSoundRate7350Hz|KSoundRate8000Hz|KSoundRate8820Hz|KSoundRate9600Hz|KSoundRate11025Hz|
+				  KSoundRate12000Hz|KSoundRate14700Hz|KSoundRate16000Hz|KSoundRate22050Hz|KSoundRate24000Hz|
+				  KSoundRate29400Hz|KSoundRate32000Hz|KSoundRate44100Hz|KSoundRate48000Hz);
+	
+	// Assume this unit supports 8bit and 16bit PCM encoding.
+	iCaps.iEncodings=(KSoundEncoding8BitPCM|KSoundEncoding16BitPCM);
+	
+	// This unit only supports interleaved data format
+	iCaps.iDataFormats=KSoundDataFormatInterleaved;
+	
+	// The minimum request size that the device can support. 
+	iCaps.iRequestMinSize=0;	// No restriction
+	
+	// The request alignment that this device requires. 
+	iCaps.iRequestAlignment=0;	// No restriction
+	
+	// This unit is not capable of detecting changes in hardware configuration.
+	iCaps.iHwConfigNotificationSupport=EFalse;
+	}
+/**
+Start the audio timer.
+The timer is only used when no audio hardware is present on the machine. This is in order to introduce a delay which is
+equivelent to that incurred when transferring audio data over a real audio device.
+@param aBuffer The audio buffer which would have been transferred had a real audio device been present. This contains
+	information on the number of bytes to transfer.
+*/	
+void DWinsSoundScRxPdd::StartTimer(WAVEHDR* aBuffer)
+	{
+	// First, need to calculate the duration of the timer in milliseconds.
+	TInt bytesToPlay=aBuffer->dwBufferLength;
+	iSimulatedMsecDuration = bytesToPlay*1000;
+	iSimulatedMsecDuration /= (RateInSamplesPerSecond(iSoundConfig.iRate) * iSoundConfig.iChannels);
+	if (iSoundConfig.iEncoding==ESoundEncoding16BitPCM)
+		iSimulatedMsecDuration /= 2;
+	if (iSoundConfig.iEncoding==ESoundEncoding24BitPCM)
+		iSimulatedMsecDuration /= 3;
+	if (iSimulatedMsecDuration<=0)
+		iSimulatedMsecDuration=1;	// Round up to 1ms or timeSetEvent() will return an error.
+				
+	MMRESULT res = timeSetEvent(iSimulatedMsecDuration, KMMTimerRes, (LPTIMECALLBACK)iRecordTimerEvent, 0, TIME_ONESHOT | TIME_CALLBACK_EVENT_SET);
+	__ASSERT_ALWAYS(res != NULL,PANIC()); 	// timeSetEvent error.	
+	iTimerID = res;							// Save the identifier for the new timer event.
+	iTimerActive=ETrue;
+	}
+
+/**
+Stop the audio timer.
+The timer is only used when no audio hardware is present on the machine. This is in order to introduce a delay which is
+equivelent to that incurred when transferring audio data over a real audio device.
+@param aCancellAll Set to ETrue in order to discard any buffers queued on the pending buffer list. EFalse otherwise.
+*/	
+void DWinsSoundScRxPdd::StopTimer(TBool aCancelAll)
+	{
+	if (iTimerActive)
+		{
+		MMRESULT res = timeKillEvent(iTimerID);
+		__ASSERT_ALWAYS(res == TIMERR_NOERROR,PANIC()); // timeKillEvent error	
+		
+		if (aCancelAll)
+			{
+			WAVEHDR* b;
+			do
+				b=RemoveFromPendingList(iWaveformBufMgr->iPendingBufList);
+			while(b);
+			}
+		}
+	iTimerActive=EFalse;
+	}	
+
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/soundsc_tx.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1574 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\soundsc_tx.cpp
+// Emulator playback functions for the shared chunk sound driver PDD.
+// 
+//
+
+/**
+ @file
+ @internalTechnology
+ @prototype
+*/
+
+#include "winssoundsc.h"
+	
+_LIT(KSoundScPddName,"SoundSc.Wins");
+_LIT(KTxSoundDriverThreadName,"SoundDriverPlayThread");
+const TInt KSoundDriverThreadPriority=26;		// One less than DFC thread 0
+
+GLDEF_C TInt RateInSamplesPerSecond(TSoundRate aRate)
+	{
+	switch(aRate)
+		{
+		case ESoundRate7350Hz: 	return(7350);
+		case ESoundRate8000Hz: 	return(8000);
+		case ESoundRate8820Hz: 	return(8820);
+		case ESoundRate9600Hz: 	return(9600);
+		case ESoundRate11025Hz: return(11025);
+		case ESoundRate12000Hz: return(12000);
+		case ESoundRate14700Hz:	return(14700);
+		case ESoundRate16000Hz: return(16000);
+		case ESoundRate22050Hz: return(22050);
+		case ESoundRate24000Hz: return(24000);
+		case ESoundRate29400Hz: return(29400);
+		case ESoundRate32000Hz: return(32000);
+		case ESoundRate44100Hz: return(44100);
+		case ESoundRate48000Hz: return(48000);
+		default: return(0);
+		};
+	}
+
+// This utility function is used instead of WaitForSingleObject() for places
+// where the API call is made from either the driver thread or the play 
+// thread.If the call is made from the driver thread, the thread is removed from 
+// the kernel for the duration of the WaitForSingleObject() call.
+GLDEF_C DWORD WaitForSingleObjectDualThread(HANDLE hHandle,DWORD dwMilliseconds)
+	{
+	TBool epocThread = (NKern::CurrentContext() == NKern::EInterrupt)?EFalse:ETrue;
+	if (epocThread)
+		Emulator::Escape();
+	DWORD dwRet = WaitForSingleObject(hHandle, dwMilliseconds);
+	if (epocThread)
+		Emulator::Reenter();
+	return dwRet;
+	}
+	
+/**
+Remove an audio buffer from the head of the specified buffer list.
+Each list holds buffers which are waiting to be transferred. These lists are only used when no audio hardware is present.
+@param aList The pending buffer list from which the buffer should be removed (either record or playback).
+@return A pointer to the audio buffer reoved or NULL if the list is empty.
+*/
+GLDEF_C WAVEHDR* RemoveFromPendingList(WAVEHDR** aList)
+	{
+	WAVEHDR* buffer;
+	
+	buffer=aList[0];
+	if (buffer)
+		{
+		// Move any remaining up one in the list.
+		WAVEHDR* b;
+		do
+			{
+			b=aList[1];
+			*aList++=b;
+			}
+		while(b);
+		}
+	return(buffer);
+	}
+
+/**
+Add an audio buffer to the tail of the the specified buffer list.
+Each list holds buffers which are waiting to be transferred. These lists are only used when no audio hardware is present.
+@param aBuffer The audio buffer to be added.
+@param aList The pending buffer list into which the buffer should be added (either record or playback).
+*/
+GLDEF_C void AddToPendingList(WAVEHDR* aBuffer,WAVEHDR** aList)
+	{
+	while (*aList)
+		aList++;
+	*aList=aBuffer;
+	}
+
+/**
+The thread function for the play windows thread.
+This function is always executed in windows thread context.
+*/
+LOCAL_C TUint PlayThreadFunction(DWinsSoundScTxPdd *aSoundPdd)
+	{
+	aSoundPdd->PlayThread();
+	return 0;
+	}
+	
+/**
+The waveform output callback function. This can receive the following messages:-
+WOM_OPEN when the output device is opened, WOM_CLOSE when the output device is closed,
+and WOM_DONE each time a data block play transfer is completed (i.e. completion of waveOutWrite).
+This function is always executed in windows thread context.
+*/
+LOCAL_C void CALLBACK WaveOutProc(HWAVEOUT /*hwo*/, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD /*dwParam2*/)
+	{
+	if (uMsg == WOM_DONE)
+		{
+		DWinsSoundScTxPdd* pdd = (DWinsSoundScTxPdd*)dwInstance;
+		pdd->WaveOutProc((WAVEHDR*)dwParam1);
+		}
+	}
+		
+THostLock::THostLock() : iLocked(EFalse)
+	{
+	Lock();
+	}
+
+THostLock::THostLock(TBool /*aLock*/) : iLocked(EFalse)
+	{
+	}
+
+THostLock::~THostLock()
+	{
+	if (iLocked)
+		Unlock();
+	}
+
+void THostLock::Lock()
+	{
+	__ASSERT_DEBUG(!iLocked, PANIC());
+	Emulator::Lock();
+	iLocked = ETrue;
+	}
+
+void THostLock::Unlock()
+	{
+	__ASSERT_DEBUG(iLocked, PANIC());
+	Emulator::Unlock();
+	iLocked = EFalse;
+	}
+
+TCondHostLock::TCondHostLock() : THostLock(EFalse)
+	{
+	iEpocThread = (NKern::CurrentContext() == NKern::EInterrupt)?EFalse:ETrue;
+	Lock();
+	}
+
+void TCondHostLock::Lock()
+	{
+	if (iEpocThread)
+		THostLock::Lock();	
+	}
+
+void TCondHostLock::Unlock()
+	{
+	if (iEpocThread)
+		THostLock::Unlock();	
+	}
+	
+/**
+Standard export function for PDDs. This creates a DPhysicalDevice derived object,
+in this case - DWinsSoundScPddFactory.
+*/
+DECLARE_STANDARD_PDD()
+	{
+	return new DWinsSoundScPddFactory;
+	}
+	
+/**
+Constructor for the sound PDD factory class.
+*/
+DWinsSoundScPddFactory::DWinsSoundScPddFactory()
+	{	
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScPddFactory::DWinsSoundScPddFactory"));
+
+//	iDfcQ=NULL;
+	
+	// Support units KSoundScTxUnit0 & KSoundScRxUnit0.
+    iUnitsMask=(1<<KSoundScRxUnit0)|(1<<KSoundScTxUnit0);
+
+    // Set version number for this device.
+	iVersion=RSoundSc::VersionRequired();
+	}
+
+/**
+Destructor for the sound PDD factory class.
+*/
+DWinsSoundScPddFactory::~DWinsSoundScPddFactory()
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScPddFactory::~DWinsSoundScPddFactory"));
+	
+	// Destroy the kernel thread.
+	if (iDfcQ)
+		iDfcQ->Destroy();
+	}
+	
+/**
+Second stage constructor for the sound PDD factory class.
+This must at least set a name for the driver object.
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/
+TInt DWinsSoundScPddFactory::Install()
+	{
+	TInt r=KErrNone;
+	if (iDfcQ==NULL)
+		{
+		// Create a new sound driver DFC queue (and associated kernel thread). 
+		r=Kern::DynamicDfcQCreate(iDfcQ,KSoundDriverThreadPriority,KTxSoundDriverThreadName);
+		}
+	
+	if (r==KErrNone)
+		{
+		r=SetName(&KSoundScPddName); 			// Set the name of the driver object
+		}
+	
+	__KTRACE_SND(Kern::Printf("<DWinsSoundScPddFactory::Install - %d",r));
+	return(r);
+	}
+	
+/**
+Returns the PDD's capabilities. This is not used by the Symbian OS device driver framework
+or by the LDD.
+@param aDes A descriptor to write capabilities information into.
+*/
+void DWinsSoundScPddFactory::GetCaps(TDes8& /*aDes*/) const
+	{}
+
+/**
+Called by the kernel's device driver framework to check if this PDD is suitable for use
+with a logical channel.
+This is called in the context of the client thread which requested the creation of a logical
+channel - through a call to RBusLogicalChannel::DoCreate().
+The thread is in a critical section.
+@param aUnit The unit argument supplied by the client to RBusLogicalChannel::DoCreate().
+@param aInfo The info argument supplied by the client to RBusLogicalChannel::DoCreate() - not used.
+@param aVer The version number of the logical channel which will use this physical channel. 
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/
+TInt DWinsSoundScPddFactory::Validate(TInt aUnit, const TDesC8* /*aInfo*/, const TVersion& aVer)
+	{
+	// Check that the version specified is compatible.
+	if (!Kern::QueryVersionSupported(RSoundSc::VersionRequired(),aVer))
+		return(KErrNotSupported);
+	
+	// Check the unit number is compatible
+	if (aUnit!=KSoundScTxUnit0 && aUnit!=KSoundScRxUnit0)
+		return(KErrNotSupported);
+		
+	return(KErrNone);
+	}
+
+/**
+Called by the kernel's device driver framework to create a physical channel object.
+This is called in the context of the client thread which requested the creation of a logical
+channel - through a call to RBusLogicalChannel::DoCreate().
+The thread is in a critical section.
+@param aChannel Set by this function to point to the created physical channel object.
+@param aUnit The unit argument supplied by the client to RBusLogicalChannel::DoCreate().
+@param aInfo The info argument supplied by the client to RBusLogicalChannel::DoCreate().
+@param aVer The version number of the logical channel which will use this physical channel. 
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/
+TInt DWinsSoundScPddFactory::Create(DBase*& aChannel, TInt aUnit, const TDesC8* /*anInfo*/, const TVersion& /*aVer*/)
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScPddFactory::Create"));
+
+	// Create the appropriate PDD channel object.
+	TInt r=KErrNoMemory;
+	if (aUnit==KSoundScRxUnit0)
+		{
+		DWinsSoundScRxPdd* pD=new DWinsSoundScRxPdd;
+		aChannel=pD;
+		if (pD)
+			r=pD->DoCreate(this);
+		}
+		
+	else
+		{
+		DWinsSoundScTxPdd* pD=new DWinsSoundScTxPdd;
+		aChannel=pD;
+		if (pD)
+			r=pD->DoCreate(this);
+		}
+	return(r);
+	}
+	
+/**
+Constructor for the WINS shared chunk playback PDD.
+This function is always executed in driver thread context.
+*/
+DWinsSoundScTxPdd::DWinsSoundScTxPdd()
+	: iDfc(DWinsSoundScTxPdd::PlayDfc,this,2)
+	{		
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScTxPdd::DWinsSoundScTxPdd"));
+	
+//	iVolume=0;
+//	iDriverThreadSem=0;
+//	iPlayThread=0;
+//	iPlayThreadMutex=0;
+//	iPlayThreadSem=0;
+//	iStopSemaphore=0;
+//	iDeathSemaphore=0;
+//	iPlayCommand=ESendData;
+//	iPlayCommandArg0=0;
+//	iPlayCommandArg1=0;
+//	iPendingPlay=0;
+//	iPlayThreadError=0;
+//	iWaveformBufMgr=NULL;
+//	iCompletedPlayBufHdrMask=0;	
+//	iPlayBufferSize=0;
+//	iNoHardware=EFalse;
+//	iPlayTimerEvent=0;
+//	iTimerID=0;
+//	iTimerActive=EFalse;
+//	iWinWaveVolume=0;
+	}
+	
+/**
+Destructor for the WINS shared chunk playback PDD.
+This function is always executed in driver thread context.
+*/
+DWinsSoundScTxPdd::~DWinsSoundScTxPdd()
+	{
+	// If the Windows thread started up successfully, signal it to shut down and wait for it to do so
+	if (iPlayThreadRunning)
+		{
+		// Signal the windows thread to close down the play device and exit the windows thread.
+		iDeathSemaphore = CreateSemaphore(NULL, 0, 2, NULL);
+		PlayThreadCommand(EExit);
+
+		// Wait for the play thread to terminate.
+		if (iDeathSemaphore)
+			{
+			Emulator::Escape();
+			WaitForSingleObject(iDeathSemaphore, INFINITE); 
+			Emulator::Reenter();
+
+			__HOST_LOCK;
+			CloseHandle(iDeathSemaphore);
+			}
+		}
+
+	if (iPlayTimerEvent)
+		CloseHandle(iPlayTimerEvent); 
+	if (iPlayThreadSem)
+		CloseHandle(iPlayThreadSem); 
+	if (iPlayThread)
+		CloseHandle(iPlayThread);
+	if (iDriverThreadSem)
+		CloseHandle(iDriverThreadSem); 	
+	
+	if (iWaveformBufMgr)
+		delete iWaveformBufMgr;
+	}
+	
+/**
+Second stage constructor for the WINS shared chunk playback PDD.
+Note that this constructor is called before the second stage constructor for the LDD so it is not
+possible to call methods on the LDD here.
+This function is always executed in driver thread context.
+@param aPhysicalDevice A pointer to the factory class that is creating this PDD.
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/	
+TInt DWinsSoundScTxPdd::DoCreate(DWinsSoundScPddFactory* aPhysicalDevice)
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScTxPdd::DoCreate"));
+
+	iPhysicalDevice=aPhysicalDevice;
+	
+	// Set up the correct DFC queue.
+	iDfc.SetDfcQ(iPhysicalDevice->iDfcQ);
+	
+	SetCaps();	// Setup the capabilities of this device.
+	
+	// Setup the default audio configuration
+	iSoundConfig.iChannels=2;
+	iSoundConfig.iRate=ESoundRate48000Hz;
+	iSoundConfig.iEncoding=ESoundEncoding16BitPCM;
+	iSoundConfig.iDataFormat=ESoundDataFormatInterleaved;
+	
+	__HOST_LOCK;
+
+	// Query the waveform device capabilities using the default device identifier in order
+	// to check if there is a functioning waveform device present.  Note that some versions of
+	// Windows (such as Windows Server 2003) will actually return MMSYSERR_NOERROR when this is
+	// called, even if there is no waveform device present, so we have a further check in
+	// when waveOutOpen() is called
+	WAVEOUTCAPS waveOutCaps;
+	MMRESULT res = waveOutGetDevCaps(WAVE_MAPPER,&waveOutCaps,sizeof(WAVEOUTCAPS));
+#ifdef FORCE_NO_HARDWARE
+	res=MMSYSERR_NOERROR+1;
+#endif
+	if (res != MMSYSERR_NOERROR)
+		iNoHardware = ETrue;
+	
+	__HOST_LOCK_OFF;
+	
+	// Create the windows waveform audio buffer manager.
+	iWaveformBufMgr=new TWaveformBufMgr(ESoundDirPlayback,!iNoHardware);
+	if (!iWaveformBufMgr)
+		return(KErrNoMemory);
+	
+	// Create the driver thread semaphore.
+	iDriverThreadSem = CreateSemaphore(NULL,0,0x7fffffff,NULL);
+	if (!iDriverThreadSem)
+		return(KErrNoMemory);
+	
+	// Create the play windows thread.
+	if ((iPlayThread=CreateWin32Thread(EThreadEvent,(LPTHREAD_START_ROUTINE)PlayThreadFunction,(void *)this, FALSE))==NULL)
+		return(KErrNoMemory);
+	SetThreadPriority(iPlayThread,THREAD_PRIORITY_HIGHEST);
+	__ASSERT_ALWAYS(ResumeThread(iPlayThread) != 0xffffffff, PANIC()); // Windows Unexpected Error
+
+	// Wait to be notified of successful thread initialization
+	Emulator::Escape();
+	WaitForSingleObject(iDriverThreadSem,INFINITE);
+	Emulator::Reenter();
+
+	// If the Windows thread started up successfully, indicate this fact so that when shutting down we know
+	// to signal to the thread to exit
+	if (iPlayThreadError == KErrNone)
+		iPlayThreadRunning = ETrue;
+
+	return(iPlayThreadError);
+	}
+
+/**
+Called from the LDD to return the DFC queue to be used by this device.
+This function is always executed in driver thread context.
+@return The DFC queue to use.
+*/	
+TDfcQue* DWinsSoundScTxPdd::DfcQ(TInt /*aUnit*/)
+	{
+	return(iPhysicalDevice->iDfcQ);
+	}
+
+/** 
+Called from the LDD to return the shared chunk create information to be used by this device.
+This function is always executed in driver thread context.
+@param aChunkCreateInfo A chunk create info. object to be to be filled with the settings
+						required for this device.
+*/		
+void DWinsSoundScTxPdd::GetChunkCreateInfo(TChunkCreateInfo& aChunkCreateInfo)
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScTxPdd::GetChunkCreateInfo"));
+
+	aChunkCreateInfo.iType=TChunkCreateInfo::ESharedKernelMultiple;
+	aChunkCreateInfo.iMapAttr=0;
+	aChunkCreateInfo.iOwnsMemory=ETrue; 				// Using RAM pages.
+	aChunkCreateInfo.iDestroyedDfc=NULL; 				// No chunk destroy DFC.
+	}
+	
+/**
+Called from the LDD to return the capabilities of this device.
+This function is always executed in driver thread context.
+@param aCapsBuf A packaged TSoundFormatsSupportedV02 object to be filled with the play
+				capabilities of this device. This descriptor is in kernel memory and can be accessed directly.
+@see TSoundFormatsSupportedV02.
+*/
+void DWinsSoundScTxPdd::Caps(TDes8& aCapsBuf) const
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScTxPdd::Caps"));
+	
+	// Copy iCaps back.
+	TPtrC8 ptr((const TUint8*)&iCaps,sizeof(iCaps));
+	aCapsBuf.FillZ(aCapsBuf.MaxLength());
+	aCapsBuf=ptr.Left(Min(ptr.Length(),aCapsBuf.MaxLength()));	
+	}
+	
+/**
+Called from the LDD to return the maximum transfer length in bytes that this device can support in a single data transfer.
+@return The maximum transfer length in bytes.
+*/
+TInt DWinsSoundScTxPdd::MaxTransferLen() const
+	{
+	return(KWinsMaxAudioTransferLen);		// 32K
+	}		
+	
+/**
+Called from the LDD to power up the sound device.
+This function is always executed in driver thread context.
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/
+TInt DWinsSoundScTxPdd::PowerUp()
+	{
+	return(KErrNone);
+	}
+	
+/**
+Called from the LDD to configure or reconfigure the device using the the configuration supplied.
+This function is always executed in driver thread context.
+@param aConfigBuf A packaged TCurrentSoundFormatV02 object which contains the new configuration settings.
+				  This descriptor is in kernel memory and can be accessed directly.
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+@see TCurrentSoundFormatV02.
+*/	
+TInt DWinsSoundScTxPdd::SetConfig(const TDesC8& aConfigBuf)
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScTxPdd::SetConfig"));
+
+	// Cannot change the configuration while the device is open and playing. (LDD should prevent
+	// this anyway but better safe than sorry).
+	if (iPlayDeviceHandle)
+		return(KErrInUse);
+	
+	// Save the current settings so we can restore them if there is a problem with the new ones.
+	TCurrentSoundFormatV02 saved=iSoundConfig;
+	
+	// Read the new configuration from the LDD.
+	TPtr8 ptr((TUint8*)&iSoundConfig,sizeof(iSoundConfig));
+	Kern::InfoCopy(ptr,aConfigBuf);
+	
+	// Open the play device with the new settings to check they are supported. Then close it
+	// again - don't leave it open yet.
+	TInt r = CreatePlayDevice(ESetConfig);
+	if (r==KErrNone)
+		ClosePlayDevice();
+	else
+		iSoundConfig=saved;	// Restore the previous settings
+	
+	return(r);
+	}
+	
+const TInt KdBToLinear[KSoundMaxVolume+1] = 
+	{
+	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+	0x0000,0x0000,0x0000,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,
+	0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0202,0x0202,0x0202,0x0202,0x0202,0x0202,0x0202,0x0202,0x0202,0x0303,
+	0x0303,0x0303,0x0303,0x0303,0x0303,0x0404,0x0404,0x0404,0x0404,0x0505,0x0505,0x0505,0x0505,0x0606,0x0606,0x0606,
+	0x0707,0x0707,0x0808,0x0808,0x0909,0x0909,0x0a0a,0x0a0a,0x0b0b,0x0b0b,0x0c0c,0x0d0d,0x0e0e,0x0e0e,0x0f0f,0x1010,
+	0x1111,0x1212,0x1313,0x1414,0x1616,0x1717,0x1818,0x1a1a,0x1b1b,0x1d1d,0x1e1e,0x2020,0x2222,0x2424,0x2626,0x2929,
+	0x2b2b,0x2e2e,0x3030,0x3333,0x3636,0x3939,0x3d3d,0x4040,0x4444,0x4848,0x4c4c,0x5151,0x5656,0x5b5b,0x6060,0x6666,
+	0x6c6c,0x7272,0x7979,0x8080,0x8888,0x9090,0x9898,0xa2a2,0xabab,0xb5b5,0xc0c0,0xcbcb,0xd7d7,0xe4e4,0xf2f2,0xffff,	
+	};	
+	
+/**
+Called from the LDD to set the play volume.
+This function is always executed in driver thread context.
+@param aVolume The play volume to be set - a value in the range 0 to 255. The value 255 equates
+	to the maximum volume and each value below this equates to a 0.5dB step below it.
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/
+TInt DWinsSoundScTxPdd::SetVolume(TInt aVolume)
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScTxPdd::SetVolume"));
+	
+	// The documentation for waveOutSetVolume() says: "Volume settings are interpreted logarithmically" but evidence suggests these are really
+	// interpreted linearly. Hence, use a lookup table to convert from dB to linear. At the same time convert from an 8-bit wide range to a 
+	// 16-bit wide range.
+	iVolume=KdBToLinear[aVolume];
+	
+	// Only update the volume on the output device itself if this is currently open.
+	if (iPlayDeviceHandle)
+		waveOutSetVolume(iPlayDeviceHandle, iVolume | (iVolume << 16));	
+	return(KErrNone);
+	}	
+		
+/**
+Called from the LDD to prepare the audio device for playback.
+This function is always executed in driver thread context.
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/
+TInt DWinsSoundScTxPdd::StartTransfer()
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScTxPdd::StartTransfer"));
+	
+	// Convert the enum representing the current sample rate into an integer
+	TInt samplesPerSecond=RateInSamplesPerSecond(iSoundConfig.iRate);
+	if (samplesPerSecond==0)
+		return(KErrNotSupported);
+
+	// Now convert the sample rate into the number of bytes per second and save for later use
+	iBytesPerSecond=samplesPerSecond;
+	if (iSoundConfig.iChannels==2)
+		iBytesPerSecond*=2;
+	if (iSoundConfig.iEncoding==ESoundEncoding16BitPCM)
+		iBytesPerSecond*=2;
+
+	// Open the play device with the current settings.
+	iPendingPlay=0;
+	iCompletedPlayBufHdrMask=0;					// Reset the completion status mask
+	TInt r = CreatePlayDevice(EStartTransfer);
+	return(r);
+	}
+	
+/**
+Called from the LDD to initiate the playback of a portion of data to the audio device. 
+When the transfer is complete, the PDD signals this event using the LDD function PlayCallback().
+This function is always executed in driver thread context.
+@param aTransferID A value assigned by the LDD to allow it to uniquely identify a particular transfer fragment.
+@param aLinAddr The linear address within the shared chunk of the start of the data to be played.
+@param aPhysAddr The physical address within the shared chunk of the start of the data to be played.
+@param aNumBytes The number of bytes to be played. 
+@return KErrNone if the transfer has been initiated successfully;
+  		KErrNotReady if the device is unable to accept the transfer for the moment;
+		otherwise one of the other system-wide error codes.
+*/
+TInt DWinsSoundScTxPdd::TransferData(TUint aTransferID,TLinAddr aLinAddr,TPhysAddr /*aPhysAddr*/,TInt aNumBytes)
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScTxPdd::TransferData(ID:%xH)",aTransferID));
+	
+	// Check that we can accept the request
+	if (aNumBytes>KWinsMaxAudioTransferLen)
+		return(KErrArgument);
+	if (iPendingPlay>=iWaveformBufMgr->iNumWaveformBufs)	// LDD may issue multiple data transfers per buffer.
+		return(KErrNotReady);
+	
+	// Signal the windows thread to initiate the playback of a buffers worth of data to the waveout device.
+	iPendingPlay++;
+	PlayThreadCommand(ESendData,aTransferID,aLinAddr,aNumBytes);
+	
+	// Although the windows thread runs at a higher priority, its not safe to assume we will always get pre-empted at this
+	// point while the the higher priority thread processes and completes the request. Instead we need to wait until it
+	// signals back completion of the command.
+	Emulator::Escape();
+	WaitForSingleObject(iDriverThreadSem,INFINITE);
+	Emulator::Reenter();	
+
+	return(iPlayThreadError);
+	}	
+	
+/**
+Called from the LDD to terminate the playback of a data to the device and to release any resources necessary for playback.
+This is called soon after the last pending play request from the client has been completed. Once this function had been
+called, the LDD will not issue any further TransferData() commands without first issueing a StartTransfer() command.
+This function is always executed in driver thread context.
+*/	
+void DWinsSoundScTxPdd::StopTransfer()
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScTxPdd::StopTransfer"));
+	
+	// Signal the windows thread to stop and close the device.
+	iStopSemaphore = CreateSemaphore(NULL, 0, 1, NULL);
+	PlayThreadCommand(EStop);
+
+	// Wait for the windows thread to stop and close the device.
+	if (iStopSemaphore)
+		{
+		Emulator::Escape();
+		WaitForSingleObject(iStopSemaphore, INFINITE);  
+		Emulator::Reenter();
+
+		__HOST_LOCK;
+		CloseHandle(iStopSemaphore);
+		iStopSemaphore = NULL;
+		}
+	iPendingPlay=0;
+	iCompletedPlayBufHdrMask=0;					// Reset the completion status mask
+	
+	// Make sure the DFC is not queued.
+	iDfc.Cancel();
+	}
+	
+/**
+Called from the LDD to halt the playback of data to the sound device but not to release any resources necessary for
+playback.
+If possible, any active transfer should be suspended in such a way that it can be resumed later - starting from next
+sample following the one last played.
+This function is always executed in driver thread context.
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/
+TInt DWinsSoundScTxPdd::PauseTransfer()
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScTxPdd::PauseTransfer"));
+	
+	// Signal the windows thread to pause playback on the waveout device.
+	PlayThreadCommand(EPause);
+	    
+	return(KErrNone);
+	}
+	
+/**
+Called from the LDD to resume the playback of data to the sound device following a request to halt playback.
+If possible, any transfer which was active when the device was halted should be resumed - starting from next sample
+following the one last played. Once complete, it should be reported using PlayCallback()
+as normal. 
+This function is always executed in driver thread context.
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/
+TInt DWinsSoundScTxPdd::ResumeTransfer()
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScTxPdd::ResumeTransfer"));
+	
+	// Signal the windows thread to resume playback on the waveout device.
+	PlayThreadCommand(EResume);
+	
+	return(KErrNone);
+	}
+			
+/**
+Called from the LDD to power down the sound device.
+This function is always executed in driver thread context.
+*/
+void DWinsSoundScTxPdd::PowerDown()
+	{}
+	
+/**
+Called from the LDD to handle a custom configuration request.
+@param aFunction A number identifying the request.
+@param aParam A 32-bit value passed to the driver. Its meaning depends on the request.
+@return KErrNone if successful, otherwise one of the other system wide error codes.
+*/
+TInt DWinsSoundScTxPdd::CustomConfig(TInt /*aFunction*/,TAny* /*aParam*/)
+	{
+	return(KErrNotSupported);
+	}
+
+/**
+Called from the LDD to find out how many microseconds of data have been played.  This is called
+in the context of the DFC thread.
+@param aTimeTransferred	A reference to a variable into which to place the number of microseconds of audio.
+@param aStatus			The current status of this channel
+@return KErrNone if time is valid or KErrNotSupported.
+*/
+TInt DWinsSoundScTxPdd::TimeTransferred(TInt64& aTimePlayed, TInt /*aStatus*/)
+	{
+	TInt r=KErrGeneral;
+	TInt64 ms=0;
+
+	MMTIME time;
+	time.wType=TIME_BYTES;
+
+	if(iPlayDeviceHandle == 0)
+		{
+		// Have not started playback yet, or have stopped.
+		aTimePlayed = 0;
+		return KErrNone;
+		}
+
+	// If no hardware is present then we need to simulate the amount of time that has passed during
+	// playback.  The # of microseconds can be found in the iSimulatedUSecPlayed member, but this is
+	// only updated when the emulation timer triggers.  To improve the accuracy of the time returned,
+	// we use the Windows system timer to determine the # of milliseconds that have passed since the
+	// last time the timer triggered
+	if(iNoHardware)
+		{
+		// Determine the # of milliseconds that have passed since the last timer triggered
+		DWORD currentTime = timeGetTime();
+		DWORD timeSinceLastEvent = (currentTime - iLastTimerEventTime);
+
+		// If playback is paused then the Windows system timer will continue, so take this into
+		// account and subtract the # of milliseconds we have been paused for
+		if (iPauseTime)
+			timeSinceLastEvent -= (currentTime - iPauseTime);
+
+		// Clamp the resulting value to the duration of the timer, to prevent the millisecond count
+		// going backwards if Windows is busy and latency becomes an issue
+		if (timeSinceLastEvent > iSimulatedMsecDuration)
+			timeSinceLastEvent = iSimulatedMsecDuration;
+
+		// Now we know the value of the time passed down to a millisecond accuracy
+		aTimePlayed = (iSimulatedUSecPlayed + (timeSinceLastEvent * 1000));
+		return KErrNone;
+		}
+	
+	// Get the number of bytes played by the Windows audio system
+	if (waveOutGetPosition(iPlayDeviceHandle,&time,sizeof(time))==MMSYSERR_NOERROR)
+		{
+		// If requesting the number of bytes played is not supported, wType will be
+		// changed to what was actually returned, so check for this and don't continue
+		// if we got anything other than bytes
+		if (time.wType==TIME_BYTES)
+			{
+			// It's all good.  Convert the number of bytes played into microseconds and return it
+			ms=((time.u.cb/iBytesPerSecond)*1000);
+			TUint remainder=(time.u.cb%iBytesPerSecond);
+			ms+=((remainder*1000)/iBytesPerSecond);
+			ms*=1000;
+			aTimePlayed=ms;
+			r=KErrNone;
+			}
+		}
+
+	return(r);
+	}
+
+/** 
+Constructor for the windows playback waveform audio buffer abstraction.
+*/
+TWaveformAudioBuf::TWaveformAudioBuf()
+	{
+	memclr(&iBufHdr,sizeof(WAVEHDR));
+	iIsPrepared=EFalse;
+	iIsInUse=EFalse;
+	iWaveformBufMgr=NULL;
+	iBufNum=0;
+	}
+		
+/** 
+Prepare the waveform audio buffer for playback or record.
+@param aBufAddr A pointer to the address of the waveform buffer.
+@param aBufLength The length in bytes of the waveform buffer.
+@param aDeviceHandle The handle to the waveform audio device.
+*/		
+void TWaveformAudioBuf::Prepare(char* aBufAddr,TInt aBufLength,TInt aDeviceHandle)
+	{
+	iBufHdr.lpData = aBufAddr;
+	iBufHdr.dwBufferLength = aBufLength;
+	iBufHdr.dwBytesRecorded = 0;
+    iBufHdr.dwUser = iBufNum;
+    if (iWaveformBufMgr->iDirection==ESoundDirPlayback)
+		iBufHdr.dwFlags = WHDR_DONE;					// Initialise all to done so we can check for underflow.
+	else
+		iBufHdr.dwFlags = 0;
+    iBufHdr.dwLoops = 0;
+    iBufHdr.lpNext = NULL;
+	iBufHdr.reserved = 0;
+
+	if (iWaveformBufMgr->iIsHardware)
+		{
+		if (iWaveformBufMgr->iDirection==ESoundDirPlayback)
+			DoPrepareOut((HWAVEOUT)aDeviceHandle);
+		else
+			DoPrepareIn((HWAVEIN)aDeviceHandle);
+		}
+	iIsPrepared=ETrue;
+	iIsInUse=EFalse;	
+	}
+	
+/**
+Cleanup the preparation performed when the waveform audio buffer was prepared for playback or record.
+@param aDeviceHandle The handle to the waveform audio device.
+*/	
+void TWaveformAudioBuf::Unprepare(TInt aDeviceHandle)
+	{
+	if (iWaveformBufMgr->iIsHardware && iIsPrepared)
+		{
+		if (iWaveformBufMgr->iDirection==ESoundDirPlayback)
+			DoUnprepareOut((HWAVEOUT)aDeviceHandle);
+		else
+			DoUnprepareIn((HWAVEIN)aDeviceHandle);
+		}
+	iIsPrepared=EFalse;	
+	iIsInUse=EFalse;
+	}	
+
+/** 
+Prepare the waveform audio buffer for playback.
+@param aPlayDeviceHandle The handle to the waveform audio output device.
+*/		
+void TWaveformAudioBuf::DoPrepareOut(HWAVEOUT aPlayDeviceHandle)
+	{
+	MMRESULT res = waveOutPrepareHeader(aPlayDeviceHandle,&iBufHdr,sizeof(WAVEHDR));
+	__KTRACE_SND(Kern::Printf("   waveOutPrepareHeader(BufNo:%d Pos:%x Len:%d)-%d",iBufNum,iBufHdr.lpData,iBufHdr.dwBufferLength,res));
+	__ASSERT_ALWAYS(res==MMSYSERR_NOERROR,Kern::Fault("DWinsSoundScTxPddWOPH", res)); //WaveOutPrepareHeader error.
+	}
+	
+/**
+Cleanup the preparation performed when the waveform audio buffer was prepared for playback.
+@param aPlayDeviceHandle The handle to the waveform audio output device.
+*/	
+void TWaveformAudioBuf::DoUnprepareOut(HWAVEOUT aPlayDeviceHandle)
+	{
+	MMRESULT res = waveOutUnprepareHeader(aPlayDeviceHandle,&iBufHdr,sizeof(WAVEHDR));
+	__KTRACE_SND(Kern::Printf("   waveOutUnprepareHeader(BufNo:%d)-%d",iBufNum,res));
+	__ASSERT_ALWAYS(res==MMSYSERR_NOERROR,Kern::Fault("DWinsSoundScTxPddWOUH",res)); //WaveOutUnprepareHeader error.	
+	}
+
+/**
+Constructor for the waveform audio buffer manager. 
+*/
+TWaveformBufMgr::TWaveformBufMgr(TSoundDirection aDirection,TBool aIsHardware)
+	: iDirection(aDirection), iIsHardware(aIsHardware)
+	{
+	iWaveformAudioBuf=NULL;
+	iNumWaveformBufs=0;
+	iWaveformBufSize=0;
+	iPendingBufList=NULL;
+	}
+	
+/**
+Destructor for the waveform audio buffer manager.
+*/	
+TWaveformBufMgr::~TWaveformBufMgr()
+	{
+	if (iWaveformAudioBuf)
+		delete[] iWaveformAudioBuf;
+	if (iPendingBufList)
+		delete iPendingBufList;
+	}	
+
+/*
+Re-allocate the number of waveform audio buffers that are available for data transfer according to the
+current shared chunk configuration. Then, for each buffer that exists within the shared chunk, prepare one of the waveform audio
+buffers just created so that it is aligned with the shared chunk buffer. 
+@param aBufConfig A buffer configuration object specifying the geometry of the current shared chunk buffer configuration.
+@param aChunkBase The address in the kernel process for the start of the shared chunk.
+@param aDeviceHandle The handle to the waveform audio device.
+@return KErrNone if successful, otherwise one of the other system wide error codes. 
+@pre The thread must be in a critical section.    
+*/	
+TInt TWaveformBufMgr::ReAllocAndUpdate(TSoundSharedChunkBufConfig* aBufConfig,TLinAddr aChunkBase,TInt aDeviceHandle)
+	{
+	__KTRACE_SND(Kern::Printf(">TWaveformBufMgr::ReAllocAndUpdate"));
+	
+	// Check if the number of windows waveform audio buffers that are required has changed.
+	TInt required=Max(aBufConfig->iNumBuffers,KMinWaveHdrBufCount);
+	if (iNumWaveformBufs != required)
+		{
+		// The number has changed. First, re-allocate the required number of windows waveform data blocks.
+		if (iWaveformAudioBuf)
+			{			
+			delete[] iWaveformAudioBuf;
+			iWaveformAudioBuf=NULL;
+			}
+			
+		// If we are emulating an audio device then delete any pending buffer list previously created.	
+		if (!iIsHardware && iPendingBufList)
+			{
+			delete iPendingBufList;
+			iPendingBufList=NULL;
+			}
+		iNumWaveformBufs = 0;	
+		
+		iWaveformAudioBuf=new TWaveformAudioBuf[required];
+		if (!iWaveformAudioBuf)
+			return(KErrNoMemory);
+		for (TInt i=0; i<required ; i++)
+			{
+			iWaveformAudioBuf[i].SetWaveformBufMgr(this);
+			iWaveformAudioBuf[i].SetBufNum(i);
+			}
+			
+		// If we are emulating an audio device then allocate a new pending buffer list.	
+		if (!iIsHardware)
+			{
+			iPendingBufList=(WAVEHDR**)Kern::AllocZ((required+1)*sizeof(WAVEHDR*));
+			if (!iPendingBufList)
+				return(KErrNoMemory);
+			}
+		iNumWaveformBufs = required;		
+		}
+	
+	// The most common situation is that request start offsets coincide with the start of one of the
+	// shared chunk buffers. Hence, begin by preparing a windows waveform audio buffer for each shared chunk
+	// buffer - aligned with this start address.				
+	TInt* bufOffsetList=&aBufConfig->iBufferOffsetListStart;	// The buffer offset list.
+	for (TInt i=0; i<aBufConfig->iNumBuffers ; i++) 
+		{
+		char* bufAddr=(char*)(aChunkBase+bufOffsetList[i]);
+		iWaveformAudioBuf[i].Prepare(bufAddr,aBufConfig->iBufferSizeInBytes,aDeviceHandle); 
+		}
+	iWaveformBufSize=aBufConfig->iBufferSizeInBytes;		
+	return(KErrNone);
+	}
+
+/**
+Acquire an appropriate waveform audio buffer to be used either to send a data block to the waveform output device or
+receive a data block from the waveform input device.
+This function is always executed in windows thread context.
+@param aStartAddress A pointer to the address of the data block to be played/recorded.
+@param aBufLength The length in bytes of the data block to be played/recorded.
+@param aDeviceHandle The handle to the waveform audio device.
+@return A pointer to an appropriate waveform audio buffer to be used to transfer the data block.
+*/
+TWaveformAudioBuf* TWaveformBufMgr::AcquireBuf(char* aStartAddress,TInt aBufLength,TInt aDeviceHandle)
+	{
+	// See if there's a appropriate waveform audio buffer already prepared. We only need to worry about the start address,
+	// the length can be adjusted later if necessary.
+	TInt i;
+	for (i=0; i<iNumWaveformBufs ; i++)
+		{
+		if (iWaveformAudioBuf[i].iIsPrepared && iWaveformAudioBuf[i].iBufHdr.lpData==aStartAddress && !iWaveformAudioBuf[i].iIsInUse)
+			break;
+		}
+	if (i>=iNumWaveformBufs)
+		{
+		// None already prepared which are appropriate so prepare one now. See if there are any not yet prepared.
+		for (i=0; i<iNumWaveformBufs ; i++)
+			{
+			if (!iWaveformAudioBuf[i].iIsPrepared)
+				{
+				iWaveformAudioBuf[i].Prepare(aStartAddress,aBufLength,aDeviceHandle);
+				break;
+				}
+			}
+			
+		// All are prepared already so we need to re-prepare one specially.
+		if (i>=iNumWaveformBufs)
+			{
+			for (i=0; i<iNumWaveformBufs ; i++)
+				{
+				if (!iWaveformAudioBuf[i].iIsInUse)
+					{
+					iWaveformAudioBuf[i].Unprepare(aDeviceHandle);
+					iWaveformAudioBuf[i].Prepare(aStartAddress,aBufLength,aDeviceHandle);
+					break;
+					}
+				}
+			__ASSERT_ALWAYS(i>=0,PANIC());
+			}
+		}
+		
+	__KTRACE_SND(Kern::Printf("<TWaveformBufMgr:AcquireBuf - BufNo:%d",i));
+	iWaveformAudioBuf[i].iIsInUse=ETrue;	
+	return(&iWaveformAudioBuf[i]);	
+	}
+	
+/**
+The waveform output callback function to handle data block transfer completion.
+This function is always executed in windows thread context.
+@param aHdr A pointer to the header for the waveform audio buffer just transferred.
+*/	
+void DWinsSoundScTxPdd::WaveOutProc(WAVEHDR* aHdr)
+	{
+	TInt waveBufId=aHdr->dwUser;				// Work out which waveform audio buffer is completing.
+
+	StartOfInterrupt();
+	iCompletedPlayBufHdrMask|=(1<<waveBufId);	// Update the completion status mask
+	iDfc.Add();									// Queue PlayDfc().
+	EndOfInterrupt();
+	}
+	
+/**
+The DFC used to handle data block transfer completion.
+This function is always executed in driver thread context.
+@param aPtr A pointer to the physical channel object.
+*/	
+void DWinsSoundScTxPdd::PlayDfc(TAny* aPtr)
+	{	
+	TInt i;
+	DWinsSoundScTxPdd& drv=*(DWinsSoundScTxPdd*)aPtr;
+	
+	// More than 1 transfer may have completed so loop until all completions are handled
+	while (drv.iCompletedPlayBufHdrMask)
+		{
+		// Find the buffer ID of the next transfer that has completed
+		for (i=0 ; i<32 && !(drv.iCompletedPlayBufHdrMask&(1<<i)) ; i++) {}
+		__ASSERT_ALWAYS(i<drv.iWaveformBufMgr->iNumWaveformBufs,PANIC());
+		__e32_atomic_and_ord32(&drv.iCompletedPlayBufHdrMask, ~(1u<<i)); // Clear this bit in the mask
+		
+		// Update the status of the waveform audio buffer which is completing
+		TWaveformAudioBuf& buf=drv.iWaveformBufMgr->iWaveformAudioBuf[i];
+		buf.iIsInUse=EFalse;
+	
+		// Callback the LDD passing the information for the transfer that has completed
+		drv.iPendingPlay--;
+		__KTRACE_SND(Kern::Printf("   Write complete(BufNo:%x Pos:%x Len:%d)",i,buf.iBufHdr.lpData,buf.iBufHdr.dwBufferLength));
+		drv.Ldd()->PlayCallback(buf.iTransferID,KErrNone,buf.iBufHdr.dwBufferLength);
+		}
+	}
+		
+/**
+Issue a request from the driver thread to the windows thread to execute a command.
+@param aCommand The identifier of the command to be executed.
+@param aArg0 A first command argument, its meaning depends on the command.
+@param aArg1 A second command argument, its meaning depends on the command.
+@param aArg2 A third command argument, its meaning depends on the command.
+This function is always executed in driver thread context.
+*/
+void DWinsSoundScTxPdd::PlayThreadCommand(TThreadCommand aCommand,TInt aArg0,TInt aArg1,TInt aArg2)
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScTxPdd:PlayThreadCommand"));
+	iPlayCommand = aCommand;
+	iPlayCommandArg0 = aArg0;
+	iPlayCommandArg1 = aArg1;
+	iPlayCommandArg2 = aArg2;
+
+	__HOST_LOCK;
+
+	ReleaseSemaphore(iPlayThreadSem,1,NULL);
+	}
+
+/**
+Pass a value from the windows thread to the driver thread.
+This function is always executed in windows thread context.
+@param aError The value to the passed to the driver thread.
+*/
+void DWinsSoundScTxPdd::PlayThreadNotifyDriver(TInt aError)
+	{
+	iPlayThreadError = aError;
+	BOOL ret = ReleaseSemaphore(iDriverThreadSem,1,NULL);
+	__ASSERT_ALWAYS(ret == TRUE, PANIC()); //Unexpected Windows Error
+	}
+
+#pragma warning(disable : 4702) // unreachable code
+/**
+Open the waveform output device for playback. Use a default device identifier in order to select a device
+capable of meeting the current audio configuration. 
+This function can be executed in either driver thread or windows thread context.
+@pre The data member DWinsSoundScTxPdd::iSoundConfig must be setup with the current audio configuration.
+*/
+TInt DWinsSoundScTxPdd::OpenWaveOutDevice()
+	{
+	WAVEFORMATEX format;
+	format.wFormatTag = WAVE_FORMAT_PCM;
+	TUint16 bitsPerSample = 8;
+
+	switch (iSoundConfig.iEncoding)
+		{
+		case ESoundEncoding8BitPCM:
+			break;
+		case ESoundEncoding16BitPCM:
+			bitsPerSample = 16;
+			break;
+		default:
+			return KErrNotSupported;
+		};
+
+	TInt rateInSamplesPerSecond=RateInSamplesPerSecond(iSoundConfig.iRate);
+	format.nChannels = TUint16(iSoundConfig.iChannels);
+	format.nSamplesPerSec = rateInSamplesPerSecond;
+	format.nAvgBytesPerSec = rateInSamplesPerSecond * iSoundConfig.iChannels * bitsPerSample / 8;
+	format.nBlockAlign = TUint16(iSoundConfig.iChannels * bitsPerSample / 8);
+	format.wBitsPerSample = bitsPerSample;
+	format.cbSize = 0;
+
+	MMRESULT res = MMSYSERR_NOERROR;
+
+	__COND_HOST_LOCK;		
+	if (iNoHardware)
+		{
+		timeBeginPeriod(KMMTimerRes);
+		iPlayDeviceHandle = (HWAVEOUT)1;	
+		}
+	else
+		{
+		res = waveOutOpen(&iPlayDeviceHandle, WAVE_MAPPER, &format, (DWORD)::WaveOutProc, (DWORD)this, CALLBACK_FUNCTION);
+
+		// On some builds of Windows (such as Windows Server 2003), the waveOutGetDevCaps() trick in
+		// DoCreate() won't work, so we have another special check for missing hardware here
+		if ((res == MMSYSERR_NODRIVER) || (res == MMSYSERR_BADDEVICEID))
+			{
+			// Pretend there was no error and switch into hardware emulation mode
+			res = MMSYSERR_NOERROR;
+			iNoHardware = ETrue;
+			iPlayDeviceHandle = (HWAVEOUT)1;	
+			iWaveformBufMgr->iIsHardware = EFalse;
+			timeBeginPeriod(KMMTimerRes);
+			}
+		}
+
+	if(iNoHardware)
+		{
+		iSimulatedUSecPlayed = 0;
+		}
+
+	switch (res)
+		{
+		case MMSYSERR_NOERROR: // No error
+			return(KErrNone);
+		case MMSYSERR_ALLOCATED: // Specified resource is already allocated.
+			return(KErrInUse);
+		case WAVERR_BADFORMAT: // Attempted to open with an unsupported waveform-audio format
+			return(KErrNotSupported);
+		case MMSYSERR_NOMEM: // Unable to allocate or lock memory.
+			return(KErrNoMemory);
+		default:
+			return(KErrUnknown);
+		}
+	}
+#pragma warning(default : 4702) // unreachable code
+	
+/**
+Open the audio output device.
+This function can be executed in either driver thread or windows thread context.
+@pre The data members DWinsSoundScTxPdd::iSoundConfig and DWinsSoundScTxPdd::iVolume must be setup with the current
+audio configuration.
+*/
+TInt DWinsSoundScTxPdd::CreatePlayDevice(TCreatePlayDeviceMode aMode)
+	{
+	// Check if the waveform output device is already open.
+	if (iPlayDeviceHandle)
+		return(KErrNone);
+	
+	WaitForSingleObjectDualThread(iPlayThreadMutex, INFINITE);
+
+	__COND_HOST_LOCK;
+
+	// Open the waveform output device for playback.
+	TInt err = OpenWaveOutDevice();
+	if (err != KErrNone)
+		{
+		ReleaseMutex(iPlayThreadMutex);
+		return(err);
+		}
+		
+	__HOST_LOCK_OFF;
+	
+	if (aMode==EInit && !iNoHardware)
+		{
+		// Remember the existing volume setting and use this as the default.
+ 		waveOutGetVolume(iPlayDeviceHandle,&iWinWaveVolume);
+ 		iVolume = iWinWaveVolume;
+		}
+
+	if (aMode==EStartTransfer)
+		{
+		if (!iNoHardware)
+			{
+			// Set the volume of the waveform output device.
+			waveOutSetVolume(iPlayDeviceHandle, iVolume | (iVolume << 16));
+			}
+		
+		// Now, re-allocate a set of the waveform audio blocks in advance of playing any data. Also, prepare one of these
+		// for each buffer within the shared chunk. Need to be in critical section while re-allocating the audio blocks.
+		NKern::ThreadEnterCS();
+		err=iWaveformBufMgr->ReAllocAndUpdate(Ldd()->BufConfig(),Ldd()->ChunkBase(),(TInt)iPlayDeviceHandle);
+		NKern::ThreadLeaveCS(); 
+		}
+	ReleaseMutex(iPlayThreadMutex);
+
+	return(err);
+	}
+
+/**
+Close down the play device.
+This function can be executed in either driver thread or windows thread context.
+*/
+void DWinsSoundScTxPdd::ClosePlayDevice()
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScTxPdd:ClosePlayDevice"));
+	
+	WaitForSingleObjectDualThread(iPlayThreadMutex, INFINITE);
+
+	HWAVEOUT handle = iPlayDeviceHandle;
+
+	__COND_HOST_LOCK;
+
+	if (iNoHardware)
+		timeEndPeriod(KMMTimerRes);
+		
+	if (handle)
+		{
+		// Stop playback on the waveout device. (Windows resets the current position to zero and marks all pending
+		// playback buffers as done).
+		if (!iNoHardware)
+			waveOutReset(handle);
+		
+		// Un-prepare all the waveform audio buffers.
+		for (TInt i=0 ; i<iWaveformBufMgr->iNumWaveformBufs ; i++)
+			iWaveformBufMgr->iWaveformAudioBuf[i].Unprepare((TInt)handle);
+		
+		// Close the waveout device.
+		if (!iNoHardware)
+			{
+			waveOutSetVolume(handle,iWinWaveVolume);	// Restore the original volume setting before closing the driver.
+			waveOutClose(handle);
+			}
+		
+		iPlayDeviceHandle = NULL;
+		}
+		
+	ReleaseMutex(iPlayThreadMutex);
+	}
+		
+/**
+The thread function for the play windows thread.
+This function is always executed in windows thread context.
+@pre The data members DWinsSoundScTxPdd::iSoundConfig and DWinsSoundScTxPdd::iVolume must be setup with the current
+audio configuration.
+*/
+void DWinsSoundScTxPdd::PlayThread()
+	{
+	iPlayThreadSem = CreateSemaphore(NULL,0,0x7FFFFFFF,NULL);
+	iPlayTimerEvent = CreateEvent(NULL,TRUE, FALSE, NULL);
+	iPlayThreadMutex = CreateMutex(NULL,FALSE,NULL);
+	__ASSERT_ALWAYS(iPlayThreadSem && iPlayTimerEvent, PANIC());  //no windows memory
+
+	HANDLE objects[2];
+	objects[0] = iPlayThreadSem;		// Indicates command from driver thread
+	objects[1] = iPlayTimerEvent;		// Indicates timer gone off
+	
+	// Open the play device, then close it again. This is so we can return an error early to the client
+	// if there is a problem.
+	TInt ret = CreatePlayDevice(EInit);
+	if (ret != KErrNone)
+		{
+		PlayThreadNotifyDriver(ret);
+		return;
+		}
+	ClosePlayDevice();
+
+	// Signal driver of successful setup
+	PlayThreadNotifyDriver(KErrNone);
+	ResetEvent(iPlayTimerEvent);
+
+	// Wait for the timer to expire or a command.
+	FOREVER
+		{
+		DWORD ret = WaitForMultipleObjectsEx(2,objects,FALSE,INFINITE,TRUE);
+		__KTRACE_SND(Kern::Printf("   PlayThread resumed"));
+		switch (ret)
+			{
+			case WAIT_OBJECT_0:	// Command received from the driver thread.
+				if (ProcessPlayCommand(iPlayCommand,iPlayCommandArg0,iPlayCommandArg1,iPlayCommandArg2)==KErrCompletion)
+					return; // ********* Exit thread **************
+				break;
+			case WAIT_OBJECT_0+1:
+				HandlePlayTimerEvent();
+				break;
+			}
+		}
+	}
+	
+/**
+Process a request from the driver thread to execute a command.
+This function is always executed in windows thread context.
+@param aCommand The identifier of the command to be executed.
+@param aArg0 A first command argument, its meaning depends on the command.
+@param aArg1 A second command argument, its meaning depends on the command.
+@param aArg2 A third command argument, its meaning depends on the command.
+@return KErrCompletion if the command to exit the windows thread has been received;
+		KErrNone otherwise;
+*/	
+TInt DWinsSoundScTxPdd::ProcessPlayCommand(TThreadCommand aCommand,TInt aArg0,TInt aArg1,TInt aArg2)
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScTxPdd:ProcessPlayCommand(%d)",aCommand));
+	switch(aCommand)
+		{
+		case ESendData:	// Initiate the playback of a buffers worth of data to the waveout device.
+			{
+			// Acquire a windows waveform audio buffer for the transfer.
+			char* startAddress=(char*)aArg1;
+			TInt bytesToPlay=aArg2; 
+			__ASSERT_ALWAYS(bytesToPlay>0,PANIC());
+			TWaveformAudioBuf* waveformAudioBuf=iWaveformBufMgr->AcquireBuf(startAddress,bytesToPlay,(TInt)iPlayDeviceHandle);
+			waveformAudioBuf->iTransferID=(TUint)aArg0;
+			waveformAudioBuf->iBufHdr.dwBufferLength=bytesToPlay;
+			
+			if (!iNoHardware)
+				{
+				// This machine has a waveout device present. Send the buffer to the waveout device.
+				waveformAudioBuf->iBufHdr.dwFlags &= ~WHDR_DONE;	// Clear the done flag
+				MMRESULT res = waveOutWrite(iPlayDeviceHandle,&waveformAudioBuf->iBufHdr,sizeof(WAVEHDR));
+				__KTRACE_SND(Kern::Printf("   WaveOutWrite(ID:%x Pos:%x Len:%d)-%d",aArg0,aArg1,aArg2,res));
+				__ASSERT_ALWAYS(res == MMSYSERR_NOERROR,PANIC()); // WaveOutWrite Error	
+				}
+			else 
+				{
+				// This machine has no audio hardware present so simulate the waveout device using a timer.
+				AddToPendingList(&waveformAudioBuf->iBufHdr,iWaveformBufMgr->iPendingBufList);		// Queue the buffer on the pending list
+				
+				// Check if the timer needs starting/re-starting
+				if (!iTimerActive)
+					{
+					iLastTimerEventTime = timeGetTime();
+					StartTimer(&waveformAudioBuf->iBufHdr);
+					}
+				}
+			
+			// Signal the driver thread that we have started playing the next buffer.
+			PlayThreadNotifyDriver(KErrNone);
+		
+			break;
+			}
+			
+		case EStop:	// Terminate the playing of data to the waveout device.
+			if (iNoHardware)
+				{
+				// This machine has no audio hardware present so simulates the waveout device using a timer.
+				StopTimer(ETrue);	// Stop the timer and cancel any buffers pending
+				}
+			ClosePlayDevice();		// Close down the play device.	
+			
+			// Signal the driver thread that we have completed the command.
+			if (iStopSemaphore)
+				{
+				LONG prev;
+				ReleaseSemaphore(iStopSemaphore,1,&prev);
+				}
+			break;
+
+		case EExit:	// Close down the play device and exit the windows thread.
+			{
+			if (!iNoHardware)
+				{
+				// This machine has a waveout device present.
+				if (iPlayDeviceHandle)
+					{
+					waveOutReset(iPlayDeviceHandle);   					// Stop playback on the waveout device.
+					waveOutSetVolume(iPlayDeviceHandle,iWinWaveVolume);	// Restore the original volume setting before closing the driver.
+					waveOutClose(iPlayDeviceHandle);					// Close the waveout device.
+					}
+				}
+			else
+				{
+				// This machine has no audio hardware present so simulates the waveout device using a timer.
+				StopTimer(ETrue);	// Stop the timer and cancel any buffers pending
+				}
+			// Logically the playback device is now shut so clear the handle.
+			iPlayDeviceHandle = 0;
+				
+			// Signal the driver thread that we have completed the command.	
+			if (iDeathSemaphore)
+				{
+				LONG prev;
+				ReleaseSemaphore(iDeathSemaphore,1,&prev);
+				}
+			return(KErrCompletion); 		// ********* Exit thread **************
+			}
+
+		case EPause:	// Halt the playback of data to the waveout device.
+			if (!iNoHardware)
+				waveOutPause(iPlayDeviceHandle); // Pause playback on the waveout device. Windows saves current position.
+			else
+				{
+				StopTimer(EFalse);				 // Just stop the timer. Don't cancel any pending buffers.
+				iPauseTime = timeGetTime();
+				}
+			break;
+
+		case EResume:	// Resume the playback of data to the waveout device.
+			if (!iNoHardware)
+				waveOutRestart(iPlayDeviceHandle);	// Resume playback on the waveout device.
+			else
+				{
+				// Check if there are more audio buffers waiting to be resumed
+				WAVEHDR* buf=iWaveformBufMgr->iPendingBufList[0];
+				if (buf)
+					{
+					// Before restarting the emulation timer, determine how long we were paused for and
+					// add that time to the time the timer last triggered.  This will allow us to continue
+					// as though we had never been paused
+					DWORD currentTime = timeGetTime();
+					iLastTimerEventTime += (currentTime - iPauseTime);
+					iPauseTime = 0;
+					StartTimer(buf);			// Re-start the timer
+					}
+				}
+			break;
+		} 
+	return(KErrNone);
+	}
+	
+/**
+Handle a timer expiry event. This is only used when no audio hardware is present, with a timer expiry corresponding
+to the end of a data block transfer.
+This function is always executed in windows thread context.
+*/
+void DWinsSoundScTxPdd::HandlePlayTimerEvent()
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScTxPdd:HandlePlayTimerEvent"));
+	ResetEvent(iPlayTimerEvent);	// Reset the event 
+
+	iSimulatedUSecPlayed += (1000 * iSimulatedMsecDuration);
+	
+	// Remove the audio buffer just completed from the pending list and save it for the driver thread.
+	WAVEHDR* buf=RemoveFromPendingList(iWaveformBufMgr->iPendingBufList);
+	__ASSERT_ALWAYS(buf != NULL,PANIC());	
+	TInt waveBufId=buf->dwUser;					// Work out which waveform audio buffer is completing.
+
+	// Check if there are more audio buffers waiting to be played
+	buf=iWaveformBufMgr->iPendingBufList[0];
+	if (buf)
+		{
+		iLastTimerEventTime = timeGetTime();
+		StartTimer(buf);						// Re-start the timer
+		}
+	else
+		iTimerActive=EFalse;	
+		
+	// Notify that another audio buffer has been completed.
+	StartOfInterrupt();
+	iCompletedPlayBufHdrMask|=(1<<waveBufId);	// Update the completion status mask
+	iDfc.Add();
+	EndOfInterrupt();
+	return;
+	}
+			
+/**
+Initialise the data member DWinsSoundScTxPdd::iCaps with the capabilities of this audio device.
+*/	
+void DWinsSoundScTxPdd::SetCaps()
+	{
+	__KTRACE_SND(Kern::Printf(">DWinsSoundScTxPdd::SetCaps"));
+	
+	// The data transfer direction for this unit is play.
+	iCaps.iDirection=ESoundDirPlayback;
+	
+	// Assume this unit supports mono or stereo.
+	iCaps.iChannels=KSoundMonoChannel|KSoundStereoChannel;
+	
+	// Assume this unit supports all sample rates.
+	iCaps.iRates=(KSoundRate7350Hz|KSoundRate8000Hz|KSoundRate8820Hz|KSoundRate9600Hz|KSoundRate11025Hz|
+				  KSoundRate12000Hz|KSoundRate14700Hz|KSoundRate16000Hz|KSoundRate22050Hz|KSoundRate24000Hz|
+				  KSoundRate29400Hz|KSoundRate32000Hz|KSoundRate44100Hz|KSoundRate48000Hz);
+	
+	// Assume this unit supports 8bit and 16bit PCM encoding.
+	iCaps.iEncodings=(KSoundEncoding8BitPCM|KSoundEncoding16BitPCM);
+	
+	// This unit only supports interleaved data format
+	iCaps.iDataFormats=KSoundDataFormatInterleaved;
+	
+	// The minimum request size that the device can support. 
+	iCaps.iRequestMinSize=0;	// No restriction
+	
+	// The request alignment that this device requires. 
+	iCaps.iRequestAlignment=0;	// No restriction
+	
+	// This unit is not capable of detecting changes in hardware configuration.
+	iCaps.iHwConfigNotificationSupport=EFalse;
+	}
+	
+/**
+Start the audio timer.
+The timer is only used when no audio hardware is present on the machine. This is in order to introduce a delay which is
+equivelent to that incurred when transferring audio data over a real audio device.
+@param aBuffer The audio buffer which would have been transferred had a real audio device been present. This contains
+	information on the number of bytes to transfer.
+*/	
+void DWinsSoundScTxPdd::StartTimer(WAVEHDR* aBuffer)
+	{
+	// First, need to calculate the duration of the timer in milliseconds.
+	TInt bytesToPlay=aBuffer->dwBufferLength;
+	iSimulatedMsecDuration = bytesToPlay*1000;
+	iSimulatedMsecDuration /= (RateInSamplesPerSecond(iSoundConfig.iRate) * iSoundConfig.iChannels);
+	if (iSoundConfig.iEncoding==ESoundEncoding16BitPCM)
+		iSimulatedMsecDuration /= 2;
+	if (iSoundConfig.iEncoding==ESoundEncoding24BitPCM)
+		iSimulatedMsecDuration /= 3;
+	if (iSimulatedMsecDuration<=0)
+		iSimulatedMsecDuration=1;	// Round up to 1ms or timeSetEvent() will return an error.
+
+	// If we have been paused and are now restarting, determine the amount of time that we were paused
+	// and subtract that from the time until the next timer trigger.  If this is not done then the time
+	// played or recorded will not be calculated correctly
+	DWORD pauseTime = (timeGetTime() - iLastTimerEventTime);
+	MMRESULT res = timeSetEvent((iSimulatedMsecDuration - pauseTime), KMMTimerRes, (LPTIMECALLBACK)iPlayTimerEvent, 0, TIME_ONESHOT | TIME_CALLBACK_EVENT_SET);
+	__ASSERT_ALWAYS(res != NULL,PANIC()); 	// timeSetEvent error.	
+	iTimerID = res;							// Save the identifier for the new timer event.
+	iTimerActive=ETrue;
+	}
+
+/**
+Stop the audio timer.
+The timer is only used when no audio hardware is present on the machine. This is in order to introduce a delay which is
+equivelent to that incurred when transferring audio data over a real audio device.
+@param aCancellAll Set to ETrue in order to discard any buffers queued on the pending buffer list. EFalse otherwise.
+*/	
+void DWinsSoundScTxPdd::StopTimer(TBool aCancelAll)
+	{
+	if (iTimerActive)
+		{
+		MMRESULT res = timeKillEvent(iTimerID);
+		__ASSERT_ALWAYS(res == TIMERR_NOERROR,PANIC()); // timeKillEvent error	
+		
+		if (aCancelAll)
+			{
+			WAVEHDR* b;
+			do
+				b=RemoveFromPendingList(iWaveformBufMgr->iPendingBufList);
+			while(b);
+			}
+		}
+	iTimerActive=EFalse;
+	}	
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/timer.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,176 @@
+// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\timer.cpp
+// 
+//
+
+#include "variant.h"
+
+#define KWinsTimerPanicCategory "WinsTimer"
+
+enum TWinsTimerPanic
+	{
+	EReleaseSemaphoreError = 1,
+	ETimeSetEventError = 2
+	};
+
+void PanicFromWinsTimer(TWinsTimerPanic aReason)
+	{
+	Kern::Fault(KWinsTimerPanicCategory, aReason);
+	}
+
+
+
+inline Int64 FileTime2Milliseconds(const FILETIME& aFileTime)
+	{return ((Int64(aFileTime.dwHighDateTime)<<32) + aFileTime.dwLowDateTime)/10000;}
+
+
+void CALLBACK WinsTimer::Tick(UINT, UINT, DWORD aPtr, DWORD, DWORD) 
+	{
+
+	WinsTimer& timer=*(WinsTimer*)aPtr;
+	if (!ReleaseSemaphore(timer.iSemaphore,1,NULL))
+		{
+		__ASSERT_ALWAYS((GetLastError() == ERROR_TOO_MANY_POSTS), PanicFromWinsTimer(EReleaseSemaphoreError));
+		timeKillEvent(timer.iTimer);
+		// If WinsTimer::EventThread() has run since the above call to
+		// ReleaseSemaphore() (this has been observed to happen while 
+		// within the call to timeKillEvent()) then the semaphore may be 
+		// signallable again. If it is, restart the timer otherwise wait 
+		// for the event thread to restart it.
+		if (ReleaseSemaphore(timer.iSemaphore,1,NULL))
+			timer.Enable();
+		else
+			timer.iSuspend = timer.iMaxLagTicks;
+		}
+	}
+
+DWORD WINAPI WinsTimer::Thread(LPVOID aPtr)
+	{
+	static_cast<WinsTimer*>(aPtr)->EventThread(*(NTimerQ*)NTimerQ::TimerAddress());
+	return 0;
+	}
+
+void WinsTimer::EventThread(NTimerQ& aTimerQ)
+	{
+	for (;;)
+		{
+		WaitForSingleObject(iSemaphore,INFINITE);
+		if (iSuspend > 0)
+			{
+			// Emulator interrupted/suspended for too long, MM-callback has been suspended
+			//
+			// Rather than try and catch up now, just discard the lost ticks - this improves
+			// system behaviour particularly when debugging at the expense of losing sync
+			// between the Windows clock and the emulator RTC.
+			//
+			while (--iSuspend > 0)
+				WaitForSingleObject(iSemaphore, 0);	// absorb all signals
+			//
+			// un-nobble once we are debugging
+			if (iNobbleNanos && IsDebuggerPresent())
+				iNobbleNanos = 0;
+			//
+			// now restart the timer callbacks
+			Enable();
+			//
+			// don't deliver a tick until next callback
+			continue;
+			}
+		if (iNobbleNanos && iIdleThread != NKern::CurrentThread())
+			Kern::NanoWait(iNobbleNanos);
+		StartOfInterrupt();
+		iTime += iPeriod;
+		if (!iStandby)
+			aTimerQ.Tick();
+		EndOfInterrupt();
+		}
+	}
+
+
+WinsTimer::WinsTimer()
+	:iPeriod(0),iNobbleNanos(0),iMaxLagTicks(0),iSemaphore(NULL),iSuspend(0),iTime(0),iIdleThread(0)
+	{}
+
+void WinsTimer::Init(TUint aPeriod)
+	{
+	// calculate the y2k offset in seconds from Win32 'zero' FILETIME
+	// This initially synchronizes EPOC time with Windows time
+	const SYSTEMTIME KSystemTimeY2K = {2000,1,0,1,0,0,0,0};
+	FILETIME y2k, now;
+	SystemTimeToFileTime(&KSystemTimeY2K,&y2k);
+	GetSystemTimeAsFileTime(&now);
+	iTime = FileTime2Milliseconds(now) - FileTime2Milliseconds(y2k);
+
+	TIMECAPS caps;
+	timeGetDevCaps(&caps,sizeof(caps));
+
+	iPeriod = min(caps.wPeriodMax, max(caps.wPeriodMin, aPeriod));
+	TUint resolution = max(caps.wPeriodMin, iPeriod/2);
+	iMaxLagTicks = EMaxLag / iPeriod;
+
+	// limit 'catch-up' for when Win32 gets too busy for us to fire timer events
+	// making this too large causes delays when resuming from debug
+	iSemaphore = CreateSemaphoreA(NULL, 0, iMaxLagTicks, NULL);
+
+	timeBeginPeriod(resolution);
+
+	CreateWin32Thread(EThreadEvent, &WinsTimer::Thread, this, ETrue);
+	}
+
+void WinsTimer::Enable()
+	{
+	iTimer = timeSetEvent(iPeriod,0,&WinsTimer::Tick,DWORD(this),TIME_PERIODIC);
+	__ASSERT_ALWAYS(iTimer != NULL, PanicFromWinsTimer(ETimeSetEventError));
+	}
+
+TInt WinsTimer::SystemTime() const
+//
+// Return the time in seconds since y2k
+//
+	{
+	TInt irq = NKern::DisableAllInterrupts();
+	Int64 time = iTime;
+	NKern::RestoreInterrupts(irq);
+	if (time < 0)
+		time -= 999;	// we want rounding to -infinity for the division
+	return TInt(time/1000);
+	}
+
+void WinsTimer::SetSystemTime(TInt aTime)
+//
+// Set the time in seconds since y2k
+//
+	{
+	Int64 time=aTime;
+	time*=1000;
+	TInt irq = NKern::DisableAllInterrupts();
+	iTime = time;
+	NKern::RestoreInterrupts(irq);
+	}
+
+void WinsTimer::Standby()
+	{
+	iStandby = ETrue;
+	}
+
+void WinsTimer::Wakeup()
+	{
+	iStandby = EFalse;
+	// Busy wait for the next timer interrupt 
+	volatile Int64* t = &iTime;
+	Int64 time = *t;
+	while (time == *t)
+		{}
+	}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/variant.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,748 @@
+// Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\variant.cpp
+// 
+//
+
+#include "variant.h"
+#include "mconf.h"
+#include <kernel/kern_priv.h>
+#include <stdlib.h>
+#include <property.h>
+#include <emulator.h>
+
+const TInt KDefaultRam = 63;				// 63MB default internal RAM
+const TInt KUnlimitedRam = 0x400;			// 1GB ~= unlimited memory
+const TInt KDefaultRamDrive = 0x400000;		// 4MB default RAM drive limit
+
+_LIT(KLitWins,"Wins");
+
+GLDEF_D Wins TheVariant;
+
+GLDEF_D TActualMachineConfig TheConfig;
+
+EXPORT_C Asic* VariantInitialise(TBool aRunExe)
+	{
+	return TheVariant.Init(aRunExe) == KErrNone ? &TheVariant : NULL;
+	}
+
+void AsicInitialise()
+	{
+	}
+
+class DWinsPowerController : public DPowerController
+	{
+public: // from DPowerComtroller
+	void CpuIdle();
+	void EnableWakeupEvents();
+	void AbsoluteTimerExpired();
+	void DisableWakeupEvents();
+	void PowerDown(TTimeK aWakeupTime);
+public:
+	static DWinsPowerController* New();
+	void AssertWakeupSignal();
+	void WakeupEvent();
+private:
+	HANDLE	iStandbySem;
+	TUint	iStandby;
+	TBool	iWakeupSignal;
+	};
+
+Wins::Wins()
+	:iUi(0), iRealCpuSpeed(0), iCpuSpeed(0),
+	iDebugOutput(INVALID_HANDLE_VALUE), iLogTimeStamp(ETrue),
+	iPurgedImages(EFalse), iPowerController(0), iLogToDebugger(EFalse),
+	iLogToFile(ETrue)
+	{}
+
+TInt Wins::Init(TBool aRunExe)
+	{
+	TInt r = InitProperties(aRunExe);
+	if (r == KErrNone)
+		{
+		iProperties.GetInt("LogTimeStamp",iLogTimeStamp);
+		TInt logThreadId=ETrue;
+		iProperties.GetInt("LogThreadId",logThreadId);
+		TInt cpu=NThread::ECpuSingle;
+		iProperties.GetInt("HostCPU",cpu);
+		NThread::SetProperties(logThreadId,cpu);
+		iProperties.GetInt("LogToDebugger",iLogToDebugger);
+		iProperties.GetInt("LogToFile",iLogToFile);
+
+		TInt mask;
+		Kern::SuperPage().iDebugMask[0] = DebugMask();  // get int or text mask value
+		// check to see if DebugMask0 was used instead of DebugMask
+		if ( (iProperties.GetInt("DebugMask", mask) != KErrNone) &&
+			 (iProperties.GetInt("DebugMask0", mask) == KErrNone) )
+			Kern::SuperPage().iDebugMask[0] = ((iProperties.GetInt("DebugMask0", mask) == KErrNone) ? mask : 0);
+			
+		// only int entries are supported for DebugMasks 1-7
+		Kern::SuperPage().iDebugMask[1] = ((iProperties.GetInt("DebugMask1", mask) == KErrNone) ? mask : 0);
+		Kern::SuperPage().iDebugMask[2] = ((iProperties.GetInt("DebugMask2", mask) == KErrNone) ? mask : 0);
+		Kern::SuperPage().iDebugMask[3] = ((iProperties.GetInt("DebugMask3", mask) == KErrNone) ? mask : 0);
+		Kern::SuperPage().iDebugMask[4] = ((iProperties.GetInt("DebugMask4", mask) == KErrNone) ? mask : 0);
+		Kern::SuperPage().iDebugMask[5] = ((iProperties.GetInt("DebugMask5", mask) == KErrNone) ? mask : 0);
+		Kern::SuperPage().iDebugMask[6] = ((iProperties.GetInt("DebugMask6", mask) == KErrNone) ? mask : 0);
+		Kern::SuperPage().iDebugMask[7] = ((iProperties.GetInt("DebugMask7", mask) == KErrNone) ? mask : 0);
+
+		// initial values for fast trace...
+		Kern::SuperPage().iInitialBTraceFilter[0] = ((iProperties.GetInt("BTrace0", mask) == KErrNone) ? mask : 0);
+		Kern::SuperPage().iInitialBTraceFilter[1] = ((iProperties.GetInt("BTrace1", mask) == KErrNone) ? mask : 0);
+		Kern::SuperPage().iInitialBTraceFilter[2] = ((iProperties.GetInt("BTrace2", mask) == KErrNone) ? mask : 0);
+		Kern::SuperPage().iInitialBTraceFilter[3] = ((iProperties.GetInt("BTrace3", mask) == KErrNone) ? mask : 0);
+		Kern::SuperPage().iInitialBTraceFilter[4] = ((iProperties.GetInt("BTrace4", mask) == KErrNone) ? mask : 0);
+		Kern::SuperPage().iInitialBTraceFilter[5] = ((iProperties.GetInt("BTrace5", mask) == KErrNone) ? mask : 0);
+		Kern::SuperPage().iInitialBTraceFilter[6] = ((iProperties.GetInt("BTrace6", mask) == KErrNone) ? mask : 0);
+		Kern::SuperPage().iInitialBTraceFilter[7] = ((iProperties.GetInt("BTrace7", mask) == KErrNone) ? mask : 0);
+		Kern::SuperPage().iInitialBTraceBuffer = ((iProperties.GetInt("BTraceBuffer", mask) == KErrNone) ? mask : 0);
+		Kern::SuperPage().iInitialBTraceMode = ((iProperties.GetInt("BTraceMode", mask) == KErrNone) ? mask : 0);
+
+		Kern::SuperPage().SetKernelConfigFlags(KernelConfigFlags());
+
+		SCapabilitySet caps;
+		DisabledCapabilities(caps);
+		memcpy(&Kern::SuperPage().iDisabledCapabilities,&caps,sizeof(caps));
+		}
+	CalibrateCpuSpeed();
+	return r;
+	}
+
+inline void Wins::InstallUi(DWinsUiBase& aUi)
+	{iUi = &aUi;}
+
+void Wins::Init1()
+	{
+	__KTRACE_OPT(KBOOT,Kern::Printf("Wins::Init1()"));
+
+	TInt tickperiod = WinsTimer::EDefaultPeriod;
+	iProperties.GetInt("TimerResolution",tickperiod);
+	iTimer.Init(tickperiod);
+	TUint speed;
+	if (iProperties.GetInt("CPUSpeed", (TInt&)speed) == KErrNone)
+		SetCpuSpeed(speed);
+	}
+
+static TInt emulatorHal(TAny* aPtr, TInt aFunction, TAny* a1, TAny* a2)
+	{
+	return ((Wins*)aPtr)->EmulatorHal(aFunction, a1, a2);
+	}
+
+void Wins::Init3()
+//
+// Initialise timer tick and add emulator hal function
+//
+	{
+	__KTRACE_OPT(KBOOT,Kern::Printf("Wins::Init3()"));
+
+	Kern::AddHalEntry(EHalGroupEmulator,&emulatorHal,this);
+
+	iPowerController = DWinsPowerController::New();
+	if (iPowerController == 0)
+		__PM_PANIC("Can't create 'DWinsPowerController'");
+
+	iTimer.Enable();
+	}
+
+void Wins::AddressInfo(SAddressInfo& aInfo)
+	{
+	TInt megabytes = KDefaultRam;
+	iProperties.GetInt("MegabytesOfFreeMemory", megabytes);
+	if (megabytes == 0)
+		megabytes = KUnlimitedRam;
+	aInfo.iTotalRamSize = megabytes << 20;
+//
+	TInt ramdisk = KDefaultRamDrive;
+	iProperties.GetInt("RamDriveMaxSize", ramdisk);
+	aInfo.iRamDriveMaxSize = ramdisk;
+	}
+
+void Wins::PurgeImages()
+//
+// Use the idle thread to clean up remnants of the emulator from the image path
+//
+	{
+	char path[KMaxFileName+1];
+
+	const char* imgPath=0;
+	iProperties.GetString("EmulatorImagePath", imgPath);
+	strcpy(path, imgPath);
+	char* name = path +strlen(path);
+	strcpy(name,"*");
+
+	Emulator::Lock();
+
+	WIN32_FIND_DATAA fdata;
+	HANDLE finder = FindFirstFileA(path, &fdata);
+	if (finder != INVALID_HANDLE_VALUE)
+		{
+		do
+			{
+			if ((fdata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
+				{
+				strcpy(name, fdata.cFileName);
+				DeleteFileA(path);
+				}
+			} while (FindNextFileA(finder, &fdata));
+		FindClose(finder);
+		}
+
+	Emulator::Unlock();
+	}
+
+void Wins::Idle()
+//
+// Use the win32 NKern idle function
+//
+	{
+	iTimer.SetIdleThread();
+	if (!iPurgedImages)
+		{
+		PurgeImages();
+		iPurgedImages = ETrue;
+		}
+	NThread::Idle();
+	}
+
+TInt Wins::MsTickPeriod()
+//
+// Provide the 'millisecond' timer tick period in microseconds
+//
+	{
+	return 1000 * iTimer.Period();
+	}
+
+TInt Wins::SystemTimeInSecondsFrom2000(TInt& aTime)
+	{
+	aTime = iTimer.SystemTime();
+	__KTRACE_OPT(KHARDWARE,Kern::Printf("RTC READ: %d",aTime));
+	return KErrNone;
+	}
+
+TInt Wins::SetSystemTimeInSecondsFrom2000(TInt aTime)
+// 
+// Set the emulator time. We must not change the Win32 time so
+// we just adjust the offset value to account for the difference
+//
+	{
+	__KTRACE_OPT(KHARDWARE,Kern::Printf("Set RTC: %d",aTime));
+	iTimer.SetSystemTime(aTime);
+	return KErrNone;
+	}
+
+TInt Wins::VariantHal(TInt aFunction, TAny* a1, TAny* /*a2*/)
+	{
+	TInt r=KErrNone;
+	switch(aFunction)
+		{
+		case EVariantHalVariantInfo:
+			{
+			TVariantInfoV01Buf infoBuf;
+			TVariantInfoV01& info=infoBuf();
+
+//			info.iRomVersion=TVersion(KRomMajorVersionNumber,KRomMinorVersionNumber,KRomBuildVersionNumber);
+			info.iMachineUniqueId=0;
+			info.iLedCapabilities=0x0;
+			info.iProcessorClockInKHz=iCpuSpeed ? iCpuSpeed*1000 : 1;
+			info.iSpeedFactor=0;
+			if (iUi)
+				iUi->Info(info);
+
+			Kern::InfoCopy(*(TDes8*)a1,infoBuf);
+			break;
+			}
+
+		case EVariantHalCustomRestartReason:
+			{
+			//This will take value from c:\data\epoc.ini.
+			TInt x = Property::GetInt("CustomRestartReason");    
+			kumemput32(a1, &x, sizeof(TInt));
+			}
+			break;
+
+		case EVariantHalCustomRestart:
+			{
+			if(!Kern::CurrentThreadHasCapability(ECapabilityPowerMgmt,__PLATSEC_DIAGNOSTIC_STRING("Checked by Hal function EVariantHalCustomRestart")))
+				return KErrPermissionDenied;
+			//This will only shut down epoc as Custom Restart Reason is not supported on wins.
+			Kern::Restart((TInt)a1);
+			break;
+			}
+
+		default:
+			r=KErrNotSupported;
+			break;
+		}
+	return r;
+	}
+
+TPtr8 Wins::MachineConfiguration()
+	{
+	return TPckg<TActualMachineConfig>(TheConfig);
+	}
+
+void Wins::CalibrateCpuSpeed()
+//
+// calculate approx. CPU speed in MHz, 0 if we can't tell
+//
+	{
+    TInt cycleCount =200*1000*20;   //take 20ms at 20MHz
+    
+    // This loop will double the cyclecount until the difference is non-zero.
+    FOREVER
+    	{
+      	if (cycleCount > (KMaxTUint / 2))
+    		{
+    		break;
+    		}
+    
+		SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
+		LARGE_INTEGER start;
+		if (QueryPerformanceCounter(&start))
+    		{
+	   		__asm mov eax, cycleCount
+ 	noploop: 
+ 			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm dec eax
+			__asm sub eax, 2
+			__asm jnz noploop
+			//
+			LARGE_INTEGER end;
+			QueryPerformanceCounter(&end);
+			LARGE_INTEGER f;
+			QueryPerformanceFrequency(&f);
+			
+			TInt64 diff = (end.QuadPart - start.QuadPart);
+	    	if(diff!=0)
+	    		{
+				TInt64 hz = (TInt64(cycleCount) / 1000000) * (f.QuadPart / diff);
+				iRealCpuSpeed = (TUint)(hz);
+				break;
+		     	}
+  	  	    }
+    	cycleCount *= 2;  // Double the count!!
+ 		}
+    
+   	SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_NORMAL);
+	}
+
+TInt Wins::SetCpuSpeed(TUint aSpeed)
+	{
+	if (iRealCpuSpeed == 0)
+		return KErrNotSupported;	// don't know the real CPUSpeed
+
+	if (IsDebuggerPresent())
+		return KErrGeneral;			// nobbling not avaliable when debugging
+
+	if (aSpeed == 0)
+		aSpeed = iRealCpuSpeed;		// reset to maximum
+	else if (aSpeed > iRealCpuSpeed)
+		aSpeed = iRealCpuSpeed;
+	else if (aSpeed * 20u  < iRealCpuSpeed)
+		aSpeed = (iRealCpuSpeed + 19u) / 20u;
+
+	__KTRACE_OPT(KHARDWARE,Kern::Printf("Set CPUSpeed: %d",aSpeed));
+	iCpuSpeed = aSpeed;
+
+	// calculate CPU time to nobble in parts-per-million
+	TUint nobble = ((iRealCpuSpeed - aSpeed) * 1000000u) / iRealCpuSpeed;
+	iTimer.Nobble(nobble);
+	return KErrNone;
+	}
+
+HANDLE Wins::DebugOutput()
+//
+// Return a handle to the trace file, creating the file if required.
+//
+// The log file name can be specified by a property or environment
+// variable called 'EmulatorLog', otherwise it defaults to 
+// 'epocwind.out' in the temporary directory.
+//
+	{
+	HANDLE file = iDebugOutput;
+	if (file == INVALID_HANDLE_VALUE)
+		{
+		CHAR debugfile[MAX_PATH];
+		const char* logpath;
+		if (iProperties.GetString("EmulatorLog",logpath)==KErrNone)
+			strcpy(debugfile,logpath);
+		else
+			{
+			DWORD len = GetEnvironmentVariableA("EmulatorLog", debugfile, MAX_PATH);
+			debugfile[len]=0;
+			if (len == 0)
+				{
+				len=GetTempPathA(MAX_PATH,debugfile);
+				strcpy(debugfile+len,"epocwind.out");	// EPOC WINS DEBUG output file
+				}
+			}
+		file=CreateFileA(debugfile, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, NULL, NULL);
+		if (file!=INVALID_HANDLE_VALUE)
+			{
+			SetFilePointer(file, NULL, NULL, FILE_END);
+			iDebugOutput = file;
+			}
+		}
+	return file;
+	}
+
+const TInt MaxOutputMsg = 599;
+
+void Wins::EarlyLogging(const char* aMessage1,const char* aMessage2)
+	{
+	char message[MaxOutputMsg+3];
+	TInt len = min(strlen(aMessage1), MaxOutputMsg);
+	memcpy(message,aMessage1,len);
+	if(aMessage2)
+		{
+		TInt len2 = min((TInt)strlen(aMessage2), MaxOutputMsg-len);
+		memcpy(message+len,aMessage2,len2);
+		len+=len2;
+		}
+	message[len++] = '\r';
+	message[len++] = '\n';
+	message[len] = 0;
+
+	if (iLogToFile)
+		{
+		DWORD bytes;
+		WriteFile(DebugOutput(), message, len, &bytes, NULL);
+		}
+	if (iLogToDebugger)
+		{
+		OutputDebugStringA(message);
+		}
+	}
+
+void Wins::DebugPrint(const TDesC8& aDes)
+//
+// Send the string to the debug output (Win32 debug trace) and trace file
+//
+	{
+	char message[MaxOutputMsg+1];
+	TInt len = aDes.Length();
+	const char* ptr = (const char*)aDes.Ptr();
+	if (iLogTimeStamp)
+		{
+		strcpy(message,"          ");
+		_ultoa(NKern::TickCount() * iTimer.Period(), message + 10, 10);
+		int n = strlen(message);
+		len = min(len, MaxOutputMsg - n - 2);
+		char* msg = message + n;
+		msg[0] = msg[-1];
+		msg[-1] = n < 10+2 ? '0' : msg[-2];
+		msg[-2] = n < 10+3 ? '0' : msg[-3];
+		msg[-3] = '.';
+		if (n < 10+4)
+			msg[-4] = '0';
+		++msg;
+		*msg++ = '\t';
+		strncpy(msg, ptr, len);
+		msg[len] = 0;
+		ptr = msg - 11;
+		len += 11;
+		}
+	else
+		{
+		len = min(len, MaxOutputMsg);
+		strncpy(message, ptr, len);
+		message[len] = 0;
+		ptr = message;
+		}
+	TInt irq = NKern::DisableAllInterrupts();
+	if (iLogToFile)
+		{
+		DWORD bytes;
+		WriteFile(DebugOutput(), ptr, len, &bytes, NULL);
+		}
+	if (iLogToDebugger)
+		{
+		OutputDebugStringA(message);
+		}
+
+	NKern::RestoreInterrupts(irq);
+	}
+
+const char* const KErrorTitles[] =
+	{
+	"Symbian OS Fatal Error",
+	"Symbian OS Application Error"
+	};
+
+const TText8* const KErrorMsg[] =
+	{
+	_S8("An error has been detected in the Symbian OS emulator."),
+	_S8("A call to User::Panic() has occured, indicating\n"
+		"a programming fault in the running application.\n"
+		"Please refer to the documentation for more details.")
+	};
+
+_LIT8(KProgram, "\n\nProgram\t");
+_LIT8(KError, "\nError\t");
+_LIT8(KIDFC, "an IDFC");
+_LIT8(KEscaped, "an escaped thread");
+_LIT8(KInterrupt, "an interrupt thread");
+_LIT8(KNThread, "an NThread");
+_LIT8(KColon, " : ");
+_LIT8(KDebugQuery, "\n\nDo you wish to Debug the error?\0");
+
+TBool Wins::ErrorDialog(TError aType, const TDesC8& aPanic, TInt aVal)
+	{
+	// Must be called with interrupts enabled to allow thread running windows message loop to run
+	
+	TBuf8<512> message(KErrorMsg[aType]);
+	message.Append(KProgram);
+	TInt context = NKern::CurrentContext();
+	switch(context)
+		{
+		case NKern::EIDFC:
+			message.Append(KIDFC);
+			break;
+		case NKern::EEscaped:
+			message.Append(KEscaped);
+			break;
+		case NKern::EInterrupt:
+			message.Append(KInterrupt);
+			break;
+		case NKern::EThread:
+			DThread *thread = Kern::NThreadToDThread(NKern::CurrentThread());
+			if (thread)
+				thread->TraceAppendFullName(message, ETrue);
+			else
+				message.Append(KNThread);
+			break;
+		}
+	message.Append(KError);
+	message.Append(aPanic);
+	message.Append(KColon);
+	message.AppendNum(aVal);
+#ifdef _DEBUG
+	message.Append(KDebugQuery);
+	UINT type = MB_YESNO | MB_DEFBUTTON2;
+#else
+	UINT type = MB_OK;
+#endif
+	type |= MB_SETFOREGROUND  | MB_ICONERROR;
+	message.Append('\0');
+
+	TInt r = MessageBoxA(iUi ? iUi->HWnd() : NULL, (LPCSTR)message.Ptr(), KErrorTitles[aType], type);
+	return r == IDYES;
+	}
+
+// UI installation
+
+EXPORT_C DWinsUiBase::DWinsUiBase()
+	{
+	TheVariant.InstallUi(*this);
+	}
+
+
+TInt BinaryPowerInit();
+
+DWinsPowerController* DWinsPowerController::New()
+	{
+	DWinsPowerController* self = new DWinsPowerController();
+	if (!self)
+		return NULL;
+	self->iStandbySem = CreateSemaphore(NULL, 0, 1, NULL);
+	if (self->iStandbySem == NULL)
+		return NULL;
+	TInt r = BinaryPowerInit();
+	if (r != KErrNone)
+		return NULL;
+	self->Register();
+	return self; 
+	}
+
+void DWinsPowerController::CpuIdle()
+	{
+	Arch::TheAsic()->Idle();
+	}
+		
+void DWinsPowerController::EnableWakeupEvents()
+	{
+	iWakeupSignal = EFalse;
+	}
+
+void DWinsPowerController::DisableWakeupEvents()
+	{
+	}
+
+void DWinsPowerController::AbsoluteTimerExpired()
+	{
+	if (iTargetState == EPwStandby)
+		DWinsPowerController::WakeupEvent();	
+	}
+
+void DWinsPowerController::WakeupEvent()
+	{
+	if (iTargetState == EPwStandby)
+		{
+		iWakeupSignal = ETrue;
+		DPowerController::WakeupEvent();
+		}
+	}
+
+// called in Epoc thread
+void DWinsPowerController::PowerDown(TTimeK aWakeupTime)
+	{
+	if (iTargetState == EPwStandby)
+		{
+		UINT timeoutMs;
+		if (aWakeupTime == 0)
+			timeoutMs = INFINITE;
+		else 
+			{
+			TTimeK now = Kern::SystemTime();
+			if (now > aWakeupTime)
+				timeoutMs = 0;
+			else
+				timeoutMs = (UINT)((aWakeupTime - now) / 1000);
+			}
+		TInt l = NKern::DisableAllInterrupts();
+		if (!iWakeupSignal && timeoutMs)
+			{
+			iStandby = ETrue;
+			TheVariant.iTimer.Standby();
+			NKern::RestoreInterrupts(l);
+			DWORD r = WaitForSingleObject(iStandbySem, timeoutMs);
+			if (r == WAIT_TIMEOUT)
+				{
+				l = NKern::DisableAllInterrupts();
+				if (!iStandby)
+					WaitForSingleObject(iStandbySem, INFINITE);
+				else
+					iStandby = EFalse;
+				NKern::RestoreInterrupts(l);
+				}
+			TheVariant.iTimer.Wakeup();
+			}
+		else
+			NKern::RestoreInterrupts(l);
+
+		}
+	else
+		Kern::Restart(0x80000000);
+	}
+
+// called in the interrupt context
+void DWinsPowerController::AssertWakeupSignal()
+	{
+	iWakeupSignal = ETrue;
+	if (iStandby)
+		{
+		iStandby = EFalse;
+		ReleaseSemaphore(iStandbySem, 1, NULL);
+		}
+	}
+
+
+EXPORT_C void Wins::AssertWakeupSignal()
+	{
+	iPowerController->AssertWakeupSignal();
+	}
+
+EXPORT_C void Wins::WakeupEvent()
+	{
+	iPowerController->DWinsPowerController::WakeupEvent();
+	}
+
+// MMC emulation support
+
+TBool Wins::MediaDoorOpen;
+TInt Wins::CurrentPBusDevice;
+TAny* Wins::MediaChangeCallbackParam;
+TMediaChangeCallBack Wins::MediaChangeCallBackPtr;
+
+
+EXPORT_C TBool* Wins::MediaDoorOpenPtr()
+//
+// For media change simulation
+//
+	{
+
+	return(&MediaDoorOpen);
+	}
+
+EXPORT_C TInt* Wins::CurrentPBusDevicePtr()
+//
+// For media change simulation
+//
+	{
+
+	return(&CurrentPBusDevice);
+	}
+
+EXPORT_C void Wins::SetMediaChangeCallBackPtr(TMediaChangeCallBack aPtr, TAny* aMediaChangeCallbackParam)
+//
+// For media change simulation
+//
+	{
+	MediaChangeCallbackParam=aMediaChangeCallbackParam;
+	MediaChangeCallBackPtr=aPtr;
+	}
+
+EXPORT_C void Wins::MediaChangeCallBack()
+//
+// Perform the simulated media change callback
+//
+	{
+	if(MediaChangeCallBackPtr)
+		(*MediaChangeCallBackPtr)(MediaChangeCallbackParam);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/winscomm.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,249 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins/specific/winscomm.h
+// 
+//
+
+#ifndef __M32COMM_H__
+#define __M32COMM_H__
+#include <platform.h>
+//#include <kpower.h>
+#include <d32comm.h>
+#include <e32ver.h>
+//
+const TInt KCommsMajorVersionNumber=1;
+const TInt KCommsMinorVersionNumber=1;
+const TInt KCommsBuildVersionNumber=KE32BuildVersionNumber;
+
+//
+enum TStopMode {EStopNormal,EStopPwrDown,EStopEmergency};
+//
+//
+class DChannelComm;
+class DComm : public DBase
+	{
+public:
+	virtual TInt Start() =0;
+	virtual void Stop(TStopMode aMode) =0;
+	virtual void Break(TBool aState) =0;
+	virtual void Write(DThread*,TAny*,TInt) = 0;
+	virtual void Read(DThread*,TAny*,TInt) = 0;
+	virtual void NotifySignals(DThread*, TInt) = 0;
+	virtual void NotifyDataAvailable() = 0;
+	virtual TUint Signals() const =0;
+	virtual void SetSignals(TUint aSetMask,TUint aClearMask) =0;
+	virtual TInt ValidateConfig(const TCommConfigV01 &aConfig) const =0;
+	virtual void Configure(TCommConfigV01 &aConfig) =0;
+	virtual void Caps(TDes8 &aCaps) const =0;
+	virtual void CheckConfig(TCommConfigV01& aConfig)=0;
+	virtual TDfcQue* DfcQ(TInt aUnit)=0;
+	inline void SetCurrent(TInt aCurrent);
+	inline TBool Transmitting();
+	virtual TInt RxCount() =0;
+	virtual void ResetBuffers(TBool) = 0;
+	virtual TInt SetRxBufferSize(TInt aSize) = 0;
+	virtual TInt RxBufferSize() =0;
+	virtual TDes8* RxBuffer() =0;
+	virtual TBool AreAnyPending() = 0;
+	virtual void ReadCancel() = 0;
+	virtual void WriteCancel() = 0;
+	virtual void SignalChangeCancel() = 0;
+	virtual inline TBool LineFail() =0;
+
+public:
+	DChannelComm *iLdd;
+	TBool iTransmitting;
+	TUint8 * iInBufPtr;
+	TUint8 * iOutBufPtr;
+	};
+
+
+class DDeviceComm : public DLogicalDevice
+	{
+public:
+	DDeviceComm();
+	virtual TInt Install();
+	virtual void GetCaps(TDes8 &aDes) const;
+	virtual TInt Create(DLogicalChannelBase*& aChannel);
+	};
+
+//class DCommPowerHandler;
+class DChannelComm : public DLogicalChannel
+	{
+public:
+	enum TState {EOpen,EActive,EClosed};
+	enum TRequest {ERx=1, ETx=2, ESigChg=4, ERxDA=8, EBreak=16, EAll=0xff};
+
+	DChannelComm();
+	~DChannelComm();
+	inline void SetStatus(TState aStatus);
+	TInt TurnaroundSet(TUint aNewTurnaroundMilliSeconds);
+	TBool TurnaroundStopTimer();
+	TInt TurnaroundClear();
+	static void TurnaroundStartDfc(TAny* aSelf);
+	void TurnaroundStartDfcImplementation(TBool inIsr);
+	static void TurnaroundTimeout(TAny* aSelf);
+	void TurnaroundTimeoutImplementation(void);
+
+protected:
+	virtual TInt DoCreate(TInt aUnit, const TDesC8* aInfo, const TVersion& aVer);
+	virtual void HandleMsg(TMessageBase* aMsg);
+	void DoCancel(TInt aMask);
+	TInt DoControl(TInt aId, TAny* a1, TAny* a2);
+	TInt DoRequest(TInt aId, TRequestStatus* aStatus, TAny* a1, TAny* a2);
+	void Start();
+	void Shutdown();
+	void BreakOn();
+	void BreakOff();
+	void ResetBuffers(TBool aResetTx);
+	void DoCompleteRx();
+	void DoCompleteTx();
+	void DoSignalNotify();
+	void DoRxDataAvailable();
+	void Complete(TInt aMask, TInt aReason);
+	inline void CompleteRead()	{ iRxCompleteDfc.Add(); }
+	inline void CompleteWrite() { iTxCompleteDfc.Add(); }
+protected:
+	inline void Write(DThread* aT, TAny* aP, TInt aL) {((DComm*)iPdd)->Write(aT, aP,aL);}
+	inline void Read(DThread* aT, TAny* aP, TInt aL) {((DComm*)iPdd)->Read(aT, aP,aL);}
+	inline void NotifySignals(DThread* aThread, TInt aMask) {((DComm*)iPdd)->NotifySignals(aThread, aMask);}
+	inline void NotifyDataAvailable() {((DComm*)iPdd)->NotifyDataAvailable(); }
+	inline TInt PddStart();
+	inline void Stop(TStopMode aMode);
+	inline void PddBreak(TBool aState);
+	inline TUint Signals() const;
+	inline void SetSignals(TUint aSetMask,TUint aClearMask);
+	inline TInt ValidateConfig(const TCommConfigV01 &aConfig) const;
+	inline void PddConfigure(TCommConfigV01 &aConfig);
+	inline void PddCaps(TDes8 &aCaps) const;
+	inline void PddCheckConfig(TCommConfigV01& aConfig);
+	inline TBool Transmitting();
+	inline TInt BufferSize();
+	inline void ReadCancel();
+	inline void WriteCancel();
+	inline void SignalChangeCancel();
+
+	static void FinishBreakDfc(TAny* aSelf);
+	void QueueFinishBreakDfc();
+	static void FinishBreak(TAny* aSelf);
+	void FinishBreakImplementation(TInt aBreakError);
+private:
+//	static void PowerUpDfc(TAny* aPtr);
+//	static void PowerDownDfc(TAny* aPtr);
+	static void CompleteRxDfc(TAny* aPtr);
+	static void CompleteTxDfc(TAny* aPtr);
+	static void SignalNotifyDfc(TAny* aPtr);
+	static void RxDataAvailableDfc(TAny* aPtr);
+	inline TInt RxCount();
+	inline TInt RxBufferSize();
+	inline TDes8* RxBuffer();
+	inline TInt SetRxBufferSize(TInt aSize);
+	inline TBool AreAnyPending() const;
+//	void UpdateSignals();
+	void UpdateAndProcessSignals();
+	void InitiateRead(TAny* aRxDes, TInt aLength);
+	void InitiateWrite(TAny* aTxDes, TInt aLength);
+	void InitiateNotifySignals(TAny* aResult, TInt aMask);
+	void NotifyReadDataAvailable();
+//	TUint FailSignals(TUint aHandshake);
+//	TUint HoldSignals(TUint aHandshake);
+//	TUint FlowControlSignals(TUint aHandshake);
+//	TUint AutoSignals(TUint aHandshake);
+	TInt SetConfig(TCommConfigV01& aConfig);
+//	void CheckOutputHeld();
+//	void ReleaseBuffers();
+	inline TBool LineFail();
+
+	// Min Turnaround time between Rx and Tx
+	TUint		iTurnaroundMicroSeconds;		// delay after a receive before transmission in us
+	TUint		iTurnaroundMinMilliSeconds;		// delay after a receive before transmission in ms
+	TUint       iTurnaroundTimerStartTime;      // stores the start time of the turnaround timer.
+	TUint8      iTurnaroundTimerStartTimeValid; // stores turnaround timer status 0 after boot, 1 if the timestamp is valid, and 2 if invalid
+	TUint8		iTurnaroundTimerRunning;		// a receive has started the timer
+	TUint8		iTurnaroundTransmitDelayed;		// a transmission is held until time elapses after a receive
+	TUint8		iSpare;
+	NTimer		iTurnaroundTimer;				// used to delay transmission after a receive
+	TDfc		iTurnaroundDfc;					// used in interrupt space, to trigger a call in user space
+
+	TAny*		iTurnaroundTxDesPtr;			// client descriptor awaiting transmission
+	TInt		iTurnaroundTxDesLength;			// initial size of tx descriptor
+
+	// Breaks
+	TTickLink iBreakTimer;
+	TDfc		 iBreakDfc;
+	TRequestStatus* iBreakStatus;
+	TInt		iBreakTimeMicroSeconds;
+	TBool 	iTurnaroundBreakDelayed;
+	TAny*		iBreakDelayedTxDesPtr;			// client descriptor awaiting transmission
+	TInt		iBreakDelayedTxDesLength;			// initial size of tx descriptor
+	TBool		iBreakDelayedTx;
+public:
+	// Port configuration
+	TCommConfigV01 iConfig;
+
+	// General items
+	DThread* iClient;
+	TAny* iClientDestPtr;
+//	DCommPowerHandler* iPowerHandler;
+//	TDfc iPowerUpDfc;
+//	TDfc iPowerDownDfc;
+//	TUint32 iPowerDownMask;
+	TState iStatus;
+	TDfc iRxCompleteDfc;
+	TDfc iTxCompleteDfc;
+	TDfc iRxDataAvailableDfc;
+	TDfc iSigNotifyDfc;
+	TUint iFlags;				//
+	TUint iSignals;				// State of handshake lines
+//	TUint iFailSignals;			// 1 bit means line low causes line fail error
+//	TUint iHoldSignals;			// 1 bit means line low halts TX
+//	TUint iFlowControlSignals;	// 1 bit means signal is used for RX flow control
+//	TUint iAutoSignals;			// 1 bit means signal is high when channel is open
+	TBool iShutdown;			// ETrue means device is being closed
+	TBool iMsgHeld;				// ETrue means a message has been held up waiting power on
+
+	// RX client related items
+	TInt iRxError;
+	TRequestStatus* iRxStatus;
+
+
+	// TX client related items
+	TInt iTxError;
+	TRequestStatus* iTxStatus;
+
+	// DataAvailable client related items
+	TInt iRxDAError;
+	TRequestStatus* iRxDAStatus;
+
+	// Signal change notification
+	TInt iSignalError;
+	TRequestStatus* iSignalStatus;	
+	TUint* iClientSignalResultPtr;	//ptr to uint in client address space
+	TUint iSignalResult;			//holds result of the signal (in Symbian OS values)
+	};
+
+//class DCommPowerHandler : public DPowerHandler
+//	{
+//public:
+//	DCommPowerHandler(DChannelComm* aChannel);
+//	virtual TInt DoPowerUp();
+//	virtual void DoPowerDown(TUint32 aPowerDownMask);
+//	virtual void DoEmergencyPowerDown();
+//public:
+//	DChannelComm* iChannel;
+//	};
+
+#include "winscomm.inl"
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/winscomm.inl	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,85 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins/specific/winscomm.inl
+// inline void DComm::SetCurrent(TInt aCurrent)
+// { iLdd->iPowerHandler->SetCurrentConsumption(aCurrent); }
+// 
+//
+
+
+
+
+inline TBool DChannelComm::AreAnyPending() const
+	{ return((DComm*)iPdd)->AreAnyPending(); }
+
+inline TInt DChannelComm::RxCount()
+	{ return ((DComm*)iPdd)->RxCount(); }
+
+inline void DChannelComm::ReadCancel()
+	{ ((DComm*)iPdd)->ReadCancel(); }
+
+inline void DChannelComm::WriteCancel()
+	{ ((DComm*)iPdd)->WriteCancel(); }
+
+inline void DChannelComm::SignalChangeCancel()
+	{ ((DComm*)iPdd)->SignalChangeCancel(); }
+
+inline void DChannelComm::ResetBuffers(TBool aTx)
+	{ ((DComm*)iPdd)->ResetBuffers(aTx); }
+
+inline TInt DChannelComm::SetRxBufferSize(TInt aSize)
+	{ return ((DComm*)iPdd)->SetRxBufferSize(aSize); }
+
+inline TDes8* DChannelComm::RxBuffer()
+	{ return ((DComm*)iPdd)->RxBuffer(); }
+
+inline	TInt DChannelComm::RxBufferSize()
+	{ return ((DComm*)iPdd)->RxBufferSize(); }
+
+inline void DChannelComm::SetStatus(TState aStatus)
+	{ iStatus=aStatus; }
+
+inline TInt DChannelComm::PddStart()
+	{ return ((DComm*)iPdd)->Start(); }
+
+inline void DChannelComm::Stop(TStopMode aMode)
+	{ ((DComm*)iPdd)->Stop(aMode); }
+
+inline void DChannelComm::PddBreak(TBool aState)
+	{ ((DComm*)iPdd)->Break(aState); }
+
+inline TUint DChannelComm::Signals() const
+	{ return ((DComm*)iPdd)->Signals(); }
+
+inline void DChannelComm::SetSignals(TUint aSetMask,TUint aClearMask)
+	{ ((DComm*)iPdd)->SetSignals(aSetMask,aClearMask); }
+
+inline TInt DChannelComm::ValidateConfig(const TCommConfigV01 &aConfig) const
+	{ return ((DComm*)iPdd)->ValidateConfig(aConfig); }
+
+inline void DChannelComm::PddConfigure(TCommConfigV01 &aConfig)
+	{ ((DComm*)iPdd)->Configure(aConfig); }
+
+inline void DChannelComm::PddCaps(TDes8 &aCaps) const
+	{ ((DComm*)iPdd)->Caps(aCaps); }
+
+inline void DChannelComm::PddCheckConfig(TCommConfigV01& aConfig)
+	{ ((DComm*)iPdd)->CheckConfig(aConfig); }
+
+inline TBool DChannelComm::Transmitting()
+	{ return ((DComm*)iPdd)->iTransmitting; }
+
+inline TBool DChannelComm::LineFail()
+	{ return ((DComm*)iPdd)->LineFail(); }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/specific/winssoundsc.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,402 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins\specific\winssoundsc.h
+// Definitions for the emulator shared chunk sound driver PDD.
+// 
+//
+
+/**
+ @file
+ @internalTechnology
+ @prototype
+*/
+
+#ifndef __WINSSOUNDSC_H__
+#define __WINSSOUNDSC_H__
+
+#include <drivers/soundsc.h>
+#include "nk_priv.h"
+#include <emulator.h>
+#pragma warning(disable : 4201) // nonstandard extension used : nameless struct/union
+#include <mmsystem.h>
+#include <mmreg.h>
+#pragma warning(default : 4201)
+#include <property.h>
+
+//#define FORCE_NO_HARDWARE
+
+//#define __KTRACE_SND(s) s;
+#define __KTRACE_SND(s)
+
+#define PANIC()	Kern::Fault("WinsSoundScPdd", __LINE__)
+
+const TInt KMMTimerRes = 5;	// Minimum timer resolution (5mS). Timer used only when no audio hardware present.
+const TInt KWinsMaxAudioTransferLen=0x8000;	// The maximum transfer length this PDD will accept (32K).
+const TInt KMinWaveHdrBufCount=8;			// The minimum number of record or playback waveform audio buffers.
+
+GLREF_C TInt RateInSamplesPerSecond(TSoundRate aRate);
+GLREF_C DWORD WaitForSingleObjectDualThread(HANDLE hHandle,DWORD dwMilliseconds);
+GLREF_C WAVEHDR* RemoveFromPendingList(WAVEHDR** aList);
+GLREF_C void AddToPendingList(WAVEHDR* aBuffer,WAVEHDR** aList);
+
+// Utility class used to lock the kernel for a short period while windows 
+// API calls are made. This is to stop a possible deadlock from occurring when 
+// a windows thread is suspended while a (windows) synchronization object is held
+// and a second thread tries to gain access to that object. Typically this object 
+// is declared on the stack - when the constructor is called, the kernel is locked; 
+// when the object goes out of scope, the destructor unlocks the kernel.
+// Used by the __HOST_LOCK macro.
+class THostLock
+	{
+public:
+	THostLock();
+	~THostLock();
+	void Lock();
+	void Unlock();
+protected:
+	THostLock(TBool aLock);
+private:
+	TBool iLocked;
+	};
+
+// Utility class used to lock the kernel for a short period while windows 
+// API calls are made. This is used instead of THostLock for functions
+// which are used by both the driver thread and the play thread - 
+// if the thread is a windows thread, then the kernel is not locked.
+// Used by the __COND_HOST_LOCK macro.
+class TCondHostLock : public THostLock
+	{
+public:
+	TCondHostLock();
+	void Lock();
+	void Unlock();
+private:
+	TBool iEpocThread;
+	};
+
+// Forward declarations
+class TWaveformBufMgr;
+
+/**
+This the abstraction for a windows waveform audio buffer.
+*/
+class TWaveformAudioBuf
+	{
+public:
+	TWaveformAudioBuf();
+	inline void SetWaveformBufMgr(TWaveformBufMgr* aWaveformBufMgr)
+		{iWaveformBufMgr=aWaveformBufMgr;}
+	inline void SetBufNum(TInt aBufNum)
+		{iBufNum=aBufNum;}
+	void Prepare(char* aBufAddr,TInt aBufLength,TInt aDeviceHandle);
+	void Unprepare(TInt aDeviceHandle);
+private:		
+	void DoPrepareOut(HWAVEOUT aPlayDeviceHandle);
+	void DoUnprepareOut(HWAVEOUT aPlayDeviceHandle);
+	void DoPrepareIn(HWAVEIN aRecordDeviceHandle);
+	void DoUnprepareIn(HWAVEIN aRecordDeviceHandle);
+public:
+	/** The owning waveform audio buffer manager. */
+	TWaveformBufMgr* iWaveformBufMgr;
+	/** Set when the waveform audio buffer is currently prepared. */
+	TBool iIsPrepared;
+	/** Set when the waveform audio buffer is involved in an active transfer. */
+	TBool iIsInUse;
+	/** The header used by windows to identify the waveform audio buffer. */
+	WAVEHDR iBufHdr;
+	/** A value used to identify a particular waveform audio buffer within an array of these objects. */
+	TInt iBufNum;
+	/** The transfer ID supplied by the LDD when the buffer is involved in an active transfer. */
+	TUint iTransferID;
+	friend class TWaveformBufMgr;	
+	};
+
+/**
+The waveform audio buffer manager. This owns and maintains a set of windows waveform audio buffers which it makes
+available to the PDD for data block transfers.
+*/	
+class TWaveformBufMgr
+	{
+public:	
+	TWaveformBufMgr(TSoundDirection aDirection,TBool aIsHardware);
+	~TWaveformBufMgr();
+	TInt ReAllocAndUpdate(TSoundSharedChunkBufConfig* aBufConfig,TLinAddr aChunkBase,TInt aDeviceHandle);
+	TWaveformAudioBuf* AcquireBuf(char* aStartAddress,TInt aBufLength,TInt aDeviceHandle);
+public:
+	/** The array of windows waveform audio buffer objects. There is at least one buffer object per buffer within the 
+	LDD shared chunk. */
+	TWaveformAudioBuf* iWaveformAudioBuf;
+	/** The count of the number of audio play buffers in the waveform buffer array. */
+	TInt iNumWaveformBufs;
+	/** The  default size of each audio buffer in the waveform buffer array. */
+	TInt iWaveformBufSize;
+	/** List of waveform audio buffer objects waiting to be played/recorded - in FIFO order. Used only when
+	no audio hardware is present.*/
+	WAVEHDR** iPendingBufList;
+	/** Set when no audio hardware is present. */
+	TBool iIsHardware;
+	/** The direction of the windows waveform audio buffer, record or playback. */
+	TSoundDirection iDirection;
+	};	
+	
+/**
+The WINS physical device (factory class) for the shared chunk sound driver.
+*/	
+class DWinsSoundScPddFactory : public DPhysicalDevice
+	{
+public:
+	DWinsSoundScPddFactory();
+	~DWinsSoundScPddFactory();
+	virtual TInt Install();
+	virtual void GetCaps(TDes8 &aDes) const;
+	virtual TInt Create(DBase*& aChannel, TInt aUnit, const TDesC8* anInfo, const TVersion &aVer);
+	virtual TInt Validate(TInt aUnit, const TDesC8* anInfo, const TVersion &aVer);
+private:
+	/** The DFC queue (used also by the LDD). */ 
+	TDynamicDfcQue* iDfcQ;
+	/** DFC for terminating the DFC thread. */
+   	static TDfc ExitDfc;
+	friend class DWinsSoundScTxPdd;
+	friend class DWinsSoundScRxPdd;
+	};
+	
+/**
+The WINS physical device driver (PDD) for the playback shared chunk sound driver.
+*/
+class DWinsSoundScTxPdd : public DSoundScPdd
+	{
+private:
+	enum TThreadCommand {ESendData, EStop, EExit, EPause, EResume};
+	enum TCreatePlayDeviceMode {EInit,ESetConfig,EStartTransfer};
+public:
+	DWinsSoundScTxPdd();
+	~DWinsSoundScTxPdd();
+	TInt DoCreate(DWinsSoundScPddFactory* aPhysicalDevice);
+	// Implementations of the pure virtual functions inherited from DSoundScPdd.
+	virtual TDfcQue* DfcQ(TInt aUnit);
+	virtual void GetChunkCreateInfo(TChunkCreateInfo& aChunkCreateInfo);
+	virtual void Caps(TDes8& aCapsBuf) const;
+	virtual TInt MaxTransferLen() const;
+	virtual TInt SetConfig(const TDesC8& aConfigBuf);
+	virtual TInt SetVolume(TInt aVolume);
+	virtual TInt StartTransfer();
+	virtual TInt TransferData(TUint aTransferID,TLinAddr aLinAddr,TPhysAddr aPhysAddr,TInt aNumBytes);
+	virtual void StopTransfer();
+	virtual TInt PauseTransfer();
+	virtual TInt ResumeTransfer();
+	virtual TInt PowerUp();
+	virtual void PowerDown();
+	virtual TInt CustomConfig(TInt aFunction,TAny* aParam);
+	virtual TInt TimeTransferred(TInt64& aTime, TInt aState);
+public:
+	void WaveOutProc(WAVEHDR* aHdr);
+	void PlayThread();
+private:
+	void SetCaps();
+	TInt OpenWaveOutDevice();
+	TInt CreatePlayDevice(TCreatePlayDeviceMode aMode);
+	void ClosePlayDevice();
+	void PlayThreadCommand(TThreadCommand aCommand,TInt aArg0=0,TInt aArg1=0,TInt aArg2=0);
+	TInt ProcessPlayCommand(TThreadCommand aCommand,TInt aArg0,TInt aArg1,TInt aArg2);
+	void HandlePlayTimerEvent();
+	void HandleTransferComplete();
+	void PlayThreadNotifyDriver(TInt aError);
+	void StartTimer(WAVEHDR* aBuffer);
+	void StopTimer(TBool aCancelAll);
+	static void PlayDfc(TAny* aPtr);
+private:
+	/** A pointer to the PDD factory. */
+	DWinsSoundScPddFactory* iPhysicalDevice;
+	/** The capabilities of this device. */
+	TSoundFormatsSupportedV02 iCaps;
+	/** The current audio configuration of this device. */
+	TCurrentSoundFormatV02 iSoundConfig;
+	/** The current setting for the play volume - a value in the range 0 to 0xFFFF. */
+	TInt iVolume;
+	/** The driver thread semaphore - used by the windows thread to signal the driver thread. */
+	HANDLE iDriverThreadSem;
+	/** The handle for the play windows thread. */
+	HANDLE iPlayThread;
+	/** ETrue if the Windows thread is running, else EFalse.  Used when shutting down to decide whether to
+	signal the thread to exit. */
+	TBool iPlayThreadRunning;
+	/** The play thread mutuex - to serialise acccess to the play thread creation and destruction routines. */
+	HANDLE iPlayThreadMutex;
+	/** The play thread semaphore - indicates to the windows thread that the driver thread has issued a command. */
+	HANDLE iPlayThreadSem;
+	/** Semaphore to synchronise between driver thread and windows thread when closing the output device. */
+	HANDLE iStopSemaphore;
+	/** Semaphore to synchronise between driver thread and windows thread when closing the PDD. */
+	HANDLE iDeathSemaphore;
+	/** The handle on the waveform output device. */
+	HWAVEOUT iPlayDeviceHandle;
+	/** Used to transfer commands between the driver thread and the windows thread. */
+	TThreadCommand iPlayCommand;
+	/** Used to transfer commands between the driver thread and the windows thread. */
+	TInt iPlayCommandArg0;
+	/** Used to transfer commands between the driver thread and the windows thread. */
+	TInt iPlayCommandArg1;
+	/** Used to transfer commands between the driver thread and the windows thread. */
+	TInt iPlayCommandArg2;
+	// The number of outstanding data transfers on the waveform output device. */	
+	TInt iPendingPlay;
+	/** DFC which handes data block play completion. */
+	TDfc iDfc;
+	/** A variable used to pass a value from the windows thread to the driver thread. */
+	TInt iPlayThreadError;
+	/** The windows waveform audio buffer manager. */
+	TWaveformBufMgr* iWaveformBufMgr;
+	/** A mask used to pass information on transfers that have just completed between the window thread and the 
+	driver thread. Updates to this variable typically need to happen atomically. Bit positions are converted 
+	into windows waveform audio buffer IDs. */
+	TUint32 iCompletedPlayBufHdrMask;
+	/** Set when no audio hardware is present. */
+	TBool iNoHardware;
+	/** The timer event object - indicates the 'no-hardware' timer has gone off. */
+	HANDLE iPlayTimerEvent;
+	/** The identifier for the current 'no-hardware' timer event. */
+	UINT iTimerID;
+	/** Indicates whether the 'no-hardware' timer is currently active. */
+	TBool iTimerActive;
+	/** A variable used to save the play volume setting of the waveform output device at the point when this driver was opened. */
+	DWORD iWinWaveVolume;
+	/** The number of bytes (not samples) that will be played back per second, at the current sample rate. */
+	TUint iBytesPerSecond;
+	/** The simulated (ie. no hardware) microseconds played. */
+	TInt64 iSimulatedUSecPlayed;
+	/** The # of milliseconds that pass per block of data that is played. */
+	UINT iSimulatedMsecDuration;
+	/** The Windows system timer time at which the last block of data was played. */
+	DWORD iLastTimerEventTime;
+	/** The Windows system timer time at which playback was paused. */
+	DWORD iPauseTime;
+	};
+		
+/**
+The WINS physical device driver (PDD) for the record shared chunk sound driver.
+*/
+class DWinsSoundScRxPdd : public DSoundScPdd
+	{
+private:
+	enum TThreadCommand {ERecData, EStop, EExit, EPause, EResume};	
+public:
+	DWinsSoundScRxPdd();
+	~DWinsSoundScRxPdd();
+	TInt DoCreate(DWinsSoundScPddFactory* aPhysicalDevice);
+	// Implementations of the pure virtual functions inherited from DSoundScPdd.
+	virtual TDfcQue* DfcQ(TInt aUnit);
+	virtual void GetChunkCreateInfo(TChunkCreateInfo& aChunkCreateInfo);
+	virtual void Caps(TDes8& aCapsBuf) const;
+	virtual TInt MaxTransferLen() const;
+	virtual TInt SetConfig(const TDesC8& aConfigBuf);
+	virtual TInt SetVolume(TInt aVolume);
+	virtual TInt StartTransfer();
+	virtual TInt TransferData(TUint aTransferID,TLinAddr aLinAddr,TPhysAddr aPhysAddr,TInt aNumBytes);
+	virtual void StopTransfer();
+	virtual TInt PauseTransfer();
+	virtual TInt ResumeTransfer();
+	virtual TInt PowerUp();
+	virtual void PowerDown();
+	virtual TInt CustomConfig(TInt aFunction,TAny* aParam);
+	virtual TInt TimeTransferred(TInt64& aTime, TInt aState);
+public:
+	void WaveInProc(WAVEHDR* aHdr);
+	void RecordThread();
+private:
+	void SetCaps();
+	TInt OpenWaveInDevice();
+	TInt CreateRecordDevice(TBool aCheckDevice=EFalse);
+	void CloseRecordDevice();	
+	void RecordThreadCommand(TThreadCommand aCommand,TInt aArg0=0,TInt aArg1=0,TInt aArg2=0);
+	TInt ProcessRecordCommand(TThreadCommand aCommand,TInt aArg0,TInt aArg1,TInt aArg2);
+	void HandleRecordTimerEvent();
+	void HandleTransferComplete();
+	void RecordThreadNotifyDriver(TInt aError);
+	void StartTimer(WAVEHDR* aBuffer);
+	void StopTimer(TBool aCancelAll);
+	static void RecordDfc(TAny* aPtr);
+private:
+	/** A pointer to the PDD factory. */
+	DWinsSoundScPddFactory* iPhysicalDevice;
+	/** The capabilities of this device. */
+	TSoundFormatsSupportedV02 iCaps;
+	/** The current audio configuration of this device. */
+	TCurrentSoundFormatV02 iSoundConfig;
+	/** The driver thread semaphore - used by the windows thread to signal the driver thread. */
+	HANDLE iDriverThreadSem;
+	/** The handle for the record windows thread. */
+	HANDLE iRecordThread;
+	/** ETrue if the Windows thread is running, else EFalse.  Used when shutting down to decide whether to
+	signal the thread to exit. */
+	TBool iRecordThreadRunning;
+	/** The record thread mutuex - to serialise acccess to the record thread creation and destruction routines. */
+	HANDLE iRecordThreadMutex;
+	/** The record thread semaphore - indicates to the windows thread that the driver thread has issued a command. */
+	HANDLE iRecordThreadSem;
+	/** Semaphore to synchronise between driver thread and windows thread when closing the input device. */
+	HANDLE iStopSemaphore;
+	/** Semaphore to synchronise between driver thread and windows thread when closing the PDD. */
+	HANDLE iDeathSemaphore;
+	/** The handle on the waveform input device. */
+	HWAVEIN iRecordDeviceHandle;
+	/** Used to transfer commands between the driver thread and the windows thread. */
+	TThreadCommand iRecordCommand;
+	/** Used to transfer commands between the driver thread and the windows thread. */
+	TInt iRecordCommandArg0;
+	/** Used to transfer commands between the driver thread and the windows thread. */
+	TInt iRecordCommandArg1;
+		/** Used to transfer commands between the driver thread and the windows thread. */
+	TInt iRecordCommandArg2;
+	// The number of outstanding data transfers on the waveform input device. */	
+	TInt iPendingRecord;
+	/** DFC which handes data block record completion. */
+	TDfc iDfc;
+	/** A variable used to pass a value from the windows thread to the driver thread. */
+	TInt iRecordThreadError;
+	/** The windows waveform audio buffer manager. */
+	TWaveformBufMgr* iWaveformBufMgr;
+	/** A mask used to pass information on transfers that have just completed between the window thread and the 
+	driver thread. Updates to this variable typically need to happen atomically. Bit positions are converted 
+	into windows waveform audio buffer IDs. */
+	TUint32 iCompletedRecordBufHdrMask;
+	/** Indicates when record mode is enabled. */
+	TBool iRecordEnabled;
+	/** Set when no audio hardware is present. */
+	TBool iNoHardware;
+	/** The timer event object - indicates the 'no-hardware' timer has gone off. */
+	HANDLE iRecordTimerEvent;
+	/** The identifier for the current 'no-hardware' timer event. */
+	UINT iTimerID;
+	/** Indicates whether the 'no-hardware' timer is currently active. */
+	TBool iTimerActive;
+	/** The number of bytes (not samples) that will be recorded back per second, at the current sample rate. */
+	TUint iBytesPerSecond;
+	/** The number of bytes recorded before the last pause command (when we pause the windows byte
+		count is reset so we need to add this on for the TimeRecorded API). */
+	TUint iBytesRecordedBeforeLastPause;
+	/** The number of recorded bytes reported to the LDD. Subtracted from the windows recorded byte count 
+		to calculate the last, partial buffer, transfer size */
+	TUint iBytesSincePauseReportedToLdd;
+	/** The # of milliseconds that pass per block of data that is recorded. */
+	UINT iSimulatedMsecDuration;
+	/** The Windows system timer time at which the last block of data was recorded. */
+	DWORD iLastTimerEventTime;
+	};	
+
+#define __HOST_LOCK			THostLock lock
+#define __HOST_LOCK_ON		lock.Lock();
+#define __HOST_LOCK_OFF		lock.Unlock();
+#define __COND_HOST_LOCK	TCondHostLock lock
+	
+#endif /* __WINSSOUNDSC_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/test/bld.inf	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+PRJ_PLATFORMS
+WINS WINSCW
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+
+PRJ_TESTMMPFILES
+
+// Drivers
+../../../../kernelhwsrv/kerneltest/e32test/group/d_tick					support
+../../../../kernelhwsrv/kerneltest/e32test/group/bm_pdd					support
+../../../../kernelhwsrv/kerneltest/e32test/group/d_mstim					support
+
+// Tests
+../../../../kernelhwsrv/kerneltest/e32test/group/t_emul
+
+// Example RTOS personality
+../../../../kernelhwsrv/kerneltest/e32test/personality/example/example_personality_test	support
+
+#include "exdriver/exdriver_wins.inf"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/test/exdriver/exdriver_pio/group/d_expio_pdd_emul.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,59 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Example reference driver PDD project file for emulator target
+// 
+//
+
+/**
+ @file d_expio_pdd_emul.mmp
+*/
+ 
+// includes variant. mmh, which contains definitions to determine
+// the CPU Core Type, the Memory Model and Name for this Variant 
+#include "../../../variant_test.mmh"
+
+// includes all the necessary information to build a kernel Debug Agent
+#include "kernel/kern_ext.mmh"
+
+// name of the target
+target			VariantTarget(d_expio_pdd,pdd)
+// type of the target
+targettype		pdd
+
+// source path and files
+sourcepath		../../../../../../../kernelhwsrv/kerneltest/e32test/examples/exdriver/exdriver_pio/src
+source			d_expio_pdd.cpp
+sourcepath		../src
+source			d_expio_emul.cpp
+
+// include path and files
+USERINCLUDE		../inc
+USERINCLUDE		../../../../../../../kernelhwsrv/kerneltest/e32test/examples/exdriver/exdriver_pio/inc
+
+// uid of this binary
+uid				0x100039d0
+
+// platsec capabilities
+capability		all
+
+// macros to be enabled at compile time
+macro			_EXDRIVER_DEBUG_
+
+start wins
+baseaddress		0x59000000
+win32_library	kernel32.lib
+end
+
+//
+// End of d_expio_pdd.mmp
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/test/exdriver/exdriver_pio/inc/d_expio_emul.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,92 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// This is a header file to define wins specific classes and info
+// 
+//
+
+#ifndef __D_EXPIO_EMUL_H__
+#define __D_EXPIO_EMUL_H__
+
+// pdd include file
+#include "d_expio_pdd.h"
+
+// include files
+#include <d32comm.h> // comm header file
+
+// DFC related constants
+//
+_LIT(KExEmulUartDfcName,"ExEmulUartDfc"); 		// Name of the DFC thread
+const TInt KExEmulUartDfcPriority=26; 		// DFC thread priority		
+
+// UART FIFO sizes
+const TInt KTxFifoSize=64; // 64bytes fifo
+const TInt KRxFifoSize=64; // 64bytes fifo
+
+// Timer constants
+const TInt KRxPollTimeout=1; // 1ms
+const TInt KTimerStarted=1;
+const TInt KTimerExpired=0;
+const TInt KTimerCancelled=-1;
+
+
+/**
+ * Physical device class specific for Emulator UART Physical Device Driver (PDD)
+ */
+class DExEmulPhysicalDevice: public DExDriverPhysicalDevice
+{
+public:
+    DExEmulPhysicalDevice();   
+    ~DExEmulPhysicalDevice();  // Destructor
+    TInt Create(DBase*& aChannel, TInt aUnit, const TDesC8* aInfo, 
+    										const TVersion& aVer);
+};
+
+/**
+ Hardware peripheral class
+ 
+ Target specific class, H4 uart controller. This class 
+ is accessed from physical channel class. It's object 
+ is created in physical channel DoCreate()and deleted 
+ in it's destructor
+ */ 
+class DExUartPhysicalChannelEmul:public DExDriverPhysicalChannel
+	{
+public:
+	// Public functions access to all
+	DExUartPhysicalChannelEmul();					// Constructor	
+	~DExUartPhysicalChannelEmul();					// Destructor	
+	TInt DoCreate(TInt aUnit, const TDesC8* aInfo, 
+								const TVersion& aVer); // 2nd Stage constructor
+	void Caps(TDes8& aCaps);						// Get channel Capabilities
+	TInt Configure(const TCommConfigV01& aConfig);  // Configure the uart	
+	TInt TransmitData(const TDesC8& aData);			// Transmit data to uart	
+	TInt ReceiveData(TDes8& aData,TInt aLen);					// Receive data from uart	
+	TDynamicDfcQue* DfcQ();							// DFC queue creation
+private:
+	static void RxPollTimerCallback(TAny* aPtr);	
+private:	
+	TBool iConfigured;				// Channel configuration status;
+	TBps iBaudRate;		
+	NTimer iRxPollTimer;			// Timer to poll for Rx data
+	TInt iTimerStatus;				// Rx data timer status
+	// Windows handle for com port
+	HANDLE hCommPort;
+	DWORD iBytesRead;
+	DWORD iBytesWritten;
+	};
+		
+#endif // __D_EXPIO_EMUL_H__
+
+//
+// End of d_expio_emul.h
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/test/exdriver/exdriver_pio/src/d_expio_emul.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,621 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// This file implements the DExUartPhysicalChannelEmul class functions. 
+// This is the implementation os serila port driver for emulator
+// target, i.e serial port of windows PC. This pdd is actually an
+// application for windows serial driver and therefore uses windows
+// API to access windows serial driver functionality
+// 
+//
+
+// include h4 specific header file
+#include "d_expio_emul.h"
+
+/** 
+ PDD entry point
+ This function is called when the PDD is loaded. This creates a factory
+ object for PDD. DECLARE_STANDARD_PDD macro defines the first export to
+ represent the DLL factory function, that will be called first by loader
+ after loading the PDD. 
+ */
+DECLARE_STANDARD_PDD()
+	{	
+	// Create a PDD factory object, i.e instance of DPhysicalDevice derived 
+	// class. This is the first step that is done after loading the driver.
+	// Physical device constructor inturn creates a Physical Channel.
+	//		
+	DExEmulPhysicalDevice* pD = new DExEmulPhysicalDevice;
+	if(pD)
+		{
+		// TDynamicDfcQue is used for creating and destroying a DFC as needed
+		// This extends TDfcQue with destroy method. This ensures there is
+		// no memory leak done while using DFC queue 
+		//
+		TDynamicDfcQue* pDfcQ;
+		// Create a new DFC queue using kernel API, Kern::DynamicDfcQCreate(). It 
+		// allocates a TDynamicDfcQue object on the heap and initializes it with 
+		// provided parameters like thread priority for the queue. Thread priority
+		// has to be chosen carefully, as priority higher than the kernel threads 
+		// used for timers may adversely effect the system performance, nano 
+		// kernel ticks.
+		//
+		TInt r = Kern::DynamicDfcQCreate(pDfcQ,KExEmulUartDfcPriority,
+														KExEmulUartDfcName);
+		if (KErrNone==r)
+			{
+			// Store the DFC thread pointer to return when required
+			pD->iDfcQueue = pDfcQ;
+			// Success return point
+			return pD;
+			}
+		// if DFCQ creation failed, then fail the PDD loading, hence asynchronously close	
+		// the LDD factory object created.
+		//
+		pD->AsyncClose();
+		}
+	// Failure exit point	
+	return NULL;
+	}
+
+/**
+ PDD factory constructor. This is called while creating the PDD factory
+ object as a part of the driver (PDD) loading. This is called after the
+ base class constructor, i.e DExUartPhysicalDevice()
+ */
+DExEmulPhysicalDevice::DExEmulPhysicalDevice()	
+	{	
+	// if multiple units are supported, then iUnitsMask is set here
+	// to indicate the units being supported by the driver.	
+	}
+
+/**
+ Physical device destructor. This is called whicle unloading the PDD
+ */
+DExEmulPhysicalDevice::~DExEmulPhysicalDevice()	
+	{	
+	// If a Dynamic Dfc Queue is created, delete it to ensure there is no
+	// memory leak.
+	//
+	if (iDfcQueue)
+		{
+		// Destroys the DFC queue.The function destroys the DFC queue, killing
+		// the DFC thread and deleting the TDynamicDfcQue object itself
+		//
+		iDfcQueue->Destroy();
+		}
+	}
+
+/** 
+ PDD factory object (physical device) create. This is called by framework
+ to create a physical channel. It is called in the context of the client 
+ user-side thread that requested the creation of the logical channel. 
+ This is a result of a user-side call to RBusLogicalChannel::DoCreate().
+ 
+ @param 	aChannel
+ 			reference to the physical channel object created
+ 
+ @return	KErrNone for success or KErrNoMemory for failure
+ */ 
+TInt DExEmulPhysicalDevice::Create(DBase*& aChannel,TInt aUnit, const TDesC8* aInfo, 
+								const TVersion& aVer)
+	{		
+	// Create the Physical channel		
+	DExUartPhysicalChannelEmul *device = new DExUartPhysicalChannelEmul;
+	if (!device)
+		return KErrNoMemory;
+	
+	aChannel = device;
+	
+	// Call the second stage contructor of physical channel
+	return device->DoCreate(aUnit,aInfo,aVer);	
+	}		
+		
+/**
+ Constructor for physical channel. Called after the base class constructor
+ */
+DExUartPhysicalChannelEmul::DExUartPhysicalChannelEmul()
+:iConfigured(EFalse),
+iBytesRead(0),
+ iRxPollTimer(RxPollTimerCallback,this)	// Timer to poll Rx data
+	{	
+	}
+
+/**
+ Hardware peripheral class (uart) Destructor
+ */
+DExUartPhysicalChannelEmul::~DExUartPhysicalChannelEmul()
+	{
+	// Cancel the Rx poll timer. NTimer.Cancel() Cancel a nanokernel 
+	// timer. Removes this timer from the nanokernel timer queue. 
+	// Does nothing if the timer is inactive or has already expired. 
+	// If the timer was queued and DFC callback requested it is possible 
+	// for the expiry handler to run even after Cancel() has been called.
+	//
+	if (iTimerStatus==KTimerStarted)
+		iRxPollTimer.Cancel();
+
+	// close the port if the handle is invalid
+	if (hCommPort!=INVALID_HANDLE_VALUE)
+	{
+		// Close the Serial Port after reading data
+		CloseHandle(hCommPort);
+		KEXDEBUG(Kern::Printf("Emulator::Serial Port Closed"));
+	}
+	}
+
+/**
+ Physical channel second stage constructor. This is called from the DPhysicalDevice::Create()
+ after creating the physical channel. Any further initializations as a part of the physical
+ channel creation are done here.
+ 
+ @param	aUnit
+ 		device unit number
+ @param	aInfo
+ 		device related information
+ @param	aVer
+ 		version number
+ @return
+ */
+TInt DExUartPhysicalChannelEmul::DoCreate(TInt aUnit, const TDesC8* aInfo, const TVersion& aVer)
+    { 
+    TInt r;
+     
+    // We are not using these parameters here, and therefore making them void to avoid any
+    // warning messages during build. If multiple units are supported, creating the channel
+    // w.r.t unit can be controlled here
+    //
+    (void)aUnit;     
+    (void)aInfo;
+    (void)aVer;
+    
+    // TCommConfigV01 structure defined in d32comm.h is used
+ 	// to hold the configuration details like baudrate, parity,
+ 	// databits etc for serial
+ 	//
+    TCommConfigV01 cfg;
+    // Configure the channel by default, (9600 baud rate)
+    cfg.iRate = EBps9600;
+    r = Configure(cfg);
+    if (r!=KErrNone)
+    	{
+    	// Configuration failed, still continue by updating device state
+    	iConfigured=EFalse;
+    	}
+    else
+    	{
+    	// Device configured successfully
+        iConfigured=ETrue;		    
+    	}
+    
+    // Physical channel creation is successful
+    return KErrNone;    
+    }
+    
+/**   
+ DfcQ - Creates a DFC queue dedicated for the tutorial driver. By default
+ logical channel derived from DLogicalChannel has a DFCQ, and DFC thread 0
+ is generally used. However, driver can choose o create it's own DFC and
+ use it for queuing it's messages to this queue. In this case, PDD can 
+ implement this function, DfcQ(), which is called by LDD to initialize it's
+ messgage queue with this DFC.
+ 
+ @return	refernce to the created TDynamicDfcQue object
+ */
+TDynamicDfcQue* DExUartPhysicalChannelEmul::DfcQ()    
+	{
+	// return the dfc thread created for this driver. one per uint/device
+	return ((DExEmulPhysicalDevice*)iLdd->iPhysicalDevice)->iDfcQueue;		
+	}
+
+/** 
+ Get the capabilities of the channel. This can be used by the user to get
+ the capabilities for the channel from PSL.
+ 
+ @param	aCaps
+ 		descriptor returned after filling with capabilities 
+ */ 
+void DExUartPhysicalChannelEmul:: Caps(TDes8& aCaps)
+	{
+	// Package buffer of TCommCapsV03. This creates a descriptor
+	// for the commcaps structure, and provide compatibility
+	// to use with API using descriptors
+	//
+	TCommCaps3 capsBuf;    
+	  
+	// Retrieves the data structure from the package buffer. TCommCapsV03
+	// holds the uart capabilities information.
+    //
+	TCommCapsV03 &caps=capsBuf();
+	
+	caps.iRate=KCapsBps9600;	// baudrate
+	caps.iDataBits=KCapsData8;	// data size
+	caps.iFifo=KCapsHasFifo;	// fifo enabled
+	caps.iBreakSupported=EFalse;// no braek support	
+
+	// [TDes8::MaxLength()] - Get the descriptor's length.
+	TInt len = aCaps.MaxLength();
+	
+	// [TDes8::FillZ(len)] -Fill the descriptor's data area with binary 
+	// zeroes, replacing any existing data and change its length. 
+	aCaps.FillZ(len);
+	
+    TInt size = sizeof(caps);
+    if (size>len)
+    	size=len;
+    
+    // [TDes8::Copy()] - Copy the data of length (size) into aDes descriptor
+    //  replacing any existing data in the descriptor.
+    aCaps.Copy((TUint8*)&caps, size);
+        	
+	aCaps=capsBuf.Left(Min(capsBuf.Length(),aCaps.MaxLength()));
+	}
+		
+/**
+ Configure the hardware device (Uart). This is device specific API, that 
+ provides functionality to configure the uart. Uart configuration settings are 
+ passed to this function by user. User calls this by using 
+ RBusLogicalChannel::DoControl() to LDD and ldd inturn calls this PDD function
+ to do the actual operation on the device.
+  
+ @param	aConfig
+ 		configuration settings for the device
+ 
+ @return	KErrNone or standard error code
+ */
+TInt DExUartPhysicalChannelEmul::Configure(const TCommConfigV01& aConfig)
+	{
+
+	// if channel is already configured to same baud rate, then no need to 
+	// repeat the configuration
+	//
+	if (iConfigured!=EFalse)
+	{
+		if(iBaudRate==aConfig.iRate)
+			return KErrNone;
+	}
+	
+	iBaudRate = aConfig.iRate;
+
+	// variables used with the com port
+	BOOL     bPortReady;
+	DCB      dcb;
+	COMMTIMEOUTS commTimeouts;
+
+	bPortReady = TRUE; // everything is OK so far
+	
+	// Open a serial port device using the CreateFile() function by specifying
+	// a filename that refers to the specific port, such as COM1 or COM2.
+	// 
+	// When you open a serial port, it is opened automatically for exclusive access,
+	// so you should pass a zero for the CreateFile()'s third parameter and OPEN_EXISTING
+	// for the open mode (fifth parameter). You can add a combination of the special file
+	// mode flags to indicate overlapped I/O or any special buffering requirements, as normal.
+	// 
+	// If the serial port opens successfully, a Win32 file object handle is returned.
+	// Otherwise, INVALID_HANDLE_VALUE is returned.
+	//
+	hCommPort=CreateFileA((LPCSTR)"\\\\.\\com1",GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,NULL);
+	
+	if (hCommPort==INVALID_HANDLE_VALUE)	
+	{	
+		Kern::Printf("Emulator::Configure: FAILED");
+		
+		bPortReady = FALSE;
+
+		DWORD winErr=GetLastError();
+		switch (winErr)
+		{
+			case ERROR_INVALID_USER_BUFFER:
+			case ERROR_NOT_ENOUGH_MEMORY:
+			case ERROR_INSUFFICIENT_BUFFER:
+				return(KErrNoMemory);
+			case ERROR_ACCESS_DENIED:
+				return(KErrAccessDenied);
+			case ERROR_FILE_NOT_FOUND:		//	Reflects value returned by
+				return(KErrNotSupported);	//	corresponding MARM Pdd  
+			case ERROR_NOT_SUPPORTED:
+				return(KErrNotSupported);
+			default:
+				return(KErrGeneral);
+		}
+	}
+	
+	if (bPortReady)
+	{
+		bPortReady = SetupComm(hCommPort, 256, 256); // set buffer sizes
+		if (!bPortReady)
+		{
+			return(KErrNoMemory);
+		}
+	}
+	
+    
+    // After you open a serial port, you must set the many flags required to configure
+    // the device. These flags are held in a device control block (DCB) structure.
+    // You can either fill in the entire DCB structure or use one of the helper functions
+    // to fill in some of the details. The GetCommState() function fills in a DCB structure
+    // with the current settings from the hardware, and you can use a corresponding
+    // SetCommState() function to specify the new settings from a DCB structure.
+	//
+	if (bPortReady)
+	{
+		bPortReady = GetCommState(hCommPort, &dcb);
+		if (!bPortReady)
+		{
+			return(KErrGeneral);
+		}
+	}
+	
+	if (bPortReady)
+	{
+		//baud rate
+		switch (aConfig.iRate)
+			{
+		case EBps9600:
+			dcb.BaudRate=9600;
+			break;
+		case EBps38400:
+			dcb.BaudRate=38400;
+			break;
+		case EBps115200:
+			dcb.BaudRate=115200;
+			break;
+		default:
+			dcb.BaudRate=9600;
+			break;
+			}
+			
+	   	//data bits
+	   	switch(aConfig.iDataBits)
+			{
+		case EData7:
+			dcb.ByteSize=7;
+			break;
+		case EData8:
+			dcb.ByteSize=8;
+			break;
+		default:
+			dcb.ByteSize=8;
+			break;
+			}
+
+		//stop bits
+		switch(aConfig.iStopBits)
+			{
+		case EStop1:
+			dcb.StopBits=ONESTOPBIT;
+			break;
+		case EStop2:
+			dcb.StopBits=TWOSTOPBITS;
+			break;
+		default:
+			dcb.StopBits = ONESTOPBIT;
+			break;	
+			}
+		
+		dcb.Parity = NOPARITY;
+
+		bPortReady = SetCommState(hCommPort, &dcb);
+		if (!bPortReady)
+		{
+			return(KErrGeneral);
+		}
+	}
+
+	if (bPortReady)
+	{		
+		// You can find the current timeout settings using the GetCommTimeout()
+		// function, which fills a passed COMMTIMEOUTS structure.	
+		//
+		bPortReady = GetCommTimeouts (hCommPort, &commTimeouts);
+		if (bPortReady)
+		{
+			// You can set ReadIntervalTimeout to MAXDWORD and set the
+			// ReadTotalTimeoutMultiplier and ReadTotalTimeoutConstant members
+			// to zero to indicate that the ReadFile() should return immediately.
+			//
+		    commTimeouts.ReadIntervalTimeout = MAXDWORD;
+		    commTimeouts.ReadTotalTimeoutConstant = 0;
+		    commTimeouts.ReadTotalTimeoutMultiplier = 0;
+		}
+		else
+		{
+			return(KErrGeneral);
+		}
+		if(!SetCommTimeouts(hCommPort, &commTimeouts))
+			return(KErrGeneral);
+		
+	}
+	return KErrNone;
+	}
+
+// After configuring the serial port, you can start transferring data via ReadFile()
+// and WriteFile() functions. However, you should remember that if you haven't specified
+// the FILE_FLAG_OVERLAPPED flag in the CreateFile() flags parameter,
+// ReadFile() will block waiting for input. This probably is good if your program spawns
+// another thread that specifically waits for incoming serial port characters, but not
+// if you want to issue a ReadFile() and periodically check to see whether any characters
+// have arrived.
+// 
+
+/**
+ Transmit data over uart for emulator targte, i.e serial port for pc
+ Transmit data buffer is filled and passed by user to the driver
+ 
+ @param	aData
+ 			buffer for transmit data
+ 
+ @return	KErrNone or standard error code
+ */
+TInt DExUartPhysicalChannelEmul::TransmitData(const TDesC8& aData)
+	{
+	TInt r;
+	TInt count;
+	TInt size;
+	TInt offset=0;
+		
+	// if the device is not configured, try to configure the device again
+	if (iConfigured==EFalse)
+		{
+		// Configure the channel by default
+    	TCommConfigV01 cfg;
+    	cfg.iRate = EBps9600; // 9600 baudrate
+    	r = Configure(cfg);
+    	if (r!=KErrNone)
+    		{
+    		// configure failed again, abort the request
+    		iConfigured=EFalse;
+    		return KErrAbort;
+    		}
+    	// configured successfully, continue with Tx	
+    	iConfigured=ETrue;	
+		}	
+	
+	// Size of the data to be transmitted is obtained from the descriptor. 
+	// TDesC8::Size() gets the size of the data interms of number of bytes occupied 
+	// by the data represented by the descriptor
+	//
+	count= aData.Size();
+	if (count<=0)
+		return KErrAbort;
+	
+	// Loop till all the data sent from LDD is transmitted in blocks of KTxFifoSize
+ 	while (count>0)
+ 		{
+ 		// Each block size can be max KTxFifoSize or less
+ 		size=(count<KTxFifoSize)?count:KTxFifoSize;
+		
+		BOOL bWriteRC;
+		DWORD iBytesWritten;
+
+		iBytesWritten = 0;
+		bWriteRC = WriteFile(hCommPort, aData.Ptr(), size, &iBytesWritten, NULL);
+
+		if (!bWriteRC || iBytesWritten == 0)
+			{
+			return(KErrGeneral);
+			}
+		
+ 		// calculate the offset
+		offset+=iBytesWritten;			
+		// calculate the remaining buffer size
+		count-=iBytesWritten;			
+		}
+		
+	return KErrNone;
+	}
+
+/**
+ Receive data over uart for emulator target, i.e uart of pc
+ Receive data buffer is filled and passed by driver to the user
+ 
+ @param	aData
+ 			buffer for received data
+ 
+ @return	KErrNone or standard error code
+ */
+TInt DExUartPhysicalChannelEmul::ReceiveData(TDes8& aData,TInt aLen)
+	{	
+	TInt ret;
+	TInt size;
+	TInt count;
+	TInt bytesRcvd=0;
+	
+	// Size of the data to be transmitted is obtained from the descriptor. 
+	// TDesC8::Size() gets the size of the data interms of number of bytes occupied 
+	// by the data represented by the descriptor
+	//
+	size= aLen;
+	if (size<=0)
+		return KErrAbort; // Zero length request, exit and fail
+	
+	// Keep track of the requested size
+	count=size;	
+
+ 	// Loop till the requested amount of data from LDD is filled or a timeout
+  	while (count>0)
+ 		{ 		
+ 		BOOL bReadRC;
+		char sBuffer[256];
+	
+		memset(sBuffer,0,sizeof(sBuffer));
+ 		// if no data and timer expired
+ 		while ((bReadRC=ReadFile(hCommPort, sBuffer, sizeof(sBuffer), &iBytesRead, NULL)) == 0
+ 				|| (iBytesRead==0)) 		
+ 			{
+ 			if (iTimerStatus==KTimerExpired)
+ 				{
+ 				aData.SetLength(bytesRcvd);
+ 				return KErrTimedOut;
+ 				}
+ 			}
+ 				 			
+ 		if (iTimerStatus==KTimerStarted)
+			{
+			// Cancel the Rx poll timer. NTimer.Cancel() Cancel a nanokernel 
+			// timer. Removes this timer from the nanokernel timer queue. 
+			// Does nothing if the timer is inactive or has already expired. 
+			// If the timer was queued and DFC callback requested it is possible 
+			// for the expiry handler to run even after Cancel() has been called.
+			//
+			iRxPollTimer.Cancel();
+			// Update status as Cancelled
+			iTimerStatus=KTimerCancelled;
+			}
+			
+		if (bReadRC && (iBytesRead>0))
+			{
+			if (iBytesRead>=static_cast<TUint>(size))			
+				iBytesRead=size;
+			aData.Append(TPtrC8((const TText8*)sBuffer,iBytesRead));		
+			bytesRcvd+=iBytesRead;
+			iBytesRead=0;
+			}
+		else
+			{
+			iTimerStatus = KTimerStarted;			 			
+			// Start a nanokernel timer in one-shot mode with ISR callback
+			// Queues the timer to expire in the specified number of nanokernel
+			// ticks. The actual wait time will be at least that much and 
+			// may be up to one tick more. The expiry handler will be called in
+			// ISR context.
+			//		 			
+    		ret=iRxPollTimer.OneShot(KRxPollTimeout); 			
+			if(ret!=KErrNone) // timer creation failed
+				return ret;
+			}	
+
+		// If we have received the requested number of bytes, return
+		if (bytesRcvd>=size)
+			{					
+			if (iTimerStatus == KTimerStarted)
+				iRxPollTimer.Cancel();			
+			return KErrNone;
+			}
+						
+		// remaining bytes to be received	
+		count -= bytesRcvd;		 		 		
+		}		
+
+	return KErrNone;
+	}
+
+void DExUartPhysicalChannelEmul::RxPollTimerCallback(TAny* aPtr)
+    {
+    KEXDEBUG(Kern::Printf("EMUL UART::Rx Timer Expired, Data Flow Stopped"));
+    ((DExUartPhysicalChannelEmul*)aPtr)->iTimerStatus=KTimerExpired;        
+    }
+	
+//
+// End of d_expio_emul.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/test/exdriver/exdriver_wins.inf	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,28 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Project file for tutorial reference drivers for emulator
+// 
+//
+
+PRJ_PLATFORMS
+WINS WINSCW
+
+// pdd project, listed under PRJ_TESTMMPFILES as we want to 
+// include it in test build, otherwise drivers are generally
+// listed under PRJ_MMPFILES
+//
+PRJ_TESTMMPFILES
+exdriver_pio/group/d_expio_pdd_emul		support
+//
+// End of bld.inf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/test/variant_test.mmh	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,18 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <../variant.mmh>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/variant.mmh	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#define MM_WIN32
+#define VariantTarget(name,ext) name##.##ext
+#define VariantMediaDefIncludePath SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(wins)
+macro __DEBUGGER_SUPPORT__
+macro BTRACE_KERNEL_ALL
+macro MONITOR_THREAD_CPU_TIME
+macro __EMI_SUPPORT__
+macro __PLATSEC_UNLOCKED__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/vwins.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,59 @@
+// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins/vwins.mmp
+// ecust.dll Hardware-specific variant-layer library
+// 
+//
+
+/**
+ @file
+*/
+
+
+#include "kernel/kern_ext.mmh"
+
+
+
+USERINCLUDE		inc
+
+asspexports
+target				ecust.dll
+targettype			var
+
+sourcepath			../../../kernelhwsrv/kernel/eka/drivers/power/binary
+source				bpower.cpp
+
+sourcepath			specific
+source				variant.cpp timer.cpp property.cpp
+
+library 			emulator.lib
+
+linkas				ecust.dll
+deffile				bwins/vwins.def
+
+start wins
+
+win32_library		kernel32.lib user32.lib winmm.lib
+#if defined(VC32)
+win32_library		msvcrt.lib
+#endif
+
+end
+
+epocallowdlldata
+
+uid					0x1000008d 0
+VENDORID 0x70000001
+
+capability			all
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/win_drive.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,51 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Test File Server extension for the emulator
+// 
+//
+
+/**
+ @file
+*/
+
+TARGET          win_drive.fxt
+TARGETTYPE      fsy
+
+
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+SOURCEPATH      win_drive
+SOURCE          generic_block_media.cpp win_drive_ext.cpp win_media_device.cpp
+SOURCE          settings_manager.cpp 
+
+LIBRARY         euser.lib efile.lib 
+
+
+start wins
+win32_library           kernel32.lib user32.lib
+//#if defined(VC32)
+//win32_library           msvcrt.lib
+//#endif
+end
+
+
+//#ifdef WINS
+//LIBRARY         emulator.lib
+//#endif
+
+
+
+UID             0x100039df 0x10000CEE
+VENDORID        0x70000001
+CAPABILITY      TCB ProtServ DiskAdmin AllFiles PowerMgmt CommDD
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/win_drive/common.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,139 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Some common definitions for this component
+// 
+//
+
+/**
+ @file
+*/
+
+#ifndef WIN_DRIVE_COMMON_H
+#define WIN_DRIVE_COMMON_H
+
+#include <e32debug.h>
+#include <f32fsys.h>
+
+//-----------------------------------------------------------------------------
+
+//-- define this macro in order to enable debug print.
+#define THIS_EXT_DEBUG_PRINT
+
+#if (defined(_DEBUG) || defined(_DEBUG_RELEASE)) && defined(THIS_EXT_DEBUG_PRINT)
+#define __PRINT(t)          {RDebug::Print(t);}
+#define __PRINT1(t,a)       {RDebug::Print(t,a);}
+#define __PRINT2(t,a,b)     {RDebug::Print(t,a,b);}
+#define __PRINT3(t,a,b,c)   {RDebug::Print(t,a,b,c);}
+#define __PRINT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
+#define __PRINTF(t)         {RDebug::Printf(t);}
+
+#else
+#define __PRINT(t)
+#define __PRINT1(t,a)
+#define __PRINT2(t,a,b)
+#define __PRINT3(t,a,b,c)
+#define __PRINTF(t)
+#define __PRINT4(t,a,b,c,d)
+#define __PRINTF(t)
+#endif
+
+//-- this logging is always enabled
+#define __LOG(t)          {RDebug::Print(t);}
+#define __LOG1(t,a)       {RDebug::Print(t,a);}
+#define __LOG2(t,a,b)     {RDebug::Print(t,a,b);}
+#define __LOG3(t,a,b,c)   {RDebug::Print(t,a,b,c);}
+#define __LOG4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
+#define __LOGF(t)         {RDebug::Printf(t);}
+
+
+//-----------------------------------------------------------------------------
+/**
+    Zero-fill structure.
+    @param apStruct     pointer to the data structure
+*/
+template<class T>
+inline void ZeroFillStruct(T* apStruct)
+{
+    Mem::FillZ(apStruct,sizeof(T));
+}
+
+/**
+    Zero-fill structure.
+    @param apStruct     a reference to the data structure
+*/
+template<class T>
+inline void ZeroFillStruct(T& aStruct)
+{
+    Mem::FillZ(&aStruct,sizeof(T));
+}
+
+/**
+    Zero-fill memory. Just for consistency
+    @param apStruct     pointer to the memory to be filled with zeroes
+    @param aBytes       buffer size
+*/
+inline void ZeroFillStruct(void* aStruct, TUint aBytes)
+{
+    Mem::FillZ(aStruct,aBytes);
+}
+
+//-----------------------------------------------------------------------------
+
+inline TBool IsPowerOf2(TUint32 aVal)
+{
+	if (aVal==0)
+		return EFalse;
+
+    return !(aVal & (aVal-1));
+}
+
+
+
+#endif //WIN_DRIVE_COMMON_H
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/win_drive/generic_block_media.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,325 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Implementaion of the media abstraction classs.
+// 
+//
+
+/**
+ @file
+*/
+
+#include "win_media.h"
+#include "win_media_device.h"
+
+
+//#########################################################################################################################
+//##        CMediaBase abstract base class implementation
+//#########################################################################################################################
+
+
+CMediaBase::CMediaBase(TInt aEpocDrvNumber)
+           :iEpocDrvNumber((TDriveNumber)aEpocDrvNumber), iReadOnly(0), ipDevice(NULL)
+{
+    ASSERT(iEpocDrvNumber >= EDriveA && iEpocDrvNumber <= EDriveZ);
+    ipSettingsManager = NULL;
+}
+
+CMediaBase::~CMediaBase()
+{
+    Disconnect();    
+    delete ipDevice;
+    delete ipSettingsManager;
+}
+
+/**
+    This method is called in order to disconnect from the media (on dismount)
+*/
+void CMediaBase::Disconnect()
+{
+    if(ipDevice)
+        ipDevice->Disconnect();
+}
+
+//-----------------------------------------------------------------------------
+/**
+    Get EPOC-style drive capabilities
+    @param aCaps - some fields of this structure will be filled with the information from the WinMediaDevice
+    @return standard EPOC code
+*/
+TInt CMediaBase::GetEpocCaps(TLocalDriveCaps& aCaps)
+{
+    //-- get real drive geometry from the windows device we are using and 
+    //-- override the native media driver's data
+    TDriveGeometry dg;
+    ipDevice->GetDriveGeometry(dg);
+    aCaps.iSize = dg.TotalSizeInBytes();
+
+    //-- here we can also override other information, like drive and media attributes etc..
+
+    //-- media type
+    TUint32 val = ipSettingsManager->TMediaType_Override();
+    if(val)
+        aCaps.iType = (TMediaType)val;
+         
+    //-- media attributes
+    TUint32 andMask, orMask;
+    ipSettingsManager->MediaAtt_OverrideMasks(andMask, orMask);
+    aCaps.iMediaAtt &= andMask;
+    aCaps.iMediaAtt |= orMask;
+
+    //-- drive attributes
+    ipSettingsManager->DriveAtt_OverrideMasks(andMask, orMask);
+    aCaps.iDriveAtt &= andMask;
+    aCaps.iDriveAtt |= orMask;
+
+    return KErrNone;
+}
+
+//#########################################################################################################################
+//##        CGenericBlockMedia class implementation
+//#########################################################################################################################
+
+
+
+CGenericBlockMedia::CGenericBlockMedia(TInt aEpocDrvNumber)
+                   :CMediaBase(aEpocDrvNumber)
+{
+}
+
+CGenericBlockMedia::~CGenericBlockMedia()
+{
+}
+
+//-----------------------------------------------------------------------------
+
+/**
+    Connect to the media, i.e. do mounting job. 
+    Read settings from the ini file, instantiate "windows device" class..
+*/    
+TInt CGenericBlockMedia::Connect()
+{
+    __LOG1(_L("#-- CGenericBlockMedia::Connect(), epocDrv:%d"), iEpocDrvNumber);
+
+    if(ipDevice)
+    {
+        ASSERT(0);
+        return KErrInUse;
+    }
+
+    //-- initialise an object to work with settings from ini file
+    if(!ipSettingsManager)
+    {
+        ipSettingsManager = TSettingsManager::Create(iEpocDrvNumber);
+        if(!ipSettingsManager)
+        {
+            __LOG(_L("#-- Can not create TSettingsManager!"));
+            return KErrGeneral;
+        }
+    }
+
+
+    //-- 1. obtain and process windows device name
+    char szDevName[KMaxFileName];
+    Settings().WinDeviceName(szDevName, sizeof(szDevName));
+    
+    if(strlen(szDevName) < 4)
+    {
+        __LOG(_L("#-- CGenericBlockMedia::Connect() Bad device name!"));
+        __LOGF(szDevName);
+        return KErrBadName;
+    }
+
+    //-- 1.1 find out if it is the physical volume or image file
+    TBool bImageFile = ETrue;
+    const char szDevPrefix[] = "\\\\.\\";
+    if( memcmp(szDevName, szDevPrefix, strlen(szDevPrefix)) == 0)
+    {//-- this is a physical device
+        bImageFile = EFalse;    
+    }
+
+    
+    //-- 2. instantinate an interface to the Windows media device
+    TInt nRes;
+
+    if(bImageFile)
+    {//-- device name corresponds to the image file
+        ipDevice = new CWinImgFileDevice;
+    }
+    else
+    {//-- device name corresponds to the physical volume file
+        ipDevice = new CWinVolumeDevice;
+    }
+    
+    ASSERT(ipDevice);
+
+
+    //-- 3. other parameters
+    iReadOnly = Settings().IsReadOnly();
+
+    //-- set and validate parameters
+    TMediaDeviceParams connectParams;
+    
+    const TUint32 bps = Settings().MediaSectorSize();
+    if(bps > 0) 
+    {//-- some value is provided in the ini file.
+        if(!IsPowerOf2(bps) ||  bps < KDefaultSectorSz || bps > 4096)
+        {
+        __LOG1(_L("#-- 'BytesPerSector' value is incorrect! :%d"), bps);
+        return KErrArgument;
+        }
+    }
+
+    connectParams.iDrvGeometry.iBytesPerSector = bps;
+    
+    //-- !!! chech size here!!
+    connectParams.iDrvGeometry.iSizeInSectors  = Settings().MediaSizeInSectors();
+    connectParams.ipDevName = szDevName;
+    connectParams.iReadOnly = iReadOnly;
+    
+    //-- connect to the device driver
+    nRes = ipDevice->Connect(connectParams);
+    
+
+    return nRes;
+    
+}
+
+//-----------------------------------------------------------------------------
+/**
+    Disconnect from the media, dismounting.
+*/
+void CGenericBlockMedia::Disconnect()
+{
+    __PRINT1(_L("#-- CGenericBlockMedia::Disconnect(), epocDrv:%d"), iEpocDrvNumber);
+    ASSERT(ipDevice);
+    CMediaBase::Disconnect();
+}
+
+//-----------------------------------------------------------------------------
+/**
+    Read from the media. See corresponding CWinDrvProxyDrive:: method
+*/
+TInt CGenericBlockMedia::Read(TInt64 aPos, TInt aLength, TDes8& aDataDes)
+{
+    //__PRINT3(_L("#-- CGenericBlockMedia::Read(), epocDrv:%d, pos:%LU, len:%u"), iEpocDrvNumber, aPos, aLength);
+    ASSERT(ipDevice);
+    return ipDevice->Read(aPos, aLength, aDataDes);
+}
+
+//-----------------------------------------------------------------------------
+
+/**
+    Write to the media. See corresponding CWinDrvProxyDrive:: method
+*/
+TInt CGenericBlockMedia::Write(TInt64 aPos,TInt aLength, const TDesC8& aDataDes)
+{
+    //__PRINT3(_L("#-- CGenericBlockMedia::Write(), epocDrv:%d, pos:%LU, len:%u"), iEpocDrvNumber, aPos, aLength);
+
+    ASSERT(ipDevice);
+
+    if(iReadOnly)
+        return KErrAccessDenied;
+
+    return ipDevice->Write(aPos, aLength, aDataDes);
+}
+
+
+//-----------------------------------------------------------------------------
+
+/**
+    Format the media. 
+    For "formatting" called CWinMediaDeviceBase::Erase(...) method that fills required media region with zeroes (see its implementation).
+    As soon as the number of erased sectors becomes >= max. number of sectors on this media, KErrEof is reurned indicationg the last
+    formatting step done.
+*/
+TInt CGenericBlockMedia::Format(TFormatInfo& anInfo)
+{
+    if(iReadOnly)
+        return KErrAccessDenied;
+
+    TInt nRes;
+
+    const TUint32 KMaxFmtSteps = 100; //-- max. number of formatting steps.
+
+    TDriveGeometry dg;
+    ipDevice->GetDriveGeometry(dg);
+    const TUint32 KFmtSectors = (dg.iSizeInSectors + (KMaxFmtSteps-1))/ KMaxFmtSteps; //-- how many sectors format during one step
+
+    if(anInfo.iFormatIsCurrent == 0)
+    {//-- this is a first entry, prepare format data
+        iSectorsFormatted = 0;
+        anInfo.iFormatIsCurrent = 1;
+    }
+    
+    //-- erase block of the media 
+    TUint32 sectorsToErase = KFmtSectors;
+    if(iSectorsFormatted+KFmtSectors > dg.iSizeInSectors)
+    {
+        sectorsToErase -= (iSectorsFormatted+KFmtSectors-dg.iSizeInSectors);
+    }
+
+    nRes = ipDevice->Erase(iSectorsFormatted*dg.iBytesPerSector, sectorsToErase*dg.iBytesPerSector, 0);
+    
+    if(nRes != KErrNone)
+    {
+        ASSERT(0);
+        return nRes;
+    }
+
+    iSectorsFormatted+=KFmtSectors;
+    anInfo.i512ByteSectorsFormatted = iSectorsFormatted;
+
+    if(iSectorsFormatted >= dg.iSizeInSectors)
+        return KErrEof; //-- formatted has finished
+
+    return KErrNone;
+
+}
+
+
+//-----------------------------------------------------------------------------
+
+/**
+    "format" the specified region on the media. See corresponding CWinDrvProxyDrive:: method.
+*/
+TInt CGenericBlockMedia::Format(TInt64 aPos, TInt aLength)
+{
+    TInt nRes = ipDevice->Erase(aPos, aLength, 0);
+    
+    return nRes; //-- shall it be KErrEof ?
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/win_drive/readme.txt	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,139 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+Description:
+-----------------------------------
+
+The "win_drive" file system extension for the emulator allows you to attach Windows device
+(that supports CreateFile/ReadFile/WriteFile operations) to the Symbian OS emulator as the emulated drive.
+For example, windows HDD partition, removable drive or a file can be treated by the emulator as "media" mapped
+on some emulator's drive letter.
+
+How it works:
+-----------------------------------
+
+This extension is installed as a primary one and hooks all emulators media driver's operations redirecting them to 
+appropriate windows file IO API.
+
+Why:
+-----------------------------------
+
+Existing Symbian OS windows emulator has a quite limited support for its drives:
+
+- emulator's drives suport can be implemented within media driver stacks (like mmc) which is not
+  very easy to configure properly. Moreover, using whole driver stacks is not always required and 
+  slows down emulator filesystems.
+
+- it is not always easy to attach filesystem image file to the emulator and it's impossible make it 
+  to use physical drive (USB drive for example)
+
+- emulated MMC drives can't be bigger than 1G or something, which doesn't make work with FAT32 easy.
+
+
+How to use:
+-----------------------------------
+1. make sure that the extension file "win_drive.fxt" is present in the emulator's "Z:\" drive directory:
+"\epoc32\release\wins\udeb\" or "\epoc32\release\winscw\udeb\" or "...\urel\", depending on what platform
+and release you are using.
+
+2. copy "win_drive.ini" configuration file to: "\epoc32\data\"
+3. edit this file to set up emulated drive size, location etc. See inside.
+
+4. Tell the emulator to install "win_drive.fxt" extension to the emulator's drive you are going to use.
+   to do this edit appropritae "estart.txt" file, which can be, for example, here: \epoc32\release\wins\udeb\z\sys\DATA\estart.txt
+   If there is no such a file, copy the default one from  "\emulator\wins\estart\estart.txt"
+
+   Example:
+
+    [....]
+    #X:  1   EFAT32 FAT  0          FS_FORMAT_CORRUPT #<--- previous commented out line
+    X:   1   EFAT32 FAT  win_drive  FS_FORMAT_CORRUPT #<--- drive "X:" now has "win_drive" primary extension
+    [....]
+
+5. run the emulator, its drive "X:" will be redirected to the device you have set up in the "win_drive.ini" file.
+
+
+
+Configuration examples:
+-----------------------------------
+
+1. Windows drive F: is a USB cardreader with the SD card you want to use as the emulator's "X:" FAT drive.
+Minimal settings in "win_drive.ini" for this case:
+
+=========================
+[Drive_X]
+DeviceName=\\.\F:
+BytesPerSector=0 ;or just comment it out
+MediaSizeInSectors=0 ;or just comment it out
+=========================
+
+2. You have a spare partition that has "Z:" windows drive letter and you want to use a part of it (to say 1G) as the emulator's "X:" FAT drive.
+Minimal settings in "win_drive.ini" for this case:
+
+=========================
+[Drive_X]
+DeviceName=\\.\Z:
+MediaSizeInSectors=2097152
+=========================
+
+
+3. You want to use 8G file as the emulator's "X:" FAT drive. The file doesn't exist.
+
+Minimal settings in "win_drive.ini" for this case:
+=========================
+[Drive_X]
+DeviceName=c:\MyDir\MyImageFile8G.img
+MediaSizeInSectors=16777216
+=========================
+
+
+4. You have a FAT volume image file and want to attach it as as the emulator's "X:" FAT drive. You also want to have it read-only.
+
+Minimal settings in "win_drive.ini" for this case: 
+=========================
+[Drive_X]
+DeviceName=c:\MyDir\MyImageFile.img
+MediaSizeInSectors=0 ;or just comment it out
+ReadOnly = 1;
+=========================
+
+
+Troubleshooting:
+-----------------------------------
+See "epocwind.out" file if something is going wrong. 
+
+
+
+Drawbacks:
+-----------------------------------
+
+- you can't use this extension if the emulator's drive alredy uses primary extension (see estart.txt).
+- some dodgy tests can fail, for example, those, that dismount the file system and forget to store and mount all its extensions
+  include primary.
+- Some methods from media driver are not overriden yet and just go directly to the original media driver; it can be confusing.
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/win_drive/settings_manager.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,319 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Implementation of the classes responsible for the settings handling in the .ini file
+// 
+//
+
+/**
+ @file
+*/
+
+#include "settings_manager.h"
+#include "win_media_device.h"
+
+//-----------------------------------------------------------------------------
+TSettingsManager::TSettingsManager(const char* apFileName, TInt aEpocDrvNumber)
+{
+    //-- store ini file name
+    ASSERT(lstrlenA(apFileName) < KMaxFileName);
+    lstrcpyA(iIniFileName, apFileName);
+
+    //-- make the drive section name e.g. [Drive_D]
+    ASSERT(aEpocDrvNumber >= EDriveA && aEpocDrvNumber <= EDriveZ);
+    wsprintfA(iDrvSectionName, "Drive_%C", 'A'+aEpocDrvNumber);
+}
+
+
+//-----------------------------------------------------------------------------
+/** 
+    Factory function
+*/
+TSettingsManager* TSettingsManager::Create(TInt aEpocDrvNumber)
+{
+    TSettingsManager* pThis = NULL;
+
+    const char* KDefaultEpocRootName = "EPOCROOT"; 
+
+    //-- try to find the configuration file. It must be: "\\epoc32\\data\\win_drive.ini"
+    char buf[KMaxFileName];
+
+    TInt nRes = GetEnvironmentVariableA(KDefaultEpocRootName, buf, sizeof(buf));
+    if(!nRes)
+    {
+     __LOG(_L("#-- TSettingsManager::Create() env. var. 'EPOCROOT' is not set!"));   
+     return NULL;
+    }
+
+    lstrcatA(buf, "epoc32\\data\\win_drive.ini");
+
+    //-- try to locate ini file
+    WIN32_FIND_DATAA wfd;
+    HANDLE hFile = FindFirstFileA(buf, &wfd);
+    const TBool bIniFilePresent = (hFile != INVALID_HANDLE_VALUE);
+    FindClose(hFile);
+
+    if(!bIniFilePresent)
+    {
+     __LOG(_L("#-- TSettingsManager::Create() ini file is not present, aborting!"));   
+     __LOGF(buf); 
+     return NULL;
+    }
+
+    pThis = new TSettingsManager(buf, aEpocDrvNumber);
+    
+    return pThis;
+}
+
+//-----------------------------------------------------------------------------
+/**
+    Read a string from the ini file.
+ 
+    @param  aAppName    pointer to the name of the section
+    @param  aKeyName    pointer to the name of the key
+    @param  aStrDefault pointer to the string with the default value
+    @param  aStrDest    pointer to the destination buffer
+    @param  aSize       size of the buffer, where the string to bee copied to.
+ 
+    @return length of the read string or length of the aStrDefault if the value hasn't been found
+*/
+DWORD TSettingsManager::ReadString (const char* aAppName, const char* aKeyName, const char* aStrDefault, char* aStrDest, DWORD aSize) const
+{
+    return GetPrivateProfileStringA(aAppName, aKeyName, aStrDefault, aStrDest, aSize, IniFileName());
+}
+
+
+/**
+    Read integer value from the ini file.
+ 
+    @param aAppName         pointer to the name of the section
+    @param aKeyName         pointer to the name of the key
+    @param aDefaultIntVal   default value, the result if section, key or value is not found
+ 
+    @return integer value from appropriate section and key, or aDefaultIntVal
+*/
+int TSettingsManager::ReadInt(const char* aAppName, const char* aKeyName, int aDefaultIntVal) const
+{
+    return GetPrivateProfileIntA(aAppName, aKeyName, aDefaultIntVal, IniFileName());
+}
+
+/**
+    Read a boolean value from the ini file.
+ 
+    @param aAppName        pointer to the name of the section
+    @param aKeyName        pointer to the name of the key
+    @param aDefaultBoolVal default value, the result if section, key of value is not found
+    @return     the boolean value or aDefaultBoolVal if section, key or value is not found
+*/
+TBool TSettingsManager::ReadBool(const char* aAppName, const char* aKeyName, int  aDefaultBoolVal) const
+{
+    return (ReadInt(aAppName, aKeyName, aDefaultBoolVal ? 1 : 0) != 0);
+}
+
+
+/**
+    read a hexadecimal value from the ini file.
+ 
+    @param aAppName pointer to the name of the section
+    @param aKeyName pointer to the name of the key
+    @param aVal     default value input, if there is a valid value in th eini file, it will be returned here
+    @return         ETrue if the valid value from ini file is read; EFalse otherwise.
+
+*/
+TBool TSettingsManager::ReadUintFromHex(const char* aAppName, const char* aKeyName, TUint32& aVal) const
+{
+    unsigned char buff[80];
+    
+    DWORD dwLen = ReadString(aAppName, aKeyName, "", (char*)buff, sizeof(buff));
+    if(!dwLen)
+        return EFalse;  //-- the value is not set
+        
+    //-- try to convert the string from hexadecimal representation to a number.
+    TLex8 lex(buff);
+    lex.SkipSpace();
+    
+    //-- skip '0x' prefix if it is present by chance
+    TPtrC8 rem = lex.Remainder();
+    TInt offset = rem.FindF(_L8("x"));
+    if(offset >= 0)
+        lex.Inc(offset+1);
+
+    TUint32 val32;
+    if(lex.Val(val32, EHex) == KErrNone)
+    {
+        aVal = val32;
+        return ETrue;
+    }        
+
+    return EFalse;
+}
+
+//-----------------------------------------------------------------------------
+/** 
+    Get media sector size in bytes. 
+    Usually it is 512 bytes, other values are not recommended.
+    
+    '0' means "auto", i.e. if the media allows, it will be queried for the sector size,
+    otherwise 512 bytes will be used.
+
+    @return media sector size in bytes. 
+*/
+TUint32 TSettingsManager::MediaSectorSize() const
+{
+    
+    const char KeyName[]="BytesPerSector";
+    const TInt KDefaultSPC = 0; //-- default value, means "use media settings or 512 bytes by default"
+    
+    return ReadInt(DriveSection(), KeyName, KDefaultSPC);
+}
+
+//-----------------------------------------------------------------------------
+/**
+    Get media size in sectors. See also MediaSectorSize().
+    '0' means "auto". i.e. size will be taken from windows media device (partition or image file)
+    
+    @return media size in sectors.  
+*/
+TUint32 TSettingsManager::MediaSizeInSectors() const
+{
+   
+    const char KeyName[]="MediaSizeInSectors";
+    const TInt KDefaultSzSec = 0; 
+
+    return ReadInt(DriveSection(), KeyName, KDefaultSzSec);
+}
+
+//-----------------------------------------------------------------------------
+/**
+    Get windows device name that will be used for media emulation.
+    like "\\\\.\\Z:" for a physical volume or "K:\\epoc32\\data\\media\\mmccrd0a.bin" for a image file.
+
+    @param  apszName pointer to the buffer, where the name will be copied to.
+    @param  aBufLen  length of the input buffer
+    @return ETrue on success
+*/
+TBool TSettingsManager::WinDeviceName(char* apszName, TUint aBufLen) const
+{
+    const char KeyName[]="DeviceName";
+    const char KDefaultValue[]="";
+
+    TInt nRes = ReadString(DriveSection(), KeyName, KDefaultValue, apszName, aBufLen);
+    
+    if(nRes == 0)
+    {
+    __LOG(_L("#-- TSettingsManager: 'DeviceName' key value isn't set !"));   
+    }
+
+    return ETrue;
+}
+
+
+//-----------------------------------------------------------------------------
+/**
+    @return ETrue if the device is Read-Only
+*/
+TBool TSettingsManager::IsReadOnly() const
+{
+    const char KeyName[]="ReadOnly";
+    const TBool KDefaultValue = EFalse; 
+
+    return ReadBool(DriveSection(), KeyName, KDefaultValue);
+}
+
+//-----------------------------------------------------------------------------
+/**
+    @return Media type override value from the ini file or 0 if it is not set there
+*/
+TUint32 TSettingsManager::TMediaType_Override() const
+{
+    const char KeyName[]="MediaTypeOverride";
+    const TInt KDefaultVal = 0; 
+
+    return ReadInt(DriveSection(), KeyName, KDefaultVal);
+}
+
+//-----------------------------------------------------------------------------
+
+/**
+    Get Media Attributes override "AND" and "OR" bitmasks. (the need to be in hex in the ini file).
+    
+    @param  aAndMask    On return contains "And" mask; default value == 0xFFFFFFFF
+    @param  aOrMask     On return contains "OR" mask;  default value == 0x00
+*/
+void TSettingsManager::MediaAtt_OverrideMasks(TUint32 &aAndMask, TUint32 &aOrMask) const
+{
+    TUint32 defVal;
+
+    //-- 1. read "AND" mask
+    defVal = KMaxTUint;
+    const char KeyName1[]="MediaAttOverride_AND";
+    TBool bRes = ReadUintFromHex(DriveSection(), KeyName1, defVal);
+    aAndMask = defVal;
+
+    //-- 2. read "OR" mask
+    const char KeyName2[]="MediaAttOverride_OR";
+    defVal = 0;
+    bRes = ReadUintFromHex(DriveSection(), KeyName2, defVal);
+    aOrMask = defVal;
+}
+
+//-----------------------------------------------------------------------------
+/**
+    Get Drive Attributes override "AND" and "OR" bitmasks. (the need to be in hex in the ini file).
+    
+    @param  aAndMask    On return contains "And" mask; default value == 0xFFFFFFFF
+    @param  aOrMask     On return contains "OR" mask;  default value == 0x00
+*/
+void TSettingsManager::DriveAtt_OverrideMasks(TUint32 &aAndMask, TUint32 &aOrMask) const
+{
+    TUint32 defVal;
+
+    //-- 1. read "AND" mask
+    defVal = KMaxTUint;
+    const char KeyName1[]="DriveAttOverride_AND";
+    TBool bRes = ReadUintFromHex(DriveSection(), KeyName1, defVal);
+    aAndMask = defVal;
+
+    //-- 2. read "OR" mask
+    const char KeyName2[]="DriveAttOverride_OR";
+    defVal = 0;
+    bRes = ReadUintFromHex(DriveSection(), KeyName2, defVal);
+    aOrMask = defVal;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/win_drive/settings_manager.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,93 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Definitions of the classes responsible for the settings handling in the .ini file
+// 
+//
+
+/**
+ @file
+*/
+
+#ifndef SETTINGS_MANAGER_H
+#define SETTINGS_MANAGER_H
+
+#include "common.h"
+
+#define WIN32_LEAN_AND_MEAN
+#pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union
+#include <windows.h>
+#pragma warning( default : 4201 ) // nonstandard extension used : nameless struct/union
+
+
+//-----------------------------------------------------------------------------
+
+/** This class is the interface to the various settings from ini file */
+class TSettingsManager
+{
+ public:
+    
+    static TSettingsManager* Create(TInt aEpocDrvNumber);
+
+    //-- API for the particular user of this class
+    TUint32 MediaSectorSize() const;
+    TUint32 MediaSizeInSectors() const;
+    TBool   WinDeviceName(char* apszName, TUint aBufLen) const;
+    TBool   IsReadOnly() const;
+
+    TUint32 TMediaType_Override() const;
+    void    MediaAtt_OverrideMasks(TUint32 &aAndMask, TUint32 &aOrMask) const;
+    void    DriveAtt_OverrideMasks(TUint32 &aAndMask, TUint32 &aOrMask) const;
+
+ protected:
+
+    TSettingsManager(const char* apFileName, TInt aEpocDrvNumber);
+
+    TSettingsManager();
+    TSettingsManager(const TSettingsManager&);
+    TSettingsManager& operator=(const TSettingsManager&);
+
+    //-- low-level API, for internal use only
+    DWORD   ReadString (const char* aAppName, const char* aKeyName, const char* aStrDefault, char* aStrDest, DWORD aSize) const;
+    int     ReadInt (const char* aAppName, const char* aKeyName, int aDefaultIntVal) const;
+    TBool   ReadBool(const char* aAppName, const char* aKeyName, int  aDefaultBoolVal) const;
+    TBool   ReadUintFromHex(const char* aAppName, const char* aKeyName, TUint32& aVal) const;
+
+    inline const char* IniFileName() const {return iIniFileName;}
+    inline const char* DriveSection() const {return iDrvSectionName;}
+
+
+ private:
+    
+    char iIniFileName[KMaxFileName];
+    char iDrvSectionName[20];
+
+};
+
+
+//-----------------------------------------------------------------------------
+
+#endif //SETTINGS_MANAGER_H
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/win_drive/win_drive.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,114 @@
+;==========================================================================
+;   This is the configuration file for the "win_drive.fxt" filesystem extension for the emulator.
+;   See \emulator\wins\win_drive.
+;
+;   This file shall reside in \epoc32\data\ directory.
+;
+;==========================================================================
+
+[Drive_T]
+
+
+[Drive_X]
+;--------------------------------------------------------------------------
+; The name of the Windows device that can be used by win_drive.fxt extension as the media.
+; The device can be "physical", for example HDD partition or removable drive or "image file", when 
+; the specifie file will be used as EPOC drive.
+
+; 1. "Physical" media:
+;   This key value shall look like: DeviceName=\\.\F:
+;   'F:' in this case is the Windows drive letter that will be used. This drive can be removable or 
+;   non-removable. 
+;   preferable settings:
+;     * BytesPerSector=0 or not defined, it is unlikely that Windows drives will use something different
+;                        from 512 bytes; '0' means "use windows volume partition information"
+;
+;     * MediaSizeInSectors=0 or not defined if you wish to use existing partition information for this windows volume.
+;       Or it can be the number of sectors, less than the real number of sectors on this windows drive; in this
+;       case only a part of the drive will be used. It can't be more than maximal number of sectors on the 
+;       specified windows drive - it's impossible to increase the partition size.
+;
+; 2."Image file" media
+;   This key value shall look like: DeviceName=\epoc32\data\media\my_image_file.bin
+;   preferable settings:
+;     * BytesPerSector=0 or not defined for 512 bps; 1024, 2048 and 4096 bps are also valid, 
+;       but if they are supported or not, depends on the appropriate .fsy for this epoc drive.
+;
+;     * MediaSizeInSectors=0 or not defined only for the case, when the image file already exists.
+;       In this case EPOC drive geometry will be calculated depending on the image file size and BytesPerSector value
+;       If 'MediaSizeInSectors' value is specified, the image file will be created/expanded/shunk to correspond
+;       to this size; its size in bytes will be MediaSizeInSectors*BytesPerSector
+;
+; Default value: there is no devault value, the device name must be correctly specified
+
+;DeviceName=\\.\F:
+;DeviceName=\\.\Z:
+DeviceName=\epoc32\data\media\MMCCRD0A1.BIN
+
+;--------------------------------------------------------------------------
+; bytes per sector. Valid values are: 0, 512, 1024, 2048, 4096.
+; '0' means 'Auto' if the media is a physical volume, its partition info will be used in this case,
+;   if the media is the image file, 512 bytes per sector will be used.
+; Actually, using anything rather than 512 is not recommended.
+;
+; Default value:0
+
+;BytesPerSector=0
+
+;--------------------------------------------------------------------------
+; This parameter specifies the EPOC media size in sectors. 
+;* Value '0' means "Auto". 
+;   In this case if the 'DeviceName' parameter specifies the windows physical volume,
+;   its partition information will be used. If the 'DeviceName' parameter specifies the image file, this file
+;   must exist and its total length will be used to calculate media size in sectors.
+;
+;* If the value of this key is > 0
+;    For physical media it can't be more than maximal number of the sectors on the windows volume;
+;    if less, only the beginning of the partition will be used.
+;    If "image file" media is used, this image file will be opened/created and its size set to MediaSizeInSectors*BytesPerSector
+;
+; Default value:0
+
+MediaSizeInSectors=40960
+
+
+;--------------------------------------------------------------------------
+; If this parameter !=0, this EPOC drive ([Drive_*]) will be visible as Read-Only  
+;
+; Default value:0
+;
+;ReadOnly = 1;
+
+;--------------------------------------------------------------------------
+; You can override media type (TMediaType) for this particular drive.
+;
+; Default value:0, which means that it won't be overriden by this extension and taken from the original media driver.
+;
+;MediaTypeOverride=3 ;EMediaHardDisk
+
+;--------------------------------------------------------------------------
+; You can override media attributes (TLocalDriveCaps::iMediaAtt) for this particular drive by specify 'AND' and 'OR'. 
+; masks that can be applied to the TLocalDriveCaps::iMediaAtt field returned by the original media driver.  
+; These values mut be in hex!
+;
+; Default value for "AND" mask :0xFFFFFFFF
+; Default value for "OR"  mask :0x0
+;MediaAttOverride_AND=0xFFFFFFFD ; will clear KMediaAttFormattable flag
+;MediaAttOverride_OR=0x010 ; will set KMediaAttLockable flag 
+
+
+
+;--------------------------------------------------------------------------
+; You can override drive attributes (TLocalDriveCaps::iDriveAtt) for this particular drive by specify 'AND' and 'OR'. 
+; masks that can be applied to the TLocalDriveCaps::iDriveAtt field returned by the original media driver.  
+; These values mut be in hex!
+;
+; Default value for "AND" mask :0xFFFFFFFF
+; Default value for "OR"  mask :0x0
+;DriveAttOverride_AND=
+;DriveAttOverride_OR=
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/win_drive/win_drive_ext.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,447 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Implementation of this File System extension
+// 
+//
+
+/**
+ @file
+*/
+
+
+#include "win_drive_ext.h"
+
+
+//#############################################################################
+//# Proxy drive implementation
+CWinDrvProxyDrive* CWinDrvProxyDrive::NewL(CProxyDrive* aProxyDrive, CMountCB* aMount)
+{
+    CWinDrvProxyDrive* pSelf = new(ELeave) CWinDrvProxyDrive(aProxyDrive, aMount);
+    return pSelf;
+}
+
+
+CWinDrvProxyDrive::CWinDrvProxyDrive(CProxyDrive* aProxyDrive, CMountCB* aMount)
+                  :CBaseExtProxyDrive(aProxyDrive, aMount)  
+{
+    ASSERT(aProxyDrive && aMount);
+
+    iMount = aMount;
+    iProxyDrive = aProxyDrive;
+}
+
+CWinDrvProxyDrive::~CWinDrvProxyDrive()
+{
+    Dismounted();
+}
+
+
+//-----------------------------------------------------------------------------
+
+/** 
+    Initialise the proxy drive (this extension)
+    @return standard epoc error code.
+*/
+TInt CWinDrvProxyDrive::Initialise()
+{
+    __PRINT(_L("#-- CWinDrvProxyDriveFactory::Initialise()"));
+
+    TInt nRes;
+    ASSERT(!ipMedia);
+
+    //-- create a scratch buffer
+    nRes = iScratchBuf.CreateMax(65536);
+    if(nRes != KErrNone)
+        return nRes;
+
+    //-- create media driver object, at present only generic block media supported
+    if(!ipMedia)
+    {
+        const TInt nEpocDrvNum = iMount->DriveNumber();
+        ipMedia = new CGenericBlockMedia(nEpocDrvNum);
+        if(!ipMedia)
+            return KErrNoMemory;
+    }
+
+    //-- connect to the media device
+    nRes = ipMedia->Connect();
+    
+    return  nRes;
+}
+
+
+/**
+    Dismount this extension.
+    @return standard epoc error code.
+*/
+TInt CWinDrvProxyDrive::Dismounted()
+{
+    __PRINT(_L("#-- CWinDrvProxyDriveFactory::Dismounted()"));
+    
+    //-- disconnect from the media driver and delete it
+    if(ipMedia)
+    {
+        ipMedia->Disconnect();
+        delete ipMedia;
+        ipMedia = NULL;
+    }
+
+    iScratchBuf.Close();
+
+    return KErrNone;
+}
+
+//-----------------------------------------------------------------------------
+TInt CWinDrvProxyDrive::GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput)
+{
+	switch(aInterfaceId)
+		{
+		case ELocalBufferSupport:
+			return KErrNone;
+
+		default:
+			return CBaseExtProxyDrive::GetInterface(aInterfaceId,aInterface,aInput);
+		}
+}
+
+//-----------------------------------------------------------------------------
+
+/**
+    Read data from the media.
+    @param  aPos    media position to start write with.
+    @param  aLength number of bytes to read
+    @param  destination data descriptor
+
+    @return standard epoc error code.
+*/
+TInt CWinDrvProxyDrive::Read(TInt64 aPos, TInt aLength, TDes8& aTrg)
+{
+    //__PRINT3(_L("#-- CWinDrvProxyDrive::Read()#0 pos:%LU, desLen:%d, desMaxLen:%d"),aPos, aTrg.Length(), aTrg.MaxLength());
+
+    if(aTrg.MaxLength() == 0)
+        return KErrNone; //-- nothing to do
+    
+    aTrg.SetLength(0);
+    TInt nRes = ipMedia->Read(aPos, aLength, aTrg);
+    return nRes;
+}
+
+
+//-- try to find a message slot containing the required address
+#define GetIndex(msg, aAddress, aIndex)			\
+	aIndex = msg.Ptr0() == aAddress ? 0 :				\
+				msg.Ptr1() == aAddress ? 1 :			\
+					msg.Ptr1() == aAddress ? 2 :		\
+						msg.Ptr1() == aAddress ? 3 : -1;
+
+
+
+/**
+    Read data from the media.
+    @param  aPos            media position to start write with.
+    @param  aLength         number of bytes to be written
+    @param  aTrg            pointer to the destination data descriptor
+    @param  aThreadHandle   can specify remote thread where the data will be copied to.
+    @param  aOffset         an offset within the data descriptor to the real data to be written (see aTrg).
+    
+    @return standard epoc error code.
+*/
+TInt CWinDrvProxyDrive::Read(TInt64 aPos, TInt aLength, const TAny* aTrg, TInt aThreadHandle, TInt aOffset)
+{
+    //__PRINT4(_L("#-- CWinDrvProxyDrive::Read()#1 pos:%LU, offset:%d, desLen:%d, desMaxLen:%d"),aPos, aOffset, desData.Length(), desData.MaxLength());
+    ASSERT(aTrg);
+
+    //-- N.B. aTrg is a pointer to the data descriptor TDes8 !
+    TDes8& orgDes = *((TDes8*)aTrg);
+
+    if(aLength == 0)
+        return KErrNone; //-- nothing to do
+
+
+    if(aOffset < 0 || aOffset+aLength > orgDes.MaxLength())
+        return KErrArgument; 
+
+    
+    //-- check if we have local or remote message from a different process
+    
+    TBool localMessage = (aThreadHandle == KLocalMessageHandle);
+	if(!localMessage)
+	{
+		RMessage2 msg(*(RMessagePtr2 *) &aThreadHandle);
+		localMessage = (msg.Handle() == KLocalMessageHandle);
+	}
+
+    if(localMessage)
+    {//-- we can just copy data to the descriptor; it is the same process
+        TPtr8  desData((TUint8*)(orgDes.Ptr()+aOffset), orgDes.Length()-aOffset);
+        return ipMedia->Read(aPos, aLength, desData);
+    }
+    else
+    {//-- we have to read data to the local buffer first and then write to another process 
+        TInt  msgSlotIdx = 0;
+        RMessage2 msg(*(RMessagePtr2 *) &aThreadHandle);
+
+		GetIndex(msg, aTrg, msgSlotIdx); //-- find out message slot index containing the desctiptor data
+		if (msgSlotIdx < 0)
+			return KErrArgument;
+   
+        TInt  rem = aLength;
+        TInt  localOffset = 0;
+        
+        while(rem)
+        {
+            const TInt bytesToRead = Min(rem, iScratchBuf.Size());
+            TPtr8 ptrBuf((TUint8*)iScratchBuf.Ptr(), bytesToRead);
+
+            //-- read chunk of data from the media to the local buffer
+            TInt nRes = ipMedia->Read(aPos + localOffset, bytesToRead, ptrBuf);
+            if(nRes != KErrNone)
+                return nRes; //-- media read error
+
+            //-- write data from the local buffer to another process
+            nRes = msg.Write(msgSlotIdx, ptrBuf, aOffset+localOffset);
+            if(nRes != KErrNone)
+                return nRes; 
+
+            rem -= bytesToRead;
+            localOffset += bytesToRead;
+        }
+    
+        return KErrNone;
+    }
+    
+    
+}
+
+/** the same as above */
+TInt CWinDrvProxyDrive::Read(TInt64 aPos,TInt aLength, const TAny* aTrg,TInt aThreadHandle, TInt aOffset,TInt /*aFlags*/)
+{
+    //__PRINT4(_L("#-- CWinDrvProxyDrive::Read()#2 pos:%LU, offset:%d, desLen:%d, desMaxLen:%d"),aPos, aOffset, desData.Length(), desData.MaxLength());
+    return Read(aPos, aLength, aTrg, aThreadHandle, aOffset);
+}
+
+
+//-----------------------------------------------------------------------------
+
+/**
+    Write data to the media.
+    @param  aPos    media position to start write with.
+    @param  aSrc    data descriptor
+
+    @return standard epoc error code.
+*/
+TInt CWinDrvProxyDrive::Write(TInt64 aPos, const TDesC8& aSrc)
+{
+    //__PRINT2(_L("#-- CWinDrvProxyDrive::Write()#0 pos:%LU, desLen:%d"),aPos, aSrc.Length());
+
+    if(aSrc.Length() == 0 )
+        return KErrNone; //-- nothing to do
+
+    TInt nRes = ipMedia->Write(aPos, aSrc.Size(), aSrc);
+
+    return nRes;
+}
+
+/**
+    Write data to the media.
+    @param  aPos            media position to start write with.
+    @param  aLength         number of bytes to be written
+    @param  aSrc            pointer to the data descriptor
+    @param  aThreadHandle   can specify remote thread where the data will be got from.
+    @param  aOffset         an offset within the data descriptor to the real data to be written (see aSrc).
+    
+    @return standard epoc error code.
+*/
+TInt CWinDrvProxyDrive::Write(TInt64 aPos, TInt aLength, const TAny* aSrc, TInt aThreadHandle, TInt aOffset)
+{
+    //__PRINT3(_L("#-- CWinDrvProxyDrive::Write()#1 pos:%LU, offset:%d, desLen:%d"),aPos, aOffset, orgDes.Length());
+    
+    ASSERT(aSrc);
+        
+    TDesC8& orgDes = *((TDesC8*)aSrc);
+
+    if(orgDes.Length() == 0 || aLength == 0)
+        return KErrNone; //-- nothing to do
+
+    if(aOffset < 0 || aOffset+aLength > orgDes.Length())
+        return KErrArgument; 
+    
+   
+    //-- check if we have local or remote message from a different process
+    
+    TBool localMessage = (aThreadHandle == KLocalMessageHandle);
+	if(!localMessage)
+	{
+		RMessage2 msg(*(RMessagePtr2 *) &aThreadHandle);
+		localMessage = (msg.Handle() == KLocalMessageHandle);
+	}
+
+    if(localMessage)
+    {//-- we can just copy data from the descriptor; it is the same process
+    TPtrC8  dataDes(orgDes.Ptr()+aOffset, orgDes.Length()-aOffset);
+    return ipMedia->Write(aPos, aLength, dataDes);
+}
+    else
+    {//-- we have to copy data to the local buffer first and then write to the media.
+        TInt  msgSlotIdx = 0;
+        
+        RMessage2 msg(*(RMessagePtr2 *) &aThreadHandle);
+		GetIndex(msg, aSrc, msgSlotIdx);
+
+		if (msgSlotIdx < 0)
+			return KErrArgument;
+
+        TInt  rem = aLength;
+        TInt  localOffset = 0;
+
+        while(rem)
+        {
+            const TInt bytesToWrite = Min(rem, iScratchBuf.Size());
+            
+            TInt nRes = msg.Read(msgSlotIdx, iScratchBuf, aOffset+localOffset);
+            if(nRes != KErrNone)
+                return nRes; 
+
+            nRes = ipMedia->Write(aPos+localOffset, bytesToWrite, iScratchBuf);
+            if(nRes != KErrNone)
+                return nRes; 
+
+
+            rem -= bytesToWrite;
+            localOffset += bytesToWrite;
+        }
+    
+        return KErrNone;
+    }
+   
+}
+
+
+
+/** the same as above */
+TInt CWinDrvProxyDrive::Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle, TInt aOffset,TInt /*aFlags*/)
+{
+    //__PRINT3(_L("#-- CWinDrvProxyDrive::Write()#2 pos:%LU, offset:%d, desLen:%d"),aPos, aOffset, orgDes.Length());
+    return Write(aPos, aLength, aSrc, aThreadHandle, aOffset);
+}
+
+
+//-----------------------------------------------------------------------------
+
+/** 
+    get drive capabilities 
+    @param anInfo packed descriptor of TLocalDriveCaps
+    @return standard Epoc error code
+*/
+TInt CWinDrvProxyDrive::Caps(TDes8& anInfo)
+{
+    TInt nRes;
+    
+    //-- get capabilities of the EPOC drive we are overriding
+    nRes = CBaseExtProxyDrive::Caps(anInfo);
+    if(nRes != KErrNone)
+        return nRes;
+
+    TLocalDriveCaps& orgCaps = ((TLocalDriveCapsBuf&)anInfo)();
+
+    //-- override capabilities with the data from our device.
+    ipMedia->GetEpocCaps(orgCaps);
+    
+    return KErrNone;
+}
+
+//-----------------------------------------------------------------------------
+
+/** 
+    Format whole media.
+    This method can be called many times, each call represents the formatting step.
+
+    @param  anInfo specifies the formatting parameters.    
+    @return KErrNone if the formatting step has  gone OK.
+            KErrEof  if the formatting has finished
+            standard epoc error code otherwise.
+
+*/
+TInt CWinDrvProxyDrive::Format(TFormatInfo& anInfo)
+{
+    return ipMedia->Format(anInfo);
+}
+
+/** 
+    format part of the media 
+    @param  aPos    starting media position
+    @param  aLength length of the media space to be formatted.
+
+    @return standard epoc error code
+*/
+TInt CWinDrvProxyDrive::Format(TInt64 aPos, TInt aLength)
+{
+    return ipMedia->Format(aPos, aLength);
+}
+
+
+//-----------------------------------------------------------------------------
+
+
+//#############################################################################
+//# Extension factory implementation
+
+CWinDrvProxyDriveFactory::CWinDrvProxyDriveFactory()
+{
+}
+
+TInt CWinDrvProxyDriveFactory::Install()
+{
+    _LIT(KExtensionName,"Win_Drive"); //-- this extensoin name.
+
+    __PRINT(_L("#-- CWinDrvProxyDriveFactory::Install()"));
+    return(SetName(&KExtensionName));
+}
+
+CProxyDrive* CWinDrvProxyDriveFactory::NewProxyDriveL(CProxyDrive* aProxy, CMountCB* aMount)
+{
+    __PRINT(_L("#-- CWinDrvProxyDriveFactory::NewProxyDriveL()"));
+    return (CWinDrvProxyDrive::NewL(aProxy, aMount));
+}
+
+
+/** DLL entrypoint */
+extern "C" 
+{
+    EXPORT_C CProxyDriveFactory* CreateFileSystem()
+    {
+        __PRINT(_L("#-- Win_Drive extension CreateFileSystem()"));
+        return new CWinDrvProxyDriveFactory();
+    }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/win_drive/win_drive_ext.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,147 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Definitions for this file system extension
+// 
+//
+
+/**
+ @file
+*/
+
+#ifndef WIN_DRIVE_EXTENSION_H
+#define WIN_DRIVE_EXTENSION_H
+
+#include "win_media.h"
+
+//-----------------------------------------------------------------------------
+
+/**
+    This class represents the File System extension (.fxt module) that intercepts media driver operations and
+    deals with them on windows filesystem level.
+*/
+class CWinDrvProxyDrive : public CBaseExtProxyDrive
+{
+public:
+    static CWinDrvProxyDrive* NewL(CProxyDrive* aProxyDrive, CMountCB* aMount);
+
+protected:
+    CWinDrvProxyDrive(CProxyDrive* aProxyDrive, CMountCB* aMount);
+    virtual ~CWinDrvProxyDrive();
+
+	//-- overrides from the base class
+    
+    virtual TInt Initialise();
+	virtual TInt Dismounted();
+
+	virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt aOffset,TInt aFlags);
+	virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt aOffset);
+	virtual TInt Read(TInt64 aPos,TInt aLength,TDes8& aTrg);
+	
+	virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt aOffset,TInt aFlags);
+	virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt aOffset);
+	virtual TInt Write(TInt64 aPos,const TDesC8& aSrc);
+
+    virtual TInt Caps(TDes8& anInfo);
+
+    virtual TInt Format(TFormatInfo& anInfo);
+    virtual TInt Format(TInt64 aPos,TInt aLength);
+
+    /* -------- virtual base class API --------------
+    virtual TInt Enlarge(TInt aLength);
+	virtual TInt ReduceSize(TInt aPos, TInt aLength);
+	
+    # virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt aOffset,TInt aFlags);
+	# virtual TInt Read(TInt64 aPos,TInt aLength,const TAny* aTrg,TInt aThreadHandle,TInt anOffset);
+	# virtual TInt Read(TInt64 aPos,TInt aLength,TDes8& aTrg);
+
+	# virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt aOffset,TInt aFlags);
+	# virtual TInt Write(TInt64 aPos,TInt aLength,const TAny* aSrc,TInt aThreadHandle,TInt anOffset);
+	# virtual TInt Write(TInt64 aPos,const TDesC8& aSrc);
+	
+    # virtual TInt Caps(TDes8& anInfo);
+	#virtual TInt Format(TFormatInfo& anInfo);
+	#virtual TInt Format(TInt64 aPos,TInt aLength);
+	virtual TInt SetMountInfo(const TDesC8* aMountInfo,TInt aMountInfoThreadHandle=KCurrentThreadHandle);
+	virtual TInt ForceRemount(TUint aFlags=0);
+	virtual TInt Unlock(TMediaPassword &aPassword, TBool aStorePassword);
+	virtual TInt Lock(TMediaPassword &aOldPassword, TMediaPassword &aNewPassword, TBool aStorePassword);
+	virtual TInt Clear(TMediaPassword &aPassword);
+	virtual TInt ControlIO(const RMessagePtr2& aMessage,TInt aCommand,TAny* aParam1,TAny* aParam2);
+	virtual TInt ErasePassword();
+	virtual TInt GetLastErrorInfo(TDes8& aErrorInfo);
+    virtual TInt DeleteNotify(TInt64 aPos, TInt aLength);
+    */
+protected:
+	virtual TInt GetInterface(TInt aInterfaceId,TAny*& aInterface,TAny* aInput);	
+
+
+protected:
+    CMountCB*    iMount;        ///< pointer to the owning mount
+    CProxyDrive* iProxyDrive;   ///< pointer to the chain of the proxies to the native media driver
+    CMediaBase*  ipMedia;       ///< pointer to the base "media" object that implements this extension't IO operations
+
+    RBuf8        iScratchBuf;   ///< scratch buffer for non-local read/write operations
+};
+
+//-----------------------------------------------------------------------------
+
+/**
+    This Proxy drive factory class
+*/
+class CWinDrvProxyDriveFactory : public CProxyDriveFactory
+{
+ public:
+    CWinDrvProxyDriveFactory();
+    virtual TInt Install();         
+    virtual CProxyDrive* NewProxyDriveL(CProxyDrive* aProxy,CMountCB* aMount);
+};
+
+
+#endif //WIN_DRIVE_EXTENSION_H
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/win_drive/win_media.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,124 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Definitions of the media abstractions. 
+// 
+//
+
+/**
+ @file
+*/
+
+#ifndef WIN_MEDIA_H
+#define WIN_MEDIA_H
+
+#include "common.h"
+#include "settings_manager.h"
+
+class CWinMediaDeviceBase;
+
+//-----------------------------------------------------------------------------
+
+/** 
+    Media abstraction base class.
+    Can be specialised to emulate different types of media (e.g. NAND, NOR FLASH),
+    access delays and other features.
+
+    This class talks to the real windows media object via CWinMediaDeviceBase interface.
+    Actually, it's a shim between EPOC's CBaseExtProxyDrive and Windows device (file or volume).
+*/
+class CMediaBase
+{
+  public:    
+    CMediaBase(TInt aEpocDrvNumber);
+    virtual ~CMediaBase();
+
+    //-- interface to the owner
+    virtual TInt Connect() =0;
+    virtual void Disconnect(); 
+
+    virtual TInt Read(TInt64 aPos,TInt aLength, TDes8& aDataDes)=0;
+    virtual TInt Write(TInt64 aPos,TInt aLength, const TDesC8& aDataDes)=0;
+    virtual TInt GetEpocCaps(TLocalDriveCaps& aCaps);
+    
+    virtual TInt Format(TFormatInfo& anInfo) = 0;
+    virtual TInt Format(TInt64 aPos,TInt aLength) = 0;
+    //--
+
+  protected:
+    CMediaBase();
+    CMediaBase(const CMediaBase&);
+    CMediaBase& operator=(const CMediaBase&);
+
+    inline TBool IsReadOnly() const {return iReadOnly;}
+    inline TSettingsManager& Settings() const {ASSERT(ipSettingsManager); return *ipSettingsManager;}
+
+  protected:
+
+    TBool                iReadOnly:1;       ///< if not 0, the media is read-only.
+    TDriveNumber         iEpocDrvNumber;    ///< EPOC drive number, specifies the drive a:..z:
+    CWinMediaDeviceBase* ipDevice;          ///< pointer to the interface to the real Windows device
+    TSettingsManager*    ipSettingsManager; ///< interface to the settings in 'ini' file
+};
+
+
+//-----------------------------------------------------------------------------
+
+
+/**
+    Generic block media. 
+    This is the simple media that consists of the blocks or sectors. 
+    Nothing special about reading/writing data onto it: what you write is what you read.
+    No addidtional seek/read/write delays emulation.
+
+*/
+class CGenericBlockMedia: public CMediaBase
+{
+  public:    
+    CGenericBlockMedia(TInt aEpocDrvNumber);
+   ~CGenericBlockMedia();
+
+
+    //-- overrides from the base class
+    virtual TInt Connect();
+    virtual void Disconnect();
+
+    virtual TInt Read(TInt64 aPos,TInt aLength, TDes8& aDataDes);
+    virtual TInt Write(TInt64 aPos, TInt aLength, const TDesC8& aDataDes);
+
+    virtual TInt Format(TFormatInfo& anInfo);
+    virtual TInt Format(TInt64 aPos,TInt aLength);
+
+  private:
+    TUint32 iSectorsFormatted; ///< used for media formatting
+};
+
+
+
+
+
+
+#endif //WIN_MEDIA_H
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/win_drive/win_media_device.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1104 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Implementation of the classes that work directly with the windows devices - files, drives etc.
+// 
+//
+
+/**
+ @file
+*/
+
+#include "win_media_device.h"
+
+#ifndef INVALID_SET_FILE_POINTER
+#define INVALID_SET_FILE_POINTER 0xFFFFFFFF
+#endif
+
+
+const TInt KDiskOpError = 0x134AFF78; ///< internal Disk operation error ID.
+
+
+static TBool CheckBufFill(const TPtrC8& aBufPtr, TUint8 aFill);
+
+//#########################################################################################################################
+//##        CWinMediaDeviceBase abstract base class implementation
+//#########################################################################################################################
+
+//-----------------------------------------------------------------------------
+
+CWinMediaDeviceBase::CWinMediaDeviceBase()
+{
+    iDevHandle = NULL;
+    ipScratchBuf = NULL;
+}
+
+CWinMediaDeviceBase::~CWinMediaDeviceBase()
+{
+    Disconnect();
+}
+
+
+/**
+    Disconnect from the media device
+*/
+void CWinMediaDeviceBase::Disconnect()
+{
+    FlushFileBuffers(iDevHandle);
+    CloseHandle(iDevHandle);
+    iDevHandle = NULL;
+    
+}
+
+//-----------------------------------------------------------------------------
+
+/**
+    "Erase" a region of the media. Effectively just fills the selected region with the specified pattern.
+    
+    @param  aPos     media position start 
+    @param  aLength  length of the media region to fill
+    @param  aFill    filler byte.
+
+    @return EPOC error code.
+
+*/
+TInt CWinMediaDeviceBase::Erase(TInt64 aPos, TUint32 aLength, TUint8 aFill)
+{
+    //-- this method is called to "format" media.
+    //-- Because Windows is absolute sux on everythins that concerns formattin the media (IOCTL_DISK_FORMAT_TRACKS seems to be applicable only 
+    //-- to floppy disks) we have to perform formatting by just filling media region with a given byte.
+    //-- This can be very slow for flash - based removable media (e.g. usb flash drives) so, there is a possibility to check 
+    //-- if the given media region is already filled with the pattern and write only if not. See bCheckReadBeforeErase switch.
+    
+    Mem::Fill(ipScratchBuf, KScratchBufSz, aFill);
+    
+    TUint32 rem = aLength;
+    TInt nRes = KErrNone;
+
+    //-- if True, we firstly will read media region and check if it is already filled with the given byte. 
+    //-- this is useful for slow - write media or sparse files on NTFS.
+    //TBool bCheckReadBeforeErase = EFalse; 
+    TBool bCheckReadBeforeErase = ETrue; 
+    
+    while(rem)
+    {
+        const TUint32 bytesToWrite = Min(KScratchBufSz, rem);
+        TPtr8 ptrData(ipScratchBuf, bytesToWrite, bytesToWrite);
+
+        if(bCheckReadBeforeErase)
+        {//-- try to read data first and check if we need to write anything
+            ptrData.SetLength(0);
+            nRes = Read(aPos, bytesToWrite, ptrData);
+            if(nRes != KErrNone)
+                break;
+
+            if(!CheckBufFill(ptrData, aFill))
+            {
+                Mem::Fill(ipScratchBuf, KScratchBufSz, aFill);
+
+                nRes = Write(aPos, bytesToWrite, ptrData);
+                if(nRes != KErrNone)
+                    break;
+            
+            }
+        }
+        else
+        {//-- no need to read first
+            nRes = Write(aPos, bytesToWrite, ptrData);
+            if(nRes != KErrNone)
+                break;
+            
+        }
+        
+
+        rem-=bytesToWrite;
+        aPos+=bytesToWrite;
+           
+    }
+
+    
+    return nRes;
+}
+
+
+//#########################################################################################################################
+//##        CWinVolumeDevice  class implementation
+//#########################################################################################################################
+
+
+CWinVolumeDevice::CWinVolumeDevice()
+                 :CWinMediaDeviceBase()
+{
+    //-- create scratch buffer
+    ipScratchBuf = ::new TUint8[KScratchBufSz];
+    ASSERT(ipScratchBuf);
+}
+
+CWinVolumeDevice::~CWinVolumeDevice()
+{
+    delete ipScratchBuf;
+}
+
+//-----------------------------------------------------------------------------
+
+/**
+    Open the device and do some initalisation work.
+    
+    @param  aParams device parameters
+    @return Epoc error code, KErrNone if everything is OK
+*/
+TInt CWinVolumeDevice::Connect(const TMediaDeviceParams& aParams)
+{
+    
+    __PRINT(_L("#-- CWinVolumeDevice::Connect()"));    
+    
+    if(!aParams.ipDevName)
+    {
+        __LOG(_L("#-- CWinVolumeDevice::Connect() device name is not set!"));    
+        return KErrBadName;
+    }
+
+    __PRINTF(aParams.ipDevName);
+    
+    ASSERT(!HandleValid() && ipScratchBuf);
+
+    //-- open the device
+    DWORD dwAccess = GENERIC_READ;
+    
+    if(!aParams.iReadOnly)
+        dwAccess |= GENERIC_WRITE;  
+    
+    iDevHandle = CreateFileA(aParams.ipDevName,
+                             dwAccess, 
+                             FILE_SHARE_READ,
+                             (LPSECURITY_ATTRIBUTES)NULL,
+                             OPEN_EXISTING,
+                             FILE_ATTRIBUTE_NORMAL,
+                             NULL);
+
+    if(!HandleValid())
+    {
+        __LOG1(_L("#-- CWinVolumeDevice::Connect() Error creating device handle! WinErr:%d"), GetLastError());
+        return KErrGeneral;
+    }     
+    
+    //-- find out device geometry
+    iMediaType = Unknown;
+    iDrvGeometry.iBytesPerSector = KDefaultSectorSz;
+
+    DWORD junk; 
+
+    //-- 1. try to query disk geometry, but it can produce wrong results for partitioned media
+    BOOL bResult = DeviceIoControl(Handle(),
+                                   IOCTL_DISK_GET_DRIVE_GEOMETRY,
+                                   NULL, 0,
+                                   ipScratchBuf, KScratchBufSz,
+                                   &junk, (LPOVERLAPPED)NULL);
+
+    if(bResult)
+    {
+        const DISK_GEOMETRY& dg = (const DISK_GEOMETRY&)*ipScratchBuf;
+        
+        iDrvGeometry.iBytesPerSector = dg.BytesPerSector;
+        iMediaType = dg.MediaType;
+
+        __PRINT3(_L("#-- dev geometry: Cyl:%d Heads:%d Sectors:%d"), dg.Cylinders.LowPart, dg.TracksPerCylinder, dg.SectorsPerTrack);    
+        __PRINT2(_L("#-- dev geometry: MediaType:%d, bps:%d"), dg.MediaType, dg.BytesPerSector);    
+
+    }
+    else
+    {
+        iMediaType = Unknown;
+        iDrvGeometry.iBytesPerSector = KDefaultSectorSz;
+
+        __LOG1(_L("#-- CWinVolumeDevice::Connect() IOCTL_DISK_GET_DRIVE_GEOMETRY WinError:%d !"), GetLastError());
+    }
+
+    //-- 1.1 check "bytes per sector" value and how it corresponds to the request from parameters
+    if(aParams.iDrvGeometry.iBytesPerSector == 0)
+    {//-- do nothing, this parameter is not set in config file, use media's
+    } 
+    else if(aParams.iDrvGeometry.iBytesPerSector != iDrvGeometry.iBytesPerSector)
+    {//-- we can't set "SectorSize" value for the physical media
+        __LOG1(_L("#-- CWinVolumeDevice::Connect() can not use 'Sec. Size' value from config:%d !"), aParams.iDrvGeometry.iBytesPerSector);
+        Disconnect();
+        return KErrArgument;
+    }
+
+
+    ASSERT(IsPowerOf2(BytesPerSector()) && BytesPerSector() >= KDefaultSectorSz && BytesPerSector() < 4096);
+
+    //-- find out partition information in order to determine volume size. 
+    bResult = DeviceIoControl(Handle(),
+                              IOCTL_DISK_GET_PARTITION_INFO,
+                              NULL, 0,
+                              ipScratchBuf, KScratchBufSz,
+                              &junk, (LPOVERLAPPED)NULL);
+
+    if(!bResult)
+    {//-- this is a fatal error
+        __LOG1(_L("#-- CWinVolumeDevice::Connect() IOCTL_DISK_GET_PARTITION_INFO WinError:%d !"), GetLastError());
+        Disconnect();
+        return KErrBadHandle;    
+    }
+
+    //-- get partition informaton
+    const PARTITION_INFORMATION& pi = (const PARTITION_INFORMATION&)*ipScratchBuf;
+    TInt64 volSz = MAKE_TINT64(pi.PartitionLength.HighPart, pi.PartitionLength.LowPart);
+    iDrvGeometry.iSizeInSectors = (TUint32)(volSz / iDrvGeometry.iBytesPerSector);
+            
+    __LOG3(_L("#-- partition size, bytes:%LU (%uMB), sectors:%u"), volSz, (TUint32)(volSz>>20), iDrvGeometry.iSizeInSectors);
+   
+    //-- check if the media size is set in coonfig and if we can use this setting.
+    if(aParams.iDrvGeometry.iSizeInSectors == 0)
+    {//-- do nothing, the media size is not set in the ini file, use existing media parameters
+    }
+    else if(aParams.iDrvGeometry.iSizeInSectors > iDrvGeometry.iSizeInSectors)
+    {//-- requested media size in ini file is bigger than physical media, error.
+     //-- we can't increase physical media size
+    __LOG2(_L("#-- CWinVolumeDevice::Connect() 'MediaSizeSectors' value from config:%d > than physical:%d !"), aParams.iDrvGeometry.iSizeInSectors, iDrvGeometry.iSizeInSectors);
+    Disconnect();
+    return KErrArgument;
+    }
+    else if(aParams.iDrvGeometry.iSizeInSectors < iDrvGeometry.iSizeInSectors)
+    {//-- settings specify smaller media than physical one, adjust the size
+    __PRINT1(_L("#-- reducing media size to %d sectors"), aParams.iDrvGeometry.iSizeInSectors);
+    iDrvGeometry.iSizeInSectors = aParams.iDrvGeometry.iSizeInSectors;
+    }
+
+
+    ASSERT(iDrvGeometry.iSizeInSectors > KMinMediaSizeInSectors);
+    return KErrNone;
+}
+
+//-----------------------------------------------------------------------------
+
+/**
+    Read a portion of data from the device. 
+    Note: at present it _APPENDS_ data to the aDataDes, so the caller must take care of setting its length
+
+    @param  aPos     media position in bytes
+    @param  aLength  how many bytes to read
+    @param  aDataDes data descriptor
+
+    @return KErrNone on success, standard Epoc error code otherwise
+
+*/
+TInt CWinVolumeDevice::Read(TInt64 aPos, TInt aLength, TDes8& aDataDes)
+{
+    //__PRINT2(_L("#-- CWinVolumeDevice::Read, pos:%LU, len:%u"), aPos, aLength);
+ 
+    ASSERT(HandleValid());
+    ASSERT(aLength <= aDataDes.MaxLength());
+
+    //-- check position on the volume
+    const TInt64 maxPos = iDrvGeometry.TotalSizeInBytes();
+    if(aPos < 0 || aPos > maxPos)
+        return KErrArgument;
+
+    const TInt64 lastPos = aPos+aLength;
+
+    if(lastPos > maxPos)
+        return KErrArgument;
+    //--
+
+
+    TUint32 dataLen = aLength;
+
+    if(dataLen == 0)
+        return KErrNone;
+
+    DWORD dwRes;
+    DWORD dwBytesRead = 0;
+
+    //aDataDes.SetLength(0);
+
+    const TUint32 KSectorSize = BytesPerSector();
+    
+    try
+    {
+        LONG    mediaPosHi = I64HIGH(aPos);
+        const TUint32 mediaPosLo = I64LOW(aPos);
+        const TUint32 startPosOffset = mediaPosLo & (KSectorSize-1);
+        
+        //-- 1. position to the media with sector size granularity and read 1st sector
+        dwRes = SetFilePointer(iDevHandle, mediaPosLo-startPosOffset, &mediaPosHi, FILE_BEGIN);
+        if(dwRes == INVALID_SET_FILE_POINTER)
+            throw KDiskOpError;
+
+        //-- 1.1 read 1st sector
+        if(!ReadFile(iDevHandle, ipScratchBuf, KSectorSize, &dwBytesRead, NULL))
+            throw KDiskOpError;
+        
+        const TUint32 firstChunkLen = Min(dataLen, KSectorSize - startPosOffset);
+        aDataDes.Append(ipScratchBuf+startPosOffset, firstChunkLen);
+        dataLen-=firstChunkLen;
+
+        if(dataLen == 0)
+            return KErrNone; //-- no more data to read
+    
+        //-- 2. read whole number of sectors from the meida
+        const TUint32 KBytesTail = dataLen & (KSectorSize-1); //-- number of bytes in the incomplete last sector
+    
+        ASSERT((KScratchBufSz % KSectorSize) == 0);
+
+        TUint32 rem = dataLen - KBytesTail;
+        while(rem)
+        {
+            const TUint32 bytesToRead = Min(KScratchBufSz, rem);
+    
+            if(!ReadFile(iDevHandle, ipScratchBuf, bytesToRead, &dwBytesRead, NULL))
+                throw KDiskOpError;        
+ 
+            aDataDes.Append(ipScratchBuf, bytesToRead);
+            rem-=bytesToRead;
+        }
+
+        //-- 3. read the rest of the bytes in the incomplete last sector
+        if(KBytesTail)
+        {
+            if(!ReadFile(iDevHandle, ipScratchBuf, KSectorSize, &dwBytesRead, NULL))
+                throw KDiskOpError;    
+
+            aDataDes.Append(ipScratchBuf, KBytesTail);
+        }
+
+    }//try
+    catch(TInt nErrId)
+    {//-- some disk operation finished with the error
+        (void)nErrId;
+        ASSERT(nErrId == KDiskOpError);
+        const DWORD dwWinErr = GetLastError();
+        const TInt  epocErr = MapWinError(dwWinErr);
+        
+        __PRINT2(_L("#-- CWinVolumeDevice::Read() error! WinErr:%d, EpocErr:%d"), dwWinErr, epocErr);
+        ASSERT(epocErr != KErrNone);
+
+        return epocErr;
+    }
+
+    return KErrNone;
+}
+
+//-----------------------------------------------------------------------------
+/**
+    Write some data to the device.
+
+    @param  aPos     media position in bytes
+    @param  aLength  how many bytes to read
+    @param  aDataDes data descriptor
+
+    @return KErrNone on success, standard Epoc error code otherwise
+*/
+TInt CWinVolumeDevice::Write(TInt64 aPos, TInt aLength, const TDesC8& aDataDes)
+{
+    //__PRINT2(_L("#-- CWinVolumeDevice::Write, pos:%LU, len:%u"), aPos, aLength);
+
+    ASSERT(HandleValid());
+    
+    if(aLength == 0 || aDataDes.Length() == 0)
+        return KErrNone;
+
+    if(aLength > aDataDes.Length())
+    {
+        ASSERT(0);
+        return KErrArgument;
+    }
+
+    //-- check position on the volume
+    const TInt64 maxPos = iDrvGeometry.TotalSizeInBytes();
+    if(aPos < 0 || aPos > maxPos)
+        return KErrArgument;
+
+    const TInt64 lastPos = aPos+aLength;
+    if(lastPos > maxPos)
+        return KErrArgument;
+
+    TUint32 dataLen = aLength;
+
+    DWORD dwRes;
+    DWORD dwBytes = 0;
+    
+    const TUint32 KSectorSize = BytesPerSector();
+    const TUint8 *pData = aDataDes.Ptr();
+    
+    try
+    {
+        LONG    mediaPosHi = I64HIGH(aPos);
+        const TUint32 mediaPosLo = I64LOW(aPos);
+        const TUint32 startPosOffset = mediaPosLo & (KSectorSize-1);
+        const TUint32 sectorPos = mediaPosLo-startPosOffset;
+
+        //-- 1. position to the media with sector size granularity 
+        dwRes = SetFilePointer(iDevHandle, sectorPos, &mediaPosHi, FILE_BEGIN);
+        if(dwRes == INVALID_SET_FILE_POINTER)
+        {    
+            throw KDiskOpError;
+        }
+
+        if(startPosOffset || dataLen <= KSectorSize)
+        {//-- need a read-modify-write here.
+            //-- 1.1 read first sector
+            if(!ReadFile(iDevHandle, ipScratchBuf, KSectorSize, &dwBytes, NULL))
+                throw KDiskOpError;
+
+            dwRes = SetFilePointer(iDevHandle, sectorPos, &mediaPosHi, FILE_BEGIN);
+            if(dwRes == INVALID_SET_FILE_POINTER)
+            {    
+                throw KDiskOpError;
+            }
+
+
+            if(dwRes == INVALID_SET_FILE_POINTER)
+                throw KDiskOpError;
+
+            //-- 1.2 copy chunk of data there
+            const TUint32 firstChunkLen = Min(dataLen, KSectorSize - startPosOffset);
+            Mem::Copy(ipScratchBuf+startPosOffset, pData, firstChunkLen);
+            
+            //-- 1.3 write sector
+            if(!WriteFile(iDevHandle, ipScratchBuf, KSectorSize, &dwBytes, NULL))
+                throw KDiskOpError;
+
+
+            dataLen-=firstChunkLen;
+            pData+=firstChunkLen;
+
+            if(dataLen == 0)
+                return KErrNone; //-- no more data to write
+        }
+
+        //-- 2. write whole number of sectors to the media
+        const TUint32 KBytesTail = dataLen & (KSectorSize-1); //-- number of bytes in the incomplete last sector
+        TUint32 KMainChunkBytes = dataLen - KBytesTail;
+
+        ASSERT((KMainChunkBytes % KSectorSize) == 0);
+
+        //-- the pointer to the data shall be 2-bytes aligned, otherwise WriteFile will fail
+        if(!((DWORD)pData & 0x01))
+        {//-- data pointer aligned, ok
+            if(!WriteFile(iDevHandle, pData, KMainChunkBytes, &dwBytes, NULL))
+                throw KDiskOpError;
+        
+            pData+=KMainChunkBytes;
+            dataLen-=KMainChunkBytes;
+
+        }
+        else
+        {//-- data pointer is odd, we need to copy data to the aligned buffer
+            TUint32 rem = KMainChunkBytes;
+            while(rem)
+            {
+                const TUint32 nBytesToWrite = Min(KScratchBufSz, rem);
+                Mem::Copy(ipScratchBuf, pData, nBytesToWrite);
+            
+                if(!WriteFile(iDevHandle, ipScratchBuf, nBytesToWrite, &dwBytes, NULL))
+                    throw KDiskOpError;
+        
+                rem-=nBytesToWrite;
+                pData+=nBytesToWrite;
+                dataLen-=nBytesToWrite;
+            }
+
+        }
+
+
+        //-- 3. write the rest of the bytes into the incomplete last sector
+        if(KBytesTail)
+        {
+            //-- 3.1 read last sector
+            if(!ReadFile(iDevHandle, ipScratchBuf, KSectorSize, &dwBytes, NULL))
+                throw KDiskOpError;    
+
+            LARGE_INTEGER liRelOffset;
+            liRelOffset.QuadPart = -(LONG)KSectorSize;
+
+            //dwRes = SetFilePointer(iDevHandle, -(LONG)KSectorSize, NULL, FILE_CURRENT);
+            
+            dwRes = SetFilePointer(iDevHandle, liRelOffset.LowPart, &liRelOffset.HighPart, FILE_CURRENT);
+            if(dwRes == INVALID_SET_FILE_POINTER)
+                throw KDiskOpError;
+
+            //-- 1.2 copy chunk of data there
+            Mem::Copy(ipScratchBuf, pData, KBytesTail);
+
+            //-- 1.3 write sector
+            if(!WriteFile(iDevHandle, ipScratchBuf, KSectorSize, &dwBytes, NULL))
+                throw KDiskOpError;
+            
+        }
+
+
+    }//try
+    catch(TInt nErrId)
+    {//-- some disk operation finished with the error
+        (void)nErrId;
+        ASSERT(nErrId == KDiskOpError);
+        const DWORD dwWinErr = GetLastError();
+        const TInt  epocErr = MapWinError(dwWinErr);
+        
+        __PRINT2(_L("#-- CWinVolumeDevice::Write() error! WinErr:%d, EpocErr:%d"), dwWinErr, epocErr);
+        ASSERT(epocErr != KErrNone);
+        return epocErr;
+    }
+ 
+    return KErrNone;
+}
+
+//-----------------------------------------------------------------------------
+
+/**
+    Check if the buffer is filled with aFill character.
+    @param  aBufPtr buffer descriptor
+    @param  aFill filling character
+    @return ETrue if the buffer is filled with aFill byte.
+*/
+static TBool CheckBufFill(const TPtrC8& aBufPtr, TUint8 aFill)
+{
+    const TUint32 bufSz = (TUint32)aBufPtr.Size();
+    
+    //-- optimised by using DWORD granularity
+    if(bufSz % sizeof(TUint32) == 0)
+    {
+        TUint32 wordPattern = aFill;
+        wordPattern <<= 8; wordPattern |= aFill;
+        wordPattern <<= 8; wordPattern |= aFill;
+        wordPattern <<= 8; wordPattern |= aFill;
+
+        const TUint nWords = bufSz / sizeof(TUint32);
+        const TUint32* pWords = (const TUint32*) aBufPtr.Ptr();
+
+        for(TUint32 i=0; i<nWords; ++i)
+        {
+            if(pWords[i] != wordPattern)
+                return EFalse;
+        }
+
+        return ETrue;
+    }
+    
+    //-- dumb implementation
+    for(TUint32 i=0; i<bufSz; ++i)
+    {
+        if(aBufPtr[i] != aFill)
+            return EFalse;
+    }
+
+    return ETrue;
+}
+
+
+//#########################################################################################################################
+//##        CWinImgFileDevice  class implementation
+//#########################################################################################################################
+
+
+//-----------------------------------------------------------------------------
+
+CWinImgFileDevice::CWinImgFileDevice()
+                  :CWinMediaDeviceBase() 
+{
+
+    ihFileMapping = NULL;
+    ipImageFile  = NULL;
+
+    //-- create scratch buffer
+    ipScratchBuf = ::new TUint8[KScratchBufSz];
+    ASSERT(ipScratchBuf);
+
+}
+
+CWinImgFileDevice::~CWinImgFileDevice()
+{
+    delete ipScratchBuf;
+}
+
+//-----------------------------------------------------------------------------
+void CWinImgFileDevice::Disconnect()
+{
+    CloseHandle(ihFileMapping);
+    ihFileMapping = NULL;
+    ipImageFile  = NULL;
+
+    CWinMediaDeviceBase::Disconnect();
+}
+
+//-----------------------------------------------------------------------------
+/**
+    Open the device and do some initalisation work.
+    
+    @param  aParams device parameters
+    @return Epoc error code, KErrNone if everything is OK
+*/
+TInt CWinImgFileDevice::Connect(const TMediaDeviceParams& aParams)
+{
+    __PRINT(_L("#-- CWinImgFileDevice::Connect()"));    
+    
+    if(!aParams.ipDevName)
+    {
+        __LOG(_L("#-- CWinImgFileDevice::Connect() device name is not set!"));    
+        return KErrBadName;
+    }
+    __PRINTF(aParams.ipDevName);
+    ASSERT(!HandleValid());
+
+    //-- 1. try to locate an image file by given name.
+    WIN32_FIND_DATAA wfd;
+    iDevHandle = FindFirstFileA(aParams.ipDevName, &wfd);
+
+    const TBool ImgFileAlreadyExists = HandleValid(iDevHandle);
+    
+    FindClose(iDevHandle);
+    iDevHandle = NULL;
+    
+    //-- sector size we will use within image file
+    const TUint32   sectorSizeToUse = (aParams.iDrvGeometry.iBytesPerSector == 0) ? KDefaultSectorSz : aParams.iDrvGeometry.iBytesPerSector; 
+          TUint32   fileSzInSectorsToUse = 0;
+
+    const TUint32   reqSizeSec = aParams.iDrvGeometry.iSizeInSectors; //-- required size in sectors
+    const DWORD     dwAccessMode = (aParams.iReadOnly) ? GENERIC_READ : GENERIC_READ | GENERIC_WRITE;  
+
+    if(ImgFileAlreadyExists)
+    {//-- if the image file already exists, try to open it and optionally adjust its size
+        const TInt64    ImgFileSize = MAKE_TINT64(wfd.nFileSizeHigh, wfd.nFileSizeLow);
+        const TUint32   ImgFileSectors = (TUint32)(ImgFileSize / sectorSizeToUse);
+        const TBool     ImgFileIsRO = wfd.dwFileAttributes & FILE_ATTRIBUTE_READONLY;
+        
+        DWORD dwFileCreationMode = 0;
+        TBool bNeedToAdjustFileSize = EFalse;
+
+        if(reqSizeSec == 0 || reqSizeSec == ImgFileSectors)
+        {//-- the required size is either not specified (auto) or the same as the existing file has.
+         //-- we can just open this file
+         dwFileCreationMode = OPEN_EXISTING;
+         fileSzInSectorsToUse = ImgFileSectors;
+        }
+        else
+        {//-- we will have to overwrite the image file
+            if(ImgFileIsRO)
+            {//-- we won't be able to overwrite existing file.
+                __LOG(_L("#-- CWinImgFileDevice::Connect() unable to adjust image file size!"));    
+                return KErrAccessDenied;
+            }
+
+         fileSzInSectorsToUse = reqSizeSec;
+         dwFileCreationMode = CREATE_ALWAYS;
+         bNeedToAdjustFileSize = ETrue;
+        }
+
+        iDevHandle = CreateFileA(aParams.ipDevName,
+                                dwAccessMode, 
+                                FILE_SHARE_READ,
+                                (LPSECURITY_ATTRIBUTES)NULL,
+                                dwFileCreationMode,
+                                FILE_ATTRIBUTE_NORMAL,
+                                NULL);
+
+        if(!HandleValid(iDevHandle))
+        {
+            const DWORD winErr = GetLastError();
+            __LOG1(_L("#-- CWinImgFileDevice::Connect() Error opening/creating file! WinErr:%d"), winErr);
+            return MapWinError(winErr);
+        }     
+
+        //-- adjust file size if we need
+        if(bNeedToAdjustFileSize)
+        {
+            const TInt64 newFileSize = (TInt64)reqSizeSec * sectorSizeToUse;
+            ASSERT(newFileSize);
+
+            LONG  newFSzHi = I64HIGH(newFileSize);
+            DWORD dwRes = SetFilePointer(iDevHandle, I64LOW(newFileSize), &newFSzHi, FILE_BEGIN);
+            if(dwRes == INVALID_SET_FILE_POINTER || !SetEndOfFile(iDevHandle))
+            {
+                const DWORD winErr = GetLastError();
+                Disconnect();
+                __LOG1(_L("#-- CWinImgFileDevice::Connect() unable to set file size! WinErr:%d"), winErr);
+                return MapWinError(winErr);
+            }
+        }
+
+    }
+    else //if(ImgFileAlreadyExists)
+    {//-- if the image file does not exist or its size differs from required. try to create it
+       
+        if(reqSizeSec == 0)
+        {
+            __LOG(_L("#-- CWinImgFileDevice::Connect() The image file doesn't exist ant its size isn't specified!"));    
+            return KErrArgument;
+        }
+       
+        fileSzInSectorsToUse = reqSizeSec;
+
+        //-- create a new image file
+        iDevHandle = CreateFileA(aParams.ipDevName,
+                                GENERIC_READ | GENERIC_WRITE, 
+                                FILE_SHARE_READ,
+                                (LPSECURITY_ATTRIBUTES)NULL,
+                                CREATE_ALWAYS,
+                                FILE_ATTRIBUTE_NORMAL,
+                                NULL);
+
+        if(!HandleValid(iDevHandle))
+        {
+            const DWORD winErr = GetLastError();
+            __LOG1(_L("#-- CWinImgFileDevice::Connect() can not create file! WinErr:%d"), winErr);
+            return MapWinError(winErr);
+        }     
+
+        //-- set its size
+        const TInt64 newFileSize = (TInt64)reqSizeSec * sectorSizeToUse;
+        ASSERT(newFileSize);
+
+        LONG  newFSzHi = I64HIGH(newFileSize);
+        DWORD dwRes = SetFilePointer(iDevHandle, I64LOW(newFileSize), &newFSzHi, FILE_BEGIN);
+        if(dwRes == INVALID_SET_FILE_POINTER || !SetEndOfFile(iDevHandle))
+        {
+            const DWORD winErr = GetLastError();
+            Disconnect();
+            __LOG1(_L("#-- CWinImgFileDevice::Connect() unable to set file size! WinErr:%d"), winErr);
+            return MapWinError(winErr);
+        }
+
+        //-- if parametrs require a read-only file, reopen it in RO mode, it doesn't make a lot of sense though...
+        if(aParams.iReadOnly)
+        {
+            CloseHandle(iDevHandle);
+            iDevHandle = NULL;
+
+            iDevHandle = CreateFileA(aParams.ipDevName,
+                                GENERIC_READ , 
+                                FILE_SHARE_READ,
+                                (LPSECURITY_ATTRIBUTES)NULL,
+                                OPEN_EXISTING,
+                                FILE_ATTRIBUTE_NORMAL,
+                                NULL);
+
+            if(!HandleValid(iDevHandle))
+            {
+                const DWORD winErr = GetLastError();
+                __LOG1(_L("#-- CWinImgFileDevice::Connect() Can't reopen a file in RO mode! WinErr:%d"), winErr);
+                return MapWinError(winErr);
+            }     
+            
+        }//if(aParams.iReadOnly)
+
+    }//else if(ImgFileAlreadyExists)
+    
+    //-- here we must have the image file created/opened and with correct size
+    ASSERT(HandleValid());
+    ASSERT(sectorSizeToUse);
+
+    if(fileSzInSectorsToUse < KMinMediaSizeInSectors)
+    {
+        __LOG1(_L("#-- CWinImgFileDevice::Connect() Image file is too small!  sectors:%d"), fileSzInSectorsToUse);
+        Disconnect();
+        return KErrGeneral;     
+    }
+
+    iDrvGeometry.iBytesPerSector = sectorSizeToUse;
+    iDrvGeometry.iSizeInSectors  = fileSzInSectorsToUse;
+    
+    //-- map the image file into memory.
+    ASSERT(!HandleValid(ihFileMapping));
+    ASSERT(!ipImageFile);
+    
+    /*
+    don't map image file, because it can be > 4G.
+    ihFileMapping = CreateFileMapping(Handle(), NULL,
+                                      aParams.iReadOnly ? PAGE_READONLY : PAGE_READWRITE,
+                                      0, 0, NULL);
+    if(HandleValid(ihFileMapping))
+    {
+    ipImageFile = (TUint8*)MapViewOfFile(ihFileMapping, 
+                                         aParams.iReadOnly ? FILE_MAP_READ : FILE_MAP_WRITE,
+                                         0,0,0);
+    }
+
+    if(!ipImageFile)
+    {
+        __PRINT1(_L("#-- CWinImgFileDevice::Connect() Error mapping file! WinErr:%d"), GetLastError());
+        Disconnect();
+        return KErrGeneral;
+    }
+    */
+
+    return KErrNone;
+}
+
+
+/**
+    Read a portion of data from the device.
+    Note: at present it _APPENDS_ data to the aDataDes, so the caller must take care of setting its length
+
+    @param  aPos     media position in bytes
+    @param  aLength  how many bytes to read
+    @param  aDataDes data descriptor
+
+    @return KErrNone on success, standard Epoc error code otherwise
+
+*/
+TInt CWinImgFileDevice::Read(TInt64 aPos,TInt aLength, TDes8& aDataDes)
+{
+    
+    //__PRINT3(_L("#-- CWinImgFileDevice::Read, pos:%LU, len:%u, desMaxLen:%u"), aPos, aLength, aDataDes.MaxLength());
+
+    ASSERT(HandleValid());
+    ASSERT(aLength <= aDataDes.MaxLength());
+
+    //-- check position on the volume
+    const TInt64 maxPos = iDrvGeometry.TotalSizeInBytes();
+    if(aPos < 0 || aPos > maxPos)
+        return KErrArgument;
+
+    const TInt64 lastPos = aPos+aLength;
+    if(lastPos > maxPos)
+        return KErrArgument;
+
+    TUint32 dataLen = aLength;
+
+    if(dataLen == 0)
+        return KErrNone;
+
+    DWORD dwRes;
+    DWORD dwBytesRead = 0;
+
+    //aDataDes.SetLength(0);
+
+    try
+    {
+        //-- 1. position to the media 
+        LONG  mediaPosHi = I64HIGH(aPos);
+        const TUint32 mediaPosLo = I64LOW(aPos);
+
+        dwRes = SetFilePointer(iDevHandle, mediaPosLo, &mediaPosHi, FILE_BEGIN);
+        if(dwRes == INVALID_SET_FILE_POINTER)
+            throw KDiskOpError;
+
+
+        //-- 2. read data to the scratch buffer and copy it to the descriptor.
+        ASSERT(ipScratchBuf);
+
+        TUint32 rem = dataLen;
+        
+        while(rem)
+        {
+            const TUint32 bytesToRead = Min(KScratchBufSz, rem);
+            if(!ReadFile(iDevHandle, ipScratchBuf, bytesToRead, &dwBytesRead, NULL))
+                throw KDiskOpError;
+
+            aDataDes.Append(ipScratchBuf, bytesToRead);
+            rem-=bytesToRead;
+        }
+
+    }
+    catch(TInt nErrId)
+    {//-- some disk operation finished with the error
+        (void)nErrId;
+        ASSERT(nErrId == KDiskOpError);
+        const DWORD dwWinErr = GetLastError();
+        const TInt  epocErr = MapWinError(dwWinErr);
+        
+        __PRINT2(_L("#-- CWinImgFileDevice::Read() error! WinErr:%d, EpocErr:%d"), dwWinErr, epocErr);
+        ASSERT(epocErr != KErrNone);
+
+        return epocErr;
+    }
+
+
+    return KErrNone;
+}
+
+/**
+    Write some data to the device.
+
+    @param  aPos     media position in bytes
+    @param  aLength  how many bytes to read
+    @param  aDataDes data descriptor
+
+    @return KErrNone on success, standard Epoc error code otherwise
+*/
+TInt CWinImgFileDevice::Write(TInt64 aPos, TInt aLength, const TDesC8& aDataDes)
+{
+    //__PRINT3(_L("#-- CWinImgFileDevice::Write, pos:%LU, len:%u, desLen:%u" ), aPos, aLength, aDataDes.Length());
+
+    ASSERT(HandleValid());
+
+
+    if(aLength == 0 || aDataDes.Length() == 0)
+        return KErrNone;
+
+    if(aLength > aDataDes.Length())
+    {
+        ASSERT(0);
+        return KErrArgument;
+    }
+
+    //-- check position on the volume
+    const TInt64 maxPos = iDrvGeometry.TotalSizeInBytes();
+    if(aPos < 0 || aPos > maxPos)
+        return KErrArgument;
+
+    const TInt64 lastPos = aPos+aLength;
+
+    if(lastPos > maxPos)
+        return KErrArgument;
+
+    TUint32 dataLen = aLength;
+
+
+    DWORD dwRes;
+    DWORD dwBytes = 0;
+    
+    const TUint8 *pData = aDataDes.Ptr();
+
+    try
+    {
+        //-- 1. position to the media
+        LONG  mediaPosHi = I64HIGH(aPos);
+        const TUint32 mediaPosLo = I64LOW(aPos);
+        dwRes = SetFilePointer(iDevHandle, mediaPosLo, &mediaPosHi, FILE_BEGIN);
+        if(dwRes == INVALID_SET_FILE_POINTER)
+        {    
+            throw KDiskOpError;
+        }
+    
+        //-- 2. write data to the media
+        //-- check if the pointer is word-aligned
+        const DWORD dwPtrMask = 0x01;
+        
+        if( (DWORD)pData & dwPtrMask)
+        {//-- data pointer isn't aligned, write non-aligned bytes through buffer
+            ASSERT(dataLen);
+
+            const int oddCnt = 1;
+            ipScratchBuf[0] = *pData;
+
+            ++pData;
+            --dataLen;
+
+            if(!WriteFile(iDevHandle, ipScratchBuf, oddCnt, &dwBytes, NULL))
+                throw KDiskOpError;
+        }
+        
+        ASSERT(!((DWORD)pData & dwPtrMask));
+        if(dataLen > 0)
+        {
+            if(!WriteFile(iDevHandle, pData, dataLen, &dwBytes, NULL))
+                throw KDiskOpError;
+        }
+    
+    }
+    catch(TInt nErrId)
+    {//-- some disk operation finished with the error
+        (void)nErrId;
+        ASSERT(nErrId == KDiskOpError);
+        const DWORD dwWinErr = GetLastError();
+        const TInt  epocErr = MapWinError(dwWinErr);
+        
+        __PRINT2(_L("#-- CWinImgFileDevice::Write() error! WinErr:%d, EpocErr:%d"), dwWinErr, epocErr);
+        ASSERT(epocErr != KErrNone);
+        return epocErr;
+    }
+
+
+    
+    return KErrNone;
+}
+
+
+//-----------------------------------------------------------------------------
+
+/**
+    Make the best effort to map Windows error codes (from GetLastError()) to Epos ones.
+    
+    @param aWinError MS Windows error code
+    @return corresponding EPOC eror code
+*/
+
+TInt CWinMediaDeviceBase::MapWinError(DWORD aWinError) const
+{
+    switch(aWinError)
+    {
+        case NO_ERROR:
+        return KErrNone;
+                          
+        case ERROR_NOT_READY:
+        return KErrNotReady;
+        
+        case ERROR_WRITE_PROTECT:
+        case ERROR_ACCESS_DENIED:
+        return KErrAccessDenied;
+        
+        case ERROR_INVALID_HANDLE:
+        return KErrBadHandle;
+        
+        case ERROR_NOT_ENOUGH_MEMORY:
+        return KErrNoMemory;
+        
+        case ERROR_OUTOFMEMORY:
+        return KErrDiskFull;
+                                        
+        case ERROR_CRC:
+        return KErrCorrupt;
+
+        case ERROR_WRITE_FAULT:
+        return KErrWrite;
+
+        case ERROR_GEN_FAILURE:
+        return KErrGeneral;
+
+        case ERROR_LOCK_VIOLATION:
+        return KErrLocked;
+
+        case ERROR_SHARING_VIOLATION:
+        return KErrInUse;
+
+        case ERROR_NOT_SUPPORTED:
+        return KErrNotSupported;
+
+        default:
+        return KErrGeneral;
+    
+    }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/win_drive/win_media_device.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,203 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Definitions for the classes that represent Windows media objects, e.g. a file, physical drive or partition.
+// 
+//
+
+/**
+ @file
+*/
+
+#ifndef WIN_MEDIA_DEVICE_H
+#define WIN_MEDIA_DEVICE_H
+
+#include "common.h"
+
+#define WIN32_LEAN_AND_MEAN
+#pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union
+#include <windows.h>
+#pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union
+#include <winioctl.h> 
+#pragma warning( default : 4201 ) // nonstandard extension used : nameless struct/union
+
+
+//-----------------------------------------------------------------------------
+
+const TUint32 KDefaultSectorSz = 512;       //-- default sector size
+const TUint32 KMinMediaSizeInSectors = 128; //-- minimal number of sectors on the media allowed
+
+
+//-----------------------------------------------------------------------------
+
+/** 
+    this structure describes "drive" geometry
+    the "drive" consists of a number of sectors.
+*/
+class TDriveGeometry
+{
+ public:
+    TDriveGeometry() {iBytesPerSector=0; iSizeInSectors=0;}
+    
+    TInt64 TotalSizeInBytes() const {return iBytesPerSector*(TInt64)iSizeInSectors;}
+
+ public:
+
+    TUint32 iBytesPerSector;  ///< bytes per sectors (usually 512)
+    TUint32 iSizeInSectors;   ///< size of the bedia in sectors
+};
+
+
+//-----------------------------------------------------------------------------
+
+/**
+    Windows media device creation parameters
+*/
+class TMediaDeviceParams
+{
+ public:       
+ 
+    TMediaDeviceParams() {ipDevName = NULL; iReadOnly = EFalse;}
+
+ public:
+    TDriveGeometry iDrvGeometry;    ///< drive geometry
+    const char*    ipDevName;       ///< windows device name
+    TBool          iReadOnly;       ///< if ETrue, the device shall be opened as RO
+
+};
+
+//-----------------------------------------------------------------------------
+
+/**
+    Abstract class representing interface to the Windows device (file or volume).
+*/
+class CWinMediaDeviceBase
+{
+ public:  
+             CWinMediaDeviceBase();
+    virtual ~CWinMediaDeviceBase();
+
+    virtual TInt Connect(const TMediaDeviceParams& aParams)=0;
+    virtual void Disconnect(); 
+
+
+    virtual TInt Read(TInt64 aPos,TInt aLength, TDes8& aDataDes)=0;
+    virtual TInt Write(TInt64 aPos,TInt aLength, const TDesC8& aDataDes)=0;
+    virtual TInt Erase(TInt64 aPos, TUint32 aLength, TUint8 aFill);
+
+    void  GetDriveGeometry(TDriveGeometry& aDG) const {aDG = iDrvGeometry;}
+
+ protected:
+    
+    CWinMediaDeviceBase(const CWinMediaDeviceBase&);
+    CWinMediaDeviceBase& operator=(const CWinMediaDeviceBase&);
+    
+    inline HANDLE Handle() const {return iDevHandle;}
+    inline TBool HandleValid() const;
+    inline TBool HandleValid(HANDLE aHandle) const;
+    
+    TUint32 BytesPerSector() const {return iDrvGeometry.iBytesPerSector;}
+
+    TInt MapWinError(DWORD aWinError) const; 
+
+    enum {KScratchBufSz = 128*1024}; ///< scratch buffer size
+
+ protected:
+    
+    HANDLE              iDevHandle;     ///< Windows device handle
+    TDriveGeometry      iDrvGeometry;   ///< drive geometry.
+    TUint8*             ipScratchBuf;   ///< scratch buffer for IO operations
+};
+
+//-----------------------------------------------------------------------------
+
+TBool CWinMediaDeviceBase::HandleValid() const 
+{
+    return HandleValid(iDevHandle);
+}
+
+TBool CWinMediaDeviceBase::HandleValid(HANDLE aHandle) const 
+{
+    return aHandle && (aHandle != INVALID_HANDLE_VALUE);
+}
+
+
+//-----------------------------------------------------------------------------
+
+/**
+    This class represents a windows "volume" device, like a physical or logical drive or partition.
+    it can also handle files, but not very effectiively.
+*/
+class CWinVolumeDevice: public CWinMediaDeviceBase
+{
+ public:  
+    CWinVolumeDevice();
+   ~CWinVolumeDevice();
+
+    virtual TInt Connect(const TMediaDeviceParams& aParams);
+    virtual TInt Read(TInt64 aPos,TInt aLength, TDes8& aDataDes);
+    virtual TInt Write(TInt64 aPos,TInt aLength, const TDesC8& aDataDes);
+ private:   
+    
+    MEDIA_TYPE iMediaType;  ///< windows media type.
+};
+
+
+
+//-----------------------------------------------------------------------------
+
+/**
+    This class represents a windows "file" device, i.e. image file on some drive
+*/
+class CWinImgFileDevice: public CWinMediaDeviceBase
+{
+ public:  
+    CWinImgFileDevice();
+   ~CWinImgFileDevice();
+
+    virtual TInt Connect(const TMediaDeviceParams& aParams);
+    virtual void Disconnect(); 
+
+    virtual TInt Read(TInt64 aPos,TInt aLength, TDes8& aDataDes);
+    virtual TInt Write(TInt64 aPos,TInt aLength, const TDesC8& aDataDes);
+
+ private:
+   
+ private:   
+    HANDLE  ihFileMapping; ///< handle for the image file mapping
+    TUint8* ipImageFile;   ///< pointer to the beginning of the image file mapped into memory
+};
+
+
+
+
+
+
+
+
+
+
+#endif //WIN_MEDIA_DEVICE_H
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wins.mbc	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,82 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// About this file:
+// This file is only used *within Symbian* and is not expected to be used
+// by Symbian DevKit/CustKit customers
+// This file is used with the "metabld" command to build the WINS specific base
+// components and all other base components that are required to build
+// the emulator for the WINS target
+// 
+//
+
+SECTION_COMMANDS
+
+bldmake bldfiles
+abld export
+
+abld makefile tools
+abld library tools
+abld -k target tools rel
+abld makefile tools2
+abld library tools2
+abld -k target tools2 rel
+
+abld makefile wins
+abld library wins
+abld -k target wins
+
+SECTION_DIRS
+\os\buildtools\toolsandutils\e32tools\group
+\os\buildtools\perltoolsplat_os\redistribution\gcc\group
+\os\buildtools\perltoolsplat_os\redistribution\gcc_mingw
+\os\buildtools\perltoolsplat_os\redistribution\gcce\group
+\os\buildtools\perltoolsplat_os\redistribution\gccxml
+\os\buildtools\perltoolsplat_os\redistribution\unzip\group
+\os\buildtools\perltoolsplat_os\redistribution\zip\group
+\os\buildtools\toolsandutils\stlport\group
+\os\kernelhwsrv\kerneltest\e32utils\group
+\os\kernelhwsrv\kerneltest\e32utils\group\restricted
+\os\kernelhwsrv\kernel\eka
+\os\kernelhwsrv\userlibandfileserver\fileserver\group
+\os\kernelhwsrv\halservices\hal
+\os\boardsupport\emulator\emulatorbsp
+\os\kernelhwsrv\userlibandfileserver\domainmgr\group
+
+\os\kernelhwsrv\kernel\eka\drivers\medsd3c
+\os\kernelhwsrv\kernel\eka\drivers\pbus\mmc\sdcard\sdcard4c
+
+\os\kernelhwsrv\kernel\eka\drivers\bsp
+\os\kernelhwsrv\kernel\eka\drivers\debug\group
+\os\kernelhwsrv\kernel\eka\drivers\ecomm
+\os\kernelhwsrv\kernel\eka\drivers\soundsc
+\os\kernelhwsrv\kernel\eka\drivers\ethernet
+\os\kernelhwsrv\kernel\eka\drivers\locmedia
+\os\kernelhwsrv\kernel\eka\drivers\media
+\os\kernelhwsrv\kernel\eka\drivers\trace
+\os\kernelhwsrv\kernel\eka\drivers\usbc
+\os\kernelhwsrv\kernel\eka\euser
+\os\kernelhwsrv\kernel\eka\ewsrv
+
+\os\kernelhwsrv\kernel\eka\drivers\unistore2
+\os\boardsupport\emulator\unistore2emulatorsupport
+
+\os\kernelhwsrv\userlibandfileserver\fileserver\estart
+\os\kernelhwsrv\userlibandfileserver\fileserver\etshell
+\os\kernelhwsrv\userlibandfileserver\fileserver\iso9660
+\os\kernelhwsrv\userlibandfileserver\fileserver\ntfs
+\os\kernelhwsrv\userlibandfileserver\fileserver\scomp
+\os\kernelhwsrv\userlibandfileserver\fileserver\sfat
+\os\kernelhwsrv\userlibandfileserver\fileserver\sfat32
+\os\kernelhwsrv\userlibandfileserver\fileserver\smassstorage
+\os\kernelhwsrv\userlibandfileserver\fileserver\srofs
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/winscw.mbc	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,82 @@
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// About this file:
+// This file is only used *within Symbian* and is not expected to be used
+// by Symbian DevKit/CustKit customers
+// This file is used with the "metabld" command to build the WINSCW specific base
+// components and all other base components that are required to build
+// the emulator for the WINSCW target
+// 
+//
+
+SECTION_COMMANDS
+
+bldmake bldfiles
+abld export
+
+abld makefile tools
+abld library tools
+abld -k target tools rel
+abld makefile tools2
+abld library tools2
+abld -k target tools2 rel
+
+abld makefile winscw
+abld library winscw
+abld -k target winscw
+
+SECTION_DIRS
+\os\buildtools\toolsandutils\e32tools\group
+\os\buildtools\perltoolsplat_os\redistribution\gcc\group
+\os\buildtools\perltoolsplat_os\redistribution\gcc_mingw
+\os\buildtools\perltoolsplat_os\redistribution\gcce\group
+\os\buildtools\perltoolsplat_os\redistribution\gccxml
+\os\buildtools\perltoolsplat_os\redistribution\unzip\group
+\os\buildtools\perltoolsplat_os\redistribution\zip\group
+\os\buildtools\toolsandutils\stlport\group
+\os\kernelhwsrv\kerneltest\e32utils\group
+\os\kernelhwsrv\kerneltest\e32utils\group\restricted
+\os\kernelhwsrv\kernel\eka
+\os\kernelhwsrv\userlibandfileserver\fileserver\group
+\os\kernelhwsrv\halservices\hal
+\os\boardsupport\emulator\emulatorbsp
+\os\kernelhwsrv\userlibandfileserver\domainmgr\group
+
+\os\kernelhwsrv\kernel\eka\drivers\medsd3c
+\os\kernelhwsrv\kernel\eka\drivers\pbus\mmc\sdcard\sdcard4c
+
+\os\kernelhwsrv\kernel\eka\drivers\bsp
+\os\kernelhwsrv\kernel\eka\drivers\debug\group
+\os\kernelhwsrv\kernel\eka\drivers\ecomm
+\os\kernelhwsrv\kernel\eka\drivers\soundsc
+\os\kernelhwsrv\kernel\eka\drivers\ethernet
+\os\kernelhwsrv\kernel\eka\drivers\locmedia
+\os\kernelhwsrv\kernel\eka\drivers\media
+\os\kernelhwsrv\kernel\eka\drivers\trace
+\os\kernelhwsrv\kernel\eka\drivers\usbc
+\os\kernelhwsrv\kernel\eka\euser
+\os\kernelhwsrv\kernel\eka\ewsrv
+
+\os\kernelhwsrv\kernel\eka\drivers\unistore2
+\os\boardsupport\emulator\unistore2emulatorsupport
+
+\os\kernelhwsrv\userlibandfileserver\fileserver\estart
+\os\kernelhwsrv\userlibandfileserver\fileserver\etshell
+\os\kernelhwsrv\userlibandfileserver\fileserver\iso9660
+\os\kernelhwsrv\userlibandfileserver\fileserver\ntfs
+\os\kernelhwsrv\userlibandfileserver\fileserver\scomp
+\os\kernelhwsrv\userlibandfileserver\fileserver\sfat
+\os\kernelhwsrv\userlibandfileserver\fileserver\sfat32
+\os\kernelhwsrv\userlibandfileserver\fileserver\smassstorage
+\os\kernelhwsrv\userlibandfileserver\fileserver\srofs
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/winsgui.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,50 @@
+// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// wins/winsgui.mmp
+// 
+//
+
+#include "kernel/kern_ext.mmh"
+
+USERINCLUDE		inc
+
+
+asspexports
+target				winsgui.dll
+targettype			kext
+
+sourcepath			specific
+source				gui.cpp keyboard.cpp multitouch.cpp
+
+library 			ecust.lib emulator.lib
+
+start wins
+
+win32_library			kernel32.lib user32.lib gdi32.lib
+#if defined(VC32)
+win32_library			msvcrt.lib
+#endif
+
+win32_resource			specific/gui.rc
+
+end
+
+deffile				bwins/winsgui.def
+
+uid					0x100039cf 0x100000db
+VENDORID 0x70000001
+
+epocallowdlldata
+
+capability			all
Binary file emulator/emulatorbsp/wpdpack/drivers/winpcap.exe has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/Win32-Extensions.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
+ * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the Politecnico di Torino, CACE Technologies 
+ * nor the names of its contributors may be used to endorse or promote 
+ * products derived from this software without specific prior written 
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef __WIN32_EXTENSIONS_H__
+#define __WIN32_EXTENSIONS_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Definitions */
+
+/*!
+  \brief A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit().
+*/
+struct pcap_send_queue
+{
+	u_int maxlen;		///< Maximum size of the the queue, in bytes. This variable contains the size of the buffer field.
+	u_int len;			///< Current size of the queue, in bytes.
+	char *buffer;		///< Buffer containing the packets to be sent.
+};
+
+typedef struct pcap_send_queue pcap_send_queue;
+
+/*!
+  \brief This typedef is a support for the pcap_get_airpcap_handle() function
+*/
+#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_)
+#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_
+typedef struct _AirpcapHandle *PAirpcapHandle;
+#endif
+
+#define		BPF_MEM_EX_IMM	0xc0
+#define		BPF_MEM_EX_IND	0xe0
+
+/*used for ST*/
+#define		BPF_MEM_EX		0xc0
+#define		BPF_TME					0x08
+
+#define		BPF_LOOKUP				0x90   
+#define		BPF_EXECUTE				0xa0
+#define		BPF_INIT				0xb0
+#define		BPF_VALIDATE			0xc0
+#define		BPF_SET_ACTIVE			0xd0
+#define		BPF_RESET				0xe0
+#define		BPF_SET_MEMORY			0x80
+#define		BPF_GET_REGISTER_VALUE	0x70
+#define		BPF_SET_REGISTER_VALUE	0x60
+#define		BPF_SET_WORKING			0x50
+#define		BPF_SET_ACTIVE_READ		0x40
+#define		BPF_SET_AUTODELETION	0x30
+#define		BPF_SEPARATION			0xff
+
+/* Prototypes */
+pcap_send_queue* pcap_sendqueue_alloc(u_int memsize);
+
+void pcap_sendqueue_destroy(pcap_send_queue* queue);
+
+int pcap_sendqueue_queue(pcap_send_queue* queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data);
+
+u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue* queue, int sync);
+
+HANDLE pcap_getevent(pcap_t *p);
+
+struct pcap_stat *pcap_stats_ex(pcap_t *p, int *pcap_stat_size);
+
+int pcap_setuserbuffer(pcap_t *p, int size);
+
+int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks);
+
+int pcap_live_dump_ended(pcap_t *p, int sync);
+
+int pcap_offline_filter(struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data);
+
+int pcap_start_oem(char* err_str, int flags);
+
+PAirpcapHandle pcap_get_airpcap_handle(pcap_t *p);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //__WIN32_EXTENSIONS_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/bittypes.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 1999 WIDE Project.
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _BITTYPES_H
+#define _BITTYPES_H
+
+#ifndef HAVE_U_INT8_T
+
+#if SIZEOF_CHAR == 1
+typedef unsigned char u_int8_t;
+typedef signed char int8_t;
+#elif SIZEOF_INT == 1
+typedef unsigned int u_int8_t;
+typedef signed int int8_t;
+#else  /* XXX */
+#error "there's no appropriate type for u_int8_t"
+#endif
+#define HAVE_U_INT8_T 1
+#define HAVE_INT8_T 1
+
+#endif /* HAVE_U_INT8_T */
+
+#ifndef HAVE_U_INT16_T 
+
+#if SIZEOF_SHORT == 2
+typedef unsigned short u_int16_t;
+typedef signed short int16_t;
+#elif SIZEOF_INT == 2
+typedef unsigned int u_int16_t;
+typedef signed int int16_t;
+#elif SIZEOF_CHAR == 2
+typedef unsigned char u_int16_t;
+typedef signed char int16_t;
+#else  /* XXX */
+#error "there's no appropriate type for u_int16_t"
+#endif
+#define HAVE_U_INT16_T 1
+#define HAVE_INT16_T 1
+
+#endif /* HAVE_U_INT16_T */
+
+#ifndef HAVE_U_INT32_T
+
+#if SIZEOF_INT == 4
+typedef unsigned int u_int32_t;
+typedef signed int int32_t;
+#elif SIZEOF_LONG == 4
+typedef unsigned long u_int32_t;
+typedef signed long int32_t;
+#elif SIZEOF_SHORT == 4
+typedef unsigned short u_int32_t;
+typedef signed short int32_t;
+#else  /* XXX */
+#error "there's no appropriate type for u_int32_t"
+#endif
+#define HAVE_U_INT32_T 1
+#define HAVE_INT32_T 1
+
+#endif /* HAVE_U_INT32_T */
+
+#ifndef HAVE_U_INT64_T
+#if SIZEOF_LONG_LONG == 8
+typedef unsigned long long u_int64_t;
+#elif defined(_MSC_EXTENSIONS)
+typedef unsigned _int64 u_int64_t;
+#elif SIZEOF_INT == 8
+typedef unsigned int u_int64_t;
+#elif SIZEOF_LONG == 8
+typedef unsigned long u_int64_t;
+#elif SIZEOF_SHORT == 8
+typedef unsigned short u_int64_t;
+#else  /* XXX */
+#error "there's no appropriate type for u_int64_t"
+#endif
+
+#endif /* HAVE_U_INT64_T */
+
+#ifndef PRId64
+#ifdef _MSC_EXTENSIONS
+#define PRId64	"I64d"
+#else /* _MSC_EXTENSIONS */
+#define PRId64	"lld"
+#endif /* _MSC_EXTENSIONS */
+#endif /* PRId64 */
+
+#ifndef PRIo64
+#ifdef _MSC_EXTENSIONS
+#define PRIo64	"I64o"
+#else /* _MSC_EXTENSIONS */
+#define PRIo64	"llo"
+#endif /* _MSC_EXTENSIONS */
+#endif /* PRIo64 */
+
+#ifndef PRIx64
+#ifdef _MSC_EXTENSIONS
+#define PRIx64	"I64x"
+#else /* _MSC_EXTENSIONS */
+#define PRIx64	"llx"
+#endif /* _MSC_EXTENSIONS */
+#endif /* PRIx64 */
+
+#ifndef PRIu64
+#ifdef _MSC_EXTENSIONS
+#define PRIu64	"I64u"
+#else /* _MSC_EXTENSIONS */
+#define PRIu64	"llu"
+#endif /* _MSC_EXTENSIONS */
+#endif /* PRIu64 */
+
+#endif /* _BITTYPES_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/bucket_lookup.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2001 - 2003
+ * NetGroup, Politecnico di Torino (Italy)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the Politecnico di Torino nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef __bucket_lookup
+#define __bucket_lookup
+#ifdef WIN32
+#include "tme.h"
+#endif
+
+#ifdef __FreeBSD__
+
+#ifdef _KERNEL
+#include <net/tme/tme.h>
+#else
+#include <tme/tme.h>
+#endif
+
+#endif
+
+#define BUCKET_LOOKUP_INSERT	0x00000011
+uint32 bucket_lookup_insert(uint8 *key, TME_DATA *data, MEM_TYPE *mem_ex, struct time_conv *time_ref);
+#define BUCKET_LOOKUP			0x00000010
+uint32 bucket_lookup(uint8 *key, TME_DATA *data, MEM_TYPE *mem_ex, struct time_conv *time_ref);
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/count_packets.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2001 - 2003
+ * NetGroup, Politecnico di Torino (Italy)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the Politecnico di Torino nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef __count_packets
+#define __count_packets
+
+#ifdef WIN32
+#include "tme.h"
+#endif
+
+#ifdef __FreeBSD__
+
+#ifdef _KERNEL
+#include <net/tme/tme.h>
+#else
+#include <tme/tme.h>
+#endif
+
+#endif
+
+typedef struct __c_p_data
+{
+	struct timeval timestamp;
+	uint64 packets;
+	uint64 bytes;
+}
+	c_p_data;
+
+#define COUNT_PACKETS					0x00000000
+uint32 count_packets(uint8 *block, uint32 pkt_size, TME_DATA *data, MEM_TYPE *mem_ex, uint8 *mem_data);
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/devioctl.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,90 @@
+/*++ BUILD Version: 0004    // Increment this if a change has global effects
+   Copyright (c) 1992-1993  Microsoft Corporation
+   Module Name:
+   devioctl.h
+   Revision History:
+   -- */
+// begin_winioctl
+#ifndef _DEVIOCTL_
+#define _DEVIOCTL_
+// begin_ntddk begin_nthal begin_ntifs
+//
+// Define the various device type values.  Note that values used by Microsoft
+// Corporation are in the range 0-32767, and 32768-65535 are reserved for use
+// by customers.
+//
+#define DEVICE_TYPE ULONG
+#define FILE_DEVICE_BEEP                0x00000001
+#define FILE_DEVICE_CD_ROM              0x00000002
+#define FILE_DEVICE_CD_ROM_FILE_SYSTEM  0x00000003
+#define FILE_DEVICE_CONTROLLER          0x00000004
+#define FILE_DEVICE_DATALINK            0x00000005
+#define FILE_DEVICE_DFS                 0x00000006
+#define FILE_DEVICE_DISK                0x00000007
+#define FILE_DEVICE_DISK_FILE_SYSTEM    0x00000008
+#define FILE_DEVICE_FILE_SYSTEM         0x00000009
+#define FILE_DEVICE_INPORT_PORT         0x0000000a
+#define FILE_DEVICE_KEYBOARD            0x0000000b
+#define FILE_DEVICE_MAILSLOT            0x0000000c
+#define FILE_DEVICE_MIDI_IN             0x0000000d
+#define FILE_DEVICE_MIDI_OUT            0x0000000e
+#define FILE_DEVICE_MOUSE               0x0000000f
+#define FILE_DEVICE_MULTI_UNC_PROVIDER  0x00000010
+#define FILE_DEVICE_NAMED_PIPE          0x00000011
+#define FILE_DEVICE_NETWORK             0x00000012
+#define FILE_DEVICE_NETWORK_BROWSER     0x00000013
+#define FILE_DEVICE_NETWORK_FILE_SYSTEM 0x00000014
+#define FILE_DEVICE_NULL                0x00000015
+#define FILE_DEVICE_PARALLEL_PORT       0x00000016
+#define FILE_DEVICE_PHYSICAL_NETCARD    0x00000017
+#define FILE_DEVICE_PRINTER             0x00000018
+#define FILE_DEVICE_SCANNER             0x00000019
+#define FILE_DEVICE_SERIAL_MOUSE_PORT   0x0000001a
+#define FILE_DEVICE_SERIAL_PORT         0x0000001b
+#define FILE_DEVICE_SCREEN              0x0000001c
+#define FILE_DEVICE_SOUND               0x0000001d
+#define FILE_DEVICE_STREAMS             0x0000001e
+#define FILE_DEVICE_TAPE                0x0000001f
+#define FILE_DEVICE_TAPE_FILE_SYSTEM    0x00000020
+#define FILE_DEVICE_TRANSPORT           0x00000021
+#define FILE_DEVICE_UNKNOWN             0x00000022
+#define FILE_DEVICE_VIDEO               0x00000023
+#define FILE_DEVICE_VIRTUAL_DISK        0x00000024
+#define FILE_DEVICE_WAVE_IN             0x00000025
+#define FILE_DEVICE_WAVE_OUT            0x00000026
+#define FILE_DEVICE_8042_PORT           0x00000027
+#define FILE_DEVICE_NETWORK_REDIRECTOR  0x00000028
+#define FILE_DEVICE_BATTERY             0x00000029
+#define FILE_DEVICE_BUS_EXTENDER        0x0000002a
+#define FILE_DEVICE_MODEM               0x0000002b
+#define FILE_DEVICE_VDM                 0x0000002c
+#define FILE_DEVICE_MASS_STORAGE        0x0000002d
+//
+// Macro definition for defining IOCTL and FSCTL function control codes.  Note
+// that function codes 0-2047 are reserved for Microsoft Corporation, and
+// 2048-4095 are reserved for customers.
+//
+#define CTL_CODE( DeviceType, Function, Method, Access ) (                 \
+    ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
+)
+//
+// Define the method codes for how buffers are passed for I/O and FS controls
+//
+#define METHOD_BUFFERED                 0
+#define METHOD_IN_DIRECT                1
+#define METHOD_OUT_DIRECT               2
+#define METHOD_NEITHER                  3
+//
+// Define the access check value for any access
+//
+//
+// The FILE_READ_ACCESS and FILE_WRITE_ACCESS constants are also defined in
+// ntioapi.h as FILE_READ_DATA and FILE_WRITE_DATA. The values for these
+// constants *MUST* always be in sync.
+//
+#define FILE_ANY_ACCESS                 0
+#define FILE_READ_ACCESS          ( 0x0001 )	// file & pipe
+#define FILE_WRITE_ACCESS         ( 0x0002 )	// file & pipe
+// end_ntddk end_nthal end_ntifs
+#endif				// _DEVIOCTL_
+// end_winioctl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/gnuc.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+/* @(#) $Header: /tcpdump/master/libpcap/Win32/Include/Gnuc.h,v 1.1 2002/08/01 08:33:05 risso Exp $ (LBL) */
+
+/* Define __P() macro, if necessary */
+
+#ifndef __P
+#if __STDC__
+#define __P(protos) protos
+#else
+#define __P(protos) ()
+#endif
+#endif
+
+/* inline foo */
+#ifndef __cplusplus
+#ifdef __GNUC__
+#define inline __inline
+#else
+#define inline
+#endif
+#endif
+
+/*
+ * Handle new and old "dead" routine prototypes
+ *
+ * For example:
+ *
+ *	__dead void foo(void) __attribute__((volatile));
+ *
+ */
+#ifdef __GNUC__
+#ifndef __dead
+#define __dead volatile
+#endif
+#if __GNUC__ < 2  || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
+#ifndef __attribute__
+#define __attribute__(args)
+#endif
+#endif
+#else
+#ifndef __dead
+#define __dead
+#endif
+#ifndef __attribute__
+#define __attribute__(args)
+#endif
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/ip6_misc.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,165 @@
+/*
+ * Copyright (c) 1993, 1994, 1997
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code distributions
+ * retain the above copyright notice and this paragraph in its entirety, (2)
+ * distributions including binary code include the above copyright notice and
+ * this paragraph in its entirety in the documentation or other materials
+ * provided with the distribution, and (3) all advertising materials mentioning
+ * features or use of this software display the following acknowledgement:
+ * ``This product includes software developed by the University of California,
+ * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+ * the University nor the names of its contributors may be used to endorse
+ * or promote products derived from this software without specific prior
+ * written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/Win32/Include/ip6_misc.h,v 1.4.2.1 2006/01/22 18:13:47 gianluca Exp $ (LBL)
+ */
+
+/*
+ * This file contains a collage of declarations for IPv6 from FreeBSD not present in Windows
+ */
+
+#include <winsock2.h>
+
+#ifndef __MINGW32__
+#include <ws2tcpip.h>
+#endif /* __MINGW32__ */
+
+#ifndef __MINGW32__
+#define	IN_MULTICAST(a)		IN_CLASSD(a)
+#endif
+
+#define	IN_EXPERIMENTAL(a)	((((u_int32_t) (a)) & 0xf0000000) == 0xf0000000)
+
+#define	IN_LOOPBACKNET		127
+
+#ifdef __MINGW32__
+/* IPv6 address */
+struct in6_addr
+  {
+    union
+      {
+	u_int8_t		u6_addr8[16];
+	u_int16_t	u6_addr16[8];
+	u_int32_t	u6_addr32[4];
+      } in6_u;
+#define s6_addr			in6_u.u6_addr8
+#define s6_addr16		in6_u.u6_addr16
+#define s6_addr32		in6_u.u6_addr32
+#define s6_addr64		in6_u.u6_addr64
+  };
+
+#define IN6ADDR_ANY_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+#define IN6ADDR_LOOPBACK_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }
+#endif /* __MINGW32__ */
+
+
+#if (defined WIN32) || (defined __MINGW32__)
+typedef unsigned short	sa_family_t;
+#endif
+
+
+#ifdef __MINGW32__
+
+#define	__SOCKADDR_COMMON(sa_prefix) \
+  sa_family_t sa_prefix##family
+
+/* Ditto, for IPv6.  */
+struct sockaddr_in6
+  {
+    __SOCKADDR_COMMON (sin6_);
+    u_int16_t sin6_port;		/* Transport layer port # */
+    u_int32_t sin6_flowinfo;	/* IPv6 flow information */
+    struct in6_addr sin6_addr;	/* IPv6 address */
+  };
+
+#define IN6_IS_ADDR_V4MAPPED(a) \
+	((((u_int32_t *) (a))[0] == 0) && (((u_int32_t *) (a))[1] == 0) && \
+	 (((u_int32_t *) (a))[2] == htonl (0xffff)))
+
+#define IN6_IS_ADDR_MULTICAST(a) (((u_int8_t *) (a))[0] == 0xff)
+
+#define IN6_IS_ADDR_LINKLOCAL(a) \
+	((((u_int32_t *) (a))[0] & htonl (0xffc00000)) == htonl (0xfe800000))
+
+#define IN6_IS_ADDR_LOOPBACK(a) \
+	(((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \
+	 ((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1))
+#endif /* __MINGW32__ */
+
+#define ip6_vfc   ip6_ctlun.ip6_un2_vfc
+#define ip6_flow  ip6_ctlun.ip6_un1.ip6_un1_flow
+#define ip6_plen  ip6_ctlun.ip6_un1.ip6_un1_plen
+#define ip6_nxt   ip6_ctlun.ip6_un1.ip6_un1_nxt
+#define ip6_hlim  ip6_ctlun.ip6_un1.ip6_un1_hlim
+#define ip6_hops  ip6_ctlun.ip6_un1.ip6_un1_hlim
+
+#define nd_rd_type               nd_rd_hdr.icmp6_type
+#define nd_rd_code               nd_rd_hdr.icmp6_code
+#define nd_rd_cksum              nd_rd_hdr.icmp6_cksum
+#define nd_rd_reserved           nd_rd_hdr.icmp6_data32[0]
+
+/*
+ *	IPV6 extension headers
+ */
+#define IPPROTO_HOPOPTS		0	/* IPv6 hop-by-hop options	*/
+#define IPPROTO_IPV6		41  /* IPv6 header.  */
+#define IPPROTO_ROUTING		43	/* IPv6 routing header		*/
+#define IPPROTO_FRAGMENT	44	/* IPv6 fragmentation header	*/
+#define IPPROTO_ESP		50	/* encapsulating security payload */
+#define IPPROTO_AH		51	/* authentication header	*/
+#define IPPROTO_ICMPV6		58	/* ICMPv6			*/
+#define IPPROTO_NONE		59	/* IPv6 no next header		*/
+#define IPPROTO_DSTOPTS		60	/* IPv6 destination options	*/
+#define IPPROTO_PIM			103 /* Protocol Independent Multicast.  */
+
+#define	 IPV6_RTHDR_TYPE_0 0
+
+/* Option types and related macros */
+#define IP6OPT_PAD1		0x00	/* 00 0 00000 */
+#define IP6OPT_PADN		0x01	/* 00 0 00001 */
+#define IP6OPT_JUMBO		0xC2	/* 11 0 00010 = 194 */
+#define IP6OPT_JUMBO_LEN	6
+#define IP6OPT_ROUTER_ALERT	0x05	/* 00 0 00101 */
+
+#define IP6OPT_RTALERT_LEN	4
+#define IP6OPT_RTALERT_MLD	0	/* Datagram contains an MLD message */
+#define IP6OPT_RTALERT_RSVP	1	/* Datagram contains an RSVP message */
+#define IP6OPT_RTALERT_ACTNET	2 	/* contains an Active Networks msg */
+#define IP6OPT_MINLEN		2
+
+#define IP6OPT_BINDING_UPDATE	0xc6	/* 11 0 00110 */
+#define IP6OPT_BINDING_ACK	0x07	/* 00 0 00111 */
+#define IP6OPT_BINDING_REQ	0x08	/* 00 0 01000 */
+#define IP6OPT_HOME_ADDRESS	0xc9	/* 11 0 01001 */
+#define IP6OPT_EID		0x8a	/* 10 0 01010 */
+
+#define IP6OPT_TYPE(o)		((o) & 0xC0)
+#define IP6OPT_TYPE_SKIP	0x00
+#define IP6OPT_TYPE_DISCARD	0x40
+#define IP6OPT_TYPE_FORCEICMP	0x80
+#define IP6OPT_TYPE_ICMP	0xC0
+
+#define IP6OPT_MUTABLE		0x20
+
+
+#ifdef __MINGW32__
+#ifndef EAI_ADDRFAMILY
+struct addrinfo {
+	int	ai_flags;	/* AI_PASSIVE, AI_CANONNAME */
+	int	ai_family;	/* PF_xxx */
+	int	ai_socktype;	/* SOCK_xxx */
+	int	ai_protocol;	/* 0 or IPPROTO_xxx for IPv4 and IPv6 */
+	size_t	ai_addrlen;	/* length of ai_addr */
+	char	*ai_canonname;	/* canonical name for hostname */
+	struct sockaddr *ai_addr;	/* binary address */
+	struct addrinfo *ai_next;	/* next structure in linked list */
+};
+#endif
+#endif /* __MINGW32__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/memory_t.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2001 - 2005 NetGroup, Politecnico di Torino (Italy)
+ * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the Politecnico di Torino, CACE Technologies 
+ * nor the names of its contributors may be used to endorse or promote 
+ * products derived from this software without specific prior written 
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef __memory_t
+#define __memory_t
+
+#define		uint8	UCHAR
+#define		int8	CHAR
+#define		uint16	USHORT
+#define		int16	SHORT
+#define		uint32	ULONG
+#define		int32	LONG
+#define		uint64	ULONGLONG
+#define		int64	LONGLONG
+
+/*memory type*/
+typedef struct __MEM_TYPE
+{
+	uint8 *buffer;
+	uint32 size;
+}  MEM_TYPE, *PMEM_TYPE;
+
+#define LONG_AT(base,offset) (*(int32*)((uint8*)base+(uint32)offset))
+
+#define ULONG_AT(base,offset) (*(uint32*)((uint8*)base+(uint32)offset))
+
+#define SHORT_AT(base,offset) (*(int16*)((uint8*)base+(uint32)offset))
+
+#define USHORT_AT(base,offset) (*(uint16*)((uint8*)base+(uint32)offset))
+
+__inline int32 SW_LONG_AT(void *b, uint32 c)
+{
+	return	((int32)*((uint8 *)b+c)<<24|
+		 (int32)*((uint8 *)b+c+1)<<16|
+		 (int32)*((uint8 *)b+c+2)<<8|
+		 (int32)*((uint8 *)b+c+3)<<0);
+}
+
+
+__inline uint32 SW_ULONG_AT(void *b, uint32 c)
+{
+	return	((uint32)*((uint8 *)b+c)<<24|
+		 (uint32)*((uint8 *)b+c+1)<<16|
+		 (uint32)*((uint8 *)b+c+2)<<8|
+		 (uint32)*((uint8 *)b+c+3)<<0);
+}
+
+__inline int16 SW_SHORT_AT(void *b, uint32 os)
+{
+	return ((int16)
+		((int16)*((uint8 *)b+os+0)<<8|
+		 (int16)*((uint8 *)b+os+1)<<0));
+}
+
+__inline uint16 SW_USHORT_AT(void *b, uint32 os)
+{
+	return ((uint16)
+		((uint16)*((uint8 *)b+os+0)<<8|
+		 (uint16)*((uint8 *)b+os+1)<<0));
+}
+
+__inline VOID SW_ULONG_ASSIGN(void *dst, uint32 src)
+{
+	*((uint8*)dst+0)=*((uint8*)&src+3);
+	*((uint8*)dst+1)=*((uint8*)&src+2);
+	*((uint8*)dst+2)=*((uint8*)&src+1);
+	*((uint8*)dst+3)=*((uint8*)&src+0);
+
+}
+
+#ifdef WIN_NT_DRIVER
+
+#define ALLOCATE_MEMORY(dest,type,amount) \
+	  (dest)=ExAllocatePoolWithTag(NonPagedPool,sizeof(type)*(amount), '0TWA');
+#define ALLOCATE_ZERO_MEMORY(dest,type,amount) \
+	{ \
+		(dest)=ExAllocatePoolWithTag(NonPagedPool,sizeof(type)*(amount), '1TWA'); \
+		if ((dest)!=NULL) \
+			RtlZeroMemory((dest),sizeof(type)*(amount)); \
+	}	
+
+#define FREE_MEMORY(dest) ExFreePool(dest);
+#define ZERO_MEMORY(dest,amount) RtlZeroMemory(dest,amount);
+#define COPY_MEMORY(dest,src,amount) RtlCopyMemory(dest,src,amount);
+
+#else
+
+#define ALLOCATE_MEMORY(dest,type,amount) \
+	  (dest)=(type*)GlobalAlloc(GPTR, sizeof(type)*(amount));
+#define ALLOCATE_ZERO_MEMORY(dest,type,amount) \
+	  (dest)=(type*)GlobalAlloc(GPTR, sizeof(type)*(amount));
+
+#define FREE_MEMORY(dest) GlobalFree(dest);
+#define ZERO_MEMORY(dest,amount) RtlZeroMemory(dest,amount);
+#define COPY_MEMORY(dest,src,amount) RtlCopyMemory(dest,src,amount);
+
+
+#endif /*WIN_NT_DRIVER*/
+
+
+
+#endif 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/normal_lookup.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2001 - 2003
+ * NetGroup, Politecnico di Torino (Italy)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the Politecnico di Torino nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef __normal_lookup
+#define __normal_lookup
+
+#ifdef WIN32
+#include "tme.h"
+#endif
+
+#ifdef __FreeBSD__
+
+#ifdef _KERNEL
+#include <net/tme/tme.h>
+#else
+#include <tme/tme.h>
+#endif
+
+#endif
+
+#define NORMAL_LUT_W_INSERT				0x00000000
+uint32 normal_lut_w_insert(uint8 *key, TME_DATA *data, MEM_TYPE *mem_ex, struct time_conv *time_ref);   
+#define NORMAL_LUT_WO_INSERT			0x00000001
+uint32 normal_lut_wo_insert(uint8 *key, TME_DATA *data, MEM_TYPE *mem_ex, struct time_conv *time_ref); 
+#define DUMMY_INSERT					1234
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/ntddndis.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1400 @@
+/*++ BUILD Version: 0001                // Increment this if a change has global effects
+   Copyright (c) 1990-1993  Microsoft Corporation
+   Module Name:
+   ntddndis.h
+   Abstract:
+   This is the include file that defines all constants and types for
+   accessing the Network driver interface device.
+   Author:
+   Steve Wood (stevewo) 27-May-1990
+   Revision History:
+   Adam Barr (adamba)           04-Nov-1992             added the correct values for NDIS 3.0.
+   Jameel Hyder (jameelh)       01-Aug-95               added Pnp IoCTLs and structures
+   Kyle Brandon (kyleb) 09/24/96                added general co ndis oids.
+   -- */
+#ifndef _NTDDNDIS_
+#define _NTDDNDIS_
+//
+// Device Name - this string is the name of the device.  It is the name
+// that should be passed to NtOpenFile when accessing the device.
+//
+// Note:  For devices that support multiple units, it should be suffixed
+//                with the Ascii representation of the unit number.
+//
+#define DD_NDIS_DEVICE_NAME "\\Device\\UNKNOWN"
+//
+// NtDeviceIoControlFile IoControlCode values for this device.
+//
+// Warning:  Remember that the low two bits of the code specify how the
+//                       buffers are passed to the driver!
+//
+#define _NDIS_CONTROL_CODE(request,method) \
+			CTL_CODE(FILE_DEVICE_PHYSICAL_NETCARD, request, method, FILE_ANY_ACCESS)
+#define IOCTL_NDIS_QUERY_GLOBAL_STATS	_NDIS_CONTROL_CODE( 0, METHOD_OUT_DIRECT )
+#define IOCTL_NDIS_QUERY_ALL_STATS		_NDIS_CONTROL_CODE( 1, METHOD_OUT_DIRECT )
+#define IOCTL_NDIS_ADD_DEVICE			_NDIS_CONTROL_CODE( 2, METHOD_BUFFERED )
+#define IOCTL_NDIS_DELETE_DEVICE		_NDIS_CONTROL_CODE( 3, METHOD_BUFFERED )
+#define IOCTL_NDIS_TRANSLATE_NAME		_NDIS_CONTROL_CODE( 4, METHOD_BUFFERED )
+#define IOCTL_NDIS_ADD_TDI_DEVICE		_NDIS_CONTROL_CODE( 5, METHOD_BUFFERED )
+#define IOCTL_NDIS_NOTIFY_PROTOCOL		_NDIS_CONTROL_CODE( 6, METHOD_BUFFERED )
+#define	IOCTL_NDIS_GET_LOG_DATA			_NDIS_CONTROL_CODE( 7, METHOD_OUT_DIRECT )
+//
+// NtDeviceIoControlFile InputBuffer/OutputBuffer record structures for
+// this device.
+//
+//
+// This is the type of an NDIS OID value.
+//
+typedef ULONG NDIS_OID, *PNDIS_OID;
+//
+// IOCTL_NDIS_QUERY_ALL_STATS returns a sequence of these, packed
+// together (no padding is required since statistics all have
+// four or eight bytes of data).
+//
+typedef struct _NDIS_STATISTICS_VALUE {
+    NDIS_OID Oid;
+    ULONG DataLength;
+    UCHAR Data[1];		// variable length
+
+} NDIS_STATISTICS_VALUE, *PNDIS_STATISTICS_VALUE;
+
+//
+// Structure used by TRANSLATE_NAME IOCTL
+//
+typedef struct _NET_PNP_ID {
+    ULONG ClassId;
+    ULONG Token;
+} NET_PNP_ID, *PNET_PNP_ID;
+
+typedef struct _NET_PNP_TRANSLATE_LIST {
+    ULONG BytesNeeded;
+    NET_PNP_ID IdArray[ANYSIZE_ARRAY];
+} NET_PNP_TRANSLATE_LIST, *PNET_PNP_TRANSLATE_LIST;
+
+//
+// Structure used to define a self-contained variable data structure
+//
+typedef struct _NDIS_VAR_DATA_DESC {
+    USHORT Length;		// # of octects of data
+
+    USHORT MaximumLength;	// # of octects available
+
+    LONG Offset;		// Offset of data relative to the descriptor
+
+} NDIS_VAR_DATA_DESC, *PNDIS_VAR_DATA_DESC;
+
+//
+// Object Identifiers used by NdisRequest Query/Set Information
+//
+//
+// General Objects
+//
+#define OID_GEN_SUPPORTED_LIST			  		0x00010101
+#define OID_GEN_HARDWARE_STATUS			 		0x00010102
+#define OID_GEN_MEDIA_SUPPORTED			 		0x00010103
+#define OID_GEN_MEDIA_IN_USE					0x00010104
+#define OID_GEN_MAXIMUM_LOOKAHEAD		   		0x00010105
+#define OID_GEN_MAXIMUM_FRAME_SIZE		  		0x00010106
+#define OID_GEN_LINK_SPEED				  		0x00010107
+#define OID_GEN_TRANSMIT_BUFFER_SPACE	   		0x00010108
+#define OID_GEN_RECEIVE_BUFFER_SPACE			0x00010109
+#define OID_GEN_TRANSMIT_BLOCK_SIZE		 		0x0001010A
+#define OID_GEN_RECEIVE_BLOCK_SIZE		  		0x0001010B
+#define OID_GEN_VENDOR_ID				   		0x0001010C
+#define OID_GEN_VENDOR_DESCRIPTION		  		0x0001010D
+#define OID_GEN_CURRENT_PACKET_FILTER	   		0x0001010E
+#define OID_GEN_CURRENT_LOOKAHEAD		   		0x0001010F
+#define OID_GEN_DRIVER_VERSION			  		0x00010110
+#define OID_GEN_MAXIMUM_TOTAL_SIZE		  		0x00010111
+#define OID_GEN_PROTOCOL_OPTIONS				0x00010112
+#define OID_GEN_MAC_OPTIONS				 		0x00010113
+#define OID_GEN_MEDIA_CONNECT_STATUS			0x00010114
+#define OID_GEN_MAXIMUM_SEND_PACKETS			0x00010115
+#define OID_GEN_VENDOR_DRIVER_VERSION			0x00010116
+#define OID_GEN_XMIT_OK					 		0x00020101
+#define OID_GEN_RCV_OK					  		0x00020102
+#define OID_GEN_XMIT_ERROR				  		0x00020103
+#define OID_GEN_RCV_ERROR				   		0x00020104
+#define OID_GEN_RCV_NO_BUFFER			   		0x00020105
+#define OID_GEN_DIRECTED_BYTES_XMIT		 		0x00020201
+#define OID_GEN_DIRECTED_FRAMES_XMIT			0x00020202
+#define OID_GEN_MULTICAST_BYTES_XMIT			0x00020203
+#define OID_GEN_MULTICAST_FRAMES_XMIT	   		0x00020204
+#define OID_GEN_BROADCAST_BYTES_XMIT			0x00020205
+#define OID_GEN_BROADCAST_FRAMES_XMIT	   		0x00020206
+#define OID_GEN_DIRECTED_BYTES_RCV		  		0x00020207
+#define OID_GEN_DIRECTED_FRAMES_RCV		 		0x00020208
+#define OID_GEN_MULTICAST_BYTES_RCV		 		0x00020209
+#define OID_GEN_MULTICAST_FRAMES_RCV			0x0002020A
+#define OID_GEN_BROADCAST_BYTES_RCV		 		0x0002020B
+#define OID_GEN_BROADCAST_FRAMES_RCV			0x0002020C
+#define OID_GEN_RCV_CRC_ERROR			   		0x0002020D
+#define OID_GEN_TRANSMIT_QUEUE_LENGTH	   		0x0002020E
+#define OID_GEN_GET_TIME_CAPS					0x0002020F
+#define OID_GEN_GET_NETCARD_TIME				0x00020210
+//
+//      These are connection-oriented general OIDs.
+//      These replace the above OIDs for connection-oriented media.
+//
+#define OID_GEN_CO_SUPPORTED_LIST			  	0x00010101
+#define OID_GEN_CO_HARDWARE_STATUS			 	0x00010102
+#define OID_GEN_CO_MEDIA_SUPPORTED			 	0x00010103
+#define OID_GEN_CO_MEDIA_IN_USE					0x00010104
+#define OID_GEN_CO_LINK_SPEED				  	0x00010105
+#define OID_GEN_CO_VENDOR_ID				   	0x00010106
+#define OID_GEN_CO_VENDOR_DESCRIPTION		  	0x00010107
+#define OID_GEN_CO_DRIVER_VERSION			  	0x00010108
+#define OID_GEN_CO_PROTOCOL_OPTIONS				0x00010109
+#define OID_GEN_CO_MAC_OPTIONS				 	0x0001010A
+#define OID_GEN_CO_MEDIA_CONNECT_STATUS			0x0001010B
+#define OID_GEN_CO_VENDOR_DRIVER_VERSION		0x0001010C
+#define OID_GEN_CO_MINIMUM_LINK_SPEED			0x0001010D
+#define OID_GEN_CO_GET_TIME_CAPS				0x00010201
+#define OID_GEN_CO_GET_NETCARD_TIME				0x00010202
+//
+//      These are connection-oriented statistics OIDs.
+//
+#define	OID_GEN_CO_XMIT_PDUS_OK					0x00020101
+#define	OID_GEN_CO_RCV_PDUS_OK					0x00020102
+#define	OID_GEN_CO_XMIT_PDUS_ERROR				0x00020103
+#define	OID_GEN_CO_RCV_PDUS_ERROR				0x00020104
+#define	OID_GEN_CO_RCV_PDUS_NO_BUFFER			0x00020105
+#define	OID_GEN_CO_RCV_CRC_ERROR				0x00020201
+#define OID_GEN_CO_TRANSMIT_QUEUE_LENGTH		0x00020202
+#define	OID_GEN_CO_BYTES_XMIT					0x00020203
+#define OID_GEN_CO_BYTES_RCV					0x00020204
+#define	OID_GEN_CO_BYTES_XMIT_OUTSTANDING		0x00020205
+#define	OID_GEN_CO_NETCARD_LOAD					0x00020206
+//
+// These are objects for Connection-oriented media call-managers and are not
+// valid for ndis drivers. Under construction.
+//
+#define OID_CO_ADD_PVC							0xFF000001
+#define OID_CO_DELETE_PVC						0xFF000002
+#define OID_CO_GET_CALL_INFORMATION				0xFF000003
+#define OID_CO_ADD_ADDRESS						0xFF000004
+#define OID_CO_DELETE_ADDRESS					0xFF000005
+#define OID_CO_GET_ADDRESSES					0xFF000006
+#define OID_CO_ADDRESS_CHANGE					0xFF000007
+#define OID_CO_SIGNALING_ENABLED				0xFF000008
+#define OID_CO_SIGNALING_DISABLED				0xFF000009
+//
+// 802.3 Objects (Ethernet)
+//
+#define OID_802_3_PERMANENT_ADDRESS		 		0x01010101
+#define OID_802_3_CURRENT_ADDRESS		   		0x01010102
+#define OID_802_3_MULTICAST_LIST				0x01010103
+#define OID_802_3_MAXIMUM_LIST_SIZE		 		0x01010104
+#define OID_802_3_MAC_OPTIONS				 	0x01010105
+//
+//
+#define	NDIS_802_3_MAC_OPTION_PRIORITY			0x00000001
+#define OID_802_3_RCV_ERROR_ALIGNMENT	   		0x01020101
+#define OID_802_3_XMIT_ONE_COLLISION			0x01020102
+#define OID_802_3_XMIT_MORE_COLLISIONS	  		0x01020103
+#define OID_802_3_XMIT_DEFERRED			 		0x01020201
+#define OID_802_3_XMIT_MAX_COLLISIONS	   		0x01020202
+#define OID_802_3_RCV_OVERRUN			   		0x01020203
+#define OID_802_3_XMIT_UNDERRUN			 		0x01020204
+#define OID_802_3_XMIT_HEARTBEAT_FAILURE		0x01020205
+#define OID_802_3_XMIT_TIMES_CRS_LOST	   		0x01020206
+#define OID_802_3_XMIT_LATE_COLLISIONS	  		0x01020207
+//
+// 802.5 Objects (Token-Ring)
+//
+#define OID_802_5_PERMANENT_ADDRESS		 		0x02010101
+#define OID_802_5_CURRENT_ADDRESS		   		0x02010102
+#define OID_802_5_CURRENT_FUNCTIONAL			0x02010103
+#define OID_802_5_CURRENT_GROUP			 		0x02010104
+#define OID_802_5_LAST_OPEN_STATUS		  		0x02010105
+#define OID_802_5_CURRENT_RING_STATUS	   		0x02010106
+#define OID_802_5_CURRENT_RING_STATE			0x02010107
+#define OID_802_5_LINE_ERRORS			   		0x02020101
+#define OID_802_5_LOST_FRAMES			   		0x02020102
+#define OID_802_5_BURST_ERRORS			  		0x02020201
+#define OID_802_5_AC_ERRORS				 		0x02020202
+#define OID_802_5_ABORT_DELIMETERS		  		0x02020203
+#define OID_802_5_FRAME_COPIED_ERRORS	   		0x02020204
+#define OID_802_5_FREQUENCY_ERRORS		  		0x02020205
+#define OID_802_5_TOKEN_ERRORS			  		0x02020206
+#define OID_802_5_INTERNAL_ERRORS		   		0x02020207
+//
+// FDDI Objects
+//
+#define OID_FDDI_LONG_PERMANENT_ADDR			0x03010101
+#define OID_FDDI_LONG_CURRENT_ADDR		  		0x03010102
+#define OID_FDDI_LONG_MULTICAST_LIST			0x03010103
+#define OID_FDDI_LONG_MAX_LIST_SIZE		 		0x03010104
+#define OID_FDDI_SHORT_PERMANENT_ADDR	   		0x03010105
+#define OID_FDDI_SHORT_CURRENT_ADDR		 		0x03010106
+#define OID_FDDI_SHORT_MULTICAST_LIST	   		0x03010107
+#define OID_FDDI_SHORT_MAX_LIST_SIZE			0x03010108
+#define OID_FDDI_ATTACHMENT_TYPE				0x03020101
+#define OID_FDDI_UPSTREAM_NODE_LONG		 		0x03020102
+#define OID_FDDI_DOWNSTREAM_NODE_LONG	   		0x03020103
+#define OID_FDDI_FRAME_ERRORS			   		0x03020104
+#define OID_FDDI_FRAMES_LOST					0x03020105
+#define OID_FDDI_RING_MGT_STATE			 		0x03020106
+#define OID_FDDI_LCT_FAILURES			   		0x03020107
+#define OID_FDDI_LEM_REJECTS					0x03020108
+#define OID_FDDI_LCONNECTION_STATE		  		0x03020109
+#define OID_FDDI_SMT_STATION_ID			 		0x03030201
+#define OID_FDDI_SMT_OP_VERSION_ID		  		0x03030202
+#define OID_FDDI_SMT_HI_VERSION_ID		  		0x03030203
+#define OID_FDDI_SMT_LO_VERSION_ID		  		0x03030204
+#define OID_FDDI_SMT_MANUFACTURER_DATA	  		0x03030205
+#define OID_FDDI_SMT_USER_DATA			  		0x03030206
+#define OID_FDDI_SMT_MIB_VERSION_ID		 		0x03030207
+#define OID_FDDI_SMT_MAC_CT				 		0x03030208
+#define OID_FDDI_SMT_NON_MASTER_CT		  		0x03030209
+#define OID_FDDI_SMT_MASTER_CT			  		0x0303020A
+#define OID_FDDI_SMT_AVAILABLE_PATHS			0x0303020B
+#define OID_FDDI_SMT_CONFIG_CAPABILITIES		0x0303020C
+#define OID_FDDI_SMT_CONFIG_POLICY		  		0x0303020D
+#define OID_FDDI_SMT_CONNECTION_POLICY	  		0x0303020E
+#define OID_FDDI_SMT_T_NOTIFY			   		0x0303020F
+#define OID_FDDI_SMT_STAT_RPT_POLICY			0x03030210
+#define OID_FDDI_SMT_TRACE_MAX_EXPIRATION   	0x03030211
+#define OID_FDDI_SMT_PORT_INDEXES		   		0x03030212
+#define OID_FDDI_SMT_MAC_INDEXES				0x03030213
+#define OID_FDDI_SMT_BYPASS_PRESENT		 		0x03030214
+#define OID_FDDI_SMT_ECM_STATE			  		0x03030215
+#define OID_FDDI_SMT_CF_STATE			   		0x03030216
+#define OID_FDDI_SMT_HOLD_STATE			 		0x03030217
+#define OID_FDDI_SMT_REMOTE_DISCONNECT_FLAG 	0x03030218
+#define OID_FDDI_SMT_STATION_STATUS		 		0x03030219
+#define OID_FDDI_SMT_PEER_WRAP_FLAG		 		0x0303021A
+#define OID_FDDI_SMT_MSG_TIME_STAMP		 		0x0303021B
+#define OID_FDDI_SMT_TRANSITION_TIME_STAMP  	0x0303021C
+#define OID_FDDI_SMT_SET_COUNT			  		0x0303021D
+#define OID_FDDI_SMT_LAST_SET_STATION_ID		0x0303021E
+#define OID_FDDI_MAC_FRAME_STATUS_FUNCTIONS 	0x0303021F
+#define OID_FDDI_MAC_BRIDGE_FUNCTIONS	   		0x03030220
+#define OID_FDDI_MAC_T_MAX_CAPABILITY	   		0x03030221
+#define OID_FDDI_MAC_TVX_CAPABILITY		 		0x03030222
+#define OID_FDDI_MAC_AVAILABLE_PATHS			0x03030223
+#define OID_FDDI_MAC_CURRENT_PATH		   		0x03030224
+#define OID_FDDI_MAC_UPSTREAM_NBR		   		0x03030225
+#define OID_FDDI_MAC_DOWNSTREAM_NBR		 		0x03030226
+#define OID_FDDI_MAC_OLD_UPSTREAM_NBR	   		0x03030227
+#define OID_FDDI_MAC_OLD_DOWNSTREAM_NBR	 		0x03030228
+#define OID_FDDI_MAC_DUP_ADDRESS_TEST	   		0x03030229
+#define OID_FDDI_MAC_REQUESTED_PATHS			0x0303022A
+#define OID_FDDI_MAC_DOWNSTREAM_PORT_TYPE   	0x0303022B
+#define OID_FDDI_MAC_INDEX				  		0x0303022C
+#define OID_FDDI_MAC_SMT_ADDRESS				0x0303022D
+#define OID_FDDI_MAC_LONG_GRP_ADDRESS	   		0x0303022E
+#define OID_FDDI_MAC_SHORT_GRP_ADDRESS	  		0x0303022F
+#define OID_FDDI_MAC_T_REQ				  		0x03030230
+#define OID_FDDI_MAC_T_NEG				  		0x03030231
+#define OID_FDDI_MAC_T_MAX				  		0x03030232
+#define OID_FDDI_MAC_TVX_VALUE			  		0x03030233
+#define OID_FDDI_MAC_T_PRI0				 		0x03030234
+#define OID_FDDI_MAC_T_PRI1				 		0x03030235
+#define OID_FDDI_MAC_T_PRI2				 		0x03030236
+#define OID_FDDI_MAC_T_PRI3				 		0x03030237
+#define OID_FDDI_MAC_T_PRI4				 		0x03030238
+#define OID_FDDI_MAC_T_PRI5				 		0x03030239
+#define OID_FDDI_MAC_T_PRI6				 		0x0303023A
+#define OID_FDDI_MAC_FRAME_CT			   		0x0303023B
+#define OID_FDDI_MAC_COPIED_CT			  		0x0303023C
+#define OID_FDDI_MAC_TRANSMIT_CT				0x0303023D
+#define OID_FDDI_MAC_TOKEN_CT			   		0x0303023E
+#define OID_FDDI_MAC_ERROR_CT			   		0x0303023F
+#define OID_FDDI_MAC_LOST_CT					0x03030240
+#define OID_FDDI_MAC_TVX_EXPIRED_CT		 		0x03030241
+#define OID_FDDI_MAC_NOT_COPIED_CT		  		0x03030242
+#define OID_FDDI_MAC_LATE_CT					0x03030243
+#define OID_FDDI_MAC_RING_OP_CT			 		0x03030244
+#define OID_FDDI_MAC_FRAME_ERROR_THRESHOLD  	0x03030245
+#define OID_FDDI_MAC_FRAME_ERROR_RATIO	  		0x03030246
+#define OID_FDDI_MAC_NOT_COPIED_THRESHOLD   	0x03030247
+#define OID_FDDI_MAC_NOT_COPIED_RATIO	   		0x03030248
+#define OID_FDDI_MAC_RMT_STATE			  		0x03030249
+#define OID_FDDI_MAC_DA_FLAG					0x0303024A
+#define OID_FDDI_MAC_UNDA_FLAG			  		0x0303024B
+#define OID_FDDI_MAC_FRAME_ERROR_FLAG	   		0x0303024C
+#define OID_FDDI_MAC_NOT_COPIED_FLAG			0x0303024D
+#define OID_FDDI_MAC_MA_UNITDATA_AVAILABLE  	0x0303024E
+#define OID_FDDI_MAC_HARDWARE_PRESENT	   		0x0303024F
+#define OID_FDDI_MAC_MA_UNITDATA_ENABLE	 		0x03030250
+#define OID_FDDI_PATH_INDEX				 		0x03030251
+#define OID_FDDI_PATH_RING_LATENCY		  		0x03030252
+#define OID_FDDI_PATH_TRACE_STATUS		  		0x03030253
+#define OID_FDDI_PATH_SBA_PAYLOAD		   		0x03030254
+#define OID_FDDI_PATH_SBA_OVERHEAD		  		0x03030255
+#define OID_FDDI_PATH_CONFIGURATION		 		0x03030256
+#define OID_FDDI_PATH_T_R_MODE			  		0x03030257
+#define OID_FDDI_PATH_SBA_AVAILABLE		 		0x03030258
+#define OID_FDDI_PATH_TVX_LOWER_BOUND	   		0x03030259
+#define OID_FDDI_PATH_T_MAX_LOWER_BOUND	 		0x0303025A
+#define OID_FDDI_PATH_MAX_T_REQ			 		0x0303025B
+#define OID_FDDI_PORT_MY_TYPE			   		0x0303025C
+#define OID_FDDI_PORT_NEIGHBOR_TYPE		 		0x0303025D
+#define OID_FDDI_PORT_CONNECTION_POLICIES   	0x0303025E
+#define OID_FDDI_PORT_MAC_INDICATED		 		0x0303025F
+#define OID_FDDI_PORT_CURRENT_PATH		  		0x03030260
+#define OID_FDDI_PORT_REQUESTED_PATHS	   		0x03030261
+#define OID_FDDI_PORT_MAC_PLACEMENT		 		0x03030262
+#define OID_FDDI_PORT_AVAILABLE_PATHS	   		0x03030263
+#define OID_FDDI_PORT_MAC_LOOP_TIME		 		0x03030264
+#define OID_FDDI_PORT_PMD_CLASS			 		0x03030265
+#define OID_FDDI_PORT_CONNECTION_CAPABILITIES	0x03030266
+#define OID_FDDI_PORT_INDEX				 		0x03030267
+#define OID_FDDI_PORT_MAINT_LS			  		0x03030268
+#define OID_FDDI_PORT_BS_FLAG			   		0x03030269
+#define OID_FDDI_PORT_PC_LS				 		0x0303026A
+#define OID_FDDI_PORT_EB_ERROR_CT		   		0x0303026B
+#define OID_FDDI_PORT_LCT_FAIL_CT		   		0x0303026C
+#define OID_FDDI_PORT_LER_ESTIMATE		  		0x0303026D
+#define OID_FDDI_PORT_LEM_REJECT_CT		 		0x0303026E
+#define OID_FDDI_PORT_LEM_CT					0x0303026F
+#define OID_FDDI_PORT_LER_CUTOFF				0x03030270
+#define OID_FDDI_PORT_LER_ALARM			 		0x03030271
+#define OID_FDDI_PORT_CONNNECT_STATE			0x03030272
+#define OID_FDDI_PORT_PCM_STATE			 		0x03030273
+#define OID_FDDI_PORT_PC_WITHHOLD		   		0x03030274
+#define OID_FDDI_PORT_LER_FLAG			  		0x03030275
+#define OID_FDDI_PORT_HARDWARE_PRESENT	  		0x03030276
+#define OID_FDDI_SMT_STATION_ACTION		 		0x03030277
+#define OID_FDDI_PORT_ACTION					0x03030278
+#define OID_FDDI_IF_DESCR				   		0x03030279
+#define OID_FDDI_IF_TYPE						0x0303027A
+#define OID_FDDI_IF_MTU					 		0x0303027B
+#define OID_FDDI_IF_SPEED				   		0x0303027C
+#define OID_FDDI_IF_PHYS_ADDRESS				0x0303027D
+#define OID_FDDI_IF_ADMIN_STATUS				0x0303027E
+#define OID_FDDI_IF_OPER_STATUS			 		0x0303027F
+#define OID_FDDI_IF_LAST_CHANGE			 		0x03030280
+#define OID_FDDI_IF_IN_OCTETS			   		0x03030281
+#define OID_FDDI_IF_IN_UCAST_PKTS		   		0x03030282
+#define OID_FDDI_IF_IN_NUCAST_PKTS		  		0x03030283
+#define OID_FDDI_IF_IN_DISCARDS			 		0x03030284
+#define OID_FDDI_IF_IN_ERRORS			   		0x03030285
+#define OID_FDDI_IF_IN_UNKNOWN_PROTOS	   		0x03030286
+#define OID_FDDI_IF_OUT_OCTETS			  		0x03030287
+#define OID_FDDI_IF_OUT_UCAST_PKTS		  		0x03030288
+#define OID_FDDI_IF_OUT_NUCAST_PKTS		 		0x03030289
+#define OID_FDDI_IF_OUT_DISCARDS				0x0303028A
+#define OID_FDDI_IF_OUT_ERRORS			  		0x0303028B
+#define OID_FDDI_IF_OUT_QLEN					0x0303028C
+#define OID_FDDI_IF_SPECIFIC					0x0303028D
+//
+// WAN objects
+//
+#define OID_WAN_PERMANENT_ADDRESS		   		0x04010101
+#define OID_WAN_CURRENT_ADDRESS			 		0x04010102
+#define OID_WAN_QUALITY_OF_SERVICE		  		0x04010103
+#define OID_WAN_PROTOCOL_TYPE			   		0x04010104
+#define OID_WAN_MEDIUM_SUBTYPE			  		0x04010105
+#define OID_WAN_HEADER_FORMAT			   		0x04010106
+#define OID_WAN_GET_INFO						0x04010107
+#define OID_WAN_SET_LINK_INFO			   		0x04010108
+#define OID_WAN_GET_LINK_INFO			   		0x04010109
+#define OID_WAN_LINE_COUNT				  		0x0401010A
+#define OID_WAN_GET_BRIDGE_INFO			 		0x0401020A
+#define OID_WAN_SET_BRIDGE_INFO			 		0x0401020B
+#define OID_WAN_GET_COMP_INFO			   		0x0401020C
+#define OID_WAN_SET_COMP_INFO			   		0x0401020D
+#define OID_WAN_GET_STATS_INFO			  		0x0401020E
+//
+// LocalTalk objects
+//
+#define OID_LTALK_CURRENT_NODE_ID		   		0x05010102
+#define OID_LTALK_IN_BROADCASTS			 		0x05020101
+#define OID_LTALK_IN_LENGTH_ERRORS		  		0x05020102
+#define OID_LTALK_OUT_NO_HANDLERS		   		0x05020201
+#define OID_LTALK_COLLISIONS					0x05020202
+#define OID_LTALK_DEFERS						0x05020203
+#define OID_LTALK_NO_DATA_ERRORS				0x05020204
+#define OID_LTALK_RANDOM_CTS_ERRORS		 		0x05020205
+#define OID_LTALK_FCS_ERRORS					0x05020206
+//
+// Arcnet objects
+//
+#define OID_ARCNET_PERMANENT_ADDRESS			0x06010101
+#define OID_ARCNET_CURRENT_ADDRESS		  		0x06010102
+#define OID_ARCNET_RECONFIGURATIONS		 		0x06020201
+//
+// TAPI objects
+//
+#define OID_TAPI_ACCEPT					 		0x07030101
+#define OID_TAPI_ANSWER					 		0x07030102
+#define OID_TAPI_CLOSE					  		0x07030103
+#define OID_TAPI_CLOSE_CALL				 		0x07030104
+#define OID_TAPI_CONDITIONAL_MEDIA_DETECTION	0x07030105
+#define OID_TAPI_CONFIG_DIALOG			  		0x07030106
+#define OID_TAPI_DEV_SPECIFIC			   		0x07030107
+#define OID_TAPI_DIAL					   		0x07030108
+#define OID_TAPI_DROP					   		0x07030109
+#define OID_TAPI_GET_ADDRESS_CAPS		   		0x0703010A
+#define OID_TAPI_GET_ADDRESS_ID			 		0x0703010B
+#define OID_TAPI_GET_ADDRESS_STATUS		 		0x0703010C
+#define OID_TAPI_GET_CALL_ADDRESS_ID			0x0703010D
+#define OID_TAPI_GET_CALL_INFO			  		0x0703010E
+#define OID_TAPI_GET_CALL_STATUS				0x0703010F
+#define OID_TAPI_GET_DEV_CAPS			   		0x07030110
+#define OID_TAPI_GET_DEV_CONFIG			 		0x07030111
+#define OID_TAPI_GET_EXTENSION_ID		   		0x07030112
+#define OID_TAPI_GET_ID					 		0x07030113
+#define OID_TAPI_GET_LINE_DEV_STATUS			0x07030114
+#define OID_TAPI_MAKE_CALL				  		0x07030115
+#define OID_TAPI_NEGOTIATE_EXT_VERSION	  		0x07030116
+#define OID_TAPI_OPEN					   		0x07030117
+#define OID_TAPI_PROVIDER_INITIALIZE			0x07030118
+#define OID_TAPI_PROVIDER_SHUTDOWN		  		0x07030119
+#define OID_TAPI_SECURE_CALL					0x0703011A
+#define OID_TAPI_SELECT_EXT_VERSION		 		0x0703011B
+#define OID_TAPI_SEND_USER_USER_INFO			0x0703011C
+#define OID_TAPI_SET_APP_SPECIFIC		   		0x0703011D
+#define OID_TAPI_SET_CALL_PARAMS				0x0703011E
+#define OID_TAPI_SET_DEFAULT_MEDIA_DETECTION	0x0703011F
+#define OID_TAPI_SET_DEV_CONFIG			 		0x07030120
+#define OID_TAPI_SET_MEDIA_MODE			 		0x07030121
+#define OID_TAPI_SET_STATUS_MESSAGES			0x07030122
+//
+// ATM Connection Oriented Ndis
+//
+#define OID_ATM_SUPPORTED_VC_RATES				0x08010101
+#define OID_ATM_SUPPORTED_SERVICE_CATEGORY		0x08010102
+#define OID_ATM_SUPPORTED_AAL_TYPES				0x08010103
+#define OID_ATM_HW_CURRENT_ADDRESS				0x08010104
+#define OID_ATM_MAX_ACTIVE_VCS					0x08010105
+#define OID_ATM_MAX_ACTIVE_VCI_BITS				0x08010106
+#define OID_ATM_MAX_ACTIVE_VPI_BITS				0x08010107
+#define OID_ATM_MAX_AAL0_PACKET_SIZE			0x08010108
+#define OID_ATM_MAX_AAL1_PACKET_SIZE			0x08010109
+#define OID_ATM_MAX_AAL34_PACKET_SIZE			0x0801010A
+#define OID_ATM_MAX_AAL5_PACKET_SIZE			0x0801010B
+#define OID_ATM_SIGNALING_VPIVCI				0x08010201
+#define OID_ATM_ASSIGNED_VPI					0x08010202
+#define OID_ATM_ACQUIRE_ACCESS_NET_RESOURCES	0x08010203
+#define OID_ATM_RELEASE_ACCESS_NET_RESOURCES	0x08010204
+#define OID_ATM_ILMI_VPIVCI						0x08010205
+#define OID_ATM_DIGITAL_BROADCAST_VPIVCI		0x08010206
+#define	OID_ATM_GET_NEAREST_FLOW				0x08010207
+#define OID_ATM_ALIGNMENT_REQUIRED				0x08010208
+//
+//      ATM specific statistics OIDs.
+//
+#define	OID_ATM_RCV_CELLS_OK					0x08020101
+#define	OID_ATM_XMIT_CELLS_OK					0x08020102
+#define	OID_ATM_RCV_CELLS_DROPPED				0x08020103
+#define	OID_ATM_RCV_INVALID_VPI_VCI				0x08020201
+#define	OID_ATM_CELLS_HEC_ERROR					0x08020202
+#define	OID_ATM_RCV_REASSEMBLY_ERROR			0x08020203
+//
+// PCCA (Wireless) object
+//
+//
+// All WirelessWAN devices must support the following OIDs
+//
+#define OID_WW_GEN_NETWORK_TYPES_SUPPORTED		0x09010101
+#define OID_WW_GEN_NETWORK_TYPE_IN_USE			0x09010102
+#define OID_WW_GEN_HEADER_FORMATS_SUPPORTED		0x09010103
+#define OID_WW_GEN_HEADER_FORMAT_IN_USE			0x09010104
+#define OID_WW_GEN_INDICATION_REQUEST			0x09010105
+#define OID_WW_GEN_DEVICE_INFO					0x09010106
+#define OID_WW_GEN_OPERATION_MODE				0x09010107
+#define OID_WW_GEN_LOCK_STATUS					0x09010108
+#define OID_WW_GEN_DISABLE_TRANSMITTER			0x09010109
+#define OID_WW_GEN_NETWORK_ID					0x0901010A
+#define OID_WW_GEN_PERMANENT_ADDRESS			0x0901010B
+#define OID_WW_GEN_CURRENT_ADDRESS				0x0901010C
+#define OID_WW_GEN_SUSPEND_DRIVER				0x0901010D
+#define OID_WW_GEN_BASESTATION_ID				0x0901010E
+#define OID_WW_GEN_CHANNEL_ID					0x0901010F
+#define OID_WW_GEN_ENCRYPTION_SUPPORTED			0x09010110
+#define OID_WW_GEN_ENCRYPTION_IN_USE			0x09010111
+#define OID_WW_GEN_ENCRYPTION_STATE				0x09010112
+#define OID_WW_GEN_CHANNEL_QUALITY				0x09010113
+#define OID_WW_GEN_REGISTRATION_STATUS			0x09010114
+#define OID_WW_GEN_RADIO_LINK_SPEED				0x09010115
+#define OID_WW_GEN_LATENCY						0x09010116
+#define OID_WW_GEN_BATTERY_LEVEL				0x09010117
+#define OID_WW_GEN_EXTERNAL_POWER				0x09010118
+//
+// Network Dependent OIDs - Mobitex:
+//
+#define OID_WW_MBX_SUBADDR						0x09050101
+// OID 0x09050102 is reserved and may not be used
+#define OID_WW_MBX_FLEXLIST						0x09050103
+#define OID_WW_MBX_GROUPLIST					0x09050104
+#define OID_WW_MBX_TRAFFIC_AREA					0x09050105
+#define OID_WW_MBX_LIVE_DIE						0x09050106
+#define OID_WW_MBX_TEMP_DEFAULTLIST				0x09050107
+//
+// Network Dependent OIDs - Pinpoint:
+//
+#define OID_WW_PIN_LOC_AUTHORIZE				0x09090101
+#define OID_WW_PIN_LAST_LOCATION				0x09090102
+#define OID_WW_PIN_LOC_FIX						0x09090103
+//
+// Network Dependent - CDPD:
+//
+#define OID_WW_CDPD_SPNI						0x090D0101
+#define OID_WW_CDPD_WASI						0x090D0102
+#define OID_WW_CDPD_AREA_COLOR					0x090D0103
+#define OID_WW_CDPD_TX_POWER_LEVEL				0x090D0104
+#define OID_WW_CDPD_EID							0x090D0105
+#define OID_WW_CDPD_HEADER_COMPRESSION			0x090D0106
+#define OID_WW_CDPD_DATA_COMPRESSION			0x090D0107
+#define OID_WW_CDPD_CHANNEL_SELECT				0x090D0108
+#define OID_WW_CDPD_CHANNEL_STATE				0x090D0109
+#define OID_WW_CDPD_NEI							0x090D010A
+#define OID_WW_CDPD_NEI_STATE					0x090D010B
+#define OID_WW_CDPD_SERVICE_PROVIDER_IDENTIFIER	0x090D010C
+#define OID_WW_CDPD_SLEEP_MODE					0x090D010D
+#define OID_WW_CDPD_CIRCUIT_SWITCHED			0x090D010E
+#define	OID_WW_CDPD_TEI							0x090D010F
+#define	OID_WW_CDPD_RSSI						0x090D0110
+//
+// Network Dependent - Ardis:
+//
+#define OID_WW_ARD_SNDCP						0x09110101
+#define OID_WW_ARD_TMLY_MSG						0x09110102
+#define OID_WW_ARD_DATAGRAM						0x09110103
+//
+// Network Dependent - DataTac:
+//
+#define OID_WW_TAC_COMPRESSION					0x09150101
+#define OID_WW_TAC_SET_CONFIG					0x09150102
+#define OID_WW_TAC_GET_STATUS					0x09150103
+#define OID_WW_TAC_USER_HEADER					0x09150104
+//
+// Network Dependent - Metricom:
+//
+#define OID_WW_MET_FUNCTION						0x09190101
+//
+// IRDA objects
+//
+#define OID_IRDA_RECEIVING						0x0A010100
+#define OID_IRDA_TURNAROUND_TIME				0x0A010101
+#define OID_IRDA_SUPPORTED_SPEEDS				0x0A010102
+#define OID_IRDA_LINK_SPEED						0x0A010103
+#define OID_IRDA_MEDIA_BUSY						0x0A010104
+#define OID_IRDA_EXTRA_RCV_BOFS					0x0A010200
+#define OID_IRDA_RATE_SNIFF						0x0A010201
+#define OID_IRDA_UNICAST_LIST					0x0A010202
+#define OID_IRDA_MAX_UNICAST_LIST_SIZE			0x0A010203
+#define OID_IRDA_MAX_RECEIVE_WINDOW_SIZE		0x0A010204
+#define OID_IRDA_MAX_SEND_WINDOW_SIZE			0x0A010205
+//
+// Medium the Ndis Driver is running on (OID_GEN_MEDIA_SUPPORTED/
+// OID_GEN_MEDIA_IN_USE).
+//
+typedef enum _NDIS_MEDIUM {
+    NdisMedium802_3,
+    NdisMedium802_5,
+    NdisMediumFddi,
+    NdisMediumWan,
+    NdisMediumLocalTalk,
+    NdisMediumDix,		// defined for convenience, not a real medium
+     NdisMediumArcnetRaw,
+    NdisMediumArcnet878_2,
+    NdisMediumAtm,
+    NdisMediumWirelessWan,
+    NdisMediumIrda,
+    NdisMediumMax		// Not a real medium, defined as an upper-bound
+} NDIS_MEDIUM, *PNDIS_MEDIUM;
+
+//
+// Hardware status codes (OID_GEN_HARDWARE_STATUS).
+//
+typedef enum _NDIS_HARDWARE_STATUS {
+    NdisHardwareStatusReady,
+    NdisHardwareStatusInitializing,
+    NdisHardwareStatusReset,
+    NdisHardwareStatusClosing,
+    NdisHardwareStatusNotReady
+} NDIS_HARDWARE_STATUS, *PNDIS_HARDWARE_STATUS;
+
+//
+// this is the type passed in the OID_GEN_GET_TIME_CAPS request
+//
+typedef struct _GEN_GET_TIME_CAPS {
+    ULONG Flags;		// Bits defined below
+
+    ULONG ClockPrecision;
+} GEN_GET_TIME_CAPS, *PGEN_GET_TIME_CAPS;
+
+#define	READABLE_LOCAL_CLOCK					0x000000001
+#define	CLOCK_NETWORK_DERIVED					0x000000002
+#define	CLOCK_PRECISION							0x000000004
+#define	RECEIVE_TIME_INDICATION_CAPABLE			0x000000008
+#define	TIMED_SEND_CAPABLE						0x000000010
+#define	TIME_STAMP_CAPABLE						0x000000020
+//
+//
+// this is the type passed in the OID_GEN_GET_NETCARD_TIME request
+//
+typedef struct _GEN_GET_NETCARD_TIME {
+    ULONG ReadTime;
+} GEN_GET_NETCARD_TIME, *PGEN_GET_NETCARD_TIME;
+
+//
+// Defines the attachment types for FDDI (OID_FDDI_ATTACHMENT_TYPE).
+//
+typedef enum _NDIS_FDDI_ATTACHMENT_TYPE {
+    NdisFddiTypeIsolated = 1,
+    NdisFddiTypeLocalA,
+    NdisFddiTypeLocalB,
+    NdisFddiTypeLocalAB,
+    NdisFddiTypeLocalS,
+    NdisFddiTypeWrapA,
+    NdisFddiTypeWrapB,
+    NdisFddiTypeWrapAB,
+    NdisFddiTypeWrapS,
+    NdisFddiTypeCWrapA,
+    NdisFddiTypeCWrapB,
+    NdisFddiTypeCWrapS,
+    NdisFddiTypeThrough
+} NDIS_FDDI_ATTACHMENT_TYPE, *PNDIS_FDDI_ATTACHMENT_TYPE;
+
+//
+// Defines the ring management states for FDDI (OID_FDDI_RING_MGT_STATE).
+//
+typedef enum _NDIS_FDDI_RING_MGT_STATE {
+    NdisFddiRingIsolated = 1,
+    NdisFddiRingNonOperational,
+    NdisFddiRingOperational,
+    NdisFddiRingDetect,
+    NdisFddiRingNonOperationalDup,
+    NdisFddiRingOperationalDup,
+    NdisFddiRingDirected,
+    NdisFddiRingTrace
+} NDIS_FDDI_RING_MGT_STATE, *PNDIS_FDDI_RING_MGT_STATE;
+
+//
+// Defines the Lconnection state for FDDI (OID_FDDI_LCONNECTION_STATE).
+//
+typedef enum _NDIS_FDDI_LCONNECTION_STATE {
+    NdisFddiStateOff = 1,
+    NdisFddiStateBreak,
+    NdisFddiStateTrace,
+    NdisFddiStateConnect,
+    NdisFddiStateNext,
+    NdisFddiStateSignal,
+    NdisFddiStateJoin,
+    NdisFddiStateVerify,
+    NdisFddiStateActive,
+    NdisFddiStateMaintenance
+} NDIS_FDDI_LCONNECTION_STATE, *PNDIS_FDDI_LCONNECTION_STATE;
+
+//
+// Defines the medium subtypes for WAN medium (OID_WAN_MEDIUM_SUBTYPE).
+//
+typedef enum _NDIS_WAN_MEDIUM_SUBTYPE {
+    NdisWanMediumHub,
+    NdisWanMediumX_25,
+    NdisWanMediumIsdn,
+    NdisWanMediumSerial,
+    NdisWanMediumFrameRelay,
+    NdisWanMediumAtm,
+    NdisWanMediumSonet,
+    NdisWanMediumSW56K
+} NDIS_WAN_MEDIUM_SUBTYPE, *PNDIS_WAN_MEDIUM_SUBTYPE;
+
+//
+// Defines the header format for WAN medium (OID_WAN_HEADER_FORMAT).
+//
+typedef enum _NDIS_WAN_HEADER_FORMAT {
+    NdisWanHeaderNative,	// src/dest based on subtype, followed by NLPID
+     NdisWanHeaderEthernet	// emulation of ethernet header
+} NDIS_WAN_HEADER_FORMAT, *PNDIS_WAN_HEADER_FORMAT;
+
+//
+// Defines the line quality on a WAN line (OID_WAN_QUALITY_OF_SERVICE).
+//
+typedef enum _NDIS_WAN_QUALITY {
+    NdisWanRaw,
+    NdisWanErrorControl,
+    NdisWanReliable
+} NDIS_WAN_QUALITY, *PNDIS_WAN_QUALITY;
+
+//
+// Defines the state of a token-ring adapter (OID_802_5_CURRENT_RING_STATE).
+//
+typedef enum _NDIS_802_5_RING_STATE {
+    NdisRingStateOpened = 1,
+    NdisRingStateClosed,
+    NdisRingStateOpening,
+    NdisRingStateClosing,
+    NdisRingStateOpenFailure,
+    NdisRingStateRingFailure
+} NDIS_802_5_RING_STATE, *PNDIS_802_5_RING_STATE;
+
+//
+// Defines the state of the LAN media
+//
+typedef enum _NDIS_MEDIA_STATE {
+    NdisMediaStateConnected,
+    NdisMediaStateDisconnected
+} NDIS_MEDIA_STATE, *PNDIS_MEDIA_STATE;
+
+//
+// The following is set on a per-packet basis as OOB data with NdisClass802_3Priority
+//
+typedef ULONG Priority_802_3;	// 0-7 priority levels
+//
+//      The following structure is used to query OID_GEN_CO_LINK_SPEED and
+//      OID_GEN_CO_MINIMUM_LINK_SPEED.  The first OID will return the current
+//      link speed of the adapter.  The second will return the minimum link speed
+//      the adapter is capable of.
+//
+
+typedef struct _NDIS_CO_LINK_SPEED {
+    ULONG Outbound;
+    ULONG Inbound;
+} NDIS_CO_LINK_SPEED,
+
+*PNDIS_CO_LINK_SPEED;
+//
+// Ndis Packet Filter Bits (OID_GEN_CURRENT_PACKET_FILTER).
+//
+#define NDIS_PACKET_TYPE_DIRECTED				0x0001
+#define NDIS_PACKET_TYPE_MULTICAST				0x0002
+#define NDIS_PACKET_TYPE_ALL_MULTICAST			0x0004
+#define NDIS_PACKET_TYPE_BROADCAST				0x0008
+#define NDIS_PACKET_TYPE_SOURCE_ROUTING			0x0010
+#define NDIS_PACKET_TYPE_PROMISCUOUS			0x0020
+#define NDIS_PACKET_TYPE_SMT					0x0040
+#define NDIS_PACKET_TYPE_ALL_LOCAL				0x0080
+#define NDIS_PACKET_TYPE_MAC_FRAME				0x8000
+#define NDIS_PACKET_TYPE_FUNCTIONAL				0x4000
+#define NDIS_PACKET_TYPE_ALL_FUNCTIONAL			0x2000
+#define NDIS_PACKET_TYPE_GROUP					0x1000
+//
+// Ndis Token-Ring Ring Status Codes (OID_802_5_CURRENT_RING_STATUS).
+//
+#define NDIS_RING_SIGNAL_LOSS					0x00008000
+#define NDIS_RING_HARD_ERROR					0x00004000
+#define NDIS_RING_SOFT_ERROR					0x00002000
+#define NDIS_RING_TRANSMIT_BEACON				0x00001000
+#define NDIS_RING_LOBE_WIRE_FAULT				0x00000800
+#define NDIS_RING_AUTO_REMOVAL_ERROR			0x00000400
+#define NDIS_RING_REMOVE_RECEIVED				0x00000200
+#define NDIS_RING_COUNTER_OVERFLOW				0x00000100
+#define NDIS_RING_SINGLE_STATION				0x00000080
+#define NDIS_RING_RING_RECOVERY					0x00000040
+//
+// Ndis protocol option bits (OID_GEN_PROTOCOL_OPTIONS).
+//
+#define NDIS_PROT_OPTION_ESTIMATED_LENGTH   	0x00000001
+#define NDIS_PROT_OPTION_NO_LOOPBACK			0x00000002
+#define NDIS_PROT_OPTION_NO_RSVD_ON_RCVPKT		0x00000004
+//
+// Ndis MAC option bits (OID_GEN_MAC_OPTIONS).
+//
+#define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA 	0x00000001
+#define NDIS_MAC_OPTION_RECEIVE_SERIALIZED  	0x00000002
+#define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND  	0x00000004
+#define NDIS_MAC_OPTION_NO_LOOPBACK				0x00000008
+#define NDIS_MAC_OPTION_FULL_DUPLEX				0x00000010
+#define	NDIS_MAC_OPTION_EOTX_INDICATION			0x00000020
+#define NDIS_MAC_OPTION_RESERVED				0x80000000
+//
+//      NDIS MAC option bits for OID_GEN_CO_MAC_OPTIONS.
+//
+#define	NDIS_CO_MAC_OPTION_DYNAMIC_LINK_SPEED	0x00000001
+#ifdef	IRDA
+//
+// The following is set on a per-packet basis as OOB data with NdisClassIrdaPacketInfo
+// This is the per-packet info specified on a per-packet basis
+//
+typedef struct _NDIS_IRDA_PACKET_INFO {
+    UINT ExtraBOFs;
+    UINT MinTurnAroundTime;
+} NDIS_IRDA_PACKET_INFO, *PNDIS_IRDA_PACKET_INFO;
+
+#endif
+#ifdef  WIRELESS_WAN
+//
+// Wireless WAN structure definitions
+//
+//
+// currently defined Wireless network subtypes
+//
+typedef enum _NDIS_WW_NETWORK_TYPE {
+    NdisWWGeneric,
+    NdisWWMobitex,
+    NdisWWPinpoint,
+    NdisWWCDPD,
+    NdisWWArdis,
+    NdisWWDataTAC,
+    NdisWWMetricom,
+    NdisWWGSM,
+    NdisWWCDMA,
+    NdisWWTDMA,
+    NdisWWAMPS,
+    NdisWWInmarsat,
+    NdisWWpACT
+} NDIS_WW_NETWORK_TYPE;
+
+//
+// currently defined header formats
+//
+typedef enum _NDIS_WW_HEADER_FORMAT {
+    NdisWWDIXEthernetFrames,
+    NdisWWMPAKFrames,
+    NdisWWRDLAPFrames,
+    NdisWWMDC4800Frames
+} NDIS_WW_HEADER_FORMAT;
+
+//
+// currently defined encryption types
+//
+typedef enum _NDIS_WW_ENCRYPTION_TYPE {
+    NdisWWUnknownEncryption = -1,
+    NdisWWNoEncryption,
+    NdisWWDefaultEncryption
+} NDIS_WW_ENCRYPTION_TYPE, *PNDIS_WW_ENCRYPTION_TYPE;
+
+//
+// OID_WW_GEN_INDICATION_REQUEST
+//
+typedef struct _NDIS_WW_INDICATION_REQUEST {
+    NDIS_OID Oid;		// IN
+
+    UINT uIndicationFlag;	// IN
+
+    UINT uApplicationToken;	// IN OUT
+
+    HANDLE hIndicationHandle;	// IN OUT
+
+    INT iPollingInterval;	// IN OUT
+
+    NDIS_VAR_DATA_DESC InitialValue;	// IN OUT
+
+    NDIS_VAR_DATA_DESC OIDIndicationValue;	// OUT - only valid after indication
+
+    NDIS_VAR_DATA_DESC TriggerValue;	// IN
+
+} NDIS_WW_INDICATION_REQUEST, *PNDIS_WW_INDICATION_REQUEST;
+
+#define OID_INDICATION_REQUEST_ENABLE			0x0000
+#define OID_INDICATION_REQUEST_CANCEL			0x0001
+//
+// OID_WW_GEN_DEVICE_INFO
+//
+typedef struct _WW_DEVICE_INFO {
+    NDIS_VAR_DATA_DESC Manufacturer;
+    NDIS_VAR_DATA_DESC ModelNum;
+    NDIS_VAR_DATA_DESC SWVersionNum;
+    NDIS_VAR_DATA_DESC SerialNum;
+} WW_DEVICE_INFO, *PWW_DEVICE_INFO;
+
+//
+// OID_WW_GEN_OPERATION_MODE
+//
+typedef INT WW_OPERATION_MODE;	//  0 = Normal mode
+												//  1 = Power saving mode
+												// -1 = mode unknown
+//
+// OID_WW_GEN_LOCK_STATUS
+//
+
+typedef INT WW_LOCK_STATUS;	//  0 = unlocked
+												//  1 = locked
+												// -1 = unknown lock status
+//
+// OID_WW_GEN_DISABLE_TRANSMITTER
+//
+
+typedef INT WW_DISABLE_TRANSMITTER;	//  0 = transmitter enabled
+												//  1 = transmitter disabled
+												// -1 = unknown value
+//
+// OID_WW_GEN_NETWORK_ID
+//
+
+typedef NDIS_VAR_DATA_DESC WW_NETWORK_ID;
+//
+// OID_WW_GEN_PERMANENT_ADDRESS 
+//
+typedef NDIS_VAR_DATA_DESC WW_PERMANENT_ADDRESS;
+//
+// OID_WW_GEN_CURRENT_ADDRESS   
+//
+typedef struct _WW_CURRENT_ADDRESS {
+    NDIS_WW_HEADER_FORMAT Format;
+    NDIS_VAR_DATA_DESC Address;
+} WW_CURRENT_ADDRESS, *PWW_CURRENT_ADDRESS;
+
+//
+// OID_WW_GEN_SUSPEND_DRIVER
+//
+typedef BOOLEAN WW_SUSPEND_DRIVER;	// 0 = driver operational
+												// 1 = driver suspended
+//
+// OID_WW_GEN_BASESTATION_ID
+//
+
+typedef NDIS_VAR_DATA_DESC WW_BASESTATION_ID;
+//
+// OID_WW_GEN_CHANNEL_ID
+//
+typedef NDIS_VAR_DATA_DESC WW_CHANNEL_ID;
+//
+// OID_WW_GEN_ENCRYPTION_STATE
+//
+typedef BOOLEAN WW_ENCRYPTION_STATE;	// 0 = if encryption is disabled
+												// 1 = if encryption is enabled
+//
+// OID_WW_GEN_CHANNEL_QUALITY
+//
+
+typedef INT WW_CHANNEL_QUALITY;	//  0 = Not in network contact,
+												// 1-100 = Quality of Channel (100 is highest quality).
+												// -1 = channel quality is unknown
+//
+// OID_WW_GEN_REGISTRATION_STATUS
+//
+
+typedef INT WW_REGISTRATION_STATUS;	//  0 = Registration denied
+												//  1 = Registration pending
+												//  2 = Registered
+												// -1 = unknown registration status
+//
+// OID_WW_GEN_RADIO_LINK_SPEED
+//
+
+typedef UINT WW_RADIO_LINK_SPEED;	// Bits per second.
+//
+// OID_WW_GEN_LATENCY
+//
+
+typedef UINT WW_LATENCY;	//  milliseconds
+//
+// OID_WW_GEN_BATTERY_LEVEL
+//
+
+typedef INT WW_BATTERY_LEVEL;	//  0-100 = battery level in percentage
+												//      (100=fully charged)
+												// -1 = unknown battery level.
+//
+// OID_WW_GEN_EXTERNAL_POWER
+//
+
+typedef INT WW_EXTERNAL_POWER;	//   0 = no external power connected
+												//   1 = external power connected
+												//  -1 = unknown
+//
+// OID_WW_MET_FUNCTION
+//
+
+typedef NDIS_VAR_DATA_DESC WW_MET_FUNCTION;
+//
+// OID_WW_TAC_COMPRESSION
+//
+typedef BOOLEAN WW_TAC_COMPRESSION;	// Determines whether or not network level compression
+												// is being used.
+//
+// OID_WW_TAC_SET_CONFIG
+//
+
+typedef struct _WW_TAC_SETCONFIG {
+    NDIS_VAR_DATA_DESC RCV_MODE;
+    NDIS_VAR_DATA_DESC TX_CONTROL;
+    NDIS_VAR_DATA_DESC RX_CONTROL;
+    NDIS_VAR_DATA_DESC FLOW_CONTROL;
+    NDIS_VAR_DATA_DESC RESET_CNF;
+    NDIS_VAR_DATA_DESC READ_CNF;
+} WW_TAC_SETCONFIG, *PWW_TAC_SETCONFIG;
+
+//
+// OID_WW_TAC_GET_STATUS
+//
+typedef struct _WW_TAC_GETSTATUS {
+    BOOLEAN Action;		// Set = Execute command.
+
+    NDIS_VAR_DATA_DESC Command;
+    NDIS_VAR_DATA_DESC Option;
+    NDIS_VAR_DATA_DESC Response;	// The response to the requested command
+    // - max. length of string is 256 octets.
+
+} WW_TAC_GETSTATUS, *PWW_TAC_GETSTATUS;
+
+//
+// OID_WW_TAC_USER_HEADER
+//
+typedef NDIS_VAR_DATA_DESC WW_TAC_USERHEADER;	// This will hold the user header - Max. 64 octets.
+//
+// OID_WW_ARD_SNDCP
+//
+
+typedef struct _WW_ARD_SNDCP {
+    NDIS_VAR_DATA_DESC Version;	// The version of SNDCP protocol supported.
+
+    INT BlockSize;		// The block size used for SNDCP
+
+    INT Window;			// The window size used in SNDCP
+
+} WW_ARD_SNDCP, *PWW_ARD_SNDCP;
+
+//
+// OID_WW_ARD_TMLY_MSG
+//
+typedef BOOLEAN WW_ARD_CHANNEL_STATUS;	// The current status of the inbound RF Channel.
+//
+// OID_WW_ARD_DATAGRAM
+//
+
+typedef struct _WW_ARD_DATAGRAM {
+    BOOLEAN LoadLevel;		// Byte that contains the load level info.
+
+    INT SessionTime;		// Datagram session time remaining.
+
+    NDIS_VAR_DATA_DESC HostAddr;	// Host address.
+
+    NDIS_VAR_DATA_DESC THostAddr;	// Test host address.
+
+} WW_ARD_DATAGRAM, *PWW_ARD_DATAGRAM;
+
+//
+// OID_WW_CDPD_SPNI
+//
+typedef struct _WW_CDPD_SPNI {
+    UINT SPNI[10];		//10 16-bit service provider network IDs
+
+    INT OperatingMode;		// 0 = ignore SPNI,
+    // 1 = require SPNI from list,
+    // 2 = prefer SPNI from list.
+    // 3 = exclude SPNI from list.
+
+} WW_CDPD_SPNI, *PWW_CDPD_SPNI;
+
+//
+// OID_WW_CDPD_WASI
+//
+typedef struct _WW_CDPD_WIDE_AREA_SERVICE_ID {
+    UINT WASI[10];		//10 16-bit wide area service IDs
+
+    INT OperatingMode;		// 0 = ignore WASI,
+    // 1 = Require WASI from list,
+    // 2 = prefer WASI from list
+    // 3 = exclude WASI from list.
+
+} WW_CDPD_WIDE_AREA_SERVICE_ID, *PWW_CDPD_WIDE_AREA_SERVICE_ID;
+
+//
+// OID_WW_CDPD_AREA_COLOR
+//
+typedef INT WW_CDPD_AREA_COLOR;
+//
+// OID_WW_CDPD_TX_POWER_LEVEL
+//
+typedef UINT WW_CDPD_TX_POWER_LEVEL;
+//
+// OID_WW_CDPD_EID
+//
+typedef NDIS_VAR_DATA_DESC WW_CDPD_EID;
+//
+// OID_WW_CDPD_HEADER_COMPRESSION
+//
+typedef INT WW_CDPD_HEADER_COMPRESSION;		//  0 = no header compression,
+												//  1 = always compress headers,
+												//  2 = compress headers if MD-IS does
+												// -1 = unknown
+//
+// OID_WW_CDPD_DATA_COMPRESSION
+//
+
+typedef INT WW_CDPD_DATA_COMPRESSION;	// 0  = no data compression,
+												// 1  = data compression enabled
+												// -1 =  unknown
+//
+// OID_WW_CDPD_CHANNEL_SELECT
+//
+
+typedef struct _WW_CDPD_CHANNEL_SELECT {
+    UINT ChannelID;		// channel number
+
+    UINT fixedDuration;		// duration in seconds
+
+} WW_CDPD_CHANNEL_SELECT, *PWW_CDPD_CHANNEL_SELECT;
+
+//
+// OID_WW_CDPD_CHANNEL_STATE
+//
+typedef enum _WW_CDPD_CHANNEL_STATE {
+    CDPDChannelNotAvail,
+    CDPDChannelScanning,
+    CDPDChannelInitAcquired,
+    CDPDChannelAcquired,
+    CDPDChannelSleeping,
+    CDPDChannelWaking,
+    CDPDChannelCSDialing,
+    CDPDChannelCSRedial,
+    CDPDChannelCSAnswering,
+    CDPDChannelCSConnected,
+    CDPDChannelCSSuspended
+} WW_CDPD_CHANNEL_STATE, *PWW_CDPD_CHANNEL_STATE;
+
+//
+// OID_WW_CDPD_NEI
+//
+typedef enum _WW_CDPD_NEI_FORMAT {
+    CDPDNeiIPv4,
+    CDPDNeiCLNP,
+    CDPDNeiIPv6
+} WW_CDPD_NEI_FORMAT, *PWW_CDPD_NEI_FORMAT;
+typedef enum _WW_CDPD_NEI_TYPE {
+    CDPDNeiIndividual,
+    CDPDNeiMulticast,
+    CDPDNeiBroadcast
+} WW_CDPD_NEI_TYPE;
+typedef struct _WW_CDPD_NEI {
+    UINT uNeiIndex;
+    WW_CDPD_NEI_FORMAT NeiFormat;
+    WW_CDPD_NEI_TYPE NeiType;
+    WORD NeiGmid;		// group member identifier, only
+    // meaningful if NeiType ==
+    // CDPDNeiMulticast
+
+    NDIS_VAR_DATA_DESC NeiAddress;
+} WW_CDPD_NEI;
+
+//
+// OID_WW_CDPD_NEI_STATE
+//
+typedef enum _WW_CDPD_NEI_STATE {
+    CDPDUnknown,
+    CDPDRegistered,
+    CDPDDeregistered
+} WW_CDPD_NEI_STATE, *PWW_CDPD_NEI_STATE;
+typedef enum _WW_CDPD_NEI_SUB_STATE {
+    CDPDPending,		// Registration pending
+     CDPDNoReason,		// Registration denied - no reason given
+     CDPDMDISNotCapable,	// Registration denied - MD-IS not capable of
+    //  handling M-ES at this time
+     CDPDNEINotAuthorized,	// Registration denied - NEI is not authorized to
+    //  use this subnetwork
+     CDPDInsufficientAuth,	// Registration denied - M-ES gave insufficient
+    //  authentication credentials
+     CDPDUnsupportedAuth,	// Registration denied - M-ES gave unsupported
+    //  authentication credentials
+     CDPDUsageExceeded,		// Registration denied - NEI has exceeded usage
+    //  limitations
+     CDPDDeniedThisNetwork	// Registration denied on this network, service
+    //  may be obtained on alternate Service Provider
+    //  network
+} WW_CDPD_NEI_SUB_STATE;
+typedef struct _WW_CDPD_NEI_REG_STATE {
+    UINT uNeiIndex;
+    WW_CDPD_NEI_STATE NeiState;
+    WW_CDPD_NEI_SUB_STATE NeiSubState;
+} WW_CDPD_NEI_REG_STATE, *PWW_CDPD_NEI_REG_STATE;
+
+//
+// OID_WW_CDPD_SERVICE_PROVIDER_IDENTIFIER
+//
+typedef struct _WW_CDPD_SERVICE_PROVIDER_ID {
+    UINT SPI[10];		//10 16-bit service provider IDs
+
+    INT OperatingMode;		// 0 = ignore SPI,
+    // 1 = require SPI from list,
+    // 2 = prefer SPI from list.
+    // 3 = exclude SPI from list.
+
+} WW_CDPD_SERVICE_PROVIDER_ID, *PWW_CDPD_SERVICE_PROVIDER_ID;
+
+//
+// OID_WW_CDPD_SLEEP_MODE
+//
+typedef INT WW_CDPD_SLEEP_MODE;
+//
+// OID_WW_CDPD_TEI
+//
+typedef ULONG WW_CDPD_TEI;
+//
+// OID_WW_CDPD_CIRCUIT_SWITCHED
+//
+typedef struct _WW_CDPD_CIRCUIT_SWITCHED {
+    INT service_preference;	// -1 = unknown,
+    //  0 = always use packet switched CDPD,
+    //  1 = always use CS CDPD via AMPS,
+    //  2 = always use CS CDPD via PSTN,
+    //  3 = use circuit switched via AMPS only
+    //      when packet switched is not available.
+    //  4 = use packet switched only when circuit
+    //   switched via AMPS is not available.
+    //  5 = device manuf. defined service
+    //   preference.
+    //  6 = device manuf. defined service
+    //   preference.
+
+    INT service_status;		// -1 = unknown,
+    //  0 = packet switched CDPD,
+    //  1 = circuit switched CDPD via AMPS,
+    //  2 = circuit switched CDPD via PSTN.
+
+    INT connect_rate;		//  CS connection bit rate (bits per second).
+    //  0 = no active connection,
+    // -1 = unknown
+    //  Dial code last used to dial.
+
+    NDIS_VAR_DATA_DESC dial_code[20];
+
+    UINT sid;			//  Current AMPS system ID
+
+    INT a_b_side_selection;	// -1 = unknown,
+    //  0 = no AMPS service
+    //  1 = AMPS "A" side channels selected
+    //  2 = AMPS "B" side channels selected
+
+    INT AMPS_channel;		// -1= unknown
+    //  0 = no AMPS service.
+    //  1-1023 = AMPS channel number in use
+
+    UINT action;		//  0 = no action
+    //  1 = suspend (hangup)
+    //  2 = dial
+
+    //  Default dial code for CS CDPD service
+    //  encoded as specified in the CS CDPD
+    //  implementor guidelines.
+    NDIS_VAR_DATA_DESC default_dial[20];
+
+    //  Number for the CS CDPD network to call
+    //   back the mobile, encoded as specified in
+    //   the CS CDPD implementor guidelines.
+    NDIS_VAR_DATA_DESC call_back[20];
+
+    UINT sid_list[10];		//  List of 10 16-bit preferred AMPS
+    //   system IDs for CS CDPD.
+
+    UINT inactivity_timer;	//  Wait time after last data before dropping
+    //   call.
+    //  0-65535 = inactivity time limit (seconds).
+
+    UINT receive_timer;		//  secs. per CS-CDPD Implementor Guidelines.
+
+    UINT conn_resp_timer;	//  secs. per CS-CDPD Implementor Guidelines.
+
+    UINT reconn_resp_timer;	//  secs. per CS-CDPD Implementor Guidelines.
+
+    UINT disconn_timer;		//  secs. per CS-CDPD Implementor Guidelines.
+
+    UINT NEI_reg_timer;		//  secs. per CS-CDPD Implementor Guidelines.
+
+    UINT reconn_retry_timer;	//  secs. per CS-CDPD Implementor Guidelines.
+
+    UINT link_reset_timer;	//  secs. per CS-CDPD Implementor Guidelines.
+
+    UINT link_reset_ack_timer;	//  secs. per CS-CDPD Implementor Guidelines.
+
+    UINT n401_retry_limit;	//  per CS-CDPD Implementor Guidelines.
+
+    UINT n402_retry_limit;	//  per CS-CDPD Implementor Guidelines.
+
+    UINT n404_retry_limit;	//  per CS-CDPD Implementor Guidelines.
+
+    UINT n405_retry_limit;	//  per CS-CDPD Implementor Guidelines.
+
+} WW_CDPD_CIRCUIT_SWITCHED, *WW_PCDPD_CIRCUIT_SWITCHED;
+typedef UINT WW_CDPD_RSSI;
+//
+// OID_WW_PIN_LOC_AUTHORIZE
+//
+typedef INT WW_PIN_AUTHORIZED;	// 0  = unauthorized
+												// 1  = authorized
+												// -1 = unknown
+//
+// OID_WW_PIN_LAST_LOCATION
+// OID_WW_PIN_LOC_FIX
+//
+
+typedef struct _WW_PIN_LOCATION {
+    INT Latitude;		// Latitude in hundredths of a second
+
+    INT Longitude;		// Longitude in hundredths of a second
+
+    INT Altitude;		// Altitude in feet
+
+    INT FixTime;		// Time of the location fix, since midnight,  local time (of the
+    // current day), in tenths of a second
+
+    INT NetTime;		// Current local network time of the current day, since midnight,
+    // in tenths of a second
+
+    INT LocQuality;		// 0-100 = location quality
+
+    INT LatReg;			// Latitude registration offset, in hundredths of a second
+
+    INT LongReg;		// Longitude registration offset, in hundredths of a second
+
+    INT GMTOffset;		// Offset in minutes of the local time zone from GMT
+
+} WW_PIN_LOCATION, *PWW_PIN_LOCATION;
+
+//
+// The following is set on a per-packet basis as OOB data with NdisClassWirelessWanMbxMailbox
+//
+typedef ULONG WW_MBX_MAILBOX_FLAG;	// 1 = set mailbox flag, 0 = do not set mailbox flag
+//
+// OID_WW_MBX_SUBADDR
+//
+
+typedef struct _WW_MBX_PMAN {
+    BOOLEAN ACTION;		// 0 = Login PMAN,  1 = Logout PMAN
+
+    UINT MAN;
+    UCHAR PASSWORD[8];		// Password should be null for Logout and indications.
+    // Maximum length of password is 8 chars.
+
+} WW_MBX_PMAN, *PWW_MBX_PMAN;
+
+//
+// OID_WW_MBX_FLEXLIST
+//
+typedef struct _WW_MBX_FLEXLIST {
+    INT count;			//  Number of MAN entries used.
+    // -1=unknown.
+
+    UINT MAN[7];		//  List of MANs.
+
+} WW_MBX_FLEXLIST;
+
+//
+// OID_WW_MBX_GROUPLIST
+//
+typedef struct _WW_MBX_GROUPLIST {
+    INT count;			//  Number of MAN entries used.
+    // -1=unknown.
+
+    UINT MAN[15];		//  List of MANs.
+
+} WW_MBX_GROUPLIST;
+
+//
+// OID_WW_MBX_TRAFFIC_AREA
+//
+typedef enum _WW_MBX_TRAFFIC_AREA {
+    unknown_traffic_area,	// The driver has no information about the current traffic area.
+     in_traffic_area,		// Mobile unit has entered a subscribed traffic area.
+     in_auth_traffic_area,	// Mobile unit is outside traffic area but is authorized.
+     unauth_traffic_area	// Mobile unit is outside traffic area but is un-authorized.
+} WW_MBX_TRAFFIC_AREA;
+
+//
+// OID_WW_MBX_LIVE_DIE
+//
+typedef INT WW_MBX_LIVE_DIE;	//  0 = DIE last received       
+												//  1 = LIVE last received
+												// -1 = unknown
+//
+// OID_WW_MBX_TEMP_DEFAULTLIST
+//
+
+typedef struct _WW_MBX_CHANNEL_PAIR {
+    UINT Mobile_Tx;
+    UINT Mobile_Rx;
+} WW_MBX_CHANNEL_PAIR, *PWW_MBX_CHANNEL_PAIR;
+typedef struct _WW_MBX_TEMPDEFAULTLIST {
+    UINT Length;
+    WW_MBX_CHANNEL_PAIR ChannelPair[1];
+} WW_MBX_TEMPDEFAULTLIST, *WW_PMBX_TEMPDEFAULTLIST;
+
+#endif				// WIRELESS_WAN
+#endif				// _NTDDNDIS_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/ntddpack.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef __NTDDPACKET
+#define __NTDDPACKET 1
+#include "devioctl.h"
+/*#include <packon.h> */
+struct _PACKET_OID_DATA {
+    ULONG Oid;
+    ULONG Length;
+    UCHAR Data[1];
+}; 
+
+typedef struct _PACKET_OID_DATA PACKET_OID_DATA, *PPACKET_OID_DATA;
+
+/*#include <packoff.h> */
+#define FILE_DEVICE_PROTOCOL        0x8000
+#define IOCTL_PROTOCOL_QUERY_OID    CTL_CODE(FILE_DEVICE_PROTOCOL, 0 , METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_PROTOCOL_SET_OID      CTL_CODE(FILE_DEVICE_PROTOCOL, 1 , METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_PROTOCOL_STATISTICS   CTL_CODE(FILE_DEVICE_PROTOCOL, 2 , METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_PROTOCOL_RESET        CTL_CODE(FILE_DEVICE_PROTOCOL, 3 , METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_PROTOCOL_READ         CTL_CODE(FILE_DEVICE_PROTOCOL, 4 , METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_PROTOCOL_WRITE        CTL_CODE(FILE_DEVICE_PROTOCOL, 5 , METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_PROTOCOL_MACNAME      CTL_CODE(FILE_DEVICE_PROTOCOL, 6 , METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_OPEN                  CTL_CODE(FILE_DEVICE_PROTOCOL, 7 , METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_CLOSE                 CTL_CODE(FILE_DEVICE_PROTOCOL, 8 , METHOD_BUFFERED, FILE_ANY_ACCESS)
+ 
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/packet32.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,405 @@
+/*
+ * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
+ * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the Politecnico di Torino, CACE Technologies 
+ * nor the names of its contributors may be used to endorse or promote 
+ * products derived from this software without specific prior written 
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+/** @ingroup packetapi
+ *  @{ 
+ */
+
+/** @defgroup packet32h Packet.dll definitions and data structures
+ *  Packet32.h contains the data structures and the definitions used by packet.dll.
+ *  The file is used both by the Win9x and the WinNTx versions of packet.dll, and can be included
+ *  by the applications that use the functions of this library
+ *  @{
+ */
+
+#ifndef __PACKET32
+#define __PACKET32
+
+#include <winsock2.h>
+
+#include "devioctl.h"
+
+#ifdef HAVE_AIRPCAP_API
+#include <airpcap.h>
+#else
+#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_)
+#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_
+typedef struct _AirpcapHandle *PAirpcapHandle;
+#endif /* AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ */
+#endif /* HAVE_AIRPCAP_API */
+
+#ifdef HAVE_DAG_API
+#include <dagc.h>
+#endif /* HAVE_DAG_API */
+
+// Working modes
+#define PACKET_MODE_CAPT 0x0 ///< Capture mode
+#define PACKET_MODE_STAT 0x1 ///< Statistical mode
+#define PACKET_MODE_MON 0x2 ///< Monitoring mode
+#define PACKET_MODE_DUMP 0x10 ///< Dump mode
+#define PACKET_MODE_STAT_DUMP MODE_DUMP | MODE_STAT ///< Statistical dump Mode
+
+// ioctls
+#define FILE_DEVICE_PROTOCOL        0x8000
+
+#define IOCTL_PROTOCOL_STATISTICS   CTL_CODE(FILE_DEVICE_PROTOCOL, 2 , METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_PROTOCOL_RESET        CTL_CODE(FILE_DEVICE_PROTOCOL, 3 , METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_PROTOCOL_READ         CTL_CODE(FILE_DEVICE_PROTOCOL, 4 , METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_PROTOCOL_WRITE        CTL_CODE(FILE_DEVICE_PROTOCOL, 5 , METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_PROTOCOL_MACNAME      CTL_CODE(FILE_DEVICE_PROTOCOL, 6 , METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_OPEN                  CTL_CODE(FILE_DEVICE_PROTOCOL, 7 , METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_CLOSE                 CTL_CODE(FILE_DEVICE_PROTOCOL, 8 , METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+#define	 pBIOCSETBUFFERSIZE 9592		///< IOCTL code: set kernel buffer size.
+#define	 pBIOCSETF 9030					///< IOCTL code: set packet filtering program.
+#define  pBIOCGSTATS 9031				///< IOCTL code: get the capture stats.
+#define	 pBIOCSRTIMEOUT 7416			///< IOCTL code: set the read timeout.
+#define	 pBIOCSMODE 7412				///< IOCTL code: set working mode.
+#define	 pBIOCSWRITEREP 7413			///< IOCTL code: set number of physical repetions of every packet written by the app.
+#define	 pBIOCSMINTOCOPY 7414			///< IOCTL code: set minimum amount of data in the kernel buffer that unlocks a read call.
+#define	 pBIOCSETOID 2147483648U		///< IOCTL code: set an OID value.
+#define	 pBIOCQUERYOID 2147483652U		///< IOCTL code: get an OID value.
+#define	 pATTACHPROCESS 7117			///< IOCTL code: attach a process to the driver. Used in Win9x only.
+#define	 pDETACHPROCESS 7118			///< IOCTL code: detach a process from the driver. Used in Win9x only.
+#define  pBIOCSETDUMPFILENAME 9029		///< IOCTL code: set the name of a the file used by kernel dump mode.
+#define  pBIOCEVNAME 7415				///< IOCTL code: get the name of the event that the driver signals when some data is present in the buffer.
+#define  pBIOCSENDPACKETSNOSYNC 9032	///< IOCTL code: Send a buffer containing multiple packets to the network, ignoring the timestamps associated with the packets.
+#define  pBIOCSENDPACKETSSYNC 9033		///< IOCTL code: Send a buffer containing multiple packets to the network, respecting the timestamps associated with the packets.
+#define  pBIOCSETDUMPLIMITS 9034		///< IOCTL code: Set the dump file limits. See the PacketSetDumpLimits() function.
+#define  pBIOCISDUMPENDED 7411			///< IOCTL code: Get the status of the kernel dump process. See the PacketIsDumpEnded() function.
+#define  pBIOCISETLOBBEH 7410			///< IOCTL code: Set the loopback behavior of the driver with packets sent by itself: capture or drop.
+#define  pBIOCSETEVENTHANDLE 7920		///< IOCTL code: Passes the read event HANDLE allocated by the user (packet.dll) to the kernel level driver.
+
+#define  pBIOCSTIMEZONE 7471			///< IOCTL code: set time zone. Used in Win9x only.
+
+
+/// Alignment macro. Defines the alignment size.
+#define Packet_ALIGNMENT sizeof(int)
+/// Alignment macro. Rounds up to the next even multiple of Packet_ALIGNMENT. 
+#define Packet_WORDALIGN(x) (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1))
+
+#define NdisMediumNull	-1		///< Custom linktype: NDIS doesn't provide an equivalent
+#define NdisMediumCHDLC	-2		///< Custom linktype: NDIS doesn't provide an equivalent
+#define NdisMediumPPPSerial	-3	///< Custom linktype: NDIS doesn't provide an equivalent
+#define NdisMediumBare80211	-4	///< Custom linktype: NDIS doesn't provide an equivalent
+#define NdisMediumRadio80211	-5	///< Custom linktype: NDIS doesn't provide an equivalent
+
+// Loopback behaviour definitions
+#define NPF_DISABLE_LOOPBACK	1	///< Drop the packets sent by the NPF driver
+#define NPF_ENABLE_LOOPBACK		2	///< Capture the packets sent by the NPF driver
+
+/*!
+  \brief Network type structure.
+
+  This structure is used by the PacketGetNetType() function to return information on the current adapter's type and speed.
+*/
+typedef struct NetType
+{
+	UINT LinkType;	///< The MAC of the current network adapter (see function PacketGetNetType() for more information)
+	ULONGLONG LinkSpeed;	///< The speed of the network in bits per second
+}NetType;
+
+
+//some definitions stolen from libpcap
+
+#ifndef BPF_MAJOR_VERSION
+
+/*!
+  \brief A BPF pseudo-assembly program.
+
+  The program will be injected in the kernel by the PacketSetBPF() function and applied to every incoming packet. 
+*/
+struct bpf_program 
+{
+	UINT bf_len;				///< Indicates the number of instructions of the program, i.e. the number of struct bpf_insn that will follow.
+	struct bpf_insn *bf_insns;	///< A pointer to the first instruction of the program.
+};
+
+/*!
+  \brief A single BPF pseudo-instruction.
+
+  bpf_insn contains a single instruction for the BPF register-machine. It is used to send a filter program to the driver.
+*/
+struct bpf_insn 
+{
+	USHORT	code;		///< Instruction type and addressing mode.
+	UCHAR 	jt;			///< Jump if true
+	UCHAR 	jf;			///< Jump if false
+	int k;				///< Generic field used for various purposes.
+};
+
+/*!
+  \brief Structure that contains a couple of statistics values on the current capture.
+
+  It is used by packet.dll to return statistics about a capture session.
+*/
+struct bpf_stat 
+{
+	UINT bs_recv;		///< Number of packets that the driver received from the network adapter 
+						///< from the beginning of the current capture. This value includes the packets 
+						///< lost by the driver.
+	UINT bs_drop;		///< number of packets that the driver lost from the beginning of a capture. 
+						///< Basically, a packet is lost when the the buffer of the driver is full. 
+						///< In this situation the packet cannot be stored and the driver rejects it.
+	UINT ps_ifdrop;		///< drops by interface. XXX not yet supported
+	UINT bs_capt;		///< number of packets that pass the filter, find place in the kernel buffer and
+						///< thus reach the application.
+};
+
+/*!
+  \brief Packet header.
+
+  This structure defines the header associated with every packet delivered to the application.
+*/
+struct bpf_hdr 
+{
+	struct timeval	bh_tstamp;	///< The timestamp associated with the captured packet. 
+								///< It is stored in a TimeVal structure.
+	UINT	bh_caplen;			///< Length of captured portion. The captured portion <b>can be different</b>
+								///< from the original packet, because it is possible (with a proper filter)
+								///< to instruct the driver to capture only a portion of the packets.
+	UINT	bh_datalen;			///< Original length of packet
+	USHORT		bh_hdrlen;		///< Length of bpf header (this struct plus alignment padding). In some cases,
+								///< a padding could be added between the end of this structure and the packet
+								///< data for performance reasons. This filed can be used to retrieve the actual data 
+								///< of the packet.
+};
+
+/*!
+  \brief Dump packet header.
+
+  This structure defines the header associated with the packets in a buffer to be used with PacketSendPackets().
+  It is simpler than the bpf_hdr, because it corresponds to the header associated by WinPcap and libpcap to a
+  packet in a dump file. This makes straightforward sending WinPcap dump files to the network.
+*/
+struct dump_bpf_hdr{
+    struct timeval	ts;			///< Time stamp of the packet
+    UINT			caplen;		///< Length of captured portion. The captured portion can smaller than the 
+								///< the original packet, because it is possible (with a proper filter) to 
+								///< instruct the driver to capture only a portion of the packets. 
+    UINT			len;		///< Length of the original packet (off wire).
+};
+
+
+#endif
+
+struct bpf_stat;
+
+#define        DOSNAMEPREFIX   TEXT("Packet_")	///< Prefix added to the adapters device names to create the WinPcap devices
+#define        MAX_LINK_NAME_LENGTH	64			//< Maximum length of the devices symbolic links
+#define        NMAX_PACKET 65535
+
+/*!
+  \brief Addresses of a network adapter.
+
+  This structure is used by the PacketGetNetInfoEx() function to return the IP addresses associated with 
+  an adapter.
+*/
+typedef struct npf_if_addr {
+	struct sockaddr_storage IPAddress;	///< IP address.
+	struct sockaddr_storage SubnetMask;	///< Netmask for that address.
+	struct sockaddr_storage Broadcast;	///< Broadcast address.
+}npf_if_addr;
+
+
+#define ADAPTER_NAME_LENGTH 256 + 12	///<  Maximum length for the name of an adapter. The value is the same used by the IP Helper API.
+#define ADAPTER_DESC_LENGTH 128			///<  Maximum length for the description of an adapter. The value is the same used by the IP Helper API.
+#define MAX_MAC_ADDR_LENGTH 8			///<  Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API.
+#define MAX_NETWORK_ADDRESSES 16		///<  Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API.
+
+
+typedef struct WAN_ADAPTER_INT WAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API
+typedef WAN_ADAPTER *PWAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API
+
+#define INFO_FLAG_NDIS_ADAPTER		0	///< Flag for ADAPTER_INFO: this is a traditional ndis adapter
+#define INFO_FLAG_NDISWAN_ADAPTER	1	///< Flag for ADAPTER_INFO: this is a NdisWan adapter, and it's managed by WANPACKET
+#define INFO_FLAG_DAG_CARD			2	///< Flag for ADAPTER_INFO: this is a DAG card
+#define INFO_FLAG_DAG_FILE			6	///< Flag for ADAPTER_INFO: this is a DAG file
+#define INFO_FLAG_DONT_EXPORT		8	///< Flag for ADAPTER_INFO: when this flag is set, the adapter will not be listed or openend by winpcap. This allows to prevent exporting broken network adapters, like for example FireWire ones.
+#define INFO_FLAG_AIRPCAP_CARD		16	///< Flag for ADAPTER_INFO: this is an airpcap card
+#define INFO_FLAG_NPFIM_DEVICE		32
+/*!
+  \brief Contains comprehensive information about a network adapter.
+
+  This structure is filled with all the accessory information that the user can need about an adapter installed
+  on his system.
+*/
+typedef struct _ADAPTER_INFO  
+{
+	struct _ADAPTER_INFO *Next;				///< Pointer to the next adapter in the list.
+	CHAR Name[ADAPTER_NAME_LENGTH + 1];		///< Name of the device representing the adapter.
+	CHAR Description[ADAPTER_DESC_LENGTH + 1];	///< Human understandable description of the adapter
+	UINT MacAddressLen;						///< Length of the link layer address.
+	UCHAR MacAddress[MAX_MAC_ADDR_LENGTH];	///< Link layer address.
+	NetType LinkLayer;						///< Physical characteristics of this adapter. This NetType structure contains the link type and the speed of the adapter.
+	INT NNetworkAddresses;					///< Number of network layer addresses of this adapter.
+	npf_if_addr *NetworkAddresses;			///< Pointer to an array of npf_if_addr, each of which specifies a network address of this adapter.
+	UINT Flags;								///< Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API.
+}
+ADAPTER_INFO, *PADAPTER_INFO;
+
+/*!
+  \brief Describes an opened network adapter.
+
+  This structure is the most important for the functioning of packet.dll, but the great part of its fields
+  should be ignored by the user, since the library offers functions that avoid to cope with low-level parameters
+*/
+typedef struct _ADAPTER  { 
+	HANDLE hFile;				///< \internal Handle to an open instance of the NPF driver.
+	CHAR  SymbolicLink[MAX_LINK_NAME_LENGTH]; ///< \internal A string containing the name of the network adapter currently opened.
+	int NumWrites;				///< \internal Number of times a packets written on this adapter will be repeated 
+								///< on the wire.
+	HANDLE ReadEvent;			///< A notification event associated with the read calls on the adapter.
+								///< It can be passed to standard Win32 functions (like WaitForSingleObject
+								///< or WaitForMultipleObjects) to wait until the driver's buffer contains some 
+								///< data. It is particularly useful in GUI applications that need to wait 
+								///< concurrently on several events. In Windows NT/2000 the PacketSetMinToCopy()
+								///< function can be used to define the minimum amount of data in the kernel buffer
+								///< that will cause the event to be signalled. 
+	
+	UINT ReadTimeOut;			///< \internal The amount of time after which a read on the driver will be released and 
+								///< ReadEvent will be signaled, also if no packets were captured
+	CHAR Name[ADAPTER_NAME_LENGTH];
+	PWAN_ADAPTER pWanAdapter;
+	UINT Flags;					///< Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API.
+
+#ifdef HAVE_AIRPCAP_API
+	PAirpcapHandle	AirpcapAd;
+#endif // HAVE_AIRPCAP_API
+
+#ifdef HAVE_NPFIM_API
+	void* NpfImHandle;
+#endif // HAVE_NPFIM_API
+
+#ifdef HAVE_DAG_API
+	dagc_t *pDagCard;			///< Pointer to the dagc API adapter descriptor for this adapter
+	PCHAR DagBuffer;			///< Pointer to the buffer with the packets that is received from the DAG card
+	struct timeval DagReadTimeout;	///< Read timeout. The dagc API requires a timeval structure
+	unsigned DagFcsLen;			///< Length of the frame check sequence attached to any packet by the card. Obtained from the registry
+	DWORD DagFastProcess;		///< True if the user requests fast capture processing on this card. Higher level applications can use this value to provide a faster but possibly unprecise capture (for example, libpcap doesn't convert the timestamps).
+#endif // HAVE_DAG_API
+}  ADAPTER, *LPADAPTER;
+
+/*!
+  \brief Structure that contains a group of packets coming from the driver.
+
+  This structure defines the header associated with every packet delivered to the application.
+*/
+typedef struct _PACKET {  
+	HANDLE       hEvent;		///< \deprecated Still present for compatibility with old applications.
+	OVERLAPPED   OverLapped;	///< \deprecated Still present for compatibility with old applications.
+	PVOID        Buffer;		///< Buffer with containing the packets. See the PacketReceivePacket() for
+								///< details about the organization of the data in this buffer
+	UINT         Length;		///< Length of the buffer
+	DWORD        ulBytesReceived;	///< Number of valid bytes present in the buffer, i.e. amount of data
+									///< received by the last call to PacketReceivePacket()
+	BOOLEAN      bIoComplete;	///< \deprecated Still present for compatibility with old applications.
+}  PACKET, *LPPACKET;
+
+/*!
+  \brief Structure containing an OID request.
+
+  It is used by the PacketRequest() function to send an OID to the interface card driver. 
+  It can be used, for example, to retrieve the status of the error counters on the adapter, its MAC address, 
+  the list of the multicast groups defined on it, and so on.
+*/
+struct _PACKET_OID_DATA {
+    ULONG Oid;					///< OID code. See the Microsoft DDK documentation or the file ntddndis.h
+								///< for a complete list of valid codes.
+    ULONG Length;				///< Length of the data field
+    UCHAR Data[1];				///< variable-lenght field that contains the information passed to or received 
+								///< from the adapter.
+}; 
+typedef struct _PACKET_OID_DATA PACKET_OID_DATA, *PPACKET_OID_DATA;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ *  @}
+ */
+
+/*
+BOOLEAN QueryWinPcapRegistryStringA(CHAR *SubKeyName,
+								 CHAR *Value,
+								 UINT *pValueLen,
+								 CHAR *DefaultVal);
+
+BOOLEAN QueryWinPcapRegistryStringW(WCHAR *SubKeyName,
+								 WCHAR *Value,
+								 UINT *pValueLen,
+								 WCHAR *DefaultVal);
+*/
+								 
+//---------------------------------------------------------------------------
+// EXPORTED FUNCTIONS
+//---------------------------------------------------------------------------
+
+PCHAR PacketGetVersion();
+PCHAR PacketGetDriverVersion();
+BOOLEAN PacketSetMinToCopy(LPADAPTER AdapterObject,int nbytes);
+BOOLEAN PacketSetNumWrites(LPADAPTER AdapterObject,int nwrites);
+BOOLEAN PacketSetMode(LPADAPTER AdapterObject,int mode);
+BOOLEAN PacketSetReadTimeout(LPADAPTER AdapterObject,int timeout);
+BOOLEAN PacketSetBpf(LPADAPTER AdapterObject,struct bpf_program *fp);
+BOOLEAN PacketSetLoopbackBehavior(LPADAPTER  AdapterObject, UINT LoopbackBehavior);
+INT PacketSetSnapLen(LPADAPTER AdapterObject,int snaplen);
+BOOLEAN PacketGetStats(LPADAPTER AdapterObject,struct bpf_stat *s);
+BOOLEAN PacketGetStatsEx(LPADAPTER AdapterObject,struct bpf_stat *s);
+BOOLEAN PacketSetBuff(LPADAPTER AdapterObject,int dim);
+BOOLEAN PacketGetNetType (LPADAPTER AdapterObject,NetType *type);
+LPADAPTER PacketOpenAdapter(PCHAR AdapterName);
+BOOLEAN PacketSendPacket(LPADAPTER AdapterObject,LPPACKET pPacket,BOOLEAN Sync);
+INT PacketSendPackets(LPADAPTER AdapterObject,PVOID PacketBuff,ULONG Size, BOOLEAN Sync);
+LPPACKET PacketAllocatePacket(void);
+VOID PacketInitPacket(LPPACKET lpPacket,PVOID  Buffer,UINT  Length);
+VOID PacketFreePacket(LPPACKET lpPacket);
+BOOLEAN PacketReceivePacket(LPADAPTER AdapterObject,LPPACKET lpPacket,BOOLEAN Sync);
+BOOLEAN PacketSetHwFilter(LPADAPTER AdapterObject,ULONG Filter);
+BOOLEAN PacketGetAdapterNames(PTSTR pStr,PULONG  BufferSize);
+BOOLEAN PacketGetNetInfoEx(PCHAR AdapterName, npf_if_addr* buffer, PLONG NEntries);
+BOOLEAN PacketRequest(LPADAPTER  AdapterObject,BOOLEAN Set,PPACKET_OID_DATA  OidData);
+HANDLE PacketGetReadEvent(LPADAPTER AdapterObject);
+BOOLEAN PacketSetDumpName(LPADAPTER AdapterObject, void *name, int len);
+BOOLEAN PacketSetDumpLimits(LPADAPTER AdapterObject, UINT maxfilesize, UINT maxnpacks);
+BOOLEAN PacketIsDumpEnded(LPADAPTER AdapterObject, BOOLEAN sync);
+BOOL PacketStopDriver();
+VOID PacketCloseAdapter(LPADAPTER lpAdapter);
+BOOLEAN PacketStartOem(PCHAR errorString, UINT errorStringLength);
+PAirpcapHandle PacketGetAirPcapHandle(LPADAPTER AdapterObject);
+#ifdef __cplusplus
+}
+#endif 
+
+#endif //__PACKET32
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/pcap-bpf.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,736 @@
+/*-
+ * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from the Stanford/CMU enet packet filter,
+ * (net/enet.c) distributed as part of 4.3BSD, and code contributed
+ * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence 
+ * Berkeley Laboratory.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *      This product includes software developed by the University of
+ *      California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *      @(#)bpf.h       7.1 (Berkeley) 5/7/91
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.34.2.11 2006/07/27 21:06:17 gianluca Exp $ (LBL)
+ */
+
+/*
+ * This is libpcap's cut-down version of bpf.h; it includes only
+ * the stuff needed for the code generator and the userland BPF
+ * interpreter, and the libpcap APIs for setting filters, etc..
+ *
+ * "pcap-bpf.c" will include the native OS version, as it deals with
+ * the OS's BPF implementation.
+ *
+ * XXX - should this all just be moved to "pcap.h"?
+ */
+
+#ifndef BPF_MAJOR_VERSION
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* BSD style release date */
+#define BPF_RELEASE 199606
+
+#ifdef MSDOS /* must be 32-bit */
+typedef long          bpf_int32;
+typedef unsigned long bpf_u_int32;
+#else
+typedef	int bpf_int32;
+typedef	u_int bpf_u_int32;
+#endif
+
+/*
+ * Alignment macros.  BPF_WORDALIGN rounds up to the next 
+ * even multiple of BPF_ALIGNMENT. 
+ */
+#ifndef __NetBSD__
+#define BPF_ALIGNMENT sizeof(bpf_int32)
+#else
+#define BPF_ALIGNMENT sizeof(long)
+#endif
+#define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1))
+
+#define BPF_MAXINSNS 512
+#define BPF_MAXBUFSIZE 0x8000
+#define BPF_MINBUFSIZE 32
+
+/*
+ * Structure for "pcap_compile()", "pcap_setfilter()", etc..
+ */
+struct bpf_program {
+	u_int bf_len;
+	struct bpf_insn *bf_insns;
+};
+ 
+/*
+ * Struct return by BIOCVERSION.  This represents the version number of 
+ * the filter language described by the instruction encodings below.
+ * bpf understands a program iff kernel_major == filter_major &&
+ * kernel_minor >= filter_minor, that is, if the value returned by the
+ * running kernel has the same major number and a minor number equal
+ * equal to or less than the filter being downloaded.  Otherwise, the
+ * results are undefined, meaning an error may be returned or packets
+ * may be accepted haphazardly.
+ * It has nothing to do with the source code version.
+ */
+struct bpf_version {
+	u_short bv_major;
+	u_short bv_minor;
+};
+/* Current version number of filter architecture. */
+#define BPF_MAJOR_VERSION 1
+#define BPF_MINOR_VERSION 1
+
+/*
+ * Data-link level type codes.
+ *
+ * Do *NOT* add new values to this list without asking
+ * "tcpdump-workers@tcpdump.org" for a value.  Otherwise, you run the
+ * risk of using a value that's already being used for some other purpose,
+ * and of having tools that read libpcap-format captures not being able
+ * to handle captures with your new DLT_ value, with no hope that they
+ * will ever be changed to do so (as that would destroy their ability
+ * to read captures using that value for that other purpose).
+ */
+
+/*
+ * These are the types that are the same on all platforms, and that
+ * have been defined by <net/bpf.h> for ages.
+ */
+#define DLT_NULL	0	/* BSD loopback encapsulation */
+#define DLT_EN10MB	1	/* Ethernet (10Mb) */
+#define DLT_EN3MB	2	/* Experimental Ethernet (3Mb) */
+#define DLT_AX25	3	/* Amateur Radio AX.25 */
+#define DLT_PRONET	4	/* Proteon ProNET Token Ring */
+#define DLT_CHAOS	5	/* Chaos */
+#define DLT_IEEE802	6	/* IEEE 802 Networks */
+#define DLT_ARCNET	7	/* ARCNET, with BSD-style header */
+#define DLT_SLIP	8	/* Serial Line IP */
+#define DLT_PPP		9	/* Point-to-point Protocol */
+#define DLT_FDDI	10	/* FDDI */
+
+/*
+ * These are types that are different on some platforms, and that
+ * have been defined by <net/bpf.h> for ages.  We use #ifdefs to
+ * detect the BSDs that define them differently from the traditional
+ * libpcap <net/bpf.h>
+ *
+ * XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS,
+ * but I don't know what the right #define is for BSD/OS.
+ */
+#define DLT_ATM_RFC1483	11	/* LLC-encapsulated ATM */
+
+#ifdef __OpenBSD__
+#define DLT_RAW		14	/* raw IP */
+#else
+#define DLT_RAW		12	/* raw IP */
+#endif
+
+/*
+ * Given that the only OS that currently generates BSD/OS SLIP or PPP
+ * is, well, BSD/OS, arguably everybody should have chosen its values
+ * for DLT_SLIP_BSDOS and DLT_PPP_BSDOS, which are 15 and 16, but they
+ * didn't.  So it goes.
+ */
+#if defined(__NetBSD__) || defined(__FreeBSD__)
+#ifndef DLT_SLIP_BSDOS
+#define DLT_SLIP_BSDOS	13	/* BSD/OS Serial Line IP */
+#define DLT_PPP_BSDOS	14	/* BSD/OS Point-to-point Protocol */
+#endif
+#else
+#define DLT_SLIP_BSDOS	15	/* BSD/OS Serial Line IP */
+#define DLT_PPP_BSDOS	16	/* BSD/OS Point-to-point Protocol */
+#endif
+
+/*
+ * 17 is used for DLT_OLD_PFLOG in OpenBSD;
+ *     OBSOLETE: DLT_PFLOG is 117 in OpenBSD now as well. See below.
+ * 18 is used for DLT_PFSYNC in OpenBSD; don't use it for anything else.
+ */
+
+#define DLT_ATM_CLIP	19	/* Linux Classical-IP over ATM */
+
+/*
+ * Apparently Redback uses this for its SmartEdge 400/800.  I hope
+ * nobody else decided to use it, too.
+ */
+#define DLT_REDBACK_SMARTEDGE	32
+
+/*
+ * These values are defined by NetBSD; other platforms should refrain from
+ * using them for other purposes, so that NetBSD savefiles with link
+ * types of 50 or 51 can be read as this type on all platforms.
+ */
+#define DLT_PPP_SERIAL	50	/* PPP over serial with HDLC encapsulation */
+#define DLT_PPP_ETHER	51	/* PPP over Ethernet */
+
+/*
+ * The Axent Raptor firewall - now the Symantec Enterprise Firewall - uses
+ * a link-layer type of 99 for the tcpdump it supplies.  The link-layer
+ * header has 6 bytes of unknown data, something that appears to be an
+ * Ethernet type, and 36 bytes that appear to be 0 in at least one capture
+ * I've seen.
+ */
+#define DLT_SYMANTEC_FIREWALL	99
+
+/*
+ * Values between 100 and 103 are used in capture file headers as
+ * link-layer types corresponding to DLT_ types that differ
+ * between platforms; don't use those values for new DLT_ new types.
+ */
+
+/*
+ * This value was defined by libpcap 0.5; platforms that have defined
+ * it with a different value should define it here with that value -
+ * a link type of 104 in a save file will be mapped to DLT_C_HDLC,
+ * whatever value that happens to be, so programs will correctly
+ * handle files with that link type regardless of the value of
+ * DLT_C_HDLC.
+ *
+ * The name DLT_C_HDLC was used by BSD/OS; we use that name for source
+ * compatibility with programs written for BSD/OS.
+ *
+ * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well,
+ * for source compatibility with programs written for libpcap 0.5.
+ */
+#define DLT_C_HDLC	104	/* Cisco HDLC */
+#define DLT_CHDLC	DLT_C_HDLC
+
+#define DLT_IEEE802_11	105	/* IEEE 802.11 wireless */
+
+/*
+ * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW,
+ * except when it isn't.  (I.e., sometimes it's just raw IP, and
+ * sometimes it isn't.)  We currently handle it as DLT_LINUX_SLL,
+ * so that we don't have to worry about the link-layer header.)
+ */
+
+/*
+ * Frame Relay; BSD/OS has a DLT_FR with a value of 11, but that collides
+ * with other values.
+ * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header
+ * (DLCI, etc.).
+ */
+#define DLT_FRELAY	107
+
+/*
+ * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except
+ * that the AF_ type in the link-layer header is in network byte order.
+ *
+ * OpenBSD defines it as 12, but that collides with DLT_RAW, so we
+ * define it as 108 here.  If OpenBSD picks up this file, it should
+ * define DLT_LOOP as 12 in its version, as per the comment above -
+ * and should not use 108 as a DLT_ value.
+ */
+#define DLT_LOOP	108
+
+/*
+ * Encapsulated packets for IPsec; DLT_ENC is 13 in OpenBSD, but that's
+ * DLT_SLIP_BSDOS in NetBSD, so we don't use 13 for it in OSes other
+ * than OpenBSD.
+ */
+#ifdef __OpenBSD__
+#define DLT_ENC		13
+#else
+#define DLT_ENC		109
+#endif
+
+/*
+ * Values between 110 and 112 are reserved for use in capture file headers
+ * as link-layer types corresponding to DLT_ types that might differ
+ * between platforms; don't use those values for new DLT_ types
+ * other than the corresponding DLT_ types.
+ */
+
+/*
+ * This is for Linux cooked sockets.
+ */
+#define DLT_LINUX_SLL	113
+
+/*
+ * Apple LocalTalk hardware.
+ */
+#define DLT_LTALK	114
+
+/*
+ * Acorn Econet.
+ */
+#define DLT_ECONET	115
+
+/*
+ * Reserved for use with OpenBSD ipfilter.
+ */
+#define DLT_IPFILTER	116
+
+/*
+ * OpenBSD DLT_PFLOG; DLT_PFLOG is 17 in OpenBSD, but that's DLT_LANE8023
+ * in SuSE 6.3, so we can't use 17 for it in capture-file headers.
+ *
+ * XXX: is there a conflict with DLT_PFSYNC 18 as well?
+ */
+#ifdef __OpenBSD__
+#define DLT_OLD_PFLOG	17
+#define DLT_PFSYNC	18
+#endif
+#define DLT_PFLOG	117
+
+/*
+ * Registered for Cisco-internal use.
+ */
+#define DLT_CISCO_IOS	118
+
+/*
+ * For 802.11 cards using the Prism II chips, with a link-layer
+ * header including Prism monitor mode information plus an 802.11
+ * header.
+ */
+#define DLT_PRISM_HEADER	119
+
+/*
+ * Reserved for Aironet 802.11 cards, with an Aironet link-layer header
+ * (see Doug Ambrisko's FreeBSD patches).
+ */
+#define DLT_AIRONET_HEADER	120
+
+/*
+ * Reserved for Siemens HiPath HDLC.
+ */
+#define DLT_HHDLC		121
+
+/*
+ * This is for RFC 2625 IP-over-Fibre Channel.
+ *
+ * This is not for use with raw Fibre Channel, where the link-layer
+ * header starts with a Fibre Channel frame header; it's for IP-over-FC,
+ * where the link-layer header starts with an RFC 2625 Network_Header
+ * field.
+ */
+#define DLT_IP_OVER_FC		122
+
+/*
+ * This is for Full Frontal ATM on Solaris with SunATM, with a
+ * pseudo-header followed by an AALn PDU.
+ *
+ * There may be other forms of Full Frontal ATM on other OSes,
+ * with different pseudo-headers.
+ *
+ * If ATM software returns a pseudo-header with VPI/VCI information
+ * (and, ideally, packet type information, e.g. signalling, ILMI,
+ * LANE, LLC-multiplexed traffic, etc.), it should not use
+ * DLT_ATM_RFC1483, but should get a new DLT_ value, so tcpdump
+ * and the like don't have to infer the presence or absence of a
+ * pseudo-header and the form of the pseudo-header.
+ */
+#define DLT_SUNATM		123	/* Solaris+SunATM */
+
+/* 
+ * Reserved as per request from Kent Dahlgren <kent@praesum.com>
+ * for private use.
+ */
+#define DLT_RIO                 124     /* RapidIO */
+#define DLT_PCI_EXP             125     /* PCI Express */
+#define DLT_AURORA              126     /* Xilinx Aurora link layer */
+
+/*
+ * Header for 802.11 plus a number of bits of link-layer information
+ * including radio information, used by some recent BSD drivers as
+ * well as the madwifi Atheros driver for Linux.
+ */
+#define DLT_IEEE802_11_RADIO	127	/* 802.11 plus radiotap radio header */
+
+/*
+ * Reserved for the TZSP encapsulation, as per request from
+ * Chris Waters <chris.waters@networkchemistry.com>
+ * TZSP is a generic encapsulation for any other link type,
+ * which includes a means to include meta-information
+ * with the packet, e.g. signal strength and channel
+ * for 802.11 packets.
+ */
+#define DLT_TZSP                128     /* Tazmen Sniffer Protocol */
+
+/*
+ * BSD's ARCNET headers have the source host, destination host,
+ * and type at the beginning of the packet; that's what's handed
+ * up to userland via BPF.
+ *
+ * Linux's ARCNET headers, however, have a 2-byte offset field
+ * between the host IDs and the type; that's what's handed up
+ * to userland via PF_PACKET sockets.
+ *
+ * We therefore have to have separate DLT_ values for them.
+ */
+#define DLT_ARCNET_LINUX	129	/* ARCNET */
+
+/*
+ * Juniper-private data link types, as per request from
+ * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
+ * for passing on chassis-internal metainformation such as
+ * QOS profiles, etc..
+ */
+#define DLT_JUNIPER_MLPPP       130
+#define DLT_JUNIPER_MLFR        131
+#define DLT_JUNIPER_ES          132
+#define DLT_JUNIPER_GGSN        133
+#define DLT_JUNIPER_MFR         134
+#define DLT_JUNIPER_ATM2        135
+#define DLT_JUNIPER_SERVICES    136
+#define DLT_JUNIPER_ATM1        137
+
+/*
+ * Apple IP-over-IEEE 1394, as per a request from Dieter Siegmund
+ * <dieter@apple.com>.  The header that's presented is an Ethernet-like
+ * header:
+ *
+ *	#define FIREWIRE_EUI64_LEN	8
+ *	struct firewire_header {
+ *		u_char  firewire_dhost[FIREWIRE_EUI64_LEN];
+ *		u_char  firewire_shost[FIREWIRE_EUI64_LEN];
+ *		u_short firewire_type;
+ *	};
+ *
+ * with "firewire_type" being an Ethernet type value, rather than,
+ * for example, raw GASP frames being handed up.
+ */
+#define DLT_APPLE_IP_OVER_IEEE1394	138
+
+/*
+ * Various SS7 encapsulations, as per a request from Jeff Morriss
+ * <jeff.morriss[AT]ulticom.com> and subsequent discussions.
+ */
+#define DLT_MTP2_WITH_PHDR	139	/* pseudo-header with various info, followed by MTP2 */
+#define DLT_MTP2		140	/* MTP2, without pseudo-header */
+#define DLT_MTP3		141	/* MTP3, without pseudo-header or MTP2 */
+#define DLT_SCCP		142	/* SCCP, without pseudo-header or MTP2 or MTP3 */
+
+/*
+ * DOCSIS MAC frames.
+ */
+#define DLT_DOCSIS		143
+
+/*
+ * Linux-IrDA packets. Protocol defined at http://www.irda.org.
+ * Those packets include IrLAP headers and above (IrLMP...), but
+ * don't include Phy framing (SOF/EOF/CRC & byte stuffing), because Phy
+ * framing can be handled by the hardware and depend on the bitrate.
+ * This is exactly the format you would get capturing on a Linux-IrDA
+ * interface (irdaX), but not on a raw serial port.
+ * Note the capture is done in "Linux-cooked" mode, so each packet include
+ * a fake packet header (struct sll_header). This is because IrDA packet
+ * decoding is dependant on the direction of the packet (incomming or
+ * outgoing).
+ * When/if other platform implement IrDA capture, we may revisit the
+ * issue and define a real DLT_IRDA...
+ * Jean II
+ */
+#define DLT_LINUX_IRDA		144
+
+/*
+ * Reserved for IBM SP switch and IBM Next Federation switch.
+ */
+#define DLT_IBM_SP		145
+#define DLT_IBM_SN		146
+
+/*
+ * Reserved for private use.  If you have some link-layer header type
+ * that you want to use within your organization, with the capture files
+ * using that link-layer header type not ever be sent outside your
+ * organization, you can use these values.
+ *
+ * No libpcap release will use these for any purpose, nor will any
+ * tcpdump release use them, either.
+ *
+ * Do *NOT* use these in capture files that you expect anybody not using
+ * your private versions of capture-file-reading tools to read; in
+ * particular, do *NOT* use them in products, otherwise you may find that
+ * people won't be able to use tcpdump, or snort, or Ethereal, or... to
+ * read capture files from your firewall/intrusion detection/traffic
+ * monitoring/etc. appliance, or whatever product uses that DLT_ value,
+ * and you may also find that the developers of those applications will
+ * not accept patches to let them read those files.
+ *
+ * Also, do not use them if somebody might send you a capture using them
+ * for *their* private type and tools using them for *your* private type
+ * would have to read them.
+ *
+ * Instead, ask "tcpdump-workers@tcpdump.org" for a new DLT_ value,
+ * as per the comment above, and use the type you're given.
+ */
+#define DLT_USER0		147
+#define DLT_USER1		148
+#define DLT_USER2		149
+#define DLT_USER3		150
+#define DLT_USER4		151
+#define DLT_USER5		152
+#define DLT_USER6		153
+#define DLT_USER7		154
+#define DLT_USER8		155
+#define DLT_USER9		156
+#define DLT_USER10		157
+#define DLT_USER11		158
+#define DLT_USER12		159
+#define DLT_USER13		160
+#define DLT_USER14		161
+#define DLT_USER15		162
+
+/*
+ * For future use with 802.11 captures - defined by AbsoluteValue
+ * Systems to store a number of bits of link-layer information
+ * including radio information:
+ *
+ *	http://www.shaftnet.org/~pizza/software/capturefrm.txt
+ *
+ * but it might be used by some non-AVS drivers now or in the
+ * future.
+ */
+#define DLT_IEEE802_11_RADIO_AVS 163	/* 802.11 plus AVS radio header */
+
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
+ * for passing on chassis-internal metainformation such as
+ * QOS profiles, etc..
+ */
+#define DLT_JUNIPER_MONITOR     164
+
+/*
+ * Reserved for BACnet MS/TP.
+ */
+#define DLT_BACNET_MS_TP	165
+
+/*
+ * Another PPP variant as per request from Karsten Keil <kkeil@suse.de>.
+ *
+ * This is used in some OSes to allow a kernel socket filter to distinguish
+ * between incoming and outgoing packets, on a socket intended to
+ * supply pppd with outgoing packets so it can do dial-on-demand and
+ * hangup-on-lack-of-demand; incoming packets are filtered out so they
+ * don't cause pppd to hold the connection up (you don't want random
+ * input packets such as port scans, packets from old lost connections,
+ * etc. to force the connection to stay up).
+ *
+ * The first byte of the PPP header (0xff03) is modified to accomodate
+ * the direction - 0x00 = IN, 0x01 = OUT.
+ */
+#define DLT_PPP_PPPD		166
+
+/*
+ * Names for backwards compatibility with older versions of some PPP
+ * software; new software should use DLT_PPP_PPPD.
+ */
+#define DLT_PPP_WITH_DIRECTION	DLT_PPP_PPPD
+#define DLT_LINUX_PPP_WITHDIRECTION	DLT_PPP_PPPD
+
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
+ * for passing on chassis-internal metainformation such as
+ * QOS profiles, cookies, etc..
+ */
+#define DLT_JUNIPER_PPPOE       167
+#define DLT_JUNIPER_PPPOE_ATM   168
+
+#define DLT_GPRS_LLC		169	/* GPRS LLC */
+#define DLT_GPF_T		170	/* GPF-T (ITU-T G.7041/Y.1303) */
+#define DLT_GPF_F		171	/* GPF-F (ITU-T G.7041/Y.1303) */
+
+/*
+ * Requested by Oolan Zimmer <oz@gcom.com> for use in Gcom's T1/E1 line
+ * monitoring equipment.
+ */
+#define DLT_GCOM_T1E1		172
+#define DLT_GCOM_SERIAL		173
+
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <hannes@juniper.net>.  The DLT_ is used
+ * for internal communication to Physical Interface Cards (PIC)
+ */
+#define DLT_JUNIPER_PIC_PEER    174
+
+/*
+ * Link types requested by Gregor Maier <gregor@endace.com> of Endace
+ * Measurement Systems.  They add an ERF header (see
+ * http://www.endace.com/support/EndaceRecordFormat.pdf) in front of
+ * the link-layer header.
+ */
+#define DLT_ERF_ETH		175	/* Ethernet */
+#define DLT_ERF_POS		176	/* Packet-over-SONET */
+
+/*
+ * Requested by Daniele Orlandi <daniele@orlandi.com> for raw LAPD
+ * for vISDN (http://www.orlandi.com/visdn/).  Its link-layer header
+ * includes additional information before the LAPD header, so it's
+ * not necessarily a generic LAPD header.
+ */
+#define DLT_LINUX_LAPD		177
+
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <hannes@juniper.net>. 
+ * The DLT_ are used for prepending meta-information
+ * like interface index, interface name
+ * before standard Ethernet, PPP, Frelay & C-HDLC Frames
+ */
+#define DLT_JUNIPER_ETHER       178
+#define DLT_JUNIPER_PPP         179
+#define DLT_JUNIPER_FRELAY      180
+#define DLT_JUNIPER_CHDLC       181
+
+/*
+ * Multi Link Frame Relay (FRF.16)
+ */
+#define DLT_MFR                 182
+
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <hannes@juniper.net>. 
+ * The DLT_ is used for internal communication with a
+ * voice Adapter Card (PIC)
+ */
+#define DLT_JUNIPER_VP          183
+
+/*
+ * Arinc 429 frames.
+ * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
+ * Every frame contains a 32bit A429 label.
+ * More documentation on Arinc 429 can be found at
+ * http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf
+ */
+#define DLT_A429                184
+
+/*
+ * Arinc 653 Interpartition Communication messages.
+ * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
+ * Please refer to the A653-1 standard for more information.
+ */
+#define DLT_A653_ICM            185
+
+/*
+ * Controller Area Network (CAN) v. 2.0B packets.
+ * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
+ * Used to dump CAN packets coming from a CAN Vector board.
+ * More documentation on the CAN v2.0B frames can be found at
+ * http://www.can-cia.org/downloads/?269
+ */
+#define DLT_CAN20B              190
+
+
+/*
+ * The instruction encodings.
+ */
+/* instruction classes */
+#define BPF_CLASS(code) ((code) & 0x07)
+#define		BPF_LD		0x00
+#define		BPF_LDX		0x01
+#define		BPF_ST		0x02
+#define		BPF_STX		0x03
+#define		BPF_ALU		0x04
+#define		BPF_JMP		0x05
+#define		BPF_RET		0x06
+#define		BPF_MISC	0x07
+
+/* ld/ldx fields */
+#define BPF_SIZE(code)	((code) & 0x18)
+#define		BPF_W		0x00
+#define		BPF_H		0x08
+#define		BPF_B		0x10
+#define BPF_MODE(code)	((code) & 0xe0)
+#define		BPF_IMM 	0x00
+#define		BPF_ABS		0x20
+#define		BPF_IND		0x40
+#define		BPF_MEM		0x60
+#define		BPF_LEN		0x80
+#define		BPF_MSH		0xa0
+
+/* alu/jmp fields */
+#define BPF_OP(code)	((code) & 0xf0)
+#define		BPF_ADD		0x00
+#define		BPF_SUB		0x10
+#define		BPF_MUL		0x20
+#define		BPF_DIV		0x30
+#define		BPF_OR		0x40
+#define		BPF_AND		0x50
+#define		BPF_LSH		0x60
+#define		BPF_RSH		0x70
+#define		BPF_NEG		0x80
+#define		BPF_JA		0x00
+#define		BPF_JEQ		0x10
+#define		BPF_JGT		0x20
+#define		BPF_JGE		0x30
+#define		BPF_JSET	0x40
+#define BPF_SRC(code)	((code) & 0x08)
+#define		BPF_K		0x00
+#define		BPF_X		0x08
+
+/* ret - BPF_K and BPF_X also apply */
+#define BPF_RVAL(code)	((code) & 0x18)
+#define		BPF_A		0x10
+
+/* misc */
+#define BPF_MISCOP(code) ((code) & 0xf8)
+#define		BPF_TAX		0x00
+#define		BPF_TXA		0x80
+
+/*
+ * The instruction data structure.
+ */
+struct bpf_insn {
+	u_short	code;
+	u_char 	jt;
+	u_char 	jf;
+	bpf_int32 k;
+};
+
+/*
+ * Macros for insn array initializers.
+ */
+#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k }
+#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k }
+
+#if __STDC__ || defined(__cplusplus)
+extern int bpf_validate(struct bpf_insn *, int);
+extern u_int bpf_filter(struct bpf_insn *, u_char *, u_int, u_int);
+#else
+extern int bpf_validate();
+extern u_int bpf_filter();
+#endif
+
+/*
+ * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST).
+ */
+#define BPF_MEMWORDS 16
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/pcap-int.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,373 @@
+/*
+ * Copyright (c) 1994, 1995, 1996
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the Computer Systems
+ *	Engineering Group at Lawrence Berkeley Laboratory.
+ * 4. Neither the name of the University nor of the Laboratory may be used
+ *    to endorse or promote products derived from this software without
+ *    specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/pcap-int.h,v 1.68.2.9 2006/02/22 17:09:54 gianluca Exp $ (LBL)
+ */
+
+#ifndef pcap_int_h
+#define pcap_int_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <pcap.h>
+
+#ifdef WIN32
+#include <Packet32.h>
+#endif /* WIN32 */
+
+#ifdef MSDOS
+#include <fcntl.h>
+#include <io.h>
+#endif
+
+/*
+ * Savefile
+ */
+typedef enum {
+	NOT_SWAPPED,
+	SWAPPED,
+	MAYBE_SWAPPED
+} swapped_type_t;
+
+struct pcap_sf {
+	FILE *rfile;
+	int swapped;
+	int hdrsize;
+	swapped_type_t lengths_swapped;
+	int version_major;
+	int version_minor;
+	u_char *base;
+};
+
+struct pcap_md {
+	struct pcap_stat stat;
+	/*XXX*/
+	int use_bpf;		/* using kernel filter */
+	u_long	TotPkts;	/* can't oflow for 79 hrs on ether */
+	u_long	TotAccepted;	/* count accepted by filter */
+	u_long	TotDrops;	/* count of dropped packets */
+	long	TotMissed;	/* missed by i/f during this run */
+	long	OrigMissed;	/* missed by i/f before this run */
+	char	*device;	/* device name */
+#ifdef linux
+	int	sock_packet;	/* using Linux 2.0 compatible interface */
+	int	timeout;	/* timeout specified to pcap_open_live */
+	int	clear_promisc;	/* must clear promiscuous mode when we close */
+	int	cooked;		/* using SOCK_DGRAM rather than SOCK_RAW */
+	int	ifindex;	/* interface index of device we're bound to */
+	int	lo_ifindex;	/* interface index of the loopback device */
+	struct pcap *next;	/* list of open promiscuous sock_packet pcaps */
+	u_int	packets_read;	/* count of packets read with recvfrom() */
+#endif
+
+#ifdef HAVE_DAG_API
+#ifdef HAVE_DAG_STREAMS_API
+	u_char	*dag_mem_bottom;	/* DAG card current memory bottom pointer */
+	u_char	*dag_mem_top;	/* DAG card current memory top pointer */
+#else
+	void	*dag_mem_base;	/* DAG card memory base address */
+	u_int	dag_mem_bottom;	/* DAG card current memory bottom offset */
+	u_int	dag_mem_top;	/* DAG card current memory top offset */
+#endif /* HAVE_DAG_STREAMS_API */
+	int	dag_fcs_bits;	/* Number of checksum bits from link layer */
+	int	dag_offset_flags; /* Flags to pass to dag_offset(). */
+	int	dag_stream;	/* DAG stream number */
+	int	dag_timeout;	/* timeout specified to pcap_open_live.
+				 * Same as in linux above, introduce
+				 * generally? */
+#endif /* HAVE_DAG_API */
+
+#ifdef HAVE_REMOTE
+/*!
+	There is really a mess with previous variables, and it seems to me that they are not used
+	(they are used in pcap_pf.c only). I think we have to start using them.
+	The meaning is the following:
+
+	- TotPkts: the amount of packets received by the bpf filter, *before* applying the filter
+	- TotAccepted: the amount of packets that satisfies the filter
+	- TotDrops: the amount of packet that were dropped into the kernel buffer because of lack of space
+	- TotMissed: the amount of packets that were dropped by the physical interface; it is basically 
+	the value of the hardware counter into the card. This number is never put to zero, so this number
+	takes into account the *total* number of interface drops starting from the interface power-on.
+	- OrigMissed: the amount of packets that were dropped by the interface *when the capture begins*.
+	This value is used to detect the number of packets dropped by the interface *during the present
+	capture*, so that (ps_ifdrops= TotMissed - OrigMissed).
+*/
+	unsigned int TotNetDrops;	//!< keeps the number of packets that have been dropped by the network
+/*!
+	\brief It keeps the number of packets that have been received by the application.
+	
+	Packets dropped by the kernel buffer are not counted in this variable. The variable is always 
+	equal to (TotAccepted - TotDrops), exept for the case of remote capture, in which we have also
+	packets in fligh, i.e. that have been transmitted by the remote host, but that have not been 
+	received (yet) from the client. In this case, (TotAccepted - TotDrops - TotNetDrops) gives a
+	wrong result, since this number does not corresponds always to the number of packet received by 
+	the application. For this reason, in the remote capture we need another variable that takes
+	into account of the number of packets actually received by the application.
+*/
+	unsigned int TotCapt;
+#endif /* HAVE_REMOTE */
+};
+
+/*
+ * Ultrix, DEC OSF/1^H^H^H^H^H^H^H^H^HDigital UNIX^H^H^H^H^H^H^H^H^H^H^H^H
+ * Tru64 UNIX, and NetBSD pad to make everything line up on a nice boundary.
+ */
+#if defined(ultrix) || defined(__osf__) || (defined(__NetBSD__) && __NetBSD_Version__ > 106000000)
+#define       PCAP_FDDIPAD 3
+#endif
+
+struct pcap {
+#ifdef WIN32
+	ADAPTER *adapter;
+	LPPACKET Packet;
+	int timeout;
+	int nonblock;
+#else
+	int fd;
+	int selectable_fd;
+	int send_fd;
+#endif /* WIN32 */
+	int snapshot;
+	int linktype;
+	int tzoff;		/* timezone offset */
+	int offset;		/* offset for proper alignment */
+
+	int break_loop;		/* flag set to force break from packet-reading loop */
+
+#ifdef PCAP_FDDIPAD
+	int fddipad;
+#endif
+
+#ifdef MSDOS
+        int inter_packet_wait;   /* offline: wait between packets */
+        void (*wait_proc)(void); /*          call proc while waiting */
+#endif
+
+	struct pcap_sf sf;
+	struct pcap_md md;
+
+	/*
+	 * Read buffer.
+	 */
+	int bufsize;
+	u_char *buffer;
+	u_char *bp;
+	int cc;
+
+	/*
+	 * Place holder for pcap_next().
+	 */
+	u_char *pkt;
+
+	/* We're accepting only packets in this direction/these directions. */
+	pcap_direction_t direction;
+
+	/*
+	 * Methods.
+	 */
+	int	(*read_op)(pcap_t *, int cnt, pcap_handler, u_char *);
+	int	(*inject_op)(pcap_t *, const void *, size_t);
+	int	(*setfilter_op)(pcap_t *, struct bpf_program *);
+	int	(*setdirection_op)(pcap_t *, pcap_direction_t);
+	int	(*set_datalink_op)(pcap_t *, int);
+	int	(*getnonblock_op)(pcap_t *, char *);
+	int	(*setnonblock_op)(pcap_t *, int, char *);
+	int	(*stats_op)(pcap_t *, struct pcap_stat *);
+	void	(*close_op)(pcap_t *);
+
+	/*
+	 * Placeholder for filter code if bpf not in kernel.
+	 */
+	struct bpf_program fcode;
+
+	char errbuf[PCAP_ERRBUF_SIZE + 1];
+	int dlt_count;
+	u_int *dlt_list;
+
+	struct pcap_pkthdr pcap_header;	/* This is needed for the pcap_next_ex() to work */
+
+#ifdef HAVE_REMOTE
+#ifndef WIN32	// Win32 already defines 'timeout'
+	int timeout;				//!< timeout to be used in the pcap_open()
+#endif
+	/*! \brief '1' if we're the network client; needed by several functions (like pcap_setfilter() ) to know if 
+		they have to use the socket or they have to open the local adapter. */
+	int rmt_clientside;
+
+	SOCKET rmt_sockctrl;		//!< socket ID of the socket used for the control connection
+	SOCKET rmt_sockdata;		//!< socket ID of the socket used for the data connection
+	int rmt_flags;				//!< we have to save flags, since they are passed by the pcap_open_live(), but they are used by the pcap_startcapture()
+	int rmt_capstarted;			//!< 'true' if the capture is already started (needed to knoe if we have to call the pcap_startcapture()
+	struct pcap_samp rmt_samp;	//!< Keeps the parameters related to the sampling process.
+	char *currentfilter;		//!< Pointer to a buffer (allocated at run-time) that stores the current filter. Needed when flag PCAP_OPENFLAG_NOCAPTURE_RPCAP is turned on.
+#endif /* HAVE_REMOTE */
+};
+
+/*
+ * This is a timeval as stored in a savefile.
+ * It has to use the same types everywhere, independent of the actual
+ * `struct timeval'; `struct timeval' has 32-bit tv_sec values on some
+ * platforms and 64-bit tv_sec values on other platforms, and writing
+ * out native `struct timeval' values would mean files could only be
+ * read on systems with the same tv_sec size as the system on which
+ * the file was written.
+ */
+
+struct pcap_timeval {
+    bpf_int32 tv_sec;		/* seconds */
+    bpf_int32 tv_usec;		/* microseconds */
+};
+
+/*
+ * This is a `pcap_pkthdr' as actually stored in a savefile.
+ *
+ * Do not change the format of this structure, in any way (this includes
+ * changes that only affect the length of fields in this structure),
+ * and do not make the time stamp anything other than seconds and
+ * microseconds (e.g., seconds and nanoseconds).  Instead:
+ *
+ *	introduce a new structure for the new format;
+ *
+ *	send mail to "tcpdump-workers@tcpdump.org", requesting a new
+ *	magic number for your new capture file format, and, when
+ *	you get the new magic number, put it in "savefile.c";
+ *
+ *	use that magic number for save files with the changed record
+ *	header;
+ *
+ *	make the code in "savefile.c" capable of reading files with
+ *	the old record header as well as files with the new record header
+ *	(using the magic number to determine the header format).
+ *
+ * Then supply the changes to "patches@tcpdump.org", so that future
+ * versions of libpcap and programs that use it (such as tcpdump) will
+ * be able to read your new capture file format.
+ */
+
+struct pcap_sf_pkthdr {
+    struct pcap_timeval ts;	/* time stamp */
+    bpf_u_int32 caplen;		/* length of portion present */
+    bpf_u_int32 len;		/* length this packet (off wire) */
+};
+
+/*
+ * How a `pcap_pkthdr' is actually stored in savefiles written
+ * by some patched versions of libpcap (e.g. the ones in Red
+ * Hat Linux 6.1 and 6.2).
+ *
+ * Do not change the format of this structure, in any way (this includes
+ * changes that only affect the length of fields in this structure).
+ * Instead, introduce a new structure, as per the above.
+ */
+
+struct pcap_sf_patched_pkthdr {
+    struct pcap_timeval ts;	/* time stamp */
+    bpf_u_int32 caplen;		/* length of portion present */
+    bpf_u_int32 len;		/* length this packet (off wire) */
+    int		index;
+    unsigned short protocol;
+    unsigned char pkt_type;
+};
+
+int	yylex(void);
+
+#ifndef min
+#define min(a, b) ((a) > (b) ? (b) : (a))
+#endif
+
+/* XXX should these be in pcap.h? */
+int	pcap_offline_read(pcap_t *, int, pcap_handler, u_char *);
+int	pcap_read(pcap_t *, int cnt, pcap_handler, u_char *);
+
+#ifndef HAVE_STRLCPY
+#define strlcpy(x, y, z) \
+	(strncpy((x), (y), (z)), \
+	 ((z) <= 0 ? 0 : ((x)[(z) - 1] = '\0')), \
+	 strlen((y)))
+#endif
+
+#include <stdarg.h>
+
+#if !defined(HAVE_SNPRINTF)
+#define snprintf pcap_snprintf
+extern int snprintf (char *, size_t, const char *, ...);
+#endif
+
+#if !defined(HAVE_VSNPRINTF)
+#define vsnprintf pcap_vsnprintf
+extern int vsnprintf (char *, size_t, const char *, va_list ap);
+#endif
+
+/*
+ * Routines that most pcap implementations can use for non-blocking mode.
+ */
+#if !defined(WIN32) && !defined(MSDOS)
+int	pcap_getnonblock_fd(pcap_t *, char *);
+int	pcap_setnonblock_fd(pcap_t *p, int, char *);
+#endif
+
+void	pcap_close_common(pcap_t *);
+
+/*
+ * Internal interfaces for "pcap_findalldevs()".
+ *
+ * "pcap_platform_finddevs()" is a platform-dependent routine to
+ * add devices not found by the "standard" mechanisms (SIOCGIFCONF,
+ * "getifaddrs()", etc..
+ *
+ * "pcap_add_if()" adds an interface to the list of interfaces.
+ */
+int	pcap_platform_finddevs(pcap_if_t **, char *);
+int	add_addr_to_iflist(pcap_if_t **, const char *, u_int, struct sockaddr *,
+	    size_t, struct sockaddr *, size_t, struct sockaddr *, size_t,
+	    struct sockaddr *, size_t, char *);
+int	pcap_add_if(pcap_if_t **, const char *, u_int, const char *, char *);
+struct sockaddr *dup_sockaddr(struct sockaddr *, size_t);
+int	add_or_find_if(pcap_if_t **, pcap_if_t **, const char *, u_int,
+	    const char *, char *);
+
+#ifdef WIN32
+char	*pcap_win32strerror(void);
+#endif
+
+int	install_bpf_program(pcap_t *, struct bpf_program *);
+
+int	pcap_strcasecmp(const char *, const char *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/pcap-stdinc.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2002 - 2003
+ * NetGroup, Politecnico di Torino (Italy)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the Politecnico di Torino nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#define SIZEOF_CHAR 1
+#define SIZEOF_SHORT 2
+#define SIZEOF_INT 4
+#ifndef _MSC_EXTENSIONS
+#define SIZEOF_LONG_LONG 8
+#endif
+
+/*
+ * Avoids a compiler warning in case this was already defined      
+ * (someone defined _WINSOCKAPI_ when including 'windows.h', in order
+ * to prevent it from including 'winsock.h')
+ */
+#ifdef _WINSOCKAPI_
+#undef _WINSOCKAPI_
+#endif
+#include <winsock2.h>
+
+#include <fcntl.h>
+
+#include "bittypes.h"
+#include <time.h>
+#include <io.h>
+
+#ifndef __MINGW32__
+#include "ip6_misc.h"
+#endif
+
+#define caddr_t char*
+
+#define snprintf _snprintf
+#define vsnprintf _vsnprintf
+#define inline __inline 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/pcap.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,344 @@
+/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */
+/*
+ * Copyright (c) 1993, 1994, 1995, 1996, 1997
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the Computer Systems
+ *	Engineering Group at Lawrence Berkeley Laboratory.
+ * 4. Neither the name of the University nor of the Laboratory may be used
+ *    to endorse or promote products derived from this software without
+ *    specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.52.2.6 2006/02/09 22:26:49 guy Exp $ (LBL)
+ */
+
+#ifndef lib_pcap_h
+#define lib_pcap_h
+
+#if defined(WIN32)
+  #include "pcap-stdinc.h"
+#elif defined(MSDOS)
+  #include <sys/types.h>
+  #include <sys/socket.h>  /* u_int, u_char etc. */
+#else /* UN*X */
+  #include <sys/types.h>
+  #include <sys/time.h>
+#endif /* WIN32/MSDOS/UN*X */
+
+#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H
+#include "pcap-bpf.h"
+#endif
+
+#include <stdio.h>
+
+#ifdef HAVE_REMOTE
+	// We have to define the SOCKET here, although it has been defined in sockutils.h
+	// This is to avoid the distribution of the 'sockutils.h' file around
+	// (for example in the WinPcap developer's pack)
+	#ifndef SOCKET
+		#ifdef WIN32
+			#define SOCKET unsigned int
+		#else
+			#define SOCKET int
+		#endif
+	#endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define PCAP_VERSION_MAJOR 2
+#define PCAP_VERSION_MINOR 4
+
+#define PCAP_ERRBUF_SIZE 256
+
+/*
+ * Compatibility for systems that have a bpf.h that
+ * predates the bpf typedefs for 64-bit support.
+ */
+#if BPF_RELEASE - 0 < 199406
+typedef	int bpf_int32;
+typedef	u_int bpf_u_int32;
+#endif
+
+typedef struct pcap pcap_t;
+typedef struct pcap_dumper pcap_dumper_t;
+typedef struct pcap_if pcap_if_t;
+typedef struct pcap_addr pcap_addr_t;
+
+/*
+ * The first record in the file contains saved values for some
+ * of the flags used in the printout phases of tcpdump.
+ * Many fields here are 32 bit ints so compilers won't insert unwanted
+ * padding; these files need to be interchangeable across architectures.
+ *
+ * Do not change the layout of this structure, in any way (this includes
+ * changes that only affect the length of fields in this structure).
+ *
+ * Also, do not change the interpretation of any of the members of this
+ * structure, in any way (this includes using values other than
+ * LINKTYPE_ values, as defined in "savefile.c", in the "linktype"
+ * field).
+ *
+ * Instead:
+ *
+ *	introduce a new structure for the new format, if the layout
+ *	of the structure changed;
+ *
+ *	send mail to "tcpdump-workers@tcpdump.org", requesting a new
+ *	magic number for your new capture file format, and, when
+ *	you get the new magic number, put it in "savefile.c";
+ *
+ *	use that magic number for save files with the changed file
+ *	header;
+ *
+ *	make the code in "savefile.c" capable of reading files with
+ *	the old file header as well as files with the new file header
+ *	(using the magic number to determine the header format).
+ *
+ * Then supply the changes to "patches@tcpdump.org", so that future
+ * versions of libpcap and programs that use it (such as tcpdump) will
+ * be able to read your new capture file format.
+ */
+struct pcap_file_header {
+	bpf_u_int32 magic;
+	u_short version_major;
+	u_short version_minor;
+	bpf_int32 thiszone;	/* gmt to local correction */
+	bpf_u_int32 sigfigs;	/* accuracy of timestamps */
+	bpf_u_int32 snaplen;	/* max length saved portion of each pkt */
+	bpf_u_int32 linktype;	/* data link type (LINKTYPE_*) */
+};
+
+typedef enum {
+       PCAP_D_INOUT = 0,
+       PCAP_D_IN,
+       PCAP_D_OUT
+} pcap_direction_t;
+
+/*
+ * Generic per-packet information, as supplied by libpcap.
+ *
+ * The time stamp can and should be a "struct timeval", regardless of
+ * whether your system supports 32-bit tv_sec in "struct timeval",
+ * 64-bit tv_sec in "struct timeval", or both if it supports both 32-bit
+ * and 64-bit applications.  The on-disk format of savefiles uses 32-bit
+ * tv_sec (and tv_usec); this structure is irrelevant to that.  32-bit
+ * and 64-bit versions of libpcap, even if they're on the same platform,
+ * should supply the appropriate version of "struct timeval", even if
+ * that's not what the underlying packet capture mechanism supplies.
+ */
+struct pcap_pkthdr {
+	struct timeval ts;	/* time stamp */
+	bpf_u_int32 caplen;	/* length of portion present */
+	bpf_u_int32 len;	/* length this packet (off wire) */
+};
+
+/*
+ * As returned by the pcap_stats()
+ */
+struct pcap_stat {
+	u_int ps_recv;		/* number of packets received */
+	u_int ps_drop;		/* number of packets dropped */
+	u_int ps_ifdrop;	/* drops by interface XXX not yet supported */
+#ifdef HAVE_REMOTE
+	u_int ps_capt;		/* number of packets that are received by the application; please get rid off the Win32 ifdef */
+	u_int ps_sent;		/* number of packets sent by the server on the network */
+	u_int ps_netdrop;	/* number of packets lost on the network */
+#endif /* HAVE_REMOTE */
+};
+
+#ifdef MSDOS
+/*
+ * As returned by the pcap_stats_ex()
+ */
+struct pcap_stat_ex {
+       u_long  rx_packets;        /* total packets received       */
+       u_long  tx_packets;        /* total packets transmitted    */
+       u_long  rx_bytes;          /* total bytes received         */
+       u_long  tx_bytes;          /* total bytes transmitted      */
+       u_long  rx_errors;         /* bad packets received         */
+       u_long  tx_errors;         /* packet transmit problems     */
+       u_long  rx_dropped;        /* no space in Rx buffers       */
+       u_long  tx_dropped;        /* no space available for Tx    */
+       u_long  multicast;         /* multicast packets received   */
+       u_long  collisions;
+
+       /* detailed rx_errors: */
+       u_long  rx_length_errors;
+       u_long  rx_over_errors;    /* receiver ring buff overflow  */
+       u_long  rx_crc_errors;     /* recv'd pkt with crc error    */
+       u_long  rx_frame_errors;   /* recv'd frame alignment error */
+       u_long  rx_fifo_errors;    /* recv'r fifo overrun          */
+       u_long  rx_missed_errors;  /* recv'r missed packet         */
+
+       /* detailed tx_errors */
+       u_long  tx_aborted_errors;
+       u_long  tx_carrier_errors;
+       u_long  tx_fifo_errors;
+       u_long  tx_heartbeat_errors;
+       u_long  tx_window_errors;
+     };
+#endif
+
+/*
+ * Item in a list of interfaces.
+ */
+struct pcap_if {
+	struct pcap_if *next;
+	char *name;		/* name to hand to "pcap_open_live()" */
+	char *description;	/* textual description of interface, or NULL */
+	struct pcap_addr *addresses;
+	bpf_u_int32 flags;	/* PCAP_IF_ interface flags */
+};
+
+#define PCAP_IF_LOOPBACK	0x00000001	/* interface is loopback */
+
+/*
+ * Representation of an interface address.
+ */
+struct pcap_addr {
+	struct pcap_addr *next;
+	struct sockaddr *addr;		/* address */
+	struct sockaddr *netmask;	/* netmask for that address */
+	struct sockaddr *broadaddr;	/* broadcast address for that address */
+	struct sockaddr *dstaddr;	/* P2P destination address for that address */
+};
+
+typedef void (*pcap_handler)(u_char *, const struct pcap_pkthdr *,
+			     const u_char *);
+
+char	*pcap_lookupdev(char *);
+int	pcap_lookupnet(const char *, bpf_u_int32 *, bpf_u_int32 *, char *);
+pcap_t	*pcap_open_live(const char *, int, int, int, char *);
+pcap_t	*pcap_open_dead(int, int);
+pcap_t	*pcap_open_offline(const char *, char *);
+pcap_t	*pcap_fopen_offline(FILE *, char *);
+void	pcap_close(pcap_t *);
+int	pcap_loop(pcap_t *, int, pcap_handler, u_char *);
+int	pcap_dispatch(pcap_t *, int, pcap_handler, u_char *);
+const u_char*
+	pcap_next(pcap_t *, struct pcap_pkthdr *);
+int 	pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **);
+void	pcap_breakloop(pcap_t *);
+int	pcap_stats(pcap_t *, struct pcap_stat *);
+int	pcap_setfilter(pcap_t *, struct bpf_program *);
+int 	pcap_setdirection(pcap_t *, pcap_direction_t);
+int	pcap_getnonblock(pcap_t *, char *);
+int	pcap_setnonblock(pcap_t *, int, char *);
+void	pcap_perror(pcap_t *, char *);
+int	pcap_inject(pcap_t *, const void *, size_t);
+int	pcap_sendpacket(pcap_t *, const u_char *, int);
+char	*pcap_strerror(int);
+char	*pcap_geterr(pcap_t *);
+int	pcap_compile(pcap_t *, struct bpf_program *, char *, int,
+	    bpf_u_int32);
+int	pcap_compile_nopcap(int, int, struct bpf_program *,
+	    char *, int, bpf_u_int32);
+void	pcap_freecode(struct bpf_program *);
+int	pcap_datalink(pcap_t *);
+int	pcap_list_datalinks(pcap_t *, int **);
+int	pcap_set_datalink(pcap_t *, int);
+int	pcap_datalink_name_to_val(const char *);
+const char *pcap_datalink_val_to_name(int);
+const char *pcap_datalink_val_to_description(int);
+int	pcap_snapshot(pcap_t *);
+int	pcap_is_swapped(pcap_t *);
+int	pcap_major_version(pcap_t *);
+int	pcap_minor_version(pcap_t *);
+
+/* XXX */
+FILE	*pcap_file(pcap_t *);
+int	pcap_fileno(pcap_t *);
+
+pcap_dumper_t *pcap_dump_open(pcap_t *, const char *);
+pcap_dumper_t *pcap_dump_fopen(pcap_t *, FILE *fp);
+FILE	*pcap_dump_file(pcap_dumper_t *);
+long	pcap_dump_ftell(pcap_dumper_t *);
+int	pcap_dump_flush(pcap_dumper_t *);
+void	pcap_dump_close(pcap_dumper_t *);
+void	pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *);
+
+int	pcap_findalldevs(pcap_if_t **, char *);
+void	pcap_freealldevs(pcap_if_t *);
+
+const char *pcap_lib_version(void);
+
+/* XXX this guy lives in the bpf tree */
+u_int	bpf_filter(struct bpf_insn *, u_char *, u_int, u_int);
+int	bpf_validate(struct bpf_insn *f, int len);
+char	*bpf_image(struct bpf_insn *, int);
+void	bpf_dump(struct bpf_program *, int);
+
+#if defined(WIN32)
+
+/*
+ * Win32 definitions
+ */
+
+int pcap_setbuff(pcap_t *p, int dim);
+int pcap_setmode(pcap_t *p, int mode);
+int pcap_setmintocopy(pcap_t *p, int size);
+
+#ifdef WPCAP
+/* Include file with the wpcap-specific extensions */
+#include <Win32-Extensions.h>
+#endif /* WPCAP */
+
+#define MODE_CAPT 0
+#define MODE_STAT 1
+#define MODE_MON 2
+
+#elif defined(MSDOS)
+
+/*
+ * MS-DOS definitions
+ */
+
+int  pcap_stats_ex (pcap_t *, struct pcap_stat_ex *);
+void pcap_set_wait (pcap_t *p, void (*yield)(void), int wait);
+u_long pcap_mac_packets (void);
+
+#else /* UN*X */
+
+/*
+ * UN*X definitions
+ */
+
+int	pcap_get_selectable_fd(pcap_t *);
+
+#endif /* WIN32/MSDOS/UN*X */
+
+#ifdef HAVE_REMOTE
+/* Includes most of the public stuff that is needed for the remote capture */
+#include "remote-ext.h"
+#endif	 /* HAVE_REMOTE */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/remote-ext.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,441 @@
+/*
+ * Copyright (c) 2002 - 2003
+ * NetGroup, Politecnico di Torino (Italy)
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without 
+ * modification, are permitted provided that the following conditions 
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright 
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright 
+ * notice, this list of conditions and the following disclaimer in the 
+ * documentation and/or other materials provided with the distribution. 
+ * 3. Neither the name of the Politecnico di Torino nor the names of its 
+ * contributors may be used to endorse or promote products derived from 
+ * this software without specific prior written permission. 
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 
+ */
+
+
+#ifndef __REMOTE_EXT_H__
+#define __REMOTE_EXT_H__
+
+
+
+// Definition for Microsoft Visual Studio
+#if _MSC_VER > 1000
+#pragma once
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*!
+	\file remote-ext.h
+
+	The goal of this file it to include most of the new definitions that should be
+	placed into the pcap.h file.
+
+	It includes all new definitions (structures and functions like pcap_open().
+    Some of the functions are not really a remote feature, but, right now, 
+	they are placed here.
+*/
+
+
+
+// All this stuff is public
+/*! \addtogroup remote_struct
+	\{
+*/
+
+
+
+
+/*!
+	\brief Defines the maximum buffer size in which address, port, interface names are kept.
+
+	In case the adapter name or such is larger than this value, it is truncated.
+	This is not used by the user; however it must be aware that an hostname / interface
+	name longer than this value will be truncated.
+*/
+#define PCAP_BUF_SIZE 1024
+
+
+/*! \addtogroup remote_source_ID
+	\{
+*/
+
+
+/*!
+	\brief Internal representation of the type of source in use (file, 
+	remote/local interface).
+
+	This indicates a file, i.e. the user want to open a capture from a local file.
+*/
+#define PCAP_SRC_FILE 2
+/*!
+	\brief Internal representation of the type of source in use (file, 
+	remote/local interface).
+
+	This indicates a local interface, i.e. the user want to open a capture from 
+	a local interface. This does not involve the RPCAP protocol.
+*/
+#define PCAP_SRC_IFLOCAL 3
+/*!
+	\brief Internal representation of the type of source in use (file, 
+	remote/local interface).
+
+	This indicates a remote interface, i.e. the user want to open a capture from 
+	an interface on a remote host. This does involve the RPCAP protocol.
+*/
+#define PCAP_SRC_IFREMOTE 4
+
+/*!
+	\}
+*/
+
+
+
+/*! \addtogroup remote_source_string
+
+	The formats allowed by the pcap_open() are the following:
+	- file://path_and_filename [opens a local file]
+	- rpcap://devicename [opens the selected device devices available on the local host, without using the RPCAP protocol]
+	- rpcap://host/devicename [opens the selected device available on a remote host]
+	- rpcap://host:port/devicename [opens the selected device available on a remote host, using a non-standard port for RPCAP]
+	- adaptername [to open a local adapter; kept for compability, but it is strongly discouraged]
+	- (NULL) [to open the first local adapter; kept for compability, but it is strongly discouraged]
+
+	The formats allowed by the pcap_findalldevs_ex() are the following:
+	- file://folder/ [lists all the files in the given folder]
+	- rpcap:// [lists all local adapters]
+	- rpcap://host:port/ [lists the devices available on a remote host]
+
+	Referring to the 'host' and 'port' paramters, they can be either numeric or literal. Since
+	IPv6 is fully supported, these are the allowed formats:
+
+	- host (literal): e.g. host.foo.bar
+	- host (numeric IPv4): e.g. 10.11.12.13
+	- host (numeric IPv4, IPv6 style): e.g. [10.11.12.13]
+	- host (numeric IPv6): e.g. [1:2:3::4]
+	- port: can be either numeric (e.g. '80') or literal (e.g. 'http')
+
+	Here you find some allowed examples:
+	- rpcap://host.foo.bar/devicename [everything literal, no port number]
+	- rpcap://host.foo.bar:1234/devicename [everything literal, with port number]
+	- rpcap://10.11.12.13/devicename [IPv4 numeric, no port number]
+	- rpcap://10.11.12.13:1234/devicename [IPv4 numeric, with port number]
+	- rpcap://[10.11.12.13]:1234/devicename [IPv4 numeric with IPv6 format, with port number]
+	- rpcap://[1:2:3::4]/devicename [IPv6 numeric, no port number]
+	- rpcap://[1:2:3::4]:1234/devicename [IPv6 numeric, with port number]
+	- rpcap://[1:2:3::4]:http/devicename [IPv6 numeric, with literal port number]
+	
+	\{
+*/
+
+
+/*!
+	\brief String that will be used to determine the type of source in use (file,
+	remote/local interface).
+
+	This string will be prepended to the interface name in order to create a string
+	that contains all the information required to open the source.
+
+	This string indicates that the user wants to open a capture from a local file.
+*/
+#define PCAP_SRC_FILE_STRING "file://"
+/*!
+	\brief String that will be used to determine the type of source in use (file,
+	remote/local interface).
+
+	This string will be prepended to the interface name in order to create a string
+	that contains all the information required to open the source.
+
+	This string indicates that the user wants to open a capture from a network interface.
+	This string does not necessarily involve the use of the RPCAP protocol. If the
+	interface required resides on the local host, the RPCAP protocol is not involved
+	and the local functions are used.
+*/
+#define PCAP_SRC_IF_STRING "rpcap://"
+
+/*!
+	\}
+*/
+
+
+
+
+
+/*!
+	\addtogroup remote_open_flags
+	\{
+*/
+
+/*!
+	\brief Defines if the adapter has to go in promiscuous mode.
+
+	It is '1' if you have to open the adapter in promiscuous mode, '0' otherwise.
+	Note that even if this parameter is false, the interface could well be in promiscuous
+	mode for some other reason (for example because another capture process with 
+	promiscuous mode enabled is currently using that interface).
+	On on Linux systems with 2.2 or later kernels (that have the "any" device), this
+	flag does not work on the "any" device; if an argument of "any" is supplied,
+	the 'promisc' flag is ignored.
+*/
+#define PCAP_OPENFLAG_PROMISCUOUS		1
+
+/*!
+	\brief Defines if the data trasfer (in case of a remote
+	capture) has to be done with UDP protocol.
+
+	If it is '1' if you want a UDP data connection, '0' if you want
+	a TCP data connection; control connection is always TCP-based.
+	A UDP connection is much lighter, but it does not guarantee that all
+	the captured packets arrive to the client workstation. Moreover, 
+	it could be harmful in case of network congestion.
+	This flag is meaningless if the source is not a remote interface.
+	In that case, it is simply ignored.
+*/
+#define PCAP_OPENFLAG_DATATX_UDP			2
+
+
+/*!
+	\brief Defines if the remote probe will capture its own generated traffic.
+
+	In case the remote probe uses the same interface to capture traffic and to send
+	data back to the caller, the captured traffic includes the RPCAP traffic as well.
+	If this flag is turned on, the RPCAP traffic is excluded from the capture, so that
+	the trace returned back to the collector is does not include this traffic.
+*/
+#define PCAP_OPENFLAG_NOCAPTURE_RPCAP	4
+
+/*!
+	\brief Defines if the local adapter will capture its own generated traffic.
+
+	This flag tells the underlying capture driver to drop the packets that were sent by itself. 
+	This is usefult when building applications like bridges, that should ignore the traffic
+	they just sent.
+*/
+#define PCAP_OPENFLAG_NOCAPTURE_LOCAL	8
+
+/*!
+	\brief This flag configures the adapter for maximum responsiveness.
+
+	In presence of a large value for nbytes, WinPcap waits for the arrival of several packets before 
+	copying the data to the user. This guarantees a low number of system calls, i.e. lower processor usage, 
+	i.e. better performance, which is good for applications like sniffers. If the user sets the 
+	PCAP_OPENFLAG_MAX_RESPONSIVENESS flag, the capture driver will copy the packets as soon as the application 
+	is ready to receive them. This is suggested for real time applications (like, for example, a bridge) 
+	that need the best responsiveness.*/
+#define PCAP_OPENFLAG_MAX_RESPONSIVENESS	16
+
+/*!
+	\}
+*/
+
+
+/*!
+	\addtogroup remote_samp_methods
+	\{
+*/
+
+/*!
+	\brief No sampling has to be done on the current capture.
+
+	In this case, no sampling algorithms are applied to the current capture.
+*/
+#define PCAP_SAMP_NOSAMP	0
+
+/*!
+	\brief It defines that only 1 out of N packets must be returned to the user.
+
+	In this case, the 'value' field of the 'pcap_samp' structure indicates the
+	number of packets (minus 1) that must be discarded before one packet got accepted.
+	In other words, if 'value = 10', the first packet is returned to the caller, while
+	the following 9 are discarded.
+*/
+#define PCAP_SAMP_1_EVERY_N	1
+
+/*!
+	\brief It defines that we have to return 1 packet every N milliseconds.
+
+	In this case, the 'value' field of the 'pcap_samp' structure indicates the 'waiting
+	time' in milliseconds before one packet got accepted.
+	In other words, if 'value = 10', the first packet is returned to the caller; the next 
+	returned one will be the first packet that arrives when 10ms have elapsed. 
+*/
+#define PCAP_SAMP_FIRST_AFTER_N_MS 2
+
+/*!
+	\}
+*/
+
+
+/*!
+	\addtogroup remote_auth_methods
+	\{
+*/
+
+/*!
+	\brief It defines the NULL authentication.
+
+	This value has to be used within the 'type' member of the pcap_rmtauth structure.
+	The 'NULL' authentication has to be equal to 'zero', so that old applications
+	can just put every field of struct pcap_rmtauth to zero, and it does work.
+*/
+#define RPCAP_RMTAUTH_NULL 0
+/*!
+	\brief It defines the username/password authentication.
+
+	With this type of authentication, the RPCAP protocol will use the username/
+	password provided to authenticate the user on the remote machine. If the
+	authentication is successful (and the user has the right to open network devices)
+	the RPCAP connection will continue; otherwise it will be dropped.
+
+	This value has to be used within the 'type' member of the pcap_rmtauth structure.
+*/
+#define RPCAP_RMTAUTH_PWD 1
+
+/*!
+	\}
+*/
+
+
+
+
+/*!
+
+	\brief This structure keeps the information needed to autheticate
+	the user on a remote machine.
+	
+	The remote machine can either grant or refuse the access according 
+	to the information provided.
+	In case the NULL authentication is required, both 'username' and
+	'password' can be NULL pointers.
+	
+	This structure is meaningless if the source is not a remote interface;
+	in that case, the functions which requires such a structure can accept
+	a NULL pointer as well.
+*/
+struct pcap_rmtauth
+{
+	/*!
+		\brief Type of the authentication required.
+
+		In order to provide maximum flexibility, we can support different types
+		of authentication based on the value of this 'type' variable. The currently 
+		supported authentication methods are defined into the
+		\link remote_auth_methods Remote Authentication Methods Section\endlink.
+
+	*/
+	int type;
+	/*!
+		\brief Zero-terminated string containing the username that has to be 
+		used on the remote machine for authentication.
+		
+		This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication
+		and it can be NULL.
+	*/
+	char *username;
+	/*!
+		\brief Zero-terminated string containing the password that has to be 
+		used on the remote machine for authentication.
+		
+		This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication
+		and it can be NULL.
+	*/
+	char *password;
+};
+
+
+/*!
+	\brief This structure defines the information related to sampling.
+
+	In case the sampling is requested, the capturing device should read
+	only a subset of the packets coming from the source. The returned packets depend
+	on the sampling parameters.
+
+	\warning The sampling process is applied <strong>after</strong> the filtering process.
+	In other words, packets are filtered first, then the sampling process selects a
+	subset of the 'filtered' packets and it returns them to the caller.
+*/
+struct pcap_samp
+{
+	/*!
+		Method used for sampling. Currently, the supported methods are listed in the
+		\link remote_samp_methods Sampling Methods Section\endlink.
+	*/
+	int method;
+
+	/*!
+		This value depends on the sampling method defined. For its meaning, please check
+		at the \link remote_samp_methods Sampling Methods Section\endlink.
+	*/
+	int value;
+};
+
+
+
+
+//! Maximum lenght of an host name (needed for the RPCAP active mode)
+#define RPCAP_HOSTLIST_SIZE 1024
+
+
+/*!
+	\}
+*/ // end of public documentation
+
+
+// Exported functions
+
+
+
+/** \name New WinPcap functions
+
+	This section lists the new functions that are able to help considerably in writing
+	WinPcap programs because of their easiness of use.
+ */
+//\{
+pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf);
+int pcap_createsrcstr(char *source, int type, const char *host, const char *port, const char *name, char *errbuf);
+int pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf);
+int pcap_findalldevs_ex(char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf);
+struct pcap_samp *pcap_setsampling(pcap_t *p);
+
+//\}
+// End of new winpcap functions
+
+
+
+/** \name Remote Capture functions
+ */
+//\{ 
+SOCKET pcap_remoteact_accept(const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf);
+int pcap_remoteact_list(char *hostlist, char sep, int size, char *errbuf);
+int pcap_remoteact_close(const char *host, char *errbuf);
+void pcap_remoteact_cleanup();
+//\}
+// End of remote capture functions
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/tcp_session.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2001 - 2003
+ * NetGroup, Politecnico di Torino (Italy)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the Politecnico di Torino nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef __tcp_session
+#define __tcp_session
+
+#ifdef WIN32
+#include "tme.h"
+#endif
+
+#ifdef __FreeBSD__
+
+#ifdef _KERNEL
+#include <net/tme/tme.h>
+#else
+#include <tme/tme.h>
+#endif
+
+#endif
+
+#define UNKNOWN			0
+#define SYN_RCV			1
+#define SYN_ACK_RCV		2
+#define ESTABLISHED		3
+#define CLOSED_RST		4
+#define FIN_CLN_RCV		5
+#define FIN_SRV_RCV		6
+#define CLOSED_FIN		7
+#define ERROR_TCP		8
+#define FIRST_IS_CLN	0
+#define	FIRST_IS_SRV	0xffffffff
+#define FIN_CLN			1
+#define	FIN_SRV			2
+
+#define MAX_WINDOW 65536
+
+typedef struct __tcp_data
+{
+	struct timeval timestamp_block; /*DO NOT MOVE THIS VALUE*/
+	struct timeval syn_timestamp;
+	struct timeval last_timestamp;
+	struct timeval syn_ack_timestamp;
+	uint32 direction;
+	uint32 seq_n_0_srv;
+	uint32 seq_n_0_cln;
+	uint32 ack_srv; /* acknowledge of (data sent by server) */
+	uint32 ack_cln; /* acknowledge of (data sent by client) */
+	uint32 status;
+	uint32 pkts_cln_to_srv;
+	uint32 pkts_srv_to_cln;
+	uint32 bytes_srv_to_cln;
+	uint32 bytes_cln_to_srv;
+	uint32 close_state;
+}
+	 tcp_data;
+
+#define FIN		1
+#define	SYN		2
+#define RST		4
+#define PSH		8
+#define ACK		16
+#define URG		32
+
+#define	TCP_SESSION						0x00000800
+uint32 tcp_session(uint8 *block, uint32 pkt_size, TME_DATA *data, MEM_TYPE *mem_ex, uint8 *mem_data);
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/time_calls.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,485 @@
+/*
+ * Copyright (c) 2001 - 2005 NetGroup, Politecnico di Torino (Italy)
+ * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the Politecnico di Torino, CACE Technologies 
+ * nor the names of its contributors may be used to endorse or promote 
+ * products derived from this software without specific prior written 
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef _time_calls
+#define _time_calls
+
+#ifdef WIN_NT_DRIVER
+
+#include "debug.h"
+#include "ndis.h"
+
+#define	DEFAULT_TIMESTAMPMODE								0
+
+#define TIMESTAMPMODE_SINGLE_SYNCHRONIZATION				0
+#define TIMESTAMPMODE_SYNCHRONIZATION_ON_CPU_WITH_FIXUP		1
+#define TIMESTAMPMODE_QUERYSYSTEMTIME						2
+#define TIMESTAMPMODE_RDTSC									3
+
+#define TIMESTAMPMODE_SYNCHRONIZATION_ON_CPU_NO_FIXUP		99
+
+#define TIMESTAMPMODE_REGKEY L"TimestampMode"
+
+extern ULONG TimestampMode;
+
+/*!
+  \brief A microsecond precise timestamp.
+
+  included in the sf_pkthdr or the bpf_hdr that NPF associates with every packet. 
+*/
+
+struct timeval {
+        long    tv_sec;         ///< seconds
+        long    tv_usec;        ///< microseconds
+};
+
+#endif /*WIN_NT_DRIVER*/
+
+struct time_conv
+{
+	ULONGLONG reference;
+	struct timeval start[32];
+};
+
+#ifdef WIN_NT_DRIVER
+
+__inline void TIME_DESYNCHRONIZE(struct time_conv *data)
+{
+	data->reference = 0;
+//	data->start.tv_sec = 0;
+//	data->start.tv_usec = 0;
+}
+
+
+__inline void ReadTimeStampModeFromRegistry(PUNICODE_STRING RegistryPath)
+{
+	ULONG NewLength;
+	PWSTR NullTerminatedString;
+	RTL_QUERY_REGISTRY_TABLE Queries[2];
+	ULONG DefaultTimestampMode = DEFAULT_TIMESTAMPMODE;
+
+	NewLength = RegistryPath->Length/2;
+	
+	NullTerminatedString = ExAllocatePoolWithTag(PagedPool, (NewLength+1) *sizeof(WCHAR), '2TWA');
+	
+	if (NullTerminatedString != NULL)
+	{
+		RtlCopyMemory(NullTerminatedString, RegistryPath->Buffer, RegistryPath->Length);
+				
+		NullTerminatedString[NewLength]=0;
+
+		RtlZeroMemory(Queries, sizeof(Queries));
+		
+		Queries[0].Flags = RTL_QUERY_REGISTRY_DIRECT;
+		Queries[0].Name = TIMESTAMPMODE_REGKEY;
+		Queries[0].EntryContext = &TimestampMode;
+		Queries[0].DefaultType = REG_DWORD;
+		Queries[0].DefaultData = &DefaultTimestampMode;
+		Queries[0].DefaultLength = sizeof(ULONG);
+
+		if(RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE, NullTerminatedString, Queries, NULL, NULL) != STATUS_SUCCESS)
+		{
+			TimestampMode = DEFAULT_TIMESTAMPMODE;
+		}
+
+		RtlWriteRegistryValue(	RTL_REGISTRY_ABSOLUTE, NullTerminatedString, TIMESTAMPMODE_REGKEY,  REG_DWORD, &TimestampMode,sizeof(ULONG));	
+		ExFreePool(NullTerminatedString);
+	}	
+	else
+		TimestampMode = DEFAULT_TIMESTAMPMODE;
+}
+
+#pragma optimize ("g",off)  //Due to some weird behaviour of the optimizer of DDK build 2600 
+
+/* KeQueryPerformanceCounter TimeStamps */
+__inline void SynchronizeOnCpu(struct timeval *start)
+{
+//	struct timeval *start = (struct timeval*)Data;
+
+	struct timeval tmp;
+	LARGE_INTEGER SystemTime;
+	LARGE_INTEGER i;
+	ULONG tmp2;
+	LARGE_INTEGER TimeFreq,PTime;
+
+	// get the absolute value of the system boot time.   
+	
+	PTime = KeQueryPerformanceCounter(&TimeFreq);
+	KeQuerySystemTime(&SystemTime);
+	
+	start->tv_sec = (LONG)(SystemTime.QuadPart/10000000-11644473600);
+
+	start->tv_usec = (LONG)((SystemTime.QuadPart%10000000)/10);
+
+	start->tv_sec -= (ULONG)(PTime.QuadPart/TimeFreq.QuadPart);
+
+	start->tv_usec -= (LONG)((PTime.QuadPart%TimeFreq.QuadPart)*1000000/TimeFreq.QuadPart);
+
+	if (start->tv_usec < 0)
+	{
+		start->tv_sec --;
+		start->tv_usec += 1000000;
+	}
+}	
+
+//
+// inline assembler is not supported with the current AMD64 compilers
+// At the moment we simply disable this timestamping mode on AMD64.
+// A solution would be to allocate a small memory from the non-paged
+// pool, dump the instructions on that buffer, and then execute them.
+// The non paged pool is needed since it's the only area of kernel
+// data memory that is not subject to the NX protection.
+// Or use some lower level trick, like using an assembler to assemble
+// a small function for this. 
+//
+
+#ifdef __NPF_x86__
+/*RDTSC timestamps			*/
+/* callers must be at IRQL=PASSIVE_LEVEL*/
+__inline VOID TimeSynchronizeRDTSC(struct time_conv *data)
+{
+	struct timeval tmp;
+	LARGE_INTEGER system_time;
+	ULONGLONG curr_ticks;
+	KIRQL old;
+	LARGE_INTEGER start_kqpc,stop_kqpc,start_freq,stop_freq;
+	ULONGLONG start_ticks,stop_ticks;
+	ULONGLONG delta,delta2;
+	KEVENT event;
+	LARGE_INTEGER i;
+	ULONGLONG reference;
+
+   	if (data->reference!=0)
+		return;
+	
+	KeInitializeEvent(&event,NotificationEvent,FALSE);
+
+	i.QuadPart=-3500000;
+
+	KeRaiseIrql(HIGH_LEVEL,&old);
+	start_kqpc=KeQueryPerformanceCounter(&start_freq);
+	__asm
+	{
+		push eax
+		push edx
+		push ecx
+		rdtsc
+		lea ecx, start_ticks
+		mov [ecx+4], edx
+		mov [ecx], eax
+		pop ecx
+		pop edx
+		pop eax
+	}
+
+	KeLowerIrql(old);
+	
+    	KeWaitForSingleObject(&event,UserRequest,KernelMode,TRUE ,&i);
+
+	KeRaiseIrql(HIGH_LEVEL,&old);
+	stop_kqpc=KeQueryPerformanceCounter(&stop_freq);
+	__asm
+	{
+		push eax
+		push edx
+		push ecx
+		rdtsc
+		lea ecx, stop_ticks
+		mov [ecx+4], edx
+		mov [ecx], eax
+		pop ecx
+		pop edx
+		pop eax
+	}
+	KeLowerIrql(old);
+
+	delta=stop_ticks-start_ticks;
+	delta2=stop_kqpc.QuadPart-start_kqpc.QuadPart;
+	if (delta>10000000000)
+	{
+		delta/=16;
+		delta2/=16;
+	}
+
+	reference=delta*(start_freq.QuadPart)/delta2;
+	
+	data->reference=reference/1000;
+
+	if (reference%1000>500) 
+		data->reference++;
+
+	data->reference*=1000;
+
+	reference=data->reference;
+		
+	KeQuerySystemTime(&system_time);
+
+	__asm
+	{
+		push eax
+		push edx
+		push ecx
+		rdtsc
+		lea ecx, curr_ticks
+		mov [ecx+4], edx
+		mov [ecx], eax
+		pop ecx
+		pop edx
+		pop eax
+	}
+	
+	tmp.tv_sec=-(LONG)(curr_ticks/reference);
+
+	tmp.tv_usec=-(LONG)((curr_ticks%reference)*1000000/reference);
+
+	system_time.QuadPart-=116444736000000000;
+	
+	tmp.tv_sec+=(LONG)(system_time.QuadPart/10000000);
+	tmp.tv_usec+=(LONG)((system_time.QuadPart%10000000)/10);
+	
+	if (tmp.tv_usec<0)
+	{
+		tmp.tv_sec--;
+		tmp.tv_usec+=1000000;
+	}
+
+	data->start[0] = tmp;
+
+	IF_LOUD(DbgPrint("Frequency %I64u MHz\n",data->reference);)
+}
+#endif //__NPF_x86__
+
+#pragma optimize ("g",on)  //Due to some weird behaviour of the optimizer of DDK build 2600 
+
+__inline VOID TIME_SYNCHRONIZE(struct time_conv *data)
+{
+	ULONG NumberOfCpus, i;
+	KAFFINITY AffinityMask;
+
+	if (data->reference != 0)
+		return;
+		
+	NumberOfCpus = NdisSystemProcessorCount();
+
+	if ( TimestampMode ==  TIMESTAMPMODE_SYNCHRONIZATION_ON_CPU_WITH_FIXUP || TimestampMode == TIMESTAMPMODE_SYNCHRONIZATION_ON_CPU_NO_FIXUP)
+	{
+		for (i = 0 ;  i < NumberOfCpus ; i++ )
+		{
+			AffinityMask = (1 << i);
+			ZwSetInformationThread(NtCurrentThread(), ThreadAffinityMask, &AffinityMask, sizeof(KAFFINITY));
+			SynchronizeOnCpu(&(data->start[i]));		
+		}
+		AffinityMask = 0xFFFFFFFF;
+		ZwSetInformationThread(NtCurrentThread(), ThreadAffinityMask, &AffinityMask, sizeof(KAFFINITY));
+		data->reference = 1;
+ 	}
+	else
+	if ( TimestampMode == TIMESTAMPMODE_QUERYSYSTEMTIME )
+	{
+		//do nothing
+		data->reference = 1;
+	}
+	else
+//
+// This timestamp mode is supported on x86 (32 bit) only
+//
+#ifdef __NPF_x86__
+	if ( TimestampMode == TIMESTAMPMODE_RDTSC )
+	{
+		TimeSynchronizeRDTSC(data);
+	}
+	else
+#endif // __NPF_x86__
+	{	//it should be only the normal case i.e. TIMESTAMPMODE_SINGLESYNCHRONIZATION
+		SynchronizeOnCpu(data->start);
+		data->reference = 1;
+	}
+	return;
+}
+
+
+#pragma optimize ("g",off)  //Due to some weird behaviour of the optimizer of DDK build 2600 
+
+__inline void GetTimeKQPC(struct timeval *dst, struct time_conv *data)
+{
+	LARGE_INTEGER PTime, TimeFreq;
+	LONG tmp;
+	ULONG CurrentCpu;
+	static struct timeval old_ts={0,0};
+
+
+	PTime = KeQueryPerformanceCounter(&TimeFreq);
+	tmp = (LONG)(PTime.QuadPart/TimeFreq.QuadPart);
+
+	if (TimestampMode ==  TIMESTAMPMODE_SYNCHRONIZATION_ON_CPU_WITH_FIXUP || TimestampMode == TIMESTAMPMODE_SYNCHRONIZATION_ON_CPU_NO_FIXUP)
+	{
+		//actually this code is ok only if we are guaranteed that no thread scheduling will take place. 
+		CurrentCpu = KeGetCurrentProcessorNumber();	
+
+		dst->tv_sec = data->start[CurrentCpu].tv_sec + tmp;
+		dst->tv_usec = data->start[CurrentCpu].tv_usec + (LONG)((PTime.QuadPart%TimeFreq.QuadPart)*1000000/TimeFreq.QuadPart);
+	
+		if (dst->tv_usec >= 1000000)
+		{
+			dst->tv_sec ++;
+			dst->tv_usec -= 1000000;
+		}
+
+		if (TimestampMode ==  TIMESTAMPMODE_SYNCHRONIZATION_ON_CPU_WITH_FIXUP)
+		{
+			if (old_ts.tv_sec > dst->tv_sec || (old_ts.tv_sec == dst->tv_sec &&  old_ts.tv_usec > dst->tv_usec) )
+				*dst = old_ts;
+	
+			else
+				old_ts = *dst;
+		}
+	}
+	else
+	{	//it should be only the normal case i.e. TIMESTAMPMODE_SINGLESYNCHRONIZATION
+		dst->tv_sec = data->start[0].tv_sec + tmp;
+		dst->tv_usec = data->start[0].tv_usec + (LONG)((PTime.QuadPart%TimeFreq.QuadPart)*1000000/TimeFreq.QuadPart);
+	
+		if (dst->tv_usec >= 1000000)
+		{
+			dst->tv_sec ++;
+			dst->tv_usec -= 1000000;
+		}
+	}
+}
+
+//
+// inline assembler is not supported with the current AMD64 compilers
+// At the moment we simply disable this timestamping mode on AMD64.
+// A solution would be to allocate a small memory from the non-paged
+// pool, dump the instructions on that buffer, and then execute them.
+// The non paged pool is needed since it's the only area of kernel
+// data memory that is not subject to the NX protection.
+// Or use some lower level trick, like using an assembler to assemble
+// a small function for this. 
+//
+
+#ifdef __NPF_x86__
+__inline void GetTimeRDTSC(struct timeval *dst, struct time_conv *data)
+{
+
+	ULONGLONG tmp = 0;
+	__asm
+	{
+		push eax
+		push edx
+		push ecx
+		rdtsc
+		lea ecx, tmp
+		mov [ecx+4], edx
+		mov [ecx], eax
+		pop ecx
+		pop edx
+		pop eax
+	}
+
+	if (data->reference==0)
+	{
+		return;
+	}
+	dst->tv_sec=(LONG)(tmp/data->reference);
+
+	dst->tv_usec=(LONG)((tmp-dst->tv_sec*data->reference)*1000000/data->reference);
+	
+	dst->tv_sec+=data->start[0].tv_sec;
+
+	dst->tv_usec+=data->start[0].tv_usec;
+
+	if (dst->tv_usec>=1000000)
+	{
+		dst->tv_sec++;
+		dst->tv_usec-=1000000;
+	}
+
+
+}
+#endif //__NPF_x86__
+
+__inline void GetTimeQST(struct timeval *dst, struct time_conv *data)
+{
+	LARGE_INTEGER SystemTime;
+
+	KeQuerySystemTime(&SystemTime);
+	
+	dst->tv_sec = (LONG)(SystemTime.QuadPart/10000000-11644473600);
+	dst->tv_usec = (LONG)((SystemTime.QuadPart%10000000)/10);
+
+}
+
+#pragma optimize ("g",on)  //Due to some weird behaviour of the optimizer of DDK build 2600 
+
+
+__inline void GET_TIME(struct timeval *dst, struct time_conv *data)
+{
+
+//
+// This timestamp mode is supported on x86 (32 bit) only
+//
+#ifdef __NPF_x86__
+	if ( TimestampMode == TIMESTAMPMODE_RDTSC )
+	{
+		GetTimeRDTSC(dst,data);
+	}
+	else
+#endif
+	if ( TimestampMode == TIMESTAMPMODE_QUERYSYSTEMTIME )
+	{
+		GetTimeQST(dst,data);
+	}
+	else
+	{
+		GetTimeKQPC(dst,data);
+	}
+}
+
+
+#else /*WIN_NT_DRIVER*/
+
+__inline void FORCE_TIME(struct timeval *src, struct time_conv *dest)
+{
+	dest->start[0]=*src;
+}
+
+__inline void GET_TIME(struct timeval *dst, struct time_conv *data)
+{
+	*dst=data->start[0];
+}
+
+#endif /*WIN_NT_DRIVER*/
+
+
+#endif /*_time_calls*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/include/tme.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 2001 - 2003
+ * NetGroup, Politecnico di Torino (Italy)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the Politecnico di Torino nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef __tme_include_
+#define __tme_include_
+
+#ifdef WIN_NT_DRIVER
+#include "ndis.h"
+#else
+#include <windows.h>
+#endif /*WIN_NT_DRIVER*/
+
+#include "memory_t.h"
+#include "time_calls.h"
+
+
+/* error codes */
+#define		TME_ERROR			0	
+#define		TME_SUCCESS			1
+#define		TME_TRUE			2
+#define		TME_FALSE			3
+
+/* some constants */
+#define		DEFAULT_MEM_EX_SIZE		65536
+#define		MAX_TME_DATA_BLOCKS		4
+#define		TME_NONE_ACTIVE			0xffffffff
+#define		DELTA_READ				2  /* secs */
+
+#define		TME_LUT_ENTRIES					0x00000000  
+#define		TME_MAX_FILL_STATE				0x00000001  /*potrebbe servire per un thread a passive level!?!?! */
+#define		TME_REHASHING_VALUE				0x00000002	
+#define		TME_KEY_LEN  					0x00000003
+#define		TME_SHARED_MEMORY_BLOCKS		0x00000004
+#define		TME_FILLED_ENTRIES				0x00000005
+#define		TME_BLOCK_SIZE					0x00000006
+#define		TME_EXTRA_SEGMENT_SIZE			0x00000007
+#define		TME_LOOKUP_CODE					0x00000008
+#define		TME_OUT_LUT_EXEC				0x00000009
+#define		TME_FILLED_BLOCKS				0x0000000a
+#define		TME_DEFAULT_EXEC				0x0000000b
+#define		TME_LUT_BASE_ADDRESS			0x0000000c
+#define		TME_SHARED_MEMORY_BASE_ADDRESS	0x0000000d
+#define		TME_EXTRA_SEGMENT_BASE_ADDRESS	0x0000000e
+#define		TME_LAST_FOUND					0x0000000f   /* contains the offset of the last found entry */
+#define		TME_LAST_FOUND_BLOCK			0x00000010
+/* TME default values */
+#define		TME_LUT_ENTRIES_DEFAULT				32007
+#define		TME_REHASHING_VALUE_DEFAULT			1
+#define		TME_SHARED_MEMORY_BLOCKS_DEFAULT	16000
+#define		TME_BLOCK_SIZE_DEFAULT				64
+#define		TME_EXTRA_SEGMENT_SIZE_DEFAULT		0
+#define		TME_LOOKUP_CODE_DEFAULT				0
+#define		TME_OUT_LUT_EXEC_DEFAULT			0
+#define		TME_DEFAULT_EXEC_DEFAULT			0
+#define		TME_MAX_FILL_STATE_DEFAULT			15000
+
+#define IS_VALIDATED(src,index) (src&(1<<index))
+
+#define VALIDATE(src,index) src|=(1<<index);
+
+
+#define FORCE_NO_DELETION(timestamp)  (struct timeval*)(timestamp)->tv_sec=0x7fffffff;
+
+struct __TME_DATA;
+
+/* TME callback prototypes */
+typedef uint32 (*lut_fcn)(uint8 *key, struct __TME_DATA *data,MEM_TYPE *mem_ex, struct time_conv *time_ref );
+typedef uint32 (*exec_fcn)(uint8 *block, uint32 pkt_size, struct __TME_DATA *data, MEM_TYPE *mem_ex, uint8 *mem_data);
+
+/* DO NOT MODIFY THIS STRUCTURE!!!! GV */
+typedef struct __RECORD
+
+{
+	uint32 block;
+	uint32 exec_fcn;
+}
+	RECORD, *PRECORD;
+
+/* TME data registers */
+struct __TME_DATA
+{
+	uint32 lut_entries;
+	uint32 max_fill_state;
+	uint32 rehashing_value;
+	uint32 key_len;
+	uint32 shared_memory_blocks;
+	uint32 filled_entries;
+	uint32 block_size;
+	uint32 extra_segment_size;
+	uint32 filled_blocks;
+	lut_fcn lookup_code;
+	uint32 default_exec;
+	uint32 out_lut_exec;
+	uint8 *lut_base_address;
+	uint8 *shared_memory_base_address;
+	uint8 *extra_segment_base_address;
+	struct timeval last_read;
+	uint32	enable_deletion;
+	uint8 *last_found;
+};
+
+typedef struct __TME_DATA TME_DATA,*PTME_DATA;
+
+
+
+/* TME core */
+typedef struct __TME_CORE
+{
+	uint32      working;
+	uint32		active;
+	uint32		validated_blocks;
+	TME_DATA	block_data[MAX_TME_DATA_BLOCKS];
+	uint32		active_read;
+	
+} TME_CORE, *PTME_CORE;
+
+static __inline int32 IS_DELETABLE(void *timestamp, TME_DATA *data)
+{
+	struct timeval *ts=(struct timeval*)timestamp;
+
+	if (data->enable_deletion==FALSE)
+		return FALSE;
+	if (data->filled_entries<data->max_fill_state)
+		return FALSE;
+	if ((ts->tv_sec+DELTA_READ)<data->last_read.tv_sec)
+		return TRUE;
+	return FALSE;
+}
+
+/* functions to manage TME */
+uint32 init_tme_block(TME_CORE *tme, uint32 block);
+uint32 validate_tme_block(MEM_TYPE *mem_ex, TME_CORE *tme, uint32 block, uint32 mem_ex_offset);
+uint32 lookup_frontend(MEM_TYPE *mem_ex, TME_CORE *tme,uint32 mem_ex_offset, struct time_conv *time_ref);
+uint32 execute_frontend(MEM_TYPE *mem_ex, TME_CORE *tme, uint32 pkt_size,uint32 offset);
+uint32 set_active_tme_block(TME_CORE *tme, uint32 block);
+uint32 init_extended_memory(uint32 size, MEM_TYPE *mem_ex);
+uint32 reset_tme(TME_CORE *tme);
+uint32 get_tme_block_register(TME_DATA *data,MEM_TYPE *mem_ex,uint32 rgstr,uint32 *rval);
+uint32 set_tme_block_register(TME_DATA *data,MEM_TYPE *mem_ex,uint32 rgstr,uint32 value, int32 init);
+uint32 set_active_read_tme_block(TME_CORE *tme, uint32 block);
+uint32 set_autodeletion(TME_DATA *data, uint32 value);
+
+/* function mappers */
+lut_fcn lut_fcn_mapper(uint32 index);
+exec_fcn exec_fcn_mapper(uint32 index);
+
+#endif
\ No newline at end of file
Binary file emulator/emulatorbsp/wpdpack/lib/libwpcap.a has changed
Binary file emulator/emulatorbsp/wpdpack/lib/packet.a has changed
Binary file emulator/emulatorbsp/wpdpack/lib/packet.lib has changed
Binary file emulator/emulatorbsp/wpdpack/lib/wpcap.lib has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/readme-cygwin.txt	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+Makefiles provided by Nate Lawson (nate@rootlabs.com)
+
+Import libraries for the cygwin compiler are in the lib directory (*.a)
+
+To build, cd to the examples directory and type "make".  This will build
+all the examples except netmeter.  Alternatively, you can type "make" in
+each example you want to build.  To remove all objects and executables,
+type "make clean".
+
+TODO:
+I didn't want to deal with the resource files for netmeter although cygwin
+supports these.  Perhaps someone can build a makefile for the netmeter
+example.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emulator/emulatorbsp/wpdpack/readme.txt	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+* WinPcap Developer's pack    *
+* Release 2.2 - June 2001     *
+* Written by Loris Degioanni  * 
+
+
+This archive contains all the stuff useful to create new network capture applications using winpcap. 
+The archive contains the following folders:
+
+- drivers               Binaries of WinPcap's drivers and DLLs for Win95/98/ME, 
+                        WinNT4 and Win2K. Useful to test the programs.
+- examples              Sample applications showing various uses of of winpcap 
+                        and packet.dll.
+- lib		        library files needed to create capture applications
+- include		include files needed to create capture applications
+
+see the documentation at http://netgroup-serv.polito.it/winpcap for manuals, instructions and details.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/group/bspsvs.mrp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+component	bspsvs
+source			\sf\os\boardsupport\haitest\bspsvs
+notes_source	\sf\os\boardsupport\haitest\bspsvs\group\release.txt
+ipr T
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/group/release.txt	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+NOTESRC_RELEASER
+Nokia Corporation
+
+NOTESRC_RELEASE_REASON
+Base HAI
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/group/bld.inf	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,63 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+
+
+PRJ_TESTEXPORTS
+//t_digitiser.oby									/src/cedar/generic/base/e32/rombuild/t_digitiser.oby
+t_digitiser.oby									/sf/os/kernelhwsrv/kernel/eka/rombuild/t_digitiser.oby
+t_digitiser.oby									/epoc32/rom/haitests/t_digitiser.oby
+t_digitiser.iby									/epoc32/rom/haitests/t_digitiser.iby
+t_digitiser_binaries.iby							/epoc32/rom/haitests/t_digitiser_binaries.iby
+t_digitiser_testdata.iby							/epoc32/rom/haitests/t_digitiser_testdata.iby
+
+../pkg/t_digitiser.bat								z:/base/t_digitiser.bat
+
+../scripts/base-bsp-digitiser-driver.script	        			z:/base/digitiser/base-bsp-digitiser-driver.script
+../scripts/base-bsp-digitiser-driver-manual.script	        		z:/base/digitiser/base-bsp-digitiser-driver-manual.script
+../scripts/base-bsp-digitiser-driver-automated.script	        		z:/base/digitiser/base-bsp-digitiser-driver-automated.script
+
+../testdata/base-bsp-digitiser-driver-automated.ini				z:/base/digitiser/base-bsp-digitiser-driver-automated.ini
+../testdata/base-bsp-digitiser-driver-manual.ini				z:/base/digitiser/base-bsp-digitiser-driver-manual.ini
+
+#if defined(TEST_DEVICE_H4HRP)
+../testdata/h4hrp/t_digitiser.ini						z:/base/digitiser/t_digitiser.ini
+../testdata/h4hrp/t_digitiser.tcs						z:/base/digitiser/t_digitiser.tcs
+#endif
+
+#if defined(TEST_DEVICE_H6HRP)
+../testdata/h6hrp/t_digitiser.ini						z:/base/digitiser/t_digitiser.ini
+../testdata/h6hrp/t_digitiser.tcs						z:/base/digitiser/t_digitiser.tcs
+#endif
+
+#if defined(TEST_DEVICE_DEVLON51)
+../testdata/devlon51/t_digitiser.ini						z:/base/digitiser/t_digitiser.ini
+../testdata/devlon51/t_digitiser.tcs						z:/base/digitiser/t_digitiser.tcs
+#endif
+
+#if defined(TEST_DEVICE_DEVLON52)
+../testdata/devlon52/t_digitiser.ini						z:/base/digitiser/t_digitiser.ini
+../testdata/devlon52/t_digitiser.tcs						z:/base/digitiser/t_digitiser.tcs
+#endif
+
+#if defined(TEST_DEVICE_TUBE)
+../testdata/tube/t_digitiser.ini						z:/base/digitiser/t_digitiser.ini
+../testdata/tube/t_digitiser.tcs						z:/base/digitiser/t_digitiser.tcs
+#endif
+
+
+PRJ_TESTMMPFILES
+t_digitiser.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/group/t_digitiser.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,25 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_DIGITISER_IBY__)
+#define __T_DIGITISER_IBY__
+
+//Test Includes
+#include <rom\haitests\t_digitiser_binaries.iby>
+#include <rom\haitests\t_digitiser_testdata.iby>
+
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/group/t_digitiser.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+TARGET			t_digitiser.exe
+TARGETTYPE		exe
+UID			0x1000007A 0x102863D8
+VENDORID		0x70000001
+
+capability		All -TCB
+
+SOURCEPATH		../src
+
+SOURCE			../../../hal/src/T_HALData.cpp
+SOURCE			../../../e32/src/T_RConsoleData.cpp
+SOURCE			../../../e32/src/T_ActiveRConsoleRead.cpp
+SOURCE			../../../e32/src/T_RSessionBaseData.cpp
+SOURCE			../../../e32/src/T_RHandleBaseData.cpp
+SOURCE			../../../common/src/DataWrapperBase.cpp
+SOURCE			../../../common/src/ActiveCallbackBase.cpp
+SOURCE			../../../common/src/DrawUtils.cpp
+
+
+SOURCE			T_DigitiserDriverServer.cpp
+SOURCE			T_DigitiserDriverData.cpp
+
+
+
+USERINCLUDE		../inc
+USERINCLUDE		../../../common/inc
+USERINCLUDE		../../../e32/inc
+USERINCLUDE		../../../hal/inc
+
+SYSTEMINCLUDE	/epoc32/include
+SYSTEMINCLUDE	/epoc32/include/test
+SYSTEMINCLUDE	/epoc32/include/kernel
+
+LIBRARY			euser.lib
+LIBRARY			efsrv.lib
+LIBRARY			hal.lib
+LIBRARY			testexecuteutils.lib
+LIBRARY			testexecutelogclient.lib
+LIBRARY			bafl.lib
+LIBRARY			iniparser.lib
+LIBRARY			econs.lib 
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/group/t_digitiser.oby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,33 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#define BASE_ROM
+#include <rom\##VARIANT##\header.iby>
+
+files=
+
+#include <rom\##VARIANT##\kernel.iby>
+#include "user.iby"
+#include <rom\hal\hal.iby>
+#include <rom\f32\f32.iby>
+
+//TEF Includes
+#include <rom\include\base_testexecutelite.iby>
+
+// Tests
+#include <rom\haitests\t_digitiser.iby>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/group/t_digitiser_binaries.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,26 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_DIGITISER_BINARIES_IBY__)
+#define __T_DIGITISER__BINARIES_IBY__
+
+#if (!defined EKA2)
+file=\epoc32\release\##MAIN##\##BUILD##\t_digitiser.exe		\sys\bin\t_digitiser.exe
+#else
+file=\epoc32\release\##MAIN##\##BUILD##\t_digitiser.exe		\sys\bin\t_digitiser.exe
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/group/t_digitiser_testdata.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,32 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_DIGITISER_TESTDATA_IBY__)
+#define __T_DIGITISER_TESTDATA_IBY__
+
+data=EPOCROOT##epoc32\data\z\base\digitiser\base-bsp-digitiser-driver.script			base\digitiser\base-bsp-digitiser-driver.script	
+data=EPOCROOT##epoc32\data\z\base\digitiser\base-bsp-digitiser-driver-automated.script		base\digitiser\base-bsp-digitiser-driver-automated.script	
+data=EPOCROOT##epoc32\data\z\base\digitiser\base-bsp-digitiser-driver-manual.script		base\digitiser\base-bsp-digitiser-driver-manual.script	
+
+data=EPOCROOT##epoc32\data\z\base\digitiser\base-bsp-digitiser-driver-manual.ini		base\digitiser\base-bsp-digitiser-driver-manual.ini
+data=EPOCROOT##epoc32\data\z\base\digitiser\base-bsp-digitiser-driver-automated.ini		base\digitiser\base-bsp-digitiser-driver-automated.ini
+
+
+data=EPOCROOT##epoc32\data\z\base\digitiser\t_digitiser.ini					base\digitiser\t_digitiser.ini	
+data=EPOCROOT##epoc32\data\z\base\digitiser\t_digitiser.tcs					base\digitiser\t_digitiser.tcs
+data=EPOCROOT##epoc32\data\z\base\t_digitiser.bat						base\t_digitiser.bat
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/group/user_input.oby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,39 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+						
+file=\Epoc32\Release\armv5\urel\testexecutelogclient.dll	                        \sys\bin\testexecutelogclient.dll
+file=\Epoc32\Release\armv5\urel\testexecutelogengine.exe	                        \sys\bin\testexecutelogengine.exe
+file=\Epoc32\Release\armv5\urel\RFileLoggerClient.dll		                        \sys\bin\RFileLoggerClient.dll
+file=\Epoc32\Release\armv5\urel\RFileLoggerServer.exe		                        \sys\bin\RFileLoggerServer.exe
+file=\Epoc32\Release\armv5\urel\testexecute.exe			                        \sys\bin\testexecute.exe
+file=\Epoc32\Release\armv5\urel\testexecuteutils.dll		                        \sys\bin\testexecuteutils.dll
+data=\Epoc32\data\z\system\data\testexecute.ini			                        \system\data\testexecute.ini
+file=\epoc32\release\armv5\urel\wrapperutilsplugin.dll		                        \sys\bin\wrapperutilsplugin.dll
+file=\epoc32\release\armv5\urel\testexecutepipslogclient.dll                            \sys\bin\testexecutepipslogclient.dll	
+file=\Epoc32\Release\armv5\urel\iniparser.dll			                        \sys\bin\iniparser.dll
+file=\Epoc32\Release\armv5\urel\t_digitiser.exe		                                \sys\bin\t_digitiser.exe
+data=\Epoc32\data\z\base\digitiser\base-bsp-digitiser-driver.script		        \base\digitiser\base-bsp-digitiser-driver.script
+data=\Epoc32\data\z\base\digitiser\base-bsp-digitiser-driver-manual.script	        \base\digitiser\base-bsp-digitiser-driver-manual.script
+data=\Epoc32\data\z\base\digitiser\base-bsp-digitiser-driver-automated.script	        \base\digitiser\base-bsp-digitiser-driver-automated.script
+data=\Epoc32\data\z\base\digitiser\base-bsp-digitiser-driver-automated.ini		\base\digitiser\base-bsp-digitiser-driver-automated.ini
+data=\Epoc32\data\z\base\digitiser\base-bsp-digitiser-driver-manual.ini			\base\digitiser\base-bsp-digitiser-driver-manual.ini
+data=\Epoc32\data\z\base\digitiser\t_digitiser.ini			                \base\digitiser\t_digitiser.ini
+data=\Epoc32\data\z\base\t_digitiser.bat						\base\t_digitiser.bat
+data=\Epoc32\release\armv5\urel\z\base\digitiser\t_digitiser.tcs			\base\digitiser\t_digitiser.tcs
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/group/user_romfiles.txt	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,20 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+testexecutepipslogclient.dll
+iniparser.dll
+ocspcommon.dll
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/inc/T_DigitiserDriverData.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,105 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_DIGITISER_DRIVER_DATA_H__)
+#define __T_DIGITISER_DRIVER_DATA_H__
+
+//	EPOC includes
+#include <e32twin.h>
+
+
+//	User Includes
+#include "T_HALData.h"
+
+ 
+class CT_DigitiserDriverData : public CT_HALData
+/**
+*	Test Active Notification class
+@test
+@publishedPartner
+@see CT_HALData
+*/
+	{
+public:
+	/**
+	* Public destructor
+	*/
+	~CT_DigitiserDriverData();
+
+	/**
+	* Two phase constructor
+	*
+	* @leave	system wide error
+	*/
+	static	CT_DigitiserDriverData*	NewL();
+
+	virtual TAny*	GetObject();
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+	
+ 		
+protected:
+	/**
+	* Protected constructor. First phase construction
+	*/
+	CT_DigitiserDriverData();
+	void	ConstructL();
+	static TBool	GetPrepareData(CDataWrapperBase* aThis, const TDesC& aSection, TInt& aValueStart, TInt& /*aValueEnd*/);
+	
+	static TBool	GetPrepareDummy(CDataWrapperBase* /*aThis*/, const TDesC& /*aSection*/, TInt& /*aValueStart*/, TInt& /*aValueEnd*/);
+   	static void 	GetValidation(CDataWrapperBase* aThis, const TDesC& aSection, TInt aValue, TBool aForceValidation);
+   	//for the touch screen device
+ 	static void 	SetPen(CDataWrapperBase* aThis, TInt aValue);
+ 	static void 	SetPenX(CDataWrapperBase* aThis, TInt aValue);
+ 	static void 	SetPenY(CDataWrapperBase* aThis, TInt aValue);
+ 	static void 	SetPenState(CDataWrapperBase* aThis, TInt aValue);
+ 	
+	//for the sound driver device
+	static void 	SetPenClick(CDataWrapperBase* aThis, TInt aValue);					
+	static void 	SetPenClickVolumeMax(CDataWrapperBase* aThis, TInt aValue);				
+	static void 	SetPenClickState(CDataWrapperBase* aThis, TInt aValue);					
+	static void 	SetPenClickVolume(CDataWrapperBase* aThis, TInt aValue);
+	
+	//for the power controller					
+	static void 	SetPenDisplayOn(CDataWrapperBase* aThis, TInt aValue);
+	
+	//for the LCD screen
+	static void 	SetDisplayState(CDataWrapperBase* aThis, TInt aValue);
+	static void 	SetDisplayMode(CDataWrapperBase* aThis, TInt aValue);
+	
+private:
+
+
+protected:
+	TInt 		iPenState;
+	TInt 		iPen;
+	TInt 		iPenX;
+	TInt 		iPenY;
+	TInt        iPenClick;
+	TInt        iPenClickVolumeMax;
+	TInt		iPenClickState;
+	TInt 		iPenClickVolume;
+	TInt        iPenDisplayOn;
+	TInt 		iDisplayState;
+	TInt 		iDisplayMode;
+
+private:
+	static const THalTableLookup	iTableLookup[];
+	};
+ 
+ #endif /* __T_DIGITISER_DRIVER_DATA_H__ */
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/inc/T_DigitiserDriverServer.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_DIGITISER_DRIVER_SERVER_H__)
+#define __T_DIGITISER_DRIVER_SERVER_H__
+
+//	EPOC Includes
+#include <testserver2.h>
+
+
+
+// This wrapper class extends the test server and creates test server for digitiser
+class CT_DigitiserDriverServer : public CTestServer2
+	{
+private:
+	class CT_DigitiserDriverBlock : public CTestBlockController
+		{
+	public:
+		inline CT_DigitiserDriverBlock();
+		inline ~CT_DigitiserDriverBlock();
+		CDataWrapper*	CreateDataL( const TDesC& aData );
+		};
+
+public:
+	inline ~CT_DigitiserDriverServer();
+
+	inline void	DeleteActiveSchedulerL();
+
+	static CT_DigitiserDriverServer* NewL();
+
+	inline CTestBlockController*	CreateTestBlock();
+
+protected:
+	inline CT_DigitiserDriverServer();
+	};
+
+#include "T_DigitiserDriverServer.inl"
+
+
+#endif /* __T_DIGITISER_DRIVER_SERVER_H__ */
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/inc/T_DigitiserDriverServer.inl	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+CT_DigitiserDriverServer::CT_DigitiserDriverBlock::CT_DigitiserDriverBlock()
+:	CTestBlockController()
+	{
+	}
+
+CT_DigitiserDriverServer::CT_DigitiserDriverBlock::~CT_DigitiserDriverBlock()
+	{
+	}
+
+CT_DigitiserDriverServer::CT_DigitiserDriverServer()
+	{
+	}
+
+CT_DigitiserDriverServer::~CT_DigitiserDriverServer()
+	{
+	}
+
+void CT_DigitiserDriverServer::DeleteActiveSchedulerL()
+	{
+	}
+
+CTestBlockController* CT_DigitiserDriverServer::CreateTestBlock()
+	{
+	return new CT_DigitiserDriverBlock();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/pkg/t_digitiser.bat	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,18 @@
+@rem
+@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+testexecute z:\base\digitiser\BASE-BSP-DIGITISER-DRIVER.script -tcx z:\base\digitiser\t_digitiser.tcs
+copy c:\logs\testexecute\*.htm d:\
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/scripts/base-bsp-digitiser-driver-automated.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,502 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//! @file
+//! @SYMTestSuiteName		base-bsp-digitiser-driver-automated
+//! @SYMScriptTestEnvironment	This test script requires a base port ROM
+
+/////////////////////////////////////////////////////////////////////
+// base-bsp-digitiser-driver-automated.script
+//
+// Tests the Digitiser through the HAL::Set(TAttribute, TInt) and HAL:Get() methods with the attributes in 
+// EHalGroupDigitiser, EHalGroupSound and EHalGroupPower  HAL groups. 
+//
+// The tests are automated. 
+/////////////////////////////////////////////////////////////////////
+
+LOAD_SUITE	T_Digitiser
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0001
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0001
+//! @SYMAPI			HAL::Get(EPenState, TInt{ref});  
+//!                             TDigitiserHalFunction::EDigitiserHalXYState
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		Pen State Test 
+//!                             Confirm that the Pen State for the digitiser is enabled. 
+//!				Uses API elements: HAL::Get, EDigitiserHalXYState
+//! @SYMTestActions    		1. Create Hal Handle object. 
+//!                             2. Get the current EPenState and validate that it is enabled (value is 1), 
+//!                                using HAL::Get
+//!				3. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Digitiser State (touch Screen state) is enabled 
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	        T_Digitiser	\base\digitiser\base-bsp-digitiser-driver-automated.ini
+		CREATE_OBJECT	HalData         digitiser1
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0001-GetCurrentPenState
+        END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0001
+
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0002
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0002
+//! @SYMAPI			Hal::Set(EPenState, TInt);    
+//!                             TDigitiserHalFunction::EDigitiserHalXYState
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		Pen State Test 
+//!                             Disable the the Pen State for the digitiser. 
+//!				Uses API elements: HAL::Set, EDigitiserHalXYState
+//! @SYMTestActions    		1. Create Hal Handle object. 
+//!                             2. Disable the EPenState (value is 0) using HAL:Set.
+//!				3. Get EPenState using HAL::Get, and validate that it is disabled (value is 0).
+//!				4. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Digitiser State (touch Screen state) is disabled.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	        T_Digitiser	\base\digitiser\base-bsp-digitiser-driver-automated.ini
+		CREATE_OBJECT	HalData         digitiser1
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0002-PenState
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0002-PenState
+        END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0002	
+
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0003
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0003
+//! @SYMAPI			HAL::Set(EPenState, TInt);    
+//!                             HAL::Get(EPenState, TInt{ref});
+//!                             TDigitiserHalFunction::EDigitiserHalXYState
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		Pen State Test 
+//!                             Disable the the Pen State for the digitiser. 
+//!				Uses API elements: HAL::Set, EDigitiserHalXYState
+//! @SYMTestActions    		1. Create Hal Handle object. 
+//!                             2. Enable the EPenState (value is 1) using HAL:Set.
+//!				3. Get EPenState using HAL::Get, and validate that it is enabled (value is 1).
+//!				4. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Digitiser State (touch Screen state) is enabled 
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	        T_Digitiser	\base\digitiser\base-bsp-digitiser-driver-automated.ini
+		CREATE_OBJECT	HalData         digitiser1
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0003-PenState
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0003-PenState
+        END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0003	
+
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0004
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0004
+//! @SYMAPI			HAL::Set(EPenState, TInt);
+//!                             HAL::Get(EPenState, TInt{ref}); 
+//!                             TDigitiserHalFunction::EDigitiserHalXYState
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		Pen State Test 
+//!                             Confirm that the Pen State for the digitiser is enabled. 
+//!                             Disable the the Pen State for the digitiser.
+//!                             Validate the Pen State of digitiser is disabled 
+//!                             Restore the Pen State to original state (enabled)
+//!                             Validate that the Pen State is the original state. 
+//!				Uses API elements: HAL::Set,HAL::Get, EDigitiserHalXYState
+//! @SYMTestActions    		1. Create Hal Handle object. 
+//!                             2. Get the current EPenState and validate that it is enabled (value is 1), 
+//!                                using HAL::Get
+//!				3. Disable the EPenState (value is 0) using HAL:Set.
+//!				4. Get EPenState using HAL::Get, and validate that it is disabled (value is 0).
+//!				5. Restore EPenState to enabled (value is 1) using HAL:Set.
+//!				6. Get EPenState using HAL::Get, and validate that it is enabled (value is 1).
+//!				7. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Digitiser State (touch Screen state) is enabled  
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	        T_Digitiser	\base\digitiser\base-bsp-digitiser-driver-automated.ini
+		CREATE_OBJECT	HalData         digitiser1
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0004-GetCurrentPenState
+                COMMAND		digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0004-SetPenState
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0004-GetPenState
+                COMMAND		digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0004-SetRestoredPenState
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0004-GetRestoredPenState
+        END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0004	
+
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0005
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0005
+//! @SYMAPI			HAL::Get(EPen, TInt{ref}); 
+//!                             TDigitiserHalFunction::EDigitiserHalXYInfo
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		Pen Test
+//!                             Retreive the digitiser for input state. 
+//!				Uses API elements:HAL::Get, EDigitiserHalXYInfo
+//! @SYMTestActions    		1. Create Hal Handle object. 
+//!                             2. Get the current Pen and validate that it is enabled (value is 1), 
+//!                                using HAL::Get
+//!				3. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Digitiser (touch Screen) is enabled  for input
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	        T_Digitiser	\base\digitiser\base-bsp-digitiser-driver-automated.ini
+		CREATE_OBJECT	HalData         digitiser1
+                COMMAND	        digitiser1      Get			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0005-GetPen                
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0005	
+
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0006
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0006
+//! @SYMAPI			HAL::Get(EPenX, TInt{ref}); 
+//!                             TDigitiserHalFunction::EDigitiserHalXYInfo
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		PenX Test
+//!                             Retrieve the pen/digitizer horizontal resolution, in pixels
+//!                             and Validate that it  is as expected.
+//!				Uses API elements:HAL::Get, EDigitiserHalXYInfo
+//! @SYMTestActions    		1. Create Hal Handle object. 
+//!                             2. Retrieve the pen/digitizer horizontal resolution, in pixels
+//!                                using HAL::Get
+//!				3. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Digitiser (touch Screen) horizontal screen resolution in pixels is as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	        T_Digitiser	\base\digitiser\base-bsp-digitiser-driver-automated.ini
+		CREATE_OBJECT	HalData         digitiser1
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0006-GetPenX                
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0006	
+
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0007
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0007
+//! @SYMAPI			HAL::Get(EPenY, TInt{ref}); 
+//!                             TDigitiserHalFunction::EDigitiserHalXYInfo
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		PenY Test
+//!                             Retrieve the pen/digitizer vertical resolution, in pixels
+//!                             and Validate that it is as expected.
+//!				Uses API elements:HAL::Get, EDigitiserHalXYInfo
+//! @SYMTestActions    		1. Create Hal Handle object. 
+//!                             2. Retrieve the pen/digitizer vertical resolution, in pixels
+//!                                using HAL::Get
+//!				3. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Digitiser (touch Screen) vertical screen resolution in pixels is as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	        T_Digitiser	\base\digitiser\base-bsp-digitiser-driver-automated.ini
+		CREATE_OBJECT	HalData         digitiser1
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0007-GetPenY                
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0007	
+
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0008
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0008
+//! @SYMAPI			HAL::Get(EPenClick, TInt{ref}); 
+//!                             TSoundHalFunction::ESoundHalPointerClickEnabled
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		EPenClick Test
+//!                             Confirm whether digitiser supports production of click sound via
+//!                             retrieval of EPenClick.                          
+//!				Uses API elements:HAL::Get, ESoundHalPointerClickEnabled
+//! @SYMTestActions    		1. Create Hal Handle object. 
+//!                             2. Retrieve the click sound for pen tap's in digitiser and validate that it is as expected.
+//!                                using HAL::Get
+//!				3. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Digitiser (touch Screen) click sound for pen is as expected (disabled).
+//!                             The device cannot produce a click sound.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	        T_Digitiser	\base\digitiser\base-bsp-digitiser-driver-automated.ini
+		CREATE_OBJECT	HalData         digitiser1
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0008-PenClick               
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0008
+
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0011
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0011
+//! @SYMAPI			HAL::Get(EPenClickState, TInt{ref}); 
+//!                             TSoundHalFunction::ESoundHalSetPointerClickEnabled;
+//!                             TSoundHalFunction::ESoundHalPointerClickEnabled
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		EPenClickState Test
+//!                             Retrieve click sound for pen tap's in digitiser and validate that it is disabled.                          
+//!				Uses API elements:HAL::Get, ESoundHalPointerClickEnabled
+//! @SYMTestActions    		1. Create Hal Handle object. 
+//!                             2. Retrieve the click sound for pen tap's in digitiser and validate that it is as expected.
+//!                                using HAL::Get
+//!				3. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Digitiser (touch Screen) click sound for pen is as expected (disabled).
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	        T_Digitiser	\base\digitiser\base-bsp-digitiser-driver-automated.ini
+		CREATE_OBJECT	HalData         digitiser1
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0011-PenClickState               
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0011
+
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0012
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0012
+//! @SYMAPI			HAL::Set(EPenClickState, TInt);
+//!                             HAL::Get(EPenClickState, TInt{ref}); 
+//!                             TSoundHalFunction::ESoundHalSetPointerClickEnabled;
+//!                             TSoundHalFunction::ESoundHalPointerClickEnabled
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		EPenClickState Test
+//!                             Set the click state for pen tap's in digitiser to enabled.
+//!                             Retrieve click state for pen tap's in digitiser and validate that it is enabled.                          
+//!				Uses API elements:HAL::Get, ESoundHalPointerClickEnabled
+//! @SYMTestActions    		1. Create Hal Handle object. 
+//!                             2. Set the click sound for the pen taps digitiser to enabled using HAL::Set
+//!                             3. Retrieve the click sound for pen tap's in digitiser and validate that it is as expected.
+//!                                using HAL::Get
+//!				4. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Digitiser (touch Screen) click sound for pen is as expected (enabled).
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	        T_Digitiser	\base\digitiser\base-bsp-digitiser-driver-automated.ini
+		CREATE_OBJECT	HalData         digitiser1
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0012-PenClickState 
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0012-PenClickState               
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0012
+
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0013
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0013
+//! @SYMAPI			HAL::Set(EPenClickState, TInt);
+//!                             HAL::Get(EPenClickState, TInt{ref}); 
+//!                             TSoundHalFunction::ESoundHalSetPointerClickEnabled;
+//!                             TSoundHalFunction::ESoundHalPointerClickEnabled
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		EPenClickState Test
+//!                             Retrieve click sound for pen tap's in digitiser and validate that it is disabled.                          
+//!				Uses API elements:HAL::Get, ESoundHalPointerClickEnabled
+//! @SYMTestActions    		1. Create Hal Handle object. 
+//!                             2. Set the click sound for the pen taps digitiser to disabled using HAL::Set
+//!                             3. Retrieve the click sound for pen tap's in digitiser and validate that it is as expected.
+//!                                using HAL::Get
+//!				4. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Digitiser (touch Screen) click sound for pen is as expected (disabled).
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	        T_Digitiser	\base\digitiser\base-bsp-digitiser-driver-automated.ini
+		CREATE_OBJECT	HalData          digitiser1
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0013-PenClickState 
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0013-PenClickState               
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0013
+
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0014
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0014
+//! @SYMAPI			HAL::Get(EPenClickVolumeMax, TInt{ref}); 
+//!                             TSoundHalFunction::ESoundHalPointerClickVolumeMax
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		EPenClickVolumeMax Test
+//!                             Retrieve the maximum value for the pen click volume level (EPenClickVolume).                          
+//!				Uses API elements:HAL::Get, ESoundHalPointerClickVolumeMax
+//! @SYMTestActions    		1. Create Hal Handle object. 
+//!                             2. Retrieve maximum value for the pen click volume level and validate that it is as expected.
+//!                                using HAL::Get
+//!				3. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	The maximum value for the pen click volume level is as expected in the Digitiser (touch Screen).
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	        T_Digitiser	\base\digitiser\base-bsp-digitiser-driver-automated.ini
+		CREATE_OBJECT	HalData         digitiser1
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0014-EPenClickVolumeMax              
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0014
+
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0015
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0015
+//! @SYMAPI			HAL::Get(EPenClickVolume, TInt{ref}); 
+//!                             TSoundHalFunction::ESoundHalPointerClickVolumeMax;
+//!                             TSoundHalFunction::ESoundHalSetPointerClickLoud;
+//!                             TSoundHalFunction::ESoundHalPointerClickLoud
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		EPenClickVolume Test
+//!                             Retrieve the pen click volume and validate that it is as expected.
+//!				Uses API elements:HAL::Get, ESoundHalPointerClickVolumeMax,ESoundHalSetPointerClickLoud
+//!                             ESoundHalPointerClickLoud
+//! @SYMTestActions    		1. Create Hal Handle object. 
+//!                             2. Retrieve the value for the pen click volume level and validate that it is as expected.
+//!                                using HAL::Get
+//!				3. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	The value for the pen click volume level is as expected in the Digitiser (touch Screen).
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	        T_Digitiser	\base\digitiser\base-bsp-digitiser-driver-automated.ini
+		CREATE_OBJECT	HalData         digitiser1        
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0015-EPenClickVolume              
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0015
+
+
+START_TESTCASE 	        BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0016
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0016
+//! @SYMAPI			HAL::Get(EPenClickVolume, TInt{ref}); 
+//!                             TSoundHalFunction::ESoundHalPointerClickVolumeMax;
+//!                             TSoundHalFunction::ESoundHalSetPointerClickLoud;
+//!                             TSoundHalFunction::ESoundHalPointerClickLoud
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		EPenClickVolume Test
+//!                             Set and Retrieve the pen click volume and validate that its is as expected.           
+//!				Uses API elements:HAL::Set,HAL::Get ESoundHalPointerClickVolumeMax,ESoundHalSetPointerClickLoud
+//!                             ESoundHalPointerClickLoud
+//! @SYMTestActions    		1. Create Hal Handle object. 
+//!                             2. Set the value for the pen click volume level. 
+//!                             3. Retrieve maximum value for the pen click volume level and validate that it is as expected.
+//!                                using HAL::Get
+//!				4. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	The value for the pen click volume level is as expected in the Digitiser (touch Screen).
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	        T_Digitiser		\base\digitiser\base-bsp-digitiser-driver-automated.ini
+		CREATE_OBJECT	HalData         digitiser1 
+               COMMAND	        digitiser1	Set			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0016-EPenClickVolume 
+               COMMAND	        digitiser1	Get			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0016-EPenClickVolume              
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0016
+
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0017
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0017
+//! @SYMAPI			HAL::Get(EPenClickVolume, TInt{ref}); 
+//!                             HAL::Set(EPenClickVolume, TInt);
+//!                             TSoundHalFunction::ESoundHalPointerClickVolumeMax;
+//!                             TSoundHalFunction::ESoundHalSetPointerClickLoud;
+//!                             TSoundHalFunction::ESoundHalPointerClickLoud
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		EPenClickVolume Negative Test case
+//!                             Set and Retrieve the pen click volume ( here the value is lower than the maximum volume). 
+//!                             Set the pen click volume Higher than the maximum volume.
+//!                             Retrieve the pen click volume and validate that it is in the original state.
+//!				Uses API elements:HAL::Get,HAL::Set(TAttribute, TInt),ESoundHalPointerClickVolumeMax,ESoundHalSetPointerClickLoud
+//!                             ESoundHalPointerClickLoud
+//! @SYMTestActions    		1. Create Hal Handle object. 
+//!                             2. Set the value for the pen click volume level, using HAL::Set
+//!                             3. Retrieve  value for the pen click volume level and validate that it is as expected.
+//!                                using HAL::Get
+//!                             4. Set the value for the pen click volume level,Higher than the maximum volume using HAL::Set.
+//!                             5. Retrieve  value for the pen click volume level and validate that it is as expected.
+//!                                using HAL::Get
+//!				6. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	The value for the pen click volume level is as expected in the Digitiser (touch Screen).
+//!                             and setting the pen click volume Higher than the maximum volume returns an error
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	        T_Digitiser		\base\digitiser\base-bsp-digitiser-driver-automated.ini
+		CREATE_OBJECT	HalData         digitiser1        
+                COMMAND	        digitiser1	Set			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0017-EPenClickVolume              
+                COMMAND	        digitiser1	Get			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0017-EPenClickVolume 
+                COMMAND	        digitiser1	Set			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0017-EPenClickVolumeNegative              
+                COMMAND	        digitiser1	Get			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0017-EPenClickVolume 
+        END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0017
+
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0018
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0018
+//! @SYMAPI			HAL::Get(EPenDisplayOn, TInt{ref}); 
+//!                             TPowerHalFunction::EPowerHalPointerSwitchesOn;
+//!                             TPowerHalFunction::EPowerHalSetPointerSwitchesOn
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		EPenDisplayOn Test
+//!                             Retrieve the pen tap state and validate that it is as expected.
+//!				Uses API elements:HAL::Get,EPowerHalSetPointerSwitchesOn,EPowerHalPointerSwitchesOn
+//! @SYMTestActions    		1. Create Hal Handle object. 
+//!                             2. Set EPenDisplayOn state to disabled
+//!                                using HAL::Set
+//!                             3. Retrieve  EPenDisplayOn state and validate that it is as expected.
+//!                                using HAL::Get
+//!				4. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	A pen tap has no effect, on the display state
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	        T_Digitiser		\base\digitiser\base-bsp-digitiser-driver-automated.ini
+		CREATE_OBJECT	HalData         digitiser1        
+                COMMAND	        digitiser1	Set			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0018-EPenDisplayOn
+                COMMAND	        digitiser1	Get			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0018-EPenDisplayOn                 
+        END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0018
+
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0019
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0019
+//! @SYMAPI			HAL::Get(EPenDisplayOn, TInt{ref});
+//!                             HAL::Set(EPenDisplayOn, TInt);
+//!                             TPowerHalFunction::EPowerHalPointerSwitchesOn;
+//!                             TPowerHalFunction::EPowerHalSetPointerSwitchesOn
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		EPenDisplayOn Test
+//!                             Retrieve the pen tap state and validate that it is as expected.
+//!				Uses API elements:HAL::Get,EPowerHalSetPointerSwitchesOn,EPowerHalPointerSwitchesOn
+//! @SYMTestActions    		1. Create Hal Handle object. 
+//!                             2. Set the pen tap state using Hal::Set
+//!                             3. Retrieve pen tap state and validate that it is as expected.
+//!                                using HAL::Get
+//!                             4. Set the pen tap state to original using Hal::Set
+//!                             5. Confirm thatthe pen tap state is in original state using Hal::Get
+//!				6. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	A Pen tap or press enables the display.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	        T_Digitiser		\base\digitiser\base-bsp-digitiser-driver-automated.ini
+		CREATE_OBJECT	HalData         digitiser1        
+                COMMAND	        digitiser1	Set			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0019-EPenDisplayOn 
+                COMMAND	        digitiser1	Get			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0019-EPenDisplayOn
+                COMMAND	        digitiser1	Set			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0019-EPenDisplayOnRestore
+                COMMAND	        digitiser1	Get			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0019-EPenDisplayOnRestore                                 
+        END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0019
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/scripts/base-bsp-digitiser-driver-manual.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,609 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//! @file
+//! @SYMTestSuiteName		base-bsp-digitiser-driver-manual
+//! @SYMScriptTestEnvironment	This test script requires a base port ROM
+
+/////////////////////////////////////////////////////////////////////
+// base-bsp-digitiser-driver-manual.script
+// Tests the Digitiser via validation TRawEvents and mouse positions retrieved
+// for pen touches on the digitiser screen.
+// The tests are manual.
+/////////////////////////////////////////////////////////////////////
+
+LOAD_SUITE	T_Digitiser
+START_TESTCASE			BASE-BSP-DIGITISER-DRIVER-MANUAL-0001
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-MANUAL-0001
+//! @SYMAPI			HAL::Set(EDisplayMode, TInt);
+//!				TRawEvent::EButton1Down;
+//!                             TRawEvent::EPointerMove;
+//!				TRawEvent::EButton1Up
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		Set the display mode to default mode. 
+//!                             Wait for user to touch an unlimited number of random pixels on the screen with a stylus.
+//!				Highlight each pixel touch in black. 
+//!				Wait for user to exit the screen by touching the exit box with stylus.
+//!				Allow user to manually confirm if test has passed or failed, via a key press.
+//! @SYMTestActions		1. Set the displaymode to the default mode.
+//!                             2. Initialise and create the RConsole handle object.     
+//!				3. Wait for user to touch a random pixel on the screen with a stylus.
+//!				4. Highlight that pixel touch in black immediately.
+//!                             5. repeat steps 3 & 4, until step 5 is processed.
+//!				6. Wait for user to touch the black exit box, then exit the test scenario
+//!				7. Wait for user to validate if testcase has passed or failed, via a keypress
+//!				   (pass is dependant on the pass keypress see configuration file)
+//!                             8. Clean up and Destroy the RConsole Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The user will manually verify that the test has passed, via a configurable keypress.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_Digitiser	\base\digitiser\base-bsp-digitiser-driver-manual.ini
+		CREATE_OBJECT	HalData		digitiser1
+		COMMAND		digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-DISPLAYMODE_MANUAL
+		CREATE_OBJECT	RConsole	console1
+		COMMAND		console1	new
+		COMMAND		console1	Init		BASE-BSP-DIGITISER-DRIVER-MANUAL-Init
+		COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-ControlOn
+		COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0001-Instructions
+		COMMAND		console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-0001-Read
+		OUTSTANDING
+		DELAY           5000
+		COMMAND		console1	ClearScreen
+		COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0001-WriteFeedback
+		COMMAND		console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-ReadKey
+		OUTSTANDING
+                COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-RAWMODEOFF
+		COMMAND		console1	Destroy
+		COMMAND		console1	Close
+		COMMAND		console1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-DIGITISER-DRIVER-MANUAL-0001
+
+START_TESTCASE			BASE-BSP-DIGITISER-DRIVER-MANUAL-0002
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-MANUAL-0002
+//! @SYMAPI			HAL::Set(EDisplayMode, TInt);
+//!				TRawEvent::EButton1Down;
+//!                             TRawEvent::EPointerMove;
+//!				TRawEvent::EButton1Up
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		Set the display mode to default mode. 
+//!                             Wait for user to draw a straight line on the screen with a stylus.
+//!				Highlight each pixel touch in black.
+//!				Wait for user to exit the screen by touching the exit box with stylus.
+//!				Allow user to manually confirm if test has passed or failed, via a key press.
+//! @SYMTestActions		1. Set the displaymode to the default mode.
+//!                             2. Initialise and create the RConsole handle object.    
+//!				3. Wait for user to touch and draw a line on the screen with a stylus.
+//!				4. Highlight that pixel touch in black immediately.
+//!				5. Wait for user to touch the black exit box, then exit the test scenario
+//!				6. Wait for user to validate if testcase has passed or failed, via a keypress
+//!				   (pass is dependant on the pass keypress see configuration file)
+//!                             7. Clean up and Destroy the RConsole Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The user will manually verify that the test has passed, via a configurable keypress.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_Digitiser	\base\digitiser\base-bsp-digitiser-driver-manual.ini
+		CREATE_OBJECT	HalData		digitiser1
+		COMMAND		digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-DISPLAYMODE_MANUAL
+		CREATE_OBJECT	RConsole	console1
+		COMMAND		console1	new
+		COMMAND		console1	Init		BASE-BSP-DIGITISER-DRIVER-MANUAL-Init
+		COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-ControlOn
+		COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0002-Instructions
+		COMMAND		console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-0002-Read
+		OUTSTANDING
+		DELAY           5000
+		COMMAND		console1	ClearScreen
+		COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0002-WriteFeedback
+		COMMAND		console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-ReadKey
+		OUTSTANDING
+                COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-RAWMODEOFF
+		COMMAND		console1	Destroy
+		COMMAND		console1	Close
+		COMMAND		console1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-DIGITISER-DRIVER-MANUAL-0002
+
+START_TESTCASE			BASE-BSP-DIGITISER-DRIVER-MANUAL-0003
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-MANUAL-0003
+//! @SYMAPI			HAL::Set(EDisplayMode, TInt);
+//!				TRawEvent::EButton1Down;
+//!                             TRawEvent::EPointerMove;
+//!				TRawEvent::EButton1Up
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		Set the display mode to default mode. 
+//!                             Wait for user to touch an predefined pixels on the screen with a stylus.
+//!                             (these predefined pixels are configurable).
+//!				Highlight each pixel touch in black. 
+//!                             Validate each pixel position and event recieved.
+//!                             Position validation comparison is dependant on the
+//!				margin of error in pixels defined by the user. For example
+//!				a zero margin of error defines that the user has to match the exact pixel when
+//!				touching the screen). This testcase uses a margin of error of 10 pixels,
+//!				in both horizontal and vertical directions. This margin is configurable.
+//!                             Validations are also made on the expected TRawEvent. This is the respective
+//!				down event and the respective up event when touching a pixel
+//!				on the digitiser screen. This test case expects the following TRawEvents 
+//!				TRawEvent::EButton1Down (a pen down event) and TRawEvent::EButton1Up (a pen move event).
+//!                             This testcase may also recieve a move event, this occurs if the digitser is sensitive, move events map to the TRawEvent
+//!                             TRawEvent::EPointerMove(a pen move event),if this occurs move events are ignored.
+//!				Wait for user to exit the screen by touching the exit box with stylus.
+//! @SYMTestActions		1. Set the displaymode to the default mode
+//!                             2. Initialise and create the RConsole handle object.   
+//!				3. Read in a predefined pixel.
+//!				4. Draw first pixel on onto the screen
+//!				5. Wait for the user to touch the pixel on the screen
+//!				6. Store TRawEvent triggered and mouse positions.
+//!				7. Draw the next predefined pixel on to the screen.
+//!				8. Repeat steps 3-5 until predefined pixels have all been drawn
+//!				or until user presses the black exit box.
+//!				9. Compare users pixel co-ordinates and TRawEvents triggered.
+//!                             10. Clean up and Destroy the RConsole Handle object.
+//!				with expected.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The TRawEvent:EButton1Down and TRawEvent::EButton1Up are recieved
+//!				in that order for each pixel touch on the digitiser. If the digitser is sensitive  move event(s) 
+//!                             TRawEvent::EPointerMove, may be recieved in between each pen down and pen up event, this is ignored. 
+//!                             Pixel co-ordinates match with expected pixels respective to the margin of error used.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	5000		T_Digitiser	\base\digitiser\base-bsp-digitiser-driver-manual.ini
+		CREATE_OBJECT	HalData		digitiser1
+		COMMAND		digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-DISPLAYMODE_MANUAL
+		CREATE_OBJECT	RConsole	console1
+		COMMAND		console1	new
+		COMMAND		console1	Init		BASE-BSP-DIGITISER-DRIVER-MANUAL-Init
+		COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-ControlOn
+		COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0003-Instructions
+		COMMAND		console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-0003-Read
+		OUTSTANDING
+		DELAY           5000
+                COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-RAWMODEOFF
+		COMMAND		console1	Destroy
+		COMMAND		console1	Close
+		COMMAND		console1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-DIGITISER-DRIVER-MANUAL-0003
+
+START_TESTCASE			BASE-BSP-DIGITISER-DRIVER-MANUAL-0004
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-MANUAL-0004
+//! @SYMAPI			HAL::Set(EDisplayMode, TInt);
+//!				TRawEvent::EButton1Down;
+//!                             TRawEvent::EPointerMove;
+//!				TRawEvent::EButton1Up
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		Set the display mode to default mode. 
+//!                             Draw a predefined (configurable) bounding rectangle on the screen and wait for 
+//!                             user to draw a line within this rectangle. Highlight this line drawn in black.
+//!				Validate that all mouse positions retrieved are within this bounding  rectangle.
+//!				( Please note that this comparison is dependant on the
+//!				bounding rectangle).
+//!				Validate each event recieved when drawing this line. This is the respective
+//!				down event, move event and up event. We should recieve events in this order
+//!                             TRawEvent::EButton1Down, TRawEvent::EPointerMove and TRawEvent::EButton1Up,
+//!                             with the number of move events as unknown quantity, but a minumum of one.
+//! @SYMTestActions		1. Set the displaymode to the default mode
+//!                             2. Initialise and create the RConsole handle object.  
+//!				3. Read in a predefined configurable bounding rectangle.
+//!				4. Draw this rectangle on onto the screen.
+//!				5. Wait for the user to draw a line within this bounding rectangle. 
+//!			        6. Compare users pixel co-ordinates and TRawEvents triggered with expected.
+//!				7. Wait for the user to touch the ethe black exit box.
+//!                             8. Clean up and Destroy the RConsole Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The TRawEvent::EButton1Down, TRawEvent::EPointerMove, TRawEvent::EButton1Up are recieved
+//!				in that order on the line, the number of TRawEvent::EPointerMove recieved, after a TRawEvent::EButton1Down event
+//!				is random.
+//!				Pixel co-ordinates are withing the bounding rectangle.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	400		T_Digitiser	\base\digitiser\base-bsp-digitiser-driver-manual.ini
+		CREATE_OBJECT	HalData		digitiser1
+		COMMAND		digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-DISPLAYMODE_MANUAL
+		CREATE_OBJECT	RConsole	console1
+		COMMAND		console1	new
+		COMMAND		console1	Init		BASE-BSP-DIGITISER-DRIVER-MANUAL-Init
+		COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-ControlOn
+		COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0004-Instructions
+		COMMAND		console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-0004-Read
+		OUTSTANDING
+		DELAY           5000
+                COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-RAWMODEOFF
+		COMMAND		console1	Destroy
+		COMMAND		console1	Close
+		COMMAND		console1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-DIGITISER-DRIVER-MANUAL-0004
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-MANUAL-0005
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-MANUAL-0005
+//! @SYMAPI			HAL::Set(EDisplayMode, TInt);
+//!                             Hal::Set(EPenState, TInt);   
+//!                             TDigitiserHalFunction::EDigitiserHalXYState;
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		Pen State Manual Test 
+//!                             Set the display mode to default mode. 
+//!                             Disable the the Pen State for the digitiser. 
+//!                             Wait for a pen event to be recieved.
+//!                             Validate with user if pen event was recieved,and to fail the test if it was.
+//!				Uses API elements: HAL::Set, EDigitiserHalXYState
+//! @SYMTestActions    		1. Set the displaymode to the default mode
+//!                             2. Initialise and create the RConsole handle object. 
+//!                             3. Disable the EPenState (value is 0) using HAL:Set.
+//!				4. Get EPenState using HAL::Get,and validate that it is disabled in step 3.
+//!                             5. Wait for user to touch the digitiser. No TRawEvent should be triggered
+//!                                Read should timeout.  
+//!                             6. If in step 5 a TRawevent is triggered highlight the pixel touched.
+//!				7. Wait for user to validate if testcase has passed or failed, via a keypress
+//!				   (pass is dependant on the pass keypress see configuration file)
+//!                             8. Clean up and Destroy the RConsole Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Digitiser State (touch Screen state) is disabled. Read should timeout and cancel with 
+//!                             a -3 AsyncError code. No TRawEvent should be triggered. 
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	300	T_Digitiser		\base\digitiser\base-bsp-digitiser-driver-manual.ini
+	        CREATE_OBJECT	HalData digitiser1
+                COMMAND	                digitiser1	Set             BASE-BSP-DIGITISER-DRIVER-DISPLAYMODE_MANUAL
+                COMMAND	                digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-MANUAL-0005-PenState
+                COMMAND	                digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-MANUAL-0005-PenState
+                CREATE_OBJECT	        RConsole	console1
+                COMMAND		        console1	new
+                COMMAND		        console1	Init		BASE-BSP-DIGITISER-DRIVER-MANUAL-Init
+                COMMAND		        console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-ControlOn                
+                COMMAND		        console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0005-PenState 
+                COMMAND	 !AsyncError=-3 console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-0005-PenState
+                OUTSTANDING
+                COMMAND		        console1	ClearScreen
+                COMMAND                 console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0005-WriteFeedback
+                COMMAND		        console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-WriteFeedback
+	        COMMAND		        console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-ReadKey       
+                OUTSTANDING
+                COMMAND		        console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-RAWMODEOFF
+		COMMAND		        console1	Destroy
+		COMMAND		        console1	Close
+		COMMAND		        console1	~
+        END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-MANUAL-0005
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-MANUAL-0006
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-MANUAL-0006
+//! @SYMAPI			HAL::Set(EDisplayMode, TInt);
+//!                             HAL::Set(EPenState, TInt);    
+//!                             HAL::Get(EPenState, TInt{ref}) ;
+//!                             TDigitiserHalFunction::EDigitiserHalXYState;
+//!                             TRawEvent::EButton1Down;	
+//!                             TRawEvent::EButton1Up
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		Pen State Test 
+//!                             Set the display mode to default mode. 
+//!                             Enable the the Pen State for the digitiser.  
+//!                             Wait for a pen event to be recieved.
+//!                             Validate with user if pen event was recieved and to pass the test, if it was.                      
+//!				Uses API elements: HAL::Set, EDigitiserHalXYState
+//! @SYMTestActions    		1. Set the displaymode to the default mode
+//!                             2. Initialise and create the RConsole handle object. 
+//!                             3. Enable the EPenState (value is 1) using HAL:Set.
+//!				4. Get EPenState using HAL::Get, and validate that it is enabled (value is 1) in step 4.
+//!                             5. Wait for user to touch the digitiser (A TRawEvent should be triggered).
+//!                                and the Read should NOT timeout.  
+//!                             6. If in step 5 a TRawevent is triggered highlight the pixel touched.
+//!				7. Wait for user to validate if testcase has passed or failed, via a keypress
+//!				   (pass is dependant on the pass keypress see configuration file)
+//!                             8. Clean up and Destroy the RConsole Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Digitiser State (touch Screen state) is enabled.  A TRawEvent should be triggered, 
+//!                             highlighting the pixel touched.
+//!                             Read should NOT timeout
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	300	T_Digitiser		\base\digitiser\base-bsp-digitiser-driver-manual.ini
+	        CREATE_OBJECT	HalData         digitiser1
+                COMMAND	        digitiser1	Set             BASE-BSP-DIGITISER-DRIVER-DISPLAYMODE_MANUAL
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-MANUAL-0006-PenState
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-MANUAL-0006-PenState
+                CREATE_OBJECT	RConsole	console1
+                COMMAND		console1	new
+                COMMAND		console1	Init		BASE-BSP-DIGITISER-DRIVER-MANUAL-Init            
+                COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-ControlOn 
+                COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0006-PenState                
+                COMMAND		console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-0006-PenState
+                OUTSTANDING
+                COMMAND		console1	ClearScreen
+                COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0006-WriteFeedback
+                COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-WriteFeedback
+	        COMMAND		console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-ReadKey     
+                OUTSTANDING
+                COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-RAWMODEOFF
+                COMMAND		console1	Destroy
+		COMMAND		console1	Close
+		COMMAND		console1	~
+        END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-MANUAL-0006
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-MANUAL-0007
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-MANUAL-0007
+//! @SYMAPI			HAL::Set(EDisplayMode, TInt);
+//!                             HAL::Set(EPenState, TInt);    
+//!                             HAL::Get(EPenState, TInt{ref});
+//!                             HAL::Get(EPenClick, TInt{ref}); 
+//!                             TSoundHalFunction::ESoundHalPointerClickEnabled
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		EPenClick Test
+//!                             Set the display mode to default mode.
+//!                             Digitiser should support production of click sound,
+//!                             if retrieval of EPenClickState is value 1.
+//!                             Confirm whether digitiser supports
+//!                             production of click sound via the setting and retrieval of EPenClick value 0.   
+//!				Uses API elements:HAL::Get, ESoundHalPointerClickEnabled
+//! @SYMTestActions    		1. Set the displaymode to the default mode
+//!                             2. Initialise and create the RConsole handle object. 
+//!                             3. Enable the EPenClickState (value is 1) using HAL:Set
+//!                             4. Confirm the EPenClickState (value is 1) using HAL:Set
+//!                             5. Enable the EPenState (value is 1) using HAL:Set.
+//!                             6. Confirm the EPenState (value is 1) using HAL:Get.
+//!                             7. Set the click sound to on for pen tap's in digitiser and validate that it is as expected.
+//!                                in step 8 & 9, using EPenClick value as 1, using HAL:Set
+//!                             8. Wait for user to touch the digitiser. (A TRawEvent should be triggered)
+//!				9. If A TRawevent is triggered ask the user to validate if a click sound was not heard as
+//!                                as EPenClick is value 0. Validation is via a keypress
+//!				   (pass is dependant on the pass keypress see configuration file)
+//!                                If no TrawEvent is triggered timeout the read in step 8 and fail the testcase.
+//!				10. Clean up and Destroy the RConsole Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Click sound is heard if EPenClick is enabled.
+//!                             The device can produce a click sound.
+//! @SYMTestType		CIT
+              START_TEST_BLOCK	300	T_Digitiser		\base\digitiser\base-bsp-digitiser-driver-manual.ini
+		CREATE_OBJECT	HalData          digitiser1
+                COMMAND	        digitiser1	Set             BASE-BSP-DIGITISER-DRIVER-DISPLAYMODE_MANUAL
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-MANUAL-PenClickState 
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-MANUAL-0007-PenClick 
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-MANUAL-0007-PenClick 
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-MANUAL-EPenState_Setup
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-MANUAL-EPenState_Setup
+                CREATE_OBJECT	RConsole	console1
+                COMMAND		console1	new
+                COMMAND		console1	Init		BASE-BSP-DIGITISER-DRIVER-MANUAL-Init            
+                COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-ControlOn 
+                COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0007-PenClick                 
+                COMMAND		console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-0007-PenClick 
+                OUTSTANDING
+                COMMAND		console1	ClearScreen
+                COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0007-WriteFeedback
+                COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-WriteFeedback
+	        COMMAND		console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-ReadKey              
+                OUTSTANDING
+                COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-RAWMODEOFF
+                COMMAND		console1	Destroy
+		COMMAND		console1	Close
+                COMMAND		console1	~
+        END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-MANUAL-0007
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-MANUAL-0008
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-MANUAL-0008
+//! @SYMAPI			HAL::Set(EDisplayMode, TInt);
+//!                             HAL::Set(EPenState, TInt);    
+//!                             HAL::Get(EPenState, TInt{ref});
+//!                             HAL::Get(EPenClick, TInt{ref}); 
+//!                             TSoundHalFunction::ESoundHalPointerClickEnabled
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		EPenClick Test
+//!                             Set the display mode to default mode.
+//!                             Digitiser should support  production of click sound,
+//!                             if retrieval of EPenClickState is value 1.
+//!                             Confirm whether digitiser supports
+//!                             production of click sound via the setting and retrieval of EPenClick value 0.   
+//!				Uses API elements:HAL::Get, ESoundHalPointerClickEnabled
+//! @SYMTestActions    		1. Set the displaymode to the default mode
+//!                             2. Initialise and create the RConsole handle object. 
+//!                             3. Enable the EPenClickState (value is 1) using HAL:Set
+//!                             4. Confirm the EPenClickState (value is 1) using HAL:Set
+//!                             5. Enable the EPenState (value is 1) using HAL:Set.
+//!                             6. Confirm the EPenState (value is 1) using HAL:Get.
+//!                             7. Set the click sound to off for pen tap's in digitiser and validate that it is as expected.
+//!                                in step 8 & 9, using EPenClick value as 0, using HAL:Set
+//!                             8. Wait for user to touch the digitiser. (A TRawEvent should be triggered)
+//!				9. If A TRawevent is triggered ask the user to validate if a click sound was not heard as
+//!                                as EPenClick is value 0. Validation is via a keypress
+//!				   (pass is dependant on the pass keypress see configuration file)
+//!                                If no TrawEvent is triggered timeout the read in step 8 and fail the testcase.
+//!				10. Clean up and Destroy the RConsole Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Click sound is heard if EPenClick is enabled.
+//!                             The device can produce a click sound.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Click sound is heard if EPenClick is enabled, click sound is not heard if EPenClick is disabled.
+//!                             The device cannot produce a click sound.
+//! @SYMTestType		CIT
+              START_TEST_BLOCK	300	T_Digitiser		\base\digitiser\base-bsp-digitiser-driver-manual.ini
+		CREATE_OBJECT	HalData          digitiser1
+                COMMAND	        digitiser1	Set             BASE-BSP-DIGITISER-DRIVER-DISPLAYMODE_MANUAL
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-MANUAL-EPenState_Setup
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-MANUAL-EPenState_Setup
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-MANUAL-PenClickState
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-MANUAL-0008-PenClick 
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-MANUAL-0008-PenClick 
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-MANUAL-0008-Setup 
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-MANUAL-0008-Setup 
+                CREATE_OBJECT	RConsole	console1
+                COMMAND		console1	new
+                COMMAND		console1	Init		BASE-BSP-DIGITISER-DRIVER-MANUAL-Init            
+                COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-ControlOn 
+                COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0008-PenClick                 
+                COMMAND		console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-0008-PenClick 
+                OUTSTANDING
+                COMMAND		console1	ClearScreen
+                COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0008-WriteFeedback
+                COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-WriteFeedback
+                COMMAND		console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-ReadKey              
+                OUTSTANDING
+                COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-RAWMODEOFF
+                COMMAND		console1	Destroy
+		COMMAND		console1	Close
+                COMMAND		console1        ~
+        END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-MANUAL-0008
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-MANUAL-0011
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-MANUAL-0011
+//! @SYMAPI			HAL::Set(EDisplayMode, TInt);
+//!                             HAL::Get(EPenDisplayOn, TInt{ref}); 
+//!                             HAL::Set(EPenDisplayOn, TInt);
+//!                             HAL::Set(EDisplayState,TInt);
+//!                             HAL::Get(EDisplayState, TInt{ref});
+//!                             TPowerHalFunction::EPowerHalPointerSwitchesOn;
+//!                             TPowerHalFunction::EPowerHalSetPointerSwitchesOn
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		EPenDisplayOn Test
+//!                             Set the display mode to default mode.
+//!                             Set the pen tap state to enabled. 
+//!                             Retrieve the pen tap state. Delay the testcase by 9 seconds to cause the screen to switch off.
+//!                             validate that a pen tap switches the display on, via a pen tap and user input.
+//!				Uses API elements:HAL::Get,EPowerHalSetPointerSwitchesOn,EPowerHalPointerSwitchesOn
+//! @SYMTestActions    		1. Set the displaymode to the default mode
+//!                             3. Set the DisplayState using Hal::Set to on
+//!                             4. Get the DisplayState using Hal::Set and confirm if on.
+//!                             5. Set EPenDisplayOn (pen tap state) to on  using Hal::Set.
+//!                             6. Get EPenDisplayOn (pen tap state) using Hal::Get and validate that it is as expected.
+//!                             7. Wait for the maximum timeout speciifed to allow the display to switch off.
+//!                             8. Wait for user to touch the digitiser. (A TRawEvent should be triggered).
+//!                             9. If A TRawevent is triggered, validate the display state,
+//!                                by asking the user to validate if a pen tap switched the display on.
+//!                                User validation is via a keypress (pass is dependant on the pass keypress see configuration file).    
+//!                                If no TrawEvent is triggered timeout the read in step 8 and fail the test.             
+//!                             10. Set the DisplayState using Hal::Set to on
+//!                             11. Get the DisplayState using Hal::Get and confirm if on.
+//!				12. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	A Pen tap or press enables the display.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	500	T_Digitiser		\base\digitiser\base-bsp-digitiser-driver-manual.ini
+                CREATE_OBJECT	HalData         digitiser1
+                COMMAND	        digitiser1	Set             BASE-BSP-DIGITISER-DRIVER-DISPLAYMODE_MANUAL
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-MANUAL-EDisplayStateOn
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-MANUAL-EDisplayStateOn
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-MANUAL-0011-EPenDisplayOn 
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-MANUAL-0011-EPenDisplayOn 
+                CREATE_OBJECT	RConsole	console1
+                COMMAND		console1	new
+                COMMAND		console1	Init		BASE-BSP-DIGITISER-DRIVER-MANUAL-Init            
+                COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-ControlOn 
+                COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0011-EPenDisplayOn
+                DELAY           6000000
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-MANUAL-EDisplayStateOff
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-MANUAL-EDisplayStateOff
+                COMMAND		console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-0011-EPenDisplayOn
+                OUTSTANDING
+                DELAY           1000000
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-MANUAL-EDisplayStateOn
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-MANUAL-EDisplayStateOn
+                COMMAND		console1	ClearScreen                
+                COMMAND		console1	ClearScreen
+                COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0011-WriteFeedback
+                COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-WriteFeedback
+	        COMMAND		console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-ReadKey   
+                OUTSTANDING
+                COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-RAWMODEOFF
+                COMMAND		console1	Destroy
+		COMMAND		console1	Close
+                COMMAND		console1        ~         
+        END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-MANUAL-0011
+
+START_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-MANUAL-0012
+//! @SYMTestCaseID		BASE-BSP-DIGITISER-DRIVER-MANUAL-0012
+//! @SYMAPI			HAL::Set(EDisplayMode, TInt);
+//!                             HAL::Get(EPenDisplayOn, TInt{ref});
+//!                             HAL::Set(EPenDisplayOn, TInt);
+//!                             HAL::Set(EDisplayState,TInt);
+//!                             HAL::Get(EDisplayState, TInt{ref});
+//!                             TPowerHalFunction::EPowerHalPointerSwitchesOn;
+//!                             TPowerHalFunction::EPowerHalSetPointerSwitchesOn
+//! @SYMAuthor			Rehana Anwar
+//! @SYMCreationDate		03/04/2008
+//! @SYMTestCaseDesc		EPenDisplayOn Test
+//!                             Set the display mode to default mode.
+//!                             Set the pen tap state to disabled. 
+//!                             Retrieve the pen tap state. Delay the testcase by 9 seconds to cause the screen to switch off.
+//!                             Validate that a pen tap  does not switch the display on, via a pen tap and user input.
+//!				Uses API elements:HAL::Get,EPowerHalSetPointerSwitchesOn,EPowerHalPointerSwitchesOn
+//! @SYMTestActions    		1. Set the displaymode to the default mode
+//!                             3. Set the DisplayState using Hal::Set to on
+//!                             4. Get the DisplayState using Hal::Get and confirm if on.
+//!                             5. Set EPenDisplayOn (pen tap state) to off using Hal::Set.
+//!                             6. Get EPenDisplayOn (pen tap state) using Hal::Get and validate that it is as expected.
+//!                             7. Wait for the maximum timeout speciifed to allow the display to switch off.
+//!                             8. Wait for user to touch the digitiser. (A TRawEvent should be not be triggered).
+//!                             9. If A TRawevent is triggered, fail the testcase,
+//!                                by asking the user to validate if a pen tap switched the display on.
+//!                                User validation is via a keypress (pass is dependant on the pass keypress see configuration file).    
+//!                                If no TrawEvent is triggered timeout and cancel the read in step 8 and pass the test.             
+//!                             10. Set the DisplayState using Hal::Set to on
+//!                             11. Get the DisplayState using Hal::Get and confirm if on.
+//!				12. Destroy the HAL Handle object.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	A pen tap has no effect, on the display state
+//!                             Read should timeout and cancel with 
+//!                             a -3 AsyncError code. No TRawEvent should be triggered. 
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	500	T_Digitiser		\base\digitiser\base-bsp-digitiser-driver-manual.ini
+                CREATE_OBJECT	        HalData         digitiser1
+                COMMAND	        digitiser1	Set             BASE-BSP-DIGITISER-DRIVER-DISPLAYMODE_MANUAL
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-MANUAL-EDisplayStateOn
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-MANUAL-EDisplayStateOn
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-MANUAL-0012-EPenDisplayOn 
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-MANUAL-0012-EPenDisplayOn 
+                CREATE_OBJECT   RConsole	console1
+                COMMAND		console1	new
+                COMMAND		console1	Init		BASE-BSP-DIGITISER-DRIVER-MANUAL-Init            
+                COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-ControlOn 
+                COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0012-EPenDisplayOn
+                DELAY           6000000
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-MANUAL-EDisplayStateOff
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-MANUAL-EDisplayStateOff
+                COMMAND		console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-0012-EPenDisplayOn
+                OUTSTANDING
+                DELAY           1000000
+                COMMAND	        digitiser1	Set		BASE-BSP-DIGITISER-DRIVER-MANUAL-EDisplayStateOn
+                COMMAND	        digitiser1	Get		BASE-BSP-DIGITISER-DRIVER-MANUAL-EDisplayStateOn
+                COMMAND		console1	ClearScreen
+                COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-0012-WriteFeedback
+                COMMAND		console1	Write		BASE-BSP-DIGITISER-DRIVER-MANUAL-WriteFeedback
+	        COMMAND		console1	Read		BASE-BSP-DIGITISER-DRIVER-MANUAL-ReadKey   
+                OUTSTANDING
+                COMMAND		console1	Control		BASE-BSP-DIGITISER-DRIVER-MANUAL-RAWMODEOFF
+                COMMAND		console1	Destroy
+		COMMAND		console1	Close
+                COMMAND		console1        ~              
+        END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-DIGITISER-DRIVER-MANUAL-0012
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/scripts/base-bsp-digitiser-driver.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,18 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+RUN_SCRIPT	z:\base\digitiser\base-bsp-digitiser-driver-manual.script
+RUN_SCRIPT	z:\base\digitiser\base-bsp-digitiser-driver-automated.script
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/src/T_DigitiserDriverData.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,284 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_DigitiserDriverData.h"
+
+
+//These are attributes for the touch screen device
+_LIT(KEnumPen,                                  "EPen");
+_LIT(KEnumPenX,                                 "EPenX");
+_LIT(KEnumPenY,                                 "EPenY");
+_LIT(KEnumPenState,                             "EPenState");
+
+//These are attributes for the sound driver device
+_LIT(KEnumPenClick,                             "EPenClick");
+_LIT(KEnumPenClickVolumeMax,                    "EPenClickVolumeMax");
+_LIT(KEnumPenClickState,                        "EPenClickState");
+_LIT(KEnumPenClickVolume,                       "EPenClickVolume");
+
+//These are the attributes for the power controller
+ _LIT(KEnumPenDisplayOn,                        "EPenDisplayOn");
+ 
+ //These are the attributes for the lcd screen device
+ _LIT(KEnumDisplayState,                        "EDisplayState");
+ _LIT(KEnumDisplayMode,							"EDisplayMode");
+ 
+ //This represents a NULL attribute
+_LIT(KEnumNull,                                 "");
+
+const CT_HALData::THalTableLookup	CT_DigitiserDriverData::iTableLookup[] =
+    {
+/**     
+*	Enum as a descriptor            Enum                            Prepare input           Prepare paramters       Validation of           Store data returned after               aFlag indicating
+*																	value prior to 			prior to				value returned			successful HAL::Get or                  if validation
+*																	HAL::Set call           HAL::Get call           after a successful      HAL::Set call                           is mandatory
+*																													HAL::Get call							
+*/	
+        
+    KEnumPen,                       HALData::EPen,                  SetPrepareInt,          GetPrepareDummy,        GetValidationInt,       SetPen,                                 ETrue,
+    KEnumPenState,                  HALData::EPenState,             SetPrepareInt,          GetPrepareDummy,        GetValidationInt,       SetPenState,                            ETrue,
+    KEnumPenX,                      HALData::EPenX,                 SetPrepareInt,          GetPrepareDummy,        GetValidationInt,       SetPenX,                                ETrue,
+    KEnumPenY,                      HALData::EPenY,                 SetPrepareInt,          GetPrepareDummy,        GetValidationInt,       SetPenY,                                ETrue,	
+    KEnumPenClick,                  HALData::EPenClick,             SetPrepareInt,          GetPrepareDummy,        GetValidationInt,       SetPenClick,                            ETrue,
+    KEnumPenClickVolumeMax,         HALData::EPenClickVolumeMax,    SetPrepareInt,          GetPrepareDummy,        GetValidationInt,       SetPenClickVolumeMax,                   ETrue,
+    KEnumPenClickState,             HALData::EPenClickState,        SetPrepareInt,          GetPrepareDummy,        GetValidationInt,       SetPenClickState,                       ETrue,
+    KEnumPenClickVolume,            HALData::EPenClickVolume,       SetPrepareInt,          GetPrepareDummy,        GetValidationInt,       SetPenClickVolume,                      ETrue,
+    KEnumPenDisplayOn,              HALData::EPenDisplayOn,         SetPrepareInt,          GetPrepareDummy,        GetValidationInt,       SetPenDisplayOn,                        ETrue,
+    KEnumDisplayState,				HALData::EDisplayState,			SetPrepareInt,			GetPrepareDummy,		GetValidationInt,		SetDisplayState,						ETrue,
+    KEnumDisplayMode,				HALData::EDisplayMode,			SetPrepareInt,			GetPrepareDummy,		GetValidationInt,		SetDisplayMode,							EFalse,
+    KEnumNull,                      (HALData::TAttribute)0,         NULL,                   NULL,                   NULL,                   NULL,                                   NULL
+    };
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_DigitiserDriverData* CT_DigitiserDriverData::NewL()
+	{
+	CT_DigitiserDriverData*	digit=new (ELeave) CT_DigitiserDriverData();
+	CleanupStack::PushL(digit);
+	digit->ConstructL();
+	CleanupStack::Pop(digit);
+	return digit;
+	}
+
+
+CT_DigitiserDriverData::CT_DigitiserDriverData()
+:       CT_HALData(iTableLookup)
+,       iPenState(-1)
+,       iPen(-1)
+,       iPenX(-1)
+,       iPenY(-1)
+,       iPenClick(-1)
+,       iPenClickVolumeMax(-1)
+,       iPenClickState(-1)
+,       iPenClickVolume	(-1)
+,       iPenDisplayOn(-1)
+,		iDisplayState(-1)
+,		iDisplayMode(-1)
+	{	
+	}
+
+void CT_DigitiserDriverData::ConstructL()
+/**
+ * Second phase construction
+ *
+ * @internalComponent
+ *
+ * @return	N/A
+ *
+ * @pre		None
+ * @post	None
+ *
+ * @leave	system wide error
+ */
+	{
+   
+	}
+
+CT_DigitiserDriverData::~CT_DigitiserDriverData()
+/**
+ * Public destructor
+ */
+	{
+	}
+
+TAny* CT_DigitiserDriverData::GetObject()
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return	pointer to the object that the data wraps
+ */
+	{
+	return NULL;
+	}
+	
+TBool CT_DigitiserDriverData::GetPrepareDummy(CDataWrapperBase* /*aThis*/, const TDesC& /*aSection*/, TInt& /*aValueStart*/, TInt& /*aValueEnd*/)
+/**
+ * This a dummy place holder function that does nothing see HAL_Data
+ *
+ * @return a boolean value 
+ *
+ */	
+	{
+	return ETrue;
+	}
+	
+void CT_DigitiserDriverData::SetPen(CDataWrapperBase* aThis, TInt aValue)
+/**
+ * Store whether the pen/digitiser is availabe for input
+ *
+ * @param 	aThis	a pointer to the data wrapper base class
+ * @param  	aValue  an integer value to use in set 
+ * 
+ */
+	{
+	static_cast<CT_DigitiserDriverData*>(aThis)->iPen=aValue;	
+	}
+
+void CT_DigitiserDriverData::SetPenX(CDataWrapperBase* aThis, TInt aValue)
+ /**
+ *
+ * Store pen/digitiser horizontal resolution in pixels
+ *
+ * @param 	aThis a pointer to the data wrapper base class
+ * @param  	aValue  an integer value to use in set 
+ */	
+ 	{
+    static_cast<CT_DigitiserDriverData*>(aThis)->iPenX=aValue;	
+    }
+ 
+ void CT_DigitiserDriverData::SetPenY(CDataWrapperBase* aThis, TInt aValue)
+ /**
+ * Store pen/digitiser vertical resolution in pixels
+ * 
+ * @param       aThis a pointer to the data wrapper base class
+ * @param       aValue  an integer value to use in set 
+ * 
+ */	
+    {
+    static_cast<CT_DigitiserDriverData*>(aThis)->iPenY=aValue;	
+    }
+     
+void CT_DigitiserDriverData::SetPenState(CDataWrapperBase* aThis, TInt aValue)
+ /**
+ * Store Pen Clicking ability
+ *
+ * @param 	aThis a pointer to the data wrapper base class
+ * @param  	aValue  an integer value to use in set 
+ * 
+ */
+    {
+    static_cast<CT_DigitiserDriverData*>(aThis)->iPenState=aValue;
+    }
+    
+void CT_DigitiserDriverData::SetPenClick(CDataWrapperBase* aThis, TInt aValue)
+ /**
+ * Store Pen Click  
+ * 
+ * @param 	aThis a pointer to the data wrapper base class
+ * @param  	aValue  an integer value to use in set 
+ */	
+	{
+	static_cast<CT_DigitiserDriverData*>(aThis)->iPenClick=aValue;
+	}
+
+void CT_DigitiserDriverData::SetPenClickVolumeMax(CDataWrapperBase* aThis, TInt aValue)
+ /**
+ * Store maximum Pen Click Volume 
+ *
+ * @param 	aThis a pointer to the data wrapper base class
+ * @param  	aValue  an integer value to use in set 
+ */	
+	{
+	static_cast<CT_DigitiserDriverData*>(aThis)->iPenClickVolumeMax=aValue;
+	}
+
+void CT_DigitiserDriverData::SetPenClickState(CDataWrapperBase* aThis, TInt aValue)
+ /**
+ * Store pen click state
+ *
+ * @param  	aThis a pointer to the data wrapper base class
+ * @param  	aValue  an integer value to use in set 
+ * 
+ */
+	{
+	static_cast<CT_DigitiserDriverData*>(aThis)->iPenClickState=aValue;
+	}
+
+void CT_DigitiserDriverData::SetPenClickVolume(CDataWrapperBase* aThis, TInt aValue)
+ /**
+ * Store pen click volume
+ *
+ * @param  	aThis a pointer to the data wrapper base class
+ * @param  	aValue  an integer value to use in set 
+ */	
+	{
+	static_cast<CT_DigitiserDriverData*>(aThis)->iPenClickVolume=aValue;
+	}
+
+void CT_DigitiserDriverData::SetPenDisplayOn(CDataWrapperBase* aThis, TInt aValue)
+ /**
+ * Store PenDisplay On
+ * @param 		aThis a pointer to the data wrapper base class
+ * @param   	aValue  an integer value to use in set 
+ * 
+ */	
+	{
+	static_cast<CT_DigitiserDriverData*>(aThis)->iPenDisplayOn=aValue;
+	}
+
+void CT_DigitiserDriverData::SetDisplayState(CDataWrapperBase* aThis, TInt aValue)
+ /**
+ * Store DisplayState
+ * @param 		aThis a pointer to the data wrapper base class
+ * @param   	aValue  an integer value to use in set 
+ * 
+ */		
+	{
+	static_cast<CT_DigitiserDriverData*>(aThis)->iDisplayState=aValue;
+	}
+	
+ void CT_DigitiserDriverData::SetDisplayMode(CDataWrapperBase* aThis, TInt aValue)
+ /**
+ * Store DisplayMode
+ * @param 		aThis a pointer to the data wrapper base class
+ * @param   	aValue  an integer value to use in set 
+ * 
+ */		
+ 	{
+ 	static_cast<CT_DigitiserDriverData*>(aThis)->iDisplayMode=aValue;
+ 	}
+	
+TBool CT_DigitiserDriverData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand                      The command to process
+ * @param aSection                      The section in the ini containing data for the command
+ * @param aAsyncErrorIndex              Command index for async calls to return errors to
+ *
+ * @return                              ETrue if the command is processed
+ *
+ * @leave                               System wide error
+ */
+	{
+	TBool	ret=ETrue;
+	ret=CT_HALData::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+	return ret;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/src/T_DigitiserDriverServer.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,119 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_DigitiserDriverServer.h"
+#include "T_DigitiserDriverData.h"
+#include "T_RConsoleData.h"
+
+
+/*@{*/
+_LIT(KT_DigitserDriverData,			"HalData");
+_LIT(KT_RConsoleDigitiser,			"RConsole");
+
+/*@}*/
+
+CT_DigitiserDriverServer* CT_DigitiserDriverServer::NewL()
+/**
+ * @return - Instance of the test server
+ * Same code for Secure and non-secure variants
+ * Called inside the MainL() function to create and start the
+ * CTestServer derived server.
+ */
+	{
+    CT_DigitiserDriverServer* server = new (ELeave) CT_DigitiserDriverServer();
+    CleanupStack::PushL(server);
+    server->ConstructL();
+    CleanupStack::Pop(server);
+    return server;
+    }
+
+
+
+LOCAL_C void MainL()
+/**
+ * Secure variant
+ * Much simpler, uses the new Rendezvous() call to sync with the client
+ */
+	{
+	// Leave the hooks in for platform security
+#if (defined __DATA_CAGING__)
+    RProcess().DataCaging(RProcess::EDataCagingOn);
+    RProcess().SecureApi(RProcess::ESecureApiOn);
+#endif
+    CActiveScheduler*	sched=NULL;
+    sched=new(ELeave) CActiveScheduler;
+    //Install me as current ActiveScheduler
+    CActiveScheduler::Install(sched);
+    CT_DigitiserDriverServer* server = NULL;
+	// Create CT_DigitiserDriverServer(the CTestServer derived server) 
+    TRAPD(err,server = CT_DigitiserDriverServer::NewL());
+    if(!err)
+	    {
+        // Sync with the client and enter the active scheduler
+        RProcess::Rendezvous(KErrNone);
+        sched->Start();
+        }
+
+    delete server;
+    delete sched;
+    }
+
+
+GLDEF_C TInt E32Main()
+/**
+ * @return - Standard Epoc error code on process exit
+ * Secure variant only
+ * Process entry point. Called by client using RProcess API
+ */
+	{
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    if(cleanup == NULL)
+	    {
+        return KErrNoMemory;
+        }
+
+#if (defined TRAP_IGNORE)
+	TRAP_IGNORE(MainL());
+#else
+    TRAPD(err,MainL());
+#endif
+
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
+    
+
+CDataWrapper* CT_DigitiserDriverServer::CT_DigitiserDriverBlock::CreateDataL(const TDesC& aData)
+/** 
+* @return - A CDataWrapper derived instance
+*/
+	{
+	CDataWrapper*	wrapper=NULL;
+
+	if( aData==KT_DigitserDriverData() )
+		{
+		wrapper=CT_DigitiserDriverData::NewL();
+		}
+	else if ( aData==KT_RConsoleDigitiser() )
+		{
+		wrapper=CT_RConsoleData::NewL();
+		}
+
+	return wrapper;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/testdata/base-bsp-digitiser-driver-automated.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,111 @@
+[include]
+file1                    =\base\digitiser\t_digitiser.ini
+
+[digitiser1]
+name                    =digitiser1
+
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0001-GetCurrentPenState]
+halEValue               =EPenState
+expected                =1
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0002-PenState]
+
+halEValue               =EPenState
+value                   =0
+expected                =0
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0003-PenState]
+halEValue               =EPenState
+value                   =1
+expected                =1
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0004-GetCurrentPenState]
+halEValue               =EPenState
+expected                =1
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0004-SetPenState]
+halEValue               =EPenState
+value                   =0
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0004-GetPenState]
+halEValue               =EPenState
+expected                =0
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0004-SetRestoredPenState]
+halEValue               =EPenState
+value                   =1
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0004-GetRestoredPenState]
+halEValue               =EPenState
+expected                =1
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0005-GetPen]
+halEValue               =EPen
+expected                =1
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0006-GetPenX]
+halEValue               =EPenX
+expected                ={haldata,ePenXValue}
+
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0007-GetPenY]
+halEValue               =EPenY
+expected                ={haldata,ePenYValue}
+
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0008-PenClick]
+halEValue               =EPenClick
+expected                =0
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0011-PenClickState]
+halEValue               =EPenClickState
+expected                =0
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0012-PenClickState]
+halEValue               =EPenClickState
+expected                =1
+value                   =1
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0013-PenClickState]
+halEValue               =EPenClickState
+expected                =0
+value                   =0
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0014-EPenClickVolumeMax]
+halEValue               =EPenClickVolumeMax
+expected                =0
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0015-EPenClickVolume]
+halEValue               =EPenClickVolume
+expected                =100
+
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0016-EPenClickVolume]
+halEValue               =EPenClickVolume
+expected                =3
+value                   =3
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0017-EPenClickVolume]
+halEValue               =EPenClickVolume
+expected                =3
+value                   =3
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0017-EPenClickVolumeNegative]
+halEValue               =EPenClickVolume
+value                   =3
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0018-EPenDisplayOn]
+halEValue               =EPenDisplayOn
+expected                =0
+value                   =0
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0019-EPenDisplayOn]
+halEValue               =EPenDisplayOn
+expected                =1
+value                   =1
+
+[BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0019-EPenDisplayOnRestore]
+halEValue               =EPenDisplayOn
+expected                =0
+value                   =0
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/testdata/base-bsp-digitiser-driver-manual.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,386 @@
+[include]
+file1                    =\base\digitiser\t_digitiser.ini
+
+[digitiser1]
+name                    =digitiser1
+
+[console1]
+name                    =console1
+
+[BASE-BSP-DIGITISER-DRIVER-DISPLAYMODE_MANUAL]
+halEValue               =EDisplayMode
+value                   ={displayMode,value}
+expected                ={displayMode,expected}
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-ReadKey]
+timeout			=0
+timeoutExpected         =FALSE
+synchronous             =FALSE
+
+tests                   =1
+eventType1		={rawEvent,keyDown}
+eventOccurance1		=EEventOccuranceOnce
+dataDraw1               =FALSE
+dataVerify1		=TRUE
+
+eventType2		={rawEvent,keyUp}
+eventOccurance2		=EEventOccuranceOnce
+dataDraw2               =FALSE
+dataVerify2		=TRUE
+
+keyCode1		={generic,keyCode}
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-WriteFeedback]
+text           ={confirm,instructions}
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-Init]
+consoleName		=Console_Window
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-ControlOn]
+consoleControl          =+M +I +R
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-RAWMODEOFF]
+consoleControl          =-R
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-ControlOff]
+consoleControl          =-I -M 
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-PenClickState]
+halEValue               =EPenClickState
+value                   ={halDataOn,value}
+expected                ={halDataOn,expected}
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-EPenState_Setup]
+halEValue               =EPenState
+value                   ={halDataOn,value}
+expected                ={halDataOn,expected}
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0001-Instructions]
+text			={randomPixels,instructions}
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0001-WriteFeedback]
+text			={randomPixels,pixelfeedback}
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0001-Read]
+timeout			=0
+synchronous             =FALSE
+black                   ={colour,black}
+white                   ={colour,white}
+errorMargin             ={generic,errorMargin}
+
+exitRectangle_minX      ={exitBox,minX}
+exitRectangle_minY      ={exitBox,minY}
+exitRectangle_maxX      ={exitBox,maxX}
+exitRectangle_maxY      ={exitBox,maxY}
+
+tests                   ={randomPixels,pointsTotal}
+
+eventType1		={rawEvent,button1Down}
+eventOccurance1		=EEventOccuranceOnce
+dataDraw1               =FALSE
+dataVerify1		=FALSE
+
+eventType2		={rawEvent,pointerMove}
+eventOccurance2		=EEventOccuranceZeroOrMore
+dataDraw2               =FALSE
+dataVerify2		=FALSE
+
+eventType3		={rawEvent,button1Up}
+eventOccurance3		=EEventOccuranceOnce
+dataDraw3               =TRUE
+dataVerify3		=FALSE
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0002-Instructions]
+text			={randomLine,instructions}
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0002-WriteFeedback]
+text			={randomLine,pixelfeedback}
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0002-Read]
+timeout			=0
+synchronous             =FALSE
+black                   ={colour,black}
+white                   ={colour,white}
+errorMargin             ={generic,errorMargin}
+
+exitRectangle_minX      ={exitBox,minX}
+exitRectangle_minY      ={exitBox,minY}
+exitRectangle_maxX      ={exitBox,maxX}
+exitRectangle_maxY      ={exitBox,maxY}
+
+tests                   ={randomLine,pointsTotal}
+
+eventType1		={rawEvent,button1Down}
+eventOccurance1		=EEventOccuranceOnce
+dataDraw1               =TRUE
+dataVerify1		=FALSE
+
+eventType2		={rawEvent,pointerMove}
+eventOccurance2		=EEventOccuranceOneOrMore
+dataDraw2               =TRUE
+dataVerify2		=FALSE
+
+eventType3		={rawEvent,button1Up}
+eventOccurance3		=EEventOccuranceOnce
+dataDraw3               =TRUE
+dataVerify3		=FALSE
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0003-Instructions]
+text			={preDrawnDots,instructions}
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0003-Read]
+timeout			=0
+synchronous             =FALSE
+black                   ={colour,black}
+white                   ={colour,white}
+errorMargin             ={generic,errorMargin}
+
+exitRectangle_minX      ={exitBox,minX}
+exitRectangle_minY      ={exitBox,minY}
+exitRectangle_maxX      ={exitBox,maxX}
+exitRectangle_maxY      ={exitBox,maxY}
+
+tests                   ={preDrawnDots,pointsTotal}
+point1_x  		={preDrawnDots,1_x}
+point1_y		={preDrawnDots,1_y}
+point2_x		={preDrawnDots,2_x}
+point2_y		={preDrawnDots,2_y}
+point3_x		={preDrawnDots,3_x}
+point3_y		={preDrawnDots,3_y}
+
+eventType1		={rawEvent,button1Down}
+eventOccurance1		=EEventOccuranceOnce
+dataDraw1               =FALSE
+dataVerify1		=TRUE
+
+eventType2		={rawEvent,pointerMove}
+eventOccurance2		=EEventOccuranceZeroOrMore
+dataDraw2               =FALSE
+dataVerify2		=TRUE
+
+eventType3		={rawEvent,button1Up}
+eventOccurance3		=EEventOccuranceOnce
+dataDraw3               =TRUE
+dataVerify3		=TRUE
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0004-Instructions]
+text			={preDrawnRect,instructions}
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0004-Read]
+
+rect1_minX  		={preDrawnRect,tl_x}
+rect1_minY		={preDrawnRect,tl_y}
+rect1_maxX 		={preDrawnRect,br_x}
+rect1_maxY 		={preDrawnRect,br_y}
+
+timeout			=0
+synchronous             =FALSE
+black                   ={colour,black}
+white                   ={colour,white}
+errorMargin             ={generic,errorMargin}
+
+exitRectangle_minX      ={exitBox,minX}
+exitRectangle_minY      ={exitBox,minY}
+exitRectangle_maxX      ={exitBox,maxX}
+exitRectangle_maxY      ={exitBox,maxY}
+
+tests                   ={preDrawnRect,eventTotal}
+
+eventType1		={rawEvent,button1Down}
+eventOccurance1		=EEventOccuranceOnce
+dataDraw1               =TRUE
+dataVerify1		=TRUE
+
+eventType2		={rawEvent,pointerMove}
+eventOccurance2		=EEventOccuranceOneOrMore
+dataDraw2               =TRUE
+dataVerify2		=TRUE
+
+eventType3		={rawEvent,button1Up}
+eventOccurance3		=EEventOccuranceOnce
+dataDraw3               =TRUE
+dataVerify3		=TRUE
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0005-PenState]
+text                    =Please touch the screen manual checking of penstate off we should not recieve a pen event ( a pixel should NOT highlight). If no reaction please let this read timeout.
+halEValue               =EPenState
+value                   ={halDataOff,value}
+expected                ={halDataOff,expected}
+timeout			={generic,maxTimeout}
+timeoutExpected         =TRUE
+synchronous             =FALSE
+
+tests                   =1
+eventType1		={rawEvent,button1Down}
+eventOccurance1		=EEventOccuranceOnce
+dataDraw1               =FALSE
+dataVerify1		=FALSE
+
+eventType2		={rawEvent,pointerMove}
+eventOccurance2		=EEventOccuranceZeroOrMore
+dataVerify2		=FALSE
+dataDraw2               =FALSE
+
+eventType3		={rawEvent,button1Up}
+eventOccurance3		=EEventOccuranceOnce
+dataVerify3		=FALSE
+dataDraw3               =TRUE
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0005-WriteFeedback]
+text                    =EPen state should be off if pen event recieved please fail the testcase.
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0006-PenState]
+text                    =Please touch the screen manual checking of penstate On we should recieve a pen event (a pixel should highlight). If no reaction please let this read timeout.
+timeout			={generic,maxTimeout}
+timeoutExpected         =FALSE
+synchronous             =FALSE
+halEValue               =EPenState
+value                   ={halDataOn,value}
+expected                ={halDataOn,expected}
+
+tests                   =1
+eventType1		={rawEvent,button1Down}
+eventOccurance1		=EEventOccuranceOnce
+dataDraw1               =FALSE
+dataVerify1		=FALSE
+
+eventType2		={rawEvent,pointerMove}
+eventOccurance2		=EEventOccuranceZeroOrMore
+dataVerify2		=FALSE
+dataDraw2               =FALSE
+
+eventType3		={rawEvent,button1Up}
+eventOccurance3		=EEventOccuranceOnce
+dataVerify3		=FALSE
+dataDraw3               =TRUE
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0006-WriteFeedback]
+text                    =EPen state should be ON if pen event recieved please pass the testcase.
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0007-WriteFeedback]
+text                    =EPenClick should be on, Did a pen click produce a Click sound?.
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0007-PenClick]
+text                    =Please touch the screen manual checking of EPenClick,we should hear a click sound. If no reaction please let this read timeout.
+halEValue               =EPenClick
+value                   ={halDataOn,value}
+expected                ={halDataOn,expected}
+timeout			={generic,maxTimeout}
+synchronous             =FALSE
+
+tests                   =1
+eventType1		={rawEvent,button1Down}
+eventOccurance1		=EEventOccuranceOnce
+dataDraw1               =FALSE
+dataVerify1		=FALSE
+
+eventType2		={rawEvent,pointerMove}
+eventOccurance2		=EEventOccuranceZeroOrMore
+dataVerify2		=FALSE
+dataDraw2               =FALSE
+
+eventType3		={rawEvent,button1Up}
+eventOccurance3		=EEventOccuranceOnce
+dataVerify3		=FALSE
+dataDraw3               =TRUE
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0008-WriteFeedback]
+text                    =EPenClick should be off, Did a pen click produce a Click sound?.
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0008-Setup]
+halEValue               =EPenState
+value                   ={halDataOn,value}
+expected                ={halDataOn,value}
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0008-PenClick]
+text                    =Please touch the screen manual checking of EPenClick,we should NOT hear a click sound. If no reaction please let this read timeout.
+halEValue               =EPenClick
+value                   ={halDataOff,value}
+expected                ={halDataOff,expected}
+timeout			={generic,maxTimeout}
+synchronous             =FALSE
+
+tests                   =1
+eventType1		={rawEvent,button1Down}
+eventOccurance1		=EEventOccuranceOnce
+dataDraw1               =FALSE
+dataVerify1		=FALSE
+
+eventType2		={rawEvent,pointerMove}
+eventOccurance2		=EEventOccuranceZeroOrMore
+dataVerify2		=FALSE
+dataDraw2               =FALSE
+
+eventType3		={rawEvent,button1Up}
+eventOccurance3		=EEventOccuranceOnce
+dataVerify3		=FALSE
+dataDraw3               =TRUE
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-EDisplayStateOn]
+halEValue               =EDisplayState
+value                   ={halDataOn,value}
+expected                ={halDataOn,expected}
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-EDisplayStateOff]
+halEValue               =EDisplayState
+value                   ={halDataOff,value}
+expected                ={halDataOff,expected}
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0011-EPenDisplayOn]
+text                    =Pen tap state switched on, a pen click should switch on the display. Please wait for the backlight to switch off before tapping screen. If no reaction please let this read timeout.
+halEValue               =EPenDisplayOn
+value                   ={halDataOn,value}
+expected                ={halDataOn,expected}
+timeout			={generic,maxTimeout}
+synchronous             =FALSE
+
+tests                   =1
+eventType1		={rawEvent,button1Down}
+eventOccurance1		=EEventOccuranceOnce
+dataDraw1               =FALSE
+dataVerify1		=FALSE
+
+eventType2		={rawEvent,pointerMove}
+eventOccurance2		=EEventOccuranceZeroOrMore
+dataVerify2		=FALSE
+dataDraw2               =FALSE
+
+eventType3		={rawEvent,button1Up}
+eventOccurance3		=EEventOccuranceOnce
+dataVerify3		=FALSE
+dataDraw3               =TRUE
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0011-WriteFeedback]
+text                    =Pen tap state switched on, Did a pen tap switch on the display? 
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0011-EPenDisplayOnRestore]
+halEValue               =EPenDisplayOn
+expected                =1
+value                   =1
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0012-EPenDisplayOn]
+halEValue               =EPenDisplayOn
+text                    =Pen tap state switched off, a pen click should NOT switch on the display. Please wait for the backlight to switch off before tapping screen. If no reaction please let this read timeout.
+value                   ={halDataOff,value}
+expected                ={halDataOff,expected}
+timeout			={generic,maxTimeout}
+synchronous             =FALSE
+
+tests                   =1
+eventType1		={rawEvent,button1Down}
+eventOccurance1		=EEventOccuranceOnce
+dataDraw1               =FALSE
+dataVerify1		=FALSE
+
+eventType2		={rawEvent,pointerMove}
+eventOccurance2		=EEventOccuranceZeroOrMore
+dataVerify2		=FALSE
+dataDraw2               =FALSE
+
+eventType3		={rawEvent,button1Up}
+eventOccurance3		=EEventOccuranceOnce
+dataVerify3		=FALSE
+dataDraw3               =TRUE
+
+[BASE-BSP-DIGITISER-DRIVER-MANUAL-0012-WriteFeedback]
+text                    =Pen tap state switched off,  a pen tap should not switch on the display fail if it did. 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/testdata/devlon52/t_digitiser.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,208 @@
+# This is the global environment file to configure the touch-screen test suite on a specific device
+# The current default touch screen test suite values are configured for TI OMAP 2420 (H4) hardware digitiser device
+# Licencees may need to configure below values to specific devices and also where applicable,
+# check supported HAL Enum's
+
+
+[generic]
+
+# A timeout value in microseconds. 
+# This is a 10 second timeout used in the manual testcases
+minTimeout                      =1000000
+
+# A timeout value in microseconds. 
+# This is a 50 second timeout used in the manual testcases
+maxTimeout                      =5000000
+
+# Defines the error margin in pixels that the digitiser test suite will cater for.
+errorMargin                     =10
+
+
+# A hexadecimal value used to represent keycode values used in tests where manual confirmation 
+# is required via a key press. 
+# The keycode value represents the TKeyCode enum value, by default the hexadecimal value
+# used in this suite is the 'green ok' key.
+# (Please note that some of these mappings are device dependant).
+keyCode                         =0x00C4
+
+[confirm]
+instructions                    =Press the green ok key to pass the test case. Any key to fail.
+
+[exitBox]
+# Defines the horizontal co-ordinate value for the positioning of the exit box.
+minX                      =10
+
+# Defines the vertical co-ordinate  value for the positioning of the exit box.
+minY                      =100
+
+# Defines the horizontal co-ordinate value for the positioning of the exit box.
+maxX                      =40
+
+# Defines the vertical co-ordinate  value for the positioning of the exit box.
+maxY                      =120
+
+
+[randomPixels]
+# Defaults values used in the scenario where the user has
+# to touch any pixel on the screen with a stylus, and manually confirm if a test has passed.
+instructions                    =Touch any number of screen pixels randomly with stylus. To exit testcase hit the exit box.
+pixelfeedback                   =Did the pixels hightlight correctly? Press the number one key to pass the test case. Any key to fail.
+
+# Defines the number of pixels that will need to be verified. In the default scenario we are using -1 to indicate an unlimited number of 
+# pixels, for example here the use of the number 3 would indicate three pixels to verify.
+pointsTotal                     =-1
+
+[randomLine]
+instructions                    =Draw a straight line from any point to any point. To exit testcase hit the exit box.
+pixelfeedback                   =Did correct pixels hightlight? Press the number one key to pass the test case. Any key to fail.
+
+# Defines the number of pixels that will need to be verified. In the default scenario we are using -1 to indicate an unlimited number of 
+# pixels
+pointsTotal                     =3
+[preDrawnDots]
+# Defaults values used in the scenario when pixels are predrawn on the screen, and the user has
+# to touch each pixel with a stylus.
+instructions                    =Touch the inside the drawn rectangle. To exit testcase hit the exit box
+
+# Defines the number of pixels that will be predrawn on the screen ready to verify
+pointsTotal                     =3
+
+# Define the predrawn co-ordinates here there are 3 but this can be increased by adding further values
+# i.e 4_x and so forth
+1_x		                =30
+1_y		                =210
+
+2_x		                =180
+2_y		                =60
+
+3_x		                =200
+3_y		                =300
+
+
+[preDrawnRect]
+# Defaults values used in the scenario when pixels are predrawn on the screen, and the user has
+# to touch each pixel with a stylus.
+
+instructions                    =With stylus, draw a line within this box. To exit testcase hit the exit box
+
+# Defines the number of pixels that will be predrawn on the screen ready to verify
+eventTotal                     =3
+
+# Default values used in the scenario where a line is predrawn on the screen, and the user has
+# to follow the line with a stylus. the values below indicate the defualt Top left and bottom right of that rect
+tl_x                             =80
+tl_y                             =180
+
+br_x                             =200
+br_y                             =200
+
+[colour]
+# The mask value of the colour black
+black                           =0x00
+# The mask value of the colour white
+white                           =0xFF
+
+[displayMode]
+# Define  the mode display mode for the  screen to use in these tests
+value                           ={displayMode,defaultmode}  
+expected                        ={displayMode,defaultmode} 
+
+# Define  the default mode display mode for the  screen
+defaultmode                     ={displayMode,mode1}  
+
+# Define  display mode for the  screen
+mode0                           =0
+
+# Define  display mode for the  screen
+mode1                           =1
+
+# Define  display mode for the  screen
+mode2                           =2
+
+# Define  display mode for the  screen
+mode3                           =3
+
+# Define  display mode for the  screen
+mode4                           =4
+
+[haldata]
+
+# Default value of the the pen/digitizer horizontal resolution, in pixels
+ePenXValue                     =640
+
+# Default value of the pen/digitizer vertical resolution, in pixels.
+ePenYValue                     =360
+
+[halDataOff]
+# Default value of the the HAL Data to set or get. 
+value                   =0
+expected                =0
+
+[halDataOn]
+# Default value of the the HAL Data to set or get
+value                   =1
+expected                =1
+                           
+[rawEvent]
+# Defines the Enum strings used by TRawEvent.
+
+# Represents an uninitialised event object.
+none                            =ENone     
+
+# EPointerMove A pointer device (e.g. a pen) has moved. Only changes in Cartesian coordinates are tracked.
+pointerMove  		        =EPointerMove
+
+# A switch on event caused by a screen tap using a pointer device.
+pointerSwitchOn                 =EPointerSwitchOn 
+
+# Represents a keyboard key down event. 
+keyDown                         =EKeyDown 
+
+#Represents a keyboard key up event.
+keyUp                           =EKeyUp 
+
+# Represents a redraw event.
+redraw                          =ERedraw 
+
+# Represents a device switch on event.
+switchOn                        =ESwitchOn 
+
+active                          =EActive 
+ 
+inactive                        =EInactive 
+ 
+# Represents a modifier key being pressed.
+updateModifiers                 =EUpdateModifiers
+
+# Represents a button down event. This is typically used to represent a pointing device coming into contact with a touch sensitive screen
+button1Down  		       =EButton1Down
+
+# Represents a button up event. This is typically used to represent a pointing device being lifted away from a touch sensitive screen.
+button1Up                       =EButton1Up
+
+# Represents a button down event. This is typically used to represent a pointing device coming into contact with a touch sensitive screen.
+button2Down                    =EButton2Down 
+
+# Represents a button up event. This is typically used to represent a pointing device being lifted away from a touch sensitive screen.
+button2Up                      =EButton2Up 
+
+# Represents a button down event. This is typically used to represent a pointing device coming into contact with a touch sensitive screen.
+button3Down                    =EButton3Down 
+
+# Represents a button up event. This is typically used to represent a pointing device being lifted away from a touch sensitive screen.
+button3Up                      =EButton3Up 
+
+# Represents a device switch off event.
+switchOff                      =ESwitchOff 
+ 
+# Represents a key being continually pressed event.
+keyRepeat                      =EKeyRepeat
+ 
+# Represents a case open event. The meaning of a case is hardware specific.
+caseOpen                       =ECaseOpen
+
+# Represents a case close event. The meaning of a case is hardware specific. 
+caseClose                      =ECaseClose 
+
+# Represents a device restart 
+restartSystem                  =ERestartSystem  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/testdata/devlon52/t_digitiser.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,2 @@
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/testdata/h4hrp/t_digitiser.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,210 @@
+# This is the global environment file to configure the touch-screen test suite on a specific device
+# The current default touch screen test suite values are configured for TI OMAP 2420 (H4) hardware digitiser device
+# Licencees may need to configure below values to specific devices and also where applicable,
+# check supported HAL Enum's
+
+
+[generic]
+
+# A timeout value in microseconds. 
+# This is a 10 second timeout used in the manual testcases
+minTimeout                      =1000000
+
+# A timeout value in microseconds. 
+# This is a 50 second timeout used in the manual testcases
+maxTimeout                      =5000000
+
+# Defines the error margin in pixels that the digitiser test suite will cater for.
+errorMargin                     =10
+
+
+# A hexadecimal value used to represent keycode values used in tests where manual confirmation 
+# is required via a key press. 
+# The keycode value represents the TKeyCode enum value, by default the hexadecimal value
+# used in this suite is the 'one' key.
+# (Please note that some of these mappings are device dependant).
+keyCode                         =0x0031
+
+[confirm]
+instructions                    =Press the number one key to pass the test case. Any key to fail.
+
+[exitBox]
+# Defines the horizontal co-ordinate value for the positioning of the exit box.
+minX                      =10
+
+# Defines the vertical co-ordinate  value for the positioning of the exit box.
+minY                      =100
+
+# Defines the horizontal co-ordinate value for the positioning of the exit box.
+maxX                      =40
+
+# Defines the vertical co-ordinate  value for the positioning of the exit box.
+maxY                      =120
+
+
+[randomPixels]
+# Defaults values used in the scenario where the user has
+# to touch any pixel on the screen with a stylus, and manually confirm if a test has passed.
+instructions                    =Touch any number of screen pixels randomly with stylus. To exit testcase hit the exit box.
+pixelfeedback                   =Did the pixels hightlight correctly? Press the number one key to pass the test case. Any key to fail.
+
+# Defines the number of pixels that will need to be verified. In the default scenario we are using -1 to indicate an unlimited number of 
+# pixels, for example here the use of the number 3 would indicate three pixels to verify.
+pointsTotal                     =-1
+
+[randomLine]
+instructions                    =Draw a straight line from any point to any point. To exit testcase hit the exit box.
+pixelfeedback                   =Did correct pixels hightlight? Press the number one key to pass the test case. Any key to fail.
+
+# Defines the number of pixels that will need to be verified. In the default scenario we are using -1 to indicate an unlimited number of 
+# pixels
+pointsTotal                     =3
+
+[preDrawnDots]
+# Defaults values used in the scenario when pixels are predrawn on the screen, and the user has
+# to touch each pixel with a stylus.
+instructions                    =Touch the inside the drawn rectangle. To exit testcase hit the exit box
+
+# Defines the number of pixels that will be predrawn on the screen ready to verify.
+pointsTotal                     =3
+
+# Define the predrawn co-ordinates here there are 3 but this can be increased by adding further values
+# i.e 4_x and so forth
+1_x		                =30
+1_y		                =210
+
+2_x		                =180
+2_y		                =60
+
+3_x		                =200
+3_y		                =300
+
+
+[preDrawnRect]
+# Defaults values used in the scenario when pixels are predrawn on the screen, and the user has
+# to touch each pixel with a stylus.
+
+instructions                    =With stylus, draw a line within this box. To exit testcase hit the exit box
+
+# Defines the number of pixels that will be predrawn on the screen ready to verify
+eventTotal                     =3
+
+# Default values used in the scenario where a line is predrawn on the screen, and the user has
+# to follow the line with a stylus. the values below indicate the defualt Top left and bottom right of that rect
+tl_x                             =80
+tl_y                             =180
+
+br_x                             =200
+br_y                             =200
+
+[colour]
+# The mask value of the colour black
+black                           =0x00
+# The mask value of the colour white
+white                           =0xFF
+
+[displayMode]
+# Define  the mode display mode for the  screen to use in these tests
+value                           ={displayMode,defaultmode}  
+expected                        ={displayMode,defaultmode} 
+
+# Define  the default mode display mode for the  screen
+defaultmode                     ={displayMode,mode3}  
+
+# Define  display mode for the  screen
+mode0                           =0
+
+# Define  display mode for the  screen
+mode1                           =1
+
+# Define  display mode for the  screen
+mode2                           =2
+
+# Define  display mode for the  screen
+mode3                           =3
+
+# Define  display mode for the  screen
+mode4                           =4
+
+[haldata]
+
+# Default value of the the pen/digitizer horizontal resolution, in pixels
+ePenXValue                     =365
+
+# Default value of the pen/digitizer vertical resolution, in pixels.
+ePenYValue                     =280
+
+[halDataOff]
+# Default value of the the HAL Data to set or get. 
+value                   =0
+expected                =0
+
+[halDataOn]
+# Default value of the the HAL Data to set or get
+value                   =1
+expected                =1
+                           
+[rawEvent]
+# Defines the Enum strings used by TRawEvent.
+
+# Represents an uninitialised event object.
+none                            =ENone     
+
+# EPointerMove A pointer device (e.g. a pen) has moved. Only changes in Cartesian coordinates are tracked.
+pointerMove  		        =EPointerMove
+
+# A switch on event caused by a screen tap using a pointer device.
+pointerSwitchOn                 =EPointerSwitchOn 
+
+# Represents a keyboard key down event. 
+keyDown                         =EKeyDown 
+
+#Represents a keyboard key up event.
+keyUp                           =EKeyUp 
+
+# Represents a redraw event.
+redraw                          =ERedraw 
+
+# Represents a device switch on event.
+switchOn                        =ESwitchOn 
+
+active                          =EActive 
+ 
+inactive                        =EInactive 
+ 
+# Represents a modifier key being pressed.
+updateModifiers                 =EUpdateModifiers
+
+# Represents a button down event. This is typically used to represent a pointing device coming into contact with a touch sensitive screen
+button1Down  		       =EButton1Down
+
+# Represents a button up event. This is typically used to represent a pointing device being lifted away from a touch sensitive screen.
+button1Up                       =EButton1Up
+
+# Represents a button down event. This is typically used to represent a pointing device coming into contact with a touch sensitive screen.
+button2Down                    =EButton2Down 
+
+# Represents a button up event. This is typically used to represent a pointing device being lifted away from a touch sensitive screen.
+button2Up                      =EButton2Up 
+
+# Represents a button down event. This is typically used to represent a pointing device coming into contact with a touch sensitive screen.
+button3Down                    =EButton3Down 
+
+# Represents a button up event. This is typically used to represent a pointing device being lifted away from a touch sensitive screen.
+button3Up                      =EButton3Up 
+
+# Represents a device switch off event.
+switchOff                      =ESwitchOff 
+ 
+# Represents a key being continually pressed event.
+keyRepeat                      =EKeyRepeat
+ 
+# Represents a case open event. The meaning of a case is hardware specific.
+caseOpen                       =ECaseOpen
+
+# Represents a case close event. The meaning of a case is hardware specific. 
+caseClose                      =ECaseClose 
+
+# Represents a device restart 
+restartSystem                  =ERestartSystem 
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/testdata/h4hrp/t_digitiser.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,4 @@
+BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0001:BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0004
+BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0011:BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0017
+BASE-BSP-DIGITISER-DRIVER-MANUAL-0005:BASE-BSP-DIGITISER-DRIVER-MANUAL-0008
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/testdata/h6hrp/t_digitiser.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,210 @@
+# This is the global environment file to configure the touch-screen test suite on a specific device
+# The current default touch screen test suite values are configured for TI OMAP 2420 (H4) hardware digitiser device
+# Licencees may need to configure below values to specific devices and also where applicable,
+# check supported HAL Enum's
+
+
+[generic]
+
+# A timeout value in microseconds. 
+# This is a 10 second timeout used in the manual testcases
+minTimeout                      =1000000
+
+# A timeout value in microseconds. 
+# This is a 50 second timeout used in the manual testcases
+maxTimeout                      =5000000
+
+# Defines the error margin in pixels that the digitiser test suite will cater for.
+errorMargin                     =10
+
+
+# A hexadecimal value used to represent keycode values used in tests where manual confirmation 
+# is required via a key press. 
+# The keycode value represents the TKeyCode enum value, by default the hexadecimal value
+# used in this suite is the 'one' key.
+# (Please note that some of these mappings are device dependant).
+keyCode                         =0x0031
+
+[confirm]
+instructions                    =Press the number one key to pass the test case. Any key to fail.
+
+[exitBox]
+# Defines the horizontal co-ordinate value for the positioning of the exit box.
+minX                      =10
+
+# Defines the vertical co-ordinate  value for the positioning of the exit box.
+minY                      =100
+
+# Defines the horizontal co-ordinate value for the positioning of the exit box.
+maxX                      =40
+
+# Defines the vertical co-ordinate  value for the positioning of the exit box.
+maxY                      =120
+
+
+[randomPixels]
+# Defaults values used in the scenario where the user has
+# to touch any pixel on the screen with a stylus, and manually confirm if a test has passed.
+instructions                    =Touch any number of screen pixels randomly with stylus. To exit testcase hit the exit box.
+pixelfeedback                   =Did the pixels hightlight correctly? Press the number one key to pass the test case. Any key to fail.
+
+# Defines the number of pixels that will need to be verified. In the default scenario we are using -1 to indicate an unlimited number of 
+# pixels, for example here the use of the number 3 would indicate three pixels to verify.
+pointsTotal                     =-1
+
+[randomLine]
+instructions                    =Draw a straight line from any point to any point. To exit testcase hit the exit box.
+pixelfeedback                   =Did correct pixels hightlight? Press the number one key to pass the test case. Any key to fail.
+
+# Defines the number of pixels that will need to be verified. In the default scenario we are using -1 to indicate an unlimited number of 
+# pixels
+pointsTotal                     =3
+
+[preDrawnDots]
+# Defaults values used in the scenario when pixels are predrawn on the screen, and the user has
+# to touch each pixel with a stylus.
+instructions                    =Touch the inside the drawn rectangle. To exit testcase hit the exit box
+
+# Defines the number of pixels that will be predrawn on the screen ready to verify.
+pointsTotal                     =3
+
+# Define the predrawn co-ordinates here there are 3 but this can be increased by adding further values
+# i.e 4_x and so forth
+1_x		                =30
+1_y		                =210
+
+2_x		                =180
+2_y		                =60
+
+3_x		                =200
+3_y		                =300
+
+
+[preDrawnRect]
+# Defaults values used in the scenario when pixels are predrawn on the screen, and the user has
+# to touch each pixel with a stylus.
+
+instructions                    =With stylus, draw a line within this box. To exit testcase hit the exit box
+
+# Defines the number of pixels that will be predrawn on the screen ready to verify
+eventTotal                     =3
+
+# Default values used in the scenario where a line is predrawn on the screen, and the user has
+# to follow the line with a stylus. the values below indicate the defualt Top left and bottom right of that rect
+tl_x                             =80
+tl_y                             =180
+
+br_x                             =200
+br_y                             =200
+
+[colour]
+# The mask value of the colour black
+black                           =0x00
+# The mask value of the colour white
+white                           =0xFF
+
+[displayMode]
+# Define  the mode display mode for the  screen to use in these tests
+value                           ={displayMode,defaultmode}  
+expected                        ={displayMode,defaultmode} 
+
+# Define  the default mode display mode for the  screen
+defaultmode                     ={displayMode,mode3}  
+
+# Define  display mode for the  screen
+mode0                           =0
+
+# Define  display mode for the  screen
+mode1                           =1
+
+# Define  display mode for the  screen
+mode2                           =2
+
+# Define  display mode for the  screen
+mode3                           =7
+
+# Define  display mode for the  screen
+mode4                           =4
+
+[haldata]
+
+# Default value of the the pen/digitizer horizontal resolution, in pixels
+ePenXValue                     =365
+
+# Default value of the pen/digitizer vertical resolution, in pixels.
+ePenYValue                     =280
+
+[halDataOff]
+# Default value of the the HAL Data to set or get. 
+value                   =0
+expected                =0
+
+[halDataOn]
+# Default value of the the HAL Data to set or get
+value                   =1
+expected                =1
+                           
+[rawEvent]
+# Defines the Enum strings used by TRawEvent.
+
+# Represents an uninitialised event object.
+none                            =ENone     
+
+# EPointerMove A pointer device (e.g. a pen) has moved. Only changes in Cartesian coordinates are tracked.
+pointerMove  		        =EPointerMove
+
+# A switch on event caused by a screen tap using a pointer device.
+pointerSwitchOn                 =EPointerSwitchOn 
+
+# Represents a keyboard key down event. 
+keyDown                         =EKeyDown 
+
+#Represents a keyboard key up event.
+keyUp                           =EKeyUp 
+
+# Represents a redraw event.
+redraw                          =ERedraw 
+
+# Represents a device switch on event.
+switchOn                        =ESwitchOn 
+
+active                          =EActive 
+ 
+inactive                        =EInactive 
+ 
+# Represents a modifier key being pressed.
+updateModifiers                 =EUpdateModifiers
+
+# Represents a button down event. This is typically used to represent a pointing device coming into contact with a touch sensitive screen
+button1Down  		       =EButton1Down
+
+# Represents a button up event. This is typically used to represent a pointing device being lifted away from a touch sensitive screen.
+button1Up                       =EButton1Up
+
+# Represents a button down event. This is typically used to represent a pointing device coming into contact with a touch sensitive screen.
+button2Down                    =EButton2Down 
+
+# Represents a button up event. This is typically used to represent a pointing device being lifted away from a touch sensitive screen.
+button2Up                      =EButton2Up 
+
+# Represents a button down event. This is typically used to represent a pointing device coming into contact with a touch sensitive screen.
+button3Down                    =EButton3Down 
+
+# Represents a button up event. This is typically used to represent a pointing device being lifted away from a touch sensitive screen.
+button3Up                      =EButton3Up 
+
+# Represents a device switch off event.
+switchOff                      =ESwitchOff 
+ 
+# Represents a key being continually pressed event.
+keyRepeat                      =EKeyRepeat
+ 
+# Represents a case open event. The meaning of a case is hardware specific.
+caseOpen                       =ECaseOpen
+
+# Represents a case close event. The meaning of a case is hardware specific. 
+caseClose                      =ECaseClose 
+
+# Represents a device restart 
+restartSystem                  =ERestartSystem 
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/digitiser/testdata/h6hrp/t_digitiser.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,6 @@
+BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0001:BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0004
+BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0011:BASE-BSP-DIGITISER-DRIVER-AUTOMATED-0017
+BASE-BSP-DIGITISER-DRIVER-MANUAL-0005:BASE-BSP-DIGITISER-DRIVER-MANUAL-0008
+
+END_TESTCASE BASE-BSP-DIGITISER-DRIVER-MANUAL-0011
+END_TESTCASE BASE-BSP-DIGITISER-DRIVER-MANUAL-0012
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/group/bld.inf	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,23 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include "../lcd/group/bld.inf"
+#include "../digitiser/group/bld.inf"
+#include "../uart/group/bld.inf"
+#include "../mmc/group/bld.inf"
+#include "../sound/group/bld.inf"
+#include "../keypad/group/bld.inf"
+#include "../usb/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/group/T_Keypad.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+TARGET			t_keypad.exe
+TARGETTYPE		exe
+UID				0x1000007A 0x102863DC
+VENDORID		0x70000001
+
+capability		All -Tcb
+
+SOURCEPATH		../src
+
+SOURCE			../../../hal/src/T_HALData.cpp
+SOURCE			../../../common/src/DataWrapperBase.cpp
+SOURCE			../../../common/src/ActiveCallbackBase.cpp
+
+SOURCE			T_KeypadDriverData.cpp
+SOURCE			T_KeypadDriverServer.cpp
+
+USERINCLUDE		../inc
+USERINCLUDE		../../../common/inc
+USERINCLUDE		../../../hal/inc
+
+SYSTEMINCLUDE	/epoc32/include
+SYSTEMINCLUDE	/epoc32/include/test
+SYSTEMINCLUDE	/epoc32/include/kernel
+
+LIBRARY			euser.lib
+LIBRARY			efsrv.lib
+LIBRARY			hal.lib
+LIBRARY			testexecuteutils.lib
+LIBRARY			testexecutelogclient.lib
+LIBRARY			bafl.lib
+LIBRARY			iniparser.lib
+LIBRARY			econs.lib
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/group/bld.inf	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,63 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include "../../../group/device.cfg"
+
+PRJ_TESTEXPORTS
+//t_keypad.oby												/src/cedar/generic/base/e32/rombuild/t_keypad.oby
+t_keypad.oby												/sf/os/kernelhwsrv/kernel/eka/rombuild/t_keypad.oby
+t_keypad.oby												/epoc32/rom/haitests/t_keypad.oby
+t_keypad.iby												/epoc32/rom/haitests/t_keypad.iby
+t_keypad_binaries.iby										/epoc32/rom/haitests/t_keypad_binaries.iby
+t_keypad_testdata.iby										/epoc32/rom/haitests/t_keypad_testdata.iby
+
+../pkg/t_keypad.bat											z:/base/t_keypad.bat
+
+../scripts/BASE-BSP-KEYPAD-DRIVER-AUTOMATED.script			z:/base/keypad/base-bsp-keypad-driver-automated.script
+../scripts/BASE-BSP-KEYPAD-DRIVER-MANUAL.script				z:/base/keypad/base-bsp-keypad-driver-manual.script
+../scripts/BASE-BSP-KEYPAD-DRIVER.script					z:/base/keypad/base-bsp-keypad-driver.script
+../testdata/BASE-BSP-KEYPAD-DRIVER.ini						z:/base/keypad/base-bsp-keypad-driver.ini
+
+#if defined(TEST_DEVICE_H4HRP)
+../testdata/h4hrp/t_keypad.ini								/epoc32/release/armv5/udeb/z/base/keypad/t_keypad.ini
+../testdata/h4hrp/t_keypad.tcs								/epoc32/release/armv5/udeb/z/base/keypad/t_keypad.tcs
+../testdata/h4hrp/t_keypad.ini								/epoc32/release/armv5/urel/z/base/keypad/t_keypad.ini
+../testdata/h4hrp/t_keypad.tcs								/epoc32/release/armv5/urel/z/base/keypad/t_keypad.tcs
+#endif
+
+#if defined(TEST_DEVICE_H6HRP)
+../testdata/h6hrp/t_keypad.ini								/epoc32/release/armv5/udeb/z/base/keypad/t_keypad.ini
+../testdata/h6hrp/t_keypad.tcs								/epoc32/release/armv5/udeb/z/base/keypad/t_keypad.tcs
+../testdata/h6hrp/t_keypad.ini								/epoc32/release/armv5/urel/z/base/keypad/t_keypad.ini
+../testdata/h6hrp/t_keypad.tcs								/epoc32/release/armv5/urel/z/base/keypad/t_keypad.tcs
+#endif
+
+#if defined(TEST_DEVICE_DEVLON52)
+../testdata/devlon52/t_keypad.ini							/epoc32/release/armv5/udeb/z/base/keypad/t_keypad.ini
+../testdata/devlon52/t_keypad.tcs							/epoc32/release/armv5/udeb/z/base/keypad/t_keypad.tcs
+../testdata/devlon52/t_keypad.ini							/epoc32/release/armv5/urel/z/base/keypad/t_keypad.ini
+../testdata/devlon52/t_keypad.tcs							/epoc32/release/armv5/urel/z/base/keypad/t_keypad.tcs
+#endif
+
+#if defined(TEST_DEVICE_MERLIN)
+../testdata/merlin/t_keypad.ini								/epoc32/release/armv5/udeb/z/base/keypad/t_keypad.ini
+../testdata/merlin/t_keypad.tcs								/epoc32/release/armv5/udeb/z/base/keypad/t_keypad.tcs
+../testdata/merlin/t_keypad.ini								/epoc32/release/armv5/urel/z/base/keypad/t_keypad.ini
+../testdata/merlin/t_keypad.tcs								/epoc32/release/armv5/urel/z/base/keypad/t_keypad.tcs
+#endif
+
+PRJ_TESTMMPFILES
+T_Keypad.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/group/t_keypad.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,25 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_KEYPAD_IBY__)
+#define __T_KEYPAD_IBY__
+
+//Test Includes
+#include <rom\haitests\t_keypad_binaries.iby>
+#include <rom\haitests\t_keypad_testdata.iby>
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/group/t_keypad.oby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#define BASE_ROM
+#include <rom\##VARIANT##\header.iby>
+
+files=
+
+#include <rom\##VARIANT##\kernel.iby>
+#include "user.iby"
+#include <rom\hal\hal.iby>
+#include <rom\f32\f32.iby>
+
+//TEF Includes
+#include <rom\haitests\basetesttef.iby>
+
+// Tests
+#include <rom\haitests\t_keypad.iby>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/group/t_keypad_binaries.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,26 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_KEYPAD_BINARIES_IBY__)
+#define __T_KEYPAD_BINARIES_IBY__
+
+#if (!defined EKA2)
+file=\epoc32\release\##MAIN##\##BUILD##\t_keypad.exe		\sys\bin\t_keypad.exe
+#else
+file=\epoc32\release\##MAIN##\##BUILD##\t_keypad.exe		\sys\bin\t_keypad.exe
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/group/t_keypad_testdata.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,29 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_KEYPAD_TESTDATA_IBY__)
+#define __T_KEYPAD_TESTDATA_IBY__
+
+data=EPOCROOT##epoc32\data\z\base\keypad\BASE-BSP-KEYPAD-DRIVER-AUTOMATED.script		base\keypad\BASE-BSP-KEYPAD-DRIVER-AUTOMATED.script
+data=EPOCROOT##epoc32\data\z\base\keypad\BASE-BSP-KEYPAD-DRIVER-MANUAL.script			base\keypad\BASE-BSP-KEYPAD-DRIVER-MANUAL.script
+data=EPOCROOT##epoc32\data\z\base\keypad\BASE-BSP-KEYPAD-DRIVER.script					base\keypad\BASE-BSP-KEYPAD-DRIVER.script
+data=EPOCROOT##epoc32\data\z\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini						base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+
+data=EPOCROOT##epoc32\release\armv5\##BUILD##\z\base\keypad\t_keypad.ini				base\keypad\t_keypad.ini
+data=EPOCROOT##epoc32\release\armv5\##BUILD##\z\base\keypad\t_keypad.tcs				base\keypad\t_keypad.tcs
+data=EPOCROOT##epoc32\data\z\base\t_keypad.bat											base\t_keypad.bat
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/group/user_input.oby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,38 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+file=\epoc32\release\armv5\urel\testexecutepipslogclient.dll						\sys\bin\testexecutepipslogclient.dll
+file=\epoc32\release\armv5\urel\testexecutelogclient.dll							\sys\bin\testexecutelogclient.dll
+file=\epoc32\release\armv5\urel\testexecutelogengine.exe							\sys\bin\testexecutelogengine.exe
+file=\epoc32\release\armv5\urel\iniparser.dll							\sys\bin\iniparser.dll
+file=\epoc32\release\armv5\urel\rfileloggerclient.dll								\sys\bin\rfileloggerclient.dll
+file=\epoc32\release\armv5\urel\rfileloggerserver.exe								\sys\bin\rfileloggerserver.exe
+file=\epoc32\release\armv5\urel\testexecute.exe										\sys\bin\testexecute.exe
+file=\epoc32\release\armv5\urel\testexecuteutils.dll								\sys\bin\testexecuteutils.dll
+file=\epoc32\release\armv5\urel\wrapperutilsplugin.dll								\sys\bin\wrapperutilsplugin.dll
+data=\epoc32\data\z\system\data\testexecute.ini										\system\data\testexecute.ini
+
+file=\epoc32\release\armv5\urel\statapi.exe											\sys\bin\statapi.exe
+data=\epoc32\data\z\system\data\stat.ini											\system\data\stat.ini
+
+file=\Epoc32\release\armv5\urel\t_keypad.exe										\sys\bin\t_keypad.exe
+data=\Epoc32\data\z\base\keypad\BASE-BSP-KEYPAD-DRIVER-AUTOMATED.script				\base\keypad\BASE-BSP-KEYPAD-DRIVER-AUTOMATED.script
+data=\Epoc32\data\z\base\keypad\BASE-BSP-KEYPAD-DRIVER-MANUAL.script				\base\keypad\BASE-BSP-KEYPAD-DRIVER-MANUAL.script
+data=\Epoc32\data\z\base\keypad\BASE-BSP-KEYPAD-DRIVER.script						\base\keypad\BASE-BSP-KEYPAD-DRIVER.script
+data=\Epoc32\data\z\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini							\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+data=\Epoc32\release\armv5\urel\z\base\keypad\t_keypad.tcs					    	\base\keypad\t_keypad.tcs
+data=\Epoc32\release\armv5\urel\z\base\keypad\t_keypad.ini							\base\keypad\t_keypad.ini
+data=\Epoc32\data\z\base\t_keypad.bat												\base\t_keypad.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/inc/T_KeypadDriverData.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,127 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_KEYPAD_DRIVER_DATA_H__)
+#define __T_KEYPAD_DRIVER_DATA_H__
+
+//	User Includes
+#include "T_HALData.h"
+#include "ActiveCallbackBase.h"
+
+//	Epoc Includes
+#include <e32twin.h>
+
+/**
+ * Test Active Notification class
+ *
+ */
+class CT_KeypadDriverData : public CT_HALData
+	{
+public:
+	/**
+	* Public destructor
+	*/
+	~CT_KeypadDriverData();
+
+	/**
+	* Two phase constructor
+	*
+	* @leave	system wide error
+	*/
+	static	CT_KeypadDriverData*	NewL();
+
+	virtual TAny*	GetObject();
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+   
+protected:
+	/**
+	* Protected constructor. First phase construction
+	*/
+	CT_KeypadDriverData();
+
+	void	ConstructL();
+
+	static TBool	GetPrepareNothing(CDataWrapperBase* aThis, const TDesC& aSection, TInt& aValueStart, TInt& aValueEnd);
+
+	static void		SetKeyboardState(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetKeyboard(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetKeyboardDeviceKeys(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetKeyboardAppKeys(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetKeyboardClick(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetKeyboardClickVolumeMax(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetKeyboardClickState(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetKeyboardClickVolume(CDataWrapperBase* aThis, TInt aValue);
+
+private: 
+
+	void			DoCmdGetScanCodesL(const TDesC& aSection);
+	void			DoCmdGetModifiersL(const TDesC& aSection);
+	void			DoCmdTestAllKeysL(const TInt aAsyncErrorIndex);
+	void			DoCmdTestOneModifierOneOtherKeyL(const TDesC& aSection, const TInt aAsyncErrorIndex);
+	void			DoCmdTestTwoKeysL(const TDesC& aSection, const TInt aAsyncErrorIndex);
+	void			DoCmdTestMultipleKeysL(const TDesC& aSection, const TInt aAsyncErrorIndex);
+	void			DoCmdVerifyKeypadState(const TDesC& aSection, const TInt aAsyncErrorIndex);
+	void			DoCmdPromptUser(const TDesC& aSection, const TInt aAsyncErrorIndex);
+	void 			DoCancel(CActive* aActive, TInt aIndex); 			// cancel the request
+	void 			RunL(CActive* aActive, TInt aIndex);				// handle completed request
+
+	//utility functions
+ 	void			ProcessResults();
+
+protected:
+	TInt							iKeyboardState;
+	TInt							iKeyboard;
+	TInt							iKeyboardDeviceKeys;
+	TInt							iKeyboardAppKeys;
+	TInt							iKeyboardClick;
+	TInt							iKeyboardClickVolumeMax;
+	TInt							iKeyboardClickState;
+	TInt							iKeyboardClickVolume;
+	CActiveCallback*				iActiveKey;
+	CActiveCallback*				iActiveCombination;
+	CActiveCallbackBase*			iActiveKeypadState;
+	CActiveCallback*				iActivePrompt;
+	TInt							iExpectedState;
+	TInt							iKeyCount;
+	TInt							iCombinationCount;
+	TInt							iCombinationKeyCount;
+	TBool							iFailTest;
+	TPtrC							iUserPromptStr;
+	TPtrC							iPassKeyStr;
+	TInt							iPassKey;
+
+
+private:	
+	RConsole						iConsole;
+	TConsoleKey						iKey;
+	static const TEnumEntryTable	iEnumTableScanCodes[];
+	static const TEnumEntryTable	iEnumTableCoverage[];
+	static const THalTableLookup	iTableLookup[];
+	RArray<TPtrC>					iPossibleScanCodeStrStore;
+	RArray<TInt>					iPossibleScanCodeStore;
+	RArray<TPtrC>					iPossibleModifierStrStore;
+	RArray<TInt>					iPossibleModifierStore;
+	RArray<TPtrC>					iAllPossibleKeysStrStore;
+	RArray<TInt>					iAllPossibleKeysStore;
+	RArray<TIniDataName>			iCombinationStrStore;
+	RArray<TInt>					iExpectedStore;
+	RArray<TInt>					iActualStore;
+	RArray<TInt>					iEventStore;
+	};
+
+#endif /* __T_KEYPAD_DRIVER_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/inc/T_KeypadDriverServer.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_KEYPAD_DRIVER_SERVER_H__)
+#define __T_KEYPAD_DRIVER_SERVER_H__
+
+//	EPOC Includes
+#include <testserver2.h>
+
+// This wrapper class extends the test server and creates test server for keypad driver
+class CT_KeypadDriverServer : public CTestServer2
+	{
+private:
+	class CT_KeypadDriverBlock : public CTestBlockController
+		{
+	public:
+		CDataWrapper*	CreateDataL( const TDesC& aData );
+		};
+
+public:
+	static CT_KeypadDriverServer* NewL();
+
+	inline CTestBlockController*	CreateTestBlock();
+	};
+
+#include "T_KeypadDriverServer.inl"
+
+#endif /* __T_KEYPAD_DRIVER_SERVER_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/inc/T_KeypadDriverServer.inl	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+CTestBlockController* CT_KeypadDriverServer::CreateTestBlock()
+	{
+	return new CT_KeypadDriverBlock();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/pkg/t_keypad.bat	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,17 @@
+@rem
+@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+testexecute z:\base\keypad\BASE-BSP-KEYPAD-DRIVER.script -tcx z:\base\keypad\t_keypad.tcs
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/scripts/BASE-BSP-KEYPAD-DRIVER-AUTOMATED.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,374 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//! @file
+//! @SYMTestSuiteName		BASE-BSP-KEYPAD-DRIVER-AUTOMATED
+//! @SYMScriptDescription	Tests all published elements of the TKeyboardHalFunction class as a means of confidence that the APIs
+//!				work as expected.
+//! @SYMScriptAutomation	The tests are fully automated with Test Driver and TEF.
+//! @SYMScriptTestEnvironment	This test script requires a basic ROM and Text Shell Window Server.
+///////////////////////////////////////////////////////////////////////////////
+
+
+
+LOAD_SUITE	T_Keypad
+DELAY		2000
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0001
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0001
+//! @SYMAPI			HAL::Set(TAttribute, TInt);
+//!				HAL::Get(TAttribute, TInt&);
+//!				TAttribute::EKeyboardState;
+//!				TKeyboardHalFunction::EKeyboardHalKeyboardState;
+//!				TKeyboardHalFunction::EKeyboardHalSetKeyboardState;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Disable the keypad
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Get the default EKeyboardState value and check that it is as expected
+//!				3. Set EKeyboardState 0 (disabled) using HAL:Set.
+//!				4. Get EKeyboardState using HAL::Get, and check that it is 0 (disabled).
+//!				5. Restore EKeyboardState to the default value using HAL:Set.
+//!				6. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Keypad state attribute value is changed to 0 as expected.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_Keypad		\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0001-GetCurrentKeypadState
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0001-SetKeypadState
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0001-GetKeypadState
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0001-RestoreKeypadState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0001
+
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0002
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0002
+//! @SYMAPI			HAL::Set(TAttribute, TInt);
+//!				HAL::Get(TAttribute, TInt&);
+//!				TAttribute::EKeyboardState;
+//!				TKeyboardHalFunction::EKeyboardHalKeyboardState;
+//!				TKeyboardHalFunction::EKeyboardHalSetKeyboardState;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Enable the keypad
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Get the default EKeyboardState value and check that it is as expected
+//!				3. Set EKeyboardState 1 (enabled) using HAL:Set.
+//!				4. Get EKeyboardState using HAL::Get, and check that it is 1 (enabled).
+//!				5. Restore EKeyboardState to the default value using HAL:Set.
+//!				6. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Keypad state attribute value is changed to 1 as expected.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_Keypad		\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0002-GetCurrentKeypadState
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0002-SetKeypadState
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0002-GetKeypadState
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0002-RestoreKeypadState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0002
+
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0003
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0003
+//! @SYMAPI			HAL::Get(TAttribute, TInt&);
+//!				TAttribute::EKeyboard;
+//!				TAttribute::EKeyboardDeviceKeys;
+//!				TAttribute::EKeyboardAppKeys;
+//!				TKeyboardHalFunction::EKeyboardHalKeyboardInfo;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Keypad Info Test - Get information about the keypad (can be different on different hardware;
+//!				specified in t_keypad.ini).
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Get the keypad type using HAL::Get, and check it against expected value.
+//!				3. Get the number of device keys using HAL::Get, and check it against expected value.
+//!				4. Get the number of application keys using HAL::Get, and check it against expected value.
+//!				5. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Keypad information is returned successfully.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_Keypad		\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0003-GetKeypadType
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0003-GetKeypadDeviceKeys
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0003-GetKeypadAppKeys
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0003
+
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0004
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0004
+//! @SYMAPI			HAL::Set(TAttribute, TInt);
+//!				HAL::Get(TAttribute, TInt&);
+//!				TAttribute::EKeyboardClickState;
+//!				TSoundHalFunction::ESoundHalSetKeyClickEnabled;
+//!				TSoundHalFunction::ESoundHalKeyClickEnabled;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Disable Keypad Click State - Change the value of the Keypad click state attribute (EKeyboardClickState)
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Get the current EKeyboardClickState value and check that it is the default value
+//!				3. Set EKeyboardClickState 0 (disabled) using HAL:Set.
+//!				4. Get EKeyboardClickState using HAL::Get, and check that it is 0 (disabled).
+//!				5. Restore EKeyboardClickState to the default value using HAL:Set.
+//!				6. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Keypad click state attribute value is changed to 0 as expected.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_Keypad		\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0004-GetCurrentKeypadClickState
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0004-SetKeypadClickState
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0004-GetKeypadClickState
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0004-RestoreKeypadClickState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0004
+
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0005
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0005
+//! @SYMAPI			HAL::Set(TAttribute, TInt);
+//!				HAL::Get(TAttribute, TInt&);
+//!				TAttribute::EKeyboardClickState;
+//!				TSoundHalFunction::ESoundHalSetKeyClickEnabled;
+//!				TSoundHalFunction::ESoundHalKeyClickEnabled;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Enable Keypad Click State - Change the value of the Keypad click state attribute (EKeyboardClickState)
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Get the current EKeyboardClickState value and check that it is the default value
+//!				3. Set EKeyboardClickState 1 (enabled) using HAL:Set.
+//!				4. Get EKeyboardClickState using HAL::Get, and check that it is 1 (enabled).
+//!				5. Restore EKeyboardClickState to the default value using HAL:Set.
+//!				6. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Keypad click state attribute value is changed to 1 as expected.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_Keypad		\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0005-GetCurrentKeypadClickState
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0005-SetKeypadClickState
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0005-GetKeypadClickState
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0005-RestoreKeypadClickState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0005
+
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0006
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0006
+//! @SYMAPI			HAL::Set(TAttribute, TInt);
+//!				HAL::Get(TAttribute, TInt&);
+//!				TAttribute::EKeyboardClick;
+//!				TSoundHalFunction::ESoundHalSetKeyClickEnabled;
+//!				TSoundHalFunction::ESoundHalKeyClickEnabled;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Check that the value of the Keypad click indicator attribute (EKeyboardClick) is disabled.
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Get the current EKeyboardClickState value and check that it is the default value
+//!				3. Set EKeyboardClickState 0 (disabled) using HAL:Set.
+//!				4. Get EKeyboardClick using HAL::Get, and check that it is 0
+//!				5. Restore EKeyboardClickState to the default value using HAL:Set.
+//!				6. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Keypad click indicator value is 0 as expected.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_Keypad		\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0006-GetCurrentKeypadClickState
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0006-SetKeypadClickState
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0006-GetKeypadClick
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0006-RestoreKeypadClickState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0006
+
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0007
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0007
+//! @SYMAPI			HAL::Set(TAttribute, TInt);
+//!				HAL::Get(TAttribute, TInt&);
+//!				TAttribute::EKeyboardClick;
+//!				TSoundHalFunction::ESoundHalSetKeyClickEnabled;
+//!				TSoundHalFunction::ESoundHalKeyClickEnabled;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Check the value of the Keypad click indicator attribute (EKeyboardClick) is enabled.
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Get the current EKeyboardClickState value and check that it is the default value
+//!				3. Set EKeyboardClickState 1 (enabled) using HAL:Set.
+//!				4. Get EKeyboardClick using HAL::Get, and check that it is 1
+//!				5. Restore EKeyboardClickState to the default value using HAL:Set.
+//!				6. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Keypad click indicator value is 1 as expected.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_Keypad		\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0007-GetCurrentKeypadClickState
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0007-SetKeypadClickState
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0007-GetKeypadClick
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0007-RestoreKeypadClickState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0007
+
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0008
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0008
+//! @SYMAPI			HAL::Get(TAttribute, TInt&);
+//!				TAttribute::EKeyboardClickVolumeMax;
+//!				TSoundHalFunction::ESoundHalKeyClickVolumeMax;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Keypad Click Max Volume Test - Gets the keypad click max volume level (EKeyboardClickVolumeMax
+//!				attribute) value (can be different on different hardware; specified in t_keypad.ini).
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Get EKeyboardClickVolumeMax value using using HAL::Get, and check it against expected value.
+//!				3. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Keypad click max volume level value is returned successfully.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_Keypad		\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0008-GetKeypadClickVolumeMax
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0008
+
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009
+//! @SYMAPI			HAL::Set(TAttribute, TInt);
+//!				HAL::Get(TAttribute, TInt&);
+//!				TAttribute::EKeyboardClickVolume;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Keypad Click Volume Test - Sets different volume levels for keypad click (EKeyboardClickVolume
+//!				attribute) and validates them (max volume level can be different on different hardware;
+//!				specified in t_keypad.ini).
+//! @SYMTestActions		1.  Create Hal Handle object.
+//!				2.  Get the current EKeyboardClickState value and check that it is the default value
+//!				3.  Set EKeyboardClickState 1 (enabled) using HAL:Set.
+//!				4.  Get EKeyboardClickState using HAL::Get, and check that it is 1 (enabled).
+//!				5.  Get the current EKeyboardClickVolume value using HAL::Get.
+//!				6.  Get EKeyboardClickVolumeMax value using using HAL::Get, and check it against expected value.
+//!				7.  Set EKeyboardClickVolume to 0 using HAL::Set.
+//!				8.  Get EKeyboardClickVolume using HAL::Get and verify it against expected value
+//!				9.  Set EKeyboardClickVolume between 0 and max volume level using HAL::Set.
+//!				10. Get EKeyboardClickVolume using HAL::Get and verify it against expected value
+//!				11. Set EKeyboardClickVolume to max volume level using HAL::Set.
+//!				12. Get EKeyboardClickVolume using HAL::Get and verify it against expected value
+//!				13. Restore the initial EKeyboardClickVolume value using HAL::Set.
+//!				14. Restore EKeyboardClickState to the default value using HAL:Set.
+//!				15. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Keypad click volume level is set and verified successfully.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_Keypad		\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-GetCurrentKeypadClickState
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-SetKeypadClickState
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-GetKeypadClickState
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-GetCurrentKeypadClickVolume
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-GetKeypadClickVolumeMax
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-SetKeypadClickVolume0
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-GetKeypadClickVolume0
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-SetKeypadClickVolumeAvg
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-GetKeypadClickVolumeAvg
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-SetKeypadClickVolumeMaxValue
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-GetKeypadClickVolumeMaxValue
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-RestoreKeypadClickVolume
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-RestoreKeypadClickState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009
+
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0010
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0010
+//! @SYMAPI			HAL::Set(TAttribute, TInt);
+//!				HAL::Get(TAttribute, TInt&);
+//!				TAttribute::EKeyboardClickVolume;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Keypad Click Volume Negative Test - Sets -1 as volume level for keypad click (EKeyboardClickVolume
+//!				attribute)
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Get the current EKeyboardClickState value and check that it is the default value
+//!				3. Set EKeyboardClickState 1 (enabled) using HAL:Set.
+//!				4. Get EKeyboardClickState using HAL::Get, and check that it is 1 (enabled).
+//!				5. Set EKeyboardClickVolume to -1 using HAL::Set.
+//!				6. Restore EKeyboardClickState to the default value using HAL:Set.
+//!				7. Get EKeyboardClickState using HAL::Get, and check that it is the default value as expected.
+//!				8. Destroy all objects.
+//! @SYMTestStatus		Not implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	HAL::Set() returns KErrArgument.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_Keypad	\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT		Keypad		keypad1
+		COMMAND			keypad1		Get		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0010-GetCurrentKeypadClickState
+		COMMAND			keypad1		Set		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0010-SetKeypadClickState
+		COMMAND			keypad1		Get		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0010-GetKeypadClickState
+		COMMAND	!Error=-6	keypad1		Set		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0010-SetKeypadClickVolumeMinus1
+		COMMAND			keypad1		Set		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0010-RestoreKeypadClickState
+		COMMAND			keypad1		Get		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0010-GetRestoredKeypadClickState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0010
+
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011
+//! @SYMAPI			HAL::Set(TAttribute, TInt);
+//!				HAL::Get(TAttribute, TInt&);
+//!				TAttribute::EKeyboardClickVolume;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Keypad Click Volume Negative Test - Sets volume level for keypad click (EKeyboardClickVolume
+//!				attribute) more than the max volume (EKeyboardClickVolumeMax attribute).
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Get the current EKeyboardClickState value and check that it is the default value
+//!				3. Set EKeyboardClickState 1 (enabled) using HAL:Set.
+//!				4. Get EKeyboardClickState using HAL::Get, and check that it is 1 (enabled).
+//!				5. Get EKeyboardClickVolumeMax value using using HAL::Get, and check it against expected value.
+//!				6. Set EKeyboardClickVolume to more than max volume using HAL::Set.
+//!				7. Restore EKeyboardClickState to the default value using HAL:Set.
+//!				8. Get EKeyboardClickState using HAL::Get, and check that it is the default value as expected.
+//!				9. Destroy all objects.
+//! @SYMTestStatus		Not implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	HAL::Set() returns KErrArgument.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_Keypad	\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT		Keypad		keypad1
+		COMMAND			keypad1		Get		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011-GetCurrentKeypadClickState
+		COMMAND			keypad1		Set		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011-SetKeypadClickState
+		COMMAND			keypad1		Get		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011-GetKeypadClickState
+		COMMAND			keypad1		Get		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011-GetKeypadClickVolumeMax
+		COMMAND	!Error=-6	keypad1		Set		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011-SetKeypadClickVolumeMoreThanMax
+		COMMAND			keypad1		Set		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011-RestoreKeypadClickState
+		COMMAND			keypad1		Get		BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011-GetRestoredKeypadClickState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/scripts/BASE-BSP-KEYPAD-DRIVER-MANUAL.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,339 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//! @file
+//! @SYMTestSuiteName		BASE-BSP-KEYPAD-DRIVER-MANUAL
+//! @SYMScriptDescription	Tests that all keys on the keypad are working as expected.
+//! @SYMScriptAutomation	These are all manual tests requiring user intervention.
+//! @SYMScriptTestEnvironment	This test script requires a basic ROM and Text Shell Window Server.
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+LOAD_SUITE	T_Keypad
+DELAY		2000
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0001
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-MANUAL-0001
+//! @SYMAPI			RConsole::Read(TConsoleKey &aKeystroke,TRequestStatus &aStatus);
+//!				TConsoleKey::Code();
+//!				TRawEvent::EKeyDown;
+//!				TRawEvent::EKeyUp;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Keypad Layout Test - Tests all keys and modifiers, one by one. The user is prompted
+//!				to press keys and the results are verified against expected values.
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Verify using RConsole::Read and TConsoleKey::Code() that all the keys on the keypad work as expected.
+//!				3. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The keyboard layout verification is completed successfully.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000		T_Keypad			\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		GetScanCodes			keys
+		COMMAND		keypad1		GetModifiers			modifiers
+		COMMAND		keypad1		TestAllKeys
+		OUTSTANDING
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0001
+
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0002
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-MANUAL-0002
+//! @SYMAPI			RConsole::Read(TConsoleKey &aKeystroke,TRequestStatus &aStatus);
+//!				TConsoleKey::Code();
+//!				TRawEvent::EKeyDown;
+//!				TRawEvent::EKeyUp;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Keypad Layout Test - Tests one modifier + one key combinations. The number of keys tested with all modifiers
+//!				depends on "test_coverage" value in global INI (Very Low, Low, Medium, Full). The user is prompted to press keys and the
+//!				results are verified against expected values.
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Verify using RConsole::Read and TConsoleKey::Code() that all the keys on the keypad work as expected.
+//!				3. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The keyboard layout verification is completed successfully.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000		T_Keypad			\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		GetScanCodes			keys
+		COMMAND		keypad1		GetModifiers			modifiers
+		COMMAND		keypad1		TestOneModifierOneOtherKey	test_coverage
+		OUTSTANDING
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0002
+
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0003
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-MANUAL-0003
+//! @SYMAPI			RConsole::Read(TConsoleKey &aKeystroke,TRequestStatus &aStatus);
+//!				TConsoleKey::Code();
+//!				TRawEvent::EKeyDown;
+//!				TRawEvent::EKeyUp;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Keypad Layout Test - Tests two key (not modifier) combinations. The number of keys tested with eachother
+//!				depends on "test_coverage" value in global INI (Very Low, Low, Medium, Full). The user is prompted to press keys and the
+//!				results are verified against expected values.
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Verify using RConsole::Read and TConsoleKey::Code() that all the keys on the keypad work as expected.
+//!				3. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The keyboard layout verification is completed successfully.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000		T_Keypad			\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		GetScanCodes			keys
+		COMMAND		keypad1		GetModifiers			modifiers
+		COMMAND		keypad1		TestTwoKeys			test_coverage
+		OUTSTANDING
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0003
+
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0004
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-MANUAL-0004
+//! @SYMAPI			RConsole::Read(TConsoleKey &aKeystroke,TRequestStatus &aStatus);
+//!				TConsoleKey::Code();
+//!				TRawEvent::EKeyDown;
+//!				TRawEvent::EKeyUp;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Keypad Layout Test - Tests multiple key combinations. Each combination is listed separately in the global INI
+//!				file. The user is prompted to press keys and the results are verified against expected values.
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Verify using RConsole::Read and TConsoleKey::Code() that all the keys on the keypad work as expected.
+//!				3. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The keyboard layout verification is completed successfully.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000		T_Keypad			\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		GetScanCodes			keys
+		COMMAND		keypad1		GetModifiers			modifiers
+		COMMAND		keypad1		TestMultipleKeys		multiple_key_sets
+		OUTSTANDING
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0004
+
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0005
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-MANUAL-0005
+//! @SYMAPI			HAL::Set(TAttribute, TInt);
+//!				HAL::Get(TAttribute, TInt&);
+//!				TAttribute::EKeyboardClickState;
+//!				TSoundHalFunction::ESoundHalSetKeyClickEnabled;
+//!				TSoundHalFunction::ESoundHalKeyClickEnabled;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		User confirmation of disabled Keypad Click State
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Get the current EKeyboardClickState value and check that it is the default value
+//!				3. Set EKeyboardClickState 0 (disabled) using HAL:Set.
+//!				4. Get EKeyboardClickState using HAL::Get, and check that it is 0 (disabled).
+//!				5. Verify manually that there is no key click
+//!				6. Restore EKeyboardClickState to the default value using HAL:Set.
+//!				7. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Keypad click state attribute value is changed to 0 as expected.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_Keypad		\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-MANUAL-0005-GetCurrentKeypadClickState
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-MANUAL-0005-SetKeypadClickState
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-MANUAL-0005-GetKeypadClickState
+		COMMAND		keypad1		PromptUser		BASE-BSP-KEYPAD-DRIVER-MANUAL-0005-VerifyKeypadClickStateDisabledWarning
+		OUTSTANDING
+		COMMAND		keypad1		PromptUser		BASE-BSP-KEYPAD-DRIVER-MANUAL-0005-VerifyKeypadClickStateDisabled
+		OUTSTANDING
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-MANUAL-0005-RestoreKeypadClickState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0005
+
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0006
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-MANUAL-0006
+//! @SYMAPI			HAL::Set(TAttribute, TInt);
+//!				HAL::Get(TAttribute, TInt&);
+//!				TAttribute::EKeyboardClickState;
+//!				TSoundHalFunction::ESoundHalSetKeyClickEnabled;
+//!				TSoundHalFunction::ESoundHalKeyClickEnabled;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		User confirmation of enabled Keypad Click State
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Get the current EKeyboardClickState value and check that it is the default value
+//!				3. Set EKeyboardClickState 1 (enabled) using HAL:Set.
+//!				4. Get EKeyboardClickState using HAL::Get, and check that it is 1 (enabled).
+//!				5. Verify manually that there is a key click present
+//!				6. Restore EKeyboardClickState to the default value using HAL:Set.
+//!				7. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Keypad click state attribute value is changed to 1 as expected.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_Keypad		\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-MANUAL-0006-GetCurrentKeypadClickState
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-MANUAL-0006-SetKeypadClickState
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-MANUAL-0006-GetKeypadClickState
+		COMMAND		keypad1		PromptUser		BASE-BSP-KEYPAD-DRIVER-MANUAL-0006-VerifyKeypadClickStateEnabledWarning
+		OUTSTANDING
+		COMMAND		keypad1		PromptUser		BASE-BSP-KEYPAD-DRIVER-MANUAL-0006-VerifyKeypadClickStateEnabled
+		OUTSTANDING
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-MANUAL-0006-RestoreKeypadClickState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0006
+
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0007
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-MANUAL-0007
+//! @SYMAPI			HAL::Set(TAttribute, TInt);
+//!				HAL::Get(TAttribute, TInt&);
+//!				TAttribute::EKeyboardClickVolume;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Keypad Click Volume Test - Sets different volume levels for keypad click (EKeyboardClickVolume
+//!				attribute) and validates them (max volume level can be different on different hardware;
+//!				specified in t_keypad.ini).
+//! @SYMTestActions		1.  Create Hal Handle object.
+//!				2.  Get the current EKeyboardClickState value and check that it is the default value
+//!				3.  Set EKeyboardClickState 1 (enabled) using HAL:Set.
+//!				4.  Get EKeyboardClickState using HAL::Get, and check that it is 1 (enabled).
+//!				5.  Get the current EKeyboardClickVolume value using HAL::Get.
+//!				6.  Get EKeyboardClickVolumeMax value using using HAL::Get, and check it against expected value.
+//!				7.  Set EKeyboardClickVolume to 0 using HAL::Set.
+//!				8.  Get EKeyboardClickVolume using HAL::Get and verify it against expected value
+//!				9.  Verify manually the click volume change (optional; only when running manual tests).
+//!				10. Set EKeyboardClickVolume between 0 and max volume level using HAL::Set.
+//!				11. Get EKeyboardClickVolume using HAL::Get and verify it against expected value
+//!				12. Verify manually the click volume change (optional; only when running manual tests).
+//!				13. Set EKeyboardClickVolume to max volume level using HAL::Set.
+//!				14. Get EKeyboardClickVolume using HAL::Get and verify it against expected value
+//!				15. Verify manually the click volume change (optional; only when running manual tests).
+//!				16. Restore the initial EKeyboardClickVolume value using HAL::Set.
+//!				17. Get EKeyboardClickVolume using HAL::Get and verify it against expected value (initial value).
+//!				18. Verify manually the click volume change (optional; only when running manual tests).
+//!				19. Restore EKeyboardClickState to the default value using HAL:Set.
+//!				20. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Keypad click volume level is set and verified successfully.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_Keypad		\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-GetCurrentKeypadClickState
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-SetKeypadClickState
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-GetKeypadClickState
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-GetCurrentKeypadClickVolume
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-GetKeypadClickVolumeMax
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-SetKeypadClickVolume0
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-GetKeypadClickVolume0
+		COMMAND		keypad1		PromptUser		BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-VerifyKeypadClickVolume0Warning
+		OUTSTANDING
+		COMMAND		keypad1		PromptUser		BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-VerifyKeypadClickVolume0
+		OUTSTANDING
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-SetKeypadClickVolumeAvg
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-GetKeypadClickVolumeAvg
+		COMMAND		keypad1		PromptUser		BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-VerifyKeypadClickVolumeAvgWarning
+		OUTSTANDING
+		COMMAND		keypad1		PromptUser		BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-VerifyKeypadClickVolumeAvg
+		OUTSTANDING
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-SetKeypadClickVolumeMaxValue
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-GetKeypadClickVolumeMaxValue
+		COMMAND		keypad1		PromptUser		BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-VerifyKeypadClickVolumeMaxValueWarning
+		OUTSTANDING
+		COMMAND		keypad1		PromptUser		BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-VerifyKeypadClickVolumeMaxValue
+		OUTSTANDING
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-RestoreKeypadClickVolume
+		COMMAND		keypad1		PromptUser		BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-VerifyRestoredKeypadClickVolumeWarning
+		OUTSTANDING
+		COMMAND		keypad1		PromptUser		BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-VerifyRestoredKeypadClickVolume
+		OUTSTANDING
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-RestoreKeypadClickState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0007
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0008
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-MANUAL-0008
+//! @SYMAPI			HAL::Set(TAttribute, TInt);
+//!				HAL::Get(TAttribute, TInt&);
+//!				TAttribute::EKeyboardState;
+//!				TKeyboardHalFunction::EKeyboardHalKeyboardState;
+//!				TKeyboardHalFunction::EKeyboardHalSetKeyboardState;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Disable the keypad requesting user to use the keypad
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Get the default EKeyboardState value and check that it is as expected
+//!				3. Set EKeyboardState 0 (disabled) using HAL:Set.
+//!				4. Get EKeyboardState using HAL::Get, and check that it is 0 (disabled).
+//!				5. Verify manually that the keypad is disabled (optional; only when running manual tests).
+//!				6. Restore EKeyboardState to the default value using HAL:Set.
+//!				7. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Keypad state attribute value is changed to 0 as expected.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_Keypad		\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-MANUAL-0008-GetCurrentKeypadState
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-MANUAL-0008-SetKeypadState
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-MANUAL-0008-GetKeypadState
+		COMMAND		keypad1		VerifyKeypadState	BASE-BSP-KEYPAD-DRIVER-MANUAL-0008-VerifyKeypadStateDisabled
+		OUTSTANDING
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-MANUAL-0008-RestoreKeypadState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0008
+
+
+START_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0009
+//! @SYMTestCaseID		BASE-BSP-KEYPAD-DRIVER-MANUAL-0009
+//! @SYMAPI			HAL::Set(TAttribute, TInt);
+//!				HAL::Get(TAttribute, TInt&);
+//!				TAttribute::EKeyboardState;
+//!				TKeyboardHalFunction::EKeyboardHalKeyboardState;
+//!				TKeyboardHalFunction::EKeyboardHalSetKeyboardState;
+//! @SYMAuthor			Runno Sgirka
+//! @SYMCreationDate		16/07/2008
+//! @SYMTestCaseDesc		Enable the keypad requesting user to use the keypad
+//! @SYMTestActions		1. Create Hal Handle object.
+//!				2. Get the default EKeyboardState value and check that it is as expected
+//!				3. Set EKeyboardState 1 (enabled) using HAL:Set.
+//!				4. Get EKeyboardState using HAL::Get, and check that it is 1 (enabled).
+//!				5. Verify manually that the keypad is enabled (optional; only when running manual tests).
+//!				6. Restore EKeyboardState to the default value using HAL:Set.
+//!				7. Destroy all objects.
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Keypad state attribute value is changed to 1 as expected.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_Keypad		\base\keypad\BASE-BSP-KEYPAD-DRIVER.ini
+		CREATE_OBJECT	Keypad		keypad1
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-MANUAL-0009-GetCurrentKeypadState
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-MANUAL-0009-SetKeypadState
+		COMMAND		keypad1		Get			BASE-BSP-KEYPAD-DRIVER-MANUAL-0009-GetKeypadState
+		COMMAND		keypad1		VerifyKeypadState	BASE-BSP-KEYPAD-DRIVER-MANUAL-0009-VerifyKeypadStateEnabled
+		OUTSTANDING
+		COMMAND		keypad1		Set			BASE-BSP-KEYPAD-DRIVER-MANUAL-0009-RestoreKeypadState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-KEYPAD-DRIVER-MANUAL-0009
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/scripts/BASE-BSP-KEYPAD-DRIVER.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,33 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//! @file
+//! @SYMTestSuiteName  BASE-BSP-KEYPAD
+//! @SYMScriptTestEnvironment This test script requires a base rom image
+
+/////////////////////////////////////////////////////////////////////
+// BASE-BSP-KEYPAD-DRIVER.script
+//
+//
+// Tests all the APIs of the keypad driver test suite
+// as a means of confidence that the APIs work as expected.
+// All test cases will keep the keypad state and 
+// restore that to initial state when test case finished
+// Platform dependent configuration is picked up from the global environment files
+//
+/////////////////////////////////////////////////////////////////////
+
+RUN_SCRIPT	z:\base\keypad\base-bsp-keypad-driver-automated.script
+RUN_SCRIPT	z:\base\keypad\base-bsp-keypad-driver-manual.script
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/src/T_KeypadDriverData.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1586 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_KeypadDriverData.h"
+
+_LIT(KEnumNull,						" ");
+_LIT(KGetScanCodes,					"GetScanCodes");
+_LIT(KGetModifiers,					"GetModifiers");
+_LIT(KTestAllKeys,					"TestAllKeys");
+_LIT(KTestOneModifierOneOtherKey,	"TestOneModifierOneOtherKey");
+_LIT(KTestTwoKeys,					"TestTwoKeys");
+_LIT(KTestMultipleKeys,				"TestMultipleKeys");
+_LIT(KVerifyKeypadState,			"VerifyKeypadState");
+_LIT(KPromptUser,					"PromptUser");
+_LIT(KSet,							"set%d");
+_LIT(KScanCodeString,				"scancode_string%d");
+_LIT(KScanCode,						"scancode%d");
+_LIT(KModifierString,				"modifier_string%d");
+_LIT(KModifier,						"modifier%d");
+_LIT(KTestCoverage,					"test_coverage");
+_LIT(KFailTest,						"fail_test");
+_LIT(KPassKeyStr,					"pass_key_str");
+_LIT(KPassKey,						"pass_key");
+_LIT(KExpectedState,				"expected_state");
+_LIT(KTimeOut,						"timeout");
+_LIT(KUserPrompt,					"user_prompt");
+_LIT(KConsoleName,					"Console_Window");
+_LIT(KMaximized,					"+M");
+_LIT(KRawEventMode,					"+R");
+_LIT(KRawEventModeOff,				"-R");
+
+_LIT(KLogMissingParameter,			"Missing parameter '%S'");
+/*@}*/
+
+// Scancodes
+_LIT(KStdKeyNumber0,				"'0'");
+_LIT(KStdKeyNumber1,				"'1'");
+_LIT(KStdKeyNumber2,				"'2'");
+_LIT(KStdKeyNumber3,				"'3'");
+_LIT(KStdKeyNumber4,				"'4'");
+_LIT(KStdKeyNumber5,				"'5'");
+_LIT(KStdKeyNumber6,				"'6'");
+_LIT(KStdKeyNumber7,				"'7'");
+_LIT(KStdKeyNumber8,				"'8'");
+_LIT(KStdKeyNumber9,				"'9'");
+_LIT(KStdKeyLetterA,				"'A'");
+_LIT(KStdKeyLetterB,				"'B'");
+_LIT(KStdKeyLetterC,				"'C'");
+_LIT(KStdKeyLetterD,				"'D'");
+_LIT(KStdKeyLetterE,				"'E'");
+_LIT(KStdKeyLetterF,				"'F'");
+_LIT(KStdKeyLetterG,				"'G'");
+_LIT(KStdKeyLetterH,				"'H'");
+_LIT(KStdKeyLetterI,				"'I'");
+_LIT(KStdKeyLetterJ,				"'J'");
+_LIT(KStdKeyLetterK,				"'K'");
+_LIT(KStdKeyLetterL,				"'L'");
+_LIT(KStdKeyLetterM,				"'M'");
+_LIT(KStdKeyLetterN,				"'N'");
+_LIT(KStdKeyLetterO,				"'O'");
+_LIT(KStdKeyLetterP,				"'P'");
+_LIT(KStdKeyLetterQ,				"'Q'");
+_LIT(KStdKeyLetterR,				"'R'");
+_LIT(KStdKeyLetterS,				"'S'");
+_LIT(KStdKeyLetterT,				"'T'");
+_LIT(KStdKeyLetterU,				"'U'");
+_LIT(KStdKeyLetterV,				"'V'");
+_LIT(KStdKeyLetterW,				"'W'");
+_LIT(KStdKeyLetterX,				"'X'");
+_LIT(KStdKeyLetterY,				"'Y'");
+_LIT(KStdKeyLetterZ,				"'Z'");
+_LIT(KStdKeyAsterisk,				"'*'");
+_LIT(KStdKeyNull,					"EStdKeyNull");
+_LIT(KStdKeyBackspace,				"EStdKeyBackspace");
+_LIT(KStdKeyTab,					"EStdKeyTab");
+_LIT(KStdKeyEnter,					"EStdKeyEnter");
+_LIT(KStdKeyEscape,					"EStdKeyEscape");
+_LIT(KStdKeySpace,					"EStdKeySpace");
+_LIT(KStdKeyPrintScreen,			"EStdKeyPrintScreen");
+_LIT(KStdKeyPause,					"EStdKeyPause");
+_LIT(KStdKeyHome,					"EStdKeyHome");
+_LIT(KStdKeyEnd,					"EStdKeyEnd");
+_LIT(KStdKeyPageUp,					"EStdKeyPageUp");
+_LIT(KStdKeyPageDown,				"EStdKeyPageDown");
+_LIT(KStdKeyInsert,					"EStdKeyInsert");
+_LIT(KStdKeyDelete,					"EStdKeyDelete");
+_LIT(KStdKeyLeftArrow,				"EStdKeyLeftArrow");
+_LIT(KStdKeyRightArrow,				"EStdKeyRightArrow");
+_LIT(KStdKeyUpArrow,				"EStdKeyUpArrow");
+_LIT(KStdKeyDownArrow,				"EStdKeyDownArrow");
+_LIT(KStdKeyLeftShift,				"EStdKeyLeftShift");
+_LIT(KStdKeyRightShift,				"EStdKeyRightShift");
+_LIT(KStdKeyLeftAlt,				"EStdKeyLeftAlt");
+_LIT(KStdKeyRightAlt,				"EStdKeyRightAlt");
+_LIT(KStdKeyLeftCtrl,				"EStdKeyLeftCtrl");
+_LIT(KStdKeyRightCtrl,				"EStdKeyRightCtrl");
+_LIT(KStdKeyLeftFunc,				"EStdKeyLeftFunc");
+_LIT(KStdKeyRightFunc,				"EStdKeyRightFunc");
+_LIT(KStdKeyCapsLock,				"EStdKeyCapsLock");
+_LIT(KStdKeyNumLock,				"EStdKeyNumLock");
+_LIT(KStdKeyScrollLock,				"EStdKeyScrollLock");
+_LIT(KStdKeyF1,						"EStdKeyF1");
+_LIT(KStdKeyF2,						"EStdKeyF2");
+_LIT(KStdKeyF3,						"EStdKeyF3");
+_LIT(KStdKeyF4,						"EStdKeyF4");
+_LIT(KStdKeyF5,						"EStdKeyF5");
+_LIT(KStdKeyF6,						"EStdKeyF6");
+_LIT(KStdKeyF7,						"EStdKeyF7");
+_LIT(KStdKeyF8,						"EStdKeyF8");
+_LIT(KStdKeyF9,						"EStdKeyF9");
+_LIT(KStdKeyF10,					"EStdKeyF10");
+_LIT(KStdKeyF11,					"EStdKeyF11");
+_LIT(KStdKeyF12,					"EStdKeyF12");
+_LIT(KStdKeyF13,					"EStdKeyF13");
+_LIT(KStdKeyF14,					"EStdKeyF14");
+_LIT(KStdKeyF15,					"EStdKeyF15");
+_LIT(KStdKeyF16,					"EStdKeyF16");
+_LIT(KStdKeyF17,					"EStdKeyF17");
+_LIT(KStdKeyF18,					"EStdKeyF18");
+_LIT(KStdKeyF19,					"EStdKeyF19");
+_LIT(KStdKeyF20,					"EStdKeyF20");
+_LIT(KStdKeyF21,					"EStdKeyF21");
+_LIT(KStdKeyF22,					"EStdKeyF22");
+_LIT(KStdKeyF23,					"EStdKeyF23");
+_LIT(KStdKeyF24,					"EStdKeyF24");
+_LIT(KStdKeyXXX,					"EStdKeyXXX");
+_LIT(KStdKeyComma,					"EStdKeyComma");
+_LIT(KStdKeyFullStop,				"EStdKeyFullStop");
+_LIT(KStdKeyForwardSlash,			"EStdKeyForwardSlash");
+_LIT(KStdKeyBackSlash,				"EStdKeyBackSlash");
+_LIT(KStdKeySemiColon,				"EStdKeySemiColon");
+_LIT(KStdKeySingleQuote,			"EStdKeySingleQuote");
+_LIT(KStdKeyHash,					"EStdKeyHash");
+_LIT(KStdKeySquareBracketLeft,		"EStdKeySquareBracketLeft");
+_LIT(KStdKeySquareBracketRight,		"EStdKeySquareBracketRight");
+_LIT(KStdKeyMinus,					"EStdKeyMinus");
+_LIT(KStdKeyEquals,					"EStdKeyEquals");
+_LIT(KStdKeyNkpForwardSlash,		"EStdKeyNkpForwardSlash");
+_LIT(KStdKeyNkpAsterisk,			"EStdKeyNkpAsterisk");
+_LIT(KStdKeyNkpMinus,				"EStdKeyNkpMinus");
+_LIT(KStdKeyNkpPlus,				"EStdKeyNkpPlus");
+_LIT(KStdKeyNkpEnter,				"EStdKeyNkpEnter");
+_LIT(KStdKeyNkp1,					"EStdKeyNkp1");
+_LIT(KStdKeyNkp2,					"EStdKeyNkp2");
+_LIT(KStdKeyNkp3,					"EStdKeyNkp3");
+_LIT(KStdKeyNkp4,					"EStdKeyNkp4");
+_LIT(KStdKeyNkp5,					"EStdKeyNkp5");
+_LIT(KStdKeyNkp6,					"EStdKeyNkp6");
+_LIT(KStdKeyNkp7,					"EStdKeyNkp7");
+_LIT(KStdKeyNkp8,					"EStdKeyNkp8");
+_LIT(KStdKeyNkp9,					"EStdKeyNkp9");
+_LIT(KStdKeyNkp0,					"EStdKeyNkp0");
+_LIT(KStdKeyNkpFullStop,			"EStdKeyNkpFullStop");
+_LIT(KStdKeyMenu,					"EStdKeyMenu");
+_LIT(KStdKeyBacklightOn,			"EStdKeyBacklightOn");
+_LIT(KStdKeyBacklightOff,			"EStdKeyBacklightOff");
+_LIT(KStdKeyBacklightToggle,		"EStdKeyBacklightToggle");
+_LIT(KStdKeyIncContrast,			"EStdKeyIncContrast");
+_LIT(KStdKeyDecContrast,			"EStdKeyDecContrast");
+_LIT(KStdKeySliderDown,				"EStdKeySliderDown");
+_LIT(KStdKeySliderUp,				"EStdKeySliderUp");
+_LIT(KStdKeyDictaphonePlay,			"EStdKeyDictaphonePlay");
+_LIT(KStdKeyDictaphoneStop,			"EStdKeyDictaphoneStop");
+_LIT(KStdKeyDictaphoneRecord,		"EStdKeyDictaphoneRecord");
+_LIT(KStdKeyHelp,					"EStdKeyHelp");
+_LIT(KStdKeyOff,					"EStdKeyOff");
+_LIT(KStdKeyDial,					"EStdKeyDial");
+_LIT(KStdKeyIncVolume,				"EStdKeyIncVolume");
+_LIT(KStdKeyDecVolume,				"EStdKeyDecVolume");
+_LIT(KStdKeyDevice0,				"EStdKeyDevice0");
+_LIT(KStdKeyDevice1,				"EStdKeyDevice1");
+_LIT(KStdKeyDevice2,				"EStdKeyDevice2");
+_LIT(KStdKeyDevice3,				"EStdKeyDevice3");
+_LIT(KStdKeyDevice4,				"EStdKeyDevice4");
+_LIT(KStdKeyDevice5,				"EStdKeyDevice5");
+_LIT(KStdKeyDevice6,				"EStdKeyDevice6");
+_LIT(KStdKeyDevice7,				"EStdKeyDevice7");
+_LIT(KStdKeyDevice8,				"EStdKeyDevice8");
+_LIT(KStdKeyDevice9,				"EStdKeyDevice9");
+_LIT(KStdKeyDeviceA,				"EStdKeyDeviceA");
+_LIT(KStdKeyDeviceB,				"EStdKeyDeviceB");
+_LIT(KStdKeyDeviceC,				"EStdKeyDeviceC");
+_LIT(KStdKeyDeviceD,				"EStdKeyDeviceD");
+_LIT(KStdKeyDeviceE,				"EStdKeyDeviceE");
+_LIT(KStdKeyDeviceF,				"EStdKeyDeviceF");
+_LIT(KStdKeyApplication0,			"EStdKeyApplication0");
+_LIT(KStdKeyApplication1,			"EStdKeyApplication1");
+_LIT(KStdKeyApplication2,			"EStdKeyApplication2");
+_LIT(KStdKeyApplication3,			"EStdKeyApplication3");
+_LIT(KStdKeyApplication4,			"EStdKeyApplication4");
+_LIT(KStdKeyApplication5,			"EStdKeyApplication5");
+_LIT(KStdKeyApplication6,			"EStdKeyApplication6");
+_LIT(KStdKeyApplication7,			"EStdKeyApplication7");
+_LIT(KStdKeyApplication8,			"EStdKeyApplication8");
+_LIT(KStdKeyApplication9,			"EStdKeyApplication9");
+_LIT(KStdKeyApplicationA,			"EStdKeyApplicationA");
+_LIT(KStdKeyApplicationB,			"EStdKeyApplicationB");
+_LIT(KStdKeyApplicationC,			"EStdKeyApplicationC");
+_LIT(KStdKeyApplicationD,			"EStdKeyApplicationD");
+_LIT(KStdKeyApplicationE,			"EStdKeyApplicationE");
+_LIT(KStdKeyApplicationF,			"EStdKeyApplicationF");
+_LIT(KStdKeyYes,					"EStdKeyYes");
+_LIT(KStdKeyNo,						"EStdKeyNo");
+_LIT(KStdKeyIncBrightness,			"EStdKeyIncBrightness");
+_LIT(KStdKeyDecBrightness,			"EStdKeyDecBrightness");
+_LIT(KStdKeyKeyboardExtend,			"EStdKeyKeyboardExtend");
+_LIT(KStdKeyDevice10,				"EStdKeyDevice10");
+_LIT(KStdKeyDevice11,				"EStdKeyDevice11");
+_LIT(KStdKeyDevice12,				"EStdKeyDevice12");
+_LIT(KStdKeyDevice13,				"EStdKeyDevice13");
+_LIT(KStdKeyDevice14,				"EStdKeyDevice14");
+_LIT(KStdKeyDevice15,				"EStdKeyDevice15");
+_LIT(KStdKeyDevice16,				"EStdKeyDevice16");
+_LIT(KStdKeyDevice17,				"EStdKeyDevice17");
+_LIT(KStdKeyDevice18,				"EStdKeyDevice18");
+_LIT(KStdKeyDevice19,				"EStdKeyDevice19");
+_LIT(KStdKeyDevice1A,				"EStdKeyDevice1A");
+_LIT(KStdKeyDevice1B,				"EStdKeyDevice1B");
+_LIT(KStdKeyDevice1C,				"EStdKeyDevice1C");
+_LIT(KStdKeyDevice1D,				"EStdKeyDevice1D");
+_LIT(KStdKeyDevice1E,				"EStdKeyDevice1E");
+_LIT(KStdKeyDevice1F,				"EStdKeyDevice1F");
+_LIT(KStdKeyApplication10,			"EStdKeyApplication10");
+_LIT(KStdKeyApplication11,			"EStdKeyApplication11");
+_LIT(KStdKeyApplication12,			"EStdKeyApplication12");
+_LIT(KStdKeyApplication13,			"EStdKeyApplication13");
+_LIT(KStdKeyApplication14,			"EStdKeyApplication14");
+_LIT(KStdKeyApplication15,			"EStdKeyApplication15");
+_LIT(KStdKeyApplication16,			"EStdKeyApplication16");
+_LIT(KStdKeyApplication17,			"EStdKeyApplication17");
+_LIT(KStdKeyApplication18,			"EStdKeyApplication18");
+_LIT(KStdKeyApplication19,			"EStdKeyApplication19");
+_LIT(KStdKeyApplication1A,			"EStdKeyApplication1A");
+_LIT(KStdKeyApplication1B,			"EStdKeyApplication1B");
+_LIT(KStdKeyApplication1C,			"EStdKeyApplication1C");
+_LIT(KStdKeyApplication1D,			"EStdKeyApplication1D");
+_LIT(KStdKeyApplication1E,			"EStdKeyApplication1E");
+_LIT(KStdKeyApplication1F,			"EStdKeyApplication1F");
+_LIT(KStdKeyDevice20,				"EStdKeyDevice20");
+_LIT(KStdKeyDevice21,				"EStdKeyDevice21");
+_LIT(KStdKeyDevice22,				"EStdKeyDevice22");
+_LIT(KStdKeyDevice23,				"EStdKeyDevice23");
+_LIT(KStdKeyDevice24,				"EStdKeyDevice24");
+_LIT(KStdKeyDevice25,				"EStdKeyDevice25");
+_LIT(KStdKeyDevice26,				"EStdKeyDevice26");
+_LIT(KStdKeyDevice27,				"EStdKeyDevice27");
+_LIT(KStdKeyApplication20,			"EStdKeyApplication20");
+_LIT(KStdKeyApplication21,			"EStdKeyApplication21");
+_LIT(KStdKeyApplication22,			"EStdKeyApplication22");
+_LIT(KStdKeyApplication23,			"EStdKeyApplication23");
+_LIT(KStdKeyApplication24,			"EStdKeyApplication24");
+_LIT(KStdKeyApplication25,			"EStdKeyApplication25");
+_LIT(KStdKeyApplication26,			"EStdKeyApplication26");
+_LIT(KStdKeyApplication27,			"EStdKeyApplication27");
+const CDataWrapperBase::TEnumEntryTable	CT_KeypadDriverData::iEnumTableScanCodes[] =
+	{
+//	Scancode as a descriptor		Scancode
+	KStdKeyNumber0,					(TStdScanCode) '0',
+	KStdKeyNumber1,					(TStdScanCode) '1',
+	KStdKeyNumber2,					(TStdScanCode) '2',
+	KStdKeyNumber3,					(TStdScanCode) '3',
+	KStdKeyNumber4,					(TStdScanCode) '4',
+	KStdKeyNumber5,					(TStdScanCode) '5',
+	KStdKeyNumber6,					(TStdScanCode) '6',
+	KStdKeyNumber7,					(TStdScanCode) '7',
+	KStdKeyNumber8,					(TStdScanCode) '8',
+	KStdKeyNumber9,					(TStdScanCode) '9',
+	KStdKeyLetterA,					(TStdScanCode) 'A',
+	KStdKeyLetterB,					(TStdScanCode) 'B',
+	KStdKeyLetterC,					(TStdScanCode) 'C',
+	KStdKeyLetterD,					(TStdScanCode) 'D',
+	KStdKeyLetterE,					(TStdScanCode) 'E',
+	KStdKeyLetterF,					(TStdScanCode) 'F',
+	KStdKeyLetterG,					(TStdScanCode) 'G',
+	KStdKeyLetterH,					(TStdScanCode) 'H',
+	KStdKeyLetterI,					(TStdScanCode) 'I',
+	KStdKeyLetterJ,					(TStdScanCode) 'J',
+	KStdKeyLetterK,					(TStdScanCode) 'K',
+	KStdKeyLetterL,					(TStdScanCode) 'L',
+	KStdKeyLetterM,					(TStdScanCode) 'M',
+	KStdKeyLetterN,					(TStdScanCode) 'N',
+	KStdKeyLetterO,					(TStdScanCode) 'O',
+	KStdKeyLetterP,					(TStdScanCode) 'P',
+	KStdKeyLetterQ,					(TStdScanCode) 'Q',
+	KStdKeyLetterR,					(TStdScanCode) 'R',
+	KStdKeyLetterS,					(TStdScanCode) 'S',
+	KStdKeyLetterT,					(TStdScanCode) 'T',
+	KStdKeyLetterU,					(TStdScanCode) 'U',
+	KStdKeyLetterV,					(TStdScanCode) 'V',
+	KStdKeyLetterW,					(TStdScanCode) 'W',
+	KStdKeyLetterX,					(TStdScanCode) 'X',
+	KStdKeyLetterY,					(TStdScanCode) 'Y',
+	KStdKeyLetterZ,					(TStdScanCode) 'Z',
+	KStdKeyAsterisk,				(TStdScanCode) '*',
+	KStdKeyNull,					EStdKeyNull,
+	KStdKeyBackspace,				EStdKeyBackspace,
+	KStdKeyTab,						EStdKeyTab,
+	KStdKeyEnter,					EStdKeyEnter,
+	KStdKeyEscape,					EStdKeyEscape,
+	KStdKeySpace,					EStdKeySpace,
+	KStdKeyPrintScreen,				EStdKeyPrintScreen,
+	KStdKeyPause,					EStdKeyPause,
+	KStdKeyHome,					EStdKeyHome,
+	KStdKeyEnd,						EStdKeyEnd,
+	KStdKeyPageUp,					EStdKeyPageUp,
+	KStdKeyPageDown,				EStdKeyPageDown,
+	KStdKeyInsert,					EStdKeyInsert,
+	KStdKeyDelete,					EStdKeyDelete,
+	KStdKeyLeftArrow,				EStdKeyLeftArrow,
+	KStdKeyRightArrow,				EStdKeyRightArrow,
+	KStdKeyUpArrow,					EStdKeyUpArrow,
+	KStdKeyDownArrow,				EStdKeyDownArrow,
+	KStdKeyLeftShift,				EStdKeyLeftShift,
+	KStdKeyRightShift,				EStdKeyRightShift,
+	KStdKeyLeftAlt,					EStdKeyLeftAlt,
+	KStdKeyRightAlt,				EStdKeyRightAlt,
+	KStdKeyLeftCtrl,				EStdKeyLeftCtrl,
+	KStdKeyRightCtrl,				EStdKeyRightCtrl,
+	KStdKeyLeftFunc,				EStdKeyLeftFunc,
+	KStdKeyRightFunc,				EStdKeyRightFunc,
+	KStdKeyCapsLock,				EStdKeyCapsLock,
+	KStdKeyNumLock,					EStdKeyNumLock,
+	KStdKeyScrollLock,				EStdKeyScrollLock,
+	KStdKeyF1,						EStdKeyF1,
+	KStdKeyF2,						EStdKeyF2,
+	KStdKeyF3,						EStdKeyF3,
+	KStdKeyF4,						EStdKeyF4,
+	KStdKeyF5,						EStdKeyF5,
+	KStdKeyF6,						EStdKeyF6,
+	KStdKeyF7,						EStdKeyF7,
+	KStdKeyF8,						EStdKeyF8,
+	KStdKeyF9,						EStdKeyF9,
+	KStdKeyF10,						EStdKeyF10,
+	KStdKeyF11,						EStdKeyF11,
+	KStdKeyF12,						EStdKeyF12,
+	KStdKeyF13,						EStdKeyF13,
+	KStdKeyF14,						EStdKeyF14,
+	KStdKeyF15,						EStdKeyF15,
+	KStdKeyF16,						EStdKeyF16,
+	KStdKeyF17,						EStdKeyF17,
+	KStdKeyF18,						EStdKeyF18,
+	KStdKeyF19,						EStdKeyF19,
+	KStdKeyF20,						EStdKeyF20,
+	KStdKeyF21,						EStdKeyF21,
+	KStdKeyF22,						EStdKeyF22,
+	KStdKeyF23,						EStdKeyF23,
+	KStdKeyF24,						EStdKeyF24,
+	KStdKeyXXX,						EStdKeyXXX,
+	KStdKeyComma,					EStdKeyComma,
+	KStdKeyFullStop,				EStdKeyFullStop,
+	KStdKeyForwardSlash,			EStdKeyForwardSlash,
+	KStdKeyBackSlash,				EStdKeyBackSlash,
+	KStdKeySemiColon,				EStdKeySemiColon,
+	KStdKeySingleQuote,				EStdKeySingleQuote,
+	KStdKeyHash,					EStdKeyHash,
+	KStdKeySquareBracketLeft,		EStdKeySquareBracketLeft,
+	KStdKeySquareBracketRight,		EStdKeySquareBracketRight,
+	KStdKeyMinus,					EStdKeyMinus,
+	KStdKeyEquals,					EStdKeyEquals,
+	KStdKeyNkpForwardSlash,			EStdKeyNkpForwardSlash,
+	KStdKeyNkpAsterisk,				EStdKeyNkpAsterisk,
+	KStdKeyNkpMinus,				EStdKeyNkpMinus,
+	KStdKeyNkpPlus,					EStdKeyNkpPlus,
+	KStdKeyNkpEnter,				EStdKeyNkpEnter,
+	KStdKeyNkp1,					EStdKeyNkp1,
+	KStdKeyNkp2,					EStdKeyNkp2,
+	KStdKeyNkp3,					EStdKeyNkp3,
+	KStdKeyNkp4,					EStdKeyNkp4,
+	KStdKeyNkp5,					EStdKeyNkp5,
+	KStdKeyNkp6,					EStdKeyNkp6,
+	KStdKeyNkp7,					EStdKeyNkp7,
+	KStdKeyNkp8,					EStdKeyNkp8,
+	KStdKeyNkp9,					EStdKeyNkp9,
+	KStdKeyNkp0,					EStdKeyNkp0,
+	KStdKeyNkpFullStop,				EStdKeyNkpFullStop,
+	KStdKeyMenu,					EStdKeyMenu,
+	KStdKeyBacklightOn,				EStdKeyBacklightOn,
+	KStdKeyBacklightOff,			EStdKeyBacklightOff,
+	KStdKeyBacklightToggle,			EStdKeyBacklightToggle,
+	KStdKeyIncContrast,				EStdKeyIncContrast,
+	KStdKeyDecContrast,				EStdKeyDecContrast,
+	KStdKeySliderDown,				EStdKeySliderDown,
+	KStdKeySliderUp,				EStdKeySliderUp,
+	KStdKeyDictaphonePlay,			EStdKeyDictaphonePlay,
+	KStdKeyDictaphoneStop,			EStdKeyDictaphoneStop,
+	KStdKeyDictaphoneRecord,		EStdKeyDictaphoneRecord,
+	KStdKeyHelp,					EStdKeyHelp,
+	KStdKeyOff,						EStdKeyOff,
+	KStdKeyDial,					EStdKeyDial,
+	KStdKeyIncVolume,				EStdKeyIncVolume,
+	KStdKeyDecVolume,				EStdKeyDecVolume,
+	KStdKeyDevice0,					EStdKeyDevice0,
+	KStdKeyDevice1,					EStdKeyDevice1,
+	KStdKeyDevice2,					EStdKeyDevice2,
+	KStdKeyDevice3,					EStdKeyDevice3,
+	KStdKeyDevice4,					EStdKeyDevice4,
+	KStdKeyDevice5,					EStdKeyDevice5,
+	KStdKeyDevice6,					EStdKeyDevice6,
+	KStdKeyDevice7,					EStdKeyDevice7,
+	KStdKeyDevice8,					EStdKeyDevice8,
+	KStdKeyDevice9,					EStdKeyDevice9,
+	KStdKeyDeviceA,					EStdKeyDeviceA,
+	KStdKeyDeviceB,					EStdKeyDeviceB,
+	KStdKeyDeviceC,					EStdKeyDeviceC,
+	KStdKeyDeviceD,					EStdKeyDeviceD,
+	KStdKeyDeviceE,					EStdKeyDeviceE,
+	KStdKeyDeviceF,					EStdKeyDeviceF,
+	KStdKeyApplication0,			EStdKeyApplication0,
+	KStdKeyApplication1,			EStdKeyApplication1,
+	KStdKeyApplication2,			EStdKeyApplication2,
+	KStdKeyApplication3,			EStdKeyApplication3,
+	KStdKeyApplication4,			EStdKeyApplication4,
+	KStdKeyApplication5,			EStdKeyApplication5,
+	KStdKeyApplication6,			EStdKeyApplication6,
+	KStdKeyApplication7,			EStdKeyApplication7,
+	KStdKeyApplication8,			EStdKeyApplication8,
+	KStdKeyApplication9,			EStdKeyApplication9,
+	KStdKeyApplicationA,			EStdKeyApplicationA,
+	KStdKeyApplicationB,			EStdKeyApplicationB,
+	KStdKeyApplicationC,			EStdKeyApplicationC,
+	KStdKeyApplicationD,			EStdKeyApplicationD,
+	KStdKeyApplicationE,			EStdKeyApplicationE,
+	KStdKeyApplicationF,			EStdKeyApplicationF,
+	KStdKeyYes,						EStdKeyYes,
+	KStdKeyNo,						EStdKeyNo,
+	KStdKeyIncBrightness,			EStdKeyIncBrightness,
+	KStdKeyDecBrightness,			EStdKeyDecBrightness,
+	KStdKeyKeyboardExtend,			EStdKeyKeyboardExtend,
+	KStdKeyDevice10,				EStdKeyDevice10,
+	KStdKeyDevice11,				EStdKeyDevice11,
+	KStdKeyDevice12,				EStdKeyDevice12,
+	KStdKeyDevice13,				EStdKeyDevice13,
+	KStdKeyDevice14,				EStdKeyDevice14,
+	KStdKeyDevice15,				EStdKeyDevice15,
+	KStdKeyDevice16,				EStdKeyDevice16,
+	KStdKeyDevice17,				EStdKeyDevice17,
+	KStdKeyDevice18,				EStdKeyDevice18,
+	KStdKeyDevice19,				EStdKeyDevice19,
+	KStdKeyDevice1A,				EStdKeyDevice1A,
+	KStdKeyDevice1B,				EStdKeyDevice1B,
+	KStdKeyDevice1C,				EStdKeyDevice1C,
+	KStdKeyDevice1D,				EStdKeyDevice1D,
+	KStdKeyDevice1E,				EStdKeyDevice1E,
+	KStdKeyDevice1F,				EStdKeyDevice1F,
+	KStdKeyApplication10,			EStdKeyApplication10,
+	KStdKeyApplication11,			EStdKeyApplication11,
+	KStdKeyApplication12,			EStdKeyApplication12,
+	KStdKeyApplication13,			EStdKeyApplication13,
+	KStdKeyApplication14,			EStdKeyApplication14,
+	KStdKeyApplication15,			EStdKeyApplication15,
+	KStdKeyApplication16,			EStdKeyApplication16,
+	KStdKeyApplication17,			EStdKeyApplication17,
+	KStdKeyApplication18,			EStdKeyApplication18,
+	KStdKeyApplication19,			EStdKeyApplication19,
+	KStdKeyApplication1A,			EStdKeyApplication1A,
+	KStdKeyApplication1B,			EStdKeyApplication1B,
+	KStdKeyApplication1C,			EStdKeyApplication1C,
+	KStdKeyApplication1D,			EStdKeyApplication1D,
+	KStdKeyApplication1E,			EStdKeyApplication1E,
+	KStdKeyApplication1F,			EStdKeyApplication1F,
+	KStdKeyDevice20,				EStdKeyDevice20,
+	KStdKeyDevice21,				EStdKeyDevice21,
+	KStdKeyDevice22,				EStdKeyDevice22,
+	KStdKeyDevice23,				EStdKeyDevice23,
+	KStdKeyDevice24,				EStdKeyDevice24,
+	KStdKeyDevice25,				EStdKeyDevice25,
+	KStdKeyDevice26,				EStdKeyDevice26,
+	KStdKeyDevice27,				EStdKeyDevice27,
+	KStdKeyApplication20,			EStdKeyApplication20,
+	KStdKeyApplication21,			EStdKeyApplication21,
+	KStdKeyApplication22,			EStdKeyApplication22,
+	KStdKeyApplication23,			EStdKeyApplication23,
+	KStdKeyApplication24,			EStdKeyApplication24,
+	KStdKeyApplication25,			EStdKeyApplication25,
+	KStdKeyApplication26,			EStdKeyApplication26,
+	KStdKeyApplication27,			EStdKeyApplication27,
+	KEnumNull,						(TStdScanCode) -1
+	};
+
+_LIT(KEnumCoverageVeryLow,			"VeryLow");
+_LIT(KEnumCoverageLow,				"Low");
+_LIT(KEnumCoverageMedium,			"Medium");
+_LIT(KEnumCoverageFull,				"Full");
+const CDataWrapperBase::TEnumEntryTable	CT_KeypadDriverData::iEnumTableCoverage[] =
+	{
+	KEnumCoverageVeryLow,			8,
+	KEnumCoverageLow,				4,
+	KEnumCoverageMedium,			2,
+	KEnumCoverageFull,				1,
+	KEnumNull,						-1
+	};
+
+_LIT(KEnumKeyboardState,					"EKeyboardState");
+_LIT(KEnumKeyboard,							"EKeyboard");
+_LIT(KEnumKeyboardDeviceKeys,				"EKeyboardDeviceKeys");
+_LIT(KEnumKeyboardAppKeys,					"EKeyboardAppKeys");
+_LIT(KEnumKeyboardClick,					"EKeyboardClick");
+_LIT(KEnumKeyboardClickVolumeMax,			"EKeyboardClickVolumeMax");
+_LIT(KEnumKeyboardClickState,				"EKeyboardClickState");
+_LIT(KEnumKeyboardClickVolume,				"EKeyboardClickVolume");
+const CT_HALData::THalTableLookup	CT_KeypadDriverData::iTableLookup[] =
+	{
+//	Enum as a descriptor			Enum								Prepare input	Prepare				Validation of		Store data returned after a		Flag indicating
+//																		value prior to	parameters			value returned		successful HAL::Get or			if validation
+//																		HAL::Set call	prior to 			after a successful	HAL::Set call					is mandatory
+//																						HAL::Get call		HAL::Get call
+	KEnumKeyboardState,				HALData::EKeyboardState,			SetPrepareInt,	GetPrepareNothing,	GetValidationInt,	SetKeyboardState,				ETrue,
+	KEnumKeyboard,					HALData::EKeyboard,					SetPrepareInt,	GetPrepareNothing,	GetValidationInt,	SetKeyboard,					ETrue,
+	KEnumKeyboardDeviceKeys,		HALData::EKeyboardDeviceKeys,		SetPrepareInt,	GetPrepareNothing,	GetValidationInt,	SetKeyboardDeviceKeys,			ETrue,
+	KEnumKeyboardAppKeys,			HALData::EKeyboardAppKeys,			SetPrepareInt,	GetPrepareNothing,	GetValidationInt,	SetKeyboardAppKeys,				ETrue,
+	KEnumKeyboardClick,				HALData::EKeyboardClick,			SetPrepareInt,	GetPrepareNothing,	GetValidationInt,	SetKeyboardClick,				ETrue,
+	KEnumKeyboardClickVolumeMax,	HALData::EKeyboardClickVolumeMax,	SetPrepareInt,	GetPrepareNothing,	GetValidationInt,	SetKeyboardClickVolumeMax,		ETrue,
+	KEnumKeyboardClickState,		HALData::EKeyboardClickState,		SetPrepareInt,	GetPrepareNothing,	GetValidationInt,	SetKeyboardClickState,			ETrue,
+	KEnumKeyboardClickVolume,		HALData::EKeyboardClickVolume,		SetPrepareInt,	GetPrepareNothing,	GetValidationInt,	SetKeyboardClickVolume,			ETrue,
+	KEnumNull,						(HALData::TAttribute)0,				NULL,			NULL,				NULL,				NULL,							NULL
+	};
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_KeypadDriverData* CT_KeypadDriverData::NewL()
+	{
+	CT_KeypadDriverData*	ret=new (ELeave) CT_KeypadDriverData();
+	CleanupStack::PushL(ret);
+	ret->ConstructL();
+	CleanupStack::Pop(ret);
+	return ret;
+	}
+
+
+CT_KeypadDriverData::CT_KeypadDriverData()
+:	CT_HALData(iTableLookup)
+,	iKeyboardState(-1)
+,	iKeyboard(-1)
+,	iKeyboardDeviceKeys(-1)
+,	iKeyboardAppKeys(-1)
+,	iKeyboardClick(-1)
+,	iKeyboardClickVolumeMax(-1)
+,	iKeyboardClickState(-1)
+,	iKeyboardClickVolume(-1)
+,	iActiveKey(NULL)
+,	iActiveCombination(NULL)
+,	iActiveKeypadState(NULL)
+,	iActivePrompt(NULL)
+,	iExpectedState(0)
+,	iKeyCount(0)
+,	iCombinationCount(0)
+,	iCombinationKeyCount(0)
+,	iFailTest(EFalse)
+,	iPassKey(0)
+	{
+	}
+
+void CT_KeypadDriverData::ConstructL()
+/**
+ * Second phase construction
+ *
+ * @internalComponent
+ *
+ * @return	N/A
+ *
+ * @pre		None
+ * @post	None
+ *
+ * @leave	system wide error
+ */
+	{
+	iActiveKey 				= CActiveCallback::NewL(*this);
+	iActiveCombination		= CActiveCallback::NewL(*this);
+	iActiveKeypadState		= CActiveCallbackBase::NewL(*this);
+	iActivePrompt			= CActiveCallback::NewL(*this);
+
+	User::LeaveIfError(iConsole.Init(KConsoleName,TSize(KConsFullScreen,KConsFullScreen)));
+	User::LeaveIfError(iConsole.Control(KMaximized));
+	User::LeaveIfError(iConsole.Control(KRawEventMode));
+
+	iEventStore.AppendL(TRawEvent::EKeyDown);
+	iEventStore.AppendL(TRawEvent::EKeyUp);
+	}
+
+CT_KeypadDriverData::~CT_KeypadDriverData()
+/**
+ * Public destructor
+ */
+	{
+	iConsole.Control(KRawEventModeOff);
+	iConsole.Destroy();
+
+	iPossibleScanCodeStrStore.Reset();
+	iPossibleScanCodeStrStore.Close();
+	iPossibleScanCodeStore.Reset();
+	iPossibleScanCodeStore.Close();
+	iPossibleModifierStrStore.Reset();
+	iPossibleModifierStrStore.Close();
+	iPossibleModifierStore.Reset();
+	iPossibleModifierStore.Close();
+	iAllPossibleKeysStrStore.Reset();
+	iAllPossibleKeysStrStore.Close();
+	iAllPossibleKeysStore.Reset();
+	iAllPossibleKeysStore.Close();
+	iCombinationStrStore.Reset();
+	iCombinationStrStore.Close();
+	iExpectedStore.Reset();
+	iExpectedStore.Close();
+	iActualStore.Reset();
+	iActualStore.Close();
+	iEventStore.Reset();
+	iEventStore.Close();
+
+	delete iActiveKey;
+	delete iActiveCombination;
+	delete iActiveKeypadState;
+	delete iActivePrompt;
+	}
+
+TAny* CT_KeypadDriverData::GetObject()
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return	pointer to the object that the data wraps
+ */
+	{
+	return NULL;
+	}
+
+//	An empty function to ensure that the code will work fine with HAL_Data
+TBool CT_KeypadDriverData::GetPrepareNothing(CDataWrapperBase* /*aThis*/, const TDesC& /*aSection*/, TInt& /*aValueStart*/, TInt& /*aValueEnd*/)
+	{
+	return ETrue;
+	}
+
+//	Store the keypad state
+void CT_KeypadDriverData::SetKeyboardState(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_KeypadDriverData*>(aThis)->iKeyboardState=aValue;
+	}
+
+//	Store the keypad type
+void CT_KeypadDriverData::SetKeyboard(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_KeypadDriverData*>(aThis)->iKeyboard=aValue;
+	}
+
+//	Store the amount of keypad device keys
+void CT_KeypadDriverData::SetKeyboardDeviceKeys(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_KeypadDriverData*>(aThis)->iKeyboardDeviceKeys=aValue;
+	}
+
+//	Store the amount of keypad app keys
+void CT_KeypadDriverData::SetKeyboardAppKeys(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_KeypadDriverData*>(aThis)->iKeyboardAppKeys=aValue;
+	}
+
+//	Store the keypad click indicator
+void CT_KeypadDriverData::SetKeyboardClick(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_KeypadDriverData*>(aThis)->iKeyboardClick=aValue;
+	}
+
+//	Store the keypad max click volume
+void CT_KeypadDriverData::SetKeyboardClickVolumeMax(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_KeypadDriverData*>(aThis)->iKeyboardClickVolumeMax=aValue;
+	}
+
+//	Store the keypad click state
+void CT_KeypadDriverData::SetKeyboardClickState(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_KeypadDriverData*>(aThis)->iKeyboardClickState=aValue;
+	}
+
+//	Store the keypad click volume
+void CT_KeypadDriverData::SetKeyboardClickVolume(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_KeypadDriverData*>(aThis)->iKeyboardClickVolume=aValue;
+	}
+
+TBool CT_KeypadDriverData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+	{
+	TBool	ret = ETrue;
+
+	if ( aCommand == KGetScanCodes )
+		{
+		DoCmdGetScanCodesL(aSection);
+		}
+	else if ( aCommand == KGetModifiers )
+		{
+		DoCmdGetModifiersL(aSection);
+		}
+	else if ( aCommand == KTestAllKeys )
+		{
+		DoCmdTestAllKeysL(aAsyncErrorIndex);
+		}
+	else if ( aCommand == KTestOneModifierOneOtherKey )
+		{
+		DoCmdTestOneModifierOneOtherKeyL(aSection, aAsyncErrorIndex);
+		}
+	else if ( aCommand == KTestTwoKeys )
+		{
+		DoCmdTestTwoKeysL(aSection, aAsyncErrorIndex);
+		}
+	else if ( aCommand == KTestMultipleKeys )
+		{
+		DoCmdTestMultipleKeysL(aSection, aAsyncErrorIndex);
+		}
+	else if ( aCommand == KVerifyKeypadState )
+		{
+		DoCmdVerifyKeypadState(aSection, aAsyncErrorIndex);
+		}
+	else if ( aCommand == KPromptUser )
+		{
+		DoCmdPromptUser(aSection, aAsyncErrorIndex);
+		}
+	else
+		{
+		ret = CT_HALData::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+
+	return ret;
+	}
+
+
+void CT_KeypadDriverData::DoCmdGetScanCodesL(const TDesC& aSection)
+/**
+ * Get the scancodes of the platform
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+	{
+	iPossibleScanCodeStrStore.Reset();
+	iPossibleScanCodeStore.Reset();
+	iAllPossibleKeysStrStore.Reset();
+	iAllPossibleKeysStore.Reset();
+
+	TIniDataName	tempStore;
+	TPtrC			scanCodeStr;
+	TPtrC			scanCodeName;
+	TInt		 	scanCode;
+
+	TInt	index=0;
+	TBool	moreData=ETrue;
+	while ( moreData )
+		{
+		++index;
+		tempStore.Format(KScanCodeString(), index);
+		moreData=GetStringFromConfig(aSection, tempStore, scanCodeStr);
+		if ( moreData )
+			{
+			tempStore.Format(KScanCode(), index);
+			if (!GetEnumFromConfig(aSection, tempStore, iEnumTableScanCodes, scanCode))
+				{
+				ERR_PRINTF2(_L("Invalid scancode value: %d"), scanCode);
+				SetBlockResult(EFail);
+				}
+			else
+				{
+				iPossibleScanCodeStrStore.AppendL(scanCodeStr);
+				iPossibleScanCodeStore.AppendL(scanCode);
+
+				iAllPossibleKeysStrStore.AppendL(scanCodeStr);
+				iAllPossibleKeysStore.AppendL(scanCode);
+				}
+			}
+		}
+	}
+
+void CT_KeypadDriverData::DoCmdGetModifiersL(const TDesC& aSection)
+/**
+ * Get the modifiers of the platform
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+	{
+	iPossibleModifierStrStore.Reset();
+	iPossibleModifierStore.Reset();
+
+	TIniDataName	tempStore;
+	TPtrC			modifierStr;
+	TInt			modifier;
+
+	TInt	index=0;
+	TBool	moreData=ETrue;
+	while ( moreData )
+		{
+		++index;
+		tempStore.Format(KModifierString(), index);
+		moreData=GetStringFromConfig(aSection, tempStore, modifierStr);
+		if ( moreData )
+			{
+			tempStore.Format(KModifier(), index);
+			if (!GetEnumFromConfig(aSection, tempStore, iEnumTableScanCodes, modifier))
+				{
+				ERR_PRINTF2(_L("Invalid modifier value: %d"), modifier);
+				SetBlockResult(EFail);
+				}
+			else
+				{
+				iPossibleModifierStrStore.AppendL(modifierStr);
+				iPossibleModifierStore.AppendL(modifier);
+
+				iAllPossibleKeysStrStore.AppendL(modifierStr);
+				iAllPossibleKeysStore.AppendL(modifier);
+				}
+			}
+		}
+	}
+
+void CT_KeypadDriverData::DoCmdTestAllKeysL(const TInt aAsyncErrorIndex)
+/**
+ * Tests one key at the time by verifying the actual scancode against expected value
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+	{
+	iExpectedStore.Reset();
+	iActualStore.Reset();
+	iConsole.ClearScreen();
+
+	iKeyCount=0;
+	for ( TInt key=0; key<iAllPossibleKeysStore.Count(); ++key )
+		{
+		for ( TInt event=0; event<iEventStore.Count(); ++event )
+			{
+			iExpectedStore.AppendL(iEventStore[event]);
+			iExpectedStore.AppendL(iAllPossibleKeysStore[key]);
+			}
+		}
+
+	//end of setup and start testcase
+	iConsole.Write(_L("Keyboard layout test.\n"));
+	iConsole.Write(_L("Press the key corresponding to the "));
+
+	iConsole.Write(iAllPossibleKeysStrStore[iKeyCount]);
+
+	iConsole.Read(iKey, iActiveKey->iStatus);
+	iActiveKey->Activate( aAsyncErrorIndex );
+	IncOutstanding(); 	// request an event
+	}
+
+
+void CT_KeypadDriverData::DoCmdTestOneModifierOneOtherKeyL(const TDesC& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Tests one modifier + key combinations by verifying their scancodes against expected values
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+	{
+	iCombinationStrStore.Reset();
+	iExpectedStore.Reset();
+	iActualStore.Reset();
+	iConsole.ClearScreen();
+	iCombinationCount  	 = 0;
+	iCombinationKeyCount = 0;
+
+	TInt	divider 	 = 1;
+	TBool	dataOk=GetEnumFromConfig(aSection, KTestCoverage, iEnumTableCoverage, divider);
+	if ( !dataOk )
+		{
+		ERR_PRINTF2(KLogMissingParameter, &KTestCoverage());
+		SetBlockResult(EFail);
+		}
+	else
+		{
+		TInt	modifierCount 	= iPossibleModifierStore.Count();
+		TInt	keyCount	  	= (TInt)(iPossibleScanCodeStore.Count() / divider);
+
+		if (divider != 1)
+			{
+			++keyCount;
+			}
+
+		for ( TInt key=0; key<keyCount; ++key )
+			{
+			for ( TInt modifier=0; modifier<modifierCount; ++modifier )
+				{
+				for ( TInt event=0; event<iEventStore.Count(); ++event )
+					{
+					iExpectedStore.AppendL(iEventStore[event]);
+					iExpectedStore.AppendL(iPossibleModifierStore[modifier]);
+					iExpectedStore.AppendL(iEventStore[event]);
+					iExpectedStore.AppendL(iPossibleScanCodeStore[key]);
+					}
+
+				TIniDataName	tempStrArray;
+				tempStrArray.Append(iPossibleModifierStrStore[modifier]);
+				tempStrArray.Append(_L(" + "));
+				tempStrArray.Append(iPossibleScanCodeStrStore[key]);
+				iCombinationStrStore.Append(tempStrArray);
+				}
+			}
+
+		if ( iExpectedStore.Count()>0 )
+			{//end of setup and start testcase
+			iConsole.Write(_L("Keyboard layout test.\n"));
+			iConsole.Write(_L("Press the following keys in the sequence as displayed:\n"));
+			iConsole.Write(iCombinationStrStore[iCombinationCount]);
+			iConsole.Write(_L("\n"));
+			iConsole.Write(_L("and release them in the same sequence."));
+
+			iConsole.Read(iKey, iActiveCombination->iStatus);
+			iActiveCombination->Activate( aAsyncErrorIndex );
+			IncOutstanding(); 	// request an event*/
+			}
+		else
+			{
+			INFO_PRINTF1(_L("No modifiers and/or keys available or too small test coverage set"));
+			}
+		}
+	}
+
+void CT_KeypadDriverData::DoCmdTestTwoKeysL(const TDesC& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Tests key + key combinations by verifying their scancodes against expected values
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+ 	{
+	iCombinationStrStore.Reset();
+	iExpectedStore.Reset();
+	iActualStore.Reset();
+	iConsole.ClearScreen();
+	iCombinationCount		= 0;
+	iCombinationKeyCount	= 0;
+
+	TInt	divider			= 1;
+	TBool	dataOk=GetEnumFromConfig(aSection, KTestCoverage, iEnumTableCoverage, divider);
+	if ( !dataOk )
+		{
+		ERR_PRINTF2(KLogMissingParameter, &KTestCoverage());
+		SetBlockResult(EFail);
+		}
+	else
+		{
+		TInt	keyCount=(TInt)(iPossibleScanCodeStore.Count() / divider);
+
+		if (divider != 1)
+			{
+			++keyCount;
+			}
+
+		for ( TInt key1=0; key1<keyCount; ++key1 )
+			{
+			for ( TInt key2= 0; key2<keyCount; ++key2 )
+				{
+				if ( iPossibleScanCodeStore[key1]!=iPossibleScanCodeStore[key2] )
+					{
+					for ( TInt event=0; event<iEventStore.Count(); ++event )
+						{
+						iExpectedStore.AppendL(iEventStore[event]);
+						iExpectedStore.AppendL(iPossibleScanCodeStore[key1]);
+						iExpectedStore.AppendL(iEventStore[event]);
+						iExpectedStore.AppendL(iPossibleScanCodeStore[key2]);
+						}
+
+					TIniDataName	tempStrArray;
+					tempStrArray.Append(iPossibleScanCodeStrStore[key1]);
+					tempStrArray.Append(_L(" + "));
+					tempStrArray.Append(iPossibleScanCodeStrStore[key2]);
+					iCombinationStrStore.Append(tempStrArray);
+					}
+				}
+			}
+
+		if ( iExpectedStore.Count()>0 )
+			{//end of setup and start testcase
+			iConsole.Write(_L("Keyboard layout test.\n"));
+			iConsole.Write(_L("Press the following keys in the sequence as displayed:\n"));
+			iConsole.Write(iCombinationStrStore[iCombinationCount]);
+			iConsole.Write(_L("\n"));
+			iConsole.Write(_L("and release them in the same sequence."));
+
+			iConsole.Read(iKey, iActiveCombination->iStatus);
+			iActiveCombination->Activate( aAsyncErrorIndex );
+			IncOutstanding(); 	// request an event*/
+			}
+		else
+			{
+			INFO_PRINTF1(_L("No keys available or too small test coverage set"));
+			}
+		}
+	}
+
+void CT_KeypadDriverData::DoCmdTestMultipleKeysL(const TDesC& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Tests multiple key combinations by verifying their scancodes against expected values
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+ 	{
+	iCombinationStrStore.Reset();
+	iExpectedStore.Reset();
+	iActualStore.Reset();
+	iCombinationKeyCount = 0;
+	iConsole.ClearScreen();
+
+	RArray<TInt>	keyStore;
+	RArray<TPtrC>	keyStrStore;
+
+	keyStore.Reset();
+	keyStrStore.Reset();
+
+	TIniDataName	setStore;
+	TIniDataName	strStore;
+	TIniDataName	fullStore;
+	TPtrC			scanCodeStr;
+	TInt			scanCode;
+
+	TInt	setIndex=0;
+	TBool	moreSets=ETrue;
+	while ( moreSets )
+		{
+		++setIndex;
+
+		keyStore.Reset();
+		keyStrStore.Reset();
+
+		setStore.Format(KSet(), setIndex);
+		setStore.Append(_L("_"));
+
+		TInt	index	=0;
+		TBool	moreData=ETrue;
+		while ( moreData )
+			{
+			++index;
+
+			fullStore 	= _L("");
+			strStore.Format(KScanCodeString(), index);
+			fullStore.Append(setStore);
+			fullStore.Append(strStore);
+
+			moreData=GetStringFromConfig(aSection, fullStore, scanCodeStr);
+			if ( moreData )
+				{
+				fullStore = _L("");
+				strStore.Format(KScanCode(), index);
+				fullStore.Append(setStore);
+				fullStore.Append(strStore);
+
+				if (!GetEnumFromConfig(aSection, fullStore, iEnumTableScanCodes, scanCode))
+					{
+					ERR_PRINTF2(_L("Invalid scancode value: %d"), scanCode);
+					SetBlockResult(EFail);
+					}
+				else
+					{
+					keyStrStore.AppendL(scanCodeStr);
+					keyStore.AppendL(scanCode);
+					}
+				++index;
+				}
+			else
+				{
+				if (index == 1)
+					{
+					moreSets = EFalse;
+					}
+				}
+			}
+
+		if (moreSets)
+			{
+			TInt	keyCount=keyStore.Count();
+			for ( TInt event=0; event<iEventStore.Count(); ++event )
+				{
+				for ( TInt key=0; key<keyCount; ++key )
+					{
+					iExpectedStore.AppendL(iEventStore[event]);
+					iExpectedStore.AppendL(keyStore[key]);
+					}
+				}
+
+			TIniDataName	tempStrArray;
+			for ( TInt key=0; key<keyCount; ++key )
+				{
+				if (tempStrArray == _L(""))
+					{
+					tempStrArray.Append(keyStrStore[key]);
+					}
+				else
+					{
+					tempStrArray.Append(_L(" + "));
+					tempStrArray.Append(keyStrStore[key]);
+					}
+				}
+
+			iCombinationStrStore.Append(tempStrArray);
+			}
+		}
+
+	keyStore.Reset();
+	keyStore.Close();
+	keyStrStore.Reset();
+	keyStrStore.Close();
+
+	if (iExpectedStore.Count() > 0)
+		{//end of setup and start testcase
+		iConsole.Write(_L("Keyboard layout test.\n"));
+		iConsole.Write(_L("Press the following keys in the sequence as displayed:\n"));
+		iConsole.Write(iCombinationStrStore[0]);
+		iConsole.Write(_L("\n"));
+		iConsole.Write(_L("and release them in the same sequence."));
+
+		iConsole.Read(iKey, iActiveCombination->iStatus);
+		iActiveCombination->Activate( aAsyncErrorIndex );
+		IncOutstanding(); 	// request an event
+		}
+	else
+		{
+		INFO_PRINTF1(_L("No multiple key sets available"));
+		}
+	}
+
+
+void CT_KeypadDriverData::DoCmdVerifyKeypadState(const TDesC& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Function for verifying the keypad state manually if running manual tests
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+	{
+	iExpectedState = 0;
+	GetIntFromConfig(aSection, KExpectedState(), iExpectedState);
+
+	TInt	timeOut=0;
+	GetIntFromConfig(aSection, KTimeOut(), timeOut);
+
+	TIniDataName	seconds;
+	seconds.Format(_L("%d"), timeOut / 1000000);
+
+	iConsole.ClearScreen();
+	iConsole.Write(_L("Manual tests enabled...\n"));
+	iConsole.Write(_L("Press any key within "));
+	iConsole.Write(seconds);
+	iConsole.Write(_L(" seconds to check the keypad state..."));
+
+	iConsole.Read(iKey, iActiveKeypadState->iStatus);
+	iActiveKeypadState->Activate( aAsyncErrorIndex, timeOut );
+	IncOutstanding(); 	// request an event
+	}
+
+
+void CT_KeypadDriverData::DoCmdPromptUser(const TDesC& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Function for verifying the volume manually if running manual tests
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+	{
+	iFailTest = EFalse;
+	GetBoolFromConfig(aSection, KFailTest(), iFailTest);
+
+	if ( !GetStringFromConfig(aSection, KUserPrompt(), iUserPromptStr) )
+		{
+		ERR_PRINTF2(KLogMissingParameter, &KUserPrompt());
+		SetBlockResult(EFail);
+		}
+	else
+		{
+		iConsole.ClearScreen();
+		iConsole.Write(_L("Manual tests enabled...\n"));
+		iConsole.Write(iUserPromptStr);
+
+		if(iFailTest)
+			{
+			GetStringFromConfig(aSection, KPassKeyStr, iPassKeyStr);
+			GetEnumFromConfig(aSection, KPassKey, iEnumTableScanCodes, iPassKey);
+
+			iConsole.Write(_L("Press "));
+			iConsole.Write(iPassKeyStr);
+			iConsole.Write(_L(" to pass the test or any other key to fail->>>"));
+			}
+		else
+			{
+			iConsole.Write(_L("Press any key to continue->>>"));
+			}
+
+		iConsole.Read(iKey, iActivePrompt->iStatus);
+		iActivePrompt->Activate( aAsyncErrorIndex );
+		IncOutstanding(); 	// request an event
+		}
+	}
+
+
+void CT_KeypadDriverData::DoCancel(CActive* aActive, TInt /*aIndex*/)
+	{
+	if( aActive == iActiveKeypadState )
+		{
+		INFO_PRINTF1(_L("Keypad state DoCancel called"));
+
+		iConsole.ReadCancel();
+		DecOutstanding();
+
+		if(iExpectedState == 1)
+			{
+			ERR_PRINTF1(_L("No key press detected. Expected state is 1 (on)"));
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF2(_L("Key press result is corresponding to the expected state: %d"), iExpectedState);
+			}
+		}
+	else
+		{
+		ERR_PRINTF1(_L("An unchecked active object cancelled"));
+		SetBlockResult(EFail);
+		}
+	}
+
+void CT_KeypadDriverData::RunL(CActive* aActive, TInt aIndex)
+	{
+	DecOutstanding();
+	TBool	straySignal		= EFalse;
+	TBool	furtherRequest	= EFalse;
+
+	TBool	isCombination	= EFalse;
+	TBool	isPrompt		= EFalse;
+
+	if( aActive == iActiveKey )
+		{
+		INFO_PRINTF1(_L("RunL called"));
+
+		isCombination			= EFalse;
+		isPrompt				= EFalse;
+		TInt	eventType		= iKey.Type();
+		TInt	scanCode		= iKey.Code();
+
+		if( eventType == TRawEvent::EKeyDown || eventType == TRawEvent::EKeyUp)
+			{
+			INFO_PRINTF2(_L("Raw Event: %d"), eventType);
+
+			iActualStore.AppendL(eventType);
+			iActualStore.AppendL(scanCode);
+
+			INFO_PRINTF2(_L("Expected scancode string: %S"), &iAllPossibleKeysStrStore[iKeyCount]);
+			INFO_PRINTF2(_L("Actual scancode: %d"), scanCode);
+
+			if (eventType == TRawEvent::EKeyUp)
+				{
+				if(iKeyCount < iAllPossibleKeysStore.Count() - 1)
+					{
+					furtherRequest = ETrue;
+					iKeyCount++;
+					}
+				else
+					{
+					furtherRequest = EFalse;
+					}
+				}
+			else
+				{
+				furtherRequest = ETrue;
+				}
+			}
+		else
+			{
+			ERR_PRINTF2(_L("Unexpected Raw Event: %d"), eventType);
+			SetBlockResult(EFail);
+			furtherRequest = ETrue;
+			}
+		}
+	else if( aActive == iActiveCombination )
+		{
+		INFO_PRINTF1(_L("RunL called"));
+
+		isCombination				= ETrue;
+		isPrompt					= EFalse;
+		TInt 	eventType			= iKey.Type();
+		TInt	scanCode			= iKey.Code();
+
+		if( eventType == TRawEvent::EKeyDown )
+			{
+			INFO_PRINTF2(_L("Raw Event: %d"), eventType);
+
+			iActualStore.AppendL(eventType);
+			iActualStore.AppendL(scanCode);
+
+			INFO_PRINTF2(_L("Expected scancode string: %S"), &iCombinationStrStore[iCombinationCount]);
+			INFO_PRINTF2(_L("Actual scancode: %d"), scanCode);
+
+			iCombinationKeyCount++;
+
+			furtherRequest = ETrue;
+			}
+		else if ( eventType == TRawEvent::EKeyUp )
+			{
+			INFO_PRINTF2(_L("Raw Event: %d"), eventType);
+
+			iActualStore.AppendL(eventType);
+			iActualStore.AppendL(scanCode);
+
+			INFO_PRINTF2(_L("Actual scancode: %d"), scanCode);
+
+			iCombinationKeyCount--;
+
+			if(iCombinationCount < iCombinationStrStore.Count() - 1 && iCombinationKeyCount == 0)
+				{
+				furtherRequest = ETrue;
+				iCombinationCount++;
+				}
+			else if (iCombinationKeyCount != 0)
+				{
+				furtherRequest = ETrue;
+				}
+			else
+				{
+				furtherRequest = EFalse;
+				}
+			}
+		else
+			{
+			ERR_PRINTF2(_L("Unexpected Raw Event: %d"), eventType);
+			SetBlockResult(EFail);
+			furtherRequest = ETrue;
+			}
+		}
+	else if( aActive == iActiveKeypadState )
+		{
+		INFO_PRINTF1(_L("RunL called"));
+
+		TInt eventType = iKey.Type();
+		TInt scanCode  = iKey.Code();
+
+		if(eventType == TRawEvent::EKeyDown && scanCode != 0)
+			{
+			iActiveKeypadState->KillTimer();
+			DecOutstanding();
+
+			if(iExpectedState == 0)
+				{
+				ERR_PRINTF1(_L("Key press detected. Expected state is 0 (off)"));
+				SetBlockResult(EFail);
+				}
+			else
+				{
+				INFO_PRINTF2(_L("Key press result is corresponding to the expected state: %d"), iExpectedState);
+				}
+			}
+		}
+	else if ( aActive == iActivePrompt )
+		{
+		INFO_PRINTF1(_L("Prompt RunL called"));
+
+		isCombination		= EFalse;
+		isPrompt			= ETrue;
+		TInt	eventType	= iKey.Type();
+		TInt	scanCode	= iKey.Code();
+
+		if (iFailTest)
+			{
+			if(eventType == TRawEvent::EKeyDown && scanCode != iPassKey)
+				{
+				ERR_PRINTF1(_L("Test failed - User verifies that the result is not as expected"));
+				SetBlockResult(EFail);
+				furtherRequest = EFalse;
+				}
+			else if (eventType == TRawEvent::EKeyDown && scanCode == iPassKey)
+				{
+				INFO_PRINTF1(_L("Test passed - User verifies that the result is as expected"));
+				furtherRequest = EFalse;
+				}
+			else if (eventType == TRawEvent::EKeyUp)
+				{
+				furtherRequest = ETrue;
+				}
+			else
+				{
+				ERR_PRINTF2(_L("Unexpected Raw Event: %d"), eventType);
+				SetBlockResult(EFail);
+				furtherRequest = ETrue;
+				}
+			}
+		else
+			{
+			if(eventType == TRawEvent::EKeyDown)
+				{
+				INFO_PRINTF1(_L("Continuing..."));
+				furtherRequest = EFalse;
+				}
+			else if (eventType == TRawEvent::EKeyUp)
+				{
+				furtherRequest = ETrue;
+				}
+			else
+				{
+				ERR_PRINTF2(_L("Unexpected Raw Event: %d"), eventType);
+				SetBlockResult(EFail);
+				furtherRequest = ETrue;
+				}
+			}
+		}
+	else
+		{
+		ERR_PRINTF1(_L("An unchecked active object completed"));
+		SetBlockResult(EFail);
+		straySignal = ETrue;
+		}
+
+	if( !straySignal )
+		{
+		TInt	err = aActive->iStatus.Int();
+		if( err != KErrNone )
+			{
+			if(aActive == iActiveKeypadState && err == KErrCancel)
+				{
+				if(iExpectedState == 1)
+					{
+					ERR_PRINTF1(_L("No key press detected. Expected state is 1 (on)"));
+					SetBlockResult(EFail);
+					}
+				else
+					{
+					INFO_PRINTF2(_L("Key press result is corresponding to the expected state: %d"), iExpectedState);
+					}
+				}
+			else
+				{
+				ERR_PRINTF2(_L("RunL Error %d"), err);
+				SetAsyncError( aIndex, err );
+				}
+			}
+		else
+			{
+			if(furtherRequest)// check if re-issue required
+				{
+				iConsole.ClearScreen();
+				INFO_PRINTF1(_L("Re-issuing Read"));
+
+				if(!isCombination && !isPrompt)
+					{
+					iConsole.Write(_L("Press the key corresponding to the "));
+					iConsole.Write(iAllPossibleKeysStrStore[iKeyCount]);
+
+					iConsole.Read(iKey, iActiveKey->iStatus);
+					iActiveKey->Activate(aIndex);
+					IncOutstanding();
+					}
+				else if (!isPrompt)
+					{
+					iConsole.Write(_L("Press the following keys in the same sequence as displayed:\n"));
+					iConsole.Write(iCombinationStrStore[iCombinationCount]);
+					iConsole.Write(_L("\n"));
+					iConsole.Write(_L("and release them in the same sequence."));
+
+					iConsole.Read(iKey, iActiveCombination->iStatus);
+					iActiveCombination->Activate(aIndex);
+					IncOutstanding();
+					}
+				else{
+					iConsole.Write(iUserPromptStr);
+
+					if(iFailTest)
+						{
+						iConsole.Write(_L("Press "));
+						iConsole.Write(iPassKeyStr);
+						iConsole.Write(_L(" to pass the test or any other key to fail->>>"));
+						}
+					else
+						{
+						iConsole.Write(_L("Press any key to continue->>>"));
+						}
+
+					iConsole.Read(iKey, iActivePrompt->iStatus);
+					iActivePrompt->Activate( aIndex );
+					IncOutstanding();
+					}
+				}
+			else
+				{
+				if(aActive == iActiveKeypadState)
+					{
+					if ( iExpectedState == 0 )
+						{
+						ERR_PRINTF1(_L("Expected state is 0 (off). Verifying keypad state should have been cancelled."));
+						SetBlockResult(EFail);
+						}
+					else
+						{
+						INFO_PRINTF2(_L("Key press result is corresponding to the expected state: %d"), iExpectedState);
+						}
+					}
+				else
+					{
+					INFO_PRINTF1(_L("RunL call completed successfully"));
+					ProcessResults();	//process results
+					}
+				}
+			}
+		}
+	}
+
+void CT_KeypadDriverData::ProcessResults()
+	{
+	INFO_PRINTF1(_L("Processing results"));
+
+	if (iActualStore.Count() == iExpectedStore.Count())
+		{
+		for(TInt i = 0; i < iActualStore.Count(); i+=2)
+			{
+			if(	iActualStore[i] != iExpectedStore[i]	)//compare event
+				{
+				ERR_PRINTF3(_L("Expected event (%d) does not match Actual event (%d)! "), iExpectedStore[i], iActualStore[i]);
+				SetBlockResult(EFail);
+				}
+			else
+				{
+				INFO_PRINTF2(_L("Expected event was: %d, Actual event matches the expected one."), iExpectedStore[i]);
+				}
+
+			if(iActualStore[i+1] == iExpectedStore[i+1])
+				{
+				INFO_PRINTF2(_L("Expected scancode was: %d. Actual scancode matches the expected one."), iExpectedStore[i+1]);
+				}
+			else
+				{
+				ERR_PRINTF3(_L("Actual scancode (%d) != expected scancode (%d)"), iActualStore[i+1], iExpectedStore[i+1]);
+				SetBlockResult(EFail);
+				}
+			}
+		}
+	else
+		{
+		ERR_PRINTF3(_L("Actual results array count (%d) != expected results array count (%d)"), iActualStore.Count(), iExpectedStore.Count());
+		SetBlockResult(EFail);
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/src/T_KeypadDriverServer.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,105 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_KeypadDriverServer.h"
+#include "T_KeypadDriverData.h"
+
+/*@{*/
+_LIT(KT_KeypadDriver,		"Keypad");
+/*@}*/
+
+CT_KeypadDriverServer* CT_KeypadDriverServer::NewL()
+/**
+ * @return - Instance of the test server
+ * Same code for Secure and non-secure variants
+ * Called inside the MainL() function to create and start the
+ * CTestServer derived server.
+ */
+	{
+    CT_KeypadDriverServer* server = new (ELeave) CT_KeypadDriverServer();
+    CleanupStack::PushL(server);
+    server->ConstructL();
+    CleanupStack::Pop(server);
+    return server;
+    }
+
+
+LOCAL_C void MainL()
+/**
+ * Secure variant
+ * Much simpler, uses the new Rendezvous() call to sync with the client
+ */
+	{
+#if (defined __DATA_CAGING__)
+    RProcess().DataCaging(RProcess::EDataCagingOn);
+    RProcess().SecureApi(RProcess::ESecureApiOn);
+#endif
+    CActiveScheduler*	sched=NULL;
+    sched=new(ELeave) CActiveScheduler;
+    CActiveScheduler::Install(sched);
+    CT_KeypadDriverServer* server = NULL;
+
+    // Create the CTestServer derived server
+    TRAPD(err,server = CT_KeypadDriverServer::NewL());
+    if(!err)
+	    {
+        // Sync with the client and enter the active scheduler
+        RProcess::Rendezvous(KErrNone);
+        sched->Start();
+        }
+
+    delete server;
+    delete sched;
+    }
+
+
+GLDEF_C TInt E32Main()
+/**
+ * @return - Standard Epoc error code on process exit
+ * Secure variant only
+ * Process entry point. Called by client using RProcess API
+ */
+	{
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    if(cleanup == NULL)
+	    {
+        return KErrNoMemory;
+        }
+
+#if (defined TRAP_IGNORE)
+	TRAP_IGNORE(MainL());
+#else
+    TRAPD(err,MainL());
+#endif
+
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
+
+CDataWrapper* CT_KeypadDriverServer::CT_KeypadDriverBlock::CreateDataL(const TDesC& aData)
+	{
+	CDataWrapper*	wrapper=NULL;
+
+	if( KT_KeypadDriver() == aData )
+		{
+		wrapper=CT_KeypadDriverData::NewL();
+		}
+
+	return wrapper;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/testdata/BASE-BSP-KEYPAD-DRIVER.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,406 @@
+[include]
+file1			=\base\keypad\t_keypad.ini
+
+[keypad1]
+name=keypad1
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0001-GetCurrentKeypadState]
+halEValue		=EKeyboardState
+expected		={keypad,default_keypad_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0001-SetKeypadState]
+halEValue		=EKeyboardState
+value			=0
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0001-GetKeypadState]
+halEValue		=EKeyboardState
+expected		=0
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0001-RestoreKeypadState]
+halEValue		=EKeyboardState
+value			={keypad,default_keypad_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0002-GetCurrentKeypadState]
+halEValue		=EKeyboardState
+expected		={keypad,default_keypad_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0002-SetKeypadState]
+halEValue		=EKeyboardState
+value			=1
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0002-GetKeypadState]
+halEValue		=EKeyboardState
+expected		=1
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0002-RestoreKeypadState]
+halEValue		=EKeyboardState
+value			={keypad,default_keypad_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0003-GetKeypadType]
+halEValue		=EKeyboard
+expected		={keypad,keypad_type}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0003-GetKeypadDeviceKeys]
+halEValue		=EKeyboardDeviceKeys
+expected		={keypad,keypad_device_keys}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0003-GetKeypadAppKeys]
+halEValue		=EKeyboardAppKeys
+expected		={keypad,keypad_app_keys}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0004-GetCurrentKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0004-SetKeypadClickState]
+halEValue		=EKeyboardClickState
+value			=0
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0004-GetKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		=0
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0004-RestoreKeypadClickState]
+halEValue		=EKeyboardClickState
+value			={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0005-GetCurrentKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0005-SetKeypadClickState]
+halEValue		=EKeyboardClickState
+value			=1
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0005-GetKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		=1
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0005-RestoreKeypadClickState]
+halEValue		=EKeyboardClickState
+value			={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0006-GetCurrentKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0006-SetKeypadClickState]
+halEValue		=EKeyboardClickState
+value			=0
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0006-GetKeypadClick]
+halEValue		=EKeyboardClick
+expected		=0
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0006-RestoreKeypadClickState]
+halEValue		=EKeyboardClickState
+value			={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0007-GetCurrentKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0007-SetKeypadClickState]
+halEValue		=EKeyboardClickState
+value			=1
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0007-GetKeypadClick]
+halEValue		=EKeyboardClick
+expected		=1
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0007-RestoreKeypadClickState]
+halEValue		=EKeyboardClickState
+value			={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0008-GetKeypadClickVolumeMax]
+halEValue		=EKeyboardClickVolumeMax
+expected		={keypad,keypad_click_volume_max}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-GetCurrentKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-SetKeypadClickState]
+halEValue		=EKeyboardClickState
+value			=1
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-GetKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		=1
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-GetCurrentKeypadClickVolume]
+halEValue		=EKeyboardClickVolume
+expected		=1
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-GetKeypadClickVolumeMax]
+halEValue		=EKeyboardClickVolumeMax
+expected		={keypad,keypad_click_volume_max}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-SetKeypadClickVolume0]
+halEValue		=EKeyboardClickVolume
+value			=0
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-GetKeypadClickVolume0]
+halEValue		=EKeyboardClickVolume
+expected		=0
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-SetKeypadClickVolumeAvg]
+halEValue		=EKeyboardClickVolume
+value			=2
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-GetKeypadClickVolumeAvg]
+halEValue		=EKeyboardClickVolume
+expected		=2
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-SetKeypadClickVolumeMaxValue]
+halEValue		=EKeyboardClickVolume
+value			={keypad,keypad_click_volume_max}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-GetKeypadClickVolumeMaxValue]
+halEValue		=EKeyboardClickVolume
+expected		={keypad,keypad_click_volume_max}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-RestoreKeypadClickVolume]
+halEValue		=EKeyboardClickVolume
+value			=1
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0009-RestoreKeypadClickState]
+halEValue		=EKeyboardClickState
+value			={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0010-GetCurrentKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0010-SetKeypadClickState]
+halEValue		=EKeyboardClickState
+value			=1
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0010-GetKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		=1
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0010-SetKeypadClickVolumeMinus1]
+halEValue		=EKeyboardClickVolume
+value			=-1
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0010-RestoreKeypadClickState]
+halEValue		=EKeyboardClickState
+value			={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0010-GetRestoredKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011-GetCurrentKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011-SetKeypadClickState]
+halEValue		=EKeyboardClickState
+value			=1
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011-GetKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		=1
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011-GetKeypadClickVolumeMax]
+halEValue		=EKeyboardClickVolumeMax
+expected		={keypad,keypad_click_volume_max}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011-SetKeypadClickVolumeMoreThanMax]
+halEValue		=EKeyboardClickVolume
+value			=20000000
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011-RestoreKeypadClickState]
+halEValue		=EKeyboardClickState
+value			={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011-GetRestoredKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		={keypad,default_keypad_click_state_value}
+
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0005-GetCurrentKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0005-SetKeypadClickState]
+halEValue		=EKeyboardClickState
+value			=0
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0005-GetKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		=0
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0005-VerifyKeypadClickStateDisabledWarning]
+user_prompt		=Prepare to verify the key click sound change. Listen carefully, when pressing a key.
+fail_test		=FALSE
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0005-VerifyKeypadClickStateDisabled]
+user_prompt		=Did the key click sound stop?
+fail_test		=TRUE
+pass_key_str		={keypad, pass_key_str}
+pass_key		={keypad, pass_key}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0005-RestoreKeypadClickState]
+halEValue		=EKeyboardClickState
+value			={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0006-GetCurrentKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0006-SetKeypadClickState]
+halEValue		=EKeyboardClickState
+value			=1
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0006-GetKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		=1
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0006-VerifyKeypadClickStateEnabledWarning]
+user_prompt		=Prepare to verify the key click sound change. Listen carefully, when pressing a key.
+fail_test		=FALSE
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0006-VerifyKeypadClickStateEnabled]
+user_prompt		=Did you hear the key click sound?
+fail_test		=TRUE
+pass_key_str		={keypad, pass_key_str}
+pass_key		={keypad, pass_key}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0006-RestoreKeypadClickState]
+halEValue		=EKeyboardClickState
+value			={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-GetCurrentKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-SetKeypadClickState]
+halEValue		=EKeyboardClickState
+value			=1
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-GetKeypadClickState]
+halEValue		=EKeyboardClickState
+expected		=1
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-GetCurrentKeypadClickVolume]
+halEValue		=EKeyboardClickVolume
+expected		=1
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-GetKeypadClickVolumeMax]
+halEValue		=EKeyboardClickVolumeMax
+expected		={keypad,keypad_click_volume_max}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-SetKeypadClickVolume0]
+halEValue		=EKeyboardClickVolume
+value			=0
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-GetKeypadClickVolume0]
+halEValue		=EKeyboardClickVolume
+expected		=0
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-VerifyKeypadClickVolume0Warning]
+user_prompt		=Prepare to verify the key click sound change. Listen carefully, when pressing a key.
+fail_test		=FALSE
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-VerifyKeypadClickVolume0]
+user_prompt		=Was the key click mute?
+fail_test		=TRUE
+pass_key_str		={keypad, pass_key_str}
+pass_key		={keypad, pass_key}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-SetKeypadClickVolumeAvg]
+halEValue		=EKeyboardClickVolume
+value			=2
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-GetKeypadClickVolumeAvg]
+halEValue		=EKeyboardClickVolume
+expected		=2
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-VerifyKeypadClickVolumeAvgWarning]
+user_prompt		=Prepare to verify the key click sound change. Listen carefully, when pressing a key.
+fail_test		=FALSE
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-VerifyKeypadClickVolumeAvg]
+user_prompt		=Did you hear the click volume change?
+fail_test		=TRUE
+pass_key_str		={keypad, pass_key_str}
+pass_key		={keypad, pass_key}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-SetKeypadClickVolumeMaxValue]
+halEValue		=EKeyboardClickVolume
+value			={keypad,keypad_click_volume_max}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-GetKeypadClickVolumeMaxValue]
+halEValue		=EKeyboardClickVolume
+expected		={keypad,keypad_click_volume_max}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-VerifyKeypadClickVolumeMaxValueWarning]
+user_prompt		=Prepare to verify the key click sound change. Listen carefully, when pressing a key.
+fail_test		=FALSE
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-VerifyKeypadClickVolumeMaxValue]
+user_prompt		=Did you hear the click volume change?
+fail_test		=TRUE
+pass_key_str		={keypad, pass_key_str}
+pass_key		={keypad, pass_key}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-RestoreKeypadClickVolume]
+halEValue		=EKeyboardClickVolume
+value			=1
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-VerifyRestoredKeypadClickVolumeWarning]
+user_prompt		=Prepare to verify the key click sound change. Listen carefully, when pressing a key.
+fail_test		=FALSE
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-VerifyRestoredKeypadClickVolume]
+user_prompt		=Did you hear the click volume change?
+fail_test		=TRUE
+pass_key_str		={keypad, pass_key_str}
+pass_key		={keypad, pass_key}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0007-RestoreKeypadClickState]
+halEValue		=EKeyboardClickState
+value			={keypad,default_keypad_click_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0008-GetCurrentKeypadState]
+halEValue		=EKeyboardState
+expected		={keypad,default_keypad_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0008-SetKeypadState]
+halEValue		=EKeyboardState
+value			=0
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0008-GetKeypadState]
+halEValue		=EKeyboardState
+expected		=0
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0008-VerifyKeypadStateDisabled]
+expected_state		=0
+timeout			=10000000
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0008-RestoreKeypadState]
+halEValue		=EKeyboardState
+value			={keypad,default_keypad_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0009-GetCurrentKeypadState]
+halEValue		=EKeyboardState
+expected		={keypad,default_keypad_state_value}
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0009-SetKeypadState]
+halEValue		=EKeyboardState
+value			=1
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0009-GetKeypadState]
+halEValue		=EKeyboardState
+expected		=1
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0009-VerifyKeypadStateEnabled]
+expected_state		=1
+timeout			=10000000
+
+[BASE-BSP-KEYPAD-DRIVER-MANUAL-0009-RestoreKeypadState]
+halEValue		=EKeyboardState
+value			={keypad,default_keypad_state_value}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/testdata/devlon52/t_keypad.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,156 @@
+# This is the global environment file to configure the specific device  keypad test suite.
+
+
+[keypad]
+# Platform-specific keypad information, e.gnumber of application and device keys, keyboard type etc.
+# Possible keypad type values: 1 - EKeyboard_Keypad (0x1), 2 - EKeyboard_Full (0x02)
+# Default keypad type value is 2 (EKeyboard_Full).
+keypad_type			=2
+keypad_device_keys		=0
+keypad_app_keys			=0
+keypad_click_volume_max		=1
+default_keypad_state_value	=1
+default_keypad_click_state_value=1
+# Key to use for passing tests when "automated" value is FALSE and user is prompted to pass or fail some tests
+pass_key_str			={keys, scancode_string24}
+pass_key			={keys, scancode24}
+
+
+[test_coverage]
+# Specifies how many keys (not modifiers) are being tested.
+# Possible values:
+# VeryLow	- 1/8 of the possible keys are tested.
+# Low		- 1/4 of the possible keys are tested.
+# Medium	- 1/2 of the possible keys are tested.
+# Full		- All possible keys are tested.
+test_coverage			=Low
+
+
+#
+# Scancodes and modifiers for specific device keypad
+#
+
+[keys]
+# Scancodes for specific device board
+scancode_string1		='1' key
+scancode1			='1'
+
+scancode_string2		='2' key
+scancode2			='2'
+
+scancode_string3		='3' key
+scancode3			='3'
+
+scancode_string4		='4' key
+scancode4			='4'
+
+scancode_string5		='5' key
+scancode5			='5'
+
+scancode_string6		='6' key
+scancode6			='6'
+
+scancode_string7		='7' key
+scancode7			='7'
+
+scancode_string8		='8' key
+scancode8			='8'
+
+scancode_string9		='9' key
+scancode9			='9'
+
+scancode_string10		='0' key
+scancode10			='0'
+
+scancode_string11		=Left green line key (top left)
+scancode11			=EStdKeyDevice0
+
+scancode_string12		=Blue key that looks like an orbit -> .()* (next to the last key clicked)
+scancode12			=EStdKeyApplication0
+
+scancode_string13		=Right green line key (top right)
+scancode13			=EStdKeyDevice1
+
+scancode_string14		=Green phone (Yes) key
+scancode14			=EStdKeyYes
+
+scancode_string15		=Backspace (C) key
+scancode15			=EStdKeyBackspace
+
+scancode_string16		=MM key
+scancode16			=EStdKeyApplication2
+
+scancode_string17		=Red phone (No) key
+scancode17			=EStdKeyNo
+
+scancode_string18		=Increase volume key
+scancode18			=EStdKeyIncVolume
+
+scancode_string19		=Decrease volume key 
+scancode19			=EStdKeyDecVolume
+
+scancode_string20		=Up arrow key 
+scancode20			=EStdKeyUpArrow
+
+scancode_string21		=Down arrow key 
+scancode21			=EStdKeyDownArrow
+
+scancode_string22		=Left arrow key 
+scancode22			=EStdKeyLeftArrow
+
+scancode_string23		=Right arrow key
+scancode23			=EStdKeyRightArrow
+
+scancode_string24		=Navi key (between the arrows)
+scancode24			=EStdKeyDevice3
+
+scancode_string25		=Asterisk (*) key
+scancode25			='*'
+
+scancode_string26		=Hash (#) key
+scancode26			=EStdKeyHash
+
+scancode_string27		=X1 key
+scancode27			=EStdKeyF1
+
+scancode_string28		=X2 key
+scancode28			=EStdKeyF2
+
+scancode_string29		=X3 key
+scancode29			=EStdKeyApplication19
+
+scancode_string30		=X4 key
+scancode30			=EStdKeyF4
+
+scancode_string31		=X5 key
+scancode31			=EStdKeyApplication1A
+
+scancode_string32		=X6 key
+scancode32			=EStdKeyF6
+
+scancode_string33		=X7 key
+scancode33			=EStdKeyF7
+
+scancode_string34		=X8 key
+scancode34			=EStdKeyF8
+
+scancode_string35		=X9 key
+scancode35			=EStdKeyF9
+
+
+[modifiers]
+# Modifiers for specific device board
+modifier_string1		=Pencil (Shift) key
+modifier1			=EStdKeyLeftShift
+
+
+[multiple_key_sets]
+# Sets with multiple keys for specific device platform
+set1_scancode_string1		={modifiers, modifier_string1}
+set1_scancode1			={modifiers, modifier1}
+set1_scancode_string2		={keys, scancode_string26}
+set1_scancode2			={keys, scancode26}
+set1_scancode_string3		={keys, scancode_string31}
+set1_scancode3			={keys, scancode31}
+set1_scancode_string4		={keys, scancode_string34}
+set1_scancode4			={keys, scancode34}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/testdata/devlon52/t_keypad.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,2 @@
+BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0001:BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011
+BASE-BSP-KEYPAD-DRIVER-MANUAL-0005:BASE-BSP-KEYPAD-DRIVER-MANUAL-0009
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/testdata/h4hrp/t_keypad.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,321 @@
+# This is the global environment file to configure the H4HRP keypad test suite.
+
+
+[keypad]
+# Platform-specific keypad information, e.gnumber of application and device keys, keyboard type etc.
+# Possible keypad type values: 1 - EKeyboard_Keypad (0x1), 2 - EKeyboard_Full (0x02)
+# Default keypad type value is 2 (EKeyboard_Full).
+keypad_type			=2
+keypad_device_keys		=0
+keypad_app_keys			=0
+keypad_click_volume_max		=1
+default_keypad_state_value	=1
+default_keypad_click_state_value=1
+# Key to use for passing tests when "automated" value is FALSE and user is prompted to pass or fail some tests
+pass_key_str			={keys, scancode_string39}
+pass_key			={keys, scancode39}
+
+
+[test_coverage]
+# Specifies how many keys (not modifiers) are being tested.
+# Possible values:
+# VeryLow	- 1/8 of the possible keys are tested.
+# Low		- 1/4 of the possible keys are tested.
+# Medium	- 1/2 of the possible keys are tested.
+# Full		- All possible keys are tested.
+test_coverage			=VeryLow
+
+
+#
+# Scancodes and modifiers for H4HRP full keyboard
+#
+
+[keys]
+# Scancodes for H4HRP full keyboard
+scancode_string1		='0' key
+scancode1			='0'
+
+scancode_string2		='1' key
+scancode2			='1'
+
+scancode_string3		='2' key
+scancode3			='2'
+
+scancode_string4		='3' key
+scancode4			='3'
+
+scancode_string5		='4' key
+scancode5			='4'
+
+scancode_string6		='5' key
+scancode6			='5'
+
+scancode_string7		='6' key
+scancode7			='6'
+
+scancode_string8		='7' key
+scancode8			='7'
+
+scancode_string9		='8' key
+scancode9			='8'
+
+scancode_string10		='9' key
+scancode10			='9'
+
+scancode_string11		='a' key
+scancode11			='A'
+
+scancode_string12		='b' key
+scancode12			='B'
+
+scancode_string13		='c' key
+scancode13			='C'
+
+scancode_string14		='d' key
+scancode14			='D'
+
+scancode_string15		='e' key
+scancode15			='E'
+
+scancode_string16		='f' key
+scancode16			='F'
+
+scancode_string17		='g' key
+scancode17			='G'
+
+scancode_string18		='h' key
+scancode18			='H'
+
+scancode_string19		='i' key
+scancode19			='I'
+
+scancode_string20		='j' key
+scancode20			='J'
+
+scancode_string21		='k' key
+scancode21			='K'
+
+scancode_string22		='l' key
+scancode22			='L'
+
+scancode_string23		='m' key
+scancode23			='M'
+
+scancode_string24		='n' key
+scancode24			='N'
+
+scancode_string25		='o' key
+scancode25			='O'
+
+scancode_string26		='p' key
+scancode26			='P'
+
+scancode_string27		='q' key
+scancode27			='Q'
+
+scancode_string28		='r' key
+scancode28			='R'
+
+scancode_string29		='s' key
+scancode29			='S'
+
+scancode_string30		='t' key
+scancode30			='T'
+
+scancode_string31		='u' key
+scancode31			='U'
+
+scancode_string32		='v' key
+scancode32			='V'
+
+scancode_string33		='w' key
+scancode33			='W'
+
+scancode_string34		='x' key
+scancode34			='X'
+
+scancode_string35		='y' key
+scancode35			='Y'
+
+scancode_string36		='z' key
+scancode36			='Z'
+
+scancode_string37		=Backspace key
+scancode37			=EStdKeyBackspace
+
+scancode_string38		=Tab key
+scancode38			=EStdKeyTab
+
+scancode_string39		=Enter key
+scancode39			=EStdKeyEnter
+
+scancode_string40		=Escape (Esc) key
+scancode40			=EStdKeyEscape
+
+scancode_string41		=Space key
+scancode41			=EStdKeySpace
+
+scancode_string42		=Print Screen key
+scancode42			=EStdKeyPrintScreen
+
+scancode_string43		=Pause key
+scancode43			=EStdKeyPause
+
+scancode_string44		=Home key
+scancode44			=EStdKeyHome
+
+scancode_string45		=End key
+scancode45			=EStdKeyEnd
+
+scancode_string46		=Page Up key
+scancode46			=EStdKeyPageUp
+
+scancode_string47		=Page Down key
+scancode47			=EStdKeyPageDown
+
+scancode_string48		=Insert key
+scancode48			=EStdKeyInsert
+
+scancode_string49		=Delete (Del) key
+scancode49			=EStdKeyDelete
+
+scancode_string50		=Left arrow key
+scancode50			=EStdKeyLeftArrow
+
+scancode_string51		=Right arrow key
+scancode51			=EStdKeyRightArrow
+
+scancode_string52		=Up arrow key
+scancode52			=EStdKeyUpArrow
+
+scancode_string53		=Down arrow key
+scancode53			=EStdKeyDownArrow
+
+scancode_string54		=function key F1
+scancode54			=EStdKeyF1
+
+scancode_string55		=function key F2
+scancode55			=EStdKeyF2
+
+scancode_string56		=function key F3
+scancode56			=EStdKeyF3
+
+scancode_string57		=function key F4
+scancode57			=EStdKeyF4
+
+scancode_string58		=function key F5 
+scancode58			=EStdKeyF5
+
+scancode_string59		=function key F6 
+scancode59			=EStdKeyF6
+
+scancode_string60		=function key F7 
+scancode60			=EStdKeyF7
+
+scancode_string61		=function key F8 
+scancode61			=EStdKeyF8
+
+scancode_string62		=function key F9 
+scancode62			=EStdKeyF9
+
+scancode_string63		=function key F10 
+scancode63			=EStdKeyF10
+
+scancode_string64		=function key F11 
+scancode64			=EStdKeyF11
+
+scancode_string65		=function key F12 
+scancode65			=EStdKeyF12
+
+scancode_string66		=the key to the left of the 1 key on a standard keyboard
+scancode66			=EStdKeyXXX
+
+scancode_string67		=Comma (,) key
+scancode67			=EStdKeyComma
+
+scancode_string68		=Full stop (.) key
+scancode68			=EStdKeyFullStop
+
+scancode_string69		=Forward slash (/) key
+scancode69			=EStdKeyForwardSlash
+
+scancode_string70		=Back slash (\) key
+scancode70			=EStdKeyBackSlash
+
+scancode_string71		=Semi colon (;) key
+scancode71			=EStdKeySemiColon
+
+scancode_string72		=Single quote (') key
+scancode72			=EStdKeySingleQuote
+
+scancode_string73		=left Square bracket ([) key
+scancode73			=EStdKeySquareBracketLeft
+
+scancode_string74		=right Square bracket (]) key
+scancode74			=EStdKeySquareBracketRight
+
+scancode_string75		=Minus key (-) key
+scancode75			=EStdKeyMinus
+
+scancode_string76		=Equals key (=) key
+scancode76			=EStdKeyEquals
+
+scancode_string77		=Left Start Menu key
+scancode77			=EStdKeyLeftFunc
+
+scancode_string78		=Right Start Menu key
+scancode78			=EStdKeyRightFunc
+
+scancode_string79		=Application menu key
+scancode79			=EStdKeyMenu
+ 
+
+[modifiers]
+# Modifiers for H4HRP full keyboard
+modifier_string1		=left Shift key
+modifier1			=EStdKeyLeftShift
+
+modifier_string2		=right Shift key
+modifier2			=EStdKeyRightShift
+
+modifier_string3		=left Alt key
+modifier3			=EStdKeyLeftAlt
+
+modifier_string4		=right Alt key
+modifier4			=EStdKeyRightAlt
+
+modifier_string5		=left Control (Ctrl) key
+modifier5			=EStdKeyLeftCtrl
+
+modifier_string6		=left Fn key
+modifier6			=EStdKeyLeftFunc
+
+modifier_string7		=Caps lock key
+modifier7			=EStdKeyCapsLock
+
+modifier_string8		=Num lock key
+modifier8			=EStdKeyNumLock
+
+modifier_string9		=Scroll lock key
+modifier9			=EStdKeyScrollLock
+
+
+[multiple_key_sets]
+# Sets with multiple keys for H4HRP platform
+set1_scancode_string1		={modifiers, modifier_string5}
+set1_scancode1			={modifiers, modifier5}
+set1_scancode_string2		={modifiers, modifier_string3}
+set1_scancode2			={modifiers, modifier3}
+set1_scancode_string3		={modifiers, modifier_string1}
+set1_scancode3			={modifiers, modifier1}
+set1_scancode_string4		={keys, scancode_string21}
+set1_scancode4			={keys, scancode21}
+
+set2_scancode_string1		={keys, scancode_string54}
+set2_scancode1			={keys, scancode54}
+set2_scancode_string2		={keys, scancode_string53}
+set2_scancode2			={keys, scancode53}
+set2_scancode_string3		={keys, scancode_string47}
+set2_scancode3			={keys, scancode47}
+set2_scancode_string4		={keys, scancode_string38}
+set2_scancode4			={keys, scancode38}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/testdata/h4hrp/t_keypad.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,3 @@
+BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0001:BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0002
+BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0004:BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011
+BASE-BSP-KEYPAD-DRIVER-MANUAL-0005:BASE-BSP-KEYPAD-DRIVER-MANUAL-0009
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/testdata/h6hrp/t_keypad.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,321 @@
+# This is the global environment file to configure the H4HRP keypad test suite.
+
+
+[keypad]
+# Platform-specific keypad information, e.gnumber of application and device keys, keyboard type etc.
+# Possible keypad type values: 1 - EKeyboard_Keypad (0x1), 2 - EKeyboard_Full (0x02)
+# Default keypad type value is 2 (EKeyboard_Full).
+keypad_type			=2
+keypad_device_keys		=0
+keypad_app_keys			=0
+keypad_click_volume_max		=1
+default_keypad_state_value	=1
+default_keypad_click_state_value=1
+# Key to use for passing tests when "automated" value is FALSE and user is prompted to pass or fail some tests
+pass_key_str			={keys, scancode_string39}
+pass_key			={keys, scancode39}
+
+
+[test_coverage]
+# Specifies how many keys (not modifiers) are being tested.
+# Possible values:
+# VeryLow	- 1/8 of the possible keys are tested.
+# Low		- 1/4 of the possible keys are tested.
+# Medium	- 1/2 of the possible keys are tested.
+# Full		- All possible keys are tested.
+test_coverage			=VeryLow
+
+
+#
+# Scancodes and modifiers for H4HRP full keyboard
+#
+
+[keys]
+# Scancodes for H4HRP full keyboard
+scancode_string1		='0' key
+scancode1			='0'
+
+scancode_string2		='1' key
+scancode2			='1'
+
+scancode_string3		='2' key
+scancode3			='2'
+
+scancode_string4		='3' key
+scancode4			='3'
+
+scancode_string5		='4' key
+scancode5			='4'
+
+scancode_string6		='5' key
+scancode6			='5'
+
+scancode_string7		='6' key
+scancode7			='6'
+
+scancode_string8		='7' key
+scancode8			='7'
+
+scancode_string9		='8' key
+scancode9			='8'
+
+scancode_string10		='9' key
+scancode10			='9'
+
+scancode_string11		='a' key
+scancode11			='A'
+
+scancode_string12		='b' key
+scancode12			='B'
+
+scancode_string13		='c' key
+scancode13			='C'
+
+scancode_string14		='d' key
+scancode14			='D'
+
+scancode_string15		='e' key
+scancode15			='E'
+
+scancode_string16		='f' key
+scancode16			='F'
+
+scancode_string17		='g' key
+scancode17			='G'
+
+scancode_string18		='h' key
+scancode18			='H'
+
+scancode_string19		='i' key
+scancode19			='I'
+
+scancode_string20		='j' key
+scancode20			='J'
+
+scancode_string21		='k' key
+scancode21			='K'
+
+scancode_string22		='l' key
+scancode22			='L'
+
+scancode_string23		='m' key
+scancode23			='M'
+
+scancode_string24		='n' key
+scancode24			='N'
+
+scancode_string25		='o' key
+scancode25			='O'
+
+scancode_string26		='p' key
+scancode26			='P'
+
+scancode_string27		='q' key
+scancode27			='Q'
+
+scancode_string28		='r' key
+scancode28			='R'
+
+scancode_string29		='s' key
+scancode29			='S'
+
+scancode_string30		='t' key
+scancode30			='T'
+
+scancode_string31		='u' key
+scancode31			='U'
+
+scancode_string32		='v' key
+scancode32			='V'
+
+scancode_string33		='w' key
+scancode33			='W'
+
+scancode_string34		='x' key
+scancode34			='X'
+
+scancode_string35		='y' key
+scancode35			='Y'
+
+scancode_string36		='z' key
+scancode36			='Z'
+
+scancode_string37		=Backspace key
+scancode37			=EStdKeyBackspace
+
+scancode_string38		=Tab key
+scancode38			=EStdKeyTab
+
+scancode_string39		=Enter key
+scancode39			=EStdKeyEnter
+
+scancode_string40		=Escape (Esc) key
+scancode40			=EStdKeyEscape
+
+scancode_string41		=Space key
+scancode41			=EStdKeySpace
+
+scancode_string42		=Print Screen key
+scancode42			=EStdKeyPrintScreen
+
+scancode_string43		=Pause key
+scancode43			=EStdKeyPause
+
+scancode_string44		=Home key
+scancode44			=EStdKeyHome
+
+scancode_string45		=End key
+scancode45			=EStdKeyEnd
+
+scancode_string46		=Page Up key
+scancode46			=EStdKeyPageUp
+
+scancode_string47		=Page Down key
+scancode47			=EStdKeyPageDown
+
+scancode_string48		=Insert key
+scancode48			=EStdKeyInsert
+
+scancode_string49		=Delete (Del) key
+scancode49			=EStdKeyDelete
+
+scancode_string50		=Left arrow key
+scancode50			=EStdKeyLeftArrow
+
+scancode_string51		=Right arrow key
+scancode51			=EStdKeyRightArrow
+
+scancode_string52		=Up arrow key
+scancode52			=EStdKeyUpArrow
+
+scancode_string53		=Down arrow key
+scancode53			=EStdKeyDownArrow
+
+scancode_string54		=function key F1
+scancode54			=EStdKeyF1
+
+scancode_string55		=function key F2
+scancode55			=EStdKeyF2
+
+scancode_string56		=function key F3
+scancode56			=EStdKeyF3
+
+scancode_string57		=function key F4
+scancode57			=EStdKeyF4
+
+scancode_string58		=function key F5 
+scancode58			=EStdKeyF5
+
+scancode_string59		=function key F6 
+scancode59			=EStdKeyF6
+
+scancode_string60		=function key F7 
+scancode60			=EStdKeyF7
+
+scancode_string61		=function key F8 
+scancode61			=EStdKeyF8
+
+scancode_string62		=function key F9 
+scancode62			=EStdKeyF9
+
+scancode_string63		=function key F10 
+scancode63			=EStdKeyF10
+
+scancode_string64		=function key F11 
+scancode64			=EStdKeyF11
+
+scancode_string65		=function key F12 
+scancode65			=EStdKeyF12
+
+scancode_string66		=the key to the left of the 1 key on a standard keyboard
+scancode66			=EStdKeyXXX
+
+scancode_string67		=Comma (,) key
+scancode67			=EStdKeyComma
+
+scancode_string68		=Full stop (.) key
+scancode68			=EStdKeyFullStop
+
+scancode_string69		=Forward slash (/) key
+scancode69			=EStdKeyForwardSlash
+
+scancode_string70		=Back slash (\) key
+scancode70			=EStdKeyBackSlash
+
+scancode_string71		=Semi colon (;) key
+scancode71			=EStdKeySemiColon
+
+scancode_string72		=Single quote (') key
+scancode72			=EStdKeySingleQuote
+
+scancode_string73		=left Square bracket ([) key
+scancode73			=EStdKeySquareBracketLeft
+
+scancode_string74		=right Square bracket (]) key
+scancode74			=EStdKeySquareBracketRight
+
+scancode_string75		=Minus key (-) key
+scancode75			=EStdKeyMinus
+
+scancode_string76		=Equals key (=) key
+scancode76			=EStdKeyEquals
+
+scancode_string77		=Left Start Menu key
+scancode77			=EStdKeyLeftFunc
+
+scancode_string78		=Right Start Menu key
+scancode78			=EStdKeyRightFunc
+
+scancode_string79		=Application menu key
+scancode79			=EStdKeyMenu
+ 
+
+[modifiers]
+# Modifiers for H4HRP full keyboard
+modifier_string1		=left Shift key
+modifier1			=EStdKeyLeftShift
+
+modifier_string2		=right Shift key
+modifier2			=EStdKeyRightShift
+
+modifier_string3		=left Alt key
+modifier3			=EStdKeyLeftAlt
+
+modifier_string4		=right Alt key
+modifier4			=EStdKeyRightAlt
+
+modifier_string5		=left Control (Ctrl) key
+modifier5			=EStdKeyLeftCtrl
+
+modifier_string6		=left Fn key
+modifier6			=EStdKeyLeftFunc
+
+modifier_string7		=Caps lock key
+modifier7			=EStdKeyCapsLock
+
+modifier_string8		=Num lock key
+modifier8			=EStdKeyNumLock
+
+modifier_string9		=Scroll lock key
+modifier9			=EStdKeyScrollLock
+
+
+[multiple_key_sets]
+# Sets with multiple keys for H4HRP platform
+set1_scancode_string1		={modifiers, modifier_string5}
+set1_scancode1			={modifiers, modifier5}
+set1_scancode_string2		={modifiers, modifier_string3}
+set1_scancode2			={modifiers, modifier3}
+set1_scancode_string3		={modifiers, modifier_string1}
+set1_scancode3			={modifiers, modifier1}
+set1_scancode_string4		={keys, scancode_string21}
+set1_scancode4			={keys, scancode21}
+
+set2_scancode_string1		={keys, scancode_string54}
+set2_scancode1			={keys, scancode54}
+set2_scancode_string2		={keys, scancode_string53}
+set2_scancode2			={keys, scancode53}
+set2_scancode_string3		={keys, scancode_string47}
+set2_scancode3			={keys, scancode47}
+set2_scancode_string4		={keys, scancode_string38}
+set2_scancode4			={keys, scancode38}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/testdata/h6hrp/t_keypad.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,3 @@
+BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0001:BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0002
+BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0004:BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011
+BASE-BSP-KEYPAD-DRIVER-MANUAL-0005:BASE-BSP-KEYPAD-DRIVER-MANUAL-0009
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/testdata/merlin/t_keypad.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,133 @@
+# This is the global environment file to configure the specific device keypad test suite.
+
+
+[keypad]
+# Platform-specific keypad information, e.gnumber of application and device keys, keyboard type etc.
+# Possible keypad type values: 1 - EKeyboard_Keypad (0x1), 2 - EKeyboard_Full (0x02)
+# Default keypad type value is 2 (EKeyboard_Full).
+keypad_type			=2
+keypad_device_keys		=0
+keypad_app_keys			=0
+keypad_click_volume_max		=1
+default_keypad_state_value	=1
+default_keypad_click_state_value=1
+# Key to use for passing tests when "automated" value is FALSE and user is prompted to pass or fail some tests
+pass_key_str			={keys, scancode_string21}
+pass_key			={keys, scancode21}
+
+
+[test_coverage]
+# Specifies how many keys (not modifiers) are being tested.
+# Possible values:
+# VeryLow	- 1/8 of the possible keys are tested.
+# Low		- 1/4 of the possible keys are tested.
+# Medium	- 1/2 of the possible keys are tested.
+# Full		- All possible keys are tested.
+test_coverage			=Low
+
+
+#
+# Scancodes and modifiers for the specific device
+#
+
+[keys]
+# Scancodes for the specific device
+scancode_string1		='1' key
+scancode1			='1'
+
+scancode_string2		='2' key
+scancode2			='2'
+
+scancode_string3		='3' key
+scancode3			='3'
+
+scancode_string4		='4' key
+scancode4			='4'
+
+scancode_string5		='5' key
+scancode5			='5'
+
+scancode_string6		='6' key
+scancode6			='6'
+
+scancode_string7		='7' key
+scancode7			='7'
+
+scancode_string8		='8' key
+scancode8			='8'
+
+scancode_string9		='9' key
+scancode9			='9'
+
+scancode_string10		='0' key
+scancode10			='0'
+
+scancode_string11		=Asterisk (*) key
+scancode11			='*'
+
+scancode_string12		=Hash (#) key
+scancode12			=EStdKeyHash
+
+scancode_string13		=Left device key (top left)
+scancode13			=EStdKeyDevice0
+
+scancode_string14		=Right device key (top right)
+scancode14			=EStdKeyDevice1
+
+scancode_string15		=Green phone (Yes) key
+scancode15			=EStdKeyYes
+
+scancode_string16		=Red phone (No) key
+scancode16			=EStdKeyNo
+
+scancode_string17		=Up arrow key 
+scancode17			=EStdKeyUpArrow
+
+scancode_string18		=Down arrow key 
+scancode18			=EStdKeyDownArrow
+
+scancode_string19		=Left arrow key 
+scancode19			=EStdKeyLeftArrow
+
+scancode_string20		=Right arrow key
+scancode20			=EStdKeyRightArrow
+
+scancode_string21		=Navi key (between the arrows)
+scancode21			=EStdKeyDevice3
+
+scancode_string22		=Key that looks like an orbit -> .()*
+scancode22			=EStdKeyApplication0
+
+scancode_string23		=Backspace (C) key
+scancode23			=EStdKeyBackspace
+
+scancode_string24		=Key next to the arrow keys
+scancode24			=EStdKeyApplication6
+
+scancode_string25		=Increase volume key
+scancode25			=EStdKeyIncVolume
+
+scancode_string26		=Decrease volume key
+scancode26			=EStdKeyDecVolume
+
+scancode_string27		=On/off key
+scancode27			=EStdKeyDevice2
+
+scancode_string28		=Photo key
+scancode28			=EStdKeyDevice22
+
+
+[modifiers]
+# Modifiers for the specific device
+
+
+[multiple_key_sets]
+# Sets with multiple keys for the specific device
+set1_scancode_string1		={keys, scancode_string13}
+set1_scancode1			={keys, scancode13}
+set1_scancode_string2		={keys, scancode_string11}
+set1_scancode2			={keys, scancode11}
+set1_scancode_string3		={keys, scancode_string12}
+set1_scancode3			={keys, scancode12}
+set1_scancode_string4		={keys, scancode_string14}
+set1_scancode4			={keys, scancode14}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/keypad/testdata/merlin/t_keypad.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,2 @@
+BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0001:BASE-BSP-KEYPAD-DRIVER-AUTOMATED-0011
+BASE-BSP-KEYPAD-DRIVER-MANUAL-0005:BASE-BSP-KEYPAD-DRIVER-MANUAL-0009
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/group/T_Screen.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+TARGET			t_screen.exe
+TARGETTYPE		exe
+UID				0x1000007A 0x102863DB
+VENDORID		0x70000001
+
+capability		All -Tcb
+
+SOURCEPATH		../src
+
+SOURCE			../../../hal/src/T_HALData.cpp
+SOURCE			../../../common/src/DataWrapperBase.cpp
+
+SOURCE			T_ScreenDriverData.cpp
+SOURCE			T_ScreenDriverServer.cpp
+
+USERINCLUDE		../inc
+USERINCLUDE		../../../common/inc
+USERINCLUDE		../../../hal/inc
+
+SYSTEMINCLUDE	/epoc32/include
+SYSTEMINCLUDE	/epoc32/include/test
+SYSTEMINCLUDE	/epoc32/include/kernel
+
+LIBRARY			euser.lib
+LIBRARY			efsrv.lib
+LIBRARY			hal.lib
+LIBRARY			testexecuteutils.lib
+LIBRARY			testexecutelogclient.lib
+LIBRARY			bafl.lib
+LIBRARY			iniparser.lib
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/group/bld.inf	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,70 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include "../../../group/device.cfg"
+#include "../../../../testdata/bsp/common/group/bld.inf"
+
+PRJ_TESTEXPORTS
+//t_screen.oby												/src/cedar/generic/base/e32/rombuild/t_screen.oby
+t_screen.oby												/sf/os/kernelhwsrv/kernel/eka/rombuild/t_screen.oby
+t_screen.oby												/epoc32/rom/haitests/t_screen.oby
+t_screen.iby												/epoc32/rom/haitests/t_screen.iby
+t_screen_binaries.iby										/epoc32/rom/haitests/t_screen_binaries.iby
+t_screen_testdata.iby										/epoc32/rom/haitests/t_screen_testdata.iby
+
+../pkg/t_screen.bat											z:/base/t_screen.bat
+
+../scripts/base-bsp-screen-driver.script					z:/base/screen/base-bsp-screen-driver.script
+../scripts/base-bsp-screen-driver-mode-automated.script		z:/base/screen/base-bsp-screen-driver-mode-automated.script
+../scripts/base-bsp-screen-driver-mode-manual.script		z:/base/screen/base-bsp-screen-driver-mode-manual.script
+../testdata/base-bsp-screen-driver-mode.ini					z:/base/screen/base-bsp-screen-driver-mode.ini
+../scripts/base-bsp-screen-driver-modeless-automated.script	z:/base/screen/base-bsp-screen-driver-modeless-automated.script
+../testdata/base-bsp-screen-driver-modeless.ini				z:/base/screen/base-bsp-screen-driver-modeless.ini
+
+#if defined(TEST_DEVICE_H4HRP)
+../testdata/h4hrp/armv5/t_screen.ini						/epoc32/release/armv5/udeb/z/base/screen/t_screen.ini
+../testdata/h4hrp/armv5/t_screen.ini						/epoc32/release/armv5/urel/z/base/screen/t_screen.ini
+../testdata/h4hrp/armv5/t_screen.tcs						/epoc32/release/armv5/udeb/z/base/screen/t_screen.tcs
+../testdata/h4hrp/armv5/t_screen.tcs						/epoc32/release/armv5/urel/z/base/screen/t_screen.tcs
+#endif
+#if defined(TEST_DEVICE_H6HRP)
+../testdata/h6hrp/armv5/t_screen.ini						/epoc32/release/armv5/udeb/z/base/screen/t_screen.ini
+../testdata/h6hrp/armv5/t_screen.ini						/epoc32/release/armv5/urel/z/base/screen/t_screen.ini
+../testdata/h6hrp/armv5/t_screen.tcs						/epoc32/release/armv5/udeb/z/base/screen/t_screen.tcs
+../testdata/h6hrp/armv5/t_screen.tcs						/epoc32/release/armv5/urel/z/base/screen/t_screen.tcs
+#endif
+#if defined(TEST_DEVICE_DEVLON51)
+../testdata/devlon51/armv5/t_screen.ini						/epoc32/release/armv5/udeb/z/base/screen/t_screen.ini
+../testdata/devlon51/armv5/t_screen.ini						/epoc32/release/armv5/urel/z/base/screen/t_screen.ini
+../testdata/devlon51/armv5/t_screen.tcs						/epoc32/release/armv5/udeb/z/base/screen/t_screen.tcs
+../testdata/devlon51/armv5/t_screen.tcs						/epoc32/release/armv5/urel/z/base/screen/t_screen.tcs
+#endif
+#if defined(TEST_DEVICE_DEVLON52)
+../testdata/devlon52/armv5/t_screen.ini						/epoc32/release/armv5/udeb/z/base/screen/t_screen.ini
+../testdata/devlon52/armv5/t_screen.ini						/epoc32/release/armv5/urel/z/base/screen/t_screen.ini
+../testdata/devlon52/armv5/t_screen.tcs						/epoc32/release/armv5/udeb/z/base/screen/t_screen.tcs
+../testdata/devlon52/armv5/t_screen.tcs						/epoc32/release/armv5/urel/z/base/screen/t_screen.tcs
+#endif
+#if defined(TEST_DEVICE_MERLIN)
+../testdata/merlin/armv5/t_screen.ini						/epoc32/release/armv5/udeb/z/base/screen/t_screen.ini
+../testdata/merlin/armv5/t_screen.ini						/epoc32/release/armv5/urel/z/base/screen/t_screen.ini
+../testdata/merlin/armv5/t_screen.tcs						/epoc32/release/armv5/udeb/z/base/screen/t_screen.tcs
+../testdata/merlin/armv5/t_screen.tcs						/epoc32/release/armv5/urel/z/base/screen/t_screen.tcs
+#endif
+
+
+PRJ_TESTMMPFILES
+T_Screen.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/group/t_screen.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,25 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_SCREEN_IBY__)
+#define __T_SCREEN_IBY__
+
+//Test Includes
+#include <rom\haitests\t_screen_binaries.iby>
+#include <rom\haitests\t_screen_testdata.iby>
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/group/t_screen.oby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#define BASE_ROM
+#include <rom\##VARIANT##\header.iby>
+
+files=
+
+#include <rom\##VARIANT##\kernel.iby>
+#include "user.iby"
+#include <rom\hal\hal.iby>
+#include <rom\f32\f32.iby>
+
+//TEF Includes
+#include <rom\include\base_testexecutelite.iby>
+
+// Tests
+#include <rom\haitests\t_screen.iby>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/group/t_screen_binaries.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,26 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_SCREEN_BINARIES_IBY__)
+#define __T_SCREEN_BINARIES_IBY__
+
+#if (!defined EKA2)
+file=\epoc32\release\##MAIN##\##BUILD##\t_screen.exe		sys\bin\t_screen.exe
+#else
+file=\epoc32\release\##MAIN##\##BUILD##\t_screen.exe		sys\bin\t_screen.exe
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/group/t_screen_testdata.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,34 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_SCREEN_TESTDATA_IBY__)
+#define __T_SCREEN_TESTDATA_IBY__
+
+#include "t_prompt.iby"
+
+data=EPOCROOT##epoc32\data\z\base\screen\base-bsp-screen-driver.script						base\screen\base-bsp-screen-driver.script
+data=EPOCROOT##epoc32\data\z\base\screen\base-bsp-screen-driver-mode-automated.script		base\screen\base-bsp-screen-driver-mode-automated.script
+data=EPOCROOT##epoc32\data\z\base\screen\base-bsp-screen-driver-mode-manual.script			base\screen\base-bsp-screen-driver-mode-manual.script
+data=EPOCROOT##epoc32\data\z\base\screen\base-bsp-screen-driver-mode.ini					base\screen\base-bsp-screen-driver-mode.ini
+
+data=EPOCROOT##epoc32\data\z\base\screen\base-bsp-screen-driver-modeless-automated.script	base\screen\base-bsp-screen-driver-modeless-automated.script
+data=EPOCROOT##epoc32\data\z\base\screen\base-bsp-screen-driver-modeless.ini				base\screen\base-bsp-screen-driver-modeless.ini
+
+data=EPOCROOT##epoc32\release\armv5\##BUILD##\z\base\screen\t_screen.ini					base\screen\t_screen.ini
+data=EPOCROOT##epoc32\release\armv5\##BUILD##\z\base\screen\t_screen.tcs					base\screen\t_screen.tcs
+data=EPOCROOT##epoc32\data\z\base\t_screen.bat												base\t_screen.bat
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/group/user_input.oby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,38 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+file=\epoc32\release\armv5\urel\testexecutepipslogclient.dll						\sys\bin\testexecutepipslogclient.dll
+file=\epoc32\release\armv5\urel\testexecutelogclient.dll							\sys\bin\testexecutelogclient.dll
+file=\epoc32\release\armv5\urel\testexecutelogengine.exe							\sys\bin\testexecutelogengine.exe
+file=\epoc32\release\armv5\urel\iniparser.dll										\sys\bin\iniparser.dll
+file=\epoc32\release\armv5\urel\rfileloggerclient.dll								\sys\bin\rfileloggerclient.dll
+file=\epoc32\release\armv5\urel\rfileloggerserver.exe								\sys\bin\rfileloggerserver.exe
+file=\epoc32\release\armv5\urel\testexecute.exe										\sys\bin\testexecute.exe
+file=\epoc32\release\armv5\urel\testexecuteutils.dll								\sys\bin\testexecuteutils.dll
+file=\epoc32\release\armv5\urel\wrapperutilsplugin.dll								\sys\bin\wrapperutilsplugin.dll
+data=\epoc32\data\z\system\data\testexecute.ini										\system\data\testexecute.ini
+
+file=\epoc32\release\armv5\urel\t_screen.exe										\sys\bin\t_screen.exe
+data=\epoc32\data\z\base\screen\base-bsp-screen-driver.script						\base\screen\base-bsp-screen-driver.script
+data=\epoc32\data\z\base\screen\base-bsp-screen-driver-mode.script					\base\screen\base-bsp-screen-driver-mode.script
+data=\epoc32\data\z\base\screen\base-bsp-screen-driver-mode.ini						\base\screen\base-bsp-screen-driver-mode.ini
+data=\epoc32\data\z\base\screen\base-bsp-screen-driver-modeless.script				\base\screen\base-bsp-screen-driver-modeless.script
+data=\epoc32\data\z\base\screen\base-bsp-screen-driver-modeless.ini			   	 \base\screen\base-bsp-screen-driver-modeless.ini
+data=\epoc32\release\armv5\urel\z\base\screen\t_screen.ini					    			\base\screen\t_screen.ini
+data=\epoc32\release\armv5\urel\z\base\screen\t_screen.tcs					    			\base\screen\t_screen.tcs
+data=\epoc32\release\armv5\urel\z\base\screen\t_screen_build_map.ini						\base\screen\t_screen_build_map.ini
+data=\epoc32\data\z\base\t_screen.bat												\base\t_screen.bat
+data=\epoc32\data\z\base\t_screen.bat												\salt.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/group/user_romfiles.txt	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,20 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+testexecutepipslogclient.dll
+ocspcommon.dll
+iniparser.dll
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/inc/T_ScreenDriverData.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,128 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_SCREEN_DRIVER_DATA_H__)
+#define __T_SCREEN_DRIVER_DATA_H__
+
+
+//	User Includes
+#include "T_HALData.h"
+
+/**
+ * Test Active Notification class
+ *
+ */
+class CT_ScreenDriverData : public CT_HALData
+	{
+public:
+	/**
+	* Public destructor
+	*/
+	~CT_ScreenDriverData();
+
+	/**
+	* Two phase constructor
+	*
+	* @leave	system wide error
+	*/
+	static	CT_ScreenDriverData*	NewL();
+
+	virtual TAny*	GetObject();
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	/**
+	* Protected constructor. First phase construction
+	*/
+	CT_ScreenDriverData();
+
+	void	ConstructL();
+
+	static TBool	GetPrepareColorIndex(CDataWrapperBase* aThis, const TDesC& aSection, TInt& aValueStart, TInt& aValueEnd);
+	static TBool	GetPrepareDisplayMode(CDataWrapperBase* aThis, const TDesC& aSection, TInt& aValueStart, TInt& aValueEnd);
+
+	static void		SetDisplayState(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetBacklightState(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetBacklight(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayMaxBrightness(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayBrightness(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayMaxContrast(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayContrast(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayMemoryAddress(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayIsPixelOrderRGB(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayIsPixelOrderLandscape(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayMode(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayNumModes(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayColors(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayPaletteEntry(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayXPixels(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayYPixels(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayXTwips(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayYTwips(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayBitsPerPixel(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayOffsetToFirstPixel(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayOffsetBetweenLines(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayIsPalettized(CDataWrapperBase* aThis, TInt aValue);
+	static void		SetDisplayNumberOfScreens(CDataWrapperBase* aThis, TInt aValue);
+
+private:
+	void	DoCmdUtilityFillColorL(const TDesC& aSection);
+	void	DoCmdUtilityFillMultiColorL(const TDesC& aSection);
+	void	DoCmdUtilityMovingRectangleL(const TDesC& aSection);
+	void	DoCmdUtilityFillHorizontalStripL(const TDesC& aSection);
+	void	DoCmdUtilityFillVerticalStripL(const TDesC& aSection);
+
+	//	Screen Driver Utils
+	TBool	GetRgbFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TUint& aRed, TUint& aGreen, TUint& aBlue, TUint& aAlpha);
+	TBool	GetRgbFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aRed, TInt& aGreen, TInt& aBlue, TInt& aAlpha);
+	TBool	GetColorFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TUint& aColor, TPtrC& aLogColor);
+	void	DrawLine(TUint aColor, TUint8* aMemoryAddress, TInt aLeftMargin, TInt aPixels);
+
+protected:
+	TInt			iDisplayState;
+	TInt			iBacklightState;
+	TInt			iBacklight;
+	TInt			iDisplayMaxBrightness;
+	TInt			iDisplayBrightness;
+	TInt			iDisplayMaxContrast;
+	TInt			iDisplayContrast;
+	TUint8*			iDisplayMemoryAddress;
+	TInt			iDisplayIsPixelOrderRGB;
+	TInt			iDisplayIsPixelOrderLandscape;
+	TInt			iDisplayMode;
+	TInt			iDisplayNumModes;
+	TInt			iDisplayColors;
+	TInt			iDisplayPaletteEntry;
+	TInt			iDisplayXPixels;
+	TInt			iDisplayYPixels;
+	TInt			iDisplayXTwips;
+	TInt			iDisplayYTwips;
+	TInt			iDisplayBitsPerPixel;
+	TInt			iDisplayOffsetToFirstPixel;
+	TInt			iDisplayOffsetBetweenLines;
+	TBool			iDisplayIsPalettized;
+	TInt			iDisplayNumberOfScreens;
+
+	//	Color palette
+	RArray<TInt>	iPalette;
+
+private:
+	static const THalTableLookup	iTableLookup[];
+	};
+
+#endif /* __T_SCREEN_DRIVER_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/inc/T_ScreenDriverServer.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_SCREEN_DRIVER_SERVER_H__)
+#define __T_SCREEN_DRIVER_SERVER_H__
+
+//	EPOC Includes
+#include <testserver2.h>
+
+// This wrapper class extends the test server and creates test server for screen driver
+class CT_ScreenDriverServer : public CTestServer2
+	{
+private:
+	class CT_ScreenDriverBlock : public CTestBlockController
+		{
+	public:
+		inline CT_ScreenDriverBlock();
+		inline ~CT_ScreenDriverBlock();
+
+		CDataWrapper*	CreateDataL( const TDesC& aData );
+		};
+
+public:
+	inline ~CT_ScreenDriverServer();
+
+	inline void	DeleteActiveSchedulerL();
+
+	static CT_ScreenDriverServer* NewL();
+
+	inline CTestBlockController*	CreateTestBlock();
+
+protected:
+	inline CT_ScreenDriverServer();
+	};
+
+#include "T_ScreenDriverServer.inl"
+
+#endif /* __T_SCREEN_DRIVER_SERVER_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/inc/T_ScreenDriverServer.inl	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+CT_ScreenDriverServer::CT_ScreenDriverBlock::CT_ScreenDriverBlock()
+:	CTestBlockController()
+	{
+	}
+
+CT_ScreenDriverServer::CT_ScreenDriverBlock::~CT_ScreenDriverBlock()
+	{
+	}
+
+CT_ScreenDriverServer::CT_ScreenDriverServer()
+	{
+	}
+
+CT_ScreenDriverServer::~CT_ScreenDriverServer()
+	{
+	}
+
+void CT_ScreenDriverServer::DeleteActiveSchedulerL()
+	{
+	}
+
+CTestBlockController* CT_ScreenDriverServer::CreateTestBlock()
+	{
+	return new CT_ScreenDriverBlock();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/pkg/t_screen.bat	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,17 @@
+@rem
+@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+testexecute z:\base\screen\base-bsp-screen-driver.script -tcx z:\base\screen\t_screen.tcs
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/scripts/base-bsp-screen-driver-mode-automated.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,352 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//! @file
+//! @SYMTestSuiteName  BASE-BSP-SCREEN-DRIVER-MODE_AUTOMATED
+//! @SYMScriptTestEnvironment This test script requires a base rom image
+
+
+/////////////////////////////////////////////////////////////////////
+// BASE-BSP-SCREEN-DRIVER-MODE_AUTOMATED.script
+//
+// Tests public LCD attributes through HAL class
+// as a means of confidence that the HAI APIs work as expected.
+//
+// Tests are validated through HAL::Get value to check set values and some values are validated
+// against Env (t_screen.ini) file
+//
+// The purpose is to provide a regression test suite for TDisplayHalFunction.
+// Negative testing is performed to confirm that correct errors are returned when incorrect parameters are given.
+// The tests are fully automated.
+/////////////////////////////////////////////////////////////////////
+
+LOAD_SUITE	T_Screen
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-AUTOMATED-0001
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-AUTOMATED-0001
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			John Bower
+//! @SYMCreationDate		16/06/2008
+//! @SYMTestCaseDesc		Verify Memory Address - Attain memory address of video and verify it is the same as 
+//!				specified value in configuration file
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.
+//!				2. Get the display Mode
+//!				3. Get Screen horizontal dimension in pixels
+//!				4. Get Screen vertical dimension in pixels
+//!				5. Get Address of Display Memory
+//!				6. Get Offset between lines
+//!				7. Get Display offset to the first pixel
+//!				8. Get Display Bits per pixel
+//!				9. Get palettized flag
+//!				10.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-Test-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-Test-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-Test-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-Test-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-Test-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-Test-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-Test-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-Test-EDisplayIsPalettized
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-AUTOMATED-0001
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_AUTOMATED-0001
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_AUTOMATED-0001
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			John Bower
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Verify Memory Address - Attain memory address of video and verify it is the same as 
+//!				specified value in configuration file
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.
+//!				2. Get the display Mode
+//!				3. Get Screen horizontal dimension in pixels
+//!				4. Get Screen vertical dimension in pixels
+//!				5. Get Address of Display Memory
+//!				6. Get Offset between lines
+//!				7. Get Display offset to the first pixel
+//!				8. Get Display Bits per pixel
+//!				9. Get palettized flag
+//!				10.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayIsPalettized
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_AUTOMATED-0001
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_AUTOMATED-0001
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_AUTOMATED-0001
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			John Bower
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Verify Memory Address - Attain memory address of video and verify it is the same as 
+//!				specified value in configuration file and set display mode0
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.
+//!				2. Set the display Mode
+//!				3. Get Screen horizontal dimension in pixels
+//!				4. Get Screen vertical dimension in pixels
+//!				5. Get Address of Display Memory
+//!				6. Get Offset between lines
+//!				7. Get Display offset to the first pixel
+//!				8. Get Display Bits per pixel
+//!				9. Get palettized flag
+//!				10.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-Test-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-Test-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-Test-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-Test-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-Test-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-Test-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-Test-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-Test-EDisplayIsPalettized
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayMode
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_AUTOMATED-0001
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_AUTOMATED-0001
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_AUTOMATED-0001
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			John Bower
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Verify Memory Address - Attain memory address of video and verify it is the same as 
+//!				specified value in configuration file and set display mode1
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.
+//!				2. Set the display Mode
+//!				3. Get Screen horizontal dimension in pixels
+//!				4. Get Screen vertical dimension in pixels
+//!				5. Get Address of Display Memory
+//!				6. Get Offset between lines
+//!				7. Get Display offset to the first pixel
+//!				8. Get Display Bits per pixel
+//!				9. Get palettized flag
+//!				10.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-Test-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-Test-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-Test-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-Test-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-Test-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-Test-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-Test-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-Test-EDisplayIsPalettized
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayMode
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_AUTOMATED-0001
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_AUTOMATED-0001
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_AUTOMATED-0001
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			John Bower
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Verify Memory Address - Attain memory address of video and verify it is the same as 
+//!				specified value in configuration file and set display mode2
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.
+//!				2. Set the display Mode
+//!				3. Get Screen horizontal dimension in pixels
+//!				4. Get Screen vertical dimension in pixels
+//!				5. Get Address of Display Memory
+//!				6. Get Offset between lines
+//!				7. Get Display offset to the first pixel
+//!				8. Get Display Bits per pixel
+//!				9. Get palettized flag
+//!				10.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-Test-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-Test-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-Test-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-Test-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-Test-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-Test-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-Test-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-Test-EDisplayIsPalettized
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayMode
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_AUTOMATED-0001
+
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_AUTOMATED-0001
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_AUTOMATED-0001
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			John Bower
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Verify Memory Address - Attain memory address of video and verify it is the same as 
+//!				specified value in configuration file and set display mode3
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.
+//!				2. Set the display Mode
+//!				3. Get Screen horizontal dimension in pixels
+//!				4. Get Screen vertical dimension in pixels
+//!				5. Get Address of Display Memory
+//!				6. Get Offset between lines
+//!				7. Get Display offset to the first pixel
+//!				8. Get Display Bits per pixel
+//!				9. Get palettized flag
+//!				10.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-Test-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-Test-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-Test-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-Test-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-Test-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-Test-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-Test-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-Test-EDisplayIsPalettized
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayMode
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_AUTOMATED-0001
+
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_AUTOMATED-0001
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_AUTOMATED-0001
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			John Bower
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Verify Memory Address - Attain memory address of video and verify it is the same as 
+//!				specified value in configuration file and set display mode4
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.
+//!				2. Set the display Mode
+//!				3. Get Screen horizontal dimension in pixels
+//!				4. Get Screen vertical dimension in pixels
+//!				5. Get Address of Display Memory
+//!				6. Get Offset between lines
+//!				7. Get Display offset to the first pixel
+//!				8. Get Display Bits per pixel
+//!				9. Get palettized flag
+//!				10.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-Test-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-Test-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-Test-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-Test-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-Test-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-Test-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-Test-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-Test-EDisplayIsPalettized
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayMode
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_AUTOMATED-0001
+
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_AUTOMATED-0001
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN1_AUTOMATED-0001
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			John Bower			
+//! @SYMCreationDate		16/06/2008
+//! @SYMTestCaseDesc		Verify Memory Address - Attain memory address of video and verify it is the same as 
+//!				specified value in configuration file
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.
+//!				2. Get the display Mode
+//!				3. Get Screen horizontal dimension in pixels
+//!				4. Get Screen vertical dimension in pixels
+//!				5. Get Address of Display Memory
+//!				6. Get Offset between lines
+//!				7. Get Display offset to the first pixel
+//!				8. Get Display Bits per pixel
+//!				9. Get palettized flag
+//!				10.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Memory address from configuration file matches the one attained through HAL::GET
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-Test-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-Test-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-Test-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-Test-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-Test-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-Test-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-Test-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-Test-EDisplayIsPalettized
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_AUTOMATED-0001
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/scripts/base-bsp-screen-driver-mode-manual.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,3128 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//! @file
+//! @SYMTestSuiteName  BASE-BSP-SCREEN-DRIVER-MODE_MANUAL
+//! @SYMScriptTestEnvironment This test script requires a base rom image
+
+
+/////////////////////////////////////////////////////////////////////
+// BASE-BSP-SCREEN-DRIVER-MODE_MANUAL.script
+//
+// Tests public LCD attributes through HAL class 
+// as a means of confidence that the HAI APIs work as expected.
+//
+// Tests are validated through HAL::Get value to check Get values and some values are validated
+// against Env (t_screen.ini) file
+//
+// The purpose is to provide a regression test suite for TDisplayHalFunction.
+// Negative testing is performed to confirm that correct errors are returned when incorrect parameters are given.
+// The tests are fully manual.
+/////////////////////////////////////////////////////////////////////
+
+LOAD_SUITE	T_Screen
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0002
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MANUAL-0002
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode  and fill the screen with Red colour.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Red color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-RedPromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-0002-utilityFillColor
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0002
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0003
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MANUAL-0003
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode  and fill the screen with Green colour.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Green color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Green colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-GreenPromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-0003-utilityFillColor
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0003
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0004
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MANUAL-0004
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode and fill the screen with Blue colour.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Blue color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Blue colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-BluePromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-0004-utilityFillColor
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0004
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0005
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MANUAL-0005
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode and fill the screen with White colour.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in White color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	White colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-WhitePromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-0005-utilityFillColor  
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0005
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0006
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MANUAL-0006
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode and fill the screen with Black color.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Black color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Black colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	utilityPromptMessage		BASE-BSP-SCREEN-DRIVER-BlackPromptMessage  
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-0006-utilityFillColor
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0006
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0007
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MANUAL-0007
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode and fill the screen with mutiple colors.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red, white, and green colours on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-MultiColourPromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillMultiColor	BASE-BSP-SCREEN-DRIVER-0007-utilityFillMultiColor
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0007
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0008
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MANUAL-0008
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode and draw a moving rectangle along the
+//!				perimeter of the screen
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red, white, and green colours on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-MovingRectanglePromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayIsPalettized
+		COMMAND		lcd1	utilityMovingRectangle	BASE-BSP-SCREEN-DRIVER-0008-utilityMovingRectangle
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0008
+
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0009
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MANUAL-0009
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Nirmala Bailur
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode and fill the screen with mutiple color horizontal strips.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	multiple color horizontal strips on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-HorizontalStripPromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillHorizontalStrip	BASE-BSP-SCREEN-DRIVER-0009-utilityFillHorizontalStrip
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0009
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0010
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MANUAL-0010
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Nirmala Bailur
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode and fill the screen with mutiple color veritical strips.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	multiple color verical strips on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-VerticalStripPromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillVerticalStrip	BASE-BSP-SCREEN-DRIVER-0010-utilityFillVerticalStrip
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-MANUAL-0010
+
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0002
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0002
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode and fill the screen0 with Red colour.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Red color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-RedPromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0-0002-utilityFillColor
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0002
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0003
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0003
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode  and fill the screen0 with Green colour.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Green color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Green colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-GreenPromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0-0003-utilityFillColor
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0003
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0004
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0004
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode  and fill the screen0 with Blue colour.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Blue color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Blue colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-BluePromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0-0004-utilityFillColor
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0004
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0005
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0005
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode  and fill the screen0 with White colour.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in White color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	White colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-WhitePromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0-0005-utilityFillColor
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0005
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0006
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0006
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode and fill the screen0 with Black color.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Black color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Black colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	utilityPromptMessage		BASE-BSP-SCREEN-DRIVER-BlackPromptMessage  
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0-0006-utilityFillColor
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0006
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0007
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0007
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode and fill the screen0 with mutiple colors.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red, white, and green colours on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-MultiColourPromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillMultiColor	BASE-BSP-SCREEN-DRIVER-SCREEN0-0007-utilityFillMultiColor
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0007
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0008
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0008
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode and draw a moving rectangle along the
+//!				perimeter of the screen
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red, white, and green colours on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-MovingRectanglePromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityMovingRectangle	BASE-BSP-SCREEN-DRIVER-SCREEN0-0008-utilityMovingRectangle
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0008
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0009
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0009
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Nirmala Bailur
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode and fill the screen0 with mutiple color horizontal strips.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	multiple color horizontal strips on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-HorizontalStripPromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillHorizontalStrip	BASE-BSP-SCREEN-DRIVER-SCREEN0-0009-utilityFillHorizontalStrip
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0009
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0010
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0010
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Nirmala Bailur
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode and fill the screen0 with mutiple color veritical strips.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	multiple color verical strips on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-VerticalStripPromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillVerticalStrip	BASE-BSP-SCREEN-DRIVER-SCREEN0-0010-utilityFillVerticalStrip
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MANUAL-0010
+
+
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0002
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0002
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode0 and fill the screen0 with Red colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Red color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-RedPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0002-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0002
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0003
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0003
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode0  and fill the screen0 with Green colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Green color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Green colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-GreenPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0003-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0003
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0004
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0004
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode0  and fill the screen0 with Blue colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Blue color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Blue colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-BluePromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0004-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0004
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0005
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0005
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode  and fill the screen0 with White colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in White color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	White colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-WhitePromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0005-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0005
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0006
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0006
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode0 and fill the screen0 with Black color.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Black color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Black colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	utilityPromptMessage		BASE-BSP-SCREEN-DRIVER-BlackPromptMessage  
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0006-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0006
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0007
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0007
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the Display Mode0 and fill the screen0 with mutiple colors.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red, white, and green colours on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-MultiColourPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillMultiColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0007-utilityFillMultiColor
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0007
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0008
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0008
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the display Mode0 and draw a moving rectangle along the
+//!				perimeter of the screen
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red, white, and green colours on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-MovingRectanglePromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityMovingRectangle	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0008-utilityMovingRectangle
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0008
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0009
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0009
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Nirmala Bailur
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the Display Mode0 and fill the screen0 with mutiple color horizontal strips.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	multiple color horizontal strips on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-HorizontalStripPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillHorizontalStrip	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0009-utilityFillHorizontalStrip
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0009
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0010
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0010
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Nirmala Bailur
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the Display Mode0 and fill the screen0 with mutiple color veritical strips.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	multiple color verical strips on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-VerticalStripPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillVerticalStrip	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0010-utilityFillVerticalStrip
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0010
+
+
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0002
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0002
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode1 and fill the screen0 with Red colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Red color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-RedPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0002-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0002
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0003
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0003
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode1  and fill the screen0 with Green colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Green color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Green colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-GreenPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0003-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0003
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0004
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0004
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode1  and fill the screen0 with Blue colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Blue color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Blue colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-BluePromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0004-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0004
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0005
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0005
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode1  and fill the screen0 with White colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in White color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	White colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-WhitePromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0005-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0005
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0006
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0006
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode1 and fill the screen0 with Black color.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Black color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Black colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	utilityPromptMessage		BASE-BSP-SCREEN-DRIVER-BlackPromptMessage  
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0006-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0006
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0007
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0007
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the Display Mode1 and fill the screen0 with mutiple colors.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red, white, and green colours on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-MultiColourPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillMultiColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0007-utilityFillMultiColor
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0007
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0008
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0008
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the display Mode0 and draw a moving rectangle along the
+//!				perimeter of the screen
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red, white, and green colours on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-MovingRectanglePromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityMovingRectangle	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0008-utilityMovingRectangle
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0008
+
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0009
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0009
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Nirmala Bailur
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the Display Mode1 and fill the screen0 with mutiple color horizontal strips.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	multiple color horizontal strips on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-HorizontalStripPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillHorizontalStrip	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0009-utilityFillHorizontalStrip
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0009
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0010
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0010
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Nirmala Bailur
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the Display Mode0 and fill the screen0 with mutiple color veritical strips.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	multiple color verical strips on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-VerticalStripPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillVerticalStrip	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0010-utilityFillVerticalStrip
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0010
+
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0002
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0002
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode 2 and fill the screen with Red colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Red color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-RedPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0002-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0002
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0003
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0003
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode 2 and fill the screen with Green colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Green color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Green colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-GreenPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0003-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0003
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0004
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0004
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode 2 and fill the screen with Blue colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Blue color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Blue colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-BluePromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0004-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0004
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0005
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0005
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode 2 and fill the screen with White colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in White color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	White colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-WhitePromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0005-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0005
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0006
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0006
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode 2 and fill the screen with Black color.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Black color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Black colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	utilityPromptMessage		BASE-BSP-SCREEN-DRIVER-BlackPromptMessage  
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0006-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0006
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0007
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0007
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the Display Mode2 and fill the screen0 with mutiple colors.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red, white, and green colours on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-MultiColourPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillMultiColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0007-utilityFillMultiColor
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0007
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0008
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0008
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the display Mode2 and draw a moving rectangle along the
+//!				perimeter of the screen
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red, white, and green colours on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-MovingRectanglePromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayIsPalettized
+		COMMAND		lcd1	utilityMovingRectangle	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0008-utilityMovingRectangle
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0008
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0009
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0009
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Nirmala Bailur
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the Display Mode2 and fill the screen0 with mutiple color horizontal strips.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	multiple color horizontal strips on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-HorizontalStripPromptMessage
+        	COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillHorizontalStrip	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0009-utilityFillHorizontalStrip
+	        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0009
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0010
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0010
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Nirmala Bailur
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the Display Mode2 and fill the screen0 with mutiple color veritical strips.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	multiple color verical strips on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-VerticalStripPromptMessage
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillVerticalStrip	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0010-utilityFillVerticalStrip
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0010
+
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0002
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0002
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode 3 and fill the screen with Red colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Red color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-RedPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0002-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0002
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0003
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0003
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode 3 and fill the screen with Green colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Green color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Green colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-GreenPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0003-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0003
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0004
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0004
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode 3 and fill the screen with Blue colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Blue color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Blue colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-BluePromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMode
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0004-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0004
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0005
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0005
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode 3 and fill the screen with White colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in White color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	White colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-WhitePromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0005-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0005
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0006
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0006
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode 3 and fill the screen with Black color.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Black color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Black colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	utilityPromptMessage		BASE-BSP-SCREEN-DRIVER-BlackPromptMessage  
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0006-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0006
+
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0007
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0007
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the Display Mode3 and fill the screen0 with mutiple colors.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red, white, and green colours on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-MultiColourPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillMultiColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0007-utilityFillMultiColor
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0007
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0008
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0008
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the display Mode3 and draw a moving rectangle along the
+//!				perimeter of the screen
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red, white, and green colours on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-MovingRectanglePromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayIsPalettized
+		COMMAND		lcd1	utilityMovingRectangle	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0008-utilityMovingRectangle
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0008
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0009
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0009
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Nirmala Bailur
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the Display Mode3 and fill the screen0 with mutiple color horizontal strips.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	multiple color horizontal strips on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-HorizontalStripPromptMessage
+       	COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillHorizontalStrip	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0009-utilityFillHorizontalStrip
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0009
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0010
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0010
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Nirmala Bailur
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the Display Mode3 and fill the screen0 with mutiple color veritical strips.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	multiple color verical strips on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-VerticalStripPromptMessage
+       	COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillVerticalStrip	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0010-utilityFillVerticalStrip
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0010
+
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0002
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0002
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode 4 and fill the screen with Red colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Red color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-RedPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0002-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0002
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0003
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0003
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode 4 and fill the screen with Green colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Green color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Green colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-GreenPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0003-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0003
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0004
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0004
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode 4 and fill the screen with Blue colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Blue color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Blue colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-BluePromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0004-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0004
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0005
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0005
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode 4 and fill the screen with White colour.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in White color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	White colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-WhitePromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0005-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0005
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0006
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0006
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Set Display Mode 4 and fill the screen with Black color.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Black color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Black colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	utilityPromptMessage		BASE-BSP-SCREEN-DRIVER-BlackPromptMessage  
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0006-utilityFillColor
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0006
+
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0007
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0007
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the Display Mode4 and fill the screen0 with mutiple colors.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red, white, and green colours on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-MultiColourPromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillMultiColor	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0007-utilityFillMultiColor
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0007
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0008
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0008
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the display Mode4 and draw a moving rectangle along the
+//!				perimeter of the screen
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red, white, and green colours on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-MovingRectanglePromptMessage
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayIsPalettized
+		COMMAND		lcd1	utilityMovingRectangle	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0008-utilityMovingRectangle
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0008
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0009
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0009
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Nirmala Bailur
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the Display Mode4 and fill the screen0 with mutiple color horizontal strips.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	multiple color horizontal strips on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-HorizontalStripPromptMessage
+	       	COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillHorizontalStrip	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0009-utilityFillHorizontalStrip
+	        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0009
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0010
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0010
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Nirmala Bailur
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the Display Mode4 and fill the screen0 with mutiple color veritical strips.
+//!				Uses API elements:
+//!				HAL::Set, EDisplayMode
+//!				HAL::Get, EDisplayHalSetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Set the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get Offset between lines
+//!				8. Get Display offset to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	multiple color verical strips on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-VerticalStripPromptMessage
+       	COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillVerticalStrip	BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0010-utilityFillVerticalStrip
+        COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0010
+
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0002
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0002
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Get Display Mode  and fill the screen with Red colour.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Red color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-RedPromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN1-0002-utilityFillColor
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0002
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0003
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0003
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Get Display Mode  and fill the screen with Green colour.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Green color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Green colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-GreenPromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN1-0003-utilityFillColor
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0003
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0004
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0004
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Get Display Mode and fill the screen with Blue colour.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Blue color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Blue colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-BluePromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN1-0004-utilityFillColor
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0004
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0005
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0005
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Get Display Mode  and fill the screen with White colour.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in White color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	White colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-WhitePromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN1-0005-utilityFillColor
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0005
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0006
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0006
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Colour Test - Get Display Mode  and fill the screen with Black color.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in Black color
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Black colour on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	utilityPromptMessage		BASE-BSP-SCREEN-DRIVER-BlackPromptMessage  
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillColor	BASE-BSP-SCREEN-DRIVER-SCREEN1-0006-utilityFillColor
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0006
+
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0007
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0007
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the screen1 with mutiple colors.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red, white, and green colours on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-MultiColourPromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillMultiColor	BASE-BSP-SCREEN-DRIVER-SCREEN1-0007-utilityFillMultiColor
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0007
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0008
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0008
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the Screen1 and draw a moving rectangle along the
+//!				perimeter of the screen
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Red, white, and green colours on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-MovingRectanglePromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityMovingRectangle	BASE-BSP-SCREEN-DRIVER-SCREEN1-0008-utilityMovingRectangle
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0008
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0009
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0009
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Nirmala Bailur
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode and fill the screen1 with mutiple color horizontal strips.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	multiple color horizontal strips on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-HorizontalStripPromptMessage
+        COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillHorizontalStrip	BASE-BSP-SCREEN-DRIVER-SCREEN1-0009-utilityFillHorizontalStrip
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0009
+
+START_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0010
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0010
+//! @SYMAPI			Hal::Get(EDisplayMode)
+//! @SYMAuthor			Nirmala Bailur
+//! @SYMCreationDate		21/01/2008
+//! @SYMTestCaseDesc		Display Colour Test - Use the default Display Mode and fill the screen1 with mutiple color veritical strips.
+//!				Uses API elements:
+//!				HAL::Get, EDisplayMode
+//!				HAL::Get, EDisplayHalGetMode, EDisplayXPixels, EDisplayYPixels
+//!					EDisplayMemoryAddress, EDisplayOffsetBetweenLines, EDisplayOffsetToFirstPixel
+//!					EDisplayBitsPerPixel, EDisplayIsPalettized
+//! @SYMTestActions    		1. Create Hal Handle object.  2.provide user instructions
+//!				3. Get the display Mode
+//!				4. Get Screen horizontal dimension in pixels
+//!				5. Get Screen vertical dimension in pixels
+//!				6. Get Address of Display Memory
+//!				7. Get OffGet between lines
+//!				8. Get Display offGet to the first pixel
+//!				9. Get Display Bits per pixel
+//!				10. Get palettized flag
+//!				11. Fill the screen in red, white and green colors
+//!				12. Request user validation   13. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	multiple color verical strips on the screen.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODE.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1 	utilityPromptMessage	BASE-BSP-SCREEN-DRIVER-VerticalStripPromptMessage
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMode
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayXPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayYPixels
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMemoryAddress
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetBetweenLines
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetToFirstPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayBitsPerPixel
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayIsPalettized
+		COMMAND		lcd1	utilityFillVerticalStrip	BASE-BSP-SCREEN-DRIVER-SCREEN1-0010-utilityFillVerticalStrip
+		COMMAND		lcd1 	utilityPromptMessage    BASE-BSP-SCREEN-DRIVER-PromptMessage
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0010
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/scripts/base-bsp-screen-driver-modeless-automated.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,545 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE	T_Screen
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0001
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0001
+//! @SYMAPI			Hal::Set(EDisplayState)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display State Test - Set the Display State OFF on the Screen.
+//!				Uses API elements: HAL::Set, EDisplayHalSetState
+//! @SYMTestActions		1. Create Hal Handle object. 2. Set the display state OFF 3.Get the display state and check it is off
+//!				4.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	display state OFF
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-MODELESS-0001-DisplayState
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-MODELESS-0001-DisplayState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0001
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0002
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0002
+//! @SYMAPI			Hal::Set(EDisplayState)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display State Test - Set the Display State ON on the Screen.
+//!				Uses API elements: HAL::Set, EDisplayHalSetState
+//! @SYMTestActions		1. Create Hal Handle object. 2. Set the display state ON 3.Get the display state and check it is on
+//!				4.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	display state ON
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-MODELESS-0002-DisplayState
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-MODELESS-0002-DisplayState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0002
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0003
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0003
+//! @SYMAPI			Hal::Set(EBacklightState)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Backlight Test - Set Backlight state to OFF
+//!				Uses API elements: HAL::Set, EBacklightState
+//! @SYMTestActions		1. Create Hal Handle object. 2. Set the Backlight state OFF 3.Get the backlight state and check it is off
+//!				4.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Backlight state OFF
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-MODELESS-0003-BacklightState
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-MODELESS-0003-BacklightState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0003
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0004
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0004
+//! @SYMAPI			Hal::Set(EBacklightState)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Backlight Test - Set Backlight state to ON
+//!				Uses API elements: HAL::Set, EBacklightState
+//! @SYMTestActions		1. Create Hal Handle object. 2. Set the Backlight state ON 3.Get the backlight state and check it is off
+//!				4.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Backlight state ON
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-MODELESS-0004-BacklightState
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-MODELESS-0004-BacklightState
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0004
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0005
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0005
+//! @SYMAPI			Hal::Get(EDisplayBrightnessMax)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Max Brightness Test - Read Max Display Brightness
+//!				Uses API elements: HAL::Get, EDisplayBrightness, EDisplayBrightnessMax
+//! @SYMTestActions		1.Create Hal Handle object 2.Get the Max Display Brightness and check it with Env file
+//!				3.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Display the Max Brightness Value
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-MODELESS-0005-DisplayBrightness
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0005
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0006
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0006
+//! @SYMAPI			Hal::Set(EDisplayBrightness)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Brightness Negative Test - Set Display Brightness less than Minimun.
+//!				Uses API elements: HAL::Set, EDisplayHalSetDisplayBrightness
+//! @SYMTestActions		1.Create Hal Handle object.3.Set the Display Brightness -1.
+//!				4.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrArgument
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-6	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0006-DisplayBrightness
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0006
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0007
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0007
+//! @SYMAPI			Hal::Set(EDisplayBrightness)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Brightness Negative Test - Set Display Brightness more than Max.
+//!				Uses API elements: HAL::Set, EDisplayHalSetDisplayBrightness
+//! @SYMTestActions		1.Create Hal Handle object.2. Get the Max Brightness value
+//!				3.Set the Display Brightness more than Max 4.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrArgument
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-6	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0007-DisplayBrightness
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0007
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0008
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0008
+//! @SYMAPI			Hal::Set(EDisplayBrightnessMax)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Max Brightness Negative Test - Set Max Display Brightness
+//!				Uses API elements: HAL::Set, EDisplayBrightness, EDisplayBrightnessMax
+//! @SYMTestActions		1.Create Hal Handle object.3.Set the Max Display Brightness.
+//!				3.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrNotSupported - Hal Set unsupported for Max Display Brightness
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-5	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0008-DisplayBrightness
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0008
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0009
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0009
+//! @SYMAPI			Hal::Set(EDisplayContrastMax)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Max Contrast Test - Read Max Display Contrast
+//!				Uses API elements: HAL::Get, EDisplayContrast, EDisplayContrastMax
+//! @SYMTestActions		1.Create Hal Handle object.3.Get the Max Display Contrast.
+//!				3.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Display the Max Contrast Value
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-MODELESS-0009-DisplayContrast
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0009
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0010
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0010
+//! @SYMAPI			Hal::Set(EDisplayContrast)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Contrast Test - Set Display Contrast as 0.
+//!				Uses API elements: HAL::Set, EDisplayContrast, EDisplayContrastMax
+//! @SYMTestActions		1.Create Hal Handle object.2.Set the Display Contrast 0.
+//!				3.Get the value and check it 4.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	display Contrast 0.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-MODELESS-0010-DisplayContrast
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-MODELESS-0010-DisplayContrast
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0010
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0011
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0011
+//! @SYMAPI			Hal::Set(EDisplayContrast)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Contrast Test - Set Display Contrast as 8.
+//!				Uses API elements: HAL::Set, EDisplayContrast, EDisplayContrastMax
+//! @SYMTestActions		1.Create Hal Handle object 2.Set the Display Contrast 8.
+//!				3.Get the value and check it 4.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	display Contrast 8.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100	T_Screen		\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT	LCD	lcd1
+		COMMAND		lcd1	Set			BASE-BSP-SCREEN-DRIVER-MODELESS-0011-DisplayContrast
+		COMMAND		lcd1	Get			BASE-BSP-SCREEN-DRIVER-MODELESS-0011-DisplayContrast
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0011
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0012
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0012
+//! @SYMAPI			Hal::Set(EDisplayContrast)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Contrast Negative Test - Set Display Contrast less than Minimun.
+//!				Uses API elements: HAL::Set, EDisplayHalSetDisplayContrast
+//! @SYMTestActions		1.Create Hal Handle object.3.Set the Display Contrast -1.
+//!				4.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrArgument.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-6	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0012-DisplayContrast
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0012
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0013
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0013
+//! @SYMAPI			Hal::Set(EDisplayContrast)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Contrast Negative Test - Set Display Contrast more than Max.
+//!				Uses API elements: HAL::Set, EDisplayHalSetDisplayContrast
+//! @SYMTestActions		1.Create Hal Handle object.2. Get the Max Contrast value
+//!				3.Set the Display Contrast more than Max 4.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrArgument
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-6	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0013-DisplayContrast
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0013
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0014
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0014
+//! @SYMAPI			Hal::Set(EDisplayContrastMax)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Max Contrast Negative Test - Set Max Display Contrast
+//!				Uses API elements: HAL::Set, EDisplayContrast, EDisplayContrastMax
+//! @SYMTestActions		1.Create Hal Handle object.3.Set the Max Display Contrast.
+//!				3.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrNotSupported - Hal Set unsupported for Max Display Contrast
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-5	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0014-DisplayContrast
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0014
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0015
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0015
+//! @SYMAPI			Hal::Get(EDisplayIsPixelOrderRGB)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Pixel order Test - Verify the order of pixels in display
+//!				Uses API elements: HAL::Get, EDisplayIsPixelOrderRGB
+//! @SYMTestActions		1.Create Hal Handle object 2.Get the order of pixels and check it with env file
+//!				3.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	1 - order of pixels is in RGB
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-5	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0015-DisplayIsPixelOrderRGB
+		COMMAND			lcd1	Get		BASE-BSP-SCREEN-DRIVER-MODELESS-0015-DisplayIsPixelOrderRGB
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0015
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0016
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0016
+//! @SYMAPI			Hal::Get(EDisplayIsPixelOrderLandscape)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		PixelOrderLandscape Test - Verify the Pixel Order is landscape
+//!				Uses API elements: HAL::Get, EDisplayIsPixelOrderLandscape
+//! @SYMTestActions		1.Create Hal Handle object 2.Get the order of pixels and check it with env file
+//!				3.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	1 - landscape
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-5	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0016-DisplayIsPixelOrderLandscape
+		COMMAND			lcd1	Get		BASE-BSP-SCREEN-DRIVER-MODELESS-0016-DisplayIsPixelOrderLandscape
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0016
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0017
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0017
+//! @SYMAPI			Hal::Get(EDisplayNumModes)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Mode Test - Get Number of Display Mode supported.
+//!				Uses API elements: HAL::Get, EDisplayNumModes
+//! @SYMTestActions		1.Create Hal Handle object 2.Get the Number of Display Modes
+//!				3.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Number of dispaly mode supported check it with Env file.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-5	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0017-DisplayNumModes
+		COMMAND			lcd1	Get		BASE-BSP-SCREEN-DRIVER-MODELESS-0017-DisplayNumModes
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0017
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0018
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0018
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Mode Negative Test - Set Display Mode as 5.
+//!				Uses API elements: HAL::Set, EDisplayMode
+//! @SYMTestActions		1.Create Hal Handle object 2.Set the Display Mode 5
+//!				3.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrArgument
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-6	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0018-DisplayMode
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0018
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0019
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0019
+//! @SYMAPI			Hal::Set(EDisplayMode)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Display Mode Negative Test - Set Display Mode as -1.
+//!				Uses API elements: HAL::Set, EDisplayMode
+//! @SYMTestActions		1.Create Hal Handle object 2.Set the Display Mode -1.
+//!				3.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrArgument
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-6	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0019-DisplayMode
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0019
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0020
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0020
+//! @SYMAPI			Hal::Set(EDisplayMemoryAddress)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Try to set Display Memory address
+//!				Uses API elements: HAL::Get, EDisplayMemoryAddress,
+//! @SYMTestActions		1. Create Hal Handle object. 2.Get the Screen Address.
+//!				3. check the address in environment file 4.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrNotSupported - Hal Set unsupported for Set display screen linear address
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-5	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0020-DisplayMemoryAddress
+ 	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0020
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0021
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0021
+//! @SYMAPI			Hal::Set(EDisplayXPixels)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Try to set Screen Width
+//!				Uses API elements: EDisplayXPixels
+//! @SYMTestActions		1. Create Hal handle object 2.Get the screen width
+//!				3. Verify the screen width env file 4.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrNotSupported - Hal Set unsupported for Set display Screen Width
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-5	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0021-DisplayXPixels
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0021
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0022
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0022
+//! @SYMAPI			Hal::Set(EDisplayYPixels)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Try to set Screen Height
+//!				Uses API elements: EDisplayYPixels
+//! @SYMTestActions		1. Create Hal handle object 2.Get the screen Height
+//!				3. Verify the screen Height env file 4.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrNotSupported - Hal Set unsupported for Set display screen Height
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-5	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0022-DisplayYPixels
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0022
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0023
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0023
+//! @SYMAPI			Hal::Get(EDisplayNumModes)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Try to Set Number of Display Modes
+//!				Uses API elements: HAL::Get, EDisplayNumModes
+//! @SYMTestActions		1.Create Hal Handle object 2.Get the Number of Display Modes
+//!				3.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrNotSupported - Hal Set unsupported for Set display Number of Display Mode
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-5	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0023-DisplayNumModes
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0023
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0024
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0024
+//! @SYMAPI			Hal::Set(EDisplayBitsPerPixel)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Try to Set DisplayBitsPerPixel
+//!				Uses API elements: HAL::Set, EDisplayMode
+//! @SYMTestActions		1.Create Hal Handle object 2.Set DisplayBitsPerPixel 0
+//!				3.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrNotSupported
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-5	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0024-DisplayBitsPerPixel
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0024
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0025
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0025
+//! @SYMAPI			Hal::Set(EDisplayOffsetToFirstPixel)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Try to Set DisplayOffsetToFirstPixel
+//!				Uses API elements: HAL::Set, EDisplayMode
+//! @SYMTestActions		1.Create Hal Handle object 2.Set EDisplayOffsetToFirstPixel 0
+//!				3.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrNotSupported
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-5	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0025-DisplayOffsetToFirstPixel
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0025
+
+
+START_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0026
+//! @SYMTestCaseID		BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0026
+//! @SYMAPI			Hal::Set(EDisplayOffsetBetweenLines)
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		19/11/2007
+//! @SYMTestCaseDesc		Try to Set DisplayOffsetBetweenLines
+//!				Uses API elements: HAL::Set, EDisplayOffsetBetweenLines
+//! @SYMTestActions		1.Create Hal Handle object 2.Set EDisplayOffsetBetweenLines 0
+//!				3.Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrNotSupported
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100	T_Screen	\base\screen\BASE-BSP-SCREEN-DRIVER-MODELESS.ini
+		CREATE_OBJECT		LCD	lcd1
+		COMMAND	!Error=-5	lcd1	Set		BASE-BSP-SCREEN-DRIVER-MODELESS-0026-DisplayOffsetBetweenLines
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SCREEN-DRIVER-MODELESS_AUTOMATED-0026
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/scripts/base-bsp-screen-driver.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,33 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+/////////////////////////////////////////////////////////////////////
+// BASE-BSP-SCREEN-DRIVER.script
+//
+// Tests public LCD attributes through HAL class
+// as a means of confidence that the HAI APIs work as expected.
+//
+// Tests are validated through HAL::Get value to check set values and some values are validated
+// against Env (t_screen.ini) file
+//
+// The purpose is to provide a regression test suite of PublishedAll APIs for TDisplayHalFunction.
+// Negative testing is performed to confirm that correct errors are returned when incorrect parameters are given.
+// The tests are fully automated.
+/////////////////////////////////////////////////////////////////////
+
+RUN_SCRIPT	z:\base\screen\base-bsp-screen-driver-mode-manual.script
+RUN_SCRIPT	z:\base\screen\base-bsp-screen-driver-modeless-automated.script
+RUN_SCRIPT	z:\base\screen\base-bsp-screen-driver-mode-automated.script
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/src/T_ScreenDriverData.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1138 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_ScreenDriverData.h"
+
+#define MICROSECS_TO_SECS(x)  (x*1000000)
+
+const TInt	BPP8					=8;
+const TInt	BPP12					=12;
+const TInt	BPP16					=16;
+const TInt	BPP24					=24;
+const TInt	BPP32					=32;
+
+const TInt	KDefaultBoxLength		=16;
+const TInt	KDefaultBoxWidth		=16;
+const TInt	KDefaultBoxStep			=16;
+const TInt	KDefaultMargin			=16;
+const TInt	KDefaultFrameDelay		=20000;
+const TInt	KDefaultScreenDelay		=5;
+
+
+
+//These are for masks and shifts for rgb 332 data format
+/*@{*/
+_LIT(KEnumDisplayState,						"EDisplayState");
+_LIT(KEnumBacklightState,					"EBacklightState");
+_LIT(KEnumBacklight,						"EBacklight");
+_LIT(KEnumDisplayMaxBrightness,				"EDisplayBrightnessMax");
+_LIT(KEnumDisplayBrightness,				"EDisplayBrightness");
+_LIT(KEnumDisplayMaxContrast,				"EDisplayContrastMax");
+_LIT(KEnumDisplayContrast,					"EDisplayContrast");
+_LIT(KEnumDisplayMemoryAddress,				"EDisplayMemoryAddress");
+_LIT(KEnumDisplayIsPixelOrderRGB,			"EDisplayIsPixelOrderRGB");
+_LIT(KEnumDisplayIsPixelOrderLandscape,		"EDisplayIsPixelOrderLandscape");
+_LIT(KEnumDisplayMode,						"EDisplayMode");
+_LIT(KEnumDisplayNumModes,					"EDisplayNumModes");
+_LIT(KEnumDisplayColors,					"EDisplayColors");
+_LIT(KEnumDisplayPaletteEntry,				"EDisplayPaletteEntry");
+_LIT(KEnumDisplayXPixels,					"EDisplayXPixels");
+_LIT(KEnumDisplayYPixels,					"EDisplayYPixels");
+_LIT(KEnumDisplayXTwips,					"EDisplayXTwips");
+_LIT(KEnumDisplayYTwips,					"EDisplayYTwips");
+_LIT(KEnumDisplayBitsPerPixel,				"EDisplayBitsPerPixel");
+_LIT(KEnumDisplayOffsetToFirstPixel,		"EDisplayOffsetToFirstPixel");
+_LIT(KEnumDisplayOffsetBetweenLines,		"EDisplayOffsetBetweenLines");
+_LIT(KEnumDisplayIsPalettized,				"EDisplayIsPalettized");
+_LIT(KEnumDisplayNumberOfScreens,			"EDisplayNumberOfScreens");
+_LIT(KEnumNull,								"");
+
+_LIT(KFormatEntryField,						"%S_%S");
+
+_LIT(KFldColor,								"color");
+_LIT(KFldColorBackground,					"background");
+_LIT(KFldColorForeground,					"foreground");
+_LIT(KFldColorIndex,						"color%d");
+_LIT(KFldFrameDelay,						"framedelay");
+_LIT(KFldEndIndex,							"endIndex");
+_LIT(KFldLength,							"length");
+_LIT(KFldMargin,							"margin");
+_LIT(KFldMask,								"mask");
+_LIT(KFldShift,								"shift");
+_LIT(KFldStartIndex,						"startIndex");
+_LIT(KFldStep,								"step");
+_LIT(KFldWidth,								"width");
+
+_LIT(KTagRgbRed,							"red");
+_LIT(KTagRgbGreen,							"green");
+_LIT(KTagRgbBlue,							"blue");
+_LIT(KTagRgbAlpha,							"alpha");
+
+_LIT(KCmdUtilityFillColor,					"utilityFillColor");
+_LIT(KCmdUtilityFillMultiColor,				"utilityFillMultiColor");
+_LIT(KCmdUtilityMovingRectangle,			"utilityMovingRectangle");
+_LIT(KCmdUtilityFillHorizontalStrip,		"utilityFillHorizontalStrip");
+_LIT(KCmdUtilityFillVerticalStrip,			"utilityFillVerticalStrip");
+_LIT(KCmdUtilityPromptMessage,	  			  "utilityPromptMessage");
+
+_LIT(KScreenDelay,					"screenDelay");
+
+_LIT(KLogInvalidLength,						"Invalid length %d. Must be >0.");
+_LIT(KLogInvalidMargin,						"Invalid margin %d. Must be >0.");
+_LIT(KLogInvalidStep,						"Invalid step %d. Must be >0.");
+_LIT(KLogInvalidWidth,						"Invalid width %d. Must be >0.");
+_LIT(KLogMissingParameter,					"Missing parameter '%S'");
+_LIT(KLogNotEnoughData,						"Not enough data");
+/*@}*/
+
+const CT_HALData::THalTableLookup	CT_ScreenDriverData::iTableLookup[] =
+	{
+//	Enum as a descriptor				Enum									Prepare input	Prepare paramters prior	Validation of		Store data returned after a			Flag indicating
+//																				value prior to	to HAL::Get call		value returned		successful HAL::Get or				if validation
+//																				HAL::Set call							after a successful	HAL::Set call						is mandatory
+//																														HAL::Get call
+	KEnumDisplayState,					HALData::EDisplayState,					SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayState,					EFalse,
+	KEnumBacklightState,				HALData::EBacklightState,				SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetBacklightState,					EFalse,
+	KEnumBacklight,					HALData::EBacklight,					SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetBacklight,						EFalse,
+	KEnumDisplayBrightness,			HALData::EDisplayBrightness,			SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayMaxBrightness,			EFalse,
+	KEnumDisplayMaxBrightness,			HALData::EDisplayBrightnessMax,			SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayBrightness,				EFalse,
+	KEnumDisplayContrast,				HALData::EDisplayContrast,				SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayMaxContrast,				EFalse,
+	KEnumDisplayMaxContrast,			HALData::EDisplayContrastMax,			SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayContrast,					EFalse,
+	KEnumDisplayMemoryAddress,			HALData::EDisplayMemoryAddress,			SetPrepareUint,	GetPrepareDisplayMode,	GetValidationUint,	SetDisplayMemoryAddress,			EFalse,
+	KEnumDisplayIsPixelOrderLandscape,	HALData::EDisplayIsPixelOrderLandscape,	SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayIsPixelOrderRGB,			EFalse,
+	KEnumDisplayIsPixelOrderRGB,		HALData::EDisplayIsPixelOrderRGB,		SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayIsPixelOrderLandscape,	EFalse,
+	KEnumDisplayMode,					HALData::EDisplayMode,					SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayMode,						EFalse,
+	KEnumDisplayNumModes,				HALData::EDisplayNumModes,				SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayNumModes,					EFalse,
+	KEnumDisplayColors,				HALData::EDisplayColors,				SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayColors,					EFalse,
+	KEnumDisplayPaletteEntry,			HALData::EDisplayPaletteEntry,			SetPrepareInt,	GetPrepareColorIndex,	GetValidationInt,	SetDisplayPaletteEntry,				EFalse,
+	KEnumDisplayXPixels,				HALData::EDisplayXPixels,				SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayXPixels,					EFalse,
+	KEnumDisplayYPixels,				HALData::EDisplayYPixels,				SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayYPixels,					EFalse,
+	KEnumDisplayXTwips,				HALData::EDisplayXTwips,				SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayXTwips,					EFalse,
+	KEnumDisplayYTwips,				HALData::EDisplayYTwips,				SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayYTwips,					EFalse,
+	KEnumDisplayBitsPerPixel,			HALData::EDisplayBitsPerPixel,			SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayBitsPerPixel,				EFalse,
+	KEnumDisplayOffsetToFirstPixel,	HALData::EDisplayOffsetToFirstPixel,	SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayOffsetToFirstPixel,		EFalse,
+	KEnumDisplayOffsetBetweenLines,	HALData::EDisplayOffsetBetweenLines,	SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayOffsetBetweenLines,		EFalse,
+	KEnumDisplayIsPalettized,			HALData::EDisplayIsPalettized,			SetPrepareInt,	GetPrepareDisplayMode,	GetValidationBool,	SetDisplayIsPalettized,				EFalse,
+	KEnumDisplayNumberOfScreens,		HALData::EDisplayNumberOfScreens,		SetPrepareInt,	GetPrepareDisplayMode,	GetValidationInt,	SetDisplayNumberOfScreens,			EFalse,
+	KEnumNull,							(HALData::TAttribute)0,					NULL,			NULL,					NULL,				NULL,								NULL
+	};
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_ScreenDriverData* CT_ScreenDriverData::NewL()
+	{
+	CT_ScreenDriverData*	ret=new (ELeave) CT_ScreenDriverData();
+	CleanupStack::PushL(ret);
+	ret->ConstructL();
+	CleanupStack::Pop(ret);
+	return ret;
+	}
+
+
+CT_ScreenDriverData::CT_ScreenDriverData()
+:	CT_HALData(iTableLookup)
+,	iDisplayState(-1)
+,	iBacklightState(-1)
+,	iBacklight(-1)
+,	iDisplayMaxBrightness(-1)
+,	iDisplayBrightness(-1)
+,	iDisplayMaxContrast(-1)
+,	iDisplayContrast(-1)
+,	iDisplayMemoryAddress((TUint8*)(-1))
+,	iDisplayIsPixelOrderRGB(-1)
+,	iDisplayIsPixelOrderLandscape(-1)
+,	iDisplayMode(-1)
+,	iDisplayNumModes(-1)
+,	iDisplayColors(-1)
+,	iDisplayPaletteEntry(-1)
+,	iDisplayXPixels(-1)
+,	iDisplayYPixels(-1)
+,	iDisplayXTwips(-1)
+,	iDisplayYTwips(-1)
+,	iDisplayBitsPerPixel(-1)
+,	iDisplayOffsetToFirstPixel(-1)
+,	iDisplayOffsetBetweenLines(-1)
+,	iDisplayIsPalettized(EFalse)
+,	iDisplayNumberOfScreens(-1)
+	{
+	}
+
+void CT_ScreenDriverData::ConstructL()
+/**
+ * Second phase construction
+ *
+ * @internalComponent
+ *
+ * @return	N/A
+ *
+ * @pre		None
+ * @post	None
+ *
+ * @leave	system wide error
+ */
+	{
+	}
+
+CT_ScreenDriverData::~CT_ScreenDriverData()
+/**
+ * Public destructor
+ */
+	{
+	iPalette.Close();
+	}
+
+TAny* CT_ScreenDriverData::GetObject()
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return	pointer to the object that the data wraps
+ */
+	{
+	return NULL;
+	}
+
+//	Prepare the range of values that are getting as color indexs
+TBool CT_ScreenDriverData::GetPrepareColorIndex(CDataWrapperBase* aThis, const TDesC& aSection, TInt& aValueStart, TInt& aValueEnd)
+	{
+	CT_ScreenDriverData*	thisPtr=static_cast<CT_ScreenDriverData*>(aThis);
+	TBool	ret=thisPtr->GetIntFromConfig(aSection, KFldStartIndex(), aValueStart);
+	if ( !ret )
+		{
+		thisPtr->ERR_PRINTF2(KLogMissingParameter, &KFldStartIndex());
+		thisPtr->SetBlockResult(EFail);
+		}
+
+	aValueEnd=aValueStart;
+	thisPtr->GetIntFromConfig(aSection, KFldEndIndex(), aValueEnd);
+
+	return ret;
+	}
+
+//	Prepare the range of values that are getting as just the display mode
+TBool CT_ScreenDriverData::GetPrepareDisplayMode(CDataWrapperBase* aThis, const TDesC& /*aSection*/, TInt& aValueStart, TInt& aValueEnd)
+	{
+	aValueStart=aValueEnd=static_cast<CT_ScreenDriverData*>(aThis)->iDisplayMode;
+
+	return ETrue;
+	}
+
+//	Store the display state
+void CT_ScreenDriverData::SetDisplayState(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayState=aValue;
+	}
+
+//	Store the backlight state
+void CT_ScreenDriverData::SetBacklightState(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iBacklightState=aValue;
+	}
+
+//	Store the backlight
+void CT_ScreenDriverData::SetBacklight(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iBacklight=aValue;
+	}
+
+//	Store the displays maximum brightness
+void CT_ScreenDriverData::SetDisplayMaxBrightness(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayMaxBrightness=aValue;
+	}
+
+//	Store the displays brightness
+void CT_ScreenDriverData::SetDisplayBrightness(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayBrightness=aValue;
+	}
+
+//	Store the displays maximum contrast
+void CT_ScreenDriverData::SetDisplayMaxContrast(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayMaxContrast=aValue;
+	}
+
+//	Store the displays contrast
+void CT_ScreenDriverData::SetDisplayContrast(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayContrast=aValue;
+	}
+
+//	Store the displays memory address
+void CT_ScreenDriverData::SetDisplayMemoryAddress(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayMemoryAddress=(TUint8*)(aValue);
+	}
+
+//	Store the displays pixel RGB order flag
+void CT_ScreenDriverData::SetDisplayIsPixelOrderRGB(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayIsPixelOrderRGB=aValue;
+	}
+
+//	Store the displays landscape pixel order flag
+void CT_ScreenDriverData::SetDisplayIsPixelOrderLandscape(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayIsPixelOrderLandscape=aValue;
+	}
+
+//	Store the displays mode
+void CT_ScreenDriverData::SetDisplayMode(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayMode=aValue;
+	}
+
+//	Store the displays supported number of modes
+void CT_ScreenDriverData::SetDisplayNumModes(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayNumModes=aValue;
+	}
+
+//	Store the displays supported number of colors
+void CT_ScreenDriverData::SetDisplayColors(CDataWrapperBase* aThis, TInt aValue)
+	{
+	CT_ScreenDriverData*	thisPtr=static_cast<CT_ScreenDriverData*>(aThis);
+	thisPtr->iDisplayColors=aValue;
+	thisPtr->iPalette.Reset();
+	thisPtr->iPalette.Reserve(aValue);
+	}
+
+//	Store the an entry in the displays color palette
+void CT_ScreenDriverData::SetDisplayPaletteEntry(CDataWrapperBase* aThis, TInt aValue)
+	{
+	CT_ScreenDriverData*	thisPtr=static_cast<CT_ScreenDriverData*>(aThis);
+	thisPtr->iDisplayPaletteEntry=aValue;
+	if ( thisPtr->iPalette.Count()<thisPtr->iValue )
+		{
+		thisPtr->iPalette[thisPtr->iValue]=aValue;
+		}
+	}
+
+//	Store the displays width in pixels
+void CT_ScreenDriverData::SetDisplayXPixels(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayXPixels=aValue;
+	}
+
+//	Store the displays height in pixels
+void CT_ScreenDriverData::SetDisplayYPixels(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayYPixels=aValue;
+	}
+
+//	Store the displays width in twips
+void CT_ScreenDriverData::SetDisplayXTwips(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayXTwips=aValue;
+	}
+
+//	Store the displays height in twips
+void CT_ScreenDriverData::SetDisplayYTwips(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayYTwips=aValue;
+	}
+
+//	Store the displays number of bits per pixel
+void CT_ScreenDriverData::SetDisplayBitsPerPixel(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayBitsPerPixel=aValue;
+	}
+
+//	Store the displays memory address offset to the first pixel
+void CT_ScreenDriverData::SetDisplayOffsetToFirstPixel(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayOffsetToFirstPixel=aValue;
+	}
+
+//	Store the displays memory address offset between successive lines
+void CT_ScreenDriverData::SetDisplayOffsetBetweenLines(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayOffsetBetweenLines=aValue;
+	}
+
+//	Store the displays flag indicating if a palette is used
+void CT_ScreenDriverData::SetDisplayIsPalettized(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayIsPalettized=(aValue!=0);
+	}
+
+//	Store the devices number of screens supported
+void CT_ScreenDriverData::SetDisplayNumberOfScreens(CDataWrapperBase* aThis, TInt aValue)
+	{
+	static_cast<CT_ScreenDriverData*>(aThis)->iDisplayNumberOfScreens=aValue;
+	}
+TBool CT_ScreenDriverData::GetRgbFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TUint& aRed, TUint& aGreen, TUint& aBlue, TUint& aAlpha)
+	{
+	TBuf<KMaxTestExecuteCommandLength>	tempStore;
+
+	tempStore.Format(KFormatEntryField, &aKeyName, &KTagRgbRed);
+	TBool	ret=GetUintFromConfig(aSectName, tempStore, aRed);
+
+	tempStore.Format(KFormatEntryField, &aKeyName, &KTagRgbGreen);
+	if ( !GetUintFromConfig(aSectName, tempStore, aGreen) )
+		{
+		ret=EFalse;
+		}
+
+	tempStore.Format(KFormatEntryField, &aKeyName, &KTagRgbBlue);
+	if ( !GetUintFromConfig(aSectName, tempStore, aBlue) )
+		{
+		ret=EFalse;
+		}
+
+	aAlpha=0;
+	tempStore.Format(KFormatEntryField, &aKeyName, &KTagRgbAlpha);
+	GetUintFromConfig(aSectName, tempStore, aAlpha);
+
+	return ret;
+	}
+
+TBool CT_ScreenDriverData::GetRgbFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aRed, TInt& aGreen, TInt& aBlue, TInt& aAlpha)
+	{
+	TBuf<KMaxTestExecuteCommandLength>	tempStore;
+
+	tempStore.Format(KFormatEntryField, &aKeyName, &KTagRgbRed);
+	TBool	ret=GetIntFromConfig(aSectName, tempStore, aRed);
+
+	tempStore.Format(KFormatEntryField, &aKeyName, &KTagRgbGreen);
+	if ( !GetIntFromConfig(aSectName, tempStore, aGreen) )
+		{
+		ret=EFalse;
+		}
+
+	tempStore.Format(KFormatEntryField, &aKeyName, &KTagRgbBlue);
+	if ( !GetIntFromConfig(aSectName, tempStore, aBlue) )
+		{
+		ret=EFalse;
+		}
+
+	aAlpha=0;
+	tempStore.Format(KFormatEntryField, &aKeyName, &KTagRgbAlpha);
+	GetIntFromConfig(aSectName, tempStore, aAlpha);
+
+	return ret;
+	}
+
+TBool CT_ScreenDriverData::GetColorFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TUint& aColor, TPtrC& aLogColor)
+	{
+	TBool	dataOk=ETrue;
+	
+	if ( iDisplayIsPalettized )
+		{
+		WARN_PRINTF1(_L("Testing of Palettes not supported\n"));
+		dataOk=EFalse;
+		}
+
+	TUint	colorRed;
+	TUint	colorGreen;
+	TUint	colorBlue;
+	TUint	colorAlpha;
+	if ( !GetRgbFromConfig(aSectName, aKeyName, colorRed, colorGreen, colorBlue, colorAlpha) )
+		{
+		WARN_PRINTF2(KLogMissingParameter, &aKeyName);
+		dataOk=EFalse;
+		}
+
+	if ( !GetStringFromConfig(aSectName, aKeyName, aLogColor) )
+		{
+		WARN_PRINTF2(KLogMissingParameter, &aKeyName);
+		dataOk=EFalse;
+		}
+
+	TUint	maskRed;
+	TUint	maskGreen;
+	TUint	maskBlue;
+	TUint	maskAlpha;
+	if ( !GetRgbFromConfig(aSectName, KFldMask(), maskRed, maskGreen, maskBlue, maskAlpha) )
+		{
+		WARN_PRINTF2(KLogMissingParameter, &KFldMask());
+		dataOk=EFalse;
+		}
+
+	TInt	shiftRed;
+	TInt	shiftGreen;
+	TInt	shiftBlue;
+	TInt	shiftAlpha;
+	if ( !GetRgbFromConfig(aSectName, KFldShift(), shiftRed, shiftGreen, shiftBlue, shiftAlpha) )
+		{
+		WARN_PRINTF2(KLogMissingParameter, &KFldShift());
+		dataOk=EFalse;
+		}
+
+	aColor=0;
+
+	//	Apply Red
+	colorRed	&= maskRed;
+	if ( shiftRed<0 )
+		{
+		aColor |= (colorRed >> -shiftRed);
+		}
+	else
+		{
+		aColor |= (colorRed << shiftRed);
+		}
+
+	//	Apply Green
+	colorGreen	&= maskGreen;
+	if ( shiftGreen<0 )
+		{
+		aColor |= (colorGreen >> -shiftGreen);
+		}
+	else
+		{
+		aColor |= (colorGreen << shiftGreen);
+		}
+
+	//	Apply Blue
+	colorBlue	&= maskBlue;
+	if ( shiftBlue<0 )
+		{
+		aColor |= (colorBlue >> -shiftBlue);
+		}
+	else
+		{
+		aColor |= (colorBlue << shiftBlue);
+		}
+
+	//	Apply Alpha
+	colorAlpha	&= maskAlpha;
+	if ( shiftAlpha<0 )
+		{
+		aColor |= (colorAlpha >> -shiftAlpha);
+		}
+	else
+		{
+		aColor |= (colorAlpha << shiftAlpha);
+		}
+
+	return dataOk;
+	}
+
+TBool CT_ScreenDriverData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+	{
+	TBool	ret=ETrue;
+
+	if ( aCommand==KCmdUtilityFillColor )
+		{
+		DoCmdUtilityFillColorL(aSection);
+		}
+	else if ( aCommand==KCmdUtilityFillMultiColor )
+		{
+		DoCmdUtilityFillMultiColorL(aSection);
+		}
+	else if ( aCommand==KCmdUtilityMovingRectangle )
+		{
+		DoCmdUtilityMovingRectangleL(aSection);
+		}
+	else if ( aCommand==KCmdUtilityFillHorizontalStrip )
+		{
+		DoCmdUtilityFillHorizontalStripL(aSection);	
+		}
+	else if ( aCommand==KCmdUtilityFillVerticalStrip)
+		{
+		DoCmdUtilityFillVerticalStripL(aSection);	
+		}
+	else if ( aCommand==KCmdUtilityPromptMessage)
+		{
+		ret=CDataWrapperBase::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+	else
+		{
+		ret=CT_HALData::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+
+	return ret;
+	}
+
+/**
+ * Fill the Screen in a single color by using screen base memory address
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_ScreenDriverData::DoCmdUtilityFillColorL(const TDesC& aSection)
+	{
+	
+	TUint	 color;
+	TPtrC	 logColor;
+	TBool	 dataOk=GetColorFromConfig(aSection, KFldColor, color, logColor);
+	if ( !dataOk )
+		{
+		ERR_PRINTF2(KLogMissingParameter, &KFldColor());
+		SetBlockResult(EFail);
+		}
+	else
+	 	{
+		TInt	pixelsX=iDisplayXPixels;
+		TInt	pixelsY=iDisplayYPixels;
+		TUint8*	memoryAddress=iDisplayMemoryAddress;
+		memoryAddress+=iDisplayOffsetToFirstPixel;
+
+		TInt	line=0;
+		for ( line=0; line<pixelsY; ++line )
+			{
+			DrawLine(color, memoryAddress, 0, pixelsX);
+			memoryAddress+=iDisplayOffsetBetweenLines;
+			}
+
+		}	
+
+	//delays the image on the screen to allow for the user to verify
+	TInt screenDelay;	
+	TBool screenDelayOk = GetIntFromConfig(aSection, KScreenDelay(), screenDelay);
+	if(!screenDelayOk)
+		{
+
+			INFO_PRINTF1(_L("defualt screen delay value used"));
+			screenDelay = KDefaultScreenDelay;
+		}
+	CDataWrapperBase::Timedelay(MICROSECS_TO_SECS(screenDelay));
+	}
+
+/**
+ * Fill the Screen color with multiple nested rectangles by using screen base memory address
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_ScreenDriverData::DoCmdUtilityFillMultiColorL(const TDesC& aSection)
+	{
+	TBuf<KMaxTestExecuteCommandLength>	tempStore;
+
+	RArray<TUint>	color;
+	CleanupClosePushL(color);
+
+	RArray<TDesC>	colorLog;
+	CleanupClosePushL(colorLog);
+
+	TBool	moreData=ETrue;
+	TBool	index=0;
+	while ( moreData )
+		{
+		tempStore.Format(KFldColorIndex(), ++index);
+		TUint	colorTemp;
+		TPtrC	colorLogTemp;
+
+		moreData=GetColorFromConfig(aSection, tempStore, colorTemp, colorLogTemp);
+		if ( moreData )
+			{
+			color.AppendL(colorTemp);
+			colorLog.AppendL(colorLogTemp);
+			}
+		}
+
+	//	Must have more than one color for this to work
+	TBool	dataOk=color.Count()>1;
+	if ( !dataOk )
+		{
+		ERR_PRINTF1(KLogNotEnoughData);
+		SetBlockResult(EFail);
+		}
+
+	TInt	margin=KDefaultMargin;
+	GetIntFromConfig(aSection, KFldMargin(), margin);
+	if ( margin<=0 )
+		{
+		ERR_PRINTF2(KLogInvalidMargin, margin);
+		SetBlockResult(EFail);
+		dataOk=EFalse;
+		}
+
+	if ( dataOk )
+	 	{
+		TInt	pixelsX=iDisplayXPixels;
+		TInt	pixelsY=iDisplayYPixels;
+		TUint8*	memoryAddress=iDisplayMemoryAddress;
+		memoryAddress+=iDisplayOffsetToFirstPixel;
+
+		TInt	colorIndex=0;
+		TInt	left=0;
+		TInt	pixels=pixelsX;
+		TInt	top=0;
+		TInt	bottom=pixelsY;
+		TInt	line=0;
+		while ( (left<pixels) && (top<bottom) )
+			{
+			TUint8*	address=memoryAddress + top*iDisplayOffsetBetweenLines;
+			for ( line=top; line<bottom; ++line )
+				{
+				DrawLine(color[colorIndex], address, left, pixels);
+				address+=iDisplayOffsetBetweenLines;
+				}
+			left += margin;
+			pixels -= margin;
+			top += margin;
+			bottom -= margin;
+			++colorIndex;
+			if ( colorIndex>=color.Count() )
+				{
+				colorIndex=0;
+				}
+			}
+
+		}
+	CleanupStack::PopAndDestroy(2, &color);
+	
+	TInt screenDelay;	
+	TBool screenDelayOk = GetIntFromConfig(aSection, KScreenDelay(), screenDelay);
+	if(!screenDelayOk)
+		{
+			screenDelay = KDefaultScreenDelay;
+			INFO_PRINTF1(_L("defualt screen delay value used"));
+		}
+
+	CDataWrapperBase::Timedelay(MICROSECS_TO_SECS(screenDelay));
+	}
+
+/**
+ * Fill the Screen in a color and animate a rectangle moving around the perimeter of the screen
+ * by using screen base memory address
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_ScreenDriverData::DoCmdUtilityMovingRectangleL(const TDesC& aSection)
+	{
+	TBool	dataOk=ETrue;
+
+	TUint	colorBackground;
+	TPtrC	logColorBackground;
+	if ( !GetColorFromConfig(aSection, KFldColorBackground, colorBackground, logColorBackground) )
+		{
+		ERR_PRINTF2(KLogMissingParameter, &KFldColorBackground());
+		SetBlockResult(EFail);
+		dataOk=EFalse;
+		}
+
+	TUint	colorForeground;
+	TPtrC	logColorForeground;
+	if ( !GetColorFromConfig(aSection, KFldColorForeground, colorForeground, logColorForeground) )
+		{
+		ERR_PRINTF2(KLogMissingParameter, &KFldColorForeground());
+		SetBlockResult(EFail);
+		dataOk=EFalse;
+		}
+
+	TInt	boxLength=KDefaultBoxLength;
+	GetIntFromConfig(aSection, KFldLength(), boxLength);
+	if ( boxLength<=0 )
+		{
+		ERR_PRINTF2(KLogInvalidLength, boxLength);
+		SetBlockResult(EFail);
+		dataOk=EFalse;
+		}
+
+	TInt	boxWidth=KDefaultBoxWidth;
+	GetIntFromConfig(aSection, KFldWidth(), boxWidth);
+	if ( boxWidth<=0 )
+		{
+		ERR_PRINTF2(KLogInvalidWidth, boxWidth);
+		SetBlockResult(EFail);
+		dataOk=EFalse;
+		}
+
+	TInt	step=KDefaultBoxStep;
+	GetIntFromConfig(aSection, KFldStep(), step);
+	if ( step<=0 )
+		{
+		ERR_PRINTF2(KLogInvalidStep, step);
+		SetBlockResult(EFail);
+		dataOk=EFalse;
+		}
+
+	TInt	frameDelay=KDefaultFrameDelay;
+	GetIntFromConfig(aSection, KFldFrameDelay(), frameDelay);
+	if ( frameDelay<=0 )
+		{
+		ERR_PRINTF2(KLogInvalidStep, frameDelay);
+		SetBlockResult(EFail);
+		dataOk=EFalse;
+		}
+
+	if ( dataOk )
+	 	{
+		TInt	pixelsX=iDisplayXPixels;
+		TInt	pixelsY=iDisplayYPixels;
+		TUint8*	memoryAddress=iDisplayMemoryAddress;
+		memoryAddress+=iDisplayOffsetToFirstPixel;
+
+		//	Fill the background
+		INFO_PRINTF1(_L("-->Fill the background"));
+		TUint8*	address=memoryAddress;
+		TInt	x=0;
+		TInt	y=0;
+		TInt	line=0;
+		for ( line=0; line<pixelsY; ++line )
+			{
+			DrawLine(colorBackground, address, 0, pixelsX);
+			address+=iDisplayOffsetBetweenLines;
+			}
+		INFO_PRINTF1(_L("<--Fill the background"));
+
+		//	Draw box moving from top left to top right
+		TInt	max=pixelsX-boxLength;
+		for ( x=0; x<max; x+=step )
+			{
+			address=memoryAddress;
+			for ( line=0; line<boxWidth; ++line )
+				{
+				DrawLine(colorForeground, address, x, boxLength+x);
+				address+=iDisplayOffsetBetweenLines;
+				}
+			Timedelay(frameDelay);
+
+			address=memoryAddress;
+			for ( line=0; line<boxWidth; ++line )
+				{
+				DrawLine(colorBackground, address, x, boxLength+x);
+				address+=iDisplayOffsetBetweenLines;
+				}
+			}
+
+		//	Draw box moving from top right to bottom right
+		//	Missing out first as it was draw at the end of the previous draw
+		max=pixelsY-boxWidth;
+		x=pixelsX-boxLength;
+		for ( y=step; y<max; y+=step )
+			{
+			address=memoryAddress+y*iDisplayOffsetBetweenLines;
+			for ( line=0; line<boxWidth; ++line )
+				{
+				DrawLine(colorForeground, address, x, pixelsX);
+				address+=iDisplayOffsetBetweenLines;
+				}
+			Timedelay(frameDelay);
+
+			address=memoryAddress+y*iDisplayOffsetBetweenLines;
+			for ( line=0; line<boxWidth; ++line )
+				{
+				DrawLine(colorBackground, address, x, pixelsX);
+				address+=iDisplayOffsetBetweenLines;
+				}
+			}
+
+		//	Draw box moving from bottom right to bottom left
+		//	Missing out first as it was draw at the end of the previous draw
+		for ( x=pixelsX-boxLength; x>0; x-=step )
+			{
+			address=memoryAddress+pixelsY*iDisplayOffsetBetweenLines;
+			for ( line=0; line<boxWidth; ++line )
+				{
+				address-=iDisplayOffsetBetweenLines;
+				DrawLine(colorForeground, address, x, boxLength+x);
+				}
+			Timedelay(frameDelay);
+
+			address=memoryAddress+pixelsY*iDisplayOffsetBetweenLines;
+			for ( line=0; line<boxWidth; ++line )
+				{
+				address-=iDisplayOffsetBetweenLines;
+				DrawLine(colorBackground, address, x, boxLength+x);
+				}
+			}
+
+		//	Draw box moving from bottom right bottom left to top right
+		//	Missing out first as it was draw at the end of the previous draw
+		for ( y=pixelsY-boxWidth; y>0; y-=step )
+			{
+			address=memoryAddress+y*iDisplayOffsetBetweenLines;
+			for ( line=0; line<boxWidth; ++line )
+				{
+				DrawLine(colorForeground, address, 0, boxLength);
+				address+=iDisplayOffsetBetweenLines;
+				}
+			Timedelay(frameDelay);
+
+			address=memoryAddress+y*iDisplayOffsetBetweenLines;
+			for ( line=0; line<boxWidth; ++line )
+				{
+				DrawLine(colorBackground, address, 0, boxLength);
+				address+=iDisplayOffsetBetweenLines;
+				}
+			}
+		}
+	}
+
+/**
+Utility function to Fill color in a 16pixels*16 lines area at the given xb,yb position in the screen
+@param ColorVal color to be filled in .For 4 bpp mode ColorVal contains only 4 bits of information, the upper 4 bits are empty
+	For 8 bpp mode all the 8 bits are filled in , the value is taken from the standard OS palette
+	For all other modes ColorVal holds data in rgb 332 format.
+
+@param aColor			Color to draw in
+@param aMemoryAddress	Address offset to start of line
+@param aLeftMargin		Left margin to not draw in
+@param aPixelsX			Number of pixels to draw on line
+*/
+void CT_ScreenDriverData::DrawLine(TUint aColor, TUint8* aMemoryAddress, TInt aLeftMargin, TInt aPixelsX)
+	{
+
+	switch ( iDisplayBitsPerPixel )
+		{
+	case BPP32:
+	case BPP24:
+		{
+		TUint32*	pixelPtr=(TUint32*)aMemoryAddress;
+		TUint32		color=aColor;
+		pixelPtr += aLeftMargin;
+		for ( TInt x=aLeftMargin; x<aPixelsX; ++x )
+			{
+			*pixelPtr++=color;
+			}
+		}
+		break;
+		
+	case BPP16:
+	case BPP12:
+		{
+		TUint16*	pixelPtr=(TUint16*)aMemoryAddress;
+		TUint16		color=aColor;
+		pixelPtr += aLeftMargin;
+		for ( TInt x=aLeftMargin; x<aPixelsX; ++x )
+			{
+			*pixelPtr++=color;
+			}
+		}
+		break;
+	case BPP8:
+		{
+		TUint8*	pixelPtr=aMemoryAddress;
+		TUint8	color=aColor;
+		pixelPtr += aLeftMargin;
+		for ( TInt x=aLeftMargin; x<aPixelsX; ++x )
+			{
+			*pixelPtr++=color;
+			}
+		}
+		break;
+	default:
+		break;
+		}
+	}
+
+/**
+ * Fill the Screen color with multicoloured horizontal strips using screen base memory address
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_ScreenDriverData::DoCmdUtilityFillHorizontalStripL(const TDesC& aSection)
+	{
+	TBuf<KMaxTestExecuteCommandLength>	tempStore;
+
+	RArray<TUint>	color;
+	CleanupClosePushL(color);
+	
+	RArray<TDesC>	colorLog;
+	CleanupClosePushL(colorLog);
+
+	TBool		moreData=ETrue;
+	TBool		index=0;
+	while ( moreData )
+		{
+		tempStore.Format(KFldColorIndex(), ++index);
+		TUint	colorTemp;
+		TPtrC	colorLogTemp;
+
+		moreData=GetColorFromConfig(aSection, tempStore, colorTemp, colorLogTemp);
+		if ( moreData )
+			{
+			color.AppendL(colorTemp);
+			colorLog.AppendL(colorLogTemp);
+			}
+		}
+
+	//	Must have more than one color for this to work
+	TBool	dataOk=color.Count()>1;
+	if ( !dataOk )
+		{
+		ERR_PRINTF1(KLogNotEnoughData);
+		SetBlockResult(EFail);
+		}
+
+	TInt	margin=KDefaultMargin;
+	GetIntFromConfig(aSection, KFldMargin(), margin);
+	if ( margin<=0 )
+		{
+		ERR_PRINTF2(KLogInvalidMargin, margin);
+		SetBlockResult(EFail);
+		dataOk=EFalse;
+		}
+
+	if ( dataOk )
+		{
+		TInt	pixelsX=iDisplayXPixels;
+		TInt	pixelsY=iDisplayYPixels;
+		TUint8*	memoryAddress=iDisplayMemoryAddress;
+		memoryAddress+=iDisplayOffsetToFirstPixel;
+				
+		TInt	count=0;
+		TInt 	colorIndex=0;
+		for ( TInt liney=0; liney<pixelsY; liney++ )
+			{
+			DrawLine(color[colorIndex], memoryAddress, 0, pixelsX);
+			memoryAddress+=iDisplayOffsetBetweenLines;
+			
+			++count;
+			if( count>margin )
+				{
+				++colorIndex;
+				count=0;
+				}
+			
+			if ( colorIndex>=color.Count() )
+				{
+				colorIndex=0;
+				}
+			}
+
+		}
+	CleanupStack::PopAndDestroy(2, &color);
+
+	TInt screenDelay;	
+	TBool screenDelayOk = GetIntFromConfig(aSection, KScreenDelay(), screenDelay);
+	if(!screenDelayOk)
+		{
+			screenDelay = KDefaultScreenDelay;
+			INFO_PRINTF1(_L("defualt screen delay value used"));
+		}
+	CDataWrapperBase::Timedelay(MICROSECS_TO_SECS(screenDelay));
+
+	}
+
+/**
+ * Fill the Screen color with multicoloured vertical strips using screen based memory address
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_ScreenDriverData::DoCmdUtilityFillVerticalStripL(const TDesC& aSection)
+	{
+	TBuf<KMaxTestExecuteCommandLength>	tempStore;
+
+	RArray<TUint>	color;
+	CleanupClosePushL(color);
+
+	RArray<TDesC>	colorLog;
+	CleanupClosePushL(colorLog);
+
+	TBool	moreData=ETrue;
+	TBool	index=0;
+	while ( moreData )
+		{
+		tempStore.Format(KFldColorIndex(), ++index);
+		TUint	colorTemp;
+		TPtrC	colorLogTemp;
+
+		moreData=GetColorFromConfig(aSection, tempStore, colorTemp, colorLogTemp);
+		if ( moreData )
+			{
+			color.AppendL(colorTemp);
+			colorLog.AppendL(colorLogTemp);
+			}
+		}
+
+	//	Must have more than one color for this to work
+	TBool	dataOk=color.Count()>1;
+	if ( !dataOk )
+		{
+		ERR_PRINTF1(KLogNotEnoughData);
+		SetBlockResult(EFail);
+		}
+
+	TInt	margin=KDefaultMargin;
+	GetIntFromConfig(aSection, KFldMargin(), margin);
+	if ( margin<=0 )
+		{
+		ERR_PRINTF2(KLogInvalidMargin, margin);
+		SetBlockResult(EFail);
+		dataOk=EFalse;
+		}
+
+	if ( dataOk )
+	 	{
+		TInt	pixelsX=iDisplayXPixels;
+		TInt	pixelsY=iDisplayYPixels;
+		TUint8*	memoryAddress=iDisplayMemoryAddress;
+		memoryAddress+=iDisplayOffsetToFirstPixel;
+
+		TInt	colorIndex=0;
+		TUint8*	address;
+		TInt	right=0;
+		for ( TInt left=0; left<pixelsX; left+=margin )
+			{
+			address = memoryAddress;
+			right += margin;
+			if ( right>=pixelsX )
+				{
+				right=pixelsX-1;
+				}
+			for ( TInt liney=0; liney<pixelsY; liney++ )
+				{
+				DrawLine(color[colorIndex], address, left, right);
+				address+=iDisplayOffsetBetweenLines;
+				}
+			++colorIndex;	
+			if ( colorIndex>=color.Count() )
+				{
+				colorIndex=0;
+				}
+			}
+
+		}
+	CleanupStack::PopAndDestroy(2, &color);
+	
+	TInt screenDelay;	
+	TBool screenDelayOk = GetIntFromConfig(aSection, KScreenDelay(), screenDelay);
+	if(!screenDelayOk)
+		{
+			screenDelay = KDefaultScreenDelay;
+			INFO_PRINTF1(_L("defualt screen delay value used"));
+		}
+	CDataWrapperBase::Timedelay(MICROSECS_TO_SECS(screenDelay));
+
+	}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/src/T_ScreenDriverServer.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,105 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_ScreenDriverServer.h"
+#include "T_ScreenDriverData.h"
+
+/*@{*/
+_LIT(KT_ScreenDriver,		"LCD");
+/*@}*/
+
+CT_ScreenDriverServer* CT_ScreenDriverServer::NewL()
+/**
+ * @return - Instance of the test server
+ * Same code for Secure and non-secure variants
+ * Called inside the MainL() function to create and start the
+ * CTestServer derived server.
+ */
+	{
+    CT_ScreenDriverServer* server = new (ELeave) CT_ScreenDriverServer();
+    CleanupStack::PushL(server);
+    server->ConstructL();
+    CleanupStack::Pop(server);
+    return server;
+    }
+
+
+LOCAL_C void MainL()
+/**
+ * Secure variant
+ * Much simpler, uses the new Rendezvous() call to sync with the client
+ */
+	{
+#if (defined __DATA_CAGING__)
+    RProcess().DataCaging(RProcess::EDataCagingOn);
+    RProcess().SecureApi(RProcess::ESecureApiOn);
+#endif
+    CActiveScheduler*	sched=NULL;
+    sched=new(ELeave) CActiveScheduler;
+    CActiveScheduler::Install(sched);
+    CT_ScreenDriverServer* server = NULL;
+
+    // Create the CTestServer derived server
+    TRAPD(err,server = CT_ScreenDriverServer::NewL());
+    if(!err)
+	    {
+        // Sync with the client and enter the active scheduler
+        RProcess::Rendezvous(KErrNone);
+        sched->Start();
+        }
+
+    delete server;
+    delete sched;
+    }
+
+
+GLDEF_C TInt E32Main()
+/**
+ * @return - Standard Epoc error code on process exit
+ * Secure variant only
+ * Process entry point. Called by client using RProcess API
+ */
+	{
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    if(cleanup == NULL)
+	    {
+        return KErrNoMemory;
+        }
+
+#if (defined TRAP_IGNORE)
+	TRAP_IGNORE(MainL());
+#else
+    TRAPD(err,MainL());
+#endif
+
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
+
+CDataWrapper* CT_ScreenDriverServer::CT_ScreenDriverBlock::CreateDataL(const TDesC& aData)
+	{
+	CDataWrapper*	wrapper=NULL;
+
+	if( KT_ScreenDriver() == aData )
+		{
+		wrapper=CT_ScreenDriverData::NewL();
+		}
+
+	return wrapper;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/testdata/base-bsp-screen-driver-mode.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,2639 @@
+[include]
+file1				=\base\screen\t_screen.ini
+file2 				=\base\t_prompt.ini
+
+[lcd1]
+name=lcd1
+
+[BASE-BSP-SCREEN-DRIVER-PromptMessage]
+message				=Press affirmative key if ok
+delay				={promptMessage, delay}
+keyCode				={promptMessage, keyCode}
+
+[BASE-BSP-SCREEN-DRIVER-RedPromptMessage]
+message				=Expect the screen to fill with red, press affirmative key to continue.
+delay				={promptMessage, delay}
+keyCode				={promptMessage, keyCode}
+
+[BASE-BSP-SCREEN-DRIVER-GreenPromptMessage]
+message				=Expect the screen to fill with green, press affirmative key to continue.
+delay				={promptMessage, delay}
+keyCode				={promptMessage, keyCode}
+
+[BASE-BSP-SCREEN-DRIVER-BluePromptMessage]
+message				=Expect the screen to fill with blue, press affirmative key to continue.
+delay				={promptMessage, delay}
+keyCode				={promptMessage, keyCode}
+
+[BASE-BSP-SCREEN-DRIVER-WhitePromptMessage]
+message				=Expect the screen to fill with white, press affirmative key to continue.
+delay				={promptMessage, delay}
+keyCode				={promptMessage, keyCode}
+
+[BASE-BSP-SCREEN-DRIVER-BlackPromptMessage]
+message				=Expect the screen to fill with black, press affirmative key to continue.
+delay				={promptMessage, delay}
+keyCode				={promptMessage, keyCode}
+
+
+[BASE-BSP-SCREEN-DRIVER-MultiColourPromptMessage]
+message				=Expect multicoloured rectangles that reduce in size as they get closer to the center of the screen, press affirmative key to continue.
+delay				={promptMessage, delay}
+keyCode				={promptMessage, keyCode}
+
+[BASE-BSP-SCREEN-DRIVER-MovingRectanglePromptMessage]
+message				=Expect a black moving rectangle on a red screen, press affirmative key to continue.
+delay				={promptMessage, delay}
+keyCode				={promptMessage, keyCode}
+
+[BASE-BSP-SCREEN-DRIVER-HorizontalStripPromptMessage]
+message				=Expect multicoloured horizontal stripes on the screen, press affirmative key to continue.
+delay				={promptMessage, delay}
+keyCode				={promptMessage, keyCode}
+
+[BASE-BSP-SCREEN-DRIVER-VerticalStripPromptMessage]
+message				=Expect multicoloured vertical stripes on the screen, press affirmative key to continue.
+delay				={promptMessage, delay}
+keyCode				={promptMessage, keyCode}
+
+
+
+[BASE-BSP-SCREEN-DRIVER-Test-EDisplayMode]
+halEValue			=EDisplayMode
+yyexpected			={screen,displaymode}
+
+[BASE-BSP-SCREEN-DRIVER-Test-EDisplayXPixels]
+halEValue			=EDisplayXPixels
+expected			={screen,modewidth}
+
+[BASE-BSP-SCREEN-DRIVER-Test-EDisplayYPixels]
+halEValue			=EDisplayYPixels
+expected			={screen,modeheight}
+
+[BASE-BSP-SCREEN-DRIVER-Test-EDisplayMemoryAddress]
+halEValue			=EDisplayMemoryAddress
+
+[BASE-BSP-SCREEN-DRIVER-Test-EDisplayOffsetBetweenLines]
+halEValue			=EDisplayOffsetBetweenLines
+expected			={screen,modedisplayOffsetBetweenLines}
+
+[BASE-BSP-SCREEN-DRIVER-Test-EDisplayOffsetToFirstPixel]
+halEValue			=EDisplayOffsetToFirstPixel
+expected			={screen,modedisplayOffsetToFirstPixel}
+
+[BASE-BSP-SCREEN-DRIVER-Test-EDisplayBitsPerPixel]
+halEValue			=EDisplayBitsPerPixel
+expected			={screen,modebitsPerPixel}
+
+[BASE-BSP-SCREEN-DRIVER-Test-EDisplayIsPalettized]
+halEValue			=EDisplayIsPalettized
+expected			={screen,modedisplayIsPalettized}
+
+
+
+
+[BASE-BSP-SCREEN-DRIVER-EDisplayMode]
+halEValue			=EDisplayMode
+
+[BASE-BSP-SCREEN-DRIVER-EDisplayXPixels]
+halEValue			=EDisplayXPixels
+
+[BASE-BSP-SCREEN-DRIVER-EDisplayYPixels]
+halEValue			=EDisplayYPixels
+
+[BASE-BSP-SCREEN-DRIVER-EDisplayMemoryAddress]
+halEValue			=EDisplayMemoryAddress
+
+[BASE-BSP-SCREEN-DRIVER-EDisplayOffsetBetweenLines]
+halEValue			=EDisplayOffsetBetweenLines
+
+[BASE-BSP-SCREEN-DRIVER-EDisplayOffsetToFirstPixel]
+halEValue			=EDisplayOffsetToFirstPixel
+
+[BASE-BSP-SCREEN-DRIVER-EDisplayBitsPerPixel]
+halEValue			=EDisplayBitsPerPixel
+
+[BASE-BSP-SCREEN-DRIVER-EDisplayIsPalettized]
+halEValue			=EDisplayIsPalettized
+
+[BASE-BSP-SCREEN-DRIVER-0002-utilityFillColor]
+color_red			=0xFF
+color_green			=0x00
+color_blue			=0x00
+color_alpha			=0x00
+color				=red
+mask_red			={screen,modemaskRed}
+mask_green			={screen,modemaskGreen}
+mask_blue			={screen,modemaskBlue}
+mask_alpha			={screen,modemaskAlpha}
+shift_red			={screen,modeshiftRed}
+shift_green			={screen,modeshiftGreen}
+shift_blue			={screen,modeshiftBlue}
+shift_alpha			={screen,modeshiftAlpha}
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-0003-utilityFillColor]
+color_red			=0x00
+color_green			=0xFF
+color_blue			=0x00
+color_alpha			=0x00
+color				=green
+mask_red			={screen,modemaskRed}
+mask_green			={screen,modemaskGreen}
+mask_blue			={screen,modemaskBlue}
+mask_alpha			={screen,modemaskAlpha}
+shift_red			={screen,modeshiftRed}
+shift_green			={screen,modeshiftGreen}
+shift_blue			={screen,modeshiftBlue}
+shift_alpha			={screen,modeshiftAlpha}
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-0004-utilityFillColor]
+color_red			=0x00
+color_green			=0x00
+color_blue			=0xFF
+color_alpha			=0x00
+color				=blue
+mask_red			={screen,modemaskRed}
+mask_green			={screen,modemaskGreen}
+mask_blue			={screen,modemaskBlue}
+mask_alpha			={screen,modemaskAlpha}
+shift_red			={screen,modeshiftRed}
+shift_green			={screen,modeshiftGreen}
+shift_blue			={screen,modeshiftBlue}
+shift_alpha			={screen,modeshiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-0005-utilityFillColor]
+color_red			=0xFF
+color_green			=0xFF
+color_blue			=0xFF
+color_alpha			=0x00
+color				=white
+mask_red			={screen,modemaskRed}
+mask_green			={screen,modemaskGreen}
+mask_blue			={screen,modemaskBlue}
+mask_alpha			={screen,modemaskAlpha}
+shift_red			={screen,modeshiftRed}
+shift_green			={screen,modeshiftGreen}
+shift_blue			={screen,modeshiftBlue}
+shift_alpha			={screen,modeshiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-0006-utilityFillColor]
+color_red			=0x00
+color_green			=0x00
+color_blue			=0x00
+color_alpha			=0x00
+color				=black
+mask_red			={screen,modemaskRed}
+mask_green			={screen,modemaskGreen}
+mask_blue			={screen,modemaskBlue}
+mask_alpha			={screen,modemaskAlpha}
+shift_red			={screen,modeshiftRed}
+shift_green			={screen,modeshiftGreen}
+shift_blue			={screen,modeshiftBlue}
+shift_alpha			={screen,modeshiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-0007-utilityFillMultiColor]
+color1_red			=0xFF
+color1_green			=0x00
+color1_blue			=0x00
+color1_alpha			=0x00
+color1				=red
+color2_red			=0xFF
+color2_green			=0xFF
+color2_blue			=0xFF
+color2_alpha			=0x00
+color2				=white
+color3_red			=0x00
+color3_green			=0xFF
+color3_blue			=0x00
+color3_alpha			=0x00
+color3				=green
+mask_red			={screen,modemaskRed}
+mask_green			={screen,modemaskGreen}
+mask_blue			={screen,modemaskBlue}
+mask_alpha			={screen,modemaskAlpha}
+shift_red			={screen,modeshiftRed}
+shift_green			={screen,modeshiftGreen}
+shift_blue			={screen,modeshiftBlue}
+shift_alpha			={screen,modeshiftAlpha}
+margin				=8
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-0008-utilityMovingRectangle]
+background_red			=0xFF
+background_green		=0x00
+background_blue			=0x00
+background_alpha		=0x00
+background			=red
+foreground_red			=0x00
+foreground_green		=0x00
+foreground_blue			=0x00
+foreground_alpha		=0x00
+foreground			=black
+mask_red			={screen,modemaskRed}
+mask_green			={screen,modemaskGreen}
+mask_blue			={screen,modemaskBlue}
+mask_alpha			={screen,modemaskAlpha}
+shift_red			={screen,modeshiftRed}
+shift_green			={screen,modeshiftGreen}
+shift_blue			={screen,modeshiftBlue}
+shift_alpha			={screen,modeshiftAlpha}
+length				=32
+width				=32
+step				=1
+framedelay			=10000
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-0009-utilityFillHorizontalStrip]
+color1_red			=0xFF
+color1_green		=0x00
+color1_blue			=0x00
+color1_alpha		=0x00
+color1				=red
+color2_red			=0xFF
+color2_green		=0xFF
+color2_blue			=0xFF
+color2_alpha		=0x00
+color2				=white
+color3_red			=0x00
+color3_green		=0xFF
+color3_blue			=0x00
+color3_alpha		=0x00
+color3				=green
+color4_red			=0xFF
+color4_green		=0xF0
+color4_blue			=0x00
+color4_alpha		=0x00
+color4				=yellow
+color5_red			=0x00
+color5_green		=0x00
+color5_blue			=0xC0
+color5_alpha		=0x00
+color5				=lightblue
+color6_red			=0xFF
+color6_green		=0xFF
+color6_blue			=0x00
+color6_alpha		=0x00
+color6				=pink
+color7_red			=0x00
+color7_green		=0xF0
+color7_blue			=0xF0
+color7_alpha		=0x00
+color7				=navyblue
+color8_red			=0xF0
+color8_green		=0x00
+color8_blue			=0xF0
+color8_alpha		=0x00
+color8				=lightgreen
+color9_red			=0xFF
+color9_green		=0x00
+color9_blue			=0x00
+color9_alpha		=0x00
+color9				=red
+mask_red			={screen,modemaskRed}
+mask_green			={screen,modemaskGreen}
+mask_blue			={screen,modemaskBlue}
+mask_alpha			={screen,modemaskAlpha}
+shift_red			={screen,modeshiftRed}
+shift_green			={screen,modeshiftGreen}
+shift_blue			={screen,modeshiftBlue}
+shift_alpha			={screen,modeshiftAlpha}
+margin				=4
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-0010-utilityFillVerticalStrip]
+color1_red			=0xFF
+color1_green		=0x00
+color1_blue			=0x00
+color1_alpha		=0x00
+color1				=red
+color2_red			=0xFF
+color2_green		=0xFF
+color2_blue			=0xFF
+color2_alpha		=0x00
+color2				=white
+color3_red			=0x00
+color3_green		=0xFF
+color3_blue			=0x00
+color3_alpha		=0x00
+color3				=green
+color4_red			=0xFF
+color4_green		=0xF0
+color4_blue			=0x00
+color4_alpha		=0x00
+color4				=yellow
+color5_red			=0x00
+color5_green		=0x00
+color5_blue			=0xC0
+color5_alpha		=0x00
+color5				=lightblue
+color6_red			=0xFF
+color6_green		=0xFF
+color6_blue			=0x00
+color6_alpha		=0x00
+color6				=pink
+color7_red			=0x00
+color7_green		=0xF0
+color7_blue			=0xF0
+color7_alpha		=0x00
+color7				=navyblue
+color8_red			=0xF0
+color8_green		=0x00
+color8_blue			=0xF0
+color8_alpha		=0x00
+color8				=lightgreen
+mask_red			={screen,modemaskRed}
+mask_green			={screen,modemaskGreen}
+mask_blue			={screen,modemaskBlue}
+mask_alpha			={screen,modemaskAlpha}
+shift_red			={screen,modeshiftRed}
+shift_green			={screen,modeshiftGreen}
+shift_blue			={screen,modeshiftBlue}
+shift_alpha			={screen,modeshiftAlpha}
+margin				=4
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayMode]
+halEValue			=EDisplayMode
+deviceid			={screen0,id}
+expected			={screen0,displaymode}
+value				={screen0,displaymode}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayXPixels]
+halEValue			=EDisplayXPixels
+deviceid			={screen0,id}
+expected			={screen0,modewidth}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayYPixels]
+halEValue			=EDisplayYPixels
+deviceid			={screen0,id}
+expected			={screen0,modeheight}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayMemoryAddress]
+halEValue			=EDisplayMemoryAddress
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayOffsetBetweenLines]
+halEValue			=EDisplayOffsetBetweenLines
+deviceid			={screen0,id}
+expected			={screen0,modedisplayOffsetBetweenLines}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayOffsetToFirstPixel]
+halEValue			=EDisplayOffsetToFirstPixel
+deviceid			={screen0,id}
+expected			={screen0,modedisplayOffsetToFirstPixel}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayBitsPerPixel]
+halEValue			=EDisplayBitsPerPixel
+deviceid			={screen0,id}
+expected			={screen0,modebitsPerPixel}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-Test-EDisplayIsPalettized]
+halEValue			=EDisplayIsPalettized
+deviceid			={screen0,id}
+expected			={screen0,modedisplayIsPalettized}
+
+
+
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMode]
+halEValue			=EDisplayMode
+deviceid			={screen0,id}
+value				={screen0,displaymode}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayXPixels]
+halEValue			=EDisplayXPixels
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayYPixels]
+halEValue			=EDisplayYPixels
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayMemoryAddress]
+halEValue			=EDisplayMemoryAddress
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetBetweenLines]
+halEValue			=EDisplayOffsetBetweenLines
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayOffsetToFirstPixel]
+halEValue			=EDisplayOffsetToFirstPixel
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayBitsPerPixel]
+halEValue			=EDisplayBitsPerPixel
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-EDisplayIsPalettized]
+halEValue			=EDisplayIsPalettized
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-0002-utilityFillColor]
+color_red			=0xFF
+color_green			=0x00
+color_blue			=0x00
+color_alpha			=0x00
+color				=red
+mask_red			={screen0,modemaskRed}
+mask_green			={screen0,modemaskGreen}
+mask_blue			={screen0,modemaskBlue}
+mask_alpha			={screen0,modemaskAlpha}
+shift_red			={screen0,modeshiftRed}
+shift_green			={screen0,modeshiftGreen}
+shift_blue			={screen0,modeshiftBlue}
+shift_alpha			={screen0,modeshiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-0003-utilityFillColor]
+color_red			=0x00
+color_green			=0xFF
+color_blue			=0x00
+color_alpha			=0x00
+color				=green
+mask_red			={screen0,modemaskRed}
+mask_green			={screen0,modemaskGreen}
+mask_blue			={screen0,modemaskBlue}
+mask_alpha			={screen0,modemaskAlpha}
+shift_red			={screen0,modeshiftRed}
+shift_green			={screen0,modeshiftGreen}
+shift_blue			={screen0,modeshiftBlue}
+shift_alpha			={screen0,modeshiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-0004-utilityFillColor]
+color_red			=0x00
+color_green			=0x00
+color_blue			=0xFF
+color_alpha			=0x00
+color				=blue
+mask_red			={screen0,modemaskRed}
+mask_green			={screen0,modemaskGreen}
+mask_blue			={screen0,modemaskBlue}
+mask_alpha			={screen0,modemaskAlpha}
+shift_red			={screen0,modeshiftRed}
+shift_green			={screen0,modeshiftGreen}
+shift_blue			={screen0,modeshiftBlue}
+shift_alpha			={screen0,modeshiftAlpha}
+
+screenDelay			={screen,screenDelay}
+ 
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-0005-utilityFillColor]
+color_red			=0xFF
+color_green			=0xFF
+color_blue			=0xFF
+color_alpha			=0x00
+color				=white
+mask_red			={screen0,modemaskRed}
+mask_green			={screen0,modemaskGreen}
+mask_blue			={screen0,modemaskBlue}
+mask_alpha			={screen0,modemaskAlpha}
+shift_red			={screen0,modeshiftRed}
+shift_green			={screen0,modeshiftGreen}
+shift_blue			={screen0,modeshiftBlue}
+shift_alpha			={screen0,modeshiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-0006-utilityFillColor]
+color_red			=0x00
+color_green			=0x00
+color_blue			=0x00
+color_alpha			=0x00
+color				=black
+mask_red			={screen0,modemaskRed}
+mask_green			={screen0,modemaskGreen}
+mask_blue			={screen0,modemaskBlue}
+mask_alpha			={screen0,modemaskAlpha}
+shift_red			={screen0,modeshiftRed}
+shift_green			={screen0,modeshiftGreen}
+shift_blue			={screen0,modeshiftBlue}
+shift_alpha			={screen0,modeshiftAlpha}
+
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-0007-utilityFillMultiColor]
+color1_red			=0xFF
+color1_green			=0x00
+color1_blue			=0x00
+color1_alpha			=0x00
+color1				=red
+color2_red			=0xFF
+color2_green			=0xFF
+color2_blue			=0xFF
+color2_alpha			=0x00
+color2				=white
+color3_red			=0x00
+color3_green			=0xFF
+color3_blue			=0x00
+color3_alpha			=0x00
+color3				=green
+mask_red			={screen0,modemaskRed}
+mask_green			={screen0,modemaskGreen}
+mask_blue			={screen0,modemaskBlue}
+mask_alpha			={screen0,modemaskAlpha}
+shift_red			={screen0,modeshiftRed}
+shift_green			={screen0,modeshiftGreen}
+shift_blue			={screen0,modeshiftBlue}
+shift_alpha			={screen0,modeshiftAlpha}
+margin				=8
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-0008-utilityMovingRectangle]
+background_red			=0xFF
+background_green		=0x00
+background_blue			=0x00
+background_alpha		=0x00
+background			    =red
+foreground_red			=0x00
+foreground_green		=0x00
+foreground_blue			=0x00
+foreground_alpha		=0x00
+foreground			=black
+mask_red			={screen0,modemaskRed}
+mask_green			={screen0,modemaskGreen}
+mask_blue			={screen0,modemaskBlue}
+mask_alpha			={screen0,modemaskAlpha}
+shift_red			={screen0,modeshiftRed}
+shift_green			={screen0,modeshiftGreen}
+shift_blue			={screen0,modeshiftBlue}
+shift_alpha			={screen0,modeshiftAlpha}
+length				=32
+width				=32
+step				=1
+framedelay			=10000
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-0009-utilityFillHorizontalStrip]
+color1_red			=0xFF
+color1_green		=0x00
+color1_blue			=0x00
+color1_alpha		=0x00
+color1				=red
+color2_red			=0xFF
+color2_green		=0xFF
+color2_blue			=0xFF
+color2_alpha		=0x00
+color2				=white
+color3_red			=0x00
+color3_green		=0xFF
+color3_blue			=0x00
+color3_alpha		=0x00
+color3				=green
+color4_red			=0xFF
+color4_green		=0xF0
+color4_blue			=0x00
+color4_alpha		=0x00
+color4				=yellow
+color5_red			=0x00
+color5_green		=0x00
+color5_blue			=0xC0
+color5_alpha		=0x00
+color5				=lightblue
+color6_red			=0xFF
+color6_green		=0xFF
+color6_blue			=0x00
+color6_alpha		=0x00
+color6				=pink
+color7_red			=0x00
+color7_green		=0xF0
+color7_blue			=0xF0
+color7_alpha		=0x00
+color7				=navyblue
+color8_red			=0xF0
+color8_green		=0x00
+color8_blue			=0xF0
+color8_alpha		=0x00
+color8				=lightgreen
+mask_red			={screen0,modemaskRed}
+mask_green			={screen0,modemaskGreen}
+mask_blue			={screen0,modemaskBlue}
+mask_alpha			={screen0,modemaskAlpha}
+shift_red			={screen0,modeshiftRed}
+shift_green			={screen0,modeshiftGreen}
+shift_blue			={screen0,modeshiftBlue}
+shift_alpha			={screen0,modeshiftAlpha}
+margin				=4
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0-0010-utilityFillVerticalStrip]
+color1_red			=0xFF
+color1_green		=0x00
+color1_blue			=0x00
+color1_alpha		=0x00
+color1				=red
+color2_red			=0xFF
+color2_green		=0xFF
+color2_blue			=0xFF
+color2_alpha		=0x00
+color2				=white
+color3_red			=0x00
+color3_green		=0xFF
+color3_blue			=0x00
+color3_alpha		=0x00
+color3				=green
+color4_red			=0xFF
+color4_green		=0xF0
+color4_blue			=0x00
+color4_alpha		=0x00
+color4				=yellow
+color5_red			=0x00
+color5_green		=0x00
+color5_blue			=0xC0
+color5_alpha		=0x00
+color5				=lightblue
+color6_red			=0xFF
+color6_green		=0xFF
+color6_blue			=0x00
+color6_alpha		=0x00
+color6				=pink
+color7_red			=0x00
+color7_green		=0xF0
+color7_blue			=0xF0
+color7_alpha		=0x00
+color7				=navyblue
+color8_red			=0xF0
+color8_green		=0x00
+color8_blue			=0xF0
+color8_alpha		=0x00
+color8				=lightgreen
+mask_red			={screen0,modemaskRed}
+mask_green			={screen0,modemaskGreen}
+mask_blue			={screen0,modemaskBlue}
+mask_alpha			={screen0,modemaskAlpha}
+shift_red			={screen0,modeshiftRed}
+shift_green			={screen0,modeshiftGreen}
+shift_blue			={screen0,modeshiftBlue}
+shift_alpha			={screen0,modeshiftAlpha}
+margin				=4
+
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-Test-EDisplayMode]
+halEValue			=EDisplayMode
+deviceid			={screen0,id}
+expected			=0
+value				=0
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-Test-EDisplayXPixels]
+halEValue			=EDisplayXPixels
+deviceid			={screen0,id}
+expected			={screen0,mode0width}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-Test-EDisplayYPixels]
+halEValue			=EDisplayYPixels
+deviceid			={screen0,id}
+expected			={screen0,mode0height}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-Test-EDisplayMemoryAddress]
+halEValue			=EDisplayMemoryAddress
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-Test-EDisplayOffsetBetweenLines]
+halEValue			=EDisplayOffsetBetweenLines
+deviceid			={screen0,id}
+expected			={screen0,mode0displayOffsetBetweenLines}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-Test-EDisplayOffsetToFirstPixel]
+halEValue			=EDisplayOffsetToFirstPixel
+deviceid			={screen0,id}
+expected			={screen0,mode0displayOffsetToFirstPixel}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-Test-EDisplayBitsPerPixel]
+halEValue			=EDisplayBitsPerPixel
+deviceid			={screen0,id}
+expected			={screen0,mode0bitsPerPixel}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-Test-EDisplayIsPalettized]
+halEValue			=EDisplayIsPalettized
+deviceid			={screen0,id}
+expected			={screen0,mode0displayIsPalettized}
+
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMode]
+halEValue			=EDisplayMode
+deviceid			={screen0,id}
+value				=0
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayXPixels]
+halEValue			=EDisplayXPixels
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayYPixels]
+halEValue			=EDisplayYPixels
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayMemoryAddress]
+halEValue			=EDisplayMemoryAddress
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetBetweenLines]
+halEValue			=EDisplayOffsetBetweenLines
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayOffsetToFirstPixel]
+halEValue			=EDisplayOffsetToFirstPixel
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayBitsPerPixel]
+halEValue			=EDisplayBitsPerPixel
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-EDisplayIsPalettized]
+halEValue			=EDisplayIsPalettized
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0002-utilityFillColor]
+color_red			=0xFF
+color_green			=0x00
+color_blue			=0x00
+color_alpha			=0x00
+color				=red
+mask_red			={screen0,mode0maskRed}
+mask_green			={screen0,mode0maskGreen}
+mask_blue			={screen0,mode0maskBlue}
+mask_alpha			={screen0,mode0maskAlpha}
+shift_red			={screen0,mode0shiftRed}
+shift_green			={screen0,mode0shiftGreen}
+shift_blue			={screen0,mode0shiftBlue}
+shift_alpha			={screen0,mode0shiftAlpha}
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0003-utilityFillColor]
+color_red			=0x00
+color_green			=0xFF
+color_blue			=0x00
+color_alpha			=0x00
+color				=green
+mask_red			={screen0,mode0maskRed}
+mask_green			={screen0,mode0maskGreen}
+mask_blue			={screen0,mode0maskBlue}
+mask_alpha			={screen0,mode0maskAlpha}
+shift_red			={screen0,mode0shiftRed}
+shift_green			={screen0,mode0shiftGreen}
+shift_blue			={screen0,mode0shiftBlue}
+shift_alpha			={screen0,mode0shiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0004-utilityFillColor]
+color_red			=0x00
+color_green			=0x00
+color_blue			=0xFF
+color_alpha			=0x00
+color				=blue
+mask_red			={screen0,mode0maskRed}
+mask_green			={screen0,mode0maskGreen}
+mask_blue			={screen0,mode0maskBlue}
+mask_alpha			={screen0,mode0maskAlpha}
+shift_red			={screen0,mode0shiftRed}
+shift_green			={screen0,mode0shiftGreen}
+shift_blue			={screen0,mode0shiftBlue}
+shift_alpha			={screen0,mode0shiftAlpha}
+
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0005-utilityFillColor]
+color_red			=0xFF
+color_green			=0xFF
+color_blue			=0xFF
+color_alpha			=0x00
+color				=white
+mask_red			={screen0,mode0maskRed}
+mask_green			={screen0,mode0maskGreen}
+mask_blue			={screen0,mode0maskBlue}
+mask_alpha			={screen0,mode0maskAlpha}
+shift_red			={screen0,mode0shiftRed}
+shift_green			={screen0,mode0shiftGreen}
+shift_blue			={screen0,mode0shiftBlue}
+shift_alpha			={screen0,mode0shiftAlpha}
+
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0006-utilityFillColor]
+color_red			=0x00
+color_green			=0x00
+color_blue			=0x00
+color_alpha			=0x00
+color				=black
+mask_red			={screen0,mode0maskRed}
+mask_green			={screen0,mode0maskGreen}
+mask_blue			={screen0,mode0maskBlue}
+mask_alpha			={screen0,mode0maskAlpha}
+shift_red			={screen0,mode0shiftRed}
+shift_green			={screen0,mode0shiftGreen}
+shift_blue			={screen0,mode0shiftBlue}
+shift_alpha			={screen0,mode0shiftAlpha}
+
+
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0007-utilityFillMultiColor]
+color1_red			=0xFF
+color1_green			=0x00
+color1_blue			=0x00
+color1_alpha			=0x00
+color1				=red
+color2_red			=0xFF
+color2_green			=0xFF
+color2_blue			=0xFF
+color2_alpha			=0x00
+color2				=white
+color3_red			=0x00
+color3_green			=0xFF
+color3_blue			=0x00
+color3_alpha			=0x00
+color3				=green
+mask_red			={screen0,mode0maskRed}
+mask_green			={screen0,mode0maskGreen}
+mask_blue			={screen0,mode0maskBlue}
+mask_alpha			={screen0,mode0maskAlpha}
+shift_red			={screen0,mode0shiftRed}
+shift_green			={screen0,mode0shiftGreen}
+shift_blue			={screen0,mode0shiftBlue}
+shift_alpha			={screen0,mode0shiftAlpha}
+margin				=8
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0008-utilityMovingRectangle]
+background_red			=0xFF
+background_green		=0x00
+background_blue			=0x00
+background_alpha		=0x00
+background			    =red
+foreground_red			=0x00
+foreground_green		=0x00
+foreground_blue			=0x00
+foreground_alpha		=0x00
+foreground			=black
+mask_red			={screen0,mode0maskRed}
+mask_green			={screen0,mode0maskGreen}
+mask_blue			={screen0,mode0maskBlue}
+mask_alpha			={screen0,mode0maskAlpha}
+shift_red			={screen0,mode0shiftRed}
+shift_green			={screen0,mode0shiftGreen}
+shift_blue			={screen0,mode0shiftBlue}
+shift_alpha			={screen0,mode0shiftAlpha}
+length				=32
+width				=32
+step				=1
+framedelay			=10000
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0009-utilityFillHorizontalStrip]
+color1_red			=0xFF
+color1_green		=0x00
+color1_blue			=0x00
+color1_alpha		=0x00
+color1				=red
+color2_red			=0xFF
+color2_green		=0xFF
+color2_blue			=0xFF
+color2_alpha		=0x00
+color2				=white
+color3_red			=0x00
+color3_green		=0xFF
+color3_blue			=0x00
+color3_alpha		=0x00
+color3				=green
+color4_red			=0xFF
+color4_green		=0xF0
+color4_blue			=0x00
+color4_alpha		=0x00
+color4				=yellow
+color5_red			=0x00
+color5_green		=0x00
+color5_blue			=0xC0
+color5_alpha		=0x00
+color5				=lightblue
+color6_red			=0xFF
+color6_green		=0xFF
+color6_blue			=0x00
+color6_alpha		=0x00
+color6				=pink
+color7_red			=0x00
+color7_green		=0xF0
+color7_blue			=0xF0
+color7_alpha		=0x00
+color7				=navyblue
+color8_red			=0xF0
+color8_green		=0x00
+color8_blue			=0xF0
+color8_alpha		=0x00
+color8				=lightgreen
+mask_red			={screen0,mode0maskRed}
+mask_green			={screen0,mode0maskGreen}
+mask_blue			={screen0,mode0maskBlue}
+mask_alpha			={screen0,mode0maskAlpha}
+shift_red			={screen0,mode0shiftRed}
+shift_green			={screen0,mode0shiftGreen}
+shift_blue			={screen0,mode0shiftBlue}
+shift_alpha			={screen0,mode0shiftAlpha}
+margin				=4
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0-0010-utilityFillVerticalStrip]
+color1_red			=0xFF
+color1_green		=0x00
+color1_blue			=0x00
+color1_alpha		=0x00
+color1				=red
+color2_red			=0xFF
+color2_green		=0xFF
+color2_blue			=0xFF
+color2_alpha		=0x00
+color2				=white
+color3_red			=0x00
+color3_green		=0xFF
+color3_blue			=0x00
+color3_alpha		=0x00
+color3				=green
+color4_red			=0xFF
+color4_green		=0xF0
+color4_blue			=0x00
+color4_alpha		=0x00
+color4				=yellow
+color5_red			=0x00
+color5_green		=0x00
+color5_blue			=0xC0
+color5_alpha		=0x00
+color5				=lightblue
+color6_red			=0xFF
+color6_green		=0xFF
+color6_blue			=0x00
+color6_alpha		=0x00
+color6				=pink
+color7_red			=0x00
+color7_green		=0xF0
+color7_blue			=0xF0
+color7_alpha		=0x00
+color7				=navyblue
+color8_red			=0xF0
+color8_green		=0x00
+color8_blue			=0xF0
+color8_alpha		=0x00
+color8				=lightgreen
+mask_red			={screen0,mode0maskRed}
+mask_green			={screen0,mode0maskGreen}
+mask_blue			={screen0,mode0maskBlue}
+mask_alpha			={screen0,mode0maskAlpha}
+shift_red			={screen0,mode0shiftRed}
+shift_green			={screen0,mode0shiftGreen}
+shift_blue			={screen0,mode0shiftBlue}
+shift_alpha			={screen0,mode0shiftAlpha}
+margin				=4
+
+screenDelay			={screen,screenDelay}
+
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-Test-EDisplayMode]
+halEValue			=EDisplayMode
+deviceid			={screen0,id}
+expected			=1
+value				=1
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-Test-EDisplayXPixels]
+halEValue			=EDisplayXPixels
+deviceid			={screen0,id}
+expected			={screen0,mode1width}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-Test-EDisplayYPixels]
+halEValue			=EDisplayYPixels
+deviceid			={screen0,id}
+expected			={screen0,mode1height}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-Test-EDisplayMemoryAddress]
+halEValue			=EDisplayMemoryAddress
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-Test-EDisplayOffsetBetweenLines]
+halEValue			=EDisplayOffsetBetweenLines
+deviceid			={screen0,id}
+expected			={screen0,mode1displayOffsetBetweenLines}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-Test-EDisplayOffsetToFirstPixel]
+halEValue			=EDisplayOffsetToFirstPixel
+deviceid			={screen0,id}
+expected			={screen0,mode1displayOffsetToFirstPixel}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-Test-EDisplayBitsPerPixel]
+halEValue			=EDisplayBitsPerPixel
+deviceid			={screen0,id}
+expected			={screen0,mode1bitsPerPixel}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-Test-EDisplayIsPalettized]
+halEValue			=EDisplayIsPalettized
+deviceid			={screen0,id}
+expected			={screen0,mode1displayIsPalettized}
+
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMode]
+halEValue			=EDisplayMode
+deviceid			={screen0,id}
+value				=1
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayXPixels]
+halEValue			=EDisplayXPixels
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayYPixels]
+halEValue			=EDisplayYPixels
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayMemoryAddress]
+halEValue			=EDisplayMemoryAddress
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetBetweenLines]
+halEValue			=EDisplayOffsetBetweenLines
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayOffsetToFirstPixel]
+halEValue			=EDisplayOffsetToFirstPixel
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayBitsPerPixel]
+halEValue			=EDisplayBitsPerPixel
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-EDisplayIsPalettized]
+halEValue			=EDisplayIsPalettized
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0002-utilityFillColor]
+color_red			=0xFF
+color_green			=0x00
+color_blue			=0x00
+color_alpha			=0x00
+color				=red
+mask_red			={screen0,mode1maskRed}
+mask_green			={screen0,mode1maskGreen}
+mask_blue			={screen0,mode1maskBlue}
+mask_alpha			={screen0,mode1maskAlpha}
+shift_red			={screen0,mode1shiftRed}
+shift_green			={screen0,mode1shiftGreen}
+shift_blue			={screen0,mode1shiftBlue}
+shift_alpha			={screen0,mode1shiftAlpha}
+
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0003-utilityFillColor]
+color_red			=0x00
+color_green			=0xFF
+color_blue			=0x00
+color_alpha			=0x00
+color				=green
+mask_red			={screen0,mode1maskRed}
+mask_green			={screen0,mode1maskGreen}
+mask_blue			={screen0,mode1maskBlue}
+mask_alpha			={screen0,mode1maskAlpha}
+shift_red			={screen0,mode1shiftRed}
+shift_green			={screen0,mode1shiftGreen}
+shift_blue			={screen0,mode1shiftBlue}
+shift_alpha			={screen0,mode1shiftAlpha}
+
+
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0004-utilityFillColor]
+color_red			=0x00
+color_green			=0x00
+color_blue			=0xFF
+color_alpha			=0x00
+color				=blue
+mask_red			={screen0,mode1maskRed}
+mask_green			={screen0,mode1maskGreen}
+mask_blue			={screen0,mode1maskBlue}
+mask_alpha			={screen0,mode1maskAlpha}
+shift_red			={screen0,mode1shiftRed}
+shift_green			={screen0,mode1shiftGreen}
+shift_blue			={screen0,mode1shiftBlue}
+shift_alpha			={screen0,mode1shiftAlpha}
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0005-utilityFillColor]
+color_red			=0xFF
+color_green			=0xFF
+color_blue			=0xFF
+color_alpha			=0x00
+color				=white
+mask_red			={screen0,mode1maskRed}
+mask_green			={screen0,mode1maskGreen}
+mask_blue			={screen0,mode1maskBlue}
+mask_alpha			={screen0,mode1maskAlpha}
+shift_red			={screen0,mode1shiftRed}
+shift_green			={screen0,mode1shiftGreen}
+shift_blue			={screen0,mode1shiftBlue}
+shift_alpha			={screen0,mode1shiftAlpha}
+
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0006-utilityFillColor]
+color_red			=0x00
+color_green			=0x00
+color_blue			=0x00
+color_alpha			=0x00
+color				=black
+mask_red			={screen0,mode1maskRed}
+mask_green			={screen0,mode1maskGreen}
+mask_blue			={screen0,mode1maskBlue}
+mask_alpha			={screen0,mode1maskAlpha}
+shift_red			={screen0,mode1shiftRed}
+shift_green			={screen0,mode1shiftGreen}
+shift_blue			={screen0,mode1shiftBlue}
+shift_alpha			={screen0,mode1shiftAlpha}
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0007-utilityFillMultiColor]
+color1_red			=0xFF
+color1_green			=0x00
+color1_blue			=0x00
+color1_alpha			=0x00
+color1				=red
+color2_red			=0xFF
+color2_green			=0xFF
+color2_blue			=0xFF
+color2_alpha			=0x00
+color2				=white
+color3_red			=0x00
+color3_green			=0xFF
+color3_blue			=0x00
+color3_alpha			=0x00
+color3				=green
+mask_red			={screen0,mode1maskRed}
+mask_green			={screen0,mode1maskGreen}
+mask_blue			={screen0,mode1maskBlue}
+mask_alpha			={screen0,mode1maskAlpha}
+shift_red			={screen0,mode1shiftRed}
+shift_green			={screen0,mode1shiftGreen}
+shift_blue			={screen0,mode1shiftBlue}
+shift_alpha			={screen0,mode1shiftAlpha}
+margin				=8
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0008-utilityMovingRectangle]
+background_red			=0xFF
+background_green		=0x00
+background_blue			=0x00
+background_alpha		=0x00
+background			    =red
+foreground_red			=0x00
+foreground_green		=0x00
+foreground_blue			=0x00
+foreground_alpha		=0x00
+foreground			=black
+mask_red			={screen0,mode1maskRed}
+mask_green			={screen0,mode1maskGreen}
+mask_blue			={screen0,mode1maskBlue}
+mask_alpha			={screen0,mode1maskAlpha}
+shift_red			={screen0,mode1shiftRed}
+shift_green			={screen0,mode1shiftGreen}
+shift_blue			={screen0,mode1shiftBlue}
+shift_alpha			={screen0,mode1shiftAlpha}
+length				=32
+width				=32
+step				=1
+framedelay			=10000
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0009-utilityFillHorizontalStrip]
+color1_red			=0xFF
+color1_green		=0x00
+color1_blue			=0x00
+color1_alpha		=0x00
+color1				=red
+color2_red			=0xFF
+color2_green		=0xFF
+color2_blue			=0xFF
+color2_alpha		=0x00
+color2				=white
+color3_red			=0x00
+color3_green		=0xFF
+color3_blue			=0x00
+color3_alpha		=0x00
+color3				=green
+color4_red			=0xFF
+color4_green		=0xF0
+color4_blue			=0x00
+color4_alpha		=0x00
+color4				=yellow
+color5_red			=0x00
+color5_green		=0x00
+color5_blue			=0xC0
+color5_alpha		=0x00
+color5				=lightblue
+color6_red			=0xFF
+color6_green		=0xFF
+color6_blue			=0x00
+color6_alpha		=0x00
+color6				=pink
+color7_red			=0x00
+color7_green		=0xF0
+color7_blue			=0xF0
+color7_alpha		=0x00
+color7				=navyblue
+color8_red			=0xF0
+color8_green		=0x00
+color8_blue			=0xF0
+color8_alpha		=0x00
+color8				=lightgreen
+mask_red			={screen0,mode1maskRed}
+mask_green			={screen0,mode1maskGreen}
+mask_blue			={screen0,mode1maskBlue}
+mask_alpha			={screen0,mode1maskAlpha}
+shift_red			={screen0,mode1shiftRed}
+shift_green			={screen0,mode1shiftGreen}
+shift_blue			={screen0,mode1shiftBlue}
+shift_alpha			={screen0,mode1shiftAlpha}
+margin				=4
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1-0010-utilityFillVerticalStrip]
+color1_red			=0xFF
+color1_green		=0x00
+color1_blue			=0x00
+color1_alpha		=0x00
+color1				=red
+color2_red			=0xFF
+color2_green		=0xFF
+color2_blue			=0xFF
+color2_alpha		=0x00
+color2				=white
+color3_red			=0x00
+color3_green		=0xFF
+color3_blue			=0x00
+color3_alpha		=0x00
+color3				=green
+color4_red			=0xFF
+color4_green		=0xF0
+color4_blue			=0x00
+color4_alpha		=0x00
+color4				=yellow
+color5_red			=0x00
+color5_green		=0x00
+color5_blue			=0xC0
+color5_alpha		=0x00
+color5				=lightblue
+color6_red			=0xFF
+color6_green		=0xFF
+color6_blue			=0x00
+color6_alpha		=0x00
+color6				=pink
+color7_red			=0x00
+color7_green		=0xF0
+color7_blue			=0xF0
+color7_alpha		=0x00
+color7				=navyblue
+color8_red			=0xF0
+color8_green		=0x00
+color8_blue			=0xF0
+color8_alpha		=0x00
+color8				=lightgreen
+mask_red			={screen0,mode1maskRed}
+mask_green			={screen0,mode1maskGreen}
+mask_blue			={screen0,mode1maskBlue}
+mask_alpha			={screen0,mode1maskAlpha}
+shift_red			={screen0,mode1shiftRed}
+shift_green			={screen0,mode1shiftGreen}
+shift_blue			={screen0,mode1shiftBlue}
+shift_alpha			={screen0,mode1shiftAlpha}
+margin				=4
+
+screenDelay			={screen,screenDelay}
+
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-Test-EDisplayMode]
+halEValue			=EDisplayMode
+deviceid			={screen1,id}
+expected			={screen1,displaymode}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-Test-EDisplayXPixels]
+halEValue			=EDisplayXPixels
+deviceid			={screen1,id}
+expected			={screen1,modewidth}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-Test-EDisplayYPixels]
+halEValue			=EDisplayYPixels
+deviceid			={screen1,id}
+expected			={screen1,modeheight}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-Test-EDisplayMemoryAddress]
+halEValue			=EDisplayMemoryAddress
+deviceid			={screen1,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-Test-EDisplayOffsetBetweenLines]
+halEValue			=EDisplayOffsetBetweenLines
+deviceid			={screen1,id}
+expected			={screen1,modedisplayOffsetBetweenLines}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-Test-EDisplayOffsetToFirstPixel]
+halEValue			=EDisplayOffsetToFirstPixel
+deviceid			={screen1,id}
+expected			={screen1,modedisplayOffsetToFirstPixel}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-Test-EDisplayBitsPerPixel]
+halEValue			=EDisplayBitsPerPixel
+deviceid			={screen1,id}
+expected			={screen1,modebitsPerPixel}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-Test-EDisplayIsPalettized]
+halEValue			=EDisplayIsPalettized
+deviceid			={screen1,id}
+expected			={screen1,modedisplayIsPalettized}
+
+
+
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMode]
+halEValue			=EDisplayMode
+deviceid			={screen1,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayXPixels]
+halEValue			=EDisplayXPixels
+deviceid			={screen1,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayYPixels]
+halEValue			=EDisplayYPixels
+deviceid			={screen1,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayMemoryAddress]
+halEValue			=EDisplayMemoryAddress
+deviceid			={screen1,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetBetweenLines]
+halEValue			=EDisplayOffsetBetweenLines
+deviceid			={screen1,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayOffsetToFirstPixel]
+halEValue			=EDisplayOffsetToFirstPixel
+deviceid			={screen1,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayBitsPerPixel]
+halEValue			=EDisplayBitsPerPixel
+deviceid			={screen1,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-EDisplayIsPalettized]
+halEValue			=EDisplayIsPalettized
+deviceid			={screen1,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-0002-utilityFillColor]
+color_red			=0xFF
+color_green			=0x00
+color_blue			=0x00
+color_alpha			=0x00
+color				=red
+mask_red			={screen1,modemaskRed}
+mask_green			={screen1,modemaskGreen}
+mask_blue			={screen1,modemaskBlue}
+mask_alpha			={screen1,modemaskAlpha}
+shift_red			={screen1,modeshiftRed}
+shift_green			={screen1,modeshiftGreen}
+shift_blue			={screen1,modeshiftBlue}
+shift_alpha			={screen1,modeshiftAlpha}
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-0003-utilityFillColor]
+color_red			=0x00
+color_green			=0xFF
+color_blue			=0x00
+color_alpha			=0x00
+color				=green
+mask_red			={screen1,modemaskRed}
+mask_green			={screen1,modemaskGreen}
+mask_blue			={screen1,modemaskBlue}
+mask_alpha			={screen1,modemaskAlpha}
+shift_red			={screen1,modeshiftRed}
+shift_green			={screen1,modeshiftGreen}
+shift_blue			={screen1,modeshiftBlue}
+shift_alpha			={screen1,modeshiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-0004-utilityFillColor]
+color_red			=0x00
+color_green			=0x00
+color_blue			=0xFF
+color_alpha			=0x00
+color				=blue
+mask_red			={screen1,modemaskRed}
+mask_green			={screen1,modemaskGreen}
+mask_blue			={screen1,modemaskBlue}
+mask_alpha			={screen1,modemaskAlpha}
+shift_red			={screen1,modeshiftRed}
+shift_green			={screen1,modeshiftGreen}
+shift_blue			={screen1,modeshiftBlue}
+shift_alpha			={screen1,modeshiftAlpha}
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-0005-utilityFillColor]
+color_red			=0xFF
+color_green			=0xFF
+color_blue			=0xFF
+color_alpha			=0x00
+color				=white
+mask_red			={screen1,modemaskRed}
+mask_green			={screen1,modemaskGreen}
+mask_blue			={screen1,modemaskBlue}
+mask_alpha			={screen1,modemaskAlpha}
+shift_red			={screen1,modeshiftRed}
+shift_green			={screen1,modeshiftGreen}
+shift_blue			={screen1,modeshiftBlue}
+shift_alpha			={screen1,modeshiftAlpha}
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-0006-utilityFillColor]
+color_red			=0x00
+color_green			=0x00
+color_blue			=0x00
+color_alpha			=0x00
+color				=black
+mask_red			={screen1,modemaskRed}
+mask_green			={screen1,modemaskGreen}
+mask_blue			={screen1,modemaskBlue}
+mask_alpha			={screen1,modemaskAlpha}
+shift_red			={screen1,modeshiftRed}
+shift_green			={screen1,modeshiftGreen}
+shift_blue			={screen1,modeshiftBlue}
+shift_alpha			={screen1,modeshiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-0007-utilityFillMultiColor]
+color1_red			=0xFF
+color1_green			=0x00
+color1_blue			=0x00
+color1_alpha			=0x00
+color1				=red
+color2_red			=0xFF
+color2_green			=0xFF
+color2_blue			=0xFF
+color2_alpha			=0x00
+color2				=white
+color3_red			=0x00
+color3_green			=0xFF
+color3_blue			=0x00
+color3_alpha			=0x00
+color3				=green
+mask_red			={screen1,modemaskRed}
+mask_green			={screen1,modemaskGreen}
+mask_blue			={screen1,modemaskBlue}
+mask_alpha			={screen1,modemaskAlpha}
+shift_red			={screen1,modeshiftRed}
+shift_green			={screen1,modeshiftGreen}
+shift_blue			={screen1,modeshiftBlue}
+shift_alpha			={screen1,modeshiftAlpha}
+margin				=8
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-0008-utilityMovingRectangle]
+background_red			=0xFF
+background_green		=0x00
+background_blue			=0x00
+background_alpha		=0x00
+background			=red
+foreground_red			=0x00
+foreground_green		=0x00
+foreground_blue			=0x00
+foreground_alpha		=0x00
+foreground			=black
+mask_red			={screen1,modemaskRed}
+mask_green			={screen1,modemaskGreen}
+mask_blue			={screen1,modemaskBlue}
+mask_alpha			={screen1,modemaskAlpha}
+shift_red			={screen1,modeshiftRed}
+shift_green			={screen1,modeshiftGreen}
+shift_blue			={screen1,modeshiftBlue}
+shift_alpha			={screen1,modeshiftAlpha}
+length				=32
+width				=32
+step				=1
+framedelay			=10000
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-0009-utilityFillHorizontalStrip]
+color1_red			=0xFF
+color1_green		=0x00
+color1_blue			=0x00
+color1_alpha		=0x00
+color1				=red
+color2_red			=0xFF
+color2_green		=0xFF
+color2_blue			=0xFF
+color2_alpha		=0x00
+color2				=white
+color3_red			=0x00
+color3_green		=0xFF
+color3_blue			=0x00
+color3_alpha		=0x00
+color3				=green
+color4_red			=0xFF
+color4_green		=0xF0
+color4_blue			=0x00
+color4_alpha		=0x00
+color4				=yellow
+color5_red			=0x00
+color5_green		=0x00
+color5_blue			=0xC0
+color5_alpha		=0x00
+color5				=lightblue
+color6_red			=0xFF
+color6_green		=0xFF
+color6_blue			=0x00
+color6_alpha		=0x00
+color6				=pink
+color7_red			=0x00
+color7_green		=0xF0
+color7_blue			=0xF0
+color7_alpha		=0x00
+color7				=navyblue
+color8_red			=0xF0
+color8_green		=0x00
+color8_blue			=0xF0
+color8_alpha		=0x00
+color8				=lightgreen
+mask_red			={screen1,modemaskRed}
+mask_green			={screen1,modemaskGreen}
+mask_blue			={screen1,modemaskBlue}
+mask_alpha			={screen1,modemaskAlpha}
+shift_red			={screen1,modeshiftRed}
+shift_green			={screen1,modeshiftGreen}
+shift_blue			={screen1,modeshiftBlue}
+shift_alpha			={screen1,modeshiftAlpha}
+margin				=4
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN1-0010-utilityFillVerticalStrip]
+color1_red			=0xFF
+color1_green		=0x00
+color1_blue			=0x00
+color1_alpha		=0x00
+color1				=red
+color2_red			=0xFF
+color2_green		=0xFF
+color2_blue			=0xFF
+color2_alpha		=0x00
+color2				=white
+color3_red			=0x00
+color3_green		=0xFF
+color3_blue			=0x00
+color3_alpha		=0x00
+color3				=green
+color4_red			=0xFF
+color4_green		=0xF0
+color4_blue			=0x00
+color4_alpha		=0x00
+color4				=yellow
+color5_red			=0x00
+color5_green		=0x00
+color5_blue			=0xC0
+color5_alpha		=0x00
+color5				=lightblue
+color6_red			=0xFF
+color6_green		=0xFF
+color6_blue			=0x00
+color6_alpha		=0x00
+color6				=pink
+color7_red			=0x00
+color7_green		=0xF0
+color7_blue			=0xF0
+color7_alpha		=0x00
+color7				=navyblue
+color8_red			=0xF0
+color8_green		=0x00
+color8_blue			=0xF0
+color8_alpha		=0x00
+color8				=lightgreen
+mask_red			={screen1,modemaskRed}
+mask_green			={screen1,modemaskGreen}
+mask_blue			={screen1,modemaskBlue}
+mask_alpha			={screen1,modemaskAlpha}
+shift_red			={screen1,modeshiftRed}
+shift_green			={screen1,modeshiftGreen}
+shift_blue			={screen1,modeshiftBlue}
+shift_alpha			={screen1,modeshiftAlpha}
+margin				=4
+
+screenDelay			={screen,screenDelay}
+
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-Test-EDisplayMode]
+halEValue			=EDisplayMode
+deviceid			={screen0,id}
+value				=2
+expected			=2
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-Test-EDisplayXPixels]
+halEValue			=EDisplayXPixels
+deviceid			={screen0,id}
+expected			={screen0,mode2width}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-Test-EDisplayYPixels]
+halEValue			=EDisplayYPixels
+deviceid			={screen0,id}
+expected			={screen0,mode2height}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-Test-EDisplayMemoryAddress]
+halEValue			=EDisplayMemoryAddress
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-Test-EDisplayOffsetBetweenLines]
+halEValue			=EDisplayOffsetBetweenLines
+deviceid			={screen0,id}
+expected			={screen0,mode2displayOffsetBetweenLines}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-Test-EDisplayOffsetToFirstPixel]
+halEValue			=EDisplayOffsetToFirstPixel
+deviceid			={screen0,id}
+expected			={screen0,mode2displayOffsetToFirstPixel}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-Test-EDisplayBitsPerPixel]
+halEValue			=EDisplayBitsPerPixel
+deviceid			={screen0,id}
+expected			={screen0,mode2bitsPerPixel}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-Test-EDisplayIsPalettized]
+halEValue			=EDisplayIsPalettized
+deviceid			={screen0,id}
+expected			={screen0,mode2displayIsPalettized}
+
+
+
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMode]
+halEValue			=EDisplayMode
+deviceid			={screen0,id}
+value				=2
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayXPixels]
+halEValue			=EDisplayXPixels
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayYPixels]
+halEValue			=EDisplayYPixels
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayMemoryAddress]
+halEValue			=EDisplayMemoryAddress
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetBetweenLines]
+halEValue			=EDisplayOffsetBetweenLines
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayOffsetToFirstPixel]
+halEValue			=EDisplayOffsetToFirstPixel
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayBitsPerPixel]
+halEValue			=EDisplayBitsPerPixel
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-EDisplayIsPalettized]
+halEValue			=EDisplayIsPalettized
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0002-utilityFillColor]
+color_red			=0xFF
+color_green			=0x00
+color_blue			=0x00
+color_alpha			=0x00
+color				=red
+mask_red			={screen0,mode2maskRed}
+mask_green			={screen0,mode2maskGreen}
+mask_blue			={screen0,mode2maskBlue}
+mask_alpha			={screen0,mode2maskAlpha}
+shift_red			={screen0,mode2shiftRed}
+shift_green			={screen0,mode2shiftGreen}
+shift_blue			={screen0,mode2shiftBlue}
+shift_alpha			={screen0,mode2shiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0003-utilityFillColor]
+color_red			=0x00
+color_green			=0xFF
+color_blue			=0x00
+color_alpha			=0x00
+color				=green
+mask_red			={screen0,mode2maskRed}
+mask_green			={screen0,mode2maskGreen}
+mask_blue			={screen0,mode2maskBlue}
+mask_alpha			={screen0,mode2maskAlpha}
+shift_red			={screen0,mode2shiftRed}
+shift_green			={screen0,mode2shiftGreen}
+shift_blue			={screen0,mode2shiftBlue}
+shift_alpha			={screen0,mode2shiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0004-utilityFillColor]
+color_red			=0x00
+color_green			=0x00
+color_blue			=0xFF
+color_alpha			=0x00
+color				=blue
+mask_red			={screen0,mode2maskRed}
+mask_green			={screen0,mode2maskGreen}
+mask_blue			={screen0,mode2maskBlue}
+mask_alpha			={screen0,mode2maskAlpha}
+shift_red			={screen0,mode2shiftRed}
+shift_green			={screen0,mode2shiftGreen}
+shift_blue			={screen0,mode2shiftBlue}
+shift_alpha			={screen0,mode2shiftAlpha}
+
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0005-utilityFillColor]
+color_red			=0xFF
+color_green			=0xFF
+color_blue			=0xFF
+color_alpha			=0x00
+color				=white
+mask_red			={screen0,mode2maskRed}
+mask_green			={screen0,mode2maskGreen}
+mask_blue			={screen0,mode2maskBlue}
+mask_alpha			={screen0,mode2maskAlpha}
+shift_red			={screen0,mode2shiftRed}
+shift_green			={screen0,mode2shiftGreen}
+shift_blue			={screen0,mode2shiftBlue}
+shift_alpha			={screen0,mode2shiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0006-utilityFillColor]
+color_red			=0x00
+color_green			=0x00
+color_blue			=0x00
+color_alpha			=0x00
+color				=black
+mask_red			={screen0,mode2maskRed}
+mask_green			={screen0,mode2maskGreen}
+mask_blue			={screen0,mode2maskBlue}
+mask_alpha			={screen0,mode2maskAlpha}
+shift_red			={screen0,mode2shiftRed}
+shift_green			={screen0,mode2shiftGreen}
+shift_blue			={screen0,mode2shiftBlue}
+shift_alpha			={screen0,mode2shiftAlpha}
+
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0007-utilityFillMultiColor]
+color1_red			=0xFF
+color1_green			=0x00
+color1_blue			=0x00
+color1_alpha			=0x00
+color1				=red
+color2_red			=0xFF
+color2_green			=0xFF
+color2_blue			=0xFF
+color2_alpha			=0x00
+color2				=white
+color3_red			=0x00
+color3_green			=0xFF
+color3_blue			=0x00
+color3_alpha			=0x00
+color3				=green
+mask_red			={screen0,mode2maskRed}
+mask_green			={screen0,mode2maskGreen}
+mask_blue			={screen0,mode2maskBlue}
+mask_alpha			={screen0,mode2maskAlpha}
+shift_red			={screen0,mode2shiftRed}
+shift_green			={screen0,mode2shiftGreen}
+shift_blue			={screen0,mode2shiftBlue}
+shift_alpha			={screen0,mode2shiftAlpha}
+margin				=8
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0008-utilityMovingRectangle]
+background_red			=0xFF
+background_green		=0x00
+background_blue			=0x00
+background_alpha		=0x00
+background			    =red
+foreground_red			=0x00
+foreground_green		=0x00
+foreground_blue			=0x00
+foreground_alpha		=0x00
+foreground			=black
+mask_red			={screen0,mode2maskRed}
+mask_green			={screen0,mode2maskGreen}
+mask_blue			={screen0,mode2maskBlue}
+mask_alpha			={screen0,mode2maskAlpha}
+shift_red			={screen0,mode2shiftRed}
+shift_green			={screen0,mode2shiftGreen}
+shift_blue			={screen0,mode2shiftBlue}
+shift_alpha			={screen0,mode2shiftAlpha}
+length				=32
+width				=32
+step				=1
+framedelay			=10000
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0009-utilityFillHorizontalStrip]
+color1_red			=0xFF
+color1_green		=0x00
+color1_blue			=0x00
+color1_alpha		=0x00
+color1				=red
+color2_red			=0xFF
+color2_green		=0xFF
+color2_blue			=0xFF
+color2_alpha		=0x00
+color2				=white
+color3_red			=0x00
+color3_green		=0xFF
+color3_blue			=0x00
+color3_alpha		=0x00
+color3				=green
+color4_red			=0xFF
+color4_green		=0xF0
+color4_blue			=0x00
+color4_alpha		=0x00
+color4				=yellow
+color5_red			=0x00
+color5_green		=0x00
+color5_blue			=0xC0
+color5_alpha		=0x00
+color5				=lightblue
+color6_red			=0xFF
+color6_green		=0xFF
+color6_blue			=0x00
+color6_alpha		=0x00
+color6				=pink
+color7_red			=0x00
+color7_green		=0xF0
+color7_blue			=0xF0
+color7_alpha		=0x00
+color7				=navyblue
+color8_red			=0xF0
+color8_green		=0x00
+color8_blue			=0xF0
+color8_alpha		=0x00
+color8				=lightgreen
+mask_red			={screen0,mode2maskRed}
+mask_green			={screen0,mode2maskGreen}
+mask_blue			={screen0,mode2maskBlue}
+mask_alpha			={screen0,mode2maskAlpha}
+shift_red			={screen0,mode2shiftRed}
+shift_green			={screen0,mode2shiftGreen}
+shift_blue			={screen0,mode2shiftBlue}
+shift_alpha			={screen0,mode2shiftAlpha}
+margin				=4
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2-0010-utilityFillVerticalStrip]
+color1_red			=0xFF
+color1_green		=0x00
+color1_blue			=0x00
+color1_alpha		=0x00
+color1				=red
+color2_red			=0xFF
+color2_green		=0xFF
+color2_blue			=0xFF
+color2_alpha		=0x00
+color2				=white
+color3_red			=0x00
+color3_green		=0xFF
+color3_blue			=0x00
+color3_alpha		=0x00
+color3				=green
+color4_red			=0xFF
+color4_green		=0xF0
+color4_blue			=0x00
+color4_alpha		=0x00
+color4				=yellow
+color5_red			=0x00
+color5_green		=0x00
+color5_blue			=0xC0
+color5_alpha		=0x00
+color5				=lightblue
+color6_red			=0xFF
+color6_green		=0xFF
+color6_blue			=0x00
+color6_alpha		=0x00
+color6				=pink
+color7_red			=0x00
+color7_green		=0xF0
+color7_blue			=0xF0
+color7_alpha		=0x00
+color7				=navyblue
+color8_red			=0xF0
+color8_green		=0x00
+color8_blue			=0xF0
+color8_alpha		=0x00
+color8				=lightgreen
+mask_red			={screen0,mode2maskRed}
+mask_green			={screen0,mode2maskGreen}
+mask_blue			={screen0,mode2maskBlue}
+mask_alpha			={screen0,mode2maskAlpha}
+shift_red			={screen0,mode2shiftRed}
+shift_green			={screen0,mode2shiftGreen}
+shift_blue			={screen0,mode2shiftBlue}
+shift_alpha			={screen0,mode2shiftAlpha}
+margin				=4
+
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-Test-EDisplayMode]
+halEValue			=EDisplayMode
+deviceid			={screen0,id}
+value				=3
+expected			=3
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-Test-EDisplayXPixels]
+halEValue			=EDisplayXPixels
+deviceid			={screen0,id}
+expected			={screen0,mode3width}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-Test-EDisplayYPixels]
+halEValue			=EDisplayYPixels
+deviceid			={screen0,id}
+expected			={screen0,mode3height}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-Test-EDisplayMemoryAddress]
+halEValue			=EDisplayMemoryAddress
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-Test-EDisplayOffsetBetweenLines]
+halEValue			=EDisplayOffsetBetweenLines
+deviceid			={screen0,id}
+expected			={screen0,mode3displayOffsetBetweenLines}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-Test-EDisplayOffsetToFirstPixel]
+halEValue			=EDisplayOffsetToFirstPixel
+deviceid			={screen0,id}
+expected			={screen0,mode3displayOffsetToFirstPixel}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-Test-EDisplayBitsPerPixel]
+halEValue			=EDisplayBitsPerPixel
+deviceid			={screen0,id}
+expected			={screen0,mode3bitsPerPixel}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-Test-EDisplayIsPalettized]
+halEValue			=EDisplayIsPalettized
+deviceid			={screen0,id}
+expected			={screen0,mode3displayIsPalettized}
+
+
+
+
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMode]
+halEValue			=EDisplayMode
+deviceid			={screen0,id}
+value				=3
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayXPixels]
+halEValue			=EDisplayXPixels
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayYPixels]
+halEValue			=EDisplayYPixels
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayMemoryAddress]
+halEValue			=EDisplayMemoryAddress
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetBetweenLines]
+halEValue			=EDisplayOffsetBetweenLines
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayOffsetToFirstPixel]
+halEValue			=EDisplayOffsetToFirstPixel
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayBitsPerPixel]
+halEValue			=EDisplayBitsPerPixel
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-EDisplayIsPalettized]
+halEValue			=EDisplayIsPalettized
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0002-utilityFillColor]
+color_red			=0xFF
+color_green			=0x00
+color_blue			=0x00
+color_alpha			=0x00
+color				=red
+mask_red			={screen0,mode3maskRed}
+mask_green			={screen0,mode3maskGreen}
+mask_blue			={screen0,mode3maskBlue}
+mask_alpha			={screen0,mode3maskAlpha}
+shift_red			={screen0,mode3shiftRed}
+shift_green			={screen0,mode3shiftGreen}
+shift_blue			={screen0,mode3shiftBlue}
+shift_alpha			={screen0,mode3shiftAlpha}
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0003-utilityFillColor]
+color_red			=0x00
+color_green			=0xFF
+color_blue			=0x00
+color_alpha			=0x00
+color				=green
+mask_red			={screen0,mode3maskRed}
+mask_green			={screen0,mode3maskGreen}
+mask_blue			={screen0,mode3maskBlue}
+mask_alpha			={screen0,mode3maskAlpha}
+shift_red			={screen0,mode3shiftRed}
+shift_green			={screen0,mode3shiftGreen}
+shift_blue			={screen0,mode3shiftBlue}
+shift_alpha			={screen0,mode3shiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0004-utilityFillColor]
+color_red			=0x00
+color_green			=0x00
+color_blue			=0xFF
+color_alpha			=0x00
+color				=blue
+mask_red			={screen0,mode3maskRed}
+mask_green			={screen0,mode3maskGreen}
+mask_blue			={screen0,mode3maskBlue}
+mask_alpha			={screen0,mode3maskAlpha}
+shift_red			={screen0,mode3shiftRed}
+shift_green			={screen0,mode3shiftGreen}
+shift_blue			={screen0,mode3shiftBlue}
+shift_alpha			={screen0,mode3shiftAlpha}
+
+
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0005-utilityFillColor]
+color_red			=0xFF
+color_green			=0xFF
+color_blue			=0xFF
+color_alpha			=0x00
+color				=white
+mask_red			={screen0,mode3maskRed}
+mask_green			={screen0,mode3maskGreen}
+mask_blue			={screen0,mode3maskBlue}
+mask_alpha			={screen0,mode3maskAlpha}
+shift_red			={screen0,mode3shiftRed}
+shift_green			={screen0,mode3shiftGreen}
+shift_blue			={screen0,mode3shiftBlue}
+shift_alpha			={screen0,mode3shiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0006-utilityFillColor]
+color_red			=0x00
+color_green			=0x00
+color_blue			=0x00
+color_alpha			=0x00
+color				=black
+mask_red			={screen0,mode3maskRed}
+mask_green			={screen0,mode3maskGreen}
+mask_blue			={screen0,mode3maskBlue}
+mask_alpha			={screen0,mode3maskAlpha}
+shift_red			={screen0,mode3shiftRed}
+shift_green			={screen0,mode3shiftGreen}
+shift_blue			={screen0,mode3shiftBlue}
+shift_alpha			={screen0,mode3shiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0007-utilityFillMultiColor]
+color1_red			=0xFF
+color1_green			=0x00
+color1_blue			=0x00
+color1_alpha			=0x00
+color1				=red
+color2_red			=0xFF
+color2_green			=0xFF
+color2_blue			=0xFF
+color2_alpha			=0x00
+color2				=white
+color3_red			=0x00
+color3_green			=0xFF
+color3_blue			=0x00
+color3_alpha			=0x00
+color3				=green
+mask_red			={screen0,mode3maskRed}
+mask_green			={screen0,mode3maskGreen}
+mask_blue			={screen0,mode3maskBlue}
+mask_alpha			={screen0,mode3maskAlpha}
+shift_red			={screen0,mode3shiftRed}
+shift_green			={screen0,mode3shiftGreen}
+shift_blue			={screen0,mode3shiftBlue}
+shift_alpha			={screen0,mode3shiftAlpha}
+margin				=8
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0008-utilityMovingRectangle]
+background_red			=0xFF
+background_green		=0x00
+background_blue			=0x00
+background_alpha		=0x00
+background		        =red
+foreground_red			=0x00
+foreground_green		=0x00
+foreground_blue			=0x00
+foreground_alpha		=0x00
+foreground			=black
+mask_red			={screen0,mode3maskRed}
+mask_green			={screen0,mode3maskGreen}
+mask_blue			={screen0,mode3maskBlue}
+mask_alpha			={screen0,mode3maskAlpha}
+shift_red			={screen0,mode3shiftRed}
+shift_green			={screen0,mode3shiftGreen}
+shift_blue			={screen0,mode3shiftBlue}
+shift_alpha			={screen0,mode3shiftAlpha}
+length				=32
+width				=32
+step				=1
+framedelay			=10000
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0009-utilityFillHorizontalStrip]
+color1_red			=0xFF
+color1_green		=0x00
+color1_blue			=0x00
+color1_alpha		=0x00
+color1				=red
+color2_red			=0xFF
+color2_green		=0xFF
+color2_blue			=0xFF
+color2_alpha		=0x00
+color2				=white
+color3_red			=0x00
+color3_green		=0xFF
+color3_blue			=0x00
+color3_alpha		=0x00
+color3				=green
+color4_red			=0xFF
+color4_green		=0xF0
+color4_blue			=0x00
+color4_alpha		=0x00
+color4				=yellow
+color5_red			=0x00
+color5_green		=0x00
+color5_blue			=0xC0
+color5_alpha		=0x00
+color5				=lightblue
+color6_red			=0xFF
+color6_green		=0xFF
+color6_blue			=0x00
+color6_alpha		=0x00
+color6				=pink
+color7_red			=0x00
+color7_green		=0xF0
+color7_blue			=0xF0
+color7_alpha		=0x00
+color7				=navyblue
+color8_red			=0xF0
+color8_green		=0x00
+color8_blue			=0xF0
+color8_alpha		=0x00
+color8				=lightgreen
+mask_red			={screen0,mode3maskRed}
+mask_green			={screen0,mode3maskGreen}
+mask_blue			={screen0,mode3maskBlue}
+mask_alpha			={screen0,mode3maskAlpha}
+shift_red			={screen0,mode3shiftRed}
+shift_green			={screen0,mode3shiftGreen}
+shift_blue			={screen0,mode3shiftBlue}
+shift_alpha			={screen0,mode3shiftAlpha}
+margin				=4
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3-0010-utilityFillVerticalStrip]
+color1_red			=0xFF
+color1_green		=0x00
+color1_blue			=0x00
+color1_alpha		=0x00
+color1				=red
+color2_red			=0xFF
+color2_green		=0xFF
+color2_blue			=0xFF
+color2_alpha		=0x00
+color2				=white
+color3_red			=0x00
+color3_green		=0xFF
+color3_blue			=0x00
+color3_alpha		=0x00
+color3				=green
+color4_red			=0xFF
+color4_green		=0xF0
+color4_blue			=0x00
+color4_alpha		=0x00
+color4				=yellow
+color5_red			=0x00
+color5_green		=0x00
+color5_blue			=0xC0
+color5_alpha		=0x00
+color5				=lightblue
+color6_red			=0xFF
+color6_green		=0xFF
+color6_blue			=0x00
+color6_alpha		=0x00
+color6				=pink
+color7_red			=0x00
+color7_green		=0xF0
+color7_blue			=0xF0
+color7_alpha		=0x00
+color7				=navyblue
+color8_red			=0xF0
+color8_green		=0x00
+color8_blue			=0xF0
+color8_alpha		=0x00
+color8				=lightgreen
+mask_red			={screen0,mode3maskRed}
+mask_green			={screen0,mode3maskGreen}
+mask_blue			={screen0,mode3maskBlue}
+mask_alpha			={screen0,mode3maskAlpha}
+shift_red			={screen0,mode3shiftRed}
+shift_green			={screen0,mode3shiftGreen}
+shift_blue			={screen0,mode3shiftBlue}
+shift_alpha			={screen0,mode3shiftAlpha}
+margin				=4
+
+screenDelay			={screen,screenDelay}
+
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-Test-EDisplayMode]
+halEValue			=EDisplayMode
+deviceid			={screen0,id}
+value				=4
+expected			=4
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-Test-EDisplayXPixels]
+halEValue			=EDisplayXPixels
+deviceid			={screen0,id}
+expected			={screen0,mode4width}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-Test-EDisplayYPixels]
+halEValue			=EDisplayYPixels
+deviceid			={screen0,id}
+expected			={screen0,mode4height}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-Test-EDisplayMemoryAddress]
+halEValue			=EDisplayMemoryAddress
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-Test-EDisplayOffsetBetweenLines]
+halEValue			=EDisplayOffsetBetweenLines
+deviceid			={screen0,id}
+expected			={screen0,mode4displayOffsetBetweenLines}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-Test-EDisplayOffsetToFirstPixel]
+halEValue			=EDisplayOffsetToFirstPixel
+deviceid			={screen0,id}
+expected			={screen0,mode4displayOffsetToFirstPixel}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-Test-EDisplayBitsPerPixel]
+halEValue			=EDisplayBitsPerPixel
+deviceid			={screen0,id}
+expected			={screen0,mode4bitsPerPixel}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-Test-EDisplayIsPalettized]
+halEValue			=EDisplayIsPalettized
+deviceid			={screen0,id}
+expected			={screen0,mode4displayIsPalettized}
+
+
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMode]
+halEValue			=EDisplayMode
+deviceid			={screen0,id}
+value				=4
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayXPixels]
+halEValue			=EDisplayXPixels
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayYPixels]
+halEValue			=EDisplayYPixels
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayMemoryAddress]
+halEValue			=EDisplayMemoryAddress
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetBetweenLines]
+halEValue			=EDisplayOffsetBetweenLines
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayOffsetToFirstPixel]
+halEValue			=EDisplayOffsetToFirstPixel
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayBitsPerPixel]
+halEValue			=EDisplayBitsPerPixel
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-EDisplayIsPalettized]
+halEValue			=EDisplayIsPalettized
+deviceid			={screen0,id}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0002-utilityFillColor]
+color_red			=0xFF
+color_green			=0x00
+color_blue			=0x00
+color_alpha			=0x00
+color				=red
+mask_red			={screen0,mode4maskRed}
+mask_green			={screen0,mode4maskGreen}
+mask_blue			={screen0,mode4maskBlue}
+mask_alpha			={screen0,mode4maskAlpha}
+shift_red			={screen0,mode4shiftRed}
+shift_green			={screen0,mode4shiftGreen}
+shift_blue			={screen0,mode4shiftBlue}
+shift_alpha			={screen0,mode4shiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0003-utilityFillColor]
+color_red			=0x00
+color_green			=0xFF
+color_blue			=0x00
+color_alpha			=0x00
+color				=green
+mask_red			={screen0,mode4maskRed}
+mask_green			={screen0,mode4maskGreen}
+mask_blue			={screen0,mode4maskBlue}
+mask_alpha			={screen0,mode4maskAlpha}
+shift_red			={screen0,mode4shiftRed}
+shift_green			={screen0,mode4shiftGreen}
+shift_blue			={screen0,mode4shiftBlue}
+shift_alpha			={screen0,mode4shiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0004-utilityFillColor]
+color_red			=0x00
+color_green			=0x00
+color_blue			=0xFF
+color_alpha			=0x00
+color				=blue
+mask_red			={screen0,mode4maskRed}
+mask_green			={screen0,mode4maskGreen}
+mask_blue			={screen0,mode4maskBlue}
+mask_alpha			={screen0,mode4maskAlpha}
+shift_red			={screen0,mode4shiftRed}
+shift_green			={screen0,mode4shiftGreen}
+shift_blue			={screen0,mode4shiftBlue}
+shift_alpha			={screen0,mode4shiftAlpha}
+
+screenDelay			={screen,screenDelay}
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0005-utilityFillColor]
+color_red			=0xFF
+color_green			=0xFF
+color_blue			=0xFF
+color_alpha			=0x00
+color				=white
+mask_red			={screen0,mode4maskRed}
+mask_green			={screen0,mode4maskGreen}
+mask_blue			={screen0,mode4maskBlue}
+mask_alpha			={screen0,mode4maskAlpha}
+shift_red			={screen0,mode4shiftRed}
+shift_green			={screen0,mode4shiftGreen}
+shift_blue			={screen0,mode4shiftBlue}
+shift_alpha			={screen0,mode4shiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0006-utilityFillColor]
+color_red			=0x00
+color_green			=0x00
+color_blue			=0x00
+color_alpha			=0x00
+color				=black
+mask_red			={screen0,mode4maskRed}
+mask_green			={screen0,mode4maskGreen}
+mask_blue			={screen0,mode4maskBlue}
+mask_alpha			={screen0,mode4maskAlpha}
+shift_red			={screen0,mode4shiftRed}
+shift_green			={screen0,mode4shiftGreen}
+shift_blue			={screen0,mode4shiftBlue}
+shift_alpha			={screen0,mode4shiftAlpha}
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0007-utilityFillMultiColor]
+color1_red			=0xFF
+color1_green			=0x00
+color1_blue			=0x00
+color1_alpha			=0x00
+color1				=red
+color2_red			=0xFF
+color2_green			=0xFF
+color2_blue			=0xFF
+color2_alpha			=0x00
+color2				=white
+color3_red			=0x00
+color3_green			=0xFF
+color3_blue			=0x00
+color3_alpha			=0x00
+color3				=green
+mask_red			={screen0,mode4maskRed}
+mask_green			={screen0,mode4maskGreen}
+mask_blue			={screen0,mode4maskBlue}
+mask_alpha			={screen0,mode4maskAlpha}
+shift_red			={screen0,mode4shiftRed}
+shift_green			={screen0,mode4shiftGreen}
+shift_blue			={screen0,mode4shiftBlue}
+shift_alpha			={screen0,mode4shiftAlpha}
+margin				=8
+screenDelay			={screen,screenDelay}
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0008-utilityMovingRectangle]
+background_red			=0xFF
+background_green		=0x00
+background_blue			=0x00
+background_alpha		=0x00
+background			    =red
+foreground_red			=0x00
+foreground_green		=0x00
+foreground_blue			=0x00
+foreground_alpha		=0x00
+foreground			=black
+mask_red			={screen0,mode4maskRed}
+mask_green			={screen0,mode4maskGreen}
+mask_blue			={screen0,mode4maskBlue}
+mask_alpha			={screen0,mode4maskAlpha}
+shift_red			={screen0,mode4shiftRed}
+shift_green			={screen0,mode4shiftGreen}
+shift_blue			={screen0,mode4shiftBlue}
+shift_alpha			={screen0,mode4shiftAlpha}
+length				=32
+width				=32
+step				=1
+framedelay			=10000
+screenDelay			={screen,screenDelay}
+
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0009-utilityFillHorizontalStrip]
+color1_red			=0xFF
+color1_green		=0x00
+color1_blue			=0x00
+color1_alpha		=0x00
+color1				=red
+color2_red			=0xFF
+color2_green		=0xFF
+color2_blue			=0xFF
+color2_alpha		=0x00
+color2				=white
+color3_red			=0x00
+color3_green		=0xFF
+color3_blue			=0x00
+color3_alpha		=0x00
+color3				=green
+color4_red			=0xFF
+color4_green		=0xF0
+color4_blue			=0x00
+color4_alpha		=0x00
+color4				=yellow
+color5_red			=0x00
+color5_green		=0x00
+color5_blue			=0xC0
+color5_alpha		=0x00
+color5				=lightblue
+color6_red			=0xFF
+color6_green		=0xFF
+color6_blue			=0x00
+color6_alpha		=0x00
+color6				=pink
+color7_red			=0x00
+color7_green		=0xF0
+color7_blue			=0xF0
+color7_alpha		=0x00
+color7				=navyblue
+color8_red			=0xF0
+color8_green		=0x00
+color8_blue			=0xF0
+color8_alpha		=0x00
+color8				=lightgreen
+mask_red			={screen0,mode4maskRed}
+mask_green			={screen0,mode4maskGreen}
+mask_blue			={screen0,mode4maskBlue}
+mask_alpha			={screen0,mode4maskAlpha}
+shift_red			={screen0,mode4shiftRed}
+shift_green			={screen0,mode4shiftGreen}
+shift_blue			={screen0,mode4shiftBlue}
+shift_alpha			={screen0,mode4shiftAlpha}
+margin				=4
+
+screenDelay			={screen,screenDelay}
+
+
+[BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4-0010-utilityFillVerticalStrip]
+color1_red			=0xFF
+color1_green		=0x00
+color1_blue			=0x00
+color1_alpha		=0x00
+color1				=red
+color2_red			=0xFF
+color2_green		=0xFF
+color2_blue			=0xFF
+color2_alpha		=0x00
+color2				=white
+color3_red			=0x00
+color3_green		=0xFF
+color3_blue			=0x00
+color3_alpha		=0x00
+color3				=green
+color4_red			=0xFF
+color4_green		=0xF0
+color4_blue			=0x00
+color4_alpha		=0x00
+color4				=yellow
+color5_red			=0x00
+color5_green		=0x00
+color5_blue			=0xC0
+color5_alpha		=0x00
+color5				=lightblue
+color6_red			=0xFF
+color6_green		=0xFF
+color6_blue			=0x00
+color6_alpha		=0x00
+color6				=pink
+color7_red			=0x00
+color7_green		=0xF0
+color7_blue			=0xF0
+color7_alpha		=0x00
+color7				=navyblue
+color8_red			=0xF0
+color8_green		=0x00
+color8_blue			=0xF0
+color8_alpha		=0x00
+color8				=lightgreen
+mask_red			={screen0,mode4maskRed}
+mask_green			={screen0,mode4maskGreen}
+mask_blue			={screen0,mode4maskBlue}
+mask_alpha			={screen0,mode4maskAlpha}
+shift_red			={screen0,mode4shiftRed}
+shift_green			={screen0,mode4shiftGreen}
+shift_blue			={screen0,mode4shiftBlue}
+shift_alpha			={screen0,mode4shiftAlpha}
+margin				=4
+
+screenDelay			={screen,screenDelay}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/testdata/base-bsp-screen-driver-modeless.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,147 @@
+[include]
+file1=\base\screen\t_screen.ini
+
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0001-DisplayState]
+deviceid			={screen,id}
+halEValue			=EDisplayState
+value				=0
+expected			=0
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0002-DisplayState]
+deviceid			={screen,id}
+halEValue			=EDisplayState
+value				=1
+expected			=1
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0003-BacklightState]
+deviceid			={screen,id}
+halEValue			=EBacklightState
+value				=0
+expected			=0
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0004-BacklightState]
+deviceid			={screen,id}
+halEValue			=EBacklightState
+value				=1
+expected			=1
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0005-DisplayBrightness]
+deviceid			={screen,id}
+halEValue			=EDisplayBrightnessMax
+expected			={screen,maxDisplayBrightness}
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0006-DisplayBrightness]
+deviceid			={screen,id}
+halEValue			=EDisplayBrightness
+value				=-1
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0007-DisplayBrightness]
+deviceid			={screen,id}
+halEValue			=EDisplayBrightness
+value				=200
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0008-DisplayBrightness]
+deviceid			={screen,id}
+halEValue			=EDisplayBrightnessMax
+value				={screen,maxDisplayBrightness}
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0009-DisplayContrast]
+deviceid			={screen,id}
+halEValue			=EDisplayContrastMax
+expected			=16
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0010-DisplayContrast]
+deviceid			={screen,id}
+halEValue			=EDisplayContrast
+value				=0
+expected			=0
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0011-DisplayContrast]
+deviceid			={screen,id}
+halEValue			=EDisplayContrast
+value				=8
+expected			=8
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0012-DisplayContrast]
+deviceid			={screen,id}
+halEValue			=EDisplayContrast
+value				=-1
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0013-DisplayContrast]
+deviceid			={screen,id}
+halEValue			=EDisplayContrast
+value				=20
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0014-DisplayContrast]
+deviceid			={screen,id}
+halEValue			=EDisplayContrastMax
+value				=16
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0015-DisplayIsPixelOrderRGB]
+deviceid			={screen,id}
+halEValue			=EDisplayIsPixelOrderRGB
+value				=0
+expected			={screen,pixelOrderRGB}
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0016-DisplayIsPixelOrderLandscape]
+deviceid			={screen,id}
+halEValue			=EDisplayIsPixelOrderLandscape
+value				=0
+expected			={screen,pixelOrderLandscape}
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0017-DisplayNumModes]
+deviceid			={screen,id}
+halEValue			=EDisplayNumModes
+value				=0
+expected			={screen,numofdisplaymodes}
+
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0018-DisplayMode]
+deviceid			={screen,id}
+halEValue			=EDisplayMode
+value				=100
+
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0019-DisplayMode]
+deviceid			={screen,id}
+halEValue			=EDisplayMode
+value				=-1
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0020-DisplayMemoryAddress]
+deviceid			={screen,id}
+halEValue			=EDisplayMemoryAddress
+value				=0
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0021-DisplayXPixels]
+deviceid			={screen,id}
+halEValue			=EDisplayXPixels
+value				=0
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0022-DisplayYPixels]
+deviceid			={screen,id}
+halEValue			=EDisplayYPixels
+value				=0
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0023-DisplayNumModes]
+deviceid			={screen,id}
+halEValue			=EDisplayNumModes
+value				=0
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0024-DisplayBitsPerPixel]
+deviceid			={screen,id}
+halEValue			=EDisplayBitsPerPixel
+value				=0
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0025-DisplayOffsetToFirstPixel]
+deviceid			={screen,id}
+halEValue			=EDisplayOffsetToFirstPixel
+value				=0
+
+[BASE-BSP-SCREEN-DRIVER-MODELESS-0026-DisplayOffsetBetweenLines]
+deviceid			={screen,id}
+halEValue			=EDisplayOffsetBetweenLines
+value				=0
+
+[lcd1]
+name				=lcd1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/testdata/devlon52/armv5/t_screen.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,159 @@
+# This is the global environment file to configure the screen on specific device
+# The current default screen values are configured for specific hardware LCD device
+# Licencees may need to configure below values to specific devices and also
+# check supported HAL Enum's.
+
+[generic]
+
+[screen]
+
+# Define defualt display mode for the default screen
+displaymode         =1
+
+#Define number of diplay mode supported by specific device
+numofdisplaymodes    =2
+
+#Max brightness 
+maxDisplayBrightness =100
+
+#Define default pixel order, to know whether it is RGB or anyotherformat
+pixelOrderRGB       =1
+
+#Define to check pixelOrderLandscape. 
+pixelOrderLandscape =1
+
+# Defines the screen device width(X Pixels) for default displaymode
+modewidth			=640
+
+# Defines the screen device height(Y Pixels) for default displaymode
+modeheight			=360
+
+#Display Offset BetweenLines for default displaymode
+modedisplayOffsetBetweenLines	=8192
+
+#Display Offset To FirstPixel for default displaymode
+modedisplayOffsetToFirstPixel	=0
+
+#Bits per pixel for default displaymode
+modebitsPerPixel		=24
+
+#Is the display palettized for default displaymode
+modedisplayIsPalettized	=FALSE
+
+#RGB format rrrrrggggggbbbbb (565) for default displaymode
+modemaskRed			    =0xFF
+modemaskGreen			=0xFF
+modemaskBlue			=0xFF
+modemaskAlpha			=0x00
+
+#RGB shift according to format for default displaymode
+modeshiftRed			=16
+modeshiftGreen			=8
+modeshiftBlue			=0
+modeshiftAlpha			=0
+
+screenDelay			=5
+
+[screen0]
+# Defines the screen number on the multiple screens in the device.
+id				=0
+
+
+# Define  display mode for the screen0
+displaymode         =1
+
+# Defines the screen device width(X Pixels) for default displaymode
+modewidth			=640
+
+# Defines the screen device height(Y Pixels) for default displaymode
+modeheight			=360
+
+#Display Offset BetweenLines for default displaymode
+modedisplayOffsetBetweenLines	=8192
+
+#Display Offset To FirstPixel for default displaymode
+modedisplayOffsetToFirstPixel	=0
+
+#Bits per pixel for displaymode 
+modebitsPerPixel		=24
+
+#Is the display palettized for default displaymode
+modedisplayIsPalettized	=FALSE
+
+#RGB format rrrrrrrrggggggggbbbbbbbb (888) for default displaymode
+modemaskRed			    =0xFF
+modemaskGreen			=0xFF
+modemaskBlue			=0xFF
+modemaskAlpha			=0x00
+
+#RGB shift according to format for default displaymode
+modeshiftRed			=16
+modeshiftGreen			=8
+modeshiftBlue			=0
+modeshiftAlpha			=0
+
+
+
+# Defines the screen device width(X Pixels) for displaymode 0
+mode0width			=640
+
+# Defines the screen device height(Y Pixels) for displaymode 0
+mode0height			=360
+
+#Display Offset BetweenLines for displaymode 0
+mode0displayOffsetBetweenLines	=4096
+
+#Display Offset To FirstPixel for displaymode 0
+mode0displayOffsetToFirstPixel	=0
+
+#Bits per pixel for displaymode 0
+mode0bitsPerPixel		=16
+
+#Is the display palettized for displaymode 0
+mode0displayIsPalettized	=FALSE
+
+#RGB format rrrrrggggggbbbbb (565) for displaymode 0
+mode0maskRed			=0xF8
+mode0maskGreen			=0xFC
+mode0maskBlue			=0xF8
+mode0maskAlpha			=0x00
+
+#RGB shift according to format for displaymode 0
+mode0shiftRed			=8
+mode0shiftGreen			=3
+mode0shiftBlue			=-3
+mode0shiftAlpha			=0
+
+
+
+# Defines the screen device width(X Pixels) for displaymode 1
+mode1width			=640
+
+# Defines the screen device height(Y Pixels) for displaymode 1
+mode1height			=360
+
+#Display Offset BetweenLines for displaymode 1
+mode1displayOffsetBetweenLines	=8192
+
+#Display Offset To FirstPixel for displaymode 1
+mode1displayOffsetToFirstPixel	=0
+
+#Bits per pixel for displaymode 1
+mode1bitsPerPixel		=24
+
+#Is the display palettized for displaymode 1
+mode1displayIsPalettized	=FALSE
+
+#RGB format rrrrrrrrggggggggbbbbbbbb (888) for displaymode 1
+mode1maskRed			=0xFF
+mode1maskGreen			=0xFF
+mode1maskBlue			=0xFF
+mode1maskAlpha			=0x00
+
+#RGB shift according to format for displaymode 1
+mode1shiftRed			=16
+mode1shiftGreen			=8
+mode1shiftBlue			=0
+mode1shiftAlpha			=0
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/testdata/devlon52/armv5/t_screen.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,10 @@
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0002:BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0010
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0002:BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0010
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0002:BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0010
+BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0002:BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0010
+
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_AUTOMATED-0001
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_AUTOMATED-0001
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_AUTOMATED-0001
+BASE-BSP-SCREEN-DRIVER-SCREEN1_AUTOMATED-0001
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/testdata/h4hrp/armv5/t_screen.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,195 @@
+# This is the global environment file to configure the screen on specific device
+# The current default screen values are configured for TI OMAP 2420 (H4) hardware LCD device
+# Licencees may need to configure below values to specific devices and also
+# check supported HAL Enum's.
+
+[generic]
+
+
+[screen]
+
+# Define defualt display mode for the default screen
+displaymode         =3
+
+#Define number of diplay mode supported by H4
+numofdisplaymodes    =5
+
+#Define default pixel order, to know whether it is RGB or anyotherformat
+pixelOrderRGB       =1
+
+#Define to check pixelOrderLandscape. 
+pixelOrderLandscape =1
+
+#Max brightness 
+maxDisplayBrightness =16
+
+# Defines the screen device width(X Pixels) for default displaymode
+modewidth			=240
+
+# Defines the screen device height(Y Pixels) for default displaymode
+modeheight			=320
+
+#Display Offset BetweenLines for default displaymode
+modedisplayOffsetBetweenLines	=480
+
+#Display Offset To FirstPixel for default displaymode
+modedisplayOffsetToFirstPixel	=32
+
+#Bits per pixel for default displaymode
+modebitsPerPixel		=16
+
+#Is the display palettized for default displaymode
+modedisplayIsPalettized	=FALSE
+
+#RGB format rrrrrggggggbbbbb (565) for default displaymode
+modemaskRed			=0xF8
+modemaskGreen			=0xFC
+modemaskBlue			=0xF8
+modemaskAlpha			=0x00
+
+#RGB shift according to format for default displaymode
+modeshiftRed			=8
+modeshiftGreen			=3
+modeshiftBlue			=-3
+modeshiftAlpha			=0
+
+#time the colour remains on the screen
+screenDelay			=5
+
+[screen0]
+# Defines the screen number on the multiple screens in the device.
+id				=0
+
+# Define  display mode for the  screen0
+displaymode         =3
+
+# Defines the screen device width(X Pixels) for default displaymode
+modewidth			=240
+
+# Defines the screen device height(Y Pixels) for default displaymode
+modeheight			=320
+
+#Display Offset BetweenLines for default displaymode
+modedisplayOffsetBetweenLines	=480
+
+#Display Offset To FirstPixel for default displaymode
+modedisplayOffsetToFirstPixel	=32
+
+#Bits per pixel for displaymode 3
+modebitsPerPixel		=16
+
+#Is the display palettized for default displaymode
+modedisplayIsPalettized	=FALSE
+
+#RGB format rrrrrggggggbbbbb (565) for default displaymode
+modemaskRed			=0xF8
+modemaskGreen			=0xFC
+modemaskBlue			=0xF8
+modemaskAlpha			=0x00
+
+#RGB shift according to format for default displaymode
+modeshiftRed			=8
+modeshiftGreen			=3
+modeshiftBlue			=-3
+modeshiftAlpha			=0
+
+
+
+
+# Defines the screen device width(X Pixels) for displaymode 2
+mode2width			=240
+
+# Defines the screen device height(Y Pixels) for displaymode 2
+mode2height			=320
+
+#Display Offset BetweenLines for displaymode 2
+mode2displayOffsetBetweenLines	=480
+
+#Display Offset To FirstPixel for displaymode 2
+mode2displayOffsetToFirstPixel	=32
+
+#Bits per pixel for displaymode 2
+mode2bitsPerPixel		=12
+
+#Is the display palettized for displaymode 2
+mode2displayIsPalettized	=FALSE
+
+#RGB format rrrrggggbbbb0000 (444) for displaymode 2
+mode2maskRed			=0xF0
+mode2maskGreen			=0xF0
+mode2maskBlue			=0xF0
+mode2maskAlpha			=0x00
+
+#RGB shift according to format for displaymode 2
+mode2shiftRed			=8
+mode2shiftGreen			=4
+mode2shiftBlue			=0
+mode2shiftAlpha			=0
+
+
+
+
+# Defines the screen device width(X Pixels) for displaymode 3
+mode3width			=240
+
+# Defines the screen device height(Y Pixels) for displaymode 3
+mode3height			=320
+
+#Display Offset BetweenLines for displaymode 3
+mode3displayOffsetBetweenLines	=480
+
+#Display Offset To FirstPixel for displaymode 3
+mode3displayOffsetToFirstPixel	=32
+
+#Bits per pixel for displaymode 3
+mode3bitsPerPixel		=16
+
+#Is the display palettized for displaymode 3
+mode3displayIsPalettized	=FALSE
+
+#RGB format rrrrrggggggbbbbb (565) for displaymode 3
+mode3maskRed			=0xF8
+mode3maskGreen			=0xFC
+mode3maskBlue			=0xF8
+mode3maskAlpha			=0x00
+
+#RGB shift according to format for displaymode 3
+mode3shiftRed			=8
+mode3shiftGreen			=3
+mode3shiftBlue			=-3
+mode3shiftAlpha			=0
+
+
+
+
+# Defines the screen device width(X Pixels) for displaymode 4
+mode4width			=240
+
+# Defines the screen device height(Y Pixels) for displaymode 4
+mode4height			=320
+
+#Display Offset BetweenLines for displaymode 4
+mode4displayOffsetBetweenLines	=960
+
+#Display Offset To FirstPixel for displaymode 4
+mode4displayOffsetToFirstPixel	=32
+
+#Bits per pixel for displaymode 4
+mode4bitsPerPixel		=24
+
+#Is the display palettized for displaymode 4
+mode4displayIsPalettized	=FALSE
+
+#RGB format rrrrrrrrggggggggbbbbbbbb (888) for displaymode 4
+mode4maskRed			=0xFF
+mode4maskGreen			=0xFF
+mode4maskBlue			=0xFF
+mode4maskAlpha			=0x00
+
+#RGB shift according to format for displaymode 4
+mode4shiftRed			=16
+mode4shiftGreen			=8
+mode4shiftBlue			=0
+mode4shiftAlpha			=0
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/testdata/h4hrp/armv5/t_screen.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,7 @@
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0002:BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0010
+BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0002:BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0010
+
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_AUTOMATED-0001
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_AUTOMATED-0001
+BASE-BSP-SCREEN-DRIVER-SCREEN1_AUTOMATED-0001
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/testdata/h6hrp/armv5/t_screen.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,195 @@
+# This is the global environment file to configure the screen on specific device
+# The current default screen values are configured for TI OMAP 2420 (H4) hardware LCD device
+# Licencees may need to configure below values to specific devices and also
+# check supported HAL Enum's.
+
+[generic]
+
+
+[screen]
+
+# Define defualt display mode for the default screen
+displaymode         =7
+
+#Define number of diplay mode supported by H4
+numofdisplaymodes    =13
+
+#Define default pixel order, to know whether it is RGB or anyotherformat
+pixelOrderRGB       =1
+
+#Define to check pixelOrderLandscape. 
+pixelOrderLandscape =1
+
+#Max brightness 
+maxDisplayBrightness =16
+
+# Defines the screen device width(X Pixels) for default displaymode
+modewidth			=240
+
+# Defines the screen device height(Y Pixels) for default displaymode
+modeheight			=320
+
+#Display Offset BetweenLines for default displaymode
+modedisplayOffsetBetweenLines	=480
+
+#Display Offset To FirstPixel for default displaymode
+modedisplayOffsetToFirstPixel	=0
+
+#Bits per pixel for default displaymode
+modebitsPerPixel		=16
+
+#Is the display palettized for default displaymode
+modedisplayIsPalettized	=FALSE
+
+#RGB format rrrrrggggggbbbbb (565) for default displaymode
+modemaskRed			=0xF8
+modemaskGreen			=0xFC
+modemaskBlue			=0xF8
+modemaskAlpha			=0x00
+
+#RGB shift according to format for default displaymode
+modeshiftRed			=8
+modeshiftGreen			=3
+modeshiftBlue			=-3
+modeshiftAlpha			=0
+
+#time the colour remains on the screen
+screenDelay			=5
+
+[screen0]
+# Defines the screen number on the multiple screens in the device.
+id				=0
+
+# Define  display mode for the  screen0
+displaymode         =7
+
+# Defines the screen device width(X Pixels) for default displaymode
+modewidth			=240
+
+# Defines the screen device height(Y Pixels) for default displaymode
+modeheight			=320
+
+#Display Offset BetweenLines for default displaymode
+modedisplayOffsetBetweenLines	=480
+
+#Display Offset To FirstPixel for default displaymode
+modedisplayOffsetToFirstPixel	=0
+
+#Bits per pixel for displaymode 3
+modebitsPerPixel		=16
+
+#Is the display palettized for default displaymode
+modedisplayIsPalettized	=FALSE
+
+#RGB format rrrrrggggggbbbbb (565) for default displaymode
+modemaskRed			=0xF8
+modemaskGreen			=0xFC
+modemaskBlue			=0xF8
+modemaskAlpha			=0x00
+
+#RGB shift according to format for default displaymode
+modeshiftRed			=8
+modeshiftGreen			=3
+modeshiftBlue			=-3
+modeshiftAlpha			=0
+
+
+
+
+# Defines the screen device width(X Pixels) for displaymode 2
+mode2width			=240
+
+# Defines the screen device height(Y Pixels) for displaymode 2
+mode2height			=320
+
+#Display Offset BetweenLines for displaymode 2
+mode2displayOffsetBetweenLines	=480
+
+#Display Offset To FirstPixel for displaymode 2
+mode2displayOffsetToFirstPixel	=32
+
+#Bits per pixel for displaymode 2
+mode2bitsPerPixel		=12
+
+#Is the display palettized for displaymode 2
+mode2displayIsPalettized	=FALSE
+
+#RGB format rrrrggggbbbb0000 (444) for displaymode 2
+mode2maskRed			=0xF0
+mode2maskGreen			=0xF0
+mode2maskBlue			=0xF0
+mode2maskAlpha			=0x00
+
+#RGB shift according to format for displaymode 2
+mode2shiftRed			=8
+mode2shiftGreen			=4
+mode2shiftBlue			=0
+mode2shiftAlpha			=0
+
+
+
+
+# Defines the screen device width(X Pixels) for displaymode 3
+mode3width			=240
+
+# Defines the screen device height(Y Pixels) for displaymode 3
+mode3height			=320
+
+#Display Offset BetweenLines for displaymode 3
+mode3displayOffsetBetweenLines	=480
+
+#Display Offset To FirstPixel for displaymode 3
+mode3displayOffsetToFirstPixel	=32
+
+#Bits per pixel for displaymode 3
+mode3bitsPerPixel		=16
+
+#Is the display palettized for displaymode 3
+mode3displayIsPalettized	=FALSE
+
+#RGB format rrrrrggggggbbbbb (565) for displaymode 3
+mode3maskRed			=0xF8
+mode3maskGreen			=0xFC
+mode3maskBlue			=0xF8
+mode3maskAlpha			=0x00
+
+#RGB shift according to format for displaymode 3
+mode3shiftRed			=8
+mode3shiftGreen			=3
+mode3shiftBlue			=-3
+mode3shiftAlpha			=0
+
+
+
+
+# Defines the screen device width(X Pixels) for displaymode 4
+mode4width			=240
+
+# Defines the screen device height(Y Pixels) for displaymode 4
+mode4height			=320
+
+#Display Offset BetweenLines for displaymode 4
+mode4displayOffsetBetweenLines	=960
+
+#Display Offset To FirstPixel for displaymode 4
+mode4displayOffsetToFirstPixel	=32
+
+#Bits per pixel for displaymode 4
+mode4bitsPerPixel		=24
+
+#Is the display palettized for displaymode 4
+mode4displayIsPalettized	=FALSE
+
+#RGB format rrrrrrrrggggggggbbbbbbbb (888) for displaymode 4
+mode4maskRed			=0xFF
+mode4maskGreen			=0xFF
+mode4maskBlue			=0xFF
+mode4maskAlpha			=0x00
+
+#RGB shift according to format for displaymode 4
+mode4shiftRed			=16
+mode4shiftGreen			=8
+mode4shiftBlue			=0
+mode4shiftAlpha			=0
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/lcd/testdata/h6hrp/armv5/t_screen.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,14 @@
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_MANUAL-0002:BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_MANUAL-0010
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0002:BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_MANUAL-0010
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0002:BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_MANUAL-0010
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0002:BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_MANUAL-0010
+BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0002:BASE-BSP-SCREEN-DRIVER-SCREEN1_MANUAL-0010
+
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE0_AUTOMATED-0001
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE1_AUTOMATED-0001
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE2_AUTOMATED-0001
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE3_AUTOMATED-0001
+BASE-BSP-SCREEN-DRIVER-SCREEN0_MODE4_AUTOMATED-0001
+BASE-BSP-SCREEN-DRIVER-SCREEN1_AUTOMATED-0001
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/group/bld.inf	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,107 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include "../../../group/device.cfg"
+#include "../../../../testdata/bsp/common/group/bld.inf"
+
+PRJ_TESTEXPORTS
+//t_mmcsd.oby													/src/cedar/generic/base/e32/rombuild/t_mmcsd.oby
+t_mmcsd.oby													/sf/os/kernelhwsrv/kernel/eka/rombuild/t_mmcsd.oby
+t_mmcsd.oby													/epoc32/rom/haitests/t_mmcsd.oby
+t_mmcsd.iby													/epoc32/rom/haitests/t_mmcsd.iby
+t_mmcsd_binaries.iby										/epoc32/rom/haitests/t_mmcsd_binaries.iby
+t_mmcsd_testdata.iby										/epoc32/rom/haitests/t_mmcsd_testdata.iby
+
+../pkg/t_mmc.bat											z:/base/t_mmc.bat
+../pkg/t_sd.bat												z:/base/t_sd.bat
+
+../scripts/BASE-BSP-MMC-SOCKET-DRIVER.script				z:/base/mmcsd/base-bsp-mmc-socket-driver.script
+../testdata/BASE-BSP-MMC-SOCKET-DRIVER.ini					z:/base/mmcsd/base-bsp-mmc-socket-driver.ini
+
+../scripts/BASE-BSP-SD-SOCKET-DRIVER.script					z:/base/mmcsd/base-bsp-sd-socket-driver.script
+../testdata/BASE-BSP-SD-SOCKET-DRIVER.ini					z:/base/mmcsd/base-bsp-sd-socket-driver.ini
+
+../scripts/BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.script			z:/base/mmcsd/base-bsp-mmc-socket-driver-manual.script
+../testdata/BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.ini			z:/base/mmcsd/base-bsp-mmc-socket-driver-manual.ini
+
+../scripts/BASE-BSP-SD-SOCKET-DRIVER-MANUAL.script			z:/base/mmcsd/base-bsp-sd-socket-driver-manual.script
+../testdata/BASE-BSP-SD-SOCKET-DRIVER-MANUAL.ini			z:/base/mmcsd/base-bsp-sd-socket-driver-manual.ini
+
+../scripts/BASE-BSP-MMC-STACK-DRIVER.script					z:/base/mmcsd/base-bsp-mmc-stack-driver.script
+../testdata/BASE-BSP-MMC-STACK-DRIVER.ini					z:/base/mmcsd/base-bsp-mmc-stack-driver.ini
+
+../scripts/BASE-BSP-SD-STACK-DRIVER.script					z:/base/mmcsd/base-bsp-sd-stack-driver.script
+../testdata/BASE-BSP-SD-STACK-DRIVER.ini					z:/base/mmcsd/base-bsp-sd-stack-driver.ini
+
+../scripts/BASE-BSP-MMC-STACK-DRIVER-MANUAL.script			z:/base/mmcsd/base-bsp-mmc-stack-driver-manual.script
+../testdata/BASE-BSP-MMC-STACK-DRIVER-MANUAL.ini			z:/base/mmcsd/base-bsp-mmc-stack-driver-manual.ini
+
+../scripts/BASE-BSP-SD-STACK-DRIVER-MANUAL.script			z:/base/mmcsd/base-bsp-sd-stack-driver-manual.script
+../testdata/BASE-BSP-SD-STACK-DRIVER-MANUAL.ini				z:/base/mmcsd/base-bsp-sd-stack-driver-manual.ini
+
+../scripts/BASE-BSP-MMC-PSU-DRIVER.script					z:/base/mmcsd/base-bsp-mmc-psu-driver.script
+../testdata/BASE-BSP-MMC-PSU-DRIVER.ini						z:/base/mmcsd/base-bsp-mmc-psu-driver.ini
+
+../scripts/BASE-BSP-SD-PSU-DRIVER.script					z:/base/mmcsd/base-bsp-sd-psu-driver.script
+../testdata/BASE-BSP-SD-PSU-DRIVER.ini						z:/base/mmcsd/base-bsp-sd-psu-driver.ini
+
+../scripts/BASE-BSP-MMC-MEDIACHANGE-DRIVER.script			z:/base/mmcsd/base-bsp-mmc-mediachange-driver.script
+../testdata/BASE-BSP-MMC-MEDIACHANGE-DRIVER.ini				z:/base/mmcsd/base-bsp-mmc-mediachange-driver.ini
+
+../scripts/BASE-BSP-SD-MEDIACHANGE-DRIVER.script			z:/base/mmcsd/base-bsp-sd-mediachange-driver.script
+../testdata/BASE-BSP-SD-MEDIACHANGE-DRIVER.ini				z:/base/mmcsd/base-bsp-sd-mediachange-driver.ini
+
+../scripts/BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.script	z:/base/mmcsd/base-bsp-mmc-mediachange-driver-manual.script
+../testdata/BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.ini		z:/base/mmcsd/base-bsp-mmc-mediachange-driver-manual.ini
+
+../scripts/BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.script		z:/base/mmcsd/base-bsp-sd-mediachange-driver-manual.script
+../testdata/BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.ini		z:/base/mmcsd/base-bsp-sd-mediachange-driver-manual.ini
+
+../scripts/BASE-BSP-MMC-PSUBASE-DRIVER.script				z:/base/mmcsd/base-bsp-mmc-psubase-driver.script
+../testdata/BASE-BSP-MMC-PSUBASE-DRIVER.ini					z:/base/mmcsd/base-bsp-mmc-psubase-driver.ini
+
+../scripts/BASE-BSP-SD-PSUBASE-DRIVER.script				z:/base/mmcsd/base-bsp-sd-psubase-driver.script
+../testdata/BASE-BSP-SD-PSUBASE-DRIVER.ini					z:/base/mmcsd/base-bsp-sd-psubase-driver.ini
+
+
+#if defined(TEST_DEVICE_H4HRP)
+../testdata/h4hrp/mmc/t_mmc.ini								z:/base/mmcsd/t_mmc.ini
+../testdata/h4hrp/sd/t_sd.ini								z:/base/mmcsd/t_sd.ini
+../testdata/h4hrp/t_mmcsd.tcs								z:/base/mmcsd/t_mmcsd.tcs
+
+#endif
+
+#if defined(TEST_DEVICE_H6HRP)
+../testdata/h6hrp/mmc/t_mmc.ini								z:/base/mmcsd/t_mmc.ini
+../testdata/h6hrp/sd/t_sd.ini								z:/base/mmcsd/t_sd.ini
+../testdata/h6hrp/t_mmcsd.tcs								z:/base/mmcsd/t_mmcsd.tcs
+
+#endif
+
+#if defined(TEST_DEVICE_DEVLON52)
+
+../testdata/devlon52/mmc/t_mmc.ini							z:/base/mmcsd/t_mmc.ini
+../testdata/devlon52/sd/t_sd.ini							z:/base/mmcsd/t_sd.ini
+../testdata/devlon52/t_mmcsd.tcs							z:/base/mmcsd/t_mmcsd.tcs
+
+#endif
+
+// MMCSD Test LDD Driver Build
+#include "../ldd/group/bld.inf"
+
+PRJ_TESTMMPFILES
+
+t_mmcsd.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/group/t_mmcsd.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,25 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_MMCSD_IBY__)
+#define __T_MMCSD_IBY__
+
+//Test Includes
+#include <rom\haitests\t_mmcsd_binaries.iby>
+#include <rom\haitests\t_mmcsd_testdata.iby>
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/group/t_mmcsd.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+TARGET			t_mmcsd.exe
+TARGETTYPE		exe
+UID			0x1000007A 0x102863DA
+VENDORID		0x70000001
+
+capability		All -Tcb
+
+SOURCEPATH		../src
+
+SOURCE			../../../common/src/DataWrapperBase.cpp
+
+SOURCE			../../../e32/src/T_RHandleBaseData.cpp
+SOURCE			../../../e32/src/T_RBusLogicalChannelData.cpp
+
+SOURCE			T_MmcSDDriverServer.cpp
+SOURCE			T_MmcSDDriverData.cpp
+SOURCE			T_MmcSDSocketDriverData.cpp
+SOURCE			T_MmcSDStackDriverData.cpp
+SOURCE			T_MmcSDPsuBaseDriverData.cpp
+SOURCE			T_MmcSDPsuDriverData.cpp
+SOURCE			T_MmcSDMediaChangeDriverData.cpp ActiveCallbackWrap.cpp
+SOURCE			T_MmcSDSessionData.cpp
+
+USERINCLUDE		../ldd/inc
+USERINCLUDE		../inc
+USERINCLUDE		../../../common/inc
+USERINCLUDE		../../../e32/inc
+
+SYSTEMINCLUDE	/epoc32/include
+SYSTEMINCLUDE	/epoc32/include/test
+SYSTEMINCLUDE	/epoc32/include/kernel
+SYSTEMINCLUDE 	/epoc32/include/nkern
+
+LIBRARY			euser.lib
+LIBRARY			efsrv.lib
+LIBRARY			testexecuteutils.lib
+LIBRARY			testexecutelogclient.lib
+LIBRARY			bafl.lib
+LIBRARY			iniparser.lib
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/group/t_mmcsd.oby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,33 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#define BASE_ROM
+#include <rom\##VARIANT##\header.iby>
+
+files=
+
+#include <rom\##VARIANT##\kernel.iby>
+#include "user.iby"
+#include <rom\hal\hal.iby>
+#include <rom\f32\f32.iby>
+
+//TEF Includes
+#include <rom\include\base_testexecutelite.iby>
+
+// Tests
+#include <rom\haitests\t_mmcsd.iby>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/group/t_mmcsd_binaries.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,30 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_MMCSD_BINARIES_IBY__)
+#define __T_MMCSD_BINARIES_IBY__
+
+#if (!defined EKA2)
+file=\Epoc32\Release\##MAIN##\##BUILD##\t_mmcsd.exe			\sys\bin\t_mmcsd.exe
+//Test Product MMCSD LDD
+device[VARID]=\Epoc32\Release\##KMAIN##\##BUILD##\D_MMCSDIF.LDD		\Sys\Bin\D_MMCSDIF.LDD
+#else
+//Test Product MMCSD LDD
+device[VARID]=\Epoc32\Release\##KMAIN##\##BUILD##\D_MMCSDIF.LDD		\Sys\Bin\D_MMCSDIF.LDD
+file=\Epoc32\Release\##MAIN##\##BUILD##\t_mmcsd.exe			\sys\bin\t_mmcsd.exe
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/group/t_mmcsd_testdata.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,78 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_MMCSD_TESTDATA_IBY__)
+#define __T_MMCSD_TESTDATA_IBY__
+
+#include "t_prompt.iby"
+
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.script				base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.script
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini					base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini
+
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.script				base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.script
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini					base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini
+
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.script					base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.script
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.ini						base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.ini
+
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.script					base\mmcsd\BASE-BSP-SD-PSU-DRIVER.script
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.ini						base\mmcsd\BASE-BSP-SD-PSU-DRIVER.ini
+
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.script				base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.script
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini					base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.script				base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.script
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini					base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.script		base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.script
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.ini			base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.ini
+
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER-MANUAL.script			base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER-MANUAL.script
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER-MANUAL.ini			base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER-MANUAL.ini
+
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.script				base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.script
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini					base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.script					base\mmcsd\BASE-BSP-SD-STACK-DRIVER.script
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini					base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER-MANUAL.script			base\mmcsd\BASE-BSP-MMC-STACK-DRIVER-MANUAL.script
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER-MANUAL.ini			base\mmcsd\BASE-BSP-MMC-STACK-DRIVER-MANUAL.ini
+
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-SD-STACK-DRIVER-MANUAL.script			base\mmcsd\BASE-BSP-SD-STACK-DRIVER-MANUAL.script
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-SD-STACK-DRIVER-MANUAL.ini				base\mmcsd\BASE-BSP-SD-STACK-DRIVER-MANUAL.ini
+
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER.script			base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER.script
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER.ini				base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER.ini
+
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER.script			base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER.script
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER.ini				base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER.ini
+
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.script	base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.script
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.ini		base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.ini
+
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.script	base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.script
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.ini		base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.ini
+
+
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\t_mmc.ini										base\mmcsd\t_mmc.ini
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\t_sd.ini										base\mmcsd\t_sd.ini
+data=EPOCROOT##Epoc32\data\z\base\mmcsd\t_mmcsd.tcs										base\mmcsd\t_mmcsd.tcs
+
+data=EPOCROOT##Epoc32\data\z\base\t_mmc.bat												base\t_mmc.bat
+data=EPOCROOT##Epoc32\data\z\base\t_sd.bat												base\t_sd.bat
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/group/user_input.oby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,73 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+file=\Epoc32\Release\armv5\urel\testexecutepipslogclient.dll				\sys\bin\testexecutepipslogclient.dll
+file=\Epoc32\Release\armv5\urel\testexecutelogclient.dll				\sys\bin\testexecutelogclient.dll
+file=\Epoc32\Release\armv5\urel\testexecutelogengine.exe				\sys\bin\testexecutelogengine.exe
+file=\Epoc32\Release\armv5\urel\RFileLoggerClient.dll					\sys\bin\RFileLoggerClient.dll
+file=\Epoc32\Release\armv5\urel\RFileLoggerServer.exe					\sys\bin\RFileLoggerServer.exe
+file=\Epoc32\Release\armv5\urel\testexecute.exe						\sys\bin\testexecute.exe
+file=\Epoc32\Release\armv5\urel\testexecuteutils.dll					\sys\bin\testexecuteutils.dll
+file=\Epoc32\Release\armv5\urel\iniparser.dll						\sys\bin\iniparser.dll
+file=\Epoc32\Release\armv5\urel\wrapperutilsplugin.dll					\sys\bin\wrapperutilsplugin.dll
+data=\Epoc32\data\z\system\data\testexecute.ini						\system\data\testexecute.ini
+
+file=\Epoc32\Release\armv5\urel\t_mmcsd.exe						\sys\bin\t_mmcsd.exe
+file=\Epoc32\Release\armv5\urel\D_MMCSDIF.LDD						\sys\bin\D_MMCSDIF.LDD
+
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.script			\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.script
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.script			\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.script
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.script				\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.script
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.script				\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.script
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER.script			\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER.script
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER.script			\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER.script
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.script		\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.script
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.script		\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.script
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.script			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.script
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.script				\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.script
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.script			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.script
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER-MANUAL.script			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER-MANUAL.script
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.script				\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.script
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.script				\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.script
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER-MANUAL.script			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER-MANUAL.script
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-SD-STACK-DRIVER-MANUAL.script			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER-MANUAL.script
+
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini				\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini				\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.ini				\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.ini
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.ini				\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.ini
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER.ini			\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER.ini
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER.ini			\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER.ini
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.ini		\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.ini
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.ini		\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.ini
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini				\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini				\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.ini			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.ini
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER-MANUAL.ini			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER-MANUAL.ini
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini				\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini				\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER-MANUAL.ini			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER-MANUAL.ini
+data=\Epoc32\data\z\base\mmcsd\BASE-BSP-SD-STACK-DRIVER-MANUAL.ini			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER-MANUAL.ini
+
+data=\Epoc32\data\z\base\mmcsd\t_mmc.ini						\base\mmcsd\t_mmc.ini
+data=\Epoc32\data\z\base\mmcsd\t_sd.ini							\base\mmcsd\t_sd.ini
+data=\Epoc32\data\z\base\mmcsd\t_mmcsd.tcs						\base\mmcsd\t_mmcsd.tcs
+data=\Epoc32\data\z\base\t_prompt.ini							\base\t_prompt.ini
+data=\Epoc32\data\z\base\t_mmc.bat							\base\t_mmc.bat
+data=\Epoc32\data\z\base\t_sd.bat							\base\t_sd.bat
+
+file=\Epoc32\Release\armv5\urel\statapi.exe						\sys\bin\statapi.exe
+data=\Epoc32\data\z\system\data\stat.ini						\system\data\stat.ini
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/group/user_romfiles.txt	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,20 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+ocspcommon.dll
+IniParser.dll
+testexecutepipslogclient.dll
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/inc/ActiveCallbackWrap.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef ACTIVECALLBACKWRAP_H_
+#define ACTIVECALLBACKWRAP_H_
+
+
+//#include <e32base.h>
+
+#include "activecallback.h"
+
+
+class CActiveCallbackWrap
+	{
+public:
+
+	static CActiveCallbackWrap* NewLC(MActiveCallback& aCallback, TInt aFunctionId, TInt aExpectedAsyncError = KErrNone);
+	static CActiveCallbackWrap* NewL(MActiveCallback& aCallback, TInt aFunctionId, TInt aExpectedAsyncError = KErrNone);
+	virtual ~CActiveCallbackWrap();
+
+
+	CActiveCallback& ActiveCallback() { return *iActiveCallback ; }
+	TInt FunctionId() const { return iFunctionId; }
+	TInt ExpectedAsyncError() const { return iExpectedAsyncError; }
+	void SetDesData(HBufC8* aData);
+	void SetExpectedDesData(HBufC8* aData);
+	HBufC8* Data() { return iData; }
+	HBufC8* ExpectedData() { return iExpectedData; }
+	TPtr8& DataPtr() { return iDataPtr; }
+	TPtr8& ExpectedDataPtr() { return iExpectedDataPtr; }
+
+protected:
+	CActiveCallbackWrap(TInt aFunctionId, TInt aExpectedAsyncError);
+	void ConstructL(MActiveCallback& aCallback);
+	
+private:	
+	TInt				iFunctionId;
+	CActiveCallback*	iActiveCallback;
+	TInt				iExpectedAsyncError;
+	HBufC8*				iData;
+	HBufC8*				iExpectedData;
+	TPtr8				iDataPtr;
+	TPtr8				iExpectedDataPtr;
+	};
+
+#endif /*ACTIVECALLBACKWRAP_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDDriverData.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,86 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_MMCSD_DRIVER_DATA_H__)
+#define __T_MMCSD_DRIVER_DATA_H__
+
+
+//	User Includes
+#include "T_RBusLogicalChannelData.h"
+#include "d_mmcsdif.h"
+#include "ActiveCallbackWrap.h"
+
+/**
+ * Test Active Notification class
+ *
+ */
+
+
+class CT_MmcSDDriverData : public CDataWrapperBase
+	{
+public:
+	/**
+	* Public destructor
+	*/
+	~CT_MmcSDDriverData();
+
+	virtual TAny*	GetObject();
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	/**
+	* Protected constructor. First phase construction
+	*/
+	CT_MmcSDDriverData();
+	void	ConstructL();
+
+	void	DoCmdConstructorL(const TDesC& aSection);
+	void	DoCmdDestructor();
+
+	TInt 	GetExpectedAsyncError(const TDesC& aSection);
+	void 	DoCmdReadSectorL(const TDesC& aSection, TInt aAsyncErrorIndex);
+	void 	DoCmdWriteSectorL(const TDesC& aSection, TInt aAsyncErrorIndex);
+	void 	DoCmdReadCSD();
+	void 	DoCmdReadExtCSD();
+	void 	DoCmdReadCSDL(const TDesC& aSection, TInt aAsyncErrorIndex);
+	void 	DoCmdReadExtCSDL(const TDesC& aSection, TInt aAsyncErrorIndex);
+	void 	DoCmdCardInfo(const TDesC& aSection);
+	void 	DoCmdCardIsPresent(const TDesC& aSection);
+	void 	DoCmdCardIsReady(const TDesC& aSection);
+	void 	DoCmdCardIsLocked(const TDesC& aSection);
+	void 	PrintCSD(const TCSDInfo& aCSDInfo);
+	void 	PrintExtendedCSD(const TExtendedCSDInfo& aExtendedCSDInfo);
+
+	
+protected:
+	void RunL(CActive* aActive, TInt aIndex);
+	void DoCancel(CActive* aActive);
+	CActiveCallbackWrap* CreateActiveCallbackL(TInt aFunctionId, TInt aExpectedAsyncError);
+	void DeleteActiveCallback(CActiveCallback* activeCallbackWrap);
+
+protected:
+	RMMCSDTestControllerInterface*	iMmcSDController;
+	RPointerArray<CActiveCallbackWrap>	iActiveCallbacks;
+
+private:
+	TInt							iStackNum;
+	TInt							iAsyncErrorIndex;
+	RFs								iFs;
+	};
+
+#endif /* __T_MMCSD_DRIVER_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDDriverServer.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_MMCSD_DRIVER_SERVER_H__)
+#define __T_MMCSD_DRIVER_SERVER_H__
+
+//	EPOC Includes
+#include <testblockcontroller.h>
+#include <testserver2.h>
+
+// This wrapper class extends the test server and creates test server for MMCSD driver
+class CT_MmcSDDriverServer : public CTestServer2
+	{
+private:
+	class CT_MmcSDDriverBlock : public CTestBlockController
+		{
+	public:
+		inline CT_MmcSDDriverBlock();
+		inline ~CT_MmcSDDriverBlock();
+
+		CDataWrapper*	CreateDataL( const TDesC& aData );
+		};
+
+public:
+	inline ~CT_MmcSDDriverServer();
+
+	inline void	DeleteActiveSchedulerL();
+
+	static CT_MmcSDDriverServer* NewL();
+
+	inline CTestBlockController*	CreateTestBlock();
+
+protected:
+	inline CT_MmcSDDriverServer();
+	};
+
+#include "T_MmcSDDriverServer.inl"
+
+#endif /* __T_MMCSD_DRIVER_SERVER_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDDriverServer.inl	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include "T_MmcSDSocketDriverData.h"
+#include "T_MmcSDStackDriverData.h"
+#include "T_MmcSDPsuDriverData.h"
+#include "T_MmcSDPsuBaseDriverData.h"
+#include "T_MmcSDMediaChangeDriverData.h"
+#include "T_MmcSDSessionData.h"
+
+/*@{*/
+_LIT(KT_MMCSDSocketDriver,				"MMCSDSocket");
+_LIT(KT_MMCSDStackDriver,				"MMCSDStack");
+_LIT(KT_MMCSDPsuDriver,					"MMCSDPsu");
+_LIT(KT_MMCSDPsuBaseDriver,				"MMCSDPsuBase");
+_LIT(KT_MMCSDMediaChangeDriver,			"MMCSDMediaChange");
+_LIT(KT_MMCSDSession,					"MMCSDSession");
+/*@}*/
+
+CT_MmcSDDriverServer::CT_MmcSDDriverBlock::CT_MmcSDDriverBlock()
+:	CTestBlockController()
+	{
+	}
+
+CT_MmcSDDriverServer::CT_MmcSDDriverBlock::~CT_MmcSDDriverBlock()
+	{
+	}
+
+CDataWrapper* CT_MmcSDDriverServer::CT_MmcSDDriverBlock::CreateDataL(const TDesC& aData)
+	{
+	CDataWrapper*	wrapper=NULL;
+	if( KT_MMCSDPsuDriver() == aData )
+		{
+		wrapper=CT_MMCSDPsuDriverData::NewL();
+		}
+	else if( KT_MMCSDPsuBaseDriver() == aData )
+		{
+		wrapper=CT_MMCSDPsuBaseDriverData::NewL();
+		}
+	else if( KT_MMCSDMediaChangeDriver() == aData )
+		{
+		wrapper=CT_MMCSDMediaChangeDriverData::NewL();
+		}
+	else if( KT_MMCSDSocketDriver() == aData )
+		{
+		wrapper=CT_MMCSDSocketDriverData::NewL();
+		}
+	else if( KT_MMCSDStackDriver() == aData )
+		{
+		wrapper=CT_MMCSDStackDriverData::NewL();
+		}
+	else if( KT_MMCSDSession() == aData )
+		{
+		wrapper=CT_MmcSDSessionData::NewL();
+		}
+
+
+	return wrapper;
+	}
+
+CT_MmcSDDriverServer::CT_MmcSDDriverServer()
+	{
+	}
+
+CT_MmcSDDriverServer::~CT_MmcSDDriverServer()
+	{
+	}
+
+void CT_MmcSDDriverServer::DeleteActiveSchedulerL()
+	{
+	}
+
+CTestBlockController* CT_MmcSDDriverServer::CreateTestBlock()
+	{
+	return new CT_MmcSDDriverBlock();
+	}
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDMediaChangeDriverData.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_MMCSDMEDIACHANGE_DRIVER_DATA_H__)
+#define __T_MMCSDMEDIACHANGE_DRIVER_DATA_H__
+
+
+//	User Includes
+#include "T_MmcSDDriverData.h"
+
+/**
+ * Test Active Notification class
+ *
+ */
+class CT_MMCSDMediaChangeDriverData : public CT_MmcSDDriverData
+	{
+public:
+	/**
+	* Public destructor
+	*/
+	~CT_MMCSDMediaChangeDriverData();
+
+	/**
+	* Two phase constructor
+	*
+	* @leave	system wide error
+	*/
+	static	CT_MMCSDMediaChangeDriverData*	NewL();
+
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	/**
+	* Protected constructor. First phase construction
+	*/
+	CT_MMCSDMediaChangeDriverData();
+	void	ConstructL();
+
+	void	DoCmdMediaState(const TDesC& aSection);
+	void	DoCmdForceMediaChange();
+	void	DoCmdReplayCount(const TDesC& aSection);
+
+private:
+	static const TEnumEntryTable	iEnumMediaState[];
+	TInt							iAsyncErrorIndex;
+	CConsoleBase* 					iCons;
+	};
+
+#endif /* __T_MMCSDMEDIACHANGE_DRIVER_DATA_H__ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDPsuBaseDriverData.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_MMCSDPSUBASE_DRIVER_DATA_H__)
+#define __T_MMCSDPSUBASE_DRIVER_DATA_H__
+
+//	User Includes
+#include "T_MmcSDDriverData.h"
+
+/**
+ * Test MMCSD PowerSupply class
+ *
+ */
+class CT_MMCSDPsuBaseDriverData : public CT_MmcSDDriverData
+	{
+public:
+	/**
+	* Public destructor
+	*/
+	~CT_MMCSDPsuBaseDriverData();
+
+	/**
+	* Two phase constructor
+	*
+	* @leave	system wide error
+	*/
+	static	CT_MMCSDPsuBaseDriverData*	NewL();
+
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	/**
+	* Protected constructor. First phase construction
+	*/
+	CT_MMCSDPsuBaseDriverData();
+	void	ConstructL();
+
+	void	DoCmdIsLocked(const TDesC& aSection);
+	void 	DoCmdIsOff(const TDesC& aSection);
+	void	DoCmdMaxCurrentInMicroAmps(const TDesC& aSection);
+	void	DoCmdResetInactivityTimer();
+	void 	DoCmdVoltageSupported(const TDesC& aSection);
+	void 	DoCmdInactivityCount(const TDesC& aSection);
+	void 	DoCmdNotLockedCount(const TDesC& aSection);
+	void 	DoCmdInactivityTimeout(const TDesC& aSection);
+	void 	DoCmdNotLockedTimeout(const TDesC& aSection);
+	void 	DoCmdMemVoltageSupported(const TDesC& aSection);
+	void 	DoCmdMemMaxCurrentInMicroAmps(const TDesC& aSection);
+	void 	DoCmdVoltCheckInterval(const TDesC& aSection);
+
+private:
+	TInt	iAsyncErrorIndex;
+	};
+
+#endif /* __T_MMCSDPSUBASE_DRIVER_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDPsuDriverData.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_MMCSDPsu_DRIVER_DATA_H__)
+#define __T_MMCSDPsu_DRIVER_DATA_H__
+
+//	User Includes
+#include "T_MmcSDDriverData.h"
+
+/**
+ * Test MMCSD PowerSupply class
+ *
+ */
+class CT_MMCSDPsuDriverData : public CT_MmcSDDriverData
+	{
+public:
+	/**
+	* Public destructor
+	*/
+	~CT_MMCSDPsuDriverData();
+
+	/**
+	* Two phase constructor
+	*
+	* @leave	system wide error
+	*/
+	static	CT_MMCSDPsuDriverData*	NewL();
+
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	/**
+	* Protected constructor. First phase construction
+	*/
+	CT_MMCSDPsuDriverData();
+	void	ConstructL();
+
+	void	DoCmdPsuInfo(const TDesC& aSection);
+	void 	DoCmdSetPsuVoltage(const TDesC& aSection);
+	void	DoCmdPbusState(const TDesC& aSection);
+	void	DoCmdSetPsuState(const TDesC& aSection);
+	void	DoCmdVccState(const TDesC& aSection);
+	void 	DoCmdPsuNumber(const TDesC& aSection);
+	void 	DoCmdMediaChangeID(const TDesC& aSection);
+	void 	DoCmdPsuCurLimit(const TDesC& aSection);
+
+private:
+	static const TEnumEntryTable	iEnumTableVoltageCheckMethod[];
+	static const TEnumEntryTable	iEnumTablePbusState[];
+	static const TEnumEntryTable	iEnumTableVccState[];
+	TInt							iAsyncErrorIndex;
+	};
+
+#endif /* __T_MMCSDPsu_DRIVER_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDSessionData.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_MMCSD_SESSION_DATA_H__)
+#define __T_MMCSD_SESSION_DATA_H__
+
+
+//	User Includes
+#include "T_RBusLogicalChannelData.h"
+#include "d_mmcsdif.h"
+
+/**
+ * Test Active Notification class
+ *
+ */
+
+
+class CT_MmcSDSessionData : public CT_RBusLogicalChannelData
+	{
+public:
+	/**
+	* Public destructor
+	*/
+	~CT_MmcSDSessionData();
+	
+	/**
+	* Two phase constructor
+	*
+	* @leave	system wide error
+	*/
+	static	CT_MmcSDSessionData*	NewL();
+
+	virtual TAny*	GetObject();
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	/**
+	* Protected constructor. First phase construction
+	*/
+	CT_MmcSDSessionData();
+	void	ConstructL();
+
+	//	CT_RHandleBaseData implementation
+	virtual RHandleBase*		GetHandleBase();
+
+	//	CT_RBusLogicalChannelData implementation
+	virtual RBusLogicalChannel*	GetBusLogicalChannel();
+
+	void	DoCmdConstructor();
+	void	DoCmdLoadDriver(const TDesC& aSection);
+	void	DoCmdDriverOpen(const TDesC& aSection);
+	void	DoCmdUnLoadDriver(const TDesC& aSection);
+	void	DoCmdDestructor();
+
+private:
+	void	DestroyData();
+
+protected:
+	RMMCSDTestControllerInterface*	iMmcSDController;
+
+private:
+	};
+
+#endif /* __T_MMCSD_SESSION_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDSocketDriverData.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_MMCSDSOCKET_DRIVER_DATA_H__)
+#define __T_MMCSDSOCKET_DRIVER_DATA_H__
+
+
+//	User Includes
+#include "T_MmcSDDriverData.h"
+
+/**
+ * Test Active Notification class
+ *
+ */
+class CT_MMCSDSocketDriverData : public CT_MmcSDDriverData
+	{
+public:
+	/**
+	* Public destructor
+	*/
+	~CT_MMCSDSocketDriverData();
+
+	/**
+	* Two phase constructor
+	*
+	* @leave	system wide error
+	*/
+	static	CT_MMCSDSocketDriverData*	NewL();
+
+	virtual TAny*	GetObject();
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	/**
+	* Protected constructor. First phase construction
+	*/
+	CT_MMCSDSocketDriverData();
+	void	ConstructL();
+
+	void 	DoCmdAdjustPartialRead(const TDesC& aSection);
+	void 	DoCmdCardIsPresent(const TDesC& aSection);
+	void 	DoCmdGetBufferInfo(const TDesC& aSection);
+	void 	DoCmdInit();
+	void 	DoCmdInitiatePowerUpSequence();
+	void 	DoCmdMachineInfo(const TDesC& aSection);
+	void 	DoCmdPrepareStore(const TDesC& aSection);
+	void 	DoCmdReset1();
+	void 	DoCmdReset2();
+	void  	DoCmdResetInactivity(const TDesC& aSection);
+	void  	DoCmdStack(const TDesC& aSection);
+	void 	DoCmdiState_Get(const TDesC& aSection);
+	void 	DoCmdiType_Get(const TDesC& aSection);
+	void 	DoCmdiDoorOpened_Get(const TDesC& aSection);
+	void 	DoCmdiStandby_Get(const TDesC& aSection);
+	void 	DoCmdPowerUpL(const TDesC& aSection, TInt aAsyncErrorIndex);
+
+private:
+	static const TEnumEntryTable 	iEnumTRequestIdTable[];	
+	static const TEnumEntryTable 	iEnumTPBusStateTable[];	
+	static const TEnumEntryTable 	iEnumTPBusTypeTable[];	
+
+	};
+
+#endif /* __T_MMCSDSOCKET_DRIVER_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/inc/T_MmcSDStackDriverData.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_MMCSDSTACK_DRIVER_DATA_H__)
+#define __T_MMCSDSTACK_DRIVER_DATA_H__
+
+
+//	User Includes
+#include "T_MmcSDDriverData.h"
+
+/**
+ * Test Active Notification class
+ *
+ */
+class CT_MMCSDStackDriverData : public CT_MmcSDDriverData
+	{
+public:
+	/**
+	* Public destructor
+	*/
+	~CT_MMCSDStackDriverData();
+
+	/**
+	* Two phase constructor
+	*
+	* @leave	system wide error
+	*/
+	static	CT_MMCSDStackDriverData*	NewL();
+
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	/**
+	* Protected constructor. First phase construction
+	*/
+	CT_MMCSDStackDriverData();
+	void	ConstructL();
+
+private:
+
+	void 	DoCmdAdjustPartialRead(const TDesC& aSection);
+	void 	DoCmdAllocSession();
+	void 	DoCmdDemandPagingInfo(const TDesC& aSection);
+	void 	DoCmdEffectiveModes(const TDesC& aSection);
+	void 	DoCmdBufferInfo(const TDesC& aSection);
+	void 	DoCmdGetBufferInfo(const TDesC& aSection);
+	void 	DoCmdHasCardsPresent(const TDesC& aSection);
+	void 	DoCmdHasSessionsQueued(const TDesC& aSection);
+	void 	DoCmdInitStackInProgress(const TDesC& aSection);
+	void 	DoCmdMMCSocketL(const TDesC& aSection);
+	void 	DoCmdMachineInfo(const TDesC& aSection);
+	void 	DoCmdMaxCardsInStack(const TDesC& aSection);
+	void 	DoCmdReadPasswordStore(const TDesC& aSection);
+	void 	DoCmdWritePasswordStore(const TDesC& aSection);
+	void 	DoCmdProgramPeriodInMilliSeconds(const TDesC& aSection);
+	void 	DoCmdStop(const TDesC& aSection);
+	void 	DoCmdInit();
+	void 	DoCmdReportPowerUp(const TDesC& aSection);
+	void 	DoCmdReportPowerDown(const TDesC& aSection);
+	void 	DoCmdPasswordStore(const TDesC& aSection);
+	void 	DoCmdCardP(const TDesC& aSection);
+	void 	DoCmdAlterEffectiveModes(const TDesC& aSection);
+	
+private:
+
+	static const TEnumEntryTable 	iEnumEffectiveModesFunctionIdTable[];	
+	
+	};
+
+#endif /* __T_MMCSDSTACK_DRIVER_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/ldd/group/bld.inf	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,28 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+PRJ_TESTMMPFILES
+
+#if !defined(WINS)
+
+d_mmcsdif.mmp
+
+#endif
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/ldd/group/d_mmcsdif.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include "kernel/kern_ext.mmh"
+
+TARGET			d_mmcsdif.ldd
+TARGETTYPE		ldd
+VENDORID		0x70000001
+CAPABILITY		all
+
+SOURCEPATH		../src
+SOURCE			d_mmcsdif.cpp
+SOURCE			MMcKernelTestUtils.cpp
+SOURCE			mmclddstack.cpp
+SOURCE			mmclddsocket.cpp
+SOURCE			mmclddpsu.cpp
+SOURCE			mmclddmediachange.cpp
+SOURCE			LddAsyncRequest.cpp
+
+SYSTEMINCLUDE	/epoc32/include/drivers
+SYSTEMINCLUDE	../inc	
+
+LIBRARY			epbusmmc.lib
+LIBRARY			epbussd.lib
+
+epocallowdlldata
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/ldd/inc/LddAsyncRequest.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,114 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef LDDASYNCREQUEST_H_
+#define LDDASYNCREQUEST_H_
+
+#include <mmc.h>
+
+
+class DLddAsyncRequest ;
+
+/**
+ * DLddAsyncRequest observer interface
+ *
+ */
+class MAsyncRequestObserver
+	{
+public:
+	virtual void Notify(DLddAsyncRequest& aRequest) = 0; 
+	};
+
+/**
+ * Wraps a TRequestStatus along with a function (command) id
+ *
+ */
+class DLddAsyncRequest 
+	{
+public:
+	DLddAsyncRequest(TInt aFunctionId, TRequestStatus* aStatus, MAsyncRequestObserver& aObserver);
+	virtual ~DLddAsyncRequest();
+	TRequestStatus* Status();
+	TInt Error();
+	TInt FunctionId();
+	
+protected:
+	TInt iFunctionId;	
+	TRequestStatus* iStatus;	
+	MAsyncRequestObserver& iObserver;
+	
+	TInt iError;
+	};
+
+/**
+ * Extends DLddAsyncRequest to add DMMCSession async functionality
+ *
+ */
+class DMmcSessionAsyncRequest : public DLddAsyncRequest 
+	{
+public:	
+	DMmcSessionAsyncRequest(TInt aFunctionId, TRequestStatus* aStatus, 
+			MAsyncRequestObserver& aObserver, TDynamicDfcQue* aDfcQ, DMMCStack& aStack, TMMCard& aCard);
+	~DMmcSessionAsyncRequest();
+	DMMCSession& Session();	
+public:
+	static void SessionEndCallBack(TAny *aPtr);
+    static void SessionEndDfc(TAny *aPtr);
+	void Reset();
+
+private:
+	DMMCSession* iSession;
+    TMMCCallBack iSessionEndCallBack;
+	TDfc iSessionEndDfc;
+	
+public:
+	TAny* iClientDesPtr;
+	TUint32 iBlkOffet;
+	TUint8* iBuf;
+
+private:
+	void SessionEndCallBack();
+	void SessionEndDfc();
+	};
+
+
+/**
+ * Extends DLddAsyncRequest to add TPBusCallBack (DMMCSocket) async functionality
+ * used to handle callbacks for Bus events
+ *
+ */
+class DBusEventRequest : public DMmcSessionAsyncRequest
+	{
+public:
+	DBusEventRequest(TInt aFunctionId, TRequestStatus* aStatus, MAsyncRequestObserver& aObserver, TInt aUnit,
+						TDynamicDfcQue* aDfcQ, DMMCStack& aStack, TMMCard& aCard);
+	~DBusEventRequest();
+	
+	TPBusState BusState() const { return (TPBusState) iBusState; }
+	TInt BusError() const { return iBusError; }
+public:
+	static void BusEventCallBack(TAny* aPtr, TInt aReason, TAny* a1, TAny* a2);
+private:
+	TPBusCallBack	iBusEventCallBack;
+private:
+	void BusEventCallBack(TInt aReason, TAny* a1, TAny* a2);
+	TPBusState iBusState;
+	TInt iBusError;	
+	};
+
+#endif /*LDDASYNCREQUEST_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/ldd/inc/MmcTestUtils.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,477 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef __MMC_TEST_UTILS_H__
+#define __MMC_TEST_UTILS_H__
+
+
+#ifdef __KERNEL_MODE__
+#include <mmc.h>
+#include <locmedia.h>
+#endif  //  __KERNEL_MODE__
+
+
+//Test Types
+enum TMmcTestType
+	{
+	EMmcGeneralTest,
+	EMmcTestPsu,
+	EMmcTestMediaChange,
+	EMmcTestStack,
+	EMmcTestSocket
+	};
+
+//Bus States
+enum TBusState
+	{
+	EBusCardAbsent=0,
+	EBusOff=1,
+	EBusPoweringUp=2,
+	EBusOn=3,
+	EBusPsuFault=4,
+	EBusPowerUpPending=5,
+	};
+
+//Psu States
+enum TDPsuState
+	{
+	EDPsuOff,
+	EDPsuOnCurLimit,
+	EDPsuOnFull
+	};
+	
+//Voltage Check Method
+enum TDPsuVoltChkMethod
+	{
+	EDPsuChkComparator,
+    EDPsuChkADCType,
+    EDPsuChkADCType2
+    };
+
+//Media States
+enum TMediaStates
+	{
+	EOpened,
+	EClosed,
+	};
+
+//Bus Types
+enum TCardBusType
+	{
+	EBusTypeNone,
+	EBusTypePcCard,
+	EBusTypeMultiMedia,
+	EBusTypeUSB,
+	};
+
+//Media Types
+enum TMmcMediaType
+	{
+	EMmcROM,
+	EMmcFlash,
+	EMmcIO,
+	EMmcOther,
+	EMmcNotSupported
+	};
+	
+#ifdef __KERNEL_MODE__
+	//Used for Password Store
+	const TInt KPasswordStoreCIDLength = KMMCCIDLength + sizeof(TInt32);	
+#endif
+	
+const TInt KMmcPwdLen = 16;
+
+/**
+ * Stores test case enums as 2 16 bit values from supplied TInt
+ *
+ */
+class TTCFunctionId
+	{
+public:
+
+#ifdef __KERNEL_MODE__
+
+	explicit TTCFunctionId(TInt aValue) : iValue(aValue) {}
+
+#endif
+
+	TTCFunctionId(TInt aFunctionId, TMmcTestType aTestType) 
+		{ iValue =  ((aFunctionId << 16 ) + (aTestType & 0xFFFF)); }  
+
+	
+	TMmcTestType TestType() 
+		{ return (TMmcTestType)(iValue & 0xFFFF); }  // TestType stored in lower 16 bits	
+
+	TInt FunctionId() 
+		{ return (iValue >> 16); } 
+
+	TInt iValue;
+	};	
+
+/**
+ * Used to wrap data passed to kernel side for DMMCStack::PartialRead and DMMCSocket::PartialRead
+ *
+ */
+class TPartialReadData
+	{
+public:
+	TUint iStart;
+	TUint iEnd;
+	TUint iPhysStart;
+	TUint iPhysEnd;		
+	};
+
+/**
+ * Used to wrap data passed to kernel side for DMMCStack::ReadPasswordData
+ *
+ */
+class TStackPasswordStoreData
+	{
+	
+public:
+	TStackPasswordStoreData() : iPwdStorePtr(NULL) {}
+	TBuf8<KMmcPwdLen> 		iPassword;
+	TAny*					iPwdStorePtr; 			
+	
+#ifdef __KERNEL_MODE__
+	TBool	CreateFormattedPassword(TDes8 &aFormattedPassword, const TCID& aCID);
+	void	SetFormattedPassword(const TDesC8 &aFormattedPassword);
+#endif
+	};
+
+/**
+ * Used to wrap data passed to kernel side for DMMCSocket::PrepareStore
+ *
+ */
+class TPasswordPrepareStoreData
+	{
+	
+public:
+	TPasswordPrepareStoreData() {}
+	TInt					iBus;
+	TInt				 	iFunc;
+	TBuf8<KMmcPwdLen> 		iOldPassword;
+	TBuf8<KMmcPwdLen> 		iNewPassword;
+	};
+
+/**
+ * Class used for retrieving buffer info (socket & stack)
+ *
+ */
+class TBufferInfo
+	{
+public:
+	TBufferInfo() : iBuf(NULL), iBufLen(0), iMinorBufLen(0) {}
+	TUint8*	iBuf;			// pointer to start of buffer
+	TInt 	iBufLen;		// the length of allocated buffer
+	TInt 	iMinorBufLen;  	// the length of minor buffer (only valid from DMMCStack::BufferInfo)
+	};
+
+/**
+ * Used to wrap data passed to kernel side for DMMCStack::CardP
+ *
+ */
+class TCardPtr
+	{
+public:
+TCardPtr() : iCardPtr(NULL), iCardNumber(0) {}
+	TAny* 	iCardPtr;		// pointer to TMMCard
+	TInt 	iCardNumber;	// the card number
+	};
+		
+/**
+ * Used to wrap data passed to kernel side for DMMCSocket::Stack
+ *
+ */
+class TStackPtr
+	{
+public:
+TStackPtr() : iStackPtr(NULL), iBus(0) {}
+	TAny* 	iStackPtr;		// pointer to DMMCStack
+	TInt 	iBus;			// the bus number
+	};
+	
+/**
+ * Class used for retrieving machine info (socket & stack)
+ *
+ */
+class TMachineInfo
+	{
+public:
+
+#ifdef __KERNEL_MODE__
+	TMachineInfo(const TMMCMachineInfo& aMachineInfo);
+#else
+	TMachineInfo() : iTotalSockets(0), iTotalMediaChanges(0), iTotalPrimarySupplies(0), iSPIMode(EFalse), iBaseBusNumber(0)
+					, iSupportsSPIMode(EFalse), iSupportsDoubleBuffering(EFalse), iSupportsR7(EFalse), iDma8BitAddressing(EFalse)
+					, iDma16BitAddressing(EFalse), iDma32BitAddressing(EFalse), iDma64BitAddressing(EFalse), iSupportsDMA(EFalse)
+					, iMaxTransferLength_256K(EFalse), iMaxTransferLength_512K(EFalse), iMaxTransferLength_1M(EFalse)
+					, iMaxTransferLength_2M(EFalse), iMaxTransferLength_4M(EFalse), iMaxTransferLength_8M(EFalse), iMaxTransferLength_16M(EFalse)
+					{}
+#endif
+	
+public:
+	/** The total number of MultiMediaCard slots for this stack */
+	TInt	iTotalSockets;
+	/** Not currently used */
+	TInt	iTotalMediaChanges;
+	/** Not currently used */
+	TInt	iTotalPrimarySupplies;
+	/** Indicates whether the SPI protocol is being used or not */
+	TBool	iSPIMode;
+	/** The number of the first peripheral bus slot claimed by the MultiMediaCard controller */
+	TInt	iBaseBusNumber;
+	/** Set if hardware supports SPI mode */
+	TBool	iSupportsSPIMode;
+	/** Set if the PSL is enabled for double-buffered data transfers */
+	TBool	iSupportsDoubleBuffering;
+	/** Set if the PSL supports response type R7 */
+	TBool	iSupportsR7;
+	/** Set this bit if the hardware DMA controller utilises 8-Bit Addressing */
+	TBool	iDma8BitAddressing;
+	/** Set this bit if the hardware DMA controller utilises 16-Bit Addressing */
+	TBool	iDma16BitAddressing;
+	/** Set this bit if the hardware DMA controller utilises 32-Bit Addressing */
+	TBool	iDma32BitAddressing;
+	/** Set this bit if the hardware DMA controller utilises 64-Bit Addressing */
+	TBool	iDma64BitAddressing;
+	/** Set this if the hardware supports DMA and can cope with being given a physical address */
+	TBool	iSupportsDMA;
+	/** Set if the hardware is unable to perform data transfers of more than 256K */
+	TBool	iMaxTransferLength_256K;
+	/** Set if the hardware is unable to perform data transfers of more than 512K */
+	TBool	iMaxTransferLength_512K;
+	/** Set if the hardware is unable to perform data transfers of more than 1M */
+	TBool	iMaxTransferLength_1M;
+	/** Set f the hardware is unable to perform data transfers of more than 2M */
+	TBool	iMaxTransferLength_2M;
+	/** Set if the hardware is unable to perform data transfers of more than 4M */
+	TBool	iMaxTransferLength_4M;
+	/** Set if the hardware is unable to perform data transfers of more than 8M */
+	TBool	iMaxTransferLength_8M;
+	/** Set if the hardware is unable to perform data transfers of more than 16M */
+	TBool	iMaxTransferLength_16M;
+	
+	};
+				   		   
+/**
+ * Class used for retrieving card info
+ *
+ */
+class TMMCCardInfo
+	{
+public:
+	inline TMMCCardInfo()
+		  {memset(this,0x00,sizeof(TMMCCardInfo)); iMediaType=EMmcNotSupported;}
+public:
+	/** Indicates the card is Ready */
+	TBool iIsReady;
+	/** Indicates the card is locked */
+	TBool iIsLocked;
+	/** Holds Card CID register */
+	TUint8 iCID[16];
+	/** Holds Card CSD register */
+	TUint8 iCSD[16];
+	/** Card address */
+	TUint16 iRCA;
+	/** MMC Media type */
+	TMmcMediaType iMediaType;
+	/** Device Size*/
+    TInt64 iCardSizeInBytes;
+    /** Maximum Read Block Length  */
+    TInt iMaxReadBlLen;
+	/** READ_BL_LEN*/
+	TUint iReadBlLen;
+	/** Max Write data block length */
+	TUint iWriteBlLen;
+	/** Is partial block read allowed */
+	TBool iReadBlPartial;
+	/** Is partial block write allowed */
+	TBool iWriteBlPartial;
+	/** Is read block misalignment allowed */
+	TBool iReadBlkMisalign;
+	/** Is write block misalignment allowed */
+	TBool iWriteBlkMisalign;
+	/** Maximum read current in milli ampere */
+    TInt iReadCurrentInMilliAmps;
+    /** Maximum write current in milli ampere */
+    TInt iWriteCurrentInMilliAmps;
+    /** MMC/SD Specification, version */
+	TUint iSpecVers;
+	/** Asynchronous part of data access time */
+	TUint iTAAC;
+	/** Defines clock dependent factor of the data access time */
+	TUint iNSAC;
+	/** Clock frequency */
+	TUint iTransferSpeed;
+	/** Card command class */
+	TUint iCommandRegister;
+	/** This will be updated to ETrue if the card belongs to high capacity */
+	TBool iHighCapacity;
+	/** Flag to indentity card type  */
+	TUint32 iFlags;
+	
+#ifdef __KERNEL_MODE__
+	void SetCardInfo(const TMMCard& aCard);
+#endif
+	
+	};
+	
+/**
+ * Class used for retrieving SD card info
+ *
+ */
+class TSDCardInfo : public TMMCCardInfo
+	{
+public:
+	inline TSDCardInfo() : iBusWidth(0), iProtectedAreaSize(0)
+	{;}
+
+public:
+	TInt iBusWidth;
+	TUint32 iProtectedAreaSize;
+};
+
+
+/**
+ * Mirrors the DMMCStack::DemandPagingInfo on the user side
+ *
+ */
+class TTCDemandPagingInfo	
+	{
+public:
+	const TInt* iPagingDriveList;
+	TInt iDriveCount;
+	TUint iPagingType;
+	TInt iReadShift;
+	TUint iNumPages;
+	TBool iWriteProtected;
+	};
+	
+/**
+ * Class used for retrieving extended CSD info
+ *
+ */
+class TExtendedCSDInfo
+	{
+public:
+	
+#ifdef __KERNEL_MODE__
+	TExtendedCSDInfo(const TExtendedCSD& aExtendedCSD);
+#else
+	inline TExtendedCSDInfo() {memset(this,0x00,sizeof(TExtendedCSDInfo));}
+#endif
+	
+	// this class holds extended csd info as members rather than bitmasks on a 128 bit buffer
+	// as described in the mmc spec.  It is also neccessary as mmc.h cannot be included in user side code 
+
+public:
+	TUint	iSupportedCmdSet;
+	TUint	iSectorCount;
+	TUint	iMinPerfWrite8Bit52Mhz;
+	TUint	iMinPerfRead8Bit52Mhz;
+	TUint	iMinPerfWrite8Bit26Mhz_4Bit52Mhz;
+	TUint	iMinPerfRead8Bit26Mhz_4Bit52Mhz;
+	TUint	iMinPerfWrite4Bit26Mhz;
+	TUint	iMinPerfRead4Bit26Mhz;
+	TUint	iPowerClass26Mhz360V;
+	TUint	iPowerClass52Mhz360V;
+	TUint	iPowerClass26Mhz195V;
+	TUint	iPowerClass52Mhz195V;
+	TUint	iCardType;
+	TUint	iCSDStructureVer;
+	TUint	iExtendedCSDRev;
+	TUint	iCmdSet;
+	TUint	iCmdSetRev;
+	TUint	iPowerClass;
+	TUint	iHighSpeedTiming;
+	};
+	
+/**
+ * Class used for retrieving CSD info
+ *
+ */
+class TCSDInfo
+	{
+	public:
+	
+#ifdef __KERNEL_MODE__
+	TCSDInfo(const TCSD& aCSD);
+#else 
+	inline TCSDInfo() {memset(this,0x00,sizeof(TCSDInfo)); iMediaType=EMultiMediaNotSupported;}
+#endif
+	
+	// mirrors TMMCMediaTypeEnum
+	enum TMMCMediaTypeEnumInfo { EMultiMediaROM, EMultiMediaFlash, EMultiMediaIO, EMultiMediaOther, EMultiMediaNotSupported };
+	 
+	// this class holds csd info as members rather than bitmasks on a 128 bit buffer
+	// as described in the mmc spec.  It is also neccessary as mmc.h cannot be included in user side code 
+	
+public:
+	TUint iCSDStructure;
+	TUint iSpecVers;
+	TUint iReserved120;
+	TUint iTAAC;
+	TUint iNSAC;
+	TUint iTranSpeed;
+	TUint iCCC;
+	TUint iReadBlLen;
+	TBool iReadBlPartial;
+	TBool iWriteBlkMisalign;
+	TBool iReadBlkMisalign;
+	TBool iDSRImp;
+	TUint iReserved74;
+	TUint iCSize;
+	TUint iVDDRCurrMin;
+	TUint iVDDRCurrMax;
+	TUint iVDDWCurrMin;
+	TUint iVDDWCurrMax;
+	TUint iCSizeMult;
+	TUint iEraseGrpSize;
+	TUint iEraseGrpMult;
+	TUint iWPGrpSize;
+	TBool iWPGrpEnable;
+	TUint iDefaultECC;
+	TUint iR2WFactor;
+	TUint iWriteBlLen;
+	TBool iWriteBlPartial;
+	TUint iReserved16;
+	TBool iFileFormatGrp;
+	TBool iCopy;
+	TBool iPermWriteProtect;
+	TBool iTmpWriteProtect;
+	TUint iFileFormat;
+	TUint iECC;
+	TUint iCRC;
+	TUint iDeviceSize;
+	TMMCMediaTypeEnumInfo iMediaType;
+	TUint iReadBlockLength;
+	TUint iWriteBlockLength;
+	TUint iEraseSectorSize;
+	TUint iEraseGroupSize;
+	TUint iMinReadCurrentInMilliamps;
+	TUint iMinWriteCurrentInMilliamps;
+	TUint iMaxReadCurrentInMilliamps;
+	TUint iMaxWriteCurrentInMilliamps;
+	TUint iMaxTranSpeedInKilohertz;
+
+	};	
+
+
+#endif // MMC_TEST_UTILS
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/ldd/inc/d_mmcsdif.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,409 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if !defined(__D_MMCSDIF_H__)
+#include <e32cmn.h>
+#ifndef __KERNEL_MODE__
+#include <e32std.h>
+#endif
+#include "MmcTestUtils.h"
+
+
+#ifdef __DEBUG
+	#define _MMCSDLDDLOGGING   // Enable LDD logging
+#endif
+
+#if defined( _MMCSDLDDLOGGING )
+	 #define MMCSDLOG(A) Kern::Printf(A)
+	 #define MMCSDLOG2(A, B) Kern::Printf(A, B)
+	 #define MMCSDLOG3(A, B, C) Kern::Printf(A, B, C)
+	 #define MMCSDLOG4(A, B, C, D) Kern::Printf(A, B, C, D)
+	 #define MMCSDLOG5(A, B, C, D, E) Kern::Printf(A, B, C, D, E)
+	 #define MMCSDLOG6(A, B, C, D, E, F) Kern::Printf(A, B, C, D, E, F)
+#else
+	 #define MMCSDLOG(A)
+	 #define MMCSDLOG2(A, B)
+	 #define MMCSDLOG3(A, B, C)
+	 #define MMCSDLOG4(A, B, C, D)
+	 #define MMCSDLOG5(A, B, C, D, E)
+	 #define MMCSDLOG6(A, B, C, D, E, F)
+#endif
+
+
+_LIT(KLddName, "MMCSDTestCtrlInf");
+
+//Card Constants
+const TInt KMaxCardsPerStack=2;
+const TInt KSectorSizeInBytes=512;
+const TInt KMaxBlocklengthInBytes=1024;
+const TInt KSectorSizeShift=9;
+const TInt KDrvBufSizeInSectors=8;
+
+const TInt KStackNo=0;
+
+//Used to check erase command is supported by the card.
+const TUint32 KMMCEraseClassCmdSupported=KBit0;
+
+//Used to check group erase command is supported by the card.
+const TUint32 KMMCEraseGroupCmdSupported=KBit1;
+
+
+/**
+ * Card power supply information
+ *
+ */
+class TPBusPsuInf
+	{
+public:
+
+	/**	Indicates the voltage level, or range of voltages supported.
+		Reperesented in OCR (Operation Condition Register) */
+	TUint iVoltageSupported;
+
+   	/**	Maximum Current Supplied by the PSU */
+	TInt iMaxCurrentInMicroAmps;
+
+	/**	PSU Voltage level within expected limit while turning ON */
+	TUint iVoltCheckInterval;
+
+	/**	VCC voltage when ON */
+	TUint iVoltCheckMethod;
+
+    /**	Bus not locked timeout period,in seconds,when no clients are registered */
+    TInt iNotLockedTimeOut;
+
+	/**	Bus inactivity timeout period, in seconds, when clients are registered */
+	TInt iInactivityTimeOut;
+
+	};
+	
+/**
+ * MMC card Version
+ *
+ */
+class TCapsMmcIfV01
+	{
+public:
+	TVersion version;
+	};
+
+
+/**
+ * Class for MMCSD controller interface to test MMC/SD Cards
+ *
+ */
+class RMMCSDTestControllerInterface : public RBusLogicalChannel
+	{
+public:
+	enum {EMajorVersionNumber=1,EMinorVersionNumber=0,EBuildVersionNumber=1};
+	enum TRequest
+		{
+		/** Read a sector */
+		EReadSector,
+		/** Write a sector */
+		EWriteSector
+		};
+	enum TControl
+		{
+		/** Return whether SD card is in use */
+		ESDCard,
+		/** Read CSD register */
+		EReadCSD,
+		/** Read extended CSD register */
+		EReadExtCSD,
+		/** Get card info */
+		ECardInfo,
+		/** Return card object */
+		ECard,
+		/** Return card is present status */
+		ECardIsPresent,
+		/** Return card is ready status */
+		ECardIsReady,
+		/** Return card is locked status */
+		ECardIsLocked
+		};
+	enum TPsuControl
+        {
+		/** Return psu object */
+		EPsu,
+    	/** Gets the PSU Information */
+		EPsuInfo,
+		/** Set Power Supply State */
+		EPsuState,
+		/**Set Psu Voltage in OCR format */
+		EPsuVoltage,
+		/** Read Power supply unit number */
+		EPsuNum,
+		/** Read the Media Change ID */
+		EMediaChangeNum,
+		/** PSU current limit safe level or Not */
+		EPsuCurLimit,
+		/** Gets the PBUS state */
+		EPbusState,
+		/**	Gets the Power Supply Status */
+		EVccState,
+		/** Checks whether this PSU is powering a bus containing a locked device*/
+		EIsLocked,
+		/** Checks whether the PSU is off*/
+		EIsOff,
+		/** Gets the maximum current (in microAmps) that the PSU is able to supply*/
+		EMaxCurrentInMicroAmps,
+		/** Resets inactivity and not-locked counts*/
+		EResetInactivityTimer,
+		/** Gets the voltage level, or range of supported voltage levels*/
+		EVoltageSupported,
+		/** Bus inactivity counter*/
+		EMemInactivityCount,
+		/** Bus not locked counter*/
+		EMemNotLockedCount,
+		/** Bus inactivity timeout period, in seconds, when clients are registered*/
+		EMemInactivityTimeout,
+		/** Bus not locked timeout period, in seconds, when no clients are registered*/
+		EMemNotLockedTimeout,
+		/** Indicates the voltage level, or range of voltages supported*/
+		EMemVoltageSupported,
+		/** The maximum current (in microAmps) that the PSU is able to supply*/
+		EMemMaxCurrentInMicroAmps,
+		/**Indicates whether the platform hardware has support for checking whether the voltage level*/
+		EMemVoltCheckInterval
+		};
+	enum TMediaChangeControl
+		{
+		/** Return media change object */
+		EMediaChange,
+		/** Gets the MMC stack media state */
+		EMediaStateInfo,
+		/** Force Media Change */
+		EForceMediaChange,
+		/** Media Change Replay Count */
+		EMediaChangeCounter
+		};
+	enum TSocketControl
+        {
+		/** Return socket object */
+		ESocket
+		/** DMMCSocket::AdjustPartialRead */
+		,ESocketAdjustPartialRead
+    	/** DMMCSocket::CardIsPresent */
+		,ESocketCardIsPresent
+		/** DMMCSocket::GetBufferInfo */
+		,ESocketGetBufferInfo
+		/** DMMCSocket::Init */
+		,ESocketInit
+		/** DMMCSocket::InitiatePowerUpSequence */
+		,ESocketInitiatePowerUpSequence
+		/** DMMCSocket::MachineInfo */
+		,ESocketMachineInfo
+		/** DMMCSocket::PrepareStore */
+		,ESocketPrepareStore
+		/** DMMCSocket::Reset1 */
+		,ESocketReset1
+		/** DMMCSocket::Reset2 */
+		,ESocketReset2
+		/** DMMCSocket::ResetInactivity */
+		,ESocketResetInactivity
+		/** DMMCSocket::Stack */
+		,ESocketStack
+		/** DMMCSocket::iState */
+		,ESocketiState_Get
+		/** DMMCSocket::iDoorOpened */
+		,ESocketiDoorOpened_Get
+		/** DMMCSocket::iStandby */
+		,ESocketiStandby_Get
+		/** DMMCSocket::iType */
+		,ESocketiType_Get
+		/** DMMCSocket::PowerUp */
+		,ESocketPowerUp
+       };
+	enum TStackControl
+        {
+		/** Return stack object */
+		EStack
+		/** DMMCStack::AdjustPartialRead */
+		,EStackAdjustPartialRead
+		/** DMMCStack::AllocSession */
+		,EStackAllocSession
+		/** DMMCStack::BufferInfo */
+		,EStackBufferInfo
+		/** DMMCStack::CardP */
+		,EStackCardP
+		/** DMMCStack::DemandPagingInfo */
+		,EStackDemandPagingInfo
+		/** DMMCStack::EffectiveModes */
+		,EStackEffectiveModes
+		/** DMMCStack::GetBufferInfo */
+		,EStackGetBufferInfo
+		/** DMMCStack::HasCardsPresent */
+		,EStackHasCardsPresent
+		/** DMMCStack::HasSessionsQueued */
+		,EStackHasSessionsQueued
+		/** DMMCStack::Init */
+		, EStackInit
+		/** DMMCStack::InitStackInProgress */
+		, EStackInitStackInProgress
+		/** DMMCStack::MMCSocket */
+		, EStackMMCSocket
+		/** DMMCStack::MachineInfo */
+		, EStackMachineInfo
+		/** DMMCStack::MaxCardsInStack */
+		, EStackMaxCardsInStack
+		/** DMMCStack::PasswordStore read*/
+		, EStackReadPasswordStore
+		/** DMMCStack::PasswordStore write*/
+		, EStackWritePasswordStore
+		/** DMMCStack::ProgramPeriodInMs */
+		, EStackProgramPeriodInMs
+		/** DMMCStack::StackStop */
+		, EStackStop
+		/** DMMCStack::ReportPowerDown */
+		, EStackReportPowerDown
+		/** DMMCStack::ReportPowerUp */
+		, EStackReportPowerUp
+		/** see TEffectiveModesFunctionId enum */
+		, EStackConfigureEffectiveModes
+        };
+
+	enum TEffectiveModesFunctionId {
+		/** TMMCStackConfig::RemoveMode(TUint32 aMask) */
+		EStackEffectiveModesRemoveMode = 1
+		/** TMMCStackConfig::SetBusClockInKhz(TUint aParam) */
+		, EStackEffectiveModesSetBusClockInKhz
+		/** TMMCStackConfig:: SetBusClockInKhz(TUint aParam); */
+		, EStackEffectiveModesSetBusyTimeOutInMcs
+		/** TMMCStackConfig::SetCRCRetries(TUint aData)*/
+		, EStackEffectiveModesSetCRCRetries
+		/** TMMCStackConfig::SetDataTimeOutInMcs(TUint aParam) */
+		, EStackEffectiveModesSetDataTimeOutInMcs
+		/** TMMCStackConfig::TUint32 aMask*/
+		, EStackEffectiveModesSetMode
+		/** TMMCStackConfig::SetOpCondBusyTimeout(TUint16 aData); */
+		, EStackEffectiveModesSetOpCondBusyTimeout
+		/** TMMCStackConfig::SetPollAttempts(TUint aData); */
+		, EStackEffectiveModesSetPollAttempts
+		/** TMMCStackConfig::SetResponseTimeOutInTicks(TUint aParam); */
+		, EStackEffectiveModesSetResponseTimeOutInTicks
+		/** TMMCStackConfig:: SetTicksClockIn(TUint aParam); */
+		, EStackEffectiveModesSetTicksClockIn
+		/** TMMCStackConfig::SetTicksClockOut(TUint aParam); */
+		, EStackEffectiveModesSetTicksClockOut
+		/** TMMCStackConfig::SetTimeOutRetries(TUint aData); */
+		, EStackEffectiveModesSetTimeOutRetries
+
+        };
+public:
+	inline void Cancel();
+	inline TInt Open(TInt aStack,const TVersion& aVer);
+	inline TVersion VersionRequired() const;
+	inline void Reset();
+	// requests
+	inline TInt ReadBlock();
+
+	//DMMCPsu
+	inline TInt Psu(TAny* aPsu);
+	inline TInt PsuInfo(TPBusPsuInf& anInfo);
+	inline TInt SetPsuState(TInt& aState);
+	inline TInt SetPsuVoltage(TUint& aVol);
+	inline TInt PsuNumber(TInt& aPsuNum);
+	inline TInt MediaChangeID(TInt& aMCId);
+	inline TInt PsuCurLimit(TBool& aSafe);
+	inline TInt PbusState(TInt& aState);
+	inline TInt VccState(TInt& aVccState);
+	inline TInt IsLocked(TBool& aState);
+	inline TInt IsOff(TBool& aState);
+	inline TInt MaxCurrentInMicroAmps(TInt& aMaxCurrent);
+	inline TInt ResetInactivityTimer();
+	inline TInt VoltageSupported(TUint& aVoltage);
+	inline TInt InactivityCount(TInt& aInactivityCount);
+	inline TInt NotLockedCount(TInt& aNotLockedCount);
+	inline TInt InactivityTimeout(TInt& aInactivityTimeout);
+	inline TInt NotLockedTimeout(TInt& aNotLockedTimeout);
+	inline TInt MemVoltageSupported(TUint& aVoltage);
+	inline TInt MemMaxCurrentInMicroAmps(TInt& aMaxCurrent);
+	inline TInt VoltCheckInterval(TUint& aVoltCheckInterval);
+
+	//DMMCMediaChange
+	inline TInt MediaChange(TAny* aMediaChange);
+	inline TInt MediaStateInfo(TInt& aMediaState);
+	inline TInt ForceMediaChange();
+	inline TInt MediaChangeCounter(TInt& aCounter);
+	
+	// DMMCSocket
+	inline TInt Socket(TAny* aSocket);
+	inline TInt SocketAdjustPartialRead(TPartialReadData& aPartialReadData);
+	inline TInt SocketCardIsPresent(TBool& aCardPresent);
+	inline TInt SocketGetBufferInfo(TBufferInfo& aBufferInfo);
+	inline TInt SocketInit();
+	inline TInt SocketInitiatePowerUpSequence();
+	inline TInt SocketMachineInfo(TMachineInfo& aMachineInfo);
+	inline TInt SocketPrepareStore(TPasswordPrepareStoreData& aData);
+	inline TInt SocketReset1();
+	inline TInt SocketReset2();
+	inline TInt SocketResetInactivity(TInt aBusNumber);
+	inline TInt SocketStack(TStackPtr& aStackPtr);
+	inline TInt SocketiState_Get(TBusState& aState);
+	inline TInt SocketiDoorOpened_Get(TBool& aDoorOpened);
+	inline TInt SocketiStandby_Get(TBool& aStandby);
+	inline TInt SocketiType_Get(TCardBusType& aType);
+	inline void SocketPowerUp(TRequestStatus& aStatus);
+
+	// DMMCStack
+	inline TInt Stack(TAny* aStack);
+	inline TInt StackAdjustPartialRead(TPartialReadData& aPartialReadData);
+	inline TInt StackAllocSession();
+	inline TInt StackGetBufferInfo(TBufferInfo& aBufferInfo);
+	inline TInt StackBufferInfo(TBufferInfo& aBufferInfo);
+	inline TInt StackCardP(TCardPtr& aCardPtr);
+	inline TInt StackStop();
+	inline TInt StackMaxCardsInStack(TUint& aNumCardsInStack);
+	inline TInt StackMMCSocket(TAny* aAny);
+
+	inline TInt StackPasswordStore(TAny** aPwdStorePtr);
+	inline TInt StackReadPasswordStore(TStackPasswordStoreData& aPwdStoreData);
+	inline TInt StackWritePasswordStore(TStackPasswordStoreData& aPwdStoreData);
+	inline TInt StackProgramPeriodInMilliSeconds(TInt& aPeriodMs);
+	inline TInt StackInitStackInProgress(TBool& aInProgress);
+	inline TInt StackHasSessionsQueued(TBool& aSessionsQueued);
+	inline TInt StackHasCardsPresent(TBool& aCardsPresent);
+	inline TInt StackMachineInfo(TMachineInfo& aMachineInfo);
+	inline TInt StackDemandPagingInfo(TTCDemandPagingInfo& aInfo);
+	inline TInt StackEffectiveModes(TUint32& aRetVal);
+	inline TInt StackInit();
+	inline TInt StackReportPowerUp();
+	inline TInt StackReportPowerDown();
+	inline TInt StackAlterEffectiveModes( TEffectiveModesFunctionId FunctionId, TAny* aData);
+
+	// general
+	inline void ReadSector(TRequestStatus &aStatus,TInt aSectNum,TDes8 &aDes);
+	inline void WriteSector(TRequestStatus &aStatus,TInt aSectNum,const TDesC8 &aDes);
+	inline TInt CardInfo(TMMCCardInfo& aCardInfo);
+	inline TInt ReadCSD(TCSDInfo& aCSDInfo);
+	inline TInt ReadExtCSD(TExtendedCSDInfo& aExtCSDInfo);
+	inline TInt Card(TAny* aCard);
+	inline TInt CardIsPresent(TBool& aIsPresent);
+	inline TInt CardIsReady(TBool& aIsReady);
+	inline TInt CardIsLocked(TBool& aIsLocked);
+	inline void PwrDownStack();
+
+private:
+	inline TInt TestDoControl(TTCFunctionId aFunctionId, TAny *a1 = NULL, TAny *a2 = NULL);
+	inline void TestDoRequest(TTCFunctionId aFunctionId, TRequestStatus &aStatus, TAny *a1 = NULL, TAny *a2 = NULL);
+	};
+
+#include "d_mmcsdif.inl"
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/ldd/inc/d_mmcsdif.inl	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,266 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+#ifndef __D_MMCSDIF_H__
+#define __D_MMCSDIF_H__
+
+
+
+inline TInt RMMCSDTestControllerInterface::TestDoControl(TTCFunctionId aFunctionId, TAny *a1, TAny *a2)
+	{ return DoControl( aFunctionId.iValue, a1, a2); }
+
+inline void RMMCSDTestControllerInterface::TestDoRequest(TTCFunctionId aFunctionId, TRequestStatus &aStatus, TAny *a1, TAny *a2)
+	{ DoRequest( aFunctionId.iValue, aStatus, a1, a2); }
+
+//DoRequests
+inline void RMMCSDTestControllerInterface::ReadSector(TRequestStatus &aStatus, TInt aSectNum, TDes8 &aDes)
+	{ TestDoRequest(TTCFunctionId(EReadSector, EMmcGeneralTest), aStatus, (TAny*)aSectNum, &aDes);}
+
+inline void RMMCSDTestControllerInterface::WriteSector(TRequestStatus &aStatus,TInt aSectNum,const TDesC8 &aDes)
+	{ TestDoRequest(TTCFunctionId(EWriteSector, EMmcGeneralTest), aStatus, (TAny*)aSectNum, (TAny*)&aDes);}
+
+//General
+inline TInt RMMCSDTestControllerInterface::ReadCSD(TCSDInfo& aCSDInfo)
+	{return(TestDoControl(TTCFunctionId(EReadCSD, EMmcGeneralTest), &aCSDInfo));}
+
+inline TInt RMMCSDTestControllerInterface::ReadExtCSD(TExtendedCSDInfo& aExtCSDInfo)
+	{return(TestDoControl(TTCFunctionId(EReadExtCSD, EMmcGeneralTest), &aExtCSDInfo));}
+
+inline TInt RMMCSDTestControllerInterface::CardInfo(TMMCCardInfo& aCardInfo)
+	{return(TestDoControl(TTCFunctionId(ECardInfo, EMmcGeneralTest), &aCardInfo));}
+
+inline TInt RMMCSDTestControllerInterface::Card(TAny* aCard)
+	{return(TestDoControl(TTCFunctionId(ECard, EMmcGeneralTest), aCard));}
+
+inline TInt RMMCSDTestControllerInterface::CardIsPresent(TBool& aIsPresent)
+	{return(TestDoControl(TTCFunctionId(ECardIsPresent, EMmcGeneralTest), &aIsPresent));}
+
+inline TInt RMMCSDTestControllerInterface::CardIsReady(TBool& aIsReady)
+	{return(TestDoControl(TTCFunctionId(ECardIsReady, EMmcGeneralTest), &aIsReady));}
+
+inline TInt RMMCSDTestControllerInterface::CardIsLocked(TBool& aIsLocked)
+	{return(TestDoControl(TTCFunctionId(ECardIsLocked, EMmcGeneralTest), &aIsLocked));}
+
+
+//Open Channel
+inline TInt RMMCSDTestControllerInterface::Open(TInt aStack,const TVersion& aVer)
+		{return(DoCreate(_L("MMCSDTestCtrlInf"),aVer,(TInt)aStack,NULL,NULL));}
+
+inline TVersion RMMCSDTestControllerInterface::VersionRequired() const
+	{return(TVersion(EMajorVersionNumber,EMinorVersionNumber,EBuildVersionNumber));}
+
+//DMMCPsu
+inline TInt RMMCSDTestControllerInterface::Psu(TAny* aPsu)
+	{return(TestDoControl(TTCFunctionId(EPsu, EMmcTestPsu), aPsu));}
+
+inline TInt RMMCSDTestControllerInterface::PsuInfo(TPBusPsuInf& anInfo)
+	{return(TestDoControl(TTCFunctionId(EPsuInfo, EMmcTestPsu), &anInfo));}
+
+inline TInt RMMCSDTestControllerInterface::SetPsuState(TInt& aState)
+	{return(TestDoControl(TTCFunctionId(EPsuState, EMmcTestPsu), (TAny*)aState));}
+
+inline TInt RMMCSDTestControllerInterface::SetPsuVoltage(TUint& aVol)
+	{return(TestDoControl(TTCFunctionId(EPsuVoltage, EMmcTestPsu), (TAny*)aVol));}
+
+inline TInt RMMCSDTestControllerInterface::PsuNumber(TInt& aPsuNum)
+	{return(TestDoControl(TTCFunctionId(EPsuNum, EMmcTestPsu), &aPsuNum));}
+
+inline TInt RMMCSDTestControllerInterface::MediaChangeID(TInt& aMCId)
+	{return(TestDoControl(TTCFunctionId(EMediaChangeNum, EMmcTestPsu), &aMCId));}
+
+inline TInt RMMCSDTestControllerInterface::PsuCurLimit(TBool& aSafe)
+	{return(TestDoControl(TTCFunctionId(EPsuCurLimit, EMmcTestPsu), &aSafe));}
+
+inline TInt RMMCSDTestControllerInterface::PbusState(TInt& aState)
+	{return(TestDoControl(TTCFunctionId(EPbusState,EMmcTestPsu),&aState));}
+
+inline TInt RMMCSDTestControllerInterface::VccState(TInt& aVccState)
+	{return(TestDoControl(TTCFunctionId(EVccState,EMmcTestPsu),&aVccState));}
+
+inline TInt RMMCSDTestControllerInterface::IsLocked(TBool& aState)
+	{return(TestDoControl(TTCFunctionId(EIsLocked,EMmcTestPsu),&aState));}
+
+inline TInt RMMCSDTestControllerInterface::IsOff(TBool& aState)
+	{return(TestDoControl(TTCFunctionId(EIsOff,EMmcTestPsu),&aState));}
+
+inline TInt RMMCSDTestControllerInterface::MaxCurrentInMicroAmps(TInt& aMaxCurrent)
+	{return(TestDoControl(TTCFunctionId(EMaxCurrentInMicroAmps,EMmcTestPsu),&aMaxCurrent));}
+
+inline TInt RMMCSDTestControllerInterface::ResetInactivityTimer()
+	{return(TestDoControl(TTCFunctionId(EResetInactivityTimer,EMmcTestPsu),NULL));}
+
+inline TInt RMMCSDTestControllerInterface::VoltageSupported(TUint& aVoltage)
+	{return(TestDoControl(TTCFunctionId(EVoltageSupported,EMmcTestPsu),&aVoltage));}
+
+inline TInt RMMCSDTestControllerInterface::InactivityCount(TInt& aInactivityCount)
+	{return(TestDoControl(TTCFunctionId(EMemInactivityCount,EMmcTestPsu),&aInactivityCount));}
+
+inline TInt RMMCSDTestControllerInterface::NotLockedCount(TInt& aNotLockedCount)
+	{return(TestDoControl(TTCFunctionId(EMemNotLockedCount,EMmcTestPsu),&aNotLockedCount));}
+
+inline TInt RMMCSDTestControllerInterface::InactivityTimeout(TInt& aInactivityTimeout)
+	{return(TestDoControl(TTCFunctionId(EMemInactivityTimeout,EMmcTestPsu),&aInactivityTimeout));}
+
+inline TInt RMMCSDTestControllerInterface::NotLockedTimeout(TInt& aNotLockedTimeout)
+	{return(TestDoControl(TTCFunctionId(EMemNotLockedTimeout,EMmcTestPsu),&aNotLockedTimeout));}
+
+inline TInt RMMCSDTestControllerInterface::MemVoltageSupported(TUint& aVoltage)
+	{return(TestDoControl(TTCFunctionId(EMemVoltageSupported,EMmcTestPsu),&aVoltage));}
+
+inline TInt RMMCSDTestControllerInterface::MemMaxCurrentInMicroAmps(TInt& aMaxCurrent)
+	{return(TestDoControl(TTCFunctionId(EMemMaxCurrentInMicroAmps,EMmcTestPsu),&aMaxCurrent));}
+
+inline TInt RMMCSDTestControllerInterface::VoltCheckInterval(TUint& aVoltCheckInterval)
+	{return(TestDoControl(TTCFunctionId(EMemVoltCheckInterval,EMmcTestPsu),&aVoltCheckInterval));}
+
+//DMMCMediaChange
+inline TInt RMMCSDTestControllerInterface::MediaChange(TAny* aMediaChange)
+	{return(TestDoControl(TTCFunctionId(EMediaChange, EMmcTestMediaChange), aMediaChange));}
+
+inline TInt RMMCSDTestControllerInterface::MediaStateInfo(TInt& aMediaState)
+	{return(TestDoControl(TTCFunctionId(EMediaStateInfo, EMmcTestMediaChange), &aMediaState));}
+
+inline TInt RMMCSDTestControllerInterface::ForceMediaChange()
+	{return(TestDoControl(TTCFunctionId(EForceMediaChange, EMmcTestMediaChange), NULL));}
+
+inline TInt RMMCSDTestControllerInterface::MediaChangeCounter(TInt& aCounter)
+	{return(TestDoControl(TTCFunctionId(EMediaChangeCounter, EMmcTestMediaChange), &aCounter));}
+
+// DMMCSocket
+inline TInt RMMCSDTestControllerInterface::Socket(TAny* aSocket)
+	{return(TestDoControl(TTCFunctionId(ESocket, EMmcTestSocket), aSocket));}
+
+inline TInt RMMCSDTestControllerInterface::SocketAdjustPartialRead(TPartialReadData& aPartialReadData)
+	{return(TestDoControl(TTCFunctionId(ESocketAdjustPartialRead, EMmcTestSocket), &aPartialReadData));}
+
+inline TInt RMMCSDTestControllerInterface::SocketCardIsPresent(TInt& aCardPresent)
+	{return(TestDoControl(TTCFunctionId(ESocketCardIsPresent, EMmcTestSocket), &aCardPresent));}
+
+inline TInt RMMCSDTestControllerInterface::SocketGetBufferInfo(TBufferInfo& aBufferInfo)
+	{return(TestDoControl(TTCFunctionId(ESocketGetBufferInfo, EMmcTestSocket), &aBufferInfo));}
+
+inline TInt RMMCSDTestControllerInterface::SocketInit()
+	{return(TestDoControl(TTCFunctionId(ESocketInit, EMmcTestSocket), NULL ));}
+
+inline TInt RMMCSDTestControllerInterface::SocketInitiatePowerUpSequence()
+	{return(TestDoControl(TTCFunctionId(ESocketInitiatePowerUpSequence, EMmcTestSocket), NULL));}
+
+inline TInt RMMCSDTestControllerInterface::SocketMachineInfo(TMachineInfo& aMachineInfo)
+	{return(TestDoControl(TTCFunctionId(ESocketMachineInfo, EMmcTestSocket), &aMachineInfo));}
+
+inline TInt RMMCSDTestControllerInterface::SocketPrepareStore(TPasswordPrepareStoreData& aPwdData)
+	{return(TestDoControl(TTCFunctionId(ESocketPrepareStore,  EMmcTestSocket),&aPwdData));}
+
+inline TInt RMMCSDTestControllerInterface::SocketReset1()
+	{return(TestDoControl(TTCFunctionId(ESocketReset1, EMmcTestSocket), NULL ));}
+
+inline TInt RMMCSDTestControllerInterface::SocketReset2()
+	{return(TestDoControl(TTCFunctionId(ESocketReset2, EMmcTestSocket), NULL));}
+
+inline TInt RMMCSDTestControllerInterface::SocketResetInactivity(TInt aBusNumber)
+	{return(TestDoControl(TTCFunctionId(ESocketResetInactivity, EMmcTestSocket), &aBusNumber));}
+
+inline TInt RMMCSDTestControllerInterface::SocketStack(TStackPtr& aStackPtr)
+	{return(TestDoControl(TTCFunctionId(ESocketStack, EMmcTestSocket), &aStackPtr));}
+
+inline TInt RMMCSDTestControllerInterface::SocketiState_Get(TBusState& aState)
+	{return(TestDoControl(TTCFunctionId(ESocketiState_Get, EMmcTestSocket), &aState));}
+
+inline TInt RMMCSDTestControllerInterface::SocketiDoorOpened_Get(TBool& aDoorOpened)
+	{return(TestDoControl(TTCFunctionId(ESocketiDoorOpened_Get, EMmcTestSocket), &aDoorOpened));}
+
+inline TInt RMMCSDTestControllerInterface::SocketiStandby_Get(TBool& aStandby)
+	{return(TestDoControl(TTCFunctionId(ESocketiStandby_Get, EMmcTestSocket), &aStandby));}
+
+inline TInt RMMCSDTestControllerInterface::SocketiType_Get(TCardBusType& aType)
+	{return(TestDoControl(TTCFunctionId(ESocketiType_Get, EMmcTestSocket), &aType));}
+
+inline void RMMCSDTestControllerInterface::SocketPowerUp(TRequestStatus& aStatus)
+	{ TestDoRequest(TTCFunctionId(ESocketPowerUp, EMmcTestSocket), aStatus); }
+
+// DMMCStack
+inline TInt RMMCSDTestControllerInterface::Stack(TAny* aStack)
+	{ return(TestDoControl(TTCFunctionId(EStack, EMmcTestStack), aStack));}
+
+inline TInt RMMCSDTestControllerInterface::StackAdjustPartialRead(TPartialReadData& aPartialReadData)
+	{ return(TestDoControl(TTCFunctionId(EStackAdjustPartialRead, EMmcTestStack), &aPartialReadData));}
+
+inline TInt RMMCSDTestControllerInterface::StackAllocSession()
+	{ return(TestDoControl(TTCFunctionId(EStackAllocSession, EMmcTestStack), NULL));}
+
+inline TInt RMMCSDTestControllerInterface::StackBufferInfo(TBufferInfo& aBufferInfo)
+	{ return(TestDoControl(TTCFunctionId(EStackBufferInfo, EMmcTestStack), &aBufferInfo));}
+
+inline TInt RMMCSDTestControllerInterface::StackGetBufferInfo(TBufferInfo& aBufferInfo)
+	{ return(TestDoControl(TTCFunctionId(EStackGetBufferInfo, EMmcTestStack), &aBufferInfo));}
+
+inline TInt RMMCSDTestControllerInterface::StackCardP(TCardPtr& aCardPtr)
+	{ return(TestDoControl( TTCFunctionId(EStackCardP, EMmcTestStack), &aCardPtr));}
+
+inline TInt RMMCSDTestControllerInterface::StackStop()
+	{ return(TestDoControl(TTCFunctionId(EStackStop, EMmcTestStack), NULL));}
+
+inline TInt RMMCSDTestControllerInterface::StackMaxCardsInStack(TUint& aNumCardsInStack)
+	{ return(TestDoControl(TTCFunctionId(EStackMaxCardsInStack, EMmcTestStack), &aNumCardsInStack));}
+
+inline TInt RMMCSDTestControllerInterface::StackMMCSocket(TAny* aAny)
+	{ return(TestDoControl(TTCFunctionId(EStackMMCSocket, EMmcTestStack), aAny));}
+
+inline TInt RMMCSDTestControllerInterface::StackReadPasswordStore(TStackPasswordStoreData& aPwdStoreData)
+	{ return(TestDoControl(TTCFunctionId(EStackReadPasswordStore, EMmcTestStack), &aPwdStoreData));}
+
+inline TInt RMMCSDTestControllerInterface::StackWritePasswordStore(TStackPasswordStoreData& aPwdStoreData)
+	{ return(TestDoControl(TTCFunctionId(EStackWritePasswordStore, EMmcTestStack), &aPwdStoreData));}
+
+inline TInt RMMCSDTestControllerInterface::StackProgramPeriodInMilliSeconds(TInt& aPeriodMs)
+	{ return(TestDoControl(TTCFunctionId(EStackProgramPeriodInMs, EMmcTestStack), &aPeriodMs));}
+
+inline TInt RMMCSDTestControllerInterface::StackInitStackInProgress(TBool& aInProgress)
+	{ return(TestDoControl(TTCFunctionId(EStackInitStackInProgress, EMmcTestStack), &aInProgress));}
+
+inline TInt RMMCSDTestControllerInterface::StackHasSessionsQueued(TBool& aSessionsQueued)
+	{ return(TestDoControl(TTCFunctionId(EStackHasSessionsQueued, EMmcTestStack), &aSessionsQueued));}
+
+inline TInt RMMCSDTestControllerInterface::StackHasCardsPresent(TBool& aCardsPresent)
+	{ return(TestDoControl(TTCFunctionId(EStackHasCardsPresent, EMmcTestStack), &aCardsPresent));}
+
+inline TInt RMMCSDTestControllerInterface::StackMachineInfo(TMachineInfo& aMachineInfo)
+	{ return(TestDoControl(TTCFunctionId(EStackMachineInfo, EMmcTestStack), &aMachineInfo));}
+
+inline TInt RMMCSDTestControllerInterface::StackDemandPagingInfo(TTCDemandPagingInfo& aInfo)
+	{ return TestDoControl(TTCFunctionId(EStackDemandPagingInfo, EMmcTestStack), &aInfo); }
+
+inline TInt RMMCSDTestControllerInterface::StackEffectiveModes(TUint32& aModes)
+	{ return TestDoControl(TTCFunctionId(EStackEffectiveModes, EMmcTestStack), &aModes);}
+
+inline TInt RMMCSDTestControllerInterface::StackInit()
+	{ return TestDoControl(TTCFunctionId(EStackInit, EMmcTestStack));}
+
+inline TInt RMMCSDTestControllerInterface::StackReportPowerUp()
+	{ return TestDoControl(TTCFunctionId(EStackReportPowerUp, EMmcTestStack));}
+
+inline TInt RMMCSDTestControllerInterface::StackReportPowerDown()
+	{ return TestDoControl(TTCFunctionId(EStackReportPowerDown, EMmcTestStack));}
+
+inline TInt RMMCSDTestControllerInterface::StackAlterEffectiveModes(TEffectiveModesFunctionId aFunctionId, TAny* aData)
+	{
+	return TestDoControl(TTCFunctionId(EStackConfigureEffectiveModes, EMmcTestStack), (TAny*)aFunctionId, aData); 
+	}
+
+#endif //__D_MMCSDIF_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/ldd/inc/mmcldd.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef MMCLDD_H_
+#define MMCLDD_H_
+
+#include <mmc.h>
+#include "LddAsyncRequest.h"
+
+/**
+ * LDD factory object for MMCSD
+ *
+ */
+class DLddFactoryMmcCntrlInterface : public DLogicalDevice
+	{
+public:
+	DLddFactoryMmcCntrlInterface();
+	virtual ~DLddFactoryMmcCntrlInterface();
+	virtual TInt Install();
+	virtual void GetCaps(TDes8 &aDes) const;
+	virtual TInt Create(DLogicalChannelBase*& aChannel); 	//overriding pure virtual
+	};
+
+	
+/**
+ * MMCSD LDD logical channel
+ *
+ */
+class DLddMmcCntrlInterface : public DLogicalChannel , MAsyncRequestObserver
+	{
+public:
+	DLddMmcCntrlInterface();
+	~DLddMmcCntrlInterface();
+protected:
+	virtual TInt DoCreate(TInt aUnit, const TDesC8* anInfo, const TVersion& aVer);
+	virtual void HandleMsg(class TMessageBase *);
+private:
+	void DoCancel(TInt aReqNo);
+	TInt DoControl(TInt aFunction, TAny* a1, TAny* a2);
+	TInt MediaChangeDoControl(TInt aFunction, TAny* a1, TAny* a2);
+	TInt PsuDoControl(TInt aFunction, TAny* a1, TAny* a2);
+	TInt SocketDoControl(TInt aFunction, TAny* a1, TAny* a2);
+	TInt StackDoControl(TInt aFunction, TAny* a1, TAny* a2);
+	
+	// async request methods
+	TInt DoRequest(TInt aFunction, TRequestStatus* aStatus, TAny* a1, TAny* a2);
+	TInt SocketDoRequest(TRequestStatus* aStatus, TAny* a1, TAny *a2, TInt aCommand);
+	TInt StackConfigureEffectiveModes(TInt aEffectiveModesFunctionId, TAny* aParam);
+
+	// FROM MAsyncRequestObserver
+	virtual void Notify(DLddAsyncRequest& aRequest);
+
+private:
+	enum TMmcAsyncCmd {EMmcSesNone,EMmcSesReadBlk,EMmcSesWriteBlk, EMmcSesReadCSD, EMmcSesReadExtCSD, EMMcSocketPowerUp, EMMcStackPowerUp};	
+	DMmcSessionAsyncRequest* CreateAsyncSessionRequest(TMmcAsyncCmd aCommand, TRequestStatus* aStatus);
+	DBusEventRequest* CreateAsyncBusEventRequest(TMmcAsyncCmd aCommand, TRequestStatus* aStatus, TInt aUnit);
+
+	
+	TBool RequestStatusExists(TRequestStatus* aStatus);
+	void ClearRequest(DLddAsyncRequest* aRequest);
+	
+private:
+    enum TPanic {EReadDes,EWriteDes,EWriteTInt,EUnknownMmcSes};
+    TInt iStackNum;
+    DMMCPsu* iPsu;
+    DMMCMediaChange* iMediaChange;
+  	DMMCSocket* iSocket;
+  	DMMCStack* iStack;
+    TMMCard* iCard;
+
+	DThread* iClient;
+	TCSD iCSD;
+	TExtendedCSD iExtendedCSD;
+	TBool iIsSD;	
+	RPointerArray<DLddAsyncRequest> iAsyncList;
+	TMMCStackConfig iStackConfig;
+	TInt			iUnit;
+	};
+
+#endif /*MMCLDD_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/ldd/src/LddAsyncRequest.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,310 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include "mmcldd.h"
+#include "d_mmcsdif.h"
+#include "LddAsyncRequest.h"
+
+/**
+ * DLddAsyncRequest constructor
+ *
+ * @param TInt aFunctionId - functionId 
+ * @param TRequestStatus* aStatus	for signalling upon completion
+ * @param MAsyncRequestObserver& aObserver	- observer recieves notification upon completion 
+ *
+ * @return N/A
+ *
+ * @leave N/A					
+ */
+DLddAsyncRequest::DLddAsyncRequest(TInt aFunctionId, TRequestStatus* aStatus, MAsyncRequestObserver& aObserver) 
+: iFunctionId(aFunctionId)
+, iStatus(aStatus)
+, iObserver(aObserver)
+, iError(KErrNone) 
+	{
+	}
+
+/**
+ * Destructor 
+ *
+ * @return N/A
+ *
+ * @leave	N/A				
+ */
+DLddAsyncRequest::~DLddAsyncRequest()
+	{
+	}
+
+/**
+ * Get the error code for this request 
+ *
+ *
+ * @return TInt the error code
+ *
+ * @leave	 N/A				
+ */
+TInt DLddAsyncRequest::Error() 
+	{ 
+	return iError; 
+	}
+
+/**
+ * Get the function Id for this request
+ *
+ * @return TInt the function Id
+ *
+ * @leave N/A					
+ */
+TInt DLddAsyncRequest::FunctionId() 
+	{ 
+	return iFunctionId; 
+	}
+
+/**
+ * Get the status of this request 
+ *
+ *
+ * @return TRequestStatus status of the request
+ *
+ * @leave N/A					 
+ */
+TRequestStatus* DLddAsyncRequest::Status()
+	{
+	return iStatus;
+	}
+
+
+///////////////////////////////////////////////////////////////////////
+//////////////////// DMmcSessionAsyncRequest //////////////////////////
+///////////////////////////////////////////////////////////////////////
+
+/**
+ * DMmcSessionAsyncRequest Constructor  
+ *
+ * @param TInt aFunctionId - functionId 
+ * @param TRequestStatus* aStatus	for signalling upon completion
+ * @param MAsyncRequestObserver& aObserver	- observer recieves notification upon completion 
+ * @param TDynamicDfcQue* aDfcQ - pointer to dfc queue,  	 
+ * @param DMMCStack& aStack	stack upon which this request will operate
+ * @param TMMCard& aCard multimedia card upon which this request will operate
+ *
+ * 
+ * @return N/A
+ *
+ * @leave N/A					
+ */
+DMmcSessionAsyncRequest::DMmcSessionAsyncRequest(TInt aFunctionId, TRequestStatus* aStatus, 
+		MAsyncRequestObserver& aObserver, TDynamicDfcQue* aDfcQ, DMMCStack& aStack, TMMCard& aCard)
+: DLddAsyncRequest(aFunctionId, aStatus, aObserver)
+, iSession(NULL)
+, iSessionEndCallBack(DMmcSessionAsyncRequest::SessionEndCallBack, this)
+, iSessionEndDfc(DMmcSessionAsyncRequest::SessionEndDfc, this, 1)
+, iClientDesPtr(NULL)
+, iBlkOffet(0)
+, iBuf(NULL)
+	{
+	TInt bufLen;
+	TInt minorBufLen;
+	aStack.BufferInfo(iBuf, bufLen, minorBufLen);
+	
+	iSession = aStack.AllocSession(iSessionEndCallBack);
+	iSession->SetStack(&aStack);
+	iSession->SetCard(&aCard);
+
+	iSessionEndDfc.SetDfcQ(aDfcQ);
+	
+	Reset();
+	}
+
+/**
+ * Destructor
+ *
+ * @return N/A
+ *
+ * @leave N/A					
+ */
+DMmcSessionAsyncRequest::~DMmcSessionAsyncRequest()
+	{
+	Reset();
+	delete iSession;
+	}
+
+void DMmcSessionAsyncRequest::Reset()
+{
+	MMCSDLOG("iSessionEndDfc.Cancel() called");	
+	iSessionEndDfc.Cancel();
+}
+
+
+/**
+ * Gets the async requests DMMCSession 
+ *
+ * @return reference to the DMMCSession
+ *
+ * @leave N/A					
+ */
+DMMCSession& DMmcSessionAsyncRequest::Session()
+	{
+	return *iSession;
+	}
+
+/**
+ * The session end callback (static)- called when and engaged session completes 
+ *
+ * @param 	TAny* in this case this will be a pointer to the DMmcSessionAsyncRequest 			
+ *
+ * @return void
+ *
+ * @leave	N/A				
+ */
+void DMmcSessionAsyncRequest::SessionEndCallBack(TAny *aPtr)
+	{
+	((DMmcSessionAsyncRequest*)aPtr)->SessionEndCallBack();
+	}
+
+
+/**
+ * Utility function called from static overload SessionEndCallBack(TAny*)
+ *
+ * @return void
+ *
+ * @leave		N/A			
+ */
+void DMmcSessionAsyncRequest::SessionEndCallBack()
+	{
+	MMCSDLOG("DMmcSessionAsyncRequest::SessionEndCallBack called");
+	iError = iSession->EpocErrorCode();
+
+	if (NKern::CurrentContext()==NKern::EInterrupt)
+		{
+		iSessionEndDfc.Add();
+		}
+	else
+		{
+		// Signal request complete using DFC
+		if (!iSessionEndDfc.Queued())
+			{
+			iSessionEndDfc.Enque();
+			}
+		}
+	}
+
+
+/**
+ * Session deferred function call (static)
+ *
+ * @param 	TAny* in this case this will be a pointer to the DMmcSessionAsyncRequest 			
+ *
+ * @return void
+ *
+ * @leave	N/A				
+ */
+void DMmcSessionAsyncRequest::SessionEndDfc(TAny *aPtr)
+	{
+	((DMmcSessionAsyncRequest*) aPtr)->SessionEndDfc();
+	}
+
+
+/**
+ * Utility function called from static overload SessionEndDfc(TAny*)
+ *
+ * @return void
+ *
+ * @leave		N/A			
+ */
+void DMmcSessionAsyncRequest::SessionEndDfc()
+	{
+	MMCSDLOG2("DLddAsyncRequest::SessionEndDfc called err(%d)", iError);	
+	iObserver.Notify(*this);
+	MMCSDLOG("DLddAsyncRequest::SessionEndDfc finished");
+	}
+
+
+
+/**
+ * DBusEventRequest constructor
+ *
+ * @param TInt aFunctionId - Function ID
+ * @param TRequestStatus* aStatus - Request Status
+ * @param MAsyncRequestObserver& aObserver - Asynchronous Request observer interface
+ * @param TInt aUnit - Socket ID
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+DBusEventRequest::DBusEventRequest(TInt aFunctionId, TRequestStatus* aStatus, MAsyncRequestObserver& aObserver, TInt aUnit,
+									TDynamicDfcQue* aDfcQ, DMMCStack& aStack, TMMCard& aCard) 
+: DMmcSessionAsyncRequest(aFunctionId, aStatus, aObserver, aDfcQ, aStack, aCard)
+, iBusEventCallBack(DBusEventRequest::BusEventCallBack, this)
+	{
+	iBusEventCallBack.SetSocket(aUnit);
+	iBusEventCallBack.Add();
+	
+	}
+/**
+ * Destructor
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+DBusEventRequest::~DBusEventRequest()
+	{
+	iBusEventCallBack.Remove();
+	}
+
+/**
+ * Callback when request has completed
+ *
+ * @param TAny* aPtr - Pointer to the bus event request
+ * @param TInt aReason - Completion error code
+ * @param TAny* a1 - Given parameter
+ * @param TAny* a2 - Given parameter
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+void DBusEventRequest::BusEventCallBack(TAny* aPtr, TInt aReason, TAny* a1, TAny* a2)
+	{	
+	((DBusEventRequest*)aPtr)->BusEventCallBack(aReason, a1, a2);	
+	}
+
+/**
+ * Callback when request has completed
+ *
+ * @param TInt aReason - Completion error code
+ * @param TAny* a1 - Given parameter
+ * @param TAny* a2 - Given parameter
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+void DBusEventRequest::BusEventCallBack(TInt aReason, TAny* a1, TAny* a2)
+	{
+	
+	MMCSDLOG("DBusEventRequest::BusEventCallBack called");
+	iError = aReason;
+	iBusState = (TPBusState)((TInt) a1);
+	iBusError = (TInt) a2;
+	MMCSDLOG4("DBusEventRequest::BusEventCallBack iBusState(%d) iBusError(%d) iError(%d)", iBusState, iBusError, iError);
+	iObserver.Notify(*this);
+	MMCSDLOG("DBusEventRequest::BusEventCallBack finished");
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/ldd/src/MMcKernelTestUtils.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,366 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifdef __KERNEL_MODE__
+
+#include "MmcTestUtils.h"
+
+/**
+ * Convert kernel Card object to user side object
+ *
+ * @param const TMMCard& aCard - The card object
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+void TMMCCardInfo::SetCardInfo(const TMMCard& aCard)
+	{
+    iIsReady = aCard.IsPresent();
+    iIsLocked = aCard.IsLocked();
+	TCID* cid=(TCID*)&(aCard.CID());
+	TInt i;
+	for (i=0;i<16;i++)
+		{
+		iCID[i] = cid->At(i);
+		}
+	const TCSD& csd = aCard.CSD();
+	for (i=0;i<16;i++)
+		{
+		iCSD[i] = csd.At(i);
+		}
+    iRCA = TUint16(aCard.RCA());
+    iMediaType = (TMmcMediaType)aCard.MediaType();
+    iCardSizeInBytes = aCard.DeviceSize64();
+    iMaxReadBlLen = aCard.MaxReadBlLen();
+    iReadBlLen = csd.ReadBlockLength();
+    iWriteBlLen = csd.WriteBlockLength();
+    iReadBlPartial = csd.ReadBlPartial();
+    iWriteBlPartial = csd.WriteBlPartial();
+    iReadBlkMisalign = csd.ReadBlkMisalign();
+    iWriteBlkMisalign = csd.WriteBlkMisalign();
+    iReadCurrentInMilliAmps = csd.MaxReadCurrentInMilliamps();
+    iWriteCurrentInMilliAmps = csd.MaxWriteCurrentInMilliamps();
+    iSpecVers = csd.SpecVers();
+    iTAAC = csd.TAAC();
+    iNSAC = csd.NSAC();
+    iTransferSpeed = csd.TranSpeed();
+    iCommandRegister = csd.CCC();
+    iHighCapacity = aCard.IsHighCapacity();
+ 	iFlags = aCard.iFlags;
+	}
+
+/**
+ * Convert kernel Machine Info object to user side object
+ *
+ * @param const TMMCMachineInfo& aMachineInfo - The Machine Info object
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+TMachineInfo::TMachineInfo(const TMMCMachineInfo& aMachineInfo)
+	{
+	iTotalSockets = aMachineInfo.iTotalSockets;
+	iTotalMediaChanges = aMachineInfo.iTotalMediaChanges;
+	iTotalPrimarySupplies = aMachineInfo.iTotalPrimarySupplies;
+	iSPIMode = aMachineInfo.iSPIMode & 0x1;
+	iBaseBusNumber = aMachineInfo.iBaseBusNumber;
+
+	if( aMachineInfo.iFlags & TMMCMachineInfo::ESupportsSPIMode )
+		{
+		iSupportsSPIMode = ETrue;
+		}
+	else
+		{
+		iSupportsSPIMode = EFalse;
+		}
+	if( aMachineInfo.iFlags & TMMCMachineInfo::ESupportsDoubleBuffering )
+		{
+		iSupportsDoubleBuffering = ETrue;
+		}
+	else
+		{
+		iSupportsDoubleBuffering = EFalse;
+		}
+	if( aMachineInfo.iFlags & TMMCMachineInfo::ESupportsR7 )
+		{
+		iSupportsR7 = ETrue;
+		}
+	else
+		{
+		iSupportsR7 = EFalse;
+		}
+	if( aMachineInfo.iFlags & TMMCMachineInfo::EDma8BitAddressing )
+		{
+		iDma8BitAddressing = ETrue;
+		}
+	else
+		{
+		iDma8BitAddressing = EFalse;
+		}
+	if( aMachineInfo.iFlags & TMMCMachineInfo::EDma16BitAddressing )
+		{
+		iDma16BitAddressing = ETrue;
+		}
+	else
+		{
+		iDma16BitAddressing = EFalse;
+		}
+	if( aMachineInfo.iFlags & TMMCMachineInfo::EDma32BitAddressing )
+		{
+		iDma32BitAddressing = ETrue;
+		}
+	else
+		{
+		iDma32BitAddressing = EFalse;
+		}
+	if( aMachineInfo.iFlags & TMMCMachineInfo::EDma64BitAddressing )
+		{
+		iDma64BitAddressing = ETrue;
+		}
+	else
+		{
+		iDma64BitAddressing = EFalse;
+		}
+	if( aMachineInfo.iFlags & TMMCMachineInfo::ESupportsDMA )
+		{
+		iSupportsDMA = ETrue;
+		}
+	else
+		{
+		iSupportsDMA = EFalse;
+		}
+	if( aMachineInfo.iFlags & TMMCMachineInfo::EMaxTransferLength_256K )
+		{
+		iMaxTransferLength_256K = ETrue;
+		}
+	else
+		{
+		iMaxTransferLength_256K = EFalse;
+		}
+	if( aMachineInfo.iFlags & TMMCMachineInfo::EMaxTransferLength_512K )
+		{
+		iMaxTransferLength_512K = ETrue;
+		}
+	else
+		{
+		iMaxTransferLength_512K = EFalse;
+		}
+	if( aMachineInfo.iFlags & TMMCMachineInfo::EMaxTransferLength_1M )
+		{
+		iMaxTransferLength_1M = ETrue;
+		}
+	else
+		{
+		iMaxTransferLength_1M = EFalse;
+		}
+	if( aMachineInfo.iFlags & TMMCMachineInfo::EMaxTransferLength_2M )
+		{
+		iMaxTransferLength_2M = ETrue;
+		}
+	else
+		{
+		iMaxTransferLength_2M = EFalse;
+		}
+	if( aMachineInfo.iFlags & TMMCMachineInfo::EMaxTransferLength_4M )
+		{
+		iMaxTransferLength_4M = ETrue;
+		}
+	else
+		{
+		iMaxTransferLength_4M = EFalse;
+		}
+	if( aMachineInfo.iFlags & TMMCMachineInfo::EMaxTransferLength_8M )
+		{
+		iMaxTransferLength_8M = ETrue;
+		}
+	else
+		{
+		iMaxTransferLength_8M = EFalse;
+		}
+	if( aMachineInfo.iFlags & TMMCMachineInfo::EMaxTransferLength_16M )
+		{
+		iMaxTransferLength_16M = ETrue;
+		}
+	else
+		{
+		iMaxTransferLength_16M = EFalse;
+		}
+	}
+
+/**
+ * Convert kernel CSD object to user side object
+ *
+ * @param const TCSD& aCSD - The CSD object
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+TCSDInfo::TCSDInfo(const TCSD& aCSD)
+	{
+	iCSDStructure = aCSD.CSDStructure();
+	iSpecVers = aCSD.SpecVers();
+	iReserved120 = aCSD.Reserved120();
+	iTAAC = aCSD.TAAC();
+	iNSAC = aCSD.NSAC();
+	iTranSpeed = aCSD.TranSpeed();
+	iCCC = aCSD.CCC();
+	iReadBlLen = aCSD.ReadBlLen();
+	iReadBlPartial = aCSD.ReadBlPartial();
+	iWriteBlkMisalign = aCSD.WriteBlkMisalign();
+	iReadBlkMisalign = aCSD.ReadBlkMisalign();
+	iDSRImp = aCSD.DSRImp();
+	iReserved74 = aCSD.Reserved74();
+	iCSize = aCSD.CSize();
+	iVDDRCurrMin = aCSD.VDDRCurrMin();
+	iVDDRCurrMax = aCSD.VDDRCurrMax();
+	iVDDWCurrMin = aCSD.VDDWCurrMin();
+	iVDDWCurrMax = aCSD.VDDWCurrMax();
+	iCSizeMult = aCSD.CSizeMult();
+	iEraseGrpSize = aCSD.EraseGrpSize();
+	iEraseGrpMult = aCSD.EraseGrpMult();
+	iWPGrpSize = aCSD.WPGrpSize();
+	iWPGrpEnable = aCSD.WPGrpEnable();
+	iDefaultECC = aCSD.DefaultECC();
+	iR2WFactor = aCSD.R2WFactor();
+	iWriteBlLen = aCSD.WriteBlLen();
+	iWriteBlPartial = aCSD.WriteBlPartial();
+	iReserved16 = aCSD.Reserved16();
+	iFileFormatGrp = aCSD.FileFormatGrp();
+	iCopy = aCSD.Copy();
+	iPermWriteProtect = aCSD.PermWriteProtect();
+	iTmpWriteProtect = aCSD.TmpWriteProtect();
+	iFileFormat = aCSD.FileFormat();
+	iECC = aCSD.ECC();
+	iCRC = aCSD.CRC();
+	iDeviceSize = aCSD.DeviceSize();
+	iReadBlockLength = aCSD.ReadBlockLength();
+	iWriteBlockLength = aCSD.WriteBlockLength();
+	iEraseSectorSize = aCSD.EraseSectorSize();
+	iEraseGroupSize = aCSD.EraseGroupSize();
+	iMinReadCurrentInMilliamps = aCSD.MinReadCurrentInMilliamps();
+	iMinWriteCurrentInMilliamps = aCSD.MinWriteCurrentInMilliamps();
+	iMaxReadCurrentInMilliamps = aCSD.MaxReadCurrentInMilliamps();
+	iMaxWriteCurrentInMilliamps = aCSD.MaxWriteCurrentInMilliamps();
+	iMaxTranSpeedInKilohertz = aCSD.MaxTranSpeedInKilohertz();
+
+	// Convert Kernel side TMMCMediaTypeEnum to User side TMMCMediaTypeEnumInfo
+	switch (aCSD.MediaType())
+		{
+		case EMultiMediaROM:
+			iMediaType = EMultiMediaROM;
+			break;
+			
+		case EMultiMediaFlash:
+			iMediaType = EMultiMediaFlash;
+			break;
+		
+		case EMultiMediaIO:
+			iMediaType = EMultiMediaIO;
+			break;
+		
+		case EMultiMediaOther:
+			iMediaType = EMultiMediaOther;
+			break;
+		
+		default:
+			iMediaType = EMultiMediaNotSupported;
+			break;
+		}
+	}
+
+/**
+ * Convert kernel Extended CSD object to user side object
+ *
+ * @param const TExtendedCSD& aExtendedCSD - The Extended CSD object
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+TExtendedCSDInfo::TExtendedCSDInfo(const TExtendedCSD& aExtendedCSD)
+	{
+	iSupportedCmdSet = aExtendedCSD.SupportedCmdSet();
+	iSectorCount = aExtendedCSD.SectorCount();
+	iMinPerfWrite8Bit52Mhz = aExtendedCSD.MinPerfWrite8Bit52Mhz();
+	iMinPerfRead8Bit52Mhz = aExtendedCSD.MinPerfRead8Bit52Mhz();
+	iMinPerfWrite8Bit26Mhz_4Bit52Mhz = aExtendedCSD.MinPerfWrite8Bit26Mhz_4Bit52Mhz();
+	iMinPerfRead8Bit26Mhz_4Bit52Mhz = aExtendedCSD.MinPerfRead8Bit26Mhz_4Bit52Mhz();
+	iMinPerfWrite4Bit26Mhz = aExtendedCSD.MinPerfWrite4Bit26Mhz();
+	iMinPerfRead4Bit26Mhz = aExtendedCSD.MinPerfRead4Bit26Mhz();
+	iPowerClass26Mhz360V = aExtendedCSD.PowerClass26Mhz360V();
+	iPowerClass52Mhz360V = aExtendedCSD.PowerClass52Mhz360V();
+	iPowerClass26Mhz195V = aExtendedCSD.PowerClass26Mhz195V();
+	iPowerClass52Mhz195V = aExtendedCSD.PowerClass52Mhz195V();
+	iCardType = aExtendedCSD.CardType();
+	iCSDStructureVer = aExtendedCSD.CSDStructureVer();
+	iExtendedCSDRev = aExtendedCSD.ExtendedCSDRev();
+	iCmdSet = aExtendedCSD.CmdSet();
+	iCmdSetRev = aExtendedCSD.CmdSetRev();
+	iPowerClass = aExtendedCSD.PowerClass();
+	iHighSpeedTiming = aExtendedCSD.HighSpeedTiming();
+	}
+
+/**
+ * Create a formatted password from CID to write to Password Store
+ *
+ * @param TDes8 &aFormattedPassword - The buffer to hold the formatted password
+ * @param const TCID& aCID - The CID
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+TBool TStackPasswordStoreData::CreateFormattedPassword(TDes8 &aFormattedPassword, const TCID& aCID)
+	{
+	TBool success = EFalse;
+	if (aFormattedPassword.MaxLength() >= KMMCCIDLength)
+		{
+		aFormattedPassword.Zero();
+		aFormattedPassword.SetLength(KMMCCIDLength);
+		aCID.Copy(&aFormattedPassword[0]);
+		TUint8 lenBuf[sizeof(TInt32)];		// TInt32, big endian
+		TMMC::BigEndian4Bytes(lenBuf, TInt32(iPassword.Length()));
+		aFormattedPassword.Append(&lenBuf[0], sizeof(TInt32));
+		aFormattedPassword.Append(iPassword);
+		success = ETrue;
+		}
+	return success;
+	}
+
+/**
+ * Extract the password string from a formatted password
+ *
+ * @param TDes8 &aFormattedPassword - The formatted password
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+void TStackPasswordStoreData::SetFormattedPassword(const TDesC8 &aFormattedPassword)
+	{
+	iPassword.Copy(&aFormattedPassword[KPasswordStoreCIDLength], aFormattedPassword.Length()-KPasswordStoreCIDLength);
+	}
+
+#else
+
+#error compiling kernel side only src file on user side
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/ldd/src/d_mmcsdif.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,703 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <kernel.h>
+#include <mmc.h>
+#include <locmedia.h>
+
+#include "mmcldd.h"
+#include "d_mmcsdif.h"
+
+
+
+const TInt KMajorVersionNumber=1;
+const TInt KMinorVersionNumber=0;
+const TInt KBuildVersionNumber=0;
+
+// global Dfc Que
+TDynamicDfcQue* gDfcQ;
+
+
+
+DECLARE_STANDARD_LDD()
+	{
+	return new DLddFactoryMmcCntrlInterface;
+	}
+
+/**
+ * DLddFactoryMmcCntrlInterface constructor
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+DLddFactoryMmcCntrlInterface::DLddFactoryMmcCntrlInterface()
+	{
+    iParseMask=KDeviceAllowUnit;  // Pass stack number as unit
+	iUnitsMask=0xffffffff;
+	iVersion=TVersion(KMajorVersionNumber,KMinorVersionNumber,KBuildVersionNumber);
+	}
+
+/**
+ * Create logical channel
+ *
+ * @param DLogicalChannelBase*& aChannel - logical channel
+ *
+ * @return TInt the error code
+ *
+ * @leave N/A
+ */
+TInt DLddFactoryMmcCntrlInterface::Create(DLogicalChannelBase*& aChannel)
+	{
+	aChannel = new DLddMmcCntrlInterface;
+	return aChannel ? KErrNone : KErrNoMemory;
+	}
+
+const TInt KDMmcThreadPriority = 27;
+_LIT(KDMmcThread,"DMMCSDThread");
+
+
+/**
+ * Install driver
+ *
+ * @return TInt the error code
+ *
+ * @leave N/A
+ */
+TInt DLddFactoryMmcCntrlInterface::Install()
+	{
+	// Allocate a kernel thread to run the DFC
+	TInt r = Kern::DynamicDfcQCreate(gDfcQ, KDMmcThreadPriority, KDMmcThread);
+
+	if (r != KErrNone)
+		return r;
+	__KTRACE_OPT(KHARDWARE,MMCSDLOG("installing driver name from factory"));
+	return SetName(&KLddName);
+    }
+
+/**
+ * Get the Pc Card Contoller Interface ldd's version info
+ *
+ * @param TDes8 &aDes - Buffer to contain version info
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+void DLddFactoryMmcCntrlInterface::GetCaps(TDes8 &aDes) const
+	{
+    TCapsMmcIfV01 b;
+	b.version=TVersion(KMajorVersionNumber,KMinorVersionNumber,KBuildVersionNumber);
+	aDes.FillZ(aDes.MaxLength());
+	aDes.Copy((TUint8 *)&b,Min(aDes.MaxLength(),sizeof(b)));
+	}
+
+/**
+ * Destructor
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+DLddFactoryMmcCntrlInterface::~DLddFactoryMmcCntrlInterface()
+	{
+	if (gDfcQ)
+		gDfcQ->Destroy();
+	}
+
+/**
+ * DLddMmcCntrlInterface constructor
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+DLddMmcCntrlInterface::DLddMmcCntrlInterface()
+	{
+	iClient = &Kern::CurrentThread();
+	((DObject*)iClient)->Open();	// can't fail since thread is running
+    }
+
+/**
+ * Destructor
+ *
+ * @return N/A
+ *
+ * @leave	N/A
+ */
+DLddMmcCntrlInterface::~DLddMmcCntrlInterface()
+	{
+	Kern::SafeClose((DObject*&)iClient,NULL);
+	iAsyncList.ResetAndDestroy();
+    }
+
+/**
+ * Create driver ojects
+ *
+ * @param TInt aUnit - Socket ID
+ * @param const TDesC8* aInfo - Buffer for logging
+ * @param const TVersion& aVer - Current version
+ *
+ * @return TInt the error code
+ *
+ * @leave N/A
+ */
+TInt DLddMmcCntrlInterface::DoCreate(TInt aUnit, const TDesC8* aInfo, const TVersion& aVer)
+	{
+	if (!Kern::QueryVersionSupported(TVersion(KMajorVersionNumber,KMinorVersionNumber,KBuildVersionNumber),aVer))
+		return(KErrNotSupported);
+
+	MMCSDLOG2("DLddMmcCntrlInterface::DoCreate called aInfo(%S)", aInfo);
+
+	// create the socket - there is only a DMMCSocket
+	iSocket = static_cast<DMMCSocket*>(DPBusSocket::SocketFromId(aUnit));
+	if(!iSocket)
+		return(KErrNoMemory);
+
+	//Obtain the appropriate card from the stack
+	iStack = static_cast<DMMCStack*>(iSocket->Stack(KStackNo));
+	if(iStack == NULL)
+		return(KErrNoMemory);
+
+	//Obtain the appropriate card power supply
+	iPsu=static_cast<DMMCPsu*>(iSocket->iVcc);
+	if (iPsu==NULL)
+		return(KErrNoMemory);
+
+	//Obtain the appropriate card  Media change
+	iMediaChange=static_cast<DMMCMediaChange*>(iSocket->iMediaChange);
+	if (iMediaChange==NULL)
+		return(KErrNoMemory);
+
+	SetDfcQ(gDfcQ);
+	iMsgQ.Receive();
+
+	iUnit = aUnit;  // save the unit - needed for regitering callbacks for subsequent bus events
+
+    return(KErrNone);
+	}
+
+/**
+ * Request cancelled callback
+ *
+ * @param TInt sReqNo - Request Number
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+void DLddMmcCntrlInterface::DoCancel(TInt /*aReqNo*/)
+	{
+	}
+
+/**
+ * Handle kernel side message
+ *
+ * @param TMessageBase* aMsg - The kernel side message
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+void DLddMmcCntrlInterface::HandleMsg(TMessageBase* aMsg)
+    {
+    TThreadMessage& m=*(TThreadMessage*)aMsg;
+    TInt id=m.iValue;
+
+	if (id==(TInt)ECloseMsg)
+		{
+		m.Complete(KErrNone, EFalse);
+		return;
+		}
+    else if (id==KMaxTInt)
+		{
+		// DoCancel
+		m.Complete(KErrNone,ETrue);
+		return;
+		}
+
+    if (id<0)
+		{
+		// DoRequest
+		TRequestStatus* pS=(TRequestStatus*)m.Ptr0();
+		TInt r=DoRequest(~id, pS, m.Ptr1(), m.Ptr2());
+		if (r!=KErrNone)
+	    	Kern::RequestComplete(iClient, pS, r);
+		m.Complete(KErrNone,ETrue);
+		}
+    else
+		{
+		// DoControl
+		TInt r=DoControl(id,m.Ptr0(),m.Ptr1());
+		if(r != KErrCompletion)
+			{
+			m.Complete(r,ETrue);
+			}
+		}
+	}
+
+/**
+ * Do a kernel side request
+ *
+ * @param TInt aFunction - Request Function ID
+ * @param TRequestStatus* aStatus - Request Status
+ * @param TAny* a1 - Given parameter
+ * @param TAny* a2 - Given parameter
+ *
+ * @return TInt the error code
+ *
+ * @leave N/A
+ */
+TInt DLddMmcCntrlInterface::DoRequest(TInt aFunction, TRequestStatus* aStatus, TAny* a1, TAny *a2)
+	{
+
+	TTCFunctionId fid = TTCFunctionId(aFunction);
+	switch(fid.TestType())
+		{
+		case EMmcTestSocket:
+			return SocketDoRequest(aStatus, a1, a2, aFunction);
+
+		case EMmcTestStack:
+		case EMmcTestPsu:
+		case EMmcTestMediaChange:
+	  	case EMmcGeneralTest:
+		default:
+			break;
+		};
+
+    switch(fid.FunctionId())
+		{
+        case RMMCSDTestControllerInterface::EReadSector:
+            {
+            // read sector a1 is block number, a2 is client descriptor
+            // data will be written back to upon completion
+			MMCSDLOG3("RMMCSDTestControllerInterface::EReadSector a1(%d) a2(%x)", (TUint32)a1, a2);
+			if(!iCard)
+				{
+				MMCSDLOG("RMMCSDTestControllerInterface::EReadSector NULL card\n");
+				return KErrNotReady;
+				}
+
+			DMmcSessionAsyncRequest* request = CreateAsyncSessionRequest(EMmcSesReadBlk, aStatus);
+
+			TUint32 srcAddr=((TUint32)a1)<<KSectorSizeShift;
+			TUint readBlLen = 1 << iCard->MaxReadBlLen();
+			TUint readBlMask=(readBlLen-1);
+			request->iBlkOffet=srcAddr-(srcAddr&(~readBlMask));
+			request->iClientDesPtr = a2;
+			srcAddr &= (~readBlMask);
+
+			MMCSDLOG("RMMCSDTestControllerInterface::EReadSector #2");
+			TMMCArgument da(srcAddr);
+
+			request->Session().SetupCIMReadBlock(da,readBlLen,&(request->iBuf[0]));
+			request->Session().Engage();
+
+			MMCSDLOG("RMMCSDTestControllerInterface::EReadSector #3");
+			break;
+            }
+        case RMMCSDTestControllerInterface::EWriteSector:
+            {
+			MMCSDLOG3("RMMCSDTestControllerInterface::EWriteSector a1(%d) a2(%x) #1", (TUint32)a1, a2);
+			if(!iCard)
+				{
+				MMCSDLOG("RMMCSDTestControllerInterface::EWriteSector NULL card\n");
+				return KErrNotReady;
+				}
+
+			TUint32 destAddr=((TUint32)a1)<<KSectorSizeShift;
+			TUint writeBlLen=1 << iCard->MaxWriteBlLen();
+			
+			DMmcSessionAsyncRequest* request = CreateAsyncSessionRequest(EMmcSesWriteBlk, aStatus);
+			
+			TUint writeBlMask=(writeBlLen-1);
+			request->iBlkOffet=destAddr-(destAddr&(~writeBlMask));
+			TPtr8* srcDes = (TPtr8*)a2;
+			TPtr8 ptr(&(request->iBuf[request->iBlkOffet]),KSectorSizeInBytes,KSectorSizeInBytes);
+			TInt r = Kern::ThreadDesRead(iClient, srcDes, ptr, 0, KChunkShiftBy0);
+			if(r != KErrNone)
+				{
+				return(r);
+				}
+
+			destAddr&=(~writeBlMask);
+			request->Session().SetupCIMWriteBlock(TMMCArgument(destAddr),writeBlLen,&(request->iBuf[0]));
+			request->Session().Engage();
+
+			MMCSDLOG("RMMCSDTestControllerInterface::EWriteSector #4");
+			break;
+			}
+        }
+	return(KErrNone);
+	}
+
+/**
+ * Do a kernel side control
+ *
+ * @param TInt aFunction - Request Function ID
+ * @param TAny* a1 - Given parameter
+ * @param TAny* a2 - Given parameter
+ *
+ * @return TInt the error code
+ *
+ * @leave N/A
+ */
+TInt DLddMmcCntrlInterface::DoControl(TInt aFunction,TAny* a1,TAny* a2)
+	{
+	TInt r = KErrNotSupported;
+	TTCFunctionId fid = TTCFunctionId(aFunction);
+	MMCSDLOG4("DLddMmcCntrlInterface::DoControl aFunction(%d) \
+			fid.FunctionId()(%d) fid.TestType(%d)"
+			, aFunction, fid.FunctionId(), fid.TestType());
+
+	switch(fid.TestType())
+		{
+		case EMmcTestStack:
+			return StackDoControl(aFunction, a1, a2);
+		case EMmcTestSocket:
+			return SocketDoControl(aFunction, a1, a2);
+      	case EMmcTestPsu:
+			return PsuDoControl(aFunction, a1, a2);
+		case EMmcTestMediaChange:
+			return MediaChangeDoControl(aFunction, a1, a2);
+		case EMmcGeneralTest:
+		default:
+			break;
+		};
+
+	switch (fid.FunctionId())
+		{
+      	case RMMCSDTestControllerInterface::EReadCSD:
+      		{
+			iCSD = iCard->CSD();
+				{				
+				TCSDInfo csdInfo(iCSD);
+	    		r = Kern::ThreadRawWrite(iClient, a1, &csdInfo, sizeof(csdInfo));
+				}
+      		}
+	  		break;
+	  		  		
+      	case RMMCSDTestControllerInterface::EReadExtCSD:
+      		{
+			iExtendedCSD = iCard->ExtendedCSD();
+			TExtendedCSDInfo extendedCSDInfo(iExtendedCSD);
+    		r = Kern::ThreadRawWrite(iClient, a1, &extendedCSDInfo, sizeof(extendedCSDInfo));
+      		}
+	  		break;
+	  		
+		case RMMCSDTestControllerInterface::ECardInfo:
+			{
+			TMMCCardInfo cardInfo;
+			cardInfo.SetCardInfo(*iCard);
+			r = Kern::ThreadRawWrite(iClient, a1, &cardInfo, sizeof(cardInfo));
+			}
+			break;
+			
+		case RMMCSDTestControllerInterface::ECard:
+      		{
+			r = Kern::ThreadRawWrite(iClient, a1, &iCard, sizeof(iCard));
+      		}
+	  		break;
+		  		
+		case RMMCSDTestControllerInterface::ECardIsPresent:
+			{
+			TBool isPresent = iCard->IsPresent();
+			r = Kern::ThreadRawWrite(iClient, a1, &isPresent, sizeof(isPresent));
+			}
+			break;
+		  		
+		case RMMCSDTestControllerInterface::ECardIsReady:
+			{
+			TBool isReady = iCard->IsReady();
+			r = Kern::ThreadRawWrite(iClient, a1, &isReady, sizeof(isReady));
+			}
+			break;
+		  		
+		case RMMCSDTestControllerInterface::ECardIsLocked:
+			{
+			TBool isLocked = iCard->IsLocked();
+			r = Kern::ThreadRawWrite(iClient, a1, &isLocked, sizeof(isLocked));
+			}
+			break;
+		  		
+       default:
+        	{
+        	MMCSDLOG2("DLddMmcCntrlInterface::DoControl - Invalid FunctionId()(%d)", fid.FunctionId());        	
+        	}
+			break;
+		}
+		
+		
+	return (r);
+	}
+
+/**
+ * Check if a request status exists
+ *
+ * @param TRequestStatus* aStatus - Request Status
+ *
+ * @return TBool A request status exists
+ *
+ * @leave N/A
+ */
+TBool DLddMmcCntrlInterface::RequestStatusExists(TRequestStatus* aStatus)
+	{
+
+	// check whether this request status already exists in the async request list
+	for(int i=0;i<iAsyncList.Count();i++)
+		{
+		MMCSDLOG3("Checking index(%d) iAsyncList[i]->Status(%x)", i, iAsyncList[i]->Status());
+
+		if(iAsyncList[i]->Status() == aStatus)
+			{
+			MMCSDLOG3("WaRNING - adding duplicate TRequestStatus index[%d] aStatus(%x)", i, aStatus);
+			return ETrue;
+			}
+		}
+
+	return EFalse;
+	}
+
+/**
+ * Create Asynchronous Session Request
+ *
+ * @param TMmcAsyncCmd aFunctionId - Request Function ID
+ * @param TRequestStatus* aStatus - Request Status
+ *
+ * @return DMmcSessionAsyncRequest* Poniter to the created session request object
+ *
+ * @leave N/A
+ */
+DMmcSessionAsyncRequest* DLddMmcCntrlInterface::CreateAsyncSessionRequest(TMmcAsyncCmd aFunctionId, TRequestStatus* aStatus)
+	{
+
+	MMCSDLOG3("DLddMmcCntrlInterface::CreateAsyncRequest aStatus(%x) num requests in list (%d)",
+			aStatus, iAsyncList.Count());
+	
+	// create an async request & append to async request list	
+	DMmcSessionAsyncRequest* request = new  DMmcSessionAsyncRequest(aFunctionId, aStatus, *this, gDfcQ, *iStack, *iCard);	
+	iAsyncList.Append(request);		
+	MMCSDLOG4("DLddMmcCntrlInterface::CreateAsyncSessionRequest created OK Status(%x) functionID(%d) aFunctionId(%d)",
+			request->Status(), request->FunctionId(), aFunctionId);
+	return request;
+	}
+
+/**
+ * Create Asynchronous Bus Event Request
+ *
+ * @param TMmcAsyncCmd aFunctionId - Request Function ID
+ * @param TRequestStatus* aStatus - Request Status
+ * @param TInt aUnit - Socket ID
+ *
+ * @return DBusEventRequest* Poniter to the created bus event request object
+ *
+ * @leave N/A
+ */
+DBusEventRequest* DLddMmcCntrlInterface::CreateAsyncBusEventRequest(TMmcAsyncCmd aFunctionId, TRequestStatus* aStatus, TInt aUnit)
+	{
+	MMCSDLOG3("DLddMmcCntrlInterface::CreateAsyncBusEventRequest aStatus(%x) num requests in list (%d)",
+			aStatus, iAsyncList.Count());
+	
+	MMCSDLOG4("gDfcQ(%x), iStack(%x), iCard(%x)", gDfcQ, iStack, iCard);
+
+	// create an async request & append toS async request list
+	DBusEventRequest* request = new  DBusEventRequest(aFunctionId, aStatus, *this, aUnit, gDfcQ, *iStack, *iCard);
+	iAsyncList.Append(request);
+	MMCSDLOG4("DLddMmcCntrlInterface::CreateAsyncBusEventRequest created OK Status(%x) functionID(%d) aFunctionId(%d)",
+			request->Status(), request->FunctionId(), aFunctionId);
+	return request;
+
+	}
+
+/**
+ * Clears an asynchronous Request from list
+ *
+ * @param DLddAsyncRequest* aRequest - Pointer to the request
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+void DLddMmcCntrlInterface::ClearRequest(DLddAsyncRequest* aRequest)
+	{
+	if(!aRequest)
+		{
+		MMCSDLOG("ERROR IN DLddMmcCntrlInterface::ClearRequest NULL request");
+		return;
+		}
+
+	TInt i = iAsyncList.Find(aRequest);
+	if(i >= 0)
+		{
+		iAsyncList.Remove(i);
+		}
+	else
+		{
+		MMCSDLOG2("ERROR IN DLddMmcCntrlInterface::ClearRequest err(%d)", i);
+		}
+
+	delete aRequest;
+
+	}
+
+/**
+ * Callback when request has completed
+ *
+ * @param DLddAsyncRequest& aRequest - The completed request
+ *
+ * @return N/A
+ *
+ * @leave N/A
+ */
+void DLddMmcCntrlInterface::Notify(DLddAsyncRequest& aRequest)  // callback from DLddAsyncRequest
+	{
+	MMCSDLOG("DLddMmcCntrlInterface::Notify called");
+	TRequestStatus* status =  aRequest.Status();
+	switch (aRequest.FunctionId())
+		{
+		case DLddMmcCntrlInterface::EMmcSesReadBlk:
+			{
+			DMmcSessionAsyncRequest& request = (DMmcSessionAsyncRequest&) aRequest;
+			MMCSDLOG("DLddMmcCntrlInterface::ReadBlockComplete");
+			TInt r = KErrNone;
+			if (request.iClientDesPtr) // have we supplied descriptor to hold returned data
+				{
+				TPtr8 ptr(&(request.iBuf[request.iBlkOffet]), KSectorSizeInBytes, KSectorSizeInBytes);
+				TPtrC8* srcDes = (TPtrC8*)request.iClientDesPtr;
+				r = Kern::ThreadDesWrite(iClient, srcDes, ptr, 0, iClient);
+				if(r != KErrNone)
+					{
+					MMCSDLOG2("ERROR DLddMmcCntrlInterface::ReadBlockComplete Kern::ThreadDesWrite returned r(%d)", r);
+					}
+				}
+			else
+				{
+				MMCSDLOG("ERROR DLddMmcCntrlInterface::ReadExtCSDComplete - No pointer provided to hold returned data");
+				Kern::PanicCurrentThread(_L("PBUS-MMC"), 0);				
+				}
+			Kern::RequestComplete(iClient, status, (r == KErrNone) ? aRequest.Error() : r);
+			}
+			break;
+
+		case DLddMmcCntrlInterface::EMmcSesWriteBlk:
+			{
+			MMCSDLOG("DLddMmcCntrlInterface::WriteBlockComplete)");
+			TRequestStatus* status =  aRequest.Status();
+			Kern::RequestComplete(iClient, status, aRequest.Error());
+			}
+			break;
+
+		case DLddMmcCntrlInterface::EMmcSesReadCSD:
+			{
+			DMmcSessionAsyncRequest& request = (DMmcSessionAsyncRequest&) aRequest;
+			MMCSDLOG("DLddMmcCntrlInterface::ReadCSDComplete");
+			TInt r = KErrNone;
+			if (request.iClientDesPtr) // have we supplied pointer to hold returned data
+				{
+					{
+					TCSDInfo csdInfo(iCSD);
+		    		r = Kern::ThreadRawWrite(iClient, request.iClientDesPtr, &csdInfo, sizeof(csdInfo));
+					}
+				if(r != KErrNone)
+					{
+					MMCSDLOG2("ERROR DLddMmcCntrlInterface::ReadCSDComplete Kern::ThreadRawWrite returned r(%d)", r);
+					}
+				}
+			else
+				{
+				MMCSDLOG("ERROR DLddMmcCntrlInterface::ReadExtCSDComplete - No pointer provided to hold returned data");
+				Kern::PanicCurrentThread(_L("PBUS-MMC"), 0);				
+				}
+			Kern::RequestComplete(iClient, status, (r == KErrNone) ? aRequest.Error() : r);
+			}
+			break;
+
+		case DLddMmcCntrlInterface::EMmcSesReadExtCSD:
+			{
+			DMmcSessionAsyncRequest& request = (DMmcSessionAsyncRequest&) aRequest;
+			MMCSDLOG("DLddMmcCntrlInterface::ReadExtCSDComplete");
+			TInt r = KErrNone;
+			if (request.iClientDesPtr) // have we supplied pointer to hold returned data
+				{
+				TExtendedCSDInfo extendedCSDInfo(iExtendedCSD);
+	    		r = Kern::ThreadRawWrite(iClient, request.iClientDesPtr, &extendedCSDInfo, sizeof(extendedCSDInfo));
+				if(r != KErrNone)
+					{
+					MMCSDLOG2("ERROR DLddMmcCntrlInterface::ReadExtCSDComplete Kern::ThreadRawWrite returned r(%d)", r);
+					}
+				}
+			else
+				{
+				MMCSDLOG("ERROR DLddMmcCntrlInterface::ReadExtCSDComplete - No pointer provided to hold returned data");
+				Kern::PanicCurrentThread(_L("PBUS-MMC"), 0);				
+				}
+			Kern::RequestComplete(iClient, status, (r == KErrNone) ? aRequest.Error() : r);
+			}
+			break;
+			
+		case DLddMmcCntrlInterface::EMMcSocketPowerUp:
+			{
+			DBusEventRequest& request = (DBusEventRequest&) aRequest;
+			TInt retCode = KErrNone;
+			
+			MMCSDLOG2("DLddMmcCntrlInterface::EMMcSocketPowerUp ret code = %d", aRequest.Error());
+			MMCSDLOG2("DLddMmcCntrlInterface::EMMcSocketPowerUp request.BusState() = %d", request.BusState());
+			MMCSDLOG2("DLddMmcCntrlInterface::EMMcSocketPowerUp request.BusError() = %d", request.BusError());
+			
+			switch(aRequest.Error())
+				{
+				case TPBusCallBack::EPBusStateChange:
+					{
+					TPBusState newState = request.BusState();
+					retCode = request.BusError();
+
+					if (retCode == KErrNone)
+						{
+						switch(newState)
+							{
+							case EPBusCardAbsent:	retCode = KErrNotFound;		break;			
+							case EPBusPsuFault:		retCode = KErrBadPower;		break;
+							case EPBusOff:
+							case EPBusOn:
+							case EPBusPowerUpPending:
+							case EPBusPoweringUp:
+							default:	
+								break;
+							}
+						}
+
+					break;
+					}
+				}
+			
+	   		Kern::RequestComplete(iClient, status, retCode);
+			}
+			break;
+
+		default:
+			MMCSDLOG("#######################################################################");
+			MMCSDLOG("## UNHANDLED END DFC DLddAsyncRequest DLddMmcCntrlInterface::Notify  ##");
+			MMCSDLOG2("## aRequest.FunctionId(%d)  ##", aRequest.FunctionId());
+			MMCSDLOG("#######################################################################");
+			Kern::PanicCurrentThread(_L("PBUS-MMC"), 0);
+			break;
+		};
+
+	ClearRequest(&aRequest);
+
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/ldd/src/mmclddmediachange.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include <kernel.h>
+#include <mmc.h>
+#include <locmedia.h>
+
+#include "mmcldd.h"
+#include "d_mmcsdif.h"
+
+/**
+ * Do a kernel side control for DMMCMediChange
+ *
+ * @param TInt aFunction - Request Function ID
+ * @param TAny* a1 - Given parameter
+ * @param TAny* a2 - Given parameter
+ *
+ * @return TInt the error code
+ *
+ * @leave N/A
+ */
+TInt DLddMmcCntrlInterface::MediaChangeDoControl(TInt aFunction, TAny* a1, TAny* a2)
+	{
+	MMCSDLOG("<--MediaChangeDoControl-->");
+	TInt r = KErrNone;
+	
+	if (!iSocket)
+		{
+  		MMCSDLOG("DLddMmcCntrlInterface::MediaChangeDoControl - iSocket is NULL");		
+		return KErrGeneral;
+		}
+	else if (!iClient)
+		{
+  		MMCSDLOG("DLddMmcCntrlInterface::MediaChangeDoControl - iClient is NULL");		
+		return KErrGeneral;
+		}
+
+	switch(TTCFunctionId(aFunction).FunctionId())
+		{
+      	case RMMCSDTestControllerInterface::EMediaChange:
+      		{
+			r = Kern::ThreadRawWrite(iClient, a1, &iMediaChange, sizeof(iMediaChange));
+      		}
+	  		break;
+
+		case RMMCSDTestControllerInterface::EMediaStateInfo:
+	     	{
+			TMediaState doorState;
+			doorState = iMediaChange->MediaState();
+			MMCSDLOG2("EMediaStateInfo : %d",doorState);
+			r = Kern::ThreadRawWrite(iClient, a1, &doorState, sizeof(TMediaState));
+			break;
+	       	}
+		case RMMCSDTestControllerInterface::EForceMediaChange:
+        	{
+			iMediaChange->ForceMediaChange();
+			MMCSDLOG("Force MediaChange");
+        	break;
+			}
+		case RMMCSDTestControllerInterface::EMediaChangeCounter:
+        	{
+    		r = Kern::ThreadRawWrite(iClient, a1, &iMediaChange->iReplyCount, sizeof(iMediaChange->iReplyCount));
+    		MMCSDLOG2("EMediaChangeCounter : %d",&iMediaChange->iReplyCount);
+        	break;
+			}
+		default:
+			r = KErrNotFound;
+			break;
+
+		}
+	return(r);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/ldd/src/mmclddpsu.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,330 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include <kernel.h>
+#include <mmc.h>
+#include <locmedia.h>
+
+#include "mmcldd.h"
+#include "d_mmcsdif.h"
+
+/**
+ * Do a kernel side control for DMMCPsu
+ *
+ * @param TInt aFunction - Request Function ID
+ * @param TAny* a1 - Given parameter
+ * @param TAny* a2 - Given parameter
+ *
+ * @return TInt the error code
+ *
+ * @leave N/A
+ */
+TInt DLddMmcCntrlInterface::PsuDoControl(TInt aFunction, TAny* a1, TAny* a2)
+	{
+	MMCSDLOG("<--PsuDoControl-->");
+	TInt r = KErrNone;
+	
+	if (!iPsu)
+		{
+  		MMCSDLOG("DLddMmcCntrlInterface::PsuDoControl - iPsu is NULL");		
+		return KErrGeneral;
+		}
+	else if (!iClient)
+		{
+  		MMCSDLOG("DLddMmcCntrlInterface::PsuDoControl - iClient is NULL");		
+		return KErrGeneral;
+		}
+
+	switch(TTCFunctionId(aFunction).FunctionId())
+		{
+		case RMMCSDTestControllerInterface::EPsu:
+      		{
+			r = Kern::ThreadRawWrite(iClient, a1, &iPsu, sizeof(iPsu));
+      		}
+	  		break;
+		case RMMCSDTestControllerInterface::EPsuInfo:
+	    	{
+			TPBusPsuInfo psuInfo;
+			MMCSDLOG("<--PsuInfo-->");
+			iPsu->PsuInfo(psuInfo);
+			r = Kern::ThreadRawWrite(iClient, a1, &psuInfo, sizeof(TPBusPsuInfo));
+	     	break;
+			}
+        case RMMCSDTestControllerInterface::EPsuState:
+			 {
+			if(iPsu != NULL)
+				{
+				TPBusPsuState aState;
+				aState = (TPBusPsuState&)a1;
+				r= iPsu->SetState(aState);
+				MMCSDLOG2("EPsuState :%d", aState);
+				}
+			else
+				{
+				r= KErrGeneral;
+				}
+			break;
+            }
+        case RMMCSDTestControllerInterface::EPsuVoltage:
+			{
+			if(iPsu != NULL)
+				{
+				TUint32 aVoltOpRange;
+				aVoltOpRange = (TUint32)a1;
+				iPsu->SetVoltage(aVoltOpRange);
+				MMCSDLOG2("EPsuVoltage :0x%x", aVoltOpRange);
+				}
+			else
+				{
+				r= KErrGeneral;
+				}
+			break;
+            }
+        case RMMCSDTestControllerInterface::EPsuNum:
+			{
+			if(iPsu != NULL)
+				{
+				r = Kern::ThreadRawWrite(iClient, a1, &iPsu->iPsuNum, sizeof(TInt));
+				MMCSDLOG2("EPsuNum :%d", &iPsu->iPsuNum);
+				}
+			else
+				{
+				r= KErrGeneral;
+				}
+			break;
+            }
+        case RMMCSDTestControllerInterface::EMediaChangeNum:
+			{
+			if(iPsu != NULL)
+				{
+				r = Kern::ThreadRawWrite(iClient, a1, &iPsu->iMediaChangeNum, sizeof(TInt));
+				MMCSDLOG2("EMediaChangeNum :%d", &iPsu->iMediaChangeNum);
+				}
+			else
+				{
+				r= KErrGeneral;
+				}
+			break;
+            }
+        case RMMCSDTestControllerInterface::EPsuCurLimit:
+			{
+			if(iPsu != NULL)
+				{
+				r = Kern::ThreadRawWrite(iClient, a1, &iPsu->iCurrLimited, sizeof(TBool));
+				MMCSDLOG2("EPsuCurLimit :%d", &iPsu->iCurrLimited);
+				}
+			else
+				{
+				r= KErrGeneral;
+				}
+			break;
+            }
+	    case RMMCSDTestControllerInterface::EPbusState:
+		 	{
+			if (iSocket)
+				{
+				r = Kern::ThreadRawWrite(iClient, a1, &iSocket->iState, sizeof(TInt));
+				MMCSDLOG2("EPbusState :%d", &iSocket->iState);
+				}
+			else
+				{
+		  		MMCSDLOG("RMMCSDTestControllerInterface::EPbusState - iSocket is NULL");		
+				r = KErrGeneral;
+				}
+			break;
+           	}
+	    case RMMCSDTestControllerInterface::EVccState:
+	        {
+    	    if(iPsu)
+        		{
+           	    r = Kern::ThreadRawWrite(iClient, a1, &iPsu->iState,sizeof(TInt));
+           	    MMCSDLOG2("EVccState :%d", &iPsu->iState);
+            	}
+            else
+            	{
+            	r=KErrGeneral;
+            	}
+            break;
+            }
+		case RMMCSDTestControllerInterface::EIsLocked:
+	        {
+    	    if(iPsu)
+        		{
+				TBool lock =iPsu->IsLocked();
+           	    r = Kern::ThreadRawWrite(iClient, a1, &lock,sizeof(TBool));
+           	    MMCSDLOG2("EIsLocked :%d", lock);
+            	}
+            else
+            	{
+            	r=KErrGeneral;
+            	}
+            break;
+            }
+		case RMMCSDTestControllerInterface::EIsOff:
+	        {
+    	    if(iPsu)
+        		{
+				TBool isoff =iPsu->IsOff();
+           	    r = Kern::ThreadRawWrite(iClient, a1, &isoff,sizeof(TBool));
+           	    MMCSDLOG2("EIsOff :%d", isoff);
+            	}
+            else
+            	{
+            	r=KErrGeneral;
+            	}
+            break;
+            }
+		case RMMCSDTestControllerInterface::EMaxCurrentInMicroAmps:
+	        {
+    	    if(iPsu)
+        		{
+				TInt current =iPsu->MaxCurrentInMicroAmps();
+           	    r = Kern::ThreadRawWrite(iClient, a1, &current,sizeof(TInt));
+           	    MMCSDLOG2("EMaxCurrentInMicroAmps :%d", current);
+            	}
+            else
+            	{
+            	r=KErrGeneral;
+            	}
+            break;
+            }
+		case RMMCSDTestControllerInterface::EResetInactivityTimer:
+	        {
+    	    if(iPsu)
+        		{
+				iPsu->ResetInactivityTimer();
+           	    MMCSDLOG("EResetInactivityTimer");
+            	}
+            else
+            	{
+            	r=KErrGeneral;
+            	}
+            break;
+            }
+		case RMMCSDTestControllerInterface::EVoltageSupported:
+	        {
+    	    if(iPsu)
+        		{
+				TUint vol =iPsu->VoltageSupported();
+           	    r = Kern::ThreadRawWrite(iClient, a1, &vol,sizeof(TUint));
+           	    MMCSDLOG2("EVoltageSupported :0x%x", vol);
+            	}
+            else
+            	{
+            	r=KErrGeneral;
+            	}
+            break;
+            }
+		case RMMCSDTestControllerInterface::EMemInactivityCount:
+	        {
+    	    if(iPsu)
+        		{
+           	    r = Kern::ThreadRawWrite(iClient, a1, &iPsu->iInactivityCount,sizeof(&iPsu->iInactivityCount));
+           	   MMCSDLOG2("EMemInactivityCount :%d", &iPsu->iInactivityCount);
+            	}
+            else
+            	{
+            	r=KErrGeneral;
+            	}
+            break;
+            }
+		case RMMCSDTestControllerInterface::EMemNotLockedCount:
+	        {
+    	    if(iPsu)
+        		{
+           	    r = Kern::ThreadRawWrite(iClient, a1, &iPsu->iNotLockedCount,sizeof(&iPsu->iNotLockedCount));
+           	    MMCSDLOG2("EMemNotLockedCount :%d", &iPsu->iNotLockedCount);
+            	}
+            else
+            	{
+            	r=KErrGeneral;
+            	}
+            break;
+            }
+		case RMMCSDTestControllerInterface::EMemInactivityTimeout:
+	        {
+    	    if(iPsu)
+        		{
+           	    r = Kern::ThreadRawWrite(iClient, a1, &iPsu->iInactivityTimeout,sizeof(&iPsu->iInactivityTimeout));
+           	    MMCSDLOG2("EMemInactivityTimeout :%d", &iPsu->iInactivityTimeout);
+            	}
+            else
+            	{
+            	r=KErrGeneral;
+            	}
+            break;
+            }
+		case RMMCSDTestControllerInterface::EMemNotLockedTimeout:
+	        {
+    	    if(iPsu && iClient)
+        		{
+           	    r = Kern::ThreadRawWrite(iClient, a1, &iPsu->iNotLockedTimeout,sizeof(&iPsu->iNotLockedTimeout));
+           	    MMCSDLOG2("EMemNotLockedTimeout :%d", &iPsu->iNotLockedTimeout);
+            	}
+            else
+            	{
+            	r=KErrGeneral;
+            	}
+            break;
+            }
+		case RMMCSDTestControllerInterface::EMemVoltageSupported:
+	        {
+    	    if(iPsu && iClient)
+        		{
+           	    r = Kern::ThreadRawWrite(iClient, a1, &iPsu->iVoltageSupported,sizeof(&iPsu->iVoltageSupported));
+           	    MMCSDLOG2("EMemVoltageSupported :%d", &iPsu->iVoltageSupported);
+            	}
+            else
+            	{
+            	r=KErrGeneral;
+            	}
+            break;
+            }
+		case RMMCSDTestControllerInterface::EMemMaxCurrentInMicroAmps:
+	        {
+    	    if(iPsu && iClient)
+        		{
+           	    r = Kern::ThreadRawWrite(iClient, a1, &iPsu->iMaxCurrentInMicroAmps,sizeof(&iPsu->iMaxCurrentInMicroAmps));
+           	    MMCSDLOG2("EMemMaxCurrentInMicroAmps :%d", &iPsu->iMaxCurrentInMicroAmps);
+            	}
+            else
+            	{
+            	r=KErrGeneral;
+            	}
+            break;
+            }
+		case RMMCSDTestControllerInterface::EMemVoltCheckInterval:
+	        {
+    	    if(iPsu && iClient)
+        		{
+           	    r = Kern::ThreadRawWrite(iClient, a1, &iPsu->iVoltCheckInterval,sizeof(&iPsu->iVoltCheckInterval));
+           	    MMCSDLOG2("EMemVoltCheckInterval :%d", &iPsu->iVoltCheckInterval);
+            	}
+            else
+            	{
+            	r=KErrGeneral;
+            	}
+            break;
+            }
+		default:
+			r = KErrNotFound;
+			break;
+
+		}
+	return (r);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/ldd/src/mmclddsocket.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,281 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include <kernel.h>
+#include <mmc.h>
+#include <locmedia.h>
+
+#include "mmcldd.h"
+#include "d_mmcsdif.h"
+
+/**
+ * Do a kernel side control for DMMCSocket
+ *
+ * @param TInt aFunction - Request Function ID
+ * @param TAny* a1 - Given parameter
+ * @param TAny* a2 - Given parameter
+ *
+ * @return TInt the error code
+ *
+ * @leave N/A
+ */
+TInt DLddMmcCntrlInterface::SocketDoControl(TInt aFunction, TAny* a1, TAny* a2)
+	{
+	TInt ret=KErrNone;
+	
+	if (!iSocket)
+		{
+  		MMCSDLOG("DLddMmcCntrlInterface::SocketDoControl - iSocket is NULL");		
+		return KErrGeneral;
+		}
+	else if (!iClient)
+		{
+  		MMCSDLOG("DLddMmcCntrlInterface::SocketDoControl - iClient is NULL");		
+		return KErrGeneral;
+		}
+
+	switch (TTCFunctionId(aFunction).FunctionId())
+		{
+      	case RMMCSDTestControllerInterface::ESocket:
+      		{
+	  		MMCSDLOG("Calling RMMCSDTestControllerInterface::ESocket");
+			ret = Kern::ThreadRawWrite(iClient, a1, &iSocket, sizeof(iSocket)); 		
+      		}
+	  		break;
+	  		
+      	case RMMCSDTestControllerInterface::ESocketAdjustPartialRead:
+      		{      		
+      		TPartialReadData partialReadData;
+    		ret = Kern::ThreadRawRead(iClient, a1, &partialReadData, sizeof(partialReadData));	
+			if( ret == KErrNone )
+				{    				    			    		
+		  		MMCSDLOG("Calling RMMCSDTestControllerInterface::ESocketAdjustPartialRead");
+	      		MMCSDLOG3("start=%d, end=%d", partialReadData.iStart, partialReadData.iEnd);
+		  		MMCSDLOG2("cardPtr=%x", iCard);
+	    		iSocket->AdjustPartialRead(iCard, partialReadData.iStart, partialReadData.iEnd
+	    									, (TUint32*)&(partialReadData.iPhysStart)
+	    									, (TUint32*)&(partialReadData.iPhysEnd));
+	    		ret = Kern::ThreadRawWrite(iClient, a1, &partialReadData, sizeof(partialReadData));
+				}
+      		}
+      		break;
+      	
+      	case RMMCSDTestControllerInterface::ESocketCardIsPresent:
+      		{      		
+	  		MMCSDLOG("Calling RMMCSDTestControllerInterface::ESocketCardIsPresent");
+    		TBool cardPresent = iSocket->CardIsPresent();	    		
+    		ret = Kern::ThreadRawWrite(iClient, a1, &cardPresent, sizeof(cardPresent));
+      		}
+      		break;
+      		
+      	case RMMCSDTestControllerInterface::ESocketGetBufferInfo:
+      		{	
+			TBufferInfo bufInfo;
+	  		MMCSDLOG("Calling RMMCSDTestControllerInterface::ESocketGetBufferInfo");
+	  		iSocket->GetBufferInfo(&bufInfo.iBuf, &bufInfo.iBufLen);
+			ret = Kern::ThreadRawWrite(iClient, a1, &bufInfo, sizeof(bufInfo));
+      		}
+      		break;
+
+	  	case RMMCSDTestControllerInterface::ESocketInit:
+	  		{
+	  		MMCSDLOG("Calling RMMCSDTestControllerInterface::ESocketInit");
+	  		ret = iSocket->Init();
+	  		}
+	  		break;
+	  		
+	  	case RMMCSDTestControllerInterface::ESocketInitiatePowerUpSequence:
+	  		{
+	  		MMCSDLOG("Calling RMMCSDTestControllerInterface::ESocketInitiatePowerUpSequence");
+	  		iSocket->InitiatePowerUpSequence();
+	  		}
+	  		break;
+  		
+      	case RMMCSDTestControllerInterface::ESocketMachineInfo:
+      		{
+	  		MMCSDLOG("Calling RMMCSDTestControllerInterface::ESocketMachineInfo");
+      		TMachineInfo machineInfo(iSocket->MachineInfo());
+      		ret = Kern::ThreadRawWrite(iClient, a1, &machineInfo, sizeof(machineInfo));	
+      		}
+  			break;	  		
+
+      	case RMMCSDTestControllerInterface::ESocketPrepareStore:
+      		{	
+      		TPasswordPrepareStoreData pwdData;     		
+      		ret = Kern::ThreadRawRead(iClient, a1, &pwdData, sizeof(pwdData));	 
+			if( ret == KErrNone )
+				{
+		  		MMCSDLOG("Calling RMMCSDTestControllerInterface::ESocketPrepareStore");
+	      		MMCSDLOG5("bus=%d, func=%d, newPassword=%S, oldPassword=%S"
+	      				, pwdData.iBus, pwdData.iFunc, &pwdData.iNewPassword, &pwdData.iOldPassword);      		
+	      		TLocalDrivePasswordData ld;
+	      		if( pwdData.iNewPassword == _L("NULL") )
+	      			{
+		      		ld.iNewPasswd = NULL;
+			  		MMCSDLOG("Using iNewPasswd=NULL");
+	      			}
+	      		else
+	      			{
+	      			ld.iNewPasswd = &pwdData.iNewPassword;
+	      			}
+	      		if( pwdData.iOldPassword == _L("NULL") )
+	      			{
+		      		ld.iOldPasswd = NULL;
+			  		MMCSDLOG("Using iOldPasswd=NULL");
+	      			}
+	      		else
+	      			{
+	      			ld.iOldPasswd = &pwdData.iOldPassword;
+	      			}
+	      		ret = iSocket->PrepareStore(pwdData.iBus, pwdData.iFunc, ld);     
+				}
+      		}
+      		break;
+
+      	case RMMCSDTestControllerInterface::ESocketReset1:
+      		{
+  			MMCSDLOG("Calling RMMCSDTestControllerInterface::ESocketReset1");
+			iSocket->Reset1();
+      		}
+	  		break;
+	  		
+	  	case RMMCSDTestControllerInterface::ESocketReset2:
+	  		{
+	  		MMCSDLOG("Calling RMMCSDTestControllerInterface::ESocketReset2");
+	  		iSocket->Reset2();
+	  		}
+	  		break;
+	  		
+	  	case RMMCSDTestControllerInterface::ESocketResetInactivity:
+	  		{
+	  		TInt busNumber;
+     		ret = Kern::ThreadRawRead(iClient, a1, &busNumber, sizeof(busNumber));     		
+			if( ret == KErrNone )
+				{
+		  		MMCSDLOG("Calling RMMCSDTestControllerInterface::ESocketResetInactivity");
+		  		MMCSDLOG2("busNumber=%d", busNumber);
+	     		iSocket->ResetInactivity(busNumber); 
+				}
+	  		}
+	  		break;
+
+      	case RMMCSDTestControllerInterface::ESocketStack:
+      		{
+      		TStackPtr stackPtr;     		
+      		ret = Kern::ThreadRawRead(iClient, a1, &stackPtr, sizeof(stackPtr));	 
+			if( ret == KErrNone )
+				{
+		  		MMCSDLOG("Calling RMMCSDTestControllerInterface::ESocketStack");
+		  		MMCSDLOG2("busNumber=%d", stackPtr.iBus);
+				stackPtr.iStackPtr = iSocket->Stack(stackPtr.iBus);
+				ret = Kern::ThreadRawWrite(iClient, a1, &stackPtr, sizeof(stackPtr));
+				}
+      		}
+	  		break;
+
+      	case RMMCSDTestControllerInterface::ESocketiState_Get:
+	  		{
+	  		MMCSDLOG("Calling RMMCSDTestControllerInterface::ESocketiState_Get");
+	  		MMCSDLOG2("iState=%d", iSocket->iState);
+			ret = Kern::ThreadRawWrite(iClient, a1, &iSocket->iState, sizeof(iSocket->iState));
+	  		}
+	  		break;
+	  		
+		case RMMCSDTestControllerInterface::ESocketiStandby_Get:
+	        {
+	  		MMCSDLOG("Calling RMMCSDTestControllerInterface::ESocketiStandby_Get");
+       	    MMCSDLOG2("iStandby=%d", &iSocket->iStandby);
+       	    ret = Kern::ThreadRawWrite(iClient, a1, &iSocket->iStandby, sizeof(iSocket->iStandby));
+            }
+            break;
+            
+		case RMMCSDTestControllerInterface::ESocketiType_Get:
+	        {
+	  		MMCSDLOG("Calling RMMCSDTestControllerInterface::ESocketiType_Get");
+       	    MMCSDLOG2("iType=%d", &iSocket->iType);
+       	    ret = Kern::ThreadRawWrite(iClient, a1, &iSocket->iType, sizeof(iSocket->iType));
+            }
+            break;
+            
+      	case RMMCSDTestControllerInterface::ESocketiDoorOpened_Get:
+        	{
+	  		MMCSDLOG("Calling RMMCSDTestControllerInterface::ESocketiDoorOpened_Get");
+       	    MMCSDLOG2("iDoorOpened=%d", &iSocket->iDoorOpened);
+       	    ret = Kern::ThreadRawWrite(iClient, a1, &iSocket->iDoorOpened, sizeof(iSocket->iDoorOpened));
+			}
+        	break;
+	  			  		
+        default:
+           	ret=KErrNotFound;
+			break;
+		}
+	return(ret);
+	}
+
+/**
+ * Do a kernel side request for DMMCSocket
+ *
+ * @param TRequestStatus* aStatus - Request Status
+ * @param TAny* a1 - Given parameter
+ * @param TAny* a2 - Given parameter
+ * @param TInt aCommand - Request Function ID
+ *
+ * @return TInt the error code
+ *
+ * @leave N/A
+ */
+TInt DLddMmcCntrlInterface::SocketDoRequest(TRequestStatus* aStatus, TAny* a1, TAny *a2, TInt aCommand)
+	{
+	MMCSDLOG2("~~~ SocketDoRequest called iAsyncFunction(%x)", aCommand);
+
+	if (!iSocket)
+		{
+  		MMCSDLOG("DLddMmcCntrlInterface::SocketDoRequest - iSocket is NULL");		
+		return KErrGeneral;
+		}
+
+	TInt ret = KErrNone;
+	switch (TTCFunctionId(aCommand).FunctionId())
+		// iAsyncFunction initialized in DoRequest
+		{
+		case RMMCSDTestControllerInterface::ESocketPowerUp:
+			{
+			MMCSDLOG("Performing RMMCSDTestControllerInterface::ESocketPowerUp");
+			
+#ifdef __DEBUG
+			MMCSDLOG("RMMCSDTestControllerInterface::ESocketPowerUp - Not available in debug build");
+			ret = KErrNotSupported;
+#else
+			ret = iSocket->PowerUp();
+#endif
+
+			if ( (ret == KErrNone) || (ret == KErrCompletion) )
+				{
+				CreateAsyncBusEventRequest( DLddMmcCntrlInterface::EMMcSocketPowerUp, aStatus, iUnit);
+				}
+			else
+				{
+				Kern::RequestComplete(iClient, aStatus, ret);
+				}
+			}
+			break;
+		default:
+			break;
+		}
+	return ret;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/ldd/src/mmclddstack.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,371 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include <kernel.h>
+#include <mmc.h>
+#include <locmedia.h>
+
+#include "mmcldd.h"
+#include "d_mmcsdif.h"
+
+/**
+ * Do a kernel side control for DMMCStack
+ *
+ * @param TInt aFunction - Request Function ID
+ * @param TAny* a1 - Given parameter
+ * @param TAny* a2 - Given parameter
+ *
+ * @return TInt the error code
+ *
+ * @leave N/A
+ */
+TInt DLddMmcCntrlInterface::StackDoControl(TInt aFunction, TAny* a1, TAny* a2)
+	{
+	MMCSDLOG3(
+			"DLddMmcCntrlInterface::StackDoControl aFunction(%d) \
+			TTCFunctionId(aFunction).FunctionId()(%d)",
+			aFunction, TTCFunctionId(aFunction).FunctionId());
+	TInt ret = KErrNone;
+	
+	if (!iStack)
+		{
+  		MMCSDLOG("DLddMmcCntrlInterface::StackDoControl - iStack is NULL");		
+		return KErrGeneral;
+		}
+	else if (!iClient)
+		{
+  		MMCSDLOG("DLddMmcCntrlInterface::StackDoControl - iClient is NULL");		
+		return KErrGeneral;
+		}
+
+	switch (TTCFunctionId(aFunction).FunctionId())
+		{
+		case RMMCSDTestControllerInterface::EStack:
+			{
+			MMCSDLOG("case RMMCSDTestControllerInterface::EStack");
+			ret = Kern::ThreadRawWrite(iClient, a1, &iStack, sizeof(iStack));
+			}
+			break;
+		case RMMCSDTestControllerInterface::EStackAdjustPartialRead:
+			{
+			if (!iCard)
+				{
+				MMCSDLOG("RMMCSDTestControllerInterface::EStackAdjustPartialRead NULL card\n");
+				return KErrNotReady;
+				}
+
+			TPartialReadData partialReadData;
+			Kern::ThreadRawRead(iClient, a1, &partialReadData,
+					sizeof(partialReadData));
+			iStack->AdjustPartialRead(iCard, partialReadData.iStart,
+					partialReadData.iEnd,
+					(TUint32*)&(partialReadData.iPhysStart),
+					(TUint32*)&(partialReadData.iPhysEnd));
+			ret = Kern::ThreadRawWrite(iClient, a1, &partialReadData,
+					sizeof(partialReadData));
+			}
+			break;
+		case RMMCSDTestControllerInterface::EStackAllocSession:
+			{
+			// just a simple test to check p1 call of DMMCStack::AllocSession
+			// the session is tested further within the DLddAsyncRequest class
+			// which each uses their own session (allocated from DMMCStack::AllocSession)			
+			MMCSDLOG("pre AllocSession");
+			DMMCSession* session = iStack->AllocSession(TMMCCallBack());
+			MMCSDLOG2("post AllocSession session = %x", session);
+			delete session;
+			}
+			break;
+		case RMMCSDTestControllerInterface::EStackBufferInfo:
+			{
+			MMCSDLOG("RMMCSDTestControllerInterface::EStackBufferInfo");
+			TBufferInfo bufInfo;
+			iStack->BufferInfo(bufInfo.iBuf, bufInfo.iBufLen,
+					bufInfo.iMinorBufLen);
+			Kern::ThreadRawWrite(iClient, a1, &bufInfo, sizeof(bufInfo));
+			}
+			break;
+		case RMMCSDTestControllerInterface::EStackGetBufferInfo:
+			{
+			MMCSDLOG("RMMCSDTestControllerInterface::EStackGetBufferInfo");
+			TBufferInfo bufInfo;
+			iStack->GetBufferInfo(&bufInfo.iBuf, &bufInfo.iBufLen);
+			Kern::ThreadRawWrite(iClient, a1, &bufInfo, sizeof(bufInfo));
+			}
+			break;
+
+		case RMMCSDTestControllerInterface::EStackCardP:
+			{
+     		TCardPtr cardPtr;     		
+      		ret = Kern::ThreadRawRead(iClient, a1, &cardPtr, sizeof(cardPtr));	 
+			if( ret == KErrNone )
+				{
+		  		MMCSDLOG("Calling RMMCSDTestControllerInterface::EStackCardP");
+		  		MMCSDLOG2("cardNumber=%d", cardPtr.iCardNumber);
+		  		iCard = iStack->CardP(cardPtr.iCardNumber);
+		  		MMCSDLOG2("cardPtr=%x", iCard);
+		  		cardPtr.iCardPtr = iCard;
+				ret = Kern::ThreadRawWrite(iClient, a1, &cardPtr, sizeof(cardPtr));
+				}
+			}
+			break;
+
+		case RMMCSDTestControllerInterface::EStackDemandPagingInfo:
+			{
+			DMMCStack::TDemandPagingInfo dpInfo;
+			ret = iStack->DemandPagingInfo(dpInfo);
+
+			if (ret == KErrNone)
+				{
+				TTCDemandPagingInfo info;
+				info.iDriveCount = dpInfo.iDriveCount;
+				info.iNumPages = dpInfo.iNumPages;
+				info.iPagingDriveList = dpInfo.iPagingDriveList;
+				info.iPagingType = dpInfo.iPagingType;
+				info.iReadShift = dpInfo.iReadShift;
+				info.iWriteProtected = dpInfo.iWriteProtected;
+				ret = Kern::ThreadRawWrite(iClient, a1, &info, sizeof(info));
+				}
+			else
+				{
+				MMCSDLOG2(
+						"RMMCSDTestControllerInterface::EStackDemandPagingInfo err(%d)",
+						ret);
+				}
+			}
+			break;
+
+		case RMMCSDTestControllerInterface::EStackEffectiveModes:
+			{
+			TUint32 rval = iStack->EffectiveModes(iStackConfig);
+			ret = Kern::ThreadRawWrite(iClient, a1, &rval, sizeof(rval));
+			}
+			break;
+
+		case RMMCSDTestControllerInterface::EStackHasCardsPresent:
+			{
+			TBool cardsPresent = iStack->HasCardsPresent();
+			ret = Kern::ThreadRawWrite(iClient, a1, &cardsPresent,
+					sizeof(cardsPresent));
+			}
+			break;
+		case RMMCSDTestControllerInterface::EStackHasSessionsQueued:
+			{
+			TBool sessionsQueued = iStack->HasSessionsQueued();
+			ret = Kern::ThreadRawWrite(iClient, a1, &sessionsQueued,
+					sizeof(sessionsQueued));
+			}
+			break;
+		case RMMCSDTestControllerInterface::EStackInit:
+			ret = iStack->Init();
+			break;
+		case RMMCSDTestControllerInterface::EStackInitStackInProgress:
+			{
+			TBool inProgress = iStack->InitStackInProgress();
+			ret = Kern::ThreadRawWrite(iClient, a1, &inProgress,
+					sizeof(inProgress));
+			}
+			break;
+		case RMMCSDTestControllerInterface::EStackMMCSocket:
+			{
+			MMCSDLOG("case RMMCSDTestControllerInterface::EStackMMCSocket");
+			DMMCSocket* socketPtr = iStack->MMCSocket();
+			MMCSDLOG3("Socket Ptr (%x)   &socketPtr(%x)", socketPtr,
+					&socketPtr);
+			ret = Kern::ThreadRawWrite(iClient, a1, &socketPtr,
+					sizeof(socketPtr));
+			}
+			break;
+		case RMMCSDTestControllerInterface::EStackMachineInfo:
+			{
+			TMMCMachineInfo mi;
+			iStack->MachineInfo(mi);
+			TMachineInfo machineInfo(mi);
+			ret = Kern::ThreadRawWrite(iClient, a1, &machineInfo, sizeof(machineInfo));
+			}
+			break;
+		case RMMCSDTestControllerInterface::EStackMaxCardsInStack:
+			{
+			TUint maxCards = iStack->MaxCardsInStack();
+			ret = Kern::ThreadRawWrite(iClient, a1, &maxCards, sizeof(maxCards));
+			}
+			break;
+		case RMMCSDTestControllerInterface::EStackReadPasswordStore:
+			{
+			TMMCPasswordStore* pps = iStack->PasswordStore();
+			TStackPasswordStoreData pwdStoreData;
+			pwdStoreData.iPwdStorePtr = pps;
+			if (pps)
+				{
+				TBuf8<KPasswordStoreCIDLength + KMmcPwdLen> formattedPassword;
+				ret = pps->ReadPasswordData(formattedPassword);
+				MMCSDLOG2("RMMCSDTestControllerInterface::EStackReadPasswordStore formattedPassword=%S", &formattedPassword);
+				
+				if (ret == KErrNone)
+					{
+					pwdStoreData.SetFormattedPassword(formattedPassword);
+					ret = Kern::ThreadRawWrite(iClient, a1, &pwdStoreData, sizeof(pwdStoreData));
+					}
+				}
+			else
+				{
+				MMCSDLOG("RMMCSDTestControllerInterface::EStackReadPasswordStore invalid pps");
+				ret = KErrGeneral;
+				}
+
+			MMCSDLOG3("RMMCSDTestControllerInterface::EStackReadPasswordStore #1 ret(%d) pwdStoreData.iPassword(%S)",
+						ret, &pwdStoreData.iPassword);
+			}
+			break;
+		case RMMCSDTestControllerInterface::EStackWritePasswordStore:
+			{
+			TStackPasswordStoreData pwdStoreData;
+			ret = Kern::ThreadRawRead(iClient, a1, &pwdStoreData, sizeof(pwdStoreData));
+			TMMCPasswordStore* pps = iStack->PasswordStore();
+			pwdStoreData.iPwdStorePtr = pps;
+			if (pps)
+				{
+				TBuf8<KPasswordStoreCIDLength + KMmcPwdLen> formattedPassword;
+				if (pwdStoreData.CreateFormattedPassword(formattedPassword, iCard->CID()))
+					{
+					MMCSDLOG2("RMMCSDTestControllerInterface::EStackWritePasswordStore formattedPassword=%S", &formattedPassword);
+					ret = pps->WritePasswordData(formattedPassword);				
+					}
+				else
+					{
+					MMCSDLOG("RMMCSDTestControllerInterface::EStackWritePasswordStore - CreateFormattedPassword() failed");
+					ret = KErrGeneral;
+					}
+				}
+			else
+				{
+				MMCSDLOG("RMMCSDTestControllerInterface::EStackWritePasswordStore invalid pps");
+				ret = KErrGeneral;
+				}
+			MMCSDLOG3(
+					"RMMCSDTestControllerInterface::EStackWritePasswordStore ret(%d) pwdStoreData.iPassword(%S)",
+					ret, &pwdStoreData.iPassword);
+			}
+			break;
+			
+		case RMMCSDTestControllerInterface::EStackProgramPeriodInMs:
+			{
+			TInt periodMs = iStack->ProgramPeriodInMilliSeconds();
+			ret
+					= Kern::ThreadRawWrite(iClient, a1, &periodMs,
+							sizeof(periodMs));
+			}
+			break;
+
+		case RMMCSDTestControllerInterface::EStackStop:
+			{
+			if (!iCard)
+				{
+				MMCSDLOG("RMMCSDTestControllerInterface::EStackStop NULL card\n");
+				return KErrNotReady;
+				}
+
+			ret = iStack->Stop(iCard);
+			}
+			break;
+
+		case RMMCSDTestControllerInterface::EStackReportPowerUp:
+			iStack->ReportPowerUp();
+			break;
+			
+		case RMMCSDTestControllerInterface::EStackReportPowerDown:
+			iStack->ReportPowerDown();
+			break;
+			
+		case RMMCSDTestControllerInterface::EStackConfigureEffectiveModes:
+			if (!a1)
+				{
+				return KErrArgument;
+				}
+			ret = StackConfigureEffectiveModes((TInt) a1, a2);
+			break;
+
+		default:
+			ret = KErrNotFound;
+			break;
+		}
+	return ret;
+	}
+
+/**
+ * Configure the Effectivemodes parameter for all TMMCStackConfig functions
+ *
+ * @param TInt aEffectiveModesFunctionId - Effective Modes Function ID
+ * @param TAny* aParam - Given Effective Modes Function parameter
+ *
+ * @return TInt the error code
+ *
+ * @leave N/A
+ */
+TInt DLddMmcCntrlInterface::StackConfigureEffectiveModes(
+		TInt aEffectiveModesFunctionId, TAny* aParam)
+	{
+	// used to handle requests to configure the iStackConfig (Effectivemodes)
+	// parameter for all TMMCStackConfig functions is max 32 bit value so passes in as value aParam
+
+	TInt r = KErrNone; // all functions return void	
+	switch ((RMMCSDTestControllerInterface::TEffectiveModesFunctionId) aEffectiveModesFunctionId)
+		{
+		case RMMCSDTestControllerInterface::EStackEffectiveModesRemoveMode:
+			iStackConfig.RemoveMode((TUint32)aParam);
+			break;
+		case RMMCSDTestControllerInterface::EStackEffectiveModesSetBusClockInKhz:
+			iStackConfig.SetBusClockInKhz((TUint)aParam);
+			break;
+		case RMMCSDTestControllerInterface::EStackEffectiveModesSetBusyTimeOutInMcs:
+			iStackConfig.SetBusyTimeOutInMcs((TUint)aParam);
+			break;
+		case RMMCSDTestControllerInterface::EStackEffectiveModesSetCRCRetries:
+			iStackConfig.SetCRCRetries((TUint)aParam);
+			break;
+		case RMMCSDTestControllerInterface::EStackEffectiveModesSetDataTimeOutInMcs:
+			iStackConfig.SetDataTimeOutInMcs((TUint)aParam);
+			break;
+		case RMMCSDTestControllerInterface::EStackEffectiveModesSetMode:
+			iStackConfig.SetMode((TUint32)aParam);
+			break;
+		case RMMCSDTestControllerInterface::EStackEffectiveModesSetOpCondBusyTimeout:
+			iStackConfig.SetOpCondBusyTimeout((TUint16)((TInt)aParam));
+			break;
+		case RMMCSDTestControllerInterface::EStackEffectiveModesSetPollAttempts:
+			iStackConfig.SetPollAttempts((TUint)aParam);
+			break;
+		case RMMCSDTestControllerInterface::EStackEffectiveModesSetResponseTimeOutInTicks:
+			iStackConfig.SetResponseTimeOutInTicks((TUint)aParam);
+			break;
+		case RMMCSDTestControllerInterface::EStackEffectiveModesSetTicksClockIn:
+			iStackConfig.SetTicksClockIn((TUint)aParam);
+			break;
+		case RMMCSDTestControllerInterface::EStackEffectiveModesSetTicksClockOut:
+			iStackConfig.SetTicksClockOut((TUint)aParam);
+			break;
+		case RMMCSDTestControllerInterface::EStackEffectiveModesSetTimeOutRetries:
+			iStackConfig.SetTimeOutRetries((TUint)aParam);
+			break;
+		default:
+			r = KErrNotFound;
+			break;
+		};
+	return r;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/pkg/t_mmc.bat	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,30 @@
+@rem
+@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+testexecute z:\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.script -tcx z:\base\mmcsd\t_mmcsd.tcs 
+testexecute z:\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER-MANUAL.script -tcx z:\base\mmcsd\t_mmcsd.tcs 
+testexecute z:\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.script -tcx z:\base\mmcsd\t_mmcsd.tcs 
+testexecute z:\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.script -tcx z:\base\mmcsd\t_mmcsd.tcs 
+testexecute z:\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER.script -tcx z:\base\mmcsd\t_mmcsd.tcs 
+testexecute z:\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.script -tcx z:\base\mmcsd\t_mmcsd.tcs 
+testexecute z:\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.script -tcx z:\base\mmcsd\t_mmcsd.tcs  
+testexecute z:\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.script -tcx z:\base\mmcsd\t_mmcsd.tcs  
+
+copy c:\logs\testexecute\*.htm d:\
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/pkg/t_sd.bat	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,30 @@
+@rem
+@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+testexecute z:\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.script -tcx z:\base\mmcsd\t_mmcsd.tcs  
+testexecute z:\base\mmcsd\BASE-BSP-SD-STACK-DRIVER-MANUAL.script -tcx z:\base\mmcsd\t_mmcsd.tcs  
+testexecute z:\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.script -tcx z:\base\mmcsd\t_mmcsd.tcs  
+testexecute z:\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.script -tcx z:\base\mmcsd\t_mmcsd.tcs  
+testexecute z:\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER.script -tcx z:\base\mmcsd\t_mmcsd.tcs  
+testexecute z:\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.script -tcx z:\base\mmcsd\t_mmcsd.tcs  
+testexecute z:\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.script -tcx z:\base\mmcsd\t_mmcsd.tcs    
+testexecute z:\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER-MANUAL.script -tcx z:\base\mmcsd\t_mmcsd.tcs    
+
+copy c:\logs\testexecute\*.htm d:\ 
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,159 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE	T_mmcsd
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALMediaChange-0001
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALMediaChange-0001
+//! @SYMTestCaseDesc		Load Logical Device Driver.
+//! @SYMTestPriority		high
+//! @SYMTestActions		Load D_MMCSDIF LDD Driver
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		6/5/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			User::LoadLogicalDevice(const TDesC {ref});
+	START_TEST_BLOCK	100			T_mmcsd			\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		LoadDriver		BASE-BSP-MMC-DRIVER-LDDName-CMD0001
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALMediaChange-0001
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALMediaChange-0002
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALMediaChange-0002
+//! @SYMTestCaseDesc		Checks the Door State and Validate
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Open the Driver handle
+//!				2. Checks the Current Door State.
+//!				3. Display Door State.
+//!				4. Test door closed?
+//!				5. Validate Door States.
+//!				6. Close the driver handle
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		6/5/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCMediaChange::DoDoorOpen();
+//!				DMMCMediaChange::DoDoorClosed()
+//!				DMMCSocket::iDoorOpened()
+	START_TEST_BLOCK	500	 		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		CREATE_OBJECT	MMCSDMediaChange	mmcsdmediachange1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdmediachange1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdmediachange1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-Message1-CMD0002
+		COMMAND		mmcsdmediachange1	MediaState		BASE-BSP-MMC-DRIVER-MediaState-CMD0002
+		COMMAND		mmcsdsession1		Close
+		COMMAND		mmcsdmediachange1	~
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALMediaChange-0002
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALMediaChange-0003
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALMediaChange-0003
+//! @SYMTestCaseDesc		Checks the Door State and Validate
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Open the Driver handle
+//!				2. Checks the Current Door State.
+//!				3. Display Door State.
+//!				4. Test door opened?
+//!				5. Validate Door States.
+//!				6. Close the driver handle
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		6/5/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCMediaChange::DoDoorOpen();
+//!				DMMCMediaChange::DoDoorClosed()
+//!				DMMCSocket::iDoorOpened()
+	START_TEST_BLOCK	500	 		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		CREATE_OBJECT	MMCSDMediaChange	mmcsdmediachange1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdmediachange1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdmediachange1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-Message1-CMD0003
+		COMMAND		mmcsdmediachange1	MediaState		BASE-BSP-MMC-DRIVER-MediaState-CMD0003
+		COMMAND		mmcsdmediachange1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-Message2-CMD0003
+		COMMAND		mmcsdsession1		Close
+		COMMAND		mmcsdmediachange1	~
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALMediaChange-0003
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALMediaChange-0004
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALMediaChange-0004
+//! @SYMTestCaseDesc		Checks the Door State and Validate
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Open the Driver handle
+//!				2. Checks the Current Door State.
+//!				3. Display Door State.
+//!				4. Test door opened?
+//!				5. Validate Door States.
+//!				6. Close the driver handle
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		6/5/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCMediaChange::ForceMediaChange();
+//!				DMMCMediaChange::DoDoorClosed();
+//!				DMMCMediaChange::DoDoorOpen();
+	START_TEST_BLOCK	500			T_mmcsd			\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		CREATE_OBJECT	MMCSDMediaChange	mmcsdmediachange1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdmediachange1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdmediachange1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-Message1-CMD0004
+		COMMAND		mmcsdmediachange1	MediaState		BASE-BSP-MMC-DRIVER-MediaState-CMD0004
+		COMMAND		mmcsdmediachange1	ForceMediaChange
+		COMMAND		mmcsdmediachange1	MediaState		BASE-BSP-MMC-DRIVER-ForcedMediaState-CMD0004
+		COMMAND		mmcsdsession1		Close
+		COMMAND		mmcsdmediachange1	~
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALMediaChange-0004
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALMediaChange-0005
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALMediaChange-0005
+//! @SYMTestCaseDesc		UnLoad Logical Device Driver.
+//! @SYMTestPriority		high
+//! @SYMTestActions		Load D_MMCSDIF LDD Driver
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			User::FreeLogicalDevice(const TDesC {ref})
+	START_TEST_BLOCK	100	 		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		UnLoadDriver		BASE-BSP-MMC-DRIVER-LDDName-CMD0001
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALMediaChange-0005
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-MMC-MEDIACHANGE-DRIVER.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,113 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE	T_mmcsd
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MediaChange-0001
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MediaChange-0001
+//! @SYMTestCaseDesc		Load Logical Device Driver.
+//! @SYMTestPriority		high
+//! @SYMTestActions		Load D_MMCSDIF LDD Driver
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		6/5/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			User::LoadLogicalDevice(const TDesC {ref});
+	START_TEST_BLOCK	100			T_mmcsd    		\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		LoadDriver		BASE-BSP-MMC-DRIVER-LDDName-CMD0001
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MediaChange-0001
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MediaChange-0002
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MediaChange-0002
+//! @SYMTestCaseDesc		Reads the Media Status
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Open the Driver handle
+//!				2. Checks the Current Media State.
+//!				3. Display Door Opened or Closed.
+//!				4. Close the driver handle
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		6/5/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCMediaChange::MediaState();
+	START_TEST_BLOCK	100			T_mmcsd			\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		CREATE_OBJECT	MMCSDMediaChange	mmcsdmediachange1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdmediachange1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdmediachange1	MediaState		BASE-BSP-MMC-DRIVER-InitMediaState-CMD0002
+		COMMAND		mmcsdsession1		Close
+		COMMAND		mmcsdmediachange1	~
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MediaChange-0002
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MediaChange-0003
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MediaChange-0003
+//! @SYMTestCaseDesc		Count of media events yet to be acknowledged
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Open the Driver handle
+//!				2. Read the Replay count value
+//!				3. Validate the count
+//!				4. Close the driver handle
+//! @SYMTestExpectedResults	Replay Count
+//! @SYMTestType		CIT
+//! @SYMCreationDate		6/5/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCMediaChange::iReplyCount()
+	START_TEST_BLOCK	100	 		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		CREATE_OBJECT	MMCSDMediaChange	mmcsdmediachange1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdmediachange1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdmediachange1	ReplayCount		BASE-BSP-MMC-DRIVER-ReplayEventCount-CMD0003
+		COMMAND		mmcsdsession1		Close
+		COMMAND		mmcsdmediachange1	~
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MediaChange-0003
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MediaChange-0004
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MediaChange-0004
+//! @SYMTestCaseDesc		UnLoad Logical Device Driver.
+//! @SYMTestPriority		high
+//! @SYMTestActions		Load  D_MMCSDIF LDD Driver
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			User::FreeLogicalDevice(const TDesC {ref})
+	START_TEST_BLOCK	100	 		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-MEDIACHANGE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		UnLoadDriver		BASE-BSP-MMC-DRIVER-LDDName-CMD0001
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MediaChange-0004
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-MMC-PSU-DRIVER.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,344 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE	T_mmcsd
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0001
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsu-0001
+//! @SYMTestCaseDesc		Load MMC/SD Logical Device Driver
+//! @SYMTestPriority		high
+//! @SYMTestActions		Load D_MMCSDIF LDD Driver
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			User::LoadLogicalDevice(const TDesC {ref});
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	LoadDriver		BASE-BSP-MMC-DRIVER-LDDName-CMD0001
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0001
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0002
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsu-0002
+//! @SYMTestCaseDesc		MMC/SD Power Supply Test - Display the MMC/SD card Bus inactivity Timeout
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the bus inactivity count
+//!				5. Display the bus inactivity count
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed the bus inactivity count
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCPsu::PsuInfo(TPBusPsuInfo {ref});
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsu1	PsuInfo			BASE-BSP-MMC-DRIVER-PsuInfo-CMD002
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0002
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0003
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsu-0003
+//! @SYMTestCaseDesc		MMC/SD Power Supply Test - Set the supported voltage setting to be used when the stack is next powered up
+//!				the voltage level, or range of voltages supported in OCR format
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Set the voltages supported in OCR format
+//!				5. Display voltages supported in OCR format
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCPsu::DoSetVoltage();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsu1	SetVoltage		BASE-BSP-MMC-DRIVER-Supported-PSUVoltageOCR-CMD0003
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0003
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0004
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsu-0004
+//! @SYMTestCaseDesc		MMC/SD Power Supply Test - Set the MMC/SD card Current VCC state as OFF
+//!				Uses API elements:
+//!				DMMCPsu::iVcc()
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Set the MMC/SD card Current VCC state
+//!				5. Display Current VCC state
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	VCC state Displayed OFF
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCPsu::SetState(TPBusPsuState);
+//!				DMMCSocket::{DPBusPsuBase {ptr}}iVcc
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsu1	SetState  		BASE-BSP-MMC-DRIVER-VccStateOFF-CMD0004
+		COMMAND		mmcsdpsu1	VccState  		BASE-BSP-MMC-DRIVER-VccStateOFF-CMD0004
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0004
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0005
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsu-0005
+//! @SYMTestCaseDesc		MMC/SD Power Supply Test - Set the MMC/SD card VCC state as EPsuOnCurLimit
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Set the MMC/SD card Current VCC state EPsuOnCurLimit
+//!				5. Display Current PSU state
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Current VCC state Displayed
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCPsu::SetState(TPBusPsuState);
+//!				DMMCSocket::{DPBusPsuBase {ptr}}iVcc
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsu1	SetState		BASE-BSP-MMC-DRIVER-VccStatePsuOnCurLimit-CMD0005
+		COMMAND		mmcsdpsu1	VccState		BASE-BSP-MMC-DRIVER-VccStatePsuOnCurLimit-CMD0005
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			 BASE-BSP-MMC-DRIVER-DMMCPsu-0005
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0006
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsu-0006
+//! @SYMTestCaseDesc		MMC/SD Power Supply Test - Set Current VCC state EPsuOnFull
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Set the MMC/SD card Current VCC state
+//!				5. Display Current VCC state
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Current VCC state Displayed
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCSocket::{DPBusPsuBase {ptr}}iVcc
+	START_TEST_BLOCK	100		T_mmcsd		 	\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsu1	SetState  		BASE-BSP-MMC-DRIVER-VccStatePsuOnFull-CMD0006
+		COMMAND		mmcsdpsu1	VccState 		BASE-BSP-MMC-DRIVER-VccStatePsuOnFull-CMD0006
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0006
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0007
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsu-0007
+//! @SYMTestCaseDesc		MMC/SD Socket Power Supply Test - Current Bus State.
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Check TPBusPsuState
+//!				5. Display the BusPsuState
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed the platform status while turn on
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCSocket::iState();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsu1	PbusState		BASE-BSP-MMC-DRIVER-PbusState-CMD0007
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0007
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0008
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsu-0008
+//! @SYMTestCaseDesc		MMC/SD Power Supply Test - Reads PSU Unit number.
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads PSU Unit number
+//!				5. Display the PSU Unit number
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCPsu::iPsuNum();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsu1	PsuNumber		BASE-BSP-MMC-DRIVER-PsuNumber-CMD0008
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0008
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0009
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsu-0009
+//! @SYMTestCaseDesc		MMC/SD Power Supply Test - Reads Meadia Change number.
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads Meadia Change number
+//!				5. Display the Meadia Change number
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCPsu::iMediaChangeNum()
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsu1	MediaChangeNumber	BASE-BSP-MMC-DRIVER-MediaChangeNumber-CMD0009
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0009
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0010
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsu-0010
+//! @SYMTestCaseDesc		MMC/SD Power Supply Test - Reads platform has current limit check support.
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads platform has current limit check support
+//!				5. Display the platform status
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	KErrNotSupported
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCPsu::iCurrLimited()
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND 	mmcsdpsu1	PsuCurLimit		BASE-BSP-MMC-DRIVER-PsuCurLimit-CMD0010
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0010
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsu-0011
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsu-0011
+//! @SYMTestCaseDesc		UnLoad MMC/SD Logical Device Driver.
+//! @SYMTestPriority		high
+//! @SYMTestActions		Load D_MMCSDIF LDD Driver
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			User::FreeLogicalDevice(const TDesC{ref});
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	UnLoadDriver		BASE-BSP-MMC-DRIVER-LDDName-CMD0001
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-MMC-DRIVER-DMMCPsu-0011
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-MMC-PSUBASE-DRIVER.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,437 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE	T_mmcsd
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0001
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsuBase-0001
+//! @SYMTestCaseDesc		Load MMC/SD Logical Device Driver
+//! @SYMTestPriority		high
+//! @SYMTestActions		Load  D_MMCSDIF LDD Driver
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			User::LoadLogicalDevice(const TDesC {ref});
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	LoadDriver		BASE-BSP-MMC-DRIVER-LDDName-CMD0001
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0001
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0002
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsuBase-0002
+//! @SYMTestCaseDesc		Checks whether this PSU is powering a bus containing a locked device,
+//!				i.e. one that is recognised and in use by a client
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the power bus locked flag
+//!				5. Display the power bus locked counter value
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed the power bus locked counter value (TRUE or FALSE)
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::IsLocked();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	IsLocked		BASE-BSP-MMC-DRIVER-IsLocked-CMD002
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0002
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0003
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsuBase-0003
+//! @SYMTestCaseDesc		Checks whether the PSU is off.
+//!				The PSU is off when it is in the EPsuOff state
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the Psu State flag
+//!				5. Display the PSU State
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed the  PSU State value (TRUE or FALSE)
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::IsOff();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	IsOff			BASE-BSP-MMC-DRIVER-IsOff-CMD003
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0003
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0004
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsuBase-0004
+//! @SYMTestCaseDesc		Gets the maximum current (in microAmps) that the PSU is able to supply
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads maximum current (in microAmps)
+//!				5. Display the maximum current that the PSU is able to supply
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed the  maximum current (in microAmps)
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::MaxCurrentInMicroAmps();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	MaxCurrentInMicroAmps	BASE-BSP-MMC-DRIVER-MaxCurrentInMicroAmps-CMD004
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0004
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0005
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsuBase-0005
+//! @SYMTestCaseDesc		Resets inactivity and not-locked counts
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Resets inactivity and not-locked counts
+//!				5. Display the inactivity and not-locked counter values
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed the  inactivity and not-locked counter values
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::ResetInactivityTimer();
+//!				DPBusPsuBase::iInactivityCount();
+//!				DPBusPsuBase::iNotLockedCount();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	ResetInactivityTimer
+		COMMAND		mmcsdpsubase1	InactivityCount		BASE-BSP-MMC-DRIVER-InactivityCount-CMD005
+		COMMAND		mmcsdpsubase1	NotLockedCount		BASE-BSP-MMC-DRIVER-NotLockedCount-CMD005
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0005
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0006
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsuBase-0006
+//! @SYMTestCaseDesc		Gets the voltage level, or range of supported voltage levels
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the voltage level, or range of supported voltage levels
+//!				5. Display the voltage in OCR format
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed the voltage in OCR format
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::VoltageSupported();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	VoltageSupported	BASE-BSP-MMC-DRIVER-VoltageSupported-CMD006
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0006
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0007
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsuBase-0007
+//! @SYMTestCaseDesc		Reads the Bus inactivity counter value
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the Bus inactivity counter.
+//!				5. Display the Bus inactivity counter.
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed Bus inactivity counter
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor		Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::iInactivityCount();
+	START_TEST_BLOCK	100	 	T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	InactivityCount		BASE-BSP-MMC-DRIVER-InactivityCount-CMD007
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0007
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0008
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsuBase-0008
+//! @SYMTestCaseDesc		Reads Bus not locked counter
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the BBus not locked counter.
+//!				5. Display the Bus not locked counter.
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed Bus not locked counter value
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::iInactivityCount();
+	START_TEST_BLOCK	100	 	T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	NotLockedCount		BASE-BSP-MMC-DRIVER-NotLockedCount-CMD008
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0008
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0009
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsuBase-0009
+//! @SYMTestCaseDesc		Reads Bus inactivity timeout period, in seconds, when clients are registered
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the Bus inactivity timeout counter.
+//!				5. Display the inactivity timeout counter.
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed inactivity timeout counter value
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::iInactivityTimeout();
+	START_TEST_BLOCK	100	 	T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	InactivityTimeout	BASE-BSP-MMC-DRIVER-InactivityTimeout-CMD009
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0009
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0010
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsuBase-0010
+//! @SYMTestCaseDesc		Reads Bus not locked timeout period, in seconds, when no clients are registered
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the not locked timeout counter.
+//!				5. Display the not locked timeout counter.
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed not locked timeout counter value
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::iNotLockedTimeout();
+	START_TEST_BLOCK	100	 	T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	NotLockedTimeout	BASE-BSP-MMC-DRIVER-NotLockedTimeout-CMD010
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0010
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0011
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsuBase-0011
+//! @SYMTestCaseDesc		Reads the voltage level, or range of voltages supported .
+//!				The voltage level, or range of voltages is reported as a
+//!				bit mask in the same format as defined for the OCR register.
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the voltage level in OCR format.
+//!				5. Display the voltage level in OCR format.
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed voltage level in OCR format
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::iVoltageSupported();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	MemVoltageSupported	BASE-BSP-MMC-DRIVER-MemVoltageSupported-CMD011
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0011
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0012
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsuBase-0012
+//! @SYMTestCaseDesc		The maximum current (in microAmps) that the PSU is able to supply
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the maximum current (in microAmps).
+//!				5. Display the maximum current (in microAmps).
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed maximum current (in microAmps)
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::iMaxCurrentInMicroAmps();
+	START_TEST_BLOCK	100		T_mmcsd				\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen			BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL				BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	MemMaxCurrentInMicroAmps	BASE-BSP-MMC-DRIVER-MemMaxCurrentInMicroAmps-CMD012
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0012
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0013
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsuBase-0013
+//! @SYMTestCaseDesc		Indicates whether the platform hardware has support for checking whether the voltage level of the
+//!				PSU is within its expected voltage limit while turned on
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the Volt Check Interval.
+//!				5. Display the Volt Check Interval.
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed Volt Check Interval value
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::iVoltCheckInterval();
+	START_TEST_BLOCK	100	 	T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-MMC-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	VoltCheckInterval	BASE-BSP-MMC-DRIVER-VoltCheckInterval-CMD013
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0013
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0014
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-DMMCPsuBase-0014
+//! @SYMTestCaseDesc		UnLoad MMC/SD Logical Device Driver.
+//! @SYMTestPriority		high
+//! @SYMTestActions		Load D_MMCSDIF LDD Driver
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			User::FreeLogicalDevice(const TDesC{ref});
+	START_TEST_BLOCK 	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	UnLoadDriver		BASE-BSP-MMC-DRIVER-LDDName-CMD0001
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-DMMCPsuBase-0014
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,217 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE	T_mmcsd
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALSocket-0001
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALSocket-0001
+//! @SYMAPI			User::LoadLogicalDevice(const TDesC {ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Load Logical Device Driver.
+//! @SYMTestActions		Load D_MMCSDIF LDD Driver
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	LoadDriver		BASE-BSP-MMC-DRIVER-MANUALSocket-0001-001-LoadDriver_command02
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALSocket-0001
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALSocket-0002
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALSocket-0002
+//! @SYMAPI			DMMCSocket::CardIsPresent();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Card Is Present Test - Display if an MMC/SD card is present.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Ask user to make sure card in is drive
+//!				4. Check that a card is present
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	A card is present.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-MANUALSocket-0002-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-DRIVER-MANUALSocket-0002-001-NewL_command02
+		COMMAND		mmcsdsocket1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-MANUALSocket-0002-001-PromptUser_command03
+		COMMAND		mmcsdsocket1	CardIsPresent		BASE-BSP-MMC-DRIVER-MANUALSocket-0002-001-CardIsPresent_command04
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALSocket-0002
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALSocket-0003
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALSocket-0003
+//! @SYMAPI			DMMCSocket::CardIsPresent();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Card Is Present Test - Display if an MMC/SD card is present.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Ask user to make sure card is not in drive
+//!				4. Check that a card is not present
+//!				5. Ask user to make sure card is in drive
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	A card is not present.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-MANUALSocket-0003-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-DRIVER-MANUALSocket-0003-001-NewL_command02
+		COMMAND		mmcsdsocket1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-MANUALSocket-0003-001-PromptUser_command03
+		COMMAND		mmcsdsocket1	CardIsPresent		BASE-BSP-MMC-DRIVER-MANUALSocket-0003-001-CardIsPresent_command04
+		COMMAND		mmcsdsocket1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-MANUALSocket-0003-001-PromptUser_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALSocket-0003
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALSocket-0004
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALSocket-0004
+//! @SYMAPI			DMMCSocket::CardIsPresent();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Card Is Present Test - Display if an MMC/SD card is present.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Ask user to make sure card is in drive
+//!				4. Check that a card is present
+//!				5. Ask user to make sure card is not in drive
+//!				6. Check that a card is not present
+//!				7. Ask user to make sure card is in drive
+//!				8. Check that a card is present
+//!				9. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	A card is not present.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-MANUALSocket-0004-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-DRIVER-MANUALSocket-0004-001-NewL_command02
+		COMMAND		mmcsdsocket1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-MANUALSocket-0004-001-PromptUser_command03
+		COMMAND		mmcsdsocket1	CardIsPresent		BASE-BSP-MMC-DRIVER-MANUALSocket-0004-001-CardIsPresent_command04
+		COMMAND		mmcsdsocket1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-MANUALSocket-0004-001-PromptUser_command05
+		COMMAND		mmcsdsocket1	CardIsPresent		BASE-BSP-MMC-DRIVER-MANUALSocket-0004-001-CardIsPresent_command06
+		COMMAND		mmcsdsocket1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-MANUALSocket-0004-001-PromptUser_command07
+		COMMAND		mmcsdsocket1	CardIsPresent		BASE-BSP-MMC-DRIVER-MANUALSocket-0004-001-CardIsPresent_command08
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALSocket-0004
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALSocket-0005
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALSocket-0005
+//! @SYMAPI			DMMCSocket::CardIsPresent();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Card Is Present Test - Display if an MMC/SD card is present after reset.
+//! @SYMTestActions    		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Reset the socket by powering down the stack
+//!				4. Ask user to make sure card is in drive
+//!				5. Check that a card is present
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	A card is present.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-MANUALSocket-0005-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-DRIVER-MANUALSocket-0005-001-NewL_command02
+		COMMAND		mmcsdsocket1	Reset1
+		COMMAND		mmcsdsocket1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-MANUALSocket-0005-001-PromptUser_command04
+		COMMAND		mmcsdsocket1	CardIsPresent		BASE-BSP-MMC-DRIVER-MANUALSocket-0005-001-CardIsPresent_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALSocket-0005
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALSocket-0006
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALSocket-0006
+//! @SYMAPI			DMMCSocket::CardIsPresent();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Card Is Present Test - Display if an MMC/SD card is present after double reset.
+//! @SYMTestActions    		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Reset the socket by powering down the stack
+//!				4. Reset the socket and free up allocated resources
+//!				5. Ask user to make sure card is in drive
+//!				6. Check that a card is present
+//!				7. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	A card is present.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-MANUALSocket-0006-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-DRIVER-MANUALSocket-0006-001-NewL_command02
+		COMMAND		mmcsdsocket1	Reset1
+		COMMAND		mmcsdsocket1	Reset2
+		COMMAND		mmcsdsocket1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-MANUALSocket-0006-001-PromptUser_command05
+		COMMAND		mmcsdsocket1	CardIsPresent		BASE-BSP-MMC-DRIVER-MANUALSocket-0006-001-CardIsPresent_command06
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALSocket-0006
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALSocket-0007
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALSocket-0007
+//! @SYMAPI			FreeLogicalDevice(const TDesC {ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Free the Logical Device Driver
+//! @SYMTestActions    		Free the D_MMCSDIF LDD Driver
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Displayed Power supply information.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	UnLoadDriver		BASE-BSP-MMC-DRIVER-MANUALSocket-0007-001-UnLoadDriver_command02
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALSocket-0007
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-MMC-SOCKET-DRIVER.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,854 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE	T_mmcsd
+
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0001
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0001
+//! @SYMAPI			User::LoadLogicalDevice(const TDesC {ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Load Logical Device Driver.
+//! @SYMTestActions    		Load D_MMCSDIF LDD Driver
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	KErrNone
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	LoadDriver		BASE-BSP-MMC-SOCKET-DRIVER-0001-001-LoadDriver_command02
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0001
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0002
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0002
+//! @SYMAPI			DMMCSocket::Reset1();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Reset1 Test - Reset the socket by powering down the stack.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Reset the socket by powering down the stack
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The socket is reset with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0002-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0002-001-NewL_command02
+		COMMAND		mmcsdsocket1	Reset1
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0002
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0003
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0003
+//! @SYMAPI			DMMCSocket::Reset2();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Reset2 Test - Reset the socket and free up allocated resources.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Reset the socket by powering down the stack
+//!				4. Reset the socket and free up allocated resources
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The socket is reset with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0003-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0003-001-NewL_command02
+		COMMAND		mmcsdsocket1	Reset1
+		COMMAND		mmcsdsocket1	Reset2
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0003
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0004
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0004
+//! @SYMAPI			DMMCSocket::Stack(TInt);
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Stack Pointer Test - Get a pointer to a DMMCStack object.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get a pointer to a DMMCStack object for MMC card number 1
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The stack pointer is returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0004-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0004-001-NewL_command02
+		COMMAND		mmcsdsocket1	Stack			BASE-BSP-MMC-SOCKET-DRIVER-0004-001-Stack_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0004
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0005
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0005
+//! @SYMAPI			DMMCSocket::ResetInactivity(TInt);
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Reset inactivity timer Test - Reset socket's PSU inactivity timer.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Reset socket's PSU inactivity timer
+//!				4. Verify the bus inactivity count
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	PSU inactivity timer is reset with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0005-001-DriverOpen_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0005-001-NewL_command03
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0005-001-NewL_command03
+		COMMAND		mmcsdsocket1	ResetInactivity		BASE-BSP-MMC-SOCKET-DRIVER-0005-001-ResetInactivity_command04
+		COMMAND		mmcsdpsu1	PsuInfo			BASE-BSP-MMC-SOCKET-DRIVER-0005-001-PsuInfo_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0005
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0006
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0006
+//! @SYMAPI			DMMCSocket::MachineInfo();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		MachineInfo Test - Get the MachineInfo from the PSL.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get the MachineInfo from the PSL
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	MachineInfo is retrieved and contains the correct values.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0006-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0006-001-NewL_command02
+		COMMAND		mmcsdsocket1	MachineInfo		BASE-BSP-MMC-SOCKET-DRIVER-0006-001-MachineInfo_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0006
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0007
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0007
+//! @SYMAPI			DMMCSocket::AdjustPartialRead(const TMMCard{ptr}, TUint32, TUint32, TUint32{ptr}, TUint32{ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Calculate minimum range that must be read off card.
+//! @SYMTestActions    		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get pointer to card
+//!				4. Calculate minimum range that must be read off card
+//!				5. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Minimum range that must be read off card is correctly returned.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0007-001-DriverOpen_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0007-001-NewL_command03
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0007-001-NewL_command03
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-SOCKET-DRIVER-0007-001-CardP_command04
+		COMMAND		mmcsdsocket1	AdjustPartialRead	BASE-BSP-MMC-SOCKET-DRIVER-0007-001-AdjustPartialRead_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0007
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0008
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0008
+//! @SYMAPI			DMMCSocket::GetBufferInfo(TUint8{ptr}{ptr}, TInt{ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Get Buffer Info Test - Get details of the buffer allocated by socket for data transfer operations.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get details of the buffer allocated by socket for data transfer operations
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Correct buffer details are returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0008-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0008-001-NewL_command02
+		COMMAND		mmcsdsocket1	GetBufferInfo		BASE-BSP-MMC-SOCKET-DRIVER-0008-001-GetBufferInfo_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0008
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0009
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0009
+//! @SYMAPI			DMMCSocket::PrepareStore(TInt, TInt, TLocalDrivePasswordData{ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Prepare Store Test - Prepare store so mappings can be allocated or deallocated.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Prepare store so mappings can be allocated or deallocated, using operation EPasswordClear
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Store is prepared with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0009-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0006-001-NewL_command02
+		COMMAND		mmcsdsocket1	PrepareStore		BASE-BSP-MMC-SOCKET-DRIVER-0009-001-PrepareStore_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0009
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0010
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0010
+//! @SYMAPI			DMMCSocket::Init();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		15/05/2008
+//! @SYMTestCaseDesc		Initialise Test - Allocate resources and initialise the MMC socket and associated stack object.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Allocate resources and initialise the MMC socket and associated stack object
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	MMC socket initialised with no error.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0010-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0010-001-NewL_command02
+		COMMAND		mmcsdsocket1	Init
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0010
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0011
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0011
+//! @SYMAPI			DMMCSocket::Init();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		15/05/2008
+//! @SYMTestCaseDesc		Initialise Test - Allocate resources and initialise the MMC socket and associated stack object.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Allocate resources and initialise the MMC socket and associated stack object
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	MMC socket initialised with error KErrAlreadyExists.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT		MMCSDSession	mmcsdsession1
+		CREATE_OBJECT		MMCSDSocket	mmcsdsocket1
+		COMMAND			mmcsdsession1	NewL
+		COMMAND			mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0011-001-DriverOpen_command01
+		COMMAND			mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0011-001-NewL_command02
+		COMMAND	!Error=-11	mmcsdsocket1	Init
+		COMMAND			mmcsdsession1	Close
+		COMMAND			mmcsdsocket1	~
+		COMMAND			mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0011
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0012
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0012
+//! @SYMAPI			DMMCSocket::Init();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		15/05/2008
+//! @SYMTestCaseDesc		Initialise Test - Allocate resources and initialise the MMC socket and associated stack object.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Allocate resources and initialise the MMC socket and associated stack object
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	MMC socket initialised with error KErrInUse.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT		MMCSDSession	mmcsdsession1
+		CREATE_OBJECT		MMCSDSocket	mmcsdsocket1
+		COMMAND			mmcsdsession1	NewL
+		COMMAND			mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0011-001-DriverOpen_command01
+		COMMAND			mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0011-001-NewL_command02
+		COMMAND	!Error=-14	mmcsdsocket1	Init
+		COMMAND			mmcsdsession1	Close
+		COMMAND			mmcsdsocket1	~
+		COMMAND			mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0012
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0013
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0013
+//! @SYMAPI			DMMCSocket::InitiatePowerUpSequence();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		15/05/2008
+//! @SYMTestCaseDesc		Initiate Power Up Sequence Test - Initiate power up sequence on the stack.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Initiate power up sequence on the stack
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Power up sequence initiated with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0013-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0013-001-NewL_command02
+		COMMAND		mmcsdsocket1	InitiatePowerUpSequence
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0013
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0014
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0014
+//! @SYMAPI			DMMCSocket::Reset2();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Reset2 Test - Reset the socket and free up allocated resources, without powering down the stack first.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Reset the socket and free up allocated resources
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The socket is reset with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0014-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0014-001-NewL_command02
+		COMMAND		mmcsdsocket1	Reset2
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0014
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0015
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0015
+//! @SYMAPI			DMMCSocket::Stack(TInt);
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Stack Pointer Test - Get a pointer to a DMMCStack object, for invalid bus number.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get a pointer to a DMMCStack object for MMC card number -1
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The stack pointer is correctly returned.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0015-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0015-001-NewL_command02
+		COMMAND		mmcsdsocket1	Stack			BASE-BSP-MMC-SOCKET-DRIVER-0015-001-Stack_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0015
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0016
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0016
+//! @SYMAPI			DMMCSocket::Stack(TInt);
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Stack Pointer Test - Get a pointer to a DMMCStack object, for invalid bus number.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get a pointer to a DMMCStack object for MMC card number 5
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The stack pointer is returned as NULL.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0016-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0010-001-NewL_command02
+		COMMAND		mmcsdsocket1	Stack			BASE-BSP-MMC-SOCKET-DRIVER-0016-001-Stack_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0016
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0017
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0017
+//! @SYMAPI			DMMCSocket::ResetInactivity(TInt);
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		26/06/2008
+//! @SYMTestCaseDesc		Reset inactivity timer Test - Reset socket's PSU inactivity timer, for invalid bus number.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Reset socket's PSU inactivity timer for MMC card number -1
+//!				4. Verify the bus inactivity count
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	PSU inactivity timer is reset with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0017-001-DriverOpen_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0017-001-NewL_command03
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0017-001-NewL_command03
+		COMMAND		mmcsdsocket1	ResetInactivity		BASE-BSP-MMC-SOCKET-DRIVER-0017-001-ResetInactivity_command04
+		COMMAND		mmcsdpsu1	PsuInfo			BASE-BSP-MMC-SOCKET-DRIVER-0017-001-PsuInfo_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0017
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0018
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0018
+//! @SYMAPI			DMMCSocket::ResetInactivity(TInt);
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		26/06/2008
+//! @SYMTestCaseDesc		Reset inactivity timer Test - Reset socket's PSU inactivity timer, for invalid bus number.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Reset socket's PSU inactivity timer for MMC card number 5
+//!				4. Verify the bus inactivity count
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	PSU inactivity timer is reset with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0018-001-DriverOpen_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0018-001-NewL_command03
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0018-001-NewL_command03
+		COMMAND		mmcsdsocket1	ResetInactivity		BASE-BSP-MMC-SOCKET-DRIVER-0018-001-ResetInactivity_command04
+		COMMAND		mmcsdpsu1	PsuInfo			BASE-BSP-MMC-SOCKET-DRIVER-0018-001-PsuInfo_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0018
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0019
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0019
+//! @SYMAPI			DMMCSocket::AdjustPartialRead(const TMMCard{ptr}, TUint32, TUint32, TUint32{ptr}, TUint32{ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		26/06/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Calculate minimum range that must be read off card, using invalid inputs.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get pointer to card
+//!				4. Calculate minimum range that must be read off card, where aStart=0xFFFFFFFE and aEnd=0xFFFFFFFF
+//!				5. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Minimum range that must be read off card is correctly returned.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0019-001-DriverOpen_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0019-001-NewL_command03
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0019-001-NewL_command03
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-SOCKET-DRIVER-0019-001-CardP_command04
+		COMMAND		mmcsdsocket1	AdjustPartialRead	BASE-BSP-MMC-SOCKET-DRIVER-0019-001-AdjustPartialRead_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0019
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0020
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0020
+//! @SYMAPI			DMMCSocket::AdjustPartialRead(const TMMCard{ptr}, TUint32, TUint32, TUint32{ptr}, TUint32{ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		26/06/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Calculate minimum range that must be read off card, using invalid inputs.
+//! @SYMTestActions    		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get pointer to card
+//!				4. Calculate minimum range that must be read off card, where aStart=0 and aEnd=0xFFFFFFFF
+//!				5. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Minimum range that must be read off card is correctly returned.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0020-001-DriverOpen_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0020-001-NewL_command03
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0020-001-NewL_command03
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-SOCKET-DRIVER-0020-001-CardP_command04
+		COMMAND		mmcsdsocket1	AdjustPartialRead	BASE-BSP-MMC-SOCKET-DRIVER-0020-001-AdjustPartialRead_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0020
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0021
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0021
+//! @SYMAPI			DMMCSocket::AdjustPartialRead(const TMMCard{ptr}, TUint32, TUint32, TUint32{ptr}, TUint32{ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		26/06/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Calculate minimum range that must be read off card, using invalid inputs.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get pointer to card
+//!				4. Calculate minimum range that must be read off card, where aStart=aEnd
+//!				5. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Minimum range that must be read off card is correctly returned.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0021-001-DriverOpen_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0021-001-NewL_command03
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0021-001-NewL_command03
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-SOCKET-DRIVER-0021-001-CardP_command04
+		COMMAND		mmcsdsocket1	AdjustPartialRead	BASE-BSP-MMC-SOCKET-DRIVER-0021-001-AdjustPartialRead_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0021
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0022
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0022
+//! @SYMAPI			DMMCSocket::AdjustPartialRead(const TMMCard{ptr}, TUint32, TUint32, TUint32{ptr}, TUint32{ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		26/06/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Calculate minimum range that must be read off card, using invalid inputs.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get pointer to card
+//!				4. Calculate minimum range that must be read off card, where aStart>aEnd
+//!				5. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Minimum range that must be read off card is correctly returned.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0022-001-DriverOpen_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0022-001-NewL_command03
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0022-001-NewL_command03
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-SOCKET-DRIVER-0022-001-CardP_command04
+		COMMAND		mmcsdsocket1	AdjustPartialRead	BASE-BSP-MMC-SOCKET-DRIVER-0022-001-AdjustPartialRead_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0022
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0023
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0023
+//! @SYMAPI			DMMCSocket::PrepareStore(TInt, TInt, TLocalDrivePasswordData{ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		27/06/2008
+//! @SYMTestCaseDesc		Prepare Store Test - Prepare store so mappings can be allocated or deallocated.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Prepare store so mappings can be allocated or deallocated, using operation EPasswordLock
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Store is prepared with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0023-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0023-001-NewL_command02
+		COMMAND		mmcsdsocket1	PrepareStore		BASE-BSP-MMC-SOCKET-DRIVER-0023-001-PrepareStore_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0023
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0024
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0024
+//! @SYMAPI			DMMCSocket::PrepareStore(TInt, TInt, TLocalDrivePasswordData{ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		27/06/2008
+//! @SYMTestCaseDesc		Prepare Store Test - Prepare store so mappings can be allocated or deallocated.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Prepare store so mappings can be allocated or deallocated, using operation EPasswordUnlock
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Store is prepared with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0024-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0024-001-NewL_command02
+		COMMAND		mmcsdsocket1	PrepareStore		BASE-BSP-MMC-SOCKET-DRIVER-0024-001-PrepareStore_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0024
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0025
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0025
+//! @SYMAPI			DMMCSocket::PrepareStore(TInt, TInt, TLocalDrivePasswordData{ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		02/07/2008
+//! @SYMTestCaseDesc		Prepare Store Test - Prepare store so mappings can be allocated or deallocated, using NULL password.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Prepare store so mappings can be allocated or deallocated, using operation EPasswordLock and NULL password
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Store is prepared with error KErrAccessDenied.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT		MMCSDSession	mmcsdsession1
+		CREATE_OBJECT		MMCSDSocket	mmcsdsocket1
+		COMMAND			mmcsdsession1	NewL
+		COMMAND			mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0025-001-DriverOpen_command01
+		COMMAND			mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0025-001-NewL_command02
+		COMMAND	!Error=-21	mmcsdsocket1	PrepareStore		BASE-BSP-MMC-SOCKET-DRIVER-0025-001-PrepareStore_command03
+		COMMAND			mmcsdsession1	Close
+		COMMAND			mmcsdsocket1	~
+		COMMAND			mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0025
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0026
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0026
+//! @SYMAPI			DMMCSocket::PrepareStore(TInt, TInt, TLocalDrivePasswordData{ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		02/07/2008
+//! @SYMTestCaseDesc		Prepare Store Test - Prepare store so mappings can be allocated or deallocated, using NULL password.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Prepare store so mappings can be allocated or deallocated, using operation EPasswordClear and NULL password
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Store is prepared with error KErrAccessDenied.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT		MMCSDSession	mmcsdsession1
+		CREATE_OBJECT		MMCSDSocket	mmcsdsocket1
+		COMMAND			mmcsdsession1	NewL
+		COMMAND			mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0026-001-DriverOpen_command01
+		COMMAND			mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0026-001-NewL_command02
+		COMMAND	!Error=-21	mmcsdsocket1	PrepareStore		BASE-BSP-MMC-SOCKET-DRIVER-0026-001-PrepareStore_command03
+		COMMAND			mmcsdsession1	Close
+		COMMAND			mmcsdsocket1	~
+		COMMAND			mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0026
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0027
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0027
+//! @SYMAPI			DMMCSocket::PrepareStore(TInt, TInt, TLocalDrivePasswordData{ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		02/07/2008
+//! @SYMTestCaseDesc		Prepare Store Test - Prepare store so mappings can be allocated or deallocated, using NULL password.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Prepare store so mappings can be allocated or deallocated, using operation EPasswordUnlock and NULL password
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Store is prepared with error KErrLocked.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT		MMCSDSession	mmcsdsession1
+		CREATE_OBJECT		MMCSDSocket	mmcsdsocket1
+		COMMAND			mmcsdsession1	NewL
+		COMMAND			mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0027-001-DriverOpen_command01
+		COMMAND			mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0027-001-NewL_command02
+		COMMAND	!Error=-22	mmcsdsocket1	PrepareStore		BASE-BSP-MMC-SOCKET-DRIVER-0027-001-PrepareStore_command03
+		COMMAND			mmcsdsession1	Close
+		COMMAND			mmcsdsocket1	~
+		COMMAND			mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0027
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0028
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0028
+//! @SYMAPI			DMMCSocket::iStandby();
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Checks the Device Standby State
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Check the Device is in Standby mode
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Standby mode EFalse
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0028-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0028-001-NewL_command02
+		COMMAND		mmcsdsocket1	iStandby_Get		BASE-BSP-MMC-SOCKET-DRIVER-0028-001-iStandby_Get_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0028
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0029
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0029
+//! @SYMAPI			DMMCSocket::iType();
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Checks the card bus type
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Read the Bus type
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Bus type EPBusTypeNone
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-SOCKET-DRIVER-0029-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-SOCKET-DRIVER-0029-001-NewL_command02
+		COMMAND		mmcsdsocket1	iType_Get		BASE-BSP-MMC-SOCKET-DRIVER-0029-001-iType_Get_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0029
+
+START_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0030
+//! @SYMTestCaseID		BASE-BSP-MMC-SOCKET-DRIVER-0030
+//! @SYMAPI			FreeLogicalDevice(const TDesC {ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Free the Logical Device Driver
+//! @SYMTestActions		Free the D_MMCSDIF LDD Driver
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Displayed Power supply information.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	UnLoadDriver		BASE-BSP-MMC-SOCKET-DRIVER-0030-001-UnLoadDriver_command02
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-SOCKET-DRIVER-0030
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-MMC-STACK-DRIVER-MANUAL.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,174 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE	T_mmcsd -SharedData
+
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALStack-0001
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALStack-0001
+//! @SYMAPI			User::LoadLogicalDevice(const TDesC {ref});
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		17/04/2008
+//! @SYMTestCaseDesc		Load Logical Device Driver.
+//! @SYMTestActions    		Load D_MMCSDIF LDD Driver
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	KErrNone
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	LoadDriver		BASE-BSP-MMC-DRIVER-MANUALStack-0001-001-LoadDriver_command02
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALStack-0001
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALStack-0002
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALStack-0002
+//! @SYMAPI			DMMCStack::HasCardsPresent();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Has Cards Present Test - Test whether any cards are present on the stack.
+//! @SYMTestActions    		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get whether any cards are present on the stack
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Cards Present status correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-MANUALStack-0002-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-DRIVER-MANUALStack-0002-001-NewL_command02
+		COMMAND		mmcsdstack1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-MANUALStack-0002-001-PromptUser_command03
+		COMMAND 	mmcsdstack1	HasCardsPresent		BASE-BSP-MMC-DRIVER-MANUALStack-0002-001-HasCardsPresent_command04
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALStack-0002
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALStack-0003
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALStack-0003
+//! @SYMAPI			DMMCStack::Init();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		16/05/2008
+//! @SYMTestCaseDesc		Initialise test - Initialise the generic MMC stack
+//! @SYMTestActions 		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Initialise the generic MMC stack
+//!				4. Ask user to eject and reinsert card
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	MMC stack initialised with no error.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-MANUALStack-0003-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-DRIVER-MANUALStack-0003-001-NewL_command02
+		COMMAND		mmcsdstack1	Init
+		COMMAND		mmcsdstack1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-MANUALStack-0003-001-PromptUser_command04
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALStack-0003
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALStack-0004
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALStack-0004
+//! @SYMAPI			DMMCStack::Init();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		16/05/2008
+//! @SYMTestCaseDesc		Initialise test - Initialise the generic MMC stack
+//! @SYMTestActions 		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Initialise the generic MMC stack
+//!				4. Ask user to eject and reinsert card
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	MMC stack initialised with error KErrInUse.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER-MANUAL.ini
+		CREATE_OBJECT		MMCSDSession	mmcsdsession1
+		CREATE_OBJECT		MMCSDStack	mmcsdstack1
+		COMMAND			mmcsdsession1	NewL
+		COMMAND			mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-MANUALStack-0004-001-DriverOpen_command01
+		COMMAND			mmcsdstack1	NewL			BASE-BSP-MMC-DRIVER-MANUALStack-0004-001-NewL_command02
+		COMMAND	!Error=-14	mmcsdstack1	Init
+		COMMAND			mmcsdstack1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-MANUALStack-0004-001-PromptUser_command04
+		COMMAND			mmcsdsession1	Close
+		COMMAND			mmcsdstack1	~
+		COMMAND			mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALStack-0004
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALStack-0005
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALStack-0005
+//! @SYMAPI			DMMCStack::HasCardsPresent();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Has Cards Present Test - Test whether any cards are present on the stack.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get whether any cards are present on the stack
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Cards Present status correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-DRIVER-MANUALStack-0005-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-DRIVER-MANUALStack-0005-001-NewL_command02
+		COMMAND		mmcsdstack1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-MANUALStack-0005-001-PromptUser_command03
+		COMMAND		mmcsdstack1	HasCardsPresent		BASE-BSP-MMC-DRIVER-MANUALStack-0005-001-HasCardsPresent_command04
+		COMMAND		mmcsdstack1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-MANUALStack-0005-001-PromptUser_command05
+		COMMAND		mmcsdstack1	HasCardsPresent		BASE-BSP-MMC-DRIVER-MANUALStack-0005-001-HasCardsPresent_command06
+		COMMAND		mmcsdstack1	utilityPromptMessage	BASE-BSP-MMC-DRIVER-MANUALStack-0005-001-PromptUser_command07
+		COMMAND		mmcsdstack1	HasCardsPresent		BASE-BSP-MMC-DRIVER-MANUALStack-0005-001-HasCardsPresent_command08
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALStack-0005
+
+START_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALStack-0006
+//! @SYMTestCaseID		BASE-BSP-MMC-DRIVER-MANUALStack-0006
+//! @SYMAPI			FreeLogicalDevice(const TDesC {ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		17/04/2008
+//! @SYMTestCaseDesc		Free the Logical Device Driver
+//! @SYMTestActions		Free the D_MMCSDIF LDD Driver
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	logical device driver unloaded.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	UnLoadDriver		BASE-BSP-MMC-DRIVER-MANUALStack-0006-001-UnloadDriver_command02
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-DRIVER-MANUALStack-0006
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-MMC-STACK-DRIVER.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1018 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE	T_mmcsd -SharedData
+
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0001
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0001
+//! @SYMAPI			User::LoadLogicalDevice(const TDesC {ref});
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		17/04/2008
+//! @SYMTestCaseDesc		Load Logical Device Driver.
+//! @SYMTestActions		Load D_MMCSDIF LDD Driver
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	LoadDriver		BASE-BSP-MMC-STACK-DRIVER-0001-001-LoadDriver_command02
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0001
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0002
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0002
+//! @SYMAPI			DPBusSocket::PowerUp();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/08/2008
+//! @SYMTestCaseDesc		Powers up the socket
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get state of the socket
+//!				4. Power up the socket
+//!				5. Get state of the socket
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Socket successfully powered up with no error
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0002-001-DriverOpen_command02
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0002-001-NewL_command03
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-STACK-DRIVER-0002-001-NewL_command03
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-MMC-STACK-DRIVER-0002-001-NewL_command03
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0002-001-CardP_command04
+		COMMAND		mmcsdsocket1	iState_Get		BASE-BSP-MMC-STACK-DRIVER-0002-001-iState_Get_command05
+		COMMAND		mmcsdpsu1 	VccState  		BASE-BSP-MMC-STACK-DRIVER-0002-001-VccState_command06
+		COMMAND		mmcsdpsu1 	SetState  		BASE-BSP-MMC-STACK-DRIVER-0002-001-SetState_command07
+		COMMAND		mmcsdpsu1 	VccState  		BASE-BSP-MMC-STACK-DRIVER-0002-001-VccState_command08
+		COMMAND		mmcsdsocket1	iState_Get		BASE-BSP-MMC-STACK-DRIVER-0002-001-iState_Get_command09
+		COMMAND		mmcsdsocket1	PowerUp
+		OUTSTANDING
+		COMMAND		mmcsdsocket1	iState_Get		BASE-BSP-MMC-STACK-DRIVER-0002-001-iState_Get_command11
+		COMMAND		mmcsdpsu1	VccState		BASE-BSP-MMC-STACK-DRIVER-0002-001-VccState_command12
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0002
+
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0003
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0003
+//! @SYMAPI			DMMCStack::PasswordStore();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		17/06/2008
+//! @SYMTestCaseDesc		Write to / Read from Password Store.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Write to Password Store
+//!				5. Read from Password Store
+//!				6. Write to Password Store
+//!				7. Read from Password Store
+//!				8. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Password store written to / read from with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0003-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0003-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0003-001-CardP_command03
+		COMMAND		mmcsdstack1	WritePasswordStore	BASE-BSP-MMC-STACK-DRIVER-0003-001-WritePasswordStore_command04
+		COMMAND		mmcsdstack1	ReadPasswordStore	BASE-BSP-MMC-STACK-DRIVER-0003-001-ReadPasswordStore_command05
+		COMMAND		mmcsdstack1	WritePasswordStore	BASE-BSP-MMC-STACK-DRIVER-0003-001-WritePasswordStore_command06
+		COMMAND		mmcsdstack1	ReadPasswordStore	BASE-BSP-MMC-STACK-DRIVER-0003-001-ReadPasswordStore_command07
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0003
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0004
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0004
+//! @SYMAPI			DMMCSession::SetupCIMReadBlock(TMMCArgument, TUint32, TUint8 {ptr});
+//!				DMMCSession::SetupCIMWriteBlock(TMMCArgument, TUint32, TUint8 {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/07/2008
+//! @SYMTestCaseDesc		Concurrent read/write sector test.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Write to sector 12 of the card
+//!				5. Read from sector 12 of the card and verify contents
+//!				6. Write to sector 13 of the card
+//!				7. Read from sector 13 of the card and verify contents
+//!				8. Write to sector 14 of the card
+//!				9. Read from sector 14 of the card and verify contents
+//!				10. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Sectors correctly written and read with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0004-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0004-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0004-001-CardP_command03
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-MMC-STACK-DRIVER-0004-001-WriteSector_command04
+		OUTSTANDING
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-MMC-STACK-DRIVER-0004-001-ReadSector_command05
+		OUTSTANDING
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-MMC-STACK-DRIVER-0004-001-WriteSector_command06
+		OUTSTANDING
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-MMC-STACK-DRIVER-0004-001-ReadSector_command07
+		OUTSTANDING
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-MMC-STACK-DRIVER-0004-001-WriteSector_command08
+		OUTSTANDING
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-MMC-STACK-DRIVER-0004-001-ReadSector_command09
+		OUTSTANDING
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0004
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0005
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0005
+//! @SYMAPI			DMMCSession::SetupCIMWriteBlock(TMMCArgument, TUint32, TUint8 {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/07/2008
+//! @SYMTestCaseDesc		Multiple write sector test.
+//! @SYMTestActions    		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Write to sector 12 of the card
+//!				5. Write to sector 13 of the card
+//!				6. Write to sector 13 of the card
+//!				7. Read from sector 12 of the card and verify contents
+//!				8. Read from sector 13 of the card and verify contents
+//!				9. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Sectors correctly written with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0005-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0005-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0005-001-CardP_command03
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-MMC-STACK-DRIVER-0005-001-WriteSector_command04
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-MMC-STACK-DRIVER-0005-001-WriteSector_command05
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-MMC-STACK-DRIVER-0005-001-WriteSector_command06
+		OUTSTANDING
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-MMC-STACK-DRIVER-0005-001-ReadSector_command07
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-MMC-STACK-DRIVER-0005-001-ReadSector_command08
+		OUTSTANDING
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0005
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0006
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0006
+//! @SYMAPI			DMMCSession::SetupCIMReadBlock(TMMCArgument, TUint32, TUint8 {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		17/04/2008
+//! @SYMTestCaseDesc		Multiple read sector test.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Write to sector 12 of the card
+//!				5. Write to sector 13 of the card
+//!				6. Read from sector 12 of the card and verify contents
+//!				7. Read from sector 13 of the card and verify contents
+//!				8. Read from sector 13 of the card and verify contents
+//!				9. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	All sectors read correctly with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0006-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0006-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0006-001-CardP_command03
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-MMC-STACK-DRIVER-0006-001-WriteSector_command04
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-MMC-STACK-DRIVER-0006-001-WriteSector_command05
+		OUTSTANDING
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-MMC-STACK-DRIVER-0006-001-ReadSector_command06
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-MMC-STACK-DRIVER-0006-001-ReadSector_command07
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-MMC-STACK-DRIVER-0006-001-ReadSector_command08
+		OUTSTANDING
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0006
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0007
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0007
+//! @SYMAPI			DMMCStack::AdjustPartialRead(const TMMCard {ptr}, TUint32, TUint32, TUint32{ptr}, TUint32 {ptr});
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		28/04/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Get minimum range that must be read off card.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Get minimum range that must be read off card
+//!				5. Get minimum range that must be read off card
+//!				6. Get minimum range that must be read off card
+//!				7. Get minimum range that must be read off card
+//!				8. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The minimum range that must be read off card is correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0007-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0007-001-NewL_command02
+		COMMAND 	mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0007-001-CardP_command03
+		COMMAND 	mmcsdstack1 	AdjustPartialRead	BASE-BSP-MMC-STACK-DRIVER-0007-001-AdjustPartialRead_command04
+		COMMAND 	mmcsdstack1 	AdjustPartialRead	BASE-BSP-MMC-STACK-DRIVER-0007-001-AdjustPartialRead_command05
+		COMMAND 	mmcsdstack1 	AdjustPartialRead	BASE-BSP-MMC-STACK-DRIVER-0007-001-AdjustPartialRead_command06
+		COMMAND 	mmcsdstack1 	AdjustPartialRead	BASE-BSP-MMC-STACK-DRIVER-0007-001-AdjustPartialRead_command07
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0007
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0008
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0008
+//! @SYMAPI			DMMCStack::HasSessionsQueued();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Has Sessions Queued Test - Get whether any of the session queues have submitted session engaged.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get whether any of the session queues have submitted session engaged
+//!				4. Select the card
+//!				5. Write to sector 7 of the card
+//!				6. Get whether any of the session queues have submitted session engaged
+//!				7. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Sessions Queued status correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0008-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0008-001-NewL_command02
+		COMMAND		mmcsdstack1 	HasSessionsQueued	BASE-BSP-MMC-STACK-DRIVER-0008-001-HasSessionsQueued_command03
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0008-001-CardP_command04
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-MMC-STACK-DRIVER-0008-001-WriteSector_command05
+		COMMAND		mmcsdstack1 	HasSessionsQueued	BASE-BSP-MMC-STACK-DRIVER-0008-001-HasSessionsQueued_command06
+		OUTSTANDING
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0008
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0009
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0009
+//! @SYMAPI			DMMCStack::EffectiveModes();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		28/06/2008
+//! @SYMTestCaseDesc		Effective modes tests
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				4. Remove mode
+//!				5. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				6. Set Bus Clock mode
+//!				7. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				8. Set Busy TimeOut mode
+//!				9. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				10. Set CRC Retries mode
+//!				11. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				12. Set Data TimeOut mode
+//!				13. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				14. Set mode
+//!				15. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				16. Set Op Cond Busy Timeout mode
+//!				17. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				18. Set Poll Attempts mode
+//!				19. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				20. Set Response TimeOut In Ticks mode
+//!				21. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				22. Set Ticks Clock In mode
+//!				23. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				24. Set Ticks Clock Out mode
+//!				25. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				26. Set TimeOut Retries mode
+//!				27. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				28. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	EffectiveModes altered correctly with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd					\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen				BASE-BSP-MMC-STACK-DRIVER-0009-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL					BASE-BSP-MMC-STACK-DRIVER-0009-001-NewL_command02
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command03
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command04
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command05
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command06
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command07
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command08
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command09
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command10
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command11
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command12
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command13
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command14
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command15
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command16
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command17
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command18
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command19
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command20
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command21
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command22
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command23
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command24
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command25
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command26
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command27
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0009
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0010
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0010
+//! @SYMAPI			DMMCStack::CardP();
+//! @SYMAuthor			M Flowers
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Negative test for select card - calls DMMCStackCardP with an invalid card number
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select an invalid card
+//!				4. Write to a sector of the card
+//!				5. Select an invalid card
+//!				6. Write to a sector of the card
+//!				7. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	CardP returns NULL and WriteSector returns KErrNotReady
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT		MMCSDSession	mmcsdsession1
+		CREATE_OBJECT		MMCSDStack	mmcsdstack1
+		COMMAND			mmcsdsession1	NewL
+		COMMAND			mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0010-001-DriverOpen_command01
+		COMMAND			mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0010-001-NewL_command02
+		COMMAND			mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0010-001-CardP_command03
+		COMMAND	!AsyncError=-18	mmcsdstack1	WriteSector		BASE-BSP-MMC-STACK-DRIVER-0010-001-WriteSector_command04
+		OUTSTANDING
+		COMMAND 		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0010-001-CardP_command05
+		COMMAND	!AsyncError=-18	mmcsdstack1	WriteSector		BASE-BSP-MMC-STACK-DRIVER-0010-001-WriteSector_command06
+		OUTSTANDING
+		COMMAND			mmcsdsession1	Close
+		COMMAND			mmcsdstack1	~
+		COMMAND			mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0010
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0011
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0011
+//! @SYMAPI			TMMCard::CSD();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		15/07/2008
+//! @SYMTestCaseDesc		CSD Test - Read the CSD
+//! @SYMTestActions    		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Read the CSD
+//!				7. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	CSD correctly returned with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0011-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0011-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0011-001-CardP_command03
+		COMMAND		mmcsdstack1	ReadCSD
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0011
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0012
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0012
+//! @SYMAPI			DMMCSession::SetupCIMReadBlock(TMMCArgument, TUint32, TUint8 {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		15/07/2008
+//! @SYMTestCaseDesc		Multiple read/write sector test.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Write to a sector of the card
+//!				5. Read from a sector of the card
+//!				6. Write to a sector of the card
+//!				7. Read from a sector of the card
+//!				8. Write to a sector of the card
+//!				9. Read from a sector of the card
+//!				10. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Sectors correctly written and read with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0012-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0012-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0012-001-CardP_command03
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-MMC-STACK-DRIVER-0012-001-WriteSector_command04
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-MMC-STACK-DRIVER-0012-001-ReadSector_command05
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-MMC-STACK-DRIVER-0012-001-WriteSector_command06
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-MMC-STACK-DRIVER-0012-001-ReadSector_command07
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-MMC-STACK-DRIVER-0012-001-WriteSector_command08
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-MMC-STACK-DRIVER-0012-001-ReadSector_command09
+		OUTSTANDING
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0012
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0013
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0013
+//! @SYMAPI			TMMCard::ExtendedCSD();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		15/07/2008
+//! @SYMTestCaseDesc		Extended CSD Test - Read the Extended CSD
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Read the Extended CSD
+//!				7. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	CSD correctly returned with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0013-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0013-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0013-001-CardP_command03
+		COMMAND		mmcsdstack1	ReadExtCSD
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0013
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0014
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0014
+//! @SYMAPI			DMMCStack::CardP(TUint);
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		30/04/2008
+//! @SYMTestCaseDesc		Card Pointer Test - Get pointer to a card.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get pointer to card
+//!				4. Get card info
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Pointer to card correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0014-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0014-001-NewL_command02
+		COMMAND 	mmcsdstack1 	CardP			BASE-BSP-MMC-STACK-DRIVER-0014-001-CardP_command03
+		COMMAND 	mmcsdstack1 	CardInfo		BASE-BSP-MMC-STACK-DRIVER-0014-001-CardInfo_command04
+		COMMAND 	mmcsdstack1 	CardIsPresent		BASE-BSP-MMC-STACK-DRIVER-0014-001-CardIsPresent_command05
+		COMMAND 	mmcsdstack1 	CardIsReady		BASE-BSP-MMC-STACK-DRIVER-0014-001-CardIsReady_command06
+		COMMAND 	mmcsdstack1 	CardIsLocked		BASE-BSP-MMC-STACK-DRIVER-0014-001-CardIsLocked_command07
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0014
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0015
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0015
+//! @SYMAPI			DMMCStack::CardP(TUint);
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/07/2008
+//! @SYMTestCaseDesc		Card Pointer Test - Get pointer to a card using invalid card numbers.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get pointer to card with correct card number
+//!				4. Get pointer to card with card number -1
+//!				5. Get pointer to card with card number 5
+//!				6. Get pointer to card with correct card number
+//!				7. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Pointer to card correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0015-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0015-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0015-001-CardP_command03
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0015-001-CardP_command04
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0015-001-CardP_command05
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0015-001-CardP_command06
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0015
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0016
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0016
+//! @SYMAPI			DMMCStack::MaxCardsInStack();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		02/05/2008
+//! @SYMTestCaseDesc		Max Cards In Stack Test - Get the max number of MultiMediaCards which could ever be present.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get the max number of MultiMediaCards which could ever be present
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Correct max number of MMC cards returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0016-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0016-001-NewL_command02
+		COMMAND		mmcsdstack1	MaxCardsInStack		BASE-BSP-MMC-STACK-DRIVER-0016-001-MaxCardsInStack_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0016
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0017
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0017
+//! @SYMAPI			DMMCStack::MMCSocket();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		02/05/2008
+//! @SYMTestCaseDesc		Socket Pointer Test - Get pointer to associated socket.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get pointer to associated socket
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Pointer to socket correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0017-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0017-001-NewL_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-MMC-STACK-DRIVER-0017-001-NewL_command02
+		COMMAND		mmcsdstack1	MMCSocket		BASE-BSP-MMC-STACK-DRIVER-0017-001-Socket_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0017
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0018
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0018
+//! @SYMAPI			DMMCStack::InitStackInProgress();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Init Stack In Progress Test - Get initialisation state of the stack.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get initialisation state of the stack
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Initialisation state of the stack correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0018-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0018-001-NewL_command02
+		COMMAND		mmcsdstack1	InitStackInProgress	BASE-BSP-MMC-STACK-DRIVER-0018-001-InitStackInProgress_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-MMC-STACK-DRIVER-0018
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0019
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0019
+//! @SYMAPI			DMMCStack::BufferInfo(TUint8 {ptr ref}, TInt {ref}, TInt {ref});
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		30/04/2008
+//! @SYMTestCaseDesc		Buffer Info Test - Retrieve the DMA-capable buffer start and length and calculate the minor buffer length.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Retrieve the DMA-capable buffer start and length and calculate the minor buffer length
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Buffer info correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0019-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0019-001-NewL_command02
+		COMMAND		mmcsdstack1	BufferInfo		BASE-BSP-MMC-STACK-DRIVER-0019-001-BufferInfo_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0019
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0020
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0020
+//! @SYMAPI			DMMCStack::ProgramPeriodInMilliSeconds();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Poll timer period Test - Get the poll timer period.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get the poll timer period
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The poll timer period is correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0020-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0020-001-NewL_command02
+		COMMAND 	mmcsdstack1 	ProgramPeriodMs		BASE-BSP-MMC-STACK-DRIVER-0020-001-ProgramPeriodMs_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0020
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0021
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0021
+//! @SYMAPI			DMMCStack:: GetBufferInfo(TUint8 {ptr ptr}, TInt {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		17/04/2008
+//! @SYMTestCaseDesc		Get Buffer Info Test - Get details of buffer allocated by socket for data transfer operations.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get details of buffer allocated by socket for data transfer operations
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Details of buffer correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0021-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0021-001-NewL_command02
+		COMMAND		mmcsdstack1	GetBufferInfo		BASE-BSP-MMC-STACK-DRIVER-0021-001-GetBufferInfo_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0021
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0022
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0022
+//! @SYMAPI			DMMCStack::MachineInfo(TMMCMachineInfo {ref});
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Machine Info Test - Get the platform specific configuration information.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get the platform specific configuration information
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Platform specific configuration information correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0022-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0022-001-NewL_command02
+		COMMAND		mmcsdstack1	MachineInfo		BASE-BSP-MMC-STACK-DRIVER-0022-001-MachineInfo_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0022
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0023
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0023
+//! @SYMAPI			DMMCStack::DemandPagingInfo(TDemandPagingInfo {ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		18/04/2008
+//! @SYMTestCaseDesc		Demand Paging Info Test - Demand paging info.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Demand paging info
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Paging info obtained with KErrNotSupported.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT		MMCSDSession	mmcsdsession1
+		CREATE_OBJECT		MMCSDStack	mmcsdstack1
+		COMMAND			mmcsdsession1	NewL
+		COMMAND			mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0023-001-DriverOpen_command01
+		COMMAND			mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0023-001-NewL_command02
+		COMMAND	!Error=-5	mmcsdstack1	DemandPagingInfo
+		COMMAND			mmcsdsession1	Close
+		COMMAND			mmcsdstack1	~
+		COMMAND			mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0023
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0024
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0024
+//! @SYMAPI			DMMCStack::AllocSession(const TMMCCallBack {ref});
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		29/04/2008
+//! @SYMTestCaseDesc		Allocate Session Test
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Allocate Session
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Session allocated with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0024-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0024-001-NewL_command02
+		COMMAND		mmcsdstack1	AllocSession
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0024
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0025
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0025
+//! @SYMAPI			DMMCStack::AdjustPartialRead(const TMMCard {ptr}, TUint32, TUint32, TUint32{ptr}, TUint32 {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		28/07/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Get minimum range that must be read off card using invalid inputs.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Get minimum range that must be read off card, where aStart=0xFFFFFFFE and aEnd=0xFFFFFFFF
+//!				8. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The minimum range that must be read off card is correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0025-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0025-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0025-001-CardP_command03
+		COMMAND		mmcsdstack1	AdjustPartialRead	BASE-BSP-MMC-STACK-DRIVER-0025-001-AdjustPartialRead_command04
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0025
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0026
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0026
+//! @SYMAPI			DMMCStack::AdjustPartialRead(const TMMCard {ptr}, TUint32, TUint32, TUint32{ptr}, TUint32 {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		28/07/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Get minimum range that must be read off card using invalid inputs.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Get minimum range that must be read off card, where aStart=0 and aEnd=0xFFFFFFFF
+//!				8. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The minimum range that must be read off card is correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0026-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0026-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0026-001-CardP_command03
+		COMMAND		mmcsdstack1	AdjustPartialRead	BASE-BSP-MMC-STACK-DRIVER-0026-001-AdjustPartialRead_command04
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0026
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0027
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0027
+//! @SYMAPI			DMMCStack::AdjustPartialRead(const TMMCard {ptr}, TUint32, TUint32, TUint32{ptr}, TUint32 {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		28/07/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Get minimum range that must be read off card using invalid inputs.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Get minimum range that must be read off card, where where aStart=aEnd
+//!				8. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The minimum range that must be read off card is correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0027-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0027-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0027-001-CardP_command03
+		COMMAND		mmcsdstack1	AdjustPartialRead	BASE-BSP-MMC-STACK-DRIVER-0027-001-AdjustPartialRead_command04
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0027
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0028
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0028
+//! @SYMAPI			DMMCStack::AdjustPartialRead(const TMMCard {ptr}, TUint32, TUint32, TUint32{ptr}, TUint32 {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		28/07/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Get minimum range that must be read off card using invalid inputs.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Get minimum range that must be read off card, where where aStart>aEnd
+//!				8. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The minimum range that must be read off card is correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0028-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0028-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-MMC-STACK-DRIVER-0028-001-CardP_command03
+		COMMAND		mmcsdstack1	AdjustPartialRead	BASE-BSP-MMC-STACK-DRIVER-0028-001-AdjustPartialRead_command04
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0028
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0029
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0029
+//! @SYMAPI			DMMCStack::ReportPowerUp();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		19/05/2008
+//! @SYMTestCaseDesc		ReportPowerUp
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Report that that power up operation has successfully completed.
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Power up reported with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0029-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0029-001-NewL_command02
+		COMMAND		mmcsdstack1	ReportPowerUp
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0029
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0030
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0030
+//! @SYMAPI			DMMCStack::ReportPowerDown();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		19/05/2008
+//! @SYMTestCaseDesc		ReportPowerDown
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Report that that power down operation has successfully completed.
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Power down reported with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-MMC-STACK-DRIVER-0030-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-MMC-STACK-DRIVER-0030-001-NewL_command02
+		COMMAND		mmcsdstack1	ReportPowerDown
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0030
+
+START_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0031
+//! @SYMTestCaseID		BASE-BSP-MMC-STACK-DRIVER-0031
+//! @SYMAPI			FreeLogicalDevice(const TDesC {ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		17/04/2008
+//! @SYMTestCaseDesc		Free the Logical Device Driver
+//! @SYMTestActions		Free the D_MMCSDIF LDD Driver
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	logical device driver unloaded.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-MMC-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	UnLoadDriver		BASE-BSP-MMC-STACK-DRIVER-0031-001-UnloadDriver_command03
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-MMC-STACK-DRIVER-0031
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,159 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE	T_mmcsd
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALMediaChange-0001
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALMediaChange-0001
+//! @SYMTestCaseDesc		Load Logical Device Driver.
+//! @SYMTestPriority		high
+//! @SYMTestActions		Load D_MMCSDIF LDD Driver
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		6/5/2008
+//! @SYMAuthor		Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			User::LoadLogicalDevice(const TDesC {ref});
+	START_TEST_BLOCK	100			T_mmcsd			\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		LoadDriver		BASE-BSP-SD-DRIVER-LDDName-CMD0001
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MANUALMediaChange-0001
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALMediaChange-0002
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALMediaChange-0002
+//! @SYMTestCaseDesc		Checks the Door State and Validate
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Open the Driver handle
+//!				2. Checks the Current Door State.
+//!				3. Display Door State.
+//!				4. Test door closed?
+//!				5. Validate Door States.
+//!				6. Close the driver handle
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		6/5/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCMediaChange::DoDoorOpen();
+//!				DMMCMediaChange::DoDoorClosed()
+//!				DMMCSocket::iDoorOpened()
+	START_TEST_BLOCK	500			T_mmcsd			\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		CREATE_OBJECT	MMCSDMediaChange	mmcsdmediachange1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdmediachange1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdmediachange1	utilityPromptMessage	BASE-BSP-SD-DRIVER-Message1-CMD0002
+		COMMAND		mmcsdmediachange1	MediaState		BASE-BSP-SD-DRIVER-MediaState-CMD0002
+		COMMAND		mmcsdsession1		Close
+		COMMAND		mmcsdmediachange1	~
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MANUALMediaChange-0002
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALMediaChange-0003
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALMediaChange-0003
+//! @SYMTestCaseDesc		Checks the Door State and Validate
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Open the Driver handle
+//!				2. Checks the Current Door State.
+//!				3. Display Door State.
+//!				4. Test door opened?
+//!				5. Validate Door States.
+//!				6. Close the driver handle
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		6/5/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCMediaChange::DoDoorOpen();
+//!				DMMCMediaChange::DoDoorClosed()
+//!				DMMCSocket::iDoorOpened()
+	START_TEST_BLOCK	500			T_mmcsd			\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		CREATE_OBJECT	MMCSDMediaChange	mmcsdmediachange1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdmediachange1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdmediachange1	utilityPromptMessage	BASE-BSP-SD-DRIVER-Message1-CMD0003
+		COMMAND		mmcsdmediachange1	MediaState		BASE-BSP-SD-DRIVER-MediaState-CMD0003
+		COMMAND		mmcsdmediachange1	utilityPromptMessage	BASE-BSP-SD-DRIVER-Message2-CMD0003
+		COMMAND		mmcsdsession1		Close
+		COMMAND		mmcsdmediachange1	~
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MANUALMediaChange-0003
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALMediaChange-0004
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALMediaChange-0004
+//! @SYMTestCaseDesc		Checks the Door State and Validate
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Open the Driver handle
+//!				2. Checks the Current Door State.
+//!				3. Display Door State.
+//!				4. Test door opened?
+//!				5. Validate Door States.
+//!				6. Close the driver handle
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		6/5/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCMediaChange::ForceMediaChange();
+//!				DMMCMediaChange::DoDoorClosed();
+//!				DMMCMediaChange::DoDoorOpen();
+	START_TEST_BLOCK	500	 		T_mmcsd			\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		CREATE_OBJECT	MMCSDMediaChange	mmcsdmediachange1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdmediachange1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdmediachange1	utilityPromptMessage	BASE-BSP-SD-DRIVER-Message1-CMD0004
+		COMMAND		mmcsdmediachange1 	MediaState	 	BASE-BSP-SD-DRIVER-MediaState-CMD0004
+		COMMAND		mmcsdmediachange1	ForceMediaChange
+		COMMAND		mmcsdmediachange1 	MediaState		BASE-BSP-SD-DRIVER-ForcedMediaState-CMD0004
+		COMMAND		mmcsdsession1		Close
+		COMMAND		mmcsdmediachange1	~
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MANUALMediaChange-0004
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALMediaChange-0005
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALMediaChange-0005
+//! @SYMTestCaseDesc		UnLoad Logical Device Driver.
+//! @SYMTestPriority		high
+//! @SYMTestActions		Load D_MMCSDIF LDD Driver
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			User::FreeLogicalDevice(const TDesC {ref})
+	START_TEST_BLOCK	100	 		T_mmcsd			\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		UnLoadDriver		BASE-BSP-SD-DRIVER-LDDName-CMD0001
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE    		BASE-BSP-SD-DRIVER-MANUALMediaChange-0005
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-SD-MEDIACHANGE-DRIVER.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,113 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE	T_mmcsd
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MediaChange-0001
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MediaChange-0001
+//! @SYMTestCaseDesc		Load Logical Device Driver.
+//! @SYMTestPriority		high
+//! @SYMTestActions		Load D_MMCSDIF LDD Driver
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		6/5/2008
+//! @SYMAuthor		Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI		User::LoadLogicalDevice(const TDesC {ref});
+	START_TEST_BLOCK	100			T_mmcsd			\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		LoadDriver		BASE-BSP-SD-DRIVER-LDDName-CMD0001
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MediaChange-0001
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MediaChange-0002
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MediaChange-0002
+//! @SYMTestCaseDesc		Reads the Media Status
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Open the Driver handle
+//!				2. Checks the Current Media State.
+//!				3. Display Door Opened or Closed.
+//!				4. Close the driver handle
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		6/5/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCMediaChange::MediaState();
+	START_TEST_BLOCK	100			T_mmcsd			\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		CREATE_OBJECT	MMCSDMediaChange	mmcsdmediachange1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdmediachange1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdmediachange1	MediaState		BASE-BSP-SD-DRIVER-MediaState-CMD0002
+		COMMAND		mmcsdsession1		Close
+		COMMAND		mmcsdmediachange1	~
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MediaChange-0002
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MediaChange-0003
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MediaChange-0003
+//! @SYMTestCaseDesc		Count of media events yet to be acknowledged
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Open the Driver handle
+//!				2. Read the Replay count value
+//!				3. Validate the count
+//!				4. Close the driver handle
+//! @SYMTestExpectedResults	Replay Count
+//! @SYMTestType		CIT
+//! @SYMCreationDate		6/5/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCMediaChange::iReplyCount()
+	START_TEST_BLOCK	100	 		T_mmcsd			\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		CREATE_OBJECT	MMCSDMediaChange	mmcsdmediachange1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdmediachange1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdmediachange1	ReplayCount		BASE-BSP-SD-DRIVER-ReplayEventCount-CMD0003
+		COMMAND		mmcsdsession1		Close
+		COMMAND		mmcsdmediachange1	~
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MediaChange-0003
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MediaChange-0004
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MediaChange-0004
+//! @SYMTestCaseDesc		UnLoad Logical Device Driver.
+//! @SYMTestPriority		high
+//! @SYMTestActions		Load D_MMCSDIF LDD Driver
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			User::FreeLogicalDevice(const TDesC {ref})
+	START_TEST_BLOCK	100	 		T_mmcsd			\base\mmcsd\BASE-BSP-SD-MEDIACHANGE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession		mmcsdsession1
+		COMMAND		mmcsdsession1		NewL
+		COMMAND		mmcsdsession1		UnLoadDriver		BASE-BSP-SD-DRIVER-LDDName-CMD0001
+		COMMAND		mmcsdsession1		~
+	END_TEST_BLOCK
+END_TESTCASE		BASE-BSP-SD-DRIVER-MediaChange-0004
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-SD-PSU-DRIVER.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,344 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE	T_mmcsd
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0001
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsu-0001
+//! @SYMTestCaseDesc		Load MMC/SD Logical Device Driver
+//! @SYMTestPriority		high
+//! @SYMTestActions		Load  D_MMCSDIF LDD Driver
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			User::LoadLogicalDevice(const TDesC {ref});
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	LoadDriver		BASE-BSP-SD-DRIVER-LDDName-CMD0001
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0001
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0002
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsu-0002
+//! @SYMTestCaseDesc		MMC/SD Power Supply Test - Display the MMC/SD card Bus inactivity Timeout
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the bus inactivity count
+//!				5. Display the bus inactivity count
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed the bus inactivity count
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCPsu::PsuInfo(TPBusPsuInfo {ref});
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsu1	PsuInfo			BASE-BSP-SD-DRIVER-PsuInfo-CMD002
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0002
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0003
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsu-0003
+//! @SYMTestCaseDesc		MMC/SD Power Supply Test - Set the supported voltage setting to be used when the stack is next powered up
+//!				the voltage level, or range of voltages supported in OCR format
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Set the voltages supported in OCR format
+//!				5. Display voltages supported in OCR format
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	KErrNotSupported
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCPsu::DoSetVoltage();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsu1	SetVoltage		BASE-BSP-SD-DRIVER-Supported-PSUVoltageOCR-CMD0003
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0003
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0004
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsu-0004
+//! @SYMTestCaseDesc		MMC/SD Power Supply Test - Set the MMC/SD card Current VCC state as OFF
+//!				Uses API elements:
+//!				DMMCPsu::iVcc()
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Set the MMC/SD card Current VCC state
+//!				5. Display Current VCC state
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	VCC state Displayed OFF
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCPsu::SetState(TPBusPsuState);
+//!				DMMCSocket::{DPBusPsuBase {ptr}}iVcc
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsu1	SetState		BASE-BSP-SD-DRIVER-VccStateOFF-CMD0004
+		COMMAND		mmcsdpsu1	VccState		BASE-BSP-SD-DRIVER-VccStateOFF-CMD0004
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0004
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0005
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsu-0005
+//! @SYMTestCaseDesc		MMC/SD Power Supply Test - Set the MMC/SD card VCC state as EPsuOnCurLimit
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Set the MMC/SD card Current VCC state EPsuOnCurLimit
+//!				5. Display Current PSU state
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Current VCC state Displayed
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCPsu::SetState(TPBusPsuState);
+//!				DMMCSocket::{DPBusPsuBase {ptr}}iVcc
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsu1	SetState		BASE-BSP-SD-DRIVER-VccStatePsuOnCurLimit-CMD0005
+		COMMAND		mmcsdpsu1	VccState		BASE-BSP-SD-DRIVER-VccStatePsuOnCurLimit-CMD0005
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0005
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0006
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsu-0006
+//! @SYMTestCaseDesc		MMC/SD Power Supply Test - Set Current VCC state EPsuOnFull
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Set the MMC/SD card Current VCC state
+//!				5. Display Current VCC state
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Current VCC state Displayed
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCSocket::{DPBusPsuBase {ptr}}iVcc
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsu1	SetState		BASE-BSP-SD-DRIVER-VccStatePsuOnFull-CMD0006
+		COMMAND		mmcsdpsu1	VccState		BASE-BSP-SD-DRIVER-VccStatePsuOnFull-CMD0006
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0006
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0007
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsu-0007
+//! @SYMTestCaseDesc		MMC/SD Socket Power Supply Test - Current Bus State.
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Check TPBusPsuState
+//!				5. Display the BusPsuState
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed the platform status while turn on
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCSocket::iState();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsu1	PbusState		BASE-BSP-SD-DRIVER-PbusState-CMD0007
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0007
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0008
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsu-0008
+//! @SYMTestCaseDesc		MMC/SD Power Supply Test - Reads PSU Unit number.
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads PSU Unit number
+//!				5. Display the PSU Unit number
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCPsu::iPsuNum();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsu1	PsuNumber		BASE-BSP-SD-DRIVER-PsuNumber-CMD0008
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0008
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0009
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsu-0009
+//! @SYMTestCaseDesc		MMC/SD Power Supply Test - Reads Meadia Change number.
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads Meadia Change number
+//!				5. Display the Meadia Change number
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCPsu::iMediaChangeNum()
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsu1	MediaChangeNumber	BASE-BSP-SD-DRIVER-MediaChangeNumber-CMD0009
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0009
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0010
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsu-0010
+//! @SYMTestCaseDesc		MMC/SD Power Supply Test - Reads platform has current limit check support.
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads platform has current limit check support
+//!				5. Display the platform status
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	KErrNotSupported
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DMMCPsu::iCurrLimited()
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1	
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsu1	PsuCurLimit		BASE-BSP-SD-DRIVER-PsuCurLimit-CMD0010
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0010
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0011
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsu-0011
+//! @SYMTestCaseDesc		UnLoad MMC/SD Logical Device Driver.
+//! @SYMTestPriority		high
+//! @SYMTestActions		Load D_MMCSDIF LDD Driver
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			User::FreeLogicalDevice(const TDesC{ref});
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSU-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	UnLoadDriver		BASE-BSP-SD-DRIVER-LDDName-CMD0001
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsu-0011
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-SD-PSUBASE-DRIVER.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,437 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE	T_mmcsd
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0001
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsuBase-0001
+//! @SYMTestCaseDesc		Load MMC/SD Logical Device Driver
+//! @SYMTestPriority		high
+//! @SYMTestActions		Load  D_MMCSDIF LDD Driver
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor		Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			User::LoadLogicalDevice(const TDesC {ref});
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	LoadDriver		BASE-BSP-SD-DRIVER-LDDName-CMD0001
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0001
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0002
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsuBase-0002
+//! @SYMTestCaseDesc		Checks whether this PSU is powering a bus containing a locked device,
+//!				i.e. one that is recognised and in use by a client
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the power bus locked flag
+//!				5. Display the power bus locked counter value
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed the power bus locked counter value (TRUE or FALSE)
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::IsLocked();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	IsLocked		BASE-BSP-SD-DRIVER-IsLocked-CMD002
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0002
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0003
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsuBase-0003
+//! @SYMTestCaseDesc		Checks whether the PSU is off.
+//!				The PSU is off when it is in the EPsuOff state
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the Psu State flag
+//!				5. Display the PSU State
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed the  PSU State value (TRUE or FALSE)
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::IsOff();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	IsOff			BASE-BSP-SD-DRIVER-IsOff-CMD003
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0003
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0004
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsuBase-0004
+//! @SYMTestCaseDesc		Gets the maximum current (in microAmps) that the PSU is able to supply
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads maximum current (in microAmps)
+//!				5. Display the maximum current that the PSU is able to supply
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed the  maximum current (in microAmps)
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::MaxCurrentInMicroAmps();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	MaxCurrentInMicroAmps	BASE-BSP-SD-DRIVER-MaxCurrentInMicroAmps-CMD004
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0004
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0005
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsuBase-0005
+//! @SYMTestCaseDesc		Resets inactivity and not-locked counts
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Resets inactivity and not-locked counts
+//!				5. Display the inactivity and not-locked counter values
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed the  inactivity and not-locked counter values
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor		Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::ResetInactivityTimer();
+//!				DPBusPsuBase::iInactivityCount();
+//!				DPBusPsuBase::iNotLockedCount();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	ResetInactivityTimer
+		COMMAND		mmcsdpsubase1	InactivityCount		BASE-BSP-SD-DRIVER-InactivityCount-CMD005
+		COMMAND		mmcsdpsubase1	NotLockedCount		BASE-BSP-SD-DRIVER-NotLockedCount-CMD005
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0005
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0006
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsuBase-0006
+//! @SYMTestCaseDesc		Gets the voltage level, or range of supported voltage levels
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the voltage level, or range of supported voltage levels
+//!				5. Display the voltage in OCR format
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed the voltage in OCR format
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::VoltageSupported();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	VoltageSupported	BASE-BSP-SD-DRIVER-VoltageSupported-CMD006
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0006
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0007
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsuBase-0007
+//! @SYMTestCaseDesc		Reads the Bus inactivity counter value
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the Bus inactivity counter.
+//!				5. Display the Bus inactivity counter.
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed Bus inactivity counter
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor		Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::iInactivityCount();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	InactivityCount		BASE-BSP-SD-DRIVER-InactivityCount-CMD007
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0007
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0008
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsuBase-0008
+//! @SYMTestCaseDesc		Reads Bus not locked counter
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the BBus not locked counter.
+//!				5. Display the Bus not locked counter.
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed Bus not locked counter value
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::iInactivityCount();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	NotLockedCount		BASE-BSP-SD-DRIVER-NotLockedCount-CMD008
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0008
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0009
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsuBase-0009
+//! @SYMTestCaseDesc		Reads Bus inactivity timeout period, in seconds, when clients are registered
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the Bus inactivity timeout counter.
+//!				5. Display the inactivity timeout counter.
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed inactivity timeout counter value
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::iInactivityTimeout();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	InactivityTimeout	BASE-BSP-SD-DRIVER-InactivityTimeout-CMD009
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0009
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0010
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsuBase-0010
+//! @SYMTestCaseDesc		Reads Bus not locked timeout period, in seconds, when no clients are registered
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the not locked timeout counter.
+//!				5. Display the not locked timeout counter.
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed not locked timeout counter value
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::iNotLockedTimeout();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	NotLockedTimeout	BASE-BSP-SD-DRIVER-NotLockedTimeout-CMD010
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0010
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0011
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsuBase-0011
+//! @SYMTestCaseDesc		Reads the voltage level, or range of voltages supported .
+//!				The voltage level, or range of voltages is reported as a
+//!				bit mask in the same format as defined for the OCR register.
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the voltage level in OCR format.
+//!				5. Display the voltage level in OCR format.
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed voltage level in OCR format
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::iVoltageSupported();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	MemVoltageSupported	BASE-BSP-SD-DRIVER-MemVoltageSupported-CMD011
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0011
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0012
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsuBase-0012
+//! @SYMTestCaseDesc		The maximum current (in microAmps) that the PSU is able to supply
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the maximum current (in microAmps).
+//!				5. Display the maximum current (in microAmps).
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed maximum current (in microAmps)
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::iMaxCurrentInMicroAmps();
+	START_TEST_BLOCK	100		T_mmcsd				\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	MemMaxCurrentInMicroAmps	BASE-BSP-SD-DRIVER-MemMaxCurrentInMicroAmps-CMD012
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0012
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0013
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsuBase-0013
+//! @SYMTestCaseDesc		Indicates whether the platform hardware has support for checking whether the voltage level of the
+//!				PSU is within its expected voltage limit while turned on
+//! @SYMTestPriority		high
+//! @SYMTestActions		1. Create  RMMCSDTestControllerInterface Handle object.
+//!				2. Load the Driver
+//!				3. Open the driver connection
+//!				4. Reads the Volt Check Interval.
+//!				5. Display the Volt Check Interval.
+//!				6. Close the driver connection
+//!				7. Destroy the object
+//! @SYMTestExpectedResults	Displayed Volt Check Interval value
+//! @SYMTestType		CIT
+//! @SYMCreationDate		15/07/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			DPBusPsuBase::iVoltCheckInterval();
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDPsuBase	mmcsdpsubase1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-StackNumber
+		COMMAND		mmcsdpsubase1	NewL			BASE-BSP-SD-DRIVER-SessionWrapperName
+		COMMAND		mmcsdpsubase1	VoltCheckInterval	BASE-BSP-SD-DRIVER-VoltCheckInterval-CMD013
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsubase1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0013
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0014
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-DMMCPsuBase-0014
+//! @SYMTestCaseDesc		UnLoad MMC/SD Logical Device Driver.
+//! @SYMTestPriority		high
+//! @SYMTestActions		Load D_MMCSDIF LDD Driver
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+//! @SYMCreationDate		1/4/2008
+//! @SYMAuthor			Saravanakumar
+//! @SYMTestStatus		Implemented
+//! @SYMAPI			User::FreeLogicalDevice(const TDesC{ref});
+	START_TEST_BLOCK 	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-PSUBASE-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	UnLoadDriver		BASE-BSP-SD-DRIVER-LDDName-CMD0001
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-DMMCPsuBase-0014
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-SD-SOCKET-DRIVER-MANUAL.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,217 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE	T_mmcsd
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALSocket-0001
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALSocket-0001
+//! @SYMAPI			User::LoadLogicalDevice(const TDesC {ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Load Logical Device Driver.
+//! @SYMTestActions		Load D_MMCSDIF LDD Driver
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	LoadDriver		BASE-BSP-SD-DRIVER-MANUALSocket-0001-001-LoadDriver_command02
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MANUALSocket-0001
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALSocket-0002
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALSocket-0002
+//! @SYMAPI			DMMCSocket::CardIsPresent();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Card Is Present Test - Display if an MMC/SD card is present.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Ask user to make sure card in is drive
+//!				4. Check that a card is present
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	A card is present.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-MANUALSocket-0002-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-DRIVER-MANUALSocket-0002-001-NewL_command02
+		COMMAND		mmcsdsocket1	utilityPromptMessage	BASE-BSP-SD-DRIVER-MANUALSocket-0002-001-PromptUser_command03
+		COMMAND		mmcsdsocket1	CardIsPresent		BASE-BSP-SD-DRIVER-MANUALSocket-0002-001-CardIsPresent_command04
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MANUALSocket-0002
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALSocket-0003
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALSocket-0003
+//! @SYMAPI			DMMCSocket::CardIsPresent();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Card Is Present Test - Display if an MMC/SD card is present.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Ask user to make sure card is not in drive
+//!				4. Check that a card is not present
+//!				5. Ask user to make sure card is in drive
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	A card is not present.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-MANUALSocket-0003-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-DRIVER-MANUALSocket-0003-001-NewL_command02
+		COMMAND		mmcsdsocket1	utilityPromptMessage	BASE-BSP-SD-DRIVER-MANUALSocket-0003-001-PromptUser_command03
+		COMMAND		mmcsdsocket1	CardIsPresent		BASE-BSP-SD-DRIVER-MANUALSocket-0003-001-CardIsPresent_command04
+		COMMAND		mmcsdsocket1	utilityPromptMessage	BASE-BSP-SD-DRIVER-MANUALSocket-0003-001-PromptUser_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MANUALSocket-0003
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALSocket-0004
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALSocket-0004
+//! @SYMAPI			DMMCSocket::CardIsPresent();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Card Is Present Test - Display if an MMC/SD card is present.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Ask user to make sure card is in drive
+//!				4. Check that a card is present
+//!				5. Ask user to make sure card is not in drive
+//!				6. Check that a card is not present
+//!				7. Ask user to make sure card is in drive
+//!				8. Check that a card is present
+//!				9. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	A card is not present.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-MANUALSocket-0004-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-DRIVER-MANUALSocket-0004-001-NewL_command02
+		COMMAND		mmcsdsocket1	utilityPromptMessage	BASE-BSP-SD-DRIVER-MANUALSocket-0004-001-PromptUser_command03
+		COMMAND		mmcsdsocket1	CardIsPresent		BASE-BSP-SD-DRIVER-MANUALSocket-0004-001-CardIsPresent_command04
+		COMMAND		mmcsdsocket1	utilityPromptMessage	BASE-BSP-SD-DRIVER-MANUALSocket-0004-001-PromptUser_command05
+		COMMAND		mmcsdsocket1	CardIsPresent		BASE-BSP-SD-DRIVER-MANUALSocket-0004-001-CardIsPresent_command06
+		COMMAND		mmcsdsocket1	utilityPromptMessage	BASE-BSP-SD-DRIVER-MANUALSocket-0004-001-PromptUser_command07
+		COMMAND		mmcsdsocket1	CardIsPresent		BASE-BSP-SD-DRIVER-MANUALSocket-0004-001-CardIsPresent_command08
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MANUALSocket-0004
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALSocket-0005
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALSocket-0005
+//! @SYMAPI			DMMCSocket::CardIsPresent();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Card Is Present Test - Display if an MMC/SD card is present after reset.
+//! @SYMTestActions    		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Reset the socket by powering down the stack
+//!				4. Ask user to make sure card is in drive
+//!				5. Check that a card is present
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	A card is present.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-MANUALSocket-0005-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-DRIVER-MANUALSocket-0005-001-NewL_command02
+		COMMAND		mmcsdsocket1	Reset1
+		COMMAND		mmcsdsocket1	utilityPromptMessage	BASE-BSP-SD-DRIVER-MANUALSocket-0005-001-PromptUser_command04
+		COMMAND		mmcsdsocket1	CardIsPresent		BASE-BSP-SD-DRIVER-MANUALSocket-0005-001-CardIsPresent_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MANUALSocket-0005
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALSocket-0006
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALSocket-0006
+//! @SYMAPI			DMMCSocket::CardIsPresent();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Card Is Present Test - Display if an MMC/SD card is present after double reset.
+//! @SYMTestActions    		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Reset the socket by powering down the stack
+//!				4. Reset the socket and free up allocated resources
+//!				5. Ask user to make sure card is in drive
+//!				6. Check that a card is present
+//!				7. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	A card is present.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-MANUALSocket-0006-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-DRIVER-MANUALSocket-0006-001-NewL_command02
+		COMMAND		mmcsdsocket1	Reset1
+		COMMAND		mmcsdsocket1	Reset2
+		COMMAND		mmcsdsocket1	utilityPromptMessage	BASE-BSP-SD-DRIVER-MANUALSocket-0006-001-PromptUser_command05
+		COMMAND		mmcsdsocket1	CardIsPresent		BASE-BSP-SD-DRIVER-MANUALSocket-0006-001-CardIsPresent_command06
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MANUALSocket-0006
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALSocket-0007
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALSocket-0007
+//! @SYMAPI			FreeLogicalDevice(const TDesC {ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Free the Logical Device Driver
+//! @SYMTestActions    		Free the D_MMCSDIF LDD Driver
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Displayed Power supply information.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	UnLoadDriver		BASE-BSP-SD-DRIVER-MANUALSocket-0007-001-UnLoadDriver_command02
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MANUALSocket-0007
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-SD-SOCKET-DRIVER.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,854 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE	T_mmcsd
+
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0001
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0001
+//! @SYMAPI			User::LoadLogicalDevice(const TDesC {ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Load Logical Device Driver.
+//! @SYMTestActions    		Load D_MMCSDIF LDD Driver
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	KErrNone
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	LoadDriver		BASE-BSP-SD-SOCKET-DRIVER-0001-001-LoadDriver_command02
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0001
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0002
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0002
+//! @SYMAPI			DMMCSocket::Reset1();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Reset1 Test - Reset the socket by powering down the stack.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Reset the socket by powering down the stack
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The socket is reset with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0002-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0002-001-NewL_command02
+		COMMAND		mmcsdsocket1	Reset1
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0002
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0003
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0003
+//! @SYMAPI			DMMCSocket::Reset2();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Reset2 Test - Reset the socket and free up allocated resources.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Reset the socket by powering down the stack
+//!				4. Reset the socket and free up allocated resources
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The socket is reset with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0003-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0003-001-NewL_command02
+		COMMAND		mmcsdsocket1	Reset1
+		COMMAND		mmcsdsocket1	Reset2
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0003
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0004
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0004
+//! @SYMAPI			DMMCSocket::Stack(TInt);
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Stack Pointer Test - Get a pointer to a DMMCStack object.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get a pointer to a DMMCStack object for MMC card number 1
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The stack pointer is returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0004-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0004-001-NewL_command02
+		COMMAND		mmcsdsocket1	Stack			BASE-BSP-SD-SOCKET-DRIVER-0004-001-Stack_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0004
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0005
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0005
+//! @SYMAPI			DMMCSocket::ResetInactivity(TInt);
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Reset inactivity timer Test - Reset socket's PSU inactivity timer.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Reset socket's PSU inactivity timer
+//!				4. Verify the bus inactivity count
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	PSU inactivity timer is reset with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0005-001-DriverOpen_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0005-001-NewL_command03
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0005-001-NewL_command03
+		COMMAND		mmcsdsocket1	ResetInactivity		BASE-BSP-SD-SOCKET-DRIVER-0005-001-ResetInactivity_command04
+		COMMAND		mmcsdpsu1	PsuInfo			BASE-BSP-SD-SOCKET-DRIVER-0005-001-PsuInfo_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0005
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0006
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0006
+//! @SYMAPI			DMMCSocket::MachineInfo();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		MachineInfo Test - Get the MachineInfo from the PSL.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get the MachineInfo from the PSL
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	MachineInfo is retrieved and contains the correct values.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0006-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0006-001-NewL_command02
+		COMMAND		mmcsdsocket1	MachineInfo		BASE-BSP-SD-SOCKET-DRIVER-0006-001-MachineInfo_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0006
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0007
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0007
+//! @SYMAPI			DMMCSocket::AdjustPartialRead(const TMMCard{ptr}, TUint32, TUint32, TUint32{ptr}, TUint32{ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Calculate minimum range that must be read off card.
+//! @SYMTestActions    		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get pointer to card
+//!				4. Calculate minimum range that must be read off card
+//!				5. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Minimum range that must be read off card is correctly returned.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0007-001-DriverOpen_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0007-001-NewL_command03
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0007-001-NewL_command03
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-SOCKET-DRIVER-0007-001-CardP_command04
+		COMMAND		mmcsdsocket1	AdjustPartialRead	BASE-BSP-SD-SOCKET-DRIVER-0007-001-AdjustPartialRead_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0007
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0008
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0008
+//! @SYMAPI			DMMCSocket::GetBufferInfo(TUint8{ptr}{ptr}, TInt{ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Get Buffer Info Test - Get details of the buffer allocated by socket for data transfer operations.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get details of the buffer allocated by socket for data transfer operations
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Correct buffer details are returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0008-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0008-001-NewL_command02
+		COMMAND		mmcsdsocket1	GetBufferInfo		BASE-BSP-SD-SOCKET-DRIVER-0008-001-GetBufferInfo_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0008
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0009
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0009
+//! @SYMAPI			DMMCSocket::PrepareStore(TInt, TInt, TLocalDrivePasswordData{ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Prepare Store Test - Prepare store so mappings can be allocated or deallocated.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Prepare store so mappings can be allocated or deallocated, using operation EPasswordClear
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Store is prepared with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0009-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0006-001-NewL_command02
+		COMMAND		mmcsdsocket1	PrepareStore		BASE-BSP-SD-SOCKET-DRIVER-0009-001-PrepareStore_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0009
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0010
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0010
+//! @SYMAPI			DMMCSocket::Init();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		15/05/2008
+//! @SYMTestCaseDesc		Initialise Test - Allocate resources and initialise the MMC socket and associated stack object.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Allocate resources and initialise the MMC socket and associated stack object
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	MMC socket initialised with no error.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0010-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0010-001-NewL_command02
+		COMMAND		mmcsdsocket1	Init
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0010
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0011
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0011
+//! @SYMAPI			DMMCSocket::Init();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		15/05/2008
+//! @SYMTestCaseDesc		Initialise Test - Allocate resources and initialise the MMC socket and associated stack object.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Allocate resources and initialise the MMC socket and associated stack object
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	MMC socket initialised with error KErrAlreadyExists.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT		MMCSDSession	mmcsdsession1
+		CREATE_OBJECT		MMCSDSocket	mmcsdsocket1
+		COMMAND			mmcsdsession1	NewL
+		COMMAND			mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0011-001-DriverOpen_command01
+		COMMAND			mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0011-001-NewL_command02
+		COMMAND	!Error=-11	mmcsdsocket1	Init
+		COMMAND			mmcsdsession1	Close
+		COMMAND			mmcsdsocket1	~
+		COMMAND			mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0011
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0012
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0012
+//! @SYMAPI			DMMCSocket::Init();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		15/05/2008
+//! @SYMTestCaseDesc		Initialise Test - Allocate resources and initialise the MMC socket and associated stack object.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Allocate resources and initialise the MMC socket and associated stack object
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	MMC socket initialised with error KErrInUse.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT		MMCSDSession	mmcsdsession1
+		CREATE_OBJECT		MMCSDSocket	mmcsdsocket1
+		COMMAND			mmcsdsession1	NewL
+		COMMAND			mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0011-001-DriverOpen_command01
+		COMMAND			mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0011-001-NewL_command02
+		COMMAND	!Error=-14	mmcsdsocket1	Init
+		COMMAND			mmcsdsession1	Close
+		COMMAND			mmcsdsocket1	~
+		COMMAND			mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0012
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0013
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0013
+//! @SYMAPI			DMMCSocket::InitiatePowerUpSequence();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		15/05/2008
+//! @SYMTestCaseDesc		Initiate Power Up Sequence Test - Initiate power up sequence on the stack.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Initiate power up sequence on the stack
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Power up sequence initiated with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0013-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0013-001-NewL_command02
+		COMMAND		mmcsdsocket1	InitiatePowerUpSequence
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0013
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0014
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0014
+//! @SYMAPI			DMMCSocket::Reset2();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Reset2 Test - Reset the socket and free up allocated resources, without powering down the stack first.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Reset the socket and free up allocated resources
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The socket is reset with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0014-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0014-001-NewL_command02
+		COMMAND		mmcsdsocket1	Reset2
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0014
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0015
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0015
+//! @SYMAPI			DMMCSocket::Stack(TInt);
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Stack Pointer Test - Get a pointer to a DMMCStack object, for invalid bus number.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get a pointer to a DMMCStack object for MMC card number -1
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The stack pointer is correctly returned.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0015-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0015-001-NewL_command02
+		COMMAND		mmcsdsocket1	Stack			BASE-BSP-SD-SOCKET-DRIVER-0015-001-Stack_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0015
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0016
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0016
+//! @SYMAPI			DMMCSocket::Stack(TInt);
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Stack Pointer Test - Get a pointer to a DMMCStack object, for invalid bus number.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get a pointer to a DMMCStack object for MMC card number 5
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The stack pointer is returned as NULL.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0016-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0010-001-NewL_command02
+		COMMAND		mmcsdsocket1	Stack			BASE-BSP-SD-SOCKET-DRIVER-0016-001-Stack_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0016
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0017
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0017
+//! @SYMAPI			DMMCSocket::ResetInactivity(TInt);
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		26/06/2008
+//! @SYMTestCaseDesc		Reset inactivity timer Test - Reset socket's PSU inactivity timer, for invalid bus number.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Reset socket's PSU inactivity timer for MMC card number -1
+//!				4. Verify the bus inactivity count
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	PSU inactivity timer is reset with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0017-001-DriverOpen_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0017-001-NewL_command03
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0017-001-NewL_command03
+		COMMAND		mmcsdsocket1	ResetInactivity		BASE-BSP-SD-SOCKET-DRIVER-0017-001-ResetInactivity_command04
+		COMMAND		mmcsdpsu1	PsuInfo			BASE-BSP-SD-SOCKET-DRIVER-0017-001-PsuInfo_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0017
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0018
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0018
+//! @SYMAPI			DMMCSocket::ResetInactivity(TInt);
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		26/06/2008
+//! @SYMTestCaseDesc		Reset inactivity timer Test - Reset socket's PSU inactivity timer, for invalid bus number.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Reset socket's PSU inactivity timer for MMC card number 5
+//!				4. Verify the bus inactivity count
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	PSU inactivity timer is reset with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0018-001-DriverOpen_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0018-001-NewL_command03
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0018-001-NewL_command03
+		COMMAND		mmcsdsocket1	ResetInactivity		BASE-BSP-SD-SOCKET-DRIVER-0018-001-ResetInactivity_command04
+		COMMAND		mmcsdpsu1	PsuInfo			BASE-BSP-SD-SOCKET-DRIVER-0018-001-PsuInfo_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0018
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0019
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0019
+//! @SYMAPI			DMMCSocket::AdjustPartialRead(const TMMCard{ptr}, TUint32, TUint32, TUint32{ptr}, TUint32{ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		26/06/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Calculate minimum range that must be read off card, using invalid inputs.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get pointer to card
+//!				4. Calculate minimum range that must be read off card, where aStart=0xFFFFFFFE and aEnd=0xFFFFFFFF
+//!				5. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Minimum range that must be read off card is correctly returned.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0019-001-DriverOpen_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0019-001-NewL_command03
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0019-001-NewL_command03
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-SOCKET-DRIVER-0019-001-CardP_command04
+		COMMAND		mmcsdsocket1	AdjustPartialRead	BASE-BSP-SD-SOCKET-DRIVER-0019-001-AdjustPartialRead_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0019
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0020
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0020
+//! @SYMAPI			DMMCSocket::AdjustPartialRead(const TMMCard{ptr}, TUint32, TUint32, TUint32{ptr}, TUint32{ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		26/06/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Calculate minimum range that must be read off card, using invalid inputs.
+//! @SYMTestActions    		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get pointer to card
+//!				4. Calculate minimum range that must be read off card, where aStart=0 and aEnd=0xFFFFFFFF
+//!				5. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Minimum range that must be read off card is correctly returned.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0020-001-DriverOpen_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0020-001-NewL_command03
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0020-001-NewL_command03
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-SOCKET-DRIVER-0020-001-CardP_command04
+		COMMAND		mmcsdsocket1	AdjustPartialRead	BASE-BSP-SD-SOCKET-DRIVER-0020-001-AdjustPartialRead_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0020
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0021
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0021
+//! @SYMAPI			DMMCSocket::AdjustPartialRead(const TMMCard{ptr}, TUint32, TUint32, TUint32{ptr}, TUint32{ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		26/06/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Calculate minimum range that must be read off card, using invalid inputs.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get pointer to card
+//!				4. Calculate minimum range that must be read off card, where aStart=aEnd
+//!				5. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Minimum range that must be read off card is correctly returned.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0021-001-DriverOpen_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0021-001-NewL_command03
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0021-001-NewL_command03
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-SOCKET-DRIVER-0021-001-CardP_command04
+		COMMAND		mmcsdsocket1	AdjustPartialRead	BASE-BSP-SD-SOCKET-DRIVER-0021-001-AdjustPartialRead_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0021
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0022
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0022
+//! @SYMAPI			DMMCSocket::AdjustPartialRead(const TMMCard{ptr}, TUint32, TUint32, TUint32{ptr}, TUint32{ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		26/06/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Calculate minimum range that must be read off card, using invalid inputs.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get pointer to card
+//!				4. Calculate minimum range that must be read off card, where aStart>aEnd
+//!				5. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Minimum range that must be read off card is correctly returned.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0022-001-DriverOpen_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0022-001-NewL_command03
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0022-001-NewL_command03
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-SOCKET-DRIVER-0022-001-CardP_command04
+		COMMAND		mmcsdsocket1	AdjustPartialRead	BASE-BSP-SD-SOCKET-DRIVER-0022-001-AdjustPartialRead_command05
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0022
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0023
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0023
+//! @SYMAPI			DMMCSocket::PrepareStore(TInt, TInt, TLocalDrivePasswordData{ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		27/06/2008
+//! @SYMTestCaseDesc		Prepare Store Test - Prepare store so mappings can be allocated or deallocated.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Prepare store so mappings can be allocated or deallocated, using operation EPasswordLock
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Store is prepared with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0023-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0023-001-NewL_command02
+		COMMAND		mmcsdsocket1	PrepareStore		BASE-BSP-SD-SOCKET-DRIVER-0023-001-PrepareStore_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0023
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0024
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0024
+//! @SYMAPI			DMMCSocket::PrepareStore(TInt, TInt, TLocalDrivePasswordData{ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		27/06/2008
+//! @SYMTestCaseDesc		Prepare Store Test - Prepare store so mappings can be allocated or deallocated.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Prepare store so mappings can be allocated or deallocated, using operation EPasswordUnlock
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Store is prepared with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0024-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0024-001-NewL_command02
+		COMMAND		mmcsdsocket1	PrepareStore		BASE-BSP-SD-SOCKET-DRIVER-0024-001-PrepareStore_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0024
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0025
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0025
+//! @SYMAPI			DMMCSocket::PrepareStore(TInt, TInt, TLocalDrivePasswordData{ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		02/07/2008
+//! @SYMTestCaseDesc		Prepare Store Test - Prepare store so mappings can be allocated or deallocated, using NULL password.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Prepare store so mappings can be allocated or deallocated, using operation EPasswordLock and NULL password
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Store is prepared with error KErrAccessDenied.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT		MMCSDSession	mmcsdsession1
+		CREATE_OBJECT		MMCSDSocket	mmcsdsocket1
+		COMMAND			mmcsdsession1	NewL
+		COMMAND			mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0025-001-DriverOpen_command01
+		COMMAND			mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0025-001-NewL_command02
+		COMMAND	!Error=-21	mmcsdsocket1	PrepareStore		BASE-BSP-SD-SOCKET-DRIVER-0025-001-PrepareStore_command03
+		COMMAND			mmcsdsession1	Close
+		COMMAND			mmcsdsocket1	~
+		COMMAND			mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0025
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0026
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0026
+//! @SYMAPI			DMMCSocket::PrepareStore(TInt, TInt, TLocalDrivePasswordData{ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		02/07/2008
+//! @SYMTestCaseDesc		Prepare Store Test - Prepare store so mappings can be allocated or deallocated, using NULL password.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Prepare store so mappings can be allocated or deallocated, using operation EPasswordClear and NULL password
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Store is prepared with error KErrAccessDenied.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT		MMCSDSession	mmcsdsession1
+		CREATE_OBJECT		MMCSDSocket	mmcsdsocket1
+		COMMAND			mmcsdsession1	NewL
+		COMMAND			mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0026-001-DriverOpen_command01
+		COMMAND			mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0026-001-NewL_command02
+		COMMAND	!Error=-21	mmcsdsocket1	PrepareStore		BASE-BSP-SD-SOCKET-DRIVER-0026-001-PrepareStore_command03
+		COMMAND			mmcsdsession1	Close
+		COMMAND			mmcsdsocket1	~
+		COMMAND			mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0026
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0027
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0027
+//! @SYMAPI			DMMCSocket::PrepareStore(TInt, TInt, TLocalDrivePasswordData{ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		02/07/2008
+//! @SYMTestCaseDesc		Prepare Store Test - Prepare store so mappings can be allocated or deallocated, using NULL password.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Prepare store so mappings can be allocated or deallocated, using operation EPasswordUnlock and NULL password
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Store is prepared with error KErrLocked.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT		MMCSDSession	mmcsdsession1
+		CREATE_OBJECT		MMCSDSocket	mmcsdsocket1
+		COMMAND			mmcsdsession1	NewL
+		COMMAND			mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0027-001-DriverOpen_command01
+		COMMAND			mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0027-001-NewL_command02
+		COMMAND	!Error=-22	mmcsdsocket1	PrepareStore		BASE-BSP-SD-SOCKET-DRIVER-0027-001-PrepareStore_command03
+		COMMAND			mmcsdsession1	Close
+		COMMAND			mmcsdsocket1	~
+		COMMAND			mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0027
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0028
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0028
+//! @SYMAPI			DMMCSocket::iStandby();
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Checks the Device Standby State
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Check the Device is in Standby mode
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Standby mode EFalse
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0028-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0028-001-NewL_command02
+		COMMAND		mmcsdsocket1	iStandby_Get		BASE-BSP-SD-SOCKET-DRIVER-0028-001-iStandby_Get_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0028
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0029
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0029
+//! @SYMAPI			DMMCSocket::iType();
+//! @SYMAuthor			Saravanakumar
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Checks the card bus type
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Read the Bus type
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Bus type EPBusTypeNone
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-SOCKET-DRIVER-0029-001-DriverOpen_command01
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-SOCKET-DRIVER-0029-001-NewL_command02
+		COMMAND		mmcsdsocket1	iType_Get		BASE-BSP-SD-SOCKET-DRIVER-0029-001-iType_Get_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0029
+
+START_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0030
+//! @SYMTestCaseID		BASE-BSP-SD-SOCKET-DRIVER-0030
+//! @SYMAPI			FreeLogicalDevice(const TDesC {ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/04/2008
+//! @SYMTestCaseDesc		Free the Logical Device Driver
+//! @SYMTestActions		Free the D_MMCSDIF LDD Driver
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Displayed Power supply information.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-SOCKET-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	UnLoadDriver		BASE-BSP-SD-SOCKET-DRIVER-0030-001-UnLoadDriver_command02
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-SOCKET-DRIVER-0030
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-SD-STACK-DRIVER-MANUAL.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,174 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE	T_mmcsd -SharedData
+
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALStack-0001
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALStack-0001
+//! @SYMAPI			User::LoadLogicalDevice(const TDesC {ref});
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		17/04/2008
+//! @SYMTestCaseDesc		Load Logical Device Driver.
+//! @SYMTestActions    		Load D_MMCSDIF LDD Driver
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	KErrNone
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	LoadDriver		BASE-BSP-SD-DRIVER-MANUALStack-0001-001-LoadDriver_command02
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MANUALStack-0001
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALStack-0002
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALStack-0002
+//! @SYMAPI			DMMCStack::HasCardsPresent();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Has Cards Present Test - Test whether any cards are present on the stack.
+//! @SYMTestActions    		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get whether any cards are present on the stack
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	Cards Present status correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-MANUALStack-0002-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-DRIVER-MANUALStack-0002-001-NewL_command02
+		COMMAND		mmcsdstack1	utilityPromptMessage	BASE-BSP-SD-DRIVER-MANUALStack-0002-001-PromptUser_command03
+		COMMAND 	mmcsdstack1	HasCardsPresent		BASE-BSP-SD-DRIVER-MANUALStack-0002-001-HasCardsPresent_command04
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MANUALStack-0002
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALStack-0003
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALStack-0003
+//! @SYMAPI			DMMCStack::Init();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		16/05/2008
+//! @SYMTestCaseDesc		Initialise test - Initialise the generic MMC stack
+//! @SYMTestActions 		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Initialise the generic MMC stack
+//!				4. Ask user to eject and reinsert card
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	MMC stack initialised with no error.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-MANUALStack-0003-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-DRIVER-MANUALStack-0003-001-NewL_command02
+		COMMAND		mmcsdstack1	Init
+		COMMAND		mmcsdstack1	utilityPromptMessage	BASE-BSP-SD-DRIVER-MANUALStack-0003-001-PromptUser_command04
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MANUALStack-0003
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALStack-0004
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALStack-0004
+//! @SYMAPI			DMMCStack::Init();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		16/05/2008
+//! @SYMTestCaseDesc		Initialise test - Initialise the generic MMC stack
+//! @SYMTestActions 		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Initialise the generic MMC stack
+//!				4. Ask user to eject and reinsert card
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	MMC stack initialised with error KErrInUse.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER-MANUAL.ini
+		CREATE_OBJECT		MMCSDSession	mmcsdsession1
+		CREATE_OBJECT		MMCSDStack	mmcsdstack1
+		COMMAND			mmcsdsession1	NewL
+		COMMAND			mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-MANUALStack-0004-001-DriverOpen_command01
+		COMMAND			mmcsdstack1	NewL			BASE-BSP-SD-DRIVER-MANUALStack-0004-001-NewL_command02
+		COMMAND	!Error=-14	mmcsdstack1	Init
+		COMMAND			mmcsdstack1	utilityPromptMessage	BASE-BSP-SD-DRIVER-MANUALStack-0004-001-PromptUser_command04
+		COMMAND			mmcsdsession1	Close
+		COMMAND			mmcsdstack1	~
+		COMMAND			mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MANUALStack-0004
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALStack-0005
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALStack-0005
+//! @SYMAPI			DMMCStack::HasCardsPresent();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Has Cards Present Test - Test whether any cards are present on the stack.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get whether any cards are present on the stack
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Cards Present status correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-DRIVER-MANUALStack-0005-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-DRIVER-MANUALStack-0005-001-NewL_command02
+		COMMAND		mmcsdstack1	utilityPromptMessage	BASE-BSP-SD-DRIVER-MANUALStack-0005-001-PromptUser_command03
+		COMMAND		mmcsdstack1	HasCardsPresent		BASE-BSP-SD-DRIVER-MANUALStack-0005-001-HasCardsPresent_command04
+		COMMAND		mmcsdstack1	utilityPromptMessage	BASE-BSP-SD-DRIVER-MANUALStack-0005-001-PromptUser_command05
+		COMMAND		mmcsdstack1	HasCardsPresent		BASE-BSP-SD-DRIVER-MANUALStack-0005-001-HasCardsPresent_command06
+		COMMAND		mmcsdstack1	utilityPromptMessage	BASE-BSP-SD-DRIVER-MANUALStack-0005-001-PromptUser_command07
+		COMMAND		mmcsdstack1	HasCardsPresent		BASE-BSP-SD-DRIVER-MANUALStack-0005-001-HasCardsPresent_command08
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MANUALStack-0005
+
+START_TESTCASE			BASE-BSP-SD-DRIVER-MANUALStack-0006
+//! @SYMTestCaseID		BASE-BSP-SD-DRIVER-MANUALStack-0006
+//! @SYMAPI			FreeLogicalDevice(const TDesC {ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		17/04/2008
+//! @SYMTestCaseDesc		Free the Logical Device Driver
+//! @SYMTestActions		Free the D_MMCSDIF LDD Driver
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults  	logical device driver unloaded.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER-MANUAL.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	UnLoadDriver		BASE-BSP-SD-DRIVER-MANUALStack-0006-001-UnloadDriver_command02
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-DRIVER-MANUALStack-0006
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/scripts/BASE-BSP-SD-STACK-DRIVER.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1018 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+LOAD_SUITE	T_mmcsd -SharedData
+
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0001
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0001
+//! @SYMAPI			User::LoadLogicalDevice(const TDesC {ref});
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		17/04/2008
+//! @SYMTestCaseDesc		Load Logical Device Driver.
+//! @SYMTestActions		Load D_MMCSDIF LDD Driver
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	KErrNone
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	LoadDriver		BASE-BSP-SD-STACK-DRIVER-0001-001-LoadDriver_command02
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0001
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0002
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0002
+//! @SYMAPI			DPBusSocket::PowerUp();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		11/08/2008
+//! @SYMTestCaseDesc		Powers up the socket
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get state of the socket
+//!				4. Power up the socket
+//!				5. Get state of the socket
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Socket successfully powered up with no error
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		CREATE_OBJECT	MMCSDPsu	mmcsdpsu1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0002-001-DriverOpen_command02
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0002-001-NewL_command03
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-STACK-DRIVER-0002-001-NewL_command03
+		COMMAND		mmcsdpsu1	NewL			BASE-BSP-SD-STACK-DRIVER-0002-001-NewL_command03
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0002-001-CardP_command04
+		COMMAND		mmcsdsocket1	iState_Get		BASE-BSP-SD-STACK-DRIVER-0002-001-iState_Get_command05
+		COMMAND		mmcsdpsu1 	VccState  		BASE-BSP-SD-STACK-DRIVER-0002-001-VccState_command06
+		COMMAND		mmcsdpsu1 	SetState  		BASE-BSP-SD-STACK-DRIVER-0002-001-SetState_command07
+		COMMAND		mmcsdpsu1 	VccState  		BASE-BSP-SD-STACK-DRIVER-0002-001-VccState_command08
+		COMMAND		mmcsdsocket1	iState_Get		BASE-BSP-SD-STACK-DRIVER-0002-001-iState_Get_command09
+		COMMAND		mmcsdsocket1	PowerUp
+		OUTSTANDING
+		COMMAND		mmcsdsocket1	iState_Get		BASE-BSP-SD-STACK-DRIVER-0002-001-iState_Get_command11
+		COMMAND		mmcsdpsu1	VccState		BASE-BSP-SD-STACK-DRIVER-0002-001-VccState_command12
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdpsu1	~
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0002
+
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0003
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0003
+//! @SYMAPI			DMMCStack::PasswordStore();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		17/06/2008
+//! @SYMTestCaseDesc		Write to / Read from Password Store.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Write to Password Store
+//!				5. Read from Password Store
+//!				6. Write to Password Store
+//!				7. Read from Password Store
+//!				8. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Password store written to / read from with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0003-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0003-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0003-001-CardP_command03
+		COMMAND		mmcsdstack1	WritePasswordStore	BASE-BSP-SD-STACK-DRIVER-0003-001-WritePasswordStore_command04
+		COMMAND		mmcsdstack1	ReadPasswordStore	BASE-BSP-SD-STACK-DRIVER-0003-001-ReadPasswordStore_command05
+		COMMAND		mmcsdstack1	WritePasswordStore	BASE-BSP-SD-STACK-DRIVER-0003-001-WritePasswordStore_command06
+		COMMAND		mmcsdstack1	ReadPasswordStore	BASE-BSP-SD-STACK-DRIVER-0003-001-ReadPasswordStore_command07
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0003
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0004
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0004
+//! @SYMAPI			DMMCSession::SetupCIMReadBlock(TMMCArgument, TUint32, TUint8 {ptr});
+//!				DMMCSession::SetupCIMWriteBlock(TMMCArgument, TUint32, TUint8 {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/07/2008
+//! @SYMTestCaseDesc		Concurrent read/write sector test.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Write to sector 12 of the card
+//!				5. Read from sector 12 of the card and verify contents
+//!				6. Write to sector 13 of the card
+//!				7. Read from sector 13 of the card and verify contents
+//!				8. Write to sector 14 of the card
+//!				9. Read from sector 14 of the card and verify contents
+//!				10. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Sectors correctly written and read with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0004-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0004-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0004-001-CardP_command03
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-SD-STACK-DRIVER-0004-001-WriteSector_command04
+		OUTSTANDING
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-SD-STACK-DRIVER-0004-001-ReadSector_command05
+		OUTSTANDING
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-SD-STACK-DRIVER-0004-001-WriteSector_command06
+		OUTSTANDING
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-SD-STACK-DRIVER-0004-001-ReadSector_command07
+		OUTSTANDING
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-SD-STACK-DRIVER-0004-001-WriteSector_command08
+		OUTSTANDING
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-SD-STACK-DRIVER-0004-001-ReadSector_command09
+		OUTSTANDING
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0004
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0005
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0005
+//! @SYMAPI			DMMCSession::SetupCIMWriteBlock(TMMCArgument, TUint32, TUint8 {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/07/2008
+//! @SYMTestCaseDesc		Multiple write sector test.
+//! @SYMTestActions    		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Write to sector 12 of the card
+//!				5. Write to sector 13 of the card
+//!				6. Write to sector 13 of the card
+//!				7. Read from sector 12 of the card and verify contents
+//!				8. Read from sector 13 of the card and verify contents
+//!				9. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Sectors correctly written with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0005-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0005-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0005-001-CardP_command03
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-SD-STACK-DRIVER-0005-001-WriteSector_command04
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-SD-STACK-DRIVER-0005-001-WriteSector_command05
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-SD-STACK-DRIVER-0005-001-WriteSector_command06
+		OUTSTANDING
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-SD-STACK-DRIVER-0005-001-ReadSector_command07
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-SD-STACK-DRIVER-0005-001-ReadSector_command08
+		OUTSTANDING
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0005
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0006
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0006
+//! @SYMAPI			DMMCSession::SetupCIMReadBlock(TMMCArgument, TUint32, TUint8 {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		17/04/2008
+//! @SYMTestCaseDesc		Multiple read sector test.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Write to sector 12 of the card
+//!				5. Write to sector 13 of the card
+//!				6. Read from sector 12 of the card and verify contents
+//!				7. Read from sector 13 of the card and verify contents
+//!				8. Read from sector 13 of the card and verify contents
+//!				9. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	All sectors read correctly with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0006-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0006-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0006-001-CardP_command03
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-SD-STACK-DRIVER-0006-001-WriteSector_command04
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-SD-STACK-DRIVER-0006-001-WriteSector_command05
+		OUTSTANDING
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-SD-STACK-DRIVER-0006-001-ReadSector_command06
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-SD-STACK-DRIVER-0006-001-ReadSector_command07
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-SD-STACK-DRIVER-0006-001-ReadSector_command08
+		OUTSTANDING
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0006
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0007
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0007
+//! @SYMAPI			DMMCStack::AdjustPartialRead(const TMMCard {ptr}, TUint32, TUint32, TUint32{ptr}, TUint32 {ptr});
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		28/04/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Get minimum range that must be read off card.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Get minimum range that must be read off card
+//!				5. Get minimum range that must be read off card
+//!				6. Get minimum range that must be read off card
+//!				7. Get minimum range that must be read off card
+//!				8. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The minimum range that must be read off card is correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0007-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0007-001-NewL_command02
+		COMMAND 	mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0007-001-CardP_command03
+		COMMAND 	mmcsdstack1 	AdjustPartialRead	BASE-BSP-SD-STACK-DRIVER-0007-001-AdjustPartialRead_command04
+		COMMAND 	mmcsdstack1 	AdjustPartialRead	BASE-BSP-SD-STACK-DRIVER-0007-001-AdjustPartialRead_command05
+		COMMAND 	mmcsdstack1 	AdjustPartialRead	BASE-BSP-SD-STACK-DRIVER-0007-001-AdjustPartialRead_command06
+		COMMAND 	mmcsdstack1 	AdjustPartialRead	BASE-BSP-SD-STACK-DRIVER-0007-001-AdjustPartialRead_command07
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0007
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0008
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0008
+//! @SYMAPI			DMMCStack::HasSessionsQueued();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Has Sessions Queued Test - Get whether any of the session queues have submitted session engaged.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get whether any of the session queues have submitted session engaged
+//!				4. Select the card
+//!				5. Write to sector 7 of the card
+//!				6. Get whether any of the session queues have submitted session engaged
+//!				7. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Sessions Queued status correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0008-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0008-001-NewL_command02
+		COMMAND		mmcsdstack1 	HasSessionsQueued	BASE-BSP-SD-STACK-DRIVER-0008-001-HasSessionsQueued_command03
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0008-001-CardP_command04
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-SD-STACK-DRIVER-0008-001-WriteSector_command05
+		COMMAND		mmcsdstack1 	HasSessionsQueued	BASE-BSP-SD-STACK-DRIVER-0008-001-HasSessionsQueued_command06
+		OUTSTANDING
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0008
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0009
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0009
+//! @SYMAPI			DMMCStack::EffectiveModes();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		28/06/2008
+//! @SYMTestCaseDesc		Effective modes tests
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				4. Remove mode
+//!				5. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				6. Set Bus Clock mode
+//!				7. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				8. Set Busy TimeOut mode
+//!				9. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				10. Set CRC Retries mode
+//!				11. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				12. Set Data TimeOut mode
+//!				13. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				14. Set mode
+//!				15. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				16. Set Op Cond Busy Timeout mode
+//!				17. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				18. Set Poll Attempts mode
+//!				19. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				20. Set Response TimeOut In Ticks mode
+//!				21. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				22. Set Ticks Clock In mode
+//!				23. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				24. Set Ticks Clock Out mode
+//!				25. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				26. Set TimeOut Retries mode
+//!				27. Get the modes which the DMMCStack object serving this session will consider as effective
+//!				28. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	EffectiveModes altered correctly with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd					\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen				BASE-BSP-SD-STACK-DRIVER-0009-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL					BASE-BSP-SD-STACK-DRIVER-0009-001-NewL_command02
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command03
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command04
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command05
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command06
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command07
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command08
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command09
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command10
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command11
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command12
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command13
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command14
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command15
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command16
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command17
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command18
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command19
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command20
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command21
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command22
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command23
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command24
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command25
+		COMMAND		mmcsdstack1	AlterEffectiveModes			BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command26
+		COMMAND		mmcsdstack1	EffectiveModes				BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command27
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0009
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0010
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0010
+//! @SYMAPI			DMMCStack::CardP();
+//! @SYMAuthor			M Flowers
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Negative test for select card - calls DMMCStackCardP with an invalid card number
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select an invalid card
+//!				4. Write to a sector of the card
+//!				5. Select an invalid card
+//!				6. Write to a sector of the card
+//!				7. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	CardP returns NULL and WriteSector returns KErrNotReady
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT		MMCSDSession	mmcsdsession1
+		CREATE_OBJECT		MMCSDStack	mmcsdstack1
+		COMMAND			mmcsdsession1	NewL
+		COMMAND			mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0010-001-DriverOpen_command01
+		COMMAND			mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0010-001-NewL_command02
+		COMMAND			mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0010-001-CardP_command03
+		COMMAND	!AsyncError=-18	mmcsdstack1	WriteSector		BASE-BSP-SD-STACK-DRIVER-0010-001-WriteSector_command04
+		OUTSTANDING
+		COMMAND 		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0010-001-CardP_command05
+		COMMAND	!AsyncError=-18	mmcsdstack1	WriteSector		BASE-BSP-SD-STACK-DRIVER-0010-001-WriteSector_command06
+		OUTSTANDING
+		COMMAND			mmcsdsession1	Close
+		COMMAND			mmcsdstack1	~
+		COMMAND			mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0010
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0011
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0011
+//! @SYMAPI			TMMCard::CSD();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		15/07/2008
+//! @SYMTestCaseDesc		CSD Test - Read the CSD
+//! @SYMTestActions    		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Read the CSD
+//!				7. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	CSD correctly returned with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0011-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0011-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0011-001-CardP_command03
+		COMMAND		mmcsdstack1	ReadCSD
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0011
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0012
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0012
+//! @SYMAPI			DMMCSession::SetupCIMReadBlock(TMMCArgument, TUint32, TUint8 {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		15/07/2008
+//! @SYMTestCaseDesc		Multiple read/write sector test.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Write to a sector of the card
+//!				5. Read from a sector of the card
+//!				6. Write to a sector of the card
+//!				7. Read from a sector of the card
+//!				8. Write to a sector of the card
+//!				9. Read from a sector of the card
+//!				10. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Sectors correctly written and read with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0012-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0012-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0012-001-CardP_command03
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-SD-STACK-DRIVER-0012-001-WriteSector_command04
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-SD-STACK-DRIVER-0012-001-ReadSector_command05
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-SD-STACK-DRIVER-0012-001-WriteSector_command06
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-SD-STACK-DRIVER-0012-001-ReadSector_command07
+		COMMAND		mmcsdstack1	WriteSector		BASE-BSP-SD-STACK-DRIVER-0012-001-WriteSector_command08
+		COMMAND		mmcsdstack1	ReadSector		BASE-BSP-SD-STACK-DRIVER-0012-001-ReadSector_command09
+		OUTSTANDING
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0012
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0013
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0013
+//! @SYMAPI			TMMCard::ExtendedCSD();
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		15/07/2008
+//! @SYMTestCaseDesc		Extended CSD Test - Read the Extended CSD
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Read the Extended CSD
+//!				7. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	CSD correctly returned with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0013-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0013-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0013-001-CardP_command03
+		COMMAND		mmcsdstack1	ReadExtCSD
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0013
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0014
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0014
+//! @SYMAPI			DMMCStack::CardP(TUint);
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		30/04/2008
+//! @SYMTestCaseDesc		Card Pointer Test - Get pointer to a card.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get pointer to card
+//!				4. Get card info
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Pointer to card correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0014-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0014-001-NewL_command02
+		COMMAND 	mmcsdstack1 	CardP			BASE-BSP-SD-STACK-DRIVER-0014-001-CardP_command03
+		COMMAND 	mmcsdstack1 	CardInfo		BASE-BSP-SD-STACK-DRIVER-0014-001-CardInfo_command04
+		COMMAND 	mmcsdstack1 	CardIsPresent		BASE-BSP-SD-STACK-DRIVER-0014-001-CardIsPresent_command05
+		COMMAND 	mmcsdstack1 	CardIsReady		BASE-BSP-SD-STACK-DRIVER-0014-001-CardIsReady_command06
+		COMMAND 	mmcsdstack1 	CardIsLocked		BASE-BSP-SD-STACK-DRIVER-0014-001-CardIsLocked_command07
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0014
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0015
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0015
+//! @SYMAPI			DMMCStack::CardP(TUint);
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		25/07/2008
+//! @SYMTestCaseDesc		Card Pointer Test - Get pointer to a card using invalid card numbers.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get pointer to card with correct card number
+//!				4. Get pointer to card with card number -1
+//!				5. Get pointer to card with card number 5
+//!				6. Get pointer to card with correct card number
+//!				7. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Pointer to card correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0015-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0015-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0015-001-CardP_command03
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0015-001-CardP_command04
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0015-001-CardP_command05
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0015-001-CardP_command06
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0015
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0016
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0016
+//! @SYMAPI			DMMCStack::MaxCardsInStack();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		02/05/2008
+//! @SYMTestCaseDesc		Max Cards In Stack Test - Get the max number of MultiMediaCards which could ever be present.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get the max number of MultiMediaCards which could ever be present
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Correct max number of MMC cards returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0016-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0016-001-NewL_command02
+		COMMAND		mmcsdstack1	MaxCardsInStack		BASE-BSP-SD-STACK-DRIVER-0016-001-MaxCardsInStack_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0016
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0017
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0017
+//! @SYMAPI			DMMCStack::MMCSocket();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		02/05/2008
+//! @SYMTestCaseDesc		Socket Pointer Test - Get pointer to associated socket.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get pointer to associated socket
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Pointer to socket correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		CREATE_OBJECT	MMCSDSocket	mmcsdsocket1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0017-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0017-001-NewL_command02
+		COMMAND		mmcsdsocket1	NewL			BASE-BSP-SD-STACK-DRIVER-0017-001-NewL_command02
+		COMMAND		mmcsdstack1	MMCSocket		BASE-BSP-SD-STACK-DRIVER-0017-001-Socket_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdsocket1	~
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0017
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0018
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0018
+//! @SYMAPI			DMMCStack::InitStackInProgress();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Init Stack In Progress Test - Get initialisation state of the stack.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get initialisation state of the stack
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Initialisation state of the stack correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0018-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0018-001-NewL_command02
+		COMMAND		mmcsdstack1	InitStackInProgress	BASE-BSP-SD-STACK-DRIVER-0018-001-InitStackInProgress_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SD-STACK-DRIVER-0018
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0019
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0019
+//! @SYMAPI			DMMCStack::BufferInfo(TUint8 {ptr ref}, TInt {ref}, TInt {ref});
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		30/04/2008
+//! @SYMTestCaseDesc		Buffer Info Test - Retrieve the DMA-capable buffer start and length and calculate the minor buffer length.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Retrieve the DMA-capable buffer start and length and calculate the minor buffer length
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Buffer info correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0019-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0019-001-NewL_command02
+		COMMAND		mmcsdstack1	BufferInfo		BASE-BSP-SD-STACK-DRIVER-0019-001-BufferInfo_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0019
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0020
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0020
+//! @SYMAPI			DMMCStack::ProgramPeriodInMilliSeconds();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Poll timer period Test - Get the poll timer period.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get the poll timer period
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The poll timer period is correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0020-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0020-001-NewL_command02
+		COMMAND 	mmcsdstack1 	ProgramPeriodMs		BASE-BSP-SD-STACK-DRIVER-0020-001-ProgramPeriodMs_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0020
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0021
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0021
+//! @SYMAPI			DMMCStack:: GetBufferInfo(TUint8 {ptr ptr}, TInt {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		17/04/2008
+//! @SYMTestCaseDesc		Get Buffer Info Test - Get details of buffer allocated by socket for data transfer operations.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get details of buffer allocated by socket for data transfer operations
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Details of buffer correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0021-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0021-001-NewL_command02
+		COMMAND		mmcsdstack1	GetBufferInfo		BASE-BSP-SD-STACK-DRIVER-0021-001-GetBufferInfo_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0021
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0022
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0022
+//! @SYMAPI			DMMCStack::MachineInfo(TMMCMachineInfo {ref});
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		06/05/2008
+//! @SYMTestCaseDesc		Machine Info Test - Get the platform specific configuration information.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Get the platform specific configuration information
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Platform specific configuration information correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0022-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0022-001-NewL_command02
+		COMMAND		mmcsdstack1	MachineInfo		BASE-BSP-SD-STACK-DRIVER-0022-001-MachineInfo_command03
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0022
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0023
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0023
+//! @SYMAPI			DMMCStack::DemandPagingInfo(TDemandPagingInfo {ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		18/04/2008
+//! @SYMTestCaseDesc		Demand Paging Info Test - Demand paging info.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Demand paging info
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Paging info obtained with KErrNotSupported.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT		MMCSDSession	mmcsdsession1
+		CREATE_OBJECT		MMCSDStack	mmcsdstack1
+		COMMAND			mmcsdsession1	NewL
+		COMMAND			mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0023-001-DriverOpen_command01
+		COMMAND			mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0023-001-NewL_command02
+		COMMAND	!Error=-5	mmcsdstack1	DemandPagingInfo
+		COMMAND			mmcsdsession1	Close
+		COMMAND			mmcsdstack1	~
+		COMMAND			mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0023
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0024
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0024
+//! @SYMAPI			DMMCStack::AllocSession(const TMMCCallBack {ref});
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		29/04/2008
+//! @SYMTestCaseDesc		Allocate Session Test
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Allocate Session
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Session allocated with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0024-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0024-001-NewL_command02
+		COMMAND		mmcsdstack1	AllocSession
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0024
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0025
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0025
+//! @SYMAPI			DMMCStack::AdjustPartialRead(const TMMCard {ptr}, TUint32, TUint32, TUint32{ptr}, TUint32 {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		28/07/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Get minimum range that must be read off card using invalid inputs.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Get minimum range that must be read off card, where aStart=0xFFFFFFFE and aEnd=0xFFFFFFFF
+//!				8. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The minimum range that must be read off card is correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0025-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0025-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0025-001-CardP_command03
+		COMMAND		mmcsdstack1	AdjustPartialRead	BASE-BSP-SD-STACK-DRIVER-0025-001-AdjustPartialRead_command04
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0025
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0026
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0026
+//! @SYMAPI			DMMCStack::AdjustPartialRead(const TMMCard {ptr}, TUint32, TUint32, TUint32{ptr}, TUint32 {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		28/07/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Get minimum range that must be read off card using invalid inputs.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Get minimum range that must be read off card, where aStart=0 and aEnd=0xFFFFFFFF
+//!				8. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The minimum range that must be read off card is correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0026-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0026-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0026-001-CardP_command03
+		COMMAND		mmcsdstack1	AdjustPartialRead	BASE-BSP-SD-STACK-DRIVER-0026-001-AdjustPartialRead_command04
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0026
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0027
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0027
+//! @SYMAPI			DMMCStack::AdjustPartialRead(const TMMCard {ptr}, TUint32, TUint32, TUint32{ptr}, TUint32 {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		28/07/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Get minimum range that must be read off card using invalid inputs.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Get minimum range that must be read off card, where where aStart=aEnd
+//!				8. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The minimum range that must be read off card is correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0027-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0027-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0027-001-CardP_command03
+		COMMAND		mmcsdstack1	AdjustPartialRead	BASE-BSP-SD-STACK-DRIVER-0027-001-AdjustPartialRead_command04
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0027
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0028
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0028
+//! @SYMAPI			DMMCStack::AdjustPartialRead(const TMMCard {ptr}, TUint32, TUint32, TUint32{ptr}, TUint32 {ptr});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		28/07/2008
+//! @SYMTestCaseDesc		Adjust Partial Read Test - Get minimum range that must be read off card using invalid inputs.
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Select the card
+//!				4. Get minimum range that must be read off card, where where aStart>aEnd
+//!				8. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	The minimum range that must be read off card is correctly returned with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0028-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0028-001-NewL_command02
+		COMMAND		mmcsdstack1	CardP			BASE-BSP-SD-STACK-DRIVER-0028-001-CardP_command03
+		COMMAND		mmcsdstack1	AdjustPartialRead	BASE-BSP-SD-STACK-DRIVER-0028-001-AdjustPartialRead_command04
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0028
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0029
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0029
+//! @SYMAPI			DMMCStack::ReportPowerUp();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		19/05/2008
+//! @SYMTestCaseDesc		ReportPowerUp
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Report that that power up operation has successfully completed.
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Power up reported with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0029-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0029-001-NewL_command02
+		COMMAND		mmcsdstack1	ReportPowerUp
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0029
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0030
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0030
+//! @SYMAPI			DMMCStack::ReportPowerDown();
+//! @SYMAuthor			Matt Flowers
+//! @SYMCreationDate		19/05/2008
+//! @SYMTestCaseDesc		ReportPowerDown
+//! @SYMTestActions		1. Create RMMCSDTestControllerInterface Handle object.
+//!				2. Open the driver connection
+//!				3. Report that that power down operation has successfully completed.
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	Power down reported with no errors.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		CREATE_OBJECT	MMCSDStack	mmcsdstack1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	DriverOpen		BASE-BSP-SD-STACK-DRIVER-0030-001-DriverOpen_command01
+		COMMAND		mmcsdstack1	NewL			BASE-BSP-SD-STACK-DRIVER-0030-001-NewL_command02
+		COMMAND		mmcsdstack1	ReportPowerDown
+		COMMAND		mmcsdsession1	Close
+		COMMAND		mmcsdstack1	~
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0030
+
+START_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0031
+//! @SYMTestCaseID		BASE-BSP-SD-STACK-DRIVER-0031
+//! @SYMAPI			FreeLogicalDevice(const TDesC {ref});
+//! @SYMAuthor			James Mechen
+//! @SYMCreationDate		17/04/2008
+//! @SYMTestCaseDesc		Free the Logical Device Driver
+//! @SYMTestActions		Free the D_MMCSDIF LDD Driver
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		high
+//! @SYMTestExpectedResults	logical device driver unloaded.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		T_mmcsd			\base\mmcsd\BASE-BSP-SD-STACK-DRIVER.ini
+		CREATE_OBJECT	MMCSDSession	mmcsdsession1
+		COMMAND		mmcsdsession1	NewL
+		COMMAND		mmcsdsession1	UnLoadDriver		BASE-BSP-SD-STACK-DRIVER-0031-001-UnloadDriver_command03
+		COMMAND		mmcsdsession1	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SD-STACK-DRIVER-0031
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/src/ActiveCallbackWrap.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#include "ActiveCallbackWrap.h"
+
+
+CActiveCallbackWrap::CActiveCallbackWrap(TInt aFunctionId, TInt aExpectedAsyncError) 
+: iFunctionId(aFunctionId)
+, iActiveCallback(NULL) 
+, iExpectedAsyncError(aExpectedAsyncError)
+, iData(NULL)
+, iExpectedData(NULL)
+, iDataPtr(NULL, 0)
+, iExpectedDataPtr(NULL, 0)
+	{
+	}
+
+void CActiveCallbackWrap::SetDesData(HBufC8* aData)
+	{
+	if (aData)
+		{
+		iData = aData;
+		iDataPtr.Set(aData->Des());		
+		}
+	}
+
+void CActiveCallbackWrap::SetExpectedDesData(HBufC8* aData)
+	{
+	if (aData)
+		{
+		iExpectedData = aData;
+		iExpectedDataPtr.Set(aData->Des());		
+		}
+	}
+
+CActiveCallbackWrap* CActiveCallbackWrap::NewLC(MActiveCallback& aCallback, TInt aFunctionId, TInt aExpectedAsyncError)
+	{
+	CActiveCallbackWrap* self = new (ELeave) CActiveCallbackWrap(aFunctionId, aExpectedAsyncError);
+	CleanupStack::PushL(self);
+	self->ConstructL(aCallback);
+	
+	return self;
+	}
+
+CActiveCallbackWrap* CActiveCallbackWrap::NewL(MActiveCallback& aCallback, TInt aFunctionId, TInt aExpectedAsyncError)
+	{
+	CActiveCallbackWrap* self = CActiveCallbackWrap::NewLC(aCallback, aFunctionId, aExpectedAsyncError);
+	CleanupStack::Pop(self);
+	
+	return self;
+	}
+
+CActiveCallbackWrap::~CActiveCallbackWrap()
+	{
+	delete iActiveCallback;
+	delete iData;
+	delete iExpectedData;
+	}
+
+
+void CActiveCallbackWrap::ConstructL(MActiveCallback& aCallback)
+	{
+	iActiveCallback = CActiveCallback::NewL(aCallback, CActive::EPriorityStandard);	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/src/T_MmcSDDriverData.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,841 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_MmcSDDriverData.h"
+
+//MMCSD Commands index
+/*@{*/
+_LIT(KCmdConstructor,					"NewL");
+_LIT(KCmdReadSector, 					"ReadSector");
+_LIT(KCmdWriteSector, 					"WriteSector");
+_LIT(KCmdReadCSD, 						"ReadCSD");
+_LIT(KCmdReadExtCSD, 					"ReadExtCSD");
+_LIT(KCmdCardInfo, 						"CardInfo");
+_LIT(KCmdCardIsPresent, 				"CardIsPresent");
+_LIT(KCmdCardIsReady, 					"CardIsReady");
+_LIT(KCmdCardIsLocked, 					"CardIsLocked");
+_LIT(KCmdDestructor,					"~");
+
+_LIT(KExpectedAsyncError, 				"expectedasyncerror");
+_LIT(KSectorNumber, 					"sectornumber");
+_LIT(KSectorText,						"sectortext");
+_LIT(KRepeats,							"repeats");
+_LIT(KHighCapacity, 					"highcapacity");
+_LIT(KMaxReadBlockLen, 					"maxreadblocklen");
+_LIT(KReadCurrentInMilliAmps, 			"readcurrentinmilliamps");
+_LIT(KTransferSpeed, 					"transferspeed");
+_LIT(KSessionWrapperName,				"sessionwrappername");
+_LIT(KExpectedIsPresent, 				"expectedispresent");
+_LIT(KExpectedIsReady, 					"expectedisready");
+_LIT(KExpectedIsLocked, 				"expectedislocked");
+/*@}*/
+
+
+
+/**
+ * Construction
+ *
+ * @return					N/A
+ */
+CT_MmcSDDriverData::CT_MmcSDDriverData()
+:	CDataWrapperBase()
+,	iMmcSDController(NULL)
+,	iStackNum(0)
+,	iAsyncErrorIndex(0)
+	{
+	}
+
+/**
+ * Second phase construction
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MmcSDDriverData::ConstructL()
+	{
+	User::LeaveIfError(iFs.Connect());
+	}
+
+/**
+ * Public destructor
+ *
+ * @return					N/A
+ */
+CT_MmcSDDriverData::~CT_MmcSDDriverData()
+	{
+	iFs.Close();
+
+	iActiveCallbacks.ResetAndDestroy();
+	}
+
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return					pointer to the object that the data wraps
+ */
+TAny* CT_MmcSDDriverData::GetObject()
+	{
+	return iMmcSDController;
+	}
+
+/**
+ * Process a command read from the script file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+TBool CT_MmcSDDriverData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+	{
+	TBool	ret=ETrue;
+
+	if ( aCommand==KCmdConstructor )
+		{
+		DoCmdConstructorL(aSection);
+		}
+	else if ( aCommand==KCmdDestructor )
+		{
+		DoCmdDestructor();
+		}
+	else if(aCommand == KCmdReadSector)
+		{
+		DoCmdReadSectorL(aSection, aAsyncErrorIndex);
+		}
+	else if(aCommand == KCmdWriteSector)
+		{
+		DoCmdWriteSectorL(aSection, aAsyncErrorIndex);
+		}
+	else if(aCommand == KCmdReadCSD)
+		{
+		DoCmdReadCSD();
+		}
+	else if(aCommand == KCmdReadExtCSD)
+		{
+		DoCmdReadExtCSD();
+		}
+	else if(aCommand == KCmdCardInfo)
+		{
+		DoCmdCardInfo(aSection);
+		}
+	else if(aCommand == KCmdCardIsPresent)
+		{
+		DoCmdCardIsPresent(aSection);
+		}
+	else if(aCommand == KCmdCardIsReady)
+		{
+		DoCmdCardIsReady(aSection);
+		}
+	else if(aCommand == KCmdCardIsLocked)
+		{
+		DoCmdCardIsLocked(aSection);
+		}
+	else
+		{
+		ret=CDataWrapperBase::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+	return ret;
+	}
+
+/**
+ * Creates the RBusLogicalChannel derived interface
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MmcSDDriverData::DoCmdConstructorL(const TDesC& aSection)
+	{
+	TPtrC	wrapperName;
+	if( GetStringFromConfig(aSection, KSessionWrapperName(), wrapperName) )
+		{
+		iMmcSDController = static_cast<RMMCSDTestControllerInterface*>(GetDataObjectL(wrapperName));
+		INFO_PRINTF2(_L("iMmcSDController = %x"), iMmcSDController);
+
+		if( iMmcSDController == NULL )
+			{
+			ERR_PRINTF1(_L("iMmcSDController is NULL-Constructor"));
+			SetBlockResult(EFail);
+			}
+		}
+	else
+		{
+		ERR_PRINTF1(_L("Error in Session Wrapper Name from INI file-Constructor"));
+		SetBlockResult(EFail);
+		}
+	}
+
+/**
+ * Destructor
+ *
+ * @return					void
+ */
+void CT_MmcSDDriverData::DoCmdDestructor()
+	{
+	INFO_PRINTF1(_L("CT_MmcSDDriverData::DoCmdDestructor()"));
+	}
+
+/**
+ * Creates an active callback wrapper and adds to the list
+ *
+ * @param aFunctionId			The active callback function ID
+ * @param aExpectedAsyncError	The active callback expected asynchronous error
+ *
+ * @return						The active callback wrapper created
+ */
+CActiveCallbackWrap* CT_MmcSDDriverData::CreateActiveCallbackL(TInt aFunctionId, TInt aExpectedAsyncError)
+	{
+	CActiveCallbackWrap* activeCallbackWrap = CActiveCallbackWrap::NewL(*this, aFunctionId, aExpectedAsyncError);
+	iActiveCallbacks.Append(activeCallbackWrap);
+	return activeCallbackWrap;
+	}
+
+/**
+ * Deletes an active callback from the list
+ *
+ * @param activeCallback	The active callback to delete
+ *
+ * @return					void
+ */
+void CT_MmcSDDriverData::DeleteActiveCallback(CActiveCallback* activeCallback)
+	{
+	if(activeCallback)
+		{
+		// loop through all wraps until we find the appropriate item
+
+		CActiveCallbackWrap* activeCallbackWrap = NULL;
+
+		for(int i=0;i<iActiveCallbacks.Count();i++)
+			{
+			if( &(iActiveCallbacks[i]->ActiveCallback()) == activeCallback)
+				{
+				activeCallbackWrap = iActiveCallbacks[i];
+				iActiveCallbacks.Remove(i);
+				break;
+				}
+			}
+
+		delete activeCallbackWrap;
+		}
+	}
+
+/**
+ * Reads a sector from the card
+ *
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	The asynchronous error index
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MmcSDDriverData::DoCmdReadSectorL(const TDesC& aSection, TInt aAsyncErrorIndex)
+	{
+
+	INFO_PRINTF1(_L("DoCmdReadSectorL called()"));
+
+	TInt sectorNumber;
+
+	if(!GetIntFromConfig(aSection, KSectorNumber(), sectorNumber))
+		{
+		ERR_PRINTF1(_L("DoCmdReadSectorL FAILED TO READ sectorNumber"));
+		SetBlockResult(EFail);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("DoCmdReadSectorL sectorNumber(%d)"), sectorNumber);
+		HBufC8* readData = HBufC8::NewLC(KSectorSizeInBytes);
+		CActiveCallbackWrap* activeCallbackWrap = CreateActiveCallbackL(RMMCSDTestControllerInterface::EReadSector, GetExpectedAsyncError(aSection));
+		activeCallbackWrap->SetDesData(readData);
+		
+		TPtrC 	expectedSectorText;
+		if(GetStringFromConfig(aSection, KSectorText(), expectedSectorText))
+			{
+			TInt	noOfRepeats = 1;
+			GetIntFromConfig(aSection, KRepeats(), noOfRepeats);
+
+			HBufC8* expectedData = HBufC8::NewLC(KSectorSizeInBytes);
+			activeCallbackWrap->SetExpectedDesData(expectedData);
+			
+			activeCallbackWrap->ExpectedDataPtr().Zero();
+			for(TInt i=0;i<noOfRepeats;i++)
+				{
+				activeCallbackWrap->ExpectedDataPtr().Append(expectedSectorText);
+				}
+
+		 	TBuf16<KSectorSizeInBytes> printBuf;
+		 	printBuf.Copy(activeCallbackWrap->ExpectedDataPtr());
+			INFO_PRINTF3(_L("DoCmdReadSectorL expectedSectorText (length=%d):\n%S"), printBuf.Length(), &printBuf);
+
+			CleanupStack::Pop(expectedData);
+			}
+
+		iMmcSDController->ReadSector(activeCallbackWrap->ActiveCallback().iStatus, sectorNumber, activeCallbackWrap->DataPtr());
+		activeCallbackWrap->ActiveCallback().Activate(aAsyncErrorIndex);
+		IncOutstanding();
+		CleanupStack::Pop(readData);
+		}
+	}
+
+/**
+ * Writes a sector to the card
+ *
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	The asynchronous error index
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MmcSDDriverData::DoCmdWriteSectorL(const TDesC& aSection, TInt aAsyncErrorIndex)
+	{
+	INFO_PRINTF1(_L("DoCmdWriteSectorL called()"));
+	TInt	sectorNumber;
+	TPtrC 	sectorText;
+
+	if(!GetIntFromConfig(aSection, KSectorNumber(), sectorNumber))
+		{
+		ERR_PRINTF1(_L("DoCmdWriteSectorL FAILED TO READ sectorNumber"));
+		SetBlockResult(EFail);
+		}
+	else if(!GetStringFromConfig(aSection, KSectorText(), sectorText))
+		{
+		ERR_PRINTF1(_L("DoCmdWriteSectorL FAILED TO READ sectorText"));
+		SetBlockResult(EFail);
+		}
+	else
+		{
+		TInt	noOfRepeats = 1;
+		GetIntFromConfig(aSection, KRepeats(), noOfRepeats);
+
+		HBufC8* writeData = HBufC8::NewLC(KSectorSizeInBytes);
+
+		CActiveCallbackWrap* activeCallbackWrap = CreateActiveCallbackL(RMMCSDTestControllerInterface::EWriteSector, GetExpectedAsyncError(aSection));
+		activeCallbackWrap->SetDesData(writeData);
+
+		activeCallbackWrap->DataPtr().Zero();
+		for(TInt i=0;i<noOfRepeats;i++)
+			{
+			activeCallbackWrap->DataPtr().Append(sectorText);
+			}
+
+	 	TBuf16<KSectorSizeInBytes> printBuf;
+	 	printBuf.Copy(activeCallbackWrap->DataPtr());
+		INFO_PRINTF4(_L("DoCmdWriteSectorL sectorNumber(%d) sectorText (length=%d):\n%S"), sectorNumber, printBuf.Length(), &printBuf);
+
+		iMmcSDController->WriteSector(activeCallbackWrap->ActiveCallback().iStatus, sectorNumber, activeCallbackWrap->DataPtr());
+		activeCallbackWrap->ActiveCallback().Activate(aAsyncErrorIndex);
+		IncOutstanding();
+		CleanupStack::Pop(writeData);
+		}
+	}
+
+/**
+ * Prints a CSD
+ *
+ * @param aCSDInfo			The CSD to print
+ *
+ * @return					void
+ */
+void CT_MmcSDDriverData::PrintCSD(const TCSDInfo& aCSDInfo)
+	{
+	INFO_PRINTF2(_L("CSDInfo->CSDStructure() = %u"), aCSDInfo.iCSDStructure);
+	INFO_PRINTF2(_L("CSDInfo->SpecVers() = %u"), aCSDInfo.iSpecVers);
+	INFO_PRINTF2(_L("CSDInfo->Reserved120() = %u"), aCSDInfo.iReserved120);
+	INFO_PRINTF2(_L("CSDInfo->TAAC() = %u"), aCSDInfo.iTAAC);
+	INFO_PRINTF2(_L("CSDInfo->NSAC() = %u"), aCSDInfo.iNSAC);
+	INFO_PRINTF2(_L("CSDInfo->TranSpeed() = %u"), aCSDInfo.iTranSpeed);
+	INFO_PRINTF2(_L("CSDInfo->CCC() = %u"), aCSDInfo.iCCC);
+	INFO_PRINTF2(_L("CSDInfo->ReadBlLen() = %u"), aCSDInfo.iReadBlLen);
+	INFO_PRINTF2(_L("CSDInfo->Reserved74() = %u"), aCSDInfo.iReserved74);
+	INFO_PRINTF2(_L("CSDInfo->CSize() = %u"), aCSDInfo.iCSize);
+	INFO_PRINTF2(_L("CSDInfo->VDDRCurrMin() = %u"), aCSDInfo.iVDDRCurrMin);
+	INFO_PRINTF2(_L("CSDInfo->VDDRCurrMax() = %u"), aCSDInfo.iVDDRCurrMax);
+	INFO_PRINTF2(_L("CSDInfo->VDDWCurrMin() = %u"), aCSDInfo.iVDDWCurrMin);
+	INFO_PRINTF2(_L("CSDInfo->VDDWCurrMax() = %u"), aCSDInfo.iVDDWCurrMax);
+	INFO_PRINTF2(_L("CSDInfo->CSizeMult() = %u"), aCSDInfo.iCSizeMult);
+	INFO_PRINTF2(_L("CSDInfo->EraseGrpSize() = %u"), aCSDInfo.iEraseGrpSize);
+	INFO_PRINTF2(_L("CSDInfo->EraseGrpMult() = %u"), aCSDInfo.iEraseGrpMult);
+	INFO_PRINTF2(_L("CSDInfo->WPGrpSize() = %u"), aCSDInfo.iWPGrpSize);
+	INFO_PRINTF2(_L("CSDInfo->DefaultECC() = %u"), aCSDInfo.iDefaultECC);
+	INFO_PRINTF2(_L("CSDInfo->R2WFactor() = %u"), aCSDInfo.iR2WFactor);
+	INFO_PRINTF2(_L("CSDInfo->WriteBlLen() = %u"), aCSDInfo.iWriteBlLen);
+	INFO_PRINTF2(_L("CSDInfo->Reserved16() = %u"), aCSDInfo.iReserved16);
+	INFO_PRINTF2(_L("CSDInfo->FileFormat() = %u"), aCSDInfo.iFileFormat);
+	INFO_PRINTF2(_L("CSDInfo->ECC() = %u"), aCSDInfo.iECC);
+	INFO_PRINTF2(_L("CSDInfo->CRC() = %u"), aCSDInfo.iCRC);
+	INFO_PRINTF2(_L("CSDInfo->DeviceSize() = %u"), aCSDInfo.iDeviceSize);
+	INFO_PRINTF2(_L("CSDInfo->ReadBlockLength() = %u"), aCSDInfo.iReadBlockLength);
+	INFO_PRINTF2(_L("CSDInfo->WriteBlockLength() = %u"), aCSDInfo.iWriteBlockLength);
+	INFO_PRINTF2(_L("CSDInfo->EraseSectorSize() = %u"), aCSDInfo.iEraseSectorSize);
+	INFO_PRINTF2(_L("CSDInfo->EraseGroupSize() = %u"), aCSDInfo.iEraseGroupSize);
+	INFO_PRINTF2(_L("CSDInfo->MinReadCurrentInMilliamps() = %u"), aCSDInfo.iMinReadCurrentInMilliamps);
+	INFO_PRINTF2(_L("CSDInfo->MinWriteCurrentInMilliamps() = %u"), aCSDInfo.iMinWriteCurrentInMilliamps);
+	INFO_PRINTF2(_L("CSDInfo->MaxReadCurrentInMilliamps() = %u"), aCSDInfo.iMaxReadCurrentInMilliamps);
+	INFO_PRINTF2(_L("CSDInfo->MaxWriteCurrentInMilliamps() = %u"), aCSDInfo.iMaxWriteCurrentInMilliamps);
+	INFO_PRINTF2(_L("CSDInfo->MaxTranSpeedInKilohertz() = %u"), aCSDInfo.iMaxTranSpeedInKilohertz);
+	INFO_PRINTF2(_L("CSDInfo->ReadBlPartial() = %d"), aCSDInfo.iReadBlPartial);
+	INFO_PRINTF2(_L("CSDInfo->WriteBlkMisalign() = %d"), aCSDInfo.iWriteBlkMisalign);
+	INFO_PRINTF2(_L("CSDInfo->ReadBlkMisalign() = %d"), aCSDInfo.iReadBlkMisalign);
+	INFO_PRINTF2(_L("CSDInfo->DSRImp() = %d"), aCSDInfo.iDSRImp);
+	INFO_PRINTF2(_L("CSDInfo->WPGrpEnable() = %d"), aCSDInfo.iWPGrpEnable);
+	INFO_PRINTF2(_L("CSDInfo->WriteBlPartial() = %d"), aCSDInfo.iWriteBlPartial);
+	INFO_PRINTF2(_L("CSDInfo->FileFormatGrp() = %d"), aCSDInfo.iFileFormatGrp);
+	INFO_PRINTF2(_L("CSDInfo->Copy() = %d"), aCSDInfo.iCopy);
+	INFO_PRINTF2(_L("CSDInfo->PermWriteProtect() = %d"), aCSDInfo.iPermWriteProtect);
+	INFO_PRINTF2(_L("CSDInfo->TmpWriteProtect() = %d"), aCSDInfo.iTmpWriteProtect);
+	INFO_PRINTF2(_L("CSDInfo->MediaType() = %d"), aCSDInfo.iMediaType);
+	}
+
+/**
+ * Prints an Extended CSD
+ *
+ * @param aExtendedCSDInfo	The Extended CSD to print
+ *
+ * @return					void
+ */
+void CT_MmcSDDriverData::PrintExtendedCSD(const TExtendedCSDInfo& aExtendedCSDInfo)
+	{
+	INFO_PRINTF2(_L("ExtendedCSDInfo->SupportedCmdSet() = %u"), aExtendedCSDInfo.iSupportedCmdSet);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->SectorCount() = %u"), aExtendedCSDInfo.iSectorCount);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->MinPerfWrite8Bit52Mhz() = %u"), aExtendedCSDInfo.iMinPerfWrite8Bit52Mhz);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->MinPerfRead8Bit52Mhz() = %u"), aExtendedCSDInfo.iMinPerfRead8Bit52Mhz);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->MinPerfWrite8Bit26Mhz_4Bit52Mhz() = %u"), aExtendedCSDInfo.iMinPerfWrite8Bit26Mhz_4Bit52Mhz);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->MinPerfRead8Bit26Mhz_4Bit52Mhz() = %u"), aExtendedCSDInfo.iMinPerfRead8Bit26Mhz_4Bit52Mhz);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->MinPerfWrite4Bit26Mhz() = %u"), aExtendedCSDInfo.iMinPerfWrite4Bit26Mhz);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->MinPerfRead4Bit26Mhz() = %u"), aExtendedCSDInfo.iMinPerfRead4Bit26Mhz);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->PowerClass26Mhz360V() = %u"), aExtendedCSDInfo.iPowerClass26Mhz360V);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->PowerClass52Mhz360V() = %u"), aExtendedCSDInfo.iPowerClass52Mhz360V);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->PowerClass26Mhz195V() = %u"), aExtendedCSDInfo.iPowerClass26Mhz195V);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->PowerClass52Mhz195V() = %u"), aExtendedCSDInfo.iPowerClass52Mhz195V);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->CardType() = %u"), aExtendedCSDInfo.iCardType);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->CSDStructureVer() = %u"), aExtendedCSDInfo.iCSDStructureVer);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->ExtendedCSDRev() = %u"), aExtendedCSDInfo.iExtendedCSDRev);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->CmdSet() = %u"), aExtendedCSDInfo.iCmdSet);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->CmdSetRev() = %u"), aExtendedCSDInfo.iCmdSetRev);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->PowerClass() = %u"), aExtendedCSDInfo.iPowerClass);
+	INFO_PRINTF2(_L("ExtendedCSDInfo->HighSpeedTiming() = %u"), aExtendedCSDInfo.iHighSpeedTiming);
+	}
+
+/**
+ * Reads the CSD
+ * This function is not contained within a TMMCard wrapper as this is not a class under test
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ */
+void CT_MmcSDDriverData::DoCmdReadCSD()
+	{
+	INFO_PRINTF1(_L("DoCmdReadCSD called()"));
+	TCSDInfo csdInfo;
+	TInt err = iMmcSDController->ReadCSD(csdInfo);
+	PrintCSD(csdInfo);
+
+	if( err != KErrNone )
+		{
+		ERR_PRINTF2(_L("DoCmdReadCSD() ReadCSD() Error %d"), err);
+		SetError(err);
+		}
+	}
+
+/**
+ * Reads the Extended CSD
+ * This function is not contained within a TMMCard wrapper as this is not a class under test
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ */
+void CT_MmcSDDriverData::DoCmdReadExtCSD()
+	{
+	INFO_PRINTF1(_L("DoCmdReadExtCSD called()"));
+	TExtendedCSDInfo extendedCSDInfo;
+	TInt err = iMmcSDController->ReadExtCSD(extendedCSDInfo);
+	if( err != KErrNone )
+		{
+		ERR_PRINTF2(_L("DoCmdReadExtCSD() Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		PrintExtendedCSD(extendedCSDInfo);
+		}
+	}
+
+/**
+ * Process command that will obtain card info from kernel side
+ * This function is not contained within a TMMCard wrapper as this is not a class under test
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ */
+void CT_MmcSDDriverData::DoCmdCardInfo(const TDesC& aSection)
+	{
+	TMMCCardInfo ci;
+	INFO_PRINTF1(_L("DoCmdCardInfo()"));
+	TInt err = iMmcSDController->CardInfo(ci);
+	if (err != KErrNone)
+		{
+		ERR_PRINTF2(_L("DoCmdCardInfo Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF5(_L("iIsReady(%d) iIsLocked(%d) iRCA(%d) iMediaType(%d)"),
+				ci.iIsReady, ci.iIsLocked, ci.iRCA, ci.iMediaType );
+
+		INFO_PRINTF6(_L("iCardSizeInBytes low(%x) high(%x) iMaxReadBlLen(%d) iReadBlLen(%d) iReadBlPartial(%d)"),
+				I64LOW(ci.iCardSizeInBytes), I64HIGH(ci.iCardSizeInBytes), ci.iMaxReadBlLen, ci.iReadBlLen, ci.iReadBlPartial );
+
+		INFO_PRINTF6(_L("iWriteBlPartial(%d) iReadBlkMisalign(%d) iWriteBlkMisalign(%d) iReadCurrentInMilliAmps(%d) iWriteCurrentInMilliAmps(%d)"),
+				ci.iWriteBlPartial, ci.iReadBlkMisalign, ci.iWriteBlkMisalign, ci.iReadCurrentInMilliAmps, ci.iWriteCurrentInMilliAmps );
+
+		INFO_PRINTF6(_L("iSpecVers(%d) iTAAC(%d) iNSAC(%d) iTransferSpeed(%d) iCommandRegister(%d)"),
+				ci.iSpecVers, ci.iTAAC, ci.iNSAC, ci.iTransferSpeed, ci.iCommandRegister );
+
+		INFO_PRINTF3(_L("iHighCapacity(%d) iFlags(%d) "), ci.iHighCapacity, ci.iFlags);
+
+		// check against expected values
+
+		TInt maxreadBlockLen;
+		if(GetIntFromConfig(aSection, KMaxReadBlockLen(), maxreadBlockLen))
+			{
+			if(maxreadBlockLen != ci.iMaxReadBlLen)
+				{
+				ERR_PRINTF3(_L("max block lengths do not match actual(%d), expected(%d)"), ci.iMaxReadBlLen, maxreadBlockLen);
+				SetBlockResult(EFail);
+				}
+			}
+
+		TInt readCurrentInMilliAmps;
+		if(GetIntFromConfig(aSection, KReadCurrentInMilliAmps(), readCurrentInMilliAmps))
+			{
+			if(readCurrentInMilliAmps!= ci.iReadCurrentInMilliAmps)
+				{
+				ERR_PRINTF3(_L("ReadCurrentInMilliAmps do not match actual(%d), expected(%d)"),ci.iReadCurrentInMilliAmps, readCurrentInMilliAmps);
+				SetBlockResult(EFail);
+				}
+			}
+
+		TUint transferSpeed;
+		if(GetUintFromConfig(aSection, KTransferSpeed(), transferSpeed))
+			{
+			if(transferSpeed != ci.iTransferSpeed)
+				{
+				ERR_PRINTF3(_L("transferSpeed do not match actual(%d), expected(%d)"), ci.iTransferSpeed, transferSpeed);
+				SetBlockResult(EFail);
+				}
+			}
+
+		TBool highCapacity;
+		if(GetBoolFromConfig(aSection, KHighCapacity(), highCapacity))
+			{
+			if(highCapacity != ci.iHighCapacity)
+				{
+				ERR_PRINTF3(_L("highCapacity do not match actual(%d), expected(%d)"), ci.iHighCapacity, highCapacity);
+				SetBlockResult(EFail);
+				}
+			}
+		}
+	}
+
+/**
+ * Process command that will obtain card is present status from kernel side
+ * This function is not contained within a TMMCard wrapper as this is not a class under test
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ */
+void CT_MmcSDDriverData::DoCmdCardIsPresent(const TDesC& aSection)
+	{
+	TBool isPresent;
+	INFO_PRINTF1(_L("DoCmdCardIsPresent()"));
+	TInt err = iMmcSDController->CardIsPresent(isPresent);
+	if (err != KErrNone)
+		{
+		ERR_PRINTF2(_L("DoCmdCardIsPresent Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("DoCmdCardIsPresent(): isPresent = %d"), isPresent);
+		
+		// check against expected value
+		TBool expectedIsPresent;
+		if(GetBoolFromConfig(aSection, KExpectedIsPresent(), expectedIsPresent))
+			{
+			if(expectedIsPresent != isPresent)
+				{
+				ERR_PRINTF3(_L("isPresent does not match actual(%d), expected(%d)"), isPresent, expectedIsPresent);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("DoCmdCardIsPresent(): No expected value given in INI file"));
+			SetBlockResult(EFail);			
+			}
+		}
+	}
+
+/**
+ * Process command that will obtain card is ready status from kernel side
+ * This function is not contained within a TMMCard wrapper as this is not a class under test
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ */
+void CT_MmcSDDriverData::DoCmdCardIsReady(const TDesC& aSection)
+	{
+	TBool isReady;
+	INFO_PRINTF1(_L("DoCmdCardIsReady()"));
+	TInt err = iMmcSDController->CardIsReady(isReady);
+	if (err != KErrNone)
+		{
+		ERR_PRINTF2(_L("DoCmdCardIsReady Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("DoCmdCardIsReady(): isReady = %d"), isReady);
+		
+		// check against expected value
+		TBool expectedIsReady;
+		if(GetBoolFromConfig(aSection, KExpectedIsReady(), expectedIsReady))
+			{
+			if(expectedIsReady != isReady)
+				{
+				ERR_PRINTF3(_L("isReady does not match actual(%d), expected(%d)"), isReady, expectedIsReady);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("DoCmdCardIsReady(): No expected value given in INI file"));
+			SetBlockResult(EFail);			
+			}
+		}
+	}
+
+/**
+ * Process command that will obtain card is locked status from kernel side
+ * This function is not contained within a TMMCard wrapper as this is not a class under test
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ */
+void CT_MmcSDDriverData::DoCmdCardIsLocked(const TDesC& aSection)
+	{
+	TBool isLocked;
+	INFO_PRINTF1(_L("DoCmdCardIsLocked()"));
+	TInt err = iMmcSDController->CardIsLocked(isLocked);
+	if (err != KErrNone)
+		{
+		ERR_PRINTF2(_L("DoCmdCardIsLocked Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("DoCmdCardIsLocked(): isLocked = %d"), isLocked);
+		
+		// check against expected value
+		TBool expectedIsLocked;
+		if(GetBoolFromConfig(aSection, KExpectedIsLocked(), expectedIsLocked))
+			{
+			if(expectedIsLocked != isLocked)
+				{
+				ERR_PRINTF3(_L("isLocked does not match actual(%d), expected(%d)"), isLocked, expectedIsLocked);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("DoCmdCardIsLocked(): No expected value given in INI file"));
+			SetBlockResult(EFail);			
+			}
+		}
+	}
+
+/**
+ * Called on completion of an asynchronous command
+ *
+ * @param aActive			Active Object that RunL has been called on
+ * @param aIndex			Index of the active object
+ *
+ * @return					void
+ */
+void CT_MmcSDDriverData::RunL(CActive* aActive, TInt aIndex)
+ 	{
+	TInt	err = aActive->iStatus.Int();
+ 	INFO_PRINTF2(_L("CT_MmcSDDriverData::RunL() called. err (%d)"), err);
+
+ 	// retrieve the active callback wrap that wraps this item
+ 	CActiveCallbackWrap* activeCallbackWrap=NULL;
+
+	for(int i=0;i<iActiveCallbacks.Count();i++)
+		{
+		if( &(iActiveCallbacks[i]->ActiveCallback()) == aActive)
+			{
+			activeCallbackWrap = iActiveCallbacks[i];
+			break;
+			}
+		}
+
+	if(activeCallbackWrap)
+		{
+		switch(activeCallbackWrap->FunctionId())
+			{
+			case RMMCSDTestControllerInterface::EReadSector:
+				{
+				INFO_PRINTF1(_L("CT_MmcSDDriverData::RunL() Post processing CActiveCallbackWrap RMMCSDTestControllerInterface::EReadSector:"));
+				if (err == KErrNone)
+					{
+					HBufC8* readData = (HBufC8*) activeCallbackWrap->Data();
+					// dump the read buffer here
+				 	TBuf16<KSectorSizeInBytes> printBuf;
+				 	printBuf.Copy(activeCallbackWrap->DataPtr());
+					INFO_PRINTF3(_L("ReadSector data (length=%d):\n%S"), printBuf.Length(), &printBuf);
+
+					HBufC8* expectedData = (HBufC8*) activeCallbackWrap->ExpectedData();
+					if (expectedData)
+						{
+						if (*readData != *expectedData)
+							{
+							TPtr8	expectedDataPtr(expectedData->Des());
+						 	TBuf16<KSectorSizeInBytes> printExpectedBuf;
+						 	printExpectedBuf.Copy(expectedDataPtr);
+							ERR_PRINTF3(_L("ReadSector data not as expected (length=%d):\n%S"), printExpectedBuf.Length(), &printExpectedBuf);
+							SetBlockResult(EFail);
+							}
+						}
+					}
+				}
+				break;
+
+			case RMMCSDTestControllerInterface::EWriteSector:
+				INFO_PRINTF1(_L("CT_MmcSDDriverData::RunL() Post processing CActiveCallbackWrap RMMCSDTestControllerInterface::EWriteSector:"));
+				break;
+				
+			case RMMCSDTestControllerInterface::ESocketPowerUp:
+				INFO_PRINTF1(_L("CT_MmcSDDriverData::RunL() Post processing CActiveCallbackWrap RMMCSDTestControllerInterface::ESocketPowerUp:"));
+				break;
+
+			default:
+				break;
+			}
+
+		if (err != activeCallbackWrap->ExpectedAsyncError())
+			{
+			ERR_PRINTF3(_L("Error (%d) != Expected error (%d)"), err, activeCallbackWrap->ExpectedAsyncError());
+			SetAsyncError(aIndex, err);
+			}
+
+		DecOutstanding();
+		DeleteActiveCallback((CActiveCallback*)aActive);
+		}
+	else
+		{
+		ERR_PRINTF1(_L("An unchecked active object completed"));
+		SetBlockResult(EFail);
+		}
+ 	}
+
+/**
+ * Request to cancel the asynchronous command
+ *
+ * @param aActive			Active Object that DoCancel has been called on
+ *
+ * @return					void
+ */
+void CT_MmcSDDriverData::DoCancel(CActive* aActive)
+ 	{
+	TInt	err = aActive->iStatus.Int();
+ 	INFO_PRINTF2(_L("CT_MmcSDDriverData::DoCancelL() called. err (%d)"), err);
+
+ 	// retrieve the active callback wrap that wraps this item
+ 	CActiveCallbackWrap* activeCallbackWrap=NULL;
+
+	for(int i=0;i<iActiveCallbacks.Count();i++)
+		{
+		if( &(iActiveCallbacks[i]->ActiveCallback()) == aActive)
+			{
+			activeCallbackWrap = iActiveCallbacks[i];
+			break;
+			}
+		}
+
+	if(activeCallbackWrap)
+		{
+		switch(activeCallbackWrap->FunctionId())
+		{
+			case RMMCSDTestControllerInterface::EReadSector:
+				INFO_PRINTF1(_L("CT_MmcSDDriverData::DoCancelL() Post processing CActiveCallbackWrap RMMCSDTestControllerInterface::EReadSector:"));
+				break;
+
+			case RMMCSDTestControllerInterface::EWriteSector:
+				INFO_PRINTF1(_L("CT_MmcSDDriverData::DoCancelL() Post processing CActiveCallbackWrap RMMCSDTestControllerInterface::EWriteSector:"));
+				break;
+				
+			case RMMCSDTestControllerInterface::ESocketPowerUp:
+				INFO_PRINTF1(_L("CT_MmcSDDriverData::DoCancelL() Post processing CActiveCallbackWrap RMMCSDTestControllerInterface::ESocketPowerUp:"));
+				break;
+
+			default:
+				break;
+		}
+
+		if (err != activeCallbackWrap->ExpectedAsyncError())
+			{
+			ERR_PRINTF3(_L("Error (%d) != Expected error (%d)"), err, activeCallbackWrap->ExpectedAsyncError());
+			SetBlockResult(EFail);
+			}
+
+		DecOutstanding();
+		DeleteActiveCallback((CActiveCallback*)aActive);
+		}
+	else
+		{
+		ERR_PRINTF1(_L("An unchecked active object completed"));
+		SetBlockResult(EFail);
+		}
+ 	}
+
+/**
+ * Gets the expected async error code
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					The expected async error code
+ */
+TInt CT_MmcSDDriverData::GetExpectedAsyncError(const TDesC& aSection)
+ 	{
+	TInt expectedAsyncError = KErrNone;
+	GetIntFromConfig(aSection, KExpectedAsyncError(), expectedAsyncError);
+	return expectedAsyncError;
+ 	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/src/T_MmcSDDriverServer.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,88 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_MmcSDDriverServer.h"
+
+CT_MmcSDDriverServer* CT_MmcSDDriverServer::NewL()
+/**
+ * @return - Instance of the test server
+ * Same code for Secure and non-secure variants
+ * Called inside the MainL() function to create and start the
+ * CTestServer derived server.
+ */
+	{
+	CT_MmcSDDriverServer* server = new (ELeave) CT_MmcSDDriverServer();
+    CleanupStack::PushL(server);
+    server->ConstructL();
+    CleanupStack::Pop(server);
+    return server;
+    }
+
+
+LOCAL_C void MainL()
+/**
+ * Secure variant
+ * Much simpler, uses the new Rendezvous() call to sync with the client
+ */
+	{
+#if (defined __DATA_CAGING__)
+    RProcess().DataCaging(RProcess::EDataCagingOn);
+    RProcess().SecureApi(RProcess::ESecureApiOn);
+#endif
+    CActiveScheduler*	sched=NULL;
+    sched=new(ELeave) CActiveScheduler;
+    CActiveScheduler::Install(sched);
+    CT_MmcSDDriverServer* server = NULL;
+
+    // Create the CTestServer derived server
+    TRAPD(err,server = CT_MmcSDDriverServer::NewL());
+    if(!err)
+	    {
+        // Sync with the client and enter the active scheduler
+        RProcess::Rendezvous(KErrNone);
+        sched->Start();
+        }
+
+    delete server;
+    delete sched;
+    }
+
+
+GLDEF_C TInt E32Main()
+/**
+ * @return - Standard Epoc error code on process exit
+ * Secure variant only
+ * Process entry point. Called by client using RProcess API
+ */
+	{
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    if(cleanup == NULL)
+	    {
+        return KErrNoMemory;
+        }
+
+#if (defined TRAP_IGNORE)
+	TRAP_IGNORE(MainL());
+#else
+	TRAPD(err,MainL());
+#endif
+
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/src/T_MmcSDMediaChangeDriverData.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,243 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_MmcSDMediaChangeDriverData.h"
+
+//MMCSD Commands index
+/*@{*/
+
+_LIT(KEnumNull,							" ");
+
+_LIT(KCmdMediaState,					"MediaState");
+_LIT(KCmdForceMediaChange,				"ForceMediaChange");
+_LIT(KCmdReplayCount,					"ReplayCount");
+
+_LIT(KExpectedMediaState,				"expectedmediastate");
+_LIT(KExpectedeventcount,				"expectedeventcount");
+
+_LIT(KOpened,							"EOpened");
+_LIT(KClosed,							"EClosed");
+
+const CDataWrapperBase::TEnumEntryTable	CT_MMCSDMediaChangeDriverData::iEnumMediaState[] =
+	{
+//	Enum as a descriptor					Enum
+	KOpened,								EOpened,
+	KClosed,								EClosed,
+	KEnumNull,								-1
+	};
+
+/*@}*/
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_MMCSDMediaChangeDriverData* CT_MMCSDMediaChangeDriverData::NewL()
+	{
+	CT_MMCSDMediaChangeDriverData*	ret=new (ELeave) CT_MMCSDMediaChangeDriverData();
+	CleanupStack::PushL(ret);
+	ret->ConstructL();
+	CleanupStack::Pop(ret);
+	return ret;
+	}
+
+
+CT_MMCSDMediaChangeDriverData::CT_MMCSDMediaChangeDriverData()
+:	CT_MmcSDDriverData()
+,	iAsyncErrorIndex(0)
+,	iCons(NULL)
+	{
+	}
+
+void CT_MMCSDMediaChangeDriverData::ConstructL()
+/**
+ * Second phase construction
+ *
+ * @internalComponent
+ *
+ * @return	N/A
+ *
+ * @pre		None
+ * @post	None
+ *
+ * @leave	system wide error
+ */
+	{
+	CT_MmcSDDriverData::ConstructL();
+	if(!iCons)
+		{
+		iCons = GetConsoleL();
+		}
+
+	}
+
+CT_MMCSDMediaChangeDriverData::~CT_MMCSDMediaChangeDriverData()
+/**
+ * Public destructor
+ */
+	{
+	delete iCons;
+	}
+
+TBool CT_MMCSDMediaChangeDriverData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+	{
+	TBool	ret=ETrue;
+
+	if ( aCommand==KCmdMediaState)
+		{
+		DoCmdMediaState(aSection);
+		}
+ 	else if ( aCommand==KCmdForceMediaChange)
+		{
+		DoCmdForceMediaChange();
+		}
+	else if ( aCommand==KCmdReplayCount)
+		{
+		DoCmdReplayCount(aSection);
+		}
+	else
+		{
+		ret=CT_MmcSDDriverData::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+	return ret;
+	}
+
+/**
+ * Get the Media State Information
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDMediaChangeDriverData::DoCmdMediaState(const TDesC& aSection)
+	{
+	TInt err;
+	TInt mediaState;
+	err= iMmcSDController->MediaStateInfo(mediaState);
+		if(err != KErrNone)
+			{
+			ERR_PRINTF2(_L("MMC/SD : Error in getting MediaState information, error code = %d \n"),err);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			switch(mediaState)
+				{
+			case EOpened:
+					{
+					INFO_PRINTF1(_L("MMC/SD Current MediaChange MediaState - Opened"));
+					break;
+					}
+			case EClosed:
+					{
+					INFO_PRINTF1(_L("MMC/SD Current MediaChange MediaState - Closed"));
+					break;
+					}
+			default:
+					{
+					ERR_PRINTF2(_L("MMC/SD : Current Media State is not supported by the platform-MediaState= %d \n"),mediaState);
+					SetBlockResult(EFail);
+					break;
+					}
+				}
+				TInt	expectedmediaState;
+				if ( GetEnumFromConfig(aSection, KExpectedMediaState(), iEnumMediaState, expectedmediaState) )
+					{
+					if(mediaState != expectedmediaState)
+						{
+						ERR_PRINTF3(_L("mediaState(%d) != expectedmediaState(%d)"), mediaState, expectedmediaState);
+						SetBlockResult(EFail);
+						}
+					}
+				else
+				{
+				SetBlockResult(EFail);
+				WARN_PRINTF1(_L("expectedmediaState Value Missing From INI File"));
+				}
+			}
+	}
+/**
+ * Force Media to Change the State
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDMediaChangeDriverData::DoCmdForceMediaChange()
+	{
+	TInt err;
+	err= iMmcSDController->ForceMediaChange();
+	if(err != KErrNone)
+			{
+			ERR_PRINTF2(_L("MMC/SD : Error in forcing media state, error code = %d \n"),err);
+			SetError(err);
+			}
+	}
+
+/**
+ * Count of media events yet to be acknowledged.
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDMediaChangeDriverData::DoCmdReplayCount(const TDesC& aSection)
+	{
+	TInt err;
+	TInt mediaEventCount;
+	err=iMmcSDController->MediaChangeCounter(mediaEventCount);
+	if(err != KErrNone)
+			{
+			ERR_PRINTF2(_L("MMC/SD : Error in reading media event replay count, error code = %d \n"),err);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF2(_L("MMC/SD: Media Event Count    = %d \n"),mediaEventCount);
+			TInt	expectedmediaEventCount;
+			if(GetBoolFromConfig(aSection, KExpectedeventcount(), expectedmediaEventCount))
+				{
+				if(mediaEventCount != expectedmediaEventCount)
+					{
+					ERR_PRINTF3(_L("mediaEventCount(%d) != expectedchangedState(%d)"), mediaEventCount, expectedmediaEventCount);
+					SetBlockResult(EFail);
+					}
+				}
+			else
+				{
+				SetBlockResult(EFail);
+				WARN_PRINTF1(_L("expectedchangedState Value Missing From INI File"));
+				}
+			}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/src/T_MmcSDPsuBaseDriverData.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,623 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_MmcSDPsuBaseDriverData.h"
+
+//MMCSD Commands index
+/*@{*/
+
+_LIT(KCmdIsLocked,							"IsLocked");
+_LIT(KCmdIsOff,								"IsOff");
+_LIT(KCmdMaxCurrentInMicroAmps,				"MaxCurrentInMicroAmps");
+_LIT(KCmdResetInactivityTimer,				"ResetInactivityTimer");
+_LIT(KCmdVoltageSupported,					"VoltageSupported");
+_LIT(KCmdInactivityCount,					"InactivityCount");
+_LIT(KCmdNotLockedCount,					"NotLockedCount");
+_LIT(KCmdInactivityTimeout,					"InactivityTimeout");
+_LIT(KCmdNotLockedTimeout,					"NotLockedTimeout");
+_LIT(KCmdMemVoltageSupported,				"MemVoltageSupported");
+_LIT(KCmdMemMaxCurrentInMicroAmps,			"MemMaxCurrentInMicroAmps");
+_LIT(KCmdVoltCheckInterval,					"VoltCheckInterval");
+
+
+_LIT(KExpectedLockState,					"expectedlockstate");
+_LIT(KExpectedPsuState,						"expectedpsustate");
+_LIT(KExpectedCurrent,						"expectedcurrent");
+_LIT(KExpectedVoltage,						"expectedvoltage");
+_LIT(KExpectedInactivityCount,				"expectedinactivityCount");
+_LIT(KExpectedNotLockedCount,				"expectednotLockedCount");
+_LIT(KExpectedInactivityTimeout,			"expectedinactivityTimeout");
+_LIT(KExpectedNotLockedTimeout,				"expectednotlockedtimeOut");
+_LIT(KExpectedMemVoltageSupported,			"expectedmemVoltageSupported");
+_LIT(KExpectedMemMaxCurrentInMicroAmps,		"expectedmemMaxCurrentInMicroAmps");
+_LIT(KExpectedVoltageinterval,				"expectedvoltageinterval");
+
+/*@}*/
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_MMCSDPsuBaseDriverData* CT_MMCSDPsuBaseDriverData::NewL()
+	{
+	CT_MMCSDPsuBaseDriverData*	ret=new (ELeave) CT_MMCSDPsuBaseDriverData();
+	CleanupStack::PushL(ret);
+	ret->ConstructL();
+	CleanupStack::Pop(ret);
+	return ret;
+	}
+
+
+CT_MMCSDPsuBaseDriverData::CT_MMCSDPsuBaseDriverData()
+:	CT_MmcSDDriverData()
+,	iAsyncErrorIndex(0)
+	{
+	}
+
+void CT_MMCSDPsuBaseDriverData::ConstructL()
+/**
+ * Second phase construction
+ *
+ * @internalComponent
+ *
+ * @return	N/A
+ *
+ * @pre		None
+ * @post	None
+ *
+ * @leave	system wide error
+ */
+	{
+	CT_MmcSDDriverData::ConstructL();
+	}
+
+CT_MMCSDPsuBaseDriverData::~CT_MMCSDPsuBaseDriverData()
+/**
+ * Public destructor
+ */
+	{
+	}
+
+TBool CT_MMCSDPsuBaseDriverData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+ 	{
+	TBool	ret=ETrue;
+
+	if ( aCommand==KCmdIsLocked )
+		{
+		DoCmdIsLocked(aSection);
+		}
+	else if ( aCommand==KCmdIsOff )
+		{
+		DoCmdIsOff(aSection);
+		}
+	else if ( aCommand==KCmdMaxCurrentInMicroAmps )
+		{
+		DoCmdMaxCurrentInMicroAmps(aSection);
+		}
+	else if ( aCommand==KCmdResetInactivityTimer )
+		{
+		DoCmdResetInactivityTimer();
+		}
+	else if ( aCommand==KCmdVoltageSupported)
+		{
+		DoCmdVoltageSupported(aSection);
+		}
+	else if ( aCommand==KCmdInactivityCount)
+		{
+		DoCmdInactivityCount(aSection);
+		}
+	else if ( aCommand==KCmdNotLockedCount)
+		{
+		DoCmdNotLockedCount(aSection);
+		}
+	else if ( aCommand==KCmdInactivityTimeout)
+		{
+		DoCmdInactivityTimeout(aSection);
+		}
+	else if ( aCommand==KCmdNotLockedTimeout)
+		{
+		DoCmdNotLockedTimeout(aSection);
+		}
+	else if ( aCommand==KCmdMemVoltageSupported)
+		{
+		DoCmdMemVoltageSupported(aSection);
+		}
+	else if ( aCommand==KCmdMemMaxCurrentInMicroAmps)
+		{
+		DoCmdMemMaxCurrentInMicroAmps(aSection);
+		}
+	else if ( aCommand==KCmdVoltCheckInterval)
+		{
+		DoCmdVoltCheckInterval(aSection);
+		}
+	else
+		{
+		ret=CT_MmcSDDriverData::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+	return ret;
+	}
+
+/**
+ * Checks whether this PSU is powering a bus containing a locked device
+ * i.e. one that is recognised and in use by a client
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuBaseDriverData::DoCmdIsLocked(const TDesC& aSection)
+	{
+ 	TInt err;
+ 	TBool lockstate;
+ 	err = iMmcSDController->IsLocked(lockstate);
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("Getting Lock Information Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		//IsLocked?
+		INFO_PRINTF2(_L("PSUBASE: IsLocked    = %d \n"),lockstate);
+		TBool	expectedlockstate;
+		if(GetBoolFromConfig(aSection, KExpectedLockState(), expectedlockstate))
+			{
+			if(lockstate != expectedlockstate)
+				{
+				SetBlockResult(EFail);
+				ERR_PRINTF3(_L("lockstate(%d) != expectedlockstate(%d)"), lockstate, expectedlockstate);
+				}
+			}
+		else
+			{
+			SetBlockResult(EFail);
+			WARN_PRINTF1(_L("expectedlockstate Value Missing From INI File"));
+			}
+		}
+	}
+
+/**
+ * Checks whether the PSU is off
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuBaseDriverData::DoCmdIsOff(const TDesC& aSection)
+	{
+ 	TInt err;
+ 	TBool psustate;
+ 	err = iMmcSDController->IsOff(psustate);
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("Getting PSU State Information Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		//IsLocked?
+		INFO_PRINTF2(_L("PSUBASE: IsOff    = %d \n"),psustate);
+		TBool	expectedpsustate;
+		if(GetBoolFromConfig(aSection, KExpectedPsuState(), expectedpsustate))
+			{
+			if(psustate != expectedpsustate)
+				{
+				SetBlockResult(EFail);
+				ERR_PRINTF3(_L("psustate(%d) != expectedpsustate(%d)"), psustate, expectedpsustate);
+				}
+			}
+		else
+			{
+			SetBlockResult(EFail);
+			WARN_PRINTF1(_L("expectedpsustate Value Missing From INI File"));
+			}
+		}
+	}
+
+/**
+ * Gets the maximum current (in microAmps) that the PSU is able to supply
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuBaseDriverData::DoCmdMaxCurrentInMicroAmps(const TDesC& aSection)
+	{
+ 	TInt err;
+ 	TInt current;
+ 	err = iMmcSDController->MaxCurrentInMicroAmps(current);
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("Getting MaxCurrentInMicroAmps Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		//MaxCurrentInMicroAmps
+		INFO_PRINTF2(_L("PSUBASE: MaxCurrentInMicroAmps   = %d \n"),current);
+		TInt	expectedcurrent;
+		if(GetIntFromConfig(aSection, KExpectedCurrent(), expectedcurrent))
+			{
+			if(current != expectedcurrent)
+				{
+				SetBlockResult(EFail);
+				ERR_PRINTF3(_L("current(%d) != expectedcurrent(%d)"), current, expectedcurrent);
+				}
+			}
+		else
+			{
+			SetBlockResult(EFail);
+			WARN_PRINTF1(_L("expectedcurrent Value Missing From INI File"));
+			}
+		}
+	}
+
+/**
+ * Resets inactivity and not-locked counts
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuBaseDriverData::DoCmdResetInactivityTimer()
+	{
+ 	TInt err;
+ 	err = iMmcSDController->ResetInactivityTimer();
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("ResetInactivityTimer Error %d"), err);
+		SetError(err);
+		}
+	}
+
+/**
+ * Gets the voltage level, or range of supported voltage levels
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuBaseDriverData::DoCmdVoltageSupported(const TDesC& aSection)
+	{
+ 	TInt err;
+ 	TUint volt;
+ 	err = iMmcSDController->VoltageSupported(volt);
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("VoltageSupported Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		//VoltageSupported
+		INFO_PRINTF2(_L("PSUBASE: VoltageSupported  = %x \n"),volt);
+		TUint	expectedvolt;
+		if(GetUintFromConfig(aSection, KExpectedVoltage(), expectedvolt))
+			{
+			if(volt != expectedvolt)
+				{
+				SetBlockResult(EFail);
+				ERR_PRINTF3(_L("volt(%x) != expectedvolt(%x)"), volt, expectedvolt);
+				}
+			}
+		else
+			{
+			SetBlockResult(EFail);
+			WARN_PRINTF1(_L("expectedvolt Value Missing From INI File"));
+			}
+		}
+	}
+
+/**
+ * Bus inactivity counter
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuBaseDriverData::DoCmdInactivityCount(const TDesC& aSection)
+	{
+ 	TInt err;
+ 	TInt inactivityCount;
+ 	err = iMmcSDController->InactivityCount(inactivityCount);
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("InactivityCount Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		//InactivityCount
+		INFO_PRINTF2(_L("PSUBASE: InactivityCount  = %d \n"),inactivityCount);
+		TInt	expectedinactivityCount;
+		if(GetIntFromConfig(aSection, KExpectedInactivityCount(), expectedinactivityCount))
+			{
+			if(inactivityCount != expectedinactivityCount)
+				{
+				SetBlockResult(EFail);
+				ERR_PRINTF3(_L("inactivityCount(%d) != expectedinactivityCount(%d)"), inactivityCount, expectedinactivityCount);
+				}
+			}
+		else
+			{
+			SetBlockResult(EFail);
+			WARN_PRINTF1(_L("expectedinactivityCount Value Missing From INI File"));
+			}
+		}
+	}
+
+/**
+ * Bus not locked counter
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuBaseDriverData::DoCmdNotLockedCount(const TDesC& aSection)
+	{
+ 	TInt err;
+ 	TInt notLockedCount;
+ 	err = iMmcSDController->NotLockedCount(notLockedCount);
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("NotLockedCount Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		//NotLockedCount
+		INFO_PRINTF2(_L("PSUBASE: NotLockedCount  = %d \n"),notLockedCount);
+		TInt	expectednotLockedCount;
+		if(GetIntFromConfig(aSection, KExpectedNotLockedCount(), expectednotLockedCount))
+			{
+			if(notLockedCount != expectednotLockedCount)
+				{
+				SetBlockResult(EFail);
+				ERR_PRINTF3(_L("notLockedCount(%d) != expectednotLockedCount(%d)"), notLockedCount, expectednotLockedCount);
+				}
+			}
+		else
+			{
+			SetBlockResult(EFail);
+			WARN_PRINTF1(_L("expectednotLockedCount Value Missing From INI File"));
+			}
+		}
+	}
+
+/**
+ * Bus inactivity timeout period, in seconds, when clients are registered
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuBaseDriverData::DoCmdInactivityTimeout(const TDesC& aSection)
+	{
+ 	TInt err;
+ 	TInt inactivityTimeout;
+ 	err = iMmcSDController->InactivityTimeout(inactivityTimeout);
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("InactivityTimeout Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		//InactivityTimeout
+		INFO_PRINTF2(_L("PSUBASE: InactivityTimeout  = %d \n"),inactivityTimeout);
+		TInt	expectedinactivityTimeout;
+		if(GetIntFromConfig(aSection, KExpectedInactivityTimeout(), expectedinactivityTimeout))
+			{
+			if(inactivityTimeout != expectedinactivityTimeout)
+				{
+				SetBlockResult(EFail);
+				ERR_PRINTF3(_L("inactivityTimeout(%d) != expectedinactivityTimeout(%d)"), inactivityTimeout, expectedinactivityTimeout);
+				}
+			}
+		else
+			{
+			SetBlockResult(EFail);
+			WARN_PRINTF1(_L("expectedinactivityTimeout Value Missing From INI File"));
+			}
+		}
+	}
+
+/**
+ * Bus not locked timeout period, in seconds, when no clients are registered
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuBaseDriverData::DoCmdNotLockedTimeout(const TDesC& aSection)
+	{
+ 	TInt err;
+ 	TInt notLockedTimeout;
+ 	err = iMmcSDController->NotLockedTimeout(notLockedTimeout);
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("NotLockedTimeout Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		//NotLockedTimeout
+		INFO_PRINTF2(_L("PSUBASE: NotLockedTimeout  = %d \n"),notLockedTimeout);
+		TInt	expectednotLockedTimeout;
+		if(GetIntFromConfig(aSection, KExpectedNotLockedTimeout(), expectednotLockedTimeout))
+			{
+			if(notLockedTimeout != expectednotLockedTimeout)
+				{
+				SetBlockResult(EFail);
+				ERR_PRINTF3(_L("notLockedTimeout(%d) != expectednotLockedTimeout(%d)"), notLockedTimeout, expectednotLockedTimeout);
+				}
+			}
+		else
+			{
+			SetBlockResult(EFail);
+			WARN_PRINTF1(_L("expectednotLockedTimeout Value Missing From INI File"));
+			}
+		}
+	}
+
+/**
+ * Indicates the voltage level, or range of voltages supported
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuBaseDriverData::DoCmdMemVoltageSupported(const TDesC& aSection)
+	{
+ 	TInt err;
+ 	TUint memVoltageSupported;
+ 	err = iMmcSDController->MemVoltageSupported(memVoltageSupported);
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("MemVoltageSupported Error %u"), err);
+		SetError(err);
+		}
+	else
+		{
+		//MemVoltageSupported
+		INFO_PRINTF2(_L("PSUBASE: MemVoltageSupported  = %x \n"),memVoltageSupported);
+		TUint	expectedmemVoltageSupported;
+		if(GetUintFromConfig(aSection, KExpectedMemVoltageSupported(), expectedmemVoltageSupported))
+			{
+			if(memVoltageSupported != expectedmemVoltageSupported)
+				{
+				SetBlockResult(EFail);
+				ERR_PRINTF3(_L("memVoltageSupported(%x) != expectedmemVoltageSupported(%x)"), memVoltageSupported, expectedmemVoltageSupported);
+				}
+			}
+		else
+			{
+			SetBlockResult(EFail);
+			WARN_PRINTF1(_L("expectedmemVoltageSupported Value Missing From INI File"));
+			}
+		}
+	}
+
+/**
+ * The maximum current (in microAmps) that the PSU is able to supply
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuBaseDriverData::DoCmdMemMaxCurrentInMicroAmps(const TDesC& aSection)
+	{
+ 	TInt err;
+ 	TInt memMaxCurrentInMicroAmps;
+ 	err = iMmcSDController->MemMaxCurrentInMicroAmps(memMaxCurrentInMicroAmps);
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("MemMaxCurrentInMicroAmps Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		//MemMaxCurrentInMicroAmps
+		INFO_PRINTF2(_L("PSUBASE: MemMaxCurrentInMicroAmps  = %d \n"),memMaxCurrentInMicroAmps);
+		TInt	expectedmemMaxCurrentInMicroAmps;
+		if(GetIntFromConfig(aSection, KExpectedMemMaxCurrentInMicroAmps(), expectedmemMaxCurrentInMicroAmps))
+			{
+			if(memMaxCurrentInMicroAmps != expectedmemMaxCurrentInMicroAmps)
+				{
+				SetBlockResult(EFail);
+				ERR_PRINTF3(_L("memMaxCurrentInMicroAmps(%d) != expectedmemMaxCurrentInMicroAmps(%d)"), memMaxCurrentInMicroAmps, expectedmemMaxCurrentInMicroAmps);
+				}
+			}
+		else
+			{
+			SetBlockResult(EFail);
+			WARN_PRINTF1(_L("expectedmemMaxCurrentInMicroAmps Value Missing From INI File"));
+			}
+		}
+	}
+
+/**
+ * Indicates whether the platform hardware has support for checking whether the voltage level of the
+ * PSU is within its expected voltage limit while turned on
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuBaseDriverData::DoCmdVoltCheckInterval(const TDesC& aSection)
+	{
+ 	TInt err;
+ 	TUint voltCheckInterval;
+ 	err = iMmcSDController->VoltCheckInterval(voltCheckInterval);
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("VoltCheckInterval Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		//VoltCheckInterval
+		INFO_PRINTF2(_L("PSUBASE: VoltCheckInterval  = %u \n"),voltCheckInterval);
+		TUint	expectedvoltCheckInterval;
+		if(GetUintFromConfig(aSection, KExpectedVoltageinterval(), expectedvoltCheckInterval))
+			{
+			if(voltCheckInterval != expectedvoltCheckInterval)
+				{
+				SetBlockResult(EFail);
+				ERR_PRINTF3(_L("voltCheckInterval(%u) != expectedvoltCheckInterval(%u)"), voltCheckInterval, expectedvoltCheckInterval);
+				}
+			}
+		else
+			{
+			SetBlockResult(EFail);
+			WARN_PRINTF1(_L("expectedvoltCheckInterval Value Missing From INI File"));
+			}
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/src/T_MmcSDPsuDriverData.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,637 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_MmcSDPsuDriverData.h"
+
+//MMCSD Commands index
+/*@{*/
+
+_LIT(KEnumNull,							" ");
+
+_LIT(KCmdPsuInfo,						"PsuInfo");
+_LIT(KCmdPbusState,						"PbusState");
+_LIT(KCmdSetPsuState,					"SetState");
+_LIT(KCmdVccState,						"VccState");
+_LIT(KCmdPsuVoltage,					"SetVoltage");
+_LIT(KCmdPsuNumber,						"PsuNumber");
+_LIT(KCmdMediaChangeNumber,				"MediaChangeNumber");
+_LIT(KCmdPsuCurLimit,					"PsuCurLimit");
+
+_LIT(KVoltage,							"expectedvoltage");
+_LIT(KCurrent,							"expectedcurrent");
+_LIT(KVoltageinterval,					"expectedvoltageinterval");
+_LIT(KVoltagecheck,						"expectedvoltagecheck");
+_LIT(KInactivityTimeOut,				"expectedpsuinactivitytimeOut");
+_LIT(KNotlockedtimeOut,					"expectednotlockedtimeOut");
+_LIT(KPbusState,						"expectedpbusstate");
+_LIT(KVccState,							"expectedvccstate");
+_LIT(KExpectedpsuNumber,				"expectedpsuNumber");
+_LIT(KExpectedmediaChangeNumber,		"expectedmediaChangeNumber");
+_LIT(KExpectedpsuCurLimit,				"expectedpsuCurLimit");
+
+_LIT(KPsuState,							"psustate");
+_LIT(KPsuVoltage,						"psuVoltage");
+/*@}*/
+
+_LIT(KPsuChkComparator,					"EDPsuChkComparator");
+_LIT(KPsuChkADCType,					"EDPsuChkADCType");
+_LIT(KPsuChkADCType2,					"EDPsuChkADCType2");
+
+_LIT(KBusCardAbsent,					"EBusCardAbsent");
+_LIT(KBusOff,							"EBusOff");
+_LIT(KBusPoweringUp,					"EBusPoweringUp");
+_LIT(KBusOn,							"EBusOn");
+_LIT(KEBusPsuFault,						"EBusPsuFault");
+_LIT(KBusPowerUpPending,				"EBusPowerUpPending");
+
+_LIT(KPsuOff,							"EDPsuOff");
+_LIT(KPsuOnCurLimit,					"EDPsuOnCurLimit");
+_LIT(KPsuOnFull,						"EDPsuOnFull");
+
+const CDataWrapperBase::TEnumEntryTable	CT_MMCSDPsuDriverData::iEnumTableVoltageCheckMethod[] =
+	{
+//	Enum as a descriptor					Enum
+	KPsuChkComparator,						EDPsuChkComparator,
+	KPsuChkADCType,							EDPsuChkADCType,
+	KPsuChkADCType2,						EDPsuChkADCType2,
+	KEnumNull,								-1
+	};
+
+const CDataWrapperBase::TEnumEntryTable	CT_MMCSDPsuDriverData::iEnumTablePbusState[] =
+	{
+//	Enum as a descriptor					Enum
+	KBusCardAbsent,							EBusCardAbsent,
+	KBusOff,								EBusOff,
+	KBusPoweringUp,							EBusPoweringUp,
+	KBusOn,									EBusOn,
+	KEBusPsuFault,							EBusPsuFault,
+	KBusPowerUpPending,						EBusPowerUpPending,
+	KEnumNull,								-1
+	};
+
+const CDataWrapperBase::TEnumEntryTable	CT_MMCSDPsuDriverData::iEnumTableVccState[] =
+	{
+//	Enum as a descriptor					Enum
+	KPsuOff,								EDPsuOff,
+	KPsuOnCurLimit,							EDPsuOnCurLimit,
+	KPsuOnFull,								EDPsuOnFull,
+	KEnumNull,								-1
+	};
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_MMCSDPsuDriverData* CT_MMCSDPsuDriverData::NewL()
+	{
+	CT_MMCSDPsuDriverData*	ret=new (ELeave) CT_MMCSDPsuDriverData();
+	CleanupStack::PushL(ret);
+	ret->ConstructL();
+	CleanupStack::Pop(ret);
+	return ret;
+	}
+
+
+CT_MMCSDPsuDriverData::CT_MMCSDPsuDriverData()
+:	CT_MmcSDDriverData()
+,	iAsyncErrorIndex(0)
+	{
+	}
+
+void CT_MMCSDPsuDriverData::ConstructL()
+/**
+ * Second phase construction
+ *
+ * @internalComponent
+ *
+ * @return	N/A
+ *
+ * @pre		None
+ * @post	None
+ *
+ * @leave	system wide error
+ */
+	{
+	CT_MmcSDDriverData::ConstructL();
+	}
+
+CT_MMCSDPsuDriverData::~CT_MMCSDPsuDriverData()
+/**
+ * Public destructor
+ */
+	{
+	}
+
+TBool CT_MMCSDPsuDriverData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+	{
+	TBool	ret=ETrue;
+
+	if ( aCommand==KCmdPsuInfo )
+		{
+		DoCmdPsuInfo(aSection);
+		}
+	else if ( aCommand==KCmdPsuVoltage )
+		{
+		DoCmdSetPsuVoltage(aSection);
+		}
+	else if ( aCommand==KCmdPsuNumber )
+		{
+		DoCmdPsuNumber(aSection);
+		}
+	else if ( aCommand==KCmdMediaChangeNumber )
+		{
+		DoCmdMediaChangeID(aSection);
+		}
+	else if ( aCommand==KCmdPsuCurLimit )
+		{
+		DoCmdPsuCurLimit(aSection);
+		}
+	else if ( aCommand==KCmdPbusState)
+		{
+		DoCmdPbusState(aSection);
+		}
+	else if ( aCommand==KCmdSetPsuState)
+		{
+		DoCmdSetPsuState(aSection);
+		}
+	else if ( aCommand==KCmdVccState)
+		{
+		DoCmdVccState(aSection);
+		}
+	else
+		{
+		ret=CT_MmcSDDriverData::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+	return ret;
+	}
+
+/**
+ * Psu information
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuDriverData::DoCmdPsuInfo(const TDesC& aSection)
+	{
+ 	TInt err;
+ 	TPBusPsuInf psuInfo;
+	err = iMmcSDController->PsuInfo(psuInfo);
+		if ( err!=KErrNone )
+			{
+			ERR_PRINTF2(_L("Getting PsuInfo Error %d"), err);
+			SetError(err);
+			}
+		else
+			{
+			//Inactivity Timeout
+			INFO_PRINTF2(_L("PSU: Bus Inactivity timeout Period    = %d \n"),psuInfo.iInactivityTimeOut);
+			TInt	expectedInactivityTimeOut;
+			if(GetIntFromConfig(aSection, KInactivityTimeOut(), expectedInactivityTimeOut))
+				{
+				if(psuInfo.iInactivityTimeOut != expectedInactivityTimeOut)
+					{
+					SetBlockResult(EFail);
+					ERR_PRINTF3(_L("psuInfo.iInactivityTimeOut(%d) != expectedInactivityTimeOut(%d)"), psuInfo.iInactivityTimeOut, expectedInactivityTimeOut);
+					}
+				if(psuInfo.iInactivityTimeOut<=0 || psuInfo.iInactivityTimeOut>10)
+					{
+					ERR_PRINTF1(_L("MMC/SD: Error : Inactivity timeout is not programmed correctly. \n"));
+					ERR_PRINTF1(_L("MMC/SD: Inactivity time out depends on platform. Possible value can be (1/3/5/10) seconds \n"));
+					SetBlockResult(EFail);
+					}
+				}
+			else
+				{
+				SetBlockResult(EFail);
+				WARN_PRINTF1(_L("Inactivity timeout Value Missing From INI File"));
+				}
+			//NotLocked Timeout
+			INFO_PRINTF2(_L("PSU: Bus Not Locked Timeout Period = %d \n"),psuInfo.iNotLockedTimeOut);
+			TInt	expectedNotlockedtimeOut;
+			if(GetIntFromConfig(aSection, KNotlockedtimeOut(), expectedNotlockedtimeOut))
+				{
+				if(psuInfo.iNotLockedTimeOut != expectedNotlockedtimeOut)
+					{
+					SetBlockResult(EFail);
+					ERR_PRINTF3(_L("psuInfo.iNotLockedTimeOut(%d) != expectedNotlockedtimeOut(%d)"), psuInfo.iNotLockedTimeOut, expectedNotlockedtimeOut);
+					}
+				}
+			else
+				{
+				SetBlockResult(EFail);
+				WARN_PRINTF1(_L("NotlockedtimeOut Value Missing From INI File"));
+				}
+			//MaxCurrentInMicroAmps
+			INFO_PRINTF2(_L("PSU: MaxCurrentInMicroAmps     = %d \n"),psuInfo.iMaxCurrentInMicroAmps);
+			TInt	expectedMaxCurrentInMicroAmps;
+			if(GetIntFromConfig(aSection, KCurrent(), expectedMaxCurrentInMicroAmps))
+				{
+				if(psuInfo.iMaxCurrentInMicroAmps != expectedMaxCurrentInMicroAmps)
+					{
+					SetBlockResult(EFail);
+					ERR_PRINTF3(_L("psuInfo.iMaxCurrentInMicroAmps(%d) != expectedMaxCurrentInMicroAmps(%d)"), psuInfo.iMaxCurrentInMicroAmps, expectedMaxCurrentInMicroAmps);
+					}
+			 	}
+			else
+				{
+				SetBlockResult(EFail);
+				WARN_PRINTF1(_L("MaxCurrentInMicroAmps Value Missing From INI File"));
+				}
+			//Volatge Supported
+			INFO_PRINTF2(_L("PSU: Volatge Supported(OCR Register Format)     = 0x%08x(OCR Format) \n"),psuInfo.iVoltageSupported);
+			TUint	expectedVoltageSupported;
+			if(GetUintFromConfig(aSection, KVoltage(), expectedVoltageSupported))
+				{
+				 if(psuInfo.iVoltageSupported != expectedVoltageSupported)
+					{
+					SetBlockResult(EFail);
+					ERR_PRINTF3(_L("psuInfo.iVoltageSupported(0x%08x) != expectedVoltageSupported(0x%08x)"), psuInfo.iVoltageSupported, expectedVoltageSupported);
+					}
+				//Bit MASK (Refer OCR register format)
+				if(psuInfo.iVoltageSupported ==0)
+					{
+					ERR_PRINTF1(_L("MMC/SD: iVoltageSupported should not be zero \n"));
+					ERR_PRINTF1(_L("MMC/SD: iVoltageSupported depends on platform. Possible values(3.0/3.3) volts in OCR register format\n"));
+					SetBlockResult(EFail);
+					}
+			 	}
+			else
+				{
+				SetBlockResult(EFail);
+				WARN_PRINTF1(_L("VoltageSupported Value Missing From INI File"));
+				}
+			//Voltage Interval
+			INFO_PRINTF2(_L("PSU: Voltage Interval      = %x \n"),psuInfo.iVoltCheckInterval);
+			TUint	expectedVoltCheckInterval;
+			if(GetUintFromConfig(aSection, KVoltageinterval(), expectedVoltCheckInterval))
+				{
+				 if(psuInfo.iVoltCheckInterval != expectedVoltCheckInterval)
+					{
+					SetBlockResult(EFail);
+					ERR_PRINTF3(_L("psuInfo.iVoltCheckInterval(%d) != expectedVoltCheckInterval(%d)"), psuInfo.iVoltCheckInterval, expectedVoltCheckInterval);
+					}
+			 	}
+			else
+				{
+				SetBlockResult(EFail);
+				WARN_PRINTF1(_L("VoltCheckInterval Value Missing From INI File"));
+				}
+			//VoltCheckMethod
+			switch(psuInfo.iVoltCheckMethod)
+				{
+				case EDPsuChkComparator:
+					{
+					INFO_PRINTF1(_L("PSU VoltCheck Method  is  Comparator"));
+					break;
+					}
+				case EDPsuChkADCType:
+					{
+					INFO_PRINTF1(_L("PSU VoltCheck Method  is  ADCType"));
+					break;
+					}
+				case EDPsuChkADCType2:
+					{
+					INFO_PRINTF1(_L("PSU VoltCheck Method  is  ADCType2"));
+					break;
+					}
+			default:
+					ERR_PRINTF2(_L("PSU VoltCheck Method  is  Not Supported=%d"),psuInfo.iVoltCheckMethod);
+				}
+			TInt	expectedVoltCheckMethod;
+			if ( GetEnumFromConfig(aSection, KVoltagecheck(), iEnumTableVoltageCheckMethod, expectedVoltCheckMethod) )
+				{
+				 if(psuInfo.iVoltCheckMethod != (TUint)expectedVoltCheckMethod)
+					{
+					SetBlockResult(EFail);
+					ERR_PRINTF3(_L("psuInfo.iVoltCheckMethod(%d) != expectedVoltCheckMethod(%d)"), psuInfo.iVoltCheckMethod, expectedVoltCheckMethod);
+					}
+				}
+			else
+				{
+				SetBlockResult(EFail);
+				WARN_PRINTF1(_L("expectedVoltCheckMethod Value Missing From INI File"));
+				}
+
+			}
+	}
+
+/**
+ * TPBusState Information
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuDriverData::DoCmdPbusState(const TDesC& aSection)
+	{
+	TInt err;
+	TInt pbusState;
+	err= iMmcSDController->PbusState(pbusState);
+		if(err != KErrNone)
+			{
+			ERR_PRINTF2(_L("MMC/SD : Error in getting PbusState information, error code = %d \n"),err);
+			SetError(err);
+			}
+		else
+			{
+			switch(pbusState)
+				{
+				case EBusCardAbsent:
+					{
+					WARN_PRINTF1(_L("Card is absent in the slot"));
+					break;
+					}
+				case EBusOff:
+					{
+					INFO_PRINTF1(_L("Bus State is OFF"));
+					break;
+					}
+				case EBusPoweringUp:
+					{
+					INFO_PRINTF1(_L("Bus State is Powerwing Up"));
+					break;
+					}
+				case EBusOn:
+					{
+					INFO_PRINTF1(_L("Bus State is Power ON"));
+					break;
+					}
+				case EBusPsuFault:
+					{
+					WARN_PRINTF1(_L("Bus State is BusPsuFault"));
+					break;
+					}
+				case EBusPowerUpPending:
+					{
+					INFO_PRINTF1(_L("Bus State is BusPowerUpPending"));
+					break;
+					}
+			default:
+					ERR_PRINTF2(_L("Bus State Not Supported = %d"),pbusState);
+				}
+			TInt	expectedPbusState;
+			if ( GetEnumFromConfig(aSection, KPbusState(), iEnumTablePbusState, expectedPbusState) )
+				{
+				if(pbusState != expectedPbusState)
+					{
+					ERR_PRINTF3(_L("pbusState(%d) != expectedPbusState(%d)"), pbusState, expectedPbusState);
+					SetBlockResult(EFail);
+					}
+				}
+			else
+				{
+				SetBlockResult(EFail);
+				WARN_PRINTF1(_L("expectedPbusState Value Missing From INI File"));
+				}
+			}
+
+	}
+
+/**
+ * Set Power Supply State
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuDriverData::DoCmdSetPsuState(const TDesC& aSection)
+	{
+	TInt err;
+	TInt psuState;
+	GetIntFromConfig(aSection, KPsuState(), psuState);
+	err=iMmcSDController->SetPsuState(psuState);
+	if(err != KErrNone)
+		{
+		ERR_PRINTF2(_L("MMCSD : Error in Setting PowerSupply State, error code = %d \n"),err);
+		SetError(err);
+		}
+	}
+
+/**
+ * PSU VCC State Information
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuDriverData::DoCmdVccState(const TDesC& aSection)
+	{
+	TInt err;
+	TInt vccState;
+	err= iMmcSDController->VccState(vccState);
+	if(err != KErrNone)
+			{
+			ERR_PRINTF2(_L("MMC/SD : Error in getting VccState information, error code = %d \n"),err);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			switch(vccState)
+				{
+				case EDPsuOff:
+					{
+					INFO_PRINTF1(_L("PSU VCC State  is PsuOff "));
+					break;
+					}
+				case EDPsuOnCurLimit:
+					{
+					INFO_PRINTF1(_L("PSU VCC State  is PsuOnCurLimit "));
+					break;
+					}
+				case EDPsuOnFull:
+					{
+					INFO_PRINTF1(_L("PSU VCC State  is PsuOnFull "));
+					break;
+					}
+			default:
+					ERR_PRINTF2(_L("PSU VCC State Not Supported = %d"),vccState);
+				}
+			TInt	expectedvccState;
+			if ( GetEnumFromConfig(aSection, KVccState(), iEnumTableVccState, expectedvccState) )
+				{
+				if(vccState != expectedvccState)
+					{
+					ERR_PRINTF3(_L("vccState(%d) != expectedvccState(%d)"), vccState, expectedvccState);
+					SetBlockResult(EFail);
+					}
+				}
+			else
+				{
+				SetBlockResult(EFail);
+				WARN_PRINTF1(_L("expectedvccState Value Missing From INI File"));
+				}
+			}
+	}
+/**
+ *Set Psu Voltage in OCR Format
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuDriverData::DoCmdSetPsuVoltage(const TDesC& aSection)
+	{
+	TInt err;
+	TUint psuVoltage; //OCR Register Format
+	GetUintFromConfig(aSection, KPsuVoltage(), psuVoltage);
+	err=iMmcSDController->SetPsuVoltage(psuVoltage);
+	if(err != KErrNone)
+		{
+		ERR_PRINTF2(_L("MMCSD : Error in Setting Psu Voltage, error code = %d \n"),err);
+		SetError(err);
+		}
+	}
+
+/**
+ *Reads the MMCSD power supply unit number
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuDriverData::DoCmdPsuNumber(const TDesC& aSection)
+	{
+	TInt err;
+	TInt psuNumber;
+	err=iMmcSDController->PsuNumber(psuNumber);
+	if(err != KErrNone)
+		{
+		ERR_PRINTF2(_L("MMCSD : Error in reading PSU Number from the platform, error code = %d \n"),err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("MMCSD Psu Number on platform   = %d \n"),psuNumber);
+		TInt	expectedpsuNumber;
+		if(GetIntFromConfig(aSection, KExpectedpsuNumber(), expectedpsuNumber))
+			{
+			if(psuNumber != expectedpsuNumber)
+				{
+				ERR_PRINTF3(_L("psuNumber(%d) != expectedpsuNumber(%d)"), psuNumber, expectedpsuNumber);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			SetBlockResult(EFail);
+			WARN_PRINTF1(_L("expectedpsuNumber Value Missing From INI File"));
+			}
+		}
+	}
+
+/**
+ *Reads the MMCSD Media Change ID
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuDriverData::DoCmdMediaChangeID(const TDesC& aSection)
+	{
+	TInt err;
+	TInt mediaChangeNumber;
+	err=iMmcSDController->MediaChangeID(mediaChangeNumber);
+	if(err != KErrNone)
+		{
+		ERR_PRINTF2(_L("MMCSD : Error in reading MeadiaChangeID from the platform, error code = %d \n"),err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("MMCSD MeadiaChangeID on platform   = %d \n"),mediaChangeNumber);
+		TInt	expectedmediaChangeNumber;
+		if(GetIntFromConfig(aSection, KExpectedmediaChangeNumber(), expectedmediaChangeNumber))
+			{
+			if(mediaChangeNumber != expectedmediaChangeNumber)
+				{
+				ERR_PRINTF3(_L("mediaChangeNumber(%d) != expectedmediaChangeNumber(%d)"), mediaChangeNumber, expectedmediaChangeNumber);
+				SetBlockResult(EFail);
+				};
+			}
+		else
+			{
+			SetBlockResult(EFail);
+			WARN_PRINTF1(_L("expectedmediaChangeNumber Value Missing From INI File"));
+			}
+		}
+
+	}
+
+/**
+ *Reads PSU current is limited to a safe level or Not
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDPsuDriverData::DoCmdPsuCurLimit(const TDesC& aSection)
+	{
+	TInt err;
+	TBool psuCurLimit;
+	err=iMmcSDController->PsuCurLimit(psuCurLimit);
+	if(err != KErrNone)
+		{
+		ERR_PRINTF2(_L("MMCSD : Error in reading PsuCurLimit from the platform, error code = %d \n"),err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("MMCSD PsuCurLimit on platform   = %d \n"),psuCurLimit);
+		TInt	expectedpsuCurLimit;
+		if(GetIntFromConfig(aSection, KExpectedpsuCurLimit(), expectedpsuCurLimit))
+			{
+			if(psuCurLimit != expectedpsuCurLimit)
+				{
+				ERR_PRINTF3(_L("psuCurLimit(%d) != expectedpsuCurLimit(%d)"), psuCurLimit, expectedpsuCurLimit);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			SetBlockResult(EFail);
+			WARN_PRINTF1(_L("expectedpsuCurLimit Value Missing From INI File"));
+			}
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/src/T_MmcSDSessionData.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,253 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_MmcSDSessionData.h"
+
+//MMCSD Commands index
+/*@{*/
+_LIT(KCmdConstructor,					"NewL");
+_LIT(KCmdLoadDriver,					"LoadDriver");
+_LIT(KCmdUnLoadDriver,					"UnLoadDriver");
+_LIT(KCmdDriverOpen,					"DriverOpen");
+_LIT(KCmdDestructor,					"~");
+
+_LIT(KLDDName,							"LDD");
+_LIT(KStackNumber,						"stacknumber");
+/*@}*/
+
+
+
+/**
+ * Create a new Socket Driver Data wrapper
+ *
+ * @return					A Socket Driver Data wrapper
+ *
+ * @leave					System wide error
+ */
+CT_MmcSDSessionData* CT_MmcSDSessionData::NewL()
+	{
+	CT_MmcSDSessionData*	ret=new (ELeave) CT_MmcSDSessionData();
+	CleanupStack::PushL(ret);
+	ret->ConstructL();
+	CleanupStack::Pop(ret);
+	return ret;
+	}
+
+/**
+ * Construction
+ *
+ * @return					N/A
+ */
+CT_MmcSDSessionData::CT_MmcSDSessionData()
+:	CT_RBusLogicalChannelData()
+,	iMmcSDController(NULL)
+	{
+	}
+
+/**
+ * Second phase construction
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MmcSDSessionData::ConstructL()
+	{
+	}
+
+/**
+ * Public destructor
+ *
+ * @return					N/A
+ */
+CT_MmcSDSessionData::~CT_MmcSDSessionData()
+	{
+	}
+
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return					pointer to the object that the data wraps
+ */
+TAny* CT_MmcSDSessionData::GetObject()
+	{
+	return iMmcSDController;
+	}
+
+/**
+ * Return a pointer to the handle
+ *
+ * @return					pointer to the MMC/SD Controller
+ */
+RHandleBase* CT_MmcSDSessionData::GetHandleBase()
+	{
+	return iMmcSDController;
+	}
+
+/**
+ * Return a pointer to the logical channel
+ *
+ * @return					pointer to the MMC/SD Controller
+ */
+RBusLogicalChannel* CT_MmcSDSessionData::GetBusLogicalChannel()
+	{
+	return iMmcSDController;
+	}
+
+/**
+ * Close and clean
+ *
+ * @return					void
+ */
+void CT_MmcSDSessionData::DestroyData()
+	{
+	delete iMmcSDController;
+	iMmcSDController=NULL;
+	}
+
+/**
+ * Process a command read from the script file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+TBool CT_MmcSDSessionData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+	{
+	TBool	ret=ETrue;
+
+	if ( aCommand==KCmdConstructor )
+		{
+		DoCmdConstructor();
+		}
+	else if ( aCommand==KCmdLoadDriver )
+		{
+		DoCmdLoadDriver(aSection);
+		}
+	else if ( aCommand==KCmdDriverOpen )
+		{
+		DoCmdDriverOpen(aSection);
+		}
+	else if ( aCommand==KCmdUnLoadDriver )
+		{
+		DoCmdUnLoadDriver(aSection);
+		}
+	else if ( aCommand==KCmdDestructor )
+		{
+		DoCmdDestructor();
+		}
+	else
+		{
+		ret=CT_RBusLogicalChannelData::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+	return ret;
+	}
+
+/**
+ * Creates the RBusLogicalChannel derived interface
+ *
+ * @param aCommand			None
+ *
+ * @return					None
+ */
+void CT_MmcSDSessionData::DoCmdConstructor()
+	{
+	delete iMmcSDController;
+	iMmcSDController=NULL;
+	TRAPD(err, iMmcSDController=new (ELeave) RMMCSDTestControllerInterface());
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("RMMCSDTestControllerInterface Creation Error %d"), err);
+		SetError(err);
+		}
+	}
+
+/**
+ * Loads the Device Driver
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ */
+void CT_MmcSDSessionData::DoCmdLoadDriver(const TDesC& aSection)
+	{
+	TPtrC lddname;
+	if(!GetStringFromConfig(aSection, KLDDName(), lddname))
+		{
+		ERR_PRINTF1(_L("Error in Reading Driver Name from INI file -Load"));
+		SetBlockResult(EFail);
+		}
+	User::LoadLogicalDevice(lddname);
+	}
+
+/**
+ * Unloads the Device Driver
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ */
+void CT_MmcSDSessionData::DoCmdUnLoadDriver(const TDesC& aSection)
+	{
+	TPtrC lddname;
+	if(!GetStringFromConfig(aSection, KLDDName(), lddname))
+		{
+		ERR_PRINTF1(_L("Error in Reading Driver Name from INI file-UnLoad"));
+		SetBlockResult(EFail);
+		}
+	User::FreeLogicalDevice(lddname);
+	}
+
+/**
+ * Opens the Driver Call
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ */
+void CT_MmcSDSessionData::DoCmdDriverOpen(const TDesC& aSection)
+	{
+	TInt err;
+	TInt stackNumber = 0;
+	GetIntFromConfig(aSection, KStackNumber(), stackNumber);
+	err=iMmcSDController->Open(stackNumber,iMmcSDController->VersionRequired());
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("Driver Open Call Failure %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("iMmcSDController = %x"), iMmcSDController);
+		}
+	}
+
+/**
+ * Destroys the objects
+ *
+ * @return					void
+ */
+void CT_MmcSDSessionData::DoCmdDestructor()
+	{
+	INFO_PRINTF1(_L("CT_MmcSDSessionData::DoCmdDestructor()"));
+	DestroyData();
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/src/T_MmcSDSocketDriverData.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1287 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_MmcSDSocketDriverData.h"
+#include "MmcTestUtils.h"
+
+
+//MMCSD Commands index
+/*@{*/
+
+_LIT(KCmdAdjustPartialRead, 			"AdjustPartialRead");
+_LIT(KCmdCardIsPresent, 				"CardIsPresent");	
+_LIT(KCmdGetBufferInfo, 				"GetBufferInfo");
+_LIT(KCmdInit, 							"Init");
+_LIT(KCmdInitiatePowerUpSequence, 		"InitiatePowerUpSequence");
+_LIT(KCmdMachineInfo, 					"MachineInfo");
+_LIT(KCmdPrepareStore, 					"PrepareStore");
+_LIT(KCmdReset1, 						"Reset1");
+_LIT(KCmdReset2, 						"Reset2");
+_LIT(KCmdResetInactivity, 				"ResetInactivity");
+_LIT(KCmdStack, 						"Stack");
+_LIT(KCmdiState_Get, 					"iState_Get");
+_LIT(KCmdiType_Get, 					"iType_Get");
+_LIT(KCmdiDoorOpened_Get, 				"iDoorOpened_Get");
+_LIT(KCmdiStandby_Get, 					"iStandby_Get");
+_LIT(KCmdPowerUp, 						"PowerUp");
+
+// ini file tags
+_LIT(KCardPresent,						"cardpresent");
+_LIT(KExpectedBufLen, 					"expectedbuflen");		
+_LIT(KOldPassword, 						"oldpassword");		
+_LIT(KNewPassword, 						"newpassword");		
+_LIT(KPrepStoreFunc, 					"prepstorefn");
+_LIT(KBusNumber, 						"busnum");
+_LIT(KPrdStart, 						"prdstart");
+_LIT(KPrdEnd, 							"prdend");
+_LIT(KPrdExpectedStart, 				"expectedprdstart");
+_LIT(KPrdExpectedEnd, 					"expectedprdend");
+_LIT(KExpectedTotalSockets, 			"expectedtotalsockets");
+_LIT(KExpectedTotalMediaChanges, 		"expectedtotalmediachanges");
+_LIT(KExpectedTotalPrimarySupplies, 	"expectedtotalprimarysupplies");
+_LIT(KExpectedSPIMode, 					"expectedspimode");
+_LIT(KExpectedBaseBusNumber, 			"expectedbasebusnumber");
+_LIT(KHasFlagSupportsSPIMode, 			"hasflagsupportsspimode");
+_LIT(KHasFlagSupportsDoubleBuffering, 	"hasflagsupportsdoublebuffering");
+_LIT(KHasFlagSupportsR7, 				"hasflagsupportsr7");
+_LIT(KHasFlagDma8BitAddressing, 		"hasflagdma8bitaddressing");
+_LIT(KHasFlagDma16BitAddressing, 		"hasflagdma16bitaddressing");
+_LIT(KHasFlagDma32BitAddressing, 		"hasflagdma32bitaddressing");
+_LIT(KHasFlagDma64BitAddressing, 		"hasflagdma64bitaddressing");
+_LIT(KHasFlagSupportsDMA, 				"hasflagsupportsdma");
+_LIT(KHasFlagMaxTransferLength_256K, 	"hasflagmaxtransferlength256k");
+_LIT(KHasFlagMaxTransferLength_512K, 	"hasflagmaxtransferlength512k");
+_LIT(KHasFlagMaxTransferLength_1M, 		"hasflagmaxtransferlength1m");
+_LIT(KHasFlagMaxTransferLength_2M, 		"hasflagmaxtransferlength2m");
+_LIT(KHasFlagMaxTransferLength_4M, 		"hasflagmaxtransferlength4m");
+_LIT(KHasFlagMaxTransferLength_8M, 		"hasflagmaxtransferlength8m");
+_LIT(KHasFlagMaxTransferLength_16M, 	"hasflagmaxtransferlength16m");
+_LIT(KIsNull, 							"isnull");
+_LIT(KState, 							"state");
+_LIT(KType, 							"type");
+_LIT(KDoorOpened, 						"dooropened");
+_LIT(KStandby, 							"standby");
+
+// DLocalDrive::TRequestId enum strings
+_LIT(KCaps,								"ECaps");
+_LIT(KRead,								"ERead");
+_LIT(KWrite,							"EWrite");
+_LIT(KFormat,							"EFormat");
+_LIT(KEnlarge,							"EEnlarge");
+_LIT(KReduce,							"EReduce");
+_LIT(KForceMediaChange,					"EForceMediaChange");
+_LIT(KPasswordLock,						"EPasswordLock");
+_LIT(KPasswordUnlock,					"EPasswordUnlock");
+_LIT(KPasswordClear,					"EPasswordClear");
+_LIT(KReadPasswordStore,				"EReadPasswordStore");
+_LIT(KWritePasswordStore,				"EWritePasswordStore");
+_LIT(KPasswordStoreLengthInBytes,		"EPasswordStoreLengthInBytes");
+_LIT(KControlIO,						"EControlIO");
+_LIT(KPasswordErase,					"EPasswordErase");
+_LIT(KDeleteNotify,						"EDeleteNotify");
+_LIT(KGetLastErrorInfo,					"EGetLastErrorInfo");
+_LIT(KInvalidRequestId,					"EInvalidRequestId");	
+
+/**	Enum as a descriptor  				Enum integar value													
+ *	In this case these enums represent DLocalDrive::TRequestId																					
+ *                                                                             
+ * 																											      							
+ */																														
+const CDataWrapperBase::TEnumEntryTable	CT_MMCSDSocketDriverData::iEnumTRequestIdTable [] =
+	{
+//	Enum as a descriptor				Enum
+	KCaps,								0,
+	KRead,								1,
+	KWrite,								2,
+	KFormat,							3,
+	KEnlarge,							4,
+	KReduce,							5,
+	KForceMediaChange,					6,
+	KPasswordLock,						7,
+	KPasswordUnlock,					8,
+	KPasswordClear,						9,
+	KReadPasswordStore,					10,
+	KWritePasswordStore,				11,
+	KPasswordStoreLengthInBytes,		12,
+	KControlIO,							13,
+	KPasswordErase,						14,
+	KDeleteNotify,						15,
+	KGetLastErrorInfo,					16,
+	KInvalidRequestId,					-1
+	};
+
+// TPBusState enum strings
+_LIT(KPBusCardAbsent,					"EPBusCardAbsent");
+_LIT(KPBusOff,							"EPBusOff");
+_LIT(KPBusPoweringUp,					"EPBusPoweringUp");
+_LIT(KPBusOn,							"EPBusOn");
+_LIT(KPBusPsuFault,						"EPBusPsuFault");
+_LIT(KPBusPowerUpPending,				"EPBusPowerUpPending");
+_LIT(KInvalidState,						"EInvalidState");	
+
+/**	Enum as a descriptor  				Enum integar value													
+ *	In this case these enums represent TPBusState
+ *                                                                             
+ * 																											      							
+ */																														
+const CDataWrapperBase::TEnumEntryTable	CT_MMCSDSocketDriverData::iEnumTPBusStateTable [] =
+	{
+//	Enum as a descriptor				Enum
+	KPBusCardAbsent,					EBusCardAbsent,
+	KPBusOff,							EBusOff,
+	KPBusPoweringUp,					EBusPoweringUp,
+	KPBusOn,							EBusOn,
+	KPBusPsuFault,						EBusPsuFault,
+	KPBusPowerUpPending,				EBusPowerUpPending,
+	KInvalidState,						-1	
+	};
+
+// TPBusType enum strings
+_LIT(KPBusTypeNone,						"EPBusTypeNone");
+_LIT(KPBusTypePcCard,					"EPBusTypePcCard");
+_LIT(KPBusTypeMultiMedia,				"EPBusTypeMultiMedia");
+_LIT(KPBusTypeUSB,						"EPBusTypeUSB");
+_LIT(KInvalidType,						"EInvalidType");	
+
+/**	Enum as a descriptor  				Enum integar value													
+ *	In this case these enums represent TPBusType
+ *                                                                             
+ * 																											      							
+ */																														
+const CDataWrapperBase::TEnumEntryTable	CT_MMCSDSocketDriverData::iEnumTPBusTypeTable [] =
+	{
+//	Enum as a descriptor				Enum
+	KPBusTypeNone,						EBusTypeNone,
+	KPBusTypePcCard,					EBusTypePcCard,
+	KPBusTypeMultiMedia,				EBusTypeMultiMedia,
+	KPBusTypeUSB,						EBusTypeUSB,
+	KInvalidType,						-1
+	};
+
+/*@}*/
+
+
+/**
+ * Create a new Socket Driver Data wrapper
+ *
+ * @return					A Socket Driver Data wrapper
+ *
+ * @leave					System wide error
+ */
+CT_MMCSDSocketDriverData* CT_MMCSDSocketDriverData::NewL()
+	{
+	CT_MMCSDSocketDriverData*	ret=new (ELeave) CT_MMCSDSocketDriverData();
+	CleanupStack::PushL(ret);
+	ret->ConstructL();
+	CleanupStack::Pop(ret);
+	return ret;
+	}
+
+/**
+ * Construction
+ *
+ * @return					N/A
+ */
+CT_MMCSDSocketDriverData::CT_MMCSDSocketDriverData()
+:	CT_MmcSDDriverData()
+	{
+	}
+
+/**
+ * Second phase construction
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDSocketDriverData::ConstructL()
+	{
+	CT_MmcSDDriverData::ConstructL();
+	}
+
+/**
+ * Public destructor
+ *
+ * @return					N/A
+ */
+CT_MMCSDSocketDriverData::~CT_MMCSDSocketDriverData()
+	{
+	}
+
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return					pointer to the object that the data wraps
+ */
+TAny* CT_MMCSDSocketDriverData::GetObject()
+	{
+	// Can't use DMMCSocket type on user side, so get pointer from Controller
+	TAny* socketPtr = NULL;
+	iMmcSDController->Socket(&socketPtr);
+	return socketPtr;
+	}
+
+/**
+ * Process a command read from the script file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+TBool CT_MMCSDSocketDriverData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+	{
+	TBool	ret=ETrue;
+
+	if( aCommand == KCmdAdjustPartialRead )
+		{
+		DoCmdAdjustPartialRead(aSection);
+		}
+	else if( aCommand==KCmdCardIsPresent )
+		{
+		DoCmdCardIsPresent(aSection);
+		}	
+	else if( aCommand == KCmdGetBufferInfo )
+		{
+		DoCmdGetBufferInfo(aSection);
+		}
+	else if( aCommand == KCmdInit )
+		{
+		DoCmdInit();
+		}
+	else if( aCommand == KCmdInitiatePowerUpSequence )
+		{
+		DoCmdInitiatePowerUpSequence();
+		}
+	else if( aCommand==KCmdMachineInfo )
+		{
+		DoCmdMachineInfo(aSection);
+		}	
+	else if( aCommand == KCmdPrepareStore )
+		{
+		DoCmdPrepareStore(aSection);
+		}
+	else if( aCommand == KCmdReset1 )
+		{
+		DoCmdReset1();
+		}
+	else if( aCommand == KCmdReset2 )
+		{
+		DoCmdReset2();
+		}
+	else if( aCommand == KCmdResetInactivity )
+		{
+		DoCmdResetInactivity(aSection);
+		}
+	else if( aCommand == KCmdStack )
+		{
+		DoCmdStack(aSection);
+		}
+	else if (aCommand == KCmdiState_Get)
+		{
+		DoCmdiState_Get(aSection);
+		}
+	else if (aCommand == KCmdiType_Get)
+		{
+		DoCmdiType_Get(aSection);
+		}
+	else if (aCommand == KCmdiDoorOpened_Get)
+		{
+		DoCmdiDoorOpened_Get(aSection);
+		}
+	else if (aCommand == KCmdiStandby_Get)
+		{
+		DoCmdiStandby_Get(aSection);
+		}
+	else if (aCommand == KCmdPowerUp)
+		{
+		DoCmdPowerUpL(aSection, aAsyncErrorIndex);
+		}
+	else
+		{
+		ret=CT_MmcSDDriverData::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+	return ret;
+	}
+
+
+/**
+ * Process command to call DMMCSocket::AdjustPartialRead
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ */
+void CT_MMCSDSocketDriverData::DoCmdAdjustPartialRead(const TDesC& aSection)
+	{	
+	TPartialReadData prd;
+	
+	if( !GetUintFromConfig(aSection, KPrdStart(), prd.iStart) )
+		{
+		ERR_PRINTF1(_L("Physical Start value not given in ini file"));
+		SetBlockResult(EFail);		
+		}
+	else if( !GetUintFromConfig(aSection, KPrdEnd(), prd.iEnd) )
+		{
+		ERR_PRINTF1(_L("Physical End value not given in ini file"));
+		SetBlockResult(EFail);		
+		}
+	else
+		{
+		INFO_PRINTF3(_L("Calling MMCSocket::AdjustPartialRead(start=%u, end=%u)"), prd.iStart, prd.iEnd);
+		TInt err = iMmcSDController->SocketAdjustPartialRead(prd);
+		
+		if( err != KErrNone )
+			{
+			ERR_PRINTF2(_L("MMCSocket::AdjustPartialRead() Error %d"), err);
+			SetError(err);
+			}
+		else
+			{
+			INFO_PRINTF3(_L("MMCSocket::AdjustPartialRead() = %u, %u"), prd.iPhysStart, prd.iPhysEnd);
+	
+			TUint expectedStart;
+			if( GetUintFromConfig(aSection, KPrdExpectedStart(), expectedStart) )
+				{
+				if( prd.iPhysStart != expectedStart )
+					{
+					ERR_PRINTF3(_L("phys start(%u) != expectedStart(%u)"), prd.iPhysStart, expectedStart);
+					SetBlockResult(EFail);
+					}
+				}
+			else
+				{
+				ERR_PRINTF1(_L("Expected Start value not given in ini file"));
+				SetBlockResult(EFail);		
+				}
+			
+			TUint expectedEnd;
+			if( GetUintFromConfig(aSection, KPrdExpectedEnd(), expectedEnd) )
+				{
+				if( prd.iPhysEnd != expectedEnd )
+					{
+					ERR_PRINTF3(_L("phys end(%u) != expected end(%u)"), prd.iPhysEnd, expectedEnd);
+					SetBlockResult(EFail);			 
+					}				
+				}
+			else
+				{
+				ERR_PRINTF1(_L("Expected End value not given in ini file"));
+				SetBlockResult(EFail);		
+				}
+			}			
+		}
+	}
+
+/**
+ * Process command to call DMMCSocket::CardIsPresent
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ */
+void CT_MMCSDSocketDriverData::DoCmdCardIsPresent(const TDesC& aSection)
+	{
+	TBool cardPresent = EFalse; 	
+	INFO_PRINTF1(_L("Calling MMCSocket::CardIsPresent()"));
+	TInt err = iMmcSDController->SocketCardIsPresent(cardPresent);
+		
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("MMCSocket::CardIsPresent() Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("MMCSocket::CardIsPresent() = %d"), cardPresent);
+		TBool	expectedCardPresent;
+		if( GetBoolFromConfig(aSection, KCardPresent(), expectedCardPresent) )
+			{
+			if( cardPresent != expectedCardPresent )
+				{
+				ERR_PRINTF3(_L("cardPresent(%d) != expectedCardPresent(%d)"), cardPresent, expectedCardPresent);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Expected CardPresent value not given in ini file"));
+			SetBlockResult(EFail);		
+			}
+		}
+	}
+
+/**
+ * Process command to call DMMCSocket::GetBufferInfo
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ */
+void CT_MMCSDSocketDriverData::DoCmdGetBufferInfo(const TDesC& aSection)
+	{
+	TBufferInfo bufferInfo;
+	INFO_PRINTF1(_L("Calling MMCSocket::GetBufferInfo()"));
+	TInt err = iMmcSDController->SocketGetBufferInfo(bufferInfo);	
+	if( err != KErrNone )
+		{
+		ERR_PRINTF2(_L("MMCSocket::GetBufferInfo() Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF3(_L("GetBufferInfo() iBuf(%x) iBufLen(%d)"),
+				bufferInfo.iBuf, bufferInfo.iBufLen);
+	
+		// check the optional expected length
+		TInt expectedBufLen;		
+		if( GetIntFromConfig(aSection, KExpectedBufLen(), expectedBufLen) )
+			{
+			if( bufferInfo.iBufLen != expectedBufLen )	
+				{
+				ERR_PRINTF3(_L("bufferInfo.iBufLen (%d) != expectedBufLen(%d)"), bufferInfo.iBufLen , expectedBufLen);
+				SetBlockResult(EFail);
+				}		
+			}
+		}
+	}
+
+/**
+ * Process command to call DMMCSocket::Init
+ *
+ * @return					void
+ */
+void CT_MMCSDSocketDriverData::DoCmdInit()
+	{
+	INFO_PRINTF1(_L("Calling MMCSocket::Init()"));
+	TInt err = iMmcSDController->SocketInit();	
+
+	if(err != KErrNone)
+		{
+		ERR_PRINTF2(_L("MMCSocket::Init() Error %d"), err);
+		SetError(err);
+		}
+	}
+
+/**
+ * Process command to call DMMCSocket::InitiatePowerUpSequence
+ *
+ * @return					void
+ */
+void CT_MMCSDSocketDriverData::DoCmdInitiatePowerUpSequence()
+	{
+	INFO_PRINTF1(_L("Calling MMCSocket::InitiatePowerUpSequence()"));
+	TInt err = iMmcSDController->SocketInitiatePowerUpSequence();	
+	if( err != KErrNone )
+		{
+		ERR_PRINTF2(_L("MMCSocket::InitiatePowerUpSequence() Error %d"), err);
+		SetError(err);
+		}
+	}
+
+/**
+ * Process command to call DMMCSocket::MachineInfo
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ */
+void CT_MMCSDSocketDriverData::DoCmdMachineInfo(const TDesC& aSection)
+	{
+	TMachineInfo machineInfo;
+	INFO_PRINTF1(_L("Calling MMCSocket::MachineInfo()"));
+	TInt err = iMmcSDController->SocketMachineInfo(machineInfo);	
+	if( err != KErrNone )
+		{
+		ERR_PRINTF2(_L("MMCSocket::MachineInfo() Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("MMCSocket::MachineInfo(): iTotalSockets=%d"), machineInfo.iTotalSockets);
+		INFO_PRINTF2(_L("MMCSocket::MachineInfo(): iTotalMediaChanges=%d"), machineInfo.iTotalMediaChanges);
+		INFO_PRINTF2(_L("MMCSocket::MachineInfo(): iTotalPrimarySupplies=%d"), machineInfo.iTotalPrimarySupplies);
+		INFO_PRINTF2(_L("MMCSocket::MachineInfo(): iSPIMode=%d"), machineInfo.iSPIMode);
+		INFO_PRINTF2(_L("MMCSocket::MachineInfo(): iBaseBusNumber=%d"), machineInfo.iBaseBusNumber);
+
+  		if( machineInfo.iSupportsSPIMode )
+  			{
+  			INFO_PRINTF1(_L("MMCSocket::MachineInfo(): Has flag ESupportsSPIMode"));
+  			}
+  		if( machineInfo.iSupportsDoubleBuffering )
+  			{
+  			INFO_PRINTF1(_L("MMCSocket::MachineInfo(): Has flag ESupportsDoubleBuffering"));
+  			}
+  		if( machineInfo.iSupportsR7 )
+  			{
+  			INFO_PRINTF1(_L("MMCSocket::MachineInfo(): Has flag ESupportsR7"));
+  			}
+  		if( machineInfo.iDma8BitAddressing )
+  			{
+  			INFO_PRINTF1(_L("MMCSocket::MachineInfo(): Has flag EDma8BitAddressing"));
+  			}
+  		if( machineInfo.iDma16BitAddressing )
+  			{
+  			INFO_PRINTF1(_L("MMCSocket::MachineInfo(): Has flag EDma16BitAddressing"));
+  			}
+  		if( machineInfo.iDma32BitAddressing )
+  			{
+  			INFO_PRINTF1(_L("MMCSocket::MachineInfo(): Has flag EDma32BitAddressing"));
+  			}
+  		if( machineInfo.iDma64BitAddressing )
+  			{
+  			INFO_PRINTF1(_L("MMCSocket::MachineInfo(): Has flag EDma64BitAddressing"));
+  			}
+  		if( machineInfo.iSupportsDMA )
+  			{
+  			INFO_PRINTF1(_L("MMCSocket::MachineInfo(): Has flag ESupportsDMA"));
+  			}
+  		if( machineInfo.iMaxTransferLength_256K )
+  			{
+  			INFO_PRINTF1(_L("MMCSocket::MachineInfo(): Has flag EMaxTransferLength_256K"));
+  			}
+  		if( machineInfo.iMaxTransferLength_512K )
+  			{
+  			INFO_PRINTF1(_L("MMCSocket::MachineInfo(): Has flag EMaxTransferLength_512K"));
+  			}
+  		if( machineInfo.iMaxTransferLength_1M )
+  			{
+  			INFO_PRINTF1(_L("MMCSocket::MachineInfo(): Has flag EMaxTransferLength_1M"));
+  			}
+  		if( machineInfo.iMaxTransferLength_2M )
+  			{
+  			INFO_PRINTF1(_L("MMCSocket::MachineInfo(): Has flag EMaxTransferLength_2M"));
+  			}
+  		if( machineInfo.iMaxTransferLength_4M )
+  			{
+  			INFO_PRINTF1(_L("MMCSocket::MachineInfo(): Has flag EMaxTransferLength_4M"));
+  			}
+  		if( machineInfo.iMaxTransferLength_8M )
+  			{
+  			INFO_PRINTF1(_L("MMCSocket::MachineInfo(): Has flag EMaxTransferLength_8M"));
+  			}
+  		if( machineInfo.iMaxTransferLength_16M )
+  			{
+  			INFO_PRINTF1(_L("MMCSocket::MachineInfo(): Has flag EMaxTransferLength_16M"));
+  			}
+		
+		TInt expectedInt;
+		TBool expectedBool;
+		
+		if( GetIntFromConfig(aSection, KExpectedTotalSockets(), expectedInt) )
+			{
+			if( machineInfo.iTotalSockets != expectedInt )
+				{
+				ERR_PRINTF3(_L("totalSockets(%d) != expectedTotalSockets(%d)"), machineInfo.iTotalSockets, expectedInt);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Expected Total Sockets not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+
+		if( GetIntFromConfig(aSection, KExpectedTotalMediaChanges(), expectedInt) )
+			{
+			if( machineInfo.iTotalMediaChanges != expectedInt )
+				{
+				ERR_PRINTF3(_L("totalMediaChanges(%d) != expectedTotalMediaChanges(%d)"), machineInfo.iTotalMediaChanges, expectedInt);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Expected Media Changes not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+		
+		if( GetIntFromConfig(aSection, KExpectedTotalPrimarySupplies(), expectedInt) )
+			{
+			if( machineInfo.iTotalPrimarySupplies != expectedInt )
+				{
+				ERR_PRINTF3(_L("totalPrimarySupplies(%d) != expectedTotalPrimarySupplies(%d)"), machineInfo.iTotalPrimarySupplies, expectedInt);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Expected Primary Supplies not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+		
+		if( GetBoolFromConfig(aSection, KExpectedSPIMode(), expectedBool) )
+			{
+			if( machineInfo.iSPIMode != expectedBool )
+				{
+				ERR_PRINTF3(_L("SPIMode(%d) != expectedSPIMode(%d)"), machineInfo.iSPIMode, expectedBool);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Expected SPI Mode not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+		
+		if( GetIntFromConfig(aSection, KExpectedBaseBusNumber(), expectedInt) )
+			{
+			if( machineInfo.iBaseBusNumber != expectedInt )
+				{
+				ERR_PRINTF3(_L("baseBusNumber(%d) != expectedBaseBusNumber(%d)"), machineInfo.iBaseBusNumber, expectedInt);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Expected Base Bus Number not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+		
+		if( GetBoolFromConfig(aSection, KHasFlagSupportsSPIMode(), expectedBool) )
+			{
+			if( machineInfo.iSupportsSPIMode != expectedBool )
+				{
+				ERR_PRINTF3(_L("supportsSPIMode(%d) != expectedSupportsSPIMode(%d)"), machineInfo.iSupportsSPIMode, expectedBool);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Has Flag Supports SPI Mode not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+
+		if( GetBoolFromConfig(aSection, KHasFlagSupportsDoubleBuffering(), expectedBool) )
+			{
+			if( machineInfo.iSupportsDoubleBuffering != expectedBool )
+				{
+				ERR_PRINTF3(_L("supportsDoubleBuffering(%d) != expectedSupportsDoubleBuffering(%d)"), machineInfo.iSupportsDoubleBuffering, expectedBool);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Has Flag Supports Double Buffering not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+
+		if( GetBoolFromConfig(aSection, KHasFlagSupportsR7(), expectedBool) )
+			{
+			if( machineInfo.iSupportsR7 != expectedBool )
+				{
+				ERR_PRINTF3(_L("supportsR7(%d) != expectedSupportsR7(%d)"), machineInfo.iSupportsR7, expectedBool);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Has Flag Supports R7 not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+
+		if( GetBoolFromConfig(aSection, KHasFlagDma8BitAddressing(), expectedBool) )
+			{
+			if( machineInfo.iDma8BitAddressing != expectedBool )
+				{
+				ERR_PRINTF3(_L("Dma8BitAddressing(%d) != expectedDma8BitAddressing(%d)"), machineInfo.iDma8BitAddressing, expectedBool);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Has Flag Dma 8Bit Addressing not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+
+		if( GetBoolFromConfig(aSection, KHasFlagDma16BitAddressing(), expectedBool) )
+			{
+			if( machineInfo.iDma16BitAddressing != expectedBool )
+				{
+				ERR_PRINTF3(_L("Dma16BitAddressing(%d) != expectedDma16BitAddressing(%d)"), machineInfo.iDma16BitAddressing, expectedBool);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Has Flag Dma 16Bit Addressing not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+
+		if( GetBoolFromConfig(aSection, KHasFlagDma32BitAddressing(), expectedBool) )
+			{
+			if( machineInfo.iDma32BitAddressing != expectedBool )
+				{
+				ERR_PRINTF3(_L("Dma32BitAddressing(%d) != expectedDma32BitAddressing(%d)"), machineInfo.iDma32BitAddressing, expectedBool);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Has Flag Dma 32Bit Addressing not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+
+		if( GetBoolFromConfig(aSection, KHasFlagDma64BitAddressing(), expectedBool) )
+			{
+			if( machineInfo.iDma64BitAddressing != expectedBool )
+				{
+				ERR_PRINTF3(_L("Dma64BitAddressing(%d) != expectedDma64BitAddressing(%d)"), machineInfo.iDma64BitAddressing, expectedBool);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Has Flag Dma 64Bit Addressing not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+
+		if( GetBoolFromConfig(aSection, KHasFlagSupportsDMA(), expectedBool) )
+			{
+			if( machineInfo.iSupportsDMA != expectedBool )
+				{
+				ERR_PRINTF3(_L("SupportsDMA(%d) != expectedSupportsDMA(%d)"), machineInfo.iSupportsDMA, expectedBool);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Has Flag Supports DMA not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+		
+		if( GetBoolFromConfig(aSection, KHasFlagMaxTransferLength_256K(), expectedBool) )
+			{
+			if( machineInfo.iMaxTransferLength_256K != expectedBool )
+				{
+				ERR_PRINTF3(_L("maxTransferLength_256K(%d) != expectedMaxTransferLength_256K(%d)"), machineInfo.iMaxTransferLength_256K, expectedBool);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Has Flag Max Transfer Length 256K not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+
+		if( GetBoolFromConfig(aSection, KHasFlagMaxTransferLength_512K(), expectedBool) )
+			{
+			if( machineInfo.iMaxTransferLength_512K != expectedBool )
+				{
+				ERR_PRINTF3(_L("maxTransferLength_512K(%d) != expectedMaxTransferLength_512K(%d)"), machineInfo.iMaxTransferLength_512K, expectedBool);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Has Flag Max Transfer Length 512K not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+
+		if( GetBoolFromConfig(aSection, KHasFlagMaxTransferLength_1M(), expectedBool) )
+			{
+			if( machineInfo.iMaxTransferLength_1M != expectedBool )
+				{
+				ERR_PRINTF3(_L("maxTransferLength_1M(%d) != expectedMaxTransferLength_1M(%d)"), machineInfo.iMaxTransferLength_1M, expectedBool);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Has Flag Max Transfer Length 1M not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+
+		if( GetBoolFromConfig(aSection, KHasFlagMaxTransferLength_2M(), expectedBool) )
+			{
+			if( machineInfo.iMaxTransferLength_2M != expectedBool )
+				{
+				ERR_PRINTF3(_L("maxTransferLength_2M(%d) != expectedMaxTransferLength_2M(%d)"), machineInfo.iMaxTransferLength_2M, expectedBool);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Has Flag Max Transfer Length 2M not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+
+		if( GetBoolFromConfig(aSection, KHasFlagMaxTransferLength_4M(), expectedBool) )
+			{
+			if( machineInfo.iMaxTransferLength_4M != expectedBool )
+				{
+				ERR_PRINTF3(_L("maxTransferLength_4M(%d) != expectedMaxTransferLength_4M(%d)"), machineInfo.iMaxTransferLength_4M, expectedBool);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Has Flag Max Transfer Length 4M not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+
+		if( GetBoolFromConfig(aSection, KHasFlagMaxTransferLength_8M(), expectedBool) )
+			{
+			if( machineInfo.iMaxTransferLength_8M != expectedBool )
+				{
+				ERR_PRINTF3(_L("maxTransferLength_8M(%d) != expectedMaxTransferLength_8M(%d)"), machineInfo.iMaxTransferLength_8M, expectedBool);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Has Flag Max Transfer Length 8M not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+
+		if( GetBoolFromConfig(aSection, KHasFlagMaxTransferLength_16M(), expectedBool) )
+			{
+			if( machineInfo.iMaxTransferLength_16M != expectedBool )
+				{
+				ERR_PRINTF3(_L("maxTransferLength_16M(%d) != expectedMaxTransferLength_16M(%d)"), machineInfo.iMaxTransferLength_16M, expectedBool);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Has Flag Max Transfer Length 16M not given in ini file"));
+			SetBlockResult(EFail);			
+			}
+		}
+	}
+
+/**
+ * Process command to call DMMCSocket::PrepareStore
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ */
+void CT_MMCSDSocketDriverData::DoCmdPrepareStore(const TDesC& aSection)
+	{	
+	TPasswordPrepareStoreData pwdData;
+	TPtrC oldPassword;
+	TPtrC newPassword;
+
+	if( !GetIntFromConfig(aSection, KBusNumber(), pwdData.iBus) )
+		{
+		ERR_PRINTF1(_L("Bus Number not given in ini file"));
+		SetBlockResult(EFail);			
+		}
+	else if( !GetStringFromConfig(aSection, KOldPassword(), oldPassword) )
+		{
+		ERR_PRINTF1(_L("Old password value not given in ini file"));
+		SetBlockResult(EFail);			
+		}
+	else if( !GetStringFromConfig(aSection, KNewPassword(), newPassword) )
+		{
+		ERR_PRINTF1(_L("New password value not given in ini file"));
+		SetBlockResult(EFail);			
+		}
+	else if( !GetEnumFromConfig(aSection, KPrepStoreFunc(), iEnumTRequestIdTable, pwdData.iFunc) )
+		{
+		ERR_PRINTF1(_L("Function ID not given in ini file"));
+		SetBlockResult(EFail);			
+		}
+	else
+		{
+		pwdData.iOldPassword.Copy(oldPassword);
+		pwdData.iNewPassword.Copy(newPassword);
+		
+	 	INFO_PRINTF5(_L("Calling MMCSocket::PrepareStore(bus=%d, func=%d, oldPassword=%S, newPassword=%S)"), pwdData.iBus, pwdData.iFunc, &oldPassword, &newPassword);
+		TInt err = iMmcSDController->SocketPrepareStore(pwdData);	     		
+		if( err != KErrNone )
+			{
+			ERR_PRINTF2(_L("MMCSocket::PrepareStore() Error %d"), err);
+			SetError(err);
+			}		
+		}
+	}
+
+/**
+ * Process command to call DMMCSocket::Reset1
+ *
+ * @return					void
+ */
+void CT_MMCSDSocketDriverData::DoCmdReset1()
+	{
+	INFO_PRINTF1(_L("Calling MMCSocket::Reset1()"));
+	TInt err = iMmcSDController->SocketReset1();	
+	if( err != KErrNone )
+		{
+		ERR_PRINTF2(_L("MMCSocket::Reset1() Error %d"), err);
+		SetError(err);
+		}
+	}
+
+/**
+ * Process command to call DMMCSocket::Reset2
+ *
+ * @return					void
+ */
+void CT_MMCSDSocketDriverData::DoCmdReset2()
+	{
+	INFO_PRINTF1(_L("Calling MMCSocket::Reset2()"));
+	TInt err = iMmcSDController->SocketReset2();	
+	if( err != KErrNone )
+		{
+		ERR_PRINTF2(_L("MMCSocket::Reset2() Error %d"), err);
+		SetError(err);
+		}
+	}
+
+/**
+ * Process command to call DMMCSocket::ResetInactivity
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ */
+void CT_MMCSDSocketDriverData::DoCmdResetInactivity(const TDesC& aSection)
+	{
+	TInt	busNumber;
+	if( GetIntFromConfig(aSection, KBusNumber(), busNumber) )
+		{
+		INFO_PRINTF2(_L("Calling MMCSocket::ResetInactivity(bus=%d)"), busNumber);
+		TInt err = iMmcSDController->SocketResetInactivity(busNumber);	
+		if( err != KErrNone )
+			{
+			ERR_PRINTF2(_L("MMCSocket::ResetInactivity() Error %d"), err);
+			SetError(err);
+			}		
+		}
+	else
+		{
+		ERR_PRINTF1(_L("Bus Number not given in ini file"));
+		SetBlockResult(EFail);			
+		}
+	}
+
+/**
+ * Process command to call DMMCSocket::Stack
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ */
+void CT_MMCSDSocketDriverData::DoCmdStack(const TDesC& aSection)
+	{
+	TStackPtr stackPtr;
+	if( GetIntFromConfig(aSection, KBusNumber(), stackPtr.iBus) )
+		{
+		INFO_PRINTF2(_L("Calling MMCSocket::Stack(%d)"), stackPtr.iBus);
+		TInt err = iMmcSDController->SocketStack(stackPtr);
+	
+		if( err!=KErrNone )
+			{
+			ERR_PRINTF2(_L("MMCSocket::Stack() Error %d"), err);
+			SetError(err);
+			}
+		else
+			{
+			INFO_PRINTF2(_L("MMCSocket::Stack(): ptr=%x"), stackPtr.iStackPtr);
+			TBool	expectedIsNull;
+			if( GetBoolFromConfig(aSection, KIsNull(), expectedIsNull) )
+				{
+				if( expectedIsNull )
+					{
+					if( stackPtr.iStackPtr != NULL )
+						{
+						ERR_PRINTF1(_L("Stack ptr is not NULL"));
+						SetBlockResult(EFail);
+						}
+					}
+				else
+					{
+					if( stackPtr.iStackPtr == NULL )
+						{
+						ERR_PRINTF1(_L("Stack ptr is NULL"));
+						SetBlockResult(EFail);
+						}
+					else
+						{
+						TAny* expectedStackPtr = NULL;	
+						err = iMmcSDController->Stack(&expectedStackPtr);
+						if( err!=KErrNone )
+							{
+							ERR_PRINTF2(_L("MMCStack Error %d"), err);
+							SetBlockResult(EFail);
+							}
+						else if( stackPtr.iStackPtr != expectedStackPtr )
+							{
+							ERR_PRINTF3(_L("stackPtr(%x) != expectedStackPtr(%x)"), stackPtr.iStackPtr, expectedStackPtr);
+							SetBlockResult(EFail);
+							}
+						}
+					}				
+				}
+			else
+				{
+				ERR_PRINTF1(_L("Expected Is Null not given in ini file"));
+				SetBlockResult(EFail);			
+				}
+			}		
+		}
+	else
+		{
+		ERR_PRINTF1(_L("Bus Number not given in ini file"));
+		SetBlockResult(EFail);			
+		}		
+	}
+
+/**
+ * Process command that will result in getting DMMCSocket::iState kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDSocketDriverData::DoCmdiState_Get(const TDesC& aSection)
+	{
+	TBusState state;
+	TInt err = iMmcSDController->SocketiState_Get(state);
+	
+	if( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("MMCSocket::iState() Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		switch(state)
+			{
+			case EBusCardAbsent:
+				{
+				INFO_PRINTF2(_L("MMCSocket::iState()=EPBusCardAbsent(%d)"), state);
+				break;
+				}
+			case EBusOff:
+				{
+				INFO_PRINTF2(_L("MMCSocket::iState()=EPBusOff(%d)"), state);
+				break;
+				}
+			case EBusPoweringUp:
+				{
+				INFO_PRINTF2(_L("MMCSocket::iState()=EPBusPoweringUp(%d)"), state);
+				break;
+				}
+			case EBusOn:
+				{
+				INFO_PRINTF2(_L("MMCSocket::iState()=EPBusOn(%d)"), state);
+				break;
+				}
+			case EBusPsuFault:
+				{
+				INFO_PRINTF2(_L("MMCSocket::iState()=EPBusPsuFault(%d)"), state);
+				break;
+				}
+			case EBusPowerUpPending:
+				{
+				INFO_PRINTF2(_L("MMCSocket::iState()=EPBusPowerUpPending(%d)"), state);
+				break;
+				}
+			default:
+				{
+				INFO_PRINTF2(_L("MMCSocket::iState() Unknown state=%d"), state);
+				break;
+				}
+			}		
+		
+		TInt expectedState;
+		if( GetEnumFromConfig(aSection, KState(), iEnumTPBusStateTable, expectedState) )
+			{
+			if( state != expectedState )
+				{
+				ERR_PRINTF3(_L("State (%d) != Expected state (%d)"), state, expectedState);
+				SetBlockResult(EFail);			
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Expected state not given in ini file"));
+			SetBlockResult(EFail);			
+			}		
+		}
+	}
+
+/**
+ * Process command that will result in getting DMMCSocket::iStandby kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDSocketDriverData::DoCmdiStandby_Get(const TDesC& aSection)
+	{
+	TBool standby;
+	TInt err = iMmcSDController->SocketiStandby_Get(standby);
+	
+	if( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("MMCSocket::iStandby() Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("MMCSocket::iStandby()=%d"), standby);
+		TBool expectedStandby;
+		if( GetBoolFromConfig(aSection, KStandby(), expectedStandby) )
+			{
+			if( standby != expectedStandby )
+				{
+				ERR_PRINTF3(_L("Standby (%d) != Expected standby (%d)"), standby, expectedStandby);
+				SetBlockResult(EFail);			
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Expected standby not given in ini file"));
+			SetBlockResult(EFail);			
+			}		
+		}
+	}
+
+/**
+ * Process command that will result in getting DMMCSocket::iDoorOpened kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDSocketDriverData::DoCmdiDoorOpened_Get(const TDesC& aSection)
+	{
+	TBool doorOpened;
+	TInt err = iMmcSDController->SocketiDoorOpened_Get(doorOpened);
+	
+	if( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("MMCSocket::iDoorOpened() Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("MMCSocket::iDoorOpened()=%d"), doorOpened);
+		TBool expectedDoorOpened;
+		if( GetBoolFromConfig(aSection, KDoorOpened(), expectedDoorOpened) )
+			{
+			if( doorOpened != expectedDoorOpened )
+				{
+				ERR_PRINTF3(_L("DoorOpened (%d) != Expected doorOpened (%d)"), doorOpened, expectedDoorOpened);
+				SetBlockResult(EFail);			
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Expected doorOpened not given in ini file"));
+			SetBlockResult(EFail);			
+			}		
+		}
+	}
+
+/**
+ * Process command that will result in getting DMMCSocket::iType kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDSocketDriverData::DoCmdiType_Get(const TDesC& aSection)
+	{
+	TCardBusType type;
+	TInt err = iMmcSDController->SocketiType_Get(type);
+	
+	if( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("MMCSocket::iType() Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		switch(type)
+			{
+			case EBusTypeNone:
+				{
+				INFO_PRINTF2(_L("MMCSocket::iType()=EPBusTypeNone(%d)"), type);
+				break;
+				}
+			case EBusTypePcCard:
+				{
+				INFO_PRINTF2(_L("MMCSocket::iType()=EPBusTypePcCard(%d)"), type);
+				break;
+				}
+			case EBusTypeMultiMedia:
+				{
+				INFO_PRINTF2(_L("MMCSocket::iType()=EPBusTypeMultiMedia(%d)"), type);
+				break;
+				}
+			case EBusTypeUSB:
+				{
+				INFO_PRINTF2(_L("MMCSocket::iType()=EPBusTypeUSB(%d)"), type);
+				break;
+				}
+			default:
+				{
+				INFO_PRINTF2(_L("MMCSocket::iType() Unknown type=%d"), type);
+				break;
+				}
+			}		
+		
+		TInt expectedType;
+		if( GetEnumFromConfig(aSection, KType(), iEnumTPBusTypeTable, expectedType) )
+			{
+			if( type != expectedType )
+				{
+				ERR_PRINTF3(_L("Type (%d) != Expected type (%d)"), type, expectedType);
+				SetBlockResult(EFail);			
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("Expected type not given in ini file"));
+			SetBlockResult(EFail);			
+			}		
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCSocket::PowerUp kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDSocketDriverData::DoCmdPowerUpL(const TDesC& aSection, TInt aAsyncErrorIndex)
+	{
+	INFO_PRINTF1(_L("DoCmdSocketPowerUpL called()"));
+	CActiveCallbackWrap* activeCallbackWrap = CreateActiveCallbackL(RMMCSDTestControllerInterface::ESocketPowerUp, GetExpectedAsyncError(aSection));	
+	iMmcSDController->SocketPowerUp(activeCallbackWrap->ActiveCallback().iStatus);
+	activeCallbackWrap->ActiveCallback().Activate(aAsyncErrorIndex);
+	IncOutstanding();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/src/T_MmcSDStackDriverData.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1455 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_MmcSDStackDriverData.h"
+#include "MmcTestUtils.h"
+
+//MMCSD Commands index
+/*@{*/
+
+_LIT(KCmdStackAdjustPartialRead, 						"AdjustPartialRead");
+_LIT(KCmdStackAllocSession, 							"AllocSession");
+_LIT(KCmdStackBufferInfo, 								"BufferInfo");
+_LIT(KCmdStackDemandPagingInfo, 						"DemandPagingInfo");
+_LIT(KCmdStackEffectiveModes, 							"EffectiveModes");
+_LIT(KCmdStackAlterEffectiveModes, 						"AlterEffectiveModes");
+_LIT(KCmdStackGetBufferInfo, 							"GetBufferInfo");
+_LIT(KCmdStackHasCardsPresent, 							"HasCardsPresent");
+_LIT(KCmdStackHasSessionsQueued, 						"HasSessionsQueued");
+_LIT(KCmdStackInit, 									"Init");
+_LIT(KCmdStackInitStackInProgress, 						"InitStackInProgress");
+_LIT(KCmdStackMMCSocket, 								"MMCSocket");
+_LIT(KCmdStackMachineInfo, 								"MachineInfo");
+_LIT(KCmdStackMaxCardsInStack, 							"MaxCardsInStack");
+_LIT(KCmdStackReadPasswordStore, 						"ReadPasswordStore");
+_LIT(KCmdStackWritePasswordStore, 						"WritePasswordStore");
+_LIT(KCmdStackProgramPeriodInMs, 						"ProgramPeriodMs");
+_LIT(KCmdStackStop, 									"Stop");
+_LIT(KCmdStackReportPowerUp, 							"ReportPowerUp");
+_LIT(KCmdStackReportPowerDown, 							"ReportPowerDown");
+_LIT(KCmdStackCardP, 									"CardP");
+
+// ini file tags
+_LIT(KPrdStart, 										"prdstart");
+_LIT(KPrdEnd, 											"prdend");
+_LIT(KPrdExpectedStart, 								"expectedprdstart");
+_LIT(KPrdExpectedEnd, 									"expectedprdend");
+_LIT(KExpectedBufLen, 									"expectedBuflen");
+_LIT(KExpectedMinorBufLen, 								"expectedMinorBuflen");
+_LIT(KExpectedMaxCardsInStack, 							"maxcards");
+_LIT(KProgramPeriodMs, 									"programperiodms");
+_LIT(KInProgress, 										"inprogress");
+_LIT(KSessionsQueued, 									"sessionsqueued");
+_LIT(KCardsPresent, 									"cardspresent");
+_LIT(KExpectedTotalSockets, 							"expectedtotalsockets");
+_LIT(KExpectedTotalMediaChanges, 						"expectedtotalmediachanges");
+_LIT(KExpectedTotalPrimarySupplies, 					"expectedtotalprimarysupplies");
+_LIT(KExpectedSPIMode, 									"expectedspimode");
+_LIT(KExpectedBaseBusNumber, 							"expectedbasebusnumber");
+_LIT(KHasFlagSupportsSPIMode, 							"hasflagsupportsspimode");
+_LIT(KHasFlagSupportsDoubleBuffering, 					"hasflagsupportsdoublebuffering");
+_LIT(KHasFlagSupportsR7, 								"hasflagsupportsr7");
+_LIT(KHasFlagDma8BitAddressing, 						"hasflagdma8bitaddressing");
+_LIT(KHasFlagDma16BitAddressing, 						"hasflagdma16bitaddressing");
+_LIT(KHasFlagDma32BitAddressing, 						"hasflagdma32bitaddressing");
+_LIT(KHasFlagDma64BitAddressing, 						"hasflagdma64bitaddressing");
+_LIT(KHasFlagSupportsDMA, 								"hasflagsupportsdma");
+_LIT(KHasFlagMaxTransferLength_256K, 					"hasflagmaxtransferlength256k");
+_LIT(KHasFlagMaxTransferLength_512K, 					"hasflagmaxtransferlength512k");
+_LIT(KHasFlagMaxTransferLength_1M, 						"hasflagmaxtransferlength1m");
+_LIT(KHasFlagMaxTransferLength_2M, 						"hasflagmaxtransferlength2m");
+_LIT(KHasFlagMaxTransferLength_4M, 						"hasflagmaxtransferlength4m");
+_LIT(KHasFlagMaxTransferLength_8M, 						"hasflagmaxtransferlength8m");
+_LIT(KHasFlagMaxTransferLength_16M, 					"hasflagmaxtransferlength16m");
+_LIT(KPassword, 										"password");
+_LIT(KIsNull, 											"isnull");
+_LIT(KEffectiveModes, 									"effectivemodes");
+_LIT(KEffectiveModesFunctionId, 						"emfunctionid");
+_LIT(KEffectiveModesData, 								"emdata");
+_LIT(KDriveCount, 										"drivecount");
+_LIT(KNumPages, 										"numpages");
+_LIT(KPagingType, 										"pagingtype");
+_LIT(KWriteProtected, 									"writeprotected");
+_LIT(KCardNumber, 										"cardnumber");
+_LIT(KSocketWrapperName,								"socketwrappername");
+
+
+// TEffectiveModesFunctionId enum strings
+_LIT(KEffectiveModesRemoveMode, 						"EEffectiveModesRemoveMode");
+_LIT(KEffectiveModesSetBusClockInKhz, 					"EEffectiveModesSetBusClockInKhz");
+_LIT(KEffectiveModesSetBusyTimeOutInMcs, 				"EEffectiveModesSetBusyTimeOutInMcs");
+_LIT(KEffectiveModesSetCRCRetries, 						"EEffectiveModesSetCRCRetries");
+_LIT(KEffectiveModesSetDataTimeOutInMcs, 				"EEffectiveModesSetDataTimeOutInMcs");
+_LIT(KEffectiveModesSetMode, 							"EEffectiveModesSetMode");
+_LIT(KEffectiveModesSetOpCondBusyTimeout, 				"EEffectiveModesSetOpCondBusyTimeout");
+_LIT(KEffectiveModesSetPollAttempts, 					"EEffectiveModesSetPollAttempts");
+_LIT(KEffectiveModesSetResponseTimeOutInTicks,			"EEffectiveModesSetResponseTimeOutInTicks");
+_LIT(KEffectiveModesSetTicksClockIn, 					"EEffectiveModesSetTicksClockIn");
+_LIT(KEffectiveModesSetTicksClockOut, 					"EEffectiveModesSetTicksClockOut");
+_LIT(KEffectiveModesSetTimeOutRetries, 					"EEffectiveModesSetTimeOutRetries");
+_LIT(KInvalidEffectiveModesFunctionId,					"EInvalidEffectiveModesFunctionId");	
+
+/**	Enum as a descriptor  				Enum integar value													
+ *	In this case these enums represent TEffectiveModesFunctionId
+ *                                                                             
+ * 																											      							
+ */																														
+const CDataWrapperBase::TEnumEntryTable	CT_MMCSDStackDriverData::iEnumEffectiveModesFunctionIdTable [] =
+	{
+//	Enum as a descriptor								Enum
+	KEffectiveModesRemoveMode,							RMMCSDTestControllerInterface::EStackEffectiveModesRemoveMode,
+	KEffectiveModesSetBusClockInKhz,					RMMCSDTestControllerInterface::EStackEffectiveModesSetBusClockInKhz,
+	KEffectiveModesSetBusyTimeOutInMcs,					RMMCSDTestControllerInterface::EStackEffectiveModesSetBusyTimeOutInMcs,
+	KEffectiveModesSetCRCRetries,						RMMCSDTestControllerInterface::EStackEffectiveModesSetCRCRetries,
+	KEffectiveModesSetDataTimeOutInMcs,					RMMCSDTestControllerInterface::EStackEffectiveModesSetDataTimeOutInMcs,
+	KEffectiveModesSetMode,								RMMCSDTestControllerInterface::EStackEffectiveModesSetMode,
+	KEffectiveModesSetOpCondBusyTimeout,				RMMCSDTestControllerInterface::EStackEffectiveModesSetOpCondBusyTimeout,
+	KEffectiveModesSetPollAttempts,						RMMCSDTestControllerInterface::EStackEffectiveModesSetPollAttempts,
+	KEffectiveModesSetResponseTimeOutInTicks,			RMMCSDTestControllerInterface::EStackEffectiveModesSetResponseTimeOutInTicks,
+	KEffectiveModesSetTicksClockIn,						RMMCSDTestControllerInterface::EStackEffectiveModesSetTicksClockIn,
+	KEffectiveModesSetTicksClockOut,					RMMCSDTestControllerInterface::EStackEffectiveModesSetTicksClockOut,
+	KEffectiveModesSetTimeOutRetries,					RMMCSDTestControllerInterface::EStackEffectiveModesSetTimeOutRetries,
+	KInvalidEffectiveModesFunctionId,					-1
+	};
+
+/*@}*/
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+/**
+ * static Construction
+ *
+ *
+ * @return					A pointer to T_MMCSDStackDriverData
+ *
+ * @leave					System wide error
+ */
+CT_MMCSDStackDriverData* CT_MMCSDStackDriverData::NewL()
+	{
+	CT_MMCSDStackDriverData* ret = new (ELeave) CT_MMCSDStackDriverData();
+	CleanupStack::PushL(ret);
+	ret->ConstructL();
+	CleanupStack::Pop(ret);
+	return ret;
+	}
+
+
+/**
+ * Constructor
+ *
+ * @return					N/A
+ *
+ * @leave					N/A
+ */
+CT_MMCSDStackDriverData::CT_MMCSDStackDriverData()
+: CT_MmcSDDriverData()
+	{
+	}
+
+/**
+ * 2nd Phase constructor
+ *
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::ConstructL()
+	{
+	CT_MmcSDDriverData::ConstructL();
+	}
+
+/**
+ * Destructor
+ *
+ * @return					N/A
+ *
+ * @leave					N/A
+ */
+CT_MMCSDStackDriverData::~CT_MMCSDStackDriverData()
+	{
+	}
+
+/**
+ * Process a command read from the script file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+TBool CT_MMCSDStackDriverData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+	{
+	TBool ret = ETrue;
+
+	if (aCommand == KCmdStackAdjustPartialRead)
+		{
+		DoCmdAdjustPartialRead(aSection);
+		}
+	else if (aCommand == KCmdStackAllocSession)
+		{
+		DoCmdAllocSession();
+		}
+	else if (aCommand == KCmdStackBufferInfo)
+		{
+		DoCmdBufferInfo(aSection);
+		}
+	else if (aCommand == KCmdStackDemandPagingInfo)
+		{
+		DoCmdDemandPagingInfo(aSection);
+		}
+	else if (aCommand == KCmdStackEffectiveModes)
+		{
+		DoCmdEffectiveModes(aSection);
+		}
+	else if (aCommand == KCmdStackGetBufferInfo)
+		{
+		DoCmdGetBufferInfo(aSection);
+		}
+	else if (aCommand == KCmdStackHasCardsPresent)
+		{
+		DoCmdHasCardsPresent(aSection);
+		}
+	else if (aCommand == KCmdStackHasSessionsQueued)
+		{
+		DoCmdHasSessionsQueued(aSection);
+		}
+	else if (aCommand == KCmdStackInit)
+		{
+		DoCmdInit();
+		}
+	else if (aCommand == KCmdStackInitStackInProgress)
+		{
+		DoCmdInitStackInProgress(aSection);
+		}
+	else if (aCommand == KCmdStackMMCSocket)
+		{
+		DoCmdMMCSocketL(aSection);
+		}
+	else if (aCommand == KCmdStackMachineInfo)
+		{
+		DoCmdMachineInfo(aSection);
+		}
+	else if (aCommand == KCmdStackMaxCardsInStack)
+		{
+		DoCmdMaxCardsInStack(aSection);
+		}
+	else if (aCommand == KCmdStackReadPasswordStore)
+		{
+		DoCmdPasswordStore(aSection);
+		}
+	else if (aCommand == KCmdStackWritePasswordStore)
+		{
+		DoCmdWritePasswordStore(aSection);
+		}
+	else if (aCommand == KCmdStackProgramPeriodInMs)
+		{
+		DoCmdProgramPeriodInMilliSeconds(aSection);
+		}
+	else if (aCommand == KCmdStackStop)
+		{
+		DoCmdStop(aSection);
+		}
+	else if (aCommand == KCmdStackReportPowerUp)
+		{
+		DoCmdReportPowerUp(aSection);
+		}
+	else if (aCommand == KCmdStackReportPowerDown)
+		{
+		DoCmdReportPowerDown(aSection);
+		}
+	else if (aCommand == KCmdStackCardP)
+		{
+		DoCmdCardP(aSection);
+		}
+	else if (aCommand == KCmdStackAlterEffectiveModes)
+		{
+		DoCmdAlterEffectiveModes(aSection);
+		}
+	else
+		{
+		ret = CT_MmcSDDriverData::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+	return ret;
+	}
+
+
+/**
+ * Process command that will result in call to DMMCStack::AdjustPartial kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void  CT_MMCSDStackDriverData::DoCmdAdjustPartialRead(const TDesC& aSection)
+	{
+	TPartialReadData prd;
+	prd.iStart = 0;
+	prd.iEnd = 0;
+
+	if(! GetUintFromConfig(aSection, KPrdStart(), prd.iStart) )
+		{
+		ERR_PRINTF1(_L("Failed to get prdstart from ini file"));
+		SetBlockResult(EFail);
+		}
+
+	if(!GetUintFromConfig(aSection, KPrdEnd(), prd.iEnd))
+		{
+		ERR_PRINTF1(_L("Failed to get prdend from ini file"));
+		SetBlockResult(EFail);		
+		}
+
+	INFO_PRINTF3(_L("Calling MMCStack::AdjustPartialRead(start=%d, end=%d)"), prd.iStart, prd.iEnd);
+	TInt err = iMmcSDController->StackAdjustPartialRead(prd);
+
+	if (err != KErrNone)
+		{
+		ERR_PRINTF2(_L("MMCStack::AdjustPartialRead() Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF3(_L("MMCStack::AdjustPartialRead() = %d, %d"), prd.iPhysStart, prd.iPhysEnd);
+
+		TUint expectedStart;
+		if( !GetUintFromConfig(aSection, KPrdExpectedStart(), expectedStart) )
+			{
+			ERR_PRINTF1(_L("Failed to get KPrdExpectedStart from ini file"));
+			SetBlockResult(EFail);
+			}
+								
+		else if(prd.iPhysStart != expectedStart )
+			{
+			ERR_PRINTF3(_L("phys start(%d) != expectedStart(%d)"), prd.iPhysStart, expectedStart);
+			SetBlockResult(EFail);
+			}
+
+		TUint expectedEnd;
+		if( !GetUintFromConfig(aSection, KPrdExpectedEnd(), expectedEnd) )
+			{
+			ERR_PRINTF1(_L("Failed to get KPrdExpectedEnd from ini file"));
+			SetBlockResult(EFail);			
+			}
+		else if(prd.iPhysEnd != expectedEnd )
+			{
+			ERR_PRINTF3(_L("MMCStack::AdjustPartialRead phys end(%d) != expected end(%d)"), prd.iPhysEnd, expectedEnd);
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::AllocSession kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void  CT_MMCSDStackDriverData::DoCmdAllocSession()
+	{
+	INFO_PRINTF1(_L("Calling MMCStack::AllocSession()"));
+	iMmcSDController->StackAllocSession();
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::BufferInfo kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdBufferInfo(const TDesC& aSection)
+	{
+	TBufferInfo bufferInfo;
+	INFO_PRINTF1(_L("Calling MMCStack::BufferInfo()"));
+	TInt err = iMmcSDController->StackBufferInfo(bufferInfo);
+	if (err != KErrNone)
+		{
+		ERR_PRINTF2(_L("MMCStack::BufferInfo() Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF4(_L("BufferInfo() iBuf(%x) iBufLen(%d) iMinorBufLen(%d)"),
+				bufferInfo.iBuf, bufferInfo.iBufLen, bufferInfo.iMinorBufLen);
+
+		// check the expected length
+		TInt expectedBufLen;
+		if( ! GetIntFromConfig(aSection, KExpectedBufLen(), expectedBufLen ))
+			{
+			ERR_PRINTF1(_L("Failed to get KExpectedBufLen from ini file"));
+			SetBlockResult(EFail);
+			}
+		
+		else if(bufferInfo.iBufLen != expectedBufLen )
+			{
+			ERR_PRINTF3(_L("bufferInfo.iBufLen (%d) != expectedBufLen(%d)"),
+					bufferInfo.iBufLen , expectedBufLen);
+			SetBlockResult(EFail);
+			}
+
+		// check the expected minor length
+		TInt expectedMinorBufLen;
+		if( !GetIntFromConfig(aSection, KExpectedMinorBufLen(), expectedMinorBufLen ))
+			{
+			ERR_PRINTF1(_L("Failed to get KExpectedMinorBufLen from ini file"));
+			SetBlockResult(EFail);
+			}
+		else if(bufferInfo.iMinorBufLen != expectedMinorBufLen )
+			{
+			ERR_PRINTF3(_L("bufferInfo.iMinorBufLen (%d) != expectedMinorBufLen(%d)"),
+					bufferInfo.iMinorBufLen , expectedMinorBufLen);
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::GetBufferInfo kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdGetBufferInfo(const TDesC& aSection)
+	{
+	TBufferInfo bufferInfo;
+	INFO_PRINTF1(_L("Calling MMCStack::GetBufferInfo()"));
+	TInt err = iMmcSDController->StackGetBufferInfo(bufferInfo);
+	if (err != KErrNone)
+		{
+		ERR_PRINTF2(_L("MMCStack::GetBufferInfo() Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF3(_L("GetBufferInfo() iBuf(%x) iBufLen(%d)"),
+				bufferInfo.iBuf, bufferInfo.iBufLen);
+
+		// check the expected length
+		TInt expectedBufLen;
+		if( !GetIntFromConfig(aSection, KExpectedBufLen(), expectedBufLen ))
+			{
+			ERR_PRINTF1(_L("Failed to get KExpectedBufLen from ini file"));
+			SetBlockResult(EFail);
+			}
+		else if(bufferInfo.iBufLen != expectedBufLen )
+			{
+			ERR_PRINTF3(_L("bufferInfo.iBufLen (%d) != expectedBufLen(%d)"),
+					bufferInfo.iBufLen , expectedBufLen);
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::DemandPagingInfo kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdDemandPagingInfo(const TDesC& aSection)
+	{
+	TTCDemandPagingInfo info;
+	INFO_PRINTF1(_L("Calling MMCStack::DemandPagingInfo()"));
+	TInt err = iMmcSDController->StackDemandPagingInfo(info);
+	
+	if(err != KErrNone)
+		{
+		ERR_PRINTF2(_L("MMCStack::DemandPagingInfo() Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF4(_L("info.iPagingDriveList(%x) info.iDriveCount(%d) info.iPagingType(%d)"),
+				info.iPagingDriveList, info.iDriveCount, info.iPagingType);
+		INFO_PRINTF4(_L("info.iReadShift(%d) info.iNumPages(%d) info.iWriteProtected(%d)"),
+				info.iReadShift, info.iNumPages, info.iWriteProtected);
+		
+		// read expected values here		
+		TInt driveCount;
+		if(!GetIntFromConfig(aSection, KDriveCount(), driveCount))
+			{
+			ERR_PRINTF1(_L("Failed to read KDriveCount from ini file"));
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			if(driveCount != info.iDriveCount)
+				{
+				ERR_PRINTF3(_L("drive counts do not match actual(%d), expected(%d)"), info.iDriveCount, driveCount);
+				SetBlockResult(EFail);				
+				}	
+			}
+
+		TUint pagingType;
+		if(!GetUintFromConfig(aSection, KPagingType(), pagingType))
+			{
+			ERR_PRINTF1(_L("Failed to read pagingType from ini file"));
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			if(pagingType != info.iPagingType)
+				{
+				ERR_PRINTF3(_L("pagingType do not match actual(%d), expected(%d)"), info.iPagingType, pagingType);
+				SetBlockResult(EFail);				
+				}	
+			}
+		
+		
+		TUint numPages;
+		if(!GetUintFromConfig(aSection, KNumPages(), numPages))
+			{
+			ERR_PRINTF1(_L("Failed to read num pages from ini file"));
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			if(numPages != info.iNumPages)
+				{
+				ERR_PRINTF3(_L("numPages do not match actual(%d), expected(%d)"), info.iNumPages, numPages);
+				SetBlockResult(EFail);				
+				}	
+			}
+
+		TBool writeProtected;
+		if(!GetBoolFromConfig(aSection, KWriteProtected(), writeProtected))
+			{
+			ERR_PRINTF1(_L("Failed to read writeProtected from ini file"));
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			if(writeProtected != info.iWriteProtected)
+				{
+				ERR_PRINTF3(_L("writeProtected do not match actual(%d), expected(%d)"), info.iWriteProtected, writeProtected);
+				SetBlockResult(EFail);				
+				}	
+			}
+		
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::EffectiveModes kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdEffectiveModes(const TDesC& aSection)
+	{
+	INFO_PRINTF1(_L("Calling MMCStack::EffectiveModes()"));
+
+	TUint32 actualModes;
+	TInt err = iMmcSDController->StackEffectiveModes(actualModes);
+	if (err != KErrNone)
+		{
+		ERR_PRINTF2(_L("DMMCStack::EffectiveModes() Error (%d)"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF3(_L("DMMCStack::EffectiveModes() modes(0x%x / %d)"), actualModes, actualModes);
+
+		TInt expectedModes;
+		if(GetHexFromConfig(aSection, KEffectiveModes(), expectedModes))
+			{
+
+			if(((TUint32)expectedModes) != actualModes)
+				{
+				ERR_PRINTF5(_L("actual (%d)(%x) and expected(%d)(%x) effectiveModes do not match"), actualModes, actualModes, expectedModes, expectedModes);
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF1(_L("DMMCStack::EffectiveModes() Could not read expectedModes from ini file"));
+			SetError(err);
+			}
+		}
+	}
+
+/**
+ * Process command that will result in an update of Effective Modes variable on kernel side
+ * for a call to DMMCStack::EffectiveModes
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdAlterEffectiveModes(const TDesC& aSection)
+	{	
+	TInt	funcId;
+	TUint	data;
+	
+	// read funtion ID from section
+	if (!GetEnumFromConfig(aSection, KEffectiveModesFunctionId(), iEnumEffectiveModesFunctionIdTable, funcId))
+		{
+		ERR_PRINTF1(_L("Failed to read Function ID DoCmdEffectiveModes"));
+		SetBlockResult(EFail);
+		}
+	// read data param from section - all params are 32 bit or less	
+	else if (!GetUintFromConfig(aSection, KEffectiveModesData(), data))
+		{
+		ERR_PRINTF2(_L("Failed to read DATA DoCmdEffectiveModes funcId(%d)"), funcId);
+		SetBlockResult(EFail);
+		}
+	else
+		{
+		INFO_PRINTF3( _L("Calling DoCmdEffectiveModes funcid(%d) data(%u)"), funcId, data);
+		TInt err = iMmcSDController->StackAlterEffectiveModes((RMMCSDTestControllerInterface::TEffectiveModesFunctionId) funcId, (TAny*)data);
+		if (err != KErrNone)
+			{
+			ERR_PRINTF3(_L("DoCmdEffectiveModes funcid(%d) Error(%d"), funcId, err);
+			SetError(err);
+			}
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::HasCardsPresent kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdHasCardsPresent(const TDesC& aSection)
+	{
+	INFO_PRINTF1( _L("CT_MMCSDStackDriverData:::DoCmdHasCardsPresent called"));
+
+	TBool actualCardspresent;
+	TInt err = iMmcSDController->StackHasCardsPresent(actualCardspresent);
+	if (err != KErrNone)
+		{
+		ERR_PRINTF2(_L("DMMCStack::DoCmdHasCardsPresent() Error (%d)"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("DMMCStack::DoCmdHasCardsPresent() actual cards present (%d)"), actualCardspresent);
+
+		TBool expectedCardsPresent;
+		if(!GetBoolFromConfig(aSection, KCardsPresent(), expectedCardsPresent))
+			{
+			ERR_PRINTF1(_L("Failed to get KCardsPresent from ini file"));
+			SetBlockResult(EFail);
+			}
+		else if(actualCardspresent != expectedCardsPresent)
+			{
+			ERR_PRINTF3(_L("actual (%d) and expected(%d) cards present do not match"), actualCardspresent, expectedCardsPresent);
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::HasSessionsQueued kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdHasSessionsQueued(const TDesC& aSection)
+	{
+	INFO_PRINTF1( _L(" CT_MMCSDStackDriverData::DoCmdHasSessionsQueued called"));
+
+	TBool actualSessionsQueued;
+	TInt err = iMmcSDController->StackHasSessionsQueued(actualSessionsQueued);
+
+	if (err != KErrNone)
+		{
+		ERR_PRINTF2(_L("DMMCStack::DoCmdHasSessionsQueued() Error (%d)"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("DMMCStack::DoCmdHasSessionsQueued() actual sessions queued (%d)"), actualSessionsQueued);
+
+		TBool expectedInProgress;
+		if(!GetBoolFromConfig(aSection, KSessionsQueued(), expectedInProgress))
+			{
+			ERR_PRINTF1(_L("Failed to get KSessionsQueued from ini file"));
+			SetBlockResult(EFail);
+			}
+		else if(actualSessionsQueued != expectedInProgress)
+			{
+			ERR_PRINTF3(_L("actual (%d) and expected(%d) sessions queued do not match"), actualSessionsQueued, expectedInProgress);
+			SetBlockResult(EFail);
+			}
+		}
+	}
+/**
+ * Process command that will result in call to DMMCStack::InitStackInProgress kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdInitStackInProgress(const TDesC& aSection)
+	{
+	INFO_PRINTF1( _L(" CT_MMCSDStackDriverData::DoCmdInitStackInProgress called"));
+
+	TBool actualInProgress;
+	TInt err = iMmcSDController->StackInitStackInProgress(actualInProgress);
+
+	if (err != KErrNone)
+		{
+		ERR_PRINTF2(_L("DMMCStack::InitStackInProgress() Error (%d)"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("DMMCStack::InitStackInProgress() actualInProgress(%d)"), actualInProgress);
+
+		TBool expectedInProgress;
+		if(!GetBoolFromConfig(aSection, KInProgress(), expectedInProgress))
+			{
+			ERR_PRINTF1(_L("Failed to get KInProgress from ini file"));
+			SetBlockResult(EFail);
+			}
+		else if(actualInProgress != expectedInProgress)
+			{
+			ERR_PRINTF3(_L("actual (%d) and expected(%d) in progress do not match"), actualInProgress, expectedInProgress);
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::MMCSocket kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdMMCSocketL(const TDesC& aSection)
+	{
+	INFO_PRINTF1( _L(" CT_MMCSDStackDriverData::DoCmdMMCSocket called"));
+	// can't use DMMCSocket type on user side
+	TAny* socketPtr= NULL;
+
+	TInt err = iMmcSDController->StackMMCSocket(&socketPtr);
+
+	if (err!=KErrNone)
+		{
+		ERR_PRINTF2(_L("MMCStack::Socket() Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("MMCStack::Socket(): ptr=%x"), socketPtr);
+		TBool expectedIsNull = EFalse;
+		if(!GetBoolFromConfig(aSection, KIsNull(), expectedIsNull))
+			{
+			ERR_PRINTF1(_L("Failed to get isnull from ini file"));
+			SetBlockResult(EFail);
+			}
+
+		if (expectedIsNull)
+			{
+			if (socketPtr != NULL)
+				{
+				ERR_PRINTF1(_L("Socket ptr is not NULL"));
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			if (!socketPtr)
+				{
+				ERR_PRINTF1(_L("Socket ptr is NULL"));
+				SetBlockResult(EFail);
+				}
+			else
+				{
+				TPtrC	socketWrapperName;
+				if( GetStringFromConfig(aSection, KSocketWrapperName(), socketWrapperName) )
+					{
+					TAny* expectedSocketPtr = GetDataObjectL(socketWrapperName);
+					INFO_PRINTF2(_L("expectedSocketPtr = %x"), expectedSocketPtr);
+
+					if( expectedSocketPtr == NULL )
+						{
+						ERR_PRINTF1(_L("MMCStack::Socket(): expectedSocketPtr is NULL"));
+						SetBlockResult(EFail);
+						}
+					else if( socketPtr != expectedSocketPtr )
+						{
+						ERR_PRINTF3(_L("socketPtr(%x) != expectedSocketPtr(%x)"), socketPtr, expectedSocketPtr);
+						SetBlockResult(EFail);
+						}
+					}
+				else
+					{
+					ERR_PRINTF1(_L("MMCStack::Socket(): Error in Socket Wrapper Name from INI file"));
+					SetBlockResult(EFail);
+					}
+				}
+			}
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::MachineInfo kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdMachineInfo(const TDesC& aSection)
+	{
+	INFO_PRINTF1( _L(" CT_MMCSDStackDriverData::DoCmdMachineInfo called XXX"));
+
+	TMachineInfo machineInfo;
+	TInt err = iMmcSDController->StackMachineInfo(machineInfo);
+
+	if (err !=KErrNone)
+		{
+		ERR_PRINTF2(_L("DMMCStack::MachineInfo() Error (%d)"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("DMMCStack::MachineInfo(): iTotalSockets=%d"), machineInfo.iTotalSockets);
+		INFO_PRINTF2(_L("DMMCStack::MachineInfo(): iTotalMediaChanges=%d"), machineInfo.iTotalMediaChanges);
+		INFO_PRINTF2(_L("DMMCStack::MachineInfo(): iTotalPrimarySupplies=%d"), machineInfo.iTotalPrimarySupplies);
+		INFO_PRINTF2(_L("DMMCStack::MachineInfo(): iSPIMode=%d"), machineInfo.iSPIMode);
+		INFO_PRINTF2(_L("DMMCStack::MachineInfo(): iBaseBusNumber=%d"), machineInfo.iBaseBusNumber);
+
+		if (machineInfo.iSupportsSPIMode)
+			{
+			INFO_PRINTF1(_L("DMMCStack::MachineInfo(): Has flag ESupportsSPIMode"));
+			}
+		if (machineInfo.iSupportsDoubleBuffering)
+			{
+			INFO_PRINTF1(_L("DMMCStack::MachineInfo(): Has flag ESupportsDoubleBuffering"));
+			}
+		if (machineInfo.iSupportsR7)
+			{
+			INFO_PRINTF1(_L("DMMCStack::MachineInfo(): Has flag ESupportsR7"));
+			}
+  		if( machineInfo.iDma8BitAddressing )
+  			{
+  			INFO_PRINTF1(_L("DMMCStack::MachineInfo(): Has flag EDma8BitAddressing"));
+  			}
+  		if( machineInfo.iDma16BitAddressing )
+  			{
+  			INFO_PRINTF1(_L("DMMCStack::MachineInfo(): Has flag EDma16BitAddressing"));
+  			}
+  		if( machineInfo.iDma32BitAddressing )
+  			{
+  			INFO_PRINTF1(_L("DMMCStack::MachineInfo(): Has flag EDma32BitAddressing"));
+  			}
+  		if( machineInfo.iDma64BitAddressing )
+  			{
+  			INFO_PRINTF1(_L("DMMCStack::MachineInfo(): Has flag EDma64BitAddressing"));
+  			}
+  		if( machineInfo.iSupportsDMA )
+  			{
+  			INFO_PRINTF1(_L("DMMCStack::MachineInfo(): Has flag ESupportsDMA"));
+  			}
+		if (machineInfo.iMaxTransferLength_256K)
+			{
+			INFO_PRINTF1(_L("DMMCStack::MachineInfo(): Has flag EMaxTransferLength_256K"));
+			}
+		if (machineInfo.iMaxTransferLength_512K)
+			{
+			INFO_PRINTF1(_L("DMMCStack::MachineInfo(): Has flag EMaxTransferLength_512K"));
+			}
+		if (machineInfo.iMaxTransferLength_1M)
+			{
+			INFO_PRINTF1(_L("DMMCStack::MachineInfo(): Has flag EMaxTransferLength_1M"));
+			}
+		if (machineInfo.iMaxTransferLength_2M)
+			{
+			INFO_PRINTF1(_L("DMMCStack::MachineInfo(): Has flag EMaxTransferLength_2M"));
+			}
+		if (machineInfo.iMaxTransferLength_4M)
+			{
+			INFO_PRINTF1(_L("DMMCStack::MachineInfo(): Has flag EMaxTransferLength_4M"));
+			}
+		if (machineInfo.iMaxTransferLength_8M)
+			{
+			INFO_PRINTF1(_L("DMMCStack::MachineInfo(): Has flag EMaxTransferLength_8M"));
+			}
+		if (machineInfo.iMaxTransferLength_16M)
+			{
+			INFO_PRINTF1(_L("DMMCStack::MachineInfo(): Has flag EMaxTransferLength_16M"));
+			}
+
+		TInt expectedInt;
+		TBool expectedBool;
+
+		if( !GetIntFromConfig(aSection, KExpectedTotalSockets(), expectedInt))
+			{
+			ERR_PRINTF1(_L("Failed to get KExpectedTotalSockets from ini file"));
+			SetBlockResult(EFail);
+			}
+		else if(machineInfo.iTotalSockets != expectedInt )
+			{
+			ERR_PRINTF3(_L("totalSockets(%d) != expectedTotalSockets(%d)"), machineInfo.iTotalSockets, expectedInt);
+			SetBlockResult(EFail);
+			}
+
+		if( !GetIntFromConfig(aSection, KExpectedTotalMediaChanges(), expectedInt))
+			{
+			ERR_PRINTF1(_L("Failed to get expected total media changes from ini file"));
+			SetBlockResult(EFail);
+			}
+		else if(machineInfo.iTotalMediaChanges != expectedInt )
+			{
+			ERR_PRINTF3(_L("totalMediaChanges(%d) != expectedTotalMediaChanges(%d)"), machineInfo.iTotalMediaChanges, expectedInt);
+			SetBlockResult(EFail);
+			}
+
+		if( !GetIntFromConfig(aSection, KExpectedTotalPrimarySupplies(), expectedInt))
+			{
+			ERR_PRINTF1(_L("Failed to get KExpectedTotalPrimarySupplies from ini file"));
+			SetBlockResult(EFail);
+			}
+		else if(machineInfo.iTotalPrimarySupplies != expectedInt )
+			{
+			ERR_PRINTF3(_L("totalPrimarySupplies(%d) != expectedTotalPrimarySupplies(%d)"), machineInfo.iTotalPrimarySupplies, expectedInt);
+			SetBlockResult(EFail);
+			}
+
+		if( !GetBoolFromConfig(aSection, KExpectedSPIMode(), expectedBool))
+			{
+			ERR_PRINTF1(_L("Failed to get KExpectedSPIMode from ini file"));
+			SetBlockResult(EFail);
+			}		
+		else if(machineInfo.iSPIMode != expectedBool )
+			{
+			ERR_PRINTF3(_L("SPIMode(%d) != expectedSPIMode(%d)"), machineInfo.iSPIMode, expectedBool);
+			SetBlockResult(EFail);
+			}
+
+		if( !GetIntFromConfig(aSection, KExpectedBaseBusNumber(), expectedInt))
+			{
+			ERR_PRINTF1(_L("Failed to get KExpectedBaseBusNumber from ini file"));
+			SetBlockResult(EFail);
+			}
+		else if(machineInfo.iBaseBusNumber != expectedInt )
+			{
+			ERR_PRINTF3(_L("baseBusNumber(%d) != expectedBaseBusNumber(%d)"), machineInfo.iBaseBusNumber, expectedInt);
+			SetBlockResult(EFail);
+			}
+
+		if( !GetBoolFromConfig(aSection, KHasFlagSupportsSPIMode(), expectedBool))
+			{
+			ERR_PRINTF1(_L("Failed to get KHasFlagSupportsSPIMode from ini file"));
+			SetBlockResult(EFail);
+			}
+		else if(machineInfo.iSupportsSPIMode != expectedBool )
+			{
+			ERR_PRINTF3(_L("supportsSPIMode(%d) != expectedSupportsSPIMode(%d)"), machineInfo.iSupportsSPIMode, expectedBool);
+			SetBlockResult(EFail);
+			}
+
+		if(!GetBoolFromConfig(aSection, KHasFlagSupportsDoubleBuffering(), expectedBool))
+			{
+			ERR_PRINTF1(_L("Failed to get KHasFlagSupportsDoubleBuffering from ini file"));
+			SetBlockResult(EFail);
+			}
+		else if(machineInfo.iSupportsDoubleBuffering != expectedBool )
+			{
+			ERR_PRINTF3(_L("supportsDoubleBuffering(%d) != expectedSupportsDoubleBuffering(%d)"), machineInfo.iSupportsDoubleBuffering, expectedBool);
+			SetBlockResult(EFail);
+			}
+
+		if( !GetBoolFromConfig(aSection, KHasFlagSupportsR7(), expectedBool))
+			{
+			ERR_PRINTF1(_L("Failed to get KHasFlagSupportsR7 from ini file"));
+			SetBlockResult(EFail);
+
+			}
+		else if(machineInfo.iSupportsR7 != expectedBool )
+			{
+			ERR_PRINTF3(_L("supportsR7(%d) != expectedSupportsR7(%d)"), machineInfo.iSupportsR7, expectedBool);
+			SetBlockResult(EFail);
+			}
+
+		if( !GetBoolFromConfig(aSection, KHasFlagDma8BitAddressing(), expectedBool))
+			{
+			ERR_PRINTF1(_L("Failed to get KHasFlagDma8BitAddressing from ini file"));
+			SetBlockResult(EFail);
+			}
+		else if(machineInfo.iDma8BitAddressing != expectedBool )
+			{
+			ERR_PRINTF3(_L("Dma8BitAddressing(%d) != expectedDma8BitAddressing(%d)"), machineInfo.iDma8BitAddressing, expectedBool);
+			SetBlockResult(EFail);
+			}
+
+		if( !GetBoolFromConfig(aSection, KHasFlagDma16BitAddressing(), expectedBool))
+			{
+			ERR_PRINTF1(_L("Failed to get KHasFlagDma16BitAddressing from ini file"));
+			SetBlockResult(EFail);
+			}
+		else if(machineInfo.iDma16BitAddressing != expectedBool )
+			{
+			ERR_PRINTF3(_L("Dma16BitAddressing(%d) != expectedDma16BitAddressing(%d)"), machineInfo.iDma16BitAddressing, expectedBool);
+			SetBlockResult(EFail);
+			}		
+
+		if( !GetBoolFromConfig(aSection, KHasFlagDma32BitAddressing(), expectedBool))
+			{
+			ERR_PRINTF1(_L("Failed to get KHasFlagDma32BitAddressing from ini file"));
+			SetBlockResult(EFail);
+			}
+		else if(machineInfo.iDma32BitAddressing != expectedBool )
+			{
+			ERR_PRINTF3(_L("Dma32BitAddressing(%d) != expectedDma32BitAddressing(%d)"), machineInfo.iDma32BitAddressing, expectedBool);
+			SetBlockResult(EFail);
+			}	
+		
+		if( !GetBoolFromConfig(aSection, KHasFlagDma64BitAddressing(), expectedBool))
+			{
+			ERR_PRINTF1(_L("Failed to get KHasFlagDma64BitAddressing from ini file"));
+			SetBlockResult(EFail);
+			}
+		else if(machineInfo.iDma64BitAddressing != expectedBool )
+			{
+			ERR_PRINTF3(_L("Dma64BitAddressing(%d) != expectedDma64BitAddressing(%d)"), machineInfo.iDma64BitAddressing, expectedBool);
+			SetBlockResult(EFail);
+			}	
+		
+		if( !GetBoolFromConfig(aSection, KHasFlagSupportsDMA(), expectedBool))
+			{
+			ERR_PRINTF1(_L("Failed to get KHasFlagSupportsDMA from ini file"));
+			SetBlockResult(EFail);
+			}
+		else if(machineInfo.iSupportsDMA != expectedBool )
+			{
+			ERR_PRINTF3(_L("SupportsDMA(%d) != expectedSupportsDMA(%d)"), machineInfo.iSupportsDMA, expectedBool);
+			SetBlockResult(EFail);
+			}			
+	
+		if( !GetBoolFromConfig(aSection, KHasFlagMaxTransferLength_256K(), expectedBool))
+			{
+			ERR_PRINTF1(_L("Failed to get KHasFlagMaxTransferLength_256K( from ini file"));
+			SetBlockResult(EFail);
+			}
+		else if(machineInfo.iMaxTransferLength_256K != expectedBool )
+			{
+			ERR_PRINTF3(_L("maxTransferLength_256K(%d) != expectedMaxTransferLength_256K(%d)"), machineInfo.iMaxTransferLength_256K, expectedBool);
+			SetBlockResult(EFail);
+			}
+
+		if( !GetBoolFromConfig(aSection,  KHasFlagMaxTransferLength_512K(), expectedBool))
+			{
+			ERR_PRINTF1(_L("Failed to get  KHasFlagMaxTransferLength_512K from ini file"));
+			SetBlockResult(EFail);
+
+			}
+		else if(machineInfo.iMaxTransferLength_512K != expectedBool )
+			{
+			ERR_PRINTF3(_L("maxTransferLength_512K(%d) != expectedMaxTransferLength_512K(%d)"), machineInfo.iMaxTransferLength_512K, expectedBool);
+			SetBlockResult(EFail);
+			}
+
+		if( !GetBoolFromConfig(aSection, KHasFlagMaxTransferLength_1M(), expectedBool))
+			{
+			ERR_PRINTF1(_L("Failed to get KHasFlagMaxTransferLength_1M from ini file"));
+			SetBlockResult(EFail);
+
+			}
+		else if(machineInfo.iMaxTransferLength_1M != expectedBool )
+			{
+			ERR_PRINTF3(_L("maxTransferLength_1M(%d) != expectedMaxTransferLength_1M(%d)"), machineInfo.iMaxTransferLength_1M, expectedBool);
+			SetBlockResult(EFail);
+			}
+
+		if( !GetBoolFromConfig(aSection, KHasFlagMaxTransferLength_2M(), expectedBool))
+			{
+			ERR_PRINTF1(_L("Failed to get KHasFlagMaxTransferLength_2M from ini file"));
+			SetBlockResult(EFail);
+
+			}
+		else if(machineInfo.iMaxTransferLength_2M != expectedBool )
+			{
+			ERR_PRINTF3(_L("maxTransferLength_2M(%d) != expectedMaxTransferLength_2M(%d)"), machineInfo.iMaxTransferLength_2M, expectedBool);
+			SetBlockResult(EFail);
+			}
+
+		if( !GetBoolFromConfig(aSection, KHasFlagMaxTransferLength_4M(), expectedBool))
+			{
+			ERR_PRINTF1(_L("Failed to get KHasFlagMaxTransferLength_4M from ini file"));
+			SetBlockResult(EFail);			
+			}
+		else if(machineInfo.iMaxTransferLength_4M != expectedBool )
+			{
+			ERR_PRINTF3(_L("maxTransferLength_4M(%d) != expectedMaxTransferLength_4M(%d)"), machineInfo.iMaxTransferLength_4M, expectedBool);
+			SetBlockResult(EFail);
+			}
+
+		if( !GetBoolFromConfig(aSection, KHasFlagMaxTransferLength_8M(), expectedBool))
+			{
+			ERR_PRINTF1(_L("Failed to get KHasFlagMaxTransferLength_8M from ini file"));
+			SetBlockResult(EFail);						
+			}
+		else if(machineInfo.iMaxTransferLength_8M != expectedBool )
+			{
+			ERR_PRINTF3(_L("maxTransferLength_8M(%d) != expectedMaxTransferLength_8M(%d)"), machineInfo.iMaxTransferLength_8M, expectedBool);
+			SetBlockResult(EFail);
+			}
+
+		if( !GetBoolFromConfig(aSection, KHasFlagMaxTransferLength_16M(), expectedBool))
+			{
+			ERR_PRINTF1(_L("Failed to get KHasFlagMaxTransferLength_16M from ini file"));
+			SetBlockResult(EFail);			
+
+			}
+		else if(machineInfo.iMaxTransferLength_16M != expectedBool )
+			{
+			ERR_PRINTF3(_L("maxTransferLength_16M(%d) != expectedMaxTransferLength_16M(%d)"), machineInfo.iMaxTransferLength_16M, expectedBool);
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::MaxCardsInStack kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+
+void CT_MMCSDStackDriverData::DoCmdMaxCardsInStack(const TDesC& aSection)
+	{
+	INFO_PRINTF1( _L(" CT_MMCSDStackDriverData::DoCmdMaxCardsInStack called"));
+
+	TUint actualMaxCardsInStack;
+	iMmcSDController->StackMaxCardsInStack(actualMaxCardsInStack);
+
+	TUint expectedMaxCardsInStack;
+	if(!GetUintFromConfig(aSection, KExpectedMaxCardsInStack(), expectedMaxCardsInStack))
+		{
+		ERR_PRINTF1(_L("Failed to get  KExpectedMaxCardsInStack from ini file"));
+		SetBlockResult(EFail);			
+
+		}
+	else if(actualMaxCardsInStack != expectedMaxCardsInStack)
+		{
+		ERR_PRINTF3(_L("MaxCardsInStack actualMaxCardsInStack (%d) != expectedMaxCardsInStack(%d)")
+				,actualMaxCardsInStack, expectedMaxCardsInStack);
+		SetBlockResult(EFail);
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::PasswordStore kernel side
+ * and retrieve the password in the store
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdPasswordStore(const TDesC& aSection)
+	{
+	INFO_PRINTF1( _L(" CT_MMCSDStackDriverData::DoCmdPasswordStore called"));
+
+	TStackPasswordStoreData pwdStoreData;
+	TInt err = iMmcSDController->StackReadPasswordStore(pwdStoreData);
+
+	if (err != KErrNone)
+		{
+		ERR_PRINTF2(_L("MMCStack::DoCmdPasswordStore() Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		if (!pwdStoreData.iPwdStorePtr)
+			{
+			ERR_PRINTF1(_L("MMCStack::DoCmdPasswordStore() retrieved a NULL pointer"));
+			SetError(err);
+			}
+		else
+			{
+			INFO_PRINTF2( _L("Password Store ptr (%x)"), pwdStoreData.iPwdStorePtr);
+
+			TBuf<KMmcPwdLen> pwd;
+			pwd.Copy(pwdStoreData.iPassword);
+			INFO_PRINTF2( _L("PwdStore Password (%S)"), &pwd);
+
+			TPtrC tmp;
+			if (GetStringFromConfig(aSection, KPassword(), tmp))
+				{
+				INFO_PRINTF2( _L("Expected password (%S)"), &tmp);
+				if(tmp != pwd)
+					{
+					ERR_PRINTF1( _L("PASSWORD does not match"));
+					SetBlockResult(EFail);
+					}
+				}
+			else
+				{
+				ERR_PRINTF1( _L("failed to read password"));
+				SetBlockResult(EFail);	
+				}
+			}
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::PasswordStore kernel side
+ * and update the password in the store
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdWritePasswordStore(const TDesC& aSection)
+	{
+
+	INFO_PRINTF1( _L(" CT_MMCSDStackDriverData::DoCmdWritePasswordStore called"));
+
+	// read the password to set from ini file			
+	TPtrC tmp;
+	if (GetStringFromConfig(aSection, KPassword(), tmp))
+		{
+		INFO_PRINTF2( _L("Attempting to write password (%S) to password store"), &tmp);
+
+		TStackPasswordStoreData pwdStoreData;
+		pwdStoreData.iPassword.Copy(tmp);
+		TInt err = iMmcSDController->StackWritePasswordStore(pwdStoreData);
+		if (err == KErrNone)
+			{
+			INFO_PRINTF1(_L("Wrote password ok"));
+			}
+		else
+			{
+			ERR_PRINTF2( _L("StackWritePasswordStore failed err(%d)"), err);
+			SetError(err);
+			}
+		}
+	else
+		{
+		ERR_PRINTF1( _L("Failed to read PASSWORD to write from ini file"));
+		SetBlockResult(EFail);
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::ProgramPeriodMs kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdProgramPeriodInMilliSeconds(const TDesC& aSection)
+	{
+	TInt actualPeriod;
+	INFO_PRINTF1(_L("Calling MMCStack::ProgramPeriodInMilliSeconds()"));
+	TInt err = iMmcSDController->StackProgramPeriodInMilliSeconds(actualPeriod);
+
+	if (err != KErrNone)
+		{
+		ERR_PRINTF2(_L("DMMCStack::ProgramPeriodInMilliSeconds() Error %d"), err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("DMMCStack::ProgramPeriodInMilliSeconds() actualPeriod(%d)"), actualPeriod);
+
+		TInt expectedPeriod;
+		if (GetIntFromConfig(aSection, KProgramPeriodMs(), expectedPeriod)
+				&& actualPeriod != expectedPeriod)
+			{
+			ERR_PRINTF3(_L("actual (%d) and expected(%d) periods do not match"), actualPeriod, expectedPeriod);
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::Stop kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdStop(const TDesC& /*aSection*/)
+	{
+	INFO_PRINTF1(_L("Calling MMCStack::Stop()"));
+	TInt err = iMmcSDController->StackStop();
+	if (err != KErrNone)
+		{
+		ERR_PRINTF2(_L("MMCStack::Stop() Error %d"), err);
+		SetError(err);
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::Init kernel side
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdInit()
+	{
+	INFO_PRINTF1(_L("Calling MMCStack::Init()"));
+	TInt err = iMmcSDController->StackInit();
+	
+	if(err != KErrNone)
+		{
+		ERR_PRINTF2(_L("MMCStack::Init() Error %d"), err);
+		SetError(err);
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::ReportPowerUp kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdReportPowerUp(const TDesC& /*aSection*/)
+	{
+	INFO_PRINTF1(_L("Calling MMCStack::ReportPowerUp()"));
+	TInt err = iMmcSDController->StackReportPowerUp();
+	if (err != KErrNone)
+		{
+		ERR_PRINTF2(_L("MMCStack::ReportPowerUp() Error %d"), err);
+		SetError(err);
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::ReportPowerDown kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdReportPowerDown(const TDesC& /*aSection*/)
+	{
+	INFO_PRINTF1(_L("Calling MMCStack::ReportPowerDown()"));
+	TInt err = iMmcSDController->StackReportPowerDown();
+	if (err != KErrNone)
+		{
+		ERR_PRINTF2(_L("MMCStack::ReportPowerDown() Error %d"), err);
+		SetError(err);
+		}
+	}
+
+/**
+ * Process command that will result in call to DMMCStack::CardP kernel side
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MMCSDStackDriverData::DoCmdCardP(const TDesC& aSection)
+	{
+	TCardPtr cardPtr;
+	if( GetIntFromConfig(aSection, KCardNumber(), cardPtr.iCardNumber) )
+		{
+		INFO_PRINTF2(_L("Calling MMCStack::CardP(%d)"), cardPtr.iCardNumber);
+		TInt err = iMmcSDController->StackCardP(cardPtr);
+	
+		if( err!=KErrNone )
+			{
+			ERR_PRINTF2(_L("MMCStack::CardP() Error %d"), err);
+			SetError(err);
+			}
+		else
+			{
+			INFO_PRINTF2(_L("MMCStack::CardP(): ptr=%x"), cardPtr.iCardPtr);
+			TBool	expectedIsNull;
+			if( GetBoolFromConfig(aSection, KIsNull(), expectedIsNull) )
+				{
+				if( expectedIsNull )
+					{
+					if( cardPtr.iCardPtr != NULL )
+						{
+						ERR_PRINTF1(_L("Card ptr is not NULL"));
+						SetBlockResult(EFail);
+						}
+					}
+				else
+					{
+					if( cardPtr.iCardPtr == NULL )
+						{
+						ERR_PRINTF1(_L("Card ptr is NULL"));
+						SetBlockResult(EFail);
+						}
+					}				
+				}
+			else
+				{
+				ERR_PRINTF1(_L("Expected Is Null not given in ini file"));
+				SetBlockResult(EFail);			
+				}
+			}		
+		}
+	else
+		{
+		ERR_PRINTF1(_L("Card Number not given in ini file"));
+		SetBlockResult(EFail);			
+		}		
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-MMC-MEDIACHANGE-DRIVER-MANUAL.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,51 @@
+[include]
+file1				=\base\mmcsd\t_mmc.ini
+file2				=\base\t_prompt.ini
+
+[mmcsdsession1]
+name				=mmcsdsession1
+
+[mmcsdmediachange1]
+name				=mmcsdmediachange1
+
+[BASE-BSP-MMC-DRIVER-StackNumber]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-DRIVER-SessionWrapperName]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-DRIVER-LDDName-CMD0001]
+LDD				={logicaldevice,lddname}
+
+[BASE-BSP-MMC-DRIVER-Message1-CMD0002]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-MediaState-CMD0002]
+expectedmediastate		=EClosed
+
+[BASE-BSP-MMC-DRIVER-Message1-CMD0003]
+message				=Ensure the Card is removed from the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-MediaState-CMD0003]
+expectedmediastate		=EOpened
+
+[BASE-BSP-MMC-DRIVER-Message2-CMD0003]
+message				=Insert the Code and allow other tests to run then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-Message1-CMD0004]
+message				=Ensure the Card is Inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-MediaState-CMD0004]
+expectedmediastate		=EClosed
+
+[BASE-BSP-MMC-DRIVER-ForcedMediaState-CMD0004]
+expectedmediastate		={mediastate,forcedstate}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-MMC-MEDIACHANGE-DRIVER.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,24 @@
+[include]
+file1				=\base\mmcsd\t_mmc.ini
+
+[mmcsdsession1]
+name				=mmcsdsession1
+
+[mmcsdmediachange1]
+name				=mmcsdmediachange1
+
+[BASE-BSP-MMC-DRIVER-StackNumber]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-DRIVER-SessionWrapperName]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-DRIVER-LDDName-CMD0001]
+LDD				={logicaldevice,lddname}
+
+[BASE-BSP-MMC-DRIVER-InitMediaState-CMD0002]
+expectedmediastate		={mediastate,initialstate}
+
+[BASE-BSP-MMC-DRIVER-ReplayEventCount-CMD0003]
+expectedeventcount		={mediastate,eventcount}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-MMC-PSU-DRIVER.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,56 @@
+[include]
+file1				=\base\mmcsd\t_mmc.ini
+
+[mmcsdsession1]
+name				=mmcsdsession1
+
+[mmcsdpsu1]
+name				=mmcsdpsu1
+
+[BASE-BSP-MMC-DRIVER-StackNumber]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-DRIVER-SessionWrapperName]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-DRIVER-LDDName-CMD0001]
+LDD				={logicaldevice,lddname}
+
+[BASE-BSP-MMC-DRIVER-PsuInfo-CMD002]
+expectedpsuinactivitytimeOut	={psuinfo,psuinactivitytimeOut}
+expectednotlockedtimeOut	={psuinfo,notlockedtimeOut}
+expectedvoltage			={psuinfo,supported_voltage}
+expectedcurrent			={psuinfo,current}
+expectedvoltageinterval		={psuinfo,voltageinterval}
+expectedvoltagecheck		={psuinfo,voltagecheck}
+
+[BASE-BSP-MMC-DRIVER-Supported-PSUVoltageOCR-CMD0003]
+expectedpsuVoltage		={psuinfo,supported_voltage}
+
+[BASE-BSP-MMC-DRIVER-VccStateOFF-CMD0004]
+psustate			=0
+expectedpsustate		=0
+expectedvccstate		={powersupply,initvccstate}
+
+[BASE-BSP-MMC-DRIVER-VccStatePsuOnCurLimit-CMD0005]
+psustate			=1
+expectedpsustate		=1
+expectedvccstate		=1
+
+[BASE-BSP-MMC-DRIVER-VccStatePsuOnFull-CMD0006]
+psustate			=2
+expectedpsustate		=2
+expectedvccstate		=2
+
+[BASE-BSP-MMC-DRIVER-PbusState-CMD0007]
+expectedpbusstate		={busstate,cardbusstate}
+
+[BASE-BSP-MMC-DRIVER-PsuNumber-CMD0008]
+expectedpsuNumber		={powersupply,unit}
+
+[BASE-BSP-MMC-DRIVER-MediaChangeNumber-CMD0009]
+expectedmediaChangeNumber	={mediachange,mcID}
+
+[BASE-BSP-MMC-DRIVER-PsuCurLimit-CMD0010]
+expectedpsuCurLimit		={powersupply,curlimit}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-MMC-PSUBASE-DRIVER.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,58 @@
+[include]
+file1				=\base\mmcsd\t_mmc.ini
+
+[mmcsdsession1]
+name				=mmcsdsession1
+
+[mmcsdpsubase1]
+name				=mmcsdpsubase1
+
+[BASE-BSP-MMC-DRIVER-StackNumber]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-DRIVER-SessionWrapperName]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-DRIVER-LDDName-CMD0001]
+LDD				={logicaldevice,lddname}
+
+
+[BASE-BSP-MMC-DRIVER-IsLocked-CMD002]
+expectedlockstate		={psuinfo,lockstate}
+
+[BASE-BSP-MMC-DRIVER-IsOff-CMD003]
+expectedpsustate		={psuinfo,psuoff}
+
+[BASE-BSP-MMC-DRIVER-MaxCurrentInMicroAmps-CMD004]
+expectedcurrent			={psuinfo,current}
+
+[BASE-BSP-MMC-DRIVER-InactivityCount-CMD005]
+expectedinactivityCount		={psuinfo,inactivitycount}
+
+[BASE-BSP-MMC-DRIVER-NotLockedCount-CMD005]
+expectednotLockedCount		={psuinfo,notlockedcount}
+
+[BASE-BSP-MMC-DRIVER-VoltageSupported-CMD006]
+expectedvoltage			={psuinfo,supported_voltage}
+
+[BASE-BSP-MMC-DRIVER-InactivityCount-CMD007]
+expectedinactivityCount		={psuinfo,inactivitycount}
+
+[BASE-BSP-MMC-DRIVER-NotLockedCount-CMD008]
+expectednotLockedCount		={psuinfo,notlockedcount}
+
+[BASE-BSP-MMC-DRIVER-InactivityTimeout-CMD009]
+expectedinactivityTimeout	={psuinfo,psuinactivitytimeOut}
+
+[BASE-BSP-MMC-DRIVER-NotLockedTimeout-CMD010]
+expectednotlockedtimeOut	={psuinfo,notlockedtimeOut}
+
+[BASE-BSP-MMC-DRIVER-MemVoltageSupported-CMD011]
+expectedmemVoltageSupported	={psuinfo,supported_voltage}
+
+[BASE-BSP-MMC-DRIVER-MemMaxCurrentInMicroAmps-CMD012]
+expectedmemMaxCurrentInMicroAmps ={psuinfo,current}
+
+[BASE-BSP-MMC-DRIVER-VoltCheckInterval-CMD013]
+expectedvoltageinterval		={psuinfo,voltageinterval}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-MMC-SOCKET-DRIVER-MANUAL.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,106 @@
+[include]
+file1				=\base\mmcsd\t_mmc.ini
+file2				=\base\t_prompt.ini
+
+[mmcsdsession1]
+name=mmcsdsession1
+
+[mmcsdsocket1]
+name=mmcsdsocket1
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0001-001-LoadDriver_command02]
+LDD				={logicaldevice,lddname}
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0002-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0002-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0002-001-PromptUser_command03]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0002-001-CardIsPresent_command04]
+cardpresent			=TRUE
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0003-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0003-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0003-001-PromptUser_command03]
+message				=Ensure the Card is removed from the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0003-001-CardIsPresent_command04]
+cardpresent			=FALSE
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0003-001-PromptUser_command05]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0004-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0004-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0004-001-PromptUser_command03]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0004-001-CardIsPresent_command04]
+cardpresent			=TRUE
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0004-001-PromptUser_command05]
+message				=Ensure the Card is removed from the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0004-001-CardIsPresent_command06]
+cardpresent			=FALSE
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0004-001-PromptUser_command07]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0004-001-CardIsPresent_command08]
+cardpresent			=TRUE
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0005-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0005-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0005-001-PromptUser_command04]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0005-001-CardIsPresent_command05]
+cardpresent			=TRUE
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0006-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0006-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0006-001-PromptUser_command05]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0006-001-CardIsPresent_command06]
+cardpresent			=TRUE
+
+[BASE-BSP-MMC-DRIVER-MANUALSocket-0007-001-UnLoadDriver_command02]
+LDD				={logicaldevice,lddname}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-MMC-SOCKET-DRIVER.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,350 @@
+[include]
+file1				=\base\mmcsd\t_mmc.ini
+
+[mmcsdsession1]
+name=mmcsdsession1
+
+[mmcsdsocket1]
+name=mmcsdsocket1
+
+[mmcsdstack1]
+name=mmcsdstack1
+
+[mmcsdpsu1]
+name=mmcsdpsu1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0001-001-LoadDriver_command02]
+LDD				={logicaldevice,lddname}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0002-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0002-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0003-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0003-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0004-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0004-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0004-001-Stack_command03]
+busnum				={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0005-001-DriverOpen_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0005-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0005-001-ResetInactivity_command04]
+busnum				={cardinfo,cardnumber}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0005-001-PsuInfo_command05]
+expectedpsuinactivitytimeOut	={psuinfo,psuinactivitytimeOut}
+expectednotlockedtimeOut	={psuinfo,notlockedtimeOut}
+expectedvoltage			={psuinfo,supported_voltage}
+expectedcurrent			={psuinfo,current}
+expectedvoltageinterval		={psuinfo,voltageinterval}
+expectedvoltagecheck		={psuinfo,voltagecheck}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0006-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0006-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0006-001-MachineInfo_command03]
+expectedtotalsockets		={machineinfo,expectedtotalsockets}
+expectedtotalmediachanges	={machineinfo,expectedtotalmediachanges}
+expectedtotalprimarysupplies	={machineinfo,expectedtotalprimarysupplies}
+expectedbasebusnumber		={machineinfo,expectedbasebusnumber}
+expectedspimode			={machineinfo,expectedspimode}
+hasflagsupportsspimode		={machineinfo,hasflagsupportsspimode}
+hasflagsupportsdoublebuffering	={machineinfo,hasflagsupportsdoublebuffering}
+hasflagsupportsr7		={machineinfo,hasflagsupportsr7}
+hasflagmaxtransferlength256k	={machineinfo,hasflagmaxtransferlength256k}
+hasflagmaxtransferlength512k	={machineinfo,hasflagmaxtransferlength512k}
+hasflagmaxtransferlength1m	={machineinfo,hasflagmaxtransferlength1m}
+hasflagmaxtransferlength2m	={machineinfo,hasflagmaxtransferlength2m}
+hasflagmaxtransferlength4m	={machineinfo,hasflagmaxtransferlength4m}
+hasflagmaxtransferlength8m	={machineinfo,hasflagmaxtransferlength8m}
+hasflagmaxtransferlength16m	={machineinfo,hasflagmaxtransferlength16m}
+hasflagdma8bitaddressing	={machineinfo,hasflagdma8bitaddressing}
+hasflagdma16bitaddressing	={machineinfo,hasflagdma16bitaddressing}
+hasflagdma32bitaddressing	={machineinfo,hasflagdma32bitaddressing}
+hasflagdma64bitaddressing	={machineinfo,hasflagdma64bitaddressing}
+hasflagsupportsdma		={machineinfo,hasflagsupportsdma}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0007-001-DriverOpen_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0007-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0007-001-CardP_command04]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0007-001-AdjustPartialRead_command05]
+prdstart			={partialreadinfo,prdstart1}
+prdend				={partialreadinfo,prdend1}
+expectedprdstart		={partialreadinfo,expectedprdstart1}
+expectedprdend			={partialreadinfo,expectedprdend1}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0008-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0008-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0008-001-GetBufferInfo_command03]
+expectedBuflen			={bufferinfo,buflen}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0009-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0009-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0009-001-PrepareStore_command03]
+newpassword			=thepasswd
+oldpassword			=thepasswd
+busnum				={cardinfo,cardnumber}
+prepstorefn			=EPasswordClear
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0010-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0010-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0011-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0011-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0012-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0012-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0013-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0013-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0014-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0014-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0015-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0015-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0015-001-Stack_command03]
+busnum				=-1
+isnull				=FALSE
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0016-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0016-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0016-001-Stack_command03]
+busnum				=5
+isnull				=TRUE
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0017-001-DriverOpen_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0017-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0017-001-ResetInactivity_command04]
+busnum				=-1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0017-001-PsuInfo_command05]
+expectedpsuinactivitytimeOut	={psuinfo,psuinactivitytimeOut}
+expectednotlockedtimeOut	={psuinfo,notlockedtimeOut}
+expectedvoltage			={psuinfo,supported_voltage}
+expectedcurrent			={psuinfo,current}
+expectedvoltageinterval		={psuinfo,voltageinterval}
+expectedvoltagecheck		={psuinfo,voltagecheck}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0018-001-DriverOpen_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0018-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0018-001-ResetInactivity_command04]
+busnum				=5
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0018-001-PsuInfo_command05]
+expectedpsuinactivitytimeOut	={psuinfo,psuinactivitytimeOut}
+expectednotlockedtimeOut	={psuinfo,notlockedtimeOut}
+expectedvoltage			={psuinfo,supported_voltage}
+expectedcurrent			={psuinfo,current}
+expectedvoltageinterval		={psuinfo,voltageinterval}
+expectedvoltagecheck		={psuinfo,voltagecheck}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0019-001-DriverOpen_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0019-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0019-001-CardP_command04]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0019-001-AdjustPartialRead_command05]
+prdstart			=0xFFFFFFFE
+prdend				=0xFFFFFFFF
+expectedprdstart		=0xFFFFFE00
+expectedprdend			=0
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0020-001-DriverOpen_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0020-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0020-001-CardP_command04]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0020-001-AdjustPartialRead_command05]
+prdstart			=0
+prdend				=0xFFFFFFFF
+expectedprdstart		=0
+expectedprdend			=512
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0021-001-DriverOpen_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0021-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0021-001-CardP_command04]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0021-001-AdjustPartialRead_command05]
+prdstart			=512
+prdend				=512
+expectedprdstart		=512
+expectedprdend			=1024
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0022-001-DriverOpen_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0022-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0022-001-CardP_command04]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0022-001-AdjustPartialRead_command05]
+prdstart			=512
+prdend				=0
+expectedprdstart		=512
+expectedprdend			=1024
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0023-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0023-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0023-001-PrepareStore_command03]
+newpassword			=thepasswd
+oldpassword			=thepasswd
+busnum				={cardinfo,cardnumber}
+prepstorefn			=EPasswordLock
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0024-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0024-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0024-001-PrepareStore_command03]
+newpassword			=thepasswd
+oldpassword			=thepasswd
+busnum				={cardinfo,cardnumber}
+prepstorefn			=EPasswordUnlock
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0025-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0025-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0025-001-PrepareStore_command03]
+newpassword			=
+oldpassword			=thepasswd
+busnum				={cardinfo,cardnumber}
+prepstorefn			=EPasswordLock
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0026-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0026-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0026-001-PrepareStore_command03]
+newpassword			=thepasswd
+oldpassword			=
+busnum				={cardinfo,cardnumber}
+prepstorefn			=EPasswordClear
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0027-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0027-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0027-001-PrepareStore_command03]
+newpassword			=thepasswd
+oldpassword			=
+busnum				={cardinfo,cardnumber}
+prepstorefn			=EPasswordUnlock
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0028-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0028-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0028-001-iStandby_Get_command03]
+standby				={mediastate,standbymode}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0029-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0029-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0029-001-iType_Get_command03]
+type				={mediastate,bustype}
+
+[BASE-BSP-MMC-SOCKET-DRIVER-0030-001-UnLoadDriver_command02]
+LDD				={logicaldevice,lddname}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-MMC-STACK-DRIVER-MANUAL.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,81 @@
+[include]
+file1				=\base\mmcsd\t_mmc.ini
+file2				=\base\t_prompt.ini
+
+[mmcsdsession1]
+name=mmcsdsession1
+
+[mmcsdstack1]
+name=mmcsdstack1
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0001-001-LoadDriver_command02]
+LDD				={logicaldevice,lddname}
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0002-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0002-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0002-001-PromptUser_command03]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0002-001-HasCardsPresent_command04]
+cardspresent			=TRUE
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0003-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0003-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0003-001-PromptUser_command04]
+message				=Ensure the Card is removed and reinserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0004-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0004-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0004-001-PromptUser_command04]
+message				=Ensure the Card is removed and reinserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0005-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0005-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0005-001-PromptUser_command03]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0005-001-HasCardsPresent_command04]
+cardspresent			=TRUE
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0005-001-PromptUser_command05]
+message				=Ensure the Card is removed from the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0005-001-HasCardsPresent_command06]
+cardspresent			=FALSE
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0005-001-PromptUser_command07]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0005-001-HasCardsPresent_command08]
+cardspresent			=TRUE
+
+[BASE-BSP-MMC-DRIVER-MANUALStack-0006-001-UnloadDriver_command02]
+LDD				={logicaldevice,lddname}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-MMC-STACK-DRIVER.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,643 @@
+[include]
+file1				=\base\mmcsd\t_mmc.ini
+
+[mmcsdsession1]
+name=mmcsdsession1
+
+[mmcsdstack1]
+name=mmcsdstack1
+
+[mmcsdsocket1]
+name=mmcsdsocket1
+
+[mmcsdpsu1]
+name=mmcsdpsu1
+
+[BASE-BSP-MMC-STACK-DRIVER-0001-001-LoadDriver_command02]
+LDD				={logicaldevice,lddname}
+
+[BASE-BSP-MMC-STACK-DRIVER-0002-001-LoadDriver_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0002-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0002-001-CardP_command04]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0002-001-iState_Get_command05]
+state				={stacktests,expectedstateoff}
+
+[BASE-BSP-MMC-STACK-DRIVER-0002-001-VccState_command06]
+expectedvccstate		=EDPsuOff
+
+[BASE-BSP-MMC-STACK-DRIVER-0002-001-SetState_command07]
+psustate			=0
+expectedpsustate		=0
+
+[BASE-BSP-MMC-STACK-DRIVER-0002-001-VccState_command08]
+expectedvccstate		=EDPsuOff
+
+[BASE-BSP-MMC-STACK-DRIVER-0002-001-iState_Get_command09]
+state				={stacktests,expectedstateoff}
+
+[BASE-BSP-MMC-STACK-DRIVER-0002-001-iState_Get_command11]
+state				={stacktests,expectedstateon}
+
+[BASE-BSP-MMC-STACK-DRIVER-0002-001-VccState_command12]
+expectedvccstate		=EDPsuOnFull
+
+[BASE-BSP-MMC-STACK-DRIVER-0003-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0003-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0003-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0003-001-WritePasswordStore_command04]
+password			=foobar11
+
+[BASE-BSP-MMC-STACK-DRIVER-0003-001-ReadPasswordStore_command05]
+password			=foobar11
+
+[BASE-BSP-MMC-STACK-DRIVER-0003-001-WritePasswordStore_command06]
+password			=foobar12
+
+[BASE-BSP-MMC-STACK-DRIVER-0003-001-ReadPasswordStore_command07]
+password			=foobar12
+
+[BASE-BSP-MMC-STACK-DRIVER-0004-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0004-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0004-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0004-001-WriteSector_command04]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0004-001-ReadSector_command05]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0004-001-WriteSector_command06]
+sectornumber 			=13
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0004-001-ReadSector_command07]
+sectornumber 			=13
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0004-001-WriteSector_command08]
+sectornumber 			=14
+sectortext			=!--zyxwvutsrqponmlkjihgfedcba--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0004-001-ReadSector_command09]
+sectornumber 			=14
+sectortext			=!--zyxwvutsrqponmlkjihgfedcba--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0005-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0005-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0005-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0005-001-WriteSector_command04]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0005-001-WriteSector_command05]
+sectornumber 			=13
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0005-001-WriteSector_command06]
+sectornumber 			=13
+sectortext			=!--zyxwvutsrqponmlkjihgfedcba--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0005-001-ReadSector_command07]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0005-001-ReadSector_command08]
+sectornumber 			=13
+sectortext			=!--zyxwvutsrqponmlkjihgfedcba--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0006-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0006-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0006-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0006-001-WriteSector_command04]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0006-001-WriteSector_command05]
+sectornumber 			=13
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0006-001-ReadSector_command06]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0006-001-ReadSector_command07]
+sectornumber 			=13
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0006-001-ReadSector_command08]
+sectornumber 			=13
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0007-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0007-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0007-001-CardP_command03]
+cardnumber			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0007-001-AdjustPartialRead_command04]
+prdstart			={partialreadinfo,prdstart1}
+prdend				={partialreadinfo,prdend1}
+expectedprdstart		={partialreadinfo,expectedprdstart1}
+expectedprdend			={partialreadinfo,expectedprdend1}
+
+[BASE-BSP-MMC-STACK-DRIVER-0007-001-AdjustPartialRead_command05]
+prdstart			={partialreadinfo,prdstart2}
+prdend				={partialreadinfo,prdend2}
+expectedprdstart		={partialreadinfo,expectedprdstart2}
+expectedprdend			={partialreadinfo,expectedprdend2}
+
+[BASE-BSP-MMC-STACK-DRIVER-0007-001-AdjustPartialRead_command06]
+prdstart			={partialreadinfo,prdstart3}
+prdend				={partialreadinfo,prdend3}
+expectedprdstart		={partialreadinfo,expectedprdstart3}
+expectedprdend			={partialreadinfo,expectedprdend3}
+
+[BASE-BSP-MMC-STACK-DRIVER-0007-001-AdjustPartialRead_command07]
+prdstart			={partialreadinfo,prdstart4}
+prdend				={partialreadinfo,prdend4}
+expectedprdstart		={partialreadinfo,expectedprdstart4}
+expectedprdend			={partialreadinfo,expectedprdend4}
+
+[BASE-BSP-MMC-STACK-DRIVER-0008-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0008-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0008-001-HasSessionsQueued_command03]
+sessionsqueued			=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0008-001-CardP_command04]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0008-001-WriteSector_command05]
+sectornumber 			=7
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0008-001-HasSessionsQueued_command06]
+sessionsqueued			=TRUE
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command03]
+effectivemodes			=0x11CFF
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command04]
+emfunctionid			=EEffectiveModesRemoveMode
+emdata 				=1
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command05]
+effectivemodes			=0x11CFE
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command06]
+emfunctionid			=EEffectiveModesSetBusClockInKhz
+emdata 				=80
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command07]
+effectivemodes			=0x11CFE
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command08]
+emfunctionid			=EEffectiveModesSetBusyTimeOutInMcs
+emdata 				=1
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command09]
+effectivemodes			=0x11CFE
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command10]
+emfunctionid			=EEffectiveModesSetCRCRetries
+emdata 				=1
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command11]
+effectivemodes			=0x11CFE
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command12]
+emfunctionid			=EEffectiveModesSetDataTimeOutInMcs
+emdata 				=1
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command13]
+effectivemodes			=0x11CFE
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command14]
+emfunctionid			=EEffectiveModesSetMode
+emdata 				=1
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command15]
+effectivemodes			=0x31411CFF
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command16]
+emfunctionid			=EEffectiveModesSetOpCondBusyTimeout
+emdata 				=1
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command17]
+effectivemodes			=0x71411CFF
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command18]
+emfunctionid			=EEffectiveModesSetPollAttempts
+emdata 				=1
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command19]
+effectivemodes			=0x71511CFF
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command20]
+emfunctionid			=EEffectiveModesSetResponseTimeOutInTicks
+emdata 				=1
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command21]
+effectivemodes			=0x79511CFF
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command22]
+emfunctionid			=EEffectiveModesSetTicksClockIn
+emdata 				=1
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command23]
+effectivemodes			=0x7B511cff
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command24]
+emfunctionid			=EEffectiveModesSetTicksClockOut
+emdata 				=1
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command25]
+effectivemodes			=0x7f511CFF
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-AlterEffectiveModes_command26]
+emfunctionid			=EEffectiveModesSetTimeOutRetries
+emdata 				=1
+
+[BASE-BSP-MMC-STACK-DRIVER-0009-001-EffectiveModes_command27]
+effectivemodes			=0x7f711CFF
+
+[BASE-BSP-MMC-STACK-DRIVER-0010-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0010-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0010-001-CardP_command03]
+cardnumber 			=-1
+isnull				=TRUE
+
+[BASE-BSP-MMC-STACK-DRIVER-0010-001-WriteSector_command04]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0010-001-CardP_command05]
+cardnumber 			=99
+isnull				=TRUE
+
+[BASE-BSP-MMC-STACK-DRIVER-0010-001-WriteSector_command06]
+sectornumber 			=12
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0010-001-CardP_command07]
+cardnumber			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0010-001-WriteSector_command08]
+sectornumber 			=13
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0011-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0011-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0011-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0012-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0012-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0012-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0012-001-WriteSector_command04]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0012-001-ReadSector_command05]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0012-001-WriteSector_command06]
+sectornumber 			=13
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0012-001-ReadSector_command07]
+sectornumber 			=13
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0012-001-WriteSector_command08]
+sectornumber 			=14
+sectortext			=!--zyxwvutsrqponmlkjihgfedcba--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0012-001-ReadSector_command09]
+sectornumber 			=14
+sectortext			=!--zyxwvutsrqponmlkjihgfedcba--!
+repeats				=16
+
+[BASE-BSP-MMC-STACK-DRIVER-0013-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0013-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0013-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0014-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0014-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0014-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0014-001-CardInfo_command04]
+maxreadblocklen			=9
+transferspeed			={cardpdata, transferspeed}
+highcapacity			=0 
+
+[BASE-BSP-MMC-STACK-DRIVER-0014-001-CardIsPresent_command05]
+expectedispresent		=TRUE
+
+[BASE-BSP-MMC-STACK-DRIVER-0014-001-CardIsReady_command06]
+expectedisready			=TRUE
+
+[BASE-BSP-MMC-STACK-DRIVER-0014-001-CardIsLocked_command07]
+expectedislocked		=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0015-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0015-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0015-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0015-001-CardP_command04]
+cardnumber 			=-1
+isnull				=TRUE
+
+[BASE-BSP-MMC-STACK-DRIVER-0015-001-CardP_command05]
+cardnumber 			=5
+isnull				=TRUE
+
+[BASE-BSP-MMC-STACK-DRIVER-0015-001-CardP_command06]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0016-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0016-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0016-001-MaxCardsInStack_command03]
+maxcards 			={devinfo,maxcards}
+
+[BASE-BSP-MMC-STACK-DRIVER-0017-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0017-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0017-001-Socket_command03]
+isnull				=FALSE
+socketwrappername		=mmcsdsocket1
+
+[BASE-BSP-MMC-STACK-DRIVER-0018-001-DriverOpen_command01
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0018-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0018-001-InitStackInProgress_command03]
+inprogress			=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0019-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0019-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0019-001-BufferInfo_command03]
+expectedBuflen			={bufferinfo,buflen}
+expectedMinorBuflen 		=512		
+
+[BASE-BSP-MMC-STACK-DRIVER-0020-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0020-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0020-001-ProgramPeriodMs_command03]
+programperiodms			={devinfo,programperiodms}
+
+[BASE-BSP-MMC-STACK-DRIVER-0021-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0021-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0021-001-GetBufferInfo_command03]
+expectedBuflen			={bufferinfo,buflen}
+
+[BASE-BSP-MMC-STACK-DRIVER-0022-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0022-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0022-001-MachineInfo_command03]
+expectedtotalsockets		={machineinfo,expectedtotalsockets}
+expectedtotalmediachanges	={machineinfo,expectedtotalmediachanges}
+expectedtotalprimarysupplies	={machineinfo,expectedtotalprimarysupplies}
+expectedbasebusnumber		={machineinfo,expectedbasebusnumber}
+hasflagsupportsspimode		={machineinfo,hasflagsupportsspimode}
+hasflagsupportsdoublebuffering	={machineinfo,hasflagsupportsdoublebuffering}
+hasflagsupportsr7		={machineinfo,hasflagsupportsr7}
+hasflagmaxtransferlength256k	={machineinfo,hasflagmaxtransferlength256k}
+hasflagmaxtransferlength512k	={machineinfo,hasflagmaxtransferlength512k}
+hasflagmaxtransferlength1m	={machineinfo,hasflagmaxtransferlength1m}
+hasflagmaxtransferlength2m	={machineinfo,hasflagmaxtransferlength2m}
+hasflagmaxtransferlength4m	={machineinfo,hasflagmaxtransferlength4m}
+hasflagmaxtransferlength8m	={machineinfo,hasflagmaxtransferlength8m}
+hasflagmaxtransferlength16m	={machineinfo,hasflagmaxtransferlength16m}
+expectedspimode			={machineinfo,expectedspimode}
+hasflagdma8bitaddressing	={machineinfo,hasflagdma8bitaddressing}
+hasflagdma16bitaddressing	={machineinfo,hasflagdma16bitaddressing}
+hasflagdma32bitaddressing	={machineinfo,hasflagdma32bitaddressing}
+hasflagdma64bitaddressing	={machineinfo,hasflagdma64bitaddressing}
+hasflagsupportsdma		={machineinfo,hasflagsupportsdma}
+
+[BASE-BSP-MMC-STACK-DRIVER-0023-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0023-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0024-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0024-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0025-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0025-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0025-001-CardP_command03]
+cardnumber			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0025-001-AdjustPartialRead_command04]
+prdstart			=0xFFFFFFFE
+prdend				=0xFFFFFFFF
+expectedprdstart		=0xFFFFFE00
+expectedprdend			=0
+
+[BASE-BSP-MMC-STACK-DRIVER-0026-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0026-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0026-001-CardP_command03]
+cardnumber			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0026-001-AdjustPartialRead_command04]
+prdstart			=0
+prdend				=0xFFFFFFFF
+expectedprdstart		=0
+expectedprdend			=512
+
+[BASE-BSP-MMC-STACK-DRIVER-0027-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0027-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0027-001-CardP_command03]
+cardnumber			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0027-001-AdjustPartialRead_command04]
+prdstart			=512
+prdend				=512
+expectedprdstart		=512
+expectedprdend			=1024
+
+[BASE-BSP-MMC-STACK-DRIVER-0028-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0028-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0028-001-CardP_command03]
+cardnumber			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-MMC-STACK-DRIVER-0028-001-AdjustPartialRead_command04]
+prdstart			=512
+prdend				=0
+expectedprdstart		=512
+expectedprdend			=1024
+
+[BASE-BSP-MMC-STACK-DRIVER-0029-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0029-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0030-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-MMC-STACK-DRIVER-0030-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-MMC-STACK-DRIVER-0031-001-UnloadDriver_command03]
+LDD				={logicaldevice,lddname}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-SD-MEDIACHANGE-DRIVER-MANUAL.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,51 @@
+[include]
+file1				=\base\mmcsd\t_mmc.ini
+file2				=\base\t_prompt.ini
+
+[mmcsdsession1]
+name				=mmcsdsession1
+
+[mmcsdmediachange1]
+name				=mmcsdmediachange1
+
+[BASE-BSP-SD-DRIVER-StackNumber]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-DRIVER-SessionWrapperName]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-DRIVER-LDDName-CMD0001]
+LDD				={logicaldevice,lddname}
+
+[BASE-BSP-SD-DRIVER-Message1-CMD0002]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-MediaState-CMD0002]
+expectedmediastate		=EClosed
+
+[BASE-BSP-SD-DRIVER-Message1-CMD0003]
+message				=Ensure the Card is removed from the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-MediaState-CMD0003]
+expectedmediastate		=EOpened
+
+[BASE-BSP-SD-DRIVER-Message2-CMD0003]
+message				=Insert the Code and allow other tests to run then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-Message1-CMD0004]
+message				=Ensure the Card is Inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-MediaState-CMD0004]
+expectedmediastate		=EClosed
+
+[BASE-BSP-SD-DRIVER-ForcedMediaState-CMD0004]
+expectedmediastate		={mediastate,forcedstate}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-SD-MEDIACHANGE-DRIVER.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,24 @@
+[include]
+file1				=\base\mmcsd\t_mmc.ini
+
+[mmcsdsession1]
+name				=mmcsdsession1
+
+[mmcsdmediachange1]
+name				=mmcsdmediachange1
+
+[BASE-BSP-SD-DRIVER-StackNumber]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-DRIVER-SessionWrapperName]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-DRIVER-LDDName-CMD0001]
+LDD				={logicaldevice,lddname}
+
+[BASE-BSP-SD-DRIVER-MediaState-CMD0002]
+expectedmediastate		={mediastate,initialstate}
+
+[BASE-BSP-SD-DRIVER-ReplayEventCount-CMD0003]
+expectedeventcount		={mediastate,eventcount}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-SD-PSU-DRIVER.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,56 @@
+[include]
+file1				=\base\mmcsd\t_sd.ini
+
+[mmcsdsession1]
+name				=mmcsdsession1
+
+[mmcsdpsu1]
+name				=mmcsdpsu1
+
+[BASE-BSP-SD-DRIVER-StackNumber]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-DRIVER-SessionWrapperName]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-DRIVER-LDDName-CMD0001]
+LDD				={logicaldevice,lddname}
+
+[BASE-BSP-SD-DRIVER-PsuInfo-CMD002]
+expectedpsuinactivitytimeOut	={psuinfo,psuinactivitytimeOut}
+expectednotlockedtimeOut	={psuinfo,notlockedtimeOut}
+expectedvoltage			={psuinfo,supported_voltage}
+expectedcurrent			={psuinfo,current}
+expectedvoltageinterval		={psuinfo,voltageinterval}
+expectedvoltagecheck		={psuinfo,voltagecheck}
+
+[BASE-BSP-SD-DRIVER-Supported-PSUVoltageOCR-CMD0003]
+expectedpsuVoltage		={psuinfo,supported_voltage}
+
+[BASE-BSP-SD-DRIVER-VccStateOFF-CMD0004]
+psustate			=0
+expectedpsustate		=0
+expectedvccstate		={powersupply,initvccstate}
+
+[BASE-BSP-SD-DRIVER-VccStatePsuOnCurLimit-CMD0005]
+psustate			=1
+expectedpsustate		=1
+expectedvccstate		=1
+
+[BASE-BSP-SD-DRIVER-VccStatePsuOnFull-CMD0006]
+psustate			=2
+expectedpsustate		=2
+expectedvccstate		=2
+
+[BASE-BSP-SD-DRIVER-PbusState-CMD0007]
+expectedpbusstate		={busstate,cardbusstate}
+
+[BASE-BSP-SD-DRIVER-PsuNumber-CMD0008]
+expectedpsuNumber		={powersupply,unit}
+
+[BASE-BSP-SD-DRIVER-MediaChangeNumber-CMD0009]
+expectedmediaChangeNumber	={mediachange,mcID}
+
+[BASE-BSP-SD-DRIVER-PsuCurLimit-CMD0010]
+expectedpsuCurLimit		={powersupply,curlimit}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-SD-PSUBASE-DRIVER.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,57 @@
+[include]
+file1				=\base\mmcsd\t_mmc.ini
+
+[mmcsdsession1]
+name				=mmcsdsession1
+
+[mmcsdpsubase1]
+name				=mmcsdpsubase1
+
+[BASE-BSP-SD-DRIVER-StackNumber]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-DRIVER-SessionWrapperName]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-DRIVER-LDDName-CMD0001]
+LDD				={logicaldevice,lddname}
+
+[BASE-BSP-SD-DRIVER-IsLocked-CMD002]
+expectedlockstate		={psuinfo,lockstate}
+
+[BASE-BSP-SD-DRIVER-IsOff-CMD003]
+expectedpsustate		={psuinfo,psuoff}
+
+[BASE-BSP-SD-DRIVER-MaxCurrentInMicroAmps-CMD004]
+expectedcurrent			={psuinfo,current}
+
+[BASE-BSP-SD-DRIVER-InactivityCount-CMD005]
+expectedinactivityCount		={psuinfo,inactivitycount}
+
+[BASE-BSP-SD-DRIVER-NotLockedCount-CMD005]
+expectednotLockedCount		={psuinfo,notlockedcount}
+
+[BASE-BSP-SD-DRIVER-VoltageSupported-CMD006]
+expectedvoltage			={psuinfo,supported_voltage}
+
+[BASE-BSP-SD-DRIVER-InactivityCount-CMD007]
+expectedinactivityCount		={psuinfo,inactivitycount}
+
+[BASE-BSP-SD-DRIVER-NotLockedCount-CMD008]
+expectednotLockedCount		={psuinfo,notlockedcount}
+
+[BASE-BSP-SD-DRIVER-InactivityTimeout-CMD009]
+expectedinactivityTimeout	={psuinfo,psuinactivitytimeOut}
+
+[BASE-BSP-SD-DRIVER-NotLockedTimeout-CMD010]
+expectednotlockedtimeOut	={psuinfo,notlockedtimeOut}
+
+[BASE-BSP-SD-DRIVER-MemVoltageSupported-CMD011]
+expectedmemVoltageSupported	={psuinfo,supported_voltage}
+
+[BASE-BSP-SD-DRIVER-MemMaxCurrentInMicroAmps-CMD012]
+expectedmemMaxCurrentInMicroAmps ={psuinfo,current}
+
+[BASE-BSP-SD-DRIVER-VoltCheckInterval-CMD013]
+expectedvoltageinterval		={psuinfo,voltageinterval}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-SD-SOCKET-DRIVER-MANUAL.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,106 @@
+[include]
+file1				=\base\mmcsd\t_sd.ini
+file2				=\base\t_prompt.ini
+
+[mmcsdsession1]
+name=mmcsdsession1
+
+[mmcsdsocket1]
+name=mmcsdsocket1
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0001-001-LoadDriver_command02]
+LDD				={logicaldevice,lddname}
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0002-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0002-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0002-001-PromptUser_command03]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0002-001-CardIsPresent_command04]
+cardpresent			=TRUE
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0003-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0003-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0003-001-PromptUser_command03]
+message				=Ensure the Card is removed from the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0003-001-CardIsPresent_command04]
+cardpresent			=FALSE
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0003-001-PromptUser_command05]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0004-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0004-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0004-001-PromptUser_command03]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0004-001-CardIsPresent_command04]
+cardpresent			=TRUE
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0004-001-PromptUser_command05]
+message				=Ensure the Card is removed from the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0004-001-CardIsPresent_command06]
+cardpresent			=FALSE
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0004-001-PromptUser_command07]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0004-001-CardIsPresent_command08]
+cardpresent			=TRUE
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0005-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0005-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0005-001-PromptUser_command04]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0005-001-CardIsPresent_command05]
+cardpresent			=TRUE
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0006-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0006-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0006-001-PromptUser_command05]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0006-001-CardIsPresent_command06]
+cardpresent			=TRUE
+
+[BASE-BSP-SD-DRIVER-MANUALSocket-0007-001-UnLoadDriver_command02]
+LDD				={logicaldevice,lddname}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-SD-SOCKET-DRIVER.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,350 @@
+[include]
+file1				=\base\mmcsd\t_sd.ini
+
+[mmcsdsession1]
+name=mmcsdsession1
+
+[mmcsdsocket1]
+name=mmcsdsocket1
+
+[mmcsdstack1]
+name=mmcsdstack1
+
+[mmcsdpsu1]
+name=mmcsdpsu1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0001-001-LoadDriver_command02]
+LDD				={logicaldevice,lddname}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0002-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0002-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0003-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0003-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0004-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0004-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0004-001-Stack_command03]
+busnum				={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-SOCKET-DRIVER-0005-001-DriverOpen_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0005-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0005-001-ResetInactivity_command04]
+busnum				={cardinfo,cardnumber}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0005-001-PsuInfo_command05]
+expectedpsuinactivitytimeOut	={psuinfo,psuinactivitytimeOut}
+expectednotlockedtimeOut	={psuinfo,notlockedtimeOut}
+expectedvoltage			={psuinfo,supported_voltage}
+expectedcurrent			={psuinfo,current}
+expectedvoltageinterval		={psuinfo,voltageinterval}
+expectedvoltagecheck		={psuinfo,voltagecheck}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0006-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0006-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0006-001-MachineInfo_command03]
+expectedtotalsockets		={machineinfo,expectedtotalsockets}
+expectedtotalmediachanges	={machineinfo,expectedtotalmediachanges}
+expectedtotalprimarysupplies	={machineinfo,expectedtotalprimarysupplies}
+expectedbasebusnumber		={machineinfo,expectedbasebusnumber}
+expectedspimode			={machineinfo,expectedspimode}
+hasflagsupportsspimode		={machineinfo,hasflagsupportsspimode}
+hasflagsupportsdoublebuffering	={machineinfo,hasflagsupportsdoublebuffering}
+hasflagsupportsr7		={machineinfo,hasflagsupportsr7}
+hasflagmaxtransferlength256k	={machineinfo,hasflagmaxtransferlength256k}
+hasflagmaxtransferlength512k	={machineinfo,hasflagmaxtransferlength512k}
+hasflagmaxtransferlength1m	={machineinfo,hasflagmaxtransferlength1m}
+hasflagmaxtransferlength2m	={machineinfo,hasflagmaxtransferlength2m}
+hasflagmaxtransferlength4m	={machineinfo,hasflagmaxtransferlength4m}
+hasflagmaxtransferlength8m	={machineinfo,hasflagmaxtransferlength8m}
+hasflagmaxtransferlength16m	={machineinfo,hasflagmaxtransferlength16m}
+hasflagdma8bitaddressing	={machineinfo,hasflagdma8bitaddressing}
+hasflagdma16bitaddressing	={machineinfo,hasflagdma16bitaddressing}
+hasflagdma32bitaddressing	={machineinfo,hasflagdma32bitaddressing}
+hasflagdma64bitaddressing	={machineinfo,hasflagdma64bitaddressing}
+hasflagsupportsdma		={machineinfo,hasflagsupportsdma}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0007-001-DriverOpen_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0007-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0007-001-CardP_command04]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-SOCKET-DRIVER-0007-001-AdjustPartialRead_command05]
+prdstart			={partialreadinfo,prdstart1}
+prdend				={partialreadinfo,prdend1}
+expectedprdstart		={partialreadinfo,expectedprdstart1}
+expectedprdend			={partialreadinfo,expectedprdend1}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0008-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0008-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0008-001-GetBufferInfo_command03]
+expectedBuflen			={bufferinfo,buflen}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0009-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0009-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0009-001-PrepareStore_command03]
+newpassword			=thepasswd
+oldpassword			=thepasswd
+busnum				={cardinfo,cardnumber}
+prepstorefn			=EPasswordClear
+
+[BASE-BSP-SD-SOCKET-DRIVER-0010-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0010-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0011-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0011-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0012-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0012-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0013-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0013-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0014-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0014-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0015-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0015-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0015-001-Stack_command03]
+busnum				=-1
+isnull				=FALSE
+
+[BASE-BSP-SD-SOCKET-DRIVER-0016-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0016-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0016-001-Stack_command03]
+busnum				=5
+isnull				=TRUE
+
+[BASE-BSP-SD-SOCKET-DRIVER-0017-001-DriverOpen_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0017-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0017-001-ResetInactivity_command04]
+busnum				=-1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0017-001-PsuInfo_command05]
+expectedpsuinactivitytimeOut	={psuinfo,psuinactivitytimeOut}
+expectednotlockedtimeOut	={psuinfo,notlockedtimeOut}
+expectedvoltage			={psuinfo,supported_voltage}
+expectedcurrent			={psuinfo,current}
+expectedvoltageinterval		={psuinfo,voltageinterval}
+expectedvoltagecheck		={psuinfo,voltagecheck}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0018-001-DriverOpen_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0018-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0018-001-ResetInactivity_command04]
+busnum				=5
+
+[BASE-BSP-SD-SOCKET-DRIVER-0018-001-PsuInfo_command05]
+expectedpsuinactivitytimeOut	={psuinfo,psuinactivitytimeOut}
+expectednotlockedtimeOut	={psuinfo,notlockedtimeOut}
+expectedvoltage			={psuinfo,supported_voltage}
+expectedcurrent			={psuinfo,current}
+expectedvoltageinterval		={psuinfo,voltageinterval}
+expectedvoltagecheck		={psuinfo,voltagecheck}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0019-001-DriverOpen_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0019-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0019-001-CardP_command04]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-SOCKET-DRIVER-0019-001-AdjustPartialRead_command05]
+prdstart			=0xFFFFFFFE
+prdend				=0xFFFFFFFF
+expectedprdstart		=0xFFFFFE00
+expectedprdend			=0
+
+[BASE-BSP-SD-SOCKET-DRIVER-0020-001-DriverOpen_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0020-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0020-001-CardP_command04]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-SOCKET-DRIVER-0020-001-AdjustPartialRead_command05]
+prdstart			=0
+prdend				=0xFFFFFFFF
+expectedprdstart		=0
+expectedprdend			=512
+
+[BASE-BSP-SD-SOCKET-DRIVER-0021-001-DriverOpen_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0021-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0021-001-CardP_command04]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-SOCKET-DRIVER-0021-001-AdjustPartialRead_command05]
+prdstart			=512
+prdend				=512
+expectedprdstart		=512
+expectedprdend			=1024
+
+[BASE-BSP-SD-SOCKET-DRIVER-0022-001-DriverOpen_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0022-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0022-001-CardP_command04]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-SOCKET-DRIVER-0022-001-AdjustPartialRead_command05]
+prdstart			=512
+prdend				=0
+expectedprdstart		=512
+expectedprdend			=1024
+
+[BASE-BSP-SD-SOCKET-DRIVER-0023-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0023-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0023-001-PrepareStore_command03]
+newpassword			=thepasswd
+oldpassword			=thepasswd
+busnum				={cardinfo,cardnumber}
+prepstorefn			=EPasswordLock
+
+[BASE-BSP-SD-SOCKET-DRIVER-0024-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0024-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0024-001-PrepareStore_command03]
+newpassword			=thepasswd
+oldpassword			=thepasswd
+busnum				={cardinfo,cardnumber}
+prepstorefn			=EPasswordUnlock
+
+[BASE-BSP-SD-SOCKET-DRIVER-0025-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0025-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0025-001-PrepareStore_command03]
+newpassword			=
+oldpassword			=thepasswd
+busnum				={cardinfo,cardnumber}
+prepstorefn			=EPasswordLock
+
+[BASE-BSP-SD-SOCKET-DRIVER-0026-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0026-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0026-001-PrepareStore_command03]
+newpassword			=thepasswd
+oldpassword			=
+busnum				={cardinfo,cardnumber}
+prepstorefn			=EPasswordClear
+
+[BASE-BSP-SD-SOCKET-DRIVER-0027-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0027-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0027-001-PrepareStore_command03]
+newpassword			=thepasswd
+oldpassword			=
+busnum				={cardinfo,cardnumber}
+prepstorefn			=EPasswordUnlock
+
+[BASE-BSP-SD-SOCKET-DRIVER-0028-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0028-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0028-001-iStandby_Get_command03]
+standby				={mediastate,standbymode}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0029-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0029-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-SOCKET-DRIVER-0029-001-iType_Get_command03]
+type				={mediastate,bustype}
+
+[BASE-BSP-SD-SOCKET-DRIVER-0030-001-UnLoadDriver_command02]
+LDD				={logicaldevice,lddname}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-SD-STACK-DRIVER-MANUAL.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,81 @@
+[include]
+file1				=\base\mmcsd\t_sd.ini
+file2				=\base\t_prompt.ini
+
+[mmcsdsession1]
+name=mmcsdsession1
+
+[mmcsdstack1]
+name=mmcsdstack1
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0001-001-LoadDriver_command02]
+LDD				={logicaldevice,lddname}
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0002-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0002-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0002-001-PromptUser_command03]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0002-001-HasCardsPresent_command04]
+cardspresent			=TRUE
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0003-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0003-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0003-001-PromptUser_command04]
+message				=Ensure the Card is removed and reinserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0004-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0004-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0004-001-PromptUser_command04]
+message				=Ensure the Card is removed and reinserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0005-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0005-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0005-001-PromptUser_command03]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0005-001-HasCardsPresent_command04]
+cardspresent			=TRUE
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0005-001-PromptUser_command05]
+message				=Ensure the Card is removed from the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0005-001-HasCardsPresent_command06]
+cardspresent			=FALSE
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0005-001-PromptUser_command07]
+message				=Ensure the Card is inserted in the Slot then Press '0'
+keyCode				={promptMessage,keyCode}
+delay				={promptMessage,delay}
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0005-001-HasCardsPresent_command08]
+cardspresent			=TRUE
+
+[BASE-BSP-SD-DRIVER-MANUALStack-0006-001-UnloadDriver_command02]
+LDD				={logicaldevice,lddname}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/BASE-BSP-SD-STACK-DRIVER.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,643 @@
+[include]
+file1				=\base\mmcsd\t_sd.ini
+
+[mmcsdsession1]
+name=mmcsdsession1
+
+[mmcsdstack1]
+name=mmcsdstack1
+
+[mmcsdsocket1]
+name=mmcsdsocket1
+
+[mmcsdpsu1]
+name=mmcsdpsu1
+
+[BASE-BSP-SD-STACK-DRIVER-0001-001-LoadDriver_command02]
+LDD				={logicaldevice,lddname}
+
+[BASE-BSP-SD-STACK-DRIVER-0002-001-LoadDriver_command02]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0002-001-NewL_command03]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0002-001-CardP_command04]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0002-001-iState_Get_command05]
+state				={stacktests,expectedstateoff}
+
+[BASE-BSP-SD-STACK-DRIVER-0002-001-VccState_command06]
+expectedvccstate		=EDPsuOff
+
+[BASE-BSP-SD-STACK-DRIVER-0002-001-SetState_command07]
+psustate			=0
+expectedpsustate		=0
+
+[BASE-BSP-SD-STACK-DRIVER-0002-001-VccState_command08]
+expectedvccstate		=EDPsuOff
+
+[BASE-BSP-SD-STACK-DRIVER-0002-001-iState_Get_command09]
+state				={stacktests,expectedstateoff}
+
+[BASE-BSP-SD-STACK-DRIVER-0002-001-iState_Get_command11]
+state				={stacktests,expectedstateon}
+
+[BASE-BSP-SD-STACK-DRIVER-0002-001-VccState_command12]
+expectedvccstate		=EDPsuOnFull
+
+[BASE-BSP-SD-STACK-DRIVER-0003-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0003-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0003-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0003-001-WritePasswordStore_command04]
+password			=foobar11
+
+[BASE-BSP-SD-STACK-DRIVER-0003-001-ReadPasswordStore_command05]
+password			=foobar11
+
+[BASE-BSP-SD-STACK-DRIVER-0003-001-WritePasswordStore_command06]
+password			=foobar12
+
+[BASE-BSP-SD-STACK-DRIVER-0003-001-ReadPasswordStore_command07]
+password			=foobar12
+
+[BASE-BSP-SD-STACK-DRIVER-0004-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0004-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0004-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0004-001-WriteSector_command04]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0004-001-ReadSector_command05]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0004-001-WriteSector_command06]
+sectornumber 			=13
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0004-001-ReadSector_command07]
+sectornumber 			=13
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0004-001-WriteSector_command08]
+sectornumber 			=14
+sectortext			=!--zyxwvutsrqponmlkjihgfedcba--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0004-001-ReadSector_command09]
+sectornumber 			=14
+sectortext			=!--zyxwvutsrqponmlkjihgfedcba--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0005-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0005-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0005-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0005-001-WriteSector_command04]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0005-001-WriteSector_command05]
+sectornumber 			=13
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0005-001-WriteSector_command06]
+sectornumber 			=13
+sectortext			=!--zyxwvutsrqponmlkjihgfedcba--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0005-001-ReadSector_command07]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0005-001-ReadSector_command08]
+sectornumber 			=13
+sectortext			=!--zyxwvutsrqponmlkjihgfedcba--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0006-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0006-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0006-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0006-001-WriteSector_command04]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0006-001-WriteSector_command05]
+sectornumber 			=13
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0006-001-ReadSector_command06]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0006-001-ReadSector_command07]
+sectornumber 			=13
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0006-001-ReadSector_command08]
+sectornumber 			=13
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0007-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0007-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0007-001-CardP_command03]
+cardnumber			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0007-001-AdjustPartialRead_command04]
+prdstart			={partialreadinfo,prdstart1}
+prdend				={partialreadinfo,prdend1}
+expectedprdstart		={partialreadinfo,expectedprdstart1}
+expectedprdend			={partialreadinfo,expectedprdend1}
+
+[BASE-BSP-SD-STACK-DRIVER-0007-001-AdjustPartialRead_command05]
+prdstart			={partialreadinfo,prdstart2}
+prdend				={partialreadinfo,prdend2}
+expectedprdstart		={partialreadinfo,expectedprdstart2}
+expectedprdend			={partialreadinfo,expectedprdend2}
+
+[BASE-BSP-SD-STACK-DRIVER-0007-001-AdjustPartialRead_command06]
+prdstart			={partialreadinfo,prdstart3}
+prdend				={partialreadinfo,prdend3}
+expectedprdstart		={partialreadinfo,expectedprdstart3}
+expectedprdend			={partialreadinfo,expectedprdend3}
+
+[BASE-BSP-SD-STACK-DRIVER-0007-001-AdjustPartialRead_command07]
+prdstart			={partialreadinfo,prdstart4}
+prdend				={partialreadinfo,prdend4}
+expectedprdstart		={partialreadinfo,expectedprdstart4}
+expectedprdend			={partialreadinfo,expectedprdend4}
+
+[BASE-BSP-SD-STACK-DRIVER-0008-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0008-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0008-001-HasSessionsQueued_command03]
+sessionsqueued			=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0008-001-CardP_command04]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0008-001-WriteSector_command05]
+sectornumber 			=7
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0008-001-HasSessionsQueued_command06]
+sessionsqueued			=TRUE
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command03]
+effectivemodes			=0x11CFF
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command04]
+emfunctionid			=EEffectiveModesRemoveMode
+emdata 				=1
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command05]
+effectivemodes			=0x11CFE
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command06]
+emfunctionid			=EEffectiveModesSetBusClockInKhz
+emdata 				=80
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command07]
+effectivemodes			=0x11CFE
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command08]
+emfunctionid			=EEffectiveModesSetBusyTimeOutInMcs
+emdata 				=1
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command09]
+effectivemodes			=0x11CFE
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command10]
+emfunctionid			=EEffectiveModesSetCRCRetries
+emdata 				=1
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command11]
+effectivemodes			=0x11CFE
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command12]
+emfunctionid			=EEffectiveModesSetDataTimeOutInMcs
+emdata 				=1
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command13]
+effectivemodes			=0x11CFE
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command14]
+emfunctionid			=EEffectiveModesSetMode
+emdata 				=1
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command15]
+effectivemodes			=0x31411CFF
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command16]
+emfunctionid			=EEffectiveModesSetOpCondBusyTimeout
+emdata 				=1
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command17]
+effectivemodes			=0x71411CFF
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command18]
+emfunctionid			=EEffectiveModesSetPollAttempts
+emdata 				=1
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command19]
+effectivemodes			=0x71511CFF
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command20]
+emfunctionid			=EEffectiveModesSetResponseTimeOutInTicks
+emdata 				=1
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command21]
+effectivemodes			=0x79511CFF
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command22]
+emfunctionid			=EEffectiveModesSetTicksClockIn
+emdata 				=1
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command23]
+effectivemodes			=0x7B511cff
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command24]
+emfunctionid			=EEffectiveModesSetTicksClockOut
+emdata 				=1
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command25]
+effectivemodes			=0x7f511CFF
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-AlterEffectiveModes_command26]
+emfunctionid			=EEffectiveModesSetTimeOutRetries
+emdata 				=1
+
+[BASE-BSP-SD-STACK-DRIVER-0009-001-EffectiveModes_command27]
+effectivemodes			=0x7f711CFF
+
+[BASE-BSP-SD-STACK-DRIVER-0010-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0010-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0010-001-CardP_command03]
+cardnumber 			=-1
+isnull				=TRUE
+
+[BASE-BSP-SD-STACK-DRIVER-0010-001-WriteSector_command04]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0010-001-CardP_command05]
+cardnumber 			=99
+isnull				=TRUE
+
+[BASE-BSP-SD-STACK-DRIVER-0010-001-WriteSector_command06]
+sectornumber 			=12
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0010-001-CardP_command07]
+cardnumber			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0010-001-WriteSector_command08]
+sectornumber 			=13
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0011-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0011-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0011-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0012-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0012-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0012-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0012-001-WriteSector_command04]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0012-001-ReadSector_command05]
+sectornumber 			=12
+sectortext			=!--abcdefghijklmnopqrstuvwxyz--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0012-001-WriteSector_command06]
+sectornumber 			=13
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0012-001-ReadSector_command07]
+sectornumber 			=13
+sectortext			=!--01234567890123456789012345--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0012-001-WriteSector_command08]
+sectornumber 			=14
+sectortext			=!--zyxwvutsrqponmlkjihgfedcba--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0012-001-ReadSector_command09]
+sectornumber 			=14
+sectortext			=!--zyxwvutsrqponmlkjihgfedcba--!
+repeats				=16
+
+[BASE-BSP-SD-STACK-DRIVER-0013-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0013-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0013-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0014-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0014-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0014-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0014-001-CardInfo_command04]
+maxreadblocklen			=9
+transferspeed			={cardpdata, transferspeed}
+highcapacity			=0 
+
+[BASE-BSP-SD-STACK-DRIVER-0014-001-CardIsPresent_command05]
+expectedispresent		=TRUE
+
+[BASE-BSP-SD-STACK-DRIVER-0014-001-CardIsReady_command06]
+expectedisready			=TRUE
+
+[BASE-BSP-SD-STACK-DRIVER-0014-001-CardIsLocked_command07]
+expectedislocked		=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0015-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0015-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0015-001-CardP_command03]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0015-001-CardP_command04]
+cardnumber 			=-1
+isnull				=TRUE
+
+[BASE-BSP-SD-STACK-DRIVER-0015-001-CardP_command05]
+cardnumber 			=5
+isnull				=TRUE
+
+[BASE-BSP-SD-STACK-DRIVER-0015-001-CardP_command06]
+cardnumber 			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0016-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0016-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0016-001-MaxCardsInStack_command03]
+maxcards 			={devinfo,maxcards}
+
+[BASE-BSP-SD-STACK-DRIVER-0017-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0017-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0017-001-Socket_command03]
+isnull				=FALSE
+socketwrappername		=mmcsdsocket1
+
+[BASE-BSP-SD-STACK-DRIVER-0018-001-DriverOpen_command01
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0018-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0018-001-InitStackInProgress_command03]
+inprogress			=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0019-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0019-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0019-001-BufferInfo_command03]
+expectedBuflen			={bufferinfo,buflen}
+expectedMinorBuflen 		=512		
+
+[BASE-BSP-SD-STACK-DRIVER-0020-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0020-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0020-001-ProgramPeriodMs_command03]
+programperiodms			={devinfo,programperiodms}
+
+[BASE-BSP-SD-STACK-DRIVER-0021-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0021-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0021-001-GetBufferInfo_command03]
+expectedBuflen			={bufferinfo,buflen}
+
+[BASE-BSP-SD-STACK-DRIVER-0022-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0022-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0022-001-MachineInfo_command03]
+expectedtotalsockets		={machineinfo,expectedtotalsockets}
+expectedtotalmediachanges	={machineinfo,expectedtotalmediachanges}
+expectedtotalprimarysupplies	={machineinfo,expectedtotalprimarysupplies}
+expectedbasebusnumber		={machineinfo,expectedbasebusnumber}
+hasflagsupportsspimode		={machineinfo,hasflagsupportsspimode}
+hasflagsupportsdoublebuffering	={machineinfo,hasflagsupportsdoublebuffering}
+hasflagsupportsr7		={machineinfo,hasflagsupportsr7}
+hasflagmaxtransferlength256k	={machineinfo,hasflagmaxtransferlength256k}
+hasflagmaxtransferlength512k	={machineinfo,hasflagmaxtransferlength512k}
+hasflagmaxtransferlength1m	={machineinfo,hasflagmaxtransferlength1m}
+hasflagmaxtransferlength2m	={machineinfo,hasflagmaxtransferlength2m}
+hasflagmaxtransferlength4m	={machineinfo,hasflagmaxtransferlength4m}
+hasflagmaxtransferlength8m	={machineinfo,hasflagmaxtransferlength8m}
+hasflagmaxtransferlength16m	={machineinfo,hasflagmaxtransferlength16m}
+expectedspimode			={machineinfo,expectedspimode}
+hasflagdma8bitaddressing	={machineinfo,hasflagdma8bitaddressing}
+hasflagdma16bitaddressing	={machineinfo,hasflagdma16bitaddressing}
+hasflagdma32bitaddressing	={machineinfo,hasflagdma32bitaddressing}
+hasflagdma64bitaddressing	={machineinfo,hasflagdma64bitaddressing}
+hasflagsupportsdma		={machineinfo,hasflagsupportsdma}
+
+[BASE-BSP-SD-STACK-DRIVER-0023-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0023-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0024-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0024-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0025-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0025-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0025-001-CardP_command03]
+cardnumber			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0025-001-AdjustPartialRead_command04]
+prdstart			=0xFFFFFFFE
+prdend				=0xFFFFFFFF
+expectedprdstart		=0xFFFFFE00
+expectedprdend			=0
+
+[BASE-BSP-SD-STACK-DRIVER-0026-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0026-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0026-001-CardP_command03]
+cardnumber			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0026-001-AdjustPartialRead_command04]
+prdstart			=0
+prdend				=0xFFFFFFFF
+expectedprdstart		=0
+expectedprdend			=512
+
+[BASE-BSP-SD-STACK-DRIVER-0027-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0027-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0027-001-CardP_command03]
+cardnumber			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0027-001-AdjustPartialRead_command04]
+prdstart			=512
+prdend				=512
+expectedprdstart		=512
+expectedprdend			=1024
+
+[BASE-BSP-SD-STACK-DRIVER-0028-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0028-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0028-001-CardP_command03]
+cardnumber			={cardinfo,cardnumber}
+isnull				=FALSE
+
+[BASE-BSP-SD-STACK-DRIVER-0028-001-AdjustPartialRead_command04]
+prdstart			=512
+prdend				=0
+expectedprdstart		=512
+expectedprdend			=1024
+
+[BASE-BSP-SD-STACK-DRIVER-0029-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0029-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0030-001-DriverOpen_command01]
+stacknumber			={stack,stackno}
+
+[BASE-BSP-SD-STACK-DRIVER-0030-001-NewL_command02]
+sessionwrappername		=mmcsdsession1
+
+[BASE-BSP-SD-STACK-DRIVER-0031-001-UnloadDriver_command03]
+LDD				={logicaldevice,lddname}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/devlon52/mmc/t_mmc.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,137 @@
+# This is the global environment file to configure the MMC/SD on device specific
+# The current default MMC/SD card values are configured for Devlon52 device.
+# Licencees may need to configure below values to specific devices 
+
+#Logical Device Driver developed to test MMC/SD controller 
+[logicaldevice]
+lddname			=D_MMCSDIF
+
+[stack]
+# Stack Number- Symbian Stack supports only Single cards at a time
+stackno			=0
+
+[cardinfo]
+# Card Number
+cardnumber		=0
+
+[psuinfo]
+# Power Supply information supported by the platform
+
+# OCR from 3.1V to 3.2V (H4 voltage is 3.11V)
+#voltage in OCR Register 32 Bit Format (Hexa Decimal)
+supported_voltage	=0x00040000
+
+#Current in MicroAmps
+current			=0
+
+#Voltage Interval
+voltageinterval		=0
+
+#Voltage Check
+voltagecheck		=EDPsuChkComparator
+
+#Inactivity count
+inactivitycount		=0
+
+#Notlockedcount
+notlockedcount		=0
+#Timeout for PowerDown in seconds
+psuinactivitytimeOut	=4
+
+#Bus not locked timeout period, in seconds
+notlockedtimeOut	=0
+
+#Lock State
+lockstate		=EFalse
+
+#Psu OFF
+psuoff			=ETrue
+[busstate]
+cardbusstate		=EBusOff
+
+[powersupply]
+#power supply unit number ##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+unit			=0
+
+#Psu current Limit IsSafe?##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+curlimit		=0
+
+#power supply state
+initvccstate		=EDPsuOff
+
+[mediachange]
+#Media Change Number ##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+mcID			=0
+[mediastate]
+#Initial Media State
+initialstate		=EClosed
+
+#Force Media Change support
+forcedstate		=EOpened
+#Standbymode ON/OFF
+standbymode 		=EFalse
+
+#Replay Event Counts
+eventcount		=0
+
+#Bus type
+bustype			=0
+[bufferinfo]
+#buflen
+buflen			=69632
+
+[machineinfo]
+#machineinfo
+expectedtotalsockets			=1
+expectedtotalmediachanges		=0
+expectedtotalprimarysupplies	=0
+expectedbasebusnumber			=0
+expectedspimode				=FALSE
+hasflagsupportsspimode			=FALSE
+hasflagsupportsdoublebuffering		=FALSE
+hasflagsupportsr7			=FALSE
+hasflagmaxtransferlength256k		=FALSE
+hasflagmaxtransferlength512k		=FALSE
+hasflagmaxtransferlength1m		=FALSE
+hasflagmaxtransferlength2m		=FALSE
+hasflagmaxtransferlength4m		=FALSE
+hasflagmaxtransferlength8m		=FALSE
+hasflagmaxtransferlength16m		=FALSE
+hasflagdma8bitaddressing		=FALSE
+hasflagdma16bitaddressing		=TRUE
+hasflagdma32bitaddressing		=FALSE
+hasflagdma64bitaddressing		=FALSE
+hasflagsupportsdma			=TRUE
+
+[partialreadinfo]
+prdstart1				=0
+prdend1					=512
+expectedprdstart1			=0
+expectedprdend1				=512
+prdstart2				=0
+prdend2					=4096
+expectedprdstart2			=0
+expectedprdend2				=512
+prdstart3				=0
+prdend3					=256
+expectedprdstart3		=0
+expectedprdend3			=512
+prdstart4				=127
+prdend4					=719
+expectedprdstart4		=0
+expectedprdend4			=512
+
+
+[stacktests]
+#stacktests
+expectedasyncerror0004			=1
+expectedstateoff			=EPBusOff
+expectedstateon				=EPBusOn
+
+[devinfo]
+maxcards				=1
+programperiodms				=1
+
+[cardpdata]
+transferspeed				=42
+readcurrentinmilliamps 			=45
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/devlon52/sd/t_sd.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,140 @@
+# This is the global environment file to configure the MMC/SD on device specific
+# The current default MMC/SD card values are configured for Devlon52 device.
+# Licencees may need to configure below values to specific devices 
+
+#Logical Device Driver developed to test MMC/SD controller 
+[logicaldevice]
+lddname			=D_MMCSDIF
+
+[stack]
+# Stack Number- Symbian Stack supports only Single cards at a time
+stackno			=0
+
+[cardinfo]
+# Card Number
+cardnumber		=0
+
+[psuinfo]
+# Power Supply information supported by the platform
+
+# OCR from 3.1V to 3.2V (H4 voltage is 3.11V)
+#voltage in OCR Register 32 Bit Format (Hexa Decimal)
+supported_voltage	=0x00040000
+
+#Current in MicroAmps
+current			=0
+
+#Voltage Interval
+voltageinterval		=0
+
+#Voltage Check
+voltagecheck		=EDPsuChkComparator
+
+#Inactivity count
+inactivitycount		=0
+
+#Notlockedcount
+notlockedcount		=0
+#Timeout for PowerDown in seconds
+psuinactivitytimeOut	=4
+
+#Bus not locked timeout period, in seconds
+notlockedtimeOut	=0
+#Lock State
+lockstate		=EFalse
+
+#Psu OFF
+psuoff			=ETrue
+
+[busstate]
+cardbusstate		=EBusOff			
+[powersupply]
+#power supply unit number ##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+unit			=0
+
+#Psu current Limit IsSafe? ##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+curlimit		=0
+
+
+#power supply state
+initvccstate		=EDPsuOff
+
+[mediachange]
+#Media Change Number ##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+mcID			=0
+[mediastate]
+#Initial Media State
+initialstate		=EClosed
+
+#Force Media Change support
+forcedstate		=EOpened
+#Standbymode ON/OFF
+standbymode 		=EFalse
+
+#Replay Event Counts
+eventcount		=0
+
+#Bus type
+bustype			=0
+
+[bufferinfo]
+#buflen
+buflen			=69632
+
+[machineinfo]
+#machineinfo
+expectedtotalsockets			=1
+expectedtotalmediachanges		=0
+expectedtotalprimarysupplies		=0
+expectedbasebusnumber			=0
+expectedspimode				=FALSE
+hasflagsupportsspimode			=FALSE
+hasflagsupportsdoublebuffering		=FALSE
+hasflagsupportsr7			=FALSE
+hasflagmaxtransferlength256k		=FALSE
+hasflagmaxtransferlength512k		=FALSE
+hasflagmaxtransferlength1m		=FALSE
+hasflagmaxtransferlength2m		=FALSE
+hasflagmaxtransferlength4m		=FALSE
+hasflagmaxtransferlength8m		=FALSE
+hasflagmaxtransferlength16m		=FALSE
+hasflagdma8bitaddressing		=FALSE
+hasflagdma16bitaddressing		=TRUE
+hasflagdma32bitaddressing		=FALSE
+hasflagdma64bitaddressing		=FALSE
+hasflagsupportsdma			=TRUE
+
+[partialreadinfo]
+#partialreadinfo
+prdstart1				=0
+prdend1					=512
+expectedprdstart1			=0
+expectedprdend1				=1
+prdstart2				=0
+prdend2					=4096
+expectedprdstart2			=0
+expectedprdend2				=512
+prdstart3				=0
+prdend3					=256
+expectedprdstart3		=0
+expectedprdend3			=512
+
+prdstart4				=127
+prdend4					=719
+expectedprdstart4		=0
+expectedprdend4			=512
+
+
+[stacktests]
+#stacktests
+expectedasyncerror0004			=1
+expectedstateoff			=EPBusOff
+expectedstateon				=EPBusOn
+
+[devinfo]
+maxcards				=1
+programperiodms				=1
+
+[cardpdata]
+transferspeed				=90
+readcurrentinmilliamps 			=45
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/devlon52/t_mmcsd.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,6 @@
+BASE-BSP-MMC-DRIVER-MANUALStack-0004
+BASE-BSP-SD-DRIVER-MANUALStack-0004
+BASE-BSP-MMC-SOCKET-DRIVER-0011
+BASE-BSP-SD-SOCKET-DRIVER-0011
+BASE-BSP-MMC-SOCKET-DRIVER-0012
+BASE-BSP-SD-SOCKET-DRIVER-0012
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/h4hrp/mmc/t_mmc.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,141 @@
+# This is the global environment file to configure the MMC/SD on device specific
+# The current MMC/SD card values are configured for TI OMAP 2420 (H4) hardware.
+# Licencees may need to configure below values to specific devices 
+
+#Logical Device Driver developed to test MMC/SD controller 
+[logicaldevice]
+lddname			=D_MMCSDIF
+
+[stack]
+# Stack Number- Symbian Stack supports only Single cards at a time
+stackno			=0
+
+[cardinfo]
+# Card Number
+cardnumber		=0
+
+[psuinfo]
+# Power Supply information supported by the platform
+
+# OCR from 3.1V to 3.2V (H4 voltage is 3.11V)
+#voltage in OCR Register 32 Bit Format (Hexa Decimal)
+supported_voltage	=0x00080000
+
+#Current in MicroAmps
+current			=0
+
+#Voltage Interval
+voltageinterval		=0
+
+#Voltage Check
+voltagecheck		=EDPsuChkComparator
+
+#Inactivity count
+inactivitycount		=0
+
+#Notlockedcount
+notlockedcount		=0
+
+#Timeout for PowerDown in seconds
+psuinactivitytimeOut	=1
+
+#Bus not locked timeout period, in seconds
+notlockedtimeOut	=3
+
+#Lock State
+lockstate		=EFalse
+
+#Psu OFF
+psuoff			=ETrue
+[busstate]
+cardbusstate		=EBusOff
+
+[powersupply]
+#power supply unit number ##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+unit			=0
+
+#Psu current Limit IsSafe?##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+curlimit		=0
+
+#power supply state
+initvccstate		=EDPsuOff
+
+[mediachange]
+#Media Change Number ##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+mcID			=0
+
+[mediastate]
+#Initial Media State
+initialstate		=EClosed
+
+#Force Media Change support
+forcedstate		=EClosed
+
+#Standbymode ON/OFF
+standbymode 		=EFalse
+
+#Replay Event Counts
+eventcount		=0
+
+#Bus type
+bustype			=0
+
+[bufferinfo]
+#buflen
+buflen			=135168
+
+[machineinfo]
+#machineinfo
+expectedtotalsockets			=1
+expectedtotalmediachanges		=0
+expectedtotalprimarysupplies		=0
+expectedbasebusnumber			=0
+expectedspimode				=FALSE
+hasflagsupportsspimode			=FALSE
+hasflagsupportsdoublebuffering		=TRUE
+hasflagsupportsr7			=FALSE
+hasflagmaxtransferlength256k		=TRUE
+hasflagmaxtransferlength512k		=TRUE
+hasflagmaxtransferlength1m		=TRUE
+hasflagmaxtransferlength2m		=FALSE
+hasflagmaxtransferlength4m		=TRUE
+hasflagmaxtransferlength8m		=TRUE
+hasflagmaxtransferlength16m		=TRUE
+hasflagdma8bitaddressing		=FALSE
+hasflagdma16bitaddressing		=TRUE
+hasflagdma32bitaddressing		=FALSE
+hasflagdma64bitaddressing		=FALSE
+hasflagsupportsdma			=TRUE
+
+[partialreadinfo]
+prdstart1				=0
+prdend1					=512
+expectedprdstart1			=0
+expectedprdend1				=512
+prdstart2				=0
+prdend2					=4096
+expectedprdstart2		=0
+expectedprdend2			=512
+prdstart3				=0
+prdend3					=256
+expectedprdstart3		=0
+expectedprdend3			=512
+prdstart4				=127
+prdend4					=719
+expectedprdstart4		=0
+expectedprdend4			=512
+
+
+[stacktests]
+#stacktests
+expectedasyncerror0004			=1
+expectedstateoff			=EPBusOff
+expectedstateon				=EPBusOn
+
+[devinfo]
+maxcards				=1
+programperiodms				=1
+
+[cardpdata]
+transferspeed				=42
+readcurrentinmilliamps 			=45
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/h4hrp/sd/t_sd.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,145 @@
+# This is the global environment file to configure the MMC/SD on device specific
+# The current default MMC/SD card values are configured for TI OMAP 2420 (H4) hardware.
+# Licencees may need to configure below values to specific devices 
+
+#Logical Device Driver developed to test MMC/SD controller 
+[logicaldevice]
+lddname			=D_MMCSDIF
+
+[stack]
+# Stack Number- Symbian Stack supports only Single cards at a time
+stackno			=0
+
+[cardinfo]
+# Card Number
+cardnumber		=0
+
+[psuinfo]
+# Power Supply information supported by the platform
+
+#OCR from 3.1V to 3.2V (H4 voltage is 3.11V)
+#voltage in OCR Register 32 Bit Format (Hexa Decimal)
+supported_voltage	=0x00080000
+
+#Current in MicroAmps
+current			=0
+
+#Voltage Interval
+voltageinterval		=0
+
+#Voltage Check
+voltagecheck		=EDPsuChkComparator
+
+#Inactivity count
+inactivitycount		=0
+
+#Notlockedcount
+notlockedcount		=0
+
+#Timeout for PowerDown in seconds
+psuinactivitytimeOut	=1
+
+#Bus not locked timeout period, in seconds
+notlockedtimeOut	=3
+
+#Lock State
+lockstate		=EFalse
+
+#Psu OFF
+psuoff			=ETrue
+
+[busstate]
+cardbusstate		=EBusOff			
+[powersupply]
+#power supply unit number ##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+unit			=0
+
+#Psu current Limit IsSafe? ##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+curlimit		=0
+
+
+#power supply state
+initvccstate		=EDPsuOff
+
+[mediachange]
+#Media Change Number ##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+mcID			=0
+
+[mediastate]
+#Initial Media State
+initialstate		=EClosed
+
+#Force Media Change support
+forcedstate		=EClosed
+
+#Standbymode ON/OFF
+standbymode 		=EFalse
+
+#Replay Event Counts
+eventcount		=0
+
+#Bus type
+bustype			=0
+[bufferinfo]
+#buflen
+buflen			=135168
+
+[machineinfo]
+#machineinfo
+expectedtotalsockets			=1
+expectedtotalmediachanges		=0
+expectedtotalprimarysupplies		=0
+expectedbasebusnumber			=0
+expectedspimode				=FALSE
+hasflagsupportsspimode			=FALSE
+hasflagsupportsdoublebuffering		=TRUE
+hasflagsupportsr7			=FALSE
+hasflagmaxtransferlength256k		=TRUE
+hasflagmaxtransferlength512k		=TRUE
+hasflagmaxtransferlength1m		=TRUE
+hasflagmaxtransferlength2m		=FALSE
+hasflagmaxtransferlength4m		=TRUE
+hasflagmaxtransferlength8m		=TRUE
+hasflagmaxtransferlength16m		=TRUE
+hasflagdma8bitaddressing		=FALSE
+hasflagdma16bitaddressing		=TRUE
+hasflagdma32bitaddressing		=FALSE
+hasflagdma64bitaddressing		=FALSE
+hasflagsupportsdma			=TRUE
+
+[partialreadinfo]
+#partialreadinfo
+prdstart1				=0
+prdend1					=512
+expectedprdstart1		=0
+expectedprdend1			=512
+
+prdstart2				=0
+prdend2					=4096
+expectedprdstart2			=0
+expectedprdend2				=512
+
+prdstart3				=0
+prdend3					=256
+expectedprdstart3		=0
+expectedprdend3			=512
+
+prdstart4				=127
+prdend4					=719
+expectedprdstart4		=0
+expectedprdend4			=512
+
+
+[stacktests]
+#stacktests
+expectedasyncerror0004			=1
+expectedstateoff			=EPBusOff
+expectedstateon				=EPBusOn
+
+[devinfo]
+maxcards				=1
+programperiodms				=1
+
+[cardpdata]
+transferspeed				=50
+readcurrentinmilliamps 			=45
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/h4hrp/t_mmcsd.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,6 @@
+BASE-BSP-MMC-DRIVER-MANUALStack-0003
+BASE-BSP-SD-DRIVER-MANUALStack-0003
+BASE-BSP-MMC-SOCKET-DRIVER-0010
+BASE-BSP-SD-SOCKET-DRIVER-0010
+BASE-BSP-MMC-SOCKET-DRIVER-0012
+BASE-BSP-SD-SOCKET-DRIVER-0012
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/h6hrp/mmc/t_mmc.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,141 @@
+# This is the global environment file to configure the MMC/SD on device specific
+# The current MMC/SD card values are configured for TI OMAP 2420 (H4) hardware.
+# Licencees may need to configure below values to specific devices 
+
+#Logical Device Driver developed to test MMC/SD controller 
+[logicaldevice]
+lddname			=D_MMCSDIF
+
+[stack]
+# Stack Number- Symbian Stack supports only Single cards at a time
+stackno			=0
+
+[cardinfo]
+# Card Number
+cardnumber		=0
+
+[psuinfo]
+# Power Supply information supported by the platform
+
+# OCR from 3.1V to 3.2V (H4 voltage is 3.11V)
+#voltage in OCR Register 32 Bit Format (Hexa Decimal)
+supported_voltage	=0x00ff8000
+
+#Current in MicroAmps
+current			=0
+
+#Voltage Interval
+voltageinterval		=0
+
+#Voltage Check
+voltagecheck		=EDPsuChkComparator
+
+#Inactivity count
+inactivitycount		=0
+
+#Notlockedcount
+notlockedcount		=0
+
+#Timeout for PowerDown in seconds
+psuinactivitytimeOut	=10
+
+#Bus not locked timeout period, in seconds
+notlockedtimeOut	=10
+
+#Lock State
+lockstate		=EFalse
+
+#Psu OFF
+psuoff			=EFalse
+[busstate]
+cardbusstate		=EBusOn
+
+[powersupply]
+#power supply unit number ##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+unit			=0
+
+#Psu current Limit IsSafe?##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+curlimit		=0
+
+#power supply state
+initvccstate		=EDPsuOff
+
+[mediachange]
+#Media Change Number ##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+mcID			=0
+
+[mediastate]
+#Initial Media State
+initialstate		=EClosed
+
+#Force Media Change support
+forcedstate		=EClosed
+
+#Standbymode ON/OFF
+standbymode 		=EFalse
+
+#Replay Event Counts
+eventcount		=0
+
+#Bus type
+bustype			=0
+
+[bufferinfo]
+#buflen
+buflen			=266240
+
+[machineinfo]
+#machineinfo
+expectedtotalsockets			=1
+expectedtotalmediachanges		=0
+expectedtotalprimarysupplies		=0
+expectedbasebusnumber			=0
+expectedspimode				=FALSE
+hasflagsupportsspimode			=FALSE
+hasflagsupportsdoublebuffering		=FALSE
+hasflagsupportsr7			=TRUE
+hasflagmaxtransferlength256k		=FALSE
+hasflagmaxtransferlength512k		=FALSE
+hasflagmaxtransferlength1m		=FALSE
+hasflagmaxtransferlength2m		=FALSE
+hasflagmaxtransferlength4m		=FALSE
+hasflagmaxtransferlength8m		=FALSE
+hasflagmaxtransferlength16m		=FALSE
+hasflagdma8bitaddressing		=FALSE
+hasflagdma16bitaddressing		=FALSE
+hasflagdma32bitaddressing		=FALSE
+hasflagdma64bitaddressing		=FALSE
+hasflagsupportsdma			=FALSE
+
+[partialreadinfo]
+prdstart1				=0
+prdend1					=512
+expectedprdstart1			=0
+expectedprdend1				=512
+prdstart2				=0
+prdend2					=4096
+expectedprdstart2		=0
+expectedprdend2			=512
+prdstart3				=0
+prdend3					=256
+expectedprdstart3		=0
+expectedprdend3			=512
+prdstart4				=127
+prdend4					=719
+expectedprdstart4		=0
+expectedprdend4			=512
+
+
+[stacktests]
+#stacktests
+expectedasyncerror0004			=1
+expectedstateoff			=EPBusOff
+expectedstateon				=EPBusOn
+
+[devinfo]
+maxcards				=1
+programperiodms				=1
+
+[cardpdata]
+transferspeed				=42
+readcurrentinmilliamps 			=45
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/h6hrp/sd/t_sd.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,145 @@
+# This is the global environment file to configure the MMC/SD on device specific
+# The current default MMC/SD card values are configured for TI OMAP 2420 (H4) hardware.
+# Licencees may need to configure below values to specific devices 
+
+#Logical Device Driver developed to test MMC/SD controller 
+[logicaldevice]
+lddname			=D_MMCSDIF
+
+[stack]
+# Stack Number- Symbian Stack supports only Single cards at a time
+stackno			=0
+
+[cardinfo]
+# Card Number
+cardnumber		=0
+
+[psuinfo]
+# Power Supply information supported by the platform
+
+#OCR from 3.1V to 3.2V (H4 voltage is 3.11V)
+#voltage in OCR Register 32 Bit Format (Hexa Decimal)
+supported_voltage	=0x00ff8000
+
+#Current in MicroAmps
+current			=0
+
+#Voltage Interval
+voltageinterval		=0
+
+#Voltage Check
+voltagecheck		=EDPsuChkComparator
+
+#Inactivity count
+inactivitycount		=0
+
+#Notlockedcount
+notlockedcount		=0
+
+#Timeout for PowerDown in seconds
+psuinactivitytimeOut	=10
+
+#Bus not locked timeout period, in seconds
+notlockedtimeOut	=10
+
+#Lock State
+lockstate		=EFalse
+
+#Psu OFF
+psuoff			=ETrue
+
+[busstate]
+cardbusstate		=EBusOff			
+[powersupply]
+#power supply unit number ##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+unit			=0
+
+#Psu current Limit IsSafe? ##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+curlimit		=0
+
+
+#power supply state
+initvccstate		=EDPsuOff
+
+[mediachange]
+#Media Change Number ##Note## OMAP2420 Platform Not supported,Value is Reserved for other platforms
+mcID			=0
+
+[mediastate]
+#Initial Media State
+initialstate		=EClosed
+
+#Force Media Change support
+forcedstate		=EClosed
+
+#Standbymode ON/OFF
+standbymode 		=EFalse
+
+#Replay Event Counts
+eventcount		=0
+
+#Bus type
+bustype			=0
+[bufferinfo]
+#buflen
+buflen			=266240
+
+[machineinfo]
+#machineinfo
+expectedtotalsockets			=1
+expectedtotalmediachanges		=0
+expectedtotalprimarysupplies		=0
+expectedbasebusnumber			=0
+expectedspimode				=FALSE
+hasflagsupportsspimode			=FALSE
+hasflagsupportsdoublebuffering		=FALSE
+hasflagsupportsr7			=TRUE
+hasflagmaxtransferlength256k		=FALSE
+hasflagmaxtransferlength512k		=FALSE
+hasflagmaxtransferlength1m		=FALSE
+hasflagmaxtransferlength2m		=FALSE
+hasflagmaxtransferlength4m		=FALSE
+hasflagmaxtransferlength8m		=FALSE
+hasflagmaxtransferlength16m		=FALSE
+hasflagdma8bitaddressing		=FALSE
+hasflagdma16bitaddressing		=FALSE
+hasflagdma32bitaddressing		=FALSE
+hasflagdma64bitaddressing		=FALSE
+hasflagsupportsdma			=FALSE
+
+[partialreadinfo]
+#partialreadinfo
+prdstart1				=0
+prdend1					=512
+expectedprdstart1		=0
+expectedprdend1			=512
+
+prdstart2				=0
+prdend2					=4096
+expectedprdstart2			=0
+expectedprdend2				=512
+
+prdstart3				=0
+prdend3					=256
+expectedprdstart3		=0
+expectedprdend3			=512
+
+prdstart4				=127
+prdend4					=719
+expectedprdstart4		=0
+expectedprdend4			=512
+
+
+[stacktests]
+#stacktests
+expectedasyncerror0004			=1
+expectedstateoff			=EPBusOff
+expectedstateon				=EPBusOn
+
+[devinfo]
+maxcards				=1
+programperiodms				=1
+
+[cardpdata]
+transferspeed				=42
+readcurrentinmilliamps 			=45
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/mmc/testdata/h6hrp/t_mmcsd.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,32 @@
+BASE-BSP-MMC-DRIVER-MANUALStack-0003
+BASE-BSP-SD-DRIVER-MANUALStack-0003
+BASE-BSP-MMC-SOCKET-DRIVER-0010
+BASE-BSP-SD-SOCKET-DRIVER-0010
+BASE-BSP-MMC-SOCKET-DRIVER-0012
+BASE-BSP-SD-SOCKET-DRIVER-0012
+
+BASE-BSP-MMC-STACK-DRIVER-0002
+BASE-BSP-MMC-STACK-DRIVER-0004
+BASE-BSP-MMC-STACK-DRIVER-0005
+BASE-BSP-MMC-STACK-DRIVER-0006
+BASE-BSP-MMC-STACK-DRIVER-0008
+BASE-BSP-MMC-STACK-DRIVER-0010
+BASE-BSP-MMC-STACK-DRIVER-0012
+BASE-BSP-MMC-STACK-DRIVER-0024
+
+BASE-BSP-MMC-DRIVER-MANUALSocket-0005
+BASE-BSP-MMC-DRIVER-MANUALSocket-0006
+
+BASE-BSP-SD-STACK-DRIVER-0004
+BASE-BSP-SD-STACK-DRIVER-0005
+BASE-BSP-SD-STACK-DRIVER-0006
+BASE-BSP-SD-STACK-DRIVER-0008
+BASE-BSP-SD-STACK-DRIVER-0010
+BASE-BSP-SD-STACK-DRIVER-0012
+BASE-BSP-SD-STACK-DRIVER-0024
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/group/bld.inf	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,72 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include "../../../group/device.cfg"
+#include "../../../../testdata/bsp/common/group/bld.inf"
+
+PRJ_TESTEXPORTS
+//t_sound.oby											/src/cedar/generic/base/e32/rombuild/t_sound.oby
+t_sound.oby											/sf/os/kernelhwsrv/kernel/eka/rombuild/t_sound.oby
+t_sound.oby											/epoc32/rom/haitests/t_sound.oby
+t_sound.iby											/epoc32/rom/haitests/t_sound.iby
+t_sound_binaries.iby									/epoc32/rom/haitests/t_sound_binaries.iby
+t_sound_testdata.iby									/epoc32/rom/haitests/t_sound_testdata.iby
+
+../pkg/t_sound.bat										z:/base/t_sound.bat
+
+../scripts/base-bsp-sound-driver.script						z:/base/sound/base-bsp-sound-driver.script
+../scripts/base-bsp-sound-driver-automated.script				z:/base/sound/base-bsp-sound-driver-automated.script
+../scripts/base-bsp-sound-driver-manual.script					z:/base/sound/base-bsp-sound-driver-manual.script
+../testdata/base-bsp-sound-driver.ini						z:/base/sound/base-bsp-sound-driver.ini
+
+../../../../testdata/bsp/sound/alaw8bit_mono_8khz_32kb.raw    					z:/base/sound/validation/alaw8bit_mono_8khz_32kb.raw    
+../../../../testdata/bsp/sound/alaw8bit_stereo_24khz_32kb.raw 					z:/base/sound/validation/alaw8bit_stereo_24khz_32kb.raw 
+../../../../testdata/bsp/sound/mulaw8bit_mono_12khz_32kb.raw  					z:/base/sound/validation/mulaw8bit_mono_12khz_32kb.raw  
+../../../../testdata/bsp/sound/mulaw8bit_stereo_32khz_32kb.raw					z:/base/sound/validation/mulaw8bit_stereo_32khz_32kb.raw
+../../../../testdata/bsp/sound/pcm16_mono_11khz_32kb.raw      					z:/base/sound/validation/pcm16_mono_11khz_32kb.raw      
+../../../../testdata/bsp/sound/pcm16_mono_12khz_32kb.raw      					z:/base/sound/validation/pcm16_mono_12khz_32kb.raw      
+../../../../testdata/bsp/sound/pcm16_mono_16khz_32kb.raw      					z:/base/sound/validation/pcm16_mono_16khz_32kb.raw      
+../../../../testdata/bsp/sound/pcm16_mono_22khz_32kb.raw      					z:/base/sound/validation/pcm16_mono_22khz_32kb.raw      
+../../../../testdata/bsp/sound/pcm16_mono_24khz_32kb.raw      					z:/base/sound/validation/pcm16_mono_24khz_32kb.raw      
+../../../../testdata/bsp/sound/pcm16_mono_32khz_32kb.raw      					z:/base/sound/validation/pcm16_mono_32khz_32kb.raw      
+../../../../testdata/bsp/sound/pcm16_mono_44.1khz_32kb.raw    					z:/base/sound/validation/pcm16_mono_44.1khz_32kb.raw    
+../../../../testdata/bsp/sound/pcm16_mono_48khz_32kb.raw      					z:/base/sound/validation/pcm16_mono_48khz_32kb.raw      
+../../../../testdata/bsp/sound/pcm16_mono_8khz_32kb.raw       					z:/base/sound/validation/pcm16_mono_8khz_32kb.raw       
+../../../../testdata/bsp/sound/pcm16_stereo_11khz_32kb.raw    					z:/base/sound/validation/pcm16_stereo_11khz_32kb.raw    
+../../../../testdata/bsp/sound/pcm16_stereo_12khz_32kb.raw    					z:/base/sound/validation/pcm16_stereo_12khz_32kb.raw    
+../../../../testdata/bsp/sound/pcm16_stereo_16khz_32kb.raw    					z:/base/sound/validation/pcm16_stereo_16khz_32kb.raw    
+../../../../testdata/bsp/sound/pcm16_stereo_22khz_32kb.raw    					z:/base/sound/validation/pcm16_stereo_22khz_32kb.raw    
+../../../../testdata/bsp/sound/pcm16_stereo_24khz_32kb.raw    					z:/base/sound/validation/pcm16_stereo_24khz_32kb.raw    
+../../../../testdata/bsp/sound/pcm16_stereo_24khz_320kb.raw    					z:/base/sound/validation/pcm16_stereo_24khz_320kb.raw    
+../../../../testdata/bsp/sound/pcm16_stereo_32khz_32kb.raw    					z:/base/sound/validation/pcm16_stereo_32khz_32kb.raw    
+../../../../testdata/bsp/sound/pcm16_stereo_44.1khz_32kb.raw  					z:/base/sound/validation/pcm16_stereo_44.1khz_32kb.raw  
+../../../../testdata/bsp/sound/pcm16_stereo_48khz_32kb.raw    					z:/base/sound/validation/pcm16_stereo_48khz_32kb.raw    
+../../../../testdata/bsp/sound/pcm16_stereo_8khz_32kb.raw     					z:/base/sound/validation/pcm16_stereo_8khz_32kb.raw     
+../../../../testdata/bsp/sound/pcm8_mono_8khz_32kb.raw     					z:/base/sound/validation/pcm8_mono_8khz_32kb.raw
+../../../../testdata/bsp/sound/zero_filled_2_bytes.raw     					z:/base/sound/validation/zero_filled_2_bytes.raw     
+../../../../testdata/bsp/sound/zero_filled_32kb.raw     						z:/base/sound/validation/zero_filled_32kb.raw     
+
+#if defined(TEST_DEVICE_H4HRP)
+../testdata/h4hrp/armv5/t_sound.ini					/epoc32/data/z/base/sound/t_sound.ini
+../testdata/h4hrp/armv5/t_sound.tcs					/epoc32/data/z/base/sound/t_sound.tcs
+#endif
+#if defined(TEST_DEVICE_H6HRP)
+../testdata/h6hrp/t_sound.ini					/epoc32/data/z/base/sound/t_sound.ini
+../testdata/h6hrp/t_sound.tcs					/epoc32/data/z/base/sound/t_sound.tcs
+#endif
+
+PRJ_TESTMMPFILES
+t_sound.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/group/t_sound.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,25 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_SOUND_IBY__)
+#define __T_SOUND_IBY__
+
+//Test Includes
+#include <rom\haitests\t_sound_binaries.iby>
+#include <rom\haitests\t_sound_testdata.iby>
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/group/t_sound.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+TARGET			t_sound.exe
+TARGETTYPE		exe
+UID				0x1000007A 0x102863DD
+VENDORID		0x70000001
+
+capability		All -Tcb
+
+SOURCEPATH		../src
+
+SOURCE			../../../common/src/DataWrapperBase.cpp
+SOURCE			../../../common/src/ActiveCallbackBase.cpp
+
+SOURCE			t_currentsoundformatdata.cpp
+SOURCE			t_mdadevsounddata.cpp
+SOURCE			t_soundactivecallback.cpp
+SOURCE			t_soundformatssupporteddata.cpp
+SOURCE			t_sounddriverserver.cpp
+SOURCE			sound_util.cpp
+
+USERINCLUDE		../inc
+USERINCLUDE		../../../common/inc
+
+SYSTEMINCLUDE	/epoc32/include
+SYSTEMINCLUDE	/epoc32/include/test
+SYSTEMINCLUDE	/epoc32/include/kernel
+
+LIBRARY			euser.lib
+LIBRARY			efsrv.lib
+LIBRARY			hal.lib
+LIBRARY			testexecuteutils.lib
+LIBRARY			testexecutelogclient.lib
+LIBRARY			bafl.lib
+LIBRARY			iniparser.lib
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/group/t_sound.oby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#define BASE_ROM
+#include <rom\##VARIANT##\header.iby>
+
+files=
+
+#include <rom\##VARIANT##\kernel.iby>
+#include "user.iby"
+#include <rom\hal\hal.iby>
+#include <rom\f32\f32.iby>
+
+//TEF Includes
+#include <rom\include\base_testexecutelite.iby>
+
+// Tests
+#include <rom\haitests\t_sound.iby>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/group/t_sound_binaries.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,26 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_SOUND_BINARIES_IBY__)
+#define __T_SOUND_BINARIES_IBY__
+
+#if (!defined EKA2)
+file=\epoc32\release\##MAIN##\##BUILD##\t_sound.exe		sys\bin\t_sound.exe
+#else
+file=\epoc32\release\##MAIN##\##BUILD##\t_sound.exe		sys\bin\t_sound.exe
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/group/t_sound_testdata.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,59 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_SOUND_TESTDATA_IBY__)
+#define __T_SOUND_TESTDATA_IBY__
+
+#include "t_prompt.iby"
+
+data=EPOCROOT##epoc32\data\z\base\sound\base-bsp-sound-driver-automated.script			base\sound\base-bsp-sound-driver-automated.script
+data=EPOCROOT##epoc32\data\z\base\sound\base-bsp-sound-driver-manual.script			base\sound\base-bsp-sound-driver-manual.script
+data=EPOCROOT##epoc32\data\z\base\sound\base-bsp-sound-driver.script						base\sound\base-bsp-sound-driver.script
+data=EPOCROOT##epoc32\data\z\base\sound\base-bsp-sound-driver.ini						base\sound\base-bsp-sound-driver.ini
+
+data=EPOCROOT##epoc32\data\z\base\sound\validation\alaw8bit_mono_8khz_32kb.raw    			base\sound\validation\alaw8bit_mono_8khz_32kb.raw    
+data=EPOCROOT##epoc32\data\z\base\sound\validation\alaw8bit_stereo_24khz_32kb.raw 			base\sound\validation\alaw8bit_stereo_24khz_32kb.raw 
+data=EPOCROOT##epoc32\data\z\base\sound\validation\mulaw8bit_mono_12khz_32kb.raw  			base\sound\validation\mulaw8bit_mono_12khz_32kb.raw  
+data=EPOCROOT##epoc32\data\z\base\sound\validation\mulaw8bit_stereo_32khz_32kb.raw			base\sound\validation\mulaw8bit_stereo_32khz_32kb.raw
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_mono_11khz_32kb.raw 			base\sound\validation\pcm16_mono_11khz_32kb.raw 
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_mono_12khz_32kb.raw 			base\sound\validation\pcm16_mono_12khz_32kb.raw 
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_mono_16khz_32kb.raw 			base\sound\validation\pcm16_mono_16khz_32kb.raw 
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_mono_22khz_32kb.raw 			base\sound\validation\pcm16_mono_22khz_32kb.raw 
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_mono_24khz_32kb.raw 			base\sound\validation\pcm16_mono_24khz_32kb.raw 
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_mono_32khz_32kb.raw 			base\sound\validation\pcm16_mono_32khz_32kb.raw 
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_mono_44.1khz_32kb.raw    			base\sound\validation\pcm16_mono_44.1khz_32kb.raw    
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_mono_48khz_32kb.raw 			base\sound\validation\pcm16_mono_48khz_32kb.raw 
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_mono_8khz_32kb.raw  			base\sound\validation\pcm16_mono_8khz_32kb.raw  
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_stereo_11khz_32kb.raw    			base\sound\validation\pcm16_stereo_11khz_32kb.raw    
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_stereo_12khz_32kb.raw    			base\sound\validation\pcm16_stereo_12khz_32kb.raw    
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_stereo_16khz_32kb.raw    			base\sound\validation\pcm16_stereo_16khz_32kb.raw    
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_stereo_22khz_32kb.raw    			base\sound\validation\pcm16_stereo_22khz_32kb.raw    
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_stereo_24khz_32kb.raw    			base\sound\validation\pcm16_stereo_24khz_32kb.raw    
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_stereo_24khz_320kb.raw    		base\sound\validation\pcm16_stereo_24khz_320kb.raw    
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_stereo_32khz_32kb.raw    			base\sound\validation\pcm16_stereo_32khz_32kb.raw    
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_stereo_44.1khz_32kb.raw  			base\sound\validation\pcm16_stereo_44.1khz_32kb.raw  
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_stereo_48khz_32kb.raw    			base\sound\validation\pcm16_stereo_48khz_32kb.raw    
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm16_stereo_8khz_32kb.raw			base\sound\validation\pcm16_stereo_8khz_32kb.raw
+data=EPOCROOT##epoc32\data\z\base\sound\validation\pcm8_mono_8khz_32kb.raw				base\sound\validation\pcm8_mono_8khz_32kb.raw
+data=EPOCROOT##epoc32\data\z\base\sound\validation\zero_filled_2_bytes.raw				base\sound\validation\zero_filled_2_bytes.raw
+data=EPOCROOT##epoc32\data\z\base\sound\validation\zero_filled_32kb.raw				base\sound\validation\zero_filled_32kb.raw
+
+data=EPOCROOT##epoc32\data\z\base\sound\t_sound.ini					base\sound\t_sound.ini
+data=EPOCROOT##epoc32\data\z\base\sound\t_sound.tcs					base\sound\t_sound.tcs
+
+data=EPOCROOT##epoc32\data\z\base\t_sound.bat												base\t_sound.bat
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/group/user_input.oby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,67 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+file=\epoc32\release\armv5\urel\testexecutepipslogclient.dll										\sys\bin\testexecutepipslogclient.dll
+file=\epoc32\release\armv5\urel\testexecutelogclient.dll											\sys\bin\testexecutelogclient.dll
+file=\epoc32\release\armv5\urel\testexecutelogengine.exe											\sys\bin\testexecutelogengine.exe
+file=\epoc32\release\armv5\urel\iniparser.dll														\sys\bin\iniparser.dll
+file=\epoc32\release\armv5\urel\rfileloggerclient.dll												\sys\bin\rfileloggerclient.dll
+file=\epoc32\release\armv5\urel\rfileloggerserver.exe												\sys\bin\rfileloggerserver.exe
+file=\epoc32\release\armv5\urel\testexecute.exe														\sys\bin\testexecute.exe
+file=\epoc32\release\armv5\urel\testexecuteutils.dll												\sys\bin\testexecuteutils.dll
+file=\epoc32\release\armv5\urel\wrapperutilsplugin.dll												\sys\bin\wrapperutilsplugin.dll
+data=\epoc32\data\z\system\data\testexecute.ini														\system\data\testexecute.ini
+
+file=\epoc32\release\armv5\urel\statapi.exe											\sys\bin\statapi.exe
+data=\epoc32\data\z\system\data\stat.ini											\system\data\stat.ini
+
+file=\epoc32\release\armv5\urel\t_sound.exe										\sys\bin\t_sound.exe
+data=\epoc32\data\z\base\sound\base-bsp-sound-driver-automated.script				\base\sound\base-bsp-sound-driver-automated.script
+data=\epoc32\data\z\base\sound\base-bsp-sound-driver-manual.script				\base\sound\base-bsp-sound-driver-manual.script
+data=\epoc32\data\z\base\sound\base-bsp-sound-driver.script						\base\sound\base-bsp-sound-driver.script
+data=\epoc32\data\z\base\sound\base-bsp-sound-driver.ini		\base\sound\base-bsp-sound-driver.ini
+
+data=\epoc32\data\z\base\sound\validation\alaw8bit_mono_8khz_32kb.raw    					\base\sound\validation\alaw8bit_mono_8khz_32kb.raw    
+data=\epoc32\data\z\base\sound\validation\alaw8bit_stereo_24khz_32kb.raw 					\base\sound\validation\alaw8bit_stereo_24khz_32kb.raw 
+data=\epoc32\data\z\base\sound\validation\mulaw8bit_mono_12khz_32kb.raw  					\base\sound\validation\mulaw8bit_mono_12khz_32kb.raw  
+data=\epoc32\data\z\base\sound\validation\mulaw8bit_stereo_32khz_32kb.raw					\base\sound\validation\mulaw8bit_stereo_32khz_32kb.raw
+data=\epoc32\data\z\base\sound\validation\pcm16_mono_11khz_32kb.raw      					\base\sound\validation\pcm16_mono_11khz_32kb.raw      
+data=\epoc32\data\z\base\sound\validation\pcm16_mono_12khz_32kb.raw      					\base\sound\validation\pcm16_mono_12khz_32kb.raw      
+data=\epoc32\data\z\base\sound\validation\pcm16_mono_16khz_32kb.raw      					\base\sound\validation\pcm16_mono_16khz_32kb.raw      
+data=\epoc32\data\z\base\sound\validation\pcm16_mono_22khz_32kb.raw      					\base\sound\validation\pcm16_mono_22khz_32kb.raw      
+data=\epoc32\data\z\base\sound\validation\pcm16_mono_24khz_32kb.raw      					\base\sound\validation\pcm16_mono_24khz_32kb.raw      
+data=\epoc32\data\z\base\sound\validation\pcm16_mono_32khz_32kb.raw      					\base\sound\validation\pcm16_mono_32khz_32kb.raw      
+data=\epoc32\data\z\base\sound\validation\pcm16_mono_44.1khz_32kb.raw    					\base\sound\validation\pcm16_mono_44.1khz_32kb.raw    
+data=\epoc32\data\z\base\sound\validation\pcm16_mono_48khz_32kb.raw      					\base\sound\validation\pcm16_mono_48khz_32kb.raw      
+data=\epoc32\data\z\base\sound\validation\pcm16_mono_8khz_32kb.raw       					\base\sound\validation\pcm16_mono_8khz_32kb.raw       
+data=\epoc32\data\z\base\sound\validation\pcm16_stereo_11khz_32kb.raw    					\base\sound\validation\pcm16_stereo_11khz_32kb.raw    
+data=\epoc32\data\z\base\sound\validation\pcm16_stereo_12khz_32kb.raw    					\base\sound\validation\pcm16_stereo_12khz_32kb.raw    
+data=\epoc32\data\z\base\sound\validation\pcm16_stereo_16khz_32kb.raw    					\base\sound\validation\pcm16_stereo_16khz_32kb.raw    
+data=\epoc32\data\z\base\sound\validation\pcm16_stereo_22khz_32kb.raw    					\base\sound\validation\pcm16_stereo_22khz_32kb.raw    
+data=\epoc32\data\z\base\sound\validation\pcm16_stereo_24khz_32kb.raw    					\base\sound\validation\pcm16_stereo_24khz_32kb.raw    
+data=\epoc32\data\z\base\sound\validation\pcm16_stereo_24khz_320kb.raw    					\base\sound\validation\pcm16_stereo_24khz_320kb.raw    
+data=\epoc32\data\z\base\sound\validation\pcm16_stereo_32khz_32kb.raw    					\base\sound\validation\pcm16_stereo_32khz_32kb.raw    
+data=\epoc32\data\z\base\sound\validation\pcm16_stereo_44.1khz_32kb.raw  					\base\sound\validation\pcm16_stereo_44.1khz_32kb.raw  
+data=\epoc32\data\z\base\sound\validation\pcm16_stereo_48khz_32kb.raw    					\base\sound\validation\pcm16_stereo_48khz_32kb.raw    
+data=\epoc32\data\z\base\sound\validation\pcm16_stereo_8khz_32kb.raw     					\base\sound\validation\pcm16_stereo_8khz_32kb.raw     
+data=\epoc32\data\z\base\sound\validation\pcm8_mono_8khz_32kb.raw     					\base\sound\validation\pcm8_mono_8khz_32kb.raw     
+data=\epoc32\data\z\base\sound\validation\zero_filled_2_bytes.raw     					\base\sound\validation\zero_filled_2_bytes.raw     
+data=\epoc32\data\z\base\sound\validation\zero_filled_32kb.raw     					\base\sound\validation\zero_filled_32kb.raw     
+
+data=\epoc32\data\z\base\sound\t_sound.ini								base\sound\t_sound.ini
+data=\epoc32\data\z\base\sound\t_sound.tcs								base\sound\t_sound.tcs
+data=\epoc32\data\z\base\t_sound.bat										\base\t_sound.bat
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/group/user_romfiles.txt	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,20 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+ocspcommon.dll
+iniparser.dll
+testexecutepipslogclient.dll
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/inc/sound_util.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __TSOUNDUTIL_H__)
+#define __TSOUNDUTIL_H__
+
+//	EPOC Includes
+#include <mdasound.h>
+
+//	User Includes
+#include "DataWrapperBase.h"
+
+
+/**
+ * Class that contains methods for loading and releasing sound drivers and 
+ * default constants
+ *
+ */
+class TSoundUtil
+	{
+public:
+	//constant definitions
+	const static TInt KAudioBufferMaxSize	=	2048;
+	const static TInt KDefaultBlockSize		=	8192;
+
+	/**
+	 * Class that contains methods for saving and loading audio files
+	 *
+	 */
+	class RAudioBuffer : public RBuf8
+		{
+	public:
+		TInt SaveAudioDataL(const TDesC& aFile);
+		TInt LoadAudioDataL(const TDesC& aFile);
+		};
+		
+public:
+	static TInt		LoadSoundDrivers(const TDesC& aLdd, const TDesC& aPdd);
+	static TInt		FreeSoundDrivers(const TDesC& aLdd, const TDesC& aPdd);
+	
+	static TInt		DeleteFileL(const TDesC& aFile);
+	
+public:
+	
+	static const CDataWrapperBase::TEnumEntryTable iEnumTableSoundEncoding[];
+	};
+
+#endif /* __TSOUNDUTIL_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/inc/t_currentsoundformatdata.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+@test
+@internalComponent
+
+This contains CT_CurrentSoundFormatData
+*/
+
+#ifndef T_CURRENTSOUNDFORMATDATA_H_
+#define T_CURRENTSOUNDFORMATDATA_H_
+
+//	User Includes
+#include "t_mdadevsounddata.h"
+
+/**
+ * Class to wrap RMdaDevSound::TCurrentSoundFormat
+ *
+ */
+class CT_CurrentSoundFormatData : public CDataWrapperBase
+	{
+private:
+	/** constant for max descriptor length   */
+	const static 	TInt KDesMaxLength = 128;
+
+public:
+
+	/**
+	* Two phase constructor
+	*
+	* @leave	system wide error
+	*/
+	static CT_CurrentSoundFormatData*	NewL();
+
+	/**
+	* Public destructor
+	*/
+	~CT_CurrentSoundFormatData();
+
+	virtual TAny*	GetObject();
+	virtual void	SetObjectL(TAny* aAny);
+	virtual void	DisownObjectL();
+	inline virtual 	TCleanupOperation CleanupOperation();
+	
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+	
+private:
+	/**
+	* Private constructor. First phase construction
+	*/
+	CT_CurrentSoundFormatData();
+	/**
+	* Second phase construction
+	*/
+	void	ConstructL();
+	
+	static void CleanupOperation( TAny* aAny );
+	
+	/**
+	* Helpers
+	*/
+	void	DoCleanup();
+	void	DoInitiateSupportedFormatsL(const TDesC& aSection);
+	
+	/**
+	* Commands
+	*/
+	void	DoCmdNewL(const TDesC& aSection);
+	void	DoCmdDestructor();
+	void	DoCmd_iRate_get(const TDesC& aSection);
+	void	DoCmd_iEncoding_getL(const TDesC& aSection);
+	void	DoCmd_iChannels_get(const TDesC& aSection);
+	void	DoCmd_iBufferSize_get(const TDesC& aSection);
+	void	DoCmd_iRate_set(const TDesC& aSection);
+	void	DoCmd_iEncoding_set(const TDesC& aSection);
+	void	DoCmd_iChannels_set(const TDesC& aSection);
+	void	DoCmd_iBufferSize_set(const TDesC& aSection);
+
+private:
+	/** Instance for manipulating current sound format   */
+	RMdaDevSound::TCurrentSoundFormat*	iCurrentFormat;	
+	};
+
+#endif /*T_CURRENTSOUNDFORMATDATA_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/inc/t_mdadevsounddata.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,190 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+@test
+@internalComponent
+
+This contains CT_MdaDevSoundData
+*/
+
+#if (!defined __T_MDADEVSOUND_DATA_H__)
+#define __T_MDADEVSOUND_DATA_H__
+
+//	User Includes
+#include "DataWrapperBase.h"
+#include "sound_util.h"
+#include "t_soundactivecallback.h"
+
+//	EPOC includes
+#include <mdasound.h>
+#include <e32twin.h>
+
+/**
+ * Class to wrap RMdaDevSound APIs.
+ *
+ */
+class CT_MdaDevSoundData: public CDataWrapperBase
+	{
+public:
+	/**
+	* Two phase constructor
+	*
+	* @leave	system wide error
+	*/
+	static CT_MdaDevSoundData*	NewL(RMdaDevSound* aServerStore);
+	/**
+	* Public destructor
+	*/
+	~CT_MdaDevSoundData();
+
+	/**
+	* Process a command read from the ini file
+	*
+	* @param	aCommand requiring command to be processed
+	* @param	aSection the section in the ini file requiring the command to be processed
+	* @param	aAsyncErrorIndex the index of asynchronous command error code belongs to.
+	* 
+	* @leave	system wide error
+	*
+	* @return	ETrue if the command is processed
+	*/
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+	/**
+	* Return a pointer to the object that the data wraps
+	*
+	* @return	pointer to the object that the data wraps
+	*/
+	virtual TAny*	GetObject();
+	virtual void	SetObjectL(TAny* aAny);
+	virtual void	DisownObjectL();
+
+	inline virtual 	TCleanupOperation CleanupOperation();
+
+	/**
+	* Query to see if there are any outstanding requests
+	*
+	* @return ETrue if there are any outstanding requests
+	*/
+	
+	void RunL(CActive* aActive, TInt aIndex);
+	void DoCancel(CActive* aActive, TInt aIndex);
+
+protected:
+	/**
+	* Protected constructor. First phase construction
+	*/
+	CT_MdaDevSoundData(RMdaDevSound* aServerStore);
+	/**
+	* Second phase construction
+	*/
+	void ConstructL();
+
+private:
+	static void CleanupOperation( TAny* aAny );
+
+	/**
+	* General commands
+	*/
+	void	DoCmdNewL();
+	void	DoCmdOpen(const TDesC& aSection);
+	void	DoCmdClose();
+	void	DoCmdDestructor();
+	void	DoCmdIsMdaSound();
+	void	DoCmdVersionRequired(const TDesC& aSection);
+
+	/**
+	* Playback commands
+	*/
+	void	DoCmdPlayVolume(const TDesC& aSection);
+	void	DoCmdSetPlayVolume(const TDesC& aSection);
+	void	DoCmdPlayDataL(const TDesC& aSection, const TInt aAsyncErrorIndex);
+	void	DoCmdCancelPlayData();
+	void	DoCmdFlushPlayBuffer();
+	void	DoCmdNotifyPlayErrorL(const TInt aAsyncErrorIndex);
+	void	DoCmdCancelNotifyPlayError();
+	void	DoCmdBytesPlayed(const TDesC& aSection);
+	void	DoCmdResetBytesPlayed();
+	void	DoCmdPausePlayBuffer();
+	void	DoCmdResumePlaying();
+
+	/**
+	* Recording commands
+	*/
+	void	DoCmdRecordDataL(const TDesC& aSection, const TInt aAsyncErrorIndex);
+	void	DoCmdCancelRecordData();
+	void	DoCmdFlushRecordBuffer();
+	void	DoCmdRecordLevel(const TDesC& aSection);	
+	void	DoCmdSetRecordLevel(const TDesC& aSection);
+	void	DoCmdNotifyRecordErrorL(const TInt aAsyncErrorIndex);
+	void	DoCmdCancelNotifyRecordError();
+	
+	/**
+	* Format commands
+	*/
+	void	DoCmdPlayFormatsSupportedL(const TDesC& aSection);
+	void	DoCmdGetPlayFormatL(const TDesC& aSection);
+	void	DoCmdSetPlayFormatL(const TDesC& aSection);
+	void	DoCmdRecordFormatsSupportedL(const TDesC& aSection);
+	void	DoCmdGetRecordFormatL(const TDesC& aSection);
+	void	DoCmdSetRecordFormatL(const TDesC& aSection);
+	
+	/**
+	* Utility commands
+	*/
+	void DoCmdUtilityLoadDrivers(const TDesC& aSection);
+	void DoCmdUtilityFreeDrivers(const TDesC& aSection);
+	void DoCmdUtilityDeleteFileL(const TDesC& aSection);
+
+	/**
+	* Helper commands
+	*/
+	void	DoCleanup();
+	
+
+private:
+	/** RMdaDevSound class instance that is tested */
+	RMdaDevSound*										iMdaDevSound;
+	
+	/** Reference to RMdaDevSound object stored on server side */
+	RMdaDevSound* 										iServerStore;
+
+	/** The request status for playback errors */
+	RPointerArray<CActiveCallback>						iNotifyPlayError;
+
+	/** The request status for recording errors */
+	RPointerArray<CActiveCallback>						iNotifyRecordError;
+
+	/** The request status for sound playback */
+	RPointerArray<CT_SoundActiveCallback>				iPlay;
+
+	/** The request status for sound recording */
+	RPointerArray<CT_SoundActiveCallback>				iRecord;
+	};
+
+#define GET_MANDATORY_STRING_PARAMETER(aParamName, aSection, aResult)		GetCommandStringParameter(aParamName, aSection, aResult, (TText8*)__FILE__, __LINE__, ETrue)
+#define GET_MANDATORY_INT_PARAMETER(aParamName, aSection, aResult)		GetCommandIntParameter(aParamName, aSection, aResult,(TText8*) __FILE__, __LINE__, ETrue)
+#define GET_MANDATORY_INT64_PARAMETER(aParamName, aSection, aResult)		GetCommandInt64Parameter(aParamName, aSection, aResult,(TText8*) __FILE__, __LINE__, ETrue)
+#define GET_MANDATORY_BOOL_PARAMETER(aParamName, aSection, aResult)		GetCommandBoolParameter(aParamName, aSection, aResult, (TText8*)__FILE__, __LINE__, ETrue)
+
+#define GET_OPTIONAL_STRING_PARAMETER(aParamName, aSection, aResult)		GetCommandStringParameter(aParamName, aSection, aResult, (TText8*) __FILE__, __LINE__, EFalse)
+#define GET_OPTIONAL_INT_PARAMETER(aParamName, aSection, aResult)		GetCommandIntParameter(aParamName, aSection, aResult,(TText8*) __FILE__, __LINE__, EFalse)
+#define GET_OPTIONAL_INT64_PARAMETER(aParamName, aSection, aResult)		GetCommandInt64Parameter(aParamName, aSection, aResult,(TText8*) __FILE__, __LINE__, EFalse)
+#define GET_OPTIONAL_BOOL_PARAMETER(aParamName, aSection, aResult)		GetCommandBoolParameter(aParamName, aSection, aResult,(TText8*) __FILE__, __LINE__, EFalse)
+
+#endif /* __T_MDADEVSOUND_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/inc/t_soundactivecallback.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,86 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+@test
+@internalComponent
+
+This contains CT_SoundActiveCallback
+*/
+
+#if (!defined __T_SOUNDACTIVECALLBACK_H__)
+#define __T_SOUNDACTIVECALLBACK_H__
+
+// User includes
+#include "sound_util.h"
+#include "ActiveCallbackBase.h"
+
+/**
+* Callback class for playing and recording processes
+*/
+class CT_SoundActiveCallback : public CActiveCallbackBase
+	{
+public:
+	
+	/**
+	* Two phase constructor
+	*
+	* @leave	system wide error
+	*/
+	static CT_SoundActiveCallback*	NewL(CDataWrapperBase& aCallback, TInt aPriority=EPriorityStandard);
+	
+	/**
+	* Two phase constructor
+	*
+	* @leave	system wide error
+	*/
+	static CT_SoundActiveCallback*	NewLC(CDataWrapperBase& aCallback, TInt aPriority=EPriorityStandard);
+
+	/**
+	* Public destructor
+	*/
+	~CT_SoundActiveCallback();
+	
+	/**
+	* Setter method for section name
+	*/
+	void	SetSection(const TDesC& aSection);
+	
+	/**
+	* Method for creating sound data buffer.
+	*/
+	void	CreateSoundDataBufferL(TInt aLength);
+	
+protected:
+	
+	/**
+	* Protected constructor. First phase construction
+	*/
+	CT_SoundActiveCallback(CDataWrapperBase& aCallback, TInt aPriority);
+
+public:
+	/** Position in buffer being played or recorded to */ 
+	TInt						iDataPosition;
+	/** Buffer being played or recorded to */
+	TSoundUtil::RAudioBuffer* 	iSoundData;
+	/** Section name associated with command */
+	TDesC*						iSection;
+	/** Block in buffer */
+	TPtr8 						iBufferBlock;
+	};
+
+#endif /* __T_SOUNDACTIVECALLBACK_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/inc/t_sounddriverserver.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+@test
+@internalComponent
+
+This contains CT_SoundDriverServer
+*/
+
+#ifndef __T_SOUND_DRIVER_SERVER_H__
+#define __T_SOUND_DRIVER_SERVER_H__
+
+// EPOC Includes
+#include <testblockcontroller.h>
+#include <testserver2.h>
+
+// User includes
+#include "t_mdadevsounddata.h"
+#include "t_currentsoundformatdata.h"
+#include "t_soundformatssupporteddata.h"
+
+// classes being tested
+_LIT(KRMdaDevSound,					"RMdaDevSound");
+_LIT(KTCurrentSoundFormat,			"TCurrentSoundFormat");
+_LIT(KTSoundFormatsSupported,		"TSoundFormatsSupported");
+
+// This wrapper class extends the test server and creates test server for sound driver
+class CT_SoundDriverServer : public CTestServer2
+	{
+private:
+	class CT_SoundDriverBlock : public CTestBlockController
+		{
+	public:
+		inline CT_SoundDriverBlock();
+		inline ~CT_SoundDriverBlock();
+		inline void ConstructL();
+
+		inline CDataWrapper*	CreateDataL(const TDesC& aData);
+		
+	public:
+		RMdaDevSound* iServerStore;
+		};
+
+public:
+	static CT_SoundDriverServer* NewL();
+	inline ~CT_SoundDriverServer();
+
+	inline CTestBlockController*	CreateTestBlock();
+
+protected:
+	inline CT_SoundDriverServer();
+	
+private:
+	RMdaDevSound iServerStore;
+	};
+
+#include "t_sounddriverserver.inl"
+
+#endif // __T_SOUND_DRIVER_SERVER_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/inc/t_sounddriverserver.inl	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+@test
+@internalComponent
+
+This contains CT_SoundDriverServer inline functions
+*/
+
+CT_SoundDriverServer::CT_SoundDriverBlock::CT_SoundDriverBlock()
+:	CTestBlockController()
+	{
+	}
+
+void CT_SoundDriverServer::CT_SoundDriverBlock::ConstructL()
+	{
+	iServerStore->Close();
+	iServerStore->SetHandle(KNullHandle);
+	}
+
+CT_SoundDriverServer::CT_SoundDriverBlock::~CT_SoundDriverBlock()
+	{
+	}
+
+/**
+ * Method to create wrapper according to param aData
+ * @param aData contains wrapper class name
+ */
+CDataWrapper* CT_SoundDriverServer::CT_SoundDriverBlock::CreateDataL(const TDesC& aData)
+	{
+	CDataWrapper*	wrapper = NULL;
+
+	if( KRMdaDevSound() == aData )
+		{
+		wrapper = CT_MdaDevSoundData::NewL(iServerStore);
+		}
+	else if( KTCurrentSoundFormat() == aData )
+		{
+		wrapper = CT_CurrentSoundFormatData::NewL();
+		}
+	else if( KTSoundFormatsSupported() == aData )
+		{
+		wrapper = CT_SoundFormatsSupportedData::NewL();
+		}
+	return wrapper;
+	}
+
+CT_SoundDriverServer::CT_SoundDriverServer()
+	{
+	}
+
+CT_SoundDriverServer::~CT_SoundDriverServer()
+	{
+	iServerStore.Close();
+	iServerStore.SetHandle(KNullHandle);
+	}
+
+CTestBlockController* CT_SoundDriverServer::CreateTestBlock()
+	{
+	CT_SoundDriverServer::CT_SoundDriverBlock* result = new 
+	CT_SoundDriverServer::CT_SoundDriverBlock();
+	result->iServerStore = &iServerStore;
+	result->ConstructL();
+	return result;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/inc/t_soundformatssupporteddata.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+@test
+@internalComponent
+
+This contains CT_SoundFormatsSupportedData 
+*/
+
+#ifndef T_SOUNDFORMATSSUPPORTEDDATA_H_
+#define T_SOUNDFORMATSSUPPORTEDDATA_H_
+
+//	User Includes
+#include "t_mdadevsounddata.h"
+
+/**
+ * Class to wrap RMdaDevSound::TSoundFormatsSupported APIs.
+ *
+ */
+class CT_SoundFormatsSupportedData : public CDataWrapperBase
+	{
+public:
+
+	/**
+	* Two phase constructor
+	*
+	* @leave	system wide error
+	*/
+	static CT_SoundFormatsSupportedData *	NewL();
+
+	/**
+	* Public destructor
+	*/
+	~CT_SoundFormatsSupportedData ();
+
+	virtual TAny*	GetObject();
+	virtual void	SetObjectL(TAny* aAny);
+	virtual void	DisownObjectL();
+
+	inline virtual 	TCleanupOperation CleanupOperation();
+
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+	
+	/** constant for max descriptor length   */
+	const static 	TInt KDesMaxLength = 128;
+	
+private:
+	/**
+	* Private constructor. First phase construction
+	*/
+	CT_SoundFormatsSupportedData ();
+	
+	/**
+	* Second phase construction
+	*/
+	void	ConstructL();
+	
+	static void CleanupOperation( TAny* aAny );
+
+	/**
+	* Helpers
+	*/
+	void	DoCleanup();
+	
+	/**
+	* Commands
+	*/
+	void	DoCmdNew();
+	void	DoCmdDestructor();
+	void	DoCmd_iMinRate_get(const TDesC& aSection);
+	void	DoCmd_iMaxRate_get(const TDesC& aSection);
+	void	DoCmd_iMinBufferSize_get(const TDesC& aSection);
+	void	DoCmd_iMaxBufferSize_get(const TDesC& aSection);
+	void	DoCmd_iMinVolume_get(const TDesC& aSection);
+	void	DoCmd_iMaxVolume_get(const TDesC& aSection);
+	void	DoCmd_iChannels_get(const TDesC& aSection);
+	void	DoCmd_iEncodings_getL(const TDesC& aSection);
+
+private:
+	/** Instance for manipulating sound formats supported   */
+	RMdaDevSound::TSoundFormatsSupported*	iFormatsSupported;
+	};
+
+#endif /*T_SOUNDFORMATSSUPPORTEDDATA_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/pkg/t_sound.bat	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,18 @@
+@rem
+@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+testexecute z:\base\sound\base-bsp-sound-driver.script -tcx z:\base\sound\t_sound.tcs
+copy c:\logs\testexecute\*.htm d:\
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/scripts/base-bsp-sound-driver-automated.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,6115 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//! @file
+//! @SYMTestSuiteName  BASE-BSP-SOUND
+//! @SYMScriptTestEnvironment This test script requires a base rom image
+
+/////////////////////////////////////////////////////////////////////
+// BASE-BSP-SOUND-DRIVER-automated.script
+//
+//
+// Tests all the PublishedPartner APIs of the RMdaDevSound
+// class as a means of confidence that the APIs work as expected.
+// All test cases will keep the sound system state and 
+// restore that to initial state when test case finished
+// Platform dependent configuration is picked up from the global environment files
+//
+/////////////////////////////////////////////////////////////////////
+
+RUN_UTILS MkDir		${SYSDRIVE}\base\
+RUN_UTILS MkDir		${SYSDRIVE}\base\sound\
+RUN_UTILS MkDir		${SYSDRIVE}\base\sound\validation
+
+
+LOAD_SUITE	t_sound
+DELAY		5000
+
+/////////////////////////////////////////////
+// Driver functionality
+/////////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-0001
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-0001
+//! @SYMAPI			RMdaDevSound::Open(TInt)
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Open a session to the sound device using the default unit of device value.
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Function does not leave nor panic. Session to the default sound driver is opened and closed
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100		t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound	devsound  
+		COMMAND		devsound	new
+		COMMAND		devsound	Open			UnitEnum
+		COMMAND		devsound  	Close
+		COMMAND		devsound  	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-0001
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-0002
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-0002
+//! @SYMAPI			RMdaDevSound::VersionRequired();
+//!				RMdaDevSound::IsMdaSound()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Checkwhether the loaded driver is the MdaSound driver
+//!				and receive the version of sound driver
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]				
+//!				2. Call IsMdaSound() and check if that return KErrNone (it means, that loaded driver is MdaSound driver)
+//!				3. Call VersionRequired() and verify with expected value from [driver] section
+//!				4. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Loaded driver is MdaSound-type driver and version number is as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100		t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound	devsound
+		COMMAND			devsound	new
+		COMMAND			devsound	Open			UnitEnum
+		COMMAND			devsound	IsMdaSound
+		COMMAND			devsound	VersionRequired		driver
+		COMMAND			devsound  	Close
+		COMMAND			devsound  	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-0002
+
+///////////////////////////////////////////
+// Format/Volume functionality
+///////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-1001
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-1001
+//! @SYMAPI			RMdaDevSound::PlayFormatsSupported(TSoundFormatsSupportedBuf{ref});
+//!				RMdaDevSound::GetPlayFormat(TCurrentSoundFormatBuf{ref});
+//!				RMdaDevSound::PlayVolume();
+//!				RMdaDevSound::RecordFormatsSupported(TSoundFormatsSupportedBuf{ref});
+//!				RMdaDevSound::GetRecordFormat(TCurrentSoundFormatBuf{ref});
+//!				RMdaDevSound::RecodLevel(TInt)
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Request the supported formats and default used format for default sound driver
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call PlayFormatsSupported() and verify with list from [play_formats_supported]
+//!				3. Call GetPlayFormat() and verify with list from [default_play_format]
+//!				4. Call PlayVolume() and verify with it from [default_play_volume]
+//!				5. Call RecordFormatsSupported() and verify with list from [record_formats_supported]
+//!				6. Call GetRecordFormat() and verify with list from [default_record_format]
+//!				7. Call RecordLevel and verify with it from [default_record_level]
+//!				8. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Supported formats are as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\BASE-BSP-SOUND-DRIVER.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TSoundFormatsSupported		t_formats		
+		COMMAND		t_formats			new
+		COMMAND		devsound			PlayFormatsSupported	BSP-SOUND-DRIVER-PlayFormatsSupported
+		COMMAND		t_formats			imin_rate_get		play_formats_supported
+		COMMAND		t_formats			imax_rate_get		play_formats_supported
+		COMMAND		t_formats			ichannels_get		play_formats_supported
+		COMMAND		t_formats			imin_buffer_size_get	play_formats_supported
+		COMMAND		t_formats			imax_buffer_size_get	play_formats_supported
+		COMMAND		t_formats			imin_volume_get		play_formats_supported
+		COMMAND		t_formats			imax_volume_get		play_formats_supported
+		COMMAND		t_formats			iencodings_get		play_formats_supported
+		COMMAND		t_formats			~
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format			irate_get			default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get		default_play_format
+		COMMAND		devsound			PlayVolume		default_play_volume
+		COMMAND		t_format			~
+		COMMAND		t_formats			new
+		COMMAND		devsound			RecordFormatsSupported	BSP-SOUND-DRIVER-RecordFormatsSupported
+		COMMAND		t_formats			imin_rate_get		record_formats_supported
+		COMMAND		t_formats			imax_rate_get		record_formats_supported
+		COMMAND		t_formats			ichannels_get		record_formats_supported
+		COMMAND		t_formats			imin_buffer_size_get	record_formats_supported
+		COMMAND		t_formats			imax_buffer_size_get	record_formats_supported
+		COMMAND		t_formats			imin_volume_get		record_formats_supported
+		COMMAND		t_formats			imax_volume_get		record_formats_supported
+		COMMAND		t_formats			iencodings_get		record_formats_supported
+		COMMAND		t_formats			~		
+		COMMAND		t_format			new			
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND		t_format			irate_get			default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get		default_record_format
+		COMMAND		devsound			RecordLevel		default_record_level
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-1001
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-1002
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-1002
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus{ref}, const TDesC8{ref});
+//!				RMdaDevSound::SetPlayVolume(TInt);
+//!				RMdaDevSound::PlayVolume()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play sound with default volume level and maximal volume level
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() with [default_play_format] to verify default play format
+//!				3. Call NotifyPlayError() //needed because otherwise PlayData() will not really stop after Outstanding
+//!				4. Call PlayData() with valid sound data from [default_file]
+//!				5. Call SetPlayVolume() with max volume from [max_play_volume]
+//!				6. Call NotifyPlayError() //needed because otherwise PlayData() will not really stop after Outstanding
+//!				7. Call PlayData() with valid sound data from [default_file]
+//!				8. Call PlayVolume(), where expected result is equal with max volume from [max_play_volume]
+//!				9. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playback finished w/o errors, set and received volume values are equal
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND !AsyncError=-10	devsound			NotifyPlayError
+		COMMAND		devsound			PlayData		default_file
+		OUTSTANDING
+		COMMAND		devsound			SetPlayVolume		max_play_volume
+		COMMAND		devsound			PlayData		default_file
+		COMMAND !AsyncError=-10	devsound			NotifyPlayError
+		OUTSTANDING
+		COMMAND		devsound			PlayVolume		max_play_volume
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-1002
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-1003
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-1003
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus{ref}, const TDesC8{ref});
+//!				RMdaDevSound::SetPlayFormat(TCurrentSoundFormatBuf{ref});
+//!				RMdaDevSound::GetPlayFormat(TCurrentSoundFormatBuf{ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play sound with default format and with some valid sound format
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call NotifyPlayError() //needed because otherwise PlayData() will not really stop after Outstanding
+//!				4. Call PlayData() with valid sound data from [default_file]
+//!				5. Call SetPlayFormat() with unsupported format value from [unsupported_play_format] with expected error KErrNotSupported
+//!				6. Call GetPlayFormat() where expected result is equal with format from [default_play_format]
+//!				7. Call SetPlayFormat() with valid format value from [valid_play_format]
+//!				8. Call NotifyPlayError() //needed because otherwise PlayData() will not really stop after Outstanding
+//!				9. Call PlayData() with valid sound data from [valid_file]
+//!				10. Call GetPlayFormat(), where expected result is equal with format from [valid_play_format]
+//!				11. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playback finished w/o errors errors, set and received playback format values are equal, setting of unsupported format
+//!				raised KErrNotSupported
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND			t_format			irate_get		default_play_format
+		COMMAND			t_format			iencoding_get		default_play_format
+		COMMAND			t_format			ichannels_get		default_play_format
+		COMMAND			t_format			ibuffer_size_get	default_play_format
+		COMMAND !AsyncError=-10	devsound			NotifyPlayError
+		COMMAND			devsound			PlayData		default_file
+		OUTSTANDING
+		COMMAND			t_format			irate_set		unsupported_play_format
+		COMMAND			t_format			iencoding_set		unsupported_play_format
+		COMMAND			t_format			ichannels_set		unsupported_play_format
+		COMMAND			t_format			ibuffer_size_set	unsupported_play_format
+		COMMAND !Error=-5	devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND			t_format			irate_get		default_play_format	
+		COMMAND			t_format			iencoding_get		default_play_format	
+		COMMAND			t_format			ichannels_get		default_play_format	
+		COMMAND			t_format			ibuffer_size_get	default_play_format
+		COMMAND !AsyncError=-10	devsound			NotifyPlayError
+		COMMAND			devsound			PlayData		valid_file
+		OUTSTANDING
+		COMMAND			t_format			irate_set		valid_play_format
+		COMMAND			t_format			iencoding_set		valid_play_format
+		COMMAND			t_format			ichannels_set		valid_play_format
+		COMMAND			t_format			ibuffer_size_set	valid_play_format
+		COMMAND			devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND !AsyncError=-10	devsound			NotifyPlayError
+		COMMAND			devsound			PlayData		valid_file
+		OUTSTANDING
+		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND			t_format			irate_get		valid_play_format	
+		COMMAND			t_format			iencoding_get		valid_play_format	
+		COMMAND			t_format			ichannels_get		valid_play_format	
+		COMMAND			t_format			ibuffer_size_get	valid_play_format
+		// set back default play format
+		COMMAND			t_format			irate_set		default_play_format
+		COMMAND			t_format			iencoding_set		default_play_format
+		COMMAND			t_format			ichannels_set		default_play_format
+		COMMAND			t_format			ibuffer_size_set	default_play_format
+		COMMAND			devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND			t_format			~
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-1003
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-1004
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-1004
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus{ref}, const TDes8{ref});
+//!				RMdaDevSound::SetRecordLevel(TInt);
+//!				RMdaDevSound::RecordLevel()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Record sound with default volume level and max volume level
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetRecordFormat() and verify from [default_record_format]
+//!				3. Call RecordData()
+//!				4. Call SetRecordLevel() with max record volume value from [max_record_level] variable
+//!				5. Call FlushRecordBuffer() //needed because otherwise RecordData() will not really stop after 
+//!				6. Call RecordData()
+//!				7. Call FlushRecordBuffer() //needed because otherwise operation in next step will fail with KErrInUse
+//!				8. Call RecordLevel(), where expected result is equal with max record volume value from [max_record_level] variable				
+//!				9. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording finished w/o errors, set and received volume values are equal
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND			t_format			irate_get		default_record_format
+		COMMAND			t_format			iencoding_get		default_record_format
+		COMMAND			t_format			ichannels_get		default_record_format
+		COMMAND			t_format			ibuffer_size_get	default_record_format
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			SetRecordLevel		max_record_level
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			RecordLevel		max_record_level
+		COMMAND			t_format			~
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-1004
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-1005
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-1005
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus{ref}, const TDesC8{ref});
+//!				RMdaDevSound::SetRecordFormat(TCurrentSoundFormatBuf{ref});
+//!				RMdaDevSound::GetRecordFormat(TCurrentSoundFormatBuf{ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Record sound with default sound format and with some other valid sound format
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetRecordFormat() and verify from [default_record_format]
+//!				3. Call RecordData()
+//!				4. Call SetRecordFormat() with unsupported format value from [unsupported_record_format] with expected error KErrNotSupported
+//!				5. Call GetRecordFormat() where expexted result is [default_record_format]
+//!				6. Call SetRecordFormat() with valid record format value from [valid_record_format]
+//!				7. Call RecordData()
+//!				8. Call GetRecordFormat(), where expected result is equal with format from [valid_record_format] variable				
+//!				9. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording finished w/o errors, set and received record format values are equal
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND			t_format			irate_get		default_record_format
+		COMMAND			t_format			iencoding_get		default_record_format
+		COMMAND			t_format			ichannels_get		default_record_format
+		COMMAND			t_format			ibuffer_size_get	default_record_format
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			t_format			irate_set		unsupported_record_format
+		COMMAND			t_format			iencoding_set		unsupported_record_format
+		COMMAND			t_format			ichannels_set		unsupported_record_format
+		COMMAND			t_format			ibuffer_size_set	unsupported_record_format
+		COMMAND	!Error=-5	devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get		default_record_format	
+		COMMAND			t_format			iencoding_get		default_record_format	
+		COMMAND			t_format			ichannels_get		default_record_format	
+		COMMAND			t_format			ibuffer_size_get	default_record_format
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			t_format			irate_set		valid_record_format
+		COMMAND			t_format			iencoding_set		valid_record_format
+		COMMAND			t_format			ichannels_set		valid_record_format
+		COMMAND			t_format			ibuffer_size_set	valid_record_format
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb	
+		OUTSTANDING
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get		valid_record_format
+		COMMAND			t_format			iencoding_get		valid_record_format
+		COMMAND			t_format			ichannels_get		valid_record_format
+		COMMAND			t_format			ibuffer_size_get	valid_record_format
+		// set back default record format
+		COMMAND			t_format			irate_set		default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set	default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			t_format			~
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-1005
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-1006
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-1006
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus{ref}, const TDesC8{ref});
+//!				RMdaDevSound::SetPlayVolume(TInt);
+//!				RMdaDevSound::PlayVolume()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play sound with volume level 25% and verify that sound level is still 25%. Set max volume level 
+//!				and play again and verify that sound level is still max.
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call SetPlayVolume() with 25% volume from [play_volume_quater]
+//!				4. Call NotifyPlayError() //needed because otherwise PlayData() will not really stop after Outstanding
+//!				5. Call PlayData() with valid sound data from [default_file]
+//!				6. Call PlayVolume() where expected volume level matches [play_volume_quater]
+//!				7. Call SetPlayVolume() with max volume from [max_play_volume]
+//!				8. Call NotifyPlayError() //needed because otherwise PlayData() will not really stop after Outstanding
+//!				9. Call PlayData() with valid sound data from [default_file]
+//!				10. Call PlayVolume(), where expected result is equal with max volume from [max_play_volume]
+//!				11. Restore default playback sound volume
+//!				12. Call Close().
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playback finished w/o errors, sound became louder
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND			t_format			irate_get		default_play_format
+		COMMAND			t_format			iencoding_get		default_play_format
+		COMMAND			t_format			ichannels_get		default_play_format
+		COMMAND			t_format			ibuffer_size_get	default_play_format
+		COMMAND			devsound			SetPlayVolume		play_volume_quater
+		COMMAND !AsyncError=-10	devsound			NotifyPlayError
+		COMMAND			devsound			PlayData		default_file
+		OUTSTANDING
+		COMMAND			devsound			PlayVolume		play_volume_quater
+		COMMAND			devsound			SetPlayVolume		max_play_volume
+		COMMAND !AsyncError=-10	devsound			NotifyPlayError
+		COMMAND			devsound			PlayData		default_file
+		OUTSTANDING
+		COMMAND			devsound			PlayVolume		max_play_volume
+		//!set back default playback audio level
+		COMMAND			devsound			SetPlayVolume		default_play_volume
+		COMMAND			t_format			~
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-1006
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-1007
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-1007
+//! @SYMAPI			RMdaDevSound::SetRecordFormat(TCurrentSoundFormatBuf{ref});
+//!				RMdaDevSound::SetPlayFormat(TCurrentSoundFormatBuf{ref});
+//!				RMdaDevSound::GetRecordFormat(TCurrentSoundFormatBuf{ref});
+//!				RMdaDevSound::GetPlayFormat(TCurrentSoundFormatBuf{ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Set record format to valid record format. Set play format to some other valid play format 
+//!				(other than just set record format. Sampling rate should be different). 
+//!				
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call GetRecordFormat() and verify from [default_record_format]
+//!				4. Call SetRecordFormat with [valid_record_format]
+//!				5. Call GetRecordFormat() and verify from [valid_record_format]
+//!				6. Call SetPlayFormat with [another_valid_play_format]
+//!				7. Call GetPlayFormat() and verify from [another_valid_play_format]
+//!				8. Call SetRecordFormat with [default_record_format]
+//!				9. Call SetPlayFormat with [default_play_format]
+//!				10. Call Close().
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	SetPlayFormat in step 6 returns KErrAccessDenied 
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND			t_format			irate_get		default_play_format
+		COMMAND			t_format			iencoding_get		default_play_format
+		COMMAND			t_format			ichannels_get		default_play_format
+		COMMAND			t_format			ibuffer_size_get	default_play_format
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND			t_format			irate_get		default_record_format
+		COMMAND			t_format			iencoding_get		default_record_format
+		COMMAND			t_format			ichannels_get		default_record_format
+		COMMAND			t_format			ibuffer_size_get	default_record_format
+		//set some valid record format
+		COMMAND			t_format			irate_set		valid_record_format
+		COMMAND			t_format			iencoding_set		valid_record_format
+		COMMAND			t_format			ichannels_set		valid_record_format
+		COMMAND			t_format			ibuffer_size_set	valid_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify valid record configuration			
+		COMMAND			t_format			irate_get		valid_record_format
+		COMMAND			t_format			iencoding_get		valid_record_format
+		COMMAND			t_format			ichannels_get		valid_record_format
+		COMMAND			t_format			ibuffer_size_get	valid_record_format
+		//set some valid play format
+		COMMAND			t_format			irate_set		another_valid_play_format
+		COMMAND			t_format			iencoding_set		another_valid_play_format
+		COMMAND			t_format			ichannels_set		another_valid_play_format
+		COMMAND			t_format			ibuffer_size_set	another_valid_play_format
+		COMMAND	!Error=-21	devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify valid play configuration			
+		COMMAND			t_format			irate_get		another_valid_play_format
+		COMMAND			t_format			iencoding_get		another_valid_play_format
+		COMMAND			t_format			ichannels_get		another_valid_play_format
+		COMMAND			t_format			ibuffer_size_get	another_valid_play_format
+		// set back default record format
+		COMMAND			t_format			irate_set		default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set	default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		// set back default play format
+		COMMAND			t_format			irate_set		default_play_format
+		COMMAND			t_format			iencoding_set		default_play_format
+		COMMAND			t_format			ichannels_set		default_play_format
+		COMMAND			t_format			ibuffer_size_set	default_play_format
+		COMMAND			devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND			t_format			~
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-1007
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-1008
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-1008
+//! @SYMAPI			RMdaDevSound::SetRecordFormat(TCurrentSoundFormatBuf{ref});
+//!				RMdaDevSound::SetPlayFormat(TCurrentSoundFormatBuf{ref});
+//!				RMdaDevSound::GetRecordFormat(TCurrentSoundFormatBuf{ref});
+//!				RMdaDevSound::GetPlayFormat(TCurrentSoundFormatBuf{ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Set play format to valid record format. Set record format to some other valid play format 
+//!				(other than just set play format. Sampling rate should be different). 
+//!				
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call GetRecordFormat() and verify from [default_record_format]
+//!				4. Call SetPlayFormat with [another_valid_play_format]
+//!				5. Call GetPlayFormat() and verify from [another_valid_play_format]
+//!				6. Call SetRecordFormat with [valid_record_format]
+//!				7. Call GetRecordFormat() and verify from [valid_record_format]
+//!				8. Call SetRecordFormat with [default_record_format]
+//!				9. Call SetPlayFormat with [default_play_format]
+//!				10. Call Close().
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	SetPlayFormat in step 6 returns KErrAccessDenied 
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND			t_format			irate_get		default_play_format
+		COMMAND			t_format			iencoding_get		default_play_format
+		COMMAND			t_format			ichannels_get		default_play_format
+		COMMAND			t_format			ibuffer_size_get	default_play_format
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND			t_format			irate_get		default_record_format
+		COMMAND			t_format			iencoding_get		default_record_format
+		COMMAND			t_format			ichannels_get		default_record_format
+		COMMAND			t_format			ibuffer_size_get	default_record_format
+		//set some valid Play format
+		COMMAND			t_format			irate_set		another_valid_play_format
+		COMMAND			t_format			iencoding_set		another_valid_play_format
+		COMMAND			t_format			ichannels_set		another_valid_play_format
+		COMMAND			t_format			ibuffer_size_set	another_valid_play_format
+		COMMAND			devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify valid play configuration			
+		COMMAND			t_format			irate_get		another_valid_play_format
+		COMMAND			t_format			iencoding_get		another_valid_play_format
+		COMMAND			t_format			ichannels_get		another_valid_play_format
+		COMMAND			t_format			ibuffer_size_get	another_valid_play_format
+		//set some valid record format
+		COMMAND			t_format			irate_set		valid_record_format
+		COMMAND			t_format			iencoding_set		valid_record_format
+		COMMAND			t_format			ichannels_set		valid_record_format
+		COMMAND			t_format			ibuffer_size_set	valid_record_format
+		COMMAND	!Error=-21	devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify valid record configuration			
+		COMMAND			t_format			irate_get		valid_record_format
+		COMMAND			t_format			iencoding_get		valid_record_format
+		COMMAND			t_format			ichannels_get		valid_record_format
+		COMMAND			t_format			ibuffer_size_get	valid_record_format
+		// set back default record format
+		COMMAND			t_format			irate_set		default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set	default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		// set back default play format
+		COMMAND			t_format			irate_set		default_play_format
+		COMMAND			t_format			iencoding_set		default_play_format
+		COMMAND			t_format			ichannels_set		default_play_format
+		COMMAND			t_format			ibuffer_size_set	default_play_format
+		COMMAND			devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND			t_format			~
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-1008
+
+///////////////////////////////////////////
+// Playback functionality
+///////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-2001
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-2001
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus{ref}, const TDesC8{ref});
+//!				RMdaDevSound::CancelPlayData()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play sound, then cancel playing and verify playback status
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call PlayData() with valid sound data from [default_file_cancel]
+//!				4. Call CancelPlayData()
+//!				5. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playback canceled with KErrCancel
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND			t_format			irate_get		default_play_format
+		COMMAND			t_format			iencoding_get		default_play_format
+		COMMAND			t_format			ichannels_get		default_play_format
+		COMMAND			t_format			ibuffer_size_get	default_play_format
+		COMMAND !AsyncError=-3	devsound			PlayData		default_file_cancel
+		OUTSTANDING		
+		COMMAND			t_format  			~
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-2001
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-2002
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-2002
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus{ref}, const TDesC8{ref});
+//!				RMdaDevSound::PausePlayBuffer();
+//!				RMdaDevSound::ResumePlaying()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play sound, pause and resume playback.
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call PlayData() with valid sound data from [default_file]
+//!				4. Call PausePlayBuffer()
+//!				5. Resume playback with ResumePlaying()
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playback paused, resumed and finished w/o errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND			t_format			irate_get		default_play_format
+		COMMAND			t_format			iencoding_get		default_play_format
+		COMMAND			t_format			ichannels_get		default_play_format
+		COMMAND			t_format			ibuffer_size_get	default_play_format
+		COMMAND			devsound			PlayData		default_file
+		COMMAND			devsound			PausePlayBuffer
+		COMMAND			devsound			ResumePlaying		
+		OUTSTANDING	
+		COMMAND			t_format  			~
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-2002
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-2003
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-2003
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus{ref}, const TDesC8{ref});
+//!				RMdaDevSound::PausePlayBuffer();
+//!				RMdaDevSound::ResumePlaying()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play sound, pause and resume playback few times
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call PlayData() with valid sound data from [default_file]
+//!				4. Call PausePlayBuffer()
+//!				5. Resume playback with ResumePlaying()
+//!				6. Call PausePlayBuffer()
+//!				7. Resume playback with ResumePlaying()
+//!				8. Call PausePlayBuffer()
+//!				9. Resume playback with ResumePlaying()	
+//!				10. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playback paused, resumed and finished w/o errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND			t_format			irate_get		default_play_format
+		COMMAND			t_format			iencoding_get		default_play_format
+		COMMAND			t_format			ichannels_get		default_play_format
+		COMMAND			t_format			ibuffer_size_get	default_play_format
+		COMMAND			devsound			PlayData		default_file
+		COMMAND			devsound			PausePlayBuffer
+		COMMAND			devsound			ResumePlaying		
+		COMMAND			devsound			PausePlayBuffer
+		COMMAND			devsound			ResumePlaying		
+		COMMAND			devsound			PausePlayBuffer
+		COMMAND			devsound			ResumePlaying		
+		OUTSTANDING	
+		COMMAND			t_format  			~
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-2003
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-2004
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-2004
+//! @SYMAPI			RMdaDevSound::NotifyPlayError(TRequestStatus{ref});
+//!				RMdaDevSound::CancelNotifyPlayError()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute error notification while playing sound and cancel notification monitoring
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call NotifyPlayError() and starts waiting for a notification on the background
+//!				4. Call PlayData() with valid sound data from [default_file]
+//!				5. Call CancelNotifyPlayError()
+//!				6. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Notification monitoring canceled with KErrCancel status
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND			t_format			irate_get		default_play_format
+		COMMAND			t_format			iencoding_get		default_play_format
+		COMMAND			t_format			ichannels_get		default_play_format
+		COMMAND			t_format			ibuffer_size_get	default_play_format
+		COMMAND !AsyncError=-3	devsound			NotifyPlayError
+		COMMAND			devsound			PlayData		default_file
+		COMMAND			devsound			CancelNotifyPlayError
+		OUTSTANDING
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-2004
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-2005
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-2005
+//! @SYMAPI			RMdaDevSound::NotifyPlayError(TRequestStatus{ref});
+//!				RMdaDevSound::CancelNotifyPlayError()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute error notification without sound playing and cancel notification monitoring
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call NotifyPlayError() and starts waiting for a notification on the background
+//!				3. Call CancelNotifyPlayError()
+//!				4. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Notification monitoring canceled with KErrCancel status
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		COMMAND !AsyncError=-3	devsound			NotifyPlayError
+		COMMAND			devsound			CancelNotifyPlayError
+		OUTSTANDING			
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-2005
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-2006
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-2006
+//! @SYMAPI			RMdaDevSound::NotifyPlayError(TRequestStatus{ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute error notification and catch KErrUnderflow message when	playing zero-filled buffer
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call NotifyPlayError() and starts waiting for a notification on the background
+//!				4. Call PlayData() with zero-filled 32kb data
+//!				5. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Notification monitoring catched KErrUnderflow error and also play Playdata catches KErrNone
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND			t_format			irate_get		default_play_format
+		COMMAND			t_format			iencoding_get		default_play_format
+		COMMAND			t_format			ichannels_get		default_play_format
+		COMMAND			t_format			ibuffer_size_get	default_play_format
+		COMMAND			devsound			PlayData		zero_filled_32kb.raw
+		OUTSTANDING	
+		COMMAND			t_format  			~
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-2006
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-2007
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-2007
+//! @SYMAPI			RMdaDevSound::FlushPlayBuffer()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playback and flush sound buffer to stop playback
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call PlayData() with valid sound data from [default_file_flush]
+//!				4. Call FlushPlayBuffer()
+//!				5. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playback canceled with KErrCancel
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND			t_format			irate_get		default_play_format
+		COMMAND			t_format			iencoding_get		default_play_format
+		COMMAND			t_format			ichannels_get		default_play_format
+		COMMAND			t_format			ibuffer_size_get	default_play_format
+		COMMAND	!AsyncError=-3	devsound			PlayData		default_file_flush
+		OUTSTANDING		
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-2007
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-2008
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-2008
+//! @SYMAPI			RMdaDevSound::ResetBytesPlayed();
+//!				RMdaDevSound::BytesPlayed())
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Count and verify bytes played before and after playback
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call BytesPlayed(), expected value 0
+//!				4. Call ResetBytesPlayed()
+//!				5. Call BytesPlayed(), expected value 0
+//!				6. Call NotifyPlayError() //needed because otherwise PlayData() will not really stop after Outstanding
+//!				7. Call PlayData() with zero-filled 2-byte sound data
+//!				8. Call FlushPlayBuffer
+//!				9. Call BytesPlayed(), expected value is 2
+//!				10. Call ResetBytesPlayed()
+//!				11. Call BytesPlayed(), expected value 0
+//!				12. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	ResetBytesPlayed() resets the played bytes count and BytesPlayed() returns the number of bytes as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND			t_format			irate_get		default_play_format
+		COMMAND			t_format			iencoding_get		default_play_format
+		COMMAND			t_format			ichannels_get		default_play_format
+		COMMAND			t_format			ibuffer_size_get	default_play_format
+		COMMAND			devsound			BytesPlayed		bytes_played_expected_zero
+		COMMAND			devsound			ResetBytesPlayed
+		COMMAND			devsound			BytesPlayed		bytes_played_expected_zero
+		COMMAND !AsyncError=-10	devsound			NotifyPlayError
+		COMMAND			devsound			PlayData		zero_filled_2_bytes.raw
+		OUTSTANDING
+		COMMAND			devsound			FlushPlayBuffer
+		COMMAND			devsound			BytesPlayed		bytes_played_expected_2_bytes
+		COMMAND			devsound			ResetBytesPlayed
+		COMMAND			devsound			BytesPlayed		bytes_played_expected_zero
+		
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-2008
+
+///////////////////////////////////////////
+// Record functionality
+///////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-3001
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-3001
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus{ref}, const TDesC8{ref});
+//!				RMdaDevSound::CancelRecordData()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Record sound and cancel recording
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetRecordFormat() and verify from [default_record_format]
+//!				3. Call RecordData() with [record_data_32kb_cancel]
+//!				4. Call CancelRecordData()
+//!				5. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording canceled with KErrCancel
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND			t_format			irate_get		default_record_format
+		COMMAND			t_format			iencoding_get		default_record_format
+		COMMAND			t_format			ichannels_get		default_record_format
+		COMMAND			t_format			ibuffer_size_get	default_record_format
+		COMMAND	!AsyncError=-3	devsound			RecordData		record_data_32kb_cancel
+		OUTSTANDING
+		COMMAND			t_format  			~
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-3001
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-3002
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-3002
+//! @SYMAPI			RMdaDevSound::NotifyRecordError(TRequestStatus{ref});
+//!				RMdaDevSound::CancelNotifyRecordError()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute error notification, then record sound and cancel notification monitoring
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetRecordFormat() and verify from [default_record_format]
+//!				3. Call NotifyRecordError() and starts waiting for a notification on the background
+//!				4. Call RecordData()
+//!				5. Call CancelNotifyRecordError()
+//!				6. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Notification monitoring canceled with KErrCancel status
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND			t_format			irate_get		default_record_format
+		COMMAND			t_format			iencoding_get		default_record_format
+		COMMAND			t_format			ichannels_get		default_record_format
+		COMMAND			t_format			ibuffer_size_get	default_record_format
+		COMMAND !AsyncError=-3	devsound			NotifyRecordError
+		COMMAND			devsound			RecordData		record_data_32kb
+		COMMAND			devsound			CancelNotifyRecordError
+		OUTSTANDING
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-3002
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-3003
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-3003
+//! @SYMAPI			RMdaDevSound::NotifyRecordError(TRequestStatus{ref});
+//!				RMdaDevSound::CancelNotifyRecordError()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute error notification and cancel notification monitoring without recording
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call NotifyRecordError() and starts waiting for a notification on the background
+//!				3. Call CancelNotifyRecordError()
+//!				4. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Notification monitoring canceled with KErrCancel status
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		COMMAND !AsyncError=-3	devsound			NotifyRecordError
+		COMMAND			devsound			CancelNotifyRecordError
+		OUTSTANDING	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-3003
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-3004
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-3004
+//! @SYMAPI			RMdaDevSound::FlushRecordBuffer()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording and flush sound buffer to stop recording
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetRecordFormat() and verify from [default_record_format]
+//!				3. Call RecordData() with [record_data_32kb_flush]
+//!				4. Call FlushRecordBuffer()
+//!				5. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording stopped with KErrNone
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND			t_format			irate_get		default_record_format
+		COMMAND			t_format			iencoding_get		default_record_format
+		COMMAND			t_format			ichannels_get		default_record_format
+		COMMAND			t_format			ibuffer_size_get	default_record_format
+		COMMAND			devsound			RecordData		record_data_32kb_flush
+		OUTSTANDING		
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-3004
+
+///////////////////////////////////////////
+// Different audio types and encodings playback
+///////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4001
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4001
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm8 mono 8khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm8_mono_8khz_32kb]
+//!				3. Call PlayData() with valid sound data from [pcm8_mono_8khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm8_mono_8khz_32kb
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm8_mono_8khz_32kb
+		COMMAND		t_format				iencoding_set		set_settings_pcm8_mono_8khz_32kb
+		COMMAND		t_format				ichannels_set		set_settings_pcm8_mono_8khz_32kb
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm8_mono_8khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm8_mono_8khz_32kb_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm8_mono_8khz_32kb_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm8_mono_8khz_32kb_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm8_mono_8khz_32kb_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4001
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4002
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4002
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 mono 8khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_mono_8khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_mono_8khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_mono_8khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_mono_8khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_mono_8khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_mono_8khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_mono_8khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+		COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_mono_8khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_mono_8khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_mono_8khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_mono_8khz_expected
+		//!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format  				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4002
+
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4003
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4003
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 mono 11khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_mono_11khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_mono_11khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_mono_11khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_mono_11khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_mono_11khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_mono_11khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_mono_11khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+		COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_mono_11khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_mono_11khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_mono_11khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_mono_11khz_expected
+		//!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format  				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4003
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4004
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4004
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 mono 12khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_mono_12khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_mono_12khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_mono_12khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_mono_12khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_mono_12khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_mono_12khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_mono_12khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+		COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_mono_12khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_mono_12khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_mono_12khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_mono_12khz_expected
+		//!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4004
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4005
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4005
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 mono 16khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_mono_16khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_mono_16khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_mono_16khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_mono_16khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_mono_16khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_mono_16khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_mono_16khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+		COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_mono_16khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_mono_16khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_mono_16khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_mono_16khz_expected
+		//!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4005
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4006
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4006
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 mono 22khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_mono_22khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_mono_22khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_mono_22khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_mono_22khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_mono_22khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_mono_22khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_mono_22khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+		COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_mono_22khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_mono_22khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_mono_22khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_mono_22khz_expected
+		//!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4006
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4007
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4007
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 mono 24khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_mono_24khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_mono_24khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_mono_24khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_mono_24khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_mono_24khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_mono_24khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_mono_24khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_mono_24khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_mono_24khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_mono_24khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_mono_24khz_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4007
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4008
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4008
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 mono 32khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_mono_32khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_mono_32khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_mono_32khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_mono_32khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_mono_32khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_mono_32khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_mono_32khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_mono_32khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_mono_32khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_mono_32khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_mono_32khz_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4008
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4009
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4009
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 mono 44.1khz
+//!		
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_mono_44.1khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_mono_44.1khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_mono_44.1khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_mono_44.1khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_mono_44.1khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_mono_44.1khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_mono_44.1khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_mono_41.1khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_mono_41.1khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_mono_41.1khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_mono_41.1khz_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4009
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4010
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4010
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 mono 48khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_mono_48khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_mono_48khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_mono_48khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_mono_48khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_mono_48khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_mono_48khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_mono_48khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_mono_48khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_mono_48khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_mono_48khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_mono_48khz_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4010
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4011
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4011
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 stereo 8khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_stereo_8khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_stereo_8khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_stereo_8khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_stereo_8khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_stereo_8khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_stereo_8khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_stereo_8khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_stereo_8khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_stereo_8khz_expected	
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_stereo_8khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_stereo_8khz_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4011
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4012
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4012
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 stereo 11khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_stereo_11khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_stereo_11khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_stereo_11khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_stereo_11khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_stereo_11khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_stereo_11khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_stereo_11khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_stereo_11khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_stereo_11khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_stereo_11khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_stereo_11khz_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4012
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4013
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4013
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 stereo 12khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_stereo_12khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_stereo_12khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_stereo_12khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_stereo_12khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_stereo_12khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_stereo_12khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_stereo_12khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_stereo_12khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_stereo_12khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_stereo_12khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_stereo_12khz_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4013
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4014
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4014
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 stereo 16khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_stereo_16khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_stereo_16khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_stereo_16khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_stereo_16khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_stereo_16khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_stereo_16khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_stereo_16khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_stereo_16khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_stereo_16khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_stereo_16khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_stereo_16khz_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4014
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4015
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4015
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 stereo 22khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_stereo_22khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_stereo_22khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_stereo_22khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_stereo_22khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_stereo_22khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_stereo_22khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_stereo_22khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_stereo_22khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_stereo_22khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_stereo_22khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_stereo_22khz_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4015
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4016
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4016
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 stereo 24khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_stereo_24khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_stereo_24khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_stereo_24khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_stereo_24khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_stereo_24khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_stereo_24khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_stereo_24khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_stereo_24khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_stereo_24khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_stereo_24khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_stereo_24khz_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4016
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4017
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4017
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 stereo 32khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_stereo_32khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_stereo_32khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_stereo_32khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_stereo_32khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_stereo_32khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_stereo_32khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_stereo_32khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_stereo_32khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_stereo_32khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_stereo_32khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_stereo_32khz_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4017
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4018
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4018
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 stereo 44.1khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_stereo_44.1khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_stereo_44.1khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_stereo_44.1khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_stereo_44.1khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_stereo_44.1khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_stereo_44.1khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_stereo_44.1khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_stereo_44.1khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_stereo_44.1khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_stereo_44.1khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_stereo_44.1khz_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4018
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4019
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4019
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 stereo 48khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_stereo_48khz]
+//!				3. Call PlayData() with valid sound data from [pcm16_stereo_48khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_stereo_48khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_stereo_48khz
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_stereo_48khz
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_stereo_48khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_stereo_48khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_stereo_48khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_stereo_48khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_stereo_48khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_stereo_48khz_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4019
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4020
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4020
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in alaw8 mono 8khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_alaw8bit_mono_8khz]
+//!				3. Call PlayData() with valid sound data from [alaw8bit_mono_8khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_alaw8bit_mono_8khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_alaw8bit_mono_8khz
+		COMMAND		t_format				iencoding_set		set_settings_alaw8bit_mono_8khz
+		COMMAND		t_format				ichannels_set		set_settings_alaw8bit_mono_8khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		alaw8bit_mono_8khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_alaw8bit_mono_8khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_alaw8bit_mono_8khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_alaw8bit_mono_8khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_alaw8bit_mono_8khz_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4020
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4021
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4021
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in alaw8 stereo 24khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_alaw8bit_stereo_24khz]
+//!				3. Call PlayData() with valid sound data from [alaw8bit_stereo_24khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_alaw8bit_stereo_24khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_alaw8bit_stereo_24khz
+		COMMAND		t_format				iencoding_set		set_settings_alaw8bit_stereo_24khz
+		COMMAND		t_format				ichannels_set		set_settings_alaw8bit_stereo_24khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		alaw8bit_stereo_24khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_alaw8bit_stereo_24khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_alaw8bit_stereo_24khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_alaw8bit_stereo_24khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_alaw8bit_stereo_24khz_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4021
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4022
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4022
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in mulaw8 mono 12khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_mulaw8bit_mono_12khz]
+//!				3. Call PlayData() with valid sound data from [mulaw8bit_mono_12khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_mulaw8bit_mono_12khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_mulaw8bit_mono_12khz
+		COMMAND		t_format				iencoding_set		set_settings_mulaw8bit_mono_12khz
+		COMMAND		t_format				ichannels_set		set_settings_mulaw8bit_mono_12khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		mulaw8bit_mono_12khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_mulaw8bit_mono_12khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_mulaw8bit_mono_12khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_mulaw8bit_mono_12khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_mulaw8bit_mono_12khz_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4022
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4023
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4023
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in mulaw8 stereo 32khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_mulaw8bit_stereo_32khz]
+//!				3. Call PlayData() with valid sound data from [mulaw8bit_stereo_32khz_32kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_mulaw8bit_stereo_32khz
+		COMMAND		t_format				ibuffer_size_set		set_settings_mulaw8bit_stereo_32khz
+		COMMAND		t_format				iencoding_set		set_settings_mulaw8bit_stereo_32khz
+		COMMAND		t_format				ichannels_set		set_settings_mulaw8bit_stereo_32khz
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		mulaw8bit_stereo_32khz_32kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_mulaw8bit_stereo_32khz_expected
+		COMMAND		t_format				iencoding_get		set_settings_mulaw8bit_stereo_32khz_expected
+		COMMAND		t_format				ichannels_get		set_settings_mulaw8bit_stereo_32khz_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_mulaw8bit_stereo_32khz_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4023
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-4024
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-4024
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute playing audio in pcm16 stereo 24khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_set_settings_pcm16_stereo_24khz_320kb]
+//!				3. Call PlayData() with valid sound data from [pcm16_stereo_24khz_320kb.raw]
+//!				4. Call FlushPlayBuffer
+//!				5. Call GetPlayFormat() and verify the sound found configuration
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100					t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound				devsound
+		COMMAND		devsound				new
+		COMMAND		devsound				Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat			t_format		
+		COMMAND		t_format				new
+		COMMAND		t_format				irate_set			set_settings_pcm16_stereo_24khz_320kb
+		COMMAND		t_format				ibuffer_size_set		set_settings_pcm16_stereo_24khz_320kb
+		COMMAND		t_format				iencoding_set		set_settings_pcm16_stereo_24khz_320kb
+		COMMAND		t_format				ichannels_set		set_settings_pcm16_stereo_24khz_320kb
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				PlayData		pcm16_stereo_24khz_320kb.raw
+		OUTSTANDING
+		COMMAND		devsound				FlushPlayBuffer
+                COMMAND		devsound				GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		COMMAND		t_format				irate_get			set_settings_pcm16_stereo_24khz_320kb_expected
+		COMMAND		t_format				iencoding_get		set_settings_pcm16_stereo_24khz_320kb_expected
+		COMMAND		t_format				ichannels_get		set_settings_pcm16_stereo_24khz_320kb_expected
+		COMMAND		t_format				ibuffer_size_get		set_settings_pcm16_stereo_24khz_320kb_expected
+                //!set back default play configuration
+		COMMAND		t_format				irate_set			default_play_format
+		COMMAND		t_format				iencoding_set		default_play_format
+		COMMAND		t_format				ichannels_set		default_play_format
+		COMMAND		t_format				ibuffer_size_set		default_play_format
+		COMMAND		devsound				SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound				SetPlayVolume		default_play_volume
+		COMMAND		t_format				~
+		COMMAND		devsound				Close
+		COMMAND		devsound				~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-4024
+
+///////////////////////////////////////////
+// Recording with different audio formats and types
+///////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5001
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5001
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm8 mono 8khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm8_mono_8khz_32kb]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm8_mono_8khz_32kb
+		COMMAND			t_format			iencoding_set		set_settings_pcm8_mono_8khz_32kb
+		COMMAND			t_format			ichannels_set		set_settings_pcm8_mono_8khz_32kb
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm8_mono_8khz_32kb
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm8_mono_8khz_32kb_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm8_mono_8khz_32kb_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm8_mono_8khz_32kb_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm8_mono_8khz_32kb_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5001
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5002
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5002
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 mono 8khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_mono_8khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_mono_8khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_mono_8khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_mono_8khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_mono_8khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_mono_8khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_mono_8khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_mono_8khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_mono_8khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5002
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5003
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5003
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 mono 11khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_mono_11khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_mono_11khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_mono_11khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_mono_11khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_mono_11khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_mono_11khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_mono_11khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_mono_11khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_mono_11khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5003
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5004
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5004
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 mono 12khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_mono_12khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_mono_12khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_mono_12khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_mono_12khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_mono_12khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_mono_12khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_mono_12khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_mono_12khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_mono_12khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5004
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5005
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5005
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 mono 16khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_mono_16khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_mono_16khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_mono_16khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_mono_16khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_mono_16khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_mono_16khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_mono_16khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_mono_16khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_mono_16khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5005
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5006
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5006
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 mono 22khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_mono_22khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_mono_22khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_mono_22khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_mono_22khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_mono_22khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_mono_22khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_mono_22khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_mono_22khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_mono_22khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5006
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5007
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5007
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 mono 24khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_mono_24khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_mono_24khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_mono_24khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_mono_24khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_mono_24khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_mono_24khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_mono_24khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_mono_24khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_mono_24khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5007
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5008
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5008
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 mono 32khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_mono_32khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_mono_32khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_mono_32khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_mono_32khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_mono_32khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_mono_32khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_mono_32khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_mono_32khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_mono_32khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5008
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5009
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5009
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 mono 44.1khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_mono_44.1khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_mono_44.1khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_mono_44.1khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_mono_44.1khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_mono_44.1khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_mono_41.1khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_mono_41.1khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_mono_41.1khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_mono_41.1khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5009
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5010
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5010
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 mono 48khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_mono_48khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_mono_48khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_mono_48khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_mono_48khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_mono_48khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_mono_48khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_mono_48khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_mono_48khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_mono_48khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5010
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5011
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5011
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 stereo 8khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_stereo_8khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_stereo_8khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_stereo_8khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_stereo_8khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_stereo_8khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_stereo_8khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_stereo_8khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_stereo_8khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_stereo_8khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5011
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5012
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5012
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 stereo 11khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_stereo_11khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_stereo_11khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_stereo_11khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_stereo_11khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_stereo_11khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_stereo_11khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_stereo_11khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_stereo_11khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_stereo_11khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5012
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5013
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5013
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 stereo 12khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_stereo_12khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_stereo_12khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_stereo_12khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_stereo_12khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_stereo_12khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_stereo_12khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_stereo_12khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_stereo_12khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_stereo_12khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5013
+
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5014
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5014
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 stereo 16khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_stereo_16khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_stereo_16khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_stereo_16khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_stereo_16khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_stereo_16khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_stereo_16khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_stereo_16khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_stereo_16khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_stereo_16khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5014
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5015
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5015
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 stereo 22khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_stereo_22khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_stereo_22khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_stereo_22khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_stereo_22khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_stereo_22khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_stereo_22khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_stereo_22khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_stereo_22khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_stereo_22khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5015
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5016
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5016
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 stereo 24khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_stereo_24khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_stereo_24khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_stereo_24khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_stereo_24khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_stereo_24khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_stereo_24khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_stereo_24khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_stereo_24khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_stereo_24khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5016
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5017
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5017
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 stereo 32khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_stereo_32khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_stereo_32khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_stereo_32khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_stereo_32khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_stereo_32khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_stereo_32khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_stereo_32khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_stereo_32khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_stereo_32khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5017
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5018
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5018
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 stereo 44.1khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_stereo_44.1khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_stereo_44.1khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_stereo_44.1khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_stereo_44.1khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_stereo_44.1khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_stereo_44.1khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_stereo_44.1khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_stereo_44.1khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_stereo_44.1khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5018
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5019
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5019
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 stereo 48khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_stereo_48khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_stereo_48khz
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_stereo_48khz
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_stereo_48khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_stereo_48khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_stereo_48khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_stereo_48khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_stereo_48khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_stereo_48khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5019
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5020
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5020
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in alaw8bit mono 8khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_alaw8bit_mono_8khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_alaw8bit_mono_8khz
+		COMMAND			t_format			iencoding_set		set_settings_alaw8bit_mono_8khz
+		COMMAND			t_format			ichannels_set		set_settings_alaw8bit_mono_8khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_alaw8bit_mono_8khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_alaw8bit_mono_8khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_alaw8bit_mono_8khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_alaw8bit_mono_8khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_alaw8bit_mono_8khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5020
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5021
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5021
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in alaw8bit stereo 8khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_alaw8bit_stereo_24khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_alaw8bit_stereo_24khz
+		COMMAND			t_format			iencoding_set		set_settings_alaw8bit_stereo_24khz
+		COMMAND			t_format			ichannels_set		set_settings_alaw8bit_stereo_24khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_alaw8bit_stereo_24khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_alaw8bit_stereo_24khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_alaw8bit_stereo_24khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_alaw8bit_stereo_24khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_alaw8bit_stereo_24khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5021
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5022
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5022
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in mulaw8bit mono 12khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_mulaw8bit_mono_12khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_mulaw8bit_mono_12khz
+		COMMAND			t_format			iencoding_set		set_settings_mulaw8bit_mono_12khz
+		COMMAND			t_format			ichannels_set		set_settings_mulaw8bit_mono_12khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_mulaw8bit_mono_12khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_mulaw8bit_mono_12khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_mulaw8bit_mono_12khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_mulaw8bit_mono_12khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_mulaw8bit_mono_12khz_expected
+		//!set back default record configuration
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5022
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5023
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5023
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in mulaw8bit stereo 32khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_mulaw8bit_stereo_32khz]
+//!				3. Call RecordData() with values from [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_mulaw8bit_stereo_32khz
+		COMMAND			t_format			iencoding_set		set_settings_mulaw8bit_stereo_32khz
+		COMMAND			t_format			ichannels_set		set_settings_mulaw8bit_stereo_32khz
+		COMMAND			t_format			ibuffer_size_set		set_settings_mulaw8bit_stereo_32khz
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_mulaw8bit_stereo_32khz_expected
+		COMMAND			t_format			iencoding_get		set_settings_mulaw8bit_stereo_32khz_expected
+		COMMAND			t_format			ichannels_get		set_settings_mulaw8bit_stereo_32khz_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_mulaw8bit_stereo_32khz_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5023
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-5024
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-5024
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Execute recording audio in pcm16 stereo 24khz
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [set_set_settings_pcm16_stereo_24khz_320kb]
+//!				3. Call RecordData() with values from [record_data_320kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call GetRecordFormat() to verify sound format
+//!				6. Restore initial sound h/w configuration
+//!				7. Call Close()
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Recording completes without any errors, sound format is set and verified
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		//!set default play configuration
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new			
+		COMMAND			t_format			irate_set			set_settings_pcm16_stereo_24khz_320kb
+		COMMAND			t_format			iencoding_set		set_settings_pcm16_stereo_24khz_320kb
+		COMMAND			t_format			ichannels_set		set_settings_pcm16_stereo_24khz_320kb
+		COMMAND			t_format			ibuffer_size_set		set_settings_pcm16_stereo_24khz_320kb
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			RecordData		record_data_320kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		COMMAND			t_format			irate_get			set_settings_pcm16_stereo_24khz_320kb_expected
+		COMMAND			t_format			iencoding_get		set_settings_pcm16_stereo_24khz_320kb_expected
+		COMMAND			t_format			ichannels_get		set_settings_pcm16_stereo_24khz_320kb_expected
+		COMMAND			t_format			ibuffer_size_get		set_settings_pcm16_stereo_24khz_320kb_expected
+		//!set back default play configuration
+		COMMAND			t_format			irate_set			default_record_format
+		COMMAND			t_format			iencoding_set		default_record_format
+		COMMAND			t_format			ichannels_set		default_record_format
+		COMMAND			t_format			ibuffer_size_set		default_record_format
+		COMMAND			devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format  			~	
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-5024
+
+/////////////////////////////////////////////
+// Play format changing scenarios
+/////////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7001
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7001
+//! @SYMAPI			RMdaDevSound::SetPlayFormat(TCurrentSoundFormatBuf {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Set valid play format without calling FlushPlayBuffer() after PlayData() has been called first.
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and berify from [default_play_format]
+//!				3. Call PlayData() with valid sound data from [default_file]
+//!				4. Call SetPlayFormat() with default value from [default_play_format]
+//!				5. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Calling SetPlayFormat() returns KErrNone in step 4.
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND		devsound			PlayData		default_file
+		OUTSTANDING
+		COMMAND		devsound			FlushPlayBuffer
+		//!set default play configuration			
+		COMMAND		t_format			irate_set		default_play_format
+		COMMAND		t_format			iencoding_set		default_play_format
+		COMMAND		t_format			ichannels_set		default_play_format
+		COMMAND		t_format			ibuffer_size_set	default_play_format
+		COMMAND		devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7001
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7002
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7002
+//! @SYMAPI			RMdaDevSound::SetPlayFormat(TCurrentSoundFormatBuf {ref});
+//!				RMdaDevSound::CancelPlayData()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Set valid play format without calling FlushPlayBuffer() after PlayData() has been called first, 
+//!				but instead call CancelPlayData() while PlayData() is still ongoing. 
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call PlayData() with valid sound data from [default_file_cancel]
+//!				4. Call CancelPlayData()
+//!				5. Call SetPlayFormat() with default value from [default_play_format]
+//!				6. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Calling SetPlayFormat() returns KErrNone in step 5 and PlayData returns KErrCancel in step 3.
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND	!AsyncError=-3	devsound			PlayData		default_file_cancel
+		OUTSTANDING
+		//!set default play configuration			
+		COMMAND		t_format			irate_set		default_play_format
+		COMMAND		t_format			iencoding_set		default_play_format
+		COMMAND		t_format			ichannels_set		default_play_format
+		COMMAND		t_format			ibuffer_size_set	default_play_format
+		COMMAND		devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7002
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7003
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7003
+//! @SYMAPI			RMdaDevSound::SetPlayFormat(TCurrentSoundFormatBuf {ref});
+//!				RMdaDevSound::CancelPlayData()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Set valid play format without calling FlushPlayBuffer() after PlayData() has been called first, 
+//!				but instaed call CancelPlayData() after PlayData()
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call NotifyPlayError() //needed because otherwise PlayData() will not really stop after Outstanding
+//!				4. Call PlayData() with valid sound data from [default_file]
+//!				5. Call CancelPlayData()
+//!				6. Call SetPlayFormat() with default value from [default_play_format]
+//!				7. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Calling SetPlayFormat() returns KErrNone in step 5 and PlayData returns KErrNone in step 3.
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND !AsyncError=-10	devsound			NotifyPlayError
+		COMMAND		devsound			PlayData		default_file
+		OUTSTANDING
+		COMMAND		devsound			CancelPlayData
+		//!set default play configuration			
+		COMMAND		t_format			irate_set		default_play_format
+		COMMAND		t_format			iencoding_set		default_play_format
+		COMMAND		t_format			ichannels_set		default_play_format
+		COMMAND		t_format			ibuffer_size_set	default_play_format
+		COMMAND		devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7003
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7004
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7004
+//! @SYMAPI			RMdaDevSound::SetPlayFormat(TCurrentSoundFormatBuf {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Set invalid play format 3 times in a row and then call PlayData()
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with default value from [invalid_play_format]
+//!				3. Call SetPlayFormat() with default value from [invalid_play_format]
+//!				4. Call SetPlayFormat() with default value from [invalid_play_format]
+//!				5. Call PlayData() with valid sound data from [default_file]
+//!				6. Call SetPlayFormat() with default value from [default_play_format]
+//!				7. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	SetPlayFormat returns KErrNotSupported every time when executing it 3 times in a row
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		t_format			irate_set		unsupported_play_format
+		COMMAND		t_format			iencoding_set		unsupported_play_format
+		COMMAND		t_format			ichannels_set		unsupported_play_format
+		COMMAND		t_format			ibuffer_size_set	unsupported_play_format
+		COMMAND	!Error=-5	devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		t_format			irate_set		unsupported_play_format
+		COMMAND		t_format			iencoding_set		unsupported_play_format
+		COMMAND		t_format			ichannels_set		unsupported_play_format
+		COMMAND		t_format			ibuffer_size_set	unsupported_play_format
+		COMMAND	!Error=-5	devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		t_format			irate_set		unsupported_play_format
+		COMMAND		t_format			iencoding_set		unsupported_play_format
+		COMMAND		t_format			ichannels_set		unsupported_play_format
+		COMMAND		t_format			ibuffer_size_set	unsupported_play_format
+		COMMAND	!Error=-5	devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound			PlayData		default_file
+		OUTSTANDING
+		//!set default play configuration			
+		COMMAND		devsound			FlushPlayBuffer
+		COMMAND		t_format			irate_set		default_play_format
+		COMMAND		t_format			iencoding_set		default_play_format
+		COMMAND		t_format			ichannels_set		default_play_format
+		COMMAND		t_format			ibuffer_size_set	default_play_format
+		COMMAND		devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7004
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7005
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7005
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RMdaDevSound::SetPlayFormat(TCurrentSoundFormatBuf {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call SetPlayFormat() with valid play format when audio is still playing
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call NotifyPlayError() //needed because otherwise PlayData() will not really stop after Outstanding
+//!				4. Call PlayData() with valid sound data from [default_file]
+//!				5. Call SetPlayFormat() with default value from [default_play_format] while audio is still playing
+//!				6. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	SetPlayFormat in step 4 returns KErrInUse 
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND !AsyncError=-10	devsound			NotifyPlayError
+		COMMAND		devsound			PlayData		default_file
+		//!set default play configuration			
+		COMMAND		t_format			irate_set		default_play_format
+		COMMAND		t_format			iencoding_set		default_play_format
+		COMMAND		t_format			ichannels_set		default_play_format
+		COMMAND		t_format			ibuffer_size_set	default_play_format
+		COMMAND	!Error=-14	devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7005
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7006
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7006
+//! @SYMAPI			RMdaDevSound::SetPlayFormat(TCurrentSoundFormatBuf {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call SetPlayFormat() with valid values but with invalid iEncoding (out of accepted range)
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with default value from [default_play_format_invalid_encoding]
+//!				3. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	SetPlayFormat in step 4 returns KErrNotSupproted
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		default_play_format
+		COMMAND		t_format			iencoding_set		default_play_format_invalid_encoding
+		COMMAND		t_format			ichannels_set		default_play_format
+		COMMAND		t_format			ibuffer_size_set	default_play_format
+		COMMAND	!Error=-5	devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7006
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7007
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7007
+//! @SYMAPI			RMdaDevSound::SetPlayFormat(TCurrentSoundFormatBuf {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call SetPlayFormat() with valid values but with invalid iRate (out of accepted range)
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with default value from [default_play_format_invalid_rate]
+//!				3. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	SetPlayFormat in step 4 returns KErrNotSupproted
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		default_play_format_invalid_rate
+		COMMAND		t_format			iencoding_set		default_play_format
+		COMMAND		t_format			ichannels_set		default_play_format
+		COMMAND		t_format			ibuffer_size_set	default_play_format
+		COMMAND	!Error=-5	devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7007
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7008
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7008
+//! @SYMAPI			RMdaDevSound::SetPlayFormat(TCurrentSoundFormatBuf {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call SetPlayFormat() with valid values but with invalid iBufferSize (out of accepted range)
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with default value from [default_play_format_invalid_buffer_size]
+//!				3. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	SetPlayFormat in step 4 returns KErrNotSupproted
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		default_play_format
+		COMMAND		t_format			iencoding_set		default_play_format
+		COMMAND		t_format			ichannels_set		default_play_format
+		COMMAND		t_format			ibuffer_size_set	default_play_format_invalid_buffer_size
+		COMMAND	!Error=-5	devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7008
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7009
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7009
+//! @SYMAPI			RMdaDevSound::SetPlayFormat(TCurrentSoundFormatBuf {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call SetPlayFormat() with valid values but with invalid iChannels (out of accepted range)
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with default value from [default_play_format_invalid_channels]
+//!				3. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	SetPlayFormat in step 4 returns KErrNotSupproted
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		default_play_format
+		COMMAND		t_format			iencoding_set		default_play_format
+		COMMAND		t_format			ichannels_set		default_play_format_invalid_channels
+		COMMAND		t_format			ibuffer_size_set	default_play_format
+		COMMAND	!Error=-5	devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7009
+
+/////////////////////////////////////////////
+// Record format changing scenarios
+/////////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7011
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7011
+//! @SYMAPI			RMdaDevSound::SetRecordFormat(TCurrentSoundFormatBuf {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Set valid record format without calling FlushRecordBuffer() after RecordData() has been called first.
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetRecordFormat() and verify from [default_record_format]
+//!				3. Call RecordData() with [record_data_32kb]
+//!				4. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				5. Call SetRecordFormat() with default value from [default_record_format]
+//!				6. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Calling SetRecordFormat() returns KErrNone in step 4.
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND		t_format			irate_get		default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get	default_record_format
+		COMMAND		devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		//!set default record configuration			
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND		t_format			irate_set		default_record_format
+		COMMAND		t_format			iencoding_set		default_record_format
+		COMMAND		t_format			ichannels_set		default_record_format
+		COMMAND		t_format			ibuffer_size_set	default_record_format
+		COMMAND		devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7011
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7012
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7012
+//! @SYMAPI			RMdaDevSound::SetRecordFormat(TCurrentSoundFormatBuf {ref});
+//!				RMdaDevSound::CancelRecordData()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Set valid record format without calling FlushRecordBuffer() after RecordData() has been called first,
+//!				but instaed call CancelRecordData() while RecordData() is still ongoing
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetRecordFormat() and verify from [default_record_format]
+//!				3. Call RecordData() with [record_data_32kb_cancel]
+//!				5. Call CancelRecordData()
+//!				6. Call SetRecordFormat() with default value from [default_record_format]
+//!				7. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Calling SetRecordFormat() returns KErrNone in step 5 and RecordData returns KErrCancel in step 3.
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND		t_format			irate_get		default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get	default_record_format
+		COMMAND	!AsyncError=-3	devsound			RecordData		record_data_32kb_cancel
+		OUTSTANDING
+		//!set default record configuration			
+		COMMAND		t_format			irate_set		default_record_format
+		COMMAND		t_format			iencoding_set		default_record_format
+		COMMAND		t_format			ichannels_set		default_record_format
+		COMMAND		t_format			ibuffer_size_set	default_record_format
+		COMMAND		devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7012
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7013
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7013
+//! @SYMAPI			RMdaDevSound::SetRecordFormat(TCurrentSoundFormatBuf {ref});
+//!				RMdaDevSound::CancelRecordData()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Set valid record format without calling FlushRecordBuffer() after RecordData() has been called first,
+//!				but instaed call CancelRecordData() after RecordData()
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetRecordFormat() and verify from [default_record_format]
+//!				3. Call NotifyRecordError() //needed because otherwise RecordData() will not really stop after Outstanding
+//!				4. Call RecordData()
+//!				5. Call CancelRecordData()
+//!				6. Call SetRecordFormat() with default value from [default_record_format]
+//!				7. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Calling SetRecordFormat() returns KErrNone in step 5 and RecordData returns KErrNone in step 3.
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND		t_format			irate_get		default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get	default_record_format
+		COMMAND !AsyncError=-9	devsound			NotifyRecordError
+		COMMAND		devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND		devsound			CancelRecordData
+		//!set default record configuration			
+		COMMAND		t_format			irate_set		default_record_format
+		COMMAND		t_format			iencoding_set		default_record_format
+		COMMAND		t_format			ichannels_set		default_record_format
+		COMMAND		t_format			ibuffer_size_set	default_record_format
+		COMMAND		devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7013
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7014
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7014
+//! @SYMAPI			RMdaDevSound::SetPlayFormat(TCurrentSoundFormatBuf {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Set invalid record format 3 times in a row and then call RecordData()
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [invalid_record_format]
+//!				3. Call SetRecordFormat() with default value from [invalid_record_format]
+//!				4. Call SetRecordFormat() with default value from [invalid_record_format]
+//!				5. Call RecordData()
+//!				6. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				7. Call SetRecordFormat() with default value from [default_record_format]
+//!				8. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	SetRecordFormat returns KErrNotSupported every time when executing it 3 times in a row
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		//!set unsupported record configuration			
+		COMMAND		t_format			irate_set		unsupported_record_format
+		COMMAND		t_format			iencoding_set		unsupported_record_format
+		COMMAND		t_format			ichannels_set		unsupported_record_format
+		COMMAND		t_format			ibuffer_size_set	unsupported_record_format
+		COMMAND	!Error=-5	devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		//!set unsupported record configuration			
+		COMMAND		t_format			irate_set		unsupported_record_format
+		COMMAND		t_format			iencoding_set		unsupported_record_format
+		COMMAND		t_format			ichannels_set		unsupported_record_format
+		COMMAND		t_format			ibuffer_size_set	unsupported_record_format
+		COMMAND	!Error=-5	devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		//!set unsupported record configuration			
+		COMMAND		t_format			irate_set		unsupported_record_format
+		COMMAND		t_format			iencoding_set		unsupported_record_format
+		COMMAND		t_format			ichannels_set		unsupported_record_format
+		COMMAND		t_format			ibuffer_size_set	unsupported_record_format
+		COMMAND	!Error=-5	devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND		devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		//!set default record configuration			
+		COMMAND		t_format			irate_set		default_record_format
+		COMMAND		t_format			iencoding_set		default_record_format
+		COMMAND		t_format			ichannels_set		default_record_format
+		COMMAND		t_format			ibuffer_size_set	default_record_format
+		COMMAND		devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7014
+
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7015
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7015
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref});
+//!				RMdaDevSound::SetRecordFormat(TCurrentSoundFormatBuf {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call SetRecordFormat() with valid record format when audio is still being recorded
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetRecordFormat() and verify from [default_record_format]
+//!				3. Call RecordData() to record 32kb
+//!				4. Call SetRecordFormat() with default value from [default_record_format] while audio is still being recorded
+//!				5. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	SetPlayFormat in step 4 returns KErrInUse 
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND		t_format			irate_get		default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get	default_record_format		
+		COMMAND		devsound			RecordData		record_data_32kb
+		//!set default record configuration			
+		COMMAND		t_format			irate_set		default_record_format
+		COMMAND		t_format			iencoding_set		default_record_format
+		COMMAND		t_format			ichannels_set		default_record_format
+		COMMAND		t_format			ibuffer_size_set	default_record_format
+		COMMAND	!Error=-14	devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7015
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7016
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7016
+//! @SYMAPI			RMdaDevSound::SetRecordFormat(TCurrentSoundFormatBuf {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call SetRecordFormat() with valid values but with invalid iEncoding (out of accepted range)
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [default_record_format_invalid_encoding]
+//!				3. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	SetRecordFormat in step 4 returns KErrNotSupproted
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		default_record_format
+		COMMAND		t_format			iencoding_set		default_record_format_invalid_encoding
+		COMMAND		t_format			ichannels_set		default_record_format
+		COMMAND		t_format			ibuffer_size_set	default_record_format
+		COMMAND	!Error=-5	devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7016
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7017
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7017
+//! @SYMAPI			RMdaDevSound::SetRecordFormat(TCurrentSoundFormatBuf {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call SetRecordFormat() with valid values but with invalid iRate (out of accepted range)
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [default_record_format_invalid_rate]
+//!				3. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	SetRecordFormat in step 4 returns KErrNotSupproted
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		default_record_format_invalid_rate
+		COMMAND		t_format			iencoding_set		default_record_format
+		COMMAND		t_format			ichannels_set		default_record_format
+		COMMAND		t_format			ibuffer_size_set	default_record_format
+		COMMAND	!Error=-5	devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7017
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7018
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7018
+//! @SYMAPI			RMdaDevSound::SetRecordFormat(TCurrentSoundFormatBuf {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call SetRecordFormat() with valid values but with invalid iBufferSize (out of accepted range)
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [default_record_format_invalid_buffer_size]
+//!				3. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	SetRecordFormat in step 4 returns KErrNotSupproted
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		default_record_format
+		COMMAND		t_format			iencoding_set		default_record_format
+		COMMAND		t_format			ichannels_set		default_record_format
+		COMMAND		t_format			ibuffer_size_set	default_record_format_invalid_buffer_size
+		COMMAND	!Error=-5	devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7018
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7019
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7019
+//! @SYMAPI			RMdaDevSound::SetRecordFormat(TCurrentSoundFormatBuf {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call SetRecordFormat() with valid values but with invalid iChannels (out of accepted range)
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with default value from [default_record_format_invalid_channels]
+//!				3. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	SetRecordFormat in step 4 returns KErrNotSupproted
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		default_record_format
+		COMMAND		t_format			iencoding_set		default_record_format
+		COMMAND		t_format			ichannels_set		default_record_format_invalid_channels
+		COMMAND		t_format			ibuffer_size_set	default_record_format
+		COMMAND	!Error=-5	devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7019
+
+/////////////////////////////////////////////
+// Playback with different buffer size
+/////////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7021
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7021
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play audio with minimal buffer size supported in PCM8
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_settings_pcm8_mono_8khz_32kb_min_buffer]
+//!				3. Call PlayData() with valid sound data from [pcm8_mono_8khz_32kb.raw]
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is played without any errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		set_settings_pcm8_mono_8khz_32kb_min_buffer
+		COMMAND		t_format			iencoding_set		set_settings_pcm8_mono_8khz_32kb_min_buffer
+		COMMAND		t_format			ichannels_set		set_settings_pcm8_mono_8khz_32kb_min_buffer
+		COMMAND		t_format			ibuffer_size_set	set_settings_pcm8_mono_8khz_32kb_min_buffer
+		COMMAND		devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound  			PlayData		pcm8_mono_8khz_32kb.raw
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7021
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7022
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7022
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play audio with max buffer size supported in PCM8
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_settings_pcm8_mono_8khz_32kb_max_buffer]
+//!				3. Call PlayData() with valid sound data from [pcm8_mono_8khz_32kb.raw]
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is played without any errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		set_settings_pcm8_mono_8khz_32kb_max_buffer
+		COMMAND		t_format			iencoding_set		set_settings_pcm8_mono_8khz_32kb_max_buffer
+		COMMAND		t_format			ichannels_set		set_settings_pcm8_mono_8khz_32kb_max_buffer
+		COMMAND		t_format			ibuffer_size_set	set_settings_pcm8_mono_8khz_32kb_max_buffer
+		COMMAND		devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound  			PlayData		pcm8_mono_8khz_32kb.raw
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7022
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7023
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7023
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play audio with minimal buffer size supported in PCM16
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_settings_pcm16_mono_8khz_32kb_min_buffer]
+//!				3. Call PlayData() with valid sound data from [pcm16_mono_8khz_32kb.raw]
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is played without any errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		set_settings_pcm16_mono_8khz_32kb_min_buffer
+		COMMAND		t_format			iencoding_set		set_settings_pcm16_mono_8khz_32kb_min_buffer
+		COMMAND		t_format			ichannels_set		set_settings_pcm16_mono_8khz_32kb_min_buffer
+		COMMAND		t_format			ibuffer_size_set	set_settings_pcm16_mono_8khz_32kb_min_buffer
+		COMMAND		devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound  			PlayData		pcm16_mono_8khz_32kb.raw
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK		 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7023
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7024
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7024
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play audio with max buffer size supported in PCM16
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_settings_pcm16_mono_8khz_32kb_max_buffer]
+//!				3. Call PlayData() with valid sound data from [pcm16_mono_8khz_32kb.raw]
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is played without any errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		set_settings_pcm16_mono_8khz_32kb_max_buffer
+		COMMAND		t_format			iencoding_set		set_settings_pcm16_mono_8khz_32kb_max_buffer
+		COMMAND		t_format			ichannels_set		set_settings_pcm16_mono_8khz_32kb_max_buffer
+		COMMAND		t_format			ibuffer_size_set	set_settings_pcm16_mono_8khz_32kb_max_buffer
+		COMMAND		devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound  			PlayData		pcm16_mono_8khz_32kb.raw
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK		 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7024
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7025
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7025
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play audio with minimal buffer size supported in ALaw
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_settings_alaw8bit_mono_8khz_min_buffer]
+//!				3. Call PlayData() with valid sound data from [alaw8bit_mono_8khz_32kb.raw]
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is played without any errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		set_settings_alaw8bit_mono_8khz_min_buffer
+		COMMAND		t_format			iencoding_set		set_settings_alaw8bit_mono_8khz_min_buffer
+		COMMAND		t_format			ichannels_set		set_settings_alaw8bit_mono_8khz_min_buffer
+		COMMAND		t_format			ibuffer_size_set	set_settings_alaw8bit_mono_8khz_min_buffer
+		COMMAND		devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound  			PlayData		alaw8bit_mono_8khz_32kb.raw
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7025
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7026
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7026
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play audio with max buffer size supported in ALaw
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_settings_alaw8bit_mono_8khz_max_buffer]
+//!				3. Call PlayData() with valid sound data from [alaw8bit_mono_8khz_32kb.raw]
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is played without any errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		set_settings_alaw8bit_mono_8khz_max_buffer
+		COMMAND		t_format			iencoding_set		set_settings_alaw8bit_mono_8khz_max_buffer
+		COMMAND		t_format			ichannels_set		set_settings_alaw8bit_mono_8khz_max_buffer
+		COMMAND		t_format			ibuffer_size_set	set_settings_alaw8bit_mono_8khz_max_buffer
+		COMMAND		devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound  			PlayData		alaw8bit_mono_8khz_32kb.raw
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK		 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7026
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7027
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7027
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play audio with minimal buffer size supported in MuLaw
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_settings_mulaw8bit_mono_12khz_min_buffer]
+//!				3. Call PlayData() with valid sound data from [mulaw8bit_mono_12khz_32kb.raw]
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is played without any errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		set_settings_mulaw8bit_mono_12khz_min_buffer
+		COMMAND		t_format			iencoding_set		set_settings_mulaw8bit_mono_12khz_min_buffer
+		COMMAND		t_format			ichannels_set		set_settings_mulaw8bit_mono_12khz_min_buffer
+		COMMAND		t_format			ibuffer_size_set	set_settings_mulaw8bit_mono_12khz_min_buffer
+		COMMAND		devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound  			PlayData		mulaw8bit_mono_12khz_32kb.raw
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK		 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7027
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7028
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7028
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play audio with max buffer size supported in MuLaw
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetPlayFormat() with [set_settings_mulaw8bit_mono_12khz_max_buffer]
+//!				3. Call PlayData() with valid sound data from [mulaw8bit_mono_12khz_32kb.raw]
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is played without any errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		set_settings_mulaw8bit_mono_12khz_max_buffer
+		COMMAND		t_format			iencoding_set		set_settings_mulaw8bit_mono_12khz_max_buffer
+		COMMAND		t_format			ichannels_set		set_settings_mulaw8bit_mono_12khz_max_buffer
+		COMMAND		t_format			ibuffer_size_set	set_settings_mulaw8bit_mono_12khz_max_buffer
+		COMMAND		devsound			SetPlayFormat		BSP-SOUND-DRIVER-SetPlayFormat
+		COMMAND		devsound  			PlayData		mulaw8bit_mono_12khz_32kb.raw
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK		 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7028
+
+/////////////////////////////////////////////
+// Recording with different buffer size
+/////////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7031
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7031
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Record audio with minimal buffer size supported in PCM8
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with [set_settings_pcm8_mono_8khz_32kb_min_buffer_recording]
+//!				3. Call RecordData()
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is recorded without any errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		set_settings_pcm8_mono_8khz_32kb_min_buffer_recording
+		COMMAND		t_format			iencoding_set		set_settings_pcm8_mono_8khz_32kb_min_buffer_recording
+		COMMAND		t_format			ichannels_set		set_settings_pcm8_mono_8khz_32kb_min_buffer_recording
+		COMMAND		t_format			ibuffer_size_set	set_settings_pcm8_mono_8khz_32kb_min_buffer_recording
+		COMMAND		devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND		devsound  			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7031
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7032
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7032
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Record audio with max buffer size supported in PCM8
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with [set_settings_pcm8_mono_8khz_32kb_max_buffer_recording]
+//!				3. Call RecordData()
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is recorded without any errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		set_settings_pcm8_mono_8khz_32kb_max_buffer_recording
+		COMMAND		t_format			iencoding_set		set_settings_pcm8_mono_8khz_32kb_max_buffer_recording
+		COMMAND		t_format			ichannels_set		set_settings_pcm8_mono_8khz_32kb_max_buffer_recording
+		COMMAND		t_format			ibuffer_size_set	set_settings_pcm8_mono_8khz_32kb_max_buffer_recording
+		COMMAND		devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND		devsound  			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7032
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7033
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7033
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Record audio with minimal buffer size supported in PCM16
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with [set_settings_pcm16_mono_8khz_32kb_min_buffer_recording]
+//!				3. Call RecordData()
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is recorded without any errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		set_settings_pcm16_mono_8khz_32kb_min_buffer_recording
+		COMMAND		t_format			iencoding_set		set_settings_pcm16_mono_8khz_32kb_min_buffer_recording
+		COMMAND		t_format			ichannels_set		set_settings_pcm16_mono_8khz_32kb_min_buffer_recording
+		COMMAND		t_format			ibuffer_size_set	set_settings_pcm16_mono_8khz_32kb_min_buffer_recording
+		COMMAND		devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND		devsound  			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7033
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7034
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7034
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Record audio with max buffer size supported in PCM16
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with [set_settings_pcm16_mono_8khz_32kb_max_buffer_recording]
+//!				3. Call RecordData()
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is recorded without any errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		set_settings_pcm16_mono_8khz_32kb_max_buffer_recording
+		COMMAND		t_format			iencoding_set		set_settings_pcm16_mono_8khz_32kb_max_buffer_recording
+		COMMAND		t_format			ichannels_set		set_settings_pcm16_mono_8khz_32kb_max_buffer_recording
+		COMMAND		t_format			ibuffer_size_set	set_settings_pcm16_mono_8khz_32kb_max_buffer_recording
+		COMMAND		devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND		devsound  			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7034
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7035
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7035
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Record audio with minimal buffer size supported in ALaw
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with [set_settings_alaw8bit_mono_8khz_min_buffer_recording]
+//!				3. Call RecordData()
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is recorded without any errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		set_settings_alaw8bit_mono_8khz_min_buffer_recording
+		COMMAND		t_format			iencoding_set		set_settings_alaw8bit_mono_8khz_min_buffer_recording
+		COMMAND		t_format			ichannels_set		set_settings_alaw8bit_mono_8khz_min_buffer_recording
+		COMMAND		t_format			ibuffer_size_set	set_settings_alaw8bit_mono_8khz_min_buffer_recording
+		COMMAND		devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND		devsound  			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7035
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7036
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7036
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Record audio with max buffer size supported in ALaw
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with [set_settings_alaw8bit_mono_8khz_max_buffer_recording]
+//!				3. Call RecordData()
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is recorded without any errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	1000				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		set_settings_alaw8bit_mono_8khz_max_buffer_recording
+		COMMAND		t_format			iencoding_set		set_settings_alaw8bit_mono_8khz_max_buffer_recording
+		COMMAND		t_format			ichannels_set		set_settings_alaw8bit_mono_8khz_max_buffer_recording
+		COMMAND		t_format			ibuffer_size_set	set_settings_alaw8bit_mono_8khz_max_buffer_recording
+		COMMAND		devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND		devsound  			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7036
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7037
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7037
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Record audio with minimal buffer size supported in MuLaw
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with [set_settings_mulaw8bit_mono_12khz_min_buffer_recording]
+//!				3. Call RecordData()
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is recorded without any errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		set_settings_mulaw8bit_mono_12khz_min_buffer_recording
+		COMMAND		t_format			iencoding_set		set_settings_mulaw8bit_mono_12khz_min_buffer_recording
+		COMMAND		t_format			ichannels_set		set_settings_mulaw8bit_mono_12khz_min_buffer_recording
+		COMMAND		t_format			ibuffer_size_set	set_settings_mulaw8bit_mono_12khz_min_buffer_recording
+		COMMAND		devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND		devsound  			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7037
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7038
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7038
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Record audio with max buffer size supported in MuLaw
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with [set_settings_mulaw8bit_mono_12khz_max_buffer_recording]
+//!				3. Call RecordData()
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is recorded without any errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		t_format			irate_set		set_settings_mulaw8bit_mono_12khz_max_buffer_recording
+		COMMAND		t_format			iencoding_set		set_settings_mulaw8bit_mono_12khz_max_buffer_recording
+		COMMAND		t_format			ichannels_set		set_settings_mulaw8bit_mono_12khz_max_buffer_recording
+		COMMAND		t_format			ibuffer_size_set	set_settings_mulaw8bit_mono_12khz_max_buffer_recording
+		COMMAND		devsound			SetRecordFormat		BSP-SOUND-DRIVER-SetRecordFormat
+		COMMAND		devsound  			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK		 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7038
+
+/////////////////////////////////////////////
+// Playback and Recording
+/////////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7044
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7044
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call PlayData() twice on the same device when audio is still playing
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call PlayData() with valid sound data from [default_file]
+//!				4. Call PlayData() with valid sound data from [default_file] when audio is still playing
+//!				5. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	PlayData() in step 3 completes with KErrNone and PlayData() in step 4 completes with KERN-EXEC 9
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND		devsound			PlayData		default_file
+		COMMAND		devsound			PlayData		default_file
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	!PanicCode=9 !PanicString=KERN-EXEC
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7044
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7045
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7045
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call RecordData() twice on the same device when audio is still recording
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetRecordFormat() and verify from [default_record_format]
+//!				3. Call RecordData()
+//!				4. Call RecordData() when audio is still recording
+//!				5. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	RecordData() in step 3 completes with KErrNone and RecordData() in step 4 completes with KERN-EXEC 9
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND		t_format			irate_get		default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get	default_record_format
+		COMMAND		devsound			RecordData		record_data_32kb
+		COMMAND		devsound			RecordData		record_data_32kb
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 !PanicCode=9 !PanicString=KERN-EXEC
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7045
+
+/////////////////////////////////////////////
+// Multiple server sessions
+/////////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7061
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7061
+//! @SYMAPI			RMdaDevSound::Open(TInt)
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call Open() twice
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call Open() with unit [UnitEnum]
+//!				3. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Open() on step 1 completes without errors, Open() on step 2 raises KErrInUse (-14)
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	RMdaDevSound			devsound1  
+		COMMAND		devsound1			new
+		COMMAND	!Error=-14	devsound1			Open			UnitEnum
+		COMMAND		devsound1  			Close
+		COMMAND		devsound1  			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7061
+
+/////////////////////////////////////////////
+// Notification tests
+/////////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7071
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7071
+//! @SYMAPI			RMdaDevSound::NotifyPlayError(TRequestStatus {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call NotifyPlayError() twice
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call NotifyPlayError()
+//!				3. Call NotifyPlayError()
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	NotifyPlayError() in steps 3 raises panics KERN-EXEC 9
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		COMMAND		devsound			NotifyPlayError
+		COMMAND		devsound			NotifyPlayError
+		OUTSTANDING
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	!PanicCode=9 !PanicString=KERN-EXEC
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7071
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7072
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7072
+//! @SYMAPI			RMdaDevSound::NotifyPlayError(TRequestStatus {ref});
+//!				RMdaDevSound::CancelNotifyPlayError()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call CancelNotifyPlayError() twice while PlayData() is executed
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call NotifyPlayError()
+//!				3. Call GetPlayFormat() and verify from [default_play_format]
+//!				4. Call PlayData() with [default_file]
+//!				5. Call CancelNotifyPlayError()
+//!				6. Call CancelNotifyPlayError()
+//!				7. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	NotifyPlayError() in step 2 completes with KErrCancel, CancelNotifyPlayError() in steps 5-6 complete without error
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		COMMAND	!AsyncError=-3	devsound			NotifyPlayError
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND		devsound			PlayData		default_file
+		COMMAND		devsound			CancelNotifyPlayError
+		COMMAND		devsound			CancelNotifyPlayError
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7072
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7073
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7073
+//! @SYMAPI			RMdaDevSound::NotifyPlayError(TRequestStatus {ref});
+//!				RMdaDevSound::CancelNotifyPlayError()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call CancelNotifyPlayError() twice after PlayData() is executed
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call NotifyPlayError()
+//!				3. Call GetPlayFormat() and verify from [default_play_format]
+//!				4. Call PlayData() with [default_file]
+//!				5. Call CancelNotifyPlayError()
+//!				6. Call CancelNotifyPlayError()
+//!				7. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	NotifyPlayError() in step 2 completes with KErrCancel, CancelNotifyPlayError() in steps 5-6 complete without error
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		COMMAND	!AsyncError=-3	devsound			NotifyPlayError
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND		devsound			PlayData		default_file
+		ASYNC_DELAY	5000
+		COMMAND		devsound			CancelNotifyPlayError
+		COMMAND		devsound			CancelNotifyPlayError
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7073
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7074
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7074
+//! @SYMAPI			RMdaDevSound::NotifyPlayError(TRequestStatus {ref});
+//!				RMdaDevSound::CancelNotifyPlayError()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call CancelNotifyPlayError() twice without PlayData() executed
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call NotifyPlayError()
+//!				3. Call CancelNotifyPlayError()
+//!				4. Call CancelNotifyPlayError()
+//!				5. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	NotifyPlayError() in step 2 completes with KErrCancel, CancelNotifyPlayError() in steps 3-4 complete without error
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		COMMAND	!AsyncError=-3	devsound		NotifyPlayError
+		ASYNC_DELAY	5000
+		COMMAND		devsound			CancelNotifyPlayError
+		COMMAND		devsound			CancelNotifyPlayError
+		OUTSTANDING
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7074
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7075
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7075
+//! @SYMAPI			RMdaDevSound::NotifyPlayError(TRequestStatus {ref});
+//!				RMdaDevSound::CancelNotifyPlayError()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call CancelNotifyPlayError() twice without NotifyPlayError() executed
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call CancelNotifyPlayError()
+//!				3. Call CancelNotifyPlayError()
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	CancelNotifyPlayError() in steps 2-3 complete without error
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		COMMAND		devsound			CancelNotifyPlayError
+		COMMAND		devsound			CancelNotifyPlayError
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7075
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7076
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7076
+//! @SYMAPI			RMdaDevSound::NotifyRecordError(TRequestStatus {ref});
+//!				RMdaDevSound::CancelNotifyRecordError()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call CancelNotifyRecordError() twice while RecordData() is executed
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call NotifyRecordError()
+//!				3. Call GetRecordFormat() and verify from [default_record_format]
+//!				4. Call RecordData()
+//!				5. Call CancelNotifyRecordError()
+//!				6. Call CancelNotifyRecordError()
+//!				7. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	NotifyRecordError() in step 2 completes with KErrCancel, CancelNotifyRecordError() in steps 5-6 complete without error
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		COMMAND	!AsyncError=-3	devsound			NotifyRecordError
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND		t_format			irate_get		default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get	default_record_format
+		COMMAND		devsound			RecordData
+		COMMAND		devsound			CancelNotifyRecordError
+		COMMAND		devsound			CancelNotifyRecordError
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7076
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7077
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7077
+//! @SYMAPI			RMdaDevSound::NotifyRecordError(TRequestStatus {ref});
+//!				RMdaDevSound::CancelNotifyRecordError()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call CancelNotifyRecordError() twice after RecordData() is executed
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call NotifyRecordError()
+//!				3. Call GetRecordFormat() and verify from [default_record_format]
+//!				4. Call RecordData()
+//!				5. Call CancelNotifyRecordError()
+//!				6. Call CancelNotifyRecordError()
+//!				7. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	NotifyRecordError() in step 2 completes with KErrCancel, CancelNotifyRecordError() in steps 5-6 complete without error
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		COMMAND	!AsyncError=-3	devsound			NotifyRecordError
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new			
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND		t_format			irate_get		default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get	default_record_format
+		COMMAND		devsound			RecordData
+		ASYNC_DELAY	5000
+		COMMAND		devsound			CancelNotifyRecordError
+		COMMAND		devsound			CancelNotifyRecordError
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7077
+
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7078
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7078
+//! @SYMAPI			RMdaDevSound::NotifyRecordError(TRequestStatus {ref});
+//!				RMdaDevSound::CancelNotifyRecordError()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call CancelNotifyRecordError() twice without RecordData() executed
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call NotifyRecordError()
+//!				3. Call CancelNotifyRecordError()
+//!				4. Call CancelNotifyRecordError()
+//!				5. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	NotifyRecordError() in step 2 completes with KErrCancel, CancelNotifyRecordError() in steps 3-4 complete without error
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		COMMAND	!AsyncError=-3	devsound			NotifyRecordError
+		ASYNC_DELAY	5000
+		COMMAND		devsound			CancelNotifyRecordError
+		COMMAND		devsound			CancelNotifyRecordError
+		OUTSTANDING
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK		 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7078
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7079
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7079
+//! @SYMAPI			RMdaDevSound::NotifyRecordError(TRequestStatus {ref});
+//!				RMdaDevSound::CancelNotifyRecordError()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call CancelNotifyRecordError() twice without NotifyRecordError() executed
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call CancelNotifyRecordError()
+//!				3. Call CancelNotifyRecordError()
+//!				4. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	CancelNotifyRecordError() in steps 2-3 complete without error
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		COMMAND		devsound			CancelNotifyRecordError
+		COMMAND		devsound			CancelNotifyRecordError
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7079
+
+/////////////////////////////////////////////
+// Playback-recording Cancel/Flush tests
+/////////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7101
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7101
+//! @SYMAPI			RMdaDevSound::FlushPlayBuffer()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call FlushPlayBuffer() without calling PlayData() first
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call FlushPlayBuffer() 
+//!				3. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	FlushPlayBuffer() completes without errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		COMMAND		devsound			FlushPlayBuffer
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK		 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7101
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7102
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7102
+//! @SYMAPI			RMdaDevSound::CancelPlayData()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call CancelPlayData() without calling PlayData() first
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call CancelPlayData() 
+//!				3. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	CancelPlayData() completes without errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		COMMAND		devsound			CancelPlayData
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK		 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7102
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7103
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7103
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref});
+//!				RMdaDevSound::CancelPlayData()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call CancelPlayData() 2 times in a row while PlayData() is executed
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call PlayData() with [default_file_cancel]
+//!				4. Call CancelPlayData() 
+//!				5. Call CancelPlayData() 
+//!				6. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	CancelPlayData() in step 4 and 5 completes without errors, PlayData() in step 3 finished with KErrCancel
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND	!AsyncError=-3	devsound			PlayData		default_file_cancel
+		COMMAND		devsound			CancelPlayData
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7103
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7104
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7104
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref});
+//!				RMdaDevSound::FlushPlayBuffer()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call FlushPlayBuffer() 2 times in a row while PlayData() is executed
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call PlayData() with [default_file_flush]
+//!				4. Call FlushPlayBuffer() 
+//!				5. Call FlushPlayBuffer() 
+//!				6. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	FlushPlayBuffer() in step 4 and 5 completes without errors, PlayData() in step 3 finished with KErrCancel
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND	!AsyncError=-3	devsound			PlayData		default_file_flush
+		COMMAND		devsound			FlushPlayBuffer
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK		 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7104
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7105
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7105
+//! @SYMAPI			RMdaDevSound::FlushRecordBuffer()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call FlushRecordBuffer() without calling RecordData() first
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call FlushRecordBuffer() 
+//!				3. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	FlushRecordBuffer() completes without errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		COMMAND		devsound			FlushRecordBuffer
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7105
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7106
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7106
+//! @SYMAPI			RMdaDevSound::CancelRecordData()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call CancelRecordData() without calling RecordData first
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call CancelRecordData() 
+//!				3. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	CancelRecordData() completes without errors
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		COMMAND		devsound			CancelRecordData
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7106
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7107
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7107
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref});
+//!				RMdaDevSound::CancelRecordData()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call CancelRecordData() 2 times in a row while RecordData() is executed
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call SetRecordFormat() with [default_record_format]
+//!				3. Call RecordData() with [record_data_32kb_cancel]
+//!				4. Call CancelRecordData() 
+//!				5. Call CancelRecordData() 
+//!				6. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	CancelRecordData() in step 4 and 5 completes without errors, RecordData() in step 3 completes with KErrCancel
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND		t_format			irate_get		default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get	default_record_format
+		COMMAND	!AsyncError=-3	devsound			RecordData	record_data_32kb_cancel
+		COMMAND		devsound			CancelRecordData
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7107
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7108
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7108
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref});
+//!				RMdaDevSound::FlushRecordBuffer()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call FlushRecordBuffer() 2 times in a row while RecordData() is executed
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetRecordFormat() and verify from [default_record_format]
+//!				3. Call RecordData()
+//!				4. Call FlushRecordBuffer() 
+//!				5. Call FlushRecordBuffer() 
+//!				6. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	FlushRecordBuffer() in step 4 and 5 completes without errors, RecordData() in step 3 finished with KErrNone
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND		t_format			irate_get		default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get	default_record_format
+		COMMAND		devsound			RecordData	record_data_32kb	
+		COMMAND		devsound			FlushRecordBuffer
+		COMMAND		devsound			FlushRecordBuffer
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7108
+
+/////////////////////////////////////////////
+// Volume
+/////////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7201
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7201					
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref});
+//!				RMdaDevSound::SetPlayVolume(TInt);
+//!				RMdaDevSound::PlayVolume()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Set play volume with negative integer value.
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat and verify from [default_play_format]
+//!				3. Call SetPlayVolume() with negative integer value from [negative_play_volume]
+//!				4. Call PlayData() with valid sound data from [default_file]
+//!				5. Call PlayVolume() and compare the received value to [min_play_volume]
+//!				6. Call Close().
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Setting negative volume value is impossible. PlayVolume in step 4 returns min play volume.
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND		devsound			SetPlayVolume		negative_play_volume
+		COMMAND		devsound			PlayData		default_file	
+		OUTSTANDING
+		COMMAND		devsound			PlayVolume		min_play_volume
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-7201
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7202
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7202					
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref});
+//!				RMdaDevSound::SetPlayVolume(TInt);
+//!				RMdaDevSound::PlayVolume()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Set play volume with too big integer value.
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat and verify from [default_play_format]
+//!				3. Call SetPlayVolume() with too big value from [too_big_play_volume]
+//!				4. Call PlayData() with valid sound data from [default_file]
+//!				5. Call PlayVolume() and compare the received value to [max_play_volume]
+//!				6. Call Close().
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Setting too big volume value is impossible. PlayVolume in step 4 returns max play volume.
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND		devsound			SetPlayVolume		too_big_play_volume
+		COMMAND		devsound			PlayData		default_file	
+		OUTSTANDING
+		COMMAND		devsound			PlayVolume		max_play_volume
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-7202
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7203
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7203					
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref});
+//!				RMdaDevSound::SetRecordLevel(TInt);
+//!				RMdaDevSound::RecordLevel()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Set record level with negative integer value.
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetRecordFormat and verify from [default_record_format]
+//!				3. Call SetRecordLevel() with negative integer value from [negative_record_level]
+//!				4. Call RecordData() 
+//!				5. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				6. Call RecordLevel() and compare the received value to [min_record_level]
+//!				7. Call Close().
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Setting negative volume level value is impossible. RecordLevel in step 4 returns min record level.
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND		t_format			irate_get		default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get	default_record_format
+		COMMAND		devsound			SetRecordLevel		negative_record_level
+		COMMAND		devsound			RecordData		record_data_32kb	
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND		devsound			RecordLevel		min_record_level
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-7203
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7204
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7204					
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref});
+//!				RMdaDevSound::SetRecordLevel(TInt);
+//!				RMdaDevSound::RecordLevel()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Set record level with too big value.
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetRecordFormat and verify from [default_record_format]
+//!				3. Call SetRecordLevel() with too big value from [too_big_record_level]
+//!				4. Call RecordData() 
+//!				5. Call FlushRecordBuffer() //needed because otherwise setting format in next step will fail with KErrInUse
+//!				6. Call RecordLevel() and compare the received value to [max_record_level]
+//!				7. Call Close().
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Setting too big volume level value is impossible. RecordLevel in step 4 returns max record level.
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND		t_format			irate_get		default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get	default_record_format
+		COMMAND		devsound			SetRecordLevel		too_big_record_level
+		COMMAND		devsound			RecordData		record_data_32kb	
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND		devsound			RecordLevel		max_record_level
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK		
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-7204
+
+/////////////////////////////////////////////
+// Corrupted audio
+/////////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7301
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7301					
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play corrupted audio data.
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call PlayData() with [corrupted_audio_file] 
+//!				4. Call Close().
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing audio completes without any errors.
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND		devsound			PlayData		corrupted_audio_file
+		OUTSTANDING
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-7301
+
+/////////////////////////////////////////////
+// Combinations of APIs
+/////////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7401
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7401					
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref});
+//!				RMdaDevSound::PausePlayBuffer();
+//!				RMdaDevSound::ResumePlaying();
+//!				RMdaDevSound::SetPlayVolume(TInt);
+//!				RMdaDevSound::PlayVolume()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play default audio with default volume, pause playing and set volume to 50% and resume playing. 
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call NotifyPlayError() //needed because otherwise PlayData() will not really stop after Outstanding
+//!				4. Call PlayData() with [default_audio_file] 
+//!				5. Call PausePlayBuffer()
+//!				6. Call SetPlayVolume() with 50% volume from [play_volume_quater]
+//!				7. Call ResumePlaying()
+//!				8. PlayVolume() and compare received value with [play_volume_quater]
+//!				9. Call Close().
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Volume received in step 7 is equal to [playback_volume_half].
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND !AsyncError=-10	devsound			NotifyPlayError
+		COMMAND		devsound			PlayData		default_file
+		COMMAND		devsound			PausePlayBuffer
+		COMMAND		devsound			SetPlayVolume		play_volume_quater
+		COMMAND		devsound			ResumePlaying
+		OUTSTANDING
+		COMMAND		devsound			PlayVolume		play_volume_quater
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-7401
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7402
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7402					
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref});
+//!				RMdaDevSound::FlushPlayBuffer();
+//!				RMdaDevSound::BytesPlayed()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play default audio file. Flush play buffer after that and verify count of bytes played. 
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call NotifyPlayError() //needed because otherwise PlayData() will not really stop after Outstanding
+//!				4. Call PlayData() with [default_audio_file] 
+//!				5. Delay for 1 sec, then BytesPlayed API is being called after the DMA ISR updates the variable
+//!				6. Call BytesPlayed() where expected result equals [32_kb_played]
+//!				7. Call FlushPlayBuffer()
+//!				8. Delay for 1 sec, then BytesPlayed API is being called after the DMA ISR updates the variable
+//!				9. Call BytesPlayed() where expected result equals [32_kb_played]
+//!				10. Call Close().
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Bytes played count is equal with [32_kb_played] in steps 4 and 6.
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND !AsyncError=-10	devsound			NotifyPlayError
+		COMMAND		devsound			PlayData		default_file
+		OUTSTANDING
+		DELAY	5000
+		COMMAND		devsound			BytesPlayed		32_kb_played
+		COMMAND		devsound			FlushPlayBuffer
+		DELAY	5000
+		COMMAND		devsound			BytesPlayed		32_kb_played
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK		
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-7402
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7403
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7403					
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref});
+//!				RMdaDevSound::PausePlayBuffer();
+//!				RMdaDevSound::ResumePlaying();
+//!				RMdaDevSound::BytesPlayed()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play default audio file. Pause playing and resume again for 3 times. See count of bytes played.
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call NotifyPlayError() //needed because otherwise PlayData() will not really stop after Outstanding
+//!				3. Call PlayData() with [default_audio_file] 
+//!				4. Call PausePlayBuffer() 
+//!				5. Call ResumePlaying() 
+//!				6. Call PausePlayBuffer() 
+//!				7. Call ResumePlaying()
+//!				8. Call PausePlayBuffer() 
+//!				9. Call ResumePlaying()
+//!				10. Delay for 1 sec, then BytesPlayed API is being called after the DMA ISR updates the variable
+//!				11. Call BytesPlayed() where expected result equals [32_kb_played]
+//!				12. Call Close().
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Bytes played count is equal with [32_kb_played] in step 10.
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND !AsyncError=-10	devsound			NotifyPlayError
+		COMMAND		devsound			PlayData		default_file
+		COMMAND		devsound			PausePlayBuffer	
+		COMMAND		devsound			ResumePlaying	
+		COMMAND		devsound			PausePlayBuffer	
+		COMMAND		devsound			ResumePlaying	
+		COMMAND		devsound			PausePlayBuffer	
+		COMMAND		devsound			ResumePlaying	
+		OUTSTANDING
+		DELAY		5000
+		COMMAND		devsound			BytesPlayed		32_kb_played
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK		
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-7403
+
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7404
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7404					
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref});
+//!				RMdaDevSound::CancelRecordData();
+//!				RMdaDevSound::SetRecordLevel(TInt);
+//!				RMdaDevSound::RecordLevel()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Record audio with default record format and default record level. Cancel recording in progress. Set Record level to 50%
+//!				and start recording again. Verify that record level is 50% after recording is completed.
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetRecordFormat() and verify from [default_record_format]
+//!				3. Call RecordData()  with [record_data_32kb_cancel]
+//!				4. Call CancelRecordData()
+//!				5. Call FlushRecordBuffer() //needed because otherwise operation in next step will fail with KErrInUse
+//!				6. Call SetRecordLevel() with 50% volume from [half_record_level]
+//!				7. Call RecordData()
+//!				8. Call FlushRecordBuffer() //needed because otherwise operation in next step will fail with KErrInUse
+//!				9. RecordLevel() and compare received value with [half_record_level]
+//!				10. Call Close().
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Volume received in step 7 is equal to [half_record_level].
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get	default_record_format
+		COMMAND	!AsyncError=-3	devsound			RecordData	record_data_32kb_cancel
+		COMMAND		devsound			SetRecordLevel		half_record_level
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND		devsound			RecordData
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND		devsound			RecordLevel		half_record_level
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-7404
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7405
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7405					
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref});
+//!				RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref});
+//!				RMdaDevSound::FlushRecordBuffer()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		FlushRecordBuffer first and then record audio with default record format and then play recorded audio file.
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call FlushRecordBuffer()
+//!				3. Call GetRecordFormat() and verify from [default_record_format]
+//!				4. Call RecordData() to [temp_audio_file]
+//!				5. Call GetPlayFormat() and verify from [default_play_format]
+//!				6. Call NotifyPlayError() //needed because otherwise PlayData() will not really stop after Outstanding
+//!				7. Call PlayData() from [temp_audio_file]
+//!				8. Call Close().
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is recorded and played properly.
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		COMMAND		devsound			FlushRecordBuffer
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND		t_format			irate_get		default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get	default_record_format
+		COMMAND		devsound			RecordData		temp_file		
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND !AsyncError=-10	devsound			NotifyPlayError
+		COMMAND		devsound			PlayData		temp_file
+		OUTSTANDING
+		COMMAND		devsound			utilityDeleteFile	delete_temp_file
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-7405
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7406
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7406					
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, TDes8 {ref});
+//!				RMdaDevSound::PlayData(TRequestStatus {ref}, TDes8 {ref});
+//!				RMdaDevSound::CancelRecordData()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		CancelRecordData first and then record audio with default record format and then play recorded audio file.
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call CancelRecordData()
+//!				3. Call GetRecordFormat() and verify from [default_record_format]
+//!				4. Call RecordData() to [temp_audio_file]
+//!				5. Call GetPlayFormat() and verify from [default_play_format]
+//!				6. Call NotifyPlayError() //needed because otherwise PlayData() will not really stop after Outstanding
+//!				7. Call PlayData() from [temp_audio_file]
+//!				8. Call Close().
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Audio is recorded and played properly.
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		COMMAND		devsound			CancelRecordData
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND		t_format			irate_get		default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get	default_record_format
+		COMMAND		devsound			RecordData		temp_file		
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND !AsyncError=-10	devsound			NotifyPlayError
+		COMMAND		devsound			PlayData		temp_file
+		OUTSTANDING
+		COMMAND		devsound			utilityDeleteFile	delete_temp_file
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK		
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-7406
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/scripts/base-bsp-sound-driver-manual.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,348 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//! @file
+//! @SYMTestSuiteName  BASE-BSP-SOUND
+//! @SYMScriptTestEnvironment This test script requires a base rom image
+
+/////////////////////////////////////////////////////////////////////
+// BASE-BSP-SOUND-DRIVER-manual.script
+//
+//
+// Tests all the PublishedPartner APIs of the RMdaDevSound
+// class as a means of confidence that the APIs work as expected.
+// All test cases will keep the sound system state and 
+// restore that to initial state when test case finished
+// Platform dependent configuration is picked up from the global environment files
+//
+/////////////////////////////////////////////////////////////////////
+
+RUN_UTILS MkDir		${SYSDRIVE}\base\
+RUN_UTILS MkDir		${SYSDRIVE}\base\sound\
+RUN_UTILS MkDir		${SYSDRIVE}\base\sound\validation
+
+
+LOAD_SUITE	t_sound
+DELAY		5000
+
+///////////////////////////////////////////
+// Manual testing
+///////////////////////////////////////////
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-6001
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-6001
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RMdaDevSound::SetPlayVolume(TInt)
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Manual test. Play sound with volume level 50%, then set max volume level 
+//!				and play again. User will verify the volume change manually and give feedback
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify it from [default_play_format]
+//!				3. Show message "Press affirmative key to start playback with half volume"
+//!				4. Call PlayData() with valid sound data from [default_file]
+//!				5. Call SetPlayVolume() with max volume from [max_play_volume]
+//!				6. Show message "Press affirmative key to start playback with max volume"
+//!				7. Call PlayData() with valid sound data from [default_file]
+//!				8. Call PlayVolume(), where expected result is equal with max volume from [max_play_volume]
+//!				9. Request user feedback "Did it sound louder? Press affirmative key if Yes and any other key otherwise"
+//!				and store user's feedback in the log file
+//!				10. Restore default playback sound volume
+//!				11. Call Close().
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playback finished w/o errors, sound became louder
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND			t_format			irate_get		default_play_format
+		COMMAND			t_format			iencoding_get		default_play_format
+		COMMAND			t_format			ichannels_get		default_play_format
+		COMMAND			t_format			ibuffer_size_get	default_play_format
+		COMMAND			devsound			SetPlayVolume		play_volume_quater
+		COMMAND			devsound			utilityPromptMessage	start_playback_half_volume
+		COMMAND			devsound			PlayData		default_file
+		OUTSTANDING
+		COMMAND			devsound			SetPlayVolume		max_play_volume
+		COMMAND			devsound			utilityPromptMessage	start_playback_max_volume
+		COMMAND			devsound			PlayData		default_file
+		OUTSTANDING
+		COMMAND			devsound			PlayVolume		max_play_volume
+		COMMAND			devsound			utilityPromptMessage	ask_did_it_sound_louder
+		//!set back default playback audio level
+		COMMAND			devsound			SetPlayVolume		default_play_volume
+		COMMAND			t_format			~
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-6001
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-6002
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-6002
+//! @SYMAPI			RMdaDevSound::RecordData(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RMdaDevSound::PlayData(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RMdaDevSound::SetPlayVolume(TInt);
+//!				RMdaDevSound::SetRecordLevel(TInt)
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Manual test. Record sound with volume level 50%. Then play it. Set volume level to max and record again.
+//!				Play the last recorded file. User will verify the volume change manually and give feedback
+//!				
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetRecordFormat() and verify it from [default_record_format]
+//!				3. Show message "Press affirmative key to start recording with half volume level"
+//!				4. Call SetRecordLevel() with values from [half_record_level]	
+//!				5. Call RecordData() with values from [record_32kb_half_volume]
+//!				6. Call SetPlayVolume() with values from [max_play_volume]
+//!				7. Call SetPlayFormat() with default value from [default_play_format]
+//!				8. Call PlayData() with valid sound data from [record_32kb_half_volume]
+//!				9. Show message "Press affirmative key to start recording with max volume level"
+//!				10. Call SetRecordLevel() with values from [max_record_level]
+//!				11. Call RecordData() with values from [record_32kb_max_volume]
+//!				12. Call PlayData() with valid sound data from [record_32kb_max_volume]
+//!				13. Request user feedback "Did it sound louder? Press affirmative key if Yes and any other key otherwise"
+//!				and store user's feedback in the log file
+//!				14. Restore default sound level
+//!				15. Call Close().
+//!
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playback finished w/o errors, sound became louder
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT		RMdaDevSound			devsound  
+		COMMAND			devsound			new
+		COMMAND			devsound			Open			UnitEnum
+		CREATE_OBJECT		TCurrentSoundFormat		t_format		
+		COMMAND			t_format			new
+		COMMAND			devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default record configuration			
+		COMMAND			t_format			irate_get		default_record_format
+		COMMAND			t_format			iencoding_get		default_record_format
+		COMMAND			t_format			ichannels_get		default_record_format
+		COMMAND			t_format			ibuffer_size_get	default_record_format
+		COMMAND			devsound			utilityPromptMessage	start_record_half_volume
+		COMMAND			devsound			SetRecordLevel		half_record_level
+		COMMAND			devsound			RecordData		temp_file
+		OUTSTANDING
+		COMMAND			devsound			FlushRecordBuffer
+		COMMAND			devsound			utilityPromptMessage	start_playing_half_volume
+		COMMAND			devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND			t_format			irate_get		default_play_format
+		COMMAND			t_format			iencoding_get		default_play_format
+		COMMAND			t_format			ichannels_get		default_play_format
+		COMMAND			t_format			ibuffer_size_get	default_play_format
+		COMMAND			devsound			PlayData		temp_file
+		OUTSTANDING
+		COMMAND			devsound			utilityDeleteFile	delete_temp_file
+		COMMAND			devsound			utilityPromptMessage	start_record_max_volume
+		COMMAND			devsound			SetRecordLevel		max_record_level
+		COMMAND			devsound			RecordData		temp_file
+		OUTSTANDING
+		COMMAND			devsound			utilityPromptMessage	start_playing_max_volume
+		COMMAND			devsound			PlayData		temp_file
+		OUTSTANDING
+		COMMAND			devsound			utilityDeleteFile	delete_temp_file
+		COMMAND			devsound			utilityPromptMessage	ask_did_it_sound_louder
+		//!set back default recording audio level
+		COMMAND			devsound			SetRecordLevel		default_record_level
+		COMMAND			t_format			~
+		COMMAND			devsound  			Close
+		COMMAND			devsound  			~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SOUND-DRIVER-6002
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7041
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7041
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RMdaDevSound::RecordData(TRequestStatus {ref}, const TDesC8 {ref})
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Play default audio file with default format and at the same time record audio to different sound file.
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call PlayData() to play [default_audio_file]
+//!				4. Call SetRecordFormat() with [default_record_format]
+//!				5. Call RecordData to record audio to [temp_audio_file]
+//!				6. Call PlayData() to play [temp_audio_file]
+//!				7. Ask user if recorded audio is what was played
+//!				8. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	Playing and recording completes without any errors and recorded audio is what it should supposed to be.
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND		t_format			irate_get		default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get	default_record_format
+		COMMAND		devsound			utilityPromptMessage	start_record_and_playing_simultaneously
+		COMMAND		devsound			PlayData		default_file
+		COMMAND		devsound			RecordData		temp_file
+		OUTSTANDING
+		COMMAND		devsound			utilityPromptMessage	start_playing_audio_recorded_in_previous_step
+		COMMAND		devsound			PlayData		temp_file
+		OUTSTANDING
+		COMMAND		devsound			utilityDeleteFile	delete_temp_file
+		COMMAND		devsound			utilityPromptMessage	was_recorded_audio_correct
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7041
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7042
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7042
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RMdaDevSound::RecordData(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RMdaDevSound::NotifyPlayError(TRequestStatus {ref});
+//!				RMdaDevSound::CancelNotifyPlayError()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call NotifyPlayError before playing file. Play default audio file with default format and at the same time record audio 
+//!				to different sound file. Call CancelNotifyPlayError before playing recorded audio.
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call GetRecordFormat() and verify from [default_record_format]
+//!				4. Call NotifyPlayError()
+//!				5. Call PlayData() to play [default_audio_file]
+//!				6. Call RecordData to record audio to [temp_audio_file]
+//!				7. Call CancelNotifyPlayError()
+//!				8. Call PlayData() to play [temp_audio_file]
+//!				9. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	NotifyPlayError() in step 3 completes with KErrUnderflow. Recording completes without any errors and recorded audio 
+//!				can be played. Playdata in step 4 completes with KErrNone. CancelNotifyPlayError completes with KErrNone.
+//!
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		COMMAND		devsound			CancelRecordData
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND		t_format			irate_get		default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get	default_record_format
+		COMMAND		devsound			utilityPromptMessage	start_record_and_playing_simultaneously
+		COMMAND	!AsyncError=-10	devsound			NotifyPlayError
+		COMMAND		devsound			PlayData		default_file		
+		COMMAND		devsound			RecordData		temp_file
+		OUTSTANDING
+		COMMAND		devsound			CancelNotifyPlayError
+		COMMAND		devsound			utilityPromptMessage	start_playing_audio_recorded_in_previous_step
+		COMMAND		devsound			PlayData		temp_file
+		OUTSTANDING
+		COMMAND		devsound			utilityDeleteFile	delete_temp_file
+		COMMAND		devsound			utilityPromptMessage	was_recorded_audio_correct
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK		 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7042
+
+START_TESTCASE 			BASE-BSP-SOUND-DRIVER-7043
+//! @SYMTestCaseID		BASE-BSP-SOUND-DRIVER-7043
+//! @SYMAPI			RMdaDevSound::PlayData(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RMdaDevSound::RecordData(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RMdaDevSound::NotifyRecordError(TRequestStatus {ref});
+//!				RMdaDevSound::CancelNotifyRecordError()
+//! @SYMAuthor			Vassili Tsvetkov
+//! @SYMCreationDate		15/06/2008
+//! @SYMTestCaseDesc		Call NotifyRecordError before recording file. Play default audio file with default format and at the same time 
+//!				record audio to different sound file. Call CancelNotifyRecordError after recording.
+//! @SYMTestActions		1. Call Open() with unit [UnitEnum]
+//!				2. Call GetPlayFormat() and verify from [default_play_format]
+//!				3. Call GetRecordFormat() and verify from [default_record_format]
+//!				4. Call NotifyRecordError()
+//!				5. Call PlayData() to play [default_audio_file]
+//!				6. Call RecordData to record audio to [temp_audio_file]
+//!				7. Call CancelNotifyRecordError()
+//!				8. Call Close()
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		Critical
+//! @SYMTestExpectedResults	NotifyRecordError() in step 5 completes with KErrOverflow. Recording in step 6 completes with KErrNone. 
+//!				Playing in step 3 completes with KErrNone. CancelNotifyRecordError completes with KErrNone.
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	100				t_sound			\base\sound\base-bsp-sound-driver.ini
+		CREATE_OBJECT	RMdaDevSound			devsound  
+		COMMAND		devsound			new
+		COMMAND		devsound			Open			UnitEnum
+		COMMAND		devsound			CancelRecordData
+		CREATE_OBJECT	TCurrentSoundFormat		t_format		
+		COMMAND		t_format			new
+		COMMAND		devsound			GetPlayFormat		BSP-SOUND-DRIVER-GetPlayFormat
+		//!verify default play configuration			
+		COMMAND		t_format			irate_get		default_play_format
+		COMMAND		t_format			iencoding_get		default_play_format
+		COMMAND		t_format			ichannels_get		default_play_format
+		COMMAND		t_format			ibuffer_size_get	default_play_format
+		COMMAND		devsound			GetRecordFormat		BSP-SOUND-DRIVER-GetRecordFormat
+		//!verify default record configuration			
+		COMMAND		t_format			irate_get		default_record_format
+		COMMAND		t_format			iencoding_get		default_record_format
+		COMMAND		t_format			ichannels_get		default_record_format
+		COMMAND		t_format			ibuffer_size_get	default_record_format
+		COMMAND		devsound			utilityPromptMessage	start_record_and_playing_simultaneously
+		COMMAND	!AsyncError=-9	devsound			NotifyRecordError
+		COMMAND		devsound			PlayData		default_file		
+		COMMAND		devsound			RecordData		temp_file
+		OUTSTANDING
+		COMMAND		devsound			CancelNotifyRecordError
+		COMMAND		devsound			utilityPromptMessage	start_playing_audio_recorded_in_previous_step
+		COMMAND		devsound			PlayData		temp_file
+		OUTSTANDING
+		COMMAND		devsound			utilityDeleteFile	delete_temp_file
+		COMMAND		devsound			utilityPromptMessage	was_recorded_audio_correct
+		COMMAND		t_format			~
+		COMMAND		devsound  			Close
+		COMMAND		devsound  			~
+	END_TEST_BLOCK	 
+END_TESTCASE 			BASE-BSP-SOUND-DRIVER-7043
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/scripts/base-bsp-sound-driver.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,33 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//! @file
+//! @SYMTestSuiteName  BASE-BSP-SOUND
+//! @SYMScriptTestEnvironment This test script requires a base rom image
+
+/////////////////////////////////////////////////////////////////////
+// BASE-BSP-SOUND-DRIVER.script
+//
+//
+// Tests all the PublishedPartner APIs of the RMdaDevSound
+// class as a means of confidence that the APIs work as expected.
+// All test cases will keep the sound system state and 
+// restore that to initial state when test case finished
+// Platform dependent configuration is picked up from the global environment files
+//
+/////////////////////////////////////////////////////////////////////
+
+RUN_SCRIPT	z:\base\sound\base-bsp-sound-driver-manual.script
+RUN_SCRIPT	z:\base\sound\base-bsp-sound-driver-automated.script
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/src/sound_util.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,175 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "sound_util.h"
+
+// Translation table for RMdaDevSound::TMdaSoundEncoding set
+
+_LIT(KStrEMdaSoundEncoding8BitPCM,			"EMdaSoundEncoding8BitPCM");
+_LIT(KStrEMdaSoundEncoding16BitPCM,			"EMdaSoundEncoding16BitPCM");
+_LIT(KStrEMdaSoundEncoding8BitALaw,			"EMdaSoundEncoding8BitALaw");
+_LIT(KStrEMdaSoundEncoding8BitMuLaw,		"EMdaSoundEncoding8BitMuLaw");
+
+// NB! Wrong member for negative testing
+_LIT(KStrEMdaSoundEncoding40BitPCM,			"EMdaSoundEncoding40BitPCM");
+_LIT(KStrNull,								"");
+
+const CDataWrapperBase::TEnumEntryTable		TSoundUtil::iEnumTableSoundEncoding[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrEMdaSoundEncoding8BitPCM,			RMdaDevSound::EMdaSoundEncoding8BitPCM,
+	KStrEMdaSoundEncoding16BitPCM,			RMdaDevSound::EMdaSoundEncoding16BitPCM,
+	KStrEMdaSoundEncoding8BitALaw,			RMdaDevSound::EMdaSoundEncoding8BitALaw,
+	KStrEMdaSoundEncoding8BitMuLaw,			RMdaDevSound::EMdaSoundEncoding8BitMuLaw,
+	KStrEMdaSoundEncoding40BitPCM,			0x00000040,
+	KStrNull,								-1
+	};
+
+/**
+ * Loading of generinc sound driver required for RMDaDevSound interface
+ * 
+ * @param aLll 				LDD driver name
+ * @param aPdd				PDD driver name
+ *
+ * @return					System wide error
+ *
+ * @leave					no
+ */
+TInt	TSoundUtil::LoadSoundDrivers(const TDesC& aLdd, const TDesC& aPdd)
+	{
+	TInt rerr = KErrNone;
+	
+	rerr = User::LoadPhysicalDevice(aPdd);
+	if(rerr != KErrNone && rerr != KErrAlreadyExists)
+		{
+		return rerr;
+		}
+	rerr = User::LoadLogicalDevice(aLdd);	
+	if(rerr != KErrNone && rerr != KErrAlreadyExists)
+		{
+		return rerr;
+		}
+	return KErrNone;	
+	}
+
+/**
+ * Un-loading of generinc sound driver required for RMDaDevSound interface
+ * 
+ * @param aLll 				LDD driver name
+ * @param aPdd				PDD driver name
+ *
+ * @return					System wide error
+ *
+ * @leave					no
+ */
+TInt	TSoundUtil::FreeSoundDrivers(const TDesC& aLdd, const TDesC& aPdd)
+	{
+	TInt rerr = KErrNone;
+	
+	rerr = User::FreePhysicalDevice(aPdd);
+	if(rerr != KErrNone && rerr != KErrAlreadyExists)
+		{
+		return rerr;
+		}
+	rerr = User::FreeLogicalDevice(aLdd);	
+	if(rerr != KErrNone && rerr != KErrAlreadyExists)
+		{
+		return rerr;
+		}
+	return KErrNone;	
+	}
+
+/**
+ * Store current RBuf8 content into the binary file
+ * 
+ * @param aFile 			file name to save audio data
+ *
+ * @return					System wide error
+ *
+ * @leave					System wide error
+ */
+TInt	TSoundUtil::RAudioBuffer::SaveAudioDataL(const TDesC& aFile)
+	{	
+	RFs fsSession;
+	::CleanupClosePushL(fsSession);
+	User::LeaveIfError(fsSession.Connect()); 	
+	TInt err = KErrNone;
+	RFile file;
+	err = file.Create(fsSession, aFile, EFileStream | EFileWrite);
+	if (!err)
+		{
+		err = file.Write(*this);
+
+		file.Close();
+		}	
+	fsSession.Close();
+	CleanupStack::PopAndDestroy();		
+	return err;
+	}
+
+/**
+ * Load binary file content into RBuf8
+ * 
+ * @param aFile 			file name where to load audio data
+ *
+ * @return					System wide error
+ *
+ * @leave					System wide error
+ */
+TInt	TSoundUtil::RAudioBuffer::LoadAudioDataL(const TDesC& aFile)
+	{
+	RFs fsSession;
+	::CleanupClosePushL(fsSession);
+	User::LeaveIfError(fsSession.Connect());	
+	TFindFile	findFile(fsSession);
+	TInt err = findFile.FindByDir(aFile, KStrNull);
+	if ( err == KErrNone )
+		{
+		const TDesC&	fileName=findFile.File();
+		RFile file;
+		err = file.Open(fsSession, fileName, EFileStream | EFileRead);
+		if (!err)
+			{
+			err = file.Read(*this);
+			file.Close();
+			}
+		}
+	fsSession.Close();
+	CleanupStack::PopAndDestroy();		
+	return err;	
+	}
+
+/**
+ * Delete file
+ * 
+ * @param aFile 			file name to delete
+ *
+ * @return					System wide error
+ *
+ * @leave					System wide error
+ */
+TInt	TSoundUtil::DeleteFileL(const TDesC& aFile)
+	{
+	RFs fsSession;
+	CleanupClosePushL(fsSession);
+	User::LeaveIfError(fsSession.Connect());
+	TInt err;
+	err = fsSession.Delete(aFile);	
+	fsSession.Close();
+	CleanupStack::PopAndDestroy();
+	return err;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/src/t_currentsoundformatdata.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,496 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+@test
+@internalComponent
+
+This contains CT_CurrentSoundFormatData
+*/
+
+//	User includes
+#include "t_currentsoundformatdata.h"
+#include "sound_util.h"
+
+/*@{*/
+///	Commands
+_LIT(KCmdNew,						"new");
+_LIT(KCmdDestructor,				"~");
+_LIT(KCmd_iRate_get,				"irate_get");
+_LIT(KCmd_iRate_set,				"irate_set");
+_LIT(KCmd_iEncoding_get,			"iencoding_get");
+_LIT(KCmd_iEncoding_set,			"iencoding_set");
+_LIT(KCmd_iChannels_get,			"ichannels_get");
+_LIT(KCmd_iChannels_set,			"ichannels_set");
+_LIT(KCmd_iBufferSize_get,			"ibuffer_size_get");
+_LIT(KCmd_iBufferSize_set,			"ibuffer_size_set");
+
+/*@{*/
+///	Parameters
+
+_LIT(KRate,							"rate");
+_LIT(KRateExpected,					"rate_expected");
+_LIT(KEncoding,						"encoding");
+_LIT(KEncodingExpected,				"encoding_expected");
+_LIT(KChannels,						"channels");
+_LIT(KChannelsExpected,				"channels_expected");
+_LIT(KBufferSize,					"buffer_size");
+_LIT(KBufferSizeExpected,			"buffer_size_expected");
+// possible parameter for new to indicate loading settings from 
+// SoundFormatsSupported object
+_LIT(KNewFromSoundFormatsSupported,	"new_from_sound_formats_supported");
+// for SoundFormatsSupported object
+_LIT(KSoundFormatsSupportedObject,	"SoundFormatsSupportedObject");
+// Enums declared in INI file
+
+///	Logging
+_LIT(KLogNew,						"New object created successfully");
+_LIT(KLogNewError,					"Error in creating object error code=%d");
+/*@}*/
+
+/**
+ * Two phase constructor
+ */
+CT_CurrentSoundFormatData* CT_CurrentSoundFormatData::NewL()
+	{
+	CT_CurrentSoundFormatData*	ret=new (ELeave) CT_CurrentSoundFormatData();
+	CleanupStack::PushL(ret);
+	ret->ConstructL();
+	CleanupStack::Pop(ret);
+	return ret;
+	}
+
+/**
+* Constructor. First phase construction
+*/
+CT_CurrentSoundFormatData::CT_CurrentSoundFormatData()
+:	CDataWrapperBase()
+,	iCurrentFormat(NULL)
+	{
+	}
+
+/**
+ * Second phase construction
+ */
+void CT_CurrentSoundFormatData::ConstructL()
+	{	
+	}
+
+/**
+* Destructor
+*/
+CT_CurrentSoundFormatData::~CT_CurrentSoundFormatData()
+	{
+	DoCleanup();
+	}
+
+/**
+ * Helper method for doing cleanup operation
+ */
+void CT_CurrentSoundFormatData::DoCleanup()
+	{
+	delete iCurrentFormat;
+	iCurrentFormat=NULL;	
+	}
+
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return pointer to the object that the data wraps
+ */
+TAny* CT_CurrentSoundFormatData::GetObject()
+
+	{
+	return iCurrentFormat;
+	}
+
+/**
+ * Set the wrapped data object with new value
+ */
+void CT_CurrentSoundFormatData::SetObjectL(TAny* aAny)
+
+	{
+	DoCleanup();
+	iCurrentFormat=static_cast<RMdaDevSound::TCurrentSoundFormat*>(aAny);
+	}
+
+/**
+ * Clear the wrapped data object pointer w/o de-initialization
+ */
+void CT_CurrentSoundFormatData::DisownObjectL()
+
+	{
+	iCurrentFormat=NULL;
+	}
+
+/**
+ * Return static cleanup function
+ */
+inline TCleanupOperation CT_CurrentSoundFormatData::CleanupOperation()
+
+	{
+	return CleanupOperation;
+	}
+
+/**
+ * Static cleanup function
+ */
+void CT_CurrentSoundFormatData::CleanupOperation( TAny* aAny )
+	{
+	RMdaDevSound::TCurrentSoundFormat* format = static_cast<RMdaDevSound::TCurrentSoundFormat*> ( aAny );
+	delete format;
+	}
+
+/**
+* Process a command read from the ini file
+*
+* @param aDataWrapper	test step requiring command to be processed
+* @param aCommand	the command to process
+* @param aSection		the entry in the ini file requiring the command to be processed
+*
+* @return ETrue if the command is processed
+*/
+TBool CT_CurrentSoundFormatData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+	{
+	TBool	ret=ETrue;
+	if ( aCommand==KCmdNew )
+		{
+		DoCmdNewL(aSection);
+		}
+	else if ( aCommand==KCmdDestructor )
+		{
+		DoCmdDestructor();
+		}
+	else if ( aCommand==KCmd_iRate_get )
+		{
+		DoCmd_iRate_get(aSection);
+		}
+	else if ( aCommand==KCmd_iEncoding_get )
+		{
+		DoCmd_iEncoding_getL(aSection);
+		}
+	else if ( aCommand==KCmd_iChannels_get )
+		{
+		DoCmd_iChannels_get(aSection);
+		}
+	else if ( aCommand==KCmd_iBufferSize_get )
+		{
+		DoCmd_iBufferSize_get(aSection);
+		}
+	else if ( aCommand==KCmd_iRate_set )
+		{
+		DoCmd_iRate_set(aSection);
+		}
+	else if ( aCommand==KCmd_iEncoding_set )
+		{
+		DoCmd_iEncoding_set(aSection);
+		}
+	else if ( aCommand==KCmd_iChannels_set )
+		{
+		DoCmd_iChannels_set(aSection);
+		}
+	else if ( aCommand==KCmd_iBufferSize_set )
+		{
+		DoCmd_iBufferSize_set(aSection);
+		}
+	else
+		{
+		ret=CDataWrapperBase::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+
+	return ret;
+	}
+
+/**
+ * Function for creating new instance of RMdaDevSound::TCurrentSoundFormat
+ * 
+ * @param aSection 			section name where can be indicated to create new
+ * 							from SoundFormatsSupported object values
+ * 							KNewFromSoundFormatsSupported - create from 
+ * 							SoundFormatsSupported object
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_CurrentSoundFormatData::DoCmdNewL(const TDesC& aSection)
+	{
+	DoCleanup();
+	
+	TRAPD(err, iCurrentFormat = new (ELeave) RMdaDevSound::TCurrentSoundFormat());	
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(KLogNewError, err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF1(KLogNew);
+		TBool new_object;
+		if (GET_OPTIONAL_BOOL_PARAMETER(KNewFromSoundFormatsSupported(), aSection, new_object))
+			{
+			DoInitiateSupportedFormatsL(aSection);
+			}
+		}
+	}
+
+/**
+ * Function to perform cleanup opertation
+ */
+void CT_CurrentSoundFormatData::DoCmdDestructor()
+	{
+	DoCleanup();
+	}
+
+/**
+ * Get function for iRate
+ * 
+ * @param aSection 			section name where expected value can be read
+ *							KRateExpected - expected rate
+ * 		
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_CurrentSoundFormatData::DoCmd_iRate_get(const TDesC& aSection)
+	{	
+	TInt	expected;
+	if (GET_OPTIONAL_INT_PARAMETER(KRateExpected(), aSection, expected))
+		{
+		if(iCurrentFormat->iRate != expected)
+			{
+			ERR_PRINTF3(_L("Expected result != iRate, expected=%d, iRate=%d"), expected, iCurrentFormat->iRate);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF1(_L("iRate == expected result!"));
+			}
+		}
+	else
+		{
+		INFO_PRINTF2(_L("iRate=%d"), iCurrentFormat->iRate);
+		}
+	}
+	
+
+/**
+ * Set function for iRate
+ * 
+ * @param aSection 			section name where value to set can be read
+ * 							KRate - rate to set
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_CurrentSoundFormatData::DoCmd_iRate_set(const TDesC& aSection)
+	{	
+	GET_MANDATORY_INT_PARAMETER(KRate(), aSection, iCurrentFormat->iRate);
+	}
+
+/**
+ * Get function for iEncoding
+ * 
+ * @param aSection 			section name where expected value can be read
+ * 							KEncodingExpected - expected encoding
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_CurrentSoundFormatData::DoCmd_iEncoding_getL(const TDesC& aSection)
+	{	
+	TUint expEncoding;
+	if(GetOrFromConfig(aSection, KEncodingExpected(), TSoundUtil::iEnumTableSoundEncoding, expEncoding ))
+		{
+		TUint encodings = iCurrentFormat->iEncoding;
+		if(expEncoding != encodings)
+			{
+			ERR_PRINTF3(_L("iEncoding != expected result! iEncodings=0x%x, expected result=0x%x"), encodings, expEncoding);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF3(_L("iEncoding == expected result!, iEncodings=0x%x, expected=0x%x"), encodings, expEncoding);
+			}			
+		}
+	else
+		{
+		INFO_PRINTF2(_L("iEncoding=0x%x"), iCurrentFormat->iEncoding);
+		}
+	}
+
+/**
+ * Set function for iEncoding
+ * 
+ * @param aSection 			section name where value to set can be read
+ * 							KEncoding - encoding to set
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_CurrentSoundFormatData::DoCmd_iEncoding_set(const TDesC& aSection)
+	{	
+	TUint encoding;
+	if(GetOrFromConfig(aSection, KEncoding(), TSoundUtil::iEnumTableSoundEncoding, encoding ))
+		{
+		iCurrentFormat->iEncoding = (RMdaDevSound::TMdaSoundEncoding)encoding;
+		INFO_PRINTF2(_L("iEncoding=0x%x"), iCurrentFormat->iEncoding);
+		}
+	else
+		{
+		ERR_PRINTF1(_L("Could not get encoding from TMdaSoundEncoding in INI file"));
+		SetBlockResult(EFail);
+		}
+	}
+
+/**
+ * Get function for iChannels
+ * 
+ * @param aSection 			section name where expected value can be read
+ * 							KChannelsExpected - channels expected
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_CurrentSoundFormatData::DoCmd_iChannels_get(const TDesC& aSection)
+	{
+	TInt	expected;
+	if (GET_OPTIONAL_INT_PARAMETER(KChannelsExpected(), aSection, expected))
+		{
+		if(iCurrentFormat->iChannels != expected)
+			{
+			ERR_PRINTF3(_L("Expected result != iChannels, expected=%d, iChannels=%d"), expected, iCurrentFormat->iChannels);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF1(_L("iChannels == expected result!"));
+			}
+		}
+	else
+		{
+		INFO_PRINTF2(_L("iChannels=%d"), iCurrentFormat->iChannels);
+		}
+	}
+
+/**
+ * Set function for iChannels
+ * 
+ * @param aSection 			section name where value to set can be read
+ * 							KChannels - channels to set
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_CurrentSoundFormatData::DoCmd_iChannels_set(const TDesC& aSection)
+	{
+	GET_MANDATORY_INT_PARAMETER(KChannels(), aSection, iCurrentFormat->iChannels);
+	}
+
+/**
+ * Get function for iBufferSize
+ * 
+ * @param aSection 			section name where expected value can be read
+ * 							KBufferSizeExpected - buffer size expected
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_CurrentSoundFormatData::DoCmd_iBufferSize_get(const TDesC& aSection)
+	{
+	TInt	expected;
+	if (GET_OPTIONAL_INT_PARAMETER(KBufferSizeExpected(), aSection, expected))
+		{
+		if(iCurrentFormat->iBufferSize != expected)
+			{
+			ERR_PRINTF3(_L("Expected result != iBufferSize, expected=%d, iBufferSize=%d"), expected, iCurrentFormat->iBufferSize);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF1(_L("iBufferSize == expected result!"));
+			}
+		}
+	else
+		{
+		INFO_PRINTF2(_L("iBufferSize=%d"), iCurrentFormat->iBufferSize);
+		}
+	}
+
+/**
+ * Set function for iBufferSize
+ * 
+ * @param aSection 			section name where value to set can be read
+ * 							KBufferSize - buffer size to set
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_CurrentSoundFormatData::DoCmd_iBufferSize_set(const TDesC& aSection)
+	{
+	GET_MANDATORY_INT_PARAMETER(KBufferSize(), aSection, iCurrentFormat->iBufferSize);
+	}
+
+/**
+ * Function to set current sound format with first valid values from 
+ * TSoundFormatsSupported object. Function will set iBufferSize, iChannels,
+ * iRate and iEncoding variable
+ * 
+ * @param aSection 			section name which contains SoundFormatsSupported object
+ *							KSoundFormatsSupportedObject - SoundFormatsSupported object
+ * 							name 
+ * 
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_CurrentSoundFormatData::DoInitiateSupportedFormatsL(const TDesC& aSection)
+	{
+	INFO_PRINTF1(_L("Calling DoInitiateSupportedFormats(), Setting iCurrentFormat variables from TSoundFormatsSupported"));
+	TPtrC		objectName;	
+	if (GET_MANDATORY_STRING_PARAMETER(KSoundFormatsSupportedObject, aSection, objectName))
+		{		
+		RMdaDevSound::TSoundFormatsSupported* soundFormat =
+			static_cast<RMdaDevSound::TSoundFormatsSupported*>(GetDataObjectL(objectName));	
+		iCurrentFormat->iBufferSize = soundFormat->iMinBufferSize;
+		iCurrentFormat->iChannels = soundFormat->iChannels;
+		iCurrentFormat->iRate = soundFormat->iMinRate;
+		if (soundFormat->iEncodings & RMdaDevSound::EMdaSoundEncoding8BitPCM) 
+			{
+			iCurrentFormat->iEncoding = RMdaDevSound::EMdaSoundEncoding8BitPCM;
+			}
+		else if(soundFormat->iEncodings & RMdaDevSound::EMdaSoundEncoding16BitPCM)
+			{
+			iCurrentFormat->iEncoding = RMdaDevSound::EMdaSoundEncoding16BitPCM;
+			}
+		else if(soundFormat->iEncodings & RMdaDevSound::EMdaSoundEncoding8BitALaw)
+			{
+			iCurrentFormat->iEncoding = RMdaDevSound::EMdaSoundEncoding8BitALaw;
+			}
+		else if(soundFormat->iEncodings & RMdaDevSound::EMdaSoundEncoding8BitMuLaw)
+			{
+			iCurrentFormat->iEncoding = RMdaDevSound::EMdaSoundEncoding8BitMuLaw;
+			}
+		}	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/src/t_mdadevsounddata.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1355 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+@test
+@internalComponent
+
+This contains CT_MdaDevSoundData
+*/
+
+//	User includes
+#include "t_mdadevsounddata.h"
+#include "t_sounddriverserver.h"
+
+/*@{*/
+///	Parameters
+
+_LIT(KSoundFormatsSupportedObject,	"SoundFormatsSupportedObject");
+_LIT(KCurrentSoundFormatObject,		"CurrentSoundFormatObject");
+
+_LIT(KUUnit,						"unit");
+_LIT(KUUnitEnum,					"UnitEnum");
+_LIT(KUToFile,						"to_file");
+_LIT(KUBlockSize,					"block_size");
+_LIT(KUVersion,						"version");
+
+_LIT(KUFromFile,					"from_file");
+_LIT(KUDataSize,					"data_size");
+_LIT(KUVolumeExpected,				"volume_expected");
+_LIT(KUVolume,						"volume");
+_LIT(KUBytesPlayed,					"bytes_played");
+_LIT(KUCancel,						"cancel");
+_LIT(KUFlush,						"flush");
+
+_LIT(KUSoundLevel,					"sound_level");
+_LIT(KUSoundLevelExpected,			"sound_level_expected");
+
+_LIT(KUFileToDelete,				"file_to_delete");
+
+_LIT(KLDDName,						"ldd");
+_LIT(KPDDName,						"pdd");
+
+
+
+/*@{*/
+///	Commands
+_LIT(KCmdUtilityDeleteFile,			"utilityDeleteFile");
+
+_LIT(KCmdRecordData,				"RecordData");
+_LIT(KCmdCancelRecordData,			"CancelRecordData");
+_LIT(KCmdFlushRecordBuffer,			"FlushRecordBuffer");
+_LIT(KCmdRecordLevel,				"RecordLevel");
+_LIT(KCmdSetRecordLevel,			"SetRecordLevel");
+_LIT(KCmdNotifyRecordError,			"NotifyRecordError");
+_LIT(KCmdCancelNotifyRecordError,	"CancelNotifyRecordError");
+
+_LIT(KCmdPlayVolume,				"PlayVolume");
+_LIT(KCmdSetPlayVolume,				"SetPlayVolume");
+_LIT(KCmdPlayData,					"PlayData");
+_LIT(KCmdCancelPlayData,			"CancelPlayData");
+_LIT(KCmdFlushPlayBuffer,			"FlushPlayBuffer");
+_LIT(KCmdNotifyPlayError,			"NotifyPlayError");
+_LIT(KCmdCancelNotifyPlayError,		"CancelNotifyPlayError");
+
+_LIT(KCmdBytesPlayed,				"BytesPlayed");
+_LIT(KCmdResetBytesPlayed,			"ResetBytesPlayed");
+_LIT(KCmdPausePlayBuffer,			"PausePlayBuffer");
+_LIT(KCmdResumePlaying,				"ResumePlaying");
+
+_LIT(KCmdPlayFormatsSupported,		"PlayFormatsSupported");
+_LIT(KCmdGetPlayFormat,				"GetPlayFormat");
+_LIT(KCmdSetPlayFormat,				"SetPlayFormat");
+_LIT(KCmdRecordFormatsSupported,	"RecordFormatsSupported");
+_LIT(KCmdGetRecordFormat,			"GetRecordFormat");
+_LIT(KCmdSetRecordFormat,			"SetRecordFormat");
+
+_LIT(KCmdNew,						"new");
+_LIT(KCmdOpen,						"Open");
+_LIT(KCmdClose,						"Close");
+_LIT(KCmdDestructor,				"~");
+_LIT(KCmdIsMdaSound,				"IsMdaSound");
+_LIT(KCmdVersionRequired,			"VersionRequired");
+/*@}*/
+
+/**
+ * Two phase constructor
+ */
+CT_MdaDevSoundData* CT_MdaDevSoundData::NewL(RMdaDevSound* aServerStore)
+	{
+	CT_MdaDevSoundData*	ret = new (ELeave) CT_MdaDevSoundData(aServerStore);
+	CleanupStack::PushL(ret);
+	ret->ConstructL();
+	CleanupStack::Pop(ret);
+	return ret;	
+	}
+
+/**
+ * Protected constructor. First phase construction
+ */
+CT_MdaDevSoundData::CT_MdaDevSoundData(RMdaDevSound* aServerStore)
+	:iServerStore(aServerStore)
+	{
+	}
+
+/**
+* Protected constructor. Second phase construction
+*/
+void CT_MdaDevSoundData::ConstructL()
+	{
+	}
+
+/**
+ * Destructor.
+ */
+CT_MdaDevSoundData::~CT_MdaDevSoundData()
+	{	
+	DoCleanup();
+
+	iNotifyPlayError.ResetAndDestroy();
+	iNotifyRecordError.ResetAndDestroy();
+	iPlay.ResetAndDestroy();
+	iRecord.ResetAndDestroy();
+	}
+
+/**
+ * Contains cleanup implementation
+ */
+void CT_MdaDevSoundData::DoCleanup()
+	{
+	if(iMdaDevSound)
+		{
+		INFO_PRINTF1(_L("Deleting current RMdaDevSound"));
+		delete iMdaDevSound;
+		iMdaDevSound = NULL;
+		}
+	}
+
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return pointer to the object that the data wraps
+ */
+TAny* CT_MdaDevSoundData::GetObject()
+	{
+	return iMdaDevSound;
+	}
+
+/**
+ * Set the wrapped data object with new value
+ */
+void CT_MdaDevSoundData::SetObjectL( TAny* aAny )
+	{
+	DoCleanup();
+	iMdaDevSound = static_cast<RMdaDevSound*> ( aAny );
+	*iServerStore = *iMdaDevSound; 
+	}
+
+/**
+ * Clear the wrapped data object pointer w/o de-initialization
+ */
+void CT_MdaDevSoundData::DisownObjectL()
+	{
+	iMdaDevSound = NULL;
+	iServerStore->SetHandle(KNullHandle);
+	}
+
+/**
+ * Return static cleanup function
+ */
+inline TCleanupOperation CT_MdaDevSoundData::CleanupOperation()
+	{
+	return CleanupOperation;
+	}
+
+/**
+ * Static cleanup function
+ */
+void CT_MdaDevSoundData::CleanupOperation( TAny* aAny )
+	{
+	RMdaDevSound* sound = static_cast<RMdaDevSound*> ( aAny );
+	delete sound;
+	}
+
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand	the command to process
+ * @param aSection		the entry in the ini file requiring the command to be processed
+ *
+ * @return ETrue if the command is processed
+ */
+TBool CT_MdaDevSoundData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+	{
+	TBool	ret=ETrue;
+	if (aCommand == KCmdNew)
+		{
+		DoCmdNewL();
+		}
+	else if (aCommand == KCmdClose)
+		{
+		DoCmdClose();
+		}
+	else if (aCommand == KCmdDestructor)
+		{
+		DoCmdDestructor();
+		}
+	else if (aCommand == KCmdOpen)
+		{
+		DoCmdOpen(aSection);
+		}
+	else if (aCommand == KCmdIsMdaSound)
+		{
+		DoCmdIsMdaSound();
+		}
+	else if (aCommand == KCmdVersionRequired)
+		{
+		DoCmdVersionRequired(aSection);
+		}
+	else if (aCommand == KCmdPlayFormatsSupported)
+		{
+		DoCmdPlayFormatsSupportedL(aSection);
+		}
+	else if (aCommand == KCmdGetPlayFormat)
+		{
+		DoCmdGetPlayFormatL(aSection);
+		}
+	else if (aCommand == KCmdSetPlayFormat)
+		{
+		DoCmdSetPlayFormatL(aSection);
+		}
+	else if (aCommand == KCmdRecordFormatsSupported)
+		{
+		DoCmdRecordFormatsSupportedL(aSection);
+		}
+	else if (aCommand == KCmdGetRecordFormat)
+		{
+		DoCmdGetRecordFormatL(aSection);
+		}
+	else if (aCommand == KCmdSetRecordFormat)
+		{
+		DoCmdSetRecordFormatL(aSection);
+		}
+	else if (aCommand == KCmdPlayVolume)
+		{
+		DoCmdPlayVolume(aSection);
+		}
+	else if (aCommand == KCmdSetPlayVolume)
+		{
+		DoCmdSetPlayVolume(aSection);
+		}
+	else if (aCommand == KCmdPlayData)
+		{
+		DoCmdPlayDataL(aSection, aAsyncErrorIndex);
+		}
+	else if (aCommand == KCmdCancelPlayData)
+		{
+		DoCmdCancelPlayData();
+		}
+	else if (aCommand == KCmdFlushPlayBuffer)
+		{
+		DoCmdFlushPlayBuffer();
+		}
+	else if (aCommand == KCmdFlushPlayBuffer)
+		{
+		DoCmdNotifyPlayErrorL(aAsyncErrorIndex);
+		}
+	else if (aCommand == KCmdFlushPlayBuffer)
+		{
+		DoCmdCancelNotifyPlayError();
+		}
+	else if (aCommand == KCmdNotifyPlayError)
+		{
+		DoCmdNotifyPlayErrorL(aAsyncErrorIndex);
+		}
+	else if (aCommand == KCmdCancelNotifyPlayError)
+		{
+		DoCmdCancelNotifyPlayError();
+		}
+	else if (aCommand == KCmdBytesPlayed)
+		{
+		DoCmdBytesPlayed(aSection);
+		}
+	else if (aCommand == KCmdResetBytesPlayed)
+		{
+		DoCmdResetBytesPlayed();
+		}
+	else if (aCommand == KCmdPausePlayBuffer)
+		{
+		DoCmdPausePlayBuffer();
+		}
+	else if (aCommand == KCmdResumePlaying)
+		{
+		DoCmdResumePlaying();
+		}
+	else if (aCommand == KCmdRecordData)
+		{
+		DoCmdRecordDataL(aSection, aAsyncErrorIndex);
+		}
+	else if (aCommand == KCmdCancelRecordData)
+		{
+		DoCmdCancelRecordData();
+		}
+	else if (aCommand == KCmdFlushRecordBuffer)
+		{
+		DoCmdFlushRecordBuffer();
+		}
+	else if (aCommand == KCmdRecordLevel)
+		{
+		DoCmdRecordLevel(aSection);
+		}
+	else if (aCommand == KCmdSetRecordLevel)
+		{
+		DoCmdSetRecordLevel(aSection);
+		}
+	else if (aCommand == KCmdNotifyRecordError)
+		{
+		DoCmdNotifyRecordErrorL(aAsyncErrorIndex);
+		}
+	else if (aCommand == KCmdCancelNotifyRecordError)
+		{
+		DoCmdCancelNotifyRecordError();
+		}
+	else if (aCommand == KCmdUtilityDeleteFile)
+		{
+		DoCmdUtilityDeleteFileL(aSection);
+		}
+	else
+		{
+		ret=CDataWrapperBase::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+
+	return ret;
+	}
+
+/** 
+ * Creates new RMdaDevSound class instance 
+ */
+void CT_MdaDevSoundData::DoCmdNewL()
+	{
+	INFO_PRINTF1(_L("Create new RMdaDevSound class instance"));
+	
+	//Deletes previous RMdaDevsound class instance if it was already created.
+	DoCleanup();
+
+	// do create
+	TRAPD(err, iMdaDevSound = new (ELeave) RMdaDevSound());
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("new error %d"), err);
+		SetError( err );
+		}
+	}
+
+/** 
+ * Close RMdaDevSound handle 
+ */
+void CT_MdaDevSoundData::DoCmdClose()
+	{
+	INFO_PRINTF1(_L("Closing RMdaDevSound"));
+	iServerStore->SetHandle(KNullHandle);
+	iMdaDevSound->Close();
+	}
+
+/** 
+ * Destroy RMdaDevSound the object 
+ */
+void CT_MdaDevSoundData::DoCmdDestructor()
+	{
+	INFO_PRINTF1(_L("Destroying the RMdaDevSound object"));
+	//close RMdaDevSound first
+	iServerStore->SetHandle(KNullHandle);
+	iMdaDevSound->Close();
+	DoCleanup();
+	}
+
+/** 
+ * Connects a client to the sound driver server 
+ * 
+ * @param aSection 			section name which contains unit
+ * 							KUUnit - unit to open
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_MdaDevSoundData::DoCmdOpen(const TDesC& aSection)
+	{
+	//Loading device drivers
+	TPtrC lddName;
+	TPtrC pddName;
+	if(GET_OPTIONAL_STRING_PARAMETER(KLDDName(), aSection, lddName) &&
+		GET_OPTIONAL_STRING_PARAMETER(KPDDName(), aSection, pddName))
+		{
+		TInt err = TSoundUtil::LoadSoundDrivers(lddName, pddName);	
+		if( (err != KErrNone) && (err != KErrAlreadyExists ))
+			{
+			ERR_PRINTF4(_L("Open() -> LoadSoundDrivers(%S, %S) error %d"), &lddName, &pddName, err);
+			SetError( err );		
+			}
+		}
+	//Finish Loading device drivers
+			
+	TInt	unit = KNullUnit;
+	TPtrC	unitName;
+	if (GET_OPTIONAL_STRING_PARAMETER(KUUnit(), aSection, unitName))
+		{
+		GetHexFromConfig(KUUnitEnum(), unitName, unit );
+		}
+	TInt err = iMdaDevSound->Open(unit);
+	*iServerStore = *iMdaDevSound;
+	INFO_PRINTF2(_L("Call Open(unit = %d)"), unit);
+	
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("Open() error %d"), err);
+		SetError( err );
+		}		
+	}	
+	
+	
+	
+
+/** 
+ * Checks if driver is MdaSound
+ */
+void CT_MdaDevSoundData::DoCmdIsMdaSound()
+	{
+	INFO_PRINTF1(_L("CT_MdaDevSoundData::DoCmdIsMdaSound Called"));
+	
+	TInt err = iMdaDevSound->IsMdaSound();	
+	if(err!=KErrNone)
+		{
+		ERR_PRINTF2(_L("IsMdaSound() error %d"), err);
+		SetError(err);
+		}
+	
+	}
+
+/** 
+ * Checks driver version required
+ * 
+ * @param aSection 			section name with expected version
+ *							KUVersion - version expected
+ * 
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_MdaDevSoundData::DoCmdVersionRequired(const TDesC& aSection)
+	{
+	INFO_PRINTF1(_L("CT_MdaDevSoundData::VersionRequired Called"));
+	
+	TVersion version = iMdaDevSound->VersionRequired();
+	TPtrC versionNameFromSystem = version.Name();
+	TPtrC versionName;
+	if(GET_MANDATORY_STRING_PARAMETER(KUVersion(), aSection, versionName))
+		{
+		if(versionNameFromSystem != versionName)
+			{
+			ERR_PRINTF1(_L("iMdaDevSound->VersionRequired() != expected"));
+			ERR_PRINTF3(_L("version.Name()=%S, expected=%S"), &versionNameFromSystem, &versionName);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF1(_L("iMdaDevSound->VersionRequired() == expected"));
+			}
+		}
+	
+	}
+
+/** 
+ * Gets PlayFormatsSupported
+ * 
+ * @param aSection 			Section name which contains SoundFormatsSupported 
+ * 							object name
+ *  						KSoundFormatsSupportedObject - SoundFormatsSupported 
+ * 							object name
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MdaDevSoundData::DoCmdPlayFormatsSupportedL(const TDesC& aSection)
+	{	
+	INFO_PRINTF1(_L("Getting PlayFormatsSupported!"));
+	
+	TPtrC		objectName;	
+	if (GET_MANDATORY_STRING_PARAMETER(KSoundFormatsSupportedObject, aSection, objectName))
+		{		
+		RMdaDevSound::TSoundFormatsSupported* soundFormat = static_cast<RMdaDevSound::TSoundFormatsSupported*>(GetDataObjectL(objectName));		
+		RMdaDevSound::TSoundFormatsSupportedBuf soundFormatsSupportedBuf(*soundFormat);		
+		iMdaDevSound->PlayFormatsSupported(soundFormatsSupportedBuf);		
+		*soundFormat = soundFormatsSupportedBuf();		
+		}		
+	}
+
+/** 
+ * Gets current PlayFormat
+ * 
+ * @param aSection 			Section name which contains CurrentSoundFormat 
+ * 							object name
+ *  						KCurrentSoundFormatObject - CurrentSoundFormat 
+ * 							object name
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MdaDevSoundData::DoCmdGetPlayFormatL(const TDesC& aSection)
+	{
+	INFO_PRINTF1(_L("Getting PlayFormat!"));
+	
+	TPtrC		objectName;	
+	if (GET_MANDATORY_STRING_PARAMETER(KCurrentSoundFormatObject, aSection, objectName))
+		{		
+		RMdaDevSound::TCurrentSoundFormat* soundFormat = static_cast<RMdaDevSound::TCurrentSoundFormat*>(GetDataObjectL(objectName));		
+		RMdaDevSound::TCurrentSoundFormatBuf currentSoundFormatBuf(*soundFormat);		
+		iMdaDevSound->GetPlayFormat(currentSoundFormatBuf);		
+		*soundFormat = currentSoundFormatBuf();
+		}		
+	}
+
+/** 
+ * Sets current PlayFormat
+ * 
+ * @param aSection 			Section name which contains CurrentSoundFormat 
+ * 							object name
+ * 							KCurrentSoundFormatObject - CurrentSoundFormat 
+ * 							object name
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MdaDevSoundData::DoCmdSetPlayFormatL(const TDesC& aSection)
+	{
+	INFO_PRINTF1(_L("Setting PlayFormat!"));
+	
+	TPtrC		objectName;	
+	if (GET_MANDATORY_STRING_PARAMETER(KCurrentSoundFormatObject, aSection, objectName))
+		{		
+		RMdaDevSound::TCurrentSoundFormat* soundFormat = static_cast<RMdaDevSound::TCurrentSoundFormat*>(GetDataObjectL(objectName));		
+		RMdaDevSound::TCurrentSoundFormatBuf currentSoundFormatBuf(*soundFormat);		
+		TInt err = iMdaDevSound->SetPlayFormat(currentSoundFormatBuf);
+		if(err != KErrNone)
+			{
+			ERR_PRINTF2(_L("error in SetPlayFormatL %d"), err);
+			SetError( err );
+			}
+		else
+			{
+			*soundFormat = currentSoundFormatBuf();
+			}
+		}
+	}
+
+/** 
+ * Gets RecordFormatsSupported
+ * 
+ * @param aSection 			Section name which contains SoundFormatsSupported 
+ * 							object name
+ * 							KSoundFormatsSupportedObject - SoundFormatsSupported 
+ * 							object name
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MdaDevSoundData::DoCmdRecordFormatsSupportedL(const TDesC& aSection)
+	{
+	INFO_PRINTF1(_L("Getting RecordFormatsSupported!"));
+
+	TPtrC		objectName;
+	if (GET_MANDATORY_STRING_PARAMETER(KSoundFormatsSupportedObject, aSection, objectName))
+		{		
+		RMdaDevSound::TSoundFormatsSupported* soundFormat = static_cast<RMdaDevSound::TSoundFormatsSupported*>(GetDataObjectL(objectName));		
+		RMdaDevSound::TSoundFormatsSupportedBuf soundFormatsSupportedBuf(*soundFormat);		
+		iMdaDevSound->RecordFormatsSupported(soundFormatsSupportedBuf);		
+		*soundFormat = soundFormatsSupportedBuf();		
+		}
+	}
+
+/** 
+ * Gets current RecordFormat
+ * 
+ * @param aSection 			Section name which contains CurrentSoundFormat 
+ * 							object name
+ *  						KCurrentSoundFormatObject - CurrentSoundFormat 
+ * 							object name
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MdaDevSoundData::DoCmdGetRecordFormatL(const TDesC& aSection)
+	{
+	INFO_PRINTF1(_L("Getting RecordFormat!"));
+	
+	TPtrC		objectName;	
+	if (GET_MANDATORY_STRING_PARAMETER(KCurrentSoundFormatObject, aSection, objectName))
+		{		
+		RMdaDevSound::TCurrentSoundFormat* soundFormat = static_cast<RMdaDevSound::TCurrentSoundFormat*>(GetDataObjectL(objectName));		
+		RMdaDevSound::TCurrentSoundFormatBuf currentSoundFormatBuf(*soundFormat);		
+		iMdaDevSound->GetRecordFormat(currentSoundFormatBuf);		
+		*soundFormat = currentSoundFormatBuf();
+		}
+	}
+
+/** 
+ * Sets current RecordFormat
+ * 
+ * @param aSection 			Section name which contains CurrentSoundFormat 
+ * 							object name
+ * 							KCurrentSoundFormatObject - CurrentSoundFormat 
+ * 							object name
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MdaDevSoundData::DoCmdSetRecordFormatL(const TDesC& aSection)
+	{
+	INFO_PRINTF1(_L("Setting RecordFormat!"));
+	
+	TPtrC		objectName;	
+	if (GET_MANDATORY_STRING_PARAMETER(KCurrentSoundFormatObject, aSection, objectName))
+		{		
+		RMdaDevSound::TCurrentSoundFormat* soundFormat = static_cast<RMdaDevSound::TCurrentSoundFormat*>(GetDataObjectL(objectName));		
+		RMdaDevSound::TCurrentSoundFormatBuf currentSoundFormatBuf(*soundFormat);		
+		TInt err = iMdaDevSound->SetRecordFormat(currentSoundFormatBuf);
+		if(err != KErrNone)
+			{
+			ERR_PRINTF2(_L("error in SetRecordFormatL %d"), err);
+			SetError( err );
+			}
+		else
+			{
+			*soundFormat = currentSoundFormatBuf();
+			}
+		}
+	}
+
+/** 
+ * Gets current PlayVolume
+ * 
+ * @param aSection 			Section name which contains expected value
+ * 							KUVolumeExpected - expected volume level
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void	CT_MdaDevSoundData::DoCmdPlayVolume(const TDesC& aSection)
+	{
+	TInt volume = 0;
+	INFO_PRINTF2(_L("calling PlayVolume(), value before execution = %d"), volume);
+	volume = iMdaDevSound->PlayVolume();
+	
+	TInt	expected;
+	if (GET_OPTIONAL_INT_PARAMETER(KUVolumeExpected(), aSection, expected))
+		{
+		if(volume != expected)
+			{
+			ERR_PRINTF3(_L("Expected result != volume, expected = %d, volume = %d"),
+							expected, volume);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF2(_L("volume = %d"), volume);
+			}
+		}
+	else
+		{
+		INFO_PRINTF2(_L("volume = %d"), volume);
+		}
+	}
+
+/** 
+ * Sets current PlayVolume
+ * 
+ * @param aSection 			Section name which contains value to set
+ * 							KUVolume - volume to set
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void	CT_MdaDevSoundData::DoCmdSetPlayVolume(const TDesC& aSection)
+	{
+	TInt volume = 0;
+	INFO_PRINTF2(_L("calling SetPlayVolume(), value before execution = %d"), volume);
+	if (GET_OPTIONAL_INT_PARAMETER(KUVolume(), aSection, volume))
+		{
+		iMdaDevSound->SetPlayVolume(volume);
+		INFO_PRINTF2(_L("after execution value = %d"), volume);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("volume after execution = %d"), volume);
+		}
+	}
+
+/** 
+ * Play audio from file. DoCmdPlayDataL is asynchronous function
+ * 
+ * @param aSection 			Section name which can contain values to set
+ * 							KUDataSize - data size, 
+ * 							KUFromFile - file name to play, 
+ * 							KUBlockSize - block size
+ * 							
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void	CT_MdaDevSoundData::DoCmdPlayDataL(const TDesC& aSection, 
+											const TInt aAsyncErrorIndex)
+	{
+	INFO_PRINTF1(_L("calling PlayData()"));
+	
+	CT_SoundActiveCallback* active = CT_SoundActiveCallback::NewL(*this);
+	iPlay.Append(active);
+		
+	active->iSoundData = new(ELeave) TSoundUtil::RAudioBuffer();
+	TSoundUtil::RAudioBuffer* soundData = active->iSoundData;
+
+	TInt dataSize = TSoundUtil::KAudioBufferMaxSize;
+	GET_OPTIONAL_INT_PARAMETER(KUDataSize, aSection, dataSize);
+	soundData->Close();
+	soundData->CreateL(dataSize);
+
+	TPtrC	fileName;
+	TInt err = KErrNone;
+	if (GET_OPTIONAL_STRING_PARAMETER(KUFromFile, aSection, fileName))
+		{
+		err = soundData->LoadAudioDataL(fileName);
+		if (err)
+			{
+			SetBlockResult(EFail);
+			ERR_PRINTF2(_L("Audio file loading failed with error code %d"), err);
+			}
+		}
+
+	if (!err)
+		{
+		active->SetSection(aSection);
+		IncOutstanding();
+
+		TInt blockSize = TSoundUtil::KDefaultBlockSize;
+		GET_OPTIONAL_INT_PARAMETER(KUBlockSize, aSection, blockSize);
+		blockSize = Min(blockSize, soundData->Length());
+		active->iBufferBlock.Set(&soundData->operator[](0), blockSize, blockSize);
+		iMdaDevSound->PlayData(active->iStatus, active->iBufferBlock);
+		active->Activate(aAsyncErrorIndex);
+		TBool stopPlay = EFalse;
+		if (GET_OPTIONAL_BOOL_PARAMETER(KUCancel, aSection, stopPlay))
+			{
+			if ( stopPlay )
+				{
+				iMdaDevSound->CancelPlayData();
+				INFO_PRINTF1(_L("CancelPlayData() executed"));
+				}
+			}
+		if (GET_OPTIONAL_BOOL_PARAMETER(KUFlush, aSection, stopPlay))
+			{
+			if ( stopPlay )
+				{
+				iMdaDevSound->FlushPlayBuffer();
+				INFO_PRINTF1(_L("FlushPlayBuffer() executed"));
+				}
+			}
+		}
+	}
+
+/** 
+ * Cancel playing
+ */
+void	CT_MdaDevSoundData::DoCmdCancelPlayData()
+	{
+	INFO_PRINTF1(_L("calling CancelPlayData()"));
+	
+	if (iPlay.Count() > 0)
+		{
+		INFO_PRINTF2(_L("CancelPlayData called on active object with iStatus == %d"),
+				iPlay[iPlay.Count() - 1]->iStatus.Int());
+		}
+	else
+		{
+		INFO_PRINTF1(_L("No active objects found"));
+		}
+	
+	iMdaDevSound->CancelPlayData();
+	}
+
+/** 
+ * Flush play buffer
+ */
+void	CT_MdaDevSoundData::DoCmdFlushPlayBuffer()
+	{
+	INFO_PRINTF1(_L("calling FlushPlayBuffer()"));
+
+	if (iPlay.Count() > 0)
+		{
+		INFO_PRINTF2(_L("FLushPlayBuffer called on active object with iStatus == %d"),
+				iPlay[iPlay.Count() - 1]->iStatus.Int());
+		}
+	else
+		{
+		INFO_PRINTF1(_L("No active objects found"));
+		}
+	
+	iMdaDevSound->FlushPlayBuffer();
+	}
+
+/** 
+ * Asynchronous function that starts notifying play error
+ */
+void	CT_MdaDevSoundData::DoCmdNotifyPlayErrorL(const TInt aAsyncErrorIndex)
+	{
+	INFO_PRINTF1(_L("calling NotifyPlayError()"));
+	
+	CActiveCallback* active = CActiveCallback::NewL(*this);
+	iNotifyPlayError.Append(active);
+	iMdaDevSound->NotifyPlayError(active->iStatus);
+		
+	//acitvate callback object
+	active->Activate(aAsyncErrorIndex);
+	IncOutstanding();
+	}
+
+/** 
+ * Cancel notifying play error
+ */
+void	CT_MdaDevSoundData::DoCmdCancelNotifyPlayError()
+	{
+	INFO_PRINTF1(_L("calling CancelNotifyPlayError()"));
+	
+	iMdaDevSound->CancelNotifyPlayError();
+	}
+
+/** 
+ * Gets bytes played
+ * 
+ * @param aSection 			Section name which can contain expected value
+ * 							KUBytesPlayed - bytes played
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void	CT_MdaDevSoundData::DoCmdBytesPlayed(const TDesC& aSection)
+	{
+	INFO_PRINTF1(_L("calling BytesPlayed()"));
+	
+	TInt bytesPlayed = iMdaDevSound->BytesPlayed();
+	INFO_PRINTF2(_L("Bytes played: %d"), bytesPlayed);
+
+	TInt expected = 0;
+	if (GET_OPTIONAL_INT_PARAMETER(KUBytesPlayed, aSection, expected))
+		{
+		if (expected != bytesPlayed)
+			{
+			ERR_PRINTF3(_L("Bytes played %d != %d expected"), bytesPlayed, expected);
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+/** 
+ * Resets bytes played
+ */
+void	CT_MdaDevSoundData::DoCmdResetBytesPlayed()
+	{
+	INFO_PRINTF1(_L("calling ResetBytesPlayed()"));
+	
+	iMdaDevSound->ResetBytesPlayed();
+	}
+
+/** 
+ * Pause playing
+ */
+void	CT_MdaDevSoundData::DoCmdPausePlayBuffer()
+	{
+	INFO_PRINTF1(_L("calling PausePlayBuffer()"));
+	
+	iMdaDevSound->PausePlayBuffer();
+	}
+
+/** 
+ * Resume playing
+ */
+void	CT_MdaDevSoundData::DoCmdResumePlaying()
+	{
+	INFO_PRINTF1(_L("calling ResumePlaying()"));
+	
+	iMdaDevSound->ResumePlaying();		
+	}
+
+/** 
+ * DoCmdRecordDataL is asynchronous function to record audio.
+ * 
+ * @param aSection 			Section name which can contain value to set
+ * 							KUDataSize - data size to record, 
+ * 							KUToFile - file to record audio,
+ * 							KUBlockSize - block size
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MdaDevSoundData::DoCmdRecordDataL(const TDesC& aSection, const TInt aAsyncErrorIndex)
+	{
+	INFO_PRINTF1(_L("calling RecordData()"));	
+	
+	CT_SoundActiveCallback* active = CT_SoundActiveCallback::NewL(*this);
+	iRecord.Append(active);
+	
+	active->iSoundData = new(ELeave) TSoundUtil::RAudioBuffer();
+	TSoundUtil::RAudioBuffer* soundData = active->iSoundData;
+
+	TInt dataSize = TSoundUtil::KAudioBufferMaxSize;
+	GET_OPTIONAL_INT_PARAMETER(KUDataSize, aSection, dataSize);
+	soundData->Close();
+	soundData->CreateL(dataSize);
+	soundData->SetLength(dataSize);
+
+	TInt blockSize = TSoundUtil::KDefaultBlockSize;
+	GET_OPTIONAL_INT_PARAMETER(KUBlockSize, aSection, blockSize);
+	active->iBufferBlock.Set(&soundData->operator[](0), 0, Min(blockSize, soundData->Length()));
+	iMdaDevSound->RecordData(active->iStatus, active->iBufferBlock);
+
+	active->SetSection(aSection);
+	IncOutstanding();
+	active->Activate(aAsyncErrorIndex);
+	TBool stopRecord = EFalse;
+	if (GET_OPTIONAL_BOOL_PARAMETER(KUCancel, aSection, stopRecord))
+		{
+		if ( stopRecord )
+			{
+			iMdaDevSound->CancelPlayData();
+			INFO_PRINTF1(_L("CancelRecordData() executed"));
+			}
+		}
+	if (GET_OPTIONAL_BOOL_PARAMETER(KUFlush, aSection, stopRecord))
+		{
+		if ( stopRecord )
+			{
+			iMdaDevSound->FlushRecordBuffer();
+			INFO_PRINTF1(_L("FlushRecordBuffer() executed"));
+			}
+		}
+	}
+
+/** 
+ * Cancels recording in progress
+ */
+void CT_MdaDevSoundData::DoCmdCancelRecordData()
+	{
+	INFO_PRINTF1(_L("calling CancelRecordData()"));
+	
+	if (iRecord.Count() > 0)
+		{
+		INFO_PRINTF2(_L("CancelRecordData called on active object with iStatus == %d"),
+				iRecord[iRecord.Count() - 1]->iStatus.Int());
+		}
+	else
+		{
+		INFO_PRINTF1(_L("No active objects found"));
+		}
+	
+	iMdaDevSound->CancelRecordData();
+	}
+
+/** 
+ * Flushes record buffer
+ */
+void CT_MdaDevSoundData::DoCmdFlushRecordBuffer()
+	{
+	INFO_PRINTF1(_L("calling FlushRecordBuffer()"));
+	
+	if (iRecord.Count() > 0)
+		{
+		INFO_PRINTF2(_L("FlushRecordBuffer called on active object with iStatus == %d"),
+				iRecord[iRecord.Count() - 1]->iStatus.Int());
+		}
+	else
+		{
+		INFO_PRINTF1(_L("No active objects found"));
+		}
+	
+	iMdaDevSound->FlushRecordBuffer();
+	}
+
+/** 
+ * Gets record volume level
+ * 
+ * @param aSection 			Section name which can contain expected value
+ * 							KUSoundLevelExpected - expected sound level
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_MdaDevSoundData::DoCmdRecordLevel(const TDesC& aSection)
+	{	
+	TInt level = 0;
+	INFO_PRINTF1(_L("calling RecordLevel()"));
+	level = iMdaDevSound->RecordLevel();
+	
+	TInt	expected;
+	if (GET_OPTIONAL_INT_PARAMETER(KUSoundLevelExpected(), aSection, expected))
+		{
+		if(level != expected)
+			{
+			ERR_PRINTF3(_L("Expected result != level, expected = %d, level = %d"),
+							expected, level);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF2(_L("level = %d"), level);
+			}
+		}
+	else
+		{
+		INFO_PRINTF2(_L("level = %d"), level);
+		}
+	}
+
+/** 
+ * Sets record volume level
+ * 
+ * @param aSection 			Section name which can contain value to set
+ * 							KUSoundLevel - sound level to set
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_MdaDevSoundData::DoCmdSetRecordLevel(const TDesC& aSection)
+	{
+	TInt level = 0;
+	INFO_PRINTF2(_L("calling SetRecordLevel(), level before execution = %d"), level);
+	
+	if(GET_OPTIONAL_INT_PARAMETER(KUSoundLevel, aSection, level))
+		{
+		iMdaDevSound->SetRecordLevel(level);
+		INFO_PRINTF2(_L("after execution level = %d"), level);
+		}	
+	else
+		{
+		INFO_PRINTF2(_L("level after execution = %d"), level);
+		}
+	}
+
+/** 
+ * DoCmdNotifyRecordErrorL is asynchronous function that starts notifying recording
+ * error
+ */
+void CT_MdaDevSoundData::DoCmdNotifyRecordErrorL(const TInt aAsyncErrorIndex)
+	{
+	INFO_PRINTF1(_L("calling NotifyRecordError()"));
+	
+	CActiveCallback* active = CActiveCallback::NewL(*this);
+	iNotifyRecordError.Append(active);
+	
+	iMdaDevSound->NotifyRecordError(active->iStatus);
+	
+	//acitvate callback object
+	active->Activate(aAsyncErrorIndex);
+	IncOutstanding();	
+	}
+
+/** 
+ * Cancels notifying recording error
+ */
+void CT_MdaDevSoundData::DoCmdCancelNotifyRecordError()
+	{
+	INFO_PRINTF1(_L("calling CancelNotifyRecordError()"));
+	
+	iMdaDevSound->CancelNotifyRecordError();
+	}
+
+/** 
+ * Deletes file specified
+ * 
+ * @param aSection 			Section name which contains file name to delete
+ * 							KUFileToDelete - File to delete 
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_MdaDevSoundData::DoCmdUtilityDeleteFileL(const TDesC& aSection)
+	{
+	INFO_PRINTF1(_L("DoCmdUtilityDeleteFileL called!"));
+	
+	TPtrC	file;	
+	if (GET_MANDATORY_STRING_PARAMETER(KUFileToDelete, aSection, file))
+		{
+		TInt err;
+		err = TSoundUtil::DeleteFileL(file);
+		if(err != KErrNone)
+			{
+			ERR_PRINTF2(_L("Deleting file failed with error code %d"), err);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF1(_L("File deleted successfully"));
+			}
+		}
+	}
+
+/** 
+ * Handle asynchronous events here
+ */
+void CT_MdaDevSoundData::RunL(CActive* aActive, TInt aIndex)
+	{
+	INFO_PRINTF1(_L("CT_MdaDevSoundData::RunL Called"));
+	TBool	foundActiveObject = EFalse;
+	TInt	index=0;
+	TInt	count=0;
+	TBool	completed=ETrue;
+
+	// See if it is in iNotifyPlayError
+	count=iNotifyPlayError.Count();
+	for( index=0; (index<count) && (!foundActiveObject); ++index )
+ 		{
+ 		if( aActive == iNotifyPlayError[index] )
+			{
+			INFO_PRINTF1(_L("RunL iNotifyPlayError called"));
+			foundActiveObject = ETrue;
+			iNotifyPlayError.Remove(index);
+	 		}
+		}
+
+	// See if it is in iNotifyRecordError
+	count=iNotifyRecordError.Count();
+	for( index=0; (index<count) && (!foundActiveObject); ++index )
+ 		{
+ 		if( aActive == iNotifyRecordError[index] )
+			{
+			INFO_PRINTF1(_L("RunL iNotifyRecordError called"));
+			foundActiveObject = ETrue;
+			iNotifyRecordError.Remove(index);
+	 		}
+		}
+
+	// See if it is in iPlay
+	count=iPlay.Count();
+	for( index=0; (index<count) && (!foundActiveObject); ++index )
+ 		{
+ 		if( aActive == iPlay[index] )
+			{
+			foundActiveObject = ETrue;
+			INFO_PRINTF1(_L("RunL iPlay called"));
+			
+			TSoundUtil::RAudioBuffer* soundData = iPlay[index]->iSoundData;
+
+			iPlay[index]->iDataPosition += iPlay[index]->iBufferBlock.Length();
+			INFO_PRINTF3(_L("Played %d bytes, %d bytes played total"), iPlay[index]->iBufferBlock.Length(),
+					iPlay[index]->iDataPosition);
+
+			if ( ( iPlay[index]->iDataPosition >= soundData->Length() ) || aActive->iStatus.Int() )
+				{
+				iPlay.Remove(index);
+				}
+			else
+				{
+				TInt blockSize = TSoundUtil::KDefaultBlockSize;
+				GET_OPTIONAL_INT_PARAMETER(KUBlockSize, *(iPlay[index]->iSection), blockSize);
+				blockSize = Min(blockSize, soundData->Length() - iPlay[index]->iDataPosition);
+				iPlay[index]->iBufferBlock.Set(&soundData->operator[](iPlay[index]->iDataPosition), blockSize, blockSize);
+				iMdaDevSound->PlayData(iPlay[index]->iStatus, iPlay[index]->iBufferBlock);
+				iPlay[index]->Activate(aIndex);
+				completed = EFalse;
+				}
+	 		}
+		}
+
+	// See if it is in iRecord
+	count=iRecord.Count();
+	for( index=0; (index<count) && (!foundActiveObject); ++index )
+ 		{
+ 		if( aActive == iRecord[index] )
+			{
+			foundActiveObject = ETrue;	
+			INFO_PRINTF1(_L("RunL iRecord called"));
+			iRecord[index]->iDataPosition += iRecord[index]->iBufferBlock.Length();
+			INFO_PRINTF3(_L("Stored %d bytes, %d bytes total"),
+					iRecord[index]->iBufferBlock.Length(),
+					iRecord[index]->iDataPosition);
+
+			TSoundUtil::RAudioBuffer* buffer = iRecord[index]->iSoundData;
+				
+			TInt	err = aActive->iStatus.Int();
+			if( err == KErrNone )
+				{				
+				if(iRecord[index]->iDataPosition >= buffer->Length() ||
+						iRecord[index]->iBufferBlock.Length() == 0)
+					{
+					TPtrC fileName;
+					if(GET_OPTIONAL_STRING_PARAMETER(KUToFile, *(iRecord[index]->iSection), fileName))
+						{
+						TInt err;
+						err = buffer->SaveAudioDataL(fileName);
+						if (err)
+							{
+							SetBlockResult(EFail);
+							ERR_PRINTF2(_L("Saving to file failed with error code %d"), err);
+							}
+						}		
+					iRecord.Remove(index);
+					}				
+				else
+					{
+					TInt blockSize = TSoundUtil::KDefaultBlockSize;
+					//if specified in INI file get block size
+					GET_OPTIONAL_INT_PARAMETER(KUBlockSize, *(iRecord[index]->iSection), blockSize);
+					iRecord[index]->iBufferBlock.Set(&buffer->operator[](iRecord[index]->iDataPosition), 0, Min(blockSize, buffer->Length() - iRecord[index]->iDataPosition));
+					iMdaDevSound->RecordData(iRecord[index]->iStatus, iRecord[index]->iBufferBlock);
+					iRecord[index]->Activate(aIndex);
+					completed = EFalse;
+					}
+				}//err == KErrNone
+			else
+				{
+				iRecord.Remove(index);
+				}					
+			}//aActive == iRecord[index]
+		}//for
+	
+ 	if( foundActiveObject )
+ 		{
+		if ( completed )
+			{						
+			if (aActive)
+				{
+				TInt	err = aActive->iStatus.Int();
+				if( err != KErrNone )
+					{
+					ERR_PRINTF2(_L("RunL Error %d"), err);
+					SetAsyncError( aIndex, err );
+					}
+				}
+
+			// Reset the outstanding request state
+			delete aActive;
+			DecOutstanding();
+			}
+		}
+ 	else
+ 		{
+ 		ERR_PRINTF1(_L("An unchecked active object completed"));
+ 		SetBlockResult(EFail);
+ 		}
+	}
+
+/** 
+ * Cancels asynchronous events
+ */
+void CT_MdaDevSoundData::DoCancel(CActive* aActive, TInt aIndex)
+	{
+	TBool	foundActiveObject = EFalse;
+
+	TInt	index=0;
+	TInt	count=0;
+
+	// See if it is in iNotifyPlayError
+	count=iNotifyPlayError.Count();
+	for( index=0; (index<count) && (!foundActiveObject); ++index )
+ 		{
+ 		if( aActive == iNotifyPlayError[index] )
+			{
+			INFO_PRINTF1(_L("DoCancel iNotifyPlayError called"));
+			foundActiveObject = ETrue;
+			iNotifyPlayError.Remove(index);
+	 		}
+		}
+
+	// See if it is in iNotifyRecordError
+	count=iNotifyRecordError.Count();
+	for( index=0; (index<count) && (!foundActiveObject); ++index )
+ 		{
+ 		if( aActive == iNotifyRecordError[index] )
+			{
+			INFO_PRINTF1(_L("DoCancel iNotifyRecordError called"));
+			foundActiveObject = ETrue;
+			iNotifyRecordError.Remove(index);
+	 		}
+		}
+
+	// See if it is in iPlay
+	count=iPlay.Count();
+	for( index=0; (index<count) && (!foundActiveObject); ++index )
+ 		{
+ 		if( aActive == iPlay[index] )
+			{
+			INFO_PRINTF1(_L("DoCancel iPlay called"));
+			foundActiveObject = ETrue;
+			iPlay.Remove(index);
+	 		}
+		}
+
+	// See if it is in iRecord
+	count=iRecord.Count();
+	for( index=0; (index<count) && (!foundActiveObject); ++index )
+ 		{
+ 		if( aActive == iRecord[index] )
+			{
+			INFO_PRINTF1(_L("DoCancel iRecord called"));
+			foundActiveObject = ETrue;
+			iRecord.Remove(index);
+	 		}
+		}
+	
+	if( foundActiveObject )
+ 		{
+		if (aActive)
+			{
+			TInt	err = aActive->iStatus.Int();
+			if( err != KErrNone ) 
+				{
+				ERR_PRINTF2(_L("DoCancel Error %d"), err);
+				SetAsyncError( aIndex, err );
+				}
+			}
+
+		// Reset the outstanding request state
+		delete aActive;
+		DecOutstanding();
+		}
+	else
+		{
+ 		ERR_PRINTF1(_L("An unchecked active object canceled"));
+ 		SetBlockResult(EFail);
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/src/t_soundactivecallback.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,102 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+@test
+@internalComponent
+
+This contains CT_SoundActiveCallback
+*/
+
+//	User includes
+#include "t_soundactivecallback.h"
+
+/**
+ * Two phase constructor
+ */
+CT_SoundActiveCallback* CT_SoundActiveCallback::NewL(CDataWrapperBase& aCallback, TInt aPriority)
+	{
+	CT_SoundActiveCallback*	ret = NewLC(aCallback, aPriority);
+	CleanupStack::Pop(ret);
+	return ret;	
+	}
+
+/**
+ * Two phase constructor
+ */
+CT_SoundActiveCallback* CT_SoundActiveCallback::NewLC(CDataWrapperBase& aCallback, TInt aPriority)
+	{
+	CT_SoundActiveCallback*	ret = new (ELeave) CT_SoundActiveCallback(aCallback, aPriority);
+	CleanupStack::PushL(ret);
+	ret->ConstructL();
+	return ret;	
+	}
+
+/**
+ * Protected constructor. First phase construction
+ */
+CT_SoundActiveCallback::CT_SoundActiveCallback(CDataWrapperBase& aCallback, TInt aPriority)
+:	CActiveCallbackBase(aCallback, aPriority),
+	iDataPosition(0),
+    iSoundData(NULL),
+    iSection(NULL),
+    iBufferBlock(NULL, NULL, NULL)
+	{
+	}
+
+/**
+ * Public destructor
+ */
+CT_SoundActiveCallback::~CT_SoundActiveCallback()
+	{
+	if (iSoundData)
+		{
+		iSoundData->Close();
+		delete iSoundData;
+		iSoundData = NULL;
+		}
+	}
+
+/**
+ * Set section
+ * 
+ * @param aSection 			section name to set
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_SoundActiveCallback::SetSection(const TDesC& aSection)
+	{
+	this->iSection=const_cast<TDesC*>(&aSection);
+	}
+
+/**
+ * Create sound data buffer
+ * 
+ * @param aLength 			Length of the buffer to be created
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_SoundActiveCallback::CreateSoundDataBufferL(TInt aLength)
+	{
+	iSoundData = new(ELeave) TSoundUtil::RAudioBuffer();
+	User::LeaveIfError(iSoundData->Create(aLength));
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/src/t_sounddriverserver.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "t_sounddriverserver.h"
+/**
+* @return - Instance of the test server
+* Same code for Secure and non-secure variants
+* Called inside the MainL() function to create and start the
+* CTestServer derived server.
+*/
+CT_SoundDriverServer* CT_SoundDriverServer::NewL()
+	{
+	CT_SoundDriverServer* server = new (ELeave) CT_SoundDriverServer();
+	CleanupStack::PushL(server);
+	server->ConstructL();
+	CleanupStack::Pop(server);
+	return server;
+	}
+
+/**
+ * Secure variant
+ * Much simpler, uses the new Rendezvous() call to sync with the client
+ */
+LOCAL_C void MainL()
+	{
+#if (defined __DATA_CAGING__)
+	RProcess().DataCaging(RProcess::EDataCagingOn);
+	RProcess().SecureApi(RProcess::ESecureApiOn);
+#endif
+	CActiveScheduler* sched=NULL;
+	sched=new(ELeave) CActiveScheduler;
+	CActiveScheduler::Install(sched);
+	CT_SoundDriverServer* server = NULL;
+	TRAPD(err, server = CT_SoundDriverServer::NewL());
+	if(!err)
+		{
+		RProcess::Rendezvous(KErrNone);
+		sched->Start();
+		}
+	delete server;
+	delete sched;
+	}
+
+/**
+ * @return - Standard Epoc error code on process exit
+ * Secure variant only
+ * Process entry point. Called by client using RProcess API
+ */
+GLDEF_C TInt E32Main()
+	{
+	CTrapCleanup* cleanup = CTrapCleanup::New();
+	if(cleanup == NULL)
+		{
+		return KErrNoMemory;
+		}
+#if (defined TRAP_IGNORE)
+	TRAP_IGNORE(MainL());
+#else
+	TRAPD(err,MainL());
+#endif
+	delete cleanup;
+	return KErrNone;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/src/t_soundformatssupporteddata.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,479 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+@test
+@internalComponent
+
+This contains CT_SoundFormatsSupportedData
+*/
+
+//	User includes
+#include "t_soundformatssupporteddata.h"
+#include "sound_util.h"
+
+/*@{*/
+///	Commands
+_LIT(KCmdNew,						"new");
+_LIT(KCmdDestructor,				"~");
+_LIT(KCmd_iMinRate_get,				"imin_rate_get");
+_LIT(KCmd_iMaxRate_get,				"imax_rate_get");
+_LIT(KCmd_iChannels_get,			"ichannels_get");
+_LIT(KCmd_iMinBufferSize_get,		"imin_buffer_size_get");
+_LIT(KCmd_iMaxBufferSize_get,		"imax_buffer_size_get");
+_LIT(KCmd_iMinVolume_get,			"imin_volume_get");
+_LIT(KCmd_iMaxVolume_get,			"imax_volume_get");
+_LIT(KCmd_iEncodings_get,			"iencodings_get");
+
+/*@{*/
+///	Parameters
+_LIT(KMinRateExpected,				"min_rate_expected");
+_LIT(KMaxRateExpected,				"max_rate_expected");
+_LIT(KChannelsExpected,				"channels_expected");
+_LIT(KMinBufferSizeExpected,		"min_buffer_size_expected");
+_LIT(KMaxBufferSizeExpected,		"max_buffer_size_expected");
+_LIT(KMinVolumeExpected,			"min_volume_expected");
+_LIT(KMaxVolumeExpected,			"max_volume_expected");
+_LIT(KEncodingsExpected,			"encodings_expected");
+
+///	Logging
+_LIT(KLogNew,						"New object created successfully");
+_LIT(KLogNewError,					"Error creating new object, error code=%d");
+
+/**
+ * Two phase constructor
+ */
+CT_SoundFormatsSupportedData* CT_SoundFormatsSupportedData::NewL()
+	{
+	CT_SoundFormatsSupportedData*	ret=new (ELeave) CT_SoundFormatsSupportedData();
+	CleanupStack::PushL(ret);
+	ret->ConstructL();
+	CleanupStack::Pop(ret);
+	return ret;
+	}
+
+/**
+* Constructor. First phase construction
+*/
+CT_SoundFormatsSupportedData::CT_SoundFormatsSupportedData()
+:	CDataWrapperBase()
+,	iFormatsSupported(NULL)
+	{
+	}
+
+/**
+ * Second phase construction
+ */
+void CT_SoundFormatsSupportedData::ConstructL()
+	{	
+	}
+
+/**
+* Destructor
+*/
+CT_SoundFormatsSupportedData::~CT_SoundFormatsSupportedData()
+	{
+	DoCleanup();
+	}
+
+/**
+ * Helper for cleanup operation
+ */
+void CT_SoundFormatsSupportedData::DoCleanup()
+	{
+	delete iFormatsSupported;
+	iFormatsSupported=NULL;	
+	}
+
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return pointer to the object that the data wraps
+ */
+TAny* CT_SoundFormatsSupportedData::GetObject()
+	{
+	return iFormatsSupported;
+	}
+
+/**
+ * Set the wrapped data object with new value
+ */
+void CT_SoundFormatsSupportedData::SetObjectL(TAny* aAny)
+	{
+	DoCleanup();
+	iFormatsSupported=static_cast<RMdaDevSound::TSoundFormatsSupported*>(aAny);
+	}
+
+/**
+ * Clear the wrapped data object pointer w/o de-initialization
+ */
+void CT_SoundFormatsSupportedData::DisownObjectL()
+	{
+	iFormatsSupported=NULL;
+	}
+
+/**
+ * Return static cleanup function
+ */
+inline TCleanupOperation CT_SoundFormatsSupportedData::CleanupOperation()
+	{
+	return CleanupOperation;
+	}
+
+/**
+ * Static cleanup function
+ */
+void CT_SoundFormatsSupportedData::CleanupOperation( TAny* aAny )
+	{
+	RMdaDevSound::TSoundFormatsSupported* format = static_cast<RMdaDevSound::TSoundFormatsSupported*> ( aAny );
+	delete format;
+	}
+
+/**
+* Process a command read from the ini file
+*
+* @param aDataWrapper	test step requiring command to be processed
+* @param aCommand	the command to process
+* @param aSection		the entry in the ini file requiring the command to be processed
+*
+* @return ETrue if the command is processed
+*/
+TBool CT_SoundFormatsSupportedData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+	{
+	TBool	ret=ETrue;
+	if ( aCommand==KCmdNew )
+		{
+		DoCmdNew();
+		}
+	else if ( aCommand==KCmdDestructor )
+		{
+		DoCmdDestructor();
+		}
+	else if ( aCommand==KCmd_iMinRate_get )
+		{
+		DoCmd_iMinRate_get(aSection);
+		}
+	else if ( aCommand==KCmd_iMaxRate_get )
+		{
+		DoCmd_iMaxRate_get(aSection);
+		}
+	else if ( aCommand==KCmd_iChannels_get )
+		{
+		DoCmd_iChannels_get(aSection);
+		}
+	else if ( aCommand==KCmd_iMinBufferSize_get )
+		{
+		DoCmd_iMinBufferSize_get(aSection);
+		}
+	else if ( aCommand==KCmd_iMaxBufferSize_get )
+		{
+		DoCmd_iMaxBufferSize_get(aSection);
+		}
+	else if ( aCommand==KCmd_iMinVolume_get )
+		{
+		DoCmd_iMinVolume_get(aSection);
+		}
+	else if ( aCommand==KCmd_iMaxVolume_get )
+		{
+		DoCmd_iMaxVolume_get(aSection);
+		}
+	else if ( aCommand==KCmd_iEncodings_get )
+		{
+		DoCmd_iEncodings_getL(aSection);
+		}
+	else
+		{
+		ret=CDataWrapperBase::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+
+	return ret;
+	}
+
+/**
+ * Creates new instance of TSoundFormatsSupported
+ */
+void CT_SoundFormatsSupportedData::DoCmdNew()
+	{
+	DoCleanup();
+	TRAPD(err, iFormatsSupported = new (ELeave) RMdaDevSound::TSoundFormatsSupported());
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(KLogNewError, err);
+		SetError(err);
+		}
+	else
+		{
+		INFO_PRINTF1(KLogNew);
+		}
+	}
+
+/**
+ * Performs cleanup operation
+ */
+void CT_SoundFormatsSupportedData::DoCmdDestructor()
+	{
+	DoCleanup();
+	}
+
+/**
+ * Gets iMinRate
+ * 
+ * @param aSection 			section name where expected value can be read
+ * 							KMinRateExpected - min rate expected
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_SoundFormatsSupportedData::DoCmd_iMinRate_get(const TDesC& aSection)
+	{
+	TInt	expected;
+	if (GET_OPTIONAL_INT_PARAMETER(KMinRateExpected(), aSection, expected))
+		{
+		if(iFormatsSupported->iMinRate != expected)
+			{
+			ERR_PRINTF3(_L("Expected result != iMinRate, expected=%d, iMinRate=%d"), expected, iFormatsSupported->iMinRate);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF3(_L("iMinRate == expected, iMinRate=%d, expected=%d"), iFormatsSupported->iMinRate, expected);
+			}
+		}
+	else
+		{
+		INFO_PRINTF2(_L("iMinRate=%d"), iFormatsSupported->iMinRate);
+		}
+	}
+
+/**
+ * Gets iMaxRate
+ * 
+ * @param aSection 			section name where expected value can be read
+ * 							KMaxRateExpected - max rate expected
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_SoundFormatsSupportedData::DoCmd_iMaxRate_get(const TDesC& aSection)
+	{
+	TInt	expected;
+	if (GET_OPTIONAL_INT_PARAMETER(KMaxRateExpected(), aSection, expected))
+		{
+		if(iFormatsSupported->iMaxRate != expected)
+			{
+			ERR_PRINTF3(_L("Expected result != iMaxRate, expected=%d, iMaxRate=%d"), expected, iFormatsSupported->iMaxRate);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF3(_L("iMaxRate == expected, iMaxRate=%d, expected=%d"), iFormatsSupported->iMaxRate, expected);
+			}
+		}
+	else
+		{
+		INFO_PRINTF2(_L("iMaxRate=%d"), iFormatsSupported->iMaxRate);
+		}
+	}
+
+/**
+ * Gets iMinBufferSize
+ * 
+ * @param aSection 			section name where expected value can be read
+ * 							KMinBufferSizeExpected - min buffer size expected
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_SoundFormatsSupportedData::DoCmd_iMinBufferSize_get(const TDesC& aSection)
+	{
+	TInt	expected;
+	if (GET_OPTIONAL_INT_PARAMETER(KMinBufferSizeExpected(), aSection, expected))
+		{
+		if(iFormatsSupported->iMinBufferSize != expected)
+			{
+			ERR_PRINTF3(_L("Expected result != iMinBufferSize, expected=%d, iMinBufferSize=%d"), expected, iFormatsSupported->iMinBufferSize);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF3(_L("iMinBufferSize == expected, iMinBufferSize=%d, expected=%d"), iFormatsSupported->iMinBufferSize, expected);
+			}
+		}
+	else
+		{
+		INFO_PRINTF2(_L("iMinBufferSize=%d"), iFormatsSupported->iMinBufferSize);
+		}
+	}
+
+/**
+ * Gets iMaxBufferSize
+ * 
+ * @param aSection 			section name where expected value can be read
+ * 							KMaxBufferSizeExpected - max buffer size expected
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_SoundFormatsSupportedData::DoCmd_iMaxBufferSize_get(const TDesC& aSection)
+	{
+	TInt	expected;
+	if (GET_OPTIONAL_INT_PARAMETER(KMaxBufferSizeExpected(), aSection, expected))
+		{
+		if(iFormatsSupported->iMaxBufferSize != expected)
+			{
+			ERR_PRINTF3(_L("Expected result != iMaxBufferSize, expected=%d, iMaxBufferSize=%d"), expected, iFormatsSupported->iMaxBufferSize);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF3(_L("iMaxBufferSize == expected, iMaxBufferSize=%d, expected=%d"), iFormatsSupported->iMaxBufferSize, expected);
+			}
+		}
+	else
+		{
+		INFO_PRINTF2(_L("iMaxBufferSize=%d"), iFormatsSupported->iMaxBufferSize);
+		}
+	}
+
+/**
+ * Gets iMinVolume
+ * 
+ * @param aSection 			section name where expected value can be read
+ * 							KMinVolumeExpected - min volume expected
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_SoundFormatsSupportedData::DoCmd_iMinVolume_get(const TDesC& aSection)
+	{
+	TInt expected;
+	if (GET_OPTIONAL_INT_PARAMETER(KMinVolumeExpected(), aSection, expected))
+		{
+		if(iFormatsSupported->iMinVolume != expected)
+			{
+			ERR_PRINTF3(_L("Expected result != iMinVolume, expected=%d, iMinVolume=%d"), expected, iFormatsSupported->iMinVolume);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF3(_L("iMinVolume == expected, iMinVolume=%d, expected=%d"), iFormatsSupported->iMinVolume, expected);
+			}
+		}
+	else
+		{
+		INFO_PRINTF2(_L("iMinVolume=%d"), iFormatsSupported->iMinVolume);
+		}
+	}
+
+/**
+ * Gets iMaxVolume
+ * 
+ * @param aSection 			section name where expected value can be read
+ * 							KMaxVolumeExpected - max volume expected
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_SoundFormatsSupportedData::DoCmd_iMaxVolume_get(const TDesC& aSection)
+	{
+	TInt	expected;
+	if (GET_OPTIONAL_INT_PARAMETER(KMaxVolumeExpected(), aSection, expected))
+		{
+		if(iFormatsSupported->iMaxVolume != expected)
+			{
+			ERR_PRINTF3(_L("Expected result != iMaxVolume, expected=%d, iMaxVolume=%d"), expected, iFormatsSupported->iMaxVolume);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF3(_L("iMaxVolume == expected, iMaxVolume=%d, expected=%d"), iFormatsSupported->iMaxVolume, expected);
+			}
+		}
+	else
+		{
+		INFO_PRINTF2(_L("iMaxVolume=%d"), iFormatsSupported->iMaxVolume);
+		}
+	}
+
+/**
+ * Gets iChannels
+ * 
+ * @param aSection 			section name where expected value can be read
+ * 							KChannelsExpected - channels expected
+ *
+ * @return					void
+ *
+ * @leave					no
+ */
+void CT_SoundFormatsSupportedData::DoCmd_iChannels_get(const TDesC& aSection)
+	{
+	TInt	expected;	
+	if (GET_OPTIONAL_INT_PARAMETER(KChannelsExpected(), aSection, expected))
+		{
+		if(iFormatsSupported->iChannels != expected)
+			{
+			ERR_PRINTF3(_L("Expected result != iChannels, expected=%d, iChannels=%d"), expected, iFormatsSupported->iChannels);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF3(_L("iChannels == expected, iChannels=%d, expected=%d"), iFormatsSupported->iChannels, expected);
+			}
+		}
+	else
+		{
+		INFO_PRINTF2(_L("iChannels=%d"), iFormatsSupported->iChannels);
+		}
+	}
+
+/**
+ * Gets iEncodings
+ * 
+ * @param aSection 			section name where expected value can be read
+ * 							KEncodingsExpected - encodings expected
+ *
+ * @return					void
+ *
+ * @leave					System wide error
+ */
+void CT_SoundFormatsSupportedData::DoCmd_iEncodings_getL(const TDesC& aSection)
+	{
+	TUint expEncoding;
+	if(GetOrFromConfig(aSection, KEncodingsExpected(), TSoundUtil::iEnumTableSoundEncoding, expEncoding ))
+		{
+		TUint encodings = iFormatsSupported->iEncodings;
+		if(encodings != expEncoding)
+			{
+			ERR_PRINTF3(_L("iEncodings != expected result! iEncodings=0x%x, expected result=0x%x"), encodings, expEncoding);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			INFO_PRINTF3(_L("iEncodings == expected result!, iEncodings=0x%x, expected=0x%x"), encodings, expEncoding);
+			}
+		}
+	else
+		{
+		INFO_PRINTF2(_L("iEncodings=%d"), iFormatsSupported->iEncodings);
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/testdata/base-bsp-sound-driver.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,542 @@
+[include]
+file1				=\base\sound\t_sound.ini
+file2 				=\base\t_prompt.ini
+
+[devsound]
+name				=devsound
+
+[devsound1]
+name				=devsound1
+
+[t_formats]
+name				=t_formats
+
+[t_format]
+name				=t_format
+
+[BSP-SOUND-DRIVER-SetPlayFormat]
+CurrentSoundFormatObject	=t_format
+
+[BSP-SOUND-DRIVER-GetPlayFormat]
+CurrentSoundFormatObject	=t_format
+
+[BSP-SOUND-DRIVER-SetRecordFormat]
+CurrentSoundFormatObject	=t_format
+
+[BSP-SOUND-DRIVER-GetRecordFormat]
+CurrentSoundFormatObject	=t_format
+
+[BSP-SOUND-DRIVER-PlayFormatsSupported]
+SoundFormatsSupportedObject	=t_formats
+
+[BSP-SOUND-DRIVER-RecordFormatsSupported]
+SoundFormatsSupportedObject	=t_formats
+
+[max_play_volume]
+set_sound_volume_max		=TRUE
+max_sound_volume_expected	=TRUE
+SoundFormatsSupportedObject	=t_formats
+
+[max_record_level]
+set_sound_level_max		=TRUE
+max_sound_level_expected	=TRUE
+SoundFormatsSupportedObject	=t_formats				
+
+#test case nr 2009 configuration
+[bytes_played_expected_zero]
+bytes_played			=0
+
+[bytes_played_expected_2_bytes]
+bytes_played			=2
+
+[32_kb_played]
+bytes_played			=32720
+
+[zero_filled_2_bytes.raw]
+data_size			=2
+from_file			={Drives, ROMDriveTestPath}zero_filled_2_bytes.raw
+
+[zero_filled_32kb.raw]
+data_size			=32768
+from_file			={Drives, ROMDriveTestPath}zero_filled_32kb.raw
+
+
+#default audio recording configuration for various recording configurations and types
+[record_data_32kb]
+data_size			=32720
+cancel				=FALSE
+
+[record_data_32kb_cancel]
+data_size			=32720
+cancel				=TRUE
+
+[record_data_32kb_flush]
+data_size			=32720
+flush				=TRUE
+
+[record_data_320kb]
+data_size			=327200
+
+#different audio formats playback configurations
+[pcm8_mono_8khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm8_mono_8khz_32kb.raw
+
+[set_settings_pcm8_mono_8khz_32kb]
+rate				=8000
+encoding			=EMdaSoundEncoding8BitPCM
+channels			=1
+buffer_size			=2000
+
+[set_settings_pcm8_mono_8khz_32kb_expected]
+rate_expected			=8000
+encoding_expected		=EMdaSoundEncoding8BitPCM
+channels_expected		=1
+buffer_size_expected		=2000
+
+[pcm16_mono_8khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_mono_8khz_32kb.raw
+
+[set_settings_pcm16_mono_8khz]
+rate				=8000
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=1
+buffer_size			=2000
+
+[set_settings_pcm16_mono_8khz_expected]
+rate_expected			=8000
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=1
+buffer_size_expected		=2000
+
+[pcm16_mono_11khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_mono_11khz_32kb.raw
+
+[set_settings_pcm16_mono_11khz]
+rate				=11000
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=1
+buffer_size			=2000
+
+[set_settings_pcm16_mono_11khz_expected]
+rate_expected			=11000
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=1
+buffer_size_expected		=2000
+
+[pcm16_mono_12khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_mono_12khz_32kb.raw
+
+[set_settings_pcm16_mono_12khz]
+rate				=12000
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=1
+buffer_size			=2000
+
+[set_settings_pcm16_mono_12khz_expected]
+rate_expected			=12000
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=1
+buffer_size_expected		=2000
+
+[pcm16_mono_16khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_mono_16khz_32kb.raw
+
+[set_settings_pcm16_mono_16khz]
+rate				=16000
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=1
+buffer_size			=2000
+
+[set_settings_pcm16_mono_16khz_expected]
+rate_expected			=16000
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=1
+buffer_size_expected		=2000
+
+[pcm16_mono_22khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_mono_22khz_32kb.raw
+
+[set_settings_pcm16_mono_22khz]
+rate				=22000
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=1
+buffer_size			=2000
+
+[set_settings_pcm16_mono_22khz_expected]
+rate_expected			=22000
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=1
+buffer_size_expected		=2000
+
+[pcm16_mono_24khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_mono_24khz_32kb.raw
+
+[set_settings_pcm16_mono_24khz]
+rate				=24000
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=1
+buffer_size			=2000
+
+[set_settings_pcm16_mono_24khz_expected]
+rate_expected			=24000
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=1
+buffer_size_expected		=2000
+
+[pcm16_mono_32khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_mono_32khz_32kb.raw
+
+[set_settings_pcm16_mono_32khz]
+rate				=32000
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=1
+buffer_size			=2000
+
+[set_settings_pcm16_mono_32khz_expected]
+rate_expected			=32000
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=1
+buffer_size_expected		=2000
+
+[pcm16_mono_44.1khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_mono_44.1khz_32kb.raw
+
+[set_settings_pcm16_mono_44.1khz]
+rate				=44100
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=1
+buffer_size			=2000
+
+[set_settings_pcm16_mono_41.1khz_expected]
+rate_expected			=44100
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=1
+buffer_size_expected		=2000
+
+[pcm16_mono_48khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_mono_48khz_32kb.raw
+
+[set_settings_pcm16_mono_48khz]
+rate				=48000
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=1
+buffer_size			=2000
+
+[set_settings_pcm16_mono_48khz_expected]
+rate_expected			=48000
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=1
+buffer_size_expected		=2000
+
+[pcm16_stereo_8khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_stereo_8khz_32kb.raw
+
+[set_settings_pcm16_stereo_8khz]
+rate				=8000
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=2
+buffer_size			=2000
+
+[set_settings_pcm16_stereo_8khz_expected]
+rate_expected			=8000
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=2
+buffer_size_expected		=2000
+
+[pcm16_stereo_11khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_stereo_11khz_32kb.raw
+
+[set_settings_pcm16_stereo_11khz]
+rate				=11000
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=2
+buffer_size			=2000
+
+[set_settings_pcm16_stereo_11khz_expected]
+rate_expected			=11000
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=2
+buffer_size_expected		=2000
+
+[pcm16_stereo_12khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_stereo_12khz_32kb.raw
+
+[set_settings_pcm16_stereo_12khz]
+rate				=12000
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=2
+buffer_size			=2000
+
+[set_settings_pcm16_stereo_12khz_expected]
+rate_expected			=12000
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=2
+buffer_size_expected		=2000
+
+[pcm16_stereo_16khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_stereo_16khz_32kb.raw
+
+[set_settings_pcm16_stereo_16khz]
+rate				=16000
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=2
+buffer_size			=2000
+
+[set_settings_pcm16_stereo_16khz_expected]
+rate_expected			=16000
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=2
+buffer_size_expected		=2000
+
+[pcm16_stereo_22khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_stereo_22khz_32kb.raw
+
+[set_settings_pcm16_stereo_22khz]
+rate				=22000
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=2
+buffer_size			=2000
+
+[set_settings_pcm16_stereo_22khz_expected]
+rate_expected			=22000
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=2
+buffer_size_expected		=2000
+
+[pcm16_stereo_24khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_stereo_24khz_32kb.raw
+
+[set_settings_pcm16_stereo_24khz]
+rate				=24000
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=2
+buffer_size			=2000
+
+[set_settings_pcm16_stereo_24khz_expected]
+rate_expected			=24000
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=2
+buffer_size_expected		=2000
+
+[pcm16_stereo_32khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_stereo_32khz_32kb.raw
+
+[set_settings_pcm16_stereo_32khz]
+rate				=32000
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=2
+buffer_size			=2000
+
+[set_settings_pcm16_stereo_32khz_expected]
+rate_expected			=32000
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=2
+buffer_size_expected		=2000
+
+[pcm16_stereo_44.1khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_stereo_44.1khz_32kb.raw
+
+[set_settings_pcm16_stereo_44.1khz]
+rate				=44100
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=2
+buffer_size			=2000
+
+[set_settings_pcm16_stereo_44.1khz_expected]
+rate_expected			=44100
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=2
+buffer_size_expected		=2000
+
+[pcm16_stereo_48khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}pcm16_stereo_48khz_32kb.raw
+
+[set_settings_pcm16_stereo_48khz]
+rate				=48000
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=2
+buffer_size			=2000
+
+[set_settings_pcm16_stereo_48khz_expected]
+rate_expected			=48000
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=2
+buffer_size_expected		=2000
+
+[alaw8bit_mono_8khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}alaw8bit_mono_8khz_32kb.raw
+
+[set_settings_alaw8bit_mono_8khz]
+rate				=8000
+encoding			=EMdaSoundEncoding8BitALaw
+channels			=1
+buffer_size			=2000
+
+[set_settings_alaw8bit_mono_8khz_expected]
+rate_expected			=8000
+encoding_expected		=EMdaSoundEncoding8BitALaw
+channels_expected		=1
+buffer_size_expected		=2000
+
+[alaw8bit_stereo_24khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}alaw8bit_stereo_24khz_32kb.raw
+
+[set_settings_alaw8bit_stereo_24khz]
+rate				=24000
+encoding			=EMdaSoundEncoding8BitALaw
+channels			=2
+buffer_size			=2000
+
+[set_settings_alaw8bit_stereo_24khz_expected]
+rate_expected			=24000
+encoding_expected		=EMdaSoundEncoding8BitALaw
+channels_expected		=2
+buffer_size_expected		=2000
+
+[mulaw8bit_mono_12khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}mulaw8bit_mono_12khz_32kb.raw
+
+[set_settings_mulaw8bit_mono_12khz]
+rate				=12000
+encoding			=EMdaSoundEncoding8BitMuLaw
+channels			=1
+buffer_size			=2000
+
+[set_settings_mulaw8bit_mono_12khz_expected]
+rate_expected			=12000
+encoding_expected		=EMdaSoundEncoding8BitMuLaw
+channels_expected		=1
+buffer_size_expected		=2000
+
+[mulaw8bit_stereo_32khz_32kb.raw]
+data_size			=32720
+from_file			={Drives, ROMDriveTestPath}mulaw8bit_stereo_32khz_32kb.raw
+
+[set_settings_mulaw8bit_stereo_32khz]
+rate				=32000
+encoding			=EMdaSoundEncoding8BitMuLaw
+channels			=2
+buffer_size			=2000
+
+[set_settings_mulaw8bit_stereo_32khz_expected]
+rate_expected			=32000
+encoding_expected		=EMdaSoundEncoding8BitMuLaw
+channels_expected		=2
+buffer_size_expected		=2000
+
+#larger file
+[pcm16_stereo_24khz_320kb.raw]
+data_size			=320000
+from_file			={Drives, ROMDriveTestPath}pcm16_stereo_24khz_320kb.raw
+block_size			=16384
+
+[set_settings_pcm16_stereo_24khz_320kb]
+rate				=24000
+encoding			=EMdaSoundEncoding16BitPCM
+channels			=2
+buffer_size			=8192
+
+[set_settings_pcm16_stereo_24khz_320kb_expected]
+rate_expected			=24000
+encoding_expected		=EMdaSoundEncoding16BitPCM
+channels_expected		=2
+buffer_size_expected		=8192
+
+#test case nr 6001 configuration
+[start_playback_half_volume]
+message			=Press affirmative key to start playback with half volume
+delay ={promptMessage, delay}
+keyCode ={promptMessage, keyCode}
+
+[start_playback_max_volume]
+message			=Press affirmative key to start playback with max volume
+delay ={promptMessage, delay}
+keyCode ={promptMessage, keyCode}
+
+[ask_did_it_sound_louder]
+message			=Did it sound louder? Press affirmative key when it did and any other key if it did not
+delay ={promptMessage, delay}
+keyCode ={promptMessage, keyCode}
+
+#test case nr 6002 configuration
+[start_record_half_volume]
+message			=Press affirmative key to start recording with half volume
+delay ={promptMessage, delay}
+keyCode ={promptMessage, keyCode}
+
+[start_record_max_volume]
+message			=Press affirmative key to start record with max volume
+delay ={promptMessage, delay}
+keyCode ={promptMessage, keyCode}
+
+[start_playing_half_volume]
+message			=Press affirmative key to start playing with half record level recorded with half volume
+delay ={promptMessage, delay}
+keyCode ={promptMessage, keyCode}
+
+[start_playing_max_volume]
+message			=Press affirmative key to start playing with max record level recorded with half volume
+delay ={promptMessage, delay}
+keyCode ={promptMessage, keyCode}
+
+[temp_file]
+data_size			=32768
+to_file				={Drives, RAMDriveTestPath}temp_audio_file.raw
+from_file			={Drives, RAMDriveTestPath}temp_audio_file.raw
+block_size			=8192
+
+[delete_temp_file]
+file_to_delete			={Drives, RAMDriveTestPath}temp_audio_file.raw
+
+[negative_play_volume]
+volume				=-355
+
+[too_big_play_volume]
+volume				=9999999
+
+[negative_record_level]
+sound_level			=-155
+
+[too_big_record_level]
+sound_level			=9999999
+
+[corrupted_audio_file]
+data_size			=32768
+from_file			={Drives, ROMDriveTestPath}zero_filled_32kb.raw
+
+[was_recorded_audio_correct]
+message			=If lastly played audio was the audio that was recorded in previous step press affirmative key and if not press any other key
+delay ={promptMessage, delay}
+keyCode ={promptMessage, keyCode}
+
+[start_record_and_playing_simultaneously]
+message			=Press affirmative key to start recording and playing simultaneously
+delay ={promptMessage, delay}
+keyCode ={promptMessage, keyCode}
+
+[start_playing_audio_recorded_in_previous_step]
+message			=Press affirmative key to start playing audio recorded in previous step
+delay ={promptMessage, delay}
+keyCode ={promptMessage, keyCode}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/testdata/h4hrp/armv5/t_sound.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,328 @@
+# This is the global environment file to configure the sound  on specific device
+# The current default sound values are configured for TI OMAP 2420 (H4) hardware common sound device
+# Licencees may need to configure below values to specific devices
+
+
+[Drives]
+# Defines the path to the testdata files on ROM.
+# Do not use drive letter here (for TestDriver compatibility)
+ROMDriveTestPath = \base\sound\validation\
+
+# A RAM drive in the environment. 
+# Defines the character of the drive, the default value is 'C'.
+RAMDriveChar = C
+
+# Defines the drive's index.
+RAMDrive = EDrive{Drives, RAMDriveChar}
+
+# Defines the path to the testdata files on RAM
+RAMDriveTestPath = {Drives, RAMDriveChar}:\base\sound\validation\
+
+
+# driver version
+[driver]
+version			=1.00(1976)
+
+# pdd/ldd driver names and unit to test. By default unit -1 (0xffffffff in HEX)
+[UnitEnum]
+unit					=0xffffffff
+pdd						=ESDRV
+ldd						=ESOUND
+
+[default_play_format]
+# Playback format used in system by default
+# Values used to restore default play format after format change
+rate					=8000
+encoding				=EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=32768
+# Values are used to verify default playback format
+rate_expected				=8000
+encoding_expected			=EMdaSoundEncoding16BitPCM
+channels_expected			=2
+buffer_size_expected			=32768
+
+[valid_play_format]
+# Supported playback format used in system (non-default)
+# Values are used to set playback format
+rate					=8000
+encoding				=EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=2000
+# Values are used to verify current playback format
+rate_expected				=8000
+encoding_expected			=EMdaSoundEncoding16BitPCM
+channels_expected			=2
+buffer_size_expected			=2000
+
+[another_valid_play_format]
+# Another supported playback format used in system (non-default)
+# Values are used to set playback format
+rate					=44100
+encoding				=EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=2000
+# Values are used to verify current playback format
+rate_expected				=44100
+encoding_expected			=EMdaSoundEncoding16BitPCM
+channels_expected			=2
+buffer_size_expected			=2000
+
+[default_record_format]
+# Record format used in system by default
+# Values used to restore default record format after format change
+rate					=8000
+encoding				=EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=8192
+# Values are used to verify default record format
+rate_expected				=8000
+encoding_expected			=EMdaSoundEncoding16BitPCM
+channels_expected			=2
+buffer_size_expected			=8192
+
+[valid_record_format]
+# Another supported record format used in system
+# Values are used to set record format
+rate					=8000
+encoding				=EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=2000
+# Values are used to verify current record format
+rate_expected				=8000
+encoding_expected			=EMdaSoundEncoding16BitPCM
+channels_expected			=2
+buffer_size_expected			=2000
+
+[default_play_volume]
+# Value to restore default play volume level
+volume					=127
+# Value to verify default play volume level
+volume_expected				=127
+
+[max_play_volume]
+# Value to set max supported play volume level
+volume					=127
+# Value to verify max supported play volume level
+volume_expected				=127
+
+[min_play_volume]
+# Value to set min supported play volume level
+volume					=0
+# Value to verify min supported play volume level
+volume_expected				=0
+
+[play_volume_quater]
+# Value to set 1/2 of max supported play volume level
+volume					=32
+# Value to verify 1/2 of max supported play volume level
+volume_expected				=32
+
+[default_record_level]
+# Value to restore default record volume level
+sound_level				=119
+# Value to verify default record volume level
+sound_level_expected			=119
+
+[max_record_level]
+# Value to set max supported record volume level
+sound_level				=119
+# Value to verify max supported record volume level
+sound_level_expected			=119
+
+[min_record_level]
+# Value to set min supported record volume level
+sound_level				=0
+# Value to verify min supported record volume level
+sound_level_expected			=0
+
+[half_record_level]
+# Value to set 1/2 of max supported record volume level
+sound_level				=40
+# Value to verify 1/2 of max supported record volume level
+sound_level_expected			=40
+
+[unsupported_play_format]
+# Playback format not supported by device - bitrate out of range, channels number out of range
+rate					=80008
+encoding				=EMdaSoundEncoding8BitPCM
+channels				=3
+buffer_size				=2000
+
+[unsupported_record_format]
+# Record format not supported by device - bitrate out of range, channels number out of range
+rate					=80008
+encoding				=EMdaSoundEncoding8BitPCM
+channels				=3
+buffer_size				=2000
+
+[default_play_format_invalid_encoding]
+encoding				=EMdaSoundEncoding40BitPCM
+
+[default_play_format_invalid_rate]
+rate					=80008
+
+[default_play_format_invalid_buffer_size]
+buffer_size				=23
+
+[default_play_format_invalid_channels]
+channels				=754534
+
+[default_record_format_invalid_encoding]
+encoding				=EMdaSoundEncoding40BitPCM
+
+[default_record_format_invalid_rate]
+rate					=80008
+
+[default_record_format_invalid_buffer_size]
+buffer_size				=23
+
+[default_record_format_invalid_channels]
+channels				=754534
+
+[default_file]
+data_size				=32720
+from_file				={Drives, ROMDriveTestPath}pcm16_stereo_8khz_32kb.raw
+cancel					=FALSE
+flush					=FALSE
+
+[default_file_cancel]
+data_size				=32720
+from_file				={Drives, ROMDriveTestPath}pcm16_stereo_8khz_32kb.raw
+flush					=FALSE
+cancel					=TRUE
+
+[default_file_flush]
+data_size				=32720
+from_file				={Drives, ROMDriveTestPath}pcm16_stereo_8khz_32kb.raw
+flush					=TRUE
+cancel					=FALSE
+
+[valid_file]
+data_size				=32720
+from_file				={Drives, ROMDriveTestPath}pcm16_stereo_8khz_32kb.raw
+
+[not_supported_conf_audio_file]
+data_size				=32768
+from_file				={Drives, ROMDriveTestPath}pcm8_stereo_8khz_32kb.raw
+
+[play_formats_supported]
+# Values to verify supported playback formats
+min_rate_expected			=8000
+max_rate_expected			=48000
+channels_expected			=2
+min_buffer_size_expected		=1024
+max_buffer_size_expected		=32768
+min_volume_expected			=0
+max_volume_expected			=127
+encodings_expected			=EMdaSoundEncoding16BitPCM
+
+[record_formats_supported]
+# Values to verify supported record formats
+min_rate_expected			=8000
+max_rate_expected			=48000
+channels_expected			=2
+min_buffer_size_expected		=1024
+max_buffer_size_expected		=8192
+min_volume_expected			=0
+max_volume_expected			=119
+encodings_expected			=EMdaSoundEncoding16BitPCM
+
+#different buffer sizes for playback
+[set_settings_pcm8_mono_8khz_32kb_min_buffer]
+rate					=8000
+encoding				=EMdaSoundEncoding8BitPCM
+channels				=2
+buffer_size				=1024
+
+[set_settings_pcm8_mono_8khz_32kb_max_buffer]
+rate					=8000
+encoding				=EMdaSoundEncoding8BitPCM
+channels				=2
+buffer_size				=32768
+
+[set_settings_pcm16_mono_8khz_32kb_min_buffer]
+rate					=8000
+encoding				=EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=1024
+
+[set_settings_pcm16_mono_8khz_32kb_max_buffer]
+rate					=8000
+encoding				=EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=32768
+
+[set_settings_alaw8bit_mono_8khz_min_buffer]
+rate					=8000
+encoding				=EMdaSoundEncoding8BitALaw
+channels				=2
+buffer_size				=1024
+
+[set_settings_alaw8bit_mono_8khz_max_buffer]
+rate					=8000
+encoding				=EMdaSoundEncoding8BitALaw
+channels				=2
+buffer_size				=32768
+
+[set_settings_mulaw8bit_mono_12khz_min_buffer]
+rate					=12000
+encoding				=EMdaSoundEncoding8BitMuLaw
+channels				=2
+buffer_size				=1024
+
+[set_settings_mulaw8bit_mono_12khz_max_buffer]
+rate					=12000
+encoding				=EMdaSoundEncoding8BitMuLaw
+channels				=2
+buffer_size				=32768
+
+#different buffer sizes for recording
+[set_settings_pcm8_mono_8khz_32kb_min_buffer_recording]
+rate					=8000
+encoding				=EMdaSoundEncoding8BitPCM
+channels				=2
+buffer_size				=1024
+
+[set_settings_pcm8_mono_8khz_32kb_max_buffer_recording]
+rate					=8000
+encoding				=EMdaSoundEncoding8BitPCM
+channels				=2
+buffer_size				=8192
+
+[set_settings_pcm16_mono_8khz_32kb_min_buffer_recording]
+rate					=8000
+encoding				=EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=1024
+
+[set_settings_pcm16_mono_8khz_32kb_max_buffer_recording]
+rate					=8000
+encoding				=EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=8192
+
+[set_settings_alaw8bit_mono_8khz_min_buffer_recording]
+rate					=8000
+encoding				=EMdaSoundEncoding8BitALaw
+channels				=2
+buffer_size				=1024
+
+[set_settings_alaw8bit_mono_8khz_max_buffer_recording]
+rate					=8000
+encoding				=EMdaSoundEncoding8BitALaw
+channels				=2
+buffer_size				=8192
+
+[set_settings_mulaw8bit_mono_12khz_min_buffer_recording]
+rate					=12000
+encoding				=EMdaSoundEncoding8BitMuLaw
+channels				=2
+buffer_size				=1024
+
+[set_settings_mulaw8bit_mono_12khz_max_buffer_recording]
+rate					=12000
+encoding				=EMdaSoundEncoding8BitMuLaw
+channels				=2
+buffer_size				=8192
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/testdata/h4hrp/armv5/t_sound.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,17 @@
+BASE-BSP-SOUND-DRIVER-1007:BASE-BSP-SOUND-DRIVER-1008
+BASE-BSP-SOUND-DRIVER-4001
+BASE-BSP-SOUND-DRIVER-4020:BASE-BSP-SOUND-DRIVER-4023
+BASE-BSP-SOUND-DRIVER-5001
+BASE-BSP-SOUND-DRIVER-5020:BASE-BSP-SOUND-DRIVER-5023
+BASE-BSP-SOUND-DRIVER-7021:BASE-BSP-SOUND-DRIVER-7022
+BASE-BSP-SOUND-DRIVER-7025:BASE-BSP-SOUND-DRIVER-7028
+BASE-BSP-SOUND-DRIVER-7031:BASE-BSP-SOUND-DRIVER-7032
+BASE-BSP-SOUND-DRIVER-7035:BASE-BSP-SOUND-DRIVER-7038
+BASE-BSP-SOUND-DRIVER-2001
+BASE-BSP-SOUND-DRIVER-2007
+BASE-BSP-SOUND-DRIVER-3001
+BASE-BSP-SOUND-DRIVER-7002
+BASE-BSP-SOUND-DRIVER-7012
+BASE-BSP-SOUND-DRIVER-7103
+BASE-BSP-SOUND-DRIVER-7104
+BASE-BSP-SOUND-DRIVER-7404
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/testdata/h6hrp/t_sound.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,314 @@
+# This is the global environment file to configure the sound  on specific device
+# The current default sound values are configured for Nonia TI3430 hardware common sound device
+# Licencees may need to configure below values to specific devices
+
+
+[Drives]
+# Defines the path to the testdata files on ROM.
+# Do not use drive letter here (for TestDriver compatibility)
+ROMDriveTestPath = \base\sound\validation\
+
+# A RAM drive in the environment. 
+# Defines the character of the drive, the default value is 'C'.
+RAMDriveChar = C
+
+# Defines the drive's index.
+RAMDrive = EDrive{Drives, RAMDriveChar}
+
+# Defines the path to the testdata files on RAM
+RAMDriveTestPath = {Drives, RAMDriveChar}:\base\sound\validation\
+
+
+# driver version
+[driver]
+version			=1.00(1935)
+
+# pdd/ldd driver names and unit to test. By default unit -1 (0xffffffff in HEX)
+[UnitEnum]
+unit					=0xffffffff
+pdd						=ESDRV
+ldd						=ESOUND
+
+[default_play_format]
+# Playback format used in system by default
+# Values used to restore default play format after format change
+rate					=8000
+encoding				=EMdaSoundEncoding8BitPCM|EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=32768
+# Values are used to verify default playback format
+rate_expected				=8000
+encoding_expected			=EMdaSoundEncoding8BitPCM|EMdaSoundEncoding16BitPCM
+channels_expected			=2
+buffer_size_expected			=32768
+
+[valid_play_format]
+# Supported playback format used in system (non-default)
+# Values are used to set playback format
+rate					=8000
+encoding				=EMdaSoundEncoding8BitPCM|EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=2000
+# Values are used to verify current playback format
+rate_expected				=8000
+encoding_expected			=EMdaSoundEncoding8BitPCM|EMdaSoundEncoding16BitPCM
+channels_expected			=2
+buffer_size_expected			=2000
+
+[another_valid_play_format]
+# Another supported playback format used in system (non-default)
+# Values are used to set playback format
+rate					=44100
+encoding				=EMdaSoundEncoding8BitPCM|EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=2000
+# Values are used to verify current playback format
+rate_expected				=44100
+encoding_expected			=EMdaSoundEncoding8BitPCM|EMdaSoundEncoding16BitPCM
+channels_expected			=2
+buffer_size_expected			=2000
+
+[default_record_format]
+# Record format used in system by default
+# Values used to restore default record format after format change
+rate					=8000
+encoding				=EMdaSoundEncoding8BitPCM|EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=8192
+# Values are used to verify default record format
+rate_expected				=8000
+encoding_expected			=EMdaSoundEncoding8BitPCM|EMdaSoundEncoding16BitPCM
+channels_expected			=2
+buffer_size_expected			=8192
+
+[valid_record_format]
+# Another supported record format used in system
+# Values are used to set record format
+rate					=8000
+encoding				=EMdaSoundEncoding8BitPCM|EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=8192
+# Values are used to verify current record format
+rate_expected				=8000
+encoding_expected			=EMdaSoundEncoding8BitPCM|EMdaSoundEncoding16BitPCM
+channels_expected			=2
+buffer_size_expected			=8192
+
+[default_play_volume]
+# Value to restore default play volume level
+volume					=63
+# Value to verify default play volume level
+volume_expected				=63
+
+[max_play_volume]
+# Value to set max supported play volume level
+volume					=63
+# Value to verify max supported play volume level
+volume_expected				=63
+
+[min_play_volume]
+# Value to set min supported play volume level
+volume					=0
+# Value to verify min supported play volume level
+volume_expected				=0
+
+[play_volume_quater]
+# Value to set 1/2 of max supported play volume level
+volume					=32
+# Value to verify 1/2 of max supported play volume level
+volume_expected				=32
+
+[default_record_level]
+# Value to restore default record volume level
+sound_level				=31
+# Value to verify default record volume level
+sound_level_expected			=31
+
+[max_record_level]
+# Value to set max supported record volume level
+sound_level				=31
+# Value to verify max supported record volume level
+sound_level_expected			=31
+
+[min_record_level]
+# Value to set min supported record volume level
+sound_level				=0
+# Value to verify min supported record volume level
+sound_level_expected			=0
+
+[half_record_level]
+# Value to set 1/2 of max supported record volume level
+sound_level				=16
+# Value to verify 1/2 of max supported record volume level
+sound_level_expected			=16
+
+[unsupported_play_format]
+# Playback format not supported by device - bitrate out of range, channels number out of range
+rate					=80008
+encoding				=EMdaSoundEncoding8BitPCM
+channels				=3
+buffer_size				=2000
+
+[unsupported_record_format]
+# Record format not supported by device - bitrate out of range, channels number out of range
+rate					=80008
+encoding				=EMdaSoundEncoding8BitPCM
+channels				=3
+buffer_size				=8192
+
+[default_play_format_invalid_encoding]
+encoding				=EMdaSoundEncoding40BitPCM
+
+[default_play_format_invalid_rate]
+rate					=80008
+
+[default_play_format_invalid_buffer_size]
+buffer_size				=23
+
+[default_play_format_invalid_channels]
+channels				=754534
+
+[default_record_format_invalid_encoding]
+encoding				=EMdaSoundEncoding40BitPCM
+
+[default_record_format_invalid_rate]
+rate					=80008
+
+[default_record_format_invalid_buffer_size]
+buffer_size				=23
+
+[default_record_format_invalid_channels]
+channels				=754534
+
+[default_file]
+data_size				=32720
+from_file				={Drives, ROMDriveTestPath}pcm16_stereo_8khz_32kb.raw
+
+[valid_file]
+data_size				=32720
+from_file				={Drives, ROMDriveTestPath}pcm16_stereo_8khz_32kb.raw
+
+[not_supported_conf_audio_file]
+data_size				=32768
+from_file				={Drives, ROMDriveTestPath}pcm8_stereo_8khz_32kb.raw
+
+[play_formats_supported]
+# Values to verify supported playback formats
+min_rate_expected			=8000
+max_rate_expected			=48000
+channels_expected			=2
+min_buffer_size_expected		=1024
+max_buffer_size_expected		=32768
+min_volume_expected			=0
+max_volume_expected			=63
+encodings_expected			=EMdaSoundEncoding8BitPCM|EMdaSoundEncoding16BitPCM
+
+[record_formats_supported]
+# Values to verify supported record formats
+min_rate_expected			=8000
+max_rate_expected			=48000
+channels_expected			=2
+min_buffer_size_expected		=8192
+max_buffer_size_expected		=8192
+min_volume_expected			=0
+max_volume_expected			=31
+encodings_expected			=EMdaSoundEncoding8BitPCM|EMdaSoundEncoding16BitPCM
+
+#different buffer sizes for playback
+[set_settings_pcm8_mono_8khz_32kb_min_buffer]
+rate					=8000
+encoding				=EMdaSoundEncoding8BitPCM
+channels				=2
+buffer_size				=1024
+
+[set_settings_pcm8_mono_8khz_32kb_max_buffer]
+rate					=8000
+encoding				=EMdaSoundEncoding8BitPCM
+channels				=2
+buffer_size				=32768
+
+[set_settings_pcm16_mono_8khz_32kb_min_buffer]
+rate					=8000
+encoding				=EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=1024
+
+[set_settings_pcm16_mono_8khz_32kb_max_buffer]
+rate					=8000
+encoding				=EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=32768
+
+[set_settings_alaw8bit_mono_8khz_min_buffer]
+rate					=8000
+encoding				=EMdaSoundEncoding8BitALaw
+channels				=2
+buffer_size				=1024
+
+[set_settings_alaw8bit_mono_8khz_max_buffer]
+rate					=8000
+encoding				=EMdaSoundEncoding8BitALaw
+channels				=2
+buffer_size				=32768
+
+[set_settings_mulaw8bit_mono_12khz_min_buffer]
+rate					=12000
+encoding				=EMdaSoundEncoding8BitMuLaw
+channels				=2
+buffer_size				=1024
+
+[set_settings_mulaw8bit_mono_12khz_max_buffer]
+rate					=12000
+encoding				=EMdaSoundEncoding8BitMuLaw
+channels				=2
+buffer_size				=32768
+
+#different buffer sizes for recording
+[set_settings_pcm8_mono_8khz_32kb_min_buffer_recording]
+rate					=8000
+encoding				=EMdaSoundEncoding8BitPCM
+channels				=2
+buffer_size				=8192
+
+[set_settings_pcm8_mono_8khz_32kb_max_buffer_recording]
+rate					=8000
+encoding				=EMdaSoundEncoding8BitPCM
+channels				=2
+buffer_size				=8192
+
+[set_settings_pcm16_mono_8khz_32kb_min_buffer_recording]
+rate					=8000
+encoding				=EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=8192
+
+[set_settings_pcm16_mono_8khz_32kb_max_buffer_recording]
+rate					=8000
+encoding				=EMdaSoundEncoding16BitPCM
+channels				=2
+buffer_size				=8192
+
+[set_settings_alaw8bit_mono_8khz_min_buffer_recording]
+rate					=8000
+encoding				=EMdaSoundEncoding8BitALaw
+channels				=2
+buffer_size				=1024
+
+[set_settings_alaw8bit_mono_8khz_max_buffer_recording]
+rate					=8000
+encoding				=EMdaSoundEncoding8BitALaw
+channels				=2
+buffer_size				=8192
+
+[set_settings_mulaw8bit_mono_12khz_min_buffer_recording]
+rate					=12000
+encoding				=EMdaSoundEncoding8BitMuLaw
+channels				=2
+buffer_size				=1024
+
+[set_settings_mulaw8bit_mono_12khz_max_buffer_recording]
+rate					=12000
+encoding				=EMdaSoundEncoding8BitMuLaw
+channels				=2
+buffer_size				=8192
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/sound/testdata/h6hrp/t_sound.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,8 @@
+BASE-BSP-SOUND-DRIVER-4001
+BASE-BSP-SOUND-DRIVER-4020:BASE-BSP-SOUND-DRIVER-4023
+BASE-BSP-SOUND-DRIVER-5001
+BASE-BSP-SOUND-DRIVER-5020:BASE-BSP-SOUND-DRIVER-5023
+BASE-BSP-SOUND-DRIVER-7021:BASE-BSP-SOUND-DRIVER-7022
+BASE-BSP-SOUND-DRIVER-7025:BASE-BSP-SOUND-DRIVER-7028
+BASE-BSP-SOUND-DRIVER-7031:BASE-BSP-SOUND-DRIVER-7032
+BASE-BSP-SOUND-DRIVER-7035:BASE-BSP-SOUND-DRIVER-7038
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/group/bld.inf	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,54 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include "../../../group/device.cfg"
+
+PRJ_TESTEXPORTS
+//t_serial.oby											/src/cedar/generic/base/e32/rombuild/t_serial.oby
+t_serial.oby											/sf/os/kernelhwsrv/kernel/eka/rombuild/t_serial.oby
+t_serial.oby											/epoc32/rom/haitests/t_serial.oby
+t_serial.iby											/epoc32/rom/haitests/t_serial.iby
+t_serial_binaries.iby									/epoc32/rom/haitests/t_serial_binaries.iby
+t_serial_testdata.iby									/epoc32/rom/haitests/t_serial_testdata.iby
+
+../pkg/t_serial.bat										/epoc32/data/z/base/t_serial.bat
+
+../scripts/base-bsp-serial-driver.script				z:/base/serial/base-bsp-serial-driver.script
+
+../testdata/t_echoserver.ini							z:/base/serial/t_echoserver.ini
+../../../../testdata/bsp/uart/stress8bits.txt			z:/base/serial/stress/stress8bits.txt
+
+#if defined(TEST_DEVICE_H4HRP)
+../testdata/h4hrp/armv5/t_serial.ini					/epoc32/data/z/base/serial/t_serial.ini
+../testdata/h4hrp/armv5/t_serial.tcs					/epoc32/data/z/base/serial/t_serial.tcs
+../testdata/h4hrp/armv5/t_serialdevice.iby				/epoc32/rom/haitests/t_serialdevice.iby
+#endif
+
+#if defined(TEST_DEVICE_H6HRP)
+../testdata/h6hrp/armv5/t_serial.ini					/epoc32/data/z/base/serial/t_serial.ini
+../testdata/h6hrp/armv5/t_serial.tcs					/epoc32/data/z/base/serial/t_serial.tcs
+../testdata/h6hrp/armv5/t_serialdevice.iby				/epoc32/rom/haitests/t_serialdevice.iby
+#endif
+
+#if defined(TEST_DEVICE_DEVLON52)
+../testdata/devlon52/armv5/t_serial.ini					/epoc32/data/z/base/serial/t_serial.ini
+../testdata/devlon52/armv5/t_serial.tcs					/epoc32/data/z/base/serial/t_serial.tcs
+../testdata/devlon52/armv5/t_serialdevice.iby			/epoc32/rom/haitests/t_serialdevice.iby
+#endif
+
+PRJ_TESTMMPFILES
+t_serial.mmp
+gnumakefile	uartscript.mk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/group/t_serial.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,25 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_SERIAL_IBY__)
+#define __T_SERIAL_IBY__
+
+//Test Includes
+#include <rom\haitests\t_serial_binaries.iby>
+#include <rom\haitests\t_serial_testdata.iby>
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/group/t_serial.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+TARGET			t_serial.exe
+TARGETTYPE		exe
+UID				0x1000007A 0x102863D9
+VENDORID		0x70000001
+
+capability		All -Tcb
+
+SOURCEPATH		../src
+
+SOURCE			../../../e32/src/T_RHandleBaseData.cpp
+SOURCE			../../../e32/src/T_RBusLogicalChannelData.cpp
+SOURCE			../../../e32/src/T_RBusDevCommData.cpp
+SOURCE			../../../e32/src/T_TCommCapsV01Data.cpp
+SOURCE			../../../e32/src/T_TCommCapsV02Data.cpp
+SOURCE			../../../e32/src/T_TCommCapsV03Data.cpp
+SOURCE			../../../e32/src/T_TCommConfigV01Data.cpp
+SOURCE			../../../e32/src/T_TCommConfigV02Data.cpp
+SOURCE			../../../e32/src/T_ActiveCallbackIO.cpp
+SOURCE			../../../common/src/DataWrapperBase.cpp
+SOURCE			../../../common/src/ActiveCallbackBase.cpp
+
+SOURCE			T_SerialDriverServer.cpp
+
+USERINCLUDE		../inc
+USERINCLUDE		../../../common/inc
+USERINCLUDE		../../../e32/inc
+
+SYSTEMINCLUDE	/epoc32/include
+SYSTEMINCLUDE	/epoc32/include/test
+SYSTEMINCLUDE	/epoc32/include/kernel
+
+LIBRARY			euser.lib
+LIBRARY			efsrv.lib
+LIBRARY			hal.lib
+LIBRARY			testexecuteutils.lib
+LIBRARY			testexecutelogclient.lib
+LIBRARY			bafl.lib
+LIBRARY			iniparser.lib
+
+SMPSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/group/t_serial.oby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,34 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#define BASE_ROM
+#include <rom\##VARIANT##\header.iby>
+
+files=
+
+#include <rom\##VARIANT##\kernel.iby>
+#include "user.iby"
+#include <rom\hal\hal.iby>
+#include <rom\f32\f32.iby>
+
+//TEF Includes
+#include <rom\include\base_testexecutelite.iby>
+
+// Tests
+#include <rom\haitests\t_serial.iby>
+
+// Device dependent data
+#include <rom\haitests\t_serialdevice.iby>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/group/t_serial_binaries.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,26 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_SERIAL_BINARIES_IBY__)
+#define __T_SERIAL_BINARIES_IBY__
+
+#if (!defined EKA2)
+file=\epoc32\release\##MAIN##\##BUILD##\t_serial.exe		sys\bin\t_serial.exe
+#else
+file=\epoc32\release\##MAIN##\##BUILD##\t_serial.exe		sys\bin\t_serial.exe
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/group/t_serial_testdata.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,56 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_SERIAL_TESTDATA_IBY__)
+#define __T_SERIAL_TESTDATA_IBY__
+
+data=EPOCROOT##epoc32\data\z\base\serial\base-bsp-serial-driver.script												base\serial\base-bsp-serial-driver.script
+
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-PORT0.script					base\serial\base-bsp-serial-driver-PORT0.script
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-PORT0.ini						base\serial\base-bsp-serial-driver-PORT0.ini
+
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-PORT0-2400.script				base\serial\base-bsp-serial-driver-PORT0-2400.script
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-PORT0-2400.ini				base\serial\base-bsp-serial-driver-PORT0-2400.ini
+
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-PORT0-4800.script				base\serial\base-bsp-serial-driver-PORT0-4800.script
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-PORT0-4800.ini				base\serial\base-bsp-serial-driver-PORT0-4800.ini
+
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-PORT0-9600.script				base\serial\base-bsp-serial-driver-PORT0-9600.script
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-PORT0-9600.ini				base\serial\base-bsp-serial-driver-PORT0-9600.ini
+
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-PORT0-115200.script			base\serial\base-bsp-serial-driver-PORT0-115200.script
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-PORT0-115200.ini				base\serial\base-bsp-serial-driver-PORT0-115200.ini
+
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-stress-PORT0-2400.script		base\serial\base-bsp-serial-driver-stress-PORT0-2400.script
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-stress-PORT0-2400.ini			base\serial\base-bsp-serial-driver-stress-PORT0-2400.ini
+
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-stress-PORT0-4800.script		base\serial\base-bsp-serial-driver-stress-PORT0-4800.script
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-stress-PORT0-4800.ini			base\serial\base-bsp-serial-driver-stress-PORT0-4800.ini
+
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-stress-PORT0-9600.script		base\serial\base-bsp-serial-driver-stress-PORT0-9600.script
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-stress-PORT0-9600.ini			base\serial\base-bsp-serial-driver-stress-PORT0-9600.ini
+
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-stress-PORT0-115200.script	base\serial\base-bsp-serial-driver-stress-PORT0-115200.script
+data=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\z\base\serial\base-bsp-serial-driver-stress-PORT0-115200.ini		base\serial\base-bsp-serial-driver-stress-PORT0-115200.ini
+
+data=EPOCROOT##epoc32\data\z\base\serial\stress\stress8bits.txt														base\serial\stress\stress8bits.txt
+data=EPOCROOT##epoc32\data\z\base\serial\t_echoserver.ini															base\serial\t_echoserver.ini
+
+data=EPOCROOT##epoc32\data\z\base\serial\t_serial.ini																base\serial\t_serial.ini
+data=EPOCROOT##epoc32\data\z\base\serial\t_serial.tcs																base\serial\t_serial.tcs
+data=EPOCROOT##epoc32\data\z\base\t_serial.bat																		base\t_serial.bat
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/group/uartscript.mk	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,190 @@
+#
+# Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+# To ensure that EPOCROOT always ends with a forward slash
+TMPROOT:=$(subst \,/,$(EPOCROOT))
+EPOCROOT2:=$(patsubst %/,%,$(TMPROOT))/
+
+include $(EPOCROOT2)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk
+
+UART_FOLDER=$(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\z\base\serial
+
+SCRIPT_PORT0=$(UART_FOLDER)\base-bsp-serial-driver-PORT0.script
+INI_PORT0=$(UART_FOLDER)\base-bsp-serial-driver-PORT0.ini
+
+SCRIPT_PORT0_2400=$(UART_FOLDER)\base-bsp-serial-driver-PORT0-2400.script
+INI_PORT0_2400=$(UART_FOLDER)\base-bsp-serial-driver-PORT0-2400.ini
+
+SCRIPT_PORT0_4800=$(UART_FOLDER)\base-bsp-serial-driver-PORT0-4800.script
+INI_PORT0_4800=$(UART_FOLDER)\base-bsp-serial-driver-PORT0-4800.ini
+
+SCRIPT_PORT0_9600=$(UART_FOLDER)\base-bsp-serial-driver-PORT0-9600.script
+INI_PORT0_9600=$(UART_FOLDER)\base-bsp-serial-driver-PORT0-9600.ini
+
+SCRIPT_PORT0_115200=$(UART_FOLDER)\base-bsp-serial-driver-PORT0-115200.script
+INI_PORT0_115200=$(UART_FOLDER)\base-bsp-serial-driver-PORT0-115200.ini
+
+SCRIPT_STRESS_PORT0_2400=$(UART_FOLDER)\base-bsp-serial-driver-stress-PORT0-2400.script
+INI_STRESS_PORT0_2400=$(UART_FOLDER)\base-bsp-serial-driver-stress-PORT0-2400.ini
+
+SCRIPT_STRESS_PORT0_4800=$(UART_FOLDER)\base-bsp-serial-driver-stress-PORT0-4800.script
+INI_STRESS_PORT0_4800=$(UART_FOLDER)\base-bsp-serial-driver-stress-PORT0-4800.ini
+
+SCRIPT_STRESS_PORT0_9600=$(UART_FOLDER)\base-bsp-serial-driver-stress-PORT0-9600.script
+INI_STRESS_PORT0_9600=$(UART_FOLDER)\base-bsp-serial-driver-stress-PORT0-9600.ini
+
+SCRIPT_STRESS_PORT0_115200=$(UART_FOLDER)\base-bsp-serial-driver-stress-PORT0-115200.script
+INI_STRESS_PORT0_115200=$(UART_FOLDER)\base-bsp-serial-driver-stress-PORT0-115200.ini
+
+$(UART_FOLDER) :
+	@perl -S emkdir.pl "$(UART_FOLDER)"
+
+$(SCRIPT_PORT0)			: ..\scripts\base-bsp-serial-driver-port.script
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=9600
+	@echo $@
+
+$(INI_PORT0)			: ..\testdata\base-bsp-serial-driver-port.ini
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=9600
+	@echo $@
+
+$(SCRIPT_PORT0_2400)	: ..\scripts\base-bsp-serial-driver-baud.script
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=2400
+	@echo $@
+
+$(INI_PORT0_2400)		: ..\testdata\base-bsp-serial-driver-baud.ini
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=2400
+	@echo $@
+
+$(SCRIPT_PORT0_4800)	: ..\scripts\base-bsp-serial-driver-baud.script
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=4800
+	@echo $@
+
+$(INI_PORT0_4800)		: ..\testdata\base-bsp-serial-driver-baud.ini
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=4800
+	@echo $@
+
+$(SCRIPT_PORT0_9600)	: ..\scripts\base-bsp-serial-driver-baud.script
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=9600
+	@echo $@
+
+$(INI_PORT0_9600)		: ..\testdata\base-bsp-serial-driver-baud.ini
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=9600
+	@echo $@
+
+$(SCRIPT_PORT0_115200)	: ..\scripts\base-bsp-serial-driver-baud.script
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=115200
+	@echo $@
+
+$(INI_PORT0_115200)		: ..\testdata\base-bsp-serial-driver-baud.ini
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=115200
+	@echo $@
+
+$(SCRIPT_STRESS_PORT0_2400)	: ..\scripts\base-bsp-serial-driver-stress.script
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=2400
+	@echo $@
+
+$(INI_STRESS_PORT0_2400)		: ..\testdata\base-bsp-serial-driver-stress.ini
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=2400
+	@echo $@
+
+$(SCRIPT_STRESS_PORT0_4800)	: ..\scripts\base-bsp-serial-driver-stress.script
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=4800
+	@echo $@
+
+$(INI_STRESS_PORT0_4800)		: ..\testdata\base-bsp-serial-driver-stress.ini
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=4800
+	@echo $@
+
+$(SCRIPT_STRESS_PORT0_9600)	: ..\scripts\base-bsp-serial-driver-stress.script
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=9600
+	@echo $@
+
+$(INI_STRESS_PORT0_9600)		: ..\testdata\base-bsp-serial-driver-stress.ini
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=9600
+	@echo $@
+
+$(SCRIPT_STRESS_PORT0_115200)	: ..\scripts\base-bsp-serial-driver-stress.script
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=115200
+	@echo $@
+
+$(INI_STRESS_PORT0_115200)		: ..\testdata\base-bsp-serial-driver-stress.ini
+	perl uartscript.pl --in="$?" --out="$@" --port=0 --baud=115200
+	@echo $@
+
+BLD				:	$(UART_FOLDER) \
+					$(SCRIPT_PORT0) $(INI_PORT0) \
+					$(SCRIPT_PORT0_2400) $(INI_PORT0_2400) \
+					$(SCRIPT_PORT0_4800) $(INI_PORT0_4800) \
+					$(SCRIPT_PORT0_9600) $(INI_PORT0_9600) \
+					$(SCRIPT_PORT0_115200) $(INI_PORT0_115200) \
+					$(SCRIPT_STRESS_PORT0_2400) $(INI_STRESS_PORT0_2400) \
+					$(SCRIPT_STRESS_PORT0_4800) $(INI_STRESS_PORT0_4800) \
+					$(SCRIPT_STRESS_PORT0_9600) $(INI_STRESS_PORT0_9600) \
+					$(SCRIPT_STRESS_PORT0_115200) $(INI_STRESS_PORT0_115200)
+
+CLEAN			:
+	-$(ERASE) $(SCRIPT_PORT0)
+	-$(ERASE) $(INI_PORT0)
+	-$(ERASE) $(SCRIPT_PORT0_2400)
+	-$(ERASE) $(INI_PORT0_2400)
+	-$(ERASE) $(SCRIPT_PORT0_4800)
+	-$(ERASE) $(INI_PORT0_4800)
+	-$(ERASE) $(SCRIPT_PORT0_9600)
+	-$(ERASE) $(INI_PORT0_9600)
+	-$(ERASE) $(SCRIPT_PORT0_115200)
+	-$(ERASE) $(INI_PORT0_115200)
+	-$(ERASE) $(SCRIPT_STRESS_PORT0_2400)
+	-$(ERASE) $(INI_STRESS_PORT0_2400)
+	-$(ERASE) $(SCRIPT_STRESS_PORT0_4800)
+	-$(ERASE) $(INI_STRESS_PORT0_4800)
+	-$(ERASE) $(SCRIPT_STRESS_PORT0_9600)
+	-$(ERASE) $(INI_STRESS_PORT0_9600)
+	-$(ERASE) $(SCRIPT_STRESS_PORT0_115200)
+	-$(ERASE) $(INI_STRESS_PORT0_115200)
+
+CLEANLIB		:
+
+FINAL			:
+
+FREEZE			:
+
+LIB				:
+
+MAKMAKE			:
+
+RELEASABLES		:
+	@echo $(SCRIPT_PORT0)
+	@echo $(INI_PORT0)
+	@echo $(SCRIPT_PORT0_2400)
+	@echo $(INI_PORT0_2400)
+	@echo $(SCRIPT_PORT0_4800)
+	@echo $(INI_PORT0_4800)
+	@echo $(SCRIPT_PORT0_9600)
+	@echo $(INI_PORT0_9600)
+	@echo $(SCRIPT_PORT0_115200)
+	@echo $(INI_PORT0_115200)
+	@echo $(SCRIPT_STRESS_PORT0_2400)
+	@echo $(INI_STRESS_PORT0_2400)
+	@echo $(SCRIPT_STRESS_PORT0_4800)
+	@echo $(INI_STRESS_PORT0_4800)
+	@echo $(SCRIPT_STRESS_PORT0_9600)
+	@echo $(INI_STRESS_PORT0_9600)
+	@echo $(SCRIPT_STRESS_PORT0_115200)
+	@echo $(INI_STRESS_PORT0_115200)
+
+RESOURCE		:
+
+SAVESPACE		:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/group/uartscript.pl	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,79 @@
+#
+# Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+use Getopt::Long;
+
+sub Usage()
+	{
+	print <<USAGE_EOF;
+Usage
+perl uartscript.pl --in=FileNameIn --out=FileNameOut --port=Port --baud=Baud --help
+
+    --in=FileNameIn             : Input file name
+
+    --out=FileNameOut           : Output file name
+
+    --port=Port                 : Serial port number
+
+    --baud=Baud                 : Baud rate of the port
+
+    --help                      : This help
+USAGE_EOF
+	exit( 0 )
+	}
+
+sub main()
+{
+	my	$help='';
+	my	$input="";
+	my	$output="";
+	my	$port="";
+	my	$baud="";
+
+	GetOptions(
+		'in=s'		=> \$input,
+		'out=s'		=> \$output,
+		'port=s'	=> \$port,
+		'baud=s'	=> \$baud,
+		'help' 		=> \$help
+	);
+
+	if($help or ($input eq "") or ($output eq "") or ($port eq "") or ($baud eq ""))
+		{
+		Usage();
+		exit(0);
+		}
+
+	open(FIN, $input);
+	open(FOUT, ">$output");
+
+	foreach (<FIN>)
+	{
+		if (/<port>/)
+		{
+			s/<port>/$port/;
+		}
+		if (/<baud>/)
+		{
+			s/<baud>/$baud/;
+		}
+		print FOUT $_;
+	}
+	close(FIN);
+	close(FOUT);
+}
+
+main();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/group/user_input.oby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,53 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+file=\epoc32\release\armv5\urel\testexecutepipslogclient.dll									\sys\bin\testexecutepipslogclient.dll
+file=\epoc32\release\armv5\urel\testexecutelogclient.dll										\sys\bin\testexecutelogclient.dll
+file=\epoc32\release\armv5\urel\testexecutelogengine.exe										\sys\bin\testexecutelogengine.exe
+file=\epoc32\release\armv5\urel\iniparser.dll													\sys\bin\iniparser.dll
+file=\epoc32\release\armv5\urel\rfileloggerclient.dll											\sys\bin\rfileloggerclient.dll
+file=\epoc32\release\armv5\urel\rfileloggerserver.exe											\sys\bin\rfileloggerserver.exe
+file=\epoc32\release\armv5\urel\testexecute.exe													\sys\bin\testexecute.exe
+file=\epoc32\release\armv5\urel\testexecuteutils.dll											\sys\bin\testexecuteutils.dll
+file=\epoc32\release\armv5\urel\wrapperutilsplugin.dll											\sys\bin\wrapperutilsplugin.dll
+data=\epoc32\data\z\system\data\testexecute.ini													\system\data\testexecute.ini
+
+file=\epoc32\release\armv5\urel\t_serial.exe													\sys\bin\t_serial.exe
+data=\epoc32\data\z\base\serial\base-bsp-serial-driver.script									\base\serial\base-bsp-serial-driver.script
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-PORT0.script				\base\serial\base-bsp-serial-driver-PORT0.script
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-PORT0.ini					\base\serial\base-bsp-serial-driver-PORT0.ini
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-PORT0-2400.script			\base\serial\base-bsp-serial-driver-PORT0-2400.script
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-PORT0-2400.ini				\base\serial\base-bsp-serial-driver-PORT0-2400.ini
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-PORT0-4800.script			\base\serial\base-bsp-serial-driver-PORT0-4800.script
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-PORT0-4800.ini				\base\serial\base-bsp-serial-driver-PORT0-4800.ini
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-PORT0-9600.script			\base\serial\base-bsp-serial-driver-PORT0-9600.script
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-PORT0-9600.ini				\base\serial\base-bsp-serial-driver-PORT0-9600.ini
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-PORT0-115200.script		\base\serial\base-bsp-serial-driver-PORT0-115200.script
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-PORT0-115200.ini			\base\serial\base-bsp-serial-driver-PORT0-115200.ini
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-stress-PORT0-2400.script	\base\serial\base-bsp-serial-driver-stress-PORT0-2400.script
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-stress-PORT0-2400.ini		\base\serial\base-bsp-serial-driver-stress-PORT0-2400.ini
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-stress-PORT0-4800.script	\base\serial\base-bsp-serial-driver-stress-PORT0-4800.script
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-stress-PORT0-4800.ini		\base\serial\base-bsp-serial-driver-stress-PORT0-4800.ini
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-stress-PORT0-9600.script	\base\serial\base-bsp-serial-driver-stress-PORT0-9600.script
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-stress-PORT0-9600.ini		\base\serial\base-bsp-serial-driver-stress-PORT0-9600.ini
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-stress-PORT0-115200.script	\base\serial\base-bsp-serial-driver-stress-PORT0-115200.script
+data=\epoc32\release\armv5\urel\z\base\serial\base-bsp-serial-driver-stress-PORT0-115200.ini	\base\serial\base-bsp-serial-driver-stress-PORT0-115200.ini
+data=\epoc32\data\z\base\serial\stress\stress8bits.txt											\base\serial\stress\stress8bits.txt
+data=\epoc32\data\z\base\serial\t_echoserver.ini												\base\serial\t_echoserver.ini
+data=\epoc32\data\z\base\serial\t_serial.ini													\base\serial\t_serial.ini
+data=\epoc32\data\z\base\serial\t_serial.tcs													\base\serial\t_serial.tcs
+data=\epoc32\data\z\base\t_serial.bat															\base\t_serial.bat
+data=\epoc32\data\z\base\t_serial.bat															\salt.bat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/group/user_romfiles.txt	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,20 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+ocspcommon.dll
+iniparser.dll
+testexecutepipslogclient.dll
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/inc/T_SerialDriverServer.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_SERIAL_DRIVER_SERVER_H__)
+#define __T_SERIAL_DRIVER_SERVER_H__
+
+//	EPOC Includes
+#include <testserver2.h>
+
+// This wrapper class extends the test server and creates test server for serial driver
+class CT_SerialDriverServer : public CTestServer2
+	{
+private:
+	class CT_SerialDriverBlock : public CTestBlockController
+		{
+	public:
+		CDataWrapper*	CreateDataL( const TDesC& aData );
+		};
+
+public:
+	static CT_SerialDriverServer* NewL();
+
+	inline CTestBlockController*	CreateTestBlock();
+	};
+
+#include "T_SerialDriverServer.inl"
+
+#endif /* __T_SERIAL_DRIVER_SERVER_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/inc/T_SerialDriverServer.inl	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+CTestBlockController* CT_SerialDriverServer::CreateTestBlock()
+	{
+	return new CT_SerialDriverBlock();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/pkg/t_serial.bat	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,18 @@
+@rem
+@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+testexecute z:\base\serial\base-bsp-serial-driver.script -tcx z:\base\serial\t_serial.tcs
+copy c:\logs\testexecute\*.* d:\
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/scripts/base-bsp-serial-driver-baud.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,11846 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//! @file
+//! @SYMTestSuiteName		base-bsp-serial-driver-PORT<port>-<baud>
+//! @SYMScriptTestEnvironment	This test script requires a base port ROM
+
+/////////////////////////////////////////////////////////////////////
+// base-bsp-serial-driver-PORT<port>-<baud>.script
+//
+//
+// Tests elements of the RBusDevComm
+// as a means of confidence that the HAI APIs work as expected.
+//
+// Tests are validated through environment settings found in the file t_serial.ini
+//
+// The purpose is to provide a regression test suite of publishedPartner APIs for RBusDevComm.
+// Negative testing is performed to confirm that correct errors are returned when incorrect parameters are given.
+// The tests are fully automated.
+/////////////////////////////////////////////////////////////////////
+
+LOAD_SUITE	t_serial
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel();
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1008
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1008
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Break the connection for a period
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to echo server requesting the BI count to be reset, Break.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should run with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND		busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1008-Break
+		OUTSTANDING
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-QueryBI
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1008-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1008
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1009
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1009
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt);
+//!				RBusDevComm::BreakCancel()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a Break from the connection
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to echo server requesting the BI count to be reset, Break, and BreakCancel.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND	!AsyncError=-3	busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1009-Break
+		COMMAND			busDevComm	BreakCancel
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_none-1009
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= none
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port witout specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port witout specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel();
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-none-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1008
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1008
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Break the connection for a period
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to echo server requesting the BI count to be reset, Break.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should run with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND		busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1008-Break
+		OUTSTANDING
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-QueryBI
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1008-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1008
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1009
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1009
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt);
+//!				RBusDevComm::BreakCancel()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a Break from the connection
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to echo server requesting the BI count to be reset, Break, and BreakCancel.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-none-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND	!AsyncError=-3	busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1009-Break
+		COMMAND			busDevComm	BreakCancel
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_none-1009
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to com port witout specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to com port witout specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel();
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-none-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1008
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1008
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Break the connection for a period
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to echo server requesting the BI count to be reset, Break.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should run with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND		busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1008-Break
+		OUTSTANDING
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-QueryBI
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1008-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1008
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1009
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1009
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt);
+//!				RBusDevComm::BreakCancel()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a Break from the connection
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to echo server requesting the BI count to be reset, Break, and BreakCancel.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-none-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND	!AsyncError=-3	busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1009-Break
+		COMMAND			busDevComm	BreakCancel
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_none-1009
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel();
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-none-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1008
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1008
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Break the connection for a period
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to echo server requesting the BI count to be reset, Break.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should run with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND		busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1008-Break
+		OUTSTANDING
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-QueryBI
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1008-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1008
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1009
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1009
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt);
+//!				RBusDevComm::BreakCancel()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a Break from the connection
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= none
+//!				3. Send data to echo server requesting the BI count to be reset, Break, and BreakCancel.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-none-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND	!AsyncError=-3	busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1009-Break
+		COMMAND			busDevComm	BreakCancel
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_none-1009
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel();
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-none-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1008
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1008
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Break the connection for a period
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to echo server requesting the BI count to be reset, Break.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should run with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND		busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1008-Break
+		OUTSTANDING
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-QueryBI
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1008-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1008
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1009
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1009
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt);
+//!				RBusDevComm::BreakCancel()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a Break from the connection
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to echo server requesting the BI count to be reset, Break, and BreakCancel.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-none-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND	!AsyncError=-3	busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1009-Break
+		COMMAND			busDevComm	BreakCancel
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_none-1009
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel();
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-none-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1008
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1008
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Break the connection for a period
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to echo server requesting the BI count to be reset, Break.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should run with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND		busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1008-Break
+		OUTSTANDING
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-QueryBI
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1008-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1008
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1009
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1009
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt);
+//!				RBusDevComm::BreakCancel()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a Break from the connection
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= none
+//!				3. Send data to echo server requesting the BI count to be reset, Break, and BreakCancel.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-none-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND	!AsyncError=-3	busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1009-Break
+		COMMAND			busDevComm	BreakCancel
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_none-1009
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel();
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1008
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1008
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Break the connection for a period
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to echo server requesting the BI count to be reset, Break.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should run with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND		busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1008-Break
+		OUTSTANDING
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-QueryBI
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1008-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1008
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1009
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1009
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt);
+//!				RBusDevComm::BreakCancel()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a Break from the connection
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to echo server requesting the BI count to be reset, Break, and BreakCancel.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND	!AsyncError=-3	busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1009-Break
+		COMMAND			busDevComm	BreakCancel
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_rtscts-1009
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port
+//!				4. Read data from com port without specifying the length of the data (must be length with multiple of 4)
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel();
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1008
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1008
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Break the connection for a period
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to echo server requesting the BI count to be reset, Break.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should run with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND		busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1008-Break
+		OUTSTANDING
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-QueryBI
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1008-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1008
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1009
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1009
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt);
+//!				RBusDevComm::BreakCancel()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a Break from the connection
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to echo server requesting the BI count to be reset, Break, and BreakCancel.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND	!AsyncError=-3	busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1009-Break
+		COMMAND			busDevComm	BreakCancel
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_rtscts-1009
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel()
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1008
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1008
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Break the connection for a period
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to echo server requesting the BI count to be reset, Break.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should run with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND		busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1008-Break
+		OUTSTANDING
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-QueryBI
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1008-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1008
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1009
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1009
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt);
+//!				RBusDevComm::BreakCancel()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a Break from the connection
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to echo server requesting the BI count to be reset, Break, and BreakCancel.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND	!AsyncError=-3	busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1009-Break
+		COMMAND			busDevComm	BreakCancel
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_rtscts-1009
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel();
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1008
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1008
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Break the connection for a period
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to echo server requesting the BI count to be reset, Break.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should run with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND		busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1008-Break
+		OUTSTANDING
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-QueryBI
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1008-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1008
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1009
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1009
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt);
+//!				RBusDevComm::BreakCancel()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a Break from the connection
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to echo server requesting the BI count to be reset, Break, and BreakCancel.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND	!AsyncError=-3	busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1009-Break
+		COMMAND			busDevComm	BreakCancel
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_rtscts-1009
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel();
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1008
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1008
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Break the connection for a period
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to echo server requesting the BI count to be reset, Break.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should run with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND		busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1008-Break
+		OUTSTANDING
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-QueryBI
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1008-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1008
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1009
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1009
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt);
+//!				RBusDevComm::BreakCancel()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a Break from the connection
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to echo server requesting the BI count to be reset, Break, and BreakCancel.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND	!AsyncError=-3	busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1009-Break
+		COMMAND			busDevComm	BreakCancel
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_rtscts-1009
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel();
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1008
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1008
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Break the connection for a period
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to echo server requesting the BI count to be reset, Break.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should run with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND		busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1008-Break
+		OUTSTANDING
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-QueryBI
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1008-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1008
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1009
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1009
+//! @SYMAPI			RBusDevComm::Break(TRequestStatus {ref}, TInt);
+//!				RBusDevComm::BreakCancel()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a Break from the connection
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to echo server requesting the BI count to be reset, Break, and BreakCancel.
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Break should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND			config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND			config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI
+		OUTSTANDING
+		COMMAND	!AsyncError=-3	busDevComm	Break				BASE-BSP-SERIAL-DRIVER-8-1009-Break
+		COMMAND			busDevComm	BreakCancel
+		OUTSTANDING
+
+		COMMAND			busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_rtscts-1009
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel();
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_none_xonxoff-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data (must be length with multiple of 4)
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel();
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_none_xonxoff-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel();
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_even_xonxoff-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel();
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_even_xonxoff-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel();
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_1_odd_xonxoff-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-8-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1005
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. ReadOneOrMore data from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1005-Write
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1005
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1006
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data using ReadOneOrMore from com port
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-8-1006-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	QueryReceiveBuffer		BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer
+		COMMAND		busDevComm	ReadOneOrMore			BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1006
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1007
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::WriteCancel();
+//!				RBusDevComm::ResetBuffers()
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Cancel a write request
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data, and cancel the operation
+//!				4. Restore configuration
+//!				5. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	The write should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		80		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		CREATE_OBJECT		TCommConfigV01	configSave
+		CREATE_OBJECT		TCommConfigV01	config
+		COMMAND			busDevComm	new
+		COMMAND			configSave	new
+		COMMAND			config		new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Config			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND			config		iRate			BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND			config		iDataBits		BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND			config		iStopBits		BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND			config		iParity			BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND			config		iHandshake		BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND			busDevComm	Read			BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND	!AsyncError=-3	busDevComm	Write			BASE-BSP-SERIAL-DRIVER-8-1007-Write
+		COMMAND			busDevComm	WriteCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND			busDevComm	SetConfig		BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND			busDevComm	Close
+		COMMAND			config		~
+		COMMAND			configSave	~
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_8_2_odd_xonxoff-1007
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_7_1_none_none-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_7_1_none_none-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 7
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData7
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-7-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-7-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_7_1_none_none-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_7_1_none_none-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_7_1_none_none-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 7
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData7
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-7-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-7-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-7-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_7_1_none_none-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_7_1_none_none-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_7_1_none_none-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 7
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData7
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-7-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-7-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_7_1_none_none-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_7_1_none_none-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_7_1_none_none-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 7
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData7
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-7-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-7-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-7-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_7_1_none_none-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_6_1_none_none-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_6_1_none_none-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 6
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData6
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-6-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-6-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_6_1_none_none-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_6_1_none_none-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_6_1_none_none-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 6
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData6
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-6-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-6-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-6-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_6_1_none_none-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_6_1_none_none-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_6_1_none_none-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 6
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData6
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-6-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-6-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_6_1_none_none-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_6_1_none_none-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_6_1_none_none-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 6
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData6
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-6-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-6-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-6-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_6_1_none_none-1004
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_5_1_none_none-1001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_5_1_none_none-1001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 5
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData5
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-5-1001-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-5-1001-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_5_1_none_none-1001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_5_1_none_none-1002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_5_1_none_none-1002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::QueryReceiveBuffer();
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 5
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Check buffer is not empty before reading data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData5
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-5-1002-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-5-1002-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-5-1002-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_5_1_none_none-1002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_5_1_none_none-1003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_5_1_none_none-1003
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 5
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData5
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-5-1003-Write
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-5-1003-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_5_1_none_none-1003
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_5_1_none_none-1004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_5_1_none_none-1004
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Oleg Kuznetsov
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo data to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 5
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				3. Send data to com port specifying the length of the data, and wait for read notification
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	80		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-none-none-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData5
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeNone
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-5-1004-Write
+		COMMAND		busDevComm	NotifyReceiveDataAvailable	BASE-BSP-SERIAL-DRIVER-5-1004-NotifyReceiveDataAvailable
+		OUTSTANDING
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-5-1004-Read
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-PORT<port>_<baud>_5_1_none_none-1004
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/scripts/base-bsp-serial-driver-port.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,832 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//! @file
+//! @SYMTestSuiteName		base-bsp-serial-driver-PORT<port>
+//! @SYMScriptTestEnvironment	This test script requires a base port ROM
+
+/////////////////////////////////////////////////////////////////////
+// base-bsp-serial-driver-PORT<port>.script
+//
+//
+// Tests elements of the RBusDevComm
+// as a means of confidence that the HAI APIs work as expected.
+//
+// Tests are validated through environment settings found in the file t_serial.ini
+//
+// The purpose is to provide a regression test suite of publishedPartner APIs for RBusDevComm.
+// Negative testing is performed to confirm that correct errors are returned when incorrect parameters are given.
+// The tests are fully automated.
+/////////////////////////////////////////////////////////////////////
+
+LOAD_SUITE	t_serial
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0001
+//! @SYMAPI			RBusDevComm::RBusDevComm()
+//!				RBusDevComm::~RBusDevComm()
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		27/03/2008
+//! @SYMTestCaseDesc		Create a RBusDevComm object
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	RBusDevComm created
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		COMMAND		busDevComm	new
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0001
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0002
+//! @SYMAPI			RBusDevComm::VersionRequired()
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		27/03/2008
+//! @SYMTestCaseDesc		Get version of software
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Get version info
+//!				3. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Expected version information should be returned
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		COMMAND		busDevComm	new
+
+		COMMAND		busDevComm	VersionRequired		BASE-BSP-SERIAL-DRIVER-PORT<port>-0002
+
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0002
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0003
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0003
+//! @SYMAPI			RBusDevComm::Open()
+//!				RBusDevComm::Close()
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		27/03/2008
+//! @SYMTestCaseDesc		Open serial port com<port>
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Open serial port com<port>
+//!				3. Close the port
+//!				4. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	RBusDevComm opened and closed successfully
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		COMMAND		busDevComm	new
+
+		COMMAND		busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Close
+
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0003
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0004
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0004
+//! @SYMAPI			RBusDevComm::QueryReceiveBuffer()
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		27/03/2008
+//! @SYMTestCaseDesc		Query the number of bytes waiting in the input buffer.
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Open serial port com<port>
+//!				3. Query and validate the receive buffer contents as being empty
+//!				4. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	QueryReceiveBuffer should complete with no error and be empty
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		COMMAND		busDevComm	new
+		COMMAND		busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+
+		COMMAND		busDevComm	QueryReceiveBuffer	BASE-BSP-SERIAL-DRIVER-PORT<port>-0004-QueryReceiveBuffer_003
+
+		COMMAND		busDevComm	Close
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0004
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0005
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0005
+//! @SYMAPI			RBusDevComm::NotifyReceiveDataAvailable(TRequestStatus {ref})
+//!				RBusDevComm::NotifyReceiveDataAvailableCancel()
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		19/06/2008
+//! @SYMTestCaseDesc		Cancel notification of data available
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Open serial port com<port>
+//!				3. Request to be notified of data available
+//!				5. Cancel the request
+//!				4. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	NotifyReceiveDataAvailable should complete with the error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		10		t_serial			\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		COMMAND			busDevComm	new
+		COMMAND			busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+
+		COMMAND !AsyncError=-3	busDevComm	NotifyReceiveDataAvailable
+		COMMAND			busDevComm	NotifyReceiveDataAvailableCancel
+		OUTSTANDING
+
+		COMMAND			busDevComm	Close
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0005
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0006
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0006
+//! @SYMAPI			RBusDevComm::Config(TDes8 {ref})
+//!				TCommConfigV01::TCommConfigV01()
+//!				TCommConfigV01::~TCommConfigV01()
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		27/03/2008
+//! @SYMTestCaseDesc		Get com<port> configuration and verify default values
+//! @SYMTestActions    		1. Create RBusDevComm and TCommConfigV01 object
+//!				2. Open serial port com<port>
+//!				3. Get config values
+//!				4. Verify values
+//!				5. Close the port
+//!				6. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	TCommConfigV01 values should have the default startup values
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config			BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-Config
+
+		COMMAND		config		iDataBits		BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iDataBits
+		COMMAND		config		iFifo			BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iFifo
+		COMMAND		config		iHandshake		BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iHandshake
+		COMMAND		config		iParity			BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iParity
+		COMMAND		config		iParityError		BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iParityError
+		COMMAND		config		iParityErrorChar	BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iParityErrorChar
+		COMMAND		config		iRate			BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iRate
+		COMMAND		config		iSIREnable		BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iSIREnable
+		COMMAND		config		iSIRSettings		BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iSIRSettings
+		COMMAND		config		iSpecialRate		BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iSpecialRate
+		COMMAND		config		iStopBits		BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iStopBits
+		COMMAND		config		iTerminator		BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iTerminator
+		COMMAND		config		iTerminatorCount	BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iTerminatorCount
+		COMMAND		config		iXoffChar		BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iXoffChar
+		COMMAND		config		iXonChar		BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iXonChar
+
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0006
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0007
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0007
+//! @SYMAPI			RBusDevComm::Caps(TDes8 {ref})
+//!				TCommCapsV01::TCommCapsV01()
+//!				TCommCapsV01::~TCommCapsV01()
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		11/07/2008
+//! @SYMTestCaseDesc		Get com<port> V1 capabilities and verify default values
+//! @SYMTestActions    		1. Create RBusDevComm and TCommCapsV03 object
+//!				2. Open serial port com<port>
+//!				3. Get V1 capability values
+//!				4. Verify values
+//!				5. Close the port
+//!				6. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	TCommCapsV03 values should have the default startup values
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommCapsV01	caps
+		COMMAND		busDevComm	new
+		COMMAND		caps		new
+		COMMAND		busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Caps			BASE-BSP-SERIAL-DRIVER-PORT<port>-0007-Caps
+
+		COMMAND		caps		iDataBits		BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iDataBits
+		COMMAND		caps		iFifo			BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iFifo
+		COMMAND		caps		iHandshake		BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iHandshake
+		COMMAND		caps		iParity			BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iParity
+		COMMAND		caps		iRate			BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iRate
+		COMMAND		caps		iSIR			BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iSIR
+		COMMAND		caps		iSignals		BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iSignals
+		COMMAND		caps		iStopBits		BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iStopBits
+
+		COMMAND		busDevComm	Close
+		COMMAND		caps		~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0007
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0008
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0008
+//! @SYMAPI			RBusDevComm::Caps(TDes8 {ref})
+//!				TCommCapsV02::TCommCapsV02()
+//!				TCommCapsV02::~TCommCapsV02()
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		11/07/2008
+//! @SYMTestCaseDesc		Get com<port> V2 capabilities and verify default values
+//! @SYMTestActions    		1. Create RBusDevComm and TCommCapsV03 object
+//!				2. Open serial port com<port>
+//!				3. Get V2 capability values
+//!				4. Verify values
+//!				5. Close the port
+//!				6. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	TCommCapsV03 values should have the default startup values
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommCapsV02	caps
+		COMMAND		busDevComm	new
+		COMMAND		caps		new
+		COMMAND		busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Caps			BASE-BSP-SERIAL-DRIVER-PORT<port>-0008-Caps
+
+		COMMAND		caps		iDataBits		BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iDataBits
+		COMMAND		caps		iFifo			BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iFifo
+		COMMAND		caps		iHandshake		BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iHandshake
+		COMMAND		caps		iParity			BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iParity
+		COMMAND		caps		iRate			BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iRate
+		COMMAND		caps		iSIR			BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iSIR
+		COMMAND		caps		iSignals		BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iSignals
+		COMMAND		caps		iStopBits		BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iStopBits
+		COMMAND		caps		iFlowControlCaps	BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iFlowControlCaps
+		COMMAND		caps		iNotificationCaps	BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iNotificationCaps
+		COMMAND		caps		iRoleCaps		BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iRoleCaps
+
+		COMMAND		busDevComm	Close
+		COMMAND		caps		~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0008
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0009
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0009
+//! @SYMAPI			RBusDevComm::Caps(TDes8 {ref})
+//!				TCommCapsV03::TCommCapsV03()
+//!				TCommCapsV03::~TCommCapsV03()
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		11/07/2008
+//! @SYMTestCaseDesc		Get com<port> V3 capabilities and verify default values
+//! @SYMTestActions    		1. Create RBusDevComm and TCommCapsV03 object
+//!				2. Open serial port com<port>
+//!				3. Get V3 capability values
+//!				4. Verify values
+//!				5. Close the port
+//!				6. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	TCommCapsV03 values should have the default startup values
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommCapsV03	caps
+		COMMAND		busDevComm	new
+		COMMAND		caps		new
+		COMMAND		busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Caps			BASE-BSP-SERIAL-DRIVER-PORT<port>-0009-Caps
+
+		COMMAND		caps		iDataBits		BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iDataBits
+		COMMAND		caps		iFifo			BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iFifo
+		COMMAND		caps		iHandshake		BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iHandshake
+		COMMAND		caps		iParity			BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iParity
+		COMMAND		caps		iRate			BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iRate
+		COMMAND		caps		iSIR			BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iSIR
+		COMMAND		caps		iSignals		BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iSignals
+		COMMAND		caps		iStopBits		BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iStopBits
+		COMMAND		caps		iFlowControlCaps	BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iFlowControlCaps
+		COMMAND		caps		iNotificationCaps	BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iNotificationCaps
+		COMMAND		caps		iRoleCaps		BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iRoleCaps
+		COMMAND		caps		iBreakSupported		BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iBreakSupported
+
+		COMMAND		busDevComm	Close
+		COMMAND		caps		~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0009
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0010
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0010
+//! @SYMAPI			RBusDevComm::ResetBuffers()
+//!				RBusDevComm::QueryReceiveBuffer()
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		27/03/2008
+//! @SYMTestCaseDesc		Reset the buffers on com<port>
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Open serial port com<port>
+//!				3. ResetBuffers and verofy that the buffer is empty
+//!				4. Close the port
+//!				5. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Buffers should be reset
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		COMMAND		busDevComm	new
+		COMMAND		busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+
+		COMMAND		busDevComm	ResetBuffers
+		COMMAND		busDevComm	QueryReceiveBuffer	BASE-BSP-SERIAL-DRIVER-PORT<port>-0010-QueryReceiveBuffer_004
+
+		COMMAND		busDevComm	Close
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0010
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0011
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0011
+//! @SYMAPI			RBusDevComm::MinTurnaroundTime()
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		27/03/2008
+//! @SYMTestCaseDesc		Get minimum turnaround time for com<port>
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Open serial port com<port>
+//!				3. MinTurnaroundTime
+//!				4. Close the port
+//!				5. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	MinTurnaroundTime should have its startup value
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		COMMAND		busDevComm	new
+		COMMAND		busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+
+		COMMAND		busDevComm	MinTurnaroundTime	BASE-BSP-SERIAL-DRIVER-PORT<port>-0011-MinTurnaroundTime
+
+		COMMAND		busDevComm	Close
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0011
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0012
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0012
+//! @SYMAPI			RBusDevComm::SetMinTurnaroundTime(TUint)
+//!				RBusDevComm::MinTurnaroundTime()
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		27/03/2008
+//! @SYMTestCaseDesc		Edit the minimum turnaround time for com<port>
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Open serial port com<port> and save startup MinTurnaroundTime
+//!				3. Set MinTurnaroundTime to a new value and get it to verify it
+//!				4. Restore MinTurnaroundTime and Close the port
+//!				5. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	MinTurnaroundTime should have set value
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		COMMAND		busDevComm	new
+		COMMAND		busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	MinTurnaroundTime	BASE-BSP-SERIAL-DRIVER-PORT<port>-0012-MinTurnaroundTime_001
+
+		COMMAND		busDevComm	SetMinTurnaroundTime	BASE-BSP-SERIAL-DRIVER-PORT<port>-0012-SetMinTurnaroundTime_002
+		COMMAND		busDevComm	MinTurnaroundTime	BASE-BSP-SERIAL-DRIVER-PORT<port>-0012-MinTurnaroundTime_003
+
+		COMMAND		busDevComm	SetMinTurnaroundTime
+		COMMAND		busDevComm	Close
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0012
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0013
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0013
+//! @SYMAPI			RBusDevComm::ReceiveBufferLength()
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		27/03/2008
+//! @SYMTestCaseDesc		Get receive buffer length for com<port>
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Open serial port com<port>
+//!				3. ReceiveBufferLength
+//!				4. Close the port
+//!				5. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	ReceiveBufferLength should have its startup value
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		COMMAND		busDevComm	new
+		COMMAND		busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+
+		COMMAND		busDevComm	ReceiveBufferLength	BASE-BSP-SERIAL-DRIVER-PORT<port>-0013-ReceiveBufferLength
+
+		COMMAND		busDevComm	Close
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0013
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0014
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0014
+//! @SYMAPI			RBusDevComm::ReceiveBufferLength()
+//!				RBusDevComm::SetReceiveBufferLength(TInt)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		27/03/2008
+//! @SYMTestCaseDesc		Edit the receive buffer length for com<port>
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Open serial port com<port> and save startup ReceiveBufferLength
+//!				3. Set ReceiveBufferLength to a new value and get it to verify it
+//!				4. Restore ReceiveBufferLength and Close the port
+//!				5. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	ReceiveBufferLength read should be the value set
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		COMMAND		busDevComm	new
+		COMMAND		busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	ReceiveBufferLength	BASE-BSP-SERIAL-DRIVER-PORT<port>-0014-ReceiveBufferLength_001
+
+		COMMAND		busDevComm	SetReceiveBufferLength	BASE-BSP-SERIAL-DRIVER-PORT<port>-0014-SetReceiveBufferLength_002
+		COMMAND		busDevComm	ReceiveBufferLength	BASE-BSP-SERIAL-DRIVER-PORT<port>-0014-ReceiveBufferLength_003
+
+		COMMAND		busDevComm	SetReceiveBufferLength
+		COMMAND		busDevComm	Close
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0014
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0015
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0015
+//! @SYMAPI			RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//!				RBusDevComm::ReadCancel()
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		27/03/2008
+//! @SYMTestCaseDesc		Cancel a read operation on com<port> when specifying the length of the buffer
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Open serial port com<port>
+//!				3. Cancel a read operation from com port specifying the length of the data
+//!				4. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Read operation should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		COMMAND			busDevComm	new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+
+		COMMAND	!AsyncError=-3	busDevComm	Read			BASE-BSP-SERIAL-DRIVER-PORT<port>-0015-Read_002
+		COMMAND			busDevComm	ReadCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Close
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0015
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0016
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0016
+//! @SYMAPI			RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//!				RBusDevComm::ReadCancel()
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		27/03/2008
+//! @SYMTestCaseDesc		Cancel a read operation on com<port> when not specifying the length of the buffer
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Open serial port com<port>
+//!				3. Cancel a read operation from com port specifying the length of the data
+//!				4. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Read operation should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		COMMAND			busDevComm	new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+
+		COMMAND	!AsyncError=-3	busDevComm	Read			BASE-BSP-SERIAL-DRIVER-PORT<port>-0016-Read_002
+		COMMAND			busDevComm	ReadCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Close
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0016
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0017
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0017
+//! @SYMAPI			RBusDevComm::ReadOneOrMore(TRequestStatus {ref}, TDesC8 {ref})
+//!				RBusDevComm::ReadCancel()
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		27/03/2008
+//! @SYMTestCaseDesc		Cancel a read one or more operation on com<port>
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Open serial port com<port>
+//!				3. Cancel a read operation from com port
+//!				4. Destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Read operation should fail with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		COMMAND			busDevComm	new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+
+		COMMAND	!AsyncError=-3	busDevComm	ReadOneOrMore		BASE-BSP-SERIAL-DRIVER-PORT<port>-0017-Read_002
+		COMMAND			busDevComm	ReadCancel
+		OUTSTANDING
+		COMMAND			busDevComm	ResetBuffers
+
+		COMMAND			busDevComm	Close
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0017
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0023
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0023
+//! @SYMAPI			RBusDevComm::Signals()
+//!				RBusDevComm::SetSignals(TUint, TUint)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Clear all signals on com<port> when echo server is closed
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Open serial port com<port> and close echoserver for 2 seconds
+//!				3. Save the current signals
+//!				4. Clear all signals and verify that they are cleared
+//!				5. Restore signals
+//!				6. Wait for echo server to open and destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Signals should be NULL
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		COMMAND		busDevComm	new
+		COMMAND		busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-2SecondDisconnect
+		OUTSTANDING
+		DELAY		1000000
+
+		COMMAND		busDevComm	Signals			BASE-BSP-SERIAL-DRIVER-PORT<port>-0023-Signals_002
+
+		COMMAND		busDevComm	SetSignals		BASE-BSP-SERIAL-DRIVER-PORT<port>-0023-SetSignals_003
+		COMMAND		busDevComm	Signals			BASE-BSP-SERIAL-DRIVER-PORT<port>-0023-Signals_004
+
+		COMMAND		busDevComm	SetSignals		BASE-BSP-SERIAL-DRIVER-PORT<port>-0023-SetSignals_005
+
+		DELAY		1500000
+
+		COMMAND		busDevComm	Close
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0023
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0024
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0024
+//! @SYMAPI			RBusDevComm::Signals()
+//!				RBusDevComm::SetSignals(TUint, TUint)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Set all signals high on com<port> when echo server is closed
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Open serial port com<port> and close echoserver for 2 seconds
+//!				3. Save the current signals
+//!				4. Set all signals and verify that they are set
+//!				5. Restore signals
+//!				6. Wait for echo server to open and destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Signals should be HIGH
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		COMMAND		busDevComm	new
+		COMMAND		busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-2SecondDisconnect
+		OUTSTANDING
+		DELAY		1000000
+
+		COMMAND		busDevComm	Signals			BASE-BSP-SERIAL-DRIVER-PORT<port>-0024-Signals_002
+
+		COMMAND		busDevComm	SetSignals		BASE-BSP-SERIAL-DRIVER-PORT<port>-0024-SetSignals_003
+		COMMAND		busDevComm	Signals			BASE-BSP-SERIAL-DRIVER-PORT<port>-0024-Signals_004
+
+		COMMAND		busDevComm	SetSignals		BASE-BSP-SERIAL-DRIVER-PORT<port>-0024-SetSignals_005
+
+		DELAY		1500000
+
+		COMMAND		busDevComm	Close
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0024
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0025
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0025
+//! @SYMAPI			RBusDevComm::SetSignals(TUint, TUint)
+//!				RBusDevComm::NotifySignalChange(TRequestStatus {ref}, TUint {ref}, TUint)
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Get notification of a signal change on com<port> when echo server is closed
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Open serial port com<port> and close echoserver for 2 seconds
+//!				3. Save the current signals
+//!				4. Set all signals and wait for notification
+//!				5. Restore signals
+//!				6. Wait for echo server to open and destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Notification should complete with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		COMMAND		busDevComm	new
+		COMMAND		busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-2SecondDisconnect
+		OUTSTANDING
+		DELAY		1000000
+
+		COMMAND		busDevComm	Signals			BASE-BSP-SERIAL-DRIVER-PORT<port>-0025-Signals_002
+
+		COMMAND		busDevComm	NotifySignalChange
+		COMMAND		busDevComm	SetSignals		BASE-BSP-SERIAL-DRIVER-PORT<port>-0025-SetSignals_004
+		OUTSTANDING
+
+		COMMAND		busDevComm	SetSignals		BASE-BSP-SERIAL-DRIVER-PORT<port>-0025-SetSignals_005
+
+		DELAY		1500000
+
+		COMMAND		busDevComm	Close
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0025
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0026
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0026
+//! @SYMAPI			RBusDevComm::SetSignals(TUint, TUint)
+//!				RBusDevComm::NotifySignalChange(TRequestStatus {ref}, TUint {ref}, TUint)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Get notification of specified signal changes on com<port> when echo server is closed
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Open serial port com<port> and close echoserver for 2 seconds
+//!				3. Save the current signals
+//!				4. Set all signals and wait for notification using a mask
+//!				5. Restore signals
+//!				6. Wait for echo server to open and destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Notification should complete with no errors
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		COMMAND		busDevComm	new
+		COMMAND		busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-2SecondDisconnect
+		OUTSTANDING
+		DELAY		1000000
+
+		COMMAND		busDevComm	Signals			BASE-BSP-SERIAL-DRIVER-PORT<port>-0026-Signals_002
+		COMMAND		busDevComm	NotifySignalChange	BASE-BSP-SERIAL-DRIVER-PORT<port>-0026-NotifySignalChange_003
+		COMMAND		busDevComm	SetSignals		BASE-BSP-SERIAL-DRIVER-PORT<port>-0026-SetSignals_004
+		OUTSTANDING
+		COMMAND		busDevComm	SetSignals		BASE-BSP-SERIAL-DRIVER-PORT<port>-0026-SetSignals_005
+
+		DELAY		1500000
+
+		COMMAND		busDevComm	Close
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0026
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0027
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0027
+//! @SYMAPI			RBusDevComm::NotifySignalChange(TRequestStatus {ref}, TUint {ref}, TUint)
+//!				RBusDevComm::NotifySignalChangeCancel()
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Cancel notification of specified signal changes on com<port> when echo server is closed
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Open serial port com<port> and close echoserver for 2 seconds
+//!				3. Cancel a notification for signal change
+//!				4. Wait for echo server to open and destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Notification should complete with error KErrCancel (-3)
+//! @SYMTestType		CIT
+	START_TEST_BLOCK		10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT		RBusDevComm	busDevComm
+		COMMAND			busDevComm	new
+		COMMAND			busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND			busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-2SecondDisconnect
+		OUTSTANDING
+		DELAY			1000000
+
+		COMMAND			busDevComm	NotifySignalChange
+		OUTSTANDING
+		COMMAND !AsyncError=-3	busDevComm	NotifySignalChange	BASE-BSP-SERIAL-DRIVER-PORT<port>-0027-NotifySignalChange_003
+		COMMAND			busDevComm	NotifySignalChangeCancel
+		OUTSTANDING
+
+		DELAY			1500000
+
+		COMMAND			busDevComm	Close
+		COMMAND			busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0027
+
+
+START_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0028
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-PORT<port>-0028
+//! @SYMAPI			RBusDevComm::Signals()
+//!				RBusDevComm::SetSignals(TUint, TUint)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		25/06/2008
+//! @SYMTestCaseDesc		Test individual signals on com<port> when echo server is closed
+//! @SYMTestActions    		1. Create RBusDevComm object
+//!				2. Open serial port com<port> and close echoserver for 2 seconds
+//!				3. Save the current signals
+//!				4. Set and verify individual signals 0x0010, 0x0020, 0x0040, 0x0080
+//!				4. Clear all signals
+//!				5. Restore signals
+//!				6. Wait for echo server to open and destroy the objects
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults  	Signals should be HIGH
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	10		t_serial		\base\serial\base-bsp-serial-driver-PORT<port>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		COMMAND		busDevComm	new
+		COMMAND		busDevComm	Open			BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Write			BASE-BSP-SERIAL-DRIVER-ECHO-Write-2SecondDisconnect
+		OUTSTANDING
+		DELAY		1000000
+
+		COMMAND		busDevComm	Signals			BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-Signals_002
+
+		COMMAND		busDevComm	SetSignals		BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-SetSignals_003
+		COMMAND		busDevComm	Signals			BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-Signals_004
+		COMMAND		busDevComm	SetSignals		BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-SetSignals_005
+		COMMAND		busDevComm	Signals			BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-Signals_006
+		COMMAND		busDevComm	SetSignals		BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-SetSignals_007
+		COMMAND		busDevComm	Signals			BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-Signals_008
+		COMMAND		busDevComm	SetSignals		BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-SetSignals_009
+		COMMAND		busDevComm	Signals			BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-Signals_010
+
+		COMMAND		busDevComm	SetSignals		BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-SetSignals_011
+
+		DELAY		1500000
+
+		COMMAND		busDevComm	Close
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE 			BASE-BSP-SERIAL-DRIVER-PORT<port>-0028
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/scripts/base-bsp-serial-driver-stress.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1738 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//! @file
+//! @SYMTestSuiteName		base-bsp-serial-driver-stress_PORT<port>-<baud>
+//! @SYMScriptTestEnvironment	This test script requires a base port ROM
+
+/////////////////////////////////////////////////////////////////////
+// base-bsp-serial-driver-stress-PORT<port>-<baud>.script
+//
+//
+// Tests elements of the RBusDevComm
+// as a means of confidence that the HAI APIs work as expected.
+//
+// Tests are validated through environment settings found in the file t_serial.ini
+//
+// The purpose is to provide a regression test suite of publishedPartner APIs for RBusDevComm.
+// Negative testing is performed to confirm that correct errors are returned when incorrect parameters are given.
+// The tests are fully automated.
+/////////////////////////////////////////////////////////////////////
+
+LOAD_SUITE	t_serial
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_none_rtscts-2001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_none_rtscts-2001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_none_rtscts-2001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_none_rtscts-2002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_none_rtscts-2002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_none_rtscts-2002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_none_rtscts-2001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_none_rtscts-2001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_none_rtscts-2001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_none_rtscts-2002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_none_rtscts-2002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_none_rtscts-2002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_even_rtscts-2001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_even_rtscts-2001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_even_rtscts-2001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_even_rtscts-2002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_even_rtscts-2002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_even_rtscts-2002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_even_rtscts-2001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_even_rtscts-2001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_even_rtscts-2001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_even_rtscts-2002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_even_rtscts-2002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_even_rtscts-2002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_odd_rtscts-2001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_odd_rtscts-2001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_odd_rtscts-2001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_odd_rtscts-2002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_odd_rtscts-2002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_odd_rtscts-2002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_odd_rtscts-2001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_odd_rtscts-2001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_odd_rtscts-2001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_odd_rtscts-2002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_odd_rtscts-2002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= rtscts
+//!				3. Send data to com port specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-rtscts-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_odd_rtscts-2002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_none_xonxoff-2001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_none_xonxoff-2001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_none_xonxoff-2001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_none_xonxoff-2002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_none_xonxoff-2002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_none_xonxoff-2002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_none_xonxoff-2001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_none_xonxoff-2001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_none_xonxoff-2001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_none_xonxoff-2002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_none_xonxoff-2002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= none
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityNone
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_none_xonxoff-2002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_even_xonxoff-2001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_even_xonxoff-2001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_even_xonxoff-2001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_even_xonxoff-2002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_even_xonxoff-2002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_even_xonxoff-2002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_even_xonxoff-2001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_even_xonxoff-2001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_even_xonxoff-2001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_even_xonxoff-2002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_even_xonxoff-2002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= even
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityEven
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_even_xonxoff-2002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_odd_xonxoff-2001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_odd_xonxoff-2001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_odd_xonxoff-2001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_odd_xonxoff-2002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_odd_xonxoff-2002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop1
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_1_odd_xonxoff-2002
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_odd_xonxoff-2001
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_odd_xonxoff-2001
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref});
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref})
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port without specifying the length of the data
+//!				4. Read data from com port without specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_odd_xonxoff-2001
+
+
+START_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_odd_xonxoff-2002
+//! @SYMTestCaseID		BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_odd_xonxoff-2002
+//! @SYMAPI			RBusDevComm::Write(TRequestStatus {ref}, const TDesC8 {ref}, TInt);
+//!				RBusDevComm::Read(TRequestStatus {ref}, TDesC8 {ref}, TInt)
+//! @SYMAuthor			Louis Henry Nayegon
+//! @SYMCreationDate		10/04/2008
+//! @SYMTestCaseDesc		Echo large amount of data read from a file to/from the Serial Echo Server
+//! @SYMTestActions		1. Create RBusDevComm object, save original configuration and configure to echo server startup settings
+//!					port		= com<port>
+//!					baud rate	= 9600
+//!					data bits	= 8
+//!					stop bits	= 1
+//!					parity		= none
+//!					flow control	= none
+//!				2. Change configuration
+//!					baud rate	= <baud>
+//!					data bits	= 8
+//!					stop bits	= 2
+//!					parity		= odd
+//!					flow control	= xonxoff
+//!				3. Send data to com port specifying the length of the data
+//!				4. Read data from com port specifying the length of the data
+//!				5. Restore configuration
+//!				6. Destroy the object
+//! @SYMTestStatus		Implemented
+//! @SYMTestPriority		High
+//! @SYMTestExpectedResults	Data read should be as expected
+//! @SYMTestType		CIT
+	START_TEST_BLOCK	60		t_serial			\base\serial\base-bsp-serial-driver-stress-PORT<port>-<baud>.ini
+		CREATE_OBJECT	RBusDevComm	busDevComm
+		CREATE_OBJECT	TCommConfigV01	configSave
+		CREATE_OBJECT	TCommConfigV01	config
+		COMMAND		busDevComm	new
+		COMMAND		configSave	new
+		COMMAND		config		new
+		COMMAND		busDevComm	Open				BASE-BSP-SERIAL-DRIVER-PORT<port>-Open
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Config				BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-ECHO-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-ECHO-iParity
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-xonxoff-Write_config
+		OUTSTANDING
+		COMMAND		config		iRate				BASE-BSP-SERIAL-DRIVER-iRate
+		COMMAND		config		iDataBits			BASE-BSP-SERIAL-DRIVER-EData8
+		COMMAND		config		iStopBits			BASE-BSP-SERIAL-DRIVER-EStop2
+		COMMAND		config		iParity				BASE-BSP-SERIAL-DRIVER-EParityOdd
+		COMMAND		config		iHandshake			BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-Config
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-ECHO-Read_config
+		OUTSTANDING
+
+		COMMAND		busDevComm	Read				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Read
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Write
+		OUTSTANDING
+
+		COMMAND		busDevComm	Write				BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset
+		OUTSTANDING
+		COMMAND		busDevComm	SetConfig			BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave
+		COMMAND		busDevComm	Close
+		COMMAND		config		~
+		COMMAND		configSave	~
+		COMMAND		busDevComm	~
+	END_TEST_BLOCK
+END_TESTCASE			BASE-BSP-SERIAL-DRIVER-STRESS_PORT<port>_<baud>_8_2_odd_xonxoff-2002
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/scripts/base-bsp-serial-driver.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,25 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+RUN_SCRIPT	z:\base\serial\base-bsp-serial-driver-PORT0.script
+// RUN_SCRIPT	z:\base\serial\base-bsp-serial-driver-PORT0-2400.script
+// RUN_SCRIPT	z:\base\serial\base-bsp-serial-driver-PORT0-4800.script
+RUN_SCRIPT	z:\base\serial\base-bsp-serial-driver-PORT0-9600.script
+RUN_SCRIPT	z:\base\serial\base-bsp-serial-driver-PORT0-115200.script
+// RUN_SCRIPT	z:\base\serial\base-bsp-serial-driver-stress-PORT0-2400.script
+// RUN_SCRIPT	z:\base\serial\base-bsp-serial-driver-stress-PORT0-4800.script
+RUN_SCRIPT	z:\base\serial\base-bsp-serial-driver-stress-PORT0-9600.script
+RUN_SCRIPT	z:\base\serial\base-bsp-serial-driver-stress-PORT0-115200.script
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/src/T_SerialDriverServer.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,132 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_SerialDriverServer.h"
+#include "T_RBusDevCommData.h"
+#include "T_TCommCapsV03Data.h"
+#include "T_TCommConfigV02Data.h"
+
+/*@{*/
+_LIT(KT_RBusDevComm,		"RBusDevComm");
+_LIT(KT_TCommCapsV01,		"TCommCapsV01");
+_LIT(KT_TCommCapsV02,		"TCommCapsV02");
+_LIT(KT_TCommCapsV03,		"TCommCapsV03");
+_LIT(KT_TCommConfigV01,		"TCommConfigV01");
+_LIT(KT_TCommConfigV02,		"TCommConfigV02");
+/*@}*/
+
+CT_SerialDriverServer* CT_SerialDriverServer::NewL()
+/**
+ * @return - Instance of the test server
+ * Same code for Secure and non-secure variants
+ * Called inside the MainL() function to create and start the
+ * CTestServer derived server.
+ */
+	{
+    CT_SerialDriverServer* server = new (ELeave) CT_SerialDriverServer();
+    CleanupStack::PushL(server);
+    server->ConstructL();
+    CleanupStack::Pop(server);
+    return server;
+    }
+
+
+LOCAL_C void MainL()
+/**
+ * Secure variant
+ * Much simpler, uses the new Rendezvous() call to sync with the client
+ */
+	{
+#if (defined __DATA_CAGING__)
+    RProcess().DataCaging(RProcess::EDataCagingOn);
+    RProcess().SecureApi(RProcess::ESecureApiOn);
+#endif
+    CActiveScheduler*	sched=NULL;
+    sched=new(ELeave) CActiveScheduler;
+    CActiveScheduler::Install(sched);
+    CT_SerialDriverServer* server = NULL;
+
+    // Create the CTestServer derived server
+    TRAPD(err,server = CT_SerialDriverServer::NewL());
+    if(!err)
+	    {
+        // Sync with the client and enter the active scheduler
+        RProcess::Rendezvous(KErrNone);
+        sched->Start();
+        }
+
+    delete server;
+    delete sched;
+    }
+
+
+GLDEF_C TInt E32Main()
+/**
+ * @return - Standard Epoc error code on process exit
+ * Secure variant only
+ * Process entry point. Called by client using RProcess API
+ */
+	{
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    if(cleanup == NULL)
+	    {
+        return KErrNoMemory;
+        }
+
+#if (defined TRAP_IGNORE)
+	TRAP_IGNORE(MainL());
+#else
+    TRAPD(err,MainL());
+#endif
+
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
+
+CDataWrapper* CT_SerialDriverServer::CT_SerialDriverBlock::CreateDataL(const TDesC& aData)
+	{
+	CDataWrapper*	wrapper=NULL;
+
+	if( aData==KT_RBusDevComm() )
+		{
+		wrapper=CT_RBusDevCommData::NewL();
+		}
+	else if ( aData==KT_TCommCapsV01 )
+		{
+		wrapper=new (ELeave) CT_TCommCapsV01Data();
+		}
+	else if ( aData==KT_TCommCapsV02 )
+		{
+		wrapper=new (ELeave) CT_TCommCapsV02Data();
+		}
+	else if ( aData==KT_TCommCapsV03 )
+		{
+		wrapper=new (ELeave) CT_TCommCapsV03Data();
+		}
+	else if ( aData==KT_TCommConfigV01 )
+		{
+		wrapper=new (ELeave) CT_TCommConfigV01Data();
+		}
+	else if ( aData==KT_TCommConfigV02 )
+		{
+		wrapper=new (ELeave) CT_TCommConfigV02Data();
+		}
+
+	return wrapper;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/testdata/base-bsp-serial-driver-baud.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,585 @@
+[include]
+file1			=\base\serial\t_serial.ini
+file2			=\base\serial\t_echoserver.ini
+
+[busDevComm]
+name			=busDevComm
+
+[config]
+name			=config
+
+[configSave]
+name			=configSave
+
+[caps]
+name			=caps
+
+
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-Open]
+unit			={Port<port>,unit}
+portpdd			={Port<port>,pdd}
+portldd			={Port<port>,ldd}
+
+
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=none,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=none,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=even,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=even,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=odd,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=odd,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=none,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=none,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=even,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=even,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=odd,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=odd,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=none,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=none,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=even,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=even,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=odd,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=odd,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-none-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=none,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-none-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=none,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-even-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=even,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-even-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=even,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-odd-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=odd,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-odd-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=odd,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-none-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=none,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-none-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=none,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-even-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=even,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-even-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=even,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-odd-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=odd,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-odd-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=odd,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-none-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=none,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-none-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=none,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-even-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=even,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-even-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=even,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-odd-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=odd,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-odd-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=odd,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-none-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=none,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-none-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=none,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-even-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=even,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-even-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=even,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-odd-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=odd,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-odd-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=odd,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-none-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=none,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-none-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=none,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-even-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=even,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-even-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=even,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-odd-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=odd,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-odd-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=odd,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-none-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=none,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-none-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=none,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-even-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=even,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-even-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=even,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-odd-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=odd,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-odd-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=odd,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-none-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=none,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-none-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=none,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-even-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=even,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-even-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=even,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-odd-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=odd,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-odd-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=odd,flow_control=none,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-none-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=none,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-none-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=none,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-even-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=even,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-even-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=even,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-odd-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=odd,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-odd-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=odd,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-none-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=none,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-none-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=none,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-even-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=even,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-even-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=even,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-odd-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=odd,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-odd-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=odd,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-iRate]
+value			=EBps<baud>
+
+
+
+[BASE-BSP-SERIAL-DRIVER-8-1001-Write]
+uselength		=FALSE
+data			=DataToWrite1001
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-8-1001-Read]
+uselength		=TRUE
+expected		=DataToWrite1001
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-8-1002-Write]
+uselength		=TRUE
+data			=DataToWrite1002
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-8-1002-NotifyReceiveDataAvailable]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-8-1002-QueryReceiveBuffer]
+is_empty		=FALSE
+
+[BASE-BSP-SERIAL-DRIVER-8-1002-Read]
+uselength		=TRUE
+expected		=DataToWrite1002
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-8-1003-Write]
+uselength		=FALSE
+data			=DataToWrite-1003
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-8-1003-Read]
+uselength		=FALSE
+expected		=DataToWrite-1003
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-8-1004-Write]
+uselength		=TRUE
+data			=DataToWrite-1004
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-8-1004-NotifyReceiveDataAvailable]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-8-1004-Read]
+uselength		=FALSE
+expected		=DataToWrite-1004
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-8-1005-Write]
+uselength		=FALSE
+data			=DataToWrite-1005
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-8-1005-ReadOneOrMore]
+expected		=DataToWrite-1005
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-8-1006-Write]
+uselength		=FALSE
+data			=DataToWrite-1006
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-8-1006-NotifyReceiveDataAvailable]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-8-1006-QueryReceiveBuffer]
+is_empty		=FALSE
+
+[BASE-BSP-SERIAL-DRIVER-8-1006-ReadOneOrMore]
+expected		=DataToWrite-1006
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-8-1007-Write]
+uselength		=FALSE
+data			=\x00\x00
+repeat			=10000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-8-1008-Break]
+time			=3000000
+
+[BASE-BSP-SERIAL-DRIVER-8-1008-Read]
+uselength		=TRUE
+bufferlength		=1
+
+
+
+[BASE-BSP-SERIAL-DRIVER-8-1009-Break]
+time			=3000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-7-1001-Write]
+uselength		=FALSE
+data			=DataToWrite1001
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-7-1001-Read]
+uselength		=TRUE
+expected		=DataToWrite1001
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-7-1002-Write]
+uselength		=TRUE
+data			=DataToWrite1002
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-7-1002-NotifyReceiveDataAvailable]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-7-1002-Read]
+uselength		=TRUE
+expected		=DataToWrite1002
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-7-1003-Write]
+uselength		=FALSE
+data			=DataToWrite-1003
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-7-1003-Read]
+uselength		=FALSE
+expected		=DataToWrite-1003
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-7-1004-Write]
+uselength		=TRUE
+data			=DataToWrite-1004
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-7-1004-NotifyReceiveDataAvailable]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-7-1004-Read]
+uselength		=FALSE
+expected		=DataToWrite-1004
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-6-1001-Write]
+uselength		=FALSE
+data			=0123456789!1001
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-6-1001-Read]
+uselength		=TRUE
+expected		=0123456789!1001
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-6-1002-Write]
+uselength		=TRUE
+data			=0123456789!1002
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-6-1002-NotifyReceiveDataAvailable]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-6-1002-Read]
+uselength		=TRUE
+expected		=0123456789!1002
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-6-1003-Write]
+uselength		=FALSE
+data			=0123456789!-1003
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-6-1003-Read]
+uselength		=FALSE
+expected		=0123456789!-1003
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-6-1004-Write]
+uselength		=TRUE
+data			=0123456789!-1004
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-6-1004-NotifyReceiveDataAvailable]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-6-1004-Read]
+uselength		=FALSE
+expected		=0123456789!-1004
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-5-1001-Write]
+uselength		=FALSE
+data			=\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-5-1001-Read]
+uselength		=TRUE
+expected		=\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-5-1002-Write]
+uselength		=TRUE
+data			=\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-5-1002-NotifyReceiveDataAvailable]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-5-1002-Read]
+uselength		=TRUE
+expected		=\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-5-1003-Write]
+uselength		=FALSE
+data			=\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-5-1-none-none-1003-Read]
+uselength		=FALSE
+expected		=\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e
+timeout			=2000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-5-1004-Write]
+uselength		=TRUE
+data			=\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-5-1004-NotifyReceiveDataAvailable]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-5-1004-Read]
+uselength		=FALSE
+expected		=\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e\x10\x1e
+timeout			=2000000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/testdata/base-bsp-serial-driver-port.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,235 @@
+[include]
+file1			=\base\serial\t_serial.ini
+file2			=\base\serial\t_echoserver.ini
+
+[busDevComm]
+name			=busDevComm
+
+[config]
+name			=config
+
+[caps]
+name			=caps
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-Open]
+unit			={Port<port>,unit}
+portpdd			={Port<port>,pdd}
+portldd			={Port<port>,ldd}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iDataBits]
+expected		={Port<port>Caps,iDataBits}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iFifo]
+expected		={Port<port>Caps,iFifo}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iHandshake]
+expected		={Port<port>Caps,iHandshake}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iParity]
+expected		={Port<port>Caps,iParity}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iRate]
+expected		={Port<port>Caps,iRate}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iSIR]
+expected		={Port<port>Caps,iSIR}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iSignals]
+expected		={Port<port>Caps,iSignals}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iStopBits]
+expected		={Port<port>Caps,iStopBits}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iFlowControlCaps]
+expected		={Port<port>Caps,iFlowControlCaps}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iNotificationCaps]
+expected		={Port<port>Caps,iNotificationCaps}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iRoleCaps]
+expected		={Port<port>Caps,iRoleCaps}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-Caps-iBreakSupported]
+expected		={Port<port>Caps,iBreakSupported}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0002]
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0004-QueryReceiveBuffer_003]
+expected		=0
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-Config]
+config			=config
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iDataBits]
+expected		={Port<port>Config,iDataBits}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iFifo]
+expected		={Port<port>Config,iFifo}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iHandshake]
+expected		={Port<port>Config,iHandshake}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iParity]
+expected		={Port<port>Config,iParity}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iParityError]
+expected		={Port<port>Config,iParityError}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iParityErrorChar]
+expected		={Port<port>Config,iParityErrorChar}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iRate]
+expected		={Port<port>Config,iRate}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iSIREnable]
+expected		={Port<port>Config,iSIREnable}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iSIRSettings]
+expected		={Port<port>Config,iSIRSettings}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iSpecialRate]
+expected		={Port<port>Config,iSpecialRate}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iStopBits]
+expected		={Port<port>Config,iStopBits}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iTerminator]
+expected0		={Port<port>Config,iTerminator0}
+expected1		={Port<port>Config,iTerminator1}
+expected2		={Port<port>Config,iTerminator2}
+expected3		={Port<port>Config,iTerminator3}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iTerminatorCount]
+expected		={Port<port>Config,iTerminatorCount}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iXoffChar]
+expected		={Port<port>Config,iXoffChar}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0006-iXonChar]
+expected		={Port<port>Config,iXonChar}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0007-Caps]
+caps			=caps
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0008-Caps]
+caps			=caps
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0009-Caps]
+caps			=caps
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0010-QueryReceiveBuffer_004]
+expected		=0
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0011-MinTurnaroundTime]
+expected		={Port<port>,minTurnaroundTime}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0012-MinTurnaroundTime_001]
+save			=TRUE
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0012-SetMinTurnaroundTime_002]
+value			=100
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0012-MinTurnaroundTime_003]
+expected		=100
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0013-ReceiveBufferLength]
+expected		={Port<port>,receiveBufferLength}
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0014-ReceiveBufferLength_001]
+save			=TRUE
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0014-SetReceiveBufferLength_002]
+value			=32
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0014-ReceiveBufferLength_003]
+expected		=32
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0015-Read_002]
+uselength		=TRUE
+bufferlength		=20
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0016-Read_002]
+bufferlength		=20
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0017-Read_002]
+bufferlength		=20
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0023-Signals_002]
+save			=TRUE
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0023-SetSignals_003]
+setmask			=0000
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0023-Signals_004]
+expected		=0
+save			=FALSE
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0023-SetSignals_005]
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0024-Signals_002]
+save			=TRUE
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0024-SetSignals_003]
+setmask			=FFFF
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0024-Signals_004]
+expected		=FFF0
+save			=FALSE
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0024-SetSignals_005]
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0025-Signals_002]
+save			=TRUE
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0025-SetSignals_004]
+setmask			=FFFF
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0025-SetSignals_005]
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0026-Signals_002]
+save			=TRUE
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0026-NotifySignalChange_003]
+mask			=FFFF
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0026-SetSignals_004]
+setmask			=FFFF
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0026-SetSignals_005]
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0027-NotifySignalChange_003]
+timeout			=2000000
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-Signals_002]
+save			=TRUE
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-SetSignals_003]
+setmask			=0010
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-Signals_004]
+expected		=0010
+save			=FALSE
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-SetSignals_005]
+setmask			=0020
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-Signals_006]
+expected		=0020
+save			=FALSE
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-SetSignals_007]
+setmask			=0040
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-Signals_008]
+expected		=0040
+save			=FALSE
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-SetSignals_009]
+setmask			=0080
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-Signals_010]
+expected		=0080
+save			=FALSE
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-0028-SetSignals_011]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/testdata/base-bsp-serial-driver-stress.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,269 @@
+[include]
+file1			=\base\serial\t_serial.ini
+file2			=\base\serial\t_echoserver.ini
+
+[busDevComm]
+name			=busDevComm
+
+[config]
+name			=config
+
+[configSave]
+name			=configSave
+
+[caps]
+name			=caps
+
+
+
+[BASE-BSP-SERIAL-DRIVER-PORT<port>-Open]
+unit			={Port<port>,unit}
+portpdd			={Port<port>,pdd}
+portldd			={Port<port>,ldd}
+
+
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=none,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=none,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=even,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=even,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=odd,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=odd,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=none,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=none,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=even,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=even,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=odd,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=odd,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-none-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=none,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-none-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=none,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-even-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=even,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-even-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=even,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-1-odd-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=1,parity=odd,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-8-2-odd-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=8,stop_bits=2,parity=odd,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-none-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=none,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-none-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=none,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-even-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=even,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-even-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=even,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-odd-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=odd,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-odd-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=odd,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-none-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=none,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-none-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=none,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-even-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=even,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-even-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=even,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-odd-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=odd,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-odd-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=odd,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-none-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=none,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-none-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=none,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-even-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=even,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-even-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=even,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-1-odd-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=1,parity=odd,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-7-2-odd-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=7,stop_bits=2,parity=odd,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-none-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=none,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-none-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=none,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-even-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=even,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-even-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=even,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-odd-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=odd,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-odd-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=odd,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-none-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=none,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-none-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=none,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-even-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=even,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-even-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=even,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-odd-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=odd,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-odd-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=odd,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-none-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=none,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-none-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=none,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-even-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=even,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-even-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=even,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-1-odd-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=1,parity=odd,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-6-2-odd-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=6,stop_bits=2,parity=odd,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-none-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=none,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-none-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=none,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-even-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=even,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-even-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=even,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-odd-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=odd,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-odd-none-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=odd,flow_control=none,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-none-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=none,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-none-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=none,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-even-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=even,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-even-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=even,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-odd-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=odd,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-odd-rtscts-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=odd,flow_control=rtscts,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-none-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=none,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-none-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=none,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-even-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=even,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-even-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=even,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-1-odd-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=1,parity=odd,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-<baud>-5-2-odd-xonxoff-Write_config]
+data			=[baud_rate=<baud>,data_bits=5,stop_bits=2,parity=odd,flow_control=xonxoff,delay={Port<port>,configDelay},echo=!]
+
+
+
+[BASE-BSP-SERIAL-DRIVER-iRate]
+value			=EBps<baud>
+
+
+
+[BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Read]
+uselength		=FALSE
+expected_file		=\base\serial\stress\stress8bits.txt
+timeout			=30000000
+
+[BASE-BSP-SERIAL-DRIVER-STRESS-8-2001-Write]
+uselength		=FALSE
+file			=\base\serial\stress\stress8bits.txt
+timeout			=30000000
+
+
+
+[BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Read]
+uselength		=TRUE
+expected_file		=\base\serial\stress\stress8bits.txt
+timeout			=30000000
+
+[BASE-BSP-SERIAL-DRIVER-STRESS-8-2002-Write]
+uselength		=TRUE
+file			=\base\serial\stress\stress8bits.txt
+timeout			=30000000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/testdata/devlon52/armv5/t_serial.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,41 @@
+[Port0]
+unit			=3
+pdd			=EUART
+ldd			=ECOMM
+minTurnaroundTime	=0
+receiveBufferLength	=1024
+configDelay		=2500
+
+[Port0Caps]
+iDataBits		=KCapsData5|KCapsData6|KCapsData7|KCapsData8
+iFifo			=KCapsHasFifo
+iHandshake		=KCapsFreeDTRSupported|KCapsFreeRTSSupported|KCapsFailDCDSupported|KCapsFailDSRSupported|KCapsObeyDSRSupported|KCapsFailCTSSupported|KCapsObeyCTSSupported|KCapsSendXoffSupported|KCapsObeyXoffSupported
+iParity			=KCapsParityNone|KCapsParityEven|KCapsParityOdd
+iRate			=KCapsBps75|KCapsBps110|KCapsBps134|KCapsBps150|KCapsBps300|KCapsBps600|KCapsBps1200|KCapsBps1800|KCapsBps2400|KCapsBps4800|KCapsBps7200|KCapsBps9600|KCapsBps19200|KCapsBps38400|KCapsBps57600|KCapsBps115200
+iSIR			=0
+iSignals		=KCapsSignalCTSSupported|KCapsSignalDSRSupported|KCapsSignalDCDSupported|KCapsSignalRNGSupported|KCapsSignalRTSSupported|KCapsSignalDTRSupported
+iStopBits		=KCapsStop1|KCapsStop2
+iFlowControlCaps	=0
+iNotificationCaps	=KNotifySignalsChangeSupported|KNotifyDataAvailableSupported
+iRoleCaps		=0
+iBreakSupported		=TRUE
+
+[Port0Config]
+iDataBits		=EData8
+iFifo			=EFifoEnable
+iHandshake		=0
+iParity			=EParityNone
+iParityError		=KConfigParityErrorFail
+iParityErrorChar	=0x00
+iRate			=EBps9600
+iSIREnable		=ESIRDisable
+iSIRSettings		=0
+iSpecialRate		=0
+iStopBits		=EStop1
+iTerminator0		=0x00
+iTerminator1		=0x00
+iTerminator2		=0x00
+iTerminator3		=0x00
+iTerminatorCount	=0
+iXoffChar		=0x13
+iXonChar		=0x11
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/testdata/devlon52/armv5/t_serial.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1 @@
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/testdata/devlon52/armv5/t_serialdevice.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,20 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_SERIAL_DEVICE_IBY__)
+#define __T_SERIAL_DEVICE_IBY__
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/testdata/h4hrp/armv5/t_serial.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,41 @@
+[Port0]
+unit			=0
+pdd			=EUART
+ldd			=ECOMM
+minTurnaroundTime	=0
+receiveBufferLength	=2048
+configDelay		=2500
+
+[Port0Caps]
+iDataBits		=KCapsData5|KCapsData6|KCapsData7|KCapsData8
+iFifo			=KCapsHasFifo
+iHandshake		=KCapsFreeRTSSupported|KCapsFailCTSSupported|KCapsObeyCTSSupported|KCapsSendXoffSupported|KCapsObeyXoffSupported
+iParity			=KCapsParityNone|KCapsParityEven|KCapsParityOdd
+iRate			=KCapsBps50|KCapsBps75|KCapsBps110|KCapsBps134|KCapsBps150|KCapsBps300|KCapsBps600|KCapsBps1200|KCapsBps1800|KCapsBps2000|KCapsBps2400|KCapsBps3600|KCapsBps4800|KCapsBps7200|KCapsBps9600|KCapsBps19200|KCapsBps38400|KCapsBps57600|KCapsBps115200|KCapsBps230400|KCapsBps460800|KCapsBps921600|KCapsBpsSpecial
+iSIR			=0
+iSignals		=KCapsSignalRTSSupported|KCapsSignalCTSSupported
+iStopBits		=KCapsStop1|KCapsStop2
+iFlowControlCaps	=0
+iNotificationCaps	=KNotifySignalsChangeSupported|KNotifyDataAvailableSupported
+iRoleCaps		=0
+iBreakSupported		=TRUE
+
+[Port0Config]
+iDataBits		=EData8
+iFifo			=EFifoEnable
+iHandshake		=0
+iParity			=EParityNone
+iParityError		=KConfigParityErrorFail
+iParityErrorChar	=0x00
+iRate			=EBps9600
+iSIREnable		=ESIRDisable
+iSIRSettings		=0
+iSpecialRate		=0
+iStopBits		=EStop1
+iTerminator0		=0x00
+iTerminator1		=0x00
+iTerminator2		=0x00
+iTerminator3		=0x00
+iTerminatorCount	=0
+iXoffChar		=0x13
+iXonChar		=0x11
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/testdata/h4hrp/armv5/t_serial.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1 @@
+BASE-BSP-SERIAL-DRIVER-PORT0-0008:BASE-BSP-SERIAL-DRIVER-PORT0-0009
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/testdata/h4hrp/armv5/t_serialdevice.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,20 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_SERIAL_DEVICE_IBY__)
+#define __T_SERIAL_DEVICE_IBY__
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/testdata/h6hrp/armv5/t_serial.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,41 @@
+[Port0]
+unit			=3
+pdd			=EUART
+ldd			=ECOMM
+minTurnaroundTime	=0
+receiveBufferLength	=2048
+configDelay		=2500
+
+[Port0Caps]
+iDataBits		=KCapsData5|KCapsData6|KCapsData7|KCapsData8
+iFifo			=KCapsHasFifo
+iHandshake		=KCapsFreeRTSSupported|KCapsFreeDTRSupported|KCapsFailCTSSupported|KCapsObeyCTSSupported|KCapsSendXoffSupported|KCapsObeyXoffSupported|KCapsObeyDSRSupported|KCapsFailDSRSupported|KCapsObeyDCDSupported|KCapsFailDCDSupported
+iParity			=KCapsParityNone|KCapsParityEven|KCapsParityOdd|KCapsParityMark|KCapsParitySpace
+iRate			=KCapsBps110|KCapsBps150|KCapsBps300|KCapsBps600|KCapsBps1200|KCapsBps2400|KCapsBps4800|KCapsBps9600|KCapsBps19200|KCapsBps38400|KCapsBps57600|KCapsBps115200
+iSIR			=0
+iSignals		=KCapsSignalRTSSupported|KCapsSignalDTRSupported|KCapsSignalCTSSupported|KCapsSignalDSRSupported|KCapsSignalDCDSupported|KCapsSignalRNGSupported
+iStopBits		=KCapsStop1|KCapsStop2
+iFlowControlCaps	=0
+iNotificationCaps	=KNotifySignalsChangeSupported|KNotifyDataAvailableSupported
+iRoleCaps		=0
+iBreakSupported		=TRUE
+
+[Port0Config]
+iDataBits		=EData8
+iFifo			=EFifoEnable
+iHandshake		=0
+iParity			=EParityNone
+iParityError		=KConfigParityErrorFail
+iParityErrorChar	=0x00
+iRate			=EBps9600
+iSIREnable		=ESIRDisable
+iSIRSettings		=0
+iSpecialRate		=0
+iStopBits		=EStop1
+iTerminator0		=0x00
+iTerminator1		=0x00
+iTerminator2		=0x00
+iTerminator3		=0x00
+iTerminatorCount	=0
+iXoffChar		=0x13
+iXonChar		=0x11
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/testdata/h6hrp/armv5/t_serial.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1 @@
+BASE-BSP-SERIAL-DRIVER-PORT0-0008:BASE-BSP-SERIAL-DRIVER-PORT0-0009
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/testdata/h6hrp/armv5/t_serialdevice.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,20 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_SERIAL_DEVICE_IBY__)
+#define __T_SERIAL_DEVICE_IBY__
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/uart/testdata/t_echoserver.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,89 @@
+[BASE-BSP-SERIAL-DRIVER-EData8]
+value			=EData8
+
+[BASE-BSP-SERIAL-DRIVER-EData7]
+value			=EData7
+
+[BASE-BSP-SERIAL-DRIVER-EData6]
+value			=EData6
+
+[BASE-BSP-SERIAL-DRIVER-EData5]
+value			=EData5
+
+
+
+[BASE-BSP-SERIAL-DRIVER-EStop1]
+value			=EStop1
+
+[BASE-BSP-SERIAL-DRIVER-EStop2]
+value			=EStop2
+
+
+
+[BASE-BSP-SERIAL-DRIVER-EParityNone]
+value			=EParityNone
+
+[BASE-BSP-SERIAL-DRIVER-EParityEven]
+value			=EParityEven
+
+[BASE-BSP-SERIAL-DRIVER-EParityOdd]
+value			=EParityOdd
+
+[BASE-BSP-SERIAL-DRIVER-EParityMark]
+value			=EParityMark
+
+[BASE-BSP-SERIAL-DRIVER-EParitySpace]
+value			=EParitySpace
+
+
+
+[BASE-BSP-SERIAL-DRIVER-HandshakeNone]
+value			=0
+
+[BASE-BSP-SERIAL-DRIVER-HandshakeRtsCts]
+value			=KConfigObeyCTS|KConfigObeyDTR
+
+[BASE-BSP-SERIAL-DRIVER-HandshakeXonXoff]
+value			=KConfigObeyXoff
+
+
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-ConfigSave]
+config			=configSave
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-Config]
+config			=config
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-iRate]
+value			=EBps9600
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-iDataBits]
+value			=EData8
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-iStopBits]
+value			=EStop1
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-iParity]
+value			=EParityNone
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-iHandshake]
+value			=0
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-Write-Reset]
+data			=\x03
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-Write-ClearBI]
+data			=\x01
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-Write-QueryBI]
+data			=\x02
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-Write-2SecondDisconnect]
+data			=[disconnect=2000]
+
+
+
+[BASE-BSP-SERIAL-DRIVER-ECHO-Read_config]
+uselength		=TRUE
+bufferlength		=1
+timeout			=4000000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/group/bld.inf	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,61 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+// USB tests for Local Connectivity
+
+#include "../../../group/device.cfg"
+
+PRJ_TESTEXPORTS
+t_usb.oby						/sf/os/kernelhwsrv/kernel/eka/rombuild/t_usb.oby
+t_usb.oby						/epoc32/rom/haitests/t_usb.oby
+t_usb.iby						/epoc32/rom/haitests/t_usb.iby
+t_usb_binaries.iby				        /epoc32/rom/haitests/t_usb_binaries.iby
+t_usb_testdata.iby				        /epoc32/rom/haitests/t_usb_testdata.iby
+
+../pkg/t_usb.bat					z:/base/usb/t_usb.bat
+
+../scripts/base-bsp-usb-validation-automated.script	z:/base/usb/base-bsp-usb-validation-automated.script
+../testdata/base-bsp-usb-validation-automated.ini	z:/base/usb/base-bsp-usb-validation-automated.ini
+
+../testdata/t_usb_environment.ini			z:/base/usb/t_usb_environment.ini
+
+
+#if defined(TEST_DEVICE_MERLIN)
+../testdata/merlin/t_usb.ini				z:/base/usb/t_usb.ini
+../testdata/merlin/t_usb.tcs				z:/base/usb/t_usb.tcs
+#endif
+
+#if defined(TEST_DEVICE_DEVLON52)
+../testdata/devlon52/t_usb.ini				z:/base/usb/t_usb.ini
+../testdata/devlon52/t_usb.tcs				z:/base/usb/t_usb.tcs
+#endif
+
+#if defined(TEST_DEVICE_TUBE)
+../testdata/tube/t_usb.ini				z:/base/usb/t_usb.ini
+../testdata/tube/t_usb.tcs				z:/base/usb/t_usb.tcs
+#endif
+
+#if defined(TEST_DEVICE_H4HRP)
+../testdata/h4hrp/t_usb.ini				    z:/base/usb/t_usb.ini
+../testdata/h4hrp/t_usb.tcs				    z:/base/usb/t_usb.tcs
+#endif
+
+#if defined(TEST_DEVICE_H6HRP)
+../testdata/h6hrp/t_usb.ini				    z:/base/usb/t_usb.ini
+../testdata/h6hrp/t_usb.tcs				    z:/base/usb/t_usb.tcs
+#endif
+
+PRJ_TESTMMPFILES
+t_usb.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/group/t_usb.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,24 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_USB_IBY__)
+#define __T_USB_IBY__
+
+//Test Includes
+#include <rom\haitests\t_usb_binaries.iby>
+#include <rom\haitests\t_usb_testdata.iby>
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/group/t_usb.mmp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+// USB Test Project file
+
+TARGET			t_usb.exe
+TARGETTYPE		exe
+UID				0x1000007A 0x102863E0
+VENDORID		0x70000001
+
+capability		All -Tcb
+
+SOURCEPATH		../src
+SOURCE			../../../e32/src/T_RDevUsbcClientData.cpp
+SOURCE			../../../common/src/DataWrapperBase.cpp
+SOURCE			../../../common/src/ActiveCallbackBase.cpp
+
+SOURCE			t_e32server.cpp
+
+USERINCLUDE		../inc
+USERINCLUDE		../../../common/inc
+USERINCLUDE		../../../e32/inc
+
+SYSTEMINCLUDE	/epoc32/include
+SYSTEMINCLUDE	/epoc32/include/test
+SYSTEMINCLUDE	/epoc32/include/kernel
+
+LIBRARY			euser.lib
+LIBRARY			efsrv.lib
+LIBRARY			hal.lib
+LIBRARY			testexecuteutils.lib
+LIBRARY			testexecutelogclient.lib
+LIBRARY			bafl.lib
+LIBRARY			iniparser.lib
+LIBRARY			ecom.lib
+
+SMPSAFE
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/group/t_usb.oby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#define BASE_ROM
+#include <rom\##VARIANT##\header.iby>
+
+files=
+
+#include <rom\##VARIANT##\kernel.iby>
+#include "user.iby"
+#include <rom\hal\hal.iby>
+#include <rom\f32\f32.iby>
+
+//TEF Includes
+#include <rom\include\base_testexecutelite.iby>
+
+// Tests
+#include <rom\haitests\t_usb.iby>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/group/t_usb_binaries.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,26 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_USB_BINARIES_IBY__)
+#define __T_USB_BINARIES_IBY__
+
+#if (!defined EKA2)
+file=\epoc32\release\##MAIN##\##BUILD##\t_usb.exe		\sys\bin\t_usb.exe
+#else
+file=\epoc32\release\##MAIN##\##BUILD##\t_usb.exe		\sys\bin\t_usb.exe
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/group/t_usb_testdata.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,30 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_USB_TESTDATA_IBY__)
+#define __T_USB_TESTDATA_IBY__
+
+
+data=EPOCROOT##Epoc32\data\z\base\usb\t_usb.bat						base\usb\t_usb.bat
+
+data=EPOCROOT##Epoc32\data\z\base\usb\base-bsp-usb-validation-automated.script		base\usb\base-bsp-usb-validation-automated.script
+data=EPOCROOT##Epoc32\data\z\base\usb\base-bsp-usb-validation-automated.ini	        base\usb\base-bsp-usb-validation-automated.ini
+
+data=EPOCROOT##Epoc32\data\z\base\usb\t_usb.ini						base\usb\t_usb.ini
+data=EPOCROOT##Epoc32\data\z\base\usb\t_usb_environment.ini			base\usb\t_usb_environment.ini
+data=EPOCROOT##Epoc32\data\z\base\usb\t_usb.tcs						base\usb\t_usb.tcs
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/inc/t_e32Server.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+// This contains CT_e32Server 
+#ifndef T_E32_SERVER_H
+#define T_E32_SERVER_H
+
+//	EPOC Includes
+#include <testserver2.h>
+
+/**
+ * This wrapper class extends the test server and creates test server for USB
+ */
+class CT_e32Server : public CTestServer2
+	{
+private:
+	class CT_e32Block : public CTestBlockController
+		{
+	public:
+		inline CT_e32Block();
+		inline ~CT_e32Block();
+		CDataWrapper*	CreateDataL( const TDesC& aData );
+		};
+
+public:
+	static CT_e32Server* NewL();
+	inline CTestBlockController*	CreateTestBlock();
+
+	};
+
+#include "t_e32server.inl"
+
+#endif // T_E32_SERVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/inc/t_e32server.inl	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+// This contains CT_e32ServerServer
+
+CT_e32Server::CT_e32Block::CT_e32Block()
+:	CTestBlockController()
+	{
+	}
+
+CT_e32Server::CT_e32Block::~CT_e32Block()
+	{
+	}
+
+CTestBlockController* CT_e32Server::CreateTestBlock()
+	{
+	return new CT_e32Block();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/pkg/t_usb.bat	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,17 @@
+@rem
+@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+testexecute z:\base\usb\base-bsp-usb-validation-automated.script -tcx z:\base\usb\t_usb.tcs
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/scripts/base-bsp-usb-validation-automated.script	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,570 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//! @file
+//! @SYMTestSuiteName base-bsp-usb-validation-automated
+//! @SYMScriptTestEnvironment This test script requires a basic ROM.
+// 
+// Tests all public elements of the RDevUsbcClient
+// classes as a means of confidence that the APIs work as expected.
+// 
+// The purpose is to provide a regression test suite of PublishedAll
+// APIs for: RDevUsbcClient
+// The tests are fully automated.
+// 
+
+
+
+LOAD_SUITE t_usb
+
+
+
+
+
+START_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0001
+
+//!@SYMTestCaseID		BASE-BSP-USB-VALIDATION-AUTOMATED-0001
+//!@SYMAPI
+//!                RDevUsbcClient::RDevUsbcClient();
+//!                RDevUsbcClient::~RDevUsbcClient()
+//!                
+//!@SYMAuthor			alavariega
+//!@SYMCreationDate		23/06/2008
+//!@SYMTestCaseDesc		Create an instance of USB
+//!@SYMTestActions
+//!                1.- Create a RDevUsbcClient instance
+//!                2.- Delete RDevUsbcClient instance
+//!@SYMTestStatus		Implemented
+//!@SYMTestPriority		Normal
+//!@SYMTestExpectedResults
+//!                Create an instance of RDevUsbcClient with no errors
+//!@SYMTestType			CIT
+
+	START_TEST_BLOCK	300	t_usb	\base\usb\base-bsp-usb-validation-automated.ini
+		CREATE_OBJECT	RDevUsbcClient		devucli
+		COMMAND		devucli		NewL
+		COMMAND		devucli		~
+	END_TEST_BLOCK
+END_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0001
+
+
+
+
+START_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0002
+
+//!@SYMTestCaseID		BASE-BSP-USB-VALIDATION-AUTOMATED-0002
+//!@SYMAPI
+//!                User::LoadLogicalDevice(const TDesC {ref});
+//!@SYMAuthor			alavariega
+//!@SYMCreationDate		21/04/2008
+//!@SYMTestCaseDesc		USB Device - Load USB Driver
+//!@SYMTestActions
+//!                1.- Create an instance of Usb 
+//!                2.- Load driver - Load Logical Device(driver = {Driver, driver}) 
+//!                3.- Delete usb instance
+//!@SYMTestStatus		Implemented
+//!@SYMTestPriority		Normal
+//!@SYMTestExpectedResults
+//!                Load USB logical device driver with no errors
+//!@SYMTestType			CIT
+
+	START_TEST_BLOCK	300	t_usb	\base\usb\base-bsp-usb-validation-automated.ini
+		CREATE_OBJECT	RDevUsbcClient		devucli
+		COMMAND		devucli		NewL
+		COMMAND		devucli		LoadLogicalDevice			BASE-BSP-Usb-0002-0001-LoadLogicalDevice_command02
+		COMMAND		devucli		~
+	END_TEST_BLOCK
+END_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0002
+
+
+
+
+START_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0003
+
+//!@SYMTestCaseID		BASE-BSP-USB-VALIDATION-AUTOMATED-0003
+//!@SYMAPI
+//!                RDevUsbcClient::Open(TInt);
+//!@SYMAuthor			alavariega
+//!@SYMCreationDate		21/04/2008
+//!@SYMTestCaseDesc		USB Device - Open Channel to USB Driver
+//!@SYMTestActions
+//!                1.- Create an instance of usb
+//!                2.- Load driver - Load Logical Device (driver = {Driver, driver}) 
+//!                3.- Open channel
+//!                4.- Delete usb instance
+//!@SYMTestStatus		Implemented
+//!@SYMTestPriority		Normal
+//!@SYMTestExpectedResults
+//!                Load USB logical device driver and open USB channel with no errors
+//!@SYMTestType			CIT
+
+	START_TEST_BLOCK	300	t_usb	\base\usb\base-bsp-usb-validation-automated.ini
+		CREATE_OBJECT	RDevUsbcClient		devucli
+		COMMAND		devucli		NewL
+		COMMAND		devucli		LoadLogicalDevice			BASE-BSP-Usb-0003-0001-LoadLogicalDevice_command02
+		COMMAND		devucli		Open
+		COMMAND		devucli		~
+	END_TEST_BLOCK
+END_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0003
+
+
+
+
+START_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0004
+
+//!@SYMTestCaseID		BASE-BSP-USB-VALIDATION-AUTOMATED-0004
+//!@SYMAPI
+//!                RDevUsbcClient::DeviceCaps(TDes8 {ref});
+//!@SYMAuthor			alavariega
+//!@SYMCreationDate		21/04/2008
+//!@SYMTestCaseDesc		USB Device - Verify USB Device Capabilities
+//!@SYMTestActions
+//!                1.- Create an Instance of usb
+//!                2.- Load driver - Load Logical Device(driver = {Driver, driver}) 
+//!                3.- Open channel
+//!                4.- Read device capabilities ( supportsConnect   = {capabilities,supportsConnect}; supportsSelfPowered  = {capabilities,supportsSelfPowered}; supportsRemoteWakeup = {capabilities,supportsRemoteWakeup} )
+//!                5.  EndpointCaps 
+//!                6.- Delete usb instance
+//!@SYMTestStatus		Verified
+//!@SYMTestPriority		Normal
+//!@SYMTestExpectedResults
+//!                Verify USB Device Capabilities with no errors. Information obtained is:
+//!                - Device supports Software-Connect (true)
+//!                - Device is Self-Powered (true)
+//!                - Device supports Remote-Wakeup (false)
+//!@SYMTestType			CIT
+
+	START_TEST_BLOCK	300	t_usb	\base\usb\base-bsp-usb-validation-automated.ini
+		CREATE_OBJECT	RDevUsbcClient		devucli
+		COMMAND		devucli		NewL
+		COMMAND		devucli		LoadLogicalDevice			BASE-BSP-Usb-0004-0001-LoadLogicalDevice_command02
+		COMMAND		devucli		Open
+		COMMAND		devucli		DeviceCaps			        BASE-BSP-Usb-0004-0001-DeviceCaps_command04
+		COMMAND		devucli		EndpointCaps
+		COMMAND		devucli		~
+	END_TEST_BLOCK
+END_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0004
+
+
+
+
+START_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0005
+
+//!@SYMTestCaseID		BASE-BSP-USB-VALIDATION-AUTOMATED-0005
+//!@SYMAPI
+//!                RDevUsbcClient::GetDeviceDescriptorSize(Tint {ref});
+//!                RDevUsbcClient::GetDeviceDescriptor(TDes8 {ref});
+//!                RDevUsbcClient::SetDeviceDescriptor(const TDes8 {ref});
+//!@SYMAuthor			alavariega
+//!@SYMCreationDate		21/04/2008
+//!@SYMTestCaseDesc		USB Device - Set USB Device Descriptors
+//!@SYMTestActions
+//!                1.- Create an instance of usb
+//!                2.- Load driver (driver = {Driver, driver}) 
+//!                3.- Open channel
+//!                4.- Read devide capabilities ( supportsConnect   = {capabilities,supportsConnect}; supportsSelfPowered  = {capabilities,supportsSelfPowered}; supportsRemoteWakeup = {capabilities,supportsRemoteWakeup} )
+//!                5.  EndpointCaps 
+//!                6.- GetDeviceDescriptorSize
+//!                7.- GetDeviceDescriptor
+//!                8.- SetDeviceDescriptor ( USBVersionLow   = {USB_version,USBVersionLowFor2_00}; USBVersionHigh = {USB_version,USBVersionHighFor2_00};VendorIDLow   = {VendorID,VendorIDLowForNokia};VendorIDHigh   = {VendorID,VendorIDHighForNokia};ProductIDLow   = {ProductID,ProductIDLowForTestDevice}; ProductIDHigh   = {ProductID,ProductIDHighForTestDevice};ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00};ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00})
+//!                9.- Delete usb instance
+//!@SYMTestStatus		Verified
+//!@SYMTestPriority		Normal
+//!@SYMTestExpectedResults
+//!                Set USB Device Descriptors with no errors
+//!@SYMTestType			CIT
+
+	START_TEST_BLOCK	300	t_usb	\base\usb\base-bsp-usb-validation-automated.ini
+		CREATE_OBJECT	RDevUsbcClient		devucli
+		COMMAND		devucli		NewL
+		COMMAND		devucli		LoadLogicalDevice			BASE-BSP-Usb-0005-0001-LoadLogicalDevice_command02
+		COMMAND		devucli		Open
+		COMMAND		devucli		DeviceCaps			        BASE-BSP-Usb-0005-0001-DeviceCaps_command04
+		COMMAND		devucli		EndpointCaps
+        COMMAND		devucli		SetDeviceDescriptor			BASE-BSP-Usb-0005-0001-SetDeviceDescriptor_command06
+		COMMAND		devucli		GetDeviceDescriptorSize     BASE-BSP-Usb-0005-0001-GetDeviceDescriptorSize_command07
+		COMMAND		devucli		GetDeviceDescriptor         BASE-BSP-Usb-0005-0001-GetDeviceDescriptor_command08
+		COMMAND		devucli		~
+	END_TEST_BLOCK
+END_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0005
+
+
+
+
+START_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0006
+
+//!@SYMTestCaseID		BASE-BSP-USB-VALIDATION-AUTOMATED-0006
+//!@SYMAPI
+//!                RDevUsbcClient::Write(TRequestStatus {ref}, TEndpointNumber, TDes8 {ref}, TInt {ref}, TBool);
+//!                RDevUsbcClient::QueryReceiveBuffer(TEndpointNumber, Tint {ref});
+//!                RDevUsbcClient::Read(TRequestStatus {ref}, TEndpointNumber, TDes8 {ref});
+//!                
+//!@SYMAuthor			alavariega
+//!@SYMCreationDate		21/04/2008
+//!@SYMTestCaseDesc		USB Device - Configure Bulk IN and OUT Endpoints
+//!@SYMTestActions
+//!                1.- Create an instance of usb
+//!                2.- Load driver - Load Logical Device (driver = {Driver, driver}) 
+//!                3.- Open channel
+//!                4.- Read device capabilities( supportsConnect   = {capabilities,supportsConnect}; supportsSelfPowered  = {capabilities,supportsSelfPowered}; supportsRemoteWakeup = {capabilities,supportsRemoteWakeup} )
+//!                5.  EndpointCaps 
+//!                6.- GetDeviceDescriptorSize
+//!                7.- GetDeviceDescriptor
+//!                8.- SetDeviceDescriptor( USBVersionLow   = {USB_version,USBVersionLowFor2_00}; USBVersionHigh = {USB_version,USBVersionHighFor2_00};VendorIDLow   = {VendorID,VendorIDLowForNokia};VendorIDHigh   = {VendorID,VendorIDHighForNokia};ProductIDLow   = {ProductID,ProductIDLowForTestDevice}; ProductIDHigh   = {ProductID,ProductIDHighForTestDevice};ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00};ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00})
+//!                9.- Set type and direction of endpoint to 'Bulk' and 'In' ( mode = Bulk; direction = In )
+//!                10.- Set type and direction of endpoint to 'Bulk' and 'Out' (mode = Bulk; direction = Out)
+//!                11.- Delete usb instance
+//!@SYMTestStatus		Verified
+//!@SYMTestPriority		Normal
+//!@SYMTestExpectedResults
+//!                Configure Bulk IN and OUT Endpoints with no errors
+//!@SYMTestType			CIT
+
+	START_TEST_BLOCK	300	t_usb	\base\usb\base-bsp-usb-validation-automated.ini
+		CREATE_OBJECT	RDevUsbcClient		devucli
+		COMMAND		devucli		NewL
+		COMMAND		devucli		LoadLogicalDevice			BASE-BSP-Usb-0006-0001-LoadLogicalDevice_command02
+		COMMAND		devucli		Open
+		COMMAND		devucli		DeviceCaps			        BASE-BSP-Usb-0006-0001-DeviceCaps_command04
+		COMMAND		devucli		EndpointCaps
+        COMMAND		devucli		SetDeviceDescriptor			BASE-BSP-Usb-0006-0001-SetDeviceDescriptor_command06
+		COMMAND		devucli		GetDeviceDescriptorSize     BASE-BSP-Usb-0006-0001-GetDeviceDescriptorSize_command07
+		COMMAND		devucli		GetDeviceDescriptor         BASE-BSP-Usb-0006-0001-GetDeviceDescriptor_command08
+		COMMAND		devucli		SetEndPoint			        BASE-BSP-Usb-0006-0001-SetEndPoint_command09
+		COMMAND		devucli		SetEndPoint			        BASE-BSP-Usb-0006-0001-SetEndPoint_command10
+		COMMAND		devucli		~
+	END_TEST_BLOCK
+END_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0006
+
+
+
+
+START_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0007
+
+//!@SYMTestCaseID		BASE-BSP-USB-VALIDATION-AUTOMATED-0007
+//!@SYMAPI
+//!                RDevUsbcClient::Write(TRequestStatus {ref}, TEndpointNumber, TDes8 {ref}, TInt {ref}, TBool);
+//!                RDevUsbcClient::QueryReceiveBuffer(TEndpointNumber, Tint {ref});
+//!                RDevUsbcClient::Read(TRequestStatus {ref}, TEndpointNumber, TDes8 {ref});
+//!                
+//!@SYMAuthor			alavariega
+//!@SYMCreationDate		21/04/2008
+//!@SYMTestCaseDesc		USB Device - Configure Interrupt IN and OUT Endpoints
+//!@SYMTestActions
+//!                1.- Create an instance of usb
+//!                2.- Load driver (driver = {Driver, driver}) 
+//!                3.- Open channel
+//!                4.- Read device capabilities( supportsConnect   = {capabilities,supportsConnect}; supportsSelfPowered  = {capabilities,supportsSelfPowered}; supportsRemoteWakeup = {capabilities,supportsRemoteWakeup} )
+//!                5.  EndpointCaps 
+//!                6.- GetDeviceDescriptorSize
+//!                7.- GetDeviceDescriptor
+//!                8.- SetDeviceDescriptor ( USBVersionLow   = {USB_version,USBVersionLowFor2_00}; USBVersionHigh = {USB_version,USBVersionHighFor2_00};VendorIDLow   = {VendorID,VendorIDLowForNokia};VendorIDHigh   = {VendorID,VendorIDHighForNokia};ProductIDLow   = {ProductID,ProductIDLowForTestDevice}; ProductIDHigh   = {ProductID,ProductIDHighForTestDevice};ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00};ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00})
+//!                9.- Set type and direction of endpoint to 'Interrupt' and 'In' ( mode = Interrupt; direction = In )
+//!                10.- Set type and direction of endpoint to 'Interrupt' and 'Out' ( mode = Interrupt; direction = Out )
+//!                11.- Delete usb instance
+//!@SYMTestStatus		Verified
+//!@SYMTestPriority		Normal
+//!@SYMTestExpectedResults
+//!                Configure Interrupt IN and OUT Endpoints with no errors
+//!@SYMTestType			CIT
+
+	START_TEST_BLOCK	300	t_usb	\base\usb\base-bsp-usb-validation-automated.ini
+		CREATE_OBJECT	RDevUsbcClient		devucli
+		COMMAND		devucli		NewL
+		COMMAND		devucli		LoadLogicalDevice			BASE-BSP-Usb-0007-0001-LoadLogicalDevice_command02
+		COMMAND		devucli		Open
+		COMMAND		devucli		DeviceCaps			        BASE-BSP-Usb-0007-0001-DeviceCaps_command04
+		COMMAND		devucli		EndpointCaps
+        COMMAND		devucli		SetDeviceDescriptor			BASE-BSP-Usb-0007-0001-SetDeviceDescriptor_command06
+		COMMAND		devucli		GetDeviceDescriptorSize     BASE-BSP-Usb-0007-0001-GetDeviceDescriptorSize_command07
+		COMMAND		devucli		GetDeviceDescriptor         BASE-BSP-Usb-0007-0001-GetDeviceDescriptor_command08
+		COMMAND		devucli		SetEndPoint			        BASE-BSP-Usb-0007-0001-SetEndPoint_command09
+		COMMAND		devucli		SetEndPoint			        BASE-BSP-Usb-0007-0001-SetEndPoint_command10
+		COMMAND		devucli		~
+	END_TEST_BLOCK
+END_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0007
+
+
+
+
+START_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0008
+
+//!@SYMTestCaseID		BASE-BSP-USB-VALIDATION-AUTOMATED-0008
+//!@SYMAPI
+//!                RDevUsbcClient::SetInterface(TInt, TUsbcInterfaceInfoBuf {ref}, TUint32);
+//!@SYMAuthor			alavariega
+//!@SYMCreationDate		21/04/2008
+//!@SYMTestCaseDesc		USB Neg Buf - Set negative (small) bandwidth priority
+//!@SYMTestActions
+//!                1.- Create an instance of usb
+//!                2.- Load driver - Load Logical Device (driver = {Driver, driver}) 
+//!                3.- Open channel
+//!                4.- Read device capabilities( supportsConnect   = {capabilities,supportsConnect}; supportsSelfPowered  = {capabilities,supportsSelfPowered}; supportsRemoteWakeup = {capabilities,supportsRemoteWakeup} )
+//!                5.  EndpointCaps 
+//!                6.- GetDeviceDescriptorSize
+//!                7.- GetDeviceDescriptor
+//!                8.- SetDeviceDescriptor ( USBVersionLow   = {USB_version,USBVersionLowFor2_00}; USBVersionHigh = {USB_version,USBVersionHighFor2_00};VendorIDLow   = {VendorID,VendorIDLowForNokia};VendorIDHigh   = {VendorID,VendorIDHighForNokia};ProductIDLow   = {ProductID,ProductIDLowForTestDevice}; ProductIDHigh   = {ProductID,ProductIDHighForTestDevice};ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00};ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00})
+//!                9.- Set type and direction of endpoint to 'Bulk' and 'Out' ( mode = Bulk; direction = Out ) 
+//!                10.- Set the USB interface to -1 ( bandwidthBufferingMask = -1 )
+//!                11.- Delete usb instance
+//!@SYMTestStatus		Verified
+//!@SYMTestPriority		Normal
+//!@SYMTestExpectedResults
+//!                The Test Case pass if the error is the KErrArgument (-6) expected.
+//!@SYMTestType			CIT
+
+	START_TEST_BLOCK	300	t_usb	\base\usb\base-bsp-usb-validation-automated.ini
+		CREATE_OBJECT	RDevUsbcClient		devucli
+		COMMAND		devucli		NewL
+		COMMAND		devucli		LoadLogicalDevice			BASE-BSP-Usb-0008-0001-LoadLogicalDevice_command02
+		COMMAND		devucli		Open
+		COMMAND		devucli		DeviceCaps			        BASE-BSP-Usb-0008-0001-DeviceCaps_command04
+		COMMAND		devucli		EndpointCaps
+        COMMAND		devucli		SetDeviceDescriptor			BASE-BSP-Usb-0008-0001-SetDeviceDescriptor_command06
+		COMMAND		devucli		GetDeviceDescriptorSize     BASE-BSP-Usb-0008-0001-GetDeviceDescriptorSize_command07
+		COMMAND		devucli		GetDeviceDescriptor         BASE-BSP-Usb-0008-0001-GetDeviceDescriptor_command08
+		COMMAND		devucli		SetEndPoint			        BASE-BSP-Usb-0008-0001-SetEndPoint_command09
+		COMMAND		devucli		SetEndPoint			        BASE-BSP-Usb-0008-0001-SetEndPoint_command09
+		COMMAND		!Error=-6	devucli		SetInterface	BASE-BSP-Usb-0008-0001-SetInterface_command10
+		COMMAND		devucli		~
+	END_TEST_BLOCK
+END_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0008
+
+
+
+
+START_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0009
+
+//!@SYMTestCaseID		BASE-BSP-USB-VALIDATION-AUTOMATED-0009
+//!@SYMAPI
+//!                RDevUsbcClient::SetInterface(TInt, TUsbcInterfaceInfoBuf {ref}, TUint32);
+//!@SYMAuthor			alavariega
+//!@SYMCreationDate		21/04/2008
+//!@SYMTestCaseDesc		USB Neg Buf - Set negative (large) bandwidth priority
+//!@SYMTestActions
+//!                1.- Create an instance of usb
+//!                2.- Load driver (driver = {Driver, driver}) 
+//!                3.- Open channel
+//!                4.- Read device capabilities( supportsConnect   = {capabilities,supportsConnect}; supportsSelfPowered  = {capabilities,supportsSelfPowered}; supportsRemoteWakeup = {capabilities,supportsRemoteWakeup} )
+//!                5.  EndpointCaps 
+//!                6.- GetDeviceDescriptorSize
+//!                7.- GetDeviceDescriptor
+//!                8.- SetDeviceDescriptor ( USBVersionLow   = {USB_version,USBVersionLowFor2_00}; USBVersionHigh = {USB_version,USBVersionHighFor2_00};VendorIDLow   = {VendorID,VendorIDLowForNokia};VendorIDHigh   = {VendorID,VendorIDHighForNokia};ProductIDLow   = {ProductID,ProductIDLowForTestDevice}; ProductIDHigh   = {ProductID,ProductIDHighForTestDevice};ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00};ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00})
+//!                9.- Set type and direction of endpoint to 'Bulk' and 'Out' ( mode = Bulk; direction = Out )
+//!                10.- Set the USB interface to -542356 ( bandwidthBufferingMask =  -542356 )
+//!                11.- Delete usb instance
+//!@SYMTestStatus		Verified
+//!@SYMTestPriority		Normal
+//!@SYMTestExpectedResults
+//!                The Test Case pass if the error is the KErrArgument (-6) expected.
+//!@SYMTestType			CIT
+
+	START_TEST_BLOCK	300	t_usb	\base\usb\base-bsp-usb-validation-automated.ini
+		CREATE_OBJECT	RDevUsbcClient		devucli
+		COMMAND		devucli		NewL
+		COMMAND		devucli		LoadLogicalDevice			BASE-BSP-Usb-0009-0001-LoadLogicalDevice_command02
+		COMMAND		devucli		Open
+		COMMAND		devucli		DeviceCaps			        BASE-BSP-Usb-0009-0001-DeviceCaps_command04
+		COMMAND		devucli		EndpointCaps
+		COMMAND		devucli		SetDeviceDescriptor			BASE-BSP-Usb-0009-0001-SetDeviceDescriptor_command06
+		COMMAND		devucli		GetDeviceDescriptorSize     BASE-BSP-Usb-0009-0001-GetDeviceDescriptorSize_command07
+		COMMAND		devucli		GetDeviceDescriptor         BASE-BSP-Usb-0009-0001-GetDeviceDescriptor_command08
+		COMMAND		devucli		SetEndPoint			        BASE-BSP-Usb-0009-0001-SetEndPoint_command09
+		COMMAND		!Error=-6	devucli		SetInterface	BASE-BSP-Usb-0009-0001-SetInterface_command10
+		COMMAND		devucli		~
+	END_TEST_BLOCK
+END_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0009
+
+
+
+
+START_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0010
+
+//!@SYMTestCaseID		BASE-BSP-USB-VALIDATION-AUTOMATED-0010
+//!@SYMAPI
+//!                RDevUsbcClient::SetInterface(TInt, TUsbcInterfaceInfoBuf {ref}, TUint32);
+//!@SYMAuthor			alavariega
+//!@SYMCreationDate		21/04/2008
+//!@SYMTestCaseDesc		USB Neg Buf - Set wrong (large) bandwidth priority
+//!@SYMTestActions
+//!                1.- Create an instance of usb
+//!                2.- Load driver - Load Logical Device (driver = {Driver, driver}) 
+//!                3.- Open channel
+//!                4.- Read device capabilities( supportsConnect   = {capabilities,supportsConnect}; supportsSelfPowered  = {capabilities,supportsSelfPowered}; supportsRemoteWakeup = {capabilities,supportsRemoteWakeup} )
+//!                5.  EndpointCaps 
+//!                6.- GetDeviceDescriptorSize
+//!                7.- GetDeviceDescriptor
+//!                8.- SetDeviceDescriptor ( USBVersionLow   = {USB_version,USBVersionLowFor2_00}; USBVersionHigh = {USB_version,USBVersionHighFor2_00};VendorIDLow   = {VendorID,VendorIDLowForNokia};VendorIDHigh   = {VendorID,VendorIDHighForNokia};ProductIDLow   = {ProductID,ProductIDLowForTestDevice}; ProductIDHigh   = {ProductID,ProductIDHighForTestDevice};ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00};ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00})
+//!                9.- Set type and direction of endpoint to 'Bulk' and 'Out' ( mode = Bulk; direction = Out )
+//!                10.- Set the USB interface to 43143 ( bandwidthBufferingMask =  43143 )
+//!                11.- Delete usb instance
+//!@SYMTestStatus		Verified
+//!@SYMTestPriority		Normal
+//!@SYMTestExpectedResults
+//!                The Test Case pass if the error is the KErrArgument (-6) expected.
+//!@SYMTestType			CIT
+
+	START_TEST_BLOCK	300	t_usb	\base\usb\base-bsp-usb-validation-automated.ini
+		CREATE_OBJECT	RDevUsbcClient		devucli
+		COMMAND		devucli		NewL
+		COMMAND		devucli		LoadLogicalDevice			BASE-BSP-Usb-0010-0001-LoadLogicalDevice_command02
+		COMMAND		devucli		Open
+		COMMAND		devucli		DeviceCaps			        BASE-BSP-Usb-0010-0001-DeviceCaps_command04
+		COMMAND		devucli		EndpointCaps
+		COMMAND		devucli		SetDeviceDescriptor			BASE-BSP-Usb-0010-0001-SetDeviceDescriptor_command06
+		COMMAND		devucli		GetDeviceDescriptorSize     BASE-BSP-Usb-0010-0001-GetDeviceDescriptorSize_command07
+		COMMAND		devucli		GetDeviceDescriptor         BASE-BSP-Usb-0010-0001-GetDeviceDescriptor_command08
+		COMMAND		devucli		SetEndPoint			        BASE-BSP-Usb-0010-0001-SetEndPoint_command09
+		COMMAND		!Error=-6	devucli		SetInterface	BASE-BSP-Usb-0010-0001-SetInterface_command10
+		COMMAND		devucli		~
+	END_TEST_BLOCK
+END_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0010
+
+
+
+
+START_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0011
+
+//!@SYMTestCaseID		BASE-BSP-USB-VALIDATION-AUTOMATED-0011
+//!@SYMAPI
+//!                RDevUsbcClient::SetInterface(TInt, TUsbcInterfaceInfoBuf {ref}, TUint32);
+//!@SYMAuthor			alavariega
+//!@SYMCreationDate		21/04/2008
+//!@SYMTestCaseDesc		USB Neg Buf - Set wrong (boundary value 52) bandwidth priority
+//!@SYMTestActions
+//!                1.- Create an instance of usb
+//!                2.- Load driver - Load Logical Device (driver = {Driver, driver}) 
+//!                3.- Open channel
+//!                4.- Read device capabilities( supportsConnect   = {capabilities,supportsConnect}; supportsSelfPowered  = {capabilities,supportsSelfPowered}; supportsRemoteWakeup = {capabilities,supportsRemoteWakeup} )
+//!                5.  EndpointCaps 
+//!                6.- GetDeviceDescriptorSize
+//!                7.- GetDeviceDescriptor
+//!                8.- SetDeviceDescriptor ( USBVersionLow   = {USB_version,USBVersionLowFor2_00}; USBVersionHigh = {USB_version,USBVersionHighFor2_00};VendorIDLow   = {VendorID,VendorIDLowForNokia};VendorIDHigh   = {VendorID,VendorIDHighForNokia};ProductIDLow   = {ProductID,ProductIDLowForTestDevice}; ProductIDHigh   = {ProductID,ProductIDHighForTestDevice};ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00};ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00})
+//!                9.- Set type and direction of endpoint to 'Bulk' and 'Out' ( mode = Bulk; direction = Out )
+//!                10.- Set the USB interface to 52 ( bandwidthBufferingMask = 52)
+//!                11.- Delete usb instance
+//!@SYMTestStatus		Verified
+//!@SYMTestPriority		Normal
+//!@SYMTestExpectedResults
+//!                The Test Case pass if the error is the KErrArgument (-6) expected.
+//!@SYMTestType			CIT
+
+	START_TEST_BLOCK	300	t_usb	\base\usb\base-bsp-usb-validation-automated.ini
+		CREATE_OBJECT	RDevUsbcClient		devucli
+		COMMAND		devucli		NewL
+		COMMAND		devucli		LoadLogicalDevice			BASE-BSP-Usb-0011-0001-LoadLogicalDevice_command02
+		COMMAND		devucli		Open
+		COMMAND		devucli		DeviceCaps			        BASE-BSP-Usb-0011-0001-DeviceCaps_command04
+		COMMAND		devucli		EndpointCaps
+		COMMAND		devucli		SetDeviceDescriptor			BASE-BSP-Usb-0011-0001-SetDeviceDescriptor_command06
+		COMMAND		devucli		GetDeviceDescriptorSize     BASE-BSP-Usb-0011-0001-GetDeviceDescriptorSize_command07
+		COMMAND		devucli		GetDeviceDescriptor         BASE-BSP-Usb-0011-0001-GetDeviceDescriptor_command08
+		COMMAND		devucli		SetEndPoint			        BASE-BSP-Usb-0011-0001-SetEndPoint_command09
+		COMMAND		!Error=-6	devucli		SetInterface	BASE-BSP-Usb-0011-0001-SetInterface_command10
+		COMMAND		devucli		~
+	END_TEST_BLOCK
+END_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0011
+
+
+
+
+START_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0012
+
+//!@SYMTestCaseID		BASE-BSP-USB-VALIDATION-AUTOMATED-0012
+//!@SYMAPI
+//!                RDevUsbcClient::SetInterface(TInt, TUsbcInterfaceInfoBuf {ref}, TUint32);
+//!@SYMAuthor			alavariega
+//!@SYMCreationDate		21/04/2008
+//!@SYMTestCaseDesc		USB Neg Buf - Set wrong (boundary value 4) bandwidth priority
+//!@SYMTestActions
+//!                1.- Create an instance of usb
+//!                2.- Load driver - Load Logical Device (driver = {Driver, driver}) 
+//!                3.- Open channel
+//!                4.- Read device capabilities( supportsConnect   = {capabilities,supportsConnect}; supportsSelfPowered  = {capabilities,supportsSelfPowered}; supportsRemoteWakeup = {capabilities,supportsRemoteWakeup} )
+//!                5.  EndpointCaps 
+//!                6.- GetDeviceDescriptorSize
+//!                7.- GetDeviceDescriptor
+//!                8.- SetDeviceDescriptor( USBVersionLow   = {USB_version,USBVersionLowFor2_00}; USBVersionHigh = {USB_version,USBVersionHighFor2_00};VendorIDLow   = {VendorID,VendorIDLowForNokia};VendorIDHigh   = {VendorID,VendorIDHighForNokia};ProductIDLow   = {ProductID,ProductIDLowForTestDevice}; ProductIDHigh   = {ProductID,ProductIDHighForTestDevice};ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00};ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00})
+//!                9. Set type and direction of endpoint to 'Bulk' and 'Out' ( mode = Bulk; direction = Out )
+//!                10.- Set the USB interface to 4 ( bandwidthBufferingMask = 4 )
+//!                11.- Delete usb instance
+//!@SYMTestStatus		Verified
+//!@SYMTestPriority		Normal
+//!@SYMTestExpectedResults
+//!                The Test Case pass if the error is the KErrArgument (-6) expected.
+//!@SYMTestType			CIT
+
+	START_TEST_BLOCK	300	t_usb	\base\usb\base-bsp-usb-validation-automated.ini
+		CREATE_OBJECT	RDevUsbcClient		devucli
+		COMMAND		devucli		NewL
+		COMMAND		devucli		LoadLogicalDevice			BASE-BSP-Usb-0012-0001-LoadLogicalDevice_command02
+		COMMAND		devucli		Open
+		COMMAND		devucli		DeviceCaps			        BASE-BSP-Usb-0012-0001-DeviceCaps_command04
+		COMMAND		devucli		EndpointCaps
+		COMMAND		devucli		SetDeviceDescriptor			BASE-BSP-Usb-0012-0001-SetDeviceDescriptor_command06
+		COMMAND		devucli		GetDeviceDescriptorSize     BASE-BSP-Usb-0012-0001-GetDeviceDescriptorSize_command07
+		COMMAND		devucli		GetDeviceDescriptor         BASE-BSP-Usb-0012-0001-GetDeviceDescriptor_command08
+		COMMAND		devucli		SetEndPoint			        BASE-BSP-Usb-0012-0001-SetEndPoint_command09
+		COMMAND		!Error=-6	devucli		SetInterface	BASE-BSP-Usb-0012-0001-SetInterface_command10
+		COMMAND		devucli		~
+	END_TEST_BLOCK
+END_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0012
+
+
+
+
+START_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0013
+
+//!@SYMTestCaseID		BASE-BSP-USB-VALIDATION-AUTOMATED-0013
+//!@SYMAPI
+//!                RDevUsbcClient::SetInterface(TInt, TUsbcInterfaceInfoBuf {ref}, TUint32);
+//!@SYMAuthor			alavariega
+//!@SYMCreationDate		21/04/2008
+//!@SYMTestCaseDesc		USB Device - Set USB Interface
+//!@SYMTestActions
+//!                1.- Create an instance of usb
+//!                2.- Load driver (driver = {Driver, driver}) 
+//!                3.- Open channel
+//!                4.- Read device capabilities( supportsConnect   = {capabilities,supportsConnect}; supportsSelfPowered  = {capabilities,supportsSelfPowered}; supportsRemoteWakeup = {capabilities,supportsRemoteWakeup} )
+//!                5.  EndpointCaps 
+//!                6.- GetDeviceDescriptorSize
+//!                7.- GetDeviceDescriptor
+//!                8.- SetDeviceDescriptor ( USBVersionLow   = {USB_version,USBVersionLowFor2_00}; USBVersionHigh = {USB_version,USBVersionHighFor2_00};VendorIDLow   = {VendorID,VendorIDLowForNokia};VendorIDHigh   = {VendorID,VendorIDHighForNokia};ProductIDLow   = {ProductID,ProductIDLowForTestDevice}; ProductIDHigh   = {ProductID,ProductIDHighForTestDevice};ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00};ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00})
+//!                9.- Set type and direction of endpoint to 'Bulk' and 'In' ( mode = Bulk; direction = In )
+//!                10.- Set type and direction of endpoint to 'Bulk' and 'Out' ( mode = Bulk; direction = Out )
+//!                11.- Set the USB interface to BANDWIDTHPLUS2 ( bandwidthBufferingMask = 34 )
+//!                12.- Delete usb instance
+//!@SYMTestStatus		Verified
+//!@SYMTestPriority		Normal
+//!@SYMTestExpectedResults
+//!                Set USB Interface with no errors.
+//!@SYMTestType			CIT
+
+	START_TEST_BLOCK	300	t_usb	\base\usb\base-bsp-usb-validation-automated.ini
+		CREATE_OBJECT	RDevUsbcClient		devucli
+		COMMAND		devucli		NewL
+		COMMAND		devucli		LoadLogicalDevice			BASE-BSP-Usb-0013-0001-LoadLogicalDevice_command02
+		COMMAND		devucli		Open
+		COMMAND		devucli		DeviceCaps			        BASE-BSP-Usb-0013-0001-DeviceCaps_command04
+		COMMAND		devucli		EndpointCaps
+		COMMAND		devucli		SetDeviceDescriptor			BASE-BSP-Usb-0013-0001-SetDeviceDescriptor_command06
+		COMMAND		devucli		GetDeviceDescriptorSize     BASE-BSP-Usb-0013-0001-GetDeviceDescriptorSize_command07
+		COMMAND		devucli		GetDeviceDescriptor         BASE-BSP-Usb-0013-0001-GetDeviceDescriptor_command08
+		COMMAND		devucli		SetEndPoint			        BASE-BSP-Usb-0013-0001-SetEndPoint_command09
+		COMMAND		devucli		SetEndPoint			        BASE-BSP-Usb-0013-0001-SetEndPoint_command10
+		COMMAND		devucli		SetInterface			    BASE-BSP-Usb-0013-0001-SetInterface_command11
+		COMMAND		devucli		~
+	END_TEST_BLOCK
+END_TESTCASE BASE-BSP-USB-VALIDATION-AUTOMATED-0013
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/src/t_e32server.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+//	User Includes
+#include "t_e32server.h"
+#include "T_RDevUsbcClientData.h"
+
+/*@{*/
+_LIT(KT_Connectivity,		"RDevUsbcClient");
+/*@}*/
+
+
+/**
+ * @return - Instance of the test server
+ * Same code for Secure and non-secure variants
+ * Called inside the MainL() function to create and start the
+ * CTestServer derived server.
+ */
+CT_e32Server* CT_e32Server::NewL()
+	{
+    CT_e32Server* server = new (ELeave) CT_e32Server();
+    CleanupStack::PushL(server);
+    server->ConstructL();
+    CleanupStack::Pop(server);
+    return server;
+    }
+
+
+/**
+ * Secure variant
+ * Much simpler, uses the new Rendezvous() call to sync with the client
+ */
+LOCAL_C void MainL()
+	{
+#if (defined __DATA_CAGING__)
+    RProcess().DataCaging(RProcess::EDataCagingOn);
+    RProcess().SecureApi(RProcess::ESecureApiOn);
+#endif
+    CActiveScheduler*	sched=NULL;
+    sched=new(ELeave) CActiveScheduler;
+    CActiveScheduler::Install(sched);
+    CT_e32Server* server = NULL;
+
+    // Create the CTestServer derived server
+    TRAPD(err,server = CT_e32Server::NewL());
+    if(!err)
+	    {
+        // Sync with the client and enter the active scheduler
+        RProcess::Rendezvous(KErrNone);
+        sched->Start();
+        }
+
+    delete server;
+    delete sched;
+    }
+
+
+/**
+ * @return - Standard Epoc error code on process exit
+ * Secure variant only
+ * Process entry point. Called by client using RProcess API
+ */
+GLDEF_C TInt E32Main()
+	{
+    __UHEAP_MARK;
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    if(cleanup == NULL)
+	    {
+        return KErrNoMemory;
+        }
+
+#if (defined TRAP_IGNORE)
+	TRAP_IGNORE(MainL());
+#else
+    TRAPD(err,MainL());
+#endif
+
+    delete cleanup;
+    __UHEAP_MARKEND;
+    return KErrNone;
+    }
+
+CDataWrapper* CT_e32Server::CT_e32Block::CreateDataL(const TDesC& aData)
+	{
+	CDataWrapper*	wrapper=NULL;
+
+	if( KT_Connectivity() == aData )
+		{
+		wrapper=CT_RDevUsbcClientData::NewL();
+		}
+
+	return wrapper;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/testdata/base-bsp-usb-validation-automated.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,377 @@
+[devucli]
+name = devucli
+
+[include]
+file1 = \base\usb\t_usb.ini
+file2 = \base\usb\t_usb_environment.ini
+
+
+
+
+[BASE-BSP-Usb-0002-0001-LoadLogicalDevice_command02]
+driver = {Driver, driver}
+
+
+
+[BASE-BSP-Usb-0003-0001-LoadLogicalDevice_command02]
+driver = {Driver, driver}
+
+
+
+[BASE-BSP-Usb-0004-0001-LoadLogicalDevice_command02]
+driver = {Driver, driver}
+
+[BASE-BSP-Usb-0004-0001-DeviceCaps_command04]
+supportsConnect   = {capabilities,supportsConnect}
+supportsSelfPowered  = {capabilities,supportsSelfPowered}
+supportsRemoteWakeup = {capabilities,supportsRemoteWakeup}
+
+
+
+[BASE-BSP-Usb-0005-0001-LoadLogicalDevice_command02]
+driver = {Driver, driver}
+
+[BASE-BSP-Usb-0005-0001-DeviceCaps_command04]
+supportsConnect   = {capabilities,supportsConnect}
+supportsSelfPowered  = {capabilities,supportsSelfPowered}
+supportsRemoteWakeup = {capabilities,supportsRemoteWakeup}
+
+[BASE-BSP-Usb-0005-0001-SetDeviceDescriptor_command06]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+
+[BASE-BSP-Usb-0005-0001-GetDeviceDescriptorSize_command07]
+expected=18
+[BASE-BSP-Usb-0005-0001-GetDeviceDescriptor_command08]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+
+
+
+
+
+[BASE-BSP-Usb-0006-0001-LoadLogicalDevice_command02]
+driver = {Driver, driver}
+
+[BASE-BSP-Usb-0006-0001-DeviceCaps_command04]
+supportsConnect   = {capabilities,supportsConnect}
+supportsSelfPowered  = {capabilities,supportsSelfPowered}
+supportsRemoteWakeup = {capabilities,supportsRemoteWakeup}
+
+[BASE-BSP-Usb-0006-0001-SetDeviceDescriptor_command06]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+
+[BASE-BSP-Usb-0006-0001-GetDeviceDescriptorSize_command07]
+expected=18
+[BASE-BSP-Usb-0006-0001-GetDeviceDescriptor_command08]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+
+[BASE-BSP-Usb-0006-0001-SetEndPoint_command09]
+mode = Bulk
+direction = In
+
+[BASE-BSP-Usb-0006-0001-SetEndPoint_command10]
+mode = Bulk
+direction = Out
+
+
+
+[BASE-BSP-Usb-0007-0001-LoadLogicalDevice_command02]
+driver = {Driver, driver}
+
+[BASE-BSP-Usb-0007-0001-DeviceCaps_command04]
+supportsConnect   = {capabilities,supportsConnect}
+supportsSelfPowered  = {capabilities,supportsSelfPowered}
+supportsRemoteWakeup = {capabilities,supportsRemoteWakeup}
+
+[BASE-BSP-Usb-0007-0001-SetDeviceDescriptor_command06]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+
+[BASE-BSP-Usb-0007-0001-GetDeviceDescriptorSize_command07]
+expected=18
+[BASE-BSP-Usb-0007-0001-GetDeviceDescriptor_command08]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+
+[BASE-BSP-Usb-0007-0001-SetEndPoint_command09]
+mode = Interrupt
+direction = In
+
+[BASE-BSP-Usb-0007-0001-SetEndPoint_command10]
+mode = Interrupt
+direction = Out
+
+
+
+[BASE-BSP-Usb-0008-0001-LoadLogicalDevice_command02]
+driver = {Driver, driver}
+
+[BASE-BSP-Usb-0008-0001-DeviceCaps_command04]
+supportsConnect   = {capabilities,supportsConnect}
+supportsSelfPowered  = {capabilities,supportsSelfPowered}
+supportsRemoteWakeup = {capabilities,supportsRemoteWakeup}
+
+[BASE-BSP-Usb-0008-0001-SetDeviceDescriptor_command06]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+[BASE-BSP-Usb-0008-0001-GetDeviceDescriptorSize_command07]
+expected=18
+[BASE-BSP-Usb-0008-0001-GetDeviceDescriptor_command08]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+
+
+[BASE-BSP-Usb-0008-0001-SetEndPoint_command09]
+mode = Bulk
+direction = Out
+
+[BASE-BSP-Usb-0008-0001-SetInterface_command10]
+bandwidthBufferingMask = -1
+
+
+
+[BASE-BSP-Usb-0009-0001-LoadLogicalDevice_command02]
+driver = {Driver, driver}
+
+[BASE-BSP-Usb-0009-0001-DeviceCaps_command04]
+supportsConnect   = {capabilities,supportsConnect}
+supportsSelfPowered  = {capabilities,supportsSelfPowered}
+supportsRemoteWakeup = {capabilities,supportsRemoteWakeup}
+
+[BASE-BSP-Usb-0009-0001-SetDeviceDescriptor_command06]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+[BASE-BSP-Usb-0009-0001-GetDeviceDescriptorSize_command07]
+expected=18
+[BASE-BSP-Usb-0009-0001-GetDeviceDescriptor_command08]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+
+[BASE-BSP-Usb-0009-0001-SetEndPoint_command09]
+mode = Bulk
+direction = Out
+
+[BASE-BSP-Usb-0009-0001-SetInterface_command10]
+bandwidthBufferingMask =  -542356
+
+
+
+[BASE-BSP-Usb-0010-0001-LoadLogicalDevice_command02]
+driver = {Driver, driver}
+
+[BASE-BSP-Usb-0010-0001-DeviceCaps_command04]
+supportsConnect   = {capabilities,supportsConnect}
+supportsSelfPowered  = {capabilities,supportsSelfPowered}
+supportsRemoteWakeup = {capabilities,supportsRemoteWakeup}
+
+[BASE-BSP-Usb-0010-0001-SetDeviceDescriptor_command06]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+
+[BASE-BSP-Usb-0010-0001-GetDeviceDescriptorSize_command07]
+expected=18
+[BASE-BSP-Usb-0010-0001-GetDeviceDescriptor_command08]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+
+[BASE-BSP-Usb-0010-0001-SetEndPoint_command09]
+mode = Bulk
+direction = Out
+
+[BASE-BSP-Usb-0010-0001-SetInterface_command10]
+bandwidthBufferingMask =  43143
+
+
+
+[BASE-BSP-Usb-0011-0001-LoadLogicalDevice_command02]
+driver = {Driver, driver}
+
+[BASE-BSP-Usb-0011-0001-DeviceCaps_command04]
+supportsConnect   = {capabilities,supportsConnect}
+supportsSelfPowered  = {capabilities,supportsSelfPowered}
+supportsRemoteWakeup = {capabilities,supportsRemoteWakeup}
+
+[BASE-BSP-Usb-0011-0001-SetDeviceDescriptor_command06]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+
+[BASE-BSP-Usb-0011-0001-GetDeviceDescriptorSize_command07]
+expected=18
+[BASE-BSP-Usb-0011-0001-GetDeviceDescriptor_command08]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+
+[BASE-BSP-Usb-0011-0001-SetEndPoint_command09]
+mode = Bulk
+direction = Out
+
+[BASE-BSP-Usb-0011-0001-SetInterface_command10]
+bandwidthBufferingMask = 52
+
+
+
+[BASE-BSP-Usb-0012-0001-LoadLogicalDevice_command02]
+driver = {Driver, driver}
+
+[BASE-BSP-Usb-0012-0001-DeviceCaps_command04]
+supportsConnect   = {capabilities,supportsConnect}
+supportsSelfPowered  = {capabilities,supportsSelfPowered}
+supportsRemoteWakeup = {capabilities,supportsRemoteWakeup}
+
+[BASE-BSP-Usb-0012-0001-SetDeviceDescriptor_command06]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+[BASE-BSP-Usb-0012-0001-GetDeviceDescriptorSize_command07]
+expected=18
+[BASE-BSP-Usb-0012-0001-GetDeviceDescriptor_command08]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+
+[BASE-BSP-Usb-0012-0001-SetEndPoint_command09]
+mode = Bulk
+direction = Out
+
+[BASE-BSP-Usb-0012-0001-SetInterface_command10]
+bandwidthBufferingMask = 4
+
+
+
+[BASE-BSP-Usb-0013-0001-LoadLogicalDevice_command02]
+driver = {Driver, driver}
+
+[BASE-BSP-Usb-0013-0001-DeviceCaps_command04]
+supportsConnect   = {capabilities,supportsConnect}
+supportsSelfPowered  = {capabilities,supportsSelfPowered}
+supportsRemoteWakeup = {capabilities,supportsRemoteWakeup}
+
+[BASE-BSP-Usb-0013-0001-SetDeviceDescriptor_command06]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+[BASE-BSP-Usb-0013-0001-GetDeviceDescriptorSize_command07]
+expected=18
+[BASE-BSP-Usb-0013-0001-GetDeviceDescriptor_command08]
+USBVersionLow   = {USB_version,USBVersionLowFor2_00}
+USBVersionHigh = {USB_version,USBVersionHighFor2_00}
+VendorIDLow   = {VendorID,VendorIDLowForNokia}
+VendorIDHigh   = {VendorID,VendorIDHighForNokia}
+ProductIDLow   = {ProductID,ProductIDLowForTestDevice}
+ProductIDHigh   = {ProductID,ProductIDHighForTestDevice}
+ReleaseNumberLow  = {ReleaseNumber,ReleaseNumberLowFor1_00}
+ReleaseNumberHigh  = {ReleaseNumber,ReleaseNumberHighFor1_00}
+
+[BASE-BSP-Usb-0013-0001-SetEndPoint_command09]
+mode = Bulk
+direction = In
+
+[BASE-BSP-Usb-0013-0001-SetEndPoint_command10]
+mode = Bulk
+direction = Out
+
+[BASE-BSP-Usb-0013-0001-SetInterface_command11]
+bandwidthBufferingMask = 34
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/testdata/devlon52/t_usb.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,25 @@
+[capabilities]
+supportsConnect		= TRUE	
+supportsSelfPowered	= FALSE
+supportsRemoteWakeup	= FALSE
+
+[USB_version]
+USBVersionLowFor2_00 		= 0x00; 	
+#Low refers to 2 lower bytes of word 
+USBVersionHighFor2_00 		= 0x02; 	
+#High refers to 2 higher bytes of word 
+	
+[VendorID]
+VendorIDLowForNokia 		= 0x21;		
+VendorIDHighForNokia 		= 0x04;
+	
+[ProductID]
+ProductIDLowForTestDevice 	= 0x66;
+ProductIDHighForTestDevice 	= 0x06;
+
+[ReleaseNumber]
+ReleaseNumberLowFor1_00 	= 0x00;
+ReleaseNumberHighFor1_00 	= 0x01;
+
+[Driver]
+driver = eusbc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/testdata/devlon52/t_usb.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1 @@
+ 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/testdata/h4hrp/t_usb.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,25 @@
+[capabilities]
+supportsConnect		= TRUE	
+supportsSelfPowered	= TRUE
+supportsRemoteWakeup	= FALSE
+
+[USB_version]
+USBVersionLowFor2_00 		= 0x00; 	
+#Low refers to 2 lower bytes of word 
+USBVersionHighFor2_00 		= 0x02; 	
+#High refers to 2 higher bytes of word 
+	
+[VendorID]
+VendorIDLowForNokia 		= 0x21;		
+VendorIDHighForNokia 		= 0x04;
+	
+[ProductID]
+ProductIDLowForTestDevice 	= 0x66;
+ProductIDHighForTestDevice 	= 0x06;
+
+[ReleaseNumber]
+ReleaseNumberLowFor1_00 	= 0x00;
+ReleaseNumberHighFor1_00 	= 0x01;
+
+[Driver]
+driver = eusbc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/testdata/h4hrp/t_usb.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1 @@
+ 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/testdata/h6hrp/t_usb.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,25 @@
+[capabilities]
+supportsConnect		= TRUE	
+supportsSelfPowered	= TRUE
+supportsRemoteWakeup	= FALSE
+
+[USB_version]
+USBVersionLowFor2_00 		= 0x00; 	
+#Low refers to 2 lower bytes of word 
+USBVersionHighFor2_00 		= 0x02; 	
+#High refers to 2 higher bytes of word 
+	
+[VendorID]
+VendorIDLowForNokia 		= 0x21;		
+VendorIDHighForNokia 		= 0x04;
+	
+[ProductID]
+ProductIDLowForTestDevice 	= 0x66;
+ProductIDHighForTestDevice 	= 0x06;
+
+[ReleaseNumber]
+ReleaseNumberLowFor1_00 	= 0x00;
+ReleaseNumberHighFor1_00 	= 0x01;
+
+[Driver]
+driver = eusbc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/testdata/h6hrp/t_usb.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1 @@
+ 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/testdata/t_usb_environment.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1 @@
+ 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/testdata/tube/t_usb.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,25 @@
+[capabilities]
+supportsConnect		= TRUE	
+supportsSelfPowered	= FALSE
+supportsRemoteWakeup	= FALSE
+
+[USB_version]
+USBVersionLowFor2_00 		= 0x00; 	
+#Low refers to 2 lower bytes of word 
+USBVersionHighFor2_00 		= 0x02; 	
+#High refers to 2 higher bytes of word 
+	
+[VendorID]
+VendorIDLowForNokia 		= 0x21;		
+VendorIDHighForNokia 		= 0x04;
+	
+[ProductID]
+ProductIDLowForTestDevice 	= 0x66;
+ProductIDHighForTestDevice 	= 0x06;
+
+[ReleaseNumber]
+ReleaseNumberLowFor1_00 	= 0x00;
+ReleaseNumberHighFor1_00 	= 0x01;
+
+[Driver]
+driver = eusbc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/bsp/usb/testdata/tube/t_usb.tcs	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1 @@
+ 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/common/inc/ActiveCallbackBase.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __ACTIVE_CALLBACK_BASE__)
+#define __ACTIVE_CALLBACK_BASE__
+
+//	USER includes
+#include "DataWrapperBase.h"
+
+class CActiveCallbackBase : public CActiveCallback
+	{
+private:
+	class CActiveCallbackTimer : public CTimer
+		{
+	public:
+		static CActiveCallbackTimer*	NewL(CActive& aActive, TInt aPriority=EPriorityStandard);
+
+		//	CActive implementation
+		virtual void RunL();
+
+	protected:
+		CActiveCallbackTimer(CActive& aActive, TInt aPriority);
+
+	private:
+		CActive&	iActive;
+		};
+
+public:
+	virtual ~CActiveCallbackBase();
+	static CActiveCallbackBase*	NewL(CDataWrapperBase& aDataWrapperBase, TInt aPriority=EPriorityStandard);
+	static CActiveCallbackBase*	NewLC(CDataWrapperBase& aDataWrapperBase, TInt aPriority=EPriorityStandard);
+
+	void	Activate(TInt aIndex, TInt aTimeout=0);
+	void	KillTimer();
+
+protected:
+	CActiveCallbackBase(CDataWrapperBase& aDataWrapperBase, TInt aPriority);
+	void	ConstructL();
+
+public:
+	CDataWrapperBase&		iDataWrapperBase;
+
+private:
+	CActiveCallbackTimer*	iTimer;
+	};
+
+#endif /* __ACTIVE_CALLBACK_BASE__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/common/inc/DataWrapperBase.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __DATA_WRAPPER_BASE__)
+#define __DATA_WRAPPER_BASE__
+
+//	EPOC includes
+#include <datawrapper.h>
+#define SECS_TO_MS(x)  (x*1000000)
+
+typedef TBuf<KTEFMaxNameLength>	TIniDataName;
+
+_LIT(KConsname,				"Test Console");
+
+#define	GETFROMCONFIGOPTIONAL(aType, aSectName, aKeyName, aResult, aLogMessage)	\
+		if ( !Get##aType##FromConfig(aSectName, aKeyName, aResult) )	\
+			{															\
+			WARN_PRINTF3(aLogMessage, &aKeyName, aResult);				\
+			}
+
+#define	GETFROMCONFIGMANDATORY(aType, aSectName, aKeyName, aResult, aLogMessage, aDataOk)	\
+		if ( !Get##aType##FromConfig(aSectName, aKeyName, aResult) )	\
+			{															\
+			ERR_PRINTF2(aLogMessage, &aKeyName);						\
+			SetBlockResult(EFail);										\
+			aDataOk=EFalse;												\
+			}
+
+#define	GETSTRINGFROMCONFIGOPTIONAL(aSectName, aKeyName, aResult, aLogMessage)	\
+		if ( !GetStringFromConfig(aSectName, aKeyName, aResult) )		\
+			{															\
+			WARN_PRINTF3(aLogMessage, &aKeyName, &aResult);				\
+			}
+
+#define	GETSTRINGFROMCONFIGMANDATORY(aSectName, aKeyName, aResult, aLogMessage, aDataOk)	\
+		if ( !GetStringFromConfig(aSectName, aKeyName, aResult) )		\
+			{															\
+			ERR_PRINTF2(aLogMessage, &aKeyName);						\
+			SetBlockResult(EFail);										\
+			aDataOk=EFalse;												\
+			}
+
+class CDataWrapperBase : public CDataWrapper
+	{
+public:
+	class TEnumEntryTable
+		{
+	public:
+		const TDesC&	iString;
+		TInt			iValue;
+		};
+
+public:
+	TBool					GetBoolFromConfig(const TDesC& aSectName,const TDesC& aKeyName,TBool& aResult);
+	TBool					GetIntFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult);
+	TBool					GetStringFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult);
+	TBool					GetHexFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult);
+	TBool					GetUintFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TUint& aResult);
+	TBool					GetPointFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TPoint& aResult);
+	TBool					GetRectFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TRect& aResult);
+	TBool					GetSizeFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TSize& aResult);
+	TBool					GetEnumFromConfig(const TDesC& aSectName, const TDesC& aKeyName, const TEnumEntryTable* aTable, TInt& aResult);
+	TBool					GetOrFromConfig(const TDesC& aSectName, const TDesC& aKeyName, const TEnumEntryTable* aTable, TUint& aResult);
+	TBool 					GetUint8FromConfig(const TDesC& aSectName, const TDesC& aKeyName, TUint8& aResult);
+	void 					Timedelay(TInt aTimeoutInSecs);
+	virtual void			InitialiseL();
+	inline RFs&				FileServer();
+	inline CConsoleBase*	GetConsoleL();
+	TBool					TranslateEnumToString(CDataWrapper& aDataWrapper, const TDesC& aEnum, const TInt aValue, TDesC& aTrasnaltion);
+	TBool					TranslateNumberToEnumStringL(CDataWrapper& aDataWrapper, const TDesC& aSection, const TInt aValue, TDes& aTranslation);
+	void 					PromptMessageL(const TDesC& aMsg,const TInt aDelayMiliSec,TKeyCode& aKeyCode);
+	virtual TBool			DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	CDataWrapperBase();
+	virtual ~CDataWrapperBase();
+
+	TBool	GetCommandStringParameter(const TDesC& aParameterName, const TDesC& aSection, TPtrC& aResult, TText8 *aFileName, TInt aLine, TBool aMandatory);
+	TBool	GetCommandIntParameter(const TDesC& aParameterName, const TDesC& aSection, TInt& aResult, TText8 *aFileName, TInt aLine, TBool aMandatory);
+	TBool	GetCommandBoolParameter(const TDesC& aParameterName, const TDesC& aSection, TBool& aResult, TText8 *aFileName, TInt aLine, TBool aMandatory);
+
+private:
+	TBool	ProcessString(const TDesC& aStr, TUint& aResult, const TEnumEntryTable* aTable);
+	TBool	ProcessEntry(const TDesC& aStr, TUint& aResult, const TEnumEntryTable* aTable);
+	TBool 	ProcessEnumList(CDataWrapper& aDataWrapper,	const TDesC& aStr, const TDesC& aEnum, const TUint& aValue, TDes& aTranslation);
+	TBool	GetCommandStringParameterL(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult);
+	TBool 	KeyCheck();
+	void 	DoCmdUtilityPromptMessageL(const TDesC& aSection);
+
+private:
+	// Included ini files
+	RPointerArray<CIniData>	iInclude;
+	RPointerArray<HBufC>	iBuffer;
+	RFs                     iFs;
+	RTimer					iTimer;
+	};
+
+#include "DataWrapperBase.inl"
+
+#endif /* __DATA_WRAPPER_BASE__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/common/inc/DataWrapperBase.inl	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+RFs& CDataWrapperBase::FileServer()
+	{
+	return iFs;
+	}
+
+CConsoleBase* CDataWrapperBase::GetConsoleL()
+	{
+	return(Console::NewL(KConsname,TSize(KConsFullScreen,KConsFullScreen)));
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/common/inc/DrawUtils.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+
+#if (!defined __DRAWUTILS_H__)
+#define __DRAW_UTILS_H__
+
+//	EPOC Includes
+#include <hal.h>
+
+//	User Includes
+#include "DataWrapperBase.h"
+
+
+
+class CDrawUtils
+/**
+*	Test Utilities class
+@test
+@publishedPartner
+*/ 
+	{
+public:
+	static	void 	ColourFillUtility(TUint8 aColorVal,const TPoint& aPos);
+	static	void    DrawLineUtility(const TPoint& aStartPos, const TPoint& aEndPos,const TUint8 aColorVal);
+	static	void 	DrawSquareUtility(const TPoint& aTopLeft,const TInt aBoxHeight,const TInt aBoxWidth,TUint8 aColorVal);
+	static	void    DrawSquareOutLineUtility(const TPoint& aTopLeft,const TInt aBoxHeight,const TInt aBoxWidth,TUint8 aColorVal);
+	};
+
+
+ #endif /* __DRAW_UTILS_H__ */
+ 
+ 
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/common/src/ActiveCallbackBase.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,101 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "ActiveCallbackBase.h"
+
+CActiveCallbackBase::CActiveCallbackTimer* CActiveCallbackBase::CActiveCallbackTimer::NewL(CActive& aActive, TInt aPriority)
+	{
+	CActiveCallbackTimer*	self=new (ELeave) CActiveCallbackTimer(aActive, aPriority);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CActiveScheduler::Add(self);
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+CActiveCallbackBase::CActiveCallbackTimer::CActiveCallbackTimer(CActive& aActive, TInt aPriority)
+:	CTimer(aPriority)
+,	iActive(aActive)
+	{
+	}
+
+void CActiveCallbackBase::CActiveCallbackTimer::RunL()
+	{
+	if ( iStatus.Int()==KErrNone )
+		{
+		//	Timer termiated without error
+		if ( iActive.IsActive() )
+			{
+			iActive.Cancel();
+			}
+		}
+	}
+
+CActiveCallbackBase* CActiveCallbackBase::NewLC(CDataWrapperBase& aDataWrapperBase, TInt aPriority)
+	{
+	CActiveCallbackBase*    self=new(ELeave) CActiveCallbackBase(aDataWrapperBase, aPriority);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	return self;
+	}
+
+CActiveCallbackBase* CActiveCallbackBase::NewL(CDataWrapperBase& aDataWrapperBase, TInt aPriority)
+	{
+	CActiveCallbackBase*	self=CActiveCallbackBase::NewLC(aDataWrapperBase, aPriority);
+	CleanupStack::Pop();
+	return self;
+	}
+
+CActiveCallbackBase::CActiveCallbackBase(CDataWrapperBase& aDataWrapperBase, TInt aPriority)
+:	CActiveCallback(aDataWrapperBase, aPriority)
+,	iDataWrapperBase(aDataWrapperBase)
+,	iTimer(NULL)
+	{
+	}
+
+void CActiveCallbackBase::ConstructL()
+	{
+	CActiveCallback::ConstructL();
+	iTimer=CActiveCallbackTimer::NewL(*this);
+	}
+
+CActiveCallbackBase::~CActiveCallbackBase()
+/**
+ * Public destructor
+ */
+	{
+	delete iTimer;
+	iTimer=NULL;
+	}
+
+void CActiveCallbackBase::Activate(TInt aIndex, TInt aTimeout)
+	{
+	CActiveCallback::Activate(aIndex);
+	if ( aTimeout!=0 )
+		{
+		iTimer->After(aTimeout);
+		}
+	}
+
+void CActiveCallbackBase::KillTimer()
+	{
+	if ( iTimer->IsActive() )
+		{
+		iDataWrapperBase.INFO_PRINTF1(_L("CActiveCallbackBase::KillTimer"));
+		iTimer->Cancel();
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/common/src/DataWrapperBase.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,834 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "DataWrapperBase.h"
+
+#define SECS_TO_MICROSEC(x)  (x*1000000)
+
+/*@{*/
+///	Constant Literals used.
+_LIT(KPrefixHex,				"0x");
+_LIT(KPrefixOctal,				"0");
+_LIT(KSuffixBinary,				"b");
+
+_LIT(KIncludeSection,			"include");
+_LIT(KFile,						"file%d");
+_LIT(KMatch,					"*{*,*}*");
+_LIT(KStart,					"{");
+_LIT(KSeparator,				",");
+_LIT(KEnd,						"}");
+_LIT(KDataRead,					"INI READ : %S %S %S");
+_LIT(KTagPointX,				"%S_x");
+_LIT(KTagPointY,				"%S_y");
+_LIT(KTagRectMinX,				"%S_minX");
+_LIT(KTagRectMaxX,				"%S_maxX");
+_LIT(KTagRectMinY,				"%S_minY");
+_LIT(KTagRectMaxY,				"%S_maxY");
+_LIT(KTagSizeHeight,			"%S_height");
+_LIT(KTagSizeWidth,				"%S_width");
+_LIT(KEnumElements,				"enum_elements");
+_LIT(KPrefixHexKey,				"0x%S");
+
+_LIT(KCmdUtilityPromptMessage,	"utilityPromptMessage");
+_LIT(KPromptText,				"message");
+_LIT(KDelay,					"delay");
+_LIT(KExpectedKey,				"keyCode");
+/*@}*/
+
+const TInt	KDefaultDelay	=	10;
+const TInt	KBounceErrKey	=	50000;
+
+CDataWrapperBase::CDataWrapperBase()
+:	CDataWrapper()
+	{
+	}
+
+CDataWrapperBase::~CDataWrapperBase()
+/**
+ * Public destructor
+ */
+	{
+	iInclude.ResetAndDestroy();
+	iBuffer.ResetAndDestroy();
+	iFs.Close();
+	}
+
+void CDataWrapperBase::InitialiseL()
+	{
+	iTimer.CreateLocal();
+	CDataWrapper::InitialiseL();
+	TBuf<KMaxTestExecuteCommandLength>	tempStore;
+	TPtrC		fileName;
+	TBool		moreData=ETrue;
+	TBool		index=0;
+	while ( moreData )
+		{
+		tempStore.Format(KFile(), ++index);
+		moreData=GetStringFromConfig(KIncludeSection, tempStore, fileName);
+
+		if (moreData)
+			{
+			CIniData*	iniData=CIniData::NewL(fileName);
+			CleanupStack::PushL(iniData);
+			iInclude.Append(iniData);
+			CleanupStack::Pop(iniData);
+			}
+		}
+	User::LeaveIfError(iFs.Connect());
+	}
+
+TBool CDataWrapperBase::GetBoolFromConfig(const TDesC& aSectName,const TDesC& aKeyName,TBool& aResult)
+/**
+ * Reads the value present from the test steps ini file within the mentioned section name and key name
+ * Copies the value to the TBool reference passed in possible values TRUE, FALSE
+ * @param aSectName - Section within the test steps ini file
+ * @param aKeyName - Name of a key within a section
+ * @return aResult - The value of the boolean
+ * @return TBool - ETrue for found, EFalse for not found
+ */
+	{
+	TBool	ret=EFalse;
+	TPtrC	result;
+	TRAPD(err, ret=GetCommandStringParameterL(aSectName, aKeyName, result));
+	if ( err != KErrNone )
+		{
+		ret=EFalse;
+		}
+	if ( ret )
+		{
+		_LIT(KTrue,"true");
+		aResult=(result.FindF(KTrue) != KErrNotFound);
+		}
+
+	return ret;
+	}
+
+TBool CDataWrapperBase::GetIntFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult)
+/**
+ * Reads the value present from the test steps ini file within the mentioned section name and key name
+ * Copies the value to the TInt reference passed in
+ * @param aSectName - Section within the test steps ini file
+ * @param aKeyName - Name of a key within a section
+ * @return aResult - The value of the integer
+ * @return TBool - ETrue for found, EFalse for not found
+ */
+	{
+	TPtrC	result;
+	TBool	ret=EFalse;
+	TRAPD(err, ret=GetCommandStringParameterL(aSectName, aKeyName, result));
+	if ( err != KErrNone )
+		{
+		ret=EFalse;
+		}
+	if ( ret )
+		{
+		TLex	lex(result);
+		ret=(lex.Val(aResult)==KErrNone);
+		}
+
+	return ret;
+	}
+
+TBool CDataWrapperBase::GetStringFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult)
+/**
+ * Reads the value present from the test steps ini file within the mentioned section name and key name
+ * Copies the value to the TPtrC reference passed in
+ * @param aSectName - Section within the test steps ini file
+ * @param aKeyName - Name of a key within a section
+ * @return aResult - Reference to the string on the heap
+ * @return TBool - ETrue for found, EFalse for not found
+ */
+	{
+	TBool	ret=EFalse;
+	TRAPD(err, ret=GetCommandStringParameterL(aSectName, aKeyName, aResult));
+	if ( err != KErrNone )
+		{
+		ret=EFalse;
+		}
+	return ret;
+	}
+
+TBool CDataWrapperBase::GetHexFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult)
+/**
+ * Reads the value present from the test steps ini file within the mentioned section name and key name
+ * Copies the value to the TInt reference passed in. The value can optionally be prefixed with 0x
+ * @param aSectName - Section within the test steps ini file
+ * @param aKeyName - Name of a key within a section
+ * @return aResult - The integer value of the Hex input
+ * @return TBool - ETrue for found, EFalse for not found
+ */
+	{
+	TPtrC	result;
+	TBool	ret=EFalse;
+	TRAPD(err, ret=GetCommandStringParameterL(aSectName, aKeyName, result));
+	if ( err != KErrNone )
+		{
+		ret=EFalse;
+		}
+	if ( ret )
+		{
+		TLex	lex;
+		if( result.FindC(KPrefixHex)==KErrNone )
+			{
+			lex=result.Mid(KPrefixHex().Length());
+			}
+		else
+			{
+			lex=result;
+			}
+		ret=(lex.Val((TUint &)aResult, EHex)==KErrNone);
+		}
+
+	return ret;
+	}
+
+TBool CDataWrapperBase::GetUintFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TUint& aResult)
+/**
+ * Reads the value present from the test steps ini file within the mentioned section name and key name
+ * Copies the value to the TUint reference passed in.
+ * If the value is prefixed with 0x the value is read as a hexidecimal value
+ * If the value is suffixed with b the value is read as a binary value
+ * If the value is prefixed with a 0 the value is read as an octal value
+ * If it does not match the above it is read in as an integer
+ * @param aSectName - Section within the test steps ini file
+ * @param aKeyName - Name of a key within a section
+ * @return aResult - The integer value of the Hex input
+ * @return TBool - ETrue for found, EFalse for not found
+ */
+	{
+	TPtrC	result;
+	TBool	ret=EFalse;
+	TRAPD(err, ret=GetCommandStringParameterL(aSectName, aKeyName, result));
+	if ( err != KErrNone )
+		{
+		ret=EFalse;
+		}
+	if ( ret )
+		{
+		TLex	lex(result);
+		if( result.FindC(KPrefixHex)==KErrNone )
+			{
+			lex=result.Mid(KPrefixHex().Length());
+			ret=(lex.Val(aResult, EHex)==KErrNone);
+			}
+		else
+			{
+			TInt	binarySuffixPosition=result.Length()-KSuffixBinary().Length();
+			if ( result.FindC(KSuffixBinary)==binarySuffixPosition )
+				{
+				lex=result.Left(binarySuffixPosition);
+				ret=(lex.Val(aResult, EBinary)==KErrNone);
+				}
+			else
+				{
+				if( result.FindC(KPrefixOctal)==KErrNone )
+					{
+					ret=(lex.Val(aResult, EOctal)==KErrNone);
+					}
+				else
+					{
+					TInt	intResult;
+					ret=(lex.Val(intResult)==KErrNone);
+					if ( ret )
+						{
+						aResult=(TUint)intResult;
+						}
+					}
+				}
+			}
+		}
+
+	return ret;
+	}
+
+TBool CDataWrapperBase::GetEnumFromConfig(const TDesC& aSectName, const TDesC& aKeyName, const TEnumEntryTable* aTable, TInt& aResult)
+	{
+	TPtrC	str;
+	TBool	ret=GetStringFromConfig(aSectName, aKeyName, str);
+
+	if ( ret )
+		{
+		TBool	found=EFalse;
+		TInt	index=0;
+		while ( (aTable[index].iValue!=-1) && !found )
+			{
+			if ( aTable[index].iString==str )
+				{
+				found=ETrue;
+				aResult=aTable[index].iValue;
+				}
+			else
+				{
+				++index;
+				}
+			}
+
+		if ( !found )
+			{
+			ret=GetIntFromConfig(aSectName, aKeyName, aResult);
+			}
+		}
+
+	return ret;
+	}
+
+TBool CDataWrapperBase::GetOrFromConfig(const TDesC& aSectName, const TDesC& aKeyName, const TEnumEntryTable* aTable, TUint& aResult)
+	{
+	TPtrC 	str;
+	TBool	ret=GetStringFromConfig(aSectName, aKeyName, str);
+	if ( ret )
+		{
+		TUint	temp=0;
+		ret=ProcessString(str, temp, aTable);
+		if ( ret )
+			{
+			aResult=temp;
+			}
+		}
+
+	return ret;
+	}
+
+TBool CDataWrapperBase::ProcessString(const TDesC& aStr, TUint& aResult, const TEnumEntryTable* aTable)
+	{
+	TBool	ret=ETrue;
+	TInt	location=aStr.Match(_L("*|*"));
+	if( location!=KErrNotFound )
+		{
+		// Converting Left part of the data
+		TPtrC	tempStr=aStr.Left(location);
+		ret=ProcessString(tempStr, aResult, aTable);
+
+		// Converting right data can be with another "|"
+		tempStr.Set(aStr.Mid(location+1));
+
+		TUint	temp;
+		if ( ProcessString(tempStr, temp, aTable) )
+			{
+			aResult|=temp;
+			}
+		else
+			{
+			ret=EFalse;
+			}
+		}
+	else
+		{
+		ret=ProcessEntry(aStr, aResult, aTable);
+		}
+
+	return ret;
+	}
+
+TBool CDataWrapperBase::ProcessEntry(const TDesC& aStr, TUint& aResult, const TEnumEntryTable* aTable)
+	{
+	TBool	ret=ETrue;
+
+	TBool	found=EFalse;
+	TInt	index=0;
+	while ( (aTable[index].iValue!=-1) && !found )
+		{
+		if ( aTable[index].iString==aStr )
+			{
+			found=ETrue;
+			aResult=aTable[index].iValue;
+			}
+		else
+			{
+			++index;
+			}
+		}
+
+	if ( !found )
+		{
+		TUint	flags;
+		TLex	lex(aStr);
+		ret=(lex.Val(flags, EHex)==KErrNone);
+		if ( ret )
+			{
+			aResult=flags;
+			}
+		}
+
+	return ret;
+	}
+
+TBool CDataWrapperBase::GetCommandStringParameterL(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult)
+	{
+	TBool	ret=EFalse;
+
+	if ( aSectName.Length()!=0 )
+		{
+		ret=CDataWrapper::GetStringFromConfig(aSectName, aKeyName, aResult);
+
+		for ( TInt index=iInclude.Count(); (index>0) && (!ret); )
+			{
+			ret=iInclude[--index]->FindVar(aSectName, aKeyName, aResult);
+			if ( ret )
+				{
+				INFO_PRINTF4(KDataRead, &aSectName, &aKeyName, &aResult);
+				}
+			}
+		}
+
+	if ( ret )
+		{
+		if ( aResult.Match(KMatch)!=KErrNotFound )
+			{
+			//	We have an entry of the format
+			//	entry =*{section,entry}*
+			//	where * is one or more characters
+			//	We need to construct this from other data in the ini file replacing {*,*}
+			//	with the data from
+			//	[section]
+			//	entry =some_value
+			HBufC*	buffer=HBufC::NewLC(aResult.Length());
+			buffer->Des().Copy(aResult);
+
+			TInt	startLength=KStart().Length();
+			TInt	sparatorLength=KSeparator().Length();
+			TInt	endLength=KEnd().Length();
+			TInt	bufferLength;
+			TInt	start;
+			TInt	sparator;
+			TInt	end;
+			TPtrC	remaining;
+			TLex	lex;
+			do
+				{
+				bufferLength=buffer->Length();
+				start=buffer->Find(KStart);
+
+				remaining.Set(buffer->Des().Right(bufferLength-start-startLength));
+				sparator=remaining.Find(KSeparator);
+				remaining.Set(remaining.Right(remaining.Length()-sparator-sparatorLength));
+				sparator += (start + startLength);
+
+				end=remaining.Find(KEnd) + sparator + sparatorLength;
+
+				TPtrC	sectionName(buffer->Ptr()+start+startLength, sparator-start-startLength);
+				TPtrC	keyName(buffer->Ptr()+sparator+sparatorLength, end-sparator-sparatorLength);
+				sectionName.Set(TLex(sectionName).NextToken());
+				keyName.Set(TLex(keyName).NextToken());
+
+				TInt	entrySize=0;
+				TPtrC	entryData;
+				TBool	found=CDataWrapper::GetStringFromConfig(sectionName, keyName, entryData);
+				for ( TInt index=iInclude.Count(); (index>0) && (!found);  )
+					{
+					found=iInclude[--index]->FindVar(sectionName, keyName, entryData);
+					}
+				if ( found )
+					{
+					entrySize=entryData.Length();
+					}
+
+				TInt	newLength=start + bufferLength - end - endLength + entrySize;
+				HBufC*	bufferNew=HBufC::NewLC(newLength);
+				bufferNew->Des().Copy(buffer->Ptr(), start);
+				if ( entrySize>0 )
+					{
+					bufferNew->Des().Append(entryData);
+					}
+				bufferNew->Des().Append(buffer->Ptr() + end + endLength, bufferLength - end - endLength);
+				CleanupStack::Pop(bufferNew);
+				CleanupStack::PopAndDestroy(buffer);
+				buffer=bufferNew;
+				CleanupStack::PushL(buffer);
+				}
+			while ( buffer->Match(KMatch)!=KErrNotFound );
+			iBuffer.Append(buffer);
+			CleanupStack::Pop(buffer);
+			aResult.Set(*buffer);
+			INFO_PRINTF4(KDataRead, &aSectName, &aKeyName, &aResult);
+			}
+		}
+
+	return ret;
+	}
+
+TBool CDataWrapperBase::GetCommandStringParameter(const TDesC& aParameterName, const TDesC& aSection, TPtrC& aResult, TText8 *aFileName, TInt aLine, TBool aMandatory)
+	{
+	TBool	ret = GetStringFromConfig(aSection, aParameterName, aResult);
+	if (aMandatory && !ret)
+		{
+		Logger().LogExtra(aFileName, aLine, ESevrErr, _L("No %S"), &aParameterName);
+		SetBlockResult(EFail);
+		}
+	return ret;
+	}
+
+TBool CDataWrapperBase::GetCommandIntParameter(const TDesC& aParameterName, const TDesC& aSection, TInt& aResult, TText8* aFileName, TInt aLine, TBool aMandatory)
+	{
+	TBool	ret = GetIntFromConfig(aSection, aParameterName, aResult);
+	if (aMandatory && !ret)
+		{
+		Logger().LogExtra(aFileName, aLine, ESevrErr, _L("No %S"), &aParameterName);
+		SetBlockResult(EFail);
+		}
+	return ret;
+	}
+
+TBool CDataWrapperBase::GetCommandBoolParameter(const TDesC& aParameterName, const TDesC& aSection, TBool& aResult, TText8 *aFileName, TInt aLine, TBool aMandatory)
+	{
+	TBool	ret = GetBoolFromConfig(aSection, aParameterName, aResult);
+	if (aMandatory && !ret)
+		{
+		Logger().LogExtra(aFileName, aLine, ESevrErr, _L("No %S"), &aParameterName);
+		SetBlockResult(EFail);
+		}
+	return ret;
+	}
+
+TBool CDataWrapperBase::GetPointFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TPoint& aResult)
+/**
+ * Reads the value present from the test steps ini file within the mentioned section name and key name
+ * Copies the value to the TPoint reference passed in
+ * @param aSectName - Section within the test steps ini file
+ * @param aKeyName - Name of a key within a section
+ * @return aResult - The value of the TPoint
+ * @return TBool - ETrue for found, EFalse for not found
+ */
+	{
+	TBuf<KMaxTestExecuteCommandLength>	tempStore;
+
+	TInt	x;
+	tempStore.Format(KTagPointX, &aKeyName);
+	TBool	ret=GetIntFromConfig(aSectName, tempStore, x);
+	TInt	y;
+	tempStore.Format(KTagPointY, &aKeyName);
+	if ( !GetIntFromConfig(aSectName, tempStore, y) )
+		{
+		ret=EFalse;
+		}
+	if ( ret )
+		{
+		aResult.SetXY(x, y);
+		}
+
+	return ret;
+	}
+
+TBool CDataWrapperBase::GetRectFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TRect& aResult)
+/**
+ * Reads the value present from the test steps ini file within the mentioned section name and key name
+ * Copies the value to the TPoint reference passed in
+ * @param aSectName - Section within the test steps ini file
+ * @param aKeyName - Name of a key within a section
+ * @return aResult - The value of the TRect
+ * @return TBool - ETrue for found, EFalse for not found
+ */
+	{
+	TBuf<KMaxTestExecuteCommandLength>	tempStore;
+
+	TInt	minX;
+	tempStore.Format(KTagRectMinX, &aKeyName);
+	TBool	ret=GetIntFromConfig(aSectName, tempStore, minX);
+
+	TInt	maxX;
+	tempStore.Format(KTagRectMaxX, &aKeyName);
+	if ( !GetIntFromConfig(aSectName, tempStore, maxX) )
+		{
+		ret=EFalse;
+		}
+
+	TInt	minY;
+	tempStore.Format(KTagRectMinY, &aKeyName);
+	if ( !GetIntFromConfig(aSectName, tempStore, minY) )
+		{
+		ret=EFalse;
+		}
+
+	TInt	maxY;
+	tempStore.Format(KTagRectMaxY, &aKeyName);
+	if ( !GetIntFromConfig(aSectName, tempStore, maxY) )
+		{
+		ret=EFalse;
+		}
+
+	if ( ret )
+		{
+		aResult.SetRect(minX, minY, maxX, maxY);
+		}
+
+	return ret;
+	}
+
+TBool CDataWrapperBase::GetSizeFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TSize& aResult)
+/**
+ * Reads the value present from the test steps ini file within the mentioned section name and key name
+ * Copies the value to the TPoint reference passed in
+ * @param aSectName - Section within the test steps ini file
+ * @param aKeyName - Name of a key within a section
+ * @return aResult - The value of the TPoint
+ * @return TBool - ETrue for found, EFalse for not found
+ */
+	{
+	TBuf<KMaxTestExecuteCommandLength>	tempStore;
+
+	TInt	height;
+	tempStore.Format(KTagSizeHeight, &aKeyName);
+	TBool	ret=GetIntFromConfig(aSectName, tempStore, height);
+	TInt	width;
+	tempStore.Format(KTagSizeWidth, &aKeyName);
+	if ( !GetIntFromConfig(aSectName, tempStore, width) )
+		{
+		ret=EFalse;
+		}
+	if ( ret )
+		{
+		aResult.SetSize(width, height);
+		}
+
+	return ret;
+	}
+
+TBool CDataWrapperBase::GetUint8FromConfig(const TDesC& aSectName, const TDesC& aKeyName, TUint8& aResult)
+	{
+	TUint	temp;
+	TBool	ret=GetUintFromConfig(aSectName, aKeyName,temp);
+	if ( ret )
+		{
+		aResult=(TUint8)temp;
+		}
+
+	return ret;
+	}
+
+void CDataWrapperBase::Timedelay(TInt aTimeoutInSecs)
+/*Utility function to produce time delay
+@param aTimeoutInSecs Times in micro seconds
+*/
+	{
+	TRequestStatus	status;
+	iTimer.After(status, aTimeoutInSecs);
+	User::WaitForRequest(status);
+	}
+
+TBool CDataWrapperBase::TranslateEnumToString(CDataWrapper& aDataWrapper,
+										const TDesC& aEnum,
+										const TInt aValue,
+										TDesC& aTranslation)
+/* Function translates
+*/
+	{
+	TBool ret = ETrue;
+
+	RBuf desToWrapInt;
+	RBuf desToFormHex;
+	TInt intError = desToWrapInt.Create(KMaxFullName);
+	TInt hexError = desToFormHex.Create(KMaxFullName);
+	if(intError == KErrNone && hexError == KErrNone)
+		{
+		desToFormHex.NumFixedWidth(aValue, EHex, 8);
+		desToWrapInt.Format(KPrefixHexKey, &desToFormHex);
+		if (!aDataWrapper.GetStringFromConfig(aEnum, desToWrapInt, static_cast<TPtrC&>(aTranslation)))
+			{
+			ret = EFalse;
+			}
+		}
+	else
+		{
+		ret = EFalse;
+		}
+
+	if(hexError == KErrNone)
+		{
+		desToFormHex.Close();
+		}
+	if(intError == KErrNone)
+		{
+		desToWrapInt.Close();
+		}
+
+	return ret;
+	}
+
+TBool CDataWrapperBase::ProcessEnumList(CDataWrapper& aDataWrapper,
+									const TDesC& aStr,
+									const TDesC& aEnum,
+									const TUint& aValue,
+									TDes& aTranslation)
+	{
+	TBool	ret=ETrue;
+	TInt	location=aStr.Match(_L("*|*"));
+	if( location!=KErrNotFound )
+		{
+		// Converting Left part of the data
+		TPtrC	tempStr=aStr.Left(location);
+		ret=ProcessEnumList(aDataWrapper, tempStr, aEnum, aValue, aTranslation);
+
+		// Converting right data can be with another "|"
+		tempStr.Set(aStr.Mid(location+1));
+
+		if ( !ProcessEnumList(aDataWrapper, tempStr, aEnum, aValue, aTranslation) )
+			{
+			ret=EFalse;
+			}
+		}
+	else
+		{
+		TInt value;
+		if (aDataWrapper.GetHexFromConfig(aEnum, aStr, value ))
+			{
+			if (value & aValue)
+				{
+				if ( aTranslation.Length() )
+					{
+					aTranslation.Append(_L("|"));
+					}
+
+				aTranslation.Append(aStr);
+				}
+			}
+		else
+			{
+			ret = EFalse;
+			}
+		}
+
+	return ret;
+	}
+
+TBool CDataWrapperBase::TranslateNumberToEnumStringL(CDataWrapper& aDataWrapper,
+									   const TDesC& aSection,
+									   const TInt aValue,
+									   TDes& aTranslation)
+	{
+	TBool ret = EFalse;
+
+	TPtrC	enumElements;
+	if ( aDataWrapper.GetStringFromConfig(aSection, KEnumElements, enumElements) )
+		{
+		ret = ProcessEnumList(aDataWrapper, enumElements, aSection, aValue, aTranslation);
+		}
+
+	return ret;
+	}
+/**
+ * Function which creates a consoles and writes to and reads from the console
+ *
+ * @param aMsg			Message wrote to the console
+ * @param aDelayMiliSec  	waiting period for user input, read from config file
+ * @param aKeyCode		specifies key required to be pressed to pass the test
+ *
+ * @leave					System wide error
+ */
+
+void CDataWrapperBase::PromptMessageL(const TDesC& aMsg,
+								const TInt aDelayMiliSec,
+								TKeyCode& aKeyCode)
+	{
+	CConsoleBase* console = GetConsoleL();
+	CleanupStack::PushL(console);
+
+	if( aMsg.Length() != 0 )
+		{
+		console->Printf(aMsg);
+		}
+	TRequestStatus keyStatus(KRequestPending);
+	TRequestStatus timerStatus(KRequestPending);
+	aKeyCode=EKeyNull;
+	iTimer.After(timerStatus,SECS_TO_MICROSEC(aDelayMiliSec));
+	console->Read(keyStatus);
+	User::WaitForRequest(keyStatus,timerStatus);
+	if (keyStatus!=KRequestPending)
+		{
+		//Keypressed
+		iTimer.Cancel();
+		aKeyCode =console->KeyCode();
+		User::WaitForRequest(timerStatus);
+		}
+	else
+		{
+		console->ReadCancel();
+		SetBlockResult(EFail);
+		}
+
+	CleanupStack::PopAndDestroy(console);
+	}
+/**
+ * Process a command read from the script file calling the required function
+ *
+ * @param aSection			The section in the ini containing data for the command
+ * @param aCommand			Command to be called
+ *
+ * @leave					System wide error
+ */
+
+TBool CDataWrapperBase::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt /*aAsyncErrorIndex*/)
+	{
+
+	if ( aCommand==KCmdUtilityPromptMessage )
+		{
+		DoCmdUtilityPromptMessageL(aSection);
+		}
+	else
+		{
+		ERR_PRINTF1(_L("No Function Matches Requested Command"));
+		SetBlockResult(EFail);
+		}
+
+	return ETrue;
+	}
+/**
+ * Functon called through TEF for manual verification which writes a message to the console and reads user input keyboard
+ *
+ * @param aSection			The section in the ini containing data for the command
+ *
+ * @leave					System wide error
+ */
+
+void CDataWrapperBase::DoCmdUtilityPromptMessageL(const TDesC& aSection)
+
+	{
+	INFO_PRINTF1(_L("DoCmdUtilityPromptMessageL called"));
+
+	TPtrC	message;
+	TBool   hasMessage =  GetStringFromConfig(aSection, KPromptText(), message);
+
+	if( !hasMessage )
+		{
+		INFO_PRINTF1(_L("Prompt message not specified in the ini file"));
+		}
+
+	// 10 second default delay
+	TInt	delay = KDefaultDelay;
+	GetIntFromConfig(aSection, KDelay(), delay);
+	TKeyCode keyCode;
+	do
+		{
+		PromptMessageL(message, delay, keyCode);
+		}while (keyCode>KBounceErrKey);
+	INFO_PRINTF2(_L("Key %d pressed"), keyCode);
+	TInt expectedKey;
+	if( GetIntFromConfig(aSection, KExpectedKey(), expectedKey) )
+		{
+		// compares key pressed with key in config file
+		if(keyCode != (TKeyCode)expectedKey)
+			{
+			ERR_PRINTF3(_L("expectedKey=%d pressed key=%d"), expectedKey, keyCode);
+			SetBlockResult(EFail);
+			}
+		}
+	else
+		{
+		ERR_PRINTF1(_L("KeyCode not specified in the ini file"));
+		SetBlockResult(EFail);
+		}
+
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/common/src/DrawUtils.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,257 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "DrawUtils.h"
+
+//These are for masks and shifts for rgb 332 data format.
+const 	TUint Blue_Mask                 =0x03;
+const	TUint Green_Mask                =0x1C;
+const	TUint Red_Mask                  =0xE0;
+const	TUint BBP8_GreenShift           =2;
+const	TUint BBP8_RedShift             =5;
+
+//Number of bits per pixel
+const TInt	BPP8                    =8;
+const TInt	BPP12                   =12;
+const TInt	BPP16                   =16;
+const TInt	BPP24                   =24;
+const TInt	BPP32                   =32;
+
+//16BPP has rgb565 format rrrrrggggggbbbbb.
+const TInt 	BPP16RedShift           =13;
+const TInt	BPP16GreenShift         =8;
+const TInt	BPP16BlueShift          =3;
+
+//12 bpp has rgb 444 format rrrrggggbbbb.
+const TInt	BPP12RedShift           =9;
+const TInt	BPP12GreenShift         =5;
+const TInt	BPP12BlueShift          =2;
+	
+//24bpp has rgb888 format and 32 bpp has AlRGB 8888 format where Al is alpha.
+const TInt	BPP32RedShift           =21;
+const TInt	BPP32GreenShift         =13;
+const TInt	BPP32BlueShift          =6;
+	
+
+void CDrawUtils::ColourFillUtility(TUint8 aColorVal,const TPoint& aPos)
+/**
+*
+*  Utility Function that fills required colour in at the given x,y positions on the screen,
+*  in a 16 pixels *	16 pixels lines area 
+*
+* 		@param 				aColorVal:  The Colour to be filled in .
+*							Scenarios:
+* 							1) 	4 bits per pixel mode
+* 							   	aColorVal contains empty upper
+* 							   	4 bits & only contains 4 bits of info, 
+* 							2)	8 bits per pixel  mode
+* 								all 8 bits in aColorVal are filled and the value,
+* 								is taken from the standard  OS palette.
+* 							3)	Other modes: all other modes aColorVal
+*			 					holds data in rgb 332 format.
+*
+* 		@param 				aPos  		The position of the pixel 
+*
+* 
+*/
+    {
+    //get screendriver attributes
+    TInt displayMode;
+    HAL::Get(HAL::EDisplayMode, displayMode);
+    TInt displayMemoryAddress;
+    HAL::Get(HAL::EDisplayMemoryAddress, displayMemoryAddress);
+    TInt displayOffsetBetweenLines      =displayMode;
+    HAL::Get(HAL::EDisplayOffsetBetweenLines, displayOffsetBetweenLines);
+    TInt offsetToFirstPixel             =displayMode;
+    HAL::Get(HAL::EDisplayOffsetToFirstPixel, offsetToFirstPixel);
+    TInt displayBitsPerPixel            =displayMode;
+    HAL::Get(HAL::EDisplayBitsPerPixel, displayBitsPerPixel);
+	
+    TUint       red             =(aColorVal&Red_Mask)>>BBP8_RedShift;	
+    TUint       green           =(aColorVal&Green_Mask)>>BBP8_GreenShift;
+    TUint       blue            =aColorVal&Blue_Mask;
+    TUint8      color8bpp       =aColorVal; 
+    TInt        bbp             =displayBitsPerPixel;
+  	
+    //Shifts to convert RGB332 into a respective formats.
+    //12 bpp has rgb format 444, 16 bpp has rgb format 565, 24 bpp has rgb 888 format, 32 bpp has Al rgb 8888 format : Al is alpha 
+    TUint color12bpp=(red << BPP12RedShift) | (green << BPP12GreenShift) | (blue << BPP12BlueShift);
+    TUint color16bpp=(red << BPP16RedShift) | (green << BPP16GreenShift) | (blue << BPP16BlueShift);
+    TUint color32bpp=(red << BPP32RedShift) | (green << BPP32GreenShift) | (blue << BPP32BlueShift);
+    
+    if( displayBitsPerPixel == BPP12 )
+        {
+        bbp = BPP16;
+        }
+    else if ( displayBitsPerPixel == BPP24 )
+        {
+        bbp = BPP32;
+        }
+    else
+        {
+        bbp = displayBitsPerPixel;
+        }
+		
+    TInt baseAddress=displayMemoryAddress + offsetToFirstPixel + aPos.iY * displayOffsetBetweenLines + aPos.iX * bbp / BPP8;
+    if ( displayBitsPerPixel==BPP8 )
+          {
+          TUint8 *pixelPtr=(TUint8*)baseAddress;
+          *pixelPtr++=color8bpp;
+          *pixelPtr=color8bpp;
+          }
+    else if ( displayBitsPerPixel == BPP12 )
+          {
+          TUint16 *pixelPtr=(TUint16*)baseAddress;
+          *pixelPtr++=color12bpp;
+          *pixelPtr=color12bpp;	
+          }
+    else if ( displayBitsPerPixel == BPP16 )
+          {
+          TUint16 *pixelPtr	=(TUint16*)baseAddress;
+          *pixelPtr++=color16bpp;
+          *pixelPtr=color16bpp;
+          }
+    else if ( bbp == BPP32 )
+          {
+          TUint32 *pixelPtr=(TUint32*)baseAddress;
+          *pixelPtr++=color32bpp;
+          *pixelPtr=color32bpp;
+          }
+    }
+	
+		
+
+
+void  CDrawUtils::DrawSquareUtility(const TPoint& aTopLeft,const TInt aBoxLength,const TInt aBoxWidth,TUint8 aColorVal)
+/**
+ *
+ * Draw a filled in square  according to the length and width supplied
+ *
+ * @param 		aTopLeft Pixel position of the top left corner of the box	
+ *
+ * @param 		aBoxLength length in pixels of the box to be drawn.
+ *
+ * @param 		aBoxWidth width  in pixels of the box to be drawn.
+ *
+ * @param 		aColorVal colour of the box
+ *
+ */
+ 	{
+ 	TInt 	offSet		=1;	
+	TInt 	xOrigin		=0;
+	TPoint 	endPos;
+	TPoint	currentPos;
+	if( aTopLeft.iX > xOrigin )
+		{
+		endPos.iX	=aTopLeft.iX + aBoxWidth - offSet;
+		}
+	else//TopLeft x co-ordinate is zero
+		{
+		endPos.iX	=aTopLeft.iX + aBoxWidth;
+		}
+		
+	endPos.iY	=aTopLeft.iY;
+	currentPos	=aTopLeft;
+			
+	for(TInt i=0; i<=aBoxLength; i++)
+ 		{
+ 		DrawLineUtility(currentPos,endPos,aColorVal);
+ 		currentPos.iY	=currentPos.iY + offSet;
+ 		endPos.iY		=endPos.iY + offSet;
+ 		}	
+	}
+	
+	
+void  CDrawUtils::DrawLineUtility(const TPoint& aStartPos, const TPoint& aEndPos,const TUint8 aColorVal)
+/**
+ *
+ * Draw a line  with colour specified 
+ *
+ * @param 		aStartPos  pixel position to  start line.
+ * @param 		aEndPos    pixel position to  end line.
+ *
+ */	
+	{	
+ 	TPoint 		step		=aEndPos-aStartPos;
+ 	TBool 		isDiagonal	=EFalse;
+ 	TInt		origin		=0;
+ 	if	(( step.iX>origin ) && ( step.iY>origin ))
+ 		{
+ 		isDiagonal	=ETrue;
+ 		}		
+ 	TPoint 		currentPos=aStartPos;	
+ 	for(TInt i=0; i<=step.iX; i++)
+ 		{
+ 		currentPos.iX	=( aStartPos.iX + i );
+ 		for(TInt j=0; j<=step.iY; j++)
+ 			{
+ 			if	( !isDiagonal )
+ 				{
+ 				currentPos.iY	=( aStartPos.iY + j );
+ 				ColourFillUtility(aColorVal, currentPos);
+ 				}
+ 			else //line is diagonal
+ 				{
+ 				currentPos.iY	=( aStartPos.iY + i );
+ 				ColourFillUtility( aColorVal,currentPos);	
+ 				break;
+ 				}
+ 			}
+ 		}
+	}
+	
+void    CDrawUtils::DrawSquareOutLineUtility(const TPoint& aTopLeft,const TInt aBoxHeight,const TInt aBoxWidth,TUint8 aColorVal)
+/**
+ *
+ * Draw an outline of a square i.e a square that has not been filled in with colour
+ * Draw a filled in square  according to the length and width supplied
+ *
+ * @param 		aTopLeft Pixel position of the top left corner of the box	
+ *
+ * @param 		aBoxLength length in pixels of the box to be drawn.
+ *
+ * @param 		aBoxWidth width  in pixels of the box to be drawn.
+ *
+ *
+ */		
+	{
+	TPoint startPos	=aTopLeft;
+	TPoint endPos;
+	//top horizontal line
+	endPos.iX		=aTopLeft.iX + aBoxWidth;
+	endPos.iY		=aTopLeft.iY;
+	DrawLineUtility(startPos, endPos, aColorVal);
+
+	//vertical left
+	endPos.iX		=aTopLeft.iX;
+	endPos.iY		=aTopLeft.iY + aBoxHeight;								
+	DrawLineUtility(startPos, endPos, aColorVal);
+
+	//vertical right
+	startPos.iX 	=aTopLeft.iX + aBoxWidth;
+	startPos.iY		=aTopLeft.iY;
+	endPos.iX		=aTopLeft.iX + aBoxWidth;
+	endPos.iY		=aTopLeft.iY + aBoxHeight;
+	DrawLineUtility(startPos, endPos, aColorVal);
+	
+	//bottom horizontal									
+	startPos.iX 	=aTopLeft.iX;
+	startPos.iY 	=aTopLeft.iY + aBoxHeight;
+	endPos.iX		=aTopLeft.iX + aBoxWidth;
+	endPos.iY		=aTopLeft.iY + aBoxHeight;											
+	DrawLineUtility(startPos, endPos, aColorVal);		
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/inc/T_ActiveCallbackIO.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+@test
+@internalComponent
+
+This contains CT_ActiveCallbackIO
+*/
+
+#if (!defined __T_ACTIVECALLBACK_IO_H__)
+#define __T_ACTIVECALLBACK_IO_H__
+
+// User includes
+#include "ActiveCallbackBase.h"
+
+/**
+* Callback class for playing and recording processes
+*/
+class CT_ActiveCallbackIO : public CActiveCallbackBase
+	{
+public:
+	static CT_ActiveCallbackIO*	NewL(CDataWrapperBase& aCallback, TInt aPriority=EPriorityStandard);
+	~CT_ActiveCallbackIO();
+
+	TInt			BufferLength();
+	const TDesC8&	Buffer();
+	void			PrepareFromStringL(TInt aRepeat, const TDesC& aString);
+	void			PrepareFromFileL(TInt aRepeat, const TDesC& aFilename);
+
+protected:
+	CT_ActiveCallbackIO(CDataWrapperBase& aCallback, TInt aPriority);
+
+private:
+	void	ConvertAndRepeatBuffer(TInt aRepeat);
+	void	ConvertEscapeChars(TPtr8 aBuffer);
+
+private:
+	HBufC8*	iBuffer;
+	};
+
+#endif /* __T_ACTIVECALLBACK_IO_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/inc/T_ActiveRConsoleRead.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,109 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_ACTIVE_R_CONSOLE_READ_H__)
+#define __T_ACTIVE_R_CONSOLE_READ_H__
+
+//	EPOC includes
+#include <e32twin.h>
+#include <e32keys.h> 
+
+//	User Includes
+#include "DataWrapperBase.h"
+#include "ActiveCallbackBase.h"
+#include "DrawUtils.h"
+ 
+class CT_ActiveRConsoleRead : public CActiveCallbackBase
+
+/**
+* Test Active Notification class
+@test
+@publishedPartner
+@see CActiveCallbackBase
+*/
+	{
+protected:
+	enum TEventOccurance
+		{
+		EEventOccuranceOnce,
+		EEventOccuranceZeroOrMore,
+		EEventOccuranceOneOrMore,
+		};
+
+	struct TEventConfig
+		{
+		TInt			iEventType;
+		TEventOccurance	iEventOccurance;
+		TBool			iDataVerify;
+		TBool			iDataDraw;
+		};
+
+public:
+	/**
+	* Public  destructor
+	*/
+	static	CT_ActiveRConsoleRead*	NewL(CDataWrapperBase& aDataWrapperBase);
+	~CT_ActiveRConsoleRead();
+	TBool	KickStartL (const TDesC& aSection, const TInt aAsyncErrorIndex,RConsole& aConsole);
+	TBool	VerifyDataAndKick(const TInt aAsyncErrorIndex, RConsole& aConsole);
+	TConsoleKey	GetConsoleKey();
+	
+	
+	 		
+protected:
+	CT_ActiveRConsoleRead(CDataWrapperBase& aDataWrapperBase);	
+	void 	DestroyData();
+	TBool	ExitEvent();
+	void	DrawData();
+
+private:
+	TBool	KickNext(const TInt aAsyncErrorIndex, RConsole& aConsole);
+	void	Kick (const TInt aAsyncErrorIndex, RConsole& aConsole);
+
+private:
+   	TPtrC	iSection;
+    TUint8	iColourValueBlack;
+    TUint8	iColourValueWhite;
+    TInt	iEventIndex;
+    TInt	iEventCount;
+    TInt	iTimeOut;
+    TInt	iErrorMargin;
+    TBool	iHasExitKeyCode;
+    TBool	iHasExitRectangle;
+    TInt	iExitKeyCode;
+    TRect	iExitRectangle;
+	TInt	iTestIndex;
+	TInt	iNumberOfTests;
+
+	TBool	iHasExpectedKeyCode;
+	TBool	iHasExpectedRectangle;
+    TInt	iExpectedKeyCode;
+    TRect	iExpectedRectangle;
+
+    RArray<TEventConfig>	iEvent;
+    TEventConfig 			iExpectedConfig;
+    TConsoleKey             iKey;
+ 
+
+   
+    static const CDataWrapperBase::TEnumEntryTable	iEnumRawEventTable[];
+	static const CDataWrapperBase::TEnumEntryTable	iEnumKeyCodeTable[];
+	static const CDataWrapperBase::TEnumEntryTable	iEnumEventOccuranceTable[];
+	};
+ 
+#endif /*__T_ACTIVE_R_CONSOLE_READ_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/inc/T_RBusDevCommData.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,113 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_RBUS_DEV_COMM_DATA_H__)
+#define __T_RBUS_DEV_COMM_DATA_H__
+
+//	User Includes
+#include "T_RBusLogicalChannelData.h"
+#include "T_ActiveCallbackIO.h"
+
+//	EPOC includes
+#include <d32comm.h>
+
+/**
+ * Test Active Notification class
+ *
+ */
+class CT_RBusDevCommData : public CT_RBusLogicalChannelData
+	{
+public:
+	static CT_RBusDevCommData*	NewL();
+	~CT_RBusDevCommData();
+
+	virtual TAny*	GetObject();
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	CT_RBusDevCommData();
+	void	ConstructL();
+
+	//	CT_RHandleBaseData implementation
+	virtual RHandleBase*		GetHandleBase();
+
+	//	CT_RBusLogicalChannelData implementation
+	virtual RBusLogicalChannel*	GetBusLogicalChannel();
+
+	//	MActiveCallback implementation
+	virtual void	RunL(CActive* aActive, TInt aIndex);
+ 	virtual void	DoCancel(CActive* aActive, TInt aIndex);
+
+private:
+	void	DestroyData();
+
+	TInt	DoCmdConstructor();
+	void	DoCmdDestructor();
+	void	DoCmdBreak(const TDesC& aSection, const TInt aAsyncErrorIndex);
+	void	DoCmdBreakCancel();
+	void	DoCmdCapsL(const TDesC& aSection);
+	void	DoCmdConfigL(const TDesC& aSection);
+	void	DoCmdMinTurnaroundTime(const TDesC& aSection);
+	void	DoCmdNotifyReceiveDataAvailable(const TDesC& aSection, const TInt aAsyncErrorIndex);
+	void	DoCmdNotifyReceiveDataAvailableCancel();
+	void	DoCmdNotifySignalChange(const TDesC& aSection, const TInt aAsyncErrorIndex);
+	void	DoCmdNotifySignalChangeCancel();
+	TInt	DoCmdOpen(const TDesC& aSection);
+	TInt	DoCmdQueryReceiveBuffer(const TDesC& aSection);
+	void	DoCmdReadL(const TDesC& aSection, const TInt aAsyncErrorIndex);
+	void	DoCmdReadCancel();
+	void	DoCmdReadOneOrMoreL(const TDesC& aSection, const TInt aAsyncErrorIndex);
+	void	DoCmdReceiveBufferLength(const TDesC& aSection);
+	void	DoCmdResetBuffers();
+	TInt	DoCmdSetConfigL(const TDesC& aSection);
+	TInt	DoCmdSetMinTurnaroundTime(const TDesC& aSection);
+	TInt	DoCmdSetReceiveBufferLength(const TDesC& aSection);
+	void	DoCmdSetSignals(const TDesC& aSection);
+	void	DoCmdSignals(const TDesC& aSection);
+	void	DoCmdVersionRequired(const TDesC& aSection);
+	void	DoCmdWriteL(const TDesC& aSection, const TInt aAsyncErrorIndex);
+	void	DoCmdWriteCancel();
+
+	//	Helpers
+	void	PrepareReadExpectedBufferLengthL(CT_ActiveCallbackIO& aCallback, const TDesC& aSection);
+
+private:
+	RBusDevComm*					iBusDevComm;
+	HBufC8*							iBufferRead;
+	TPtr8							iBufferReadPtr;
+	TPtr8							iBufferReadOneOrMorePtr;
+	TInt							iReadOneOrMoreLeft;
+	TBool							iHasReadExpected;
+	TInt							iBufferLength;
+	TUint							iMinTurnaroundTime;
+	TInt							iReceiveBufferLength;
+	TUint							iSignals;
+	TUint							iNotifySignals;
+	TBool							iHasNotifySignalsExpected;
+	TUint							iNotifySignalsExpected;
+	CActiveCallbackBase*			iCallbackBreak;
+	CActiveCallbackBase*			iCallbackNotifyReceiveDataAvailable;
+	CActiveCallbackBase*			iCallbackNotifySignalChange;
+	CT_ActiveCallbackIO*			iCallbackRead;
+	CT_ActiveCallbackIO*			iCallbackReadOneOrMore;
+	CT_ActiveCallbackIO*			iCallbackWrite;
+
+	static const TEnumEntryTable	iEnumTableSignals[];
+	};
+
+#endif /* __T_RBUS_DEV_COMM_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/inc/T_RBusLogicalChannelData.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_RBUS_LOGICAL_CHANNEL_DATA_H__)
+#define __T_RBUS_LOGICAL_CHANNEL_DATA_H__
+
+//	User Includes
+#include "T_RHandleBaseData.h"
+
+/**
+ * Test Active Notification class
+ *
+ */
+class CT_RBusLogicalChannelData : public CT_RHandleBaseData
+	{
+public:
+	CT_RBusLogicalChannelData();
+	~CT_RBusLogicalChannelData();
+
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	virtual RBusLogicalChannel*	GetBusLogicalChannel() = 0;
+	};
+
+#endif /* __T_RBUS_LOGICAL_CHANNEL_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/inc/T_RConsoleData.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_R_CONSOLE_DATA_H__)
+#define __T_R_CONSOLE_DATA_H__
+
+//	EPOC includes
+#include <e32twin.h>
+
+
+//	User Includes
+#include "T_RSessionBaseData.h"
+#include "T_ActiveRConsoleRead.h"
+
+
+class CT_RConsoleData : public CT_RSessionBaseData
+
+/**
+* Test Active Notification class
+@test
+@publishedPartner
+@see CT_RSessionBaseData
+*/
+	{
+public:
+	/**
+	* Public  destructor
+	*/
+	~CT_RConsoleData();
+	static	CT_RConsoleData*	NewL();
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+	virtual TAny*	GetObject();
+
+protected:
+	CT_RConsoleData();
+	void	ConstructL();
+	TInt	DoCmdRead(const TDesC& aSection , const TInt aAsyncErrorIndex);
+	TInt	DoCmdConstructor();
+	void	DoCmdDestructor();
+	TInt	DoCmdControl(const TDesC& aSection);
+	TInt	DoCmdInit(const TDesC& aSection);
+	TInt	DoCmdCreate();
+	TInt	DoCmdDestroy();
+	TInt	DoCmdWrite(const TDesC& aSection);
+	TInt	DoCmdClearScreen();
+
+	//	CT_RSessionBaseData implementation
+	virtual RSessionBase*	GetSessionBase();
+
+	//	CT_RHandleBaseData implementation
+	virtual RHandleBase*	GetHandleBase();
+
+private:
+	void 	DestroyData();
+	void	RunL(CActive* aActive, TInt aIndex);
+	virtual void	DoCancel(CActive* aActive, TInt aIndex);
+
+protected:
+	CT_ActiveRConsoleRead*	iActiveRConsoleRead;
+	RConsole*				iConsole;
+	};
+
+#endif /*__T_R_CONSOLE_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/inc/T_RDevUsbcClientData.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,131 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+// This contains T_RDevUsbcClientData.h
+
+#ifndef T_RDEVUSBCLIENT_DATA_H
+#define T_RDEVUSBCLIENT_DATA_H
+
+
+// User Includes
+#include "DataWrapperBase.h"
+#include "USBConstants.h"
+
+
+// System includes
+#include <e32base.h> // CActive
+#include <d32usbc.h> // RDevUsbcClient
+#include <e32debug.h>
+#include <f32file.h>
+#include <e32cmn.h>
+
+
+
+/**
+ * CT_RDevUsbcClientData class
+ */
+class CT_RDevUsbcClientData : public CDataWrapperBase
+	{
+public:
+	~CT_RDevUsbcClientData();
+	static CT_RDevUsbcClientData* NewL();
+
+	virtual TAny* GetObject();
+	virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+	void RunL(CActive* aActive, TInt aIndex);
+	void DoCancel();
+	void Signal(TInt aResult);		
+	void DestroyData();
+protected:
+	CT_RDevUsbcClientData();
+
+	void ConstructL();
+
+private:
+    void DoCmdNewL();
+	void DoCmdUtilityLoadLogicalDevice(const TTEFSectionName& aSection);
+	void DoCmdOpen();
+	void DoCmdDeviceCaps(const TTEFSectionName& aSection);
+	void DoCmdGetDeviceDescriptorSize(const TTEFSectionName& aSection);
+	void DoCmdGetDeviceDescriptor(const TTEFSectionName& aSection);
+	void DoCmdSetDeviceDescriptor(const TTEFSectionName& aSection);
+	void DoCmdUtilitySetEndPointL(const TTEFSectionName& aSection);
+	void DoCmdSetInterface(const TTEFSectionName& aSection);			
+	void DoCmdDestructor();
+	void DoCmdEndpointCaps(); 
+    /**
+	 * Returns current Testclass 
+	 */
+	TInt SetEndpoint(TUint aEndpointType, TUint aEndpointDirection);	
+	
+private:
+/**
+	* Provides handle to USB Driver channel
+	* USB Interface is configured using this channel
+	*/	
+	RDevUsbcClient *iChannel;
+	
+	/**
+	* Package buffer for a TUsbcInterfaceInfo object. This buffer
+	* is filled prior to a call to RDevUsbcClient::SetInterface
+	*/
+	TUsbcInterfaceInfoBuf iInterface;
+	
+	/** Data structures for endpoint data, KUsbcMaxEndpoints is defined in d32usbc.h 
+	 requires both endpoint data container and descripter the data is stored to*/
+	TUsbcEndpointData iEndpointData[KUsbcMaxEndpoints];	
+			
+	/** 
+	* Number of currently set endpoints, 
+	* maximum is defined in d32usbc.h KMaxEndpointsPerClient
+	*/
+	TInt iConfiguredEndpoints;
+			
+
+	/**
+	* Maximum packet size for sending.
+	*/
+	TInt iTxMaxPacketSize;
+	
+	/**
+	 * Capabilities
+	 */
+	TUsbDeviceCaps iCaps;	
+	
+	/**
+	 * Active Callback for asynchronous functions
+	 */
+	CActiveCallback* iActiveCallback;
+		
+	/**
+	 * Buffer for init device.
+	 */
+	HBufC8* iBuffer;	
+    HBufC8* iBuffer_verify;
+   	/**
+	 * Descriptor size.
+	 */ 
+    TInt iDeviceDescriptorSize;
+	/**
+	 * Enum for the resources of the Endpoint
+	 */
+	static const TEnumEntryTable iEUsbcEndpointResource[];	
+	
+	};
+
+
+#endif // T_RDEVUSBCLIENT_DATA_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/inc/T_RHandleBaseData.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_RHANDLE_BASE_DATA_H__)
+#define __T_RHANDLE_BASE_DATA_H__
+
+//	User Includes
+#include "DataWrapperBase.h"
+
+//	EPOC includes
+#include <e32cmn.h>
+
+/**
+ * Test Active Notification class
+ *
+ */
+class CT_RHandleBaseData : public CDataWrapperBase
+	{
+public:
+	CT_RHandleBaseData();
+	~CT_RHandleBaseData();
+
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	virtual RHandleBase*	GetHandleBase() = 0;
+
+	void	DoCmdClose();
+	void	DoCmdFullName(const TDesC& aSection);
+	void	DoCmdName(const TDesC& aSection);
+	};
+
+#endif /* __T_RHANDLE_BASE_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/inc/T_RSessionBaseData.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_RSESSION_BASE_DATA_H__)
+#define __T_RSESSION_BASE_DATA_H__
+
+//	User Includes
+#include "T_RHandleBaseData.h"
+
+//	EPOC includes
+#include <e32std.h>
+
+/**
+ * Test Active Notification class
+ *
+ */
+class CT_RSessionBaseData : public CT_RHandleBaseData
+	{
+public:
+	CT_RSessionBaseData();
+	~CT_RSessionBaseData();
+
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	virtual RSessionBase*	GetSessionBase() = 0;
+
+	TInt	DoCmdShareAuto();
+	TInt	DoCmdShareProtected();
+	};
+
+#endif /* __T_RSESSION_BASE_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/inc/T_TCommCapsV01Data.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_TCOMM_CAPS_V01_DATA_H__)
+#define __T_TCOMM_CAPS_V01_DATA_H__
+
+//	User Includes
+#include "DataWrapperBase.h"
+
+//	EPOC includes
+#include <d32comm.h>
+
+/**
+ * Test Active Notification class
+ *
+ */
+class CT_TCommCapsV01Data : public CDataWrapperBase
+	{
+public:
+	CT_TCommCapsV01Data();
+	~CT_TCommCapsV01Data();
+
+	virtual TDes8*	Descriptor();
+
+	virtual TAny*	GetObject();
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	virtual TCommCapsV01&		GetCommCapsV01();
+
+private:
+	void	DestroyData();
+
+	TInt	DoCmdConstructor();
+	void	DoCmdDestructor();
+	void	DoCmdiDataBits(const TDesC& aSection);
+	void	DoCmdiFifo(const TDesC& aSection);
+	void	DoCmdiHandshake(const TDesC& aSection);
+	void	DoCmdiParity(const TDesC& aSection);
+	void	DoCmdiRate(const TDesC& aSection);
+	void	DoCmdiSIR(const TDesC& aSection);
+	void	DoCmdiSignals(const TDesC& aSection);
+	void	DoCmdiStopBits(const TDesC& aSection);
+
+private:
+	TCommCaps*	iCommCaps;
+
+	static const TEnumEntryTable	iEnumTableDataBits[];
+	static const TEnumEntryTable	iEnumTableFifo[];
+	static const TEnumEntryTable	iEnumTableHandshake[];
+	static const TEnumEntryTable	iEnumTableParity[];
+	static const TEnumEntryTable	iEnumTableRate[];
+	static const TEnumEntryTable	iEnumTableSir[];
+	static const TEnumEntryTable	iEnumTableSignals[];
+	static const TEnumEntryTable	iEnumTableStopBits[];
+	};
+
+#endif /* __T_TCOMM_CAPS_V01_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/inc/T_TCommCapsV02Data.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_TCOMM_CAPS_V02_DATA_H__)
+#define __T_TCOMM_CAPS_V02_DATA_H__
+
+//	User Includes
+#include "T_TCommCapsV01Data.h"
+
+/**
+ * Test Active Notification class
+ *
+ */
+class CT_TCommCapsV02Data : public CT_TCommCapsV01Data
+	{
+public:
+	CT_TCommCapsV02Data();
+	~CT_TCommCapsV02Data();
+
+	//	CT_TCommCapsV01Data implementation
+	virtual TDes8*	Descriptor();
+
+	virtual TAny*	GetObject();
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	//	CT_TCommCapsV01Data implementation
+	virtual TCommCapsV01&		GetCommCapsV01();
+
+	virtual TCommCapsV02&		GetCommCapsV02();
+
+private:
+	void	DestroyData();
+
+	TBool 	ReadFlowControlCaps(const TDesC& aSection, const TDesC& aKeyName, TUint& aFlowControlCaps);
+	TBool 	ReadNotificationCaps(const TDesC& aSection, const TDesC& aKeyName, TUint& aNotificationCaps);
+	TBool 	ReadRoleCaps(const TDesC& aSection, const TDesC& aKeyName, TUint& aRoleCaps);
+
+	TInt	DoCmdConstructor();
+	void	DoCmdDestructor();
+	void	DoCmdiFlowControlCaps(const TDesC& aSection);
+	void	DoCmdiNotificationCaps(const TDesC& aSection);
+	void	DoCmdiRoleCaps(const TDesC& aSection);
+
+private:
+	TCommCaps2*	iCommCaps2;
+	static const TEnumEntryTable	iEnumTableFlowControlCaps[];
+	static const TEnumEntryTable	iEnumTableNotificationCaps[];
+	static const TEnumEntryTable	iEnumTableRoleCaps[];
+	};
+
+#endif /* __T_TCOMM_CAPS_V02_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/inc/T_TCommCapsV03Data.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_TCOMM_CAPS_V03_DATA_H__)
+#define __T_TCOMM_CAPS_V03_DATA_H__
+
+//	User Includes
+#include "T_TCommCapsV02Data.h"
+
+/**
+ * Test Active Notification class
+ *
+ */
+class CT_TCommCapsV03Data : public CT_TCommCapsV02Data
+	{
+public:
+	CT_TCommCapsV03Data();
+	~CT_TCommCapsV03Data();
+
+	//	CT_TCommCapsV01Data implementation
+	virtual TDes8*	Descriptor();
+
+	virtual TAny*	GetObject();
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	//	CT_TCommCapsV01Data implementation
+	virtual TCommCapsV01&		GetCommCapsV01();
+
+	//	CT_TCommCapsV02Data implementation
+	virtual TCommCapsV02&		GetCommCapsV02();
+
+	virtual TCommCapsV03&		GetCommCapsV03();
+
+private:
+	void	DestroyData();
+
+	TInt	DoCmdConstructor();
+	void	DoCmdDestructor();
+	void	DoCmdiBreakSupported(const TDesC& aSection);
+
+private:
+	TCommCaps3*	iCommCaps3;
+	};
+
+#endif /* __T_TCOMM_CAPS_V03_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/inc/T_TCommConfigV01Data.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,81 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_TCOMM_CONFIG_V01_DATA_H__)
+#define __T_TCOMM_CONFIG_V01_DATA_H__
+
+//	User Includes
+#include "DataWrapperBase.h"
+
+//	EPOC includes
+#include <d32comm.h>
+
+/**
+ * Test Active Notification class
+ *
+ */
+class CT_TCommConfigV01Data : public CDataWrapperBase
+	{
+public:
+	CT_TCommConfigV01Data();
+	~CT_TCommConfigV01Data();
+
+	virtual TDes8*	Descriptor();
+
+	virtual TAny*	GetObject();
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	virtual TCommConfigV01&		GetCommConfigV01();
+
+private:
+	void	DestroyData();
+
+	TInt	DoCmdConstructor();
+	void	DoCmdDestructor();
+	void	DoCmdiDataBits(const TDesC& aSection);
+	void	DoCmdiFifo(const TDesC& aSection);
+	void	DoCmdiHandshake(const TDesC& aSection);
+	void	DoCmdiParity(const TDesC& aSection);
+	void	DoCmdiParityError(const TDesC& aSection);
+	void	DoCmdiParityErrorChar(const TDesC& aSection);
+	void	DoCmdiRate(const TDesC& aSection);
+	void	DoCmdiSIREnable(const TDesC& aSection);
+	void	DoCmdiSIRSettings(const TDesC& aSection);
+	void	DoCmdiSpecialRate(const TDesC& aSection);
+	void	DoCmdiStopBits(const TDesC& aSection);
+	void	DoCmdiTerminator(const TDesC& aSection);
+	void	DoCmdiTerminatorCount(const TDesC& aSection);
+	void	DoCmdiXoffChar(const TDesC& aSection);
+	void	DoCmdiXonChar(const TDesC& aSection);
+
+private:
+	TCommConfig*	iCommConfig;
+
+	static const TEnumEntryTable	iEnumTableDataBits[];
+	static const TEnumEntryTable	iEnumTableFifo[];
+	static const TEnumEntryTable	iEnumTableHandshake[];
+	static const TEnumEntryTable	iEnumTableParity[];
+	static const TEnumEntryTable	iEnumTableParityError[];
+	static const TEnumEntryTable	iEnumTableRate[];
+	static const TEnumEntryTable	iEnumTableSir[];
+	static const TEnumEntryTable	iEnumTableSirSetting[];
+	static const TEnumEntryTable	iEnumTableStopBits[];
+	};
+
+#endif /* __T_TCOMM_CONFIG_V01_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/inc/T_TCommConfigV02Data.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_TCOMM_CONFIG_V02_DATA_H__)
+#define __T_TCOMM_CONFIG_V02_DATA_H__
+
+//	User Includes
+#include "T_TCommConfigV01Data.h"
+
+/**
+ * Test Active Notification class
+ *
+ */
+class CT_TCommConfigV02Data : public CT_TCommConfigV01Data
+	{
+public:
+	CT_TCommConfigV02Data();
+	~CT_TCommConfigV02Data();
+
+	//	CT_TCommConfigV01Data implementation
+	virtual TDes8*	Descriptor();
+
+	virtual TAny*	GetObject();
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+protected:
+	//	CT_TCommConfigV01Data implementation
+	virtual TCommConfigV01&		GetCommConfigV01();
+
+	virtual TCommConfigV02&		GetCommConfigV02();
+
+private:
+	void	DestroyData();
+
+	TInt	DoCmdConstructor();
+	void	DoCmdDestructor();
+	void	DoCmdiTxShutdownTimeout(const TDesC& aSection);
+
+private:
+	TCommConfig2*	iCommConfig2;
+	};
+
+#endif /* __T_TCOMM_CONFIG_V02_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/inc/USBConstants.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,142 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+// This contains namespace USB
+
+#ifndef USBCONSTANTS_H
+#define USBCONSTANTS_H
+
+/**
+ * Namespace for constant variables and data types, common to USBerian 
+ */
+namespace USB
+	{
+	/** 
+	 * USB logical device driver name 
+	 * */
+	#ifdef __WINS__
+		_LIT(KLDDName, "testusbc");
+	#else
+		_LIT(KLDDName, "eusbc");
+	#endif
+	
+	/** 
+	 * Endpoint type constants - Short descriptions of types 
+	(see USB 2.0 specification for details) */
+	
+	/** 
+	Control
+		"Control transfers are intended to support configuration/command/status 
+		type communication flows between client software and its function. Each 
+		USB device is required to implement the Default Control Pipe as a message pipe."
+	*/
+	_LIT(KEPControl, "Control");
+	
+	/**
+	Bulk
+		"The bulk transfer type is designed to support devices that need to communicate 
+		relatively large amounts of data at highly variable times where the transfer can 
+		use any available bandwidth."
+	*/
+	_LIT(KEPBulk, "Bulk");
+	
+	/**
+	Interrupt
+		"The interrupt transfer type is designed to support those devices that need to 
+		send or receive data infrequently but with bounded service periods."
+	*/
+	_LIT(KEPInterrupt, "Interrupt");
+	/*
+	Isochronous 
+		"Isochronous transfer type provides the requester:
+		 - guaranteed access to USB bandwidth with bounded latency
+		 - guaranteed constant data rate through the pipe as long as data is provided to the pipe
+		 - in the case of a delivery failure due to error, no retrying of the attempt to deliver the data "
+	*/
+	_LIT(KEPIsochronous, "Isochronous");
+	
+	/**
+	 *  Endpoint direction constants 
+	 * */
+
+	_LIT(KEPIn, "In"); 		// "IN refers to transfers to the host"
+	_LIT(KEPOut, "Out"); 	// "OUT refers to transfers from the host."
+	_LIT(KEPBidirectional, "Bidirectional"); // only for control transfers
+	
+	/** 
+	 * The following are default offsets data in device descriptor 
+	Offsets are used to set */
+	const TInt KSpecOffset = 2;
+	const TInt KVendorOffset = 8;
+	const TInt KProductIDOffset = 10;
+	const TInt KReleaseOffset = 12;
+	
+	/* Default number of channels to open. Used only to initialize variable with proper value */
+	const TInt MinNumberOfChannels = 1;
+	
+	/* Value which is not used by USB client driver, "For future compatibility, should always be zero." */
+	const TInt KUSBChannelOpenParameter = 0;
+	
+	/* Value for how long to wait before test case ends after re-enumeration */
+	const TInt KSecond = 1000000; // 1 secs = 1000000 microseconds
+	
+	enum TUSBEndPointMode {
+		ENotChosen = -1,
+		EBulk,
+		EInterrupt,
+		EIsochronous
+	};
+	
+	/** 
+	* USB Actions indicate which action is done in async call
+	* The flag is set before async calls to RDevUsbcClient
+	* It is used by USBReader and USBWriter classes
+	*/
+	
+	enum USBAction
+		{
+		
+		// Read Actions - used by USBReader
+		ENone, // ENone Used by both USBReader and USBWriter
+		ERead,		
+		EReadWithLength, 
+		EReadUntilShort,
+		EReadUntilShortWithLength,
+		EReadOneOrMore,
+		EReadOneOrMoreWithLength,
+		EReadError, 
+		
+		// Write Actions - used by USBWriter
+		EWrite,
+		EWriteFile,
+		EWriteError
+
+		};
+	
+	// Read and write buffers 0.5MB by default
+	const TInt KDefaultReadBufferSize = 1024 * 512; 
+	const TInt KDefaultWriteBufferSize = 1024 * 512; 
+	
+	const TInt KDelayBetweenDataAvailabilityQueries = 1000000;
+	
+	const TInt KTransferDataSize5MB = 5242880;
+	const TInt KMicroSecondsToSecondsMultiplier = 1000000;
+	}
+
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/src/T_ActiveCallbackIO.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,238 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_ActiveCallbackIO.h"
+
+/*@{*/
+_LIT(KStrNull,								" ");
+
+_LIT(KLogErrorFileNotFound,					"File '%S' Not Found. Error %d");
+_LIT(KLogErrorFileNotOpened,				"File '%S' Not Opened. Error %d");
+_LIT(KLogErrorFormatError,					"Format Error");
+/*@}*/
+
+CT_ActiveCallbackIO* CT_ActiveCallbackIO::NewL(CDataWrapperBase& aCallback, TInt aPriority)
+	{
+	CT_ActiveCallbackIO*	self=new(ELeave) CT_ActiveCallbackIO(aCallback, aPriority);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop();
+	return self;
+	}
+
+CT_ActiveCallbackIO::~CT_ActiveCallbackIO()
+	{
+	delete iBuffer;
+	iBuffer=NULL;
+	}
+
+CT_ActiveCallbackIO::CT_ActiveCallbackIO(CDataWrapperBase& aCallback, TInt aPriority)
+:	CActiveCallbackBase(aCallback, aPriority)
+,	iBuffer(NULL)
+	{
+	}
+
+
+TInt CT_ActiveCallbackIO::BufferLength()
+	{
+	return iBuffer->Length();
+	}
+
+const TDesC8& CT_ActiveCallbackIO::Buffer()
+	{
+	return *iBuffer;
+	}
+
+void CT_ActiveCallbackIO::PrepareFromStringL(TInt aRepeat, const TDesC& aString)
+	{
+	delete iBuffer;
+	iBuffer=NULL;
+
+	TInt	bufferLength=aString.Length()*aRepeat;
+	iBuffer=HBufC8::NewL(bufferLength);
+	iBuffer->Des().Copy(aString);
+	ConvertAndRepeatBuffer(aRepeat);
+	}
+
+void CT_ActiveCallbackIO::PrepareFromFileL(TInt aRepeat, const TDesC& aFilename)
+	{
+	delete iBuffer;
+	iBuffer=NULL;
+
+	TFindFile	findFile(iDataWrapperBase.FileServer());
+	TInt		err=findFile.FindByDir(aFilename, KStrNull);
+	if ( err!=KErrNone )
+		{
+		iDataWrapperBase.ERR_PRINTF3(KLogErrorFileNotFound, &aFilename, err);
+		iDataWrapperBase.SetBlockResult(EFail);
+		}
+	else
+		{
+		const TDesC&	fileName=findFile.File();
+		RFile			file;
+		err=file.Open(iDataWrapperBase.FileServer(), fileName, EFileRead|EFileShareAny);
+		if ( err!=KErrNone )
+			{
+			iDataWrapperBase.ERR_PRINTF3(KLogErrorFileNotOpened, &aFilename, err);
+			iDataWrapperBase.SetBlockResult(EFail);
+			}
+		else
+			{
+			CleanupClosePushL(file);
+			iDataWrapperBase.INFO_PRINTF1(_L("File Opened."));
+
+			// get size
+			TInt	bufferLength;
+			User::LeaveIfError(file.Size(bufferLength));
+			bufferLength*=aRepeat;
+			iDataWrapperBase.INFO_PRINTF2(_L("File Size=%d."), bufferLength);
+
+			// read file
+			iBuffer=HBufC8::NewL(bufferLength);
+			iDataWrapperBase.INFO_PRINTF1(_L("Buffer created."));
+
+			TPtr8	fileData = iBuffer->Des();
+			User::LeaveIfError(file.Read(fileData));
+			CleanupStack::PopAndDestroy(&file);
+
+			ConvertAndRepeatBuffer(aRepeat);
+			}
+		}
+	}
+
+void CT_ActiveCallbackIO::ConvertAndRepeatBuffer(TInt aRepeat)
+	{
+	ConvertEscapeChars(iBuffer->Des());
+
+	TPtr8	ptr=iBuffer->Des();
+
+	for ( TInt index=1; index<aRepeat; ++index )
+		{
+		iBuffer->Des().Append(ptr);
+		}
+	}
+
+void CT_ActiveCallbackIO::ConvertEscapeChars(TPtr8 aBuffer)
+	{
+	TInt	ret=KErrNone;
+	TInt	length=aBuffer.Length();
+	TInt	position=0;
+	TBool	escapeFound=EFalse;
+
+	for ( TInt index=0; index<length; ++index )
+		{
+		TChar	nextChar=aBuffer[index];
+		if ( escapeFound )
+			{
+			switch ( nextChar )
+				{
+			case 'x':
+				{
+				//	Check that we have a further 2 characters
+				if ( (index+2)<length )
+					{
+					++index;
+					TUint charCode = 0;
+					TLex8 lex(aBuffer.Mid(index,2));
+					ret = lex.Val(charCode ,EHex);
+					aBuffer[position++]=TChar(charCode);
+					++index;
+					nextChar = aBuffer[index];
+					}
+				else
+					{
+					ret=KErrArgument;
+					}
+				escapeFound=EFalse;
+				}
+				break;
+			case 'n':
+				//	\n found newline
+				{
+				aBuffer[position++]='\n';
+				escapeFound=EFalse;
+				}
+				break;
+			case 't':
+				//	\t found horizontal tab
+				{
+				aBuffer[position++]='\t';
+				escapeFound=EFalse;
+				}
+				break;
+			case 'v':
+				//	\v found vertical tab
+				{
+				aBuffer[position++]='\v';
+				escapeFound=EFalse;
+				}
+				break;
+			case 'b':
+				//	\b found backspace
+				{
+				aBuffer[position++]='\b';
+				escapeFound=EFalse;
+				}
+				break;
+			case 'r':
+				//	\r found carriage return
+				{
+				aBuffer[position++]='\r';
+				escapeFound=EFalse;
+				}
+				break;
+			case 'f':
+				//	\f found form feed
+				{
+				aBuffer[position++]='\f';
+				escapeFound=EFalse;
+				}
+				break;
+			case 'a':
+				//	\a found audible alert (bell)
+				{
+				aBuffer[position++]='\a';
+				escapeFound=EFalse;
+				}
+				break;
+			default:
+				aBuffer[position++]=nextChar;
+				escapeFound=EFalse;
+				break;
+				}
+			}
+		else
+			{
+			if ( aBuffer[index]=='\\' )
+				{
+				escapeFound=ETrue;
+				}
+			else
+				{
+				aBuffer[position++]=aBuffer[index];
+				}
+			}
+		}
+
+	if ( ret!=KErrNone )
+		{
+		iDataWrapperBase.ERR_PRINTF1(KLogErrorFormatError);
+		iDataWrapperBase.SetBlockResult(EFail);
+		}
+
+	aBuffer.SetLength(position);
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/src/T_ActiveRConsoleRead.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,824 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_ActiveRConsoleRead.h"
+
+const TInt KDefaultTimeout		=10000000;
+const TUint8 KWhite				=0xFF;
+const TUint8 KBlack				=0x00;
+
+/*@{*/
+_LIT(KFldTimeout,				"timeout");
+_LIT(KFldErrorMargin,			"errorMargin");
+_LIT(KFldTests,					"tests");
+
+
+_LIT(KFldEventType,				"eventType%d");
+_LIT(KFldEventOccurance,		"eventOccurance%d");
+_LIT(KFldDataVerify,			"dataVerify%d");
+_LIT(KFldDataDraw,				"dataDraw%d");
+_LIT(KFldExitKeyCode,			"exitKeyCode");
+_LIT(KFldExitRectangle,			"exitRectangle");
+
+
+_LIT(KFldKeyCode,				"keyCode%d");
+_LIT(KFldPoint,					"point%d");
+_LIT(KFldRect,					"rect%d");
+_LIT(KFldColourWhite,			"white");
+_LIT(KFldColourBlack,			"black");
+
+
+//format fields
+_LIT(KLogUnexpectedEvent,		"Unexpected event. Expected %d Actual %d Index %d");
+_LIT(KLogUnexpectedKeyCode,		"Unexpected key code %d");
+_LIT(KLogUnexpectedPoint,		"Unexpected point (%d,%d)");
+_LIT(KLogEvent,					"Event %d");
+_LIT(KLogKey,					"Key %d");
+
+/*@}*/
+//This represents a NULL attribute
+_LIT(KEnumNull,					"");
+
+// TRawEvent
+_LIT(KNone,						"ENone");
+_LIT(KPointerMove,				"EPointerMove");
+_LIT(KPointerSwitchOn,			"EPointerSwitchOn");
+_LIT(KKeyDown,					"EKeyDown");
+_LIT(KKeyUp,					"EKeyUp");
+_LIT(KRedraw,					"ERedraw");
+_LIT(KSwitchOn,					"ESwitchOn");
+_LIT(KActive,					"EActive");
+_LIT(KInactive,					"EInactive");
+_LIT(KUpdateModifiers,			"EUpdateModifiers");
+_LIT(KButton1Down,				"EButton1Down");
+_LIT(KButton1Up,				"EButton1Up");
+_LIT(KButton2Down,				"EButton2Down");
+_LIT(KButton2Up,				"EButton2Up");
+_LIT(KButton3Down,				"EButton3Down");
+_LIT(KButton3Up,				"EButton3Up");
+_LIT(KSwitchOff,				"ESwitchOff");
+_LIT(KKeyRepeat,				"EKeyRepeat");
+_LIT(KCaseOpen,					"ECaseOpen");
+_LIT(KCaseClose,				"ECaseClose");
+_LIT(KRestartSystem,			"ERestartSystem");
+const CDataWrapperBase::TEnumEntryTable	CT_ActiveRConsoleRead::iEnumRawEventTable [] =
+{
+/**	Enum as a descriptor Enum integar value
+ *	In this case these enums represent TRawEvents
+ *
+ *
+ */
+//	Enum as a descriptor			Enum
+	KNone,							TRawEvent::ENone,
+	KPointerMove,					TRawEvent::EPointerMove,
+	KPointerSwitchOn,				TRawEvent::EPointerSwitchOn,
+	KKeyDown,						TRawEvent::EKeyDown,
+	KKeyUp,							TRawEvent::EKeyUp,
+	KRedraw,						TRawEvent::ERedraw,
+	KSwitchOn,						TRawEvent::ESwitchOn,
+	KActive,						TRawEvent::EActive,
+	KInactive,						TRawEvent::EInactive,
+	KUpdateModifiers,				TRawEvent::EUpdateModifiers,
+	KButton1Down,					TRawEvent::EButton1Down,
+	KButton1Up,						TRawEvent::EButton1Up,
+	KButton2Down,					TRawEvent::EButton2Down,
+	KButton2Up,						TRawEvent::EButton2Up,
+	KButton3Down,					TRawEvent::EButton3Down,
+	KButton3Up,						TRawEvent::EButton3Up,
+	KSwitchOff,						TRawEvent::ESwitchOff,
+	KKeyRepeat,						TRawEvent::EKeyRepeat,
+	KCaseOpen,						TRawEvent::ECaseOpen,
+	KCaseClose,						TRawEvent::ECaseClose,
+	KRestartSystem,					TRawEvent::ERestartSystem,
+	KEnumNull,						-1,
+	};
+
+//	TKeyCode
+_LIT(KKeyNull,						"EKeyNull");
+_LIT(KKeyBell,						"EKeyBell");
+_LIT(KKeyBackspace,					"EKeyBackspace");
+_LIT(KKeyTab,						"EKeyTab");
+_LIT(KKeyLineFeed,					"EKeyLineFeed");
+_LIT(KKeyVerticalTab,				"EKeyVerticalTab");
+_LIT(KKeyFormFeed,					"EKeyFormFeed");
+_LIT(KKeyEnter,						"EKeyEnter");
+_LIT(KKeyEscape,					"EKeyEscape");
+_LIT(KKeySpace,						"EKeySpace");
+_LIT(KKeyDelete,					"EKeyDelete");
+_LIT(KKeyPrintScreen,				"EKeyPrintScreen");
+_LIT(KKeyPause,						"EKeyPause");
+_LIT(KKeyHome,						"EKeyHome");
+_LIT(KKeyEnd,						"EKeyEnd");
+_LIT(KKeyPageUp,					"EKeyPageUp");
+_LIT(KKeyPageDown,					"EKeyPageDown");
+_LIT(KKeyInsert,					"EKeyInsert");
+_LIT(KKeyLeftArrow,					"EKeyLeftArrow");
+_LIT(KKeyRightArrow,				"EKeyRightArrow");
+_LIT(KKeyUpArrow,					"EKeyUpArrow");
+_LIT(KKeyDownArrow,					"EKeyDownArrow");
+_LIT(KKeyLeftShift,					"EKeyLeftShift");
+_LIT(KKeyRightShift,				"EKeyRightShift");
+_LIT(KKeyLeftAlt,					"EKeyLeftAlt");
+_LIT(KKeyRightAlt,					"EKeyRightAlt");
+_LIT(KKeyLeftCtrl,					"EKeyLeftCtrl");
+_LIT(KKeyRightCtrl,					"EKeyRightCtrl");
+_LIT(KKeyLeftFunc,					"EKeyLeftFunc");
+_LIT(KKeyRightFunc,					"EKeyRightFunc");
+_LIT(KKeyCapsLock,					"EKeyCapsLock");
+_LIT(KKeyNumLock,					"EKeyNumLock");
+_LIT(KKeyScrollLock,				"EKeyScrollLock");
+_LIT(KKeyF1,						"EKeyF1");
+_LIT(KKeyF2,						"EKeyF2");
+_LIT(KKeyF3,						"EKeyF3");
+_LIT(KKeyF4,						"EKeyF4");
+_LIT(KKeyF5,						"EKeyF5");
+_LIT(KKeyF6,						"EKeyF6");
+_LIT(KKeyF7,						"EKeyF7");
+_LIT(KKeyF8,						"EKeyF8");
+_LIT(KKeyF9,						"EKeyF9");
+_LIT(KKeyF10,						"EKeyF10");
+_LIT(KKeyF11,						"EKeyF11");
+_LIT(KKeyF12,						"EKeyF12");
+_LIT(KKeyF13,						"EKeyF13");
+_LIT(KKeyF14,						"EKeyF14");
+_LIT(KKeyF15,						"EKeyF15");
+_LIT(KKeyF16,						"EKeyF16");
+_LIT(KKeyF17,						"EKeyF17");
+_LIT(KKeyF18,						"EKeyF18");
+_LIT(KKeyF19,						"EKeyF19");
+_LIT(KKeyF20,						"EKeyF20");
+_LIT(KKeyF21,						"EKeyF21");
+_LIT(KKeyF22,						"EKeyF22");
+_LIT(KKeyF23,						"EKeyF23");
+_LIT(KKeyF24,						"EKeyF24");
+_LIT(KKeyOff,						"EKeyOff");
+_LIT(KKeyIncContrast,				"EKeyIncContrast");
+_LIT(KKeyDecContrast,				"EKeyDecContrast");
+_LIT(KKeyBacklightOn,				"EKeyBacklightOn");
+_LIT(KKeyBacklightOff,				"EKeyBacklightOff");
+_LIT(KKeyBacklightToggle,			"EKeyBacklightToggle");
+_LIT(KKeySliderDown,				"EKeySliderDown");
+_LIT(KKeySliderUp,					"EKeySliderUp");
+_LIT(KKeyMenu,						"EKeyMenu");
+_LIT(KKeyDictaphonePlay,			"EKeyDictaphonePlay");
+_LIT(KKeyDictaphoneStop,			"EKeyDictaphoneStop");
+_LIT(KKeyDictaphoneRecord,			"EKeyDictaphoneRecord");
+_LIT(KKeyHelp,						"EKeyHelp");
+_LIT(KKeyDial,						"EKeyDial");
+_LIT(KKeyScreenDimension0,			"EKeyScreenDimension0");
+_LIT(KKeyScreenDimension1,			"EKeyScreenDimension1");
+_LIT(KKeyScreenDimension2,			"EKeyScreenDimension2");
+_LIT(KKeyScreenDimension3,			"EKeyScreenDimension3");
+_LIT(KKeyIncVolume,					"EKeyIncVolume");
+_LIT(KKeyDecVolume,					"EKeyDecVolume");
+_LIT(KKeyDevice0,					"EKeyDevice0");
+_LIT(KKeyDevice1,					"EKeyDevice1");
+_LIT(KKeyDevice2,					"EKeyDevice2");
+_LIT(KKeyDevice3,					"EKeyDevice3");
+_LIT(KKeyDevice4,					"EKeyDevice4");
+_LIT(KKeyDevice5,					"EKeyDevice5");
+_LIT(KKeyDevice6,					"EKeyDevice6");
+_LIT(KKeyDevice7,					"EKeyDevice7");
+_LIT(KKeyDevice8,					"EKeyDevice8");
+_LIT(KKeyDevice9,					"EKeyDevice9");
+_LIT(KKeyDeviceA,					"EKeyDeviceA");
+_LIT(KKeyDeviceB,					"EKeyDeviceB");
+_LIT(KKeyDeviceC,					"EKeyDeviceC");
+_LIT(KKeyDeviceD,					"EKeyDeviceD");
+_LIT(KKeyDeviceE,					"EKeyDeviceE");
+_LIT(KKeyDeviceF,					"EKeyDeviceF");
+_LIT(KKeyApplication0,				"EKeyApplication0");
+_LIT(KKeyApplication1,				"EKeyApplication1");
+_LIT(KKeyApplication2,				"EKeyApplication2");
+_LIT(KKeyApplication3,				"EKeyApplication3");
+_LIT(KKeyApplication4,				"EKeyApplication4");
+_LIT(KKeyApplication5,				"EKeyApplication5");
+_LIT(KKeyApplication6,				"EKeyApplication6");
+_LIT(KKeyApplication7,				"EKeyApplication7");
+_LIT(KKeyApplication8,				"EKeyApplication8");
+_LIT(KKeyApplication9,				"EKeyApplication9");
+_LIT(KKeyApplicationA,				"EKeyApplicationA");
+_LIT(KKeyApplicationB,				"EKeyApplicationB");
+_LIT(KKeyApplicationC,				"EKeyApplicationC");
+_LIT(KKeyApplicationD,				"EKeyApplicationD");
+_LIT(KKeyApplicationE,				"EKeyApplicationE");
+_LIT(KKeyApplicationF,				"EKeyApplicationF");
+_LIT(KKeyYes,						"EKeyYes");
+_LIT(KKeyNo,						"EKeyNo");
+_LIT(KKeyIncBrightness,				"EKeyIncBrightness");
+_LIT(KKeyDecBrightness,				"EKeyDecBrightness");
+_LIT(KKeyKeyboardExtend,			"EKeyKeyboardExtend");
+_LIT(KKeyDevice10,					"EKeyDevice10");
+_LIT(KKeyDevice11,					"EKeyDevice11");
+_LIT(KKeyDevice12,					"EKeyDevice12");
+_LIT(KKeyDevice13,					"EKeyDevice13");
+_LIT(KKeyDevice14,					"EKeyDevice14");
+_LIT(KKeyDevice15,					"EKeyDevice15");
+_LIT(KKeyDevice16,					"EKeyDevice16");
+_LIT(KKeyDevice17,					"EKeyDevice17");
+_LIT(KKeyDevice18,					"EKeyDevice18");
+_LIT(KKeyDevice19,					"EKeyDevice19");
+_LIT(KKeyDevice1A,					"EKeyDevice1A");
+_LIT(KKeyDevice1B,					"EKeyDevice1B");
+_LIT(KKeyDevice1C,					"EKeyDevice1C");
+_LIT(KKeyDevice1D,					"EKeyDevice1D");
+_LIT(KKeyDevice1E,					"EKeyDevice1E");
+_LIT(KKeyDevice1F,					"EKeyDevice1F");
+_LIT(KKeyApplication10,				"EKeyApplication10");
+_LIT(KKeyApplication11,				"EKeyApplication11");
+_LIT(KKeyApplication12,				"EKeyApplication12");
+_LIT(KKeyApplication13,				"EKeyApplication13");
+_LIT(KKeyApplication14,				"EKeyApplication14");
+_LIT(KKeyApplication15,				"EKeyApplication15");
+_LIT(KKeyApplication16,				"EKeyApplication16");
+_LIT(KKeyApplication17,				"EKeyApplication17");
+_LIT(KKeyApplication18,				"EKeyApplication18");
+_LIT(KKeyApplication19,				"EKeyApplication19");
+_LIT(KKeyApplication1A,				"EKeyApplication1A");
+_LIT(KKeyApplication1B,				"EKeyApplication1B");
+_LIT(KKeyApplication1C,				"EKeyApplication1C");
+_LIT(KKeyApplication1D,				"EKeyApplication1D");
+_LIT(KKeyApplication1E,				"EKeyApplication1E");
+_LIT(KKeyApplication1F,				"EKeyApplication1F");
+_LIT(KKeyDevice20,					"EKeyDevice20");
+_LIT(KKeyDevice21,					"EKeyDevice21");
+_LIT(KKeyDevice22,					"EKeyDevice22");
+_LIT(KKeyDevice23,					"EKeyDevice23");
+_LIT(KKeyDevice24,					"EKeyDevice24");
+_LIT(KKeyDevice25,					"EKeyDevice25");
+_LIT(KKeyDevice26,					"EKeyDevice26");
+_LIT(KKeyDevice27,					"EKeyDevice27");
+_LIT(KKeyApplication20,				"EKeyApplication20");
+_LIT(KKeyApplication21,				"EKeyApplication21");
+_LIT(KKeyApplication22,				"EKeyApplication22");
+_LIT(KKeyApplication23,				"EKeyApplication23");
+_LIT(KKeyApplication24,				"EKeyApplication24");
+_LIT(KKeyApplication25,				"EKeyApplication25");
+_LIT(KKeyApplication26,				"EKeyApplication26");
+_LIT(KKeyApplication27,				"EKeyApplication27");
+const CDataWrapperBase::TEnumEntryTable	CT_ActiveRConsoleRead::iEnumKeyCodeTable [] =
+	{
+//	Enum as a descriptor					Enum
+	KKeyNull,						EKeyNull,
+	KKeyBell,						EKeyBell,
+	KKeyBackspace,					EKeyBackspace,
+	KKeyTab,						EKeyTab,
+	KKeyLineFeed,					EKeyLineFeed,
+	KKeyVerticalTab,				EKeyVerticalTab,
+	KKeyFormFeed,					EKeyFormFeed,
+	KKeyEnter,						EKeyEnter,
+	KKeyEscape,						EKeyEscape,
+	KKeySpace,						EKeySpace,
+	KKeyDelete,						EKeyDelete,
+	KKeyPrintScreen,				EKeyPrintScreen,
+	KKeyPause,						EKeyPause,
+	KKeyHome,						EKeyHome,
+	KKeyEnd,						EKeyEnd,
+	KKeyPageUp,						EKeyPageUp,
+	KKeyPageDown,					EKeyPageDown,
+	KKeyInsert,						EKeyInsert,
+	KKeyLeftArrow,					EKeyLeftArrow,
+	KKeyRightArrow,					EKeyRightArrow,
+	KKeyUpArrow,					EKeyUpArrow,
+	KKeyDownArrow,					EKeyDownArrow,
+	KKeyLeftShift,					EKeyLeftShift,
+	KKeyRightShift,					EKeyRightShift,
+	KKeyLeftAlt,					EKeyLeftAlt,
+	KKeyRightAlt,					EKeyRightAlt,
+	KKeyLeftCtrl,					EKeyLeftCtrl,
+	KKeyRightCtrl,					EKeyRightCtrl,
+	KKeyLeftFunc,					EKeyLeftFunc,
+	KKeyRightFunc,					EKeyRightFunc,
+	KKeyCapsLock,					EKeyCapsLock,
+	KKeyNumLock,					EKeyNumLock,
+	KKeyScrollLock,					EKeyScrollLock,
+	KKeyF1,							EKeyF1,
+	KKeyF2,							EKeyF2,
+	KKeyF3,							EKeyF3,
+	KKeyF4,							EKeyF4,
+	KKeyF5,							EKeyF5,
+	KKeyF6,							EKeyF6,
+	KKeyF7,							EKeyF7,
+	KKeyF8,							EKeyF8,
+	KKeyF9,							EKeyF9,
+	KKeyF10,						EKeyF10,
+	KKeyF11,						EKeyF11,
+	KKeyF12,						EKeyF12,
+	KKeyF13,						EKeyF13,
+	KKeyF14,						EKeyF14,
+	KKeyF15,						EKeyF15,
+	KKeyF16,						EKeyF16,
+	KKeyF17,						EKeyF17,
+	KKeyF18,						EKeyF18,
+	KKeyF19,						EKeyF19,
+	KKeyF20,						EKeyF20,
+	KKeyF21,						EKeyF21,
+	KKeyF22,						EKeyF22,
+	KKeyF23,						EKeyF23,
+	KKeyF24,						EKeyF24,
+	KKeyOff,						EKeyOff,
+	KKeyIncContrast,				EKeyIncContrast,
+	KKeyDecContrast,				EKeyDecContrast,
+	KKeyBacklightOn,				EKeyBacklightOn,
+	KKeyBacklightOff,				EKeyBacklightOff,
+	KKeyBacklightToggle,			EKeyBacklightToggle,
+	KKeySliderDown,					EKeySliderDown,
+	KKeySliderUp,					EKeySliderUp,
+	KKeyMenu,						EKeyMenu,
+	KKeyDictaphonePlay,				EKeyDictaphonePlay,
+	KKeyDictaphoneStop,				EKeyDictaphoneStop,
+	KKeyDictaphoneRecord,			EKeyDictaphoneRecord,
+	KKeyHelp,						EKeyHelp,
+	KKeyDial,						EKeyDial,
+	KKeyScreenDimension0,			EKeyScreenDimension0,
+	KKeyScreenDimension1,			EKeyScreenDimension1,
+	KKeyScreenDimension2,			EKeyScreenDimension2,
+	KKeyScreenDimension3,			EKeyScreenDimension3,
+	KKeyIncVolume,					EKeyIncVolume,
+	KKeyDecVolume,					EKeyDecVolume,
+	KKeyDevice0,					EKeyDevice0,
+	KKeyDevice1,					EKeyDevice1,
+	KKeyDevice2,					EKeyDevice2,
+	KKeyDevice3,					EKeyDevice3,
+	KKeyDevice4,					EKeyDevice4,
+	KKeyDevice5,					EKeyDevice5,
+	KKeyDevice6,					EKeyDevice6,
+	KKeyDevice7,					EKeyDevice7,
+	KKeyDevice8,					EKeyDevice8,
+	KKeyDevice9,					EKeyDevice9,
+	KKeyDeviceA,					EKeyDeviceA,
+	KKeyDeviceB,					EKeyDeviceB,
+	KKeyDeviceC,					EKeyDeviceC,
+	KKeyDeviceD,					EKeyDeviceD,
+	KKeyDeviceE,					EKeyDeviceE,
+	KKeyDeviceF,					EKeyDeviceF,
+	KKeyApplication0,				EKeyApplication0,
+	KKeyApplication1,				EKeyApplication1,
+	KKeyApplication2,				EKeyApplication2,
+	KKeyApplication3,				EKeyApplication3,
+	KKeyApplication4,				EKeyApplication4,
+	KKeyApplication5,				EKeyApplication5,
+	KKeyApplication6,				EKeyApplication6,
+	KKeyApplication7,				EKeyApplication7,
+	KKeyApplication8,				EKeyApplication8,
+	KKeyApplication9,				EKeyApplication9,
+	KKeyApplicationA,				EKeyApplicationA,
+	KKeyApplicationB,				EKeyApplicationB,
+	KKeyApplicationC,				EKeyApplicationC,
+	KKeyApplicationD,				EKeyApplicationD,
+	KKeyApplicationE,				EKeyApplicationE,
+	KKeyApplicationF,				EKeyApplicationF,
+	KKeyYes,						EKeyYes,
+	KKeyNo,							EKeyNo,
+	KKeyIncBrightness,				EKeyIncBrightness,
+	KKeyDecBrightness,				EKeyDecBrightness,
+	KKeyKeyboardExtend,				EKeyKeyboardExtend,
+	KKeyDevice10,					EKeyDevice10,
+	KKeyDevice11,					EKeyDevice11,
+	KKeyDevice12,					EKeyDevice12,
+	KKeyDevice13,					EKeyDevice13,
+	KKeyDevice14,					EKeyDevice14,
+	KKeyDevice15,					EKeyDevice15,
+	KKeyDevice16,					EKeyDevice16,
+	KKeyDevice17,					EKeyDevice17,
+	KKeyDevice18,					EKeyDevice18,
+	KKeyDevice19,					EKeyDevice19,
+	KKeyDevice1A,					EKeyDevice1A,
+	KKeyDevice1B,					EKeyDevice1B,
+	KKeyDevice1C,					EKeyDevice1C,
+	KKeyDevice1D,					EKeyDevice1D,
+	KKeyDevice1E,					EKeyDevice1E,
+	KKeyDevice1F,					EKeyDevice1F,
+	KKeyApplication10,				EKeyApplication10,
+	KKeyApplication11,				EKeyApplication11,
+	KKeyApplication12,				EKeyApplication12,
+	KKeyApplication13,				EKeyApplication13,
+	KKeyApplication14,				EKeyApplication14,
+	KKeyApplication15,				EKeyApplication15,
+	KKeyApplication16,				EKeyApplication16,
+	KKeyApplication17,				EKeyApplication17,
+	KKeyApplication18,				EKeyApplication18,
+	KKeyApplication19,				EKeyApplication19,
+	KKeyApplication1A,				EKeyApplication1A,
+	KKeyApplication1B,				EKeyApplication1B,
+	KKeyApplication1C,				EKeyApplication1C,
+	KKeyApplication1D,				EKeyApplication1D,
+	KKeyApplication1E,				EKeyApplication1E,
+	KKeyApplication1F,				EKeyApplication1F,
+	KKeyDevice20,					EKeyDevice20,
+	KKeyDevice21,					EKeyDevice21,
+	KKeyDevice22,					EKeyDevice22,
+	KKeyDevice23,					EKeyDevice23,
+	KKeyDevice24,					EKeyDevice24,
+	KKeyDevice25,					EKeyDevice25,
+	KKeyDevice26,					EKeyDevice26,
+	KKeyDevice27,					EKeyDevice27,
+	KKeyApplication20,				EKeyApplication20,
+	KKeyApplication21,				EKeyApplication21,
+	KKeyApplication22,				EKeyApplication22,
+	KKeyApplication23,				EKeyApplication23,
+	KKeyApplication24,				EKeyApplication24,
+	KKeyApplication25,				EKeyApplication25,
+	KKeyApplication26,				EKeyApplication26,
+	KKeyApplication27,				EKeyApplication27,
+	KEnumNull,						-1,
+	};
+
+_LIT(KEEventOccuranceOnce,			"EEventOccuranceOnce");
+_LIT(KEEventOccuranceZeroOrMore,	"EEventOccuranceZeroOrMore");
+_LIT(KEEventOccuranceOneOrMore,		"EEventOccuranceOneOrMore");
+const CDataWrapperBase::TEnumEntryTable	CT_ActiveRConsoleRead::iEnumEventOccuranceTable[] =
+	{
+//	Enum as a descriptor					Enum
+	KEEventOccuranceOnce,			CT_ActiveRConsoleRead::EEventOccuranceOnce,
+	KEEventOccuranceZeroOrMore,		CT_ActiveRConsoleRead::EEventOccuranceZeroOrMore,
+	KEEventOccuranceOneOrMore,		CT_ActiveRConsoleRead::EEventOccuranceOneOrMore,
+	KEnumNull,						-1,
+	};
+/*@}*/
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_ActiveRConsoleRead* CT_ActiveRConsoleRead::NewL(CDataWrapperBase& aDataWrapperBase)
+	{
+	CT_ActiveRConsoleRead* self=new (ELeave) CT_ActiveRConsoleRead(aDataWrapperBase);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+
+CT_ActiveRConsoleRead::CT_ActiveRConsoleRead(CDataWrapperBase& aDataWrapperBase)
+:	CActiveCallbackBase(aDataWrapperBase,EPriorityStandard)
+,	iColourValueBlack(0)
+,	iColourValueWhite(0)
+,	iEventIndex(0)
+,	iEventCount(0)
+,	iTimeOut(0)
+,	iErrorMargin(0)
+,	iHasExitKeyCode(EFalse)
+,	iHasExitRectangle(EFalse)
+,	iExitKeyCode(0)
+,	iTestIndex(0)
+,	iNumberOfTests(0)
+,	iHasExpectedKeyCode(EFalse)
+,	iHasExpectedRectangle(EFalse)
+,	iExpectedKeyCode(0)
+	{
+	}
+
+
+CT_ActiveRConsoleRead::~CT_ActiveRConsoleRead()
+/**
+ * Public destructor
+ */
+	{
+	DestroyData();
+	}
+
+void CT_ActiveRConsoleRead::DestroyData()
+	{
+	iEvent.Reset();
+	iEvent.Close();
+	}
+
+TBool	CT_ActiveRConsoleRead::KickStartL(const TDesC& aSection, const TInt aAsyncErrorIndex, RConsole& aConsole)
+/**
+ * Kick Start the object and set up intials
+ *	@param		aSection			The section in the ini containing data for the command
+ * 	@param		aAsyncErrorIndex	Command index for async calls to return errors to
+ *	@param		aConsole			The RConsole object
+ */
+	{
+	TBuf<KMaxTestExecuteCommandLength>	tempStore;
+	iSection.Set(aSection);
+
+	iColourValueBlack	=KBlack;
+	iColourValueWhite	=KWhite;
+	iDataWrapperBase.GetUint8FromConfig(iSection, KFldColourBlack(), iColourValueBlack);
+	iDataWrapperBase.GetUint8FromConfig(iSection, KFldColourWhite(), iColourValueWhite);
+
+	iTimeOut=KDefaultTimeout;
+	iDataWrapperBase.GetIntFromConfig(iSection, KFldTimeout(), iTimeOut);
+
+	iErrorMargin=0;
+	iDataWrapperBase.GetIntFromConfig(iSection, KFldErrorMargin(), iErrorMargin);
+
+	iHasExitKeyCode=iDataWrapperBase.GetHexFromConfig(iSection, KFldExitKeyCode(), iExitKeyCode);
+
+	iHasExitRectangle=iDataWrapperBase.GetRectFromConfig(iSection, KFldExitRectangle(), iExitRectangle);
+	if ( iHasExitRectangle )
+		{
+		//	Draw rectangle
+		TInt	height =Abs(iExitRectangle.iBr.iY-iExitRectangle.iTl.iY);
+		TInt	width	=Abs(iExitRectangle.iBr.iX-iExitRectangle.iTl.iX);
+		CDrawUtils::DrawSquareUtility(iExitRectangle.iTl, height, width, iColourValueWhite);
+		}
+
+	iEvent.Reset();
+
+	TEventConfig	config;
+	TInt			eventIndex=0;
+	TBool			dataOk=ETrue;
+	TBool			moreData=ETrue;
+	while ( moreData )
+		{
+		tempStore.Format(KFldEventType, ++eventIndex);
+		moreData=iDataWrapperBase.GetEnumFromConfig(iSection, tempStore, iEnumRawEventTable, config.iEventType);
+		if ( moreData )
+			{
+			tempStore.Format(KFldEventOccurance, eventIndex);
+			TInt	eventOccurance=EEventOccuranceOnce;
+			iDataWrapperBase.GetEnumFromConfig(iSection, tempStore, iEnumEventOccuranceTable, eventOccurance);
+			config.iEventOccurance=(TEventOccurance)eventOccurance;
+			
+			tempStore.Format(KFldDataVerify, eventIndex);
+			config.iDataVerify=EFalse;
+			iDataWrapperBase.GetBoolFromConfig(iSection, tempStore, config.iDataVerify);
+
+			tempStore.Format(KFldDataDraw, eventIndex);
+			config.iDataDraw=EFalse;
+			iDataWrapperBase.GetBoolFromConfig(iSection, tempStore, config.iDataDraw);
+
+			iEvent.AppendL(config);
+			dataOk=ETrue;
+			}
+		}
+
+	//	If -1 then we have an umlimited number of test(s) that completes with an exit event
+	//	which can be an exit key code or a pen event in the exit rectangle
+	iNumberOfTests=-1;
+	iDataWrapperBase.GetIntFromConfig(iSection, KFldTests(), iNumberOfTests);
+
+	if ( dataOk )
+		{
+		iTestIndex=0;
+		dataOk=KickNext(aAsyncErrorIndex, aConsole);
+		}
+
+	return dataOk;
+	}
+
+TBool	CT_ActiveRConsoleRead::KickNext(const TInt aAsyncErrorIndex, RConsole& aConsole)
+	{
+	TInt	testing=(iTestIndex<iNumberOfTests) || (iNumberOfTests==-1);
+
+	if ( testing )
+		{
+		TBuf<KMaxTestExecuteCommandLength>	tempStore;
+		iEventIndex=0;
+		iEventCount=0;
+		iHasExpectedKeyCode=EFalse;
+		iHasExpectedRectangle=EFalse;
+
+		++iTestIndex;
+
+		tempStore.Format(KFldKeyCode, iTestIndex);
+		iHasExpectedKeyCode=iDataWrapperBase.GetHexFromConfig(iSection, tempStore, iExpectedKeyCode);
+
+		tempStore.Format(KFldPoint, iTestIndex);
+		TPoint	point;
+		if ( iDataWrapperBase.GetPointFromConfig(iSection, tempStore, point) )
+			{
+			iHasExpectedRectangle=ETrue;
+			iExpectedRectangle.SetRect(point.iX-iErrorMargin, point.iY-iErrorMargin, point.iX+iErrorMargin, point.iY+iErrorMargin);
+			}
+
+		tempStore.Format(KFldRect, iTestIndex);
+		TRect	rect;
+		if ( iDataWrapperBase.GetRectFromConfig(iSection, tempStore, rect) )
+			{
+			iHasExpectedRectangle=ETrue;
+			iExpectedRectangle=rect;
+			}
+
+		if ( iHasExpectedRectangle )
+			{
+			//	Draw boundary
+			TInt height =Abs(iExpectedRectangle.iBr.iY-iExpectedRectangle.iTl.iY);
+			TInt width	=Abs(iExpectedRectangle.iBr.iX-iExpectedRectangle.iTl.iX);
+			CDrawUtils::DrawSquareOutLineUtility(iExpectedRectangle.iTl,height,width,iColourValueWhite);
+			}
+
+		Kick(aAsyncErrorIndex, aConsole);
+		}
+
+	return testing;
+	}
+
+void CT_ActiveRConsoleRead::Kick(const TInt aAsyncErrorIndex, RConsole& aConsole)
+/**
+ * Kick the object
+ */
+	{
+	iDataWrapperBase.INFO_PRINTF1(_L("issuing kick"));
+	aConsole.Read(iKey, iStatus);//wait for user input
+	CActiveCallbackBase::Activate(aAsyncErrorIndex, iTimeOut);
+	}
+
+TBool CT_ActiveRConsoleRead::VerifyDataAndKick(const TInt aAsyncErrorIndex, RConsole& aConsole)
+	{
+	TInt	eventType=iKey.Type();
+	iDataWrapperBase.INFO_PRINTF2(KLogEvent, eventType);
+
+	//	Do we ignore the event
+	TBool			moreToDo=!ExitEvent();
+	TBool			eventOk=EFalse;
+
+	TEventConfig	config=iEvent[iEventIndex];
+	while ( iEventIndex<iEvent.Count() && !eventOk && moreToDo )
+		{
+		config=iEvent[iEventIndex];
+		if ( eventType==config.iEventType )
+			{
+			++iEventCount;
+			eventOk=ETrue;
+			iDataWrapperBase.INFO_PRINTF3(_L("Events type match Expected=%d, Actual=%d"), config.iEventType,eventType);
+			}
+		else
+			{
+			switch(config.iEventOccurance)
+				{
+			case EEventOccuranceOnce:
+				iDataWrapperBase.ERR_PRINTF4(KLogUnexpectedEvent, config.iEventType, eventType, iEventIndex);
+				iDataWrapperBase.SetBlockResult(EFail);
+				moreToDo=EFalse;
+				break;
+			case EEventOccuranceZeroOrMore:
+				//	If the event may not occur then go to the next one
+				++iEventIndex;
+				iEventCount=0;
+				break;
+			case EEventOccuranceOneOrMore:
+				if(iEventCount==0)
+					{
+					iDataWrapperBase.ERR_PRINTF4(KLogUnexpectedEvent, config.iEventType, eventType, iEventIndex);
+					iDataWrapperBase.SetBlockResult(EFail);
+					moreToDo=EFalse;
+					}
+				else
+					{
+					++iEventIndex;
+					iEventCount=0;
+					}
+				break;
+				}
+			}
+		}
+	
+	if ( eventOk )
+		{
+		if ( config.iDataDraw )
+			{
+			DrawData();
+			}
+
+		if ( config.iDataVerify )
+			{
+			if ( iHasExpectedRectangle )
+				{
+				TPoint	point=iKey.MousePos();
+				if ( !iExpectedRectangle.Contains(point) )
+					{
+					iDataWrapperBase.ERR_PRINTF3(KLogUnexpectedPoint, point.iX, point.iY);
+					iDataWrapperBase.SetBlockResult(EFail);
+					}
+				}
+
+			if ( iHasExpectedKeyCode )
+				{
+				TKeyCode	keyCode=iKey.Code();
+				if ( keyCode!=iExpectedKeyCode )
+					{
+					iDataWrapperBase.ERR_PRINTF2(KLogUnexpectedKeyCode, keyCode);
+					iDataWrapperBase.SetBlockResult(EFail);
+					}
+				else
+					{
+					iDataWrapperBase.INFO_PRINTF3(_L("keycodes match as expected:%d, actual:%d"), iExpectedKeyCode,keyCode);
+					}
+				}
+			}
+
+		if ( config.iEventOccurance==EEventOccuranceOnce )
+			{
+			++iEventIndex;
+			iEventCount=0;
+			}
+		if ( iEventIndex>=iEvent.Count() )
+			{
+			moreToDo=KickNext(aAsyncErrorIndex, aConsole);
+			}
+		else
+			{
+			//	Event can occur multiple times
+			Kick(aAsyncErrorIndex, aConsole);
+			}
+		}
+
+	return	moreToDo;
+	}
+
+TConsoleKey CT_ActiveRConsoleRead::GetConsoleKey()
+	{
+	return iKey;
+	}
+
+TBool CT_ActiveRConsoleRead::ExitEvent()
+/**
+ * Exit the testcase if certain scenarios are hit
+ *
+ *
+ */
+	{
+	TBool	exitEvent=EFalse;
+
+	iDataWrapperBase.INFO_PRINTF2(_L("checking if we are an exit event:%d"),iKey.Type() );
+
+	switch (iKey.Type() )
+		{
+	case TRawEvent::ENone:
+		break;
+	case TRawEvent::EPointerMove:
+	case TRawEvent::EButton1Down:
+		break;
+	case TRawEvent::EButton1Up:
+		if ( iHasExitRectangle )
+			{
+			exitEvent=iExitRectangle.Contains(iKey.MousePos());
+			}
+		break;
+	case TRawEvent::EButton2Down:
+		break;
+	case TRawEvent::EButton2Up:
+		break;
+	case TRawEvent::EButton3Down:
+		break;
+	case TRawEvent::EButton3Up:
+		break;
+	case TRawEvent::EKeyDown:
+		break;
+	case TRawEvent::EKeyUp:
+		if ( iHasExitKeyCode )
+			{
+			iDataWrapperBase.INFO_PRINTF2(KLogKey, TInt (iKey.Code()));
+			if ( !iKey.Code()==TKeyCode(iExitKeyCode) )
+				{
+				iDataWrapperBase.ERR_PRINTF3(_L("Test failed due to user feedback :actual key %d, expected key %d"), TInt(iKey.Code()), iExitKeyCode);
+				iDataWrapperBase.SetBlockResult(EFail);
+				}
+			exitEvent=ETrue;
+			}
+		break;
+	case TRawEvent::EKeyRepeat:
+		break;
+	default:
+		break;
+		}
+
+	return exitEvent;
+	}
+
+void CT_ActiveRConsoleRead::DrawData()
+	{
+	switch (iKey.Type() )
+		{
+	case TRawEvent::ENone:
+		break;
+	case TRawEvent::EPointerMove:
+	case TRawEvent::EButton1Down:
+	case TRawEvent::EButton1Up:
+	case TRawEvent::EButton2Down:
+	case TRawEvent::EButton2Up:
+	case TRawEvent::EButton3Down:
+	case TRawEvent::EButton3Up:
+		//	Draw the point
+		CDrawUtils::ColourFillUtility(iColourValueBlack, iKey.MousePos());
+		break;
+	case TRawEvent::EKeyDown:
+		break;
+	case TRawEvent::EKeyUp:
+		break;
+	case TRawEvent::EKeyRepeat:
+		break;
+	default:
+		break;
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/src/T_RBusDevCommData.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1121 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_RBusDevCommData.h"
+#include "T_TCommCapsV01Data.h"
+#include "T_TCommConfigV01Data.h"
+
+/*@{*/
+_LIT(KStrNull,								" ");
+
+_LIT(KCmdConstructor,						"new");
+_LIT(KCmdDestructor,						"~");
+_LIT(KCmdBreak,								"Break");
+_LIT(KCmdBreakCancel,						"BreakCancel");
+_LIT(KCmdCaps,								"Caps");
+_LIT(KCmdConfig,							"Config");
+_LIT(KCmdMinTurnaroundTime,					"MinTurnaroundTime");
+_LIT(KCmdNotifyReceiveDataAvailable,		"NotifyReceiveDataAvailable");
+_LIT(KCmdNotifyReceiveDataAvailableCancel,	"NotifyReceiveDataAvailableCancel");
+_LIT(KCmdNotifySignalChange,				"NotifySignalChange");
+_LIT(KCmdNotifySignalChangeCancel,			"NotifySignalChangeCancel");
+_LIT(KCmdOpen,								"Open");
+_LIT(KCmdQueryReceiveBuffer,				"QueryReceiveBuffer");
+_LIT(KCmdRead,								"Read");
+_LIT(KCmdReadCancel,						"ReadCancel");
+_LIT(KCmdReadOneOrMore,						"ReadOneOrMore");
+_LIT(KCmdReceiveBufferLength,				"ReceiveBufferLength");
+_LIT(KCmdResetBuffers,						"ResetBuffers");
+_LIT(KCmdSetConfig,							"SetConfig");
+_LIT(KCmdSetMinTurnaroundTime,				"SetMinTurnaroundTime");
+_LIT(KCmdSetReceiveBufferLength,			"SetReceiveBufferLength");
+_LIT(KCmdSetSignals,						"SetSignals");
+_LIT(KCmdSignals,							"Signals");
+_LIT(KCmdVersionRequired,					"VersionRequired");
+_LIT(KCmdWrite,								"Write");
+_LIT(KCmdWriteCancel,						"WriteCancel");
+
+_LIT(KFldBufferLength,						"bufferlength");
+_LIT(KFldCaps,								"caps");
+_LIT(KFldClearMask,							"clearmask");
+_LIT(KFldConfig,							"config");
+_LIT(KFldData,								"data");
+_LIT(KFldExpected,							"expected");
+_LIT(KFldExpectedFile,						"expected_file");
+_LIT(KFldFile,								"file");
+_LIT(KFldIsEmpty,							"is_empty");
+_LIT(KFldMask,								"mask");
+_LIT(KFldPortPDD,							"portpdd");
+_LIT(KFldPortLDD,							"portldd");
+_LIT(KFldRepeat,							"repeat");
+_LIT(KFldSave,								"save");
+_LIT(KFldSetMask,							"setmask");
+_LIT(KFldTime,								"time");
+_LIT(KFldTimeOut,							"timeout");
+_LIT(KFldUnit,								"unit");
+_LIT(KFldUseLength,							"uselength");
+_LIT(KFldValue,								"value");
+_LIT(KFldVersionName,						"version_name");
+_LIT(KFldVersionBuild,						"version_build");
+_LIT(KFldVersionMajor,						"version_major");
+_LIT(KFldVersionMinor,						"version_minor");
+
+_LIT(KLogError,								"Error=%d");
+_LIT(KLogErrorBufferLength,					"Buffer Length %d must be greater than 0");
+_LIT(KLogErrorExpectedValue,				"Expected Value does not match actual");
+_LIT(KLogErrorExpectedSignal,				"Expected Signal %d does not match actual %d");
+_LIT(KLogMissingParameter,					"Missing parameter '%S'");
+_LIT(KLogNullCapsData,						"Caps Data - '%S' is NULL");
+_LIT(KLogNullConfigData,					"Config Data - '%S' is NULL");
+_LIT(KLogLoadPhysicalDeviceError,			"Load Physical Device '%S' error=%d");
+_LIT(KLogLoadLogicalDeviceError,			"Load Logical Device '%S' error=%d");
+/*@}*/
+
+_LIT(KStrKSignalCTS,						"KSignalCTS");
+_LIT(KStrKSignalDSR,						"KSignalDSR");
+_LIT(KStrKSignalDCD,						"KSignalDCD");
+_LIT(KStrKSignalRNG,						"KSignalRNG");
+_LIT(KStrKSignalRTS,						"KSignalRTS");
+_LIT(KStrKSignalDTR,						"KSignalDTR");
+_LIT(KStrKSignalBreak,						"KSignalBreak");
+const CDataWrapperBase::TEnumEntryTable	CT_RBusDevCommData::iEnumTableSignals[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrKSignalCTS,							KSignalCTS,
+	KStrKSignalDSR,							KSignalDSR,
+	KStrKSignalDCD,							KSignalDCD,
+	KStrKSignalRNG,							KSignalRNG,
+	KStrKSignalRTS,							KSignalRTS,
+	KStrKSignalDTR,							KSignalDTR,
+	KStrKSignalBreak,						KSignalBreak,
+	KStrNull,								-1
+	};
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_RBusDevCommData* CT_RBusDevCommData::NewL()
+	{
+	CT_RBusDevCommData*	ret=new (ELeave) CT_RBusDevCommData();
+	CleanupStack::PushL(ret);
+	ret->ConstructL();
+	CleanupStack::Pop(ret);
+	return ret;
+	}
+
+CT_RBusDevCommData::CT_RBusDevCommData()
+:	CT_RBusLogicalChannelData()
+,	iBusDevComm(NULL)
+,	iBufferRead(NULL)
+,	iBufferReadPtr(NULL, 0)
+,	iBufferReadOneOrMorePtr(NULL, 0)
+,	iReadOneOrMoreLeft(0)
+,	iHasReadExpected(EFalse)
+,	iBufferLength(0)
+,	iMinTurnaroundTime(0)
+,	iReceiveBufferLength(0)
+,	iSignals(0)
+,	iNotifySignals(0)
+,	iHasNotifySignalsExpected(EFalse)
+,	iNotifySignalsExpected(0)
+,	iCallbackBreak(NULL)
+,	iCallbackNotifyReceiveDataAvailable(NULL)
+,	iCallbackNotifySignalChange(NULL)
+,	iCallbackRead(NULL)
+,	iCallbackReadOneOrMore(NULL)
+,	iCallbackWrite(NULL)
+	{
+	}
+
+CT_RBusDevCommData::~CT_RBusDevCommData()
+/**
+ * Public destructor
+ */
+	{
+	DestroyData();
+
+	delete iBufferRead;
+	iBufferRead=NULL;
+
+	delete iCallbackWrite;
+	iCallbackWrite=NULL;
+
+	delete iCallbackReadOneOrMore;
+	iCallbackReadOneOrMore=NULL;
+
+	delete iCallbackRead;
+	iCallbackRead=NULL;
+
+	delete iCallbackNotifySignalChange;
+	iCallbackNotifySignalChange=NULL;
+
+	delete iCallbackNotifyReceiveDataAvailable;
+	iCallbackNotifyReceiveDataAvailable=NULL;
+
+	delete iCallbackBreak;
+	iCallbackBreak=NULL;
+	}
+
+void CT_RBusDevCommData::ConstructL()
+	{
+	iCallbackBreak						=CActiveCallbackBase::NewL(*this);
+	iCallbackNotifyReceiveDataAvailable	=CActiveCallbackBase::NewL(*this);
+	iCallbackNotifySignalChange			=CActiveCallbackBase::NewL(*this);
+	iCallbackRead						=CT_ActiveCallbackIO::NewL(*this);
+	iCallbackReadOneOrMore				=CT_ActiveCallbackIO::NewL(*this);
+	iCallbackWrite						=CT_ActiveCallbackIO::NewL(*this);
+	}
+
+void CT_RBusDevCommData::DestroyData()
+	{
+	delete iBusDevComm;
+	iBusDevComm=NULL;
+	}
+
+TAny* CT_RBusDevCommData::GetObject()
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return	pointer to the object that the data wraps
+ */
+	{
+	return iBusDevComm;
+	}
+
+RHandleBase* CT_RBusDevCommData::GetHandleBase()
+	{
+	return iBusDevComm;
+	}
+
+RBusLogicalChannel* CT_RBusDevCommData::GetBusLogicalChannel()
+	{
+	return iBusDevComm;
+	}
+
+void CT_RBusDevCommData::PrepareReadExpectedBufferLengthL(CT_ActiveCallbackIO& aCallback, const TDesC& aSection)
+	{
+	TInt	repeat=1;
+	GetIntFromConfig(aSection, KFldRepeat, repeat);
+
+	TPtrC	readExpected;
+	iHasReadExpected=GetStringFromConfig(aSection, KFldExpected, readExpected);
+	if ( iHasReadExpected )
+		{
+		aCallback.PrepareFromStringL(repeat, readExpected);
+		iBufferLength=aCallback.BufferLength();
+		}
+	else
+		{
+		iHasReadExpected=GetStringFromConfig(aSection, KFldExpectedFile, readExpected);
+		if ( iHasReadExpected )
+			{
+			aCallback.PrepareFromFileL(repeat, readExpected);
+			}
+		}
+
+	if ( iHasReadExpected )
+		{
+		iBufferLength=aCallback.BufferLength();
+		}
+
+	GetIntFromConfig(aSection, KFldBufferLength, iBufferLength);
+	if ( iBufferLength <= 0 )
+		{
+		ERR_PRINTF2(KLogErrorBufferLength, iBufferLength);
+		SetBlockResult(EFail);
+		}
+	}
+
+TBool CT_RBusDevCommData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+	{
+	TBool	ret=ETrue;
+	TInt	err=KErrNone;
+
+	if ( aCommand==KCmdConstructor )
+		{
+		err=DoCmdConstructor();
+		}
+	else if ( aCommand==KCmdDestructor )
+		{
+		DoCmdDestructor();
+		}
+	else if ( aCommand==KCmdBreak )
+		{
+		DoCmdBreak(aSection, aAsyncErrorIndex);
+		}
+	else if ( aCommand==KCmdBreakCancel )
+		{
+		DoCmdBreakCancel();
+		}
+	else if ( aCommand==KCmdCaps )
+		{
+		DoCmdCapsL(aSection);
+		}
+	else if ( aCommand==KCmdConfig )
+		{
+		DoCmdConfigL(aSection);
+		}
+	else if ( aCommand==KCmdMinTurnaroundTime )
+		{
+		DoCmdMinTurnaroundTime(aSection);
+		}
+	else if ( aCommand==KCmdNotifyReceiveDataAvailable )
+		{
+		DoCmdNotifyReceiveDataAvailable(aSection, aAsyncErrorIndex);
+		}
+	else if ( aCommand==KCmdNotifyReceiveDataAvailableCancel )
+		{
+		DoCmdNotifyReceiveDataAvailableCancel();
+		}
+	else if ( aCommand==KCmdNotifySignalChange )
+		{
+		DoCmdNotifySignalChange(aSection, aAsyncErrorIndex);
+		}
+	else if ( aCommand==KCmdNotifySignalChangeCancel )
+		{
+		DoCmdNotifySignalChangeCancel();
+		}
+	else if ( aCommand==KCmdOpen )
+		{
+		err=DoCmdOpen(aSection);
+		}
+	else if ( aCommand==KCmdQueryReceiveBuffer )
+		{
+		err=DoCmdQueryReceiveBuffer(aSection);
+		}
+	else if ( aCommand==KCmdRead )
+		{
+		DoCmdReadL(aSection, aAsyncErrorIndex);
+		}
+	else if ( aCommand==KCmdReadCancel )
+		{
+		DoCmdReadCancel();
+		}
+	else if ( aCommand==KCmdReadOneOrMore )
+		{
+		DoCmdReadOneOrMoreL(aSection, aAsyncErrorIndex);
+		}
+	else if ( aCommand==KCmdReceiveBufferLength )
+		{
+		DoCmdReceiveBufferLength(aSection);
+		}
+	else if ( aCommand==KCmdResetBuffers )
+		{
+		DoCmdResetBuffers();
+		}
+	else if ( aCommand==KCmdSetConfig )
+		{
+		err=DoCmdSetConfigL(aSection);
+		}
+	else if ( aCommand==KCmdSetMinTurnaroundTime )
+		{
+		err=DoCmdSetMinTurnaroundTime(aSection);
+		}
+	else if ( aCommand==KCmdSetReceiveBufferLength )
+		{
+		err=DoCmdSetReceiveBufferLength(aSection);
+		}
+	else if ( aCommand==KCmdSetSignals )
+		{
+		DoCmdSetSignals(aSection);
+		}
+	else if ( aCommand==KCmdSignals )
+		{
+		DoCmdSignals(aSection);
+		}
+	else if ( aCommand==KCmdVersionRequired )
+		{
+		DoCmdVersionRequired(aSection);
+		}
+	else if ( aCommand==KCmdWrite )
+		{
+		DoCmdWriteL(aSection, aAsyncErrorIndex);
+		}
+	else if ( aCommand==KCmdWriteCancel )
+		{
+		DoCmdWriteCancel();
+		}
+	else
+		{
+		ret=CT_RBusLogicalChannelData::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(KLogError, err);
+		SetError(err);
+		}
+
+	return ret;
+	}
+
+TInt CT_RBusDevCommData::DoCmdConstructor()
+	{
+	DestroyData();
+	TRAPD(err, iBusDevComm=new (ELeave) RBusDevComm());
+	return err;
+	}
+
+void CT_RBusDevCommData::DoCmdDestructor()
+	{
+	DestroyData();
+	}
+
+void CT_RBusDevCommData::DoCmdBreak(const TDesC& aSection, const TInt aAsyncErrorIndex)
+	{
+	TInt	timeOut=0;
+	GetIntFromConfig(aSection, KFldTimeOut, timeOut);
+
+	TInt	time;
+	if ( !GetIntFromConfig(aSection, KFldTime, time) )
+		{
+		ERR_PRINTF2(KLogMissingParameter, &KFldTime());
+		SetBlockResult(EFail);
+		}
+	else
+		{
+		INFO_PRINTF1(_L("Break"));
+		iBusDevComm->Break(iCallbackBreak->iStatus, time);
+		iCallbackBreak->Activate(aAsyncErrorIndex, timeOut);
+		IncOutstanding();
+		}
+	}
+
+void CT_RBusDevCommData::DoCmdBreakCancel()
+	{
+	INFO_PRINTF1(_L("BreakCancel"));
+	iBusDevComm->BreakCancel();
+	}
+
+void CT_RBusDevCommData::DoCmdCapsL(const TDesC& aSection)
+	{
+	TPtrC	dataName;
+	if ( GetStringFromConfig(aSection, KFldCaps, dataName) )
+		{
+		CT_TCommCapsV01Data*	wrapper=static_cast<CT_TCommCapsV01Data*>(GetDataWrapperL(dataName));
+		TDes8*					data=wrapper->Descriptor();
+		if ( data!=NULL )
+			{
+			INFO_PRINTF1(_L("Caps"));
+			iBusDevComm->Caps(*data);
+			}
+		else
+			{
+			ERR_PRINTF2(KLogNullCapsData, &dataName);
+			SetBlockResult(EFail);
+			}
+		}
+	else
+		{
+		ERR_PRINTF2(KLogMissingParameter, &KFldCaps());
+		SetBlockResult(EFail);
+		}
+	}
+
+void CT_RBusDevCommData::DoCmdConfigL(const TDesC& aSection)
+	{
+	TPtrC	dataName;
+	if ( GetStringFromConfig(aSection, KFldConfig, dataName) )
+		{
+		CT_TCommConfigV01Data*	wrapper=static_cast<CT_TCommConfigV01Data*>(GetDataWrapperL(dataName));
+		TDes8*					data=wrapper->Descriptor();
+		if ( data!=NULL )
+			{
+			INFO_PRINTF1(_L("Config"));
+			iBusDevComm->Config(*data);
+			}
+		else
+			{
+			ERR_PRINTF2(KLogNullConfigData, &dataName);
+			SetBlockResult(EFail);
+			}
+		}
+	else
+		{
+		ERR_PRINTF2(KLogMissingParameter, &KFldConfig());
+		SetBlockResult(EFail);
+		}
+	}
+
+void CT_RBusDevCommData::DoCmdMinTurnaroundTime(const TDesC& aSection)
+	{
+	TUint	actual=iBusDevComm->MinTurnaroundTime();
+	INFO_PRINTF2(_L("MinTurnaroundTime : %d"), actual);
+
+	TUint	expected;
+	if ( GetUintFromConfig(aSection, KFldExpected(), expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TBool	save=EFalse;
+	GetBoolFromConfig(aSection, KFldSave(), save);
+	if ( save )
+		{
+		iMinTurnaroundTime=actual;
+		}
+	}
+
+void CT_RBusDevCommData::DoCmdNotifyReceiveDataAvailable(const TDesC& aSection, const TInt aAsyncErrorIndex)
+	{
+	TInt	timeOut=0;
+	GetIntFromConfig(aSection, KFldTimeOut, timeOut);
+
+	INFO_PRINTF1(_L("NotifyReceiveDataAvailable"));
+	iBusDevComm->NotifyReceiveDataAvailable(iCallbackNotifyReceiveDataAvailable->iStatus);
+	iCallbackNotifyReceiveDataAvailable->Activate(aAsyncErrorIndex, timeOut);
+	IncOutstanding();
+	}
+
+void CT_RBusDevCommData::DoCmdNotifyReceiveDataAvailableCancel()
+	{
+	INFO_PRINTF1(_L("NotifyReceiveDataAvailableCancel"));
+	iBusDevComm->NotifyReceiveDataAvailableCancel();
+	}
+
+void CT_RBusDevCommData::DoCmdNotifySignalChange(const TDesC& aSection, const TInt aAsyncErrorIndex)
+	{
+	TInt	timeOut=0;
+	GetIntFromConfig(aSection, KFldTimeOut, timeOut);
+
+	iHasNotifySignalsExpected=GetOrFromConfig(aSection, KFldExpected(), iEnumTableSignals, iNotifySignalsExpected);
+
+	TUint	mask;
+	if ( GetOrFromConfig(aSection, KFldMask(), iEnumTableSignals, mask) )
+		{
+		INFO_PRINTF1(_L("NotifySignalChange with mask"));
+		iBusDevComm->NotifySignalChange(iCallbackNotifySignalChange->iStatus, iNotifySignals, mask);
+		}
+	else
+		{
+		INFO_PRINTF1(_L("NotifySignalChange without mask"));
+		iBusDevComm->NotifySignalChange(iCallbackNotifySignalChange->iStatus, iNotifySignals);
+		}
+	iCallbackNotifySignalChange->Activate(aAsyncErrorIndex, timeOut);
+	IncOutstanding();
+	}
+
+void CT_RBusDevCommData::DoCmdNotifySignalChangeCancel()
+	{
+	INFO_PRINTF1(_L("NotifySignalChangeCancel"));
+	iBusDevComm->NotifySignalChangeCancel();
+	}
+
+TInt CT_RBusDevCommData::DoCmdOpen(const TDesC& aSection)
+	{
+	TBool	dataOk=ETrue;
+
+	TPtrC	pdd;
+	if ( GetStringFromConfig(aSection, KFldPortPDD, pdd) && pdd.Length()!=0 )
+		{
+		TInt	errLoad=User::LoadPhysicalDevice(pdd);
+		if ( (errLoad!=KErrNone) && (errLoad!=KErrAlreadyExists) )
+			{
+			dataOk=EFalse;
+			ERR_PRINTF3(KLogLoadPhysicalDeviceError, &pdd, errLoad);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TPtrC	ldd;
+	if ( GetStringFromConfig(aSection, KFldPortLDD, ldd) && ldd.Length()!=0 )
+		{
+		TInt	errLoad=User::LoadLogicalDevice(ldd);
+		if ( (errLoad!=KErrNone) && (errLoad!=KErrAlreadyExists) )
+			{
+			dataOk=EFalse;
+			ERR_PRINTF3(KLogLoadLogicalDeviceError, &ldd, errLoad);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TInt	unit;
+	if ( !GetIntFromConfig(aSection, KFldUnit, unit) )
+		{
+		dataOk=EFalse;
+		ERR_PRINTF2(KLogMissingParameter, &KFldUnit());
+		SetBlockResult(EFail);
+		}
+
+	TInt	err=KErrNone;
+	if ( dataOk )
+		{
+		INFO_PRINTF1(_L("Open"));
+		err=iBusDevComm->Open(unit);
+		}
+
+	return err;
+	}
+
+TInt CT_RBusDevCommData::DoCmdQueryReceiveBuffer(const TDesC& aSection)
+	{
+	INFO_PRINTF1(_L("QueryReceiveBuffer"));
+	TInt	actual=iBusDevComm->QueryReceiveBuffer();
+	TInt	ret=KErrNone;
+	if ( actual<0 )
+		{
+		ret=actual;
+		}
+	else
+		{
+		TInt	expected;
+		if ( GetIntFromConfig(aSection, KFldExpected(), expected) )
+			{
+			if ( expected!=actual )
+				{
+				ERR_PRINTF1(KLogErrorExpectedValue);
+				SetBlockResult(EFail);
+				}
+			}
+
+		TBool	isEmpty;
+		if ( GetBoolFromConfig(aSection, KFldIsEmpty(), isEmpty) )
+			{
+			if ( isEmpty )
+				{
+				if ( actual!=0 )
+					{
+					ERR_PRINTF1(KLogErrorExpectedValue);
+					SetBlockResult(EFail);
+					}
+				}
+			else
+				{
+				if ( actual==0 )
+					{
+					ERR_PRINTF1(KLogErrorExpectedValue);
+					SetBlockResult(EFail);
+					}
+				}
+			}
+
+		TBool	save=EFalse;
+		GetBoolFromConfig(aSection, KFldSave(), save);
+		if ( save )
+			{
+			iBufferLength=actual;
+			}
+		}
+
+	return ret;
+	}
+
+void CT_RBusDevCommData::DoCmdReadL(const TDesC& aSection, const TInt aAsyncErrorIndex)
+	{
+	TInt	timeOut=0;
+	GetIntFromConfig(aSection, KFldTimeOut, timeOut);
+
+	TBool	useLength=EFalse;
+	GetBoolFromConfig(aSection, KFldUseLength(), useLength);
+
+	PrepareReadExpectedBufferLengthL(*iCallbackRead, aSection);
+	if ( iBufferLength>0 )
+		{
+		delete iBufferRead;
+		iBufferRead=HBufC8::New(iBufferLength);
+
+		iBufferReadPtr.Set(iBufferRead->Des());
+		if ( useLength )
+			{
+			INFO_PRINTF2(_L("Read with length %d"), iBufferLength);
+			iBusDevComm->Read(iCallbackRead->iStatus, iBufferReadPtr, iBufferLength);
+			}
+		else
+			{
+			INFO_PRINTF1(_L("Read without length"));
+			iBusDevComm->Read(iCallbackRead->iStatus, iBufferReadPtr);
+			}
+		iCallbackRead->Activate(aAsyncErrorIndex, timeOut);
+		IncOutstanding();
+		}
+	}
+
+void CT_RBusDevCommData::DoCmdReadCancel()
+	{
+	INFO_PRINTF1(_L("ReadCancel"));
+	iBusDevComm->ReadCancel();
+	}
+
+void CT_RBusDevCommData::DoCmdReadOneOrMoreL(const TDesC& aSection, const TInt aAsyncErrorIndex)
+	{
+	TInt	timeOut=0;
+	GetIntFromConfig(aSection, KFldTimeOut, timeOut);
+
+	PrepareReadExpectedBufferLengthL(*iCallbackReadOneOrMore, aSection);
+	if ( iBufferLength>0 )
+		{
+		delete iBufferRead;
+		iBufferRead=HBufC8::New(iBufferLength);
+
+		iBufferReadPtr.Set(iBufferRead->Des());
+		iBufferReadPtr.SetLength(iBufferLength);
+		iBufferReadOneOrMorePtr.Set(iBufferRead->Des());
+		iBufferReadOneOrMorePtr.SetLength(iBufferLength);
+		iReadOneOrMoreLeft=iBufferLength;
+		INFO_PRINTF2(_L("iBufferLength=%d"), iBufferLength);
+		INFO_PRINTF2(_L("iBufferRead->MaxLength=%d"), iBufferRead->Des().MaxLength());
+		INFO_PRINTF2(_L("iBufferReadPtr.Length=%d"), iBufferReadPtr.Length());
+		INFO_PRINTF2(_L("iBufferReadPtr.MaxLength=%d"), iBufferReadPtr.MaxLength());
+		INFO_PRINTF1(_L("ReadOneOrMore"));
+		iBusDevComm->ReadOneOrMore(iCallbackReadOneOrMore->iStatus, iBufferReadPtr);
+		iCallbackReadOneOrMore->Activate(aAsyncErrorIndex, timeOut);
+		IncOutstanding();
+		}
+	}
+
+void CT_RBusDevCommData::DoCmdReceiveBufferLength(const TDesC& aSection)
+	{
+	TInt	actual=iBusDevComm->ReceiveBufferLength();
+	INFO_PRINTF2(_L("ReceiveBufferLength : %d"), actual);
+
+	TInt	expected;
+	if ( GetIntFromConfig(aSection, KFldExpected(), expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TBool	save=EFalse;
+	GetBoolFromConfig(aSection, KFldSave(), save);
+	if ( save )
+		{
+		iReceiveBufferLength=actual;
+		}
+	}
+
+void CT_RBusDevCommData::DoCmdResetBuffers()
+	{
+	INFO_PRINTF1(_L("ResetBuffers"));
+	iBusDevComm->ResetBuffers();
+	}
+
+TInt CT_RBusDevCommData::DoCmdSetConfigL(const TDesC& aSection)
+	{
+	TInt	ret=KErrNone;
+
+	TPtrC	dataName;
+	if ( GetStringFromConfig(aSection, KFldConfig, dataName) )
+		{
+		CT_TCommConfigV01Data*	wrapper=static_cast<CT_TCommConfigV01Data*>(GetDataWrapperL(dataName));
+		TDes8*					data=wrapper->Descriptor();
+		if ( data!=NULL )
+			{
+			INFO_PRINTF1(_L("SetConfig"));
+			ret=iBusDevComm->SetConfig(*data);
+			}
+		else
+			{
+			ERR_PRINTF2(KLogNullConfigData, &dataName);
+			SetBlockResult(EFail);
+			}
+		}
+	else
+		{
+		ERR_PRINTF2(KLogMissingParameter, &KFldConfig());
+		SetBlockResult(EFail);
+		}
+
+	return ret;
+	}
+
+TInt CT_RBusDevCommData::DoCmdSetMinTurnaroundTime(const TDesC& aSection)
+	{
+	TUint	value=iMinTurnaroundTime;
+	GetUintFromConfig(aSection, KFldValue(), value);
+
+	INFO_PRINTF1(_L("SetMinTurnaroundTime"));
+	return iBusDevComm->SetMinTurnaroundTime(value);
+	}
+
+TInt CT_RBusDevCommData::DoCmdSetReceiveBufferLength(const TDesC& aSection)
+	{
+	TInt	value=iReceiveBufferLength;
+	GetIntFromConfig(aSection, KFldValue(), value);
+
+	INFO_PRINTF1(_L("SetReceiveBufferLength"));
+	return iBusDevComm->SetReceiveBufferLength(value);
+	}
+
+void CT_RBusDevCommData::DoCmdSetSignals(const TDesC& aSection)
+	{
+	TUint	setMask=iSignals;
+	GetOrFromConfig(aSection, KFldSetMask(), iEnumTableSignals, setMask);
+
+	TUint	clearMask=~setMask;
+	GetOrFromConfig(aSection, KFldClearMask(), iEnumTableSignals, clearMask);
+
+	INFO_PRINTF1(_L("SetSignals"));
+	iBusDevComm->SetSignals(setMask, clearMask);
+	}
+
+void CT_RBusDevCommData::DoCmdSignals(const TDesC& aSection)
+	{
+	TUint	actual=iBusDevComm->Signals();
+	INFO_PRINTF2(_L("Signals:0x%x"), actual);
+
+	TUint	expected;
+	if ( GetOrFromConfig(aSection, KFldExpected(), iEnumTableSignals, expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TBool	save=EFalse;
+	GetBoolFromConfig(aSection, KFldSave(), save);
+	if ( save )
+		{
+		iSignals=actual;
+		}
+	}
+
+void CT_RBusDevCommData::DoCmdVersionRequired(const TDesC& aSection)
+	{
+	TVersion				version=iBusDevComm->VersionRequired();
+	TBuf<KMaxVersionName>	versionName(version.Name());
+
+	INFO_PRINTF2(_L("Version name  : %S"), &versionName);
+	INFO_PRINTF2(_L("Version build : %d"), (TInt)version.iBuild);
+	INFO_PRINTF2(_L("Version major : %d"), (TInt)version.iMajor);
+	INFO_PRINTF2(_L("Version minor : %d"), (TInt)version.iMinor);
+
+	TPtrC	expectedVersionName;
+	if( GetStringFromConfig(aSection, KFldVersionName(), expectedVersionName) )
+		{
+		if( version.Name() != expectedVersionName )
+			{
+			ERR_PRINTF3(_L("Expected Version Name (%S) != Actual Version Name (%S)"), &expectedVersionName, &versionName);
+			SetBlockResult(EFail);	
+			}
+		}
+
+	TInt	intTemp;
+	if( GetIntFromConfig(aSection, KFldVersionBuild(), intTemp) )
+		{
+		if( version.iBuild != intTemp )
+			{
+			ERR_PRINTF3(_L("Expected Version Build (%d) != Actual Version Build (%d)"), intTemp, version.iBuild);
+			SetBlockResult(EFail);
+			}
+		}
+
+	if( GetIntFromConfig(aSection, KFldVersionMajor(), intTemp) )
+		{
+		if( version.iMajor != intTemp )
+			{
+			ERR_PRINTF3(_L("Expected Version Major (%d) != Actual Version Major (%d)"), intTemp, version.iMajor);
+			SetBlockResult(EFail);
+			}
+		}
+
+	if( GetIntFromConfig(aSection, KFldVersionMinor(), intTemp) )
+		{
+		if( version.iMinor != intTemp )
+			{
+			ERR_PRINTF3(_L("Expected Version Minor (%d) != Actual Version Minor (%d)"), intTemp, version.iMinor);
+			SetBlockResult(EFail);
+			}
+		}
+
+	if (version.Name() == _L("") && version.iBuild == 0 && version.iMajor == 0 && version.iMinor == 0)
+		{
+		ERR_PRINTF1(_L("Some version fields are not set!"));
+		SetBlockResult(EFail);
+		}
+	}
+
+void CT_RBusDevCommData::DoCmdWriteL(const TDesC& aSection, const TInt aAsyncErrorIndex)
+	{
+	TBool	dataOk=ETrue;
+	TBool	useLength=EFalse;
+	GetBoolFromConfig(aSection, KFldUseLength(), useLength);
+
+	TInt	timeOut=0;
+	GetIntFromConfig(aSection, KFldTimeOut, timeOut);
+
+	TInt	repeat=1;
+	GetIntFromConfig(aSection, KFldRepeat, repeat);
+
+	TPtrC	data;
+	if ( GetStringFromConfig(aSection, KFldData, data) )
+		{
+		iCallbackWrite->PrepareFromStringL(repeat, data);
+		}
+	else
+		{
+		if ( GetStringFromConfig(aSection, KFldFile, data) )
+			{
+			iCallbackWrite->PrepareFromFileL(repeat, data);
+			}
+		else
+			{
+			dataOk=EFalse;
+			ERR_PRINTF2(KLogMissingParameter, &KFldData);
+			ERR_PRINTF2(KLogMissingParameter, &KFldFile);
+			SetBlockResult(EFail);
+			}
+		}
+
+	if ( dataOk )
+		{
+		iBufferLength=iCallbackWrite->BufferLength();
+
+		if ( useLength )
+			{
+			INFO_PRINTF2(_L("Write with length %d"), iBufferLength);
+			iBusDevComm->Write(iCallbackWrite->iStatus, iCallbackWrite->Buffer(), iBufferLength);
+			}
+		else
+			{
+			INFO_PRINTF1(_L("Write without length"));
+			iBusDevComm->Write(iCallbackWrite->iStatus, iCallbackWrite->Buffer());
+			}
+		iCallbackWrite->Activate(aAsyncErrorIndex, timeOut);
+		IncOutstanding();
+		}
+	}
+
+void CT_RBusDevCommData::DoCmdWriteCancel()
+	{
+	INFO_PRINTF1(_L("WriteCancel"));
+	iBusDevComm->WriteCancel();
+	}
+
+void CT_RBusDevCommData::RunL(CActive* aActive, TInt aIndex)
+/**
+ Virtual RunL - Called on completion of an asynchronous command
+ @internalComponent
+ @see MTPActiveCallback
+ @param aActive Active Object that RunL has been called on
+ @pre N/A
+ @post N/A
+ @leave system wide error code
+*/
+	{
+	TBool	activeOk=ETrue;
+	TInt	err=KErrNone;
+
+	if ( aActive!=NULL )
+		{
+		err=aActive->iStatus.Int();
+		}
+
+	if ( aActive==iCallbackRead )
+		{
+		iCallbackRead->KillTimer();
+		INFO_PRINTF1(_L("RunL: Read()"));
+
+		if ( err==KErrNone )
+			{
+			TInt	length=iBufferReadPtr.Length();
+			HBufC*	bufferRead=HBufC::NewLC(length);
+			bufferRead->Des().Copy(iBufferReadPtr);
+			INFO_PRINTF2(_L("Received Data Length:%d"), length);
+			if ( iHasReadExpected )
+				{
+				const TDesC8&	expectedBuffer=iCallbackRead->Buffer();
+				if ( expectedBuffer.Match(iBufferReadPtr)!=0 )
+					{
+					for ( TInt index=0; index<length; ++index )
+						{
+						const TUint8&	actual=(*iBufferRead)[index];
+						const TUint8&	expected=expectedBuffer[index];
+						if ( actual!=expected )
+							{
+							ERR_PRINTF4(_L("Index:%d Read:%d Expected:%d"), index, (TInt)actual, (TInt)expected);
+							SetBlockResult(EFail);
+							}
+						}
+					}
+				}
+			CleanupStack::PopAndDestroy(bufferRead);
+			}
+		}
+	else if ( aActive==iCallbackReadOneOrMore )
+		{
+		INFO_PRINTF1(_L("RunL: ReadOneOrMore()"));
+
+		if ( err==KErrNone )
+			{
+			TInt	length=iBufferReadPtr.Length();
+			if ( iReadOneOrMoreLeft!=length )
+				{
+				iBufferReadPtr.SetLength(iReadOneOrMoreLeft);
+				iReadOneOrMoreLeft-=length;
+				INFO_PRINTF2(_L("iReadOneOrMoreLeft:%d"), iReadOneOrMoreLeft);
+				iBufferReadPtr.Set(iBufferReadPtr.RightTPtr(iReadOneOrMoreLeft));
+				iBufferReadPtr.SetLength(iReadOneOrMoreLeft);
+				INFO_PRINTF1(_L("ReadOneOrMore"));
+				iBusDevComm->ReadOneOrMore(iCallbackReadOneOrMore->iStatus, iBufferReadPtr);
+				iCallbackReadOneOrMore->Activate(aIndex);
+				IncOutstanding();
+				}
+			else
+				{
+				iCallbackReadOneOrMore->KillTimer();
+				HBufC*	bufferRead=HBufC::NewLC(iBufferLength);
+				bufferRead->Des().Copy(iBufferReadOneOrMorePtr);
+				if ( iHasReadExpected )
+					{
+					const TDesC8&	expectedBuffer=iCallbackReadOneOrMore->Buffer();
+					if ( expectedBuffer.Match(iBufferReadOneOrMorePtr)!=0 )
+						{
+						for ( TInt index=0; index<iBufferLength; ++index )
+							{
+							const TUint8&	actual=(*iBufferRead)[index];
+							const TUint8&	expected=expectedBuffer[index];
+							if ( actual!=expected )
+								{
+								ERR_PRINTF4(_L("Index:%d Read:%d Expected:%d"), index, (TInt)actual, (TInt)expected);
+								}
+							}
+
+						ERR_PRINTF1(KLogErrorExpectedValue);
+						SetBlockResult(EFail);
+						}
+					}
+				CleanupStack::PopAndDestroy(bufferRead);
+				}
+			}
+		}
+	else if ( aActive==iCallbackBreak )
+		{
+		iCallbackBreak->KillTimer();
+		INFO_PRINTF1(_L("RunL: Break()"));
+		}
+	else if ( aActive==iCallbackNotifySignalChange )
+		{
+		iCallbackNotifySignalChange->KillTimer();
+		INFO_PRINTF1(_L("RunL: NotifySignalChange()"));
+
+		if ( err==KErrNone )
+			{
+			INFO_PRINTF2(_L("Signals Changed=0x%x"), iNotifySignals);
+			if ( iHasNotifySignalsExpected )
+				{
+				if ( iNotifySignals!=iNotifySignalsExpected )
+					{
+					ERR_PRINTF3(KLogErrorExpectedSignal, iNotifySignals, iNotifySignalsExpected);
+					SetBlockResult(EFail);
+					}
+				}
+			}
+		}
+	else if ( aActive==iCallbackWrite )
+		{
+		iCallbackWrite->KillTimer();
+		INFO_PRINTF1(_L("RunL: Write()"));
+		}
+	else if ( aActive==iCallbackNotifyReceiveDataAvailable )
+		{
+		iCallbackNotifyReceiveDataAvailable->KillTimer();
+		INFO_PRINTF1(_L("RunL: NotifyReceiveDataAvailable()"));
+		}
+	else
+		{
+		CT_RBusLogicalChannelData::RunL(aActive, aIndex);
+		activeOk=EFalse;
+		}
+
+	if ( activeOk )
+		{
+		DecOutstanding();
+		}
+
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(_L("RunL Error %d"), err);
+		SetAsyncError(aIndex, err);
+		}
+	}
+
+void CT_RBusDevCommData::DoCancel(CActive* aActive, TInt aIndex)
+/**
+ Virtual DoCancel - Request to cancel the asynchronous command
+ @internalComponent
+ @see - MTPActiveCallback
+ @param aActive Active Object that DoCancel has been called on
+ @pre - N/A
+ @post - N/A
+ @leave system wide error code
+*/
+	{
+	TBool	activeOk=ETrue;
+	SetBlockResult(EFail);
+
+	if ( aActive==iCallbackRead )
+		{
+		ERR_PRINTF1(_L("ReadCancel Called"));
+		iBusDevComm->ReadCancel();
+		}
+	else if ( aActive==iCallbackReadOneOrMore )
+		{
+		ERR_PRINTF1(_L("ReadCancel Called"));
+		iBusDevComm->ReadCancel();
+		}
+	else if ( aActive==iCallbackBreak )
+		{
+		ERR_PRINTF1(_L("BreakCancel Called"));
+		iBusDevComm->BreakCancel();
+		}
+	else if ( aActive==iCallbackNotifySignalChange )
+		{
+		ERR_PRINTF1(_L("NotifySignalChangeCancel Called"));
+		iBusDevComm->NotifySignalChangeCancel();
+		}
+	else if ( aActive==iCallbackWrite )
+		{
+		ERR_PRINTF1(_L("WriteCancel Called"));
+		iBusDevComm->WriteCancel();
+		}
+	else if ( aActive==iCallbackNotifyReceiveDataAvailable )
+		{
+		ERR_PRINTF1(_L("NotifyReceiveDataAvailableCancel Called"));
+		iBusDevComm->NotifyReceiveDataAvailableCancel();
+		}
+	else
+		{
+		activeOk=EFalse;
+		CT_RBusLogicalChannelData::DoCancel(aActive, aIndex);
+		}
+
+	if ( activeOk )
+		{
+		DecOutstanding();
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/src/T_RBusLogicalChannelData.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_RBusLogicalChannelData.h"
+
+/*@{*/
+_LIT(KLogError,								"Error=%d");
+/*@}*/
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_RBusLogicalChannelData::CT_RBusLogicalChannelData()
+:	CT_RHandleBaseData()
+	{
+	}
+
+CT_RBusLogicalChannelData::~CT_RBusLogicalChannelData()
+/**
+ * Public destructor
+ */
+	{
+	}
+
+TBool CT_RBusLogicalChannelData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+	{
+	TBool	ret=ETrue;
+	TInt	err=KErrNone;
+
+	ret=CT_RHandleBaseData::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(KLogError, err);
+		SetError(err);
+		}
+
+	return ret;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/src/T_RConsoleData.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,416 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_RConsoleData.h"
+
+
+/*@{*/
+//wrappers
+_LIT(KCmdRead,				"Read");
+_LIT(KCmdWrite,				"Write");
+_LIT(KCmdControl,			"Control");
+_LIT(KCmdInit,				"Init");
+_LIT(KCmdDestroy,			"Destroy");
+_LIT(KCmdCreate,			"Create");
+_LIT(KCmdConstructor,		"new");
+_LIT(KCmdDestructor,		"~");
+_LIT(KCmdClearScreen,		"ClearScreen");
+
+//ini sections
+_LIT(KFldText,				"text");
+_LIT(KFldConsoleControl,	"consoleControl");
+_LIT(KFldConsoleName,		"consoleName");
+_LIT(KFldConsoleSize,		"consoleSize");
+_LIT(KFldSynchronous,		"synchronous");
+
+//format fields
+_LIT(KLogMissingParameter,	"Missing parameter '%S'");
+_LIT(KLogError,				"Error=%d");
+_LIT(KLogStringNotFound,	"String not found %S");
+_LIT(KLogStraySignal,		"Stray signal");
+_LIT(KLogAsyncError,		"Async RunL Error %d");
+_LIT(KLogDataMissing,		"Data missing for test");
+/*@}*/
+
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_RConsoleData* CT_RConsoleData::NewL()
+	{
+	CT_RConsoleData* console=new (ELeave) CT_RConsoleData();
+	CleanupStack::PushL(console);
+	console->ConstructL();
+	CleanupStack::Pop(console);
+	return console;
+	}
+
+CT_RConsoleData::CT_RConsoleData()
+:	CT_RSessionBaseData()
+,	iActiveRConsoleRead(NULL)
+,	iConsole(NULL)
+	{
+	}
+
+void CT_RConsoleData::ConstructL()
+/**
+ * Second phase construction
+ *
+ * @internalComponent
+ *
+ * @return	N/A
+ *
+ * @pre		None
+ * @post	None
+ *
+ * @leave	system wide error
+ */
+	{
+	iActiveRConsoleRead	= CT_ActiveRConsoleRead::NewL(*this);
+	}
+
+CT_RConsoleData::~CT_RConsoleData()
+/**
+ * Public destructor
+ */
+	{
+	DestroyData();
+	delete iActiveRConsoleRead;
+	iActiveRConsoleRead= 	NULL;
+	}
+
+void CT_RConsoleData::DestroyData()
+ /**
+ *	RConsole Destruction
+ *
+ */
+	{
+ 	delete	iConsole;
+ 	iConsole	=NULL;
+	}
+
+
+ TAny* CT_RConsoleData::GetObject()
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return	pointer to the object that the data wraps
+ */
+	{
+	return iConsole;
+	}
+
+RSessionBase* CT_RConsoleData::GetSessionBase()
+	{
+	return iConsole;
+	}
+
+RHandleBase* CT_RConsoleData::GetHandleBase()
+	{
+	return iConsole;
+	}
+
+TBool CT_RConsoleData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand                      The command to process
+ * @param aSection                      The section in the ini containing data for the command
+ * @param aAsyncErrorIndex              Command index for async calls to return errors to
+ *
+ * @return                              ETrue if the command is processed
+ *
+ * @leave                               System wide error
+ */
+	{
+	TBool 	ret	=ETrue;
+	TInt	error=KErrNone;
+
+	if (aCommand==KCmdConstructor())
+		{
+		error	=DoCmdConstructor();
+		}
+	else if ( aCommand==KCmdDestructor )
+		{
+		DoCmdDestructor();
+		}
+	else if ( aCommand==KCmdRead())
+		{
+		error	=DoCmdRead(aSection, aAsyncErrorIndex);
+		}
+	else if ( aCommand==KCmdWrite())
+		{
+		error	=DoCmdWrite(aSection);
+		}
+	else if ( aCommand==KCmdDestroy())
+		{
+		error	=DoCmdDestroy();
+		}
+	else if ( aCommand==KCmdControl())
+		{
+		error	=DoCmdControl(aSection);
+		}
+	else if ( aCommand==KCmdInit())
+		{
+		error	=DoCmdInit(aSection);
+		}
+	else if ( aCommand==KCmdCreate())
+		{
+		error	=DoCmdCreate();
+		}
+	else if ( aCommand==KCmdClearScreen())
+		{
+		error	=DoCmdClearScreen();
+		}
+	else
+		{
+		ret=CT_RSessionBaseData::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+
+	if ( error!=KErrNone )
+		{
+		ERR_PRINTF2(KLogError, error);
+		SetError(error);
+		}
+
+	return ret;
+	}
+
+TInt CT_RConsoleData::DoCmdConstructor()
+ /**
+ *	Wrapper function for RConsole Construction
+ *
+ */
+	{
+	DestroyData();
+	TRAPD(err, iConsole=new (ELeave) RConsole());
+	return err;
+	}
+
+void CT_RConsoleData::DoCmdDestructor()
+ /**
+ *	Wrapper function for RConsole Destruction
+ *
+ */
+	{
+	DestroyData();
+	}
+
+TInt CT_RConsoleData::DoCmdRead(const TDesC& aSection , const TInt aAsyncErrorIndex)
+ /**
+ *	Wrapper function for RConsole::Read(TConsoleKey &aKeystroke,TRequestStatus &aStatus)
+ * 	and RConsole::Read(TConsoleKey &aKeystroke)
+ *
+ *	@param		aSection			The section in the ini containing data for the command
+ * 	@param		aAsyncErrorIndex	Command index for async calls to return errors to
+ */
+ 	{
+ 	TBool	sync=EFalse;
+	GETFROMCONFIGOPTIONAL(Bool, aSection, KFldSynchronous(), sync, KLogMissingParameter);
+
+	TInt	error=KErrNone;
+	if ( !sync )
+		{
+		if ( !iActiveRConsoleRead->KickStartL(aSection, aAsyncErrorIndex, *iConsole) )
+			{
+			ERR_PRINTF1(KLogDataMissing);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			IncOutstanding();
+			}
+		}
+	else
+		{
+		TConsoleKey	key;
+		error=iConsole->Read(key);
+		}
+	return error;
+ 	}
+
+TInt CT_RConsoleData::DoCmdWrite(const TDesC& aSection )
+ /**
+ *	Wrapper function for RConsole::Write(const TDesC &aDes)
+ *	@param		aSection			The section in the ini containing data for the command
+ */
+ 	{
+	TBool dataOk	=EFalse;
+	TInt error		=KErrNone;
+	TPtrC string;
+	GETSTRINGFROMCONFIGMANDATORY(aSection, KFldText(), string, KLogStringNotFound,  dataOk);
+	if ( dataOk==KErrNone)
+		{
+		error	=iConsole->Write(string);
+		}
+	return error;
+ 	}
+
+TInt CT_RConsoleData::DoCmdControl(const TDesC& aSection)
+ /**
+ *	Wrapper function for RConsole::Control(const TDesC &aDes)
+ *	@param		aSection			The section in the ini containing data for the command
+ */
+	{
+	TBool dataOk	=EFalse;
+	TInt error	=KErrNone;
+	TPtrC control;
+	GETSTRINGFROMCONFIGMANDATORY(aSection, KFldConsoleControl(), control, KLogStringNotFound, dataOk);
+	if (dataOk==KErrNone)
+		{
+		error	=iConsole->Control(control);
+		}
+	return error;
+	}
+
+TInt CT_RConsoleData::DoCmdInit(const TDesC& aSection)
+ /**
+ *	Wrapper function for RConsole::Init(const TDesC &aName,const TSize &aSize
+ *	@param		aSection			The section in the ini containing data for the command
+ */
+	{
+
+	TBool	dataOk=ETrue;
+
+	TPtrC	name;
+	GETSTRINGFROMCONFIGMANDATORY(aSection, KFldConsoleName(), name, KLogMissingParameter, dataOk);
+
+	TSize	size(KConsFullScreen, KConsFullScreen);
+	GetSizeFromConfig(aSection, KFldConsoleSize(), size);
+	TInt	error=KErrNone;
+	if ( dataOk )
+		{
+		error=iConsole->Init(name, size);
+		}
+
+	return error;
+	}
+
+TInt CT_RConsoleData::DoCmdDestroy()
+ /**
+ *	Wrapper function for RConsole::Destroy()
+ */
+	{
+	return iConsole->Destroy();
+	}
+
+TInt CT_RConsoleData::DoCmdCreate()
+ /**
+ *	Wrapper function for RConsole::Create()
+ */
+	{
+	return iConsole->Create();
+	}
+
+TInt CT_RConsoleData::DoCmdClearScreen()
+ /**
+ *	Wrapper function for RConsole::ClearScreen()
+ *
+ */
+	{
+	return iConsole->ClearScreen();
+	}
+
+void CT_RConsoleData::RunL(CActive* aActive, TInt aIndex)
+ /**
+ * Called on completion of an asynchronous command
+ * @param               aActive Active Object that RunL has been called on
+ * @param               aIndex number of the command.
+ * @pre                 N/A
+ * @post                N/A
+ * @leave               system wide error code
+ */
+	{
+	TBool	activeOk=ETrue;
+	TInt	err=KErrNone;
+	if ( aActive!=NULL )
+		{
+		err=aActive->iStatus.Int();
+		}
+
+	TBool	moreToDo=EFalse;
+	if(	aActive==iActiveRConsoleRead)
+		{
+		iActiveRConsoleRead->KillTimer();
+		if ( err==KErrNone )
+			{
+			
+			moreToDo=iActiveRConsoleRead->VerifyDataAndKick(aIndex, *iConsole);
+			if ( !moreToDo )
+				{
+				INFO_PRINTF1(_L("All Events have been read"));
+				}
+			}
+
+		}
+	else
+		{
+		activeOk=EFalse;
+		ERR_PRINTF1(KLogStraySignal);
+		SetBlockResult(EFail);
+		}
+
+	if ( activeOk )
+		{
+		if ( !moreToDo )
+			{
+			DecOutstanding();
+			}
+		if ( err!=KErrNone )
+			{
+			ERR_PRINTF2(KLogAsyncError, err);
+			SetAsyncError(aIndex, err);
+			}
+		}
+	}
+
+void CT_RConsoleData::DoCancel(CActive* aActive, TInt aIndex)
+ /**
+ * Called on cancellation of an asynchronous command
+ * @param               aActive Active Object that RunL has been called on
+ * @param               aIndex number of the command.
+ */
+	{
+	TBool	activeOk=ETrue;
+	TInt	err=KErrNone;
+		
+	if ( aActive==iActiveRConsoleRead )
+		{
+		INFO_PRINTF1(_L("ReadCancel Called"));
+		iActiveRConsoleRead->KillTimer();
+		iConsole->ReadCancel();
+		err=aActive->iStatus.Int();
+		}
+	else
+		{
+		activeOk=EFalse;
+		ERR_PRINTF1(KLogStraySignal);
+		SetBlockResult(EFail);
+		}
+
+	if ( activeOk )
+		{
+		DecOutstanding();
+	 	if( err != KErrNone )
+            {
+            ERR_PRINTF2(_L("DoCancel Error %d"), err);
+            SetAsyncError( aIndex, err );
+            }
+		}
+
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/src/T_RDevUsbcClientData.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,984 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+// This contains implementation for CT_RDevUsbcClientData class
+
+
+
+#include <f32file.h>
+#include <d32usbc.h>
+#include "T_RDevUsbcClientData.h" 
+
+
+
+/*@{*/
+//LITs to identify the commands
+_LIT(KCmdNewL,									"NewL");
+_LIT(KCmdUtilityLoadLogicalDevice, 				"LoadLogicalDevice");
+_LIT(KCmdOpen, 					    			"Open");
+_LIT(KCmdDeviceCaps,							"DeviceCaps");
+_LIT(KCmdUtilitySetEndPoint, 					"SetEndPoint");
+_LIT(KCmdEndpointCaps,							"EndpointCaps");
+_LIT(KCmdSetInterface, 							"SetInterface");
+_LIT(KCmdGetDeviceDescriptorSize,				"GetDeviceDescriptorSize");
+_LIT(KCmdGetDeviceDescriptor,					"GetDeviceDescriptor");
+_LIT(KCmdSetDeviceDescriptor,					"SetDeviceDescriptor");
+_LIT(KCmdDestructor,							"~");
+/*@}*/
+
+
+/*@{*/
+//LITs to read from the ini file
+_LIT(KMode, 									"mode");
+_LIT(KDirection, 								"direction");
+_LIT(KBufferingMask, 							"bandwidthBufferingMask");
+_LIT(KSupportsConnect,							"supportsConnect");
+_LIT(KSupportsSelfPowered, 						"supportsSelfPowered");
+_LIT(KSupportsRemoteWakeup, 					"supportsRemoteWakeup");
+_LIT(KUSBVersionLow, 							"USBVersionLow");
+_LIT(KUSBVersionHigh,							"USBVersionHigh");
+_LIT(KVendorIDLow, 								"VendorIDLow");
+_LIT(KVendorIDHigh, 							"VendorIDHigh");
+_LIT(KProductIDLow, 							"ProductIDLow");
+_LIT(KProductIDHigh, 							"ProductIDHigh");
+_LIT(KReleaseNumberLow, 						"ReleaseNumberLow");
+_LIT(KReleaseNumberHigh, 						"ReleaseNumberHigh");
+_LIT(KDriver, 									"driver");
+_LIT(KEXPECTED, 								"expected");
+/*@}*/
+
+/*@{*/
+_LIT16(interfaceName, "USB interface");
+/*@}*/
+
+/*@{*/
+_LIT(KResourceDMA, 							"ResourceDMA");
+_LIT(KResourceDoubleBuffering,				"ResourceDoubleBuffering");
+/*@}*/
+const CDataWrapperBase::TEnumEntryTable CT_RDevUsbcClientData::iEUsbcEndpointResource[] = 
+	{ 
+	{ KResourceDMA,					EUsbcEndpointResourceDMA },		// Requests the use of DMA =0
+	{ KResourceDoubleBuffering,		EUsbcEndpointResourceDoubleBuffering },	//Requests the use of double FIFO buffering = 1	
+	};
+
+/**
+ * Two phase constructor
+ *
+ * @leave	system wide error
+ */
+CT_RDevUsbcClientData* CT_RDevUsbcClientData::NewL()
+	{
+	CT_RDevUsbcClientData*	ret=new (ELeave) CT_RDevUsbcClientData();
+	CleanupStack::PushL(ret);
+	ret->ConstructL();
+	CleanupStack::Pop(ret);
+	return ret;
+	}
+
+/**
+ * Protected constructor. First phase construction
+ */
+CT_RDevUsbcClientData::CT_RDevUsbcClientData()
+	:
+	iChannel(NULL),
+	iInterface(NULL),
+	iEndpointData(),
+	iConfiguredEndpoints(0),
+	iTxMaxPacketSize(0),
+	iCaps(),
+	iActiveCallback(NULL),
+	iBuffer(NULL),
+    iBuffer_verify(NULL),
+    iDeviceDescriptorSize(0)
+	{
+	
+	}
+
+/**
+ * Second phase construction
+ *
+ * @internalComponent
+ *
+ * @return	N/A
+ *
+ * @pre		None
+ * @post	None
+ *
+ * @leave	system wide error
+ */
+void CT_RDevUsbcClientData::ConstructL()
+	{
+	iActiveCallback = CActiveCallback::NewL(*this);	
+	}
+
+/**
+ * Public destructor
+ */
+CT_RDevUsbcClientData::~CT_RDevUsbcClientData()
+	{		
+	// Empty arrays and delete objects
+
+	DestroyData();
+
+	if (iActiveCallback)
+		{
+		delete iActiveCallback;
+		iActiveCallback = NULL;
+		}
+	}
+
+/**
+ *  RunL is called when an asynchronous call has completed
+ * 
+ *  @param aActive - a pointer to an active object
+ *  @param aIndex - Index of the asynchronous call
+ * 
+ */
+void CT_RDevUsbcClientData::RunL(CActive* aActive, TInt aIndex)
+	{
+	INFO_PRINTF1(_L("*START*CT_RDevUsbcClientData::RunL"));
+	DecOutstanding(); // One of the async calls has completed 
+	TBool straySignal = EFalse; 
+		  
+	if(aActive == iActiveCallback)
+		{
+		INFO_PRINTF1(_L("Asynchronous task has completed. RunL  called"));
+		}		
+	else
+		{ 
+		ERR_PRINTF1(_L("Stray RunL signal"));
+		SetBlockResult(EFail);
+		straySignal = ETrue;		
+		}
+	
+	if( !straySignal ) 
+		{ 
+		TInt err = aActive->iStatus.Int(); 
+		if( err != KErrNone ) 
+			{ 
+			ERR_PRINTF2(_L("RunL Error %d"), err); 
+			SetAsyncError( aIndex, err );		
+			} 
+		else
+			{ 
+			INFO_PRINTF1(_L("RunL  completed successfully"));
+			}
+		}
+	INFO_PRINTF1(_L("*END*CT_RDevUsbcClientData::RunL"));
+	}
+
+
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return	pointer to the object that the data wraps
+ */
+TAny* CT_RDevUsbcClientData::GetObject()
+	{
+	return iChannel;
+	}
+
+/**
+ * Returns the wrapper.
+ * 
+ * @return pointer to the Wrapper class
+ */
+
+
+
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ * @return					ETrue if the command is processed
+ * @leave					System wide error
+ */
+TBool CT_RDevUsbcClientData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt /*aAsyncErrorIndex*/)
+	{
+	TBool ret=ETrue;
+		
+	if(aCommand == KCmdNewL )
+		{
+		DoCmdNewL();
+		}
+	else if(aCommand == KCmdUtilityLoadLogicalDevice)
+		{
+		DoCmdUtilityLoadLogicalDevice(aSection);
+		}
+	else if(aCommand == KCmdOpen)
+		{
+		DoCmdOpen();
+		}
+	else if(aCommand == KCmdDeviceCaps)
+		{
+		DoCmdDeviceCaps(aSection);
+		}	
+	else if(aCommand == KCmdGetDeviceDescriptorSize)
+		{
+		DoCmdGetDeviceDescriptorSize(aSection);
+		}
+	else if(aCommand == KCmdGetDeviceDescriptor)
+		{
+		DoCmdGetDeviceDescriptor(aSection);
+		}
+	else if(aCommand == KCmdSetDeviceDescriptor)
+		{
+		DoCmdSetDeviceDescriptor(aSection);
+		}
+	else if(aCommand == KCmdUtilitySetEndPoint)
+		{
+		DoCmdUtilitySetEndPointL(aSection);
+		}	
+	else if(aCommand == KCmdEndpointCaps)
+		{
+		DoCmdEndpointCaps();
+		}
+	else if(aCommand == KCmdSetInterface)
+		{
+		DoCmdSetInterface(aSection);
+		}	
+	else if(aCommand == KCmdDestructor)
+		{
+		DoCmdDestructor();
+		}
+	else
+		{
+		ERR_PRINTF1(_L("Unknown command"));
+		ret = EFalse;
+		}
+	
+	return ret;
+	}
+
+
+
+/**
+ * Creante an object of RDevUsbcClient
+ */
+void  CT_RDevUsbcClientData::DoCmdNewL()
+	{
+	INFO_PRINTF1(_L("*START*CT_RDevUsbcClientData::DoCmdNewL"));
+	DestroyData();
+	iChannel = new (ELeave) RDevUsbcClient();
+	INFO_PRINTF1(_L("*END*CT_RDevUsbcClientData::DoCmdNewL"));
+	}
+/**
+ * Loads Logical Device for USB.
+ */
+void CT_RDevUsbcClientData::DoCmdUtilityLoadLogicalDevice(const TTEFSectionName& aSection)
+	{
+	INFO_PRINTF1(_L("*START*CT_RDevUsbcClientData::DoCmdUtilityLoadLogicalDevice"));
+	TInt error(KErrNone);
+	TBool dataOk = ETrue;
+	TPtrC lddName;
+	TBufC<9> value;	
+	if(!GetStringFromConfig(aSection, KDriver, lddName))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), & KDriver);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}	
+	if(dataOk)
+		{	
+		value = lddName;		
+		INFO_PRINTF2(_L("Driver: %S"), & value);
+		error = User::LoadLogicalDevice(value);		
+		
+		if(error == KErrAlreadyExists)
+			{
+			INFO_PRINTF2(_L("USB - Logical device driver loaded with %d, error will be changed to KErrNone"), error);
+			error = KErrNone;
+			}
+		if(error != KErrNone)
+			{
+			ERR_PRINTF2(_L("USB - Could not load logical device driver. Error %d"), error);
+			}
+		else
+			{
+			INFO_PRINTF2(_L("USB - Logical device driver loaded with %d"), error);
+			}	
+		SetError(error);
+		}		
+	INFO_PRINTF1(_L("*END*CT_RDevUsbcClientData::DoCmdUtilityLoadLogicalDevice"));
+	}
+
+/**
+ * Opens a USB channel 
+ */
+void CT_RDevUsbcClientData::DoCmdOpen()
+	{
+	INFO_PRINTF1(_L("*START*CT_RDevUsbcClientData::DoCmdOpen"));
+	// Open USB driver channel
+	TInt error = iChannel->Open(USB::KUSBChannelOpenParameter);
+
+	if (error != KErrNone)
+		{
+		ERR_PRINTF2(_L("ERROR %d when opening channel"), error);
+		}
+	else
+		{
+		INFO_PRINTF2(_L("Channel open returns: %d "), error);
+		}
+
+	SetError(error);
+	INFO_PRINTF1(_L("*END*CT_RDevUsbcClientData::DoCmdOpen"));
+	}
+
+/**
+ * Reads device capabilities and verifies them
+ * @param aSection		The section in the ini containing data for the command
+ */
+void CT_RDevUsbcClientData::DoCmdDeviceCaps(const TTEFSectionName& aSection)
+	{
+	INFO_PRINTF1(_L("*START*CT_RDevUsbcClientData::DoCmdDeviceCaps"));
+	TBool supportsConnect;
+	TBool dataOk = ETrue;
+	if(!GetBoolFromConfig(aSection, KSupportsConnect, supportsConnect))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KSupportsConnect);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	
+	TBool supportsSelfPowered;
+	if(!GetBoolFromConfig(aSection, KSupportsSelfPowered, supportsSelfPowered))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KSupportsSelfPowered);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	
+	TBool supportsRemoteWakeup;
+	if(!GetBoolFromConfig(aSection, KSupportsRemoteWakeup, supportsRemoteWakeup))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KSupportsRemoteWakeup);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	if(dataOk)
+		{
+		TInt error = iChannel->DeviceCaps(iCaps);
+		if (error != KErrNone)
+			{
+			ERR_PRINTF2(_L("Failed to read device caps [%d]"), error);
+			SetError(error);
+			}
+		else
+			{
+			// Check that reported device capabilities are what they should be
+			INFO_PRINTF2(_L("Device supports %d endpoints"), iCaps().iTotalEndpoints );
+			INFO_PRINTF2(_L("Device supports Software-Connect: %s"), iCaps().iConnect ? _S("yes") : _S("no"));
+			if(!iCaps().iConnect && supportsConnect)
+				{
+				ERR_PRINTF1(_L("Device supports Software-Connect feature IS NOT SUPPORTED"));
+				SetBlockResult(EFail);
+				}
+
+			INFO_PRINTF2(_L("Device is Self-Powered: %s"), iCaps().iSelfPowered ? _S("yes") : _S("no"));
+			if(!iCaps().iSelfPowered && supportsSelfPowered)
+				{
+				ERR_PRINTF1(_L("Device is Self-Powered feature IS NOT SUPPORTED"));
+				SetBlockResult(EFail);
+				}
+
+			INFO_PRINTF2(_L("Device supports Remote-Wakeup:	%s"),iCaps().iRemoteWakeup ? _S("yes") : _S("no"));
+			if(!iCaps().iRemoteWakeup && supportsRemoteWakeup)
+				{
+				ERR_PRINTF1(_L("Device supports Remote-Wakeup feature IS NOT SUPPORTED"));
+				SetBlockResult(EFail);
+				}
+			}		
+		}
+	INFO_PRINTF1(_L("*END*CT_RDevUsbcClientData::DoCmdDeviceCaps"));
+	}
+
+/**
+ * Reads device endpoint capabilities and prints them
+ */
+void CT_RDevUsbcClientData::DoCmdEndpointCaps()
+	{
+	INFO_PRINTF1(_L("*START*CT_RDevUsbcClientData::DoCmdEndpointCaps"));
+	TPtr8 endpointData(reinterpret_cast<TUint8*>(iEndpointData), sizeof(iEndpointData), sizeof(iEndpointData));
+	TInt error = iChannel->EndpointCaps(endpointData);
+
+	if (error != KErrNone)
+		{
+		ERR_PRINTF2(_L("Failed to read endpoint caps [%d]"), error);
+		SetError(error);
+		}
+	else
+		{
+		INFO_PRINTF1(_L("User endpoint capabilities:"));
+		for (TInt i = 0; i < iCaps().iTotalEndpoints; i++)
+			{
+			const TUsbcEndpointCaps* caps = &iEndpointData[i].iCaps;
+			INFO_PRINTF4(_L("Endpoint %02d: MaxPackeSize=%s TypeDirM = 0x%08x "),
+						i + 1,
+						(caps->iSizes & KUsbEpSizeCont ) ? _S("Continuous") :
+						((caps->iSizes & KUsbEpSize8) ? _S("8 bytes") :
+						((caps->iSizes & KUsbEpSize16) ? _S("16 bytes") :
+						((caps->iSizes & KUsbEpSize32) ? _S("32 bytes") :
+						((caps->iSizes & KUsbEpSize64) ? _S("64 bytes") :
+						((caps->iSizes & KUsbEpSize128) ? _S("128 bytes") :
+						((caps->iSizes & KUsbEpSize256) ? _S("256 bytes") :
+						((caps->iSizes & KUsbEpSize512) ? _S("512 bytes") :
+						((caps->iSizes & KUsbEpSize1023) ? _S("1023 bytes") :
+						((caps->iSizes & KUsbEpSize1024) ? _S("1024 bytes") :
+						_S("Unknown")))))))))),
+						caps->iTypesAndDir);
+			}
+		}
+	INFO_PRINTF1(_L("*END*CT_RDevUsbcClientData::DoCmdEndpointCaps"));
+	}
+
+
+/*
+ * Inits USB Device Descriptors - Get the device descriptor size
+ */
+
+void CT_RDevUsbcClientData::DoCmdGetDeviceDescriptorSize(const TTEFSectionName& aSection)
+	{	
+	// Read the size of the descriptors and create buffer to store them.
+	INFO_PRINTF1(_L("*START*CT_RDevUsbcClientData::DoCmdGetDeviceDescriptorSize"));
+    TInt expected;
+    if(!GetIntFromConfig(aSection, KEXPECTED, expected))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KEXPECTED);
+		SetBlockResult(EFail);
+		}
+    else
+        {
+        iDeviceDescriptorSize = 0;
+    	INFO_PRINTF1(_L("Initializing device descriptors"));
+        INFO_PRINTF1(_L("void CT_RDevUsbcClientData::GetDeviceDescriptorSize() BEGIN"));
+    	iChannel->GetDeviceDescriptorSize(iDeviceDescriptorSize);	
+        
+        if(expected != iDeviceDescriptorSize)
+            {
+            ERR_PRINTF3(_L("Expected size != actual size, expected = %d, actual = %d "),expected, iDeviceDescriptorSize);
+            SetBlockResult(EFail);
+            }
+        }
+        // initialize buffer which used to verify.
+        
+            
+    INFO_PRINTF1(_L("*END*CT_RDevUsbcClientData::DoCmdGetDeviceDescriptorSize"));
+	}
+
+/**
+ * Inits USB Device Descriptors - Get device descriptor
+ */
+
+void CT_RDevUsbcClientData::DoCmdGetDeviceDescriptor(const TTEFSectionName& aSection)
+	{
+	INFO_PRINTF1(_L("*START*CT_RDevUsbcClientData::DoCmdGetDeviceDescriptor"));
+    
+    //initialize descriptor buffer.
+    TRAPD(error, iBuffer = HBufC8::NewL(iDeviceDescriptorSize));
+    if(error != KErrNone || !iBuffer)
+    	{
+    	ERR_PRINTF2(_L("Failed to initialize device descriptor [%d]"),error);
+    	SetError(error);
+    	}
+    TRAPD(error2, iBuffer_verify = HBufC8::NewL(iDeviceDescriptorSize));
+    if(error2 != KErrNone || !iBuffer_verify)
+    	{
+    	ERR_PRINTF2(_L("Failed to initialize device descriptor [%d]"),error2);
+    	SetError(error2);
+    	}  
+    
+	TInt err;	
+	TPtr8 devDescrPtr = iBuffer->Des();
+	// Read the current descriptors.	
+	err = iChannel->GetDeviceDescriptor(devDescrPtr);
+	if (err != KErrNone)
+		{
+		ERR_PRINTF2(_L("Failed to get the device descriptor [%d]"),err);
+		SetError(err);
+		}   
+        
+    // Read descriptors from ini and compare.
+    TInt USBVersionLow;
+	TBool dataOk = ETrue;
+	if(!GetIntFromConfig(aSection, KUSBVersionLow, USBVersionLow))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KUSBVersionLow);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	TInt USBVersionHigh;
+	if(!GetIntFromConfig(aSection, KUSBVersionHigh, USBVersionHigh))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KUSBVersionHigh);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	TInt VendorIDLow;
+	if(!GetIntFromConfig(aSection, KVendorIDLow, VendorIDLow))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KVendorIDLow);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	TInt VendorIDHigh;
+	if(!GetIntFromConfig(aSection, KVendorIDHigh, VendorIDHigh))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KVendorIDHigh);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	// product ID for test device
+	TInt ProductIDLow;
+	if(!GetIntFromConfig(aSection, KProductIDLow, ProductIDLow))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KProductIDLow);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	TInt ProductIDHigh;
+	if(!GetIntFromConfig(aSection, KProductIDHigh, ProductIDHigh))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KProductIDHigh);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	// release number
+	TInt ReleaseNumberLow;
+	if(!GetIntFromConfig(aSection, KReleaseNumberLow, ReleaseNumberLow))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KReleaseNumberLow);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	TInt ReleaseNumberHigh;
+	if(!GetIntFromConfig(aSection, KReleaseNumberHigh, ReleaseNumberHigh))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KReleaseNumberHigh);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}			
+	// Device descriptor data is presented in bytes (Little endian)
+	// defined in the .ini file
+	// The following presents numeric values device uses to introduce
+	// herself to USB host in enumeration process
+	if(dataOk)
+		{
+		TPtr8 devDescrPtr_verify = iBuffer_verify->Des();
+		err = iChannel->GetDeviceDescriptor(devDescrPtr_verify);
+		if (err != KErrNone)
+			{
+			ERR_PRINTF2(_L("Failed to get the device descriptor [%d]"),err);
+			SetError(err);
+			}   
+		// USB version
+		devDescrPtr_verify[USB::KSpecOffset] = USBVersionLow;
+		devDescrPtr_verify[USB::KSpecOffset + 1] = USBVersionHigh;
+
+		devDescrPtr_verify[USB::KVendorOffset] = VendorIDLow;
+		devDescrPtr_verify[USB::KVendorOffset + 1] = VendorIDHigh;
+
+		// product ID for test device
+		devDescrPtr_verify[USB::KProductIDOffset] = ProductIDLow;
+		devDescrPtr_verify[USB::KProductIDOffset + 1] = ProductIDHigh;
+
+		// Set release number
+		devDescrPtr_verify[USB::KReleaseOffset] = ReleaseNumberLow;
+		devDescrPtr_verify[USB::KReleaseOffset + 1] = ReleaseNumberHigh;
+
+        if(devDescrPtr != devDescrPtr_verify)
+            {
+            ERR_PRINTF1(_L("Expected DeviceDescriptor is not the same as actual. "));
+            SetBlockResult(EFail);
+            }
+		}	
+        
+        delete iBuffer;
+		iBuffer = NULL;
+        delete iBuffer_verify;
+		iBuffer_verify = NULL;
+
+	INFO_PRINTF1(_L("*END*CT_RDevUsbcClientData::DoCmdGetDeviceDescriptor"));
+	}
+
+/**
+ * Inits USB Device Descriptors - Set device descriptor
+ * @param aSection - The section in the ini containing data for the command
+ */
+void CT_RDevUsbcClientData::DoCmdSetDeviceDescriptor(const TTEFSectionName& aSection)
+	{
+	// USB version
+	INFO_PRINTF1(_L("*START*CT_RDevUsbcClientData::DoCmdSetDeviceDescriptor"));
+    
+    iDeviceDescriptorSize = 0;
+    INFO_PRINTF1(_L("Initializing device descriptors"));
+    iChannel->GetDeviceDescriptorSize(iDeviceDescriptorSize);	
+    INFO_PRINTF2(_L("Device descriptor size = %d"), iDeviceDescriptorSize);
+    
+    //initialize descriptor buffer.
+    TRAPD(err, iBuffer = HBufC8::NewL(iDeviceDescriptorSize));
+    if(err != KErrNone || !iBuffer)
+    	{
+    	ERR_PRINTF2(_L("Failed to initialize device descriptor [%d]"),err);
+    	SetError(err);
+    	}
+    
+	TInt error;
+	TInt USBVersionLow;
+	TBool dataOk = ETrue;
+	if(!GetIntFromConfig(aSection, KUSBVersionLow, USBVersionLow))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KUSBVersionLow);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	TInt USBVersionHigh;
+	if(!GetIntFromConfig(aSection, KUSBVersionHigh, USBVersionHigh))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KUSBVersionHigh);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+
+	TInt VendorIDLow;
+	if(!GetIntFromConfig(aSection, KVendorIDLow, VendorIDLow))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KVendorIDLow);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	TInt VendorIDHigh;
+	if(!GetIntFromConfig(aSection, KVendorIDHigh, VendorIDHigh))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KVendorIDHigh);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	// product ID for test device
+	TInt ProductIDLow;
+	if(!GetIntFromConfig(aSection, KProductIDLow, ProductIDLow))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KProductIDLow);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	TInt ProductIDHigh;
+	if(!GetIntFromConfig(aSection, KProductIDHigh, ProductIDHigh))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KProductIDHigh);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	// release number
+	TInt ReleaseNumberLow;
+	if(!GetIntFromConfig(aSection, KReleaseNumberLow, ReleaseNumberLow))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KReleaseNumberLow);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	TInt ReleaseNumberHigh;
+	if(!GetIntFromConfig(aSection, KReleaseNumberHigh, ReleaseNumberHigh))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KReleaseNumberHigh);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}			
+	// Device descriptor data is presented in bytes (Little endian)
+	// defined in the .ini file
+	// The following presents numeric values device uses to introduce
+	// herself to USB host in enumeration process
+	if(dataOk)
+		{
+		TPtr8 devDescrPtr = iBuffer->Des();
+		devDescrPtr.FillZ(devDescrPtr.MaxLength());
+
+		// USB version
+		devDescrPtr[USB::KSpecOffset] = USBVersionLow;
+		devDescrPtr[USB::KSpecOffset + 1] = USBVersionHigh;
+
+		devDescrPtr[USB::KVendorOffset] = VendorIDLow;
+		devDescrPtr[USB::KVendorOffset + 1] = VendorIDHigh;
+
+		// product ID for test device
+		devDescrPtr[USB::KProductIDOffset] = ProductIDLow;
+		devDescrPtr[USB::KProductIDOffset + 1] = ProductIDHigh;
+
+		// Set release number
+		devDescrPtr[USB::KReleaseOffset] = ReleaseNumberLow;
+		devDescrPtr[USB::KReleaseOffset + 1] = ReleaseNumberHigh;
+
+		INFO_PRINTF1(_L("Setting device descriptors"));
+		// Store the descriptors.
+		error = iChannel->SetDeviceDescriptor(devDescrPtr);
+		if (error != KErrNone)
+			{
+			ERR_PRINTF2(_L("Failed to set the device descriptor [%d]"),error);
+			delete iBuffer;
+			SetError(error);
+			}
+		else
+			{
+			delete iBuffer;
+			iBuffer = NULL;
+			}
+		
+		INFO_PRINTF1(_L("Device descriptors set"));
+		}	
+	INFO_PRINTF1(_L("*END*CT_RDevUsbcClientData::DoCmdSetDeviceDescriptor"));
+	}
+
+/**
+ * Sets USB EndPoints
+ * @param aSection - The section in the ini containing data for the command
+ */
+
+void CT_RDevUsbcClientData::DoCmdUtilitySetEndPointL(const TTEFSectionName& aSection)
+	{
+	INFO_PRINTF1(_L("*START*CT_RDevUsbcClientData::DoCmdUtilitySetEndPointL"));
+	TPtrC16 mode;
+	TBool dataOk = ETrue;
+	if(!GetStringFromConfig(aSection, KMode, mode))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KMode);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	TPtrC16 direction;
+	if(!GetStringFromConfig(aSection, KDirection, direction))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KDirection);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	if(dataOk)
+		{
+		TInt error(KErrNone);	
+		if(mode == USB::KEPBulk)
+			{
+			INFO_PRINTF1(_L("Selected mode is KEPBulk"));
+			if(direction == USB::KEPIn)
+				{
+				error = SetEndpoint(KUsbEpTypeBulk, KUsbEpDirIn);
+				if (error != KErrNone)
+					{
+					ERR_PRINTF2(_L("Failed to set end point direction to KEPIn with error [%d]"), error);
+					SetBlockResult(EFail);					
+					}
+				}
+			else if(direction == USB::KEPOut)
+				{
+				error = SetEndpoint(KUsbEpTypeBulk, KUsbEpDirOut);
+				if (error != KErrNone)
+					{
+					ERR_PRINTF2(_L("Failed to set end point direction to KEPOut with error [%d]"), error);
+					SetBlockResult(EFail);
+					}
+				}
+			else
+				{
+				ERR_PRINTF2(_L("USB - INCORRECT direction %S"), direction.AllocL());
+				SetBlockResult(EFail);
+				}
+			}
+		else if(mode == USB::KEPInterrupt)
+			{
+			INFO_PRINTF1(_L("Selected mode is KEPInterrupt"));
+			if(direction == USB::KEPIn)
+				{
+				error = SetEndpoint(KUsbEpTypeInterrupt, KUsbEpDirIn);
+				if (error != KErrNone)
+					{
+					ERR_PRINTF2(_L("Failed to set end point direction to KEPIn with error [%d]"), error);
+					SetBlockResult(EFail);
+					}
+				}
+			else if(direction == USB::KEPOut)
+				{
+				error = SetEndpoint(KUsbEpTypeInterrupt, KUsbEpDirOut);
+				if (error != KErrNone)
+					{
+					ERR_PRINTF2(_L("Failed to set end point direction to KEPOut with error [%d]"), error);
+					SetBlockResult(EFail);
+					}
+				}
+			else
+				{
+				ERR_PRINTF2(_L("USB - INCORRECT direction %S"), direction.AllocL());
+				SetBlockResult(EFail);
+				}
+			}
+		else
+			{
+			ERR_PRINTF2(_L("USB - Mode not supported %S"), mode.AllocL());
+			SetBlockResult(EFail);
+			}
+		}			
+	INFO_PRINTF1(_L("*END*CT_RDevUsbcClientData::DoCmdUtilitySetEndPointL"));
+	}
+
+
+/**
+ * Sets a new endpoint for interface handled by this channel
+ * @param aEndpointType - USB endpoint type
+ * @param aEndpointDirection - USB endpoint direction	
+ */
+TInt CT_RDevUsbcClientData::SetEndpoint(TUint aEndpointType, TUint aEndpointDirection)
+	{
+	INFO_PRINTF1(_L("*START*CT_RDevUsbcClientData::SetEndpoint"));
+	if(iConfiguredEndpoints == KMaxEndpointsPerClient)
+		{
+		ERR_PRINTF2(_L("Maximum number of endpoints [%d] for clients reached "), KMaxEndpointsPerClient);
+		SetBlockResult(EFail);
+		return KErrArgument;
+		}
+
+	// search for the endpoints that match the settings user has given.
+	for (TInt i = 0; i < iCaps().iTotalEndpoints; ++i)
+		{
+		const TUsbcEndpointCaps* caps = &iEndpointData[i].iCaps;
+		const TInt maximumPacketSize = caps->MaxPacketSize();
+
+		// Check if endpoint in question matches with parameters we want to use for configuring an endpoint
+		if ( (caps->iTypesAndDir & (aEndpointType | aEndpointDirection)) == (aEndpointType | aEndpointDirection) )
+			{
+			INFO_PRINTF3(_L("Configuring %s endpoint with direction %s"),
+				(aEndpointType == KUsbEpTypeControl) ? _S("Control") :
+				((aEndpointType == KUsbEpTypeIsochronous) ? _S("Isochronous") :
+				((aEndpointType == KUsbEpTypeBulk) ? _S("Bulk") :
+				((aEndpointType == KUsbEpTypeInterrupt) ? _S("Interrupt") :
+				_S("Unknown")))),
+				(aEndpointDirection == KUsbEpDirIn) ? _S("In") :
+				((aEndpointDirection == KUsbEpDirOut) ? _S("Out") :
+				((aEndpointDirection == KUsbEpDirBidirect) ? _S("Bidirectional") :
+				_S("Unknown")))
+				);
+
+			iInterface().iEndpointData[iConfiguredEndpoints].iType = aEndpointType;
+			iInterface().iEndpointData[iConfiguredEndpoints].iDir = aEndpointDirection;
+			iInterface().iEndpointData[iConfiguredEndpoints].iSize = maximumPacketSize;
+			iTxMaxPacketSize = maximumPacketSize;
+
+			iConfiguredEndpoints++;
+
+			break;
+			}
+		}
+
+	INFO_PRINTF1(_L("*END*CT_RDevUsbcClientData::SetEndpoint"));
+	return KErrNone;
+	}
+
+
+
+/**
+ * Sets interface with endpoints configured with CT_RDevUsbcClientData::SetEndpoint
+ * Note that endpoints must be set before calling this method
+ * 
+ * @param aBandwithwidthBufferingMask TInt contains IN and OUT bandwidth buffering masks combined 
+ *									 using binary OR operation
+ *			NOTE: IT IS TEST CASE SCRIPTERS RESPONSIBILITY TO CHECK VALID (or invalid for negative cases) MASKS
+ */
+void CT_RDevUsbcClientData::DoCmdSetInterface(const TTEFSectionName& aSection)
+	{
+	INFO_PRINTF1(_L("*START*CT_RDevUsbcClientData::DoCmdSetInterface"));
+	TInt bandwidthBufferingMask;
+	TBool dataOk = ETrue;
+	if(!GetIntFromConfig(aSection, KBufferingMask, bandwidthBufferingMask))
+		{
+		ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KBufferingMask);
+		SetBlockResult(EFail);
+		dataOk = EFalse;
+		}
+	if(dataOk)
+		{
+		INFO_PRINTF2(_L("bandwidthBufferingMask %d"), bandwidthBufferingMask);
+		INFO_PRINTF2(_L("Configuring the interface settings with %d endpoints"), iConfiguredEndpoints);
+
+		if( iConfiguredEndpoints == 0 )
+			{
+			ERR_PRINTF1(_L("No endpoints have been set! Set endpoints before configuring interface"));
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			HBufC16* allocatedName = 0;
+			TRAPD(error, allocatedName = interfaceName().AllocL());
+		    if (error != KErrNone)
+		        {
+		        ERR_PRINTF2(_L("AllocL failed [%d]"), error);
+		        SetBlockResult(EFail);
+		        }
+		    else
+		    	{
+		    	iInterface().iString = allocatedName;
+				iInterface().iTotalEndpointsUsed = iConfiguredEndpoints;
+				iInterface().iClass.iClassNum = 0xff;
+				iInterface().iClass.iSubClassNum = 0xff;
+				iInterface().iClass.iProtocolNum = 0xff;
+				INFO_PRINTF2(_L("Using bandwidth buffering mask 0x%08x"), bandwidthBufferingMask);
+
+				error = iChannel->SetInterface(0, iInterface, bandwidthBufferingMask);
+
+				delete allocatedName;
+				allocatedName = NULL;
+				
+				if (error != KErrNone)
+					{
+					ERR_PRINTF2(_L("Failed to set the interface [%d]"), error);
+					SetError(error);
+					}
+				INFO_PRINTF2(_L("SetInterface returns [%d]"), error);
+		    	}			
+			}	    
+		}
+	INFO_PRINTF1(_L("*END*CT_RDevUsbcClientData::DoCmdSetInterface"));
+	}
+
+
+
+
+/**
+ * Tell test class to stop waiting 
+ * @param result from callback
+ */
+void CT_RDevUsbcClientData::Signal(TInt aResult)
+	{
+	INFO_PRINTF2(_L("Signal %d"),aResult);
+	}
+
+
+/**
+ * Destroyer
+ */
+
+void  CT_RDevUsbcClientData::DoCmdDestructor()
+	{
+	INFO_PRINTF1(_L("*START*CT_RDevUsbcClientData::DoCmdDestructor"));
+	DestroyData();
+	INFO_PRINTF1(_L("*END*CT_RDevUsbcClientData::DoCmdDestructor"));
+	}
+
+void CT_RDevUsbcClientData::DestroyData()
+	{
+	if(iChannel)
+		{
+		iChannel->Close();
+		delete iChannel;
+		iChannel = NULL;
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/src/T_RHandleBaseData.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,129 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_RHandleBaseData.h"
+
+/*@{*/
+_LIT(KCmdClose,								"Close");
+_LIT(KCmdFullName,							"FullName");
+_LIT(KCmdName,								"Name");
+
+_LIT(KFldExpected,							"expected");
+_LIT(KFldNameParameter,						"nameParameter");
+
+_LIT(KLogErrorExpectedValue,				"Expected Value does not match actual");
+/*@}*/
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_RHandleBaseData::CT_RHandleBaseData()
+:	CDataWrapperBase()
+	{
+	}
+
+CT_RHandleBaseData::~CT_RHandleBaseData()
+/**
+ * Public destructor
+ */
+	{
+	}
+
+TBool CT_RHandleBaseData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+	{
+	TBool	ret=ETrue;
+
+	if ( aCommand==KCmdClose )
+		{
+		DoCmdClose();
+		}
+	else if ( aCommand==KCmdFullName )
+		{
+		DoCmdFullName(aSection);
+		}
+	else if ( aCommand==KCmdName )
+		{
+		DoCmdName(aSection);
+		}
+	else
+		{
+		ret=CDataWrapperBase::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+
+	return ret;
+	}
+
+void CT_RHandleBaseData::DoCmdClose()
+	{
+	GetHandleBase()->Close();
+	}
+
+void CT_RHandleBaseData::DoCmdFullName(const TDesC& aSection)
+	{
+	TFullName	actual;
+
+	TBool	nameParameter=ETrue;
+	GetBoolFromConfig(aSection, KFldNameParameter(), nameParameter);
+
+	if ( nameParameter )
+		{
+		GetHandleBase()->FullName(actual);
+		}
+	else
+		{
+		actual=GetHandleBase()->FullName();
+		}
+	INFO_PRINTF2(_L("FullName: (%S)" ), &actual);
+
+	TPtrC	expected;
+	if ( GetStringFromConfig(aSection, KFldExpected, expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+void CT_RHandleBaseData::DoCmdName(const TDesC& aSection)
+	{
+	TName	actual=GetHandleBase()->Name();
+	INFO_PRINTF2(_L("Name: (%S)" ), &actual);
+
+	TPtrC	expected;
+	if ( GetStringFromConfig(aSection, KFldExpected, expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/src/T_RSessionBaseData.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,89 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_RSessionBaseData.h"
+
+/*@{*/
+_LIT(KCmdShareAuto,							"ShareAuto");
+_LIT(KCmdShareProtected,					"ShareProtected");
+
+_LIT(KLogError,								"Error=%d");
+/*@}*/
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_RSessionBaseData::CT_RSessionBaseData()
+:	CT_RHandleBaseData()
+	{
+	}
+
+CT_RSessionBaseData::~CT_RSessionBaseData()
+/**
+ * Public destructor
+ */
+	{
+	}
+
+TBool CT_RSessionBaseData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+	{
+	TBool	ret=ETrue;
+	TInt	err=KErrNone;
+
+	if ( aCommand==KCmdShareAuto )
+		{
+		err=DoCmdShareAuto();
+		}
+	else if ( aCommand==KCmdShareProtected )
+		{
+		err=DoCmdShareProtected();
+		}
+	else
+		{
+		ret=CT_RHandleBaseData::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(KLogError, err);
+		SetError(err);
+		}
+
+	return ret;
+	}
+
+TInt CT_RSessionBaseData::DoCmdShareAuto()
+	{
+	return GetSessionBase()->ShareAuto();
+	}
+
+TInt CT_RSessionBaseData::DoCmdShareProtected()
+	{
+	return GetSessionBase()->ShareProtected();
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/src/T_TCommCapsV01Data.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,465 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_TCommCapsV01Data.h"
+
+/*@{*/
+_LIT(KStrNull,								" ");
+
+_LIT(KCmdConstructor,						"new");
+_LIT(KCmdDestructor,						"~");
+_LIT(KCmdiDataBits,							"iDataBits");
+_LIT(KCmdiFifo,								"iFifo");
+_LIT(KCmdiHandshake,						"iHandshake");
+_LIT(KCmdiParity,							"iParity");
+_LIT(KCmdiRate,								"iRate");
+_LIT(KCmdiSIR,								"iSIR");
+_LIT(KCmdiSignals,							"iSignals");
+_LIT(KCmdiStopBits,							"iStopBits");
+
+_LIT(KFldExpected,							"expected");
+
+_LIT(KLogError,								"Error=%d");
+/*@}*/
+
+_LIT(KStrKCapsData5,						"KCapsData5");
+_LIT(KStrKCapsData6,						"KCapsData6");
+_LIT(KStrKCapsData7,						"KCapsData7");
+_LIT(KStrKCapsData8,						"KCapsData8");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommCapsV01Data::iEnumTableDataBits[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrKCapsData5,							KCapsData5,
+	KStrKCapsData6,							KCapsData6,
+	KStrKCapsData7,							KCapsData7,
+	KStrKCapsData8,							KCapsData8,
+	KStrNull,								-1
+	};
+
+_LIT(KStrKCapsHasFifo,						"KCapsHasFifo");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommCapsV01Data::iEnumTableFifo[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrKCapsHasFifo,						KCapsHasFifo,
+	KStrNull,								-1
+	};
+
+_LIT(KStrKCapsObeyXoffSupported,			"KCapsObeyXoffSupported");
+_LIT(KStrKCapsSendXoffSupported,			"KCapsSendXoffSupported");
+_LIT(KStrKCapsObeyCTSSupported,				"KCapsObeyCTSSupported");
+_LIT(KStrKCapsFailCTSSupported,				"KCapsFailCTSSupported");
+_LIT(KStrKCapsObeyDSRSupported,				"KCapsObeyDSRSupported");
+_LIT(KStrKCapsFailDSRSupported,				"KCapsFailDSRSupported");
+_LIT(KStrKCapsObeyDCDSupported,				"KCapsObeyDCDSupported");
+_LIT(KStrKCapsFailDCDSupported,				"KCapsFailDCDSupported");
+_LIT(KStrKCapsFreeRTSSupported,				"KCapsFreeRTSSupported");
+_LIT(KStrKCapsFreeDTRSupported,				"KCapsFreeDTRSupported");
+_LIT(KStrKCapsObeyDTRSupported,				"KCapsObeyDTRSupported");
+_LIT(KStrKCapsObeyRTSSupported,				"KCapsObeyRTSSupported");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommCapsV01Data::iEnumTableHandshake[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrKCapsObeyXoffSupported,				KCapsObeyXoffSupported,
+	KStrKCapsSendXoffSupported,				KCapsSendXoffSupported,
+	KStrKCapsObeyCTSSupported,				KCapsObeyCTSSupported,
+	KStrKCapsFailCTSSupported,				KCapsFailCTSSupported,
+	KStrKCapsObeyDSRSupported,				KCapsObeyDSRSupported,
+	KStrKCapsFailDSRSupported,				KCapsFailDSRSupported,
+	KStrKCapsObeyDCDSupported,				KCapsObeyDCDSupported,
+	KStrKCapsFailDCDSupported,				KCapsFailDCDSupported,
+	KStrKCapsFreeRTSSupported,				KCapsFreeRTSSupported,
+	KStrKCapsFreeDTRSupported,				KCapsFreeDTRSupported,
+	KStrKCapsObeyDTRSupported,				KCapsObeyDTRSupported,
+	KStrKCapsObeyRTSSupported,				KCapsObeyRTSSupported,
+	KStrNull,								-1
+	};
+
+_LIT(KStrKCapsParityNone,					"KCapsParityNone");
+_LIT(KStrKCapsParityEven,					"KCapsParityEven");
+_LIT(KStrKCapsParityOdd,					"KCapsParityOdd");
+_LIT(KStrKCapsParityMark,					"KCapsParityMark");
+_LIT(KStrKCapsParitySpace,					"KCapsParitySpace");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommCapsV01Data::iEnumTableParity[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrKCapsParityNone,					KCapsParityNone,
+	KStrKCapsParityEven,					KCapsParityEven,
+	KStrKCapsParityOdd,						KCapsParityOdd,
+	KStrKCapsParityMark,					KCapsParityMark,
+	KStrKCapsParitySpace,					KCapsParitySpace,
+	KStrNull,								-1
+	};
+
+_LIT(KStrKCapsBps50,						"KCapsBps50");
+_LIT(KStrKCapsBps75,						"KCapsBps75");
+_LIT(KStrKCapsBps110,						"KCapsBps110");
+_LIT(KStrKCapsBps134,						"KCapsBps134");
+_LIT(KStrKCapsBps150,						"KCapsBps150");
+_LIT(KStrKCapsBps300,						"KCapsBps300");
+_LIT(KStrKCapsBps600,						"KCapsBps600");
+_LIT(KStrKCapsBps1200,						"KCapsBps1200");
+_LIT(KStrKCapsBps1800,						"KCapsBps1800");
+_LIT(KStrKCapsBps2000,						"KCapsBps2000");
+_LIT(KStrKCapsBps2400,						"KCapsBps2400");
+_LIT(KStrKCapsBps3600,						"KCapsBps3600");
+_LIT(KStrKCapsBps4800,						"KCapsBps4800");
+_LIT(KStrKCapsBps7200,						"KCapsBps7200");
+_LIT(KStrKCapsBps9600,						"KCapsBps9600");
+_LIT(KStrKCapsBps19200,						"KCapsBps19200");
+_LIT(KStrKCapsBps38400,						"KCapsBps38400");
+_LIT(KStrKCapsBps57600,						"KCapsBps57600");
+_LIT(KStrKCapsBps115200,					"KCapsBps115200");
+_LIT(KStrKCapsBps230400,					"KCapsBps230400");
+_LIT(KStrKCapsBps460800,					"KCapsBps460800");
+_LIT(KStrKCapsBps576000,					"KCapsBps576000");
+_LIT(KStrKCapsBps1152000,					"KCapsBps1152000");
+_LIT(KStrKCapsBps4000000,					"KCapsBps4000000");
+_LIT(KStrKCapsBps921600,					"KCapsBps921600");
+_LIT(KStrKCapsBpsAutobaud,					"KCapsBpsAutobaud");
+_LIT(KStrKCapsBpsSpecial,					"KCapsBpsSpecial");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommCapsV01Data::iEnumTableRate[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrKCapsBps50,							KCapsBps50,
+	KStrKCapsBps75,							KCapsBps75,
+	KStrKCapsBps110,						KCapsBps110,
+	KStrKCapsBps134,						KCapsBps134,
+	KStrKCapsBps150,						KCapsBps150,
+	KStrKCapsBps300,						KCapsBps300,
+	KStrKCapsBps600,						KCapsBps600,
+	KStrKCapsBps1200,						KCapsBps1200,
+	KStrKCapsBps1800,						KCapsBps1800,
+	KStrKCapsBps2000,						KCapsBps2000,
+	KStrKCapsBps2400,						KCapsBps2400,
+	KStrKCapsBps3600,						KCapsBps3600,
+	KStrKCapsBps4800,						KCapsBps4800,
+	KStrKCapsBps7200,						KCapsBps7200,
+	KStrKCapsBps9600,						KCapsBps9600,
+	KStrKCapsBps19200,						KCapsBps19200,
+	KStrKCapsBps38400,						KCapsBps38400,
+	KStrKCapsBps57600,						KCapsBps57600,
+	KStrKCapsBps115200,						KCapsBps115200,
+	KStrKCapsBps230400,						KCapsBps230400,
+	KStrKCapsBps460800,						KCapsBps460800,
+	KStrKCapsBps576000,						KCapsBps576000,
+	KStrKCapsBps1152000,					KCapsBps1152000,
+	KStrKCapsBps4000000,					KCapsBps4000000,
+	KStrKCapsBps921600,						KCapsBps921600,
+	KStrKCapsBpsAutobaud,					KCapsBpsAutobaud,
+	KStrKCapsBpsSpecial,					KCapsBpsSpecial,
+	KStrNull,								-1
+	};
+
+_LIT(KStrKCapsSIR115kbps,					"KCapsSIR115kbps");
+_LIT(KStrKCapsSIR2400bpsOnly,				"KCapsSIR2400bpsOnly");
+_LIT(KStrKCapsSIR4Mbs,						"KCapsSIR4Mbs");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommCapsV01Data::iEnumTableSir[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrKCapsSIR115kbps,					KCapsSIR115kbps,
+	KStrKCapsSIR2400bpsOnly,				KCapsSIR2400bpsOnly,
+	KStrKCapsSIR4Mbs,						KCapsSIR4Mbs,
+	KStrNull,								-1
+	};
+
+_LIT(KStrKCapsSignalCTSSupported,			"KCapsSignalCTSSupported");
+_LIT(KStrKCapsSignalDSRSupported,			"KCapsSignalDSRSupported");
+_LIT(KStrKCapsSignalDCDSupported,			"KCapsSignalDCDSupported");
+_LIT(KStrKCapsSignalRNGSupported,			"KCapsSignalRNGSupported");
+_LIT(KStrKCapsSignalRTSSupported,			"KCapsSignalRTSSupported");
+_LIT(KStrKCapsSignalDTRSupported,			"KCapsSignalDTRSupported");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommCapsV01Data::iEnumTableSignals[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrKCapsSignalCTSSupported,			KCapsSignalCTSSupported,
+	KStrKCapsSignalDSRSupported,			KCapsSignalDSRSupported,
+	KStrKCapsSignalDCDSupported,			KCapsSignalDCDSupported,
+	KStrKCapsSignalRNGSupported,			KCapsSignalRNGSupported,
+	KStrKCapsSignalRTSSupported,			KCapsSignalRTSSupported,
+	KStrKCapsSignalDTRSupported,			KCapsSignalDTRSupported,
+	KStrNull,								-1
+	};
+
+_LIT(KStrKCapsStop1,						"KCapsStop1");
+_LIT(KStrKCapsStop2,						"KCapsStop2");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommCapsV01Data::iEnumTableStopBits[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrKCapsStop1,							KCapsStop1,
+	KStrKCapsStop2,							KCapsStop2,
+	KStrNull,								-1
+	};
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_TCommCapsV01Data::CT_TCommCapsV01Data()
+:	CDataWrapperBase()
+,	iCommCaps(NULL)
+	{
+	}
+
+CT_TCommCapsV01Data::~CT_TCommCapsV01Data()
+/**
+ * Public destructor
+ */
+	{
+	DestroyData();
+	}
+
+void CT_TCommCapsV01Data::DestroyData()
+	{
+	delete iCommCaps;
+	iCommCaps=NULL;
+	}
+
+TDes8* CT_TCommCapsV01Data::Descriptor()
+/**
+ * Return a pointer to the buffer
+ *
+ * @return	pointer to the buffer
+ */
+	{
+	return iCommCaps;
+	}
+
+TAny* CT_TCommCapsV01Data::GetObject()
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return	pointer to the object that the data wraps
+ */
+	{
+	return iCommCaps;
+	}
+
+TBool CT_TCommCapsV01Data::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+	{
+	TBool	ret=ETrue;
+	TInt	err=KErrNone;
+
+	if ( aCommand==KCmdConstructor )
+		{
+		err=DoCmdConstructor();
+		}
+	else if ( aCommand==KCmdDestructor )
+		{
+		DoCmdDestructor();
+		}
+	else if ( aCommand==KCmdiDataBits )
+		{
+		DoCmdiDataBits(aSection);
+		}
+	else if ( aCommand==KCmdiFifo )
+		{
+		DoCmdiFifo(aSection);
+		}
+	else if ( aCommand==KCmdiHandshake )
+		{
+		DoCmdiHandshake(aSection);
+		}
+	else if ( aCommand==KCmdiParity )
+		{
+		DoCmdiParity(aSection);
+		}
+	else if ( aCommand==KCmdiRate )
+		{
+		DoCmdiRate(aSection);
+		}
+	else if ( aCommand==KCmdiSIR )
+		{
+		DoCmdiSIR(aSection);
+		}
+	else if ( aCommand==KCmdiSignals )
+		{
+		DoCmdiSignals(aSection);
+		}
+	else if ( aCommand==KCmdiStopBits )
+		{
+		DoCmdiStopBits(aSection);
+		}
+	else
+		{
+		ret=CDataWrapperBase::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(KLogError, err);
+		SetError(err);
+		}
+
+	return ret;
+	}
+
+TCommCapsV01& CT_TCommCapsV01Data::GetCommCapsV01()
+	{
+	return (*iCommCaps)();
+	}
+
+TInt CT_TCommCapsV01Data::DoCmdConstructor()
+	{
+	DestroyData();
+	TRAPD(err, iCommCaps=new (ELeave) TCommCaps());
+	iCommCaps->FillZ();
+	return err;
+	}
+
+void CT_TCommCapsV01Data::DoCmdDestructor()
+	{
+	DestroyData();
+	}
+
+void CT_TCommCapsV01Data::DoCmdiDataBits(const TDesC& aSection)
+	{
+	TUint	actual=GetCommCapsV01().iDataBits;
+	INFO_PRINTF2(_L("iDataBits : 0x%X"), actual);
+
+	TUint	expected;
+	if ( GetOrFromConfig(aSection, KFldExpected(), iEnumTableDataBits, expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(_L("Expected Value does not match actual"));
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+void CT_TCommCapsV01Data::DoCmdiFifo(const TDesC& aSection)
+	{
+	TUint	actual=GetCommCapsV01().iFifo;
+	INFO_PRINTF2(_L("iFifo : 0x%X"), actual);
+
+	TUint	expected;
+	if ( GetOrFromConfig(aSection, KFldExpected(), iEnumTableFifo, expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(_L("Expected Value does not match actual"));
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+void CT_TCommCapsV01Data::DoCmdiHandshake(const TDesC& aSection)
+	{
+	TUint	actual=GetCommCapsV01().iHandshake;
+	INFO_PRINTF2(_L("iHandshake : 0x%X"), actual);
+
+	TUint	expected;
+	if ( GetOrFromConfig(aSection, KFldExpected(), iEnumTableHandshake, expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(_L("Expected Value does not match actual"));
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+void CT_TCommCapsV01Data::DoCmdiParity(const TDesC& aSection)
+	{
+	TUint	actual=GetCommCapsV01().iParity;
+	INFO_PRINTF2(_L("iParity : 0x%X"), actual);
+
+	TUint	expected;
+	if ( GetOrFromConfig(aSection, KFldExpected(), iEnumTableParity, expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(_L("Expected Value does not match actual"));
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+void CT_TCommCapsV01Data::DoCmdiRate(const TDesC& aSection)
+	{
+	TUint	actual=GetCommCapsV01().iRate;
+	INFO_PRINTF2(_L("iRate : 0x%X"), actual);
+
+	TUint	expected;
+	if ( GetOrFromConfig(aSection, KFldExpected(), iEnumTableRate, expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(_L("Expected Value does not match actual"));
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+void CT_TCommCapsV01Data::DoCmdiSIR(const TDesC& aSection)
+	{
+	TUint	actual=GetCommCapsV01().iSIR;
+	INFO_PRINTF2(_L("iSIR : 0x%X"), actual);
+
+	TUint	expected;
+	if ( GetOrFromConfig(aSection, KFldExpected(), iEnumTableSir, expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(_L("Expected Value does not match actual"));
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+void CT_TCommCapsV01Data::DoCmdiSignals(const TDesC& aSection)
+	{
+	TUint	actual=GetCommCapsV01().iSignals;
+	INFO_PRINTF2(_L("iSignals : 0x%X"), actual);
+
+	TUint	expected;
+	if ( GetOrFromConfig(aSection, KFldExpected(), iEnumTableSignals, expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(_L("Expected Value does not match actual"));
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+void CT_TCommCapsV01Data::DoCmdiStopBits(const TDesC& aSection)
+	{
+	TUint	actual=GetCommCapsV01().iStopBits;
+	INFO_PRINTF2(_L("iStopBits : 0x%X"), actual);
+
+	TUint	expected;
+	if ( GetOrFromConfig(aSection, KFldExpected(), iEnumTableStopBits, expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(_L("Expected Value does not match actual"));
+			SetBlockResult(EFail);
+			}
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/src/T_TCommCapsV02Data.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,250 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_TCommCapsV02Data.h"
+
+/*@{*/
+_LIT(KStrNull,								" ");
+
+_LIT(KStrKCapsFlowControlStatusSupported,	"KCapsFlowControlStatusSupported");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommCapsV02Data::iEnumTableFlowControlCaps[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrKCapsFlowControlStatusSupported,	KCapsFlowControlStatusSupported,
+	KStrNull,								-1
+	};
+
+_LIT(KStrKNotifySignalsChangeSupported,		"KNotifySignalsChangeSupported");
+_LIT(KStrKNotifyRateChangeSupported,		"KNotifyRateChangeSupported");
+_LIT(KStrKNotifyDataFormatChangeSupported,	"KNotifyDataFormatChangeSupported");
+_LIT(KStrKNotifyHandshakeChangeSupported,	"KNotifyHandshakeChangeSupported");
+_LIT(KStrKNotifyBreakSupported,				"KNotifyBreakSupported");
+_LIT(KStrKNotifyFlowControlChangeSupported,	"KNotifyFlowControlChangeSupported");
+_LIT(KStrKNotifyDataAvailableSupported,		"KNotifyDataAvailableSupported");
+_LIT(KStrKNotifyOutputEmptySupported,		"KNotifyOutputEmptySupported");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommCapsV02Data::iEnumTableNotificationCaps[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrKNotifySignalsChangeSupported,		KNotifySignalsChangeSupported,
+	KStrKNotifyRateChangeSupported,			KNotifyRateChangeSupported,
+	KStrKNotifyDataFormatChangeSupported,	KNotifyDataFormatChangeSupported,
+	KStrKNotifyHandshakeChangeSupported,	KNotifyHandshakeChangeSupported,
+	KStrKNotifyBreakSupported,				KNotifyBreakSupported,
+	KStrKNotifyFlowControlChangeSupported,	KNotifyFlowControlChangeSupported,
+	KStrKNotifyDataAvailableSupported,		KNotifyDataAvailableSupported,
+	KStrKNotifyOutputEmptySupported,		KNotifyOutputEmptySupported,
+	KStrNull,								-1
+	};
+
+_LIT(KStrKCapsRoleSwitchSupported,			"KCapsRoleSwitchSupported");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommCapsV02Data::iEnumTableRoleCaps[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrKCapsRoleSwitchSupported,			KCapsRoleSwitchSupported,
+	KStrNull,								-1
+	};
+
+_LIT(KCmdConstructor,						"new");
+_LIT(KCmdDestructor,						"~");
+_LIT(KCmdiFlowControlCaps,					"iFlowControlCaps");
+_LIT(KCmdiNotificationCaps,					"iNotificationCaps");
+_LIT(KCmdiRoleCaps,							"iRoleCaps");
+
+_LIT(KFldExpected,							"expected");
+
+_LIT(KLogError,								"Error=%d");
+/*@}*/
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_TCommCapsV02Data::CT_TCommCapsV02Data()
+:	CT_TCommCapsV01Data()
+,	iCommCaps2(NULL)
+	{
+	}
+
+CT_TCommCapsV02Data::~CT_TCommCapsV02Data()
+/**
+ * Public destructor
+ */
+	{
+	DestroyData();
+	}
+
+void CT_TCommCapsV02Data::DestroyData()
+	{
+	delete iCommCaps2;
+	iCommCaps2=NULL;
+	}
+
+TDes8* CT_TCommCapsV02Data::Descriptor()
+/**
+ * Return a pointer to the buffer
+ *
+ * @return	pointer to the buffer
+ */
+	{
+	return iCommCaps2;
+	}
+
+TAny* CT_TCommCapsV02Data::GetObject()
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return	pointer to the object that the data wraps
+ */
+	{
+	return iCommCaps2;
+	}
+
+TBool CT_TCommCapsV02Data::ReadFlowControlCaps(const TDesC& aSection, const TDesC& aKeyName, TUint& aFlowControlCaps)
+	{
+	return GetOrFromConfig(aSection, aKeyName, iEnumTableFlowControlCaps, aFlowControlCaps);
+	}
+
+TBool CT_TCommCapsV02Data::ReadNotificationCaps(const TDesC& aSection, const TDesC& aKeyName, TUint& aNotificationCaps)
+	{
+	return GetOrFromConfig(aSection, aKeyName, iEnumTableNotificationCaps, aNotificationCaps);
+	}
+
+TBool CT_TCommCapsV02Data::ReadRoleCaps(const TDesC& aSection, const TDesC& aKeyName, TUint& aRoleCaps)
+	{
+	return GetOrFromConfig(aSection, aKeyName, iEnumTableRoleCaps, aRoleCaps);
+	}
+
+TBool CT_TCommCapsV02Data::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+	{
+	TBool	ret=ETrue;
+	TInt	err=KErrNone;
+
+	if ( aCommand==KCmdConstructor )
+		{
+		err=DoCmdConstructor();
+		}
+	else if ( aCommand==KCmdDestructor )
+		{
+		DoCmdDestructor();
+		}
+	else if ( aCommand==KCmdiFlowControlCaps )
+		{
+		DoCmdiFlowControlCaps(aSection);
+		}
+	else if ( aCommand==KCmdiNotificationCaps )
+		{
+		DoCmdiNotificationCaps(aSection);
+		}
+	else if ( aCommand==KCmdiRoleCaps )
+		{
+		DoCmdiRoleCaps(aSection);
+		}
+	else
+		{
+		ret=CT_TCommCapsV01Data::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(KLogError, err);
+		SetError(err);
+		}
+
+	return ret;
+	}
+
+TCommCapsV01& CT_TCommCapsV02Data::GetCommCapsV01()
+	{
+	return (*iCommCaps2)();
+	}
+
+TCommCapsV02& CT_TCommCapsV02Data::GetCommCapsV02()
+	{
+	return (*iCommCaps2)();
+	}
+
+TInt CT_TCommCapsV02Data::DoCmdConstructor()
+	{
+	DestroyData();
+	TRAPD(err, iCommCaps2=new (ELeave) TCommCaps2());
+	iCommCaps2->FillZ();
+	return err;
+	}
+
+void CT_TCommCapsV02Data::DoCmdDestructor()
+	{
+	DestroyData();
+	}
+
+void CT_TCommCapsV02Data::DoCmdiFlowControlCaps(const TDesC& aSection)
+	{
+	TUint	actual=GetCommCapsV02().iFlowControlCaps;
+	INFO_PRINTF2(_L("iFlowControlCaps : 0x%x"), actual);
+
+	TUint	expected;
+	if ( ReadFlowControlCaps(aSection, KFldExpected(), expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(_L("Expected Value does not match actual"));
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+void CT_TCommCapsV02Data::DoCmdiNotificationCaps(const TDesC& aSection)
+	{
+	TUint	actual=GetCommCapsV02().iNotificationCaps;
+	INFO_PRINTF2(_L("iNotificationCaps : 0x%x"), actual);
+
+	TUint	expected;
+	if ( ReadNotificationCaps(aSection, KFldExpected(), expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(_L("Expected Value does not match actual"));
+			SetBlockResult(EFail);
+			}
+		}
+	}
+
+void CT_TCommCapsV02Data::DoCmdiRoleCaps(const TDesC& aSection)
+	{
+	TUint	actual=GetCommCapsV02().iRoleCaps;
+	INFO_PRINTF2(_L("iRoleCaps : 0x%x"), actual);
+
+	TUint	expected;
+	if ( ReadRoleCaps(aSection, KFldExpected(), expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(_L("Expected Value does not match actual"));
+			SetBlockResult(EFail);
+			}
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/src/T_TCommCapsV03Data.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,158 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_TCommCapsV03Data.h"
+
+/*@{*/
+_LIT(KCmdConstructor,						"new");
+_LIT(KCmdDestructor,						"~");
+_LIT(KCmdiBreakSupported,					"iBreakSupported");
+
+_LIT(KFldExpected,							"expected");
+
+_LIT(KLogError,								"Error=%d");
+/*@}*/
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_TCommCapsV03Data::CT_TCommCapsV03Data()
+:	CT_TCommCapsV02Data()
+,	iCommCaps3(NULL)
+	{
+	}
+
+CT_TCommCapsV03Data::~CT_TCommCapsV03Data()
+/**
+ * Public destructor
+ */
+	{
+	DestroyData();
+	}
+
+void CT_TCommCapsV03Data::DestroyData()
+	{
+	delete iCommCaps3;
+	iCommCaps3=NULL;
+	}
+
+TDes8* CT_TCommCapsV03Data::Descriptor()
+/**
+ * Return a pointer to the buffer
+ *
+ * @return	pointer to the buffer
+ */
+	{
+	return iCommCaps3;
+	}
+
+TAny* CT_TCommCapsV03Data::GetObject()
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return	pointer to the object that the data wraps
+ */
+	{
+	return iCommCaps3;
+	}
+
+TBool CT_TCommCapsV03Data::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+	{
+	TBool	ret=ETrue;
+	TInt	err=KErrNone;
+
+	if ( aCommand==KCmdConstructor )
+		{
+		err=DoCmdConstructor();
+		}
+	else if ( aCommand==KCmdDestructor )
+		{
+		DoCmdDestructor();
+		}
+	else if ( aCommand==KCmdiBreakSupported )
+		{
+		DoCmdiBreakSupported(aSection);
+		}
+	else
+		{
+		ret=CT_TCommCapsV02Data::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(KLogError, err);
+		SetError(err);
+		}
+
+	return ret;
+	}
+
+TCommCapsV01& CT_TCommCapsV03Data::GetCommCapsV01()
+	{
+	return (*iCommCaps3)();
+	}
+
+TCommCapsV02& CT_TCommCapsV03Data::GetCommCapsV02()
+	{
+	return (*iCommCaps3)();
+	}
+
+TCommCapsV03& CT_TCommCapsV03Data::GetCommCapsV03()
+	{
+	return (*iCommCaps3)();
+	}
+
+TInt CT_TCommCapsV03Data::DoCmdConstructor()
+	{
+	DestroyData();
+	TRAPD(err, iCommCaps3=new (ELeave) TCommCaps3());
+	iCommCaps3->FillZ();
+	return err;
+	}
+
+void CT_TCommCapsV03Data::DoCmdDestructor()
+	{
+	DestroyData();
+	}
+
+void CT_TCommCapsV03Data::DoCmdiBreakSupported(const TDesC& aSection)
+	{
+	TBool	actual=GetCommCapsV03().iBreakSupported;
+	INFO_PRINTF2(_L("iBreakSupported : 0x%X"), actual);
+
+	TBool	expected;
+	if ( GetBoolFromConfig(aSection, KFldExpected(), expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(_L("Expected Value does not match actual"));
+			SetBlockResult(EFail);
+			}
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/src/T_TCommConfigV01Data.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,737 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_TCommConfigV01Data.h"
+
+/*@{*/
+_LIT(KStrNull,								" ");
+
+_LIT(KCmdConstructor,						"new");
+_LIT(KCmdDestructor,						"~");
+_LIT(KCmdiDataBits,							"iDataBits");
+_LIT(KCmdiFifo,								"iFifo");
+_LIT(KCmdiHandshake,						"iHandshake");
+_LIT(KCmdiParity,							"iParity");
+_LIT(KCmdiParityError,						"iParityError");
+_LIT(KCmdiParityErrorChar,					"iParityErrorChar");
+_LIT(KCmdiRate,								"iRate");
+_LIT(KCmdiSIREnable,						"iSIREnable");
+_LIT(KCmdiSIRSettings,						"iSIRSettings");
+_LIT(KCmdiSpecialRate,						"iSpecialRate");
+_LIT(KCmdiStopBits,							"iStopBits");
+_LIT(KCmdiTerminator,						"iTerminator");
+_LIT(KCmdiTerminatorCount,					"iTerminatorCount");
+_LIT(KCmdiXoffChar,							"iXoffChar");
+_LIT(KCmdiXonChar,							"iXonChar");
+
+_LIT(KFldExpected,							"expected");
+_LIT(KFldExpectedIndex,						"expected%d");
+_LIT(KFldValue,								"value");
+_LIT(KFldValueIndex,						"value%d");
+
+_LIT(KLogError,								"Error=%d");
+_LIT(KLogErrorExpectedValue,				"Expected Value does not match actual");
+/*@}*/
+
+_LIT(KStrEData5,							"EData5");
+_LIT(KStrEData6,							"EData6");
+_LIT(KStrEData7,							"EData7");
+_LIT(KStrEData8,							"EData8");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableDataBits[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrEData5,								EData5,
+	KStrEData6,								EData6,
+	KStrEData7,								EData7,
+	KStrEData8,								EData8,
+	KStrNull,								-1
+	};
+
+_LIT(KStrEFifoEnable,						"EFifoEnable");
+_LIT(KStrEFifoDisable,						"KStrEFifoDisable");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableFifo[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrEFifoEnable,						EFifoEnable,
+	KStrEFifoDisable,						EFifoDisable,
+	KStrNull,								-1
+	};
+
+_LIT(KStrKConfigObeyXoff,					"KConfigObeyXoff");
+_LIT(KStrKConfigSendXoff,					"KConfigSendXoff");
+_LIT(KStrKConfigObeyCTS,					"KConfigObeyCTS");
+_LIT(KStrKConfigFailCTS,					"KConfigFailCTS");
+_LIT(KStrKConfigObeyDSR,					"KConfigObeyDSR");
+_LIT(KStrKConfigFailDSR,					"KConfigFailDSR");
+_LIT(KStrKConfigObeyDCD,					"KConfigObeyDCD");
+_LIT(KStrKConfigFailDCD,					"KConfigFailDCD");
+_LIT(KStrKConfigFreeRTS,					"KConfigFreeRTS");
+_LIT(KStrKConfigFreeDTR,					"KConfigFreeDTR");
+_LIT(KStrKConfigObeyDTR,					"KConfigObeyDTR");
+_LIT(KStrKConfigFailDTR,					"KConfigFailDTR");
+_LIT(KStrKConfigObeyRTS,					"KConfigObeyRTS");
+_LIT(KStrKConfigFailRTS,					"KConfigFailRTS");
+_LIT(KStrKConfigFreeDSR,					"KConfigFreeDSR");
+_LIT(KStrKConfigFreeCTS,					"KConfigFreeCTS");
+_LIT(KStrKConfigFreeDCD,					"KConfigFreeDCD");
+_LIT(KStrKConfigFreeRI,						"KConfigFreeRI");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableHandshake[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrKConfigObeyXoff,					KConfigObeyXoff,
+	KStrKConfigSendXoff,					KConfigSendXoff,
+	KStrKConfigObeyCTS,						KConfigObeyCTS,
+	KStrKConfigFailCTS,						KConfigFailCTS,
+	KStrKConfigObeyDSR,						KConfigObeyDSR,
+	KStrKConfigFailDSR,						KConfigFailDSR,
+	KStrKConfigObeyDCD,						KConfigObeyDCD,
+	KStrKConfigFailDCD,						KConfigFailDCD,
+	KStrKConfigFreeRTS,						KConfigFreeRTS,
+	KStrKConfigFreeDTR,						KConfigFreeDTR,
+	KStrKConfigObeyDTR,						KConfigObeyDTR,
+	KStrKConfigFailDTR,						KConfigFailDTR,
+	KStrKConfigObeyRTS,						KConfigObeyRTS,
+	KStrKConfigFailRTS,						KConfigFailRTS,
+	KStrKConfigFreeDSR,						KConfigFreeDSR,
+	KStrKConfigFreeCTS,						KConfigFreeCTS,
+	KStrKConfigFreeDCD,						KConfigFreeDCD,
+	KStrKConfigFreeRI,						KConfigFreeRI,
+	KStrNull,								-1
+	};
+
+_LIT(KStrEParityNone,						"EParityNone");
+_LIT(KStrEParityEven,						"EParityEven");
+_LIT(KStrEParityOdd,						"EParityOdd");
+_LIT(KStrEParityMark,						"EParityMark");
+_LIT(KStrEParitySpace,						"EParitySpace");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableParity[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrEParityNone,						EParityNone,
+	KStrEParityEven,						EParityEven,
+	KStrEParityOdd,							EParityOdd,
+	KStrEParityMark,						EParityMark,
+	KStrEParitySpace,						EParitySpace,
+	KStrNull,								-1
+	};
+
+_LIT(KStrKConfigParityErrorFail,			"KConfigParityErrorFail");
+_LIT(KStrKConfigParityErrorIgnore,			"KConfigParityErrorIgnore");
+_LIT(KStrKConfigParityErrorReplaceChar,		"KConfigParityErrorReplaceChar");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableParityError[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrKConfigParityErrorFail,				KConfigParityErrorFail,
+	KStrKConfigParityErrorIgnore,			KConfigParityErrorIgnore,
+	KStrKConfigParityErrorReplaceChar,		KConfigParityErrorReplaceChar,
+	KStrNull,								-1
+	};
+
+_LIT(KStrEBps50,							"EBps50");
+_LIT(KStrEBps75,							"EBps75");
+_LIT(KStrEBps110,							"EBps110");
+_LIT(KStrEBps134,							"EBps134");
+_LIT(KStrEBps150,							"EBps150");
+_LIT(KStrEBps300,							"EBps300");
+_LIT(KStrEBps600,							"EBps600");
+_LIT(KStrEBps1200,							"EBps1200");
+_LIT(KStrEBps1800,							"EBps1800");
+_LIT(KStrEBps2000,							"EBps2000");
+_LIT(KStrEBps2400,							"EBps2400");
+_LIT(KStrEBps3600,							"EBps3600");
+_LIT(KStrEBps4800,							"EBps4800");
+_LIT(KStrEBps7200,							"EBps7200");
+_LIT(KStrEBps9600,							"EBps9600");
+_LIT(KStrEBps19200,							"EBps19200");
+_LIT(KStrEBps38400,							"EBps38400");
+_LIT(KStrEBps57600,							"EBps57600");
+_LIT(KStrEBps115200,						"EBps115200");
+_LIT(KStrEBps230400,						"EBps230400");
+_LIT(KStrEBps460800,						"EBps460800");
+_LIT(KStrEBps576000,						"EBps576000");
+_LIT(KStrEBps1152000,						"EBps1152000");
+_LIT(KStrEBps4000000,						"EBps4000000");
+_LIT(KStrEBps921600,						"EBps921600");
+_LIT(KStrEBpsAutobaud,						"EBpsAutobaud");
+_LIT(KStrEBpsSpecial,						"EBpsSpecial");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableRate[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrEBps50,								EBps50,
+	KStrEBps75,								EBps75,
+	KStrEBps110,							EBps110,
+	KStrEBps134,							EBps134,
+	KStrEBps150,							EBps150,
+	KStrEBps300,							EBps300,
+	KStrEBps600,							EBps600,
+	KStrEBps1200,							EBps1200,
+	KStrEBps1800,							EBps1800,
+	KStrEBps2000,							EBps2000,
+	KStrEBps2400,							EBps2400,
+	KStrEBps3600,							EBps3600,
+	KStrEBps4800,							EBps4800,
+	KStrEBps7200,							EBps7200,
+	KStrEBps9600,							EBps9600,
+	KStrEBps19200,							EBps19200,
+	KStrEBps38400,							EBps38400,
+	KStrEBps57600,							EBps57600,
+	KStrEBps115200,							EBps115200,
+	KStrEBps230400,							EBps230400,
+	KStrEBps460800,							EBps460800,
+	KStrEBps576000,							EBps576000,
+	KStrEBps1152000,						EBps1152000,
+	KStrEBps4000000,						EBps4000000,
+	KStrEBps921600,							EBps921600,
+	KStrEBpsAutobaud,						EBpsAutobaud,
+	KStrEBpsSpecial,						EBpsSpecial,
+	KStrNull,								-1
+	};
+
+_LIT(KStrESIREnable,						"ESIREnable");
+_LIT(KStrESIRDisable,						"ESIRDisable");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableSir[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrESIREnable,							ESIREnable,
+	KStrESIRDisable,						ESIRDisable,
+	KStrNull,								-1
+	};
+
+_LIT(KStrKConfigSIRPulseWidthMaximum,		"KConfigSIRPulseWidthMaximum");
+_LIT(KStrKConfigSIRPulseWidthMinimum,		"KConfigSIRPulseWidthMinimum");
+_LIT(KStrKConfigSIRShutDown,				"KConfigSIRShutDown");
+_LIT(KStrKConfigSIRMinimumRange,			"KConfigSIRMinimumRange");
+_LIT(KStrKConfigSIRMediumRange,				"KConfigSIRMediumRange");
+_LIT(KStrKConfigSIRMaximumRange,			"KConfigSIRMaximumRange");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableSirSetting[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrKConfigSIRPulseWidthMaximum,		KConfigSIRPulseWidthMaximum,
+	KStrKConfigSIRPulseWidthMinimum,		KConfigSIRPulseWidthMinimum,
+	KStrKConfigSIRShutDown,					KConfigSIRShutDown,
+	KStrKConfigSIRMinimumRange,				KConfigSIRMinimumRange,
+	KStrKConfigSIRMediumRange,				KConfigSIRMediumRange,
+	KStrKConfigSIRMaximumRange,				KConfigSIRMaximumRange,
+	KStrNull,								-1
+	};
+
+_LIT(KStrEStop1,							"EStop1");
+_LIT(KStrEStop2,							"EStop2");
+const CDataWrapperBase::TEnumEntryTable	CT_TCommConfigV01Data::iEnumTableStopBits[] =
+	{
+//	Enum as a descriptor					Enum
+	KStrEStop1,								EStop1,
+	KStrEStop2,								EStop2,
+	KStrNull,								-1
+	};
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_TCommConfigV01Data::CT_TCommConfigV01Data()
+:	CDataWrapperBase()
+,	iCommConfig(NULL)
+	{
+	}
+
+CT_TCommConfigV01Data::~CT_TCommConfigV01Data()
+/**
+ * Public destructor
+ */
+	{
+	DestroyData();
+	}
+
+void CT_TCommConfigV01Data::DestroyData()
+	{
+	delete iCommConfig;
+	iCommConfig=NULL;
+	}
+
+TDes8* CT_TCommConfigV01Data::Descriptor()
+/**
+ * Return a pointer to the buffer
+ *
+ * @return	pointer to the buffer
+ */
+	{
+	return iCommConfig;
+	}
+
+TAny* CT_TCommConfigV01Data::GetObject()
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return	pointer to the object that the data wraps
+ */
+	{
+	return iCommConfig;
+	}
+
+TBool CT_TCommConfigV01Data::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+	{
+	TBool	ret=ETrue;
+	TInt	err=KErrNone;
+
+	if ( aCommand==KCmdConstructor )
+		{
+		err=DoCmdConstructor();
+		}
+	else if ( aCommand==KCmdDestructor )
+		{
+		DoCmdDestructor();
+		}
+	else if ( aCommand==KCmdiDataBits )
+		{
+		DoCmdiDataBits(aSection);
+		}
+	else if ( aCommand==KCmdiFifo )
+		{
+		DoCmdiFifo(aSection);
+		}
+	else if ( aCommand==KCmdiHandshake )
+		{
+		DoCmdiHandshake(aSection);
+		}
+	else if ( aCommand==KCmdiParity )
+		{
+		DoCmdiParity(aSection);
+		}
+	else if ( aCommand==KCmdiParityError )
+		{
+		DoCmdiParityError(aSection);
+		}
+	else if ( aCommand==KCmdiParityErrorChar )
+		{
+		DoCmdiParityErrorChar(aSection);
+		}
+	else if ( aCommand==KCmdiRate )
+		{
+		DoCmdiRate(aSection);
+		}
+	else if ( aCommand==KCmdiSIREnable )
+		{
+		DoCmdiSIREnable(aSection);
+		}
+	else if ( aCommand==KCmdiSIRSettings )
+		{
+		DoCmdiSIRSettings(aSection);
+		}
+	else if ( aCommand==KCmdiSpecialRate )
+		{
+		DoCmdiSpecialRate(aSection);
+		}
+	else if ( aCommand==KCmdiStopBits )
+		{
+		DoCmdiStopBits(aSection);
+		}
+	else if ( aCommand==KCmdiTerminator )
+		{
+		DoCmdiTerminator(aSection);
+		}
+	else if ( aCommand==KCmdiTerminatorCount )
+		{
+		DoCmdiTerminatorCount(aSection);
+		}
+	else if ( aCommand==KCmdiXoffChar )
+		{
+		DoCmdiXoffChar(aSection);
+		}
+	else if ( aCommand==KCmdiXonChar )
+		{
+		DoCmdiXonChar(aSection);
+		}
+	else
+		{
+		ret=CDataWrapperBase::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(KLogError, err);
+		SetError(err);
+		}
+
+	return ret;
+	}
+
+TCommConfigV01& CT_TCommConfigV01Data::GetCommConfigV01()
+	{
+	return (*iCommConfig)();
+	}
+
+TInt CT_TCommConfigV01Data::DoCmdConstructor()
+	{
+	DestroyData();
+	TRAPD(err, iCommConfig=new (ELeave) TCommConfig());
+	iCommConfig->FillZ();
+	return err;
+	}
+
+void CT_TCommConfigV01Data::DoCmdDestructor()
+	{
+	DestroyData();
+	}
+
+void CT_TCommConfigV01Data::DoCmdiDataBits(const TDesC& aSection)
+	{
+	TDataBits	actual=GetCommConfigV01().iDataBits;
+	INFO_PRINTF2(_L("iDataBits : %d"), actual);
+
+	TInt	expected;
+	if ( GetEnumFromConfig(aSection, KFldExpected(), iEnumTableDataBits, expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TInt	value;
+	if ( GetEnumFromConfig(aSection, KFldValue(), iEnumTableDataBits, value) )
+		{
+		GetCommConfigV01().iDataBits=(TDataBits)value;
+		}
+	}
+
+void CT_TCommConfigV01Data::DoCmdiFifo(const TDesC& aSection)
+	{
+	TFifo	actual=(TFifo)GetCommConfigV01().iFifo;
+	INFO_PRINTF2(_L("iFifo : %d"), actual);
+
+	TInt	expected;
+	if ( GetEnumFromConfig(aSection, KFldExpected(), iEnumTableFifo, expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TInt	value;
+	if ( GetEnumFromConfig(aSection, KFldValue(), iEnumTableFifo, value) )
+		{
+		GetCommConfigV01().iFifo=(TUint)value;
+		}
+	}
+
+void CT_TCommConfigV01Data::DoCmdiHandshake(const TDesC& aSection)
+	{
+	TUint	actual=GetCommConfigV01().iHandshake;
+	INFO_PRINTF2(_L("iHandshake : %d"), actual);
+
+	TUint	expected;
+	if ( GetOrFromConfig(aSection, KFldExpected(), iEnumTableHandshake, expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TUint	value;
+	if ( GetOrFromConfig(aSection, KFldValue(), iEnumTableHandshake, value) )
+		{
+		GetCommConfigV01().iHandshake=value;
+		}
+	}
+
+void CT_TCommConfigV01Data::DoCmdiParity(const TDesC& aSection)
+	{
+	TParity	actual=GetCommConfigV01().iParity;
+	INFO_PRINTF2(_L("iParity : %d"), actual);
+
+	TInt	expected;
+	if ( GetEnumFromConfig(aSection, KFldExpected(), iEnumTableParity, expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TInt	value;
+	if ( GetEnumFromConfig(aSection, KFldValue(), iEnumTableParity, value) )
+		{
+		GetCommConfigV01().iParity=(TParity)value;
+		}
+	}
+
+void CT_TCommConfigV01Data::DoCmdiParityError(const TDesC& aSection)
+	{
+	TUint	actual=GetCommConfigV01().iParityError;
+	INFO_PRINTF2(_L("iParityError : %d"), actual);
+
+	TInt	expected;
+	if ( GetEnumFromConfig(aSection, KFldExpected(), iEnumTableParityError, expected) )
+		{
+		if ( expected!=(TInt)actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TInt	value;
+	if ( GetEnumFromConfig(aSection, KFldValue(), iEnumTableParityError, value) )
+		{
+		GetCommConfigV01().iParityError=(TUint)value;
+		}
+	}
+
+void CT_TCommConfigV01Data::DoCmdiParityErrorChar(const TDesC& aSection)
+	{
+	TText8	actual=GetCommConfigV01().iParityErrorChar;
+	INFO_PRINTF2(_L("iParityErrorChar : 0x%x"), (TUint)actual);
+
+	TInt	expected;
+	if ( GetHexFromConfig(aSection, KFldExpected(), expected) )
+		{
+		if ( expected!=(TInt)actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TInt	value;
+	if ( GetHexFromConfig(aSection, KFldValue(), value) )
+		{
+		GetCommConfigV01().iParityErrorChar=(TText8)value;
+		}
+	}
+
+void CT_TCommConfigV01Data::DoCmdiRate(const TDesC& aSection)
+	{
+	TBps	actual=GetCommConfigV01().iRate;
+	INFO_PRINTF2(_L("iRate : %d"), actual);
+
+	TInt	expected;
+	if ( GetEnumFromConfig(aSection, KFldExpected(), iEnumTableRate, expected) )
+		{
+		if ( expected!=(TInt)actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TInt	value;
+	if ( GetEnumFromConfig(aSection, KFldValue(), iEnumTableRate, value) )
+		{
+		GetCommConfigV01().iRate=(TBps)value;
+		}
+	}
+
+void CT_TCommConfigV01Data::DoCmdiSIREnable(const TDesC& aSection)
+	{
+	TSir	actual=GetCommConfigV01().iSIREnable;
+	INFO_PRINTF2(_L("iSIREnable : %d"), actual);
+
+	TInt	expected;
+	if ( GetEnumFromConfig(aSection, KFldExpected(), iEnumTableSir, expected) )
+		{
+		if ( expected!=(TInt)actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TInt	value;
+	if ( GetEnumFromConfig(aSection, KFldValue(), iEnumTableSir, value) )
+		{
+		GetCommConfigV01().iSIREnable=(TSir)value;
+		}
+	}
+
+void CT_TCommConfigV01Data::DoCmdiSIRSettings(const TDesC& aSection)
+	{
+	TUint	actual=GetCommConfigV01().iSIRSettings;
+	INFO_PRINTF2(_L("iSIRSettings : %d"), actual);
+
+	TInt	expected;
+	if ( GetEnumFromConfig(aSection, KFldExpected(), iEnumTableSirSetting, expected) )
+		{
+		if ( expected!=(TInt)actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TInt	value;
+	if ( GetEnumFromConfig(aSection, KFldValue(), iEnumTableSirSetting, value) )
+		{
+		GetCommConfigV01().iSIRSettings=(TUint)value;
+		}
+	}
+
+void CT_TCommConfigV01Data::DoCmdiSpecialRate(const TDesC& aSection)
+	{
+	TInt	actual=GetCommConfigV01().iSpecialRate;
+	INFO_PRINTF2(_L("iSpecialRate : %d"), actual);
+
+	TInt	expected;
+	if ( GetIntFromConfig(aSection, KFldExpected(), expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TInt	value;
+	if ( GetIntFromConfig(aSection, KFldValue(), value) )
+		{
+		GetCommConfigV01().iSpecialRate=value;
+		}
+	}
+
+void CT_TCommConfigV01Data::DoCmdiStopBits(const TDesC& aSection)
+	{
+	TStopBits	actual=GetCommConfigV01().iStopBits;
+	INFO_PRINTF2(_L("iStopBits : %d"), actual);
+
+	TInt	expected;
+	if ( GetEnumFromConfig(aSection, KFldExpected(), iEnumTableStopBits, expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TInt	value;
+	if ( GetEnumFromConfig(aSection, KFldValue(), iEnumTableStopBits, value) )
+		{
+		GetCommConfigV01().iStopBits=(TStopBits)value;
+		}
+	}
+
+void CT_TCommConfigV01Data::DoCmdiTerminator(const TDesC& aSection)
+	{
+	TBuf<KMaxTestExecuteCommandLength>	tempStore;
+
+	for ( TInt index=0; index<KConfigMaxTerminators; ++index )
+		{
+		TText8	actual=GetCommConfigV01().iTerminator[index];
+		INFO_PRINTF3(_L("iTerminator[%d] : 0x%x"), index, (TUint)actual);
+
+		tempStore.Format(KFldExpectedIndex(), index);
+		TInt	expected;
+		if ( GetHexFromConfig(aSection, tempStore, expected) )
+			{
+			if ( expected!=(TInt)actual )
+				{
+				ERR_PRINTF1(KLogErrorExpectedValue);
+				SetBlockResult(EFail);
+				}
+			}
+
+		tempStore.Format(KFldValueIndex(), index);
+		TInt	value;
+		if ( GetHexFromConfig(aSection, tempStore, value) )
+			{
+			GetCommConfigV01().iTerminator[index]=(TText8)value;
+			}
+		}
+	}
+
+void CT_TCommConfigV01Data::DoCmdiTerminatorCount(const TDesC& aSection)
+	{
+	TInt	actual=GetCommConfigV01().iTerminatorCount;
+	INFO_PRINTF2(_L("iTerminatorCount : %d"), actual);
+
+	TInt	expected;
+	if ( GetIntFromConfig(aSection, KFldExpected(), expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TInt	value;
+	if ( GetIntFromConfig(aSection, KFldValue(), value) )
+		{
+		GetCommConfigV01().iTerminatorCount=value;
+		}
+	}
+
+void CT_TCommConfigV01Data::DoCmdiXoffChar(const TDesC& aSection)
+	{
+	TText8	actual=GetCommConfigV01().iXoffChar;
+	INFO_PRINTF2(_L("iXoffChar : 0x%x"), (TUint)actual);
+
+	TInt	expected;
+	if ( GetHexFromConfig(aSection, KFldExpected(), expected) )
+		{
+		if ( expected!=(TInt)actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TInt	value;
+	if ( GetHexFromConfig(aSection, KFldValue(), value) )
+		{
+		GetCommConfigV01().iXoffChar=(TText8)value;
+		}
+	}
+
+void CT_TCommConfigV01Data::DoCmdiXonChar(const TDesC& aSection)
+	{
+	TText8	actual=GetCommConfigV01().iXonChar;
+	INFO_PRINTF2(_L("iXonChar : 0x%x"), (TUint)actual);
+
+	TInt	expected;
+	if ( GetHexFromConfig(aSection, KFldExpected(), expected) )
+		{
+		if ( expected!=(TInt)actual )
+			{
+			ERR_PRINTF1(KLogErrorExpectedValue);
+			SetBlockResult(EFail);
+			}
+		}
+
+	TInt	value;
+	if ( GetHexFromConfig(aSection, KFldValue(), value) )
+		{
+		GetCommConfigV01().iXonChar=(TText8)value;
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/e32/src/T_TCommConfigV02Data.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,160 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_TCommConfigV02Data.h"
+
+/*@{*/
+_LIT(KCmdConstructor,						"new");
+_LIT(KCmdDestructor,						"~");
+_LIT(KCmdiTxShutdownTimeout,				"iTxShutdownTimeout");
+
+_LIT(KFldExpected,							"expected");
+_LIT(KFldValue,								"value");
+
+_LIT(KLogError,								"Error=%d");
+/*@}*/
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_TCommConfigV02Data::CT_TCommConfigV02Data()
+:	CT_TCommConfigV01Data()
+,	iCommConfig2(NULL)
+	{
+	}
+
+CT_TCommConfigV02Data::~CT_TCommConfigV02Data()
+/**
+ * Public destructor
+ */
+	{
+	DestroyData();
+	}
+
+void CT_TCommConfigV02Data::DestroyData()
+	{
+	delete iCommConfig2;
+	iCommConfig2=NULL;
+	}
+
+TDes8* CT_TCommConfigV02Data::Descriptor()
+/**
+ * Return a pointer to the buffer
+ *
+ * @return	pointer to the buffer
+ */
+	{
+	return iCommConfig2;
+	}
+
+TAny* CT_TCommConfigV02Data::GetObject()
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return	pointer to the object that the data wraps
+ */
+	{
+	return iCommConfig2;
+	}
+
+TBool CT_TCommConfigV02Data::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+	{
+	TBool	ret=ETrue;
+	TInt	err=KErrNone;
+
+	if ( aCommand==KCmdConstructor )
+		{
+		err=DoCmdConstructor();
+		}
+	else if ( aCommand==KCmdDestructor )
+		{
+		DoCmdDestructor();
+		}
+	else if ( aCommand==KCmdiTxShutdownTimeout )
+		{
+		DoCmdiTxShutdownTimeout(aSection);
+		}
+	else
+		{
+		err=CT_TCommConfigV01Data::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(KLogError, err);
+		SetError(err);
+		}
+
+	return ret;
+	}
+
+TCommConfigV01& CT_TCommConfigV02Data::GetCommConfigV01()
+	{
+	return (*iCommConfig2)();
+	}
+
+TCommConfigV02& CT_TCommConfigV02Data::GetCommConfigV02()
+	{
+	return (*iCommConfig2)();
+	}
+
+TInt CT_TCommConfigV02Data::DoCmdConstructor()
+	{
+	DestroyData();
+	TRAPD(err, iCommConfig2=new (ELeave) TCommConfig2());
+	iCommConfig2->FillZ();
+	return err;
+	}
+
+void CT_TCommConfigV02Data::DoCmdDestructor()
+	{
+	DestroyData();
+	}
+
+void CT_TCommConfigV02Data::DoCmdiTxShutdownTimeout(const TDesC& aSection)
+	{
+	TInt	actual=GetCommConfigV02().iTxShutdownTimeout;
+	INFO_PRINTF2(_L("iTxShutdownTimeout : %d"), actual);
+
+	TInt	expected;
+	if( GetIntFromConfig(aSection, KFldExpected(), expected) )
+		{
+		if ( expected!=actual )
+			{
+			ERR_PRINTF1(_L("Expected Value does not match actual"));
+			SetBlockResult(EFail);
+			}
+		}
+
+	TInt	value;
+	if( GetIntFromConfig(aSection, KFldValue(), value) )
+		{
+		GetCommConfigV02().iTxShutdownTimeout=value;
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/group/bld.inf	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,26 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#include "device.cfg"
+#include "../../testdata/bsp/common/group/bld.inf"
+
+#include "../bsp/group/bld.inf"
+#include "../testsuites/group/bld.inf"
+
+PRJ_TESTEXPORTS
+//t_salt.oby		/src/cedar/generic/base/e32/rombuild/t_salt.oby
+t_salt.oby		/sf/os/kernelhwsrv/kernel/eka/rombuild/t_salt.oby
+t_salt.oby		/epoc32/rom/haitests/t_salt.oby
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/group/device.cfg	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,28 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+
+
+// Used within the build process to export the correct files for the supported devices
+// Uncomment only one of the devices definied in  listed below
+#define	TEST_DEVICE_H4HRP
+//#define	TEST_DEVICE_H6HRP
+//#define	TEST_DEVICE_DEVLON51
+//#define	TEST_DEVICE_DEVLON52
+//#define	TEST_DEVICE_MERLIN
+//#define	TEST_DEVICE_TUBE
+//#define	TEST_DEVICE_LUMIERE
+//#define	TEST_DEVICE_TOPAZMXC
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/group/t_salt.oby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,36 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+#define BASE_ROM
+#include <rom\##VARIANT##\header.iby>
+
+files=
+
+#include <rom\##VARIANT##\kernel.iby>
+#include "user.iby"
+#include <rom\hal\hal.iby>
+#include <rom\f32\f32.iby>
+
+//TEF Includes
+#include <rom\include\base_testexecutelite.iby>
+
+// Tests
+#include <rom\haitests\t_screen.iby>
+#include <rom\haitests\t_serial.iby>
+#include <rom\haitests\t_digitiser.iby>
+#include <rom\haitests\t_sound.iby>
+#include <rom\haitests\t_keypad.iby>
+#include <rom\haitests\t_mmcsd.iby>
+#include <rom\haitests\t_usb.iby>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/hal/inc/T_HALData.h	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#if (!defined __T_HAL_DATA_H__)
+#define __T_HAL_DATA_H__
+
+
+//	User Includes
+#include "DataWrapperBase.h"
+
+//	EPOC Includes
+#include <hal.h>
+
+typedef	TBool (*THalFunctionSetPrepare)(CDataWrapperBase* aDataWrapper, const TDesC& aSectName, TInt& aValue);
+typedef	TBool (*THalFunctionGetPrepare)(CDataWrapperBase* aDataWrapper, const TDesC& aSectName, TInt& aValueStart, TInt& aValueEnd);
+typedef	void (*THalFunctionGetValidation)(CDataWrapperBase* aDataWrapper, const TDesC& aSectName, TInt aValue, TBool aForceValidation);
+typedef	void (*THalFunctionStore)(CDataWrapperBase* aDataWrapper, TInt aValue);
+
+/**
+ * Test Active Notification class
+ *
+ */
+class CT_HALData : public CDataWrapperBase
+	{
+public:
+	struct THalTableLookup
+		{
+		const TDesC&				iHalString;
+		HALData::TAttribute			iHalAttribute;
+		THalFunctionSetPrepare		iHalFunctionSetPrepare;
+		THalFunctionGetPrepare		iHalFunctionGetPrepare;
+		THalFunctionGetValidation	iHalFunctionGetValidation;
+		THalFunctionStore			iHalFunctionStore;
+		TBool						iHalForceValidation;
+		};
+
+public:
+	CT_HALData(const THalTableLookup* aTable);
+	~CT_HALData();
+
+	virtual TAny*	GetObject();
+	virtual TBool	DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
+
+	static void		GetValidationBool(CDataWrapperBase* aThis, const TDesC& aSection, TInt aValue, TBool aForceValidation);
+	static void		GetValidationInt(CDataWrapperBase* aThis, const TDesC& aSection, TInt aValue, TBool aForceValidation);
+	static void		GetValidationUint(CDataWrapperBase* aThis, const TDesC& aSection, TInt aValue, TBool aForceValidation);
+
+	static TBool	SetPrepareInt(CDataWrapperBase* aThis, const TDesC& aSection, TInt& aValue);
+	static TBool	SetPrepareUint(CDataWrapperBase* aThis, const TDesC& aSection, TInt& aValue);
+
+protected:
+	const THalTableLookup*		LookUp(const TDesC& aValue);
+
+private:
+	TInt	DoCmdSet(const TDesC& aSection);
+	TInt	DoCmdGet(const TDesC& aSection);
+
+protected:
+	const THalTableLookup*	iTable;
+	TInt					iValue;
+	};
+
+#endif /* __T_HAL_DATA_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/hal/src/T_HALData.cpp	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,329 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "T_HALData.h"
+
+/*@{*/
+_LIT(KDeviceId,								"deviceid");
+_LIT(KHalEValue,							"halEValue");
+_LIT(KValue,								"value");
+_LIT(KExpected,								"expected");
+
+_LIT(KCmdSet,								"Set");
+_LIT(KCmdGet,								"Get");
+
+_LIT(KLogEnumNotFound,						"Enum '%S' not found");
+_LIT(KLogError,								"Error=%d");
+_LIT(KLogMissingParameter,					"Missing parameter '%S'");
+_LIT(KLogActualValue,						"Actual Value '%d' 0x%x");
+/*@}*/
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CT_HALData::CT_HALData(const THalTableLookup* aTable)
+:	CDataWrapperBase()
+,	iTable(aTable)
+,	iValue(-1)
+	{
+	}
+
+CT_HALData::~CT_HALData()
+/**
+ * Public destructor
+ */
+	{
+	}
+
+TAny* CT_HALData::GetObject()
+/**
+ * Return a pointer to the object that the data wraps
+ *
+ * @return	pointer to the object that the data wraps
+ */
+	{
+	return NULL;
+	}
+
+const CT_HALData::THalTableLookup* CT_HALData::LookUp(const TDesC& aValue)
+	{
+	const THalTableLookup*	ret=NULL;
+	TInt					index=0;
+	while ( (iTable[index].iHalFunctionSetPrepare!=NULL) &&
+			(iTable[index].iHalFunctionGetValidation!=NULL) && (ret==NULL) )
+		{
+		if ( iTable[index].iHalString==aValue )
+			{
+			ret=&iTable[index];
+			}
+		else
+			{
+			++index;
+			}
+		}
+	return ret;
+	}
+
+TBool CT_HALData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
+/**
+ * Process a command read from the ini file
+ *
+ * @param aCommand			The command to process
+ * @param aSection			The section in the ini containing data for the command
+ * @param aAsyncErrorIndex	Command index for async calls to return errors to
+ *
+ * @return					ETrue if the command is processed
+ *
+ * @leave					System wide error
+ */
+	{
+	TBool	ret=ETrue;
+	TInt	err=KErrNone;
+
+	if ( aCommand==KCmdSet )
+		{
+		err=DoCmdSet(aSection);
+		}
+	else if ( aCommand==KCmdGet)
+		{
+		err=DoCmdGet(aSection);
+		}
+	else
+		{
+		ret=CDataWrapperBase::DoCommandL(aCommand, aSection, aAsyncErrorIndex);
+		}
+
+	if ( err!=KErrNone )
+		{
+		ERR_PRINTF2(KLogError, err);
+		SetError(err);
+		}
+
+	return ret;
+	}
+
+TInt CT_HALData::DoCmdSet(const TDesC& aSection)
+	{
+	TInt	err=KErrNone;
+
+	//	Do we have a device id
+	TInt	deviceId=0;
+	TBool	hasDeviceId=GetIntFromConfig(aSection, KDeviceId(), deviceId);
+
+	//	Get the HAL variable to set
+	TPtrC	enumString;
+	if ( GetStringFromConfig(aSection, KHalEValue(), enumString) )
+		{
+		const THalTableLookup*	entry=LookUp(enumString);
+
+		if ( entry==NULL )
+			{
+			//	HAL variable not valid
+			ERR_PRINTF2(KLogEnumNotFound, &enumString);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			TInt	value=0;
+			//	Read data from ini file for the value to set
+			if ( entry->iHalFunctionSetPrepare(this, aSection, value) )
+				{
+				//	Set the value
+				if ( hasDeviceId )
+					{
+					err=HAL::Set(deviceId, entry->iHalAttribute, value);
+					}
+				else
+					{
+					err=HAL::Set(entry->iHalAttribute, value);
+					}
+
+				if ( err==KErrNone )
+					{
+					//	Set was successful so store it locally
+					entry->iHalFunctionStore(this, value);
+					}
+				}
+			}
+		}
+	else
+		{
+		ERR_PRINTF2(KLogMissingParameter, &KHalEValue());
+		SetBlockResult(EFail);
+		}
+
+	return err;
+	}
+
+TInt CT_HALData::DoCmdGet(const TDesC& aSection)
+	{
+	TInt	err=KErrNone;
+
+	//	Do we have a device id
+	TInt	deviceId=0;
+	TBool	hasDeviceId=GetIntFromConfig(aSection, KDeviceId(), deviceId);
+
+	//	Get the HAL variable to set
+	TPtrC	enumString;
+	if ( GetStringFromConfig(aSection, KHalEValue(), enumString) )
+		{
+		const THalTableLookup*	entry=LookUp(enumString);
+
+		if ( entry==NULL )
+			{
+			//	HAL variable not valid
+			ERR_PRINTF2(KLogEnumNotFound, &enumString);
+			SetBlockResult(EFail);
+			}
+		else
+			{
+			//	HAL::Get testing works within a range (needed if we request the full palette)
+			//	Get the range of values to get
+			TInt	valueStart=0;
+			TInt	valueEnd=0;
+			if ( entry->iHalFunctionGetPrepare(this, aSection, valueStart, valueEnd) )
+				{
+				for ( iValue=valueStart; (iValue<=valueEnd) && (err==KErrNone); ++iValue )
+					{
+					//	Get the value
+					TInt	value=iValue;
+					if ( hasDeviceId )
+						{
+						err=HAL::Get(deviceId, entry->iHalAttribute, value);
+						}
+					else
+						{
+						err=HAL::Get(entry->iHalAttribute, value);
+						}
+
+					if ( err==KErrNone )
+						{
+						//	Get was successful validate the returned value and store it locally
+						INFO_PRINTF3(KLogActualValue, value, value);
+						entry->iHalFunctionGetValidation(this, aSection, value, entry->iHalForceValidation);
+						entry->iHalFunctionStore(this, value);
+						}
+					}
+				}
+			}
+		}
+	else
+		{
+		ERR_PRINTF2(KLogMissingParameter, &KHalEValue());
+		SetBlockResult(EFail);
+		}
+
+	return err;
+	}
+
+//	Prepare the value we are setting as a TInt
+TBool CT_HALData::SetPrepareInt(CDataWrapperBase* aThis, const TDesC& aSection, TInt& aValue)
+	{
+	TBool	ret=aThis->GetIntFromConfig(aSection, KValue(), aValue);
+	if ( !ret )
+		{
+		aThis->ERR_PRINTF2(KLogMissingParameter, &KValue());
+		aThis->SetBlockResult(EFail);
+		}
+
+	return ret;
+	}
+
+//	Prepare the value we are setting as a TUint
+TBool CT_HALData::SetPrepareUint(CDataWrapperBase* aThis, const TDesC& aSection, TInt& aValue)
+	{
+	TUint	uint=aValue;
+	TBool	ret=aThis->GetUintFromConfig(aSection, KValue(), uint);
+	if ( !ret )
+		{
+		aThis->ERR_PRINTF2(KLogMissingParameter, &KValue());
+		aThis->SetBlockResult(EFail);
+		}
+
+	aValue=uint;
+	return ret;
+	}
+
+//	Validate the returned value from a HAL::Get as a TBool
+void CT_HALData::GetValidationBool(CDataWrapperBase* aThis, const TDesC& aSection, TInt aValue, TBool aForceValidation)
+	{
+	TBool	expectedValue;
+	TBool	ret=aThis->GetBoolFromConfig(aSection, KExpected(), expectedValue);
+	if ( !ret )
+		{
+		if ( aForceValidation )
+			{
+			aThis->ERR_PRINTF2(KLogMissingParameter, &KExpected());
+			aThis->SetBlockResult(EFail);
+			}
+		}
+	else
+		{
+		if ( aValue!=expectedValue )
+			{
+			aThis->SetBlockResult(EFail);
+			aThis->ERR_PRINTF3(_L("Retrived Value(%d) != expectedValue(%d)"), aValue, expectedValue);
+			}
+		}
+	}
+
+//	Validate the returned value from a HAL::Get as a TInt
+void CT_HALData::GetValidationInt(CDataWrapperBase* aThis, const TDesC& aSection, TInt aValue, TBool aForceValidation)
+	{
+	TInt	expectedValue;
+	TBool	ret=aThis->GetIntFromConfig(aSection, KExpected(), expectedValue);
+	if ( !ret )
+		{
+		if ( aForceValidation )
+			{
+			aThis->ERR_PRINTF2(KLogMissingParameter, &KExpected());
+			aThis->SetBlockResult(EFail);
+			}
+		}
+	else
+		{
+		if ( aValue!=expectedValue )
+			{
+			aThis->SetBlockResult(EFail);
+			aThis->ERR_PRINTF3(_L("Retrived Value(%d) != expectedValue(%d)"), aValue, expectedValue);
+			}
+		}
+	}
+
+//	Validate the returned value from a HAL::Get as a TUint
+void CT_HALData::GetValidationUint(CDataWrapperBase* aThis, const TDesC& aSection, TInt aValue, TBool aForceValidation)
+	{
+	TUint	expectedValue;
+	TBool	ret=aThis->GetUintFromConfig(aSection, KExpected(), expectedValue);
+	if ( !ret )
+		{
+		if ( aForceValidation )
+			{
+			aThis->ERR_PRINTF2(KLogMissingParameter, &KExpected());
+			aThis->SetBlockResult(EFail);
+			}
+		}
+	else
+		{
+		if ( (TUint)aValue!=expectedValue )
+			{
+			aThis->SetBlockResult(EFail);
+			aThis->ERR_PRINTF3(_L("Retrived Value(%d) != expectedValue(%d)"), aValue, expectedValue);
+			}
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/testsuites/base/base.driver	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,637 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<driver:driver xmlns:driver="http://www.symbian.com/TestDriver">
+	<task name="base" timeout="0">
+		<transferToSymbian>
+			<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\t_prompt.ini" SymbianPath="$:\base\t_prompt.ini"/>
+		</transferToSymbian>
+		<task name="digitiser">
+			<executeOnPC>
+				<build testBuild="true" URI="${sourceroot}\group\">
+					<componentName>t_digitiser</componentName>
+				</build>
+			</executeOnPC>
+			<transferToSymbian>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\digitiser\base-bsp-digitiser-driver-manual.ini" SymbianPath="$:\base\digitiser\base-bsp-digitiser-driver-manual.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\digitiser\base-bsp-digitiser-driver-automated.ini" SymbianPath="$:\base\digitiser\base-bsp-digitiser-driver-automated.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\digitiser\t_digitiser.ini" SymbianPath="$:\base\digitiser\t_digitiser.ini"/>
+			</transferToSymbian>
+			<task name="validation">
+				<task name="manual">
+					<task name="base-bsp-digitiser-driver-manual" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\digitiser\base-bsp-digitiser-driver-manual.script" SymbianPath="$:\base\digitiser\base-bsp-digitiser-driver-manual.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\digitiser\t_digitiser.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+				</task>
+				<task name="automated">
+					<task name="base-bsp-digitiser-driver-automated" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\digitiser\base-bsp-digitiser-driver-automated.script" SymbianPath="$:\base\digitiser\base-bsp-digitiser-driver-automated.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\digitiser\t_digitiser.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+				</task>
+			</task>
+			<task name="performance">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+			<task name="conformance" timeout="0">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+			<task name="stress">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+		</task>
+		<task name="keypad">
+			<executeOnPC>
+				<build testBuild="true" URI="${sourceroot}\group\">
+					<componentName>t_keypad</componentName>
+				</build>
+			</executeOnPC>
+			<transferToSymbian>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\keypad\base-bsp-keypad-driver.ini" SymbianPath="$:\base\keypad\base-bsp-keypad-driver.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\release\${platform}\${build}\z\base\keypad\t_keypad.ini" SymbianPath="$:\base\keypad\t_keypad.ini"/>
+			</transferToSymbian>
+			<task name="validation">
+				<task name="manual">
+					<task name="base-bsp-keypad-driver-manual" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\keypad\base-bsp-keypad-driver-manual.script" SymbianPath="$:\base\keypad\base-bsp-keypad-driver-manual.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\release\${platform}\${build}\z\base\keypad\t_keypad.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+				</task>
+				<task name="automated">
+					<task name="base-bsp-keypad-driver-automated" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\keypad\base-bsp-keypad-driver-automated.script" SymbianPath="$:\base\keypad\base-bsp-keypad-driver-automated.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\release\${platform}\${build}\z\base\keypad\t_keypad.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+				</task>
+			</task>
+			<task name="performance">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+			<task name="conformance" timeout="0">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+			<task name="stress">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+		</task>
+		<task name="screen">
+			<executeOnPC>
+				<build testBuild="true" URI="${sourceroot}\group\">
+					<componentName>t_screen</componentName>
+				</build>
+			</executeOnPC>
+			<transferToSymbian>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\screen\base-bsp-screen-driver-mode.ini" SymbianPath="$:\base\screen\base-bsp-screen-driver-mode.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\screen\base-bsp-screen-driver-modeless.ini" SymbianPath="$:\base\screen\base-bsp-screen-driver-modeless.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\release\${platform}\${build}\z\base\screen\t_screen.ini" SymbianPath="$:\base\screen\t_screen.ini"/>
+			</transferToSymbian>
+			<task name="validation">
+				<task name="manual">
+					<task name="base-bsp-screen-driver-mode-manual" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\screen\base-bsp-screen-driver-mode-manual.script" SymbianPath="$:\base\screen\base-bsp-screen-driver-mode-manual.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\release\${platform}\${build}\z\base\screen\t_screen.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+				</task>
+				<task name="automated">
+					<task name="base-bsp-screen-driver-mode-automated" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\screen\base-bsp-screen-driver-mode-automated.script" SymbianPath="$:\base\screen\base-bsp-screen-driver-mode-automated.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\release\${platform}\${build}\z\base\screen\t_screen.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+					<task name="base-bsp-screen-driver-modeless-automated" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\screen\base-bsp-screen-driver-modeless-automated.script" SymbianPath="$:\base\screen\base-bsp-screen-driver-modeless-automated.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\release\${platform}\${build}\z\base\screen\t_screen.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+				</task>
+			</task>
+			<task name="performance">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+			<task name="conformance" timeout="0">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+			<task name="stress">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+		</task>
+		<task name="serial">
+			<executeOnPC>
+				<build testBuild="true" URI="${sourceroot}\group\">
+					<componentName>t_serial</componentName>
+					<componentName>uartscript</componentName>
+				</build>
+			</executeOnPC>
+			<transferToSymbian>
+				<transfer move="false" PCPath="${epocroot}\epoc32\release\${platform}\${build}\z\base\serial\base-bsp-serial-driver-PORT0.ini" SymbianPath="$:\base\serial\base-bsp-serial-driver-PORT0.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\release\${platform}\${build}\z\base\serial\base-bsp-serial-driver-PORT0-2400.ini" SymbianPath="$:\base\serial\base-bsp-serial-driver-PORT0-2400.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\release\${platform}\${build}\z\base\serial\base-bsp-serial-driver-PORT0-4800.ini" SymbianPath="$:\base\serial\base-bsp-serial-driver-PORT0-4800.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\release\${platform}\${build}\z\base\serial\base-bsp-serial-driver-PORT0-9600.ini" SymbianPath="$:\base\serial\base-bsp-serial-driver-PORT0-9600.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\release\${platform}\${build}\z\base\serial\base-bsp-serial-driver-PORT0-115200.ini" SymbianPath="$:\base\serial\base-bsp-serial-driver-PORT0-115200.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\release\${platform}\${build}\z\base\serial\base-bsp-serial-driver-stress-PORT0-2400.ini" SymbianPath="$:\base\serial\base-bsp-serial-driver-stress-PORT0-2400.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\release\${platform}\${build}\z\base\serial\base-bsp-serial-driver-stress-PORT0-4800.ini" SymbianPath="$:\base\serial\base-bsp-serial-driver-stress-PORT0-4800.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\release\${platform}\${build}\z\base\serial\base-bsp-serial-driver-stress-PORT0-9600.ini" SymbianPath="$:\base\serial\base-bsp-serial-driver-stress-PORT0-9600.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\release\${platform}\${build}\z\base\serial\base-bsp-serial-driver-stress-PORT0-115200.ini" SymbianPath="$:\base\serial\base-bsp-serial-driver-stress-PORT0-115200.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\serial\t_serial.ini" SymbianPath="$:\base\serial\t_serial.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\serial\t_echoserver.ini" SymbianPath="$:\base\serial\t_echoserver.ini"/>
+			</transferToSymbian>
+			<task name="validation">
+				<task name="manual">
+				</task>
+				<task name="automated">
+					<task name="base-bsp-serial-driver-PORT0" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\release\${platform}\${build}\z\base\serial\base-bsp-serial-driver-PORT0.script" SymbianPath="$:\base\serial\base-bsp-serial-driver-PORT0.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\serial\t_serial.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+					<task name="base-bsp-serial-driver-PORT0-9600" timeout="10000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\release\${platform}\${build}\z\base\serial\base-bsp-serial-driver-PORT0-9600.script" SymbianPath="$:\base\serial\base-bsp-serial-driver-PORT0-9600.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\serial\t_serial.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+					<task name="base-bsp-serial-driver-PORT0-115200" timeout="10000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\release\${platform}\${build}\z\base\serial\base-bsp-serial-driver-PORT0-115200.script" SymbianPath="$:\base\serial\base-bsp-serial-driver-PORT0-115200.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\serial\t_serial.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+				</task>
+			</task>
+			<task name="performance">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+			<task name="conformance" timeout="0">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+			<task name="stress">
+				<task name="manual">
+				</task>
+				<task name="automated">
+					<transferToSymbian>
+						<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\serial\stress\stress8bits.txt" SymbianPath="$:\base\serial\stress\stress8bits.txt"/>
+					</transferToSymbian>
+					<task name="base-bsp-serial-driver-stress-PORT0-9600" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\release\${platform}\${build}\z\base\serial\base-bsp-serial-driver-stress-PORT0-9600.script" SymbianPath="$:\base\serial\base-bsp-serial-driver-stress-PORT0-9600.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\serial\t_serial.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+					<task name="base-bsp-serial-driver-stress-PORT0-115200" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\release\${platform}\${build}\z\base\serial\base-bsp-serial-driver-stress-PORT0-115200.script" SymbianPath="$:\base\serial\base-bsp-serial-driver-stress-PORT0-115200.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\serial\t_serial.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+				</task>
+			</task>
+		</task>
+		<task name="sound">
+			<executeOnPC>
+				<build testBuild="true" URI="${sourceroot}\group\">
+					<componentName>t_sound</componentName>
+				</build>
+			</executeOnPC>
+			<transferToSymbian>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\t_sound.ini" SymbianPath="$:\base\sound\t_sound.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\base-bsp-sound-driver.ini" SymbianPath="$:\base\sound\base-bsp-sound-driver.ini"/>
+			</transferToSymbian>
+			<task name="validation">
+				<transferToSymbian>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\alaw8bit_mono_8khz_32kb.raw" SymbianPath="$:\base\sound\validation\alaw8bit_mono_8khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\alaw8bit_stereo_24khz_32kb.raw" SymbianPath="$:\base\sound\validation\alaw8bit_stereo_24khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\mulaw8bit_mono_12khz_32kb.raw" SymbianPath="$:\base\sound\validation\mulaw8bit_mono_12khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\mulaw8bit_stereo_32khz_32kb.raw" SymbianPath="$:\base\sound\validation\mulaw8bit_stereo_32khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_mono_11khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_mono_11khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_mono_12khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_mono_12khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_mono_16khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_mono_16khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_mono_22khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_mono_22khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_mono_24khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_mono_24khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_mono_32khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_mono_32khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_mono_44.1khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_mono_44.1khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_mono_48khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_mono_48khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_mono_8khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_mono_8khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_stereo_11khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_stereo_11khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_stereo_12khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_stereo_12khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_stereo_16khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_stereo_16khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_stereo_22khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_stereo_22khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_stereo_24khz_320kb.raw" SymbianPath="$:\base\sound\validation\pcm16_stereo_24khz_320kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_stereo_24khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_stereo_24khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_stereo_32khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_stereo_32khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_stereo_44.1khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_stereo_44.1khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_stereo_48khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_stereo_48khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm16_stereo_8khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm16_stereo_8khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\pcm8_mono_8khz_32kb.raw" SymbianPath="$:\base\sound\validation\pcm8_mono_8khz_32kb.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\zero_filled_2_bytes.raw" SymbianPath="$:\base\sound\validation\zero_filled_2_bytes.raw"/>
+					<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\sound\validation\zero_filled_32kb.raw" SymbianPath="$:\base\sound\validation\zero_filled_32kb.raw"/>
+				</transferToSymbian>
+				<task name="manual">
+					<task name="base-bsp-sound-driver-manual" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\sound\base-bsp-sound-driver-manual.script" SymbianPath="$:\base\sound\base-bsp-sound-driver-manual.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\sound\t_sound.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+				</task>
+				<task name="automated">
+					<task name="base-bsp-sound-driver-automated" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\sound\base-bsp-sound-driver-automated.script" SymbianPath="$:\base\sound\base-bsp-sound-driver-automated.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\sound\t_sound.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+				</task>
+			</task>
+			<task name="performance">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+			<task name="conformance" timeout="0">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+			<task name="stress">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+		</task>
+		<task name="mmc">
+			<executeOnPC>
+				<build testBuild="true" URI="${sourceroot}\group\">
+					<componentName>t_mmcsd</componentName>
+				</build>
+			</executeOnPC>
+			<executeOnPC>
+				<build testBuild="true" URI="${sourceroot}\group\">
+				<componentName>d_mmcsdif</componentName>
+				</build>
+			</executeOnPC>
+			<transferToSymbian>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-mmc-socket-driver.ini" SymbianPath="$:\base\mmcsd\base-bsp-mmc-socket-driver.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-mmc-stack-driver.ini" SymbianPath="$:\base\mmcsd\base-bsp-mmc-stack-driver.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-mmc-psubase-driver.ini" SymbianPath="$:\base\mmcsd\base-bsp-mmc-psubase-driver.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-mmc-psu-driver.ini" SymbianPath="$:\base\mmcsd\base-bsp-mmc-psu-driver.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-mmc-mediachange-driver.ini" SymbianPath="$:\base\mmcsd\base-bsp-mmc-mediachange-driver.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-mmc-mediachange-driver-manual.ini" SymbianPath="$:\base\mmcsd\base-bsp-mmc-mediachange-driver-manual.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-mmc-socket-driver-manual.ini" SymbianPath="$:\base\mmcsd\base-bsp-mmc-socket-driver-manual.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-mmc-stack-driver-manual.ini" SymbianPath="$:\base\mmcsd\base-bsp-mmc-stack-driver-manual.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\t_mmc.ini" SymbianPath="$:\base\mmcsd\t_mmc.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\t_sd.ini" SymbianPath="$:\base\mmcsd\t_sd.ini"/>
+			</transferToSymbian>
+			<task name="validation">
+				<task name="manual">
+					<task name="base-bsp-mmc-stack-driver-manual" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-mmc-stack-driver-manual.script" SymbianPath="$:\base\mmcsd\base-bsp-mmc-stack-driver-manual.script">
+							<testCasesList operator="exclude">
+							<testCase target="${epocroot}\epoc32\data\z\base\mmcsd\t_mmcsd.tcs"/>
+							</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+					<task name="base-bsp-mmc-mediachange-driver-manual" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-mmc-mediachange-driver-manual.script" SymbianPath="$:\base\mmcsd\base-bsp-mmc-mediachange-driver-manual.script">
+							<testCasesList operator="exclude">
+							<testCase target="${epocroot}\epoc32\data\z\base\mmcsd\t_mmcsd.tcs"/>
+							</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+					<task name="base-bsp-mmc-socket-driver-manual" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-mmc-socket-driver-manual.script" SymbianPath="$:\base\mmcsd\base-bsp-mmc-socket-driver-manual.script">
+							<testCasesList operator="exclude">
+							<testCase target="${epocroot}\epoc32\data\z\base\mmcsd\t_mmcsd.tcs"/>
+							</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+				</task>
+				<task name="automated">
+					<task name="base-bsp-mmc-stack-driver" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-mmc-stack-driver.script" SymbianPath="$:\base\mmcsd\base-bsp-mmc-stack-driver.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\mmcsd\t_mmcsd.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+					<task name="base-bsp-mmc-psu-driver" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-mmc-psu-driver.script" SymbianPath="$:\base\mmcsd\base-bsp-mmc-psu-driver.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\mmcsd\t_mmcsd.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+					<task name="base-bsp-mmc-psubase-driver" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-mmc-psubase-driver.script" SymbianPath="$:\base\mmcsd\base-bsp-mmc-psubase-driver.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\mmcsd\t_mmcsd.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+					<task name="base-bsp-mmc-mediachange-driver" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-mmc-mediachange-driver.script" SymbianPath="$:\base\mmcsd\base-bsp-mmc-mediachange-driver.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\mmcsd\t_mmcsd.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+					<task name="base-bsp-mmc-socket-driver" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-mmc-socket-driver.script" SymbianPath="$:\base\mmcsd\base-bsp-mmc-socket-driver.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\mmcsd\t_mmcsd.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+				</task>
+			</task>
+			<task name="performance">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+			<task name="conformance" timeout="0">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+			<task name="stress">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+		</task>
+		<task name="sd">
+			<executeOnPC>
+				<build testBuild="true" URI="${sourceroot}\group\">
+					<componentName>t_mmcsd</componentName>
+				</build>
+			</executeOnPC>
+			<executeOnPC>
+				<build testBuild="true" URI="${sourceroot}\group\">
+				<componentName>d_mmcsdif</componentName>
+				</build>
+			</executeOnPC>
+			<transferToSymbian>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-sd-socket-driver.ini" SymbianPath="$:\base\mmcsd\base-bsp-sd-socket-driver.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-sd-stack-driver.ini" SymbianPath="$:\base\mmcsd\base-bsp-sd-stack-driver.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-sd-psubase-driver.ini" SymbianPath="$:\base\mmcsd\base-bsp-sd-psubase-driver.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-sd-psu-driver.ini" SymbianPath="$:\base\mmcsd\base-bsp-sd-psu-driver.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-sd-mediachange-driver.ini" SymbianPath="$:\base\mmcsd\base-bsp-sd-mediachange-driver.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-sd-mediachange-driver-manual.ini" SymbianPath="$:\base\mmcsd\base-bsp-sd-mediachange-driver-manual.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-sd-socket-driver-manual.ini" SymbianPath="$:\base\mmcsd\base-bsp-sd-socket-driver-manual.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-sd-stack-driver-manual.ini" SymbianPath="$:\base\mmcsd\base-bsp-sd-stack-driver-manual.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\t_mmc.ini" SymbianPath="$:\base\mmcsd\t_mmc.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\mmcsd\t_sd.ini" SymbianPath="$:\base\mmcsd\t_sd.ini"/>
+			</transferToSymbian>
+			<task name="validation">
+				<task name="manual">
+					<task name="base-bsp-sd-stack-driver-manual" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-sd-stack-driver-manual.script" SymbianPath="$:\base\mmcsd\base-bsp-sd-stack-driver-manual.script">
+							<testCasesList operator="exclude">
+							<testCase target="${epocroot}\epoc32\data\z\base\mmcsd\t_mmcsd.tcs"/>
+							</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+					<task name="base-bsp-sd-mediachange-driver-manual" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-sd-mediachange-driver-manual.script" SymbianPath="$:\base\mmcsd\base-bsp-sd-mediachange-driver-manual.script">
+							<testCasesList operator="exclude">
+							<testCase target="${epocroot}\epoc32\data\z\base\mmcsd\t_mmcsd.tcs"/>
+							</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+					<task name="base-bsp-sd-socket-driver-manual" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-sd-socket-driver-manual.script" SymbianPath="$:\base\mmcsd\base-bsp-sd-socket-driver-manual.script">
+							<testCasesList operator="exclude">
+							<testCase target="${epocroot}\epoc32\data\z\base\mmcsd\t_mmcsd.tcs"/>
+							</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+				</task>
+				<task name="automated">
+					<task name="base-bsp-sd-stack-driver" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-sd-stack-driver.script" SymbianPath="$:\base\mmcsd\base-bsp-sd-stack-driver.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\mmcsd\t_mmcsd.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+					<task name="base-bsp-sd-psubase-driver" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-sd-psubase-driver.script" SymbianPath="$:\base\mmcsd\base-bsp-sd-psubase-driver.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\mmcsd\t_mmcsd.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+					<task name="base-bsp-sd-psu-driver" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-sd-psu-driver.script" SymbianPath="$:\base\mmcsd\base-bsp-sd-psu-driver.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\mmcsd\t_mmcsd.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+					<task name="base-bsp-sd-mediachange-driver" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-sd-mediachange-driver.script" SymbianPath="$:\base\mmcsd\base-bsp-sd-mediachange-driver.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\mmcsd\t_mmcsd.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+					<task name="base-bsp-sd-socket-driver" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\mmcsd\base-bsp-sd-socket-driver.script" SymbianPath="$:\base\mmcsd\base-bsp-sd-socket-driver.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\mmcsd\t_mmcsd.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+				</task>
+			</task>
+			<task name="performance">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+			<task name="conformance" timeout="0">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+			<task name="stress">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+		</task>
+		<task name="usb">
+			<executeOnPC>
+				<build testBuild="true" URI="${sourceroot}\group\">
+					<componentName>t_usb</componentName>
+				</build>
+			</executeOnPC>
+            <transferToSymbian>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\usb\base-bsp-usb-validation-automated.ini" SymbianPath="$:\base\usb\base-bsp-usb-validation-automated.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\usb\t_usb_environment.ini" SymbianPath="$:\base\usb\t_usb_environment.ini"/>
+				<transfer move="false" PCPath="${epocroot}\epoc32\data\z\base\usb\t_usb.ini" SymbianPath="$:\base\usb\t_usb.ini"/>
+			</transferToSymbian>
+			<task name="validation">
+				<task name="manual">
+				</task>
+				<task name="automated">
+					<task name="base-bsp-usb-validation-automated" timeout="1000">
+						<executeOnSymbian>
+							<testExecuteScript PCPath="${epocroot}\epoc32\data\z\base\usb\base-bsp-usb-validation-automated.script" SymbianPath="$:\base\usb\base-bsp-usb-validation-automated.script">
+								<testCasesList operator="exclude">
+									<testCase target="${epocroot}\epoc32\data\z\base\usb\t_usb.tcs"/>
+								</testCasesList>
+							</testExecuteScript>
+						</executeOnSymbian>
+					</task>
+				</task>
+			</task>
+			<task name="performance">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+			<task name="conformance" timeout="0">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+			<task name="stress">
+				<task name="manual">
+				</task>
+				<task name="automated">
+				</task>
+			</task>
+		</task>
+	</task>
+</driver:driver>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/testsuites/group/autoexec.bat	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,17 @@
+@rem
+@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+start statapi.exe
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/testsuites/group/bld.inf	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,67 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+PRJ_TESTEXPORTS
+../base/base.driver		/epoc32/testdriver/salt/base.driver
+statusb.ini			/epoc32/testdriver/salt/statusb.ini
+statserial.ini			/epoc32/testdriver/salt/statserial.ini
+autoexec.bat			/epoc32/testdriver/salt/autoexec.bat
+
+//td_salt.oby			/src/cedar/generic/base/e32/rombuild/td_salt.oby
+td_salt.oby			/sf/os/kernelhwsrv/kernel/eka/rombuild/td_salt.oby
+td_salt.oby			/epoc32/rom/haitests/td_salt.oby
+
+
+#if defined(TEST_DEVICE_H4HRP)
+testdriverlitesetup.bat				../../group/testdriversetup.bat	
+testdriversetup.pl				../../group/testdriversetup.pl
+
+#endif
+
+#if defined(TEST_DEVICE_H6HRP)
+testdriverlitesetup.bat				../../group/testdriversetup.bat	
+testdriversetup.pl				../../group/testdriversetup.pl
+#endif
+
+#if defined(TEST_DEVICE_DEVLON51)
+testdriversetup.bat				../../group/testdriversetup.bat	
+testdriversetup.pl				../../group/testdriversetup.pl
+#endif
+
+#if defined(TEST_DEVICE_DEVLON52)
+testdriversetup.bat				../../group/testdriversetup.bat	
+testdriversetup.pl				../../group/testdriversetup.pl
+#endif
+
+#if defined(TEST_DEVICE_MERLIN)
+testdriversetup.bat				../../group/testdriversetup.bat	
+testdriversetup.pl				../../group/testdriversetup.pl
+#endif
+
+#if defined(TEST_DEVICE_TUBE)
+testdriversetup.bat				../../group/testdriversetup.bat	
+testdriversetup.pl				../../group/testdriversetup.pl
+#endif
+
+#if defined(TEST_DEVICE_LUMIERE)
+testdriversetup.bat				../../group/testdriversetup.bat	
+testdriversetup.pl				../../group/testdriversetup.pl
+#endif
+
+#if defined(TEST_DEVICE_TOPAZMXC)
+testdriversetup.bat				../../group/testdriversetup.bat	
+testdriversetup.pl				../../group/testdriversetup.pl
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/testsuites/group/statserial.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,6 @@
+[SectionOne]
+comport= 3
+[SectionTwo]
+transport= serial
+[SectionThree]
+logging= 0
\ No newline at end of file
Binary file haitest/bspsvs/suite/testsuites/group/statusb.ini has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/testsuites/group/td_salt.oby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#define BASE_ROM
+#include <rom\##VARIANT##\header.iby>
+
+files=
+
+#include <rom\##VARIANT##\kernel.iby>
+#include "user.iby"
+#include <rom\hal\hal.iby>
+#include <rom\f32\f32.iby>
+
+//STAT  Includes
+
+#include <rom\include\base_statlite.iby>
+
+data=\epoc32\testdriver\salt\autoexec.bat			\autoexec.bat
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/testsuites/group/testdriverlitesetup.bat	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,17 @@
+@rem
+@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+perl testdriversetup.pl --statlite=true
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/testsuites/group/testdriversetup.bat	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,17 @@
+@rem
+@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+perl testdriversetup.pl --statlite=false
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/testsuites/group/testdriversetup.pl	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,81 @@
+#
+# Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+use Getopt::Long;
+use Cwd;
+
+
+sub Usage()
+	{
+	print <<USAGE_EOF;
+Usage
+perl testdriversetup.pl --statlite=StatLite
+
+    StatLite = [true | false ]
+
+    --help                      : This help
+USAGE_EOF
+	exit( 0 )
+	}
+
+sub main()
+	{
+	my	$help='';
+	my	$statLite="";
+
+	GetOptions(
+		'statlite=s'=> \$statLite,
+		'help' 		=> \$help
+	);
+
+	if($help or (($statLite ne "true") and ($statLite ne "false")) )
+		{
+		Usage();
+		exit(0);
+		}
+
+	my $theEpocRoot=$ENV{EPOCROOT};
+	my $epoc32Location="$theEpocRoot.\\epoc32";
+
+	my $currentDirectory=cwd;
+	$currentDirectory =~ s/Group//i;
+	$currentDirectory =~ s/\//\\/g;
+
+	my $currentDrive = substr($currentDirectory,0,2);
+
+	my	$cmd="TestDriver config";
+	my	$suite="file:/$currentDrive$epoc32Location\\testdriver\\salt\\base.driver";
+	$suite =~ s.\\./.g;
+	$suite =~ s\/./\/\g;
+
+	$cmd .= " --bldclean OFF";
+	$cmd .= " --bldmake OFF";
+	$cmd .= " -e $currentDrive$theEpocRoot";
+	$cmd .= " -x $currentDrive$epoc32Location\\testdriver\\salt";
+	$cmd .= " --repos $currentDrive$epoc32Location\\testdriver\\Repository";
+	$cmd .= " -c $currentDrive$epoc32Location\\testdriver\\Results";
+	$cmd .= " -i $currentDirectory";
+	$cmd .= " -s $suite";
+	$cmd .= " --source $currentDirectory";
+	$cmd .= " --tp $currentDirectory";
+	$cmd .= " --testexec true";
+	$cmd .= " --statlite $statLite";
+	$cmd .= " --teflite true";
+	$cmd .= " --commdb overwrite";
+	system("$cmd");
+	}
+
+main();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/suite/testsuites/group/user_input.oby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,21 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+file=\epoc32\release\armv5\urel\statapi.exe				\sys\bin\statapi.exe
+file=\epoc32\release\armv5\urel\statapi.exe				\sys\bin\statauto.exe
+file=\epoc32\release\armv5\urel\iniparser.dll			\sys\bin\iniparser.dll
+data=\epoc32\testdriver\salt\statusb.ini				\system\data\stat.ini
+data=\epoc32\data\z\resource\engtools_swicertstore.dat	\resource\swicertstore.dat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/testdata/bsp/common/devlon51/t_prompt.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,3 @@
+[promptMessage]
+keyCode		=48
+delay		=20
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/testdata/bsp/common/devlon52/t_prompt.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,3 @@
+[promptMessage]
+keyCode		=48
+delay		=20
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/testdata/bsp/common/group/bld.inf	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,42 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#ifndef SALT_BASE_TESTDATA_COMMON_GROUP
+#define SALT_BASE_TESTDATA_COMMON_GROUP
+
+PRJ_TESTEXPORTS
+#if defined(TEST_DEVICE_H4HRP)
+../h4hrp/t_prompt.ini			/epoc32/data/z/base/t_prompt.ini
+#endif
+#if defined(TEST_DEVICE_H6HRP)
+../h6hrp/t_prompt.ini			/epoc32/data/z/base/t_prompt.ini
+#endif
+#if defined(TEST_DEVICE_DEVLON51)
+../devlon51/t_prompt.ini		/epoc32/data/z/base/t_prompt.ini
+#endif
+#if defined(TEST_DEVICE_DEVLON52)
+../devlon52/t_prompt.ini		/epoc32/data/z/base/t_prompt.ini
+#endif
+#if defined(TEST_DEVICE_MERLIN)
+../merlin/t_prompt.ini			/epoc32/data/z/base/t_prompt.ini
+#endif
+#if defined(TEST_DEVICE_TUBE)
+../tube/t_prompt.ini			/epoc32/data/z/base/t_prompt.ini
+#endif
+
+t_prompt.iby					/epoc32/rom/haitests/t_prompt.iby
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/testdata/bsp/common/group/t_prompt.iby	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,22 @@
+//
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#if (!defined __T_PROMPT_IBY__)
+#define __T_PROMPT_IBY__
+
+data=EPOCROOT##epoc32\data\z\base\t_prompt.ini	base\t_prompt.ini
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/testdata/bsp/common/h4hrp/t_prompt.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,3 @@
+[promptMessage]
+keyCode		=48
+delay		=20
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/testdata/bsp/common/h6hrp/t_prompt.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,3 @@
+[promptMessage]
+keyCode		=48
+delay		=20
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/testdata/bsp/common/merlin/t_prompt.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,3 @@
+[promptMessage]
+keyCode		=48
+delay		=100
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/testdata/bsp/common/tube/t_prompt.ini	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,3 @@
+[promptMessage]
+keyCode		=48
+delay		=20
Binary file haitest/bspsvs/testdata/bsp/sound/alaw8bit_mono_8khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/alaw8bit_stereo_24khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/mulaw8bit_mono_12khz_32kb.raw has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/testdata/bsp/sound/mulaw8bit_stereo_32khz_32kb.raw	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1 @@
+ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþ~}ýý||ûûyyø÷utòðnméè`^ÉÇÈÁÍƽÞЬª«ªµ±¬ª°®®­¯®àÒÎǽTdO\ScÖÌ¿¼ÛÎVhðÚ¶³¼¸ÞÑ´±°®Á½¨¦¥£º·®­±¯Å¿Á½LWfìÇÀ\vJSeícòâÓÈÂHOO\íÙ03=BÔËÇÀµ²¯­©§¯­®¬­«Ä¾À¼Íƾº¬«´°¿»ÐÉFM*,-/48+-.17:+-)*(*+,<@?EnåÅ¿ÙÍÄ¿º·ØÍľ¯­º¶ì×¼¸½¹mæ½ÔË8<@GP^FM@GMX¼¹]ÿ7:Æ¿ÐÈ>DRaTe¾»¼¹Õ˽ºÊÄ÷Û^ûgëYqLWØÍÐÉO]òÚELLW½ºaõØͶ³¾»Ã¾³°°®ÖËÊû¸ËÄäÔÏÈ»·µ²ÇÀ¼¹ÇÀnåÀ¼ZqÇÀ¿¼FMhêÝÏÁ½ÏÈ>CûÝþMXDKÕÌgì597:]ÿ;>15RaÌŹµ¯®°®®¬¯­À¼µ±²¯¹¶¾»¶³¬ª³¯¶³®¬ÇÀdî½¹®¬»·Ùͼ¹ôÛê×ßÒ/204=B03:>IQDKLVJRKTÎÇÌÅ\zÍƺ¶«©©§®­®¬®­±¯¯®¨§ª¨¬ª¦¥®¬À¼ÝÏìØ[rQ_FM376:37+,,.269<{ÞÎÇ_ûBI69*+*,37;?àÒaõ>CÚÎÁ½¶²¯­º·ª¨©§®¬®¬µ±©§¯®pã=B25-/()03Zs<@9<BIKV[voãÏÈ}ÞáÓê×^ûßѾÑÉÊü¹¾»»·®­¦¤®¬rã_÷\{;?HOHN=C7;479</3=BXl>C:>15üܧ¥ª©®¬¤¢±¯¹µ¸´Õ˺·¶²«ªŸž£¢«©®¬cñ04AHGN=BÅ¿ËÄ?FBI@HMZ@G<?\|ÇÀ¶³¾»¾º¼¹Æ¿¼¸°®º¶¸µ­¬±®·´³°¿»måþ­«§¥¬«¯­±®ÕË>D48)*+-9=WjÅ¿¿»°®¨¦ª©­«©§¬ª§¥©¨ª©¨§­«¯®ÞÐèÖ·³±®±¯¾ºñÙÓÊJS6:JSVi?E04/37;7:?FMXqãÞÐÕË°®·³º¶µ²ÏÈľ»¸®¬«©¼¹»¸²¯½¹hëWkÕËdî<?DKùÜ:=9=ÛÎ_øJS@G04-.;?KU=A[w³°©¨´°¬«¨§Êøµµ²ËÄÊÄáÒNZâÓÎÇë×¼¸¾º?E/2/2#$*,;?ÔË©¨§¥ Ÿœ¢ ¥£­¬«©©§Æ¿®­£¡·´ÆÀKS/1*,3715BI÷ÛQ_N[ãÓÁ½sâßÒ»¸¾»½ºÂ¾Yn6:(*Uf½ºm宬¨§·´°®À¼ÞнºùÜÛÎľ¼¹°®µ±Ã½oäçÖÞÑ?E/2?F6::>^ý04@G¿¼>C=B¾»µ²¦¥§¥²¯¯­±¯½º×ÌXmÊÃÊÄdñxß>C<@ÞÐkèÚÎÔËELMYAH04AHP^/26:Ä¿½ºFMJR½Wk=BgìéÖ°®£¡¬«¬ª Ÿ©§º·MX8<ùÜÙÍ=A58O\FM47:>LV[vßÑÀ¼ÇÀÀ¼Æ¿çÖÁ½ÈÁêغ·²¯³¯¬ªµ²Â½À¼zßFM7;CJ_ùUfTe,-,.7:/2DK?F>D³¯²¯¿¼§¥®¬dïÀ¼°®ÇÁÈÁ³°¼¸Á½KTGNÎÇAH8<ÙÍ¿»ÞÐUfÌŵ²®¬§¥ª¨³¯º·râBIMXO]@GJRHO<@CJCJP^yิ·´N[ôÛ¼¹ÞÐSbÌÅÌŸµ¬ªª©¯­ÔËÖÌáÒ@G_ûØͺ¶¬ª­«©§¨¦¨§§¦³°¼¹¹¶½¹»¸À¼ÉÂÙÎÚÎKTBIDKQ_»·½¹Ä¾¯®®­¿»uáèÖ¸´½¹Ã¾Á½¿»²¯ÈÁAI×ÌÇÀ×͹¶ÑÉtâÔË]|ȶ²·´­¬¬ª§¥¦¥¬««ªº¶aõR`=A8;læçÕHO>CDKÇÀ½¹HO?EÎÇÈÂDKZsµ²­«°®Ä¾Ã¾âÓBIHO69JRÑÉeíÜÏÑÉÈÁZtíغ·é×CJKTELVjìØMYÇÀ\y>DYo6:.1=BÊþ»¼¹»¸ØÍAI@GYn:=-/?EÎÇ\yþ½¹Ö̱®ÇÀO\þeí267:Td<?./?E?F:=O\GN=Ba󽺳°·´¿¼Å¿·´´°Æ¿º·µ²ïÙ½®¬¾ºµ²³¯Ìż¹½ºîÙ?F:=7;-/.037BIÖËÍÆÄ¿ÍÆDLR`UeBIUgSdhéViÏÈ®­«©ª¨§¥©§¶²³¯¬«¶²¯®³°½¹¿¼JS9=5858:=48:=KUÎÇ»¸º·Ä¾ÕËþ\|CJ½º³¯·´®¬¦¤ª©ÐÉÔ˹¶æÕBIDKBIuáLV;?áÒÓÊõÛXmfìÆÀÓÊAH;?ÎÇÀ¼ÒÊÅ¿¸µ·´ËÄÎÇELEL¯­¿¼ØÍ®­©¨©§±®»·ÊÃIPBJdïmæbñ¹¶¶³ÉÃÉÂLW7;5937-/')7;<?03ÜÏ·´µ±­«³°µ±¨¦«©Ä¾Ðɹµ¯®Å¿Á½º¶Á½ìØ:><@LW:=AHÆÀÇÀ½º¹¶¾»ÖÌúÜÈÁO]zßÁ½EL9=IQZpdïoä½¹¸µÕËÝÏ:>;?ÝÏùÜÑʽ¹®­¬«´±¾»º·­¬»¸ÎDZ¯¼¹¿¼¸´ÝÏhëLWwàLV.0697;HO8<+-TeÕËYoÏȵ²«©¯­­«¨§µ²¯­ª¨´±×ÌßÑ»¸·´Æ¿Ã¾½¹Ã¾ÌÅÖÌP^øÜïÙ:>7;,.')048;\zÏÈAGIRxßØͺ·¦¥Ÿžª¨¬ª¬«Æ¿ê×öÛÆ¿ÇÀèÖÊÃãÓþÊÃ8;58>C-/:=¿¼ÙÍæÕÇÀçÕ^ÿÎÇÕË]|MXDK>DAHDK½¹£¢ Ÿžžœ›ŸŸ Ÿ£¡½ºê×JR.0-/69>D8<TdÏȽº¶ÐÉÑÉÀ½¾»îÙHO/2()146:GN¾»À¼r㹶«©¶³¶³²¯®¬«©«©¯®¼¹ÍÆ»¸¯®·´¶³º¶ÖÌkèO]<?SbJSQ_½¹¶³¹¶[w;>bóÅ¿®­ª©°®®¬®¬¿¼ÍÆNYNZÍÆJS÷ÜÏÉIQçÖ\wVgßÒ¹¶¬ª¹µÈÁVg9=.0/1O\@GíÙ½?EBIþÝÁ½³°ª¨ª¨®­¦¤£¢­«º·ßÒ_ûDK6:åÔ¾ºÊÃÊÄÕÌÝÏ=B()(*BIQ_7:?FHOKTAH;>NZGNk踵¾»º¶´±º·¸µ¼¹«ª¡Ÿ­«¹µ·³AH(*045859Xloå]}Td48,-%&&(/2,.;>åÕÎÇÑÉÒʾºÌÅãÔÇÀ·´®­¹µ¹µ«ª¬«®­­¬¸µ³°­«oä<?IPO[ÊÃÇÀØÍÉÂlç>D2659[v>DKT¾ºlèELÖÌÈÁGN8;:>=B:>GNþ÷Ûľ¸µé×´±­¬ª¨¦¤º¶»·»¸lèWjjéÜÏEL04(*$&;>Æ¿°®¨¦¡ £¡­«¶²¹¶ÌÅÏÈØÍÎǹ¶º·¸´´±¬ªª©©§¦¥¬ªÏÈ59)+&(-/@GÎÈÅ¿ÎÇèÖDJɶ³¸µ¤£¢ ¡ ¡Ÿ¬ª¼¹Te^þaöLW¹µ­«¸µ´±¶²àÒ9<+--//2/3;><@8;9=*,!#$&04É觛šœ›ž¤£³°±¯¶³®¬¤¢£¡¥£ª©\x58@G<?MY»¸Ä¾EL37%'"#+,7:Ûδ°ª¨¤¢¥¤«©±¯¼¹ÎÇeîBI379<IPwàÀ½Á½ÛÎmæÀ¼µ²ÍÆ»¸µ²­¬¢¡¯®®­¸´GM\x?FELÅ¿ÏÈÒÊê×ùܽº¿¼Ä¾¼¹¿»ÊÃÕËR_ÔË¿¼Ûο»¸´³°´°ÏÈ:>Q^òÚ47DKßÑÓ˾¿»ÊÄnå_úlçòÚë×kèKU6903LWÅ¿­«¬«¹¶Â½¾º·´¸µ²¯·´¼¹¶²µ²¸´¾º¿¼ôÛFMkèçÕoäÌÅÞÐë×»¸ÜÏZrJR()37=B$&6:YnGO¾º°®®¬ª¨±¯´±½¹ÔËÁ½Á½Â½ÒÊíÙØÍuáQ_Wj;?ELÉÃÏȶ²²¯¿¼½º²¯³°Â½Á½×Í_û_üO\uáÒÊcï=B?DËÄôÛ@Glæ?F/369-/7;[xQ`¾»º·¿»¿»àÒ:>.0ELzÞíع¶¬ª°®µ²²¯àÒÕË®­¬ª¬ª¨¦£¡´±Ã¾Á½;>ëØ»·?F<@7;%'*,-/"$!# " ")+ÐɸµÍÆ«©¨§©§¥£Ÿžš™œ¦¥ª¨«©³°¶³º·LVDK@G(**,./+-.1+-(*)*.1DKbñľª©¥£©§®¬ª¨¡ ¥¤ŸžŸž¯­°®HO/1>C-/15Õ˱¯¯­¹¶¾ºDK*,/2,.-/<?DLÏȸ´±¯£¢¦¤¯®»·ÌƯ®¬ª¹µ¶³®¬¸µO\:>>D.0,.4759HOLVR`É´±®¬©§§¥­«µ²¸µ®­»¸Æ¿Å¿IQ:>?ENZKT:=;>IP\|Òʹ¶¿¼NZZrÌÅ:=?F·´ÜÏGNR`;>03379<MYÔË´±®­¿¼ÐÉ^ÿÝϵ±º¶­¬¤¢¯­¯­µ²áÒ¼¸³°¼¹Á½¾ºlç@GÖÌ>D<?kç265948-/7:?E=B7:48XmÕËJR»¸®¬±¯­¬¬ª§¦»¸òÚ´°¬«²¯­¬®¬Sc/248/2Uf²¯´°¶²Æ¿Õ̺¶¯­­«£¢§¥ÈÁÕËAH36nåÅ¿Íƹµ»·sáÞÑÈÁ]CJÅ¿Å¿äÔ«©±¯ÌŶ²Yn9=?E37näÍÆKT@G?E^ÿJR:=Üϱ®©¨©§©§«ª²¯½¹ÞÑľ×ÌO\YnGNúܾº®­±¯Îǹ¶¬ª®¬¯­¨¦¬ªº·°®³°¬ª£¢§¥²¯mæ/2 '))+-/04:=UeCJ<@ãÓ×ÌÆ¿®¬¦¤¢¡§¦¶³»¸º·«©¨¦³°¨§®¬Æ¿´°ÍÆJSÒÊmçHO7;-/-/.0*,+-25478<,.*,.159IPQ_¿»²¯ÇÁµ²¯®Ã¾º¶»·ÕËÉ쫪¨§¦Ÿž¨¦´°«©µ²¸µ¡ ©§ÑÉýÝ+-&(<@CJ?E04$&!,.þÞª¨ª¨ª©°®®­©§¨¦›šœ›Ÿž©¨¬«º·NZlædï48MYÀ¼yß9=*,&("$#$36<?ÜÏ©§«©Æ¿9=*,+-+-14åÕ®¬§¥žžœ›ª¨»·ËÅN[¸µ³°Îǯ­´°Â½æÕ\w½ÇÀÆ¿¾»~Þ?Egëľ¹¶¬«©§°®Q_/2*,!"!)*6:ÍÆ°®»¸ÉÂGN=BôÛê×ÒÊþ®¬§¥¬«®­©§®¬ÆÀGO+-"$;>µ±®­¨§¨¦·´Â½ÑÉåÕ²¯©§¬ª°®ÐÉGN>C7:P_ÔËGN/2(*$& "#%7:P^Q_­«¤¢ª©­«®­¶³àÒÎÇ»·ª¨£¢©¨©§£¡µ²Rayß<@47=ALWMXJSÒÊÌÅÞê×ë×`õÞÑáÓÀ¼ª©­«¼¹Ã¾HO,./2?E(*')ÓÊ×Ì¿»©§³¯²¯¨¦¸µåÕ¶³»¸ÈÁ¶³´±¯­°®»·µ±½ºScTe>D>Ch뽺¬ªÞÐþÞ¿¼nåkè¾»®¬äÔMWåÕ3769]}BI=B:=JR¯­ª¨´±º·¿¼ZrØͯ®¾»»·»¸mæßÑFM:>P^ÍÆÀ¼Â¾±¯¬«§¥¨§°®ïÚ/358:=Ûί­°®´°°®ª¨«©º¶ÍÆWj?E7;/2&( "59.0EM«©±¯¬«À¼¾º¬«ZsDKäÔ¾»±¯©§ª¨­¬¨¦©§±¯P]=A58+-FMsáÏÇÈÁHO,. !+-47;>´±º·Ùͺ¶¾ºäÔUfÉÂþ>D9<læçÕ7;>C¸´´±±¯º¶ZoR`69.0IP¯®žœ›œ›§¦Ã¾íÙ47/1/3?FÀ½»¸¬ª¦¥¬ªª¨¯®º¶AH-/#%"$*,ËÄ×ÍKU|ßCJ(**,,.¿»™˜™˜˜—š™­«ÖÌàÒÒʹ¶º·«ªœšš˜—ª¨ELAH$&$%&(/269-/1537&($&-/8<48<@üÜÍƳ°¦¤£¢«ª¤£Ÿž¯­Ã¾]ÿ:>;?0414âÓ­«­¬«©©¨­«½ºEL69=BÑÉÕ˱¯£¢¨¦§¥`÷&("$+-öÛÎÇ»·¨¦®¬¸µ®­¤¢¬ª¯®©§¸µª¨ž¦¤¢ §¥¾»¿»[s8;:>,.+-LVGN-/ "(*:=)*,.CJ½ºäÔÎǪ©¤¢Ÿžœ–•––š™£¡¤¢°®Wj¿»ËÄçÕº·¶³;?%'!&(=Ch뱯žžœ¦¥£¡˜—Ÿžª©››œ›¶²Á½µ²¼¸GN')269<03ELIPGNViGNª¨˜—¢¡«ª*,+-ª¨læÆ¿«©¸µ Ÿ¶²%'§¥®¬,.)+ìد®Ã¾>C.1BJ>CCJ37*,£¡¶²"$%&26ª©º·*+48²¯Ÿž­¬¾»P^>Dµ²]|IPÚε²’’–•¯­Ä¾YnRa×ͳ¯|Þ.0ľÌÆ%'%'+-*,Yo»¸¼¹¶³³¯¨§£¡Ÿž Ÿ´±¿¼O]N[ÎÇ.0+-:>37BIVh<@.0+-.0/3.0=A¹µ Ÿ—–“’›š›š­«<@ 7;XmhêâÓõÛ03(),.Sb­«°®§¦ Ÿ¦¤›š˜—ŽŽœ¢¡JR$&*,&(-/YnYnMYdî$%'))+!#)+¸µ›š´±ž”“›ššš‘˜—˜—˜—©§DK#%)+®¬?G.0KU=A15 %'IPÇÀ¾»¤¢™˜§¥¾º·´£¡šš˜——–•”Ž’’¤£±®¼¹dï)*)*7;?E/3%'-/ÛÏ^ý+-%' "*,,.#%ľ¯®Íƪ¨²¯Ä¾¼¸¾º²¯¥£œ¨¦ñÚ×̼¸«ªžžœ›žžž¹¶*,:=|ß-/59CK,.$%"$%'*,:=48CJ¿¼9=(**,*,LVª©¦¤¬ª§¥ ŸŸžš™œ¶³´±¨§´°]|N[æÕFM15>DO\ÑÉÀ¼P^ÎǸµVi8<36-.47ÍÆ·´®¬ Ÿœœ™˜¹µ&(47ÌÅØÍ7;5869,.6:ÊÃÊÃMYäÔ°®¾»r⽺ìØN[°®­«º·´±¸µ¸µÖÌöÛúÜ=AfíÀ¼¹¶ÐÉ*+#%$&69¬«Ÿž™˜•”¡Ÿ¯­JS,-/2^ÿÌÅîÙåÕ¿¼­«°®^þBIVh=A-..0CJéÖ´±­¬ÏÈ7;EM¸´·´¶²¿¼¾»Ÿž•”•”›š¤¢¹¶dï7:(**,47KT×ÍKU58CJ58%'&(48ãÓ©¨›šššœžŸŸ¤¢¼¹´±©¨º·£¢˜—›šŸŸ¯®¹¶½º368<_÷ØͽºDK/348$&$&)*04ÈÂÿÞ*,7:P^o䪨ª¨Æ¿¯®©¨²¯º¶¶³­¬¾º°®Ÿž¦¤¨¦­¬×Ì:=*,03âÓ¨§£¢¬ª¯®?F(*LV®¬¢ §¥¯­Ä¾ÎÇÁ½¯­ª¨¢ ž­«ÕË>C(*)+=AÀ¼®­¸µ·³¯­Æ¿[wJT>D7:6:HOÓÊ\|9=AHDKÊꩶ²¶²®¬tá,.-/MXþ¬ª¦¤µ±Ä¾ÇÀËÄÈÁÍÆTe0348<?37AHzß¾º¯­²¯Á½ïÚØÍàÒÉ·³·´­«¬ª­«­¬ÉÂôÛHN36?EkçÙÍÕËoä_ûãÓNZ8;.0/2DKÉ«©¦¥ª¨§¥¨¦¶³ÚÎÈÁ¾ºÍƼ¸¯­ÌÅUgdî6:=AËÄO\nåÀ¼<?69LW?E;>@G_û¼¹Æ¿BIÚΰ®Ã¾Ðɼ¹ÍÆÏÈÑÉÓʺ·¼¸âÓP^69/3BIHO?E36/3IQ¿¼³°®¬µ²jéFMoãO]FMÈÁÚÎ×̹¶æÕwà×ÌËĸ´®¬±¯°®¹¶ÛÎ×ÌAHLWmæIQÛϸµ¥¤œ›ŸŸ¶²hëHO<@P^Ä¿¶³¹µÅ¿DK)+36/3)*<AìØÅ¿äÔÏÈÆÀ3737;??EÕËÒʵ²¬ª¸µÆ¿áÒÇÀ¸µ½º¾ºØÍ>D?EÌŸ´À¼Úμ¹¶³¯­¨¦¡Ÿœ©¨®¬¯­³¯·´»·¹¶ÎÇûÝKTIP4814KU¿»ª¨¶²`ùáÓ36&(:>ôÚP^VhÏÈO\Tdxิ©§¤¢¡ ª©®­»¸ÏȾ»_üJSJSMXÇÀ¿¼¯­±¯À¼¶²¯®ª¨¶³?F58*,#%&()*;>ÜÏľÁ½À¼¯®¶²MYLV_÷:>Q_¼¹Á½Ô˽»·¿»fíÆ¿«©²¯ª¨Ÿž«©¹¶ÊÃMXGN<@6:9=-/.05936ÍÆ¥£¤¢º¶¾»»¸HO]|âÓGNgìµ²žž­«¸µAH+-69Ëĵ²¿¼ÐÉCJ69Q_O]58LVSbcòÆ¿ÈÁÀ¼²¯­«µ²Â½º¶¶³íؾ»ª©°®¨¦ž¦¤¯­O\9=Xl6:À¼«ª^ÿMY^ü.1')58O\JS/3"$(*04(*')=AÒÊľ²¯¯­·³·³ËŶ³ª¨¯­¦¤œª¨¶³®¬¶³çÖÊÿ¼<?=AAH*,-/./')m寭¬ª¹¶²¯ÖÌ`ø±¯¾»ßÒµ±±¯Ã¾¼¹¬ª´°ÐÉþ¹¶¸µâÓóÚ¸µ½¹LV/29<^]{»·¨¦¤¢¦¤¯­°®¯­µ±íÙ;?/2/2?F7;369=9<:>O]ËÄÖÌâÓÖÌ;?+,9=<@.0ÖÌŸž˜—™™›šœ›£¢©§¶³VhNYQ_FL;?GNSa`øDK25=ACJ7:+-6:Þ]25)++-;>¼¹®¬©¨¦¤¬ªÃ¾kçXlËĪ©©§±®¯­¹¶ÎǸµ®¬Å¿Q_Å¿¿¼AH7:IQ59,.9<1526ɸµ´±´±¸´Á½¿»¾»DK<@.1LV¯®¸µ®¬°®ìÙFM47>DÁ½ÈÁÍÇÉÂfìľ±¯¬ª Ÿª¨¶²²¯XlUeÊÃcïÉ·³´±¿»âÓËÄÊÃ|ßFMQ^½»·®­°®äÔ@G+-36ÔË­¬¢ ª¨¸µµ²ÐÉ=BDKDK-/'(<@8<.0SbÍÆ»·¶²¶²©¨£¡¤£¦¤¬ª»·Á½µ±¯­®¬©¨±¯ÝÏ`øScHO/3)+479<159=gìÚÎFM37MY¿¼®¬ž Ÿ¯­×Ì37(*$&/3ÇÁ¯­­«º·ÚÎ;?.0<@MXº·ª©­«²¯¿¼¿¼ÍÆèÖ»¸·´ÊÃÊÄ×ÌMXLWELbñÒÊËÄ°®ª¨µ²¿»ÏÈDKÚÎmæ:>ÉÂþ¼¸§¥´±wàTc8;(*')N[¶³¶³¸´ËÄØÍñÚíÙµ±±®ÏÈLV\xWkõÛÇÀÀ¼¾º´°´±À¼½º·´¶²±¯¥£ Ÿ£¡œ›šª©râ26 ,.Uf¸´º¶;>14.0'(,.;><@BIuáÓÊXlJQ=A:=\{MXuṶ½º¹¶±¯®¬§¥±®ÇÀ¿¼×ÌLW69()*,?FÈÁ³°«ªŸžŸž ŸŸž¤£¾»;>=AScÌÅèÖJS?F2515-//2HNæÕÅ¿³¯­¬·´áÓ?F48)*#%+,14GN¨¦£¡¬«®¬ÊÃvàÈÁ´±¶³¿¼ÙÍKTKTüÜ¿¼¶³¬ª¦¤¬ªÀ¼O]15(*/2Sbþ­«¥¤ Ÿ¢ ÎÇFM:>*+()59hê<@-/26>CR`àÒÍÆ×ÍUhÆÀ´±²¯´±ãÔÁ½ÌÅDKÓÊ¿¼º·±¯¬«­«­«®¬ÇÀJR,.%'37;>áÓ©§¯­·³ÍÆ=ABI=A58Uf¹¶¾º­«§¥±¯®¬½ºïÙľÛÎELJSkèÇÁ½åÕ>B=BÜÏöÛeî}ÞXm:=59ÍÆ«©ª¨®¬¯®¾»ÙÍ°®ª¨žš™¡Ÿª©ÇÁ×̼¸²¯º¶ÎÇ\x,.#$/2AH47,.%'"#(*.058>DÙͲ¯©¨¥¤¥£¡Ÿ¤¢¯®±¯¼¹ÞÐÌÆ´±ª©©§¥£¥¤ª¨¹¶JRKT37 *,/1"#-.HOWj¾»®¬°®¨¦£¡Ÿž¡Ÿ²¯»¸¬ª§¥§¥®­À¼ÌÆpãÀ¼ÎÇNZR_<?/1&(,.7;*,7:¸µ¿»À¼À¼MXÅ¿¬ªœŽ””¡Ÿº·-."#)+Å¿Á½ÍÆÆ¿>D+- ".1Rb¶³­«½¹ÎÈ´±ž•”–•š™¢¡­¬«©¢ Ÿž¬«ÉÃ?F367;=AHO15(*)*,-)+*,8<37-/(*,.¾»­«›š——£¡«©¡ ˜——–›š¥£º·¿¼À½µ±¸µaó;?6:GNLW<?/3')*,;?@GO\KU;?IQ¿¼­««©­¬¼¸¿¼¿¼9=;?]~@GELCJ5937ELn彺­¬¸´À¼´°»·Æ¿Æ¿Å¿»·¼¹»¸º¶¿¼ÜÏJRóÛÏÈtâYnBIBJÎǾ»Ã¾½¹º¶»¸Å¿Xl/2$&$&+-Üϱ®À¼»¸ËÄ8;,.#%$%/3N[´±¡ŸŸŸ¬«·³ÑÉïÚ´±­«¨§§¥ª¨¯®º¶ÇÁMXCICJDKHOR`580459+-*,-/:=nåÒÊÅ¿À¼Ã¾¿»ËÄ¿»¥£š™–•—–œ›¬ªÍÆUg_úÕËÜÏ?E48/1&(%')*&'%'/2DKÙÍÈÁÍÆéÖMXöÛ¹µÀ¼ÓÊÁ½Å¿¿¼­¬¯­©¨Ÿž§¥«ª°®hëKTFM>DLWEL@GNYGN9=6:58.0)+$&#%58CJJR·³«©¦¥©§½ºÂ½ÇÀ¼¸µ±¶³°®»¸¼¸Ä¾òÚÖÌIQGNcñzßãÓÆ¿¿»eîÌŲ¯³°¬ª¯­Â¾æÕæÕ×ÌäÔËÄÆ¿íÙP^xà×ÌåÕcòR_NZCJ14>CäÕLVlæèÖ_ûÒÊæÔâÓÿÝMXÙ;»»¸´±¯­»·gìLWÝϺ¶®¬§¥¥¤¨¦¥£¤¢Ÿž Ÿ°®±¯¼¹YoP^[wÑɾ»µ²½ºMX7:')"$&("$(*$&03»¸¡Ÿ˜———Ÿž¨¦§¥±®º·«©¨§©§ª¨µ²½º¾ºIQHO¼¸¼¹ÎÇHN,. ();>ÛϾº±¯ª¨¬ª Ÿœ› Ÿ¤¢¨§²¯¸µ®¬¯®À¼¾»¹µ¾»¼¹¼¹|ß9=:>8<IQlæMY[wDKEL\{>D59=A=A\xľ_ú;>:=59@Gµ²£¡œ›–•˜—£¢½ºKU<?>DäÔ¬«¡ ¨§¼¹MW,.%'$&-.IQîÙÚÎúÜ[t?F>D×̽¹»·°®«©ª©ª¨­«¾»¼¹³¯°®¨¦©¨­«³°N\48BH\w³°¨¦«©¯­CJ&(!#$&*,/2?EQ_áÒÌÅTd>CSbHOþݶ³±¯±¯Ä¾÷ÜÌÅÈÁ½¼¸Â½ÇÁïÚ=B47699<Scµ²­¬¸µÈÁßÑê×ïÚåÔFM-//2.0*+*,)*(*37O\Ûί­¥¤¡ Ÿž¦¥«©±¯Å¿ÑÉÓËÇÁÅ¿táJRtàiêN[[uqãJRdîÛÏWiîÙƿľþ¶²·³¼¹°®©§¦¥ª¨ÏÉ588;7:=BÑÊLW/26:?E9=BI}ÞLW37488<j豯ª¨§¥©¨­«¦¥žžš™””–•£¢¹µÖÌXmcðVj69/1+,#%$&"# !"*,7;?FYoBJFMP^;?37%'%'À¼ž•”ŽŽ‘šš¦¤¬«­«³°¼¹¾º·´³°Â½øÜ15#%03/3?EXlDKJSAH26;>ôÚ´±¨§Ÿž›š Ÿ®¬ÒÊ<@8;47.0;?ÕËÏÈÑÉLW9<8<CKÅ¿Å¿À¼¹¶Â½¹¶³°¿¼Ã¾ÈÁ®­£¢¤¢ŸŸŸž¦¥¯­ÇÀnæQ^8;-/)++-./2537%& !$&eï³°«©ž¦¤²¯µ²ÎÇÞÐÑɺ¶®¬¥¤ž¡ ©§·³ÔË¿»±¯»·æÕSb;>:>KU>D:>BIP^ÏÈľÇÀÍÆÞÐØÍUfHO\xYnêÖÔËÒʼ¸¼¹»¸¾»Íƺ¶°®®¬§¦­«µ²¼¸:=%''(/3476:IPFM;?9<,.%'+-6:Wjµ±¬ªª¨¢ ¥¤«ª§¦¨§¯­¯­¯®®¬«ª¼¸ÊÃÇÀÓÊÓÊØÍ\zCJ9<58:>7:25;?7;48P]oäzßmæ=B.0,.:=BI¼¹œ›˜—š™žª¨ÊÄELTcgìÐÉÇÀ×ÌXl>CIQ=B9<>DUgÀ½Å¿ßÑ]xßÖ̺¶«©¥£¨¦­¬½ºuáaôdï`÷HPIQÙÎÍÆÎÇïÙ58-/,.,.>CQ^ViáÓÓÊÌÅÏÈ}Þ·´¨§ª¨¦¤¥£¤¢¨¦ÚÎ8;/2%&48ñÚ½§¦¨¦µ±Ã¾nåÞнº¼¸²¯¨¦ Ÿ£¡´°ûÜ14(*'))+=AELLVpäæÕÒÊÕÌÍÆÚÎèÖÑÉäÔ_ûÜÏÈÁËÄÈÂÀ¼µ²¨¦ŸžŸž²¯8<"$14À¼®­§¥ª©Â½ýÝ@G26DK[ujèÁ½ÌÅBIJRKUN[ÌÅÔË[tiéäÔþ°®º¶ØÍÕËZq_úÉÂÊý¹µ¸µ±¯º·ÈÁÑÉELHOcñßÑ^þEL<@;>æÕÇÁrâ;?%' !*+l纶±®¯®µ²±®¬«­«­«»¸KTê׿¼¬ªŸž¦¤ª©³¯ÒÊFM8<BI@G>C8</19=ßÑþ¼¹¬ª­¬¼¹\zIOhëÎÈÇÁ_úFLøÜþÇÀ»¸¿¼»¸¬ª¢ ™˜˜—œ§¥öÜ15?EiêýÝľÇÀÎÇþHO<?IP<@14-.147:.0+-=A_øO][uÆ¿¶²°®¯®»¸Â½¾º¸´«©¤¢£¡§¦µ±½¹ÇÀíØÉÂÎÇ?F8<:>*,$&&(&(48f쯮§¥©¨¦¥®¬ËÄÍƾ»ÉÂÊú¶²¯¶²¸µÇÁ×ÌÙÍmåïÙþÝYnGN7:-.)+*+59Vhµ²œš™Ÿž­¬O].1-/59Úκ¶¾»Ä¾½º¼¹ØÍÿÝCJ,-./GNÝϹ¶¸µìØZtHOié­¬š™‘‘‘•”¡ ûÜ47)+)*CJÎÇìØMYDK>DBI>C69.159;?RaÆ¿ÈÁÖÌ<@&("$7:³°œ’‘‘™˜ Ÿ­«Ä¾¼¸²¯³°®­µ±°®¯­æÕ@G-//1ìØÈÂÇÀÆ¿^ÿ36,.258;?FÛ鵩§¨¦¯®½º`÷?E5815./+,042636JRDL7:<@ÈÁ¬ªª©¨¦«©±¯°®³°±®¶³¾»¯®«©²¯±¯«©°®Ä¾_øLV<@)+ %',.&("$!#(*8;ÞЭ¬¦¤¥¤¥£ª¨´°Æ¿ÇÀ·´Á½Á½¯®³°²¯­¬·´½º]-//3Ñɬª£¡¦¤²¯×Ì]}\|näíÙâÓøÛP^MXJR588<^ýBIMY¹¶²¯µ±À¼ËÄÀ½ÎÇÊ§¢ œ›œŸž®¬Td+-)+ELxß?F,.%')**,*,Ðɳ¯¿»¶³¯­º·^üûÜÆ¿¾»¯®«©©§¥¤ª¨¹µíÙ<@+-)+7;CJ\yÇÀÑÉO]8;8;?FIQÞк·¾º47!"!d難ŸŸž¥£º¶âÓ^üIQ×̼¸½¹º·¶³Á½É¶³¾ºËÄÁ½½º®­¬ª¼¸ÛÏãÔÖ̾»«ª¥£¨¦´±CJ>C?E15?F8;+-/2036:ELELN[WkÈÁº¶¹¶¯®µ±³°°®½º¿»ÞÑTeãÓöÛIQpâ´±¼¸¹¶¯­º¶­««©«©©§²¯¯­®­²¯°®»·À¼ÕË?E9=Zrº¶¹µÁ½ÇÀO]>D/2)+-/-/7;R`Úμ¸¶³©§¥£­¬º¶]~8;158;CJNZ¿»³°¹µ´°¯­±¯º¶¿»½ºÅ¿ÔËåÕæÕÑÉÓËÇÀ²¯°®¼¸ÏÈFM:=-/&(/369=BÜÏAH<@[xViÓËÌż¹¶³·´°®¯­ª¨ª©«ª­¬º¶ÈÂÌÄÈÁ¶³«ª²¯ÙÍvàùÜ\{]~DKLV>D&((*6:ÝÏ®¬§¦£¡¥£°®ÉÃZqNZ[uÏÈ·³½ºÏÈþ´°°®¸´ÊÃdïLW<?LVÍƽ´±³¯¶³¸´º·ÑÉÞÑÇÀqãTeDK;?P^^ýuááÒgëN[R`ÜÏÇÀ°®Ÿžœœœ™™š™¦¥Vi,-&(./FMÖÌÇÀøÛ>C')!*,.0MYÌÅ×̸µ®¬¹¶·´·´¸´ª©­«®¬§¥¨¦¬ª°®³°¯®¿»hë\}MYIQ69%'!##$+-díþ¹¶º·15*,-/26±¯¤¢œ—–œ§¦¸´é×HO8<8;AHGOBI:>03.004=AÙÍÈÁeîO\ê×Îǵ²¢ ™˜”“š™«©ÙÎ7;,.*,,.9=ïÙÏÈþ·´ìØ04 "37Þз³ª©§¦ª©§¦œ˜˜•”’‘™™¯­íØ03#%&(156:=A8;$% #%$&7;LVßÑJT47-/0437GN¹µ¥¤š™”“•”šš¨§ÍÆGNSbµ±«©³°¿¼¾»Â½LV]}hì5825=BNYHOKTÙÍÓÊýÝûݺ·¬ª©§¦¤¯­N[&("#+->DÏÈhë9<04)+25ÛϾ»´±«©ª¨«ª®­¸µÃ¾ÙÍÑɶ³²¯®¬§¥¬«·³¸´½ºÌÆÕËòÚeí{ßEL7;488;58-//17;JRÁ½ª¨¦¤²¯¾º¹µ¸µ´±­¬¢ ž¢¡ª©½ºRa*,)+Q_ËÄËÄ?F+-')(*8;É©¨¡Ÿ§¦©§§¥²¯±®ª¨ª¨¦¥¨¦±¯À¼ÒÊÛÎÜÏçÖBIKU¼¹ÌÅèÖÍÆ<?6:JS589=Å¿±®£¡›šž­¬\w() $&-/>DÊü¹ÊÃ_øçÖÇÀÏÈÀ¼¶³±®°®»¸¾º¼¸ÌÆÜÏÏɸ´¬«¯­¶³ÍÆaôFM?F[twàÎÇÎÇåÔrâ15-.@GDKWkzßLWScBI/2+-)+')8<½¹§¥žœ›Ÿž¬ª¶³¾»é×aökèÒÊÊÄßÑÙÍ×ÌnåIP>EAGFMøÜê×JREL?FGNľ«©¢ ž¥£KS!#"$7;MXÅ¿ÇÀê×ÎÇßÒAH>DKT]|ÆÀ±®®¬¯®¶³ïÚ\xÞÐôÛ·´±¯Êÿ¼MW.0-/&'47½¹®­ª¨§¥ª©³°¾»Æ¿¹¶­«®­­¬®­Ã¾áÒÍÇ»¸µ²¼¸Æ¿ÓÊaöÝϵ²¾»8<#$*,`ö¶³º¶Ä¾Å¿æÕÝϽ¹µ²­¬«©ª¨¸´lçÒÊ~ÞÍƤ¢œœ›žž«©²¯º·ÎÇåÔxß:>')%'')+-266958:>FMFM=AHOÝÐïÚàÒ¼¹Ä¾ÎǼ¹´±©§¢¡¤¢¢¡¤£²¯¾»¿¼wà\yÚÎËĵ²®¬²¯Æ¿aôÔËIP,.%'*+?E®¬žŸž§¦øÜ!!69®­›šš™Ÿž¬«ÎÇkèkèO\¾º±¯Ã¾¸µ´°ÇÀUfCJ`÷ÓʾºÀ½áÓáÒ>C04GNãÓÀ¼°®¬ªª¨­«½ºáÒÐɽº©§œ›˜—”“™™´±37 ,.GNÙ͹µÊÃKUlæGN/2/1-/04ãÓ·´º¶­«­«À¼¸´º·ÎÇ´°«©ª¨®­¿»¾ºËÄËž»Å¿¸µÆ¿KTBI8;,.*,>D·´¯®Æ¿DK/3-/7;sá»·­«ª¨©§¯­º·Ä¾iêO\O\bñÝÏSbP^Æ¿ÏÈLWvááÒ|ßoãWjIQ487;ê×¼¸ª©œ›•”––¦¤ØÍ58#%#$-/KTÇÀº·ÎÇ<?*,!.0º·¨§¨¦§¦¢¡¥¤¤¢žœœž§¦¹¶ËÄ×ÌçÕvàÙÎÚÎËŽCJ4826(*')')04~Þľ¶²´±ÔË<@04%'!#<?¸µ Ÿš™ Ÿ¯­ßÑN[îÙ½º¹¶®¬®¬°®µ²ÉÂßÑHOLVeí=AHOÛÎ_ù?GLW¿¼¸µÏÈïÙÐÉùÜNZâÓJS8<LVãÓ¼¹´±Å¿EL25(*,.pãÈÁÓ˼¹«©©§Ä¿`õsâO[ZqâÓ¿»·³¼¸·´µ²À¼ÊÃÉÂÚÎjçMXEL14(*-/-.'),.=B½º¨§ª¨®­¹µº¶ª¨ŸŸššœ›¬ªKT')!#)+<?[wÅ¿¿¼yßQ_6:&()+-//2Vi¯­ž››§¥¬«²¯ÈÁ·´²¯³¯±¯ÉÂMW8<.0;>WkÑʾ»ÇÀËÄàÒé×ë×oåÿÞÒÊ·³©§¥¤¤¢¤¢©§­¬³¯¾ºÃ¾ÍÆMX26()!$%)+-/GNÉÂÐÉËľ»yßGN`øɯ­«©¬ª§¥§¥¬ª¯®®¬±¯îÙRa]~EK<@<@BIJR:>/1-/-/.0MXÎÇfíUg@G/2%&#%8<¼¸¤¢™˜š™¤£®¬±®¶³´±´°º¶½ºèÖ_ûZsLW?F48=BeîåÔnåîÙýÝfì^ünäµ²¡ ššœ›¢ ­«ÍÆýÝhì?F58489=ßÑ¿¼ÈÂÈÁYn[xÛÎlçÑÉ»¸·´¯­­¬¼¹XlkèÛÎ;?:=<?04?EËÄ®­¢¡Ÿž¥£¬«À¼½º­«µ±µ²®­¯­«ª¥¤£¢­«ÊÃXlDK?EÍÆ®¬½º/2,.CJYn@G?E]ÿÌŽº®­¦¤¤¢¤¢ª©º¶ÇÁïÙÍÆ­¬¡Ÿ•”˜—§¥ÉÂ15! *,[v¾»Ã¾@G#%!"$')14GNiêÌÅþBI"$%'Vi¦¤—–“’–•›š«ªËÄnåKTIQàÒÏÈJR.1')+-9<?FGNIQ^aõ/3+-7;óÛª¨ Ÿ¡Ÿ¢ ¨§´±¿»Å¿ÛÏýÝKT03,.26AH_ûâÓÀ¼ÍÆXlãÔÊÄËÄé×RaòÚÎÇÇÀ´±´±©¨¡Ÿ¨§¬«±¯¾º»¸¾»LW37.1,-.0JRÎÇ¿¼»¸ÈÁ¾º´±¯­¯­¯­±¯º·ÉÃòÛ=A-/+-)+/3=A8<<?FMAH>C9<DKáÓÁ½°®¬«·³¿¼½¹¹¶µ²°®­«¯®¹¶ÉÃMY?EMXIPBINZEL8</1)+14?FHO}ÞLV*,(*?EËÄ«ª¡ ¢ §¦¯­¶³µ²¹µ½¹º·º·¾»àÒQ_WjoãCJ265926-/26@GXlSc^ÿÆ¿¶³©¨¢ ¦¤»·WkCJ69<?IQ:>8</2$&%'.0<?×̱¯±®Å¿ÏÈÇÀ¹¶¦¤™˜‘Ž˜˜§¥Â½>C-..07;48/2-/&(!#!#$*+.09=bóÙÍÖÌ|ßüÝÉ»¸­«¨¦¤¢ŸŸŸž Ÿ«©½ºFM37Zr½¹«©¡Ÿ¡ ¬«ÒÊ;>*+/1HOÿÝÈÁ¾ºÓÊ59(*.0FMÀ¼¬ª§¥¢ §¥¬ª·³WjMX½®­¡ œ©§îÙ15)*()/3MXÍƽº¾»ÑÉXl?F:>HOðÚÌÆ°®©§¯®¼¹ÇÀľ¿¼êØsâÅ¿¿»ÊÃÏÈàÒN[?E47./04BI¹¶§¦§¥©¨±¯ÑÉÍƹ¶ª¨¡Ÿ«ª¼¸Q_*,! "/3h뿼²¯®¬¶³Vh04+-+-04?EËÄ°®©§¤£«©´°º·½º³°¨¦ª©º¶µ²¶³ÎÇuâdïLV?EEMNZELCJ<?6:37./58w๶«©£¢¨§½ºîÙUfÇÀ¦¤š™–•œ›¸µ04!# "./îÙ½¹¼¹¼¹ÜÏ59+-.1;?GNçÕ¹µº·ÕÌËÄÉÂÉ®¬§¥§¥«©²¯½¹ÙÍKT]~ľ¿¼¿¼ÉÂøÜHO59/2/2,.'(&(*,,.25R`ØÍ´°¦¤ª¨ª¨ª¨¯­³¯·³²¯³¯´±¶³¾»ÉÃÇÀÌÅ^ýXlIQEL?E:>?E@GNZÌÅ»¸²¯±¯·´½¹\w698<7;8;dî~ÞHOtá×ÌÝøÜsáMYKVñÚÎÇÒÊÍÆÍÆÌÅÝÏ>C36:=IQÿݼ¹ª©¥£¦¥«©´°º·¿¼Â½¼¸·´«ª«ª¿¼ÒÊÖÌÍÆþdî<@:=,-*+;?FMNZLWNZmåDK=ADK:=Uf³°¯­¯­®¬¸µ×ÌkèuáeîÔ˯®¦¥§¦©¨«©®¬¸µ»¸º·ÊÃê×JRLW½º®­¬«­«çÕ.0 "#%;?cñ[tYnSbN\Ñɯ­¥£¢¡¥¤§¥¡Ÿ›š—–•”š™¯­?F-/')$&(*,.+-.16:>CFM7:/38<KU^üÈÁ®­­¬ª©¢ ¥¤¬ª®­¹µ¿¼Æ¿ìØYoEL;>9<37+-*,48P^¼¸«ªª¨²¯¿»»¸µ±±¯­«¬ª¯®³¯³°²¯ª©¨¦©¨«©²¯Æ¿LV36.0/236<@XlÍƹ¶´±¼¸¾»ËÄ_øØͱ¯¨¦¨§«©¯­zß59GNãÓ÷ÛËÄÏÈSb<?:=JRGOELJS=ADKÞÐqâåÔ¾»ÈÁ¾º´±¸´¼¸¹¶´°º·ÌÅòÚÏÈÅ¿Ëĵ²®­¼¸¿¼có14157:DKÑÉþÎÈEM14<@eí¼¹©¨¯­º·ÎÇN[fìN[WjFM9<[uùÜmæØÍØÌÍƽ¹µ²°®¾ºÌÆ»¸·³­«¨¦¥££¡¬«ÖÌ8<(*%'$%&',-%& &(37zßÆ¿®¬ ŸŸžœ›˜—˜—™˜˜———œ›¨¦¹µÎÇ]}TekçãÓvà?E15*,%' $&.0/2BI½¹®¬¬ª«©«©®¬¶²¾»ÍÆmåP^XlöÛgìbòâÓO\N[Á½¿»Â½²¯µ±ØÍnåñÚÜÏ×ÌæÕäÔlçO[ViÕ˽ÍÇÜÏþſcî@G6:-/9<À½¦¤š™™˜¢ ÉÂ-. (*>Cyßvà?F<@AH<@FMÒÊÅ¿ÊÃ×ÌËÄþÎǾº¯®®¬­¬©¨«ª¾»Ä¾¹¶ÞÐCJ8<*,%'-/P^À¼­«¥¤¥£¬ªÂ½päSc?F?DO^P^=A4759Te´°¨¦£¡¥£µ±xßIP7:-/6:{ß³¯¢¡ž Ÿ©§¼¸ÏÈÏÈN[FMjèÛÎÇÀÊÃeíELFMÕËÀ¼À¼¹¶¿¼ËÄ·³°®¹¶×Ìl罶³»¸Â½nåGN^üÈÁ®¬¤£¤¢µ±nå8<')')+-48ɹµ¼¸³¯¾º×ÍçÕ_øRb]~ÎǾºÈÂÓÊúÜO]Ra^ûYo_úËŵ±µ±Ã¾ÉÂÑÉzßTfÖÌÌÅO\BI=C=B9=1504-//2;>JRÒÉ­«¤¢§¦©§ª¨ª©§¥«©°®º·ØÍùÜìØíÙÌĸ´¹¶À¼ÎÈP^LUBI8;<?BI>CELº¶ŸŸ›šœ›¡ ¹µ69)*,.6:ïÚ½ºÆÀåÕ]}HNCJiêÓÊÕ˽º»¸Â½¾º¾ºÑÉHO:>bó­«Ÿžœ››šŸž¸´HO37,.048<=BîÙ¶²¦¥¦¤¯®ÝÏ.0%',.CJ¿¼¯­¶³À¼Á½À¼ÙÍeîÇÀ¬«©§®¬±¯Ä¾AH.0%& " "%'48âÓ«©¥£ª¨¯­²¯±¯®¬¬ª¨§¦¤«©§¦œœ˜—˜—¡Ÿ¹µ?E ".1NZ¿¼¬ªª¨­¬¨§žš™š™œ¥¤ Ÿ›šŸž°®nå37.0=AHO:>5937587:14')#%+-Xl°®§¦§¥¯­½¹¾»ÍÇO\FMÜϱ¯ª©ª©²¯ÍÆDK-//236-.:=Õ˯­¤££¡¦¤¯­¿»Æ¿Á½ÉÂrânåÔËÍÆËÄÉÂÁ½ÊÃÚÎäÔrâAH049<?EAHoãÛÎÉ÷´³¯±¯´°ÉÂLWLW¾º¨§¢ §¦¾»<A.1.19=aõÓÊÇÀÍÆnåFM37./260348LVkçâÓ¹¶¬ª©§ª¨­¬¬ª¬ªµ²ÈÁñÚ?G=AHOYqÌÅÌÅÏÉaô8<./')%&#%!!#*,FM½¹§¦ž›šœ£¡¤£¤£¥£¤¢¥£©§±¯»¸ÊÃ[tQ_CJ<@CJ>D=A=C8<7:?EßѽºÎÇxàQ_?EUfþ¼¸ÌÅHO(*&(69ɨ¦¢ ¡Ÿ Ÿ¦¥¬ªª©¦¤¦¥¨¦¤¢œœ­«ÒÊMY597:HO=A.1*,%&!$&+--/AHÜÏeíQ^zßÅ¿®­§¥¦¤¦¤®¬¾ºÁ½ÒÊLU/2+-9=ÛΫ©Ÿž¥£¯®îÙ8;.1-/:=w߸µ©§¨§®¬½º{ÞiéQ_HOTeèÖ¼¸±¯¹¶Â½ÜÏÒÊ­«§¥§¥ª¨¾ºHO/2')%'(*<@ÌÅÁ½³°ª¨¼¹>DAHÖÌ»¸®­¨§«©µ²¼¹ËÄuâcðÒÊ´±­«­¬¯­¾»GN9<7;/2*,./ùÜ®¬¢ ž¥£Å¿7:+-)++-8;EKMXäÔ¸µ¯­·´¸´¸µ¿»º·¶³¾»P^9<9<36;>ɨ¦ž£¡ª¨´°×ÌmåÒÊÌÅöÛ\{må~ÞTdGNBIAHÞѹ¶®¬®­Â¾]?E:><@Xm\xAH`õ³¯¦¤ŸŸŸŸ±¯?E+,&(')37gëÊÃÀ¼¿¼ÓÊåÔZqWjÀ¼±¯®¬®¬¶²ÊÃlèBIELÖÌ·´´±´±«©£¢¢ §¥®¬×Í)++-N[½¾»ÐÉ|ßÞÑÖÌÚÎËÄÊÃþÐÉGN7:.1-.;>¸´Ÿž›šš™›š¡ µ²Zs58-..0?EDK@G>D58367:aõ¹¶´±¾º^þ14'( " "*,/1DL·´¥¤Ÿžœ›ž¬«¾»¿¼´±¥¤£¡®¬ÊÃ>E14@GËÄ®­¢ ž¤¢¾º8<"$&(37NZ¹¶¿¼P^?F15*,+-<@½¹«©¤¢§¥¿¼O^9=EL·³§¦¢¡žž¤¢«ª¸µÒÊÈÁ³¯®­»·MX+-%'$&')-/15<?HOîÙÌÅäÔZqeîÝÏÀ¼¬ª£¢¢ ¦¥­¬¬«¬ª»¸fî7:)+ " "/3Óʯ®«©¬«¾»jéçÖÇÁµ±¯­¿¼ÌÆÎÈÒÊÆ¿¿»¸µº·½¹²¯°®¹¶ÍÆMX:=.1'((*69?DgìÜÏïÚþľ]}:=*,#%&':>¿»«©ŸŸ¢ ¬«±®¯­²¯»¸Å¿ÝÏþ±¯­¬­¬­¬·´·´µ±¹¶´±°®¬ª¢¡›šŸž°®ÚÎ/1!!()8;LWCJ8;2526693648@GIPgìÁ½º·¼¹º·±®®¬ª¨Ÿžš™š™žž®¬ÓÊLV?Eqä±®§¥¤¢§¦®¬¸µÂ½¿¼ÊÃXm36-/9=7:/2.0./AHÁ½®­±¯Xl<@8<.1-/8<EL<??EÖ̵²ª©©¨°®­¬¬ª©§ª©®­¯­º¶ÌÅ^ÿP^P]UeoäBI,.'(+-^ý·´´±´°æÕAHDKN\fìIQ04;?ËIJ¯¤¢£¡¨¦¹¶JSÏȱ®º¶¾»Å¿P^;>8;<?Ô˯­­¬±®âÓ690425LWåÕÿÞ×Ì^ÿ;>26)+)+=BÀ¼Ÿž”“‘——¥¤¼¹ìØMY_ûÀ¼¯®«ª­¬«ª°®N[/3()#$&'-/6:8<<?7:AG¿»¨¦¡Ÿ¤£²¯þÞ?F:==BJRP^BIFMľ®­¨¦ª¨¿¼47(*04HP¹µ¨¦£¡¦¤®¬¶³²¯¬«ª¨«ª¼¸áÒP^ëØ`ö>C<@,.#%!#%'$%"$$&%'ScÅ¿±®¶³eí=A58c𧥚™•••”–•™™¡Ÿ¦¤¥£®­ÒÊ9<-/15/20315%' %'-/w஬¦¥­«Á½CJ/2KUɲ¯¦¤§¥¸´æÕ;>*,(*+-:=DKëؾ»ÙÍHO*,!#/2ÎÇ£¡”“‘™˜«ªBI/2.16:¾º®¬¥£¤£®¬©¨©§«ª¾»>D14)+ "%&+-+-+-48âÓ¶²¬ª¬ª«ªÏÈ4847.18<læÓÊÔËYn;>/137ÇÀ­«Ÿž™˜œ¡ ¬ª¾»<@')&(26þ¥¤Ÿž¢ «©¾»DK=BP^çÕ­«¢ §¥Á½MY26'(/2jè°®«©èÖ>C7:*+)+(*().1361503<?-/-/¹¶¦¥›š“’’‘––¢¡À¼]~þ®¬£¢š™™˜œœž¬«=B'( "*,36/2%'(*,.15çÕ±¯¾»±®¦¤ª©ª¨¬ªª¨¢  Ÿ§¥¨¦¬ª½º×Í[rÌů®ª©¬«®¬ÉÂ9<'(#$59?ENZ¹¶±®®­­¬´±½¹^ý03,.*+.1\x½¹¥¤œŸžª¨qã1525157;O]ÐÉëØÙκ·{ß=B48#%!##$$%@G¬ªœ›™˜——›š®­JRkèËÄÇÀ¶³¹¶¯®«©®¬­«»·ÜÏÙÍ^ýMX8<*,()$&!"!#03/2&(26:>.0,-,."$#%:=îÙ¨¦›šœœœœ¦¥ª¨¥£Ÿž™˜›šœ›™™Ÿž¯­Q_&(')7;<?./%'(*,.9=HOHO=B+-*,/2O\¸µ±¯¬ªŸžš™Ÿž«©·´Æ¿ÞÐËĵ²©¨­«Á½¹¶Td%'-/26-/4726ELXm}Þ´±¹¶ØÍsáTdÔ˽¹º·®¬©§¥£ª¨°®¿¼)+>C½º®­«©º·¾»»¸áÓçÕ>C.1.0./<?Øͨ¦žŸŸžž­«¾»¾º^û2615,."#+--/(*Tf¼¸Ã¾«©¨§»¸¸µÊÄÉ¤§¦®¬¹µSbnæðÚÜϪ¨«©µ±»¸AG7:>C48.1:>ÍǨ¦˜—“’””žæÕ%'!#.0^¼¹¶³¶³½¹»¸¾ºûÝÊÃÍÇHO>DAH25-.=BEKäÔ®¬©¨¨¦¯­¶²Ä¾HO3704r⯭©§¡ Ÿž¸´LV?E2548^ý¿¼¯­­«·´¼¹GM:=ELVi±¯§¥Ÿž¥£¸µBI%'"$"$-/8<;?9=04)+(*@GöÛÈÁ¬ª­«¼¹±®±¯³°«©¬ª«©¯­½º±®­««©¬ª¬«¯®»¸·³ÈÁAH,-  (*.1:=Sc8<48^þN[ÙÍçÖHOÝÏTcØͯ­±¯¯®°®Æ¿µ±œ›Ÿž£¢¯®ÝÏYmLVhêÕÌP^BIHN¸µ£¡ž¦¤ÉÂEK/3/2ãÔÈÂçÖÏÈ<@-/9<+-&(.07;P^º·°®Å¿zßIP7:?Eþ«©¦¤ª©«©¸µµ±µ²»¸­«©§¦¥¬«º¶\{03')"$&(AH®¬žŸžª©ÏÈUg>D59îÙßÑbòÅ¿¶²º¶¸µ®¬Ã¾Yn9=!# "$%#%-/8;YnØÍöÛËĬª›š™˜š™¥¤àÒÈÁÍÇJRÐɵ±µ²°®¹¶¼¹¯­¼¹¸µ¯­Á½ÓË7:(*#%'),.;>ÖÌËĽ¹«©¹µ¹µ¿¼v༹qã26=AÐɺ¶·´¸´¹µ¿»:=&(,.6:pã·´ª¨ª¨¯­«ª¬«¯®ÆÀ¿¼¶³º·­¬©§°®ÏÉ48+-&'!##%.06:/2)+&(IQÀ¼´±»¸Æ¿­«¦¤¦¤¦¤¨§œœ—–šš§¥?E)+$&&(_÷²¯¨¦ª¨ÐÉP^DKÍÆÊÃÎÈ­«´±ÎÇCJ*,+-./+-?EiéMY596:qâJSHOúܲ¯¦¤§¥¨§¿¼iêÑÉ·´¨§Ÿžšš›š¦¥¯­³¯¿»cð[wº¶°® Ÿž¨¦©§áÓ+-#%!#/2.0+,+-()25ÆÀ¨¦Ÿžœ›¥¤ßÑÞÐé×CJUg_÷´±§¥¥£¤¢¬ªqã8<698;ÇÀ©§¦¥ª¨µ±ìØ/28;ÚÎVh»¸¬ª³¯¾»æÕ<@/2)+#%.0<?@GÑÉÆ¿nå=@8<8;,.'),.37ãÔ«©©§Ÿž›š¦¤¦¤¡Ÿ²¯¯®µ±Ô˹¶¶²¸µ½º¸µ¸´ÊÃÙÍÉÁ¹¶qãHO?EAHÊÄñÙaô×Ì59=BGN>D½¹»··´°®ª¨±¯¼¹¡ «©¿¼Á½`öaô¼¹½º¼¹¯­°®ÎÇTdľ¾»®¬¨¦ÍÆ?EMZ9=AH[tåÕ½º¾»±®¬ªº¶²¯°®·³³¯¹µ¸µ¸µÓÊELDJ589<?F/103Ug}ÞWjóÚþݽº³°±¯´±O]=BZo\zÊø´³°«©§¦´±Å¿ÛÏ:=36UfAH9=7;#$'(LWKT_øÝÏaóR`ÚΫ©§¥ Ÿš™˜—›š¨¦¾»>C.104-/,.:=;?NZJR8<IQjè<@BIÝÏâÓÊÃTe@Gyß¿¼Ã¾ÕËØÍQ^ËÄ·´´±«©ž–•’’–•¢ ¹¶:>#$"$36<@=BÉÃþEL;?AH/347}ÞÌžºÅ¿ÆÀ¹¶ÉÂCJJSAH./8<N[æÕ¸´ª©¬«®¬­«®¬§¥¢ «©³°¯®Á½=AYn±®ê×O\læ*+!##%&(8<âÓ¿¼¹µ¿¼?F,.,.:>]~ãÓ®­§¦®¬»¸ÇÁ¼¹¶³ÊÃO\ÚÎÆ¿Ue-/*,.0-/8<>CZtÍÇHO@H±®¦¥¦¤¥¤³°Å¿Â½¿¼ìØÝÏ·³¾»KT;?CJFMUfRa/3 !-/?E»¸ª¨®¬¯­­«¥£˜˜•”¡ ­««©Â½Æ¿³°¯®±®ÖËãÓþËÅLV(* ?E¾»¾º¹¶µ²ÎÇWi¹µ¯­ª©¢¡¥£¬ªÚθµ›š•”—–›š ŸÁ½/358*,(*:>69EMCJ3715.0471515GN?Feþº·®­ª©«©©§¤¢¢ §¥®­¯­º·kç;>.0.1<@ëØ=B=B<?&(%'15¾º¢ œ£¡ÉÂ8;CJ6914çÕÈÁÎDZ¯¬ª«ª­¬º¶óÚ<?Sb³°¨¦©§©§£¢¨§¿»Ðɵ²±¯ãÓ8<-/-/,.-.;?LVEL47,.+-*,:=Üϸ´­«ž™˜œ›šŸž¦¥¢ ¬«¬ª¢¡³°UgCJ?E`õåÕ[w_ùFM48EMKT-/-/7:CJ]ÿ`öľ¼¸éÖÏÈØÍ48FMÀ¼¸´¨¦£¡¨¦¶²[vN[N[sâ»·ÖÌYn¿¼æÕDKMXDK[umæ8;0403/18;gìÀ¼·³¯­¬«½º15&'')"$%'<?µ²§¥¬ª«ª½ºûÝgìÈÁ³°·´±¯³°¾»ÖÌHO:=+-Sc·³ÓÊ·³·³gìDKJSIQDKEL6:69=A;>GNTeo亷¯­¯­©§¦¤¬ª©¨±®ÎǾ»­¬ Ÿœ›žž½ºCJ36)+36ÞÐÈÁ¼¸³°Á½ÊÃÖÌlçJSFMYpÈÁ¾ºÏÈÇÀÀ¼kçHO¿¼¿»ßÑÇÀóÚP^N[ZpßѾ¯­¨¦£¡«©Å¿bð@H?F487;ïÙ»¸¿»ÜÏmæFM2526:>SbÕËFMJS<?598<%'$&JRj鮬 Ÿ²¯«ª£¡±¯°®¨§ÎÇAHMX14ELÐÉELLWüÜ6:.0;?59?FïÙHOAHHO:>NZ½ºÅ¿ÇÀ¿¼ÎÈÑÊàÒËÄÈÁÍÆáÓÖÌ¿»¼¸ÏÈÊÃÅ¿KThë\}öÛ¸µViVh¼¹Â½¿»ÐÉ;?HO»¸ÎǸµ¬«Ä¾´°ÇÀ8<DKìØ`öGNÿݼ¹¹µÀ¼Ã¾´±¸µê×½ſâÓ·³¶²«ª¤¢ª¨£¢£¡²¯ÓÊBI3614ELéÖUgõÛÎÇäÔÐÉÑÉÌÅ·´º·mæeí8<-/qã¾»´°§¥§¦¦¥ž©¨¨¦¤¢´±¯®Â½Vg×ÌËÄåÔMY9=.0+-/3-/48Q_ÎǸ´¸´ÉÂ@G7;48<AÏȬªœ›––™™¡ ¤£¤£¥£¦¤«©ª¨´±:=,.37<?Q^IPN[bô8;69JSGN;><@69.16:=BJR¿»¬ªª©´°±¯°®¾º»·Â½ÏȺ·¼¹½ºÃ¾æÕLWÊï­¥£Ÿž§¦¹¶þÝ*,-/8;04wà|Þ7;Vh>D.0<?Vg`õ?EO\O]=BGNP_õÛÇÁ¹µ¬ª¬«¬ª©¨¼¸½º»¸¾º¼¹¹µÇÀNZDK?F;>9<:>;?;>589=`øë×aóO\7:48?FÏÈÍÆ»·´±O]IQ½±¯¬ª¦¥ª¨®¬®­¹µ¾»¿»¾»¾»¹µ­«»·ÜÏøÛ.0&(?EaöLXDKbñÊÃÈÁľâÓh켸«ª·³Ìŵ±°®ÈÁ¿¼¯®´±¾»[xO\O\JSìØCJ>C×̵²¦¥§¦·´LV)+(*>CGNbñ¸´¸´½¹¼¹ÈÁüÜlæcïÌÅɽº¯­À¼ØÍÑÉDKR`fìMZ¼¹ÓÊNZÁ½àÒ?FÜÏ]ÿÕËÖÌ59+-$&"$')/1]ÿµ²¸µ²¯·´ÜÏÀ¼¹¶¾ºº¶Ã¾Ýϵ±ª¨­«¯­«ª®¬ÕË6:-/37@G~ÞÔ˶²­¬ÊÃqãÔËMX[uÀ¼\{=AñÚÒÉÇÀ¿»À¼¾ºÇÀÎÇ»·»¸ÍÆVhàÒ¿¼_ûxßúÜO[üÝɼ¹¶²®­ª©±®®¬©§°®±¯´±¨§ª¨¶³¦¤®¬ÙÍÈÁÏÈÍƽº¾»Å¿ßÑ<A48:=HOiêP^`õýÝCJ`ôàÒYo¿¼¹µÏÈÅ¿¯­®¬»¸µ±­«ÎÇÐɽºÞл·º·Ëž»ÉÃScLVáÓEKCJØÍ|Þl绸¹¶ÐÉ×ÍéÖAH36*,)+698<>DÛÎØÍLWDKÁ½±¯¼¹ÎÇVh<@25NZÅ¿±¯©§µ²²¯¯­É¿¼¹¶æÕæÕþÝYoÕÌ?F6:BIIQNZN[YnDKÕÌÀ¼fí¾ºÀ¼ÍƯ­®¬¹¶ÈÁÙÍGN8<Q_[wZqÙÍ^þdñUfBIFM?En忼µ²©¨«©­«©§º·Ô˵²¯­¬ª¶²ÛÏÆ¿`÷táSbFMÀ½ÛÏ]~ÚÎ×ÍÙÎÎÇÎÈßÑÎÈÝÏçÖÅ¿váNZ¾º¿¼qâÊø´¸µÔËËļ¸ÓÊ×ÌöÛLW½ºÀ¼÷Û¹¶ìØHPèÖqãWjYn¶³³¯¼¹¶³¿¼[tMXeîkèÒÊ\yBIÚÎäÔBI?FHO>C-/;?ÎÇ¿¼±¯µ²·´®¬ÐÉP^¬ª¦¤°®¹µIP9<IQ:=BHÒÊæÖXlïÚCJ-/,.-/58@GHOkè>D8;7;59ïÙ²¯¤¢¢ ¤¢¤¢¨¦§¦®¬¼¹ËÄÈÂÈÂùÜ^þëØLW69ELÖÌľÜÏÞÐÊÄHO.0&((*=BXmÜÏÁ½qãÖÌÒÊSbcðO\ÏÈÒÊÏÈ´±ÈÁMX<@@GÏÉľ¶³¥¤­«²¯¬«ÈÀcï\{kçîÙMXãÔÍÆÔ˼¹ËÄkèäÔIPòÚÈÁGNMX^ü<?9==BHNÎǽº¼¸º¶¹µ¹µ½ºÆ¿ËĽÇÀèÖçÖ;?&(%'/2èÖ¸µ­«¥£°®ÉÂÛÎæÕÎÈÒʹµ°®¾º¯­©¨²¯¶²ÌÅßÑÍÆÒÊsâBIZpXmGNO]Ïȶ³Â½ëØÔËÅ¿¿¼¿»Á½¯®·´ÙÍ°®·´oåÎƶ³»·´°¬ª¯­­«§¥¨¦¨¦¬ª¿¼ÊÃ7;&(-/69aô¹¶´±¾»^þ<?eîxß9=Êþ»É°®Á½Ã¾¹µÅ¿º¶ÊÃhêþÇÀÈÁÖÌÐÉ¿¼íÙæÕËÄæÕãÔsáíØyßQ_¿¼ÌÅMXKU8;JS:>,.9=36Sb¾»Á½ª©¯­Á½²¯Â½ÌÅÉÂeî\wÌÅſ¾ÉÂñÚ[uLVVicðÊÃÆ¿]{59.125/1q㱯¬«¤£­«¹¶¹µÆ¿»¸®¬²¯µ²«©§¥³¯º·¾»ÒʾºÈÁÍƺ·¾»ÊÃÓÊ×Ìê×ÈÁɾºµ²¿»ÒÊÝÐQ_KS½º·½ºÂ½×̽º½ºë×ÎÇ¿¼½¹¸µ±¯¬ª«©¹¶Ä¿´°äÔ?FÍÆKT>CÑÉöÛO^SbO\IQgìÏÈIQÇÀ¯­ÒÊÓÊÝÏELiékè^ÿ¸µ¶²ÍÆÍÆÏȶ³«©¸´ËÄ×ÍDK151515.0488;-/-/)+&(1569JS»¸º¶ÈÂľÎÈÑÉþ¾»Á½Â½¸µÅ¿ÒÊÑÊYnÓËÛÏ;?ÜÏÇÀíÙÑÉ\{Êü¹HOZtÑÉO]áÓ];>KT?F/126MXhëGNXnÎÇmæÖÌÔËYnÇÀľ½²¯¸µ¿»¸´ÇÀÛε±´±¿¼¿¼ÞÐIQ]~ê×åÔçÕkçgì|ÞÏÈÈÁ»·±¯¿¼ÇÀÊÄÞÑÉÂa÷iêÖÌCJIQCJ;>NZO\ScÑÉ·´¶²¹µ±¯·³¹¶·´¹¶²¯¯­´°ÕËkèÖÌÒÊ[uDL^û¾»¼¹Êõ±«ªµ²¼¹¸´µ²¬ªª©¬«±¯º·Å¿;>-/.0594826Q_íÙ=BkèÜÏBIÀ¼¿»Õ˺¶·³·³¹¶ÖÌÙÍÍÆÏÈþ·³²¯³°ÈÁ?E./-/36îÙ¼¹Ã¾ª¨¥£ÈÁYo½¾½º½ºÊ󰯮±®¼¹´±°®cðHO14,.DK7:*,59-.+-15.1@FÊÃÆ¿ÎÈ´±¯®¹µ¿¼¾»°®´°Å¿Ã¾Å¿cïéÖçÖæÕ½³°¯­×Ì\{P^8<037;YoMXËÄÀ¼ÇÀ³°»¸³¯½ºAHÚÎàÒ6:25<@^ûeîHO8<WjTe?Eë×ë×}ÞîØóÚÆ¿¸´¯­¯­·³¶³ª©­«râôÛkè9<]þÇÀ¶³©§¬«ÌÅKTKUFM47CIÊÃÎǹ¶®¬µ²¯®®¬´±´±¼¹»¸ª©­¬Úο¼¸µÜÏFM26<@JS7;<?dîÍÆ»¸ÈÁ¼¹®¬º¶º¶ÈÂûÜÈÁÏÉãÓÇÀÁ½À¼ÉÂóÛÊÃÊÃTeHOELÝϳ¯¬«£¡©§¸´ÓÊ69-.26MYZpßÑÀ¼ÑÉÌÅÔËJRNYÜÏ×ÌDK9=P^gìèÖjéR`ľ¯®¹µoãľ¾»ÕËÜÏÑÊ¿¼¿¼]{?EO\pãèÖéÖº·»¸ÔËäÔÓËÇÀûÜScoã[uDKAHGNCJGNôÛÅ¿ÊÃlçÍÆÔËBI×ÌÁ½[tÅ¿À¼n侺¿¼^ÿë×læGNHO/3)+7:Td¼¸ª©«©«©®¬·³­«®¬±¯©§­¬µ²­«¬«Â¾½º«ª«ªº¶JS;>58,./27;;?<@697;GNHOO^×Ì^üÑɳ¯¾º¿¼±¯®¬±¯±®®­ÇÀ½º±¯¼¸±¯¸´»¸¶²ÙÍhëÞÑjèCJ@G>CAHWjWil潶³­«®¬ÇÀ¿»ÊÃ@GfìÐÉåÔ¼¹Ä¾ÏÈÊÃùÜüÝGN7:8<1536/2<?ÌÅß鵫©ÎÇ@GÁ½¸µZsÌž»Êö²½¹Ä¾Å¿ÜÏÖÌÉÂþÙÎ]þLWUh^úO]KTQ`læSb>D?FkçGN>E×ÍñÙàÑľnäTemåÁ½ÑÉO]¼¹³¯º¶·´¯®²¯ÉÂÅ¿ÊÃIQ:>JSÊÃþéÖÈÁÀ¼ÕËÜÎGNP^ûÝQ`×ÌÈÁľ¾»Òʵ²±¯Ä¾¶³¼¸¹¶µ²ÉÂÑɽ»¸¶²»¸ÙÍ¿¼À¼hêUfþÝ»··´Æ¿çÕKTGN;>,.=AåÔÜÏ·³²¯¿¼¹µ´°µ±®­¸´À¼²¯ÉÂO\]ÿkæËÄJRFMUgELÚÎuàJSÚÎQ_UgľÉÂÍÆþ·³³°¯®´°ÍÅ¿¼±¯´±¯­³°¹¶¿¼YnGNaóScBI@GJSJS9=AHKUHOÏȼ¹½º¹¶¸´Ã¾ÈÁ±®¼¸µ²©§µ²®­©§Ä¾Ìů®ÏÈELLX<@9=HOHNGNÙÎÌÅTe`öþèÖVi¿¼Ä¾ûÜR`ËŶ¿¼Â½ÎÇÅ¿¼¹ÌŽ½¹sâÅ¿ÊÃÈÁµ±éÖmæ×ÌæÕ\yUeØÍ\|LWúÜIQFMòÚ~ÞóÚÎÇÇÀUh[xÉÂÌÅ¿»¾ºÚÎÝÏ¿»ãÓJSÏÈlæViÏÈìØÒÊÐÉKUQ_râBI?E]~jèAH7;?FmåÊí«¦¤®¬§¦«©ÎǸ´®­¿¼Òʽ¹¼¹ÎÇÓʽ½¹ÐÉíØÖÌ9=/2EM58047;:>FMUfÞÐÞÐhëÎÇľľ½¹º¶±®»·×̳¯¬ª¬ª¦¤«ª°®¹¶táR`dïãÓViCJ@G;>369=:>=BÞÐÕËÅ¿ßÑKTÁ½´±¶²§¥ª¨ÏÈ[t.0)+AHøÛɹ¶ÍÆDK=C?E59<?_úÚÎQ_íØËÄELàÒÙÍlçÚÎCJ;>>C@HRaÉÃÀ¼ÍƼ¹À½Ä¾¾ºR`GNcñYoäÔÞÐXlHORaûÜËÄÙÍFLDKDK=BZtÙÍ`÷}ÞsâUfçÕóÚøÛÉÂÑɵ²¯­´±­¬½¹Õ˺·´°Ã¾¾»¹µº·¹µ¼¸¼¸ÓÊ]zßÒ\xELæÕdïľ¤£ Ÿ£¢¯­ÌÅê×îÙ_úÞп»¹µ¹µÀ¼Á½Â½ÊÃÎÇkèÍƽºøÜhëÈÁÈÁÈÁľÏȽº¸µÉ¾º¼¹¹µ¶³½¹­«­«½º¶³»¸¿¼µ±ÈÁäÔÉÂÑÉÙÍËÄÛÎíÙ¸´ÏÉ;>HOHP]~KTN[Íƹ¶´±ÞÐZsAH6::=HOÍÆ»·«ª§¥²¯³°²¯¿»¿¼ÍÆÍÆÏÈXm{ßõÛ]ÿùÜåÔFMCJDK36DKHOCJſþÎÇÌÅÚμ¸ãÔLW»¸¾»¾»µ±·´¹¶º¶¿¼bôíØFN048</225kèHOQ_ÉÂGOçÕpä48^ÿÐÉ[u¿¼¯­¹¶·³­¬³¯·³Ã¾WkÎÈÇÀTd\yÞÐVg_úwß;?6:<?BI>D>BúÜÙÍÙÍľþƿ½º½¹ÇÀ¶²»·Æ¿»¸ÍÆÏÇßÑR`DK7;<@9<.1=B`÷O]ÝÏÔËÛÎÝľÁ½âÓ»·¹¶¶³­«·´·´¬«¸´ÍÆ¿¼¾»ë×lçèÖJR?EÚÎÙÎ69èÖ¾EMzßÑÉËÄßÑÚÎþàÒÀ¼´°³°²¯Ã¾±¯­«ÎÇÈÁ¸´ËÄÓÊ»¸¼¹ÑÊSakçÌÅ×ÌR`?FöÛ¾»ÈÁÏÈÑÉÜÏÅ¿¼¸áÒCKÙÍþèÖvàÌÅ·´¼¹»·Ä¾Ô˽¹ÉÂÞÐHOäÔÀ½ELØÍ»·ÝÏÏÈÚÎoäCJR`ÇÀHN>DnåîÙvábô^ýLWO\CJDKàÒùÜUfiêÎȼ¹pâ?EÜÏÔËMY<?XlrâDKÔËÈÁÕËÁ½¿»ÍÆýÝËļ¹éÖ[xtá<@FMMX6:GNmåELÛξºÎÇmåôÛ¼¸ÏÈWkóÛQ_MXKUÍƳ°¬ª¥££¢¦¥±¯½º¾»Ã¾ýÝBIkçP^N[mæ9=TdÇÀP^aô×Ìlæ[xN[FNIQë×½¹»··³²¯¯­®¬¼¹¿¼¹µº·¾ºÆ¿Á½ÒÊôÛÅ¿äÔ]}Á½¿»ÝÏÚθ´·³¿»æÕ?FTdJSLWIQvá½¹¿¼´±À¼ÓË»·ÐÉæÕÊÄÌÆÆ¿ÜÏÅ¿°®¯­¥£¢ ¯®oå=A<?+-)+@GO\lçÔËðÚSa>DBIMYqãþÝÙÎľQ_JRgëJRËï®®¬­«µ²º¶³°¼¸Ö̹µ¬«¶³»·Ä¾ÓÊÙÍ@GFMÎÇÏȽº½ºÑÉÈÁXl?F6926MY_ûíØÞÐÌÅÒÊ[s¼¹¹¶ÝÏÛÎÌÆ¿»¬ª®¬¾º°®·´º·µ²Ã¾¸´±¯·´¿»îÙÏÈɼ¸«©¼¹Ra>D.0-/,.8;ÇÁ­¬¬ª¹¶²¯±¯ÜÏÌÆľº·°®¯­®­½ºÁ½Å¿½¹°®»¸¿¼´±ÙÍN[Wj-//2÷Û[uIPQ_ÚÎÀ¼;?48Ëļ¸·³¶²¯®¬«´±½ºµ²¾ºÄ¾½ºÔËÒÊ×ÌÇÀſľÊÃHO:>>D@GMZXmgìÓÊ[uLWQ_ùܼ¹ËÄÞÐÅ¿ÖÌZsgìTeØ;ãÔÛÎþÚÎVhåÔÎÇɾºÃ¾ÑÊÎÇ×ÍJS9=JRiêØÍìØCJ<@]|ÝÏ^üXlFMíÙÅ¿nädîîÙÎǼ¸Â½ÓÊÏÈÉÂÌÅBIHOlçGNP^MYJSAHlç¼¹Êÿ¼¹¶ÇÀäÓ^ýÖÌÇÀÖÌÙÍ»¸º¶ÊÃÚÎ^ýjéN[HOÕËÑÊgënæN[GNë×NZKUùÜ]ÿÕËÊÃbñXkMXîÙ»¸éÖæÕÏÈÌÆ»·ßÑåÔ½º¼¹ÎÇÒʾºÎǽºÀ¼CJÕËÌÅVilæZsÔËÔËÕËÅ¿ë×{ßÜÏXlÝÏüÜELÞÐaöVg×ÌoãÍƺ·ÎÇÚÎÍÆÚÎkçÅ¿º·râ¾»µ²ÌŶ³¼¹~Þ½¹¶ËÄóÚÏȼ¸·´ÉÂMY·³¯®úÜÉÂËÄòÚ×ÌXlÏȾºàÒÝÏÇÀ¿»ÊÄÜÏÝϽºº·ÈÁ½ºÅ¿º·Á½äÔÁ½ÙÍçÕËÅÊÃÀ¼¿»¾º¾»ÝÏÏÈÉÂfíê×Á½éÖùÜľ½ºØÍÌÅ°®ÌÅÙÍÓËbôËÄTdÜÏ»·]~Êÿ¼<?ê×ÝÐHOúÜßÒÇÀnåÏɾ»»·ÉÂàÒ¶³»¸ÎǾ»Ã¾àÒÇÀÅ¿ÖÌØÍÑÊçÖ_ûScFMELßÑHO=BØÍ^þGNZoèÖKUBIÝÏÏÈÌÅ®¬­«³°­«³°º¶¾»pãÛζ³ÔËÝÏÍÆQ_èÕdïLVeîXm^þnäFMKTÁ½ÊÄê×ÉÂÊÃÀ½¸´¸µ¸µ½¹ÎÇÉ»·Ã¾¾º­«½ºÝϾ»ÎÇÛÎScMYÛÎõÛtáÊį­ûÝ?FÎÇ8<7;~ÞDKßÒ¼¹kèâÓ¿¼ïÚåÔ½¹ÜÏ`õÇÀÎÇÎÇľÒÊîØ»·®¬·³·³Á½=B04,.+-<?MYFMCJAH58(*,..0/1GNËļ¹Ä¾ÑÉþòÚYo¹¶ÊÃÓÊ°®´±ÑÉÈÁÌÅÇÀ¼¸LVyß½MXXl\z<@DLâÒViO\ÍÆÈÁÎǽºíØ@HiêÌÅÈÁ½½¹ÑÉÝÏxßDKIPKVELËÄ¿»¾º½ºÀ¼»¸VhäÔØÌCK¼¸ª©¬ª¥¤¦¥¯­Æ¿O]Úο¼måÌŹµjèùÜtàLVEL<?R`þÝÓÊ»·»·¹µ¿»¹¶²¯¼¸ª¨¥¤Æ¿¼¹­«½¹¿¼º¶¹¶±®¶²ÏÈÊÃÑÉR`KU=A9<P^KVÜϼ¹ÏÈËÄjçQ`×ÌÈÁÍÆÇ¿¹µ°®¾ºÀ¼»·Ã¾ÈÁÊÄÈÁ´°±¯Ã¾¾»ÇÀÍÆíØ7;BIoã=AøÛº¶Ä¾éÖyßÓÊmæLWkçZtJSÛÎ÷ÛgìÀ¼Á½Á½ÎÇäÔº¶·´ÙÍÁ½½º¼¸¿¼íØËÄËÄÜÏÔËÝÏ@G?FDK:=Vi]~÷ÛWjQ_ÍÆ|ÞÝÏÉÂſľæÕþ®¬¹µÍÆÅ¿¾ºÁ½ÓÊùÜN\ÇÀ·´ÍÆýÝ[wGN:=IPGNDLÙÍçÖO]ØÍËÄóÛÜϼ¹¾ºæÕÄ¿ÊÃ[vÈÁ´±¾º¶³¯­Å¿àÒÛÎÎÈÑÉ^üiê[xO]ÕË×ÌWlØÍľ|ÞØÍÀ¼ÍÆÍÆÍÆÛÎľÍÆéÖÈÁ¿¼Á½¾º¹¶¼¹Â½ïÙm乶¼¹YnÌÅ»¸âÓ|ÞÇÀ¼¸ËÄþ¹µÆ¿ÛÎÒʼ¹äÔZs½ºÉÂÜÏÁ½½ºÌÅľº·¾ºÀ¼¾ºÃ¾¿¼µ±¼¸Æ¿»·Æ¿»¸ÇÀê×¾»Æ¿ÇÀľËÄÍÆë×KUeîWlWk^ú^ùáÒJSJSÚÎÊÃËÄÀ¼¼¹¿¼ÉÂlæ×ÌÍÇàÒãÓîÙîÙÒʽ¿»ÖÌN\íØèÖcïéÖAHELïÙ9=CKùÜDKQ_ZqïÚÉÂËÄÒÊO]åÔÍÆYnßÑUgWlÍƾ»Ã¾ñÚÖÌÕË×ÍËÅÏÈÉ¿»Zq@GViYoEL?FíØľÝÏMX\{ÍÆÏÈÑɹµ¼¹ÐÉäÔÜÏÐÉbñR`àÒÈÁ¸´¯­¯­µ²èÖ^üEL36ELvßP^ÏÈþHOMYFM=AÝÏÕËÎǽº¾»Æ¿Å¿ÒÊhëfírâæÕ¸µ³°ÊÃWj_÷ÌÆP^ïÙÆ¿bðÐÉÇÀdîàÒÁ½{ßÖ̵±¼¹Â½ÇÀÌÅÌÅîÙÚÎë×GNæÕrâ`ôØÍTfnäJR>DjèeíCJoãÌÅÎÇÔËÔËìØELÔË·³½¹º·À¼º¶®­¿»º¶À¼;?25/1.0:>MXÁ½±¯¶²·³º¶ÓÊîØuàIQk糯¶³ÌŸ´¸µ»¸½ºûÜðÚÅ¿ÍÆåÔMZFM?F?E:>26eíÚÎJSÎÇÊÃ^û¼¹°®¸µµ²´±´°³°¶³¸µ·³³°±®°®®¬º¶ËÃľFM<@;?;?ZsLViéÏÈÅ¿¾»ÎǶ³®¬¶²«ª¬ªÉÂYoÿÝÎÆÍÆTeîØÕËoãÔËUgMXâÓbðFNqãÌÅÐɽ¾ºÂ½°®¨¦¥¤ž›› Ÿ¨¦®¬Ä¾ãÔR`Q_JS:=:>04-/@G=A48379=\{gëÈÀ¿¼ÇÀ¯­²¯º·±¯±®¯­±¯¹¶¸´¾ºÂ½½ºÛÎXlÿÝïÙçÖO]>DVhMYIQ@G;?ÚÎ|ß]{À¼»¸³°¯­®¬´±¾»¾»ÈÁìØÛÏÎÇÉÂÊÃüÜÜÏýÝdîêÖiêàÑJSm彺ÞÐÐÉ×ÌRaqâÿÝÕ˾ºº·½¹ûÜbòkçKU{ßÔËÔ˽ºÇÀ\zïÚÇÁÍÆYnþ¬ª¿»äÔÈÁKU>CðÙÐɱ¯¥£´°JSCJ;?.09<TdçÕRaGNNZO\9<-/*,(*03?FÐɶ³³°±¯²¯»¸¸µ³°´°²¯°®±¯çÖûÝÐÉNYZpíØÎÇÅ¿½¹ë×04+-*,(*=A°®«©±¯ÕË9<48+--.qãèÖHOLVDKjé8<+-8<?FáÒº¶©§ž¦¥½ºáÒCJIQ¹µ«©©§«©«©²¯çÕ¾»®¬º¶­¬¤¢·³EL04)+*,8;P^þ¾»Vi>D:>4869;?;>IP¼¹«ª©§¬«´°Ã¾ÉÂþÇÀ·³­«¶²¿¼}Þ:>8<æÔ´±°®ª©¥¤°®ÇÀÌÅhêMXViVjScËÄľ=B/3:>AHÞб¯©§¬«½ºTe<@=BUfûÜÀ½«©§¦°®ÌÅÉÃâÓBIÖÌÏÈHOO]ÝÏRa36BIÉýºµ±ª©¥£«©Á½ZqN[JSIQZqÖÌÈÁ¼¹¯­º·øÛËĵ±»¸¼¸µ±ÓÊXlFM1437<?KUçÕËÄïÙ:>9=:=;>_üÁ½·³¯­§¥¥£­«­¬¦¥¶³ËĶ²»·´°¶²Ä¾ÈÁZsBI^ûÑÊÊÃÏÈÛÎ?F*,-/XlÎǹµ¯®±¯®¬º·çÖÖËÏÈÏÉÈÁ´±­«·´ÇÀßÑxßFMÏȺ·MXÒʹ¶ýÝHO<@2559:=;>MYÐÉÜÏúÜÎÈ·³µ±¶²²¯¹¶¸µ¹µ¿»º·µ²¾»»·µ²Ä¾ÐÉÔËoäSbGN47/1IPhë[vLV/248?E-/9=O^\xÅ¿¸´º¶eîèÖ¶³µ±Æ¿|Þ¼¸¨§¯­±®±¯dî]}¸´½ºúÜO\bñRa699<8;àÒ´°À¼ÍÆËŽºüÝLWÊÃþÁ½Â¾lçQ_Øͽº¸´ÜÏQ_ÏÈièRaÅ¿ÊÃľÁ½ÏÈÈÁÀ¼¿¼ÏÈÈÁ¶³ÞÐuáſľié:>EL×̹¶³¯¶³¶³º·áÒ?G=AÞÐÖÌDK?FãÓÍÆ¿¼¾º^ýTdÍÆàÒ0403Æ¿ÎÇ9=JR¼¸´°´±»¸º·­¬¸µÙÍAH/1:>JSDK<@Xm¾»¸µUg,.9<Te¶³­¬ÍÆ]~Ìż¸ÇÀÆ¿ÎÇÅ¿«ªª¨®¬°®ÍÆÏȽºEL')'))+/3øÛÅ¿³¯ª¨ª¨ª©¸´¸µ½º;?.0-.,.9=ScÅ¿¿»Ìŵ²­«ËÄ6:>C½ºÏÈ9<AHHO5904?EâÓ±®ª¨­¬¶³Ã¾¿»Á½ÈÁɳ°­«¼¸GN_÷¼¹¾»¹¶¿»åÔbñ7:58\zP^ELHOEL<?MZÏÈiéÀ¼ÏÈ6:åÕ7;"$[w¹¶Êﮯ­º¶¨¦­«¼¹¯­±®ÞÐP_×Ì<?25üݺ·½º¸µ¸µdîJS\x-/*+>Em沯¸µÎÇ°®·´ÉÂKU69^ý¾»§¦¦¤¾ºÇÀÀ¼¹µ¯­¾»¯­ª¨®¬¨¦²¯ÔËËÄN[;>ÖÌáÒ<@DKüÜÎÈJS48R`Íƽº¾º_ùíؼ¸¿¼½º·´²¯½º¿¼³¯º·¯­®¬íÙ?ENZ=BBI¸µÆ¿Wk7:25@G&'!BI§¦¤£«©´°ÈÁ·´fí:>\yÝÏ«©©§måKT¼¸¬«µ²ÈÁ½º­«›› Ÿµ±²¯®¬ËÄ-/#%)*%'*,48%'2637,.AH=B/214AIûÜÐɺ¶Ìů­›šŸž¬ª«© Ÿ¢ £¡¨¦ª©¥£©§µ±Ä¾?F$&')EMAH()AHÎÇDKGN8;,.(*.0FMxßDKSd±®¯®­«žž¢¡·´µ±Xm9<Q_-/04¯­Ÿžžž¤£®¬ÜÏÒÊÍÆľ±¯É½ºª¨¦¤°®ÙÍN[6:36EL*,*,ÜϽºßÑ|Þ¯®éÖ36BIN[×ͼ¸¾»¼¹·³må>CiêÑÉ¿»¢ ž·´¼¸¥£çÕÇÀŸžÃ¾¸´§¥Æ¿ELFM<@59áÓ?E|Þ³¯/2@HÎÇ!#14­¬Á½FM¶³µ±ÐÉ¥££¡fíÚΰ®®¬±¯²¯ÝÏELBI-.+-ÖËN\038<47JS7:,.');?MXdÓÊÇÀ¿».1?F¯®¶³¢¡ŽŽŠŠ’‘–•ž,.oã¼¹)*Æ¿–•HO+-(* !*,/3¬«¨¦<@:=%'')¯­™™©§>C²¯hë')ÈÁ›šš™§¥ŸžŸžÒÊ8;§¥£¢>D»¸©§;?=BèÖ*, !N[O]!ßѯ­JRGNÔËXm/326[wFMZr¾»Q_é׺·°®¥£¦¤®¬Ä¿XlÆ¿]|14@GIQLW¾¸´¹¶¿¼ÒÊHO9<O[Wk?EXmÊü¹ŸŸª¨¸´Ÿž«ªGN¶³ÑÉ+,:=*+26«ª¦¤­¬«©ÉÂDK_ûÅ¿P^ÐÉ®¬º·DKIQmå:=LUO\èÖ½@GQ^ÇÀ°®¨¦fíHP©¨¤¢¥£¡ŸLU=A¢ ¨¦,.-.þ/2')½œ›œžœœ›œ±®Â½¾»?E'(04Å¿~ÞÍƽ^þHN,-=B>DGNiéèÖ®¬œ›˜˜›šœ™˜››¡ ©¨§¥œ›œ›ŸžŸžÃ¾?E59"$$&!!#./7;%'µ²¸´³°®¬À¼Å¿´±UgELµ² Ÿš™™˜ª¨:=<@h뱯ÏÈ&([tº·;>14-/04=Af좠¢ »¸²¯¨¦¯®ÌÅ°®©§¾»GNþÓËþÝÀ¼·´ÑÊ-/"$&($&(*_üÔËþ°®øܽº£¢®¬œŸž¬ªžž©§ÔË-.8<äÔCJHON[ñÚ¸µrâåÔÍÆ;?íؼ¹ÎǾ»ßÑ9=ÙÍúÜÝÏ­¬žžž·´69"$$&')-/ãÔ°®Á½áÒ¹¶ª©¦¤¥£ÊÃ36áÓþBJ69Ra¼¹Ä¾ViáÒ°®¸µÇÀ³°º¶LW')%'03"$!O\½ºÂ½ª¨®­Wk½º´±³¯ Ÿžžº¶6:*,8;ÇÀÏȯ®®­48%&1547-/ÍÆ«©­«œ›––˜˜Ÿž¯®©§ÇÀ25Wi½º¿¼=A=C>D%'$&<@DKO]ê׳°Å¿>CO\)+!;>ê×CJIPO]ãÓÁ½º·©§››œ›£¡£¡©¨®¬«©ØÍ/2JSÝÐ-/59[vN[[ui꺷´°»¸±¯LV!(*;?26HOÈÁÔ˳¯½¹Á½ÇÀ)+;>ÒÊ>D¿¼­¬®¬£¢¥£©¨¬ª¶³ÜÏÓÊ­«µ±ßÑ®¬£¡³¯LV*,%'15BIÍÅ_ú:>Ü϶²°®¼¹Æ¿»·ÌÅÍÇÉÂLVTc«ª£¡£¢£¡«©ÎÇHOBH15-.26¹µŸŸ¢ ©¨¤£«©×Ì8<,.ELľ³¯¦¤¦¤µ²MY)+$&%',.6:.059Êû¸ÇÀ¶³¯­ËÅ`õ¾º¬«­«³°¬ªª¨®­ª¨´±¯­©¨¼¹º·»¸·´º·åÕoä>C.08;eîľ¾¶³·´¹¶®¬¡  Ÿº·kç<?-/)+.014,./2GNg뾶³«©©§Ã¾O[ÞÐÎÇScÎÇ«©£¡©¨¨¦§¥®¬¼¹¼¸»·N[14.13736/3:=R`RaíØáÒGN8;8<;>>DÆ¿Ä¿ÌÅ¿¼ßÑÊô°®­¨¦£¡£¢­¬ÉÂÞÐNZMYÁ½¸´¼¹üÝWj³¯¼¸BIDJBIJRmæ6:59?E.0.07:@G^ýíز¯¶³FM>CBI9=>CcóÈ©§ Ÿ£¡Ÿž¤¢¯®¯­³¯±¯¦¤¤¢¬ª¼¸NZ14(*/3=BMYľƿHO/2%'"#6:Æ¿½¹Á½Ã¾;?03.0$&.1Æ¿®¬»¸¼¹¿»VgbôÏÈ~Þ¼¹§¦¬ªâÓ:=8<58s⦤Ÿž¦¤¨¦¬«¸µÎÇÎÇÍÆDK;>úܱ¯­«¯­Â½Zp<@)+*+?EP^¿¼¦¤¹¶=A*+ $&:>·´¬ª¯­½¹]}ÖÌÊÃGNÎǧ¦¬«À¼±®²¯@G.0GNøÜDK7;7:?FLXP^Å¿»¸º··´¼¹±¯èÕRa¸µº·žž•”žª¨ÈÂäÔº¶×ÍN[BI,.%',.-/)+.0&(!().0_øÍÇ7;269=Ûγ¯§¥œ›™˜œ¤¢žœ¢¡Ÿž¥£·´µ±¹µNZ:>IQ7:*,+-03NZ¸µ«©»·:=*+') "!#47½»·O]·³ª¨ê×?FLWØÍ¿¼®¬¦¤­«ÖÌ;?26+-59ÇÀ®¬¤¢Ÿžœ›œ›¨¦«©©§­¬­«¶³«ª¢ ¬ªûÝ-/+-&(.0?E1548*,)+9=LWçÕ½ºº¶ýÝ?EIQKTYo½ª¨ Ÿ£¢¯­¬ª¥£µ²¸µ¬ª§¥¡ ŸžœœŸž¥£ª¨ÏÈ<?37$&!#26LWAH<?-/)+*,*+;>Æ¿¿¼ËÄâÓ:>Å¿¦¥¬ª¬ª«©¨¦©§¯®¸´®¬Á½37@GÓÊæÕ¯­Ÿž¬«ÉÂlç598;ZrFMN[ÙÍÞÐÒʽÍÆcïéÖ<A,.0326@G×̼¹¼¸¸´¾ºÇÁ·´´±­«¬ª¶³»¸ÊÃdñÎÈÊÃ:=15nå|ÞJS59!#!+-36×̹µ¿¼¯­±¯±¯µ²«ª£¡¥¤§¥§¦§¦²¯¾ºÄ¾áÒzßÅ¿ÝÏ<A?EÝöÛ@GDK@GBIN[:=6914*,:>Îǹµ¼¸¿¼½¹´±¶³Ã¾kèÙͽºDKÑÉ¥£¡Ÿ¤¢´±AH47(*%'NZÁ½­«¦¤³¯¾»ÍÆQ_;?+--.<?69\vº·¾º¼¹åÔKTUhDLR`GNCJ¾»·³uá}Þ³°ª¨«ª¼¸ÛÎÈÁlçO]NZ:>ÖÌÐÈØÍÆ¿ÿÝÞÑ>C14DKÞѳ°±¯À¼äÔCJBH.1&(1559"#!#-/?F»¸¢¡œ›œ¢ ³°ÜÏÍÆÆ¿ÎÇ»¸Ä¿Úκ¶¼¹ßÑYnJSJR[x?E:>þÝÊÃÖÌê×EL7;CJÖ̹¶´°¬ª«ª²¯½ºÌÅľlæO]Ëľ»´±³°ÈÁRaZqÊÃÈÁ»·¼¸VisáàÒ[vYomåÖÌÏȲ¯ŸŸ Ÿ£¡œ¢ ¬«ØÍ04.1/325KUùÜ263626,.>DNZØÍÇÀÑÉbòUffífíXmľ¯®¢ œŸŸ£¢§¥¨¦µ²ãÔľ¿¼ÚÎXl.0)+37>DnäÏÈgì`øDKHNKTMYľľ¸µ±¯¯­»¸DKDJTeeíÆ¿³°º¶Vi9=*,+-HO¹¶œ›–•˜—›š¥¤Æ¿ìØ;?')/2JTÚÎ<?.08<7:9=Q_ìؽ¹®¬¤¢š™ž£¡©¨ÎÇÏÈ×Ì»¸ž¢ ³¯ÞÐ/2-.476:JRÚÎLV8;+-)+KUÈÁ¯®¨§«ª¨§ª©®­¶²ÍÆľ¶²¯­¦¥¥¤µ²ÈÁÚÎ:>48=B=AAHWkXm@GUgÓÊnåãÔÏÈÛÎÚÎCJ)+&((*EL¬«¤£œ›š¡Ÿ©¨Å¿[wmæÌŸ´½¹¾º¸µ¾»_ø>DWjÑÉ]ÿEL;>8;@G;?DKJR9<üܶ³¿¼Éü¸ÈÁCJ=BæÕ½¶² Ÿ—–š™¨¦ÒÊ37')*,DKÎÇ´±º·^ýTe7:)+8<÷ÛÌÅ»¸¿¼IQ/1*+/1HOO]É´±½º±¯°®ÚÎkçfíãÔº¶±®¿¼CJ*,+-O\ÆÀ«ª¢ ¤¢¥¤¸µHOBIAH7:<?FMÛ궦¤œ¤¢¯­ãÓ)+$&37,.,./37:`õæÕÛα¯´±Ûμ¸¸µoã=AJR`õíÙ¯­¥£ª¨½ºXm=B;>[u½º¼¹BI/2?Edî¿»­¬¯­°®¬ª«©´±ÐÉKT37+-(*36AHHOLW=BP^¸µ®¬¬ª®­¿»¿¼ÉÃ[wæÕ¹µ¯®²¯±®¯®¶³³¯¬ª®¬Å¿ÞÐÆ¿\|CJ@G)+').1*,.0>CßÑ°®®¬¶²­««©¯­¥£¦¤§¥žœœœ¨¦¾ºAH%'()@G×ÌÌÅKU;?(*"$479<04<@IRÇÀ¼¸ÜϽ¼¸·³²¯²¯¯­©¨Ÿž¢ ¨¦¯®´±µ²ÎÇÍÆÍÆIR=A69,.)++-)+ "$&7:EL6:;>JRÇÀ»·°® ŸœŸžª¨»·ÌÅÏÈrâYnKUUg=A&(7;Úμ¸³°¼¹¼¹ÖÌBJFMnä¹µ­«´°±®º¶Ã¾³¯­¬¬ªª©¬ª´±úÜ>D@G<@[zEM>CÏÈÌÅóÚMXIQ?F/1%'(*25½«©±¯«©¨¦¢ ¤¢§¥žž¦¥©§¦¥¨§ž¥£Æ¿EL,.*+366:9=MY:>;?Td>E588<8;8<KT¸µ£¡ ŸŸžŸž¨¦¨§«©²¯±¯Æ¿MYN[_ù]âÓbòMY47)+*,.0RbÛλ·µ²ßÑGO=Bm寭¦¤œž­¬°®­¬¨¦©§¯®Ä¾ýÝAH+-')(*'))*,.25./(*.1:=ØÍ»¸Æ¿²¯³¯º·£¡›šš™ž±®ÍÆGN;>CJNYËŶ³°®¬Æ¿@G/2*+!##%26AH[uÌÅéÖøÛÏÈ~ÞÈÁÅ¿»¸­«¸µÃ¾¹µ¸´¸µ³°¬ª»·ËÄľZsELkæ|ÞKTÎǾºñÚBI14)++-.1(*(*.1.1:>Ûΰ® Ÿ Ÿ«©¯­»¸¾ºÆ¿ÝÏZqN\áÒÜÏYo½¶²»¸·´ÉÂvàÎÇìØ<@479=0469eí×̽ºÌÅIPDKüÜ·´¥£ž¦¤¿»Sb15*+:>ÌÅàÑÞÐwßfíÍÆMY;?9=*+'(+-48·´žž™˜˜—œ›¨¦Â½?GMXÍƾ´±·³½º²¯«©«©±¯Ã¾é×8;)+,.(*'),.046::=O^Å¿²¯«ª¨¦¥¤ª©®¬¨§£¡¤¢¨¦­¬·´ÍÆ^ûGNGNÞ鶦¤¤¢ª¨Æ¿(* "@GÍǽº±¯µ±³°ÈÁËĸµÊÃØÍÜÎkçvàÁ½­¬­«¹¶¸µ³°µ²ÈÁeîN[CJBIEM9<,.')$%./JSÑɯ­·´ÏȽº¿¼¿¼­««ª¦¤«©¹µ±®Êÿ»±¯½ºÇÁUg48-/48éÖÜÏmåÜÏÏȼ¹¬««©³°Ã¾ËÄľÉÂîÙÔËÅ¿¿»¾»¼¹­«¸µáÒáÒJQFMWjO]IPMX[vyßSc<AÛλ·½¹¬ª¨¦§¥¨¦«ª¨§´°þÞÏȾ»¬« Ÿ¤¢Ä¾CJ15(*7:Ðɲ¯©¨©§³°ÏÈwà;?2526<@~Þ`özßkè:==AKUDK:>BIÜÏãÔÏÈlæqã¼¹·³®¬­«³°±®»¸èÖgëÎÇöÛCJ{ßKU@GmåDK>DNZ48.1,.,-:=ELØͺ·¾ºßÑJRJR?F>DÆ¿º·¸µ­«·´ÐÉàÑïÙWlTfMYJSÆ¿¹µº·¿»áÒMY367;O]?EKVÚÎçÕÎÇÅ¿òÚMYèÖ½º³¯ª¨®¬°®«©¶³¿¼¹¶¹¶µ±º·´±±¯ÙÍMX26/3=B69MYËÄþÊÃfìSc?EAHÎǹµ­«¨¦±¯ÏÈæÕÉÂľþ¿¼«©§¥¸µ¹¶´±ÏÈO]AH=AP^\xÍƲ¯²¯¹¶Ä¾oãÔËÎÇåÔFM8<KTDK69P^ËÄÓʺ·¬ª«©¶³ÊÃ]8;9</1+-7:.025DK48:=CJ47<@UfÎǵ±¶³¥£ž©§¹¶ÚÎÍÆÔËȯ­¯®¯­®¬¶²»¸Vh47-/+--/*+/32636>D36@G½º±®®¬­«¨¦®­Á½µ²¹µ¶²¶³ËÄ`õUeÓÊØÍÖÌèÖKTWjíØjè]~Q_`÷FM>C[u|ÞÛÎê×hëhéELNZë×LVo㯮¤¢¨§®¬¡ §¦ÍÆÈÁ\x?FQ_:>?FFM046:;>;?åÔ¿¼¾º¾ºÆ¿¶²£¡¢ ¦¥©¨Ã¾gìåÔÉþ»»·®¬°®¹¶¯®¯­½ºÄ¿¾ºº¶ÍÆCJ>D<??F;?-/,.,.37ìØÅ¿­«¤¢®¬¬ªž™˜™˜Ÿž¯®¼¹ÞÐo俼À½¶³¾»\zÍÆÒÊEL=AAH>D?E9<48çÕÉÂGN/2&'$%*+14Zq±¯§¥©§¸´µ²­««©¨¦¯­¸´­«¥£ª¨®­±®º¶¸µ­«®¬¼¸ÇÁ8<!#"$376::=;>:>:=15/3@GúÜÍÆľ¶³¬ªª©®­³¯µ²ËÅľ¹µ¹µ
\ No newline at end of file
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_mono_11khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_mono_12khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_mono_16khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_mono_22khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_mono_24khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_mono_32khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_mono_44.1khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_mono_48khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_mono_8khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_11khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_12khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_16khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_22khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_24khz_320kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_24khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_32khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_44.1khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_48khz_32kb.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/pcm16_stereo_8khz_32kb.raw has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/testdata/bsp/sound/pcm8_mono_8khz_32kb.raw	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,1 @@
+€€€€€€€€€€€€€€€€€€~„ˆƒ…‚€€„†‰„…„~}}‚†‰Œ†€}‚‚ƒ‚‹Š†ƒ|‚……‡‰ˆ€~„„ƒ‡‹‡‚‚„‰‡ˆ‡…†„ƒˆ†ˆŠ‚~}‚‰‰ˆ……~ƒ‚…„…‡……„|€…‰…„†„~}~ƒ†††ƒƒ}{‚ƒ†ˆ‡„{{~…ˆ‹‰~‚„‰…†‡…ƒ~}‚ˆ‹Š„ƒƒƒ‚……ƒˆ†…ˆ‚€€‡‰‹„…‚…‰Š„€€‚‚~„ƒˆŠƒ‚{~‚‚‡‡„}‚‚††„ƒƒ€ƒ‚ƒˆ€…‡…‚ƒƒ‚„‚€‚†‰†‚|‡†ˆ„ƒ…ƒ„‡‡‚‚‚ˆ‰†‚|…Š„€…ˆ†„€~ƒ‡‰‡„‚€‚‚††ˆ†…z}‚‡‹ˆ‚~~‚ƒƒ‰ˆ…~~„„ƒ…‚…‡‚ƒ‡‡‚‚†‹‰‚}}†‰‡„‚„…„†„…†€‚ˆ‡€‚‚†Œ„}~………………ƒ‚~„‡„‚„‚‚‚ƒ‡††‡†{vŠ‹‰„€„ƒ‚„‡‰ˆˆ€…‰‹‡€†…ƒ…†‰„‚……ƒƒ…„‡ƒ€…ˆ…€…‡†‚‚„ˆ„€…‡~€ƒ‡†„ƒƒ…‚…„†‚~„‚„„‚…†…‚~€ƒ…ˆ„ƒˆ„~€†ˆ†ƒƒ…ƒ‚‚ƒ…†‡ƒ‚…€‚ƒ†ƒ…Š„…ƒˆ‰‡†…†„„ƒ~…„‰‰‚~„ˆ†ƒ‚ƒ‡Šƒ|~†‹Œ„‚‚€‚‡†‡„ƒ‡…}‚†…‚„„ƒ„‚ƒ…†‡„‚~…†ˆƒƒƒ‡†‚€‚„‡…‚„…„‚ƒ‡‡„~„ˆˆ†‚„„}ƒˆ†……ƒƒ€}€ˆ‰ˆ„„„‚ƒ‰‡…ƒ‚…†„…ƒ…„‚†ˆ‰„€‡ˆ†…ƒƒ‚‚‡ˆ€ƒ†ˆ‚ƒƒ†Š‡‚ƒ„‡„††€€ƒ‡ƒ†…ˆ†}€…‰ˆ…†‚€|}‡‰…„ƒƒ„…‚€…„„ˆ‰‚|}…Š…„€‚†‡‚‚†Šˆ‚|}ƒˆ‡‡ˆ„ƒ~……ˆ††ƒ…ƒ…‚†‡„…‚…‚ƒ…‡†‚€…ƒ}‚…‰ˆƒƒ€‚‚€€†ˆ…„††‚€„‡††|€‚…ˆ†ƒ……ƒˆ†ƒ}„‡„„„„…„…††„€…‡†ˆ††‚„„ƒƒƒˆ…€~‚‚ˆˆ……~~‚‡‰…ƒ‚‚…†‚€€ƒ†‡ƒ~€ƒ‡…ƒ…ƒ€†‡‚„ˆˆˆ€ƒƒ‡…„„„‡…ƒ€ƒ‚„‡„„…‡‚„ƒ„‚…‡€„„‡†„€‚ƒ‡†…ƒ„~‡†…‚‚…ˆ†~……†ƒƒƒ€€…†…€€„„‚ƒƒ„…„…„‚ƒ€„ƒ†‡‡ƒ€€„ƒ‚„‡‡ƒ‚‚ƒ†‰ƒ‚…‚‚‚†‡†‚„†Š†€}„ˆˆ‡‚€‚…„‡†‡†€€„ˆˆ…€„†‚…†„ƒ‚€ˆ‹‡„„„…ƒ†‡…„…‡„„ƒƒƒ„ˆˆ„‚‚………ƒ€……†‰„€|~…‡‡„‚ƒ…‚‚€…†ˆ‚„€ƒ„‡†‚€{ƒ†‡ˆ„‚€ƒ††„…ƒ‚‚ƒ…‚†ƒƒ„ƒ‚‚†ˆ‡ƒ……†ˆƒ€„‡‰‡‰ƒ~ƒ‡‰…ƒ…„…ˆƒ…ƒ‡ƒƒ…„…ƒ„‡„…„~~‚ƒ‡ˆ‡„€‚…‡‚‚‚……ƒ€€†‚ƒƒ„‚„ƒ…‡„†‚‚‚„††„‡„~„ˆˆ†ƒ€‡‹…ƒƒƒ„ƒ……†ƒ€„„ˆˆ„…ƒ‚‚„Š„„‡‚ƒ‚‚ƒ…„†„}€€†‡‡ƒ}‚…„…ƒƒˆ…†„„„„ƒƒƒˆˆ‚…†…„€‚ƒ†ˆƒ†…„}„ˆ‰„††ƒ††‚ƒ„…‡„‚…†„…‡…‚…„„ƒ„†‚ƒ„…„ƒƒ€„‡„„……‚…‡ƒ‚‚„„…‡…‚„ƒƒ‚ƒ…‡†ƒ……ƒƒ‰Š‡…€‚‚ƒ†ˆ†…„……†‡†‚ƒ‚€†„„‡„ƒƒ…‡…‚€„‡ˆ†z|…‡‰ˆ~€„ƒ„‡…‚€…ˆ‚‚†…„‚…†………‰†‡€„„‡‡‡‚€ƒƒ‚‚‡ƒ„‚†ˆƒ†ƒ}ƒ‰‹ˆ€€…‰‡…}ƒ‚‡…†‚€‚‚ˆƒƒ‚…‚…‚‚€„‚ƒ†ƒ†„€‚„„„ƒ„„€†„„ƒ€‚ƒ‡†ƒ‚„…‚ƒ†ˆ…ƒ„‰†‚ƒ„…ˆŠ„‚„‚„„‡‡‡†€„‡†‚ƒ‡‡„‚|€„‡Š…ƒ|}€‡‹†}€…†„ƒƒ‚†ƒ‚ƒ‡…‚‚~‚‡ˆƒ€‚ƒ‡…‚‚‚†„‚…„ƒ€„‡†‡…€ƒˆ†ƒ„ƒƒ„„„€€†‡…‚‚ƒƒ„ƒƒƒƒ…„€ƒ‚‚…ˆ‚€€…†„ƒ€…‡†ƒ„‡ƒ‚‚ƒƒƒƒƒ„…†‚„„‰†ƒ}†††‰…ƒ‚„ƒ†‡„ƒˆ‰„‚‚„††„ƒ„‚‚……††ƒ„†…‚…†ƒ‡ƒ„ƒƒ„†…‚~€ƒ†‡‚}~„†††…~€ƒ††‡…€„‡‡ƒƒ‚……†‡ƒ‚„‡††‡„…‚ƒ…„…„„…†…ƒƒˆ…‚ƒ†‡†ƒ€}…‡ˆ‚}ƒ„††‚€…ˆ‡„|~…ˆˆƒ€„……‚‚†‚†ƒ‚‚‚ƒ‚††‡…~ƒ‡Š‡ƒ„ˆ…††‚†…ƒ†„„‚€„‡††ƒ‚„ˆ‰…€„‡„ƒƒƒ……€ƒ†‚‡†ƒ~}€„…†…€…‡ƒ€……ˆ†„}ƒ‡‰„†„…†„„ƒ…„„ƒ‚…„ƒ††‰†„€€†„„†‰‡‚‚‚ƒ‡‰„„ƒ‚‚„„…‡…ƒ‚‚†…ƒ‚„†…‚€ƒ„‡†„}‚ƒ‡‡‚€‚„……†…€ƒ†…„…‚„…„ƒƒ†…ˆ‡ƒ„…ƒ‡‡ƒƒ€†‡†…ƒ†‚ƒƒ€ˆ…ƒƒ„†„~‚†…„…ƒ‚‚…„ƒ…‚ƒƒ‚„„„‚ƒ„ƒ~…‡†…ƒ‚ƒ‡‡„ƒƒ†‡„„~€‡‰‰‡ƒ}ˆ‡……„‚ƒ…„ƒƒ‚†‡‡„ƒƒƒ‡†„ƒ€‚††„ƒ…ˆ…€ƒ†„€ƒ„†‰‚€……„ƒ€ƒƒ‚‚„†‚„‚…†ƒƒ„„†††„ƒ„†…†ƒ„ƒƒˆ…„ƒ††„„†…„‚‚…‡…†‚‚…†…ƒƒ€€ƒ†‰…‚~}„…‰‡€ƒ†„„€ƒ…†‚‚‡…‚‚„……‚‚‚„‚…ƒ€ƒ„‡ƒ„„‚…‰‡ƒƒ„ƒ†ƒ€„„……‡†ƒ€~„ˆ‡„……ƒ„ˆ…„ƒƒ„†ƒ‚„‡‰‚ƒ†………‚‚ƒƒ‚ƒ†‚‚‚…‡„‚€ƒ†††„€ƒ…€ƒ„‡‰…ƒ‚ƒ‰‡†„ƒƒ‚ƒ††„ƒ„ˆ…„‚ˆ‰‰„ƒ…„„‡†„€~‚ˆŠ‰„€€†ˆ†…€……††…†„†…‚‚„†‡„‚„„…‚„ƒ‚…„ƒ„†„„ƒ‚„„†ƒƒ‚ƒ†‚ƒƒƒƒ……€€„„…€‚…†ƒ€‚„†„‚…„ƒ~„†„…‚ƒ…†„‚€„„ƒ‚„ƒˆ…„‚„†„„ƒ„†„…ˆˆ†ƒƒ…‡„ƒ††ƒ‚€„†††ƒ‚€„‡†„€„††„„„‚ƒ„„ƒ€ƒ„„„……‚„ƒƒ†‡ƒ‚‚ƒƒ„…ƒƒ„…ƒƒ…†…€ƒƒƒ‚‚‡…„ƒ„†…ƒ‚„ˆ‡‚€€‚ˆ†„„†…„ƒ…ƒ„ˆˆƒ}„…‡‡‡‚~€ƒŠˆ†‚ƒƒ†‡ƒƒƒƒ‚€‚„„†…€‚ƒƒ‚ƒƒ†„…€‚„‡…ƒ‚„…„ƒ„†Š…‚€„††„‚‚†„†…„ƒƒ…„„†‡…€…‡ˆƒ‚††ƒ‚ƒ‡‡„ƒ…ˆ„~€ƒ…††‡ƒ„‡‡„‚ƒ„„‚„ˆ‰ƒ€„ƒƒ„„…†ˆƒ‚„†……ƒ‚„†‡†‚€‚…‰†ƒ†ƒ‚ƒƒ†……„ƒƒ……†‚‚‚ƒ‡„…‚‚ƒ‚ƒ‚‚…„ƒƒ€ƒ……ƒ‚…‡…€€€ƒ†„‚ƒ†„„ƒ„…€ƒ†…‡‡„‚€„Šˆ„„‚…‰„…†‡„ƒ‚ƒ†…„ƒ……„‚„‚‡…ƒ„„†„„‚ƒ„‡‡€ƒ‡†„‚€ƒ…ƒ€‚…ˆ‰ƒ~„ˆ†…„…ˆ†‚…‰ˆ‚‚€ƒ„ƒ„……„„ƒ€‚…†„„ƒƒ‚‚…„……ƒ‚„†ƒ„…„ƒ‚‚‚‚…††‡„ˆ†ƒ„ƒ„†‚…‚ƒ‚€‚…ˆ‡„€ƒ…‡†‚ƒ„ƒ„„ƒ‚‚„‡ˆ„ƒ‡†„‚ƒ…ƒ„ˆ‡ƒ‚„…„„ƒƒƒ„‚ƒƒ‡…ƒ…†„ƒ‚€ƒˆ‡„€ƒƒ‡‰~ƒ‡†„‚‚‚†ƒ…€€‚…Š„‚~€†‡†„„„‚‚‚„‰……†‚……„‚€ƒ†ˆ†€€…„„ƒ‡†„€€‡‡ˆ„‚„‚‚†‰…ƒ€…‡„„„ƒ„†…ƒ|††ˆ‡…€€††ˆ‚‚†‚€„…Š†‚ƒ‚†……ˆ„‚ƒƒ…ˆˆ…‰‡…‚…††„‚‚‚…‰Š„€‚‡‰‡„ƒ…ƒ€‚…ˆ…€€‚‡‡‚€„†…‚€…‡„‚‡ˆ„ƒ‚…„ˆˆ†~‚ƒ…‡ˆ„€‚…ƒ…†‚„…‡ˆ††‰…ƒ„…†…€ƒ„ˆ‰ƒƒ…„…„ƒ‚†‰†…~ƒ‡‰ƒ€‡……‚ƒ„„‚ƒ‚‚‚„‡…„‚ƒƒƒ„ƒ‚‚„‡„ƒ€€ƒ†…ƒ‡……‡„ƒƒƒƒ……†„ƒ…†…€|‡‰‡„‚‚„ƒ‚ƒ„†‡†‡‚€…‰ˆ„‚„‚‚ƒ„ƒ‚………„€…‡†„€ƒ†ƒ~ƒ†„†……„‚‚‚„†††…„‚ƒ†‰‡„ƒ‚†…‚€~…‡ˆ„‚ƒ…„„‚„…ƒ„ƒ††„€‚…‚ƒƒ†‡ƒ‚~€ƒ††‡†€~}‚„†‡ƒƒ€‚ƒƒ„„‚ƒ„…„‚ƒ†ƒƒ†ƒ‚€‚†‡‚„‡ˆ†…„‚„……‚ƒ††††ƒƒƒ„…‰‡‚‚„…„„…††}~ˆ‡„ƒ…†|€…ˆ…‚†ˆ}€…‰‡€‚†„~‡Š…‚€„ƒ€ƒ‡‰ˆ‚‚‚€†Šˆƒƒ†„ƒƒƒ„…ƒ„„‚‚ƒ„…‡…‚€‚…‡ˆ„ƒ…ƒƒ‡ˆ…†‚‚ƒƒ„„„…†…‚ƒ†„ƒƒƒƒ„‡‡ƒ€„†……„‚„ƒƒ‡…„‚…ˆ‡‡‡„€€ˆ‰†„ƒ†‡‚€ƒ†„„……‚‚„ƒ‚„‡†ƒ€€ƒ‚„††‡‚………‡†ƒ~€‚…†ƒ‚‚†ˆ„}€„ƒ„‡ƒ„|‚†‰„‚‚…‚‚‚‡…††„„€‚…††‚„……‡€€‚……‡…„|€„‰‹ƒ„„‡ˆ…†ƒ€‚†‡ƒƒ‚„†…ƒ€„…†…„ƒ‚ƒ…†„ƒ„††„~~‚ˆ‰…ƒ„†ƒ‚ƒ…‡†‚ƒ†‡‚€ƒ…†„‚……ƒƒƒ„ƒ„‡„‚…‰ƒ‚ƒ„‚„„‡‡ƒ€€†‡ƒ„ƒ„„…„ƒ‚€€…ˆ…ƒ€…†…‚…„ƒ„…†„…‡„„ƒ†‰…€~„‡‡…„…†ƒ€††††„„ƒ„ƒ„…„ˆ†€ƒƒ„„…‚‚‚„†…€~…‡†„€ƒ…‚€†ˆ‡ƒ…„‡ˆ…ƒ‚ƒ„„ƒ…‚„†„~~…††ƒ€……‚€„†…†„ƒ‚„ƒƒƒ„ˆ†ƒ€†‡…€„†ˆˆˆz‡‡‡†…ƒ~†…„„ƒˆ†~‡†………‡‚€‚„†„ƒ„‡…~~„…„ƒ†„€„‡ƒ…†…‚…‡†‚}€‡‰„‚€ƒ„„ƒ‚„…†…„‚‚‰Š…‚…†…€†…„…‚ƒ……‚ƒ…„…‡†€~€„‰ˆƒ‚ƒ€„ˆ„„…„……‚€ƒ‡‹ˆ†‚€‚ƒ†…„…„ƒ‚ƒˆ‡„ƒƒ„‚„„…†„ƒ„†…‚‚ƒƒƒ†„„†„„ˆˆƒ„ƒƒ„‚‚ƒ…ˆƒ„ƒ…‚„…‡……„„…‚€†Šˆ„‚ˆ†€ƒ„…„††‚†‡†…ƒƒ„…†‡„„†††…€€„‡„ƒƒ‡†€€€„ˆ‡†€‡‡†…‚~|„…‚†„€…ƒƒƒ†‡…}††…‚…‚ƒ‚„…ˆ‡ƒ‚ƒ„€ƒ‡ˆˆƒ‚ƒ„€ƒ‡‰…ƒ„€„ƒ……ˆˆ‚ƒ†€€„ˆ‰ˆƒ…ƒ}‚‰‰ƒ‚‚ƒ†„‚„†‡ˆ„€~}„ˆˆ†€~„………ƒ€€ƒ†…„ƒ„††…ƒ€‚ƒƒ……††}€„‰‰…ƒƒ…†……„‚‚†„‚ƒƒ„‚‚††ƒƒƒƒ‚‡†„†‚‚ƒ„ƒˆ‡„ƒ‚‚…‡„ƒƒ…†„‚~€†‰‰…ƒ……ƒ„‹‡„ƒƒ€‚…ˆ†„…€„…††ˆ‡ƒƒƒ‚‚‚‡‡‚†ƒƒƒ„‚…†„ƒƒ……ƒƒ…‡‡…~~€…‰‡ˆ‚††…ƒƒ…‡„‚‚ƒ‡‡‚ƒ„‡ˆ„€‚†ˆ‰„ƒ„ƒ€‡‡‡‡‡„‚„‚~ƒ„†…ƒ†‡„€}€„Šˆ„‚ƒ†…‚†ˆ†ƒ€‚‚ƒ‚†„„‡†ƒ||„‰‹†„ƒ‚€‚‡…ƒ„†…~…ˆŠ…‚€‚†‰Šˆ‚„ƒ‡‰…„„†…€‡‡„…‡†€‚ƒŠŠ†ƒ‚ƒƒ„ƒ…‰…‚‚„†ƒ€„†ˆ†ƒ‚€„‡‡‚…ƒ}€‚‡†„†‚‚ƒƒ€‚„ˆ…„…ƒ€‚†‹…ƒƒ‚ƒ‚‚††„ƒ„†‡ƒ€‡††ƒ‚……„„‚€‚ƒ‡‡|~…ˆ†„„ƒ€z„ƒ‡†€€ƒ„€{~ƒˆˆƒ‚ƒƒ„†…ƒ„……‚„†…‡‡ƒ€}‚…„††‡„„…„†‡…‚„‡‡ƒ‚„ˆ†ƒ…†‡ƒ~„†‡‡…ƒ~|ƒˆˆ…ƒ†‚€€…††„†‚}‚ˆ†„†‚†ƒ~†‡‰…ƒ€€‚„‚‚„††…„„‚‚†‰†…€‚‚„‡„„‚†…„‚„……ƒƒ„„…„ˆ‡„‚„‚‚ƒ…ƒƒ„‡†€€„‡†„…ƒ‡†ƒ‚…„~}†ˆ‡€„……„„‚…‡†}‡‰ˆ„€…„€„‡Š†ƒƒ‡ƒ„†…ƒƒ††……‚‚ƒ„………†‚€…‡ˆ„‚†ƒ‚ƒ„…„…†‚„‚ƒ…„„‚ƒƒ†‰…€‚‡‰‡ƒ‚„ƒ€„††ƒ‚†ˆ‚…†ˆ…ƒ€‚„ˆ‡…‚„ƒƒˆˆ…~…‡…€ƒ†‡ƒ‚„…‡†€„„…„……‚€ƒ€ƒ‡‡ƒƒ‚…„„„ƒ‚€„…„„‚ƒ‡‰ˆ‚‚€‚„…‡††ƒ‚„…†ƒƒ…ƒƒ†…‚ƒ……€~„ˆ‰„€‚…„„†ƒƒƒ…†‚‚†ˆ„…‡ˆ…€ƒ‰…„…‚‚‚‡„…„†‚‚…‚…†„ƒ‚„ˆ‰€€†‰†…‚€‚„…†‚„…‰†ƒ~}‚ˆ‹ˆ‚‚†‰‰…‚ƒ‚‚††…‚‚ƒ„ƒ„ƒ†‡…‚€ƒ€‚†‡‡…€€‚…ˆ…ƒ€ƒ…„†ƒ‚€ƒ„„†‡†‚ƒ„‚‚‚…‡ˆˆ‚ƒ†ƒƒ‚‡„…ƒƒ…„ƒ‚€‚†„„……„}‚…‰‡„ƒ~€…‰…ƒ€„…‚ƒ‚ƒ…€‚ƒ…‡ƒƒ€ƒ‰‡……€}~†Œ‰‚‚€ƒ‡†…‚†‡„€€†…ˆˆƒˆ‰‡ƒ‚‚‰‰ƒ~„‡ˆƒ‚„‚„ˆ…„…„ƒ‚„††‚†‰‡ƒ€‚ƒ††‚€†ƒƒ„†…„ƒ„ƒƒ………„‚……ƒƒ‚……ƒƒ„††‚„…‚ƒ„†‡„‚€~„‡…‰†„‚…†‰†‚„†…„‚…ƒ„‡ƒ„‚„„„‚‚…ˆ…‚}‚‰Š„ƒ}~‚‡ˆ‡ƒ„ˆ…€‚ƒ‰‡ƒ€††…‡†…€ƒ…†…€ƒ†‰‡ƒƒƒ…ƒ„‡††††~€„‰ˆ„‚€‚…„…„…„…ƒƒ…†…ƒ…„€‚ƒ†„…†„‚„„ƒ†…‚‚……€ƒ‚„†ƒ…„~€††ƒ…ƒƒ‚„‚ƒ…†ˆ‚‚„€„†‡‚€‚„„„„ƒ‚„††}‚…‰ˆ‚„ƒ„„„†‚‚‚€„ˆ‰…ƒ……‡†‚‚ˆ‡ƒ„‚„‡†‚€ƒ…ˆ†‚ƒ„…„„‡……‚ƒ„‡‡„ƒ„„‚…‡…‚€‚†††ˆ…‚€…‡…ƒ‚…ƒ€„‡†‚ƒ…„ƒƒ‚…††‚‚„‚„‰‰„‚€ƒ„…‡‡‡…†„ˆ‡†…‚ƒ‡†‚…†……ƒ„„†…€€‚ˆˆ„ƒ…ƒƒ‚„…†…„€ƒ…‡„‚‚‚„‡†…€}€„ˆ‡…‚~€‚‡‰‚‚…„‚„‡……Š‡ƒ‚€…†‡†„‚~ƒ†‡…€ƒ…‡‰„‚€ƒ†‰„ƒ‚„ƒ…†‚}†ˆ…€ƒƒ††…‚‚€…‚ƒ‚„„††‚€ƒ†ˆ…‚……ƒƒ„ƒ…„††ƒ……„…†…‚ƒˆˆ†„††„€ƒ†„ˆˆ‡ƒ…†ˆ‡‚€……„‚„†ˆ…„|†„„‚ƒƒƒ‚„„„„ˆˆƒ€…†…ƒ‚‚‡‡‚„‚„…Š†„†‡‚ƒ‡ˆ‡„€ƒ‡Š„ƒ„ƒ‚†‡„‚…‰‡ƒ~……†……„€„…„‚‚…ƒ‚€ƒ„…‚„‡†…|}‚„„ƒ…ƒƒ…„€|…„‡‰ˆ‚zyˆ‰‰†…‡€}‚Š‹ˆ†€‚„†…ƒƒ‡ˆƒ€ƒ‡Šˆ„„}€„‰‡…‰†€z{‚ˆ‰‡‡‚‚‚ƒ„„‡„††€{€‰ˆ†‚„‚~|}„ˆŒ…‚‚€ƒƒ„ƒ‡†„…ƒ…‚‚„„‡„„……„‚ˆ†‚‚„…ƒ‚…†…‚‚‚ƒ‰††„‚€€€ƒ…ˆˆ…„‚{‚ˆ†ˆ‡‚€€‚„………€ƒ„„ƒ~‚…ˆ‡„€|}…Œˆƒ……„††€„††„‚„†ˆ…‚…‚„„„‡„„„„†‚„‚„‡ƒ…‚„‡ˆ…‚}…‰‡…‚„€ƒ†Š†~~ƒ„ƒ†ƒ……ƒ„€„„…Š…ƒ€€‚‚†…‡ˆ‡{|ƒ‡ˆˆ‰…€€„Šˆ‡„„~…ŠŠƒ€~„‰†‚€‡ˆ„ƒ€‚†ˆ‡„‚‡Šˆ€~}ƒ†‡†ƒƒ‚‚€„„‚‚ˆ…„}€„ˆ‡‚„†€…‰‡…‡„€~‡‹Š„…ƒ‚‡Š‹†ƒ€€‚ˆŒŒ†€€‚‚……ˆ†‚„ƒ‡„‚ƒ‚‚ƒ„ƒƒ†…ƒ€‚‡‚ƒ††„‚~„‰…€~„ƒƒ†‡‡‚ƒ†‡†ƒƒ†‡€€„†‡…„†…‡…€ˆŠ‰ƒ‚€„…‡ˆ††…€€ƒ…†…‡…~€„„…ˆƒ‚……ƒ‚ƒ……ƒ€„„„€ƒƒ…‡ˆƒƒ~€€…‡ˆ…ˆ…€{~„†‰ˆ„ƒ‚~„‹Ž‹‚‚}…ˆ‰…€ƒ…‰…~‚ˆ‰‰ƒ‚„ƒ‚ƒ†ˆˆƒ„‚€„‚„ƒ„‡ƒ†‡…~|‡ˆˆ‡‚~ƒƒ‚€ƒ……ƒ‰ˆz|‚†ˆ‡…€€‚……€†„‚‚†ƒ€€…‡‰„ƒ‚|}…‰†ˆ†€||‚ŠŒˆƒƒ„}„‰‡…‚‡‰ƒ|~‡†‹‰ƒ„‚ƒ‹‰„……„‚€„…†…‚ƒ‡†Š‡ƒ€ƒ„„‚‡„€„…„…‚ƒ€ƒ……ˆŠ‡~~‚‹‡‰…ƒ„|~ƒŠˆƒ…ƒƒ€|~‚‰‰ˆ„€…†ˆƒ~…ˆ…}|ˆ††ƒ}€‚……„€„„ƒ…€}€†‰ˆ†~‚ƒ„„„……†„€€€…†……„……€ƒ‰‡‚ƒ†……ƒ‚ˆ‡ƒ}~‚ŒŠ‚~}‡ˆ……‚z|ˆ‹†ˆ~„ƒ‡‚†…†‚„€‚†Š…ƒ…‚‚€ƒ‚‰‰ƒ‰€‰‹ˆ||„‡††‡‡‰ˆ„|€†}…‡……‚‹Ž„}}„ˆ‡…„€†‰‰…€|†‹‹ƒ€‡ƒ„ƒ†ƒ‚ƒƒ‡„~}}„Š‹Š†€wx†Œˆƒ~‚†‹‰€„ƒ…‚€‚‚€ƒˆŠ†|}‰‹†€}‚„†„‚…„‡…€€€†‰‰‚€‚…†„‚„†…ƒ…}}‚†‹ˆ„€†ˆ†‚‡†ƒ€ƒ„……†‡„€|~„‡‰…†……„‚„…„ˆ‡ƒ„‡……ƒ‚†…‚~…‡„ƒ…‚‚„„Šˆ‡ˆ„~‡ˆ„€‹„~ƒˆ…„…ƒƒƒˆ‰ƒƒ„††€„‡…†‰ˆƒ|}‚Š‹…~‚…ƒ‚††ˆ‚†Š…€~†ƒ…††ƒ}}†ˆˆ‚€†ƒ††…€‡Š†€‚ƒ…ƒƒ„ƒ‚€ƒˆ…‚‚ƒˆ„€ƒˆ‹‰ˆ„€|‡‹‰‚€‚„‚…†ˆ†„……ƒƒ€‚Š‰…‚ƒƒ„ƒ……„…†ƒ‚…†‚‚‚„ˆ‚ƒ„…‡€€‚‚ƒ‚‡ˆˆ†€}ˆˆˆ…‚‚ƒ‚ƒˆ‡†€~…„„…†„€‚‚†‹‡}‚††ˆˆ‡…‚}ƒˆŠ„‚‡†€„†…„…‚|{„‡ˆ†€‚ƒ~‚ˆ‡†ƒ‚ƒ€ƒ†‡„ƒ…‚€ƒ†‰‡€‚‚„†„ƒƒ††‚„†…„„ƒ„‡‰„„‚‚………„†‹†~„‡†…†‡†€~‚……††‚‡„z{„†ˆŠ†|ƒ‚ƒ………€‚†‰…ƒƒ……†ƒ…†……‚‚‚†„…†…‡„„†„†„……ƒ†‚„ˆˆ††ƒ„‰‰‡‚|…„…ƒ‚†…„„€€…‰†ƒ‚†…~{†‰‡€€ƒ„€„ˆ…††„€„„……„…„€~……‡‡„‚‚ƒ‚„ˆ…†„…‡„……„†ƒ„„‡‚ƒ„‡„€‚„††„„…ƒ‚„…‡‡„…‚‚€‚…‰…‚ƒ„„†„ƒ……‚€‚……‡„†…€}€ˆ‡ˆ‡ƒ€‡‰‡ƒƒ…ƒƒ††‚~ƒŠ†~€†‡„„…„……ƒ‚ƒƒ…„‡……„€€ˆˆ……}‚…†…‚‚„…†ƒ€~…Š…€ƒƒ~~†Š…ƒ‚€€€ƒ„„„„„††€€ƒ‚‡††…„†€~ƒ„‡‡…€ƒ†„†‚‚„ƒƒƒ‡ˆ…{‚†ˆ„ƒ‚‚ƒ…‚ƒ…‡‡ƒ‚€‚……„††€ƒƒ„…‚†ƒƒ‚€ƒ‚ƒ…„‚ƒ†‡„€~‚†…‡„‚„ƒ€„……„ƒ„„„„†‡ƒ€„‰ˆƒ‚‚†„ƒ…†„~}„ˆŠ…‚„€…ƒƒ†………„~…ƒ„ˆ„‚€ƒ„„ˆˆƒ‚…‰ˆƒ†„ƒ‚ƒ†‰‡€‚†…ƒ„ˆƒ~‚†‹‡„ƒ€ƒ‰‰……‚……†„„‰…ƒƒ†‰‡‚ƒ‚„†‡…‚ƒ†…‚„…„€†…ƒ…€ƒ††…‚€‚ƒ††ƒ~~ƒ……ˆ~‚ƒŠ‡‚‚€€†‰‰ƒ~ƒ…†ƒ†‡‚ƒ…‡†ƒ‚€†‰‰†€€ƒ†…‰ˆƒ~ƒ†‰†‚†‡…ƒ‚…‚‚„…‰……„‚„…‚„‚ƒ„„€…‚ƒ…‡…€…„„„ƒ†ƒ‚‚€†ƒ€ƒ„ˆ‰ƒƒ‚ƒ‚…†ˆ…‚ƒˆ†„ˆ…}‚…ˆˆ‚€€…†„„‚„†„…„„€†ˆ…„€‚€„…ˆ„}€ƒ†‚ƒ„‰…~„‡†‚†…€ƒ…†‚ƒ†‡‡…ƒ…„…ƒ„ˆˆ„‚…‡‡‡‚„…‚ƒ„††ƒ†ƒ†…„€€‚ƒ……†ƒ„……ƒ€€„ƒƒƒ€~„‡‰†~‚„‡ˆ…ƒ~‚ˆ‡‚ƒŠˆƒ‚ƒ‡ƒ‚…‚„†ƒƒ„„…‡„ƒ€€‡‰ˆ†€‚‡‰ˆ„ƒ‚„„ƒ‚…ƒ‚…‰„€ƒ„„†„‚‚~„ˆ„„ƒƒ……„‚……ƒƒƒ„†………ˆ„€†…„„†‹‡€ƒ„‰Œƒ‚‚ƒ†ŠŠ…€ƒ††‚‚„‚‡†ƒ‚ƒ†……‚…†‰‡‚ƒƒ……€ƒ‡Š…€ƒƒ‚…†„€†…‚€ƒ„„…„„„‚„†„…‰ƒ~~ƒ†‡…‚‚‡‹„‚‚…‚ƒ„‡‡„ƒƒˆƒ‚‚‡‚‚†ƒƒƒ†……ƒ‚††‡€‚……„‚€‚„…„„€~‚„Šˆ‚€~ƒˆˆƒ~‚…‡ƒ‚„…ƒ†ƒ‚‚„„‡†ƒ†‡„„€€„‹‰…}‚‡Œ‰„|~‚ƒ‡‰ˆƒ€„„†‚~‚ˆˆ†‚†‚†††€‚‰…€€‚„„††‚„…„‚ƒƒƒ††„…„ƒ‚…†††ƒ€†„……‰‡„‚ƒ†††…………€€ƒ†‡ƒ…†„‚‚ƒ…ˆˆ„ƒ€‚†‰†‚‚…†ƒ‚……‚€ƒ†‡…‡ƒ~‚†„………„ƒ………‡„ƒƒ‰‰…€‚ƒ…‚†Š‰‚€†„‰ˆ„ƒ‚ƒ‡ˆ„‚ƒ…„‚‚€„†€€„ƒ‚‚„‚€……‚„…€€ƒ††ƒ}„‡ˆ…„†…„€‡…‰‡ƒ…ƒ€€„‰ˆ„…ˆ„‚€‡‡‡‡‚‚„„…ƒ‚ƒ…‡€„ƒ††„…ƒƒ‚‚„…ƒ†‡„€€……‚‡€…‚‚‚„†…†‚}€…ˆƒ„‚„€……‚†ˆŠ‚{ƒ„‡‹„…ƒƒƒ€ƒŠˆ‚„‚‚€‡‡„„‚‚‚‚„…„†……€‚ƒ…‡ƒ€‚…‚€‚†‡†…~‚€†††…ƒ€}~‚‡‡†…ƒ‚„ƒ……„„„…„†„€‚…ˆ‹…}}ƒ‰‰ƒ„†‚„„ƒ„…‡ƒ†Šˆ{‰‰…‡‡€€†‰‡ƒ‚ƒ„Š„ƒ€ƒƒƒ‚ƒ„ˆˆ‚ƒ€…†‚„‚‡†€††‰…~‚…†ƒ…†ƒ…€~„ˆ‰…ƒ†„‚ƒ‡†‰†ƒƒ‚ƒ„…ˆˆ‡€{‚‡ˆ„„‚„€~…‚ƒƒƒˆ~ƒƒ€‚†‚„…ƒ‚ƒ„ƒƒ…„††„ƒ€ƒƒ†…„„€€‚…ƒƒ…ˆ……†…ˆƒ†„‚€ƒ‡‰‡„€…‡‹†‚‚†…ˆŠ‡ˆ‚ƒ†ˆ‰Š‡ƒƒ‚ƒ„‡‰…ƒ…Š†|~‡Š‰†‚€‚„„…ƒ„…††„‚€„……‰ƒ„†ƒ…‚„Š‹ˆ‚€€‚ˆŠƒƒ„ƒƒ…„†‚ƒ‚„‡‚€€„„ƒ…ƒ„|}…‹†}€‚~…†„ƒ‚ˆƒƒ€|ƒ„„€€ƒ‰„~|}‡‡„ƒƒ~|…†…ƒ‚…‚ƒ~€†„‡„‡ˆ‚‚ˆˆˆ…†„~ƒ‹Œ‡„~…„…†„„‡…„ƒ€ƒ…ˆ†††~‡ŠŠƒ„„‰ˆ†‚ƒ…‚„‡‡ˆƒ„„‚ƒ‰‡‰‡†ƒ}‚ˆŠˆ‰‡‚„„‚„…ˆ‹Š…}ˆ‡‰ˆ…€~‚‰‡ˆ…‚†‡…‚ƒƒ€‚ƒ…ƒ‚…ƒ€{}ƒ††„†}€ƒ„ƒ„†…}‚„ƒ„ƒ†…€ƒ‚…††„€{€„†ˆ†…~‚†‰‡ƒƒƒƒ‚…†‡‰„†‚€…‡‡‰„†€‚„~ƒ…‰‡€‚ƒƒ~…††…†‡‡€}ƒ†‹…ƒ„††…„‡‰ˆ‡…„~ƒˆ‡††„„‚„†††ƒ…ˆ…„‚…ˆ‰‹†€‚††‰ˆ‚ƒ}…Š‡ƒ„„€|ƒˆˆˆ‚{~‚…‡…„„…ƒ€|ƒ…„ƒ………‚|…‰†‚ƒ€„††„‡…„ƒ…‰‡†……‡ˆˆ†‚ƒ‚‚…‡‡ƒ‡‚~‚‰Š…ƒƒ†„‚€ƒŠˆ…ƒ€‚‡ˆ‚‚ƒˆƒ‚€€†„……„ƒ€€†‰†…ˆ„~~‚…ˆ‡†ƒ€‚…ˆ†…†„€ƒƒ‡ˆƒ€€„‡ƒ€ƒ†ˆˆ†‚ƒƒ€ƒ…††…†‚„„~ˆŠ†ƒ€€‚„†……‚„‡†}~„Š‰…‚„ƒ„†ƒ…‡ƒ„„……†„‚‚…ƒ†‡„€…‰†ƒ„‡…ƒ‚†‡†„‚„‚‚„††ƒƒ……†‚€ƒ„†„„ƒ‚‚€…‡…ƒ„ƒ„‚„‚…‡„‚€††ƒ…ƒƒ}‚†Š†„€‚…†ˆ‰…~~ƒŠ‰……‚ƒƒ‡ˆ„‚ƒ…„ƒ‚ƒ‚ƒ‡†‡‚€ƒˆ‹†‚€ƒ…ˆ‡„~‚„„…„€€†„~…†„€‚„‚ƒ„††…‚‚†„†…‚‚‚……„ƒƒ…‡†„ƒ…ˆ……†…‚ƒƒˆˆ†‚€€‚††„…ƒ„…„‚‚ƒ€†…€„‡ˆ‡‚~{…ˆˆƒ„…ƒ‚~†ˆ‡††„~€†ˆ†„…ƒƒƒ„‚ˆˆ††‚‚€†Šˆ…ƒƒ‚††ˆ„…~…‰†ˆƒz‡ˆ‰ƒ~„ƒ‚„~„„…‹~|ƒƒŽ‹‚‚€Œ‘Ž‰z|…‹‹ˆ„‚ƒ………€„|}ƒ…‚}ƒ€€€…‚ƒ‚‡ˆ„‚€†‡‰‹‹ˆ€~‚ˆ‹…ƒ…„…ƒ‚…‡…‚}}€‚…‡†|~„†„‚ƒˆ†…„…„„ˆ‡Šˆ‚‚„†‹†„ƒ††…‡…††€}~††‚ƒ{{}‚††ƒ~„ƒ‚„„„†ˆ‡ƒ€†‡‰Šƒ‚‡‡†€ƒ†‰ˆ„ƒ€~‚………„ƒƒƒ€}…‰ˆ„‚„~|‡Œˆƒ…„„ƒ‚„„…‰†€|‡ŠŠ„…ƒƒ†…†……~}…ŒŠ„€~€‚…ˆ†‚ƒ‡‡|†‰……„‚}…‰Rw·•Çϸšt¥¢¨‘qpqmlXMOFLUPZhs‚ƒ{}{€‹ˆƒ||„‡‚€†ˆŽ‘‘›œšš˜Ÿ¢Ÿš˜•Šƒ…Œ„ƒyy~„ˆ‚‚||zƒ‚|z||||zzxz|vuw€……†‚……„††‡‡††ƒˆ‹†ƒ~†‹ŠŒŒ‹ˆ„„ˆŒ‹‹‰ŽŠ„~…‹‰††€€}†††€|}„‡}}}‚„‚ƒ‡€{|€Šˆ‡‚†…ƒ…‡ˆ‡‡‰‡~€„…„‚„…„‚€†ˆ†ƒ‚ˆ…ƒ††…„†ˆ„€„…‹Šˆ‰ƒ€~ƒˆˆˆ‚…„‚…ˆˆƒ€‚‚„‚€„…„{z€ƒˆ‚}€€~~€€…ƒ‚~~ƒŒŠˆ‰ŠŠˆ…ˆ‹‹‰………†„~}†ˆ…€€ƒƒ„…„‡Š…€…†…‡‰‰}ƒˆ‹‹†‚ƒ‚„„€€€ƒˆ†‚€‚}|{„ƒ€~}|~€‡‡‰‚~……†‡‡†…ˆ‹‰‡…„‚†Š‰„ƒ…‰‰‡†ƒ„‰‡…ƒƒƒ………ƒ……ƒƒ‚ƒ‡†ƒ}‚††…€€†…~~ƒ‚€ƒ‚‚ƒ~‚……|…‡ˆ†€€††ˆˆ…†ƒ‚„…‡………„‡‡„‚ƒ…‡ˆ…‚ƒ†„††ƒ‚‚„ˆ†„„‡…‚€ƒ…„‚††„‚…ƒ…†„‡€‚„††ƒƒ…‚‚„„…„ƒƒ††„‚„†‡…ƒ‡…‚ƒ……„ƒ‚‚†ˆ‡ƒ€„…„„ƒƒ„„€€ƒ……ˆ…€€…ˆ†ƒ„‡‡€€„ƒ‚ƒ„ƒ„ƒ‚…„‚ƒƒ†…ƒƒ‚„ˆ†ƒ„…ˆ„€€‡„„†…‚|„‡Šˆ‚„ˆ‡„‚ƒ„†‡†‡‚~„ƒ„…†‰†‚€‚ƒ„†‡„ƒƒ‚†ƒ…ˆŠ†~…ˆˆ„€ƒ††„€ƒŠŒŠ†€‡ˆ†„‚€„ƒ‚†…ƒ}‚„…ƒ‚„‚‚ƒ†‡…‚ƒ‰‡‚„‚ƒ„‰‡„ƒ€……„€ƒ…†…‚€€ƒ…ƒƒƒƒƒ†…„€„ˆƒ‚€ƒ…‚……„‚‚„„††„…‚‚…†„ƒƒ„††ˆ„…†…ƒƒ‚ƒ„‡…ƒ€ƒ…†ƒ…„ƒ‚‚ˆˆ†}€„†‡†‚„†…‡…~„…„ƒ…„ƒ„…†‚€ƒ‡ˆ„ƒƒ‚…„‚‚ƒ…ƒ€ƒ‚„ˆ…‚|}ƒˆŒ†€~††„ƒ…ƒ‚†‡…ƒ‡Š…‚…†„„‚€„‰‡ƒ~‚…„„„……‚~††„‚„‡„€‚‚€„‡†„ƒ‚ƒƒ„‡ƒ€††…ƒ‚ƒƒ„†‚‚…„ƒ„†„‚ƒƒ…‡…„„‡ˆ‡ƒ‚†‰‡ƒ€„ƒ„„„„„„‚‚ƒ‚ƒƒˆŠƒ|€„†ˆ…‚ƒ‚…†…€€„†…‚‚„„„†ƒ‚„ˆˆ„‚€€ƒˆ…„‚„…‡‡‚†‡†ƒ‚……‚†„ƒƒ„†‡„„€€ƒ†ˆƒƒ†ƒ~€…†„‚…ƒƒ†…~‚ƒ„†…‚ƒ}€…‡‡„‚…†„€‚†ƒ…„ƒ„‚ƒ†‡†‚†‚‚„‡‰‚€‚…‚ƒ„††„‚ƒ„†‡‡‚€…†ƒ~zww{~~{}€„†…ƒƒˆ‰†ˆŠŽ‹Š‡‹Šˆ„†‡ˆˆ†ˆ‡†††ˆ„ƒ„‡††…ƒ…€‚{{~„‚~z}††‚‚‡†~†„‡………€‚…‡„€€€„„„ƒ‚ƒ‚„…‡……Š‡ƒ„†‰‰…„…†ˆ…‚€€€„†…ƒ†ƒ…ƒ‚…Œ‹†„‚‚„…ˆ†ƒ„‡……ƒ„‚„…„ƒƒ„‚„ƒ‚‚ƒƒ„…‚‚‚~……†‚„Š‰…†‰Œ‹ˆ†…‡Š‡‡ˆ‰„€‚…ˆ‹‡„†Š‹ˆƒ‚…‡‰ƒ~€€‚||~€€~~……€€~|‚€}zz~~}~~ƒ}|€„…„„…‰Š†…†‡‰ˆŠ††ŠŒŒ‹…†ˆˆ‰‰‰‰ˆ……„†ŠŠ…‚…‹‡‚„……‚„‡ˆ…ƒƒ‚……ˆ…„†††„‚€ƒƒ„‡†„€|†††ƒ~€‚ƒ„€‚„„‡„‚}{‚…ˆ†~‚‚„ƒƒƒ‚†„‚€ƒ…‡…‚€ƒ„……‚€„†‡†‚~„†…ƒƒ†„ƒ†„…ƒˆˆ……‚€ƒˆˆ‡‚€‚‚…„‚}‚„‡‰…~„†‡ƒ…‡†ƒ‚€„„…‡ƒƒƒ…„‚ƒ†‡…„„ƒ‚ƒ„ˆˆ†€|€„‰ˆ„‚€‚Šˆ…}ƒ…ˆ†…†‚ƒ†‡ƒ€€………‡…|ƒ†ˆˆ„~}€„‰‡‡€}ƒ……‚…‰ˆƒ‚€‚…‰ˆƒ„‚…‡ˆ†ƒ…ƒƒ†‡‡ƒƒ„†††„…„„‚€‚ˆ†ƒ„†‡ƒ~‚‡ˆƒ€„…ƒ€€„ˆ‡…„‚„†‰…ƒ„ƒ‚‚†‡ƒ‚„ƒ‚~‡‡‡€}}~„ˆ‡……ƒ‚‚…†…ƒ€‚‚„‡‡‚…†„ƒ€ƒ†„„‡‡ƒ†…†ƒ‚…†„€‚…†ˆ„††„„‰‹„ƒƒƒ‡‡…ƒ…†ˆˆƒƒ„ƒ„…††‚‚ƒƒ„†‰…‚‚ƒ‚‚†‡†…†‡…‚†ˆ‡„~…‹Ž”•™œ”ŒŠŠŠ‹‡~yxvutqpjnuwusvy}{}z~‚……‚~‡‡‹‰†…†‡ˆ…‡…ˆŠŒŠ‡ŠŽ‹ƒ€€~€€‚„„{y}‚‡Š‰†„‡‡†„„ˆ‰‰ƒƒ|€„‡„}z€ƒƒ€ƒƒ†‡‡Šˆ‡„„…ˆŒŠƒ‚†‹ˆ‡‡‰‡…„‚„‡‡…€‚ƒ„‚~‚‚„…€~„ˆ†ƒ€~€ƒ„‡†‚€ƒ†…ƒ‚„„…ƒ„„‚ƒ…‚ƒ‚…„‚†…‚}‚…‡…‚„€…†…„ƒƒ…„…‡…‚€‡‰…ƒ‚}ƒ‡‰…‡‰Ž’”’Ž‰ŒŽŠ‰‰}€„€yuqu{xxyxusuy}}yy€ƒƒ††„††‹Œˆƒ€†Š‡‡…ƒ††ƒ†ˆ‰Šˆ†…‰‹ˆ„ƒ‰‹Šˆƒƒ‚„ƒ††ƒ‚„†‰ˆ‚„†Š‹†„‚…ˆ…‚‚‚…„€|€…Š…‚„‹‰‹„}~‚ŠŒˆ„‚††ƒ€†ŠŠ‚ƒ…ƒ‡†‡~„ˆƒ€€‚€ƒ‡ˆ‡{€…†‡†…†~€‚…Š‹‡€…‡„……ƒƒ„ƒ€ƒŽ•œžš”‘Œ‹‡…‚}|zyqronlnrswtpnsw|||{{„‡‡ƒ€‡ŠŠŒŽŽŠ†ˆŒ‹‹Š‹‹‰ˆ‡‰Š‰‹‹‰…‚…ˆ‡‡ˆ‰…ƒƒ…†ˆ†}ƒƒ‚{…Š†€ƒ€|}‚ˆ‡‚€ƒ„ƒ‚ƒ„‡„„‚€‚†‡„ƒ€„ˆ‡‚‡ˆ†…‡†}}…‡ˆ‡†„ƒ‚‚……„…ƒ‚‚€…‡……ƒ‚‚‚‚ƒ‰‰‚„…€{ƒŠ‰‚€„‰‚~€ƒƒ…††}„…†…ƒ†‰ƒ€ƒ„„‡†ƒƒ‚„…ƒ‚…†……‡‰„‚ƒ‰†‡†‡†~€†„‡†„…‡‡‚…„‚„ˆˆ€{„‹‹…€‚ƒ‡‰†‚‚„ˆ„~{€†‡†„‡†}~€ƒ‰†‚ƒƒ…ƒ„…ƒ„…„€‚„†€„†‡€|ƒˆˆ‡‚‚„ˆ†€…††‚€………‚~‚†Šˆ„‚‚„‰‰…‚†…ƒ€……ƒ„‚‡ƒ€‚…†…ˆ…‚|~…Š……ƒ…†ƒ€…ƒ€ƒ†…„„…‚„€‡Œ†‚……ƒ~†ˆ…ƒ„‡‡…‚€…Šˆ…ƒˆ…‚ƒ…ƒ„…„ƒ€€‚„…„‡„ƒ~„†‡„…‡€€€†‡„……‡……ƒ‰ƒ‚ƒ‡‚‡‰…„€€€……„……ˆˆƒ}|‚ˆ‡‰ˆ…ƒ€}‚ˆŠˆ††…„~}zw€•£±¹¯¡—˜—”‹‰‚qihfeb^^bikebkorw{~‚ˆ‹Š‰Œ‹Ž‹‰†…Ž‹‹‹Œ‡~„Ž‹‹Œ‹†‚„„ˆŒ‰ˆˆ†‡‡…†ŠŒ‹‡…‡‰Š‡„‚ŒŒˆˆ„‚„ˆ†~|zx{‚ˆyvvstyxvv~€zty€‚‚„…‡…‚ˆŽŒŠ‹‹‰’–’’Ž‘ŒˆŠŒ‹‡‰†„€|€††ƒ|}|}~y}~{~„‡‰ƒ‚…‚}z‚ˆˆ„ƒ…„€‚‚€ƒ„†…z|€†ˆ„|„ƒ„‡…ƒƒ………†„ƒƒ„†‹‡‚„ˆ…†ˆ……†…‡†‚„ƒƒ……ƒƒ‚ƒ€}„ˆˆƒ€‚€„‡†ƒ‚„…~~€†Š…‚ƒ‡…}„‰ˆ„…ƒƒ€…ˆ‡„‚ƒ„……ƒ„†ˆ‡‰‰„€„‹ˆ…†„€‚ƒ†ˆˆ‹‡‚‚„ƒ„ƒ‡†ƒƒ„‡ˆ~{ƒ‡‡‚‚„ƒƒ„†‡‚‚€€‚„„‡„ƒ~„‡…‚‚…†~‡„…‡‡ƒ}€†ˆ††…}‚‚„†‰…€€‡…‚~‚‰………‰…„‡…‚„ˆ‡€~‡‰ˆƒ€€ƒƒ‚‚„ˆ†‚€‚†„‚~‡ˆƒ~€‚ƒ‰‡„„„€~…‰‰‡ƒ„ƒ†‡Šˆ„€€‚ƒ†ƒ‡‰†„„ƒ…ƒ…ˆ…}~ˆŒ‰}‚…†„ƒƒ…‡€ƒƒ‚ƒ„‡ƒ€€€ƒˆ„ƒ…„‚~‚‡‡ƒ…„†}‚ƒ‡ƒƒƒ…„„ˆ‰…‚}…††…„‡…„‚„ˆ„~€‚‡†‰ˆ‚~†‡ˆ†…„„ƒ‚„„ƒ‚ƒ‡…‚‚ˆˆ…†„…}‚…„…„ˆˆ‚~ƒ„†ˆ‡†…‚„ƒ………‰ˆ…~‚ƒ‡‡Šˆ€~ƒ††ƒ‚…„ˆ„|€‡Œ‡ƒ‚€‡Š…€ƒƒ„„„Š‚‚…‡‚‚††ƒ€…†ƒ††…}„‚€„‡ˆƒ‚ƒ„†…ƒ†ˆ„…‡‡…ƒƒ‡‰ƒ}~…‡Šˆƒ€††‚ƒ„†ˆ‡€‚„ƒ„…„†…}€‡‹ˆ„~ƒŠ‡†ƒ‚‚€…‰†…„|~…ˆ‡ƒ€‚‡‡„€ƒ‡ˆ…‚ƒ…„ƒ‚ƒ…ƒ‡…‚‚„…„„‚ƒˆˆ„„‡ƒ€}€‡‡‰‡‚„‡‡ƒ„††‚…ƒƒ‚…„„„‚ƒˆ‰ƒ†„|{„‹‰ƒ„†„‚‚„ˆ‡„€†ˆƒƒ„ƒ†ˆˆƒ‚ƒ„‡„„ƒ‚†‰‡€„………„€†…‚€…‡‚ƒ…†ƒ€€~…‰ˆƒ‚~€‰Š‡€„ƒ‰Š„ƒ„‚†‚‚„ˆ„{ƒƒ…‰ˆ†ƒ‡Š‰„„‡…‚€†ŠŠƒ…„€ƒŠŠ†€€…„„‡ˆˆƒ€…†…„…„ƒ€‡…‡……‰†‚}€‡ˆ†ƒ……ƒ‚|ƒ†††‚††…}{‚ˆ‡ƒƒƒ~~„‰‹„~~†‡„Š†ƒ€†‹„}z€ŒŽ‡|†„€}‚ˆ†„„‚„ƒ€€ƒ†‰…†ƒ‚{~‡‹…€„…€ƒƒƒ‡Š‡„zzŒ„~ƒ„‚|~‡‰ˆ…€‚…„€ƒ„Œƒ†…‚~‚†ˆ……„€„††‡†‡~ŠŠ…‚~…ŠŒ€zz„Š‹ƒ}~„ˆ‚z~‡Šˆƒ}€„†…ƒˆyzƒ……~y}ƒ†ŠŒƒz|ƒŠ‰ƒ€€††ƒƒ‡}|‡Š‡„zƒƒˆ‡z‚„Œ‰{~€~…††‰‡‚{u~Œ‰€}‡Š†|„Š„|~‚††…„†‹ˆ}yƒŠŠ†~„‡†ƒ~~‰‹ˆˆ€~…‡‹ˆ„„ƒ†‰…}‡ŒŽƒu|ƒ‹‹‡……†‚‚‚ˆ†„ƒ‚ƒ…ƒƒ‚„ˆ€‚†ˆ‡…y†…‡‰‡‚ƒ‡„†‡„‚ƒ‚†ˆ…„„„€…„‚ˆ‡‡~€€‚…‡„‚„‚ƒ‚„„…‚‚}‚††‡†‚ƒ€€€„‡Šˆ„}}‚†„„„‡Š‡v~ˆ‹ˆ‚„†ƒ‚‡ŠŠƒ€‚€€…ˆŠ…ˆ…€‚ƒ„†‰ˆƒ€€‚‡ˆ‡ˆ€}€„‡†ƒ‚…‚~‚ˆˆ…‚„ˆ‚„ƒƒ…‰†€~…‡†‚‚„…„„ƒ‚‡ƒ‚„„ˆ……„…†„ƒƒƒ„ƒ„†‹…€€ˆŠ‡~}€…‰†‚…‡‰}‚ƒ„ƒ……‰ƒ{„‰„€ƒ„ˆ…€}‰Œ‰ƒ}†…ƒ‚ƒ…„ƒ…ƒ…„…ˆ‡ƒ|~ƒ„‡‰Š†}~‚†ƒƒ†††…ˆˆ…‚‚‚„„…„€ƒƒ††„‚‚‚„†ˆ‡|y€ŠŒ†€~ƒ…‚„‚ƒ†‰ˆ‚{{†Šˆˆ†~€…„…ˆ…ƒƒ‚~‚„ƒ„„ˆ„€‚ƒˆ‡…‡ƒƒ‚ƒ…„„ƒƒƒ‡ˆ…~|‚†‰‰‰†}}‚ˆ‰ˆ…ƒƒˆ…~†…Š‡‚…ƒ‡‰‰‚‚€‚†ƒ„…‚„…„€{}€„ˆ‰†‚‚{…ˆ…†…€}~ƒ…ˆˆ„€}†ˆ‡€‡‡‚~ƒ†‡„…‡€„…†‚€„†ˆ…€„…„†††…€…‰Š„€ƒƒ‡……‡„ƒƒ€~‚†‰ˆ……|ˆ‹{€†‰ˆ…„€„‡†‚ƒˆ†…„ƒ‚€‚ˆŠ‡…„‚„ƒ†…„ˆzyv|…ŒŽ‹ˆˆ‰‹…„……„}|‚ƒ†„}€}€„‡ˆ€{|{}zz~x{‚‚€z}„‹ŽŠ†‰‹Œ‰‰‹ˆŠ‰ˆŠŽŒˆ‹}ƒŠ“•‹ŽŒŒ’‰}|y{yzwvtuyywy|{~ƒ‚€„†ˆ‡ƒ…‚„…ƒ…„€|zƒ„~ƒ‰‰…ƒ…ˆˆ‰††ˆˆŠŒ‹‡„ˆŒ‹Š‹‡„‚ˆŽ‹†…Šˆ‡„ƒ…‡‡„‚~€†ˆ‚‚ƒ„~ƒˆˆ„‚~€„‡‡‚ˆ‰{}ƒ…ˆ†€{}„…„…ƒƒ~†ˆŠ„}~ƒ†‰ˆ‚‚ƒ„ˆ‚„„ˆˆ†‚€}„†…‰…€„‚„‚‚€‚„ƒ„€€‚ˆ†…‚}‚„ˆˆ„…‚~|ƒ…ƒ„…Š†~~€ƒˆ‹†ƒ€€††„ƒ„„…Šƒ~€…‰‡„„‚‚„†‚ƒ‡„††…~…ˆ‰ˆ‚…€‚…‡‚€‡ƒ‚„‚„‚†ƒ~…ƒ„ƒ}‚†‰†ƒƒ…ƒ…‚„………ƒ}ƒ‡ˆ…‚…„…€~‡„‰†ƒ€€ˆ‰ˆ‚~…ˆ†„„‡ˆ‡‚…‡„}~…†„†‡††|…ƒˆ„‡‰…‚~€‡…„†…‡‚|~„†‡‡ƒ‚…‚‚‡‡‹‡€€}€„‰‹…„„„„ˆ„„ˆ‡€ƒˆ‡†„†€„ˆ†…†ƒ‚‚…‚‡ˆ…~}„ˆ„€~ƒ‡‡€„†‚‚†„†…€„ˆ†‚„„ƒ…‚€‡†‚‚„ƒ€…‡‡ˆ………ƒƒ†ˆ€€…ƒˆ…ƒ‚€ƒŠˆ‚ƒƒ‚~‚Š††„…ƒƒ‚~„‡‡‚}„„„ƒ‚„‡†‚‚†‡ƒƒƒ‚€‚„…„„…ƒƒ„„…ˆ„€„ƒ‚‰‡†‡ƒ€ƒƒ…‰†ƒ‚ƒƒ€„ˆˆ…„„ˆ†‚}}ˆ‹ˆ}€„„…ƒƒ†‡„‚‚ƒ„†‡„ƒ……‚„††…‚}‚…‚„††€}„„ƒ„…ˆ‚„‚ƒƒ|€…‰ˆ†‡€{‡ˆ„ˆ††‚~…Šˆ†‚„‰‰…††‡„‚ƒ‰‰…ƒ†„‚€„†……„…ƒ…ƒƒ‡†‚‚…„€ƒ„†‰…€|z…‰‡…‚‚‚†………‡…~†‹ˆƒ|~‚†‡„‚ƒ…„ƒ€€†ˆŠ†|„ˆˆ„€ƒ…€…‡ƒ‡„„‚~€†ˆˆ‡‚‚„„‡‚…†„„‚„„‰‚ƒˆ‰„ƒ}|‡†ƒƒ‚‚ƒ‡ˆ‰…‚ƒ…†€„ˆˆˆ†„‚„ˆ†„†…‡ˆ„‚|‡‰„‚‰ƒ€‚ˆ‰ƒ…†„‚‚†‚†††„€‚ƒƒ…ˆ†€~|‚‰‰‡~ƒ‚…„€€‚†ˆ‡€€|~‡‰‹†}|†…„„ƒƒ…†ƒ…ˆ†Š…~„‹†„€…ƒ„€‡…„‚ƒ†…~}ƒ‹ˆ‡…~„‡…‚‚ƒ„…„ƒ€ƒ…ˆ…~{‚…‡…ƒ€ƒ‡ƒ†‡‡†}€€‚„ˆ‹…‚…ƒ€‚Š‰„„„ƒ‚‡††‚ƒ‚…‚„‡‡ƒ~‚†‡‚„‡‡‚~€ƒ‰……†}„ˆ†…ƒ„‚€‚„…‚‚‚ƒ„„‚ƒ„†Š‰„}~ƒ‡‰‡„…‡ƒ‰Š†…ƒ‚ƒ‚‚„„‡‡…ƒ‚€ƒ††‡…‚„…„‚„‡‡†ƒ…‚€€ƒ†ƒ†‡„‚ƒ…‡‡ƒ~€…ƒ…‡…„€‚ƒƒ…ˆ‡„…€€„…†„„†ƒ‰†„„„‚‚‡‰†ƒ……ƒ‚ƒ†ˆ‚}„†Š…~ˆŠ‡€ƒ…ƒ„ƒƒ‡Šƒ„ƒƒ€ƒ„„‡‡…„€……„‡‡ƒ…ˆ‡‚‚ƒƒ„†……‚‚ˆ‡„ƒ‡‡‚€„…‡‚‚†ˆ‡†„„†‰…‚„€…ˆ€‚ˆ„„†ƒ~ƒ‡‡‡~|…†…†‚†„‚€ƒ†„‚€„ƒƒ‚}yˆ—ŸžŸž•”‘ŽŽŠ‹„zroqqlffiklmlpuyy{z}‚†‡‡ˆ‹ŽŠŽ‰Š‰ŒŽ‹……ˆŒŽ‹ˆˆŠŒŒˆ‚‚ƒ†„ƒ~€„‡…ƒ‚ƒˆ‡„„…ˆˆ„„†ˆ„€€ƒ…ƒ}‚ƒ€€}|„„ƒ€|€ƒ€…ˆˆ‡ƒƒƒ†‹ŒŠ†€‡Šˆ‚€ƒ…ˆ‰‡‚€€‚„†…€ƒ…ƒ€‚€ƒ‚…†„ƒ„ƒ‚ƒ‚ƒ„„…†ˆ„„ˆˆ„‚†‰‡€}€„‰~‚†‚†„€}€†‡†…‚€€‡ˆ‡„„‚€„„‡…~„‡†„€‡‡…†‚€€€„‚‚ƒ…†‚„†ƒ‚€€‡‰„‚…Šˆ‡…‚†‹Œ‰‚~‚‡Šˆ………„„‡„…‚€„„ƒƒ„‚ƒ†…ƒ€†ˆ‰„€‚…„Š‰‡ƒ€…ƒ†„ƒ‡…‡‡€}~‚„ˆ‡‚€…ƒ„ƒ€ƒ…ƒ‡‚€‡…‰†„†††‡‰……‹‰‚}‡†‡ˆ„~……„ƒ‡„ˆ…ƒ‚†Šˆ‚}€„‡‹†„|x†‹ˆ„‚‰ˆ…‚‚†‡…€€ƒ…‡‰…€„†ˆ†„ƒ†…‚ƒ„ƒ…†„‚…‡„€ˆˆ„~}‡‡†‡„…ƒ~€†Š‰ƒ€‚„†‚‚……†ƒ~€ƒ‡‰…‚…‡‡ƒ„ˆˆ‚~~„ˆ…‚€‚…†„„‰…‚ƒ††‡ƒ„‚„†€‚…†ƒ€ƒ„„„‚‚…ˆŠ„€…‡„„ƒ€ƒ†‡ƒ~‚‚ƒƒ†„…€†ˆ‡ƒ€ƒ†„…†„‚‚ƒ……ˆ„„…‚…†…‚„„‡‡„‚‡…ƒ„‡†ƒƒ‚…‡ƒ‚†‡„ƒƒƒ…†‡ƒ„‡‡…€~‚„ˆ‡†|ƒ……‡†ƒ‚„…‡ˆ‚~~‡‰…ƒ‚…ƒ‡‡†„‚†„…†„‡ƒ€„…†ƒ…ƒ„‹ˆ„€‚ƒ‚†‹ˆ„ƒƒ€„…‚‚„ˆˆ„~ƒ†„„†„ƒ„……„†‡‡‚‚‚€€ƒ……‚†„€‚‚€…‰ˆ‚€|…‡ˆ‚…‡‚ƒ…‡‡‚„„„‚†ˆ‰……€~‚„Šˆ†€†‚†…ƒ…‡‰ˆ„ƒ€„ˆ‰†€‚‚„…‡……‚ƒƒ…„ƒ‚ƒ‚‚ƒ‚‚„‡…‚„‚‚€…‡‹…€„‰Š‡†Š‡„€…ˆˆ†€†‰…‡…‚…†………ƒ‚„‡„€„†…‚ƒ†„„‚~‚††ƒƒƒ…‚…€~‚†‡‡}~ƒ†……‚ˆ†€~‡†„„‚ƒ…„…ƒ€‚Š‰†„‚†‡„ƒ…„€€ƒŠˆ„~ƒ…†‡†„‚€……„†„€ƒˆ‰„~~€ƒ…‚††‚‚…„‚‚‚‰ˆ†ƒ‚‚‚†„ƒ‡ƒ‚„ƒ†„‚„‚„€……‚†…„†„ƒ€„‡†…††„‚€€„‰Š†ƒ€‚„„‚„…†ˆ„~‚„„„„ƒ……ƒ€……†„‚‚†…ƒ€ƒ„‡‰…~}‚†‰‡„‚„„„‡‡‰‚„…‚ƒˆ†……€…ˆ†…‚„ƒƒ‚ˆˆ‡„‚ƒ…†‡†‚ƒ…ƒ‚‡†…€ƒ†‡„†ƒƒ~‚ƒ‡„‚ƒ†……ƒ~„†ƒ„„„„‰‡„€…„ƒƒ‡…ƒ„ƒƒ‚€„‰“‘‘‘ˆ‡‡‡‚~|{}€xuwz}ystv{„‰‰…ƒ‚……„ƒ‚„ˆˆŠ…€}|‚‚ƒ„‚~~ƒ‡ˆ‡ˆ‰‰‹Š‰Š‹Ž‰ŠŒ‹†………ˆŒŠ……ƒ€†„‚~€…„}|{}ƒ‡‚|€ƒ†„„‚}€„…‰‰„€…†ˆ‡ˆ‰…ƒƒ„‰ŠŠ„€‚„ˆ†…‡†‡†ƒ†…‚ƒ„‡Š…€€‚†‡…ƒƒƒ„ƒƒ…†…€‚…‰…„ƒ‚‚ƒ‡†ƒ€€‚……„ƒ„ƒ„ˆ†„€„†ˆ„ƒ~ƒ„ƒƒ„ƒ‚ƒ€…ƒ„„ˆ†‚ƒ‚€‚‡Š†‚€‚ƒƒ€‚†ƒ„„†………Šˆ………ˆˆ„„…†…‚……ƒƒ…†ƒ‚ƒƒ„†ˆ‚~‚ˆ„‚‚…„„‚„…‚‚ƒƒ‡†‚‚…„…ƒ‚„ƒ„„…†‰…€‚……†„…†„ƒƒ……ƒ…ƒ„‚„„‚‚ƒ……„ƒ€ƒ†…ƒ€‚‚‡‡„ƒƒ‚†ƒ‚†††~}†Š‹„€~‚ˆ†ƒ€‚‚…†‚€~€„‡ˆ…ƒƒ„…ˆ‰ˆ„|ƒ‰‰‚ˆ„‚„†ƒ‡ˆ‡…€€„ˆ‡‡‚ƒ‚„‡ˆ…‚ƒ‚„„‚~~„Š…‚‚…ƒ‚‡ƒƒ„€‚ƒ†…€†ˆ…€‚„ƒ‚ƒ…‡ƒ„ƒ€‡„„…‚†„ƒƒ‚„…„†…†„†‰„~ƒ†…ˆˆ„€~‚‡†…ƒƒ‚‚„…„„ƒ††€„†…‡‡‚}ƒ…ƒ„„ƒ‚‚…„~‚ƒ†…ƒ~†…„‚ƒ‡‡‡‚~‚ƒ……ˆ‰ƒ€€~ƒ‰Š…€‚†„‚€ƒ……„„„ƒ‚…‡‡†ƒ~†‡‡‚…††„ƒ†…€„…‡ˆ†ƒƒƒ}‚‡‡ƒƒ„‚‡…~…‰‰ˆ€{|ƒˆ‚‚…‚„‡‰…‚ƒ„‚„†„ƒ„†‰‡‚„‰Š‰…€~ƒ†‡…„ˆ…„€ƒ„ƒ„ƒ††„~|†ˆˆ‡€€ƒ‚†‡†‚€„…‚ƒ†ˆ†‚}…„„‡…††„|‡‰†ƒƒ†€‚…‰ˆ„ƒƒƒ‚†ˆ„‚…„ˆ†‚„„ƒ„„ƒ€€‚‡Š„„ƒ‚„ƒ‚€†‡†‚~ƒ†„„††„‚ƒ€…‡„„†…„~|…Š‡€…†‚‚…‡‡††‡‡‚|†‰ˆ…„‚€€‚†…ˆ…†‡„‚„…‡‡‡†ƒ~~‚…ˆ‰†„~…ƒ„ˆ‡†ƒ~ƒ‡†……‚ƒ…†|†ˆ…ƒƒ„€‚€†‰…€~€‚†‡†€ƒ‚€„…‡†„‡ƒ€€‚…‡……‡†ƒ||„‰Šˆ‚€„‚‚…ˆ‚ƒ†‡~ƒ†……‡‰„ƒƒ~‚‡‰ˆ…€}~ƒ‰‡ˆ…~~†††‡‡‚…†ƒ‚„††ˆ„…ƒ€ƒ„‰‰…‚€ƒ‡„††…†…‚€†‡†‚€‚ˆ„~„†„„†„‚€‚„‰ƒ‚€ƒ………‡…ƒ€}~ˆˆ†ƒƒ…}€†ˆ…ƒ…‡„}Š‹†…„€ƒ‚‚ƒƒˆ‰‡‚ƒ„ˆ‰ƒ€†…ƒ€ƒ…†‡…†}€„ˆ††‡ƒƒ~€ƒŠ†„€‡†‚~‚‰ˆ††‚ƒ‚€‚††…†…{ƒ†ˆ…†„€~…ˆ‰‰„‚ƒƒ€„‡†‚€‡ˆ€‚……‡†„‚…„‚ƒ…‡…ƒ„…ƒƒ„ƒ……†ˆ‡}ƒ†‡†ƒ‚‚„€…†„‚„†…‚„ƒ‚†‡‡‚}€†‡…†ƒ€‡ˆ„ƒƒ„„„‚~€‡‹††…ƒ~{†‹Š‚‚‚€~‚‡ˆ„„}‚‡‡…‚†‡ƒ€ƒˆƒ€……„‚„†„ƒ„†‚‚‚„ƒ‚„…†‡†€{€‰‰‡‡…‚„ƒ…ˆ‡Š…ƒƒ€ˆŒŠƒ‚†ˆ‚€‚‡Š‰†‚†‡…ƒ‚……Š…ƒ‡…ƒƒ…‡„€|€…Š‰‚ƒ…ƒ„ƒ„…‚ƒƒ„~…†„„„„‰ˆ„‚‡‰„ƒƒ…„‚„„‚…†…‡„„†‡…‚‚…‰ˆƒƒ†…}‡ˆ‡…€~‚ƒ‚„…Š†~|ƒ…„…}€„‹‹{{…………†|~…„„‰€„‚{‚Š‹‡~}ƒ††‡ˆ„ƒ‡Šƒ~…ŠŠ…‚‡‚€ƒ„†‹‡…~}„ˆˆ†€…†~‡‡„€€„ƒ†ˆˆ|z‚‡†‚†„ƒ†}~„‡‡ƒ‚‚ˆ‡…†‡ƒ~†ƒ‡‰ƒƒ€„„„††ˆ†~€‚†ˆˆƒ‚ƒ€‚„‡ˆ…„‡ƒ~}ˆˆˆ„‚‚‚ƒ„ƒ…‚…‰†}{€‰‹„‚ƒ…€ƒ†‡…€€‡‡~‚††‰ˆƒƒ„‚„…ƒ‚†Šˆˆ‚z|‚†‹‰…‚€}~ƒˆŠ„‚†‚‚‡…ƒ…‡ˆ‡ˆƒz€ƒ„…Š‰‚„€…„‡…ƒ…‚‚‚……†ƒ€†ˆ‡‚~~…†…ƒ‚‚‚‡†‚ƒ†††€€‚†„…†ƒ€~‚‡ƒ‚„‡ƒ‚‚€‚‡‡…ƒ…‡‚~€……†ƒ„ƒ‚„„ƒ……ˆ‡‚}‚‡ˆ†ƒ‚„„~‚„ˆ†‚…ƒ€}…ˆ‡ƒ€…‡€‚†ˆƒ‚‚‡ˆ„~‡‰†„††ˆƒ~€ƒ‡†ˆˆˆ‚|†……‡ƒ„ƒ…‡ƒ€€‰Œˆƒ€‚†…ƒƒˆ†z~…ˆŒ†~€€‚…‰†…‚„ƒ‚‡‹†~€‡ˆ…|}…„……ˆ‡€€‰…ƒ„†ˆ…„~|‚ƒ‡…‰‡€~€…ŠŠ‡ƒ€€‡Š‡‚ƒ…†„€„‰ˆ‚ƒƒ‚ƒ††…ƒ‚„ƒ„…ƒ‚€€ƒ†‡†‚…„†‰…€‡„ƒ„‹…„…€ƒ‚~‚‡Š‡ƒƒ…€€…‰‡…ƒ„†…ƒ{ˆ‰‰ƒ‚…ˆƒ}~ˆ‡‚…Šˆ‚}~‚†ˆˆ‚……‚€|‚ˆ‰„„ƒ€„ˆ†€€„‡‰ƒ„†ƒ„ƒ…„ƒ„ˆ†ƒ€…‡††‚‚…‰Š‡ƒ€€„‡‡‡ƒ‚„‡ƒ€ƒ…ŠŠ†‚}~ƒ…ˆ‰†~ƒ‡†…‚…„„€ƒ…ƒ‚€ƒˆ…ƒ†‰~~‚ƒ‡„ˆ„€ƒ„„ƒ‡Š‡€}…‹‹„€ƒ‚……ƒ‚†……‰‚~€‚†‡†‰‰…€}ƒˆ‡‡…„ƒ‚ƒ„‡‡ƒ‚ƒ}~ƒˆŒˆ„‚†‚……„€„†ƒ‚†…ƒ~‡…ƒ€€ƒ‡Š‡‡‚}|„‰ˆ„…‰‡|‚„„…‰‰†‚€ƒ‰ˆ„€…†€„‡‰„ƒ„‚ƒ††…‡€ƒ‡ƒ€}Šˆ‚…‡…€~ˆ‡ƒ…ƒ€…†‡„‚‚†ˆ…|ƒ‰‡††ƒƒ…„„†…‡…„‚z~‚Š‹ƒƒ„€„†…‚ƒ‡‡ˆ‚~€†ˆˆ„ƒ‚ƒ€‚†ˆ‰‚„‚€‚…ˆ‡ƒ„…„„‚ƒ‚…†‹…€†‰‰†€‚„€…†‚ƒ…ˆ…~€„……‚ƒ‚‚„ƒ‚…‡‡ˆƒƒ„‚†ˆ‡€€„ˆ†„‚€€~„ˆŠ…‚}ƒ…„‡‡„„ƒŠ†…€„‚‚†…‡ƒ„„„‚‚ƒƒ…ƒŠ†€„†€‡…ƒ}„‚…ˆ„ƒ‚ƒ‡„ƒ‚‚„~„‰…‚€‚…†€‚‚„„‚†„}„‰‚ƒ‰‡€‚~~…†‰‚€‚ˆ†‚‚ƒ…ƒƒ‡…ƒ‚‰Œˆ‚ƒ…ƒ„‡‰†‚‚…ƒ‚…ƒ‡‰„ƒ€„‡ƒƒƒ„†ƒƒƒ€„††‚€€„‰‚‚…„‚†„…ƒ€‚„‚€†‡†{‚„‰‹ˆ|~„‹‰„‚‡†‚‚ƒ†„ƒƒ…ˆ…‚€‚††…€„‡…€††‚ƒ†ˆ„‚ƒ‚‚„‰‡ƒ€ƒ†ƒ}‹Š†…‚…„ƒ„ƒ„†€‚‚„‡ˆ„~~„ˆ‡‡€~†…ƒ„ƒ„„„„„†„‚„†ƒ„„ƒƒƒƒ†‡‡ƒ€ƒ‡Š…€ƒ‚ˆƒ‚…ƒ…„€„…‚ˆˆ…€…‰‰ƒ}~„Š‰…ƒ€‚……„~€„‰ˆ†‚}ƒŠˆˆ„|~†ˆ‡†„ƒ………„ƒ†…‡‡…ƒ‚„‡‡„„†‚„ƒ…†‡…€ƒƒ††„„€€†ˆ…‚„„†‡…‚‚€„ˆ‰ƒ~{‚‚†‰ˆ†€}„ˆ‚ƒ…ƒ„…ƒ„‚„………€€„‚ˆˆ…ƒ…†ˆ†€‚‚†Šˆ‚~€‡‰ˆ…ƒ‚‡‰…‚z†ˆŠƒ}€…ˆ„‡…†‡„‡†€~„‡„‚~‚……‡ƒ~……ˆ…ˆ„„‚†‚…ˆ‚„ƒ„‚†ˆˆƒ€ƒƒˆ‡ˆƒ€‚„ˆˆ„~…‡ƒ…‡„€€‚†‰ˆ€…„€„ˆ†€„„…~†‰„€€„„ƒ„‚„„ƒ…‡‚ƒ€‡Š…„€€…ˆ‡ƒ‚‡†„‚†„ƒ…‚……‡„€‚„ƒ†…†ƒƒ„…ƒ„„…„†…€‚‚……‚‚‚„…‚†…ƒ‚………‚„€ƒ‡„‡‡„‚|€†…„ƒ…ˆ„~}ƒ…„„ƒ……†…€„†ˆ…††„„„‡Š†‚ƒ‡†‚ƒ„†…„…‡ƒƒ…†„…ˆ‡„ƒ‡…ƒ‚†‡„„‚ˆ†‡ƒƒƒƒ…†ˆ‚€‚…„‰†…|€††…†„ƒ~€ƒ…‡‚~††„ˆ…€€……†‰†‚~€†„ƒƒƒ‰†‚€„……~‚…†…€…„…„…†…‰ƒ~„‰‡„€„ƒ……‚‚…‰„ƒ‚‚‚‚…†‡„†…ƒ‰ˆˆ…ƒ‚‚……†……†ƒ„„…‰Š…€‚……„„„‚‚„ˆ‚ˆ‡„}{„†ˆ‡ƒƒ†…ˆˆ……}ƒ……‚€…††}€„…‡‰‡ƒ|zŠŠˆ}‚†‚„†‡‚ˆ†ˆƒ‚ƒ‡‰‡„‡„†‡‡„ƒ††…„Š‰ƒƒ‡ƒƒ††‡…‚€‰Œ†€‡~‚„‡‚†…‚}‚‚‡‡‰…‚€{„‹ˆƒ„‚‚ƒ€„ƒ„†…‰„}‡‹ˆ‚‚ƒ‚…„‚„„‡„„{ƒˆ‡ƒ‚‡‚„ˆˆ‚ƒƒ€…Š‰…ƒ}}„‰‹…‚ƒƒ„†‡‰‚€‚„†‚ƒ†ˆ…†‚ƒˆŠ†…‡„}†‡‡Š……††„{…ˆŒ…„€„„€ƒƒ†…‚„†}ˆ†‡…€~ƒƒ„„‚Š…„€‚„ƒ‚…ˆ…€}€‡Š‰„ƒƒ„‚€…†…‡†…€}}†‹ˆ‚……‚ƒ†ˆ…„ƒ…‚„…‡‡…€ƒ‡Š‰‚~„ƒƒ~‚…‰ˆ‚‚………}ˆŒ„€ƒ……‚‚€‚ƒ†ˆ‚}}‚ŠŠ„…†„„}~†ŒŽ‡‚„†ƒ}ƒ‹Šˆ…€‚€‚„…ˆˆ…€††€ˆŒ‰‚ƒˆ†„‡†‚„‚ƒ…Š„}€ƒƒ‚ƒƒ†…€‚ƒ†ˆ„‚„‚‡…‚…„ƒ‚………†ƒ~‡…‡„‡ˆƒ„ˆˆ„‡‡ƒ€…†‡ƒ„†ƒ…€ƒ„„‡‹Šƒ€„€‚‰‰…„„‚}|‚‡Š‡‚€…†ƒ‚„†ƒƒ‚ƒ‰‹†€‚„ˆ†‚‚„‰‡€{~„ˆ‹ˆ„„|~‚„ˆŠ†€„†‡}‚…‡Šˆƒ|ƒƒƒ…„ˆ‡„€}€‡ˆ‰‡~}~‚ˆ‹‡€€‚†‚€‚†‰„ƒ~~€‚†„…ƒƒƒ„†ƒ…ˆ…„ƒƒƒƒ‡‡‡‚€~„ƒ†ˆ…ƒ„…„†ˆƒƒ……„‚„‡‡„…„…€‚‚‚‡‡ˆ…„€€€…‰‡‡ƒƒ‚‚ƒƒ†…ƒ‡„~ƒˆˆ†ƒ…†ƒ‚‡……„…‚‚„ƒ„‚ˆŠ‚€‚„‡‰ˆƒ„€ƒ„Š‡ƒƒ…ƒ†ˆ†ƒ†ˆ…~~„‹„„‡„‚z~…‰‰„€‚€€…†………€ƒ‚ƒ…‡ˆƒ~ƒ†…†‡‚ƒ~„Œ‡ˆ†„ƒ‚€…‹Š‡€…†|…ˆ‰†„……€€ƒ„……ˆ„‚}†Šˆ€€€ƒ……ƒƒ‡ƒ„…}†‡‡‚…†ƒ‚‚€‡ˆ…€„„ƒ…„ƒ†…‡€„…€‚‚‹Œ…~†ƒ€~ƒ‡‹ˆƒ‰…‚†ŠŠ‚……‚zz…‹’„z€€€~‚‰‰Š€x|‹‰~‹ˆ‚†~€€€‡†‚‚‡ƒ„|‡ŒŠ€z{‰‘‡z€‚‡ŠŒ‚‚€‚ƒ‚‡‹‰„{~‡ƒ‰Œ„…Šˆ†{~ˆ…‡†ƒ}~ˆŽ‹„zy~‰Œ‹‡‚{~‚†ˆ‡ƒ~€‚€ƒ…‡„ƒ„€€‡‡ƒ„ˆˆ„€„ƒ„ƒ‡‡ƒ„„‡†‡‚}}„ŒŽ…„…z€ˆˆ‡ƒƒ€†ˆ‚|~‡Œ‡~}…‚‚„ƒ‚†…‚‚ƒ~|…‰††‚„„~€‡‡‡‚†‡ƒ}{ƒ‹‹‰…~z†‡‰…†€ƒ†ƒ‚ƒ…‰‰‡}†…ˆ†‚‚†‡†…‚€…‰†‚…ƒ††‚‚„†…ƒƒ€~…†…€„‚„‡„„††……ˆ†}‚…‰ˆƒ…„„…‡‚}€‚Š‹‡ƒ‚„„‚ƒ‡Š……‚~‚‰ˆ€…‚‡…†‡Š†„ƒ€‚…†ƒ„…‡‡‚}|†‡‡ƒ‡Šƒ€}€‰‰…€‚€†ƒ‚„…†„‚†ˆ‰‡‚zˆŠ‰‚‚ƒ…€‚…‡…ƒƒˆ†~|‚‡ˆˆƒ…‡ƒ~{ˆŠ‡ƒƒ€ƒ†…„‚„‚…‰ˆ†ƒ‚„…†‚‚……‚€ƒ~†Š…ƒ€‚…„‚†……ƒ€„…„ƒ~‚……‚‚†‡ƒ€ƒƒˆƒ‚†‡ƒ€ƒ†‚€‚‡„„€~ƒ‡‡ƒ†‚„‡‚~†‡‡†‡|~†‰‰‡ƒ|}€…‰…€~†‡‚€‚‚ƒ‡……„~~…ˆ…ƒ…‡…€~‚ˆ††…ƒ……€„ˆ†‚ƒ‡……}ˆ‰‡ˆ†‡‚~†Š‰„„„ƒ†…€ƒƒ‡…‚‡…€}€…‰†‚…ˆ‚ƒƒ‚€€‚…ƒƒƒ€ƒ†ˆƒƒ…~„††…ƒ„‡…‚€ƒ‡…„‚†ƒ‚ƒ‚ˆ…„…‡ˆƒ~ƒ‰‡‡ˆ†…}†‹Š‡€‚ƒ…††„‚‚†‡…€z„‡Š„€ƒ†‚~†Š†ƒ††€‚†……„ƒ‚„ƒƒ~ƒ‡‹‡„‚……~†Šˆ„†‡†‚€…Š‰‚€ƒƒ…‡ˆ…ƒƒ†„ƒ€€…„‡„„„€€ƒ…‰‡}€†……„‚€€…Šˆ„{|€ƒ‰ˆ„„‚ƒƒ‚ƒƒ…„„…„€}€ŠŠ‰ƒ}}†‰ˆ†„‚‡†‚‚€‡‰ˆ‡„€‚…†…ƒ‚ƒ‡„}„‡…‚…ƒ……‚‚ƒ…ˆ„‚ƒ……€…„‡‰„ƒ€†‰Š‡€‚†„„…‡„„‚€†‡„~|…‰‹†€€€‰ˆ‡„……‚‚†‰†‚ƒ…„„~}ƒ‰…„„€‚‡†…†ƒƒ„††„ƒ„‡ƒ€‚„ˆ…ƒ€…†ˆˆƒ…†‚‚‚„†„„‚‚†‡ƒ‚„‡†‚ƒ„ˆ†…€ƒƒ„…‡€‚…„…€ƒ„„‚€„††„†„‚„†ƒ„ƒˆ†}ˆ‡‚€„†ƒ€‚ƒ…„‡ƒ€‡‰†„}…ƒ‚†ƒ€‡ˆ…‚ƒ…††ƒ‚††„‚„ˆ‰€~ƒ‡‰ˆ„€†ˆ…†„ƒ†ˆ„…‚}€…‡‡ˆ‚~~‚Š‰…‚~††‡‚‚„‚ˆ‚‚…„‚‡……‡€…ƒ…‡ƒ…ƒ„„‚ƒˆ†…‚…‚ƒ„…ˆ†…‚€ƒ‚„†‡ƒ…‡‚ƒˆˆ„~†…‚‚„ˆ…€ƒ†‰†€†…€…‚„„„ƒ†ˆ…‡‚€‡‡††‚‚‡†„„‡††‚‚„…ƒ‚€„‰…‡†„ƒ‚‚‡‰ˆ†€‚€…‰ˆ…|ƒƒˆƒ~ƒ‡†…‚ˆ‰†{‚„‡‰‚„†„€…ˆŠ‚}ƒ……ˆ„…ƒ}}ŠŽ‡ƒ‚‚†Š‰„~‚‡ƒƒ‚‚„‡…‡„€‚„…†ƒ…‡‚€„Š„„ƒ‚‚…‡‚ƒ†„€‚„ƒƒ†‡‚€ƒ‡…†…€‚€‚†ˆ€…†„…ƒ………‚……€„…„„…†ˆ…‚„‚†††…‚†„‚‡‡…„‚‚‚„†‚……‚€‚‚‚†„††„„~†ƒ‚‡€…€}…†‡ˆƒ€€‚†„ƒ†‡‡€…„‚„…†……ƒ„„‚‚…‡…†ƒ€‚ƒ…„„…‚‚„‡†„„€ƒ‡‡ƒ|ƒ„„€††‡„}‚‰‹‡€‚ƒ…„†…ƒ‚…‚‚„††ƒ~~€ƒ„‚ˆ†…ƒ€ƒ‹‹„‚‚ƒ†„‰†€‚‡Š…ƒƒ…ƒ‰†ƒ†ƒ„€……ƒ†„‚ƒˆ‡„€€…Š‹‚}‚€ƒŠ‡…ƒ€|}„‰‹ƒ„~‚‡‡…‚‡„„‡ƒ„~„†…„‚†ˆ‡ƒƒ…ˆ…„€…ˆ‡…††~€…‹ˆ€„…‡‚‚……ƒ€ƒ‰„€„†…„‡‡„‚~ƒ††‡‚ƒ…‡‡‡‚‡ˆˆƒƒ…‡‚€…‰„†…‚„‰„†‰‚ƒƒ‚ŠŠˆ„ƒ…‡…‚ƒˆ„‡„€„‰Š‚|„„…ˆ†„€€„†ˆˆ€…‡……„‚‚‡…‚€~ƒ‡‡†ƒƒ€†‡……„€ƒˆ‡…€}€…‹†‚…††…ƒ€†ˆ†ƒ€~††„„‚‰†…~|…Š‹†€{ƒ‹‡„zƒ‡ˆ„‚€ƒˆ‰|ƒ†‡ƒ€‚……ƒ~€†……„€‚€††‡†…€ƒˆ†„‚†‡…„„ƒ…ˆ„€ƒ„…„ƒ„„†…ƒ…„ƒƒ‚‡†‡‚~‚†ƒƒ…„‚€„„ˆ‰€~€…‡„ˆ„€~„…ƒ…„„…ƒ„…ƒ~„†…ƒƒ„‡…}~‚ƒ„‚‡†…€„„‡‚„ˆŠ„~|…‰‹‡‚ƒ}‚„‰†€‡„ƒˆƒ…‚€‡†„‡…‚~„†‚€ƒ†ˆ„†€}ƒ†…„ˆ‡‚~~…‹‰…ƒ€}|„‰Œˆ‚ƒ…„„~‰‹†‚‚‚…‡…ƒ„†„ƒ€€„„††‡‡‚{|…‹†‚€…„‚‚~‚†ˆ…ƒ„„‚†‡ƒƒ†ƒ€~†‹ˆƒƒ~…„€†‹‡…‚‚†ˆ†………~‚……ˆ……ˆ†ƒ}|‡‰‡Š†~|†ˆ…„…ƒ„€‚‚†‰‚~~„ˆ‰„~€€€ƒ††……ƒ€„„ƒ‡ƒ€‚„†„ƒ‚‡‰„€€ƒ††Š‚€„„…††„†‚‚……††„„ƒ„††‚ƒ‚…†‚ƒ}†ˆ„‚ƒƒƒ„‚ƒ…ƒƒˆ†„|€†‡ˆˆ…z~‡‡„‚ƒ‡ƒ€~†Š…ƒ‚„~}ƒ†ˆ…‚„€„ˆ…‡ˆ„~~€…‰ƒƒ‡†‚~‚ƒ…‡‡‡„€~€†…‚ƒ„‡†‚€ƒˆ††‡…ƒƒƒˆ‡†€ƒˆ|†ˆ‡€‡‡‚‚ƒˆ†€~‚……ƒˆ…„†‡†‚ˆŠ††‚{€„‰‰…ƒƒ‡„~|€†Š‰…ƒ‚ƒ‡ˆ‡‚‚‡ƒ|ƒ‰ŒŠ‚~‚‡ƒ€€ƒ‡„†‡‚„€…‚„ƒ‡†ƒƒ€ƒ†ˆ†ƒ„‚†††~†„€‚…ˆ†…„ƒ„†„…‡„„ƒ†ˆ†ƒ„…ƒ‚„ˆ‰‰ƒ~…ˆ†‚…„„ƒ‚€‡Š‰€}„ƒ…„……„{~ˆ‹‡‚}~„‰ˆˆ€€€‡ˆ„€~„‡…ƒ~ƒ‚„††‡}~†ŒŠƒ‚†ƒ…„„„‡…~€ƒ‚‹‰‡ƒ|€ƒ…‹†„†…ƒƒ…‡€ƒ…ˆ‰~}ˆ‹‰‚€ƒ‚†‰…ƒ~~…ˆ††‚‚‚€‚‚†‚…„‰Šƒ~‡†„…ŒŠ„|}‚‰Š†€‚‚…„„……ˆ„€}€‰‰Š…~‚…„ƒ†‹ˆ‚~ƒ‚„ƒ………ˆ‚‚ƒ‰†ƒƒ€‚‚ƒ†‰„„…}}ƒ†…‰†‚€~ƒ…†ˆ…‚~…‡‡‡„„„„€{‚‰ŽŠ…~~‚†‰‡„‚„‡‚}€…ˆˆ……~}ƒˆŠ…€ƒ„~ƒ‡…ˆ……~{‚‰‰…†„‚~‚…‹Š‡‚„ƒƒ…‡†……‚ƒƒ…†‡ƒ‚…†‡€€„„‰‡ƒ‚€„‡‹ˆ‚‚€„……ƒ„‡………ˆˆƒ~|‚„…†‰ƒ~{ƒ‹…‚}‚„„†…†…||€‡Š„‚‚€‚„…‰………~‚ƒ„†ˆŠ†€~ˆ‹‰…‚{‚ŠŠ‡„‚‚‚†‡ˆˆ‡‚~~€ƒ‡Šˆ†}ƒƒ‚‚„†…ƒ‚~€„‡‰…€z€ƒ‡Š†‡ƒ„ƒ‡‹…‚ƒ„†€ƒ…‰‡…ƒ†‰‚ƒƒ}}ƒ†‰„„…ƒƒ€‚‡‰‡…„„ƒ‚€ƒ„††……~€‡‰‡‚‚€‚…‰‰†}|~ƒˆˆ„„ƒ‚„‚‚„€…‡‡‡€€€…Šˆ…†ƒ~€„‹‹……„ƒ€ƒˆŠˆ…€„†„ƒƒ‚ƒ…‡‰„|„‰‰…‚€…‰‰„~€‚„„ƒƒ†€„…„ƒ{‚†…‚€†„‚‚…‡‰…€ƒ„††‰‡ƒ€„ƒƒ…Šˆ„€‡ˆ„€ƒ††‰‡†‡‡…‚……ƒ‚…‚„‰‡€€„…ˆ‡‚‚„ƒ‡„ƒ†„~ƒƒƒ…ƒ„„‚‚‚‚„†„…‚‚„‚†‚„††‡€|€ƒŠŠ„€‚„€€‚††„†„‚€}€†Š‰€‚…‰ˆ‚††€}ƒ†„…‰‡„€~„††…ƒˆ‡‚}~ƒˆ†‡„„ƒ€……ˆˆƒ…€€ƒ‰‡ƒ……„‚ƒ†‡‡‡†‚}{‚‡Š‡„€…Š†‚‚…„‚‚„‡…†…ƒ€}}ˆŠ„‰†}}ƒƒ†††‡„€ƒ‰Š…}ƒ‚†‡‚ƒ‚„…ƒ‚„„‰‰„}y€ˆ‹‰‚‚ƒ€‡Š…„„„ƒ€‚…ˆ†‰†~ƒˆ‰„ƒ„ƒƒ„ƒ„†‰†~€ƒˆŠ…ƒ}€ˆˆ‚‚„„ƒ€€…‰‡‚ƒ„ƒ„ˆˆ…‚€€„ˆ‰…‚„ƒ~†‰ˆ„„Š†€|€‡ˆ‡ˆ…†…€Šˆ…„†ˆ…ƒ†‡‡†„~|~…‹Œ„ƒˆ†€}€††Š‡ƒ€|~ƒ‡†‡ƒ~€†Š„}€…†„†ƒ……‡‡‡„„…‚ƒ…ˆ‡…ƒ…………‚ƒ…ƒˆ‡††~€‚…„‚„ƒˆ…||€‡Š‡‚‚‚…„„‚ƒƒ‡‡‚~|‚ƒƒ‰‡…~~€ˆˆ‰‚~ƒ†‡…‚…‡†‚†„„…†Š†€~ƒˆ†……‡„‚ƒƒ‚†‡†…‚€…ˆ‰„‚ƒ…†„‚…†ƒ|€ƒƒƒ„†‡‚|~ƒ‡„…„‚…„€}€……††…„~|}‚‡‹‡‡…}}‚‰‡†„…‚ƒ††ƒ„†‡…€ƒ‰Š‡†ƒ~|ƒŠŠ‹‰‚~~‚…†„‚ƒ†ƒ‚~‡ˆ…}‚ƒ„†‡‡…‚……„€…ƒƒ‡‡‚€‚‚„ˆ‰‚……ƒ…††„€ƒ„ˆˆ†‚€‚~†Š‰Š€€‚†„ƒ„…ˆˆ…ƒ‚ƒ„‚‚‡…ƒ‡……ƒ‚‚„ˆ†‚„€|~…‰‡„}‚†„~ƒ‡†‚ƒ„ˆ…‚ƒˆ„‚„ˆ‚‚„„††ƒƒƒƒ…†„…ˆ…„‚‚ƒ…ˆ††ƒ‚…ˆ†„…‚~„†„„„„„ƒ„…‡€€ƒ†‰ƒ~‚„……„†ˆ„€ƒ‚……„„|~……Šˆ„€ƒ‡†‡ˆ‚ƒ‰‡„‚ƒ„ƒ‰†‡€‚†‡„ƒ……ƒ„€…‰ƒ€€€‡†ˆ…€€‚…‡†€†‡‚ƒƒ„€ƒƒ††€€„…ˆ…€…ˆƒ‚‡†ƒ~‚ƒ†ˆ~ƒ‚ƒ…‡…„ƒ„„€‡‰„…ˆ†ƒ}€…ˆŽˆƒ|‚†Š††ƒ…‰…~…†‡ƒ„„ƒƒ…„„€€ƒ„‡ˆ†€‚ƒ††ƒƒ‚‚‡†ƒ}„…Š‡„€‚†‰…‚„‡ˆ…‚„„…ˆŠ†‚€€‡ŠŠ„~~|‰Œ‡ƒ‚€‚„†ˆŠ„~‚‰‹‚ƒ‡„„‚„ƒ…‡…}~€ƒŠ†ƒ€…‚…†…€€…ˆ†„‚ˆˆ„…ƒƒ€€…†‡…ƒˆ‰†„}€ƒ‰‹‡ƒ‚ƒ‚‚ƒƒ…‰‰ˆ…€„„‰†ƒ‚ƒ„„…€‚‡Š‡…€‚‚‡‡†‚‚ƒ„ƒ€€€ƒˆˆŠ„€}…ˆ‡„ƒ‚…‚‚„„†‡…€„‰†…„€~~ƒˆ‹‰„~}ƒˆ†…†„†…„ƒ€……†…ƒ€„ƒ……€€‚‰‰…~ƒ††„‚„‡„€€†Š‚€ƒ€‚…†‚‡††ƒ€ƒ‰Œˆ„€}…ˆ‡……„ƒ…ƒ~€ƒ‰‹‡†}}‚Šˆ‡‡‡ƒ}}ƒ‰‰„ƒ|{‚‰‡„„ƒ‡…~‡‰†€‚ƒ‚ƒ‰„€††„†ˆ†‡ƒ…„‡†‚€ƒˆƒ‚„…ˆˆ†‡…„„…‡‡€ƒ†‚†…‚„}‚„ˆˆ€ˆˆƒ€€‡„ƒ‰„‚~‚ƒ…‰ƒ€€…†ƒ‚…ƒ…†…‚„……ˆ†ƒ‚†ˆ‚ƒ…†…ƒ…†‚‚ƒ†Š‰……ƒ‚„ˆˆ…„‚€„…‚ƒ†‰ˆ~„…‡…„……„…‡‚‚‚………‚€~‚‡‰‡„‚ƒ…‡†„€„ˆ‚€„„ƒ††…„€„„ƒ†ˆƒ€€…Š‡€~ƒ…‹ˆ…ƒ…†…ƒ…„…†„„‚€‚‚‚……‡„~~‚…‡…‚‡„€€ƒ…†‚‚€……ƒ‚ƒ„Š„‚‡ˆƒƒ€…‡‰ˆ„…ƒ„ˆ††€†‚„‰‡……‚€…ˆ†‚…‡†‚„~‚‡‡‡€}‚„†‡…„~‡††‚‡Šƒ‚€‚„ƒ…„‚„ˆˆ‚„€……‰…„ƒ…ˆ†ƒ…ˆ…ƒŠ‡ƒ€~ƒ‰ŠŠ…„ƒ††ˆ…}€„Šˆƒ€‚ˆ‰‡€‚ƒ‡††‚~‚†ƒ‚…ƒ„…†€€…„†‰ƒ~~€„‰Š…}€„ƒ…‡‰†€|ƒˆ‡‡‚„„ƒƒ„‡‚‚Š‹„€|ƒ‡Œ…†„‚ƒ…Š‡‚ƒ„…„ƒ‚ƒ~€…ˆˆ‡|…‡…ƒ‚ƒ‚€‚„ƒ‚„††‚€……ƒ„……†ƒ€€†‰‰…ƒ€€„ˆŠ†ƒ~€ƒ…†ˆ„€ƒ‰‡…„ƒ‚‚‡…‚€ƒ‡†ƒ‚ƒƒ…ˆ‡……‡ˆƒƒ‚‚„†„ƒ‚†‚„„…ˆ€†ƒ†„‚…‡††€ƒ†…ƒƒƒƒ€ƒ†‡ˆƒ‚„ƒ†„ˆˆ‚„„ƒ…„ƒ‰ˆƒ~~ƒ…‹‰„}~„‹Šƒ„ƒ‚}€„ƒƒ…‰…„„…„…„…‚€~ƒ†ˆ‡„„}„‡„„ƒ„………€‚…„‰‰†ƒ}†‡Š…ƒ„…ƒ€„‡‡ˆƒ~~†‡ˆ†„‚‚‚‚‚‰„„€ƒ†Š†~|€ˆŠˆ‚~ƒ†…„~‚…‰ˆ~~€…Š‰„}…ƒƒ…„ˆ…„ƒ€„‡ŒŠ~|€ˆ‹††ƒ~‚…‰‰‚|‰ˆ†‚~‚ƒ††…„„ƒ‚~„„Š‰‰ƒ}~‚…‰‡ƒƒ…„}‚‡‹‡„‚„‡Š‰ƒ†‚ƒˆ‰‚‚†††ƒƒ††ƒ„„ˆˆ‡‚~€„†‡‚‚†„„ˆ†ƒ…†„ƒ‚€„‡Š†{|…ˆ‡‚‚„‡‚ƒˆ„‚ƒ‡„…ƒƒ‚„†ˆˆ‚€‚‚„‡~{~ƒ„‡ˆˆ„€~€†‰…‚…‡‚‚†‡†„~…‡‡ƒƒ……‡†……†…ƒ†~…†‰ˆ€}‚ˆ‡‡„„ƒ‚…‡ˆ}€†Š‡‚~…ƒ…‚‡‡‚€‚…†„ƒ†ƒ„…ƒƒ~„‡„…‚„„…ƒ€‚…‡‡ƒ€}€…‰‹‡}„†‚‚ƒƒˆ„€„ƒƒƒƒ…†‡†€„‚ƒ‡ˆ„‚~†…ˆ‡~‚ˆ‰„}}‰‰ˆ~…‡ˆ…ƒ‰ˆƒ~~€‡Š‡‡‚}~€‰‰‡†}~„…‚}…†‚„†‰…€‚‰ˆ„ƒ„‚~€††…„‚„€‚‚…‡…‚€ƒ†…‚‚„†‚‚……‡…‚†ƒƒ……ˆ„ƒƒ„ˆˆƒ†„‚‚†‡„ƒ„„‡‰ˆ…‚‡Šˆ}~„ƒƒ†ƒ€…ˆ‡‚}{‚‰ˆ…ƒ‡‡ƒƒ„‡ƒ…†ƒ€…†„‡…„„ˆ‰„‚„‡†‚~…ˆŠˆ€ƒ…„‚…ƒ……„ˆ…|€†Šˆ…ƒ‚‚~ˆˆ„„‚‚~„ˆˆ„„„„ƒ‚„ˆ…†…ƒ€~‡‡ƒƒ‚…†…~†‰†‚€……†„ƒƒ……ˆ‡~€ˆˆ……†‚‚€~‡‰ˆ‚€††€‚ƒ‰‰„~‡…ƒ…‰ƒƒ†…ƒ~€„Šˆƒ~~„……€„„ˆ…ƒ€€ƒ‡†…€€ƒ…„ƒ€‚††„~‚††‰‡„€‡†„ƒ‡‡…|}…†‡…„ˆ„ƒƒ††…ˆ„}}†Š…†‡ƒ{‡ˆ‡…„ƒƒ‚}€ƒ†Œ‰ƒ~|‚†„„……‚€„…‡ƒ‚‚Š‡„…‚‚‚…ˆ„„‚……€…‰‡ƒ€„†…„‚‚„‡Š„ƒ€€„‹ˆ†ƒƒƒ~…‡†„ƒ†ˆ‚{‚ˆ†„„†‡{~…‰Š„€‚…†‰†‚‡€„ƒˆ‡ƒ……ˆ†|…Š‡………ƒ{‚††‰‰ˆ„€„ƒ„…‰„……~~‚ˆŠ„…ƒ‚‚ƒ†ˆ‚„ƒ~~…†…††„‚z}‚†Š„€‚†‡~~„†‡…†‚€…‡…‚…‰‡‚y‡‡‡……‚ƒ‚‚ƒˆˆ‡…††‚~€„Š‰ƒ‚……‚„ƒ†‡„‡‚€ˆ‹‡…‚€~ƒ‡Š†€……ƒ~„…„‡ƒ‚‚„‚ƒ…‚‚„‡‡‚€ƒ…ˆˆ‡ƒ†ˆ‰‰‚„ƒ€}‡‰†„…„ƒƒ„†…ˆ†„„€€…ˆˆˆ‚}‚ˆ…ƒ„‚……€‚ƒ‡…ƒ†ƒ~}€‡ˆƒ„„ƒ~††…ˆ‡…†~€‚„‹Š‡„‚‚~„ˆˆˆ†€…Š‡‡‚‚…‚‡„ƒ€€„…Š‡…€|~ƒ‰ˆˆ„„€‚„„‡€‚ƒˆ‰ƒ~|„ˆ‰………{ƒ‡„‡„†ˆ‚}}…‰‰‰„€}‚†ˆˆ‚……€‡Œ‰……†‚…†……‡ˆ‚‚ˆ……†‡„}~„‡‡ƒƒ‚„„}€†Šƒ‚„€~„‚ƒ‡ˆ‚……ƒ€{~†‰‹‡…„€‚ˆ……„€„…„„„ƒ„…ƒ…†ƒ€€…ˆŠ†‚ƒƒ†Š†‚…‰‡€~ƒ†‡……„‡‰~‰ˆ…ˆ…{~„†Š‡ˆ†„~{€†‰ˆ…|z‚……„†„ƒ‚~…ˆŠˆ„|{|…‰ˆ‰„€€…ƒ„…‚ƒ‡‡ƒ€„„†Š…‚‚„‚‚‡†‚†‡‚ƒƒ€€……ƒ……‚…„‚€‚ƒ†ˆˆ‚}~„„ƒƒƒƒ„…ƒ}€ƒˆˆ…€‚…ˆ‚ƒƒƒ†‚‚…ŠŠ{{…ˆ‡……†…~~ƒ‰‹‡‚‚„†‡‡†„‚€‚„ƒ‡„Š„ƒ‚‚}‡‹†‚€‚…‚ƒƒ…„„†‚~ƒ‡ˆ‚‚€‚……†€€…‰‡‡€|}ƒˆ†‰„ƒ„‡ƒ|‚‡ˆ†ƒˆ„ƒƒ‡ƒ††„‚…†‚„„†‡‡€…†„ƒ„†„‚ƒ‡†„„€€€„ˆˆ‚‚ƒ…†‚~€ƒ‡‰ˆˆƒ~z‡‰†‚…€}†Œˆ€~„…ƒ…‡„†…‰†‚‚„‡ˆ‚……„…„‚€‡‡‡‡ˆ„}€†ˆ†……ƒƒ~‚…ƒ…‡ˆ…„€}ƒŠŒˆ‚€‚„ƒ‚ƒ…„„‡‚}€†Š†ƒ††ƒ„‚ƒ‡ˆ†ƒƒƒƒ‡€‚‰††€„†‡ˆ†„ƒƒƒƒˆŠ„~z‡Š‰„€ƒƒ„„„„„ˆ‡ƒ~}‚‰‡‚„ƒ}‡„ƒ…ˆ…~~‚…„ˆƒ‡ˆ†}ƒ‡‚ƒ‡‚ƒ„‡‰„~‡‡~‚„‹ˆ‚€†‡ƒ€†‡‡‡†}~ƒ‹ˆ‡„€‚†ˆ‡„†ƒ‚€ƒ„„ˆƒ„„€~ƒ‡†„ƒƒ„…„…‚~……‚‚€ƒƒ…‡ƒƒ€€ƒ‡Š‹…„~ƒ…‡„‚ƒ…‡……~~ƒˆ‹‡„€{}…‰Š…ƒƒ‚~ƒ†‡…†ƒ‚‡‡ˆ€„…‚€ˆ‰‰‡ƒ€€ƒƒ„„…ƒƒ……€{}…‹†…ƒ„ˆ†{€‡‹…€‚„„ƒ‚‚‚…ˆ‡„„~‚…‰Š…ƒ†„~€†ˆ‰ƒ€‚ƒƒƒ†…€‡†€‚†…„‡†‚~~‚„…‰„…†ƒ}yˆ‹†~…ˆƒ‡‡†ƒ€ƒƒ‰†„…ƒ„ƒ€„‰ˆ‡†‚‚‚„ƒ„……‡‰}††‡‰‰‚„…†ˆ‰……†‚}€…„ƒ‡ˆƒƒ‚|„Š‡ƒ††~……‰‡„„~}~ƒˆŠ†ƒ††ƒ€‚…ˆˆ†ƒ„„„€ƒ†ˆ…‚‚…„€†ˆ‚€†ˆ„„†…†‡ˆ€‚†ƒ…ƒ‚…†…ƒ€ƒ„„„„„„…†‚€€‚ˆˆ„ƒƒƒ€~…ˆ††††…ŠŠ†€‚…†€€‚†‡ƒ‰ˆ€~…‡ƒƒ„…„„…„‚‡ˆ„ƒ‚…ƒ„‡†…„„…†ƒ„‚€€…‰„vw„Š”‹‚vv†ˆ‰…ƒ…ƒ~€…†„„ˆƒƒ}}‚‰‹ƒƒ€ƒ‡}}‹€…‚…ƒ‚‚‚†ˆ‚x~†‹ˆƒˆ„†‡‡……|y†‹„}z~…‹‚‚ˆˆ}…‡ƒ…„‡‡…}~†‰€{‡‡…ƒ}‡‹‹…‚|}„†‹‡‰‰~~ˆ„‚ƒŠŒ{z†Œˆ„…‡„{ƒˆŒ‰ƒ‚ƒ†ƒ~…‡Š…€}‚‚€ƒ‡†€„†„‚„~~…‡ˆ„ƒ„~~ƒ‡‡ˆ†„|z‡Œ…„ƒ‚†…ƒ‚ƒ††‚€‚†ˆ†‚‡‡†}}ƒ…‡ˆ‹ˆ|}‚Š‡………}†…ƒƒ„ƒ€‚…‡ƒƒ†„Š…‚~}‚‡‰}„ƒ…Šƒ€††……„‚……ƒˆ††ƒ~†‰‰…}†‡ƒƒ‹‹ƒ‚ˆˆ‚ƒ‡‡‡‚‚~……†ˆ‹ƒ|‚ƒ„‚‚Šˆ„„~†ˆ†‚„†………‚|‡‰…~€„†‡†ƒ†„}|ŠŠ‡ƒ~€€„…‚…ƒ‚†‡†€}‚‡‡€€ƒˆ†‚……††„„ƒ…„…ˆƒ~‚‡…ƒ‡…†‚€‰„‚ƒƒ‚ƒ„…„€ƒ‡‰„€€€ƒ……††ƒ…€ƒ„ƒ„†‰†‚z}ƒ†‹‡ƒƒƒ…€†…ƒ„…‡„…ƒ€€ƒˆ‰…„‚‚…‚‚„‡‡„‡}ƒƒ‡‡…ˆ{~‚„…ˆ‰„€„€€€‡‰‰…|~€ƒ‚„††…‚‚ƒˆ‰††…ƒ„ƒ€‡‰„~ˆ‰‡‚ƒ†‡‡……ˆƒƒ„€…ƒ„‰„†…~…‰‹„}ƒƒƒ‚‡†ƒ~„…„‚„„‡…ƒz‚‚…ˆˆ„€‚€‚‰‰ˆŠ‚yz‚Š‰†€…‚„‚…‡„†ˆ‰ƒ{„Šˆ‚„†€‚‰Œ„…Š‰„€‚ƒƒƒ‚ƒƒ„„ƒ„ƒ€€€€‡‰†‡€~~„‰‹ˆ„~x|„ŠˆŠ‡{{†‰†ƒƒ‡‚‚€‚…„‡„…ˆ‚~|†Š‹‰„ƒƒ†‹‰‚~‚€‚…ˆˆˆ†}€‚ƒ†‡†‡‚ƒ€|€ƒ‰‡††ƒ€€ƒƒƒ‡†‚…‰†€ƒˆ†„„‡ˆ„ƒ††††„„††‚€„‰‰†ƒ€‚†ˆ†‰ˆƒ~„ƒ„†…‰‰Š‚|€„ˆ„‚†…ˆ…}ƒ†ƒƒ†††~€‚…‡ˆ†‚„„‚ƒ…ˆˆ„|…†‡„„„†…‚€|„‰ˆ…†ˆ€€††„„†‰†~|‚‚ˆ‹‹…||…†ˆ‡‚‚€€ˆŠ……‚€}€…‡‡ƒ€~‚‡ƒ‚€„‚…ˆ„}{†ŠŠ‚„ƒ{†‡Š„‚‡„{}€‡Š„‚‚†‡……†ˆ‡|~‚ˆ‡‚…†‚}…‡ŠŠ„€}~„‰‰ƒ„‚‚‚ƒ‡„ƒ‚†††~„„…ƒƒ‡ˆ‚‚€…„ƒ…‡…ƒ„‚‚„‡‡†‚‚…†ƒ€‚„‰…‚ƒ„„ƒ„„†…ƒ„ƒ…„†‹††}ƒƒˆ‡‚‚}‚…‚‰ˆ„‚†„‚†ƒ„ˆ€‚€…ˆˆƒ‚…‚‚ƒ„„…ˆ‡‡~}€Œ‰…„ƒ††‡„‰ˆƒ‚~†‡ˆ…€ƒ…„ƒƒ„ƒ‡……‚€‚‚„„†ˆ…‚†‚†‡ƒ€‚ƒ€ˆ…‚‚ƒ†…‚†‡…€„„…‡‚‚…ƒ€‚†‡„ƒ‚}†‰……„‚„‚„ƒ‡……‡ƒ~€†‡‡†„„‡„‚€„…‰…‡‚|}ƒ‰†…†‡ƒ€}€ˆ‰ˆƒ~‚…†‚‚ƒƒ…†Š„~„„…ˆ…€ƒ†„‚‚„„„„„‚ƒ…ˆ‡‚‚‡…€€ƒˆŠ‰‚€~€‚†‡…†„„€‚ˆ‡…ƒ‚ƒ€ƒƒ‡„„†ƒ‚ƒ„…‡‰„}‚…ƒ…ˆ‡€}‚ƒ„…ˆ‡€€ƒ„‡‡ƒ…†ƒ„……‰…„‚}€‰‹‡‡„„}|……‡ˆ††…€‚ƒ‡ˆƒ‚‚…†‚ƒƒ…‰…€ƒ…‡††ƒ€ƒ…†ˆ†€€}„‹‹‚‚ƒ„……ˆ††ƒ€„€„ˆ‰ˆ‚€||„‰†‚…‰„€€‚ˆˆ†ƒ‚„„‡†…„„‡„ƒƒ†ƒ…‚…‚~‚‡……„€~…†ƒ„„‚‡…‚ƒ‚†ƒ€€~…‰…„†~{ˆ‰…„…ˆ…}ƒ‡Œ†‚ƒ‚‚…Œ…ƒ‚††ƒ„„ˆ‡‰‡€‚„ƒ†„……†„€‚ƒˆˆ†ƒ€ƒ€‚‰Š‹ƒ~‚‚ƒ‚……‡†…‚~„‰Šˆ‚ƒ~††……~‚‡‡‡|‚ˆŠ‡ƒ„ƒ„„‰ƒ†……~‡‡††„ƒ€…†„‡„‚†ˆ…„€ƒ…††ƒ€€ˆ‡‚€ƒ‰‚~„ˆ…„‡…†…€…„‚ƒ€ƒ‡‰‡~ƒ‡ˆ‰ƒ|ƒƒƒ‚„‹ˆ‚‚ƒ†ˆ†‚ƒ†……„ƒ‚„‡…‡…€|„‹‰‚ƒƒƒ‚ƒˆ…ƒ„‡…‚|‚††‚‚†…„€ƒ‡‡…„‚‰‹…ƒ‚‚~‡Šˆ…ƒ†‚}‰‹…‚†‚~‡‡‡‡‡†„ƒ„‡…„‡…€€ƒ‡‰†ƒ€€ƒ„…„„‚……ƒ‚…‡†„„~|~‚ˆ‰‚€‚‚€„……ˆ‡…„€}ƒƒˆ†‚……„€€‚‡‰ˆ„‚ƒ€ƒ†ˆ„„„„‚‚‚…‡ˆ†ƒƒƒ‡‰…ƒ„~€†‰ˆ…‚‚…ƒƒ……‡ƒ‚€ƒ‚‚„‡‡‡~…‡‡‚‡…ƒƒ‡†„‚ƒ††‚€…ˆ‰„ƒ€‚‡ˆ…ƒ€ƒ‰†€………‚€„„ˆ‚„‡„‚…‡†‚ƒ††…‚‚„‡‚…†‚€ƒƒ‡ƒ„ƒ‚‚†
\ No newline at end of file
Binary file haitest/bspsvs/testdata/bsp/sound/zero_filled_2_bytes.raw has changed
Binary file haitest/bspsvs/testdata/bsp/sound/zero_filled_32kb.raw has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/testdata/bsp/uart/stress8bits.txt	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,273 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+0some text for testing the large transfer of data with        
+1some text for testing the large transfer of data with        
+2some text for testing the large transfer of data with        
+3some text for testing the large transfer of data with        
+4some text for testing the large transfer of data with        
+5some text for testing the large transfer of data with        
+6some text for testing the large transfer of data with        
+7some text for testing the large transfer of data with        
+8some text for testing the large transfer of data with        
+9some text for testing the large transfer of data with        
+Asome text for testing the large transfer of data with        
+Bsome text for testing the large transfer of data with        
+Csome text for testing the large transfer of data with        
+Dsome text for testing the large transfer of data with        
+Esome text for testing the large transfer of data with        
+Fsome text for testing the large transfer of data with        
+0some text for testing the large transfer of data with        
+1some text for testing the large transfer of data with        
+2some text for testing the large transfer of data with        
+3some text for testing the large transfer of data with        
+4some text for testing the large transfer of data with        
+5some text for testing the large transfer of data with        
+6some text for testing the large transfer of data with        
+7some text for testing the large transfer of data with        
+8some text for testing the large transfer of data with        
+9some text for testing the large transfer of data with        
+Asome text for testing the large transfer of data with        
+Bsome text for testing the large transfer of data with        
+Csome text for testing the large transfer of data with        
+Dsome text for testing the large transfer of data with        
+Esome text for testing the large transfer of data with        
+Fsome text for testing the large transfer of data with        
+0some text for testing the large transfer of data with        
+1some text for testing the large transfer of data with        
+2some text for testing the large transfer of data with        
+3some text for testing the large transfer of data with        
+4some text for testing the large transfer of data with        
+5some text for testing the large transfer of data with        
+6some text for testing the large transfer of data with        
+7some text for testing the large transfer of data with        
+8some text for testing the large transfer of data with        
+9some text for testing the large transfer of data with        
+Asome text for testing the large transfer of data with        
+Bsome text for testing the large transfer of data with        
+Csome text for testing the large transfer of data with        
+Dsome text for testing the large transfer of data with        
+Esome text for testing the large transfer of data with        
+Fsome text for testing the large transfer of data with        
+0some text for testing the large transfer of data with        
+1some text for testing the large transfer of data with        
+2some text for testing the large transfer of data with        
+3some text for testing the large transfer of data with        
+4some text for testing the large transfer of data with        
+5some text for testing the large transfer of data with        
+6some text for testing the large transfer of data with        
+7some text for testing the large transfer of data with        
+8some text for testing the large transfer of data with        
+9some text for testing the large transfer of data with        
+Asome text for testing the large transfer of data with        
+Bsome text for testing the large transfer of data with        
+Csome text for testing the large transfer of data with        
+Dsome text for testing the large transfer of data with        
+Esome text for testing the large transfer of data with        
+Fsome text for testing the large transfer of data with        
+0some text for testing the large transfer of data with        
+1some text for testing the large transfer of data with        
+2some text for testing the large transfer of data with        
+3some text for testing the large transfer of data with        
+4some text for testing the large transfer of data with        
+5some text for testing the large transfer of data with        
+6some text for testing the large transfer of data with        
+7some text for testing the large transfer of data with        
+8some text for testing the large transfer of data with        
+9some text for testing the large transfer of data with        
+Asome text for testing the large transfer of data with        
+Bsome text for testing the large transfer of data with        
+Csome text for testing the large transfer of data with        
+Dsome text for testing the large transfer of data with        
+Esome text for testing the large transfer of data with        
+Fsome text for testing the large transfer of data with        
+0some text for testing the large transfer of data with        
+1some text for testing the large transfer of data with        
+2some text for testing the large transfer of data with        
+3some text for testing the large transfer of data with        
+4some text for testing the large transfer of data with        
+5some text for testing the large transfer of data with        
+6some text for testing the large transfer of data with        
+7some text for testing the large transfer of data with        
+8some text for testing the large transfer of data with        
+9some text for testing the large transfer of data with        
+Asome text for testing the large transfer of data with        
+Bsome text for testing the large transfer of data with        
+Csome text for testing the large transfer of data with        
+Dsome text for testing the large transfer of data with        
+Esome text for testing the large transfer of data with        
+Fsome text for testing the large transfer of data with        
+0some text for testing the large transfer of data with        
+1some text for testing the large transfer of data with        
+2some text for testing the large transfer of data with        
+3some text for testing the large transfer of data with        
+4some text for testing the large transfer of data with        
+5some text for testing the large transfer of data with        
+6some text for testing the large transfer of data with        
+7some text for testing the large transfer of data with        
+8some text for testing the large transfer of data with        
+9some text for testing the large transfer of data with        
+Asome text for testing the large transfer of data with        
+Bsome text for testing the large transfer of data with        
+Csome text for testing the large transfer of data with        
+Dsome text for testing the large transfer of data with        
+Esome text for testing the large transfer of data with        
+Fsome text for testing the large transfer of data with        
+0some text for testing the large transfer of data with        
+1some text for testing the large transfer of data with        
+2some text for testing the large transfer of data with        
+3some text for testing the large transfer of data with        
+4some text for testing the large transfer of data with        
+5some text for testing the large transfer of data with        
+6some text for testing the large transfer of data with        
+7some text for testing the large transfer of data with        
+8some text for testing the large transfer of data with        
+9some text for testing the large transfer of data with        
+Asome text for testing the large transfer of data with        
+Bsome text for testing the large transfer of data with        
+Csome text for testing the large transfer of data with        
+Dsome text for testing the large transfer of data with        
+Esome text for testing the large transfer of data with        
+Fsome text for testing the large transfer of data with        
+0some text for testing the large transfer of data with        
+1some text for testing the large transfer of data with        
+2some text for testing the large transfer of data with        
+3some text for testing the large transfer of data with        
+4some text for testing the large transfer of data with        
+5some text for testing the large transfer of data with        
+6some text for testing the large transfer of data with        
+7some text for testing the large transfer of data with        
+8some text for testing the large transfer of data with        
+9some text for testing the large transfer of data with        
+Asome text for testing the large transfer of data with        
+Bsome text for testing the large transfer of data with        
+Csome text for testing the large transfer of data with        
+Dsome text for testing the large transfer of data with        
+Esome text for testing the large transfer of data with        
+Fsome text for testing the large transfer of data with        
+0some text for testing the large transfer of data with        
+1some text for testing the large transfer of data with        
+2some text for testing the large transfer of data with        
+3some text for testing the large transfer of data with        
+4some text for testing the large transfer of data with        
+5some text for testing the large transfer of data with        
+6some text for testing the large transfer of data with        
+7some text for testing the large transfer of data with        
+8some text for testing the large transfer of data with        
+9some text for testing the large transfer of data with        
+Asome text for testing the large transfer of data with        
+Bsome text for testing the large transfer of data with        
+Csome text for testing the large transfer of data with        
+Dsome text for testing the large transfer of data with        
+Esome text for testing the large transfer of data with        
+Fsome text for testing the large transfer of data with        
+0some text for testing the large transfer of data with        
+1some text for testing the large transfer of data with        
+2some text for testing the large transfer of data with        
+3some text for testing the large transfer of data with        
+4some text for testing the large transfer of data with        
+5some text for testing the large transfer of data with        
+6some text for testing the large transfer of data with        
+7some text for testing the large transfer of data with        
+8some text for testing the large transfer of data with        
+9some text for testing the large transfer of data with        
+Asome text for testing the large transfer of data with        
+Bsome text for testing the large transfer of data with        
+Csome text for testing the large transfer of data with        
+Dsome text for testing the large transfer of data with        
+Esome text for testing the large transfer of data with        
+Fsome text for testing the large transfer of data with        
+0some text for testing the large transfer of data with        
+1some text for testing the large transfer of data with        
+2some text for testing the large transfer of data with        
+3some text for testing the large transfer of data with        
+4some text for testing the large transfer of data with        
+5some text for testing the large transfer of data with        
+6some text for testing the large transfer of data with        
+7some text for testing the large transfer of data with        
+8some text for testing the large transfer of data with        
+9some text for testing the large transfer of data with        
+Asome text for testing the large transfer of data with        
+Bsome text for testing the large transfer of data with        
+Csome text for testing the large transfer of data with        
+Dsome text for testing the large transfer of data with        
+Esome text for testing the large transfer of data with        
+Fsome text for testing the large transfer of data with        
+0some text for testing the large transfer of data with        
+1some text for testing the large transfer of data with        
+2some text for testing the large transfer of data with        
+3some text for testing the large transfer of data with        
+4some text for testing the large transfer of data with        
+5some text for testing the large transfer of data with        
+6some text for testing the large transfer of data with        
+7some text for testing the large transfer of data with        
+8some text for testing the large transfer of data with        
+9some text for testing the large transfer of data with        
+Asome text for testing the large transfer of data with        
+Bsome text for testing the large transfer of data with        
+Csome text for testing the large transfer of data with        
+Dsome text for testing the large transfer of data with        
+Esome text for testing the large transfer of data with        
+Fsome text for testing the large transfer of data with        
+0some text for testing the large transfer of data with        
+1some text for testing the large transfer of data with        
+2some text for testing the large transfer of data with        
+3some text for testing the large transfer of data with        
+4some text for testing the large transfer of data with        
+5some text for testing the large transfer of data with        
+6some text for testing the large transfer of data with        
+7some text for testing the large transfer of data with        
+8some text for testing the large transfer of data with        
+9some text for testing the large transfer of data with        
+Asome text for testing the large transfer of data with        
+Bsome text for testing the large transfer of data with        
+Csome text for testing the large transfer of data with        
+Dsome text for testing the large transfer of data with        
+Esome text for testing the large transfer of data with        
+Fsome text for testing the large transfer of data with        
+0some text for testing the large transfer of data with        
+1some text for testing the large transfer of data with        
+2some text for testing the large transfer of data with        
+3some text for testing the large transfer of data with        
+4some text for testing the large transfer of data with        
+5some text for testing the large transfer of data with        
+6some text for testing the large transfer of data with        
+7some text for testing the large transfer of data with        
+8some text for testing the large transfer of data with        
+9some text for testing the large transfer of data with        
+Asome text for testing the large transfer of data with        
+Bsome text for testing the large transfer of data with        
+Csome text for testing the large transfer of data with        
+Dsome text for testing the large transfer of data with        
+Esome text for testing the large transfer of data with        
+Fsome text for testing the large transfer of data with        
+0some text for testing the large transfer of data with        
+1some text for testing the large transfer of data with        
+2some text for testing the large transfer of data with        
+3some text for testing the large transfer of data with        
+4some text for testing the large transfer of data with        
+5some text for testing the large transfer of data with        
+6some text for testing the large transfer of data with        
+7some text for testing the large transfer of data with        
+8some text for testing the large transfer of data with        
+9some text for testing the large transfer of data with        
+Asome text for testing the large transfer of data with        
+Bsome text for testing the large transfer of data with        
+Csome text for testing the large transfer of data with        
+Dsome text for testing the large transfer of data with        
+Esome text for testing the large transfer of data with        
+Fsome text for testing the large transfer of data with        
Binary file haitest/bspsvs/tools/java/UartEchoServer/bin/UartEchoServer$EStatus.class has changed
Binary file haitest/bspsvs/tools/java/UartEchoServer/bin/UartEchoServer.class has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/tools/java/UartEchoServer/bin/logging.properties	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,71 @@
+############################################################
+#	Default Logging Configuration File
+#
+# You can use a different file by specifying a filename
+# with the java.util.logging.config.file system property.
+# For example java -Djava.util.logging.config.file=myfile
+############################################################
+
+############################################################
+#  	Global properties
+############################################################
+
+# "handlers" specifies a comma separated list of log Handler
+# classes.  These handlers will be installed during VM startup.
+# Note that these classes must be on the system classpath.
+# By default we only configure a ConsoleHandler, which will only
+# show messages at the INFO and above levels.
+handlers= java.util.logging.ConsoleHandler, java.util.logging.FileHandler
+
+# To also add the FileHandler, use the following line instead.
+#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler, com.symbian.utils.log.NetSendHandler, com.symbian.utils.log.EmailHandler
+
+# Default global logging level.
+# This specifies which kinds of events are logged across
+# all loggers.  For any given facility this global level
+# can be overriden by a facility specific level
+# Note that the ConsoleHandler also has a separate level
+# setting to limit messages printed to the console.
+.level= INFO
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+# default file output is in user's home directory.
+java.util.logging.FileHandler.pattern = UartEchoServer%g_%u.log
+#java.util.logging.FileHandler.limit = 50000
+java.util.logging.FileHandler.count = 10
+java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
+java.util.logging.FileHandler.level = INFO
+
+# Limit the message that are printed on the console to FINE and above.
+java.util.logging.ConsoleHandler.level = INFO
+java.util.logging.ConsoleHandler.formatter = com.symbian.utils.log.SimpleFormatter
+# com.symbian.utils.log.SimpleFormatter OR java.util.logging.SimpleFormatter OR java.util.logging.XMLFormatter OR ...
+
+java.util.logging.SocketHandler.level=ALL
+java.util.logging.SocketHandler.host=localhost
+java.util.logging.SocketHandler.port=2000
+
+############################################################
+# Symbian Specific Handlers
+# Please not that you must manually download the mail.jar and smtp.jar from www.java.com for this to work.
+#
+# numbererrors: Number of errors to wait for before sending (if 0 won't be sent)
+# sendlevel: minimun level to send errors. Must be same as or higher than global level (default WARNING)
+############################################################
+
+# NetSend Handler: If you want errors to be sent by NetSend
+com.symbian.utils.log.NetSendHandler.numbererrors = 5
+com.symbian.utils.log.NetSendHandler.sendlevel = WARNING
+com.symbian.utils.log.NetSendHandler.ip = lon-XXYY
+
+# Email Handler: If you want errors to be sent by Email
+com.symbian.utils.log.EmailHandler.numbererrors = 5
+com.symbian.utils.log.EmailHandler.sendlevel = WARNING
+com.symbian.utils.log.EmailHandler.fromaddress = xx.yy@symbian.com
+com.symbian.utils.log.EmailHandler.toaddress = xx.yy@symbian.com
+# note smtp doesn't currently support SSL
+com.symbian.utils.log.EmailHandler.server = smtp.xx.yy
Binary file haitest/bspsvs/tools/java/UartEchoServer/bin/rxtxSerial.dll has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/tools/java/UartEchoServer/group/buildechoserver.bat	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,20 @@
+@rem
+@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+javac ..\src\UartEchoServer.java -classpath ..\lib\RXTXcomm.jar;..\lib\commons-cli-1.1.jar -verbose >Log.txt 2>&1
+xcopy /R /Y ..\src\UartEchoServer*.class ..\bin\
+del /F /Q ..\src\*.class
+xcopy /R /Y ..\lib\*.dll ..\bin\
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/tools/java/UartEchoServer/group/startechoserver.bat	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,19 @@
+@rem
+@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+cd ..\bin
+start "UartEchoServer" /MIN /high java -Djava.util.logging.config.file=logging.properties -classpath "%CLASSPATH%;..\lib\RXTXcomm.jar;..\lib\commons-cli-1.1.jar" UartEchoServer %*
+cd ..\group
Binary file haitest/bspsvs/tools/java/UartEchoServer/lib/RXTXcomm.jar has changed
Binary file haitest/bspsvs/tools/java/UartEchoServer/lib/commons-cli-1.1.jar has changed
Binary file haitest/bspsvs/tools/java/UartEchoServer/lib/rxtxSerial.dll has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/tools/java/UartEchoServer/src/UartEchoServer.java	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,814 @@
+/*
+* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+import gnu.io.CommPort;
+import gnu.io.CommPortIdentifier;
+import gnu.io.SerialPort;
+import gnu.io.SerialPortEvent;
+import gnu.io.SerialPortEventListener;
+
+import java.util.logging.Logger;
+
+import org.apache.commons.cli.Options;
+import org.apache.commons.cli.Option;
+import org.apache.commons.cli.OptionBuilder;
+import org.apache.commons.cli.CommandLineParser;
+import org.apache.commons.cli.PosixParser;
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.HelpFormatter;
+
+public class UartEchoServer implements SerialPortEventListener
+	{
+	//	Command line options
+	private static final String	OPTION_HELP			="help";
+	private static final String	OPTION_PORT			="port";
+	private static final String	OPTION_BAUD			="baud_rate";
+	private static final String	OPTION_DATA			="data_bits";
+	private static final String	OPTION_STOP			="stop_bits";
+	private static final String	OPTION_PARITY		="parity";
+	private static final String	OPTION_FLOW			="flow_control";
+
+	//	Default settings for serial port
+	private static final String	DEFAULT_PORT_NAME	= "COM1";
+	private static final int	DEFAULT_BAUD_RATE	= 9600;
+	private static final int	DEFAULT_DATA_BITS	= SerialPort.DATABITS_8;
+	private static final int	DEFAULT_STOP_BITS	= SerialPort.STOPBITS_1;
+	private static final int	DEFAULT_PARITY		= SerialPort.PARITY_NONE;
+	private static final int	DEFAULT_FLOW_CONTROL= SerialPort.FLOWCONTROL_NONE;
+
+	//	Command format limiters
+	private static final byte	BYTE_IGNORE			= '\0'; // Null
+	private static final byte	BYTE_CLEARBI		= '\1'; // Ctrl A
+	private static final byte	BYTE_QUERYBI		= '\2'; // Ctrl B
+	private static final byte	BYTE_RESET			= '\3'; // Ctrl C
+	private static final byte	BYTE_BLOCK_START	= '[';
+	private static final byte	BYTE_BLOCK_END		= ']';
+	private static final String	BLOCK_ASSIGN		= "=";
+	private static final String	BLOCK_SEPERATOR		= ",";
+
+	//	Supported commands
+	private static final String	CMD_BAUD_RATE		= "baud_rate";
+	private static final String	CMD_DATA_BITS		= "data_bits";
+	private static final String	CMD_DELAY			= "delay";
+	private static final String	CMD_DISCONNECT		= "disconnect";
+	private static final String	CMD_ECHO			= "echo";
+	private static final String	CMD_FLOW_CONTROL	= "flow_control";
+	private static final String	CMD_LOG				= "log";
+	private static final String	CMD_PARITY			= "parity";
+	private static final String	CMD_STOP_BITS		= "stop_bits";
+
+	//	Supported data bits
+	private static final String	DATA_BITS_5			= "5";
+	private static final String	DATA_BITS_6			= "6";
+	private static final String	DATA_BITS_7			= "7";
+	private static final String	DATA_BITS_8			= "8";
+
+	//	Supported flow control
+	private static final String	FLOWCONTROL_NONE	= "none";
+	private static final String	FLOWCONTROL_RTSCTS	= "rtscts";
+	private static final String	FLOWCONTROL_XONXOFF	= "xonxoff";
+
+	//	Supported parity
+	private static final String	PARITY_NONE			= "none";
+	private static final String	PARITY_EVEN			= "even";
+	private static final String	PARITY_ODD			= "odd";
+	private static final String	PARITY_MARK			= "mark";
+	private static final String	PARITY_SPACE		= "space";
+
+	//	Supported stop bits
+	private static final String	STOP_BITS_1			= "1";
+	private static final String	STOP_BITS_1_5		= "1.5";
+	private static final String	STOP_BITS_2			= "2";
+
+	//	Constants
+	private static final int	BUFFER_SIZE			= 1024;
+	private static final int	SLEEP_PERIOD		= 200000;
+
+	private enum EStatus
+		{
+		EStatusEcho,
+		EStatusCommandStart,
+		};
+
+	private Thread				iMainThread;
+	private int					iRestartingDelay;
+	private boolean				iRestarting;
+	private boolean				iRunning;
+	private Logger				iLogger;
+	private byte[]				iBuffer;
+	private EStatus				iStatus;
+	private String				iCommand;
+	private String				iPortName;
+	private byte				iBI;
+
+	private int					iBaudRate;
+	private int					iDataBits;
+	private int					iStopBits;
+	private int					iParity;
+	private int					iFlowControl;
+
+	private int					iStartupBaudRate;
+	private int					iStartupDataBits;
+	private int					iStartupStopBits;
+	private int					iStartupParity;
+	private int					iStartupFlowControl;
+
+	private CommPortIdentifier	iPortIdentifier;
+	private SerialPort			iSerialPort;
+
+	/*
+	 *	Constructor
+	 */
+	protected UartEchoServer() throws Exception
+		{
+		iRestartingDelay=0;
+		iRestarting=true;
+		iRunning=true;
+		iLogger=Logger.getLogger("UartEchoServer");
+		iBuffer=new byte[BUFFER_SIZE];
+		iStatus = EStatus.EStatusEcho;
+		iCommand = "";
+		iBI=0;
+		iPortName=DEFAULT_PORT_NAME;
+		iBaudRate=DEFAULT_BAUD_RATE;
+		iDataBits=DEFAULT_DATA_BITS;
+		iStopBits=DEFAULT_STOP_BITS;
+		iParity=DEFAULT_PARITY;
+		iFlowControl=DEFAULT_FLOW_CONTROL;
+		}
+
+	/*
+	 *	Second pahse constructor
+	 *
+	 *	@param	aCommandLine	Command line parameters
+	 */
+	protected void Construct(final CommandLine aCommandLine) throws Exception
+		{
+		/*
+		 *	Set port name if passed in command line
+		 */
+		if ( aCommandLine.hasOption(OPTION_PORT) )
+			{
+			iPortName=aCommandLine.getOptionValue(OPTION_PORT);
+			iLogger.info("PortName:" + iPortName);
+			}
+
+		/*
+		 *	Set baud rate if passed in command line
+		 */
+		if ( aCommandLine.hasOption(OPTION_BAUD) )
+			{
+			setBaudRate(aCommandLine.getOptionValue(OPTION_BAUD));
+			iLogger.info("Baud Rate:" + iBaudRate);
+			}
+
+		/*
+		 *	Set data bits if passed in command line
+		 */
+		if ( aCommandLine.hasOption(OPTION_DATA) )
+			{
+			setDataBits(aCommandLine.getOptionValue(OPTION_DATA));
+			iLogger.info("Data Bits:" + iDataBits);
+			}
+
+		/*
+		 *	Set stop bits if passed in command line
+		 */
+		if ( aCommandLine.hasOption(OPTION_STOP) )
+			{
+			setStopBits(aCommandLine.getOptionValue(OPTION_STOP));
+			iLogger.info("Stop Bits:" + iStopBits);
+			}
+
+		/*
+		 *	Set parity if passed in command line
+		 */
+		if ( aCommandLine.hasOption(OPTION_PARITY) )
+			{
+			setParity(aCommandLine.getOptionValue(OPTION_PARITY));
+			iLogger.info("Parity:" + iParity);
+			}
+
+		/*
+		 *	Set flow control if passed in command line
+		 */
+		if ( aCommandLine.hasOption(OPTION_FLOW) )
+			{
+			setFlowControl(aCommandLine.getOptionValue(OPTION_FLOW));
+			iLogger.info("Flow Control:" + iFlowControl);
+			}
+
+		/*
+		 *	Save startup values. Used by reset command
+		 */
+		iStartupBaudRate=iBaudRate;
+		iStartupDataBits=iDataBits;
+		iStartupStopBits=iStopBits;
+		iStartupParity=iParity;
+		iStartupFlowControl=iFlowControl;
+
+		/*
+		 *	Make sure port is not in use
+		 */
+		iPortIdentifier=CommPortIdentifier.getPortIdentifier(iPortName);
+		if ( iPortIdentifier.isCurrentlyOwned() )
+			{
+			throw new Exception("Error: Port is currently in use");
+			}
+
+		/*
+		 *	Port not in use so open it
+		 */
+		CommPort	commPort=iPortIdentifier.open(this.getClass().getName(), 2000);
+
+		/*
+		 *	Save thread
+		 */
+		iMainThread=Thread.currentThread();
+
+		/*
+		 *	Make sure the port is of type serial
+		 */
+		if ( commPort instanceof SerialPort )
+			{
+			iSerialPort = (SerialPort) commPort;
+			iFlowControl=iSerialPort.getFlowControlMode();
+			while ( iRunning )
+				{
+				initPort();
+
+				iRestarting=false;
+				while ( iRunning && !iRestarting )
+					{
+					try
+						{
+						iMainThread.sleep(SLEEP_PERIOD);
+						}
+					catch ( InterruptedException e )
+						{
+						}
+					}
+				iSerialPort.close();
+				if ( iRestarting )
+					{
+					iLogger.finest("Restarting");
+					iMainThread.sleep(iRestartingDelay);
+					commPort=iPortIdentifier.open(this.getClass().getName(), 2000);
+					iSerialPort = (SerialPort) commPort;
+					}
+				}
+			}
+		else
+			{
+			throw new Exception("Error: Only serial ports are handled by this example.");
+			}
+		}
+
+	/*
+	 *	Initialise the port
+	 */
+	private void initPort() throws Exception
+		{
+		iSerialPort.setSerialPortParams(iBaudRate, iDataBits, iStopBits, iParity);
+		iSerialPort.setFlowControlMode(iFlowControl);
+		iSerialPort.addEventListener(this);
+		iSerialPort.notifyOnBreakInterrupt(true);
+		iSerialPort.notifyOnCarrierDetect(true);
+		iSerialPort.notifyOnCTS(true);
+		iSerialPort.notifyOnDataAvailable(true);
+		iSerialPort.notifyOnDSR(true);
+		iSerialPort.notifyOnFramingError(true);
+		iSerialPort.notifyOnOutputEmpty(true);
+		iSerialPort.notifyOnOverrunError(true);
+		iSerialPort.notifyOnParityError(true);
+		iSerialPort.notifyOnRingIndicator(true);
+		iSerialPort.setInputBufferSize(BUFFER_SIZE);
+		}
+
+	/*
+	 *	Set the baud rate
+	 *
+	 *	@param	aValue	String representation of the baud rate
+	 */
+	private void setBaudRate(final String aValue)
+		{
+		try
+			{
+			iBaudRate=Integer.parseInt(aValue);
+			}
+		catch (Exception e)
+			{
+			iLogger.severe("convertToBaudRate(" + aValue + "):exception" + e);
+			}
+		}
+
+	/*
+	 *	Set the data bits
+	 *
+	 *	@param	aValue	String representation of the data bits
+	 */
+	private void setDataBits(final String aValue)
+		{
+		try
+			{
+			if ( aValue.compareTo(DATA_BITS_5)==0 )
+				{
+				iDataBits=SerialPort.DATABITS_5;
+				}
+			else if ( aValue.compareTo(DATA_BITS_6)==0 )
+				{
+				iDataBits=SerialPort.DATABITS_6;
+				}
+			else if ( aValue.compareTo(DATA_BITS_7)==0 )
+				{
+				iDataBits=SerialPort.DATABITS_7;
+				}
+			else if ( aValue.compareTo(DATA_BITS_8)==0 )
+				{
+				iDataBits=SerialPort.DATABITS_8;
+				}
+			else
+				{
+				iLogger.severe("setDataBits(" + aValue + ")");
+				}
+			}
+		catch (Exception e)
+			{
+			iLogger.severe("setDataBits(" + aValue + "):excpetion" + e);
+			}
+		}
+
+	/*
+	 *	Set the flow control
+	 *
+	 *	@param	aValue	String representation of the flow control
+	 */
+	private void setFlowControl(final String aValue)
+		{
+		try
+			{
+			if ( aValue.compareTo(FLOWCONTROL_NONE)==0 )
+				{
+				iFlowControl=SerialPort.FLOWCONTROL_NONE;
+				}
+			else if ( aValue.compareTo(FLOWCONTROL_RTSCTS)==0 )
+				{
+				iFlowControl=SerialPort.FLOWCONTROL_RTSCTS_IN | SerialPort.FLOWCONTROL_RTSCTS_OUT;
+				}
+			else if ( aValue.compareTo(FLOWCONTROL_XONXOFF)==0 )
+				{
+				iFlowControl=SerialPort.FLOWCONTROL_XONXOFF_IN | SerialPort.FLOWCONTROL_XONXOFF_OUT;
+				}
+			else
+				{
+				iLogger.severe("setFlowControl(" + aValue + ")");
+				}
+			}
+		catch (Exception e)
+			{
+			iLogger.severe("setFlowControl(" + aValue + "):exception" + e);
+			}
+		}
+
+	/*
+	 *	Set the parity
+	 *
+	 *	@param	aValue	String representation of the parity
+	 */
+	private void setParity(final String aValue)
+		{
+		try
+			{
+			if ( aValue.compareTo(PARITY_NONE)==0 )
+				{
+				iParity=SerialPort.PARITY_NONE;
+				}
+			else if ( aValue.compareTo(PARITY_EVEN)==0 )
+				{
+				iParity=SerialPort.PARITY_EVEN;
+				}
+			else if ( aValue.compareTo(PARITY_ODD)==0 )
+				{
+				iParity=SerialPort.PARITY_ODD;
+				}
+			else if ( aValue.compareTo(PARITY_MARK)==0 )
+				{
+				iParity=SerialPort.PARITY_MARK;
+				}
+			else if ( aValue.compareTo(PARITY_SPACE)==0 )
+				{
+				iParity=SerialPort.PARITY_SPACE;
+				}
+			else
+				{
+				iLogger.severe("setParity(" + aValue + ")");
+				}
+			}
+		catch (Exception e)
+			{
+			iLogger.severe("setParity(" + aValue + "):exception" + e);
+			}
+		}
+
+	/*
+	 *	Set the stop bits
+	 *
+	 *	@param	aValue	String representation of the stop bits
+	 */
+	private void setStopBits(final String aValue)
+		{
+		try
+			{
+			if ( aValue.compareTo(STOP_BITS_1)==0 )
+				{
+				iStopBits=SerialPort.STOPBITS_1;
+				}
+			else if ( aValue.compareTo(STOP_BITS_1_5)==0 )
+				{
+				iStopBits=SerialPort.STOPBITS_1_5;
+				}
+			else if ( aValue.compareTo(STOP_BITS_2)==0 )
+				{
+				iStopBits=SerialPort.STOPBITS_2;
+				}
+			else
+				{
+				iLogger.severe("setStopBits(" + aValue + ")");
+				}
+			}
+		catch (Exception e)
+			{
+			iLogger.severe("setStopBits(" + aValue + "):exception" + e);
+			}
+		}
+
+	/*
+	 *	Process a command from the input
+	 */
+	private void processCommand() throws Exception
+		{
+		final String	values[] = iCommand.split(BLOCK_SEPERATOR);
+
+		iSerialPort.getOutputStream().flush();
+		for ( int i=0; i<values.length; i++ )
+			{
+			/*
+			 *	Commands should be of the type variable=value
+			 */
+			final String	parts[]=values[i].split(BLOCK_ASSIGN);
+
+			if ( parts.length==2 )
+				{
+				/*
+				 *	Set baud rate command
+				 */
+				if ( parts[0].compareTo(CMD_BAUD_RATE)==0 )
+					{
+					setBaudRate(parts[1]);
+					iSerialPort.setSerialPortParams(iBaudRate, iDataBits, iStopBits, iParity);
+					}
+				/*
+				 *	Set data bits command
+				 */
+				else if ( parts[0].compareTo(CMD_DATA_BITS)==0 )
+					{
+					setDataBits(parts[1]);
+					iSerialPort.setSerialPortParams(iBaudRate, iDataBits, iStopBits, iParity);
+					}
+				/*
+				 *	Delay command
+				 */
+				else if ( parts[0].compareTo(CMD_DELAY)==0 )
+					{
+					final int	delay=Integer.parseInt(parts[1]);
+					Thread.sleep(delay);
+					}
+				/*
+				 *	Disconnect command
+				 */
+				else if ( parts[0].compareTo(CMD_DISCONNECT)==0 )
+					{
+					iRestartingDelay=Integer.parseInt(parts[1]);
+					iRestarting=true;
+					}
+				/*
+				 *	Echo command
+				 */
+				else if ( parts[0].compareTo(CMD_ECHO)==0 )
+					{
+					final int		length=parts[1].length();
+					for ( int index=0; index<length; ++index )
+						{
+						final byte	out=(byte)(parts[1].charAt(index));
+						iLogger.finest("<< " + out);
+						iSerialPort.getOutputStream().write(out);
+						}
+					}
+				/*
+				 *	Set flow control command
+				 */
+				else if ( parts[0].compareTo(CMD_FLOW_CONTROL)==0 )
+					{
+					setFlowControl(parts[1]);
+					iSerialPort.setFlowControlMode(iFlowControl);
+					}
+				/*
+				 *	Log command
+				 */
+				else if ( parts[0].compareTo(CMD_LOG)==0 )
+					{
+					iLogger.info(parts[1]);
+					}
+				/*
+				 *	Set parity command
+				 */
+				else if ( parts[0].compareTo(CMD_PARITY)==0 )
+					{
+					setParity(parts[1]);
+					iSerialPort.setSerialPortParams(iBaudRate, iDataBits, iStopBits, iParity);
+					}
+				/*
+				 *	Set stop bits command
+				 */
+				else if ( parts[0].compareTo(CMD_STOP_BITS)==0 )
+					{
+					setStopBits(parts[1]);
+					iSerialPort.setSerialPortParams(iBaudRate, iDataBits, iStopBits, iParity);
+					}
+				/*
+				 *	Error command
+				 */
+				else
+					{
+					iLogger.severe("Bad command(" + parts[0] + ")");
+					}
+				}
+			else
+				{
+				iLogger.severe("Bad data");
+				}
+			}
+		}
+
+	/*
+	 *	Process data read from input stream
+	 *
+	 *	@param	aLength	Length of the data in the buffer
+	 */
+	private void processInput(final int aLength) throws Exception
+		{
+		final String	buffer=new String(iBuffer, 0, aLength);
+		iLogger.finest(">> " + buffer);
+		for ( int index=0; index<aLength; ++index )
+			{
+			switch ( iBuffer[index] )
+				{
+			/*
+			 *	Ignored data
+			 */
+			case BYTE_IGNORE:
+				break;
+			/*
+			 *	Clear the break interrupt count
+			 */
+			case BYTE_CLEARBI:
+				iBI=0;
+				break;
+			/*
+			 *	Query the break interrupt count
+			 */
+			case BYTE_QUERYBI:
+				iLogger.finest("BI Count=" + iBI);
+				iLogger.finest("<< " + iBI);
+				iSerialPort.getOutputStream().write(iBI);
+				break;
+			/*
+			 *	Reset port setting to startup values
+			 */
+			case BYTE_RESET:
+				iBaudRate=iStartupBaudRate;
+				iDataBits=iStartupDataBits;
+				iStopBits=iStartupStopBits;
+				iParity=iStartupParity;
+				iFlowControl=iStartupFlowControl;
+				iSerialPort.setFlowControlMode(iFlowControl);
+				iSerialPort.setSerialPortParams(iBaudRate, iDataBits, iStopBits, iParity);
+				iStatus=EStatus.EStatusEcho;
+				break;
+			default:
+				/*
+				 *	If in command mode add the byte to the command buffer
+				 *	unless we read the end of command block character
+				 */
+				if ( iStatus==EStatus.EStatusCommandStart ) 
+					{
+					if ( iBuffer[index]==BYTE_BLOCK_END )
+						{
+						processCommand();
+						iStatus=EStatus.EStatusEcho;
+						}
+					else
+						{
+						iCommand += buffer.charAt(index);
+						}
+					}
+				/*
+				 *	If in echo mode, echo the character unless we read the
+				 *	start of command block character
+				 */
+				else if ( iStatus==EStatus.EStatusEcho )
+					{
+					if ( iBuffer[index]==BYTE_BLOCK_START )
+						{
+						iCommand="";
+						iStatus=EStatus.EStatusCommandStart;
+						}
+					else
+						{
+						iLogger.finest("<< " + iBuffer[index]);
+						iSerialPort.getOutputStream().write(iBuffer[index]);
+						}
+					}
+				break;
+				}
+			}
+		}
+
+	/*
+	 *	Serial port event received
+	 *
+	 *	@param	aEvent	Event received
+	 */
+	public void serialEvent(SerialPortEvent aEvent)
+		{
+		switch ( aEvent.getEventType() )
+			{
+		case SerialPortEvent.DATA_AVAILABLE:
+			/*
+			 *	Process data in input buffer
+			 */
+			try
+				{
+				final int	length = iSerialPort.getInputStream().read(iBuffer);
+
+				if ( length>0 )
+					{
+					processInput(length);
+					}
+				}
+			catch (Exception e)
+				{
+				e.printStackTrace();
+				}
+			if ( iRestarting )
+				{
+				iMainThread.interrupt();
+				}
+			break;
+		case SerialPortEvent.BI:
+			/*
+			 *	Increment break interrupt count
+			 */
+			++iBI;
+			iLogger.finest("Break Interrupt");
+			break;
+		case SerialPortEvent.CD:
+			/*
+			 *	Ignore
+			 */
+			iLogger.finest("Carrier Detect");
+			break;
+		case SerialPortEvent.CTS:
+			/*
+			 *	Ignore
+			 */
+			iLogger.finest("Clear To Send");
+			break;
+		case SerialPortEvent.DSR:
+			/*
+			 *	Ignore
+			 */
+			iLogger.finest("Data Set Ready");
+			break;
+		case SerialPortEvent.FE:
+			/*
+			 *	Ignore
+			 */
+			iLogger.finest("Framing Error");
+			break;
+		case SerialPortEvent.OE:
+			/*
+			 *	Ignore
+			 */
+			iLogger.finest("Overflow Error");
+			break;
+		case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
+			/*
+			 *	Ignore
+			 */
+			iLogger.finest("Output Buffer Empty");
+			break;
+		case SerialPortEvent.PE:
+			/*
+			 *	Ignore
+			 */
+			iLogger.finest("Parity Error");
+			break;
+		case SerialPortEvent.RI:
+			/*
+			 *	Ignore
+			 */
+			iLogger.finest("Ring Interrupt");
+			break;
+		default:
+			iLogger.finest("Unknown event");
+			break;
+			}
+		}
+
+	/*
+	 *	Application entry point
+	 *
+	 *	@param	aArgs	COmmand line arguments
+	 */
+	public static void main(String[] aArgs)
+		{
+		final Options	options = new Options();
+
+		options.addOption(new Option(OPTION_HELP, "print this message"));
+
+		OptionBuilder.withLongOpt(OPTION_PORT);
+		OptionBuilder.withDescription("set port COMx");
+		OptionBuilder.withValueSeparator( '=' );
+		OptionBuilder.hasArg();
+		options.addOption(OptionBuilder.create());
+
+		OptionBuilder.withLongOpt(OPTION_BAUD);
+		OptionBuilder.withDescription("set the baud rate");
+		OptionBuilder.withValueSeparator( '=' );
+		OptionBuilder.hasArg();
+		options.addOption(OptionBuilder.create());
+
+		OptionBuilder.withLongOpt(OPTION_DATA);
+		OptionBuilder.withDescription("set the data bits [" + DATA_BITS_5 +"|" + DATA_BITS_6 + "|" + DATA_BITS_7 + "|" + DATA_BITS_8 + "]");
+		OptionBuilder.withValueSeparator( '=' );
+		OptionBuilder.hasArg();
+		options.addOption(OptionBuilder.create());
+
+		OptionBuilder.withLongOpt(OPTION_STOP);
+		OptionBuilder.withDescription("set the stop bits [" + STOP_BITS_1 + "|" + STOP_BITS_1_5 + "|" + STOP_BITS_2 + "]");
+		OptionBuilder.withValueSeparator( '=' );
+		OptionBuilder.hasArg();
+		options.addOption(OptionBuilder.create());
+
+		OptionBuilder.withLongOpt(OPTION_PARITY);
+		OptionBuilder.withDescription("set the parity [" + PARITY_NONE + "|" + PARITY_EVEN + "|" + PARITY_ODD + "|" + PARITY_MARK + "|" + PARITY_SPACE + "]");
+		OptionBuilder.withValueSeparator( '=' );
+		OptionBuilder.hasArg();
+		options.addOption(OptionBuilder.create());
+
+		OptionBuilder.withLongOpt(OPTION_FLOW);
+		OptionBuilder.withDescription("set the flow control [" + FLOWCONTROL_NONE + "|" + FLOWCONTROL_RTSCTS + "|" + FLOWCONTROL_XONXOFF + "]");
+		OptionBuilder.withValueSeparator( '=' );
+		OptionBuilder.hasArg();
+		options.addOption(OptionBuilder.create());
+
+		final CommandLineParser	parser = new PosixParser();
+
+		try
+			{
+			// parse the command line arguments
+			final CommandLine	commandLine = parser.parse(options, aArgs);
+
+			if ( commandLine.hasOption(OPTION_HELP) )
+				{
+				final HelpFormatter	formatter = new HelpFormatter();
+				formatter.printHelp("UartEchoServer", options);
+				}
+			else
+				{
+				final UartEchoServer	echoServer=new UartEchoServer();
+				echoServer.Construct(commandLine);
+				}
+			}
+		catch ( Exception e )
+			{
+			e.printStackTrace();
+			}
+		}
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/tools/perl/BuildOrbiter/BuildOrbiter.bat	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,16 @@
+@rem
+@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+perl buildorbiter.pl  %*
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/haitest/bspsvs/tools/perl/BuildOrbiter/BuildOrbiter.pl	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,104 @@
+#
+# Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+use File::Copy;
+use Getopt::Long;
+use Cwd;
+use Archive::Zip;
+use Archive::Zip::Tree;
+
+sub Usage()
+	{
+	print <<USAGE_EOF;
+Usage
+perl buildorbiter.pl --in=FileNameIn --out=FileNameOut --help
+
+    --in=FileNameIn             : Input oby file name
+
+    --out=FileNameOut           : Output zip file name
+
+    --help                      : This help
+USAGE_EOF
+	exit( 0 )
+	}
+
+sub main()
+	{
+	my	$help='';
+	my	$input="";
+	my	$output="";
+
+	GetOptions(
+		'in=s'		=> \$input,
+		'out=s'		=> \$output,
+		'help' 		=> \$help
+	);
+
+	if($help or ($input eq "") or ($output eq "") )
+		{
+		Usage();
+		exit(0);
+		}
+
+	my	$curdir = cwd;
+	$_ = $curdir;
+	s/\//\\/g;
+	$curdir = $_;
+
+	my	$theEpocRoot=$ENV{EPOCROOT};
+	my	@epocdir = "$theEpocRoot.\\epoc32";
+
+	open FH, "$input" || die "Couldn't open $input file for Reading: $!\n";
+
+	while ( <FH> )
+		{
+		chomp;                  # no newline
+		s/#.*//;                # no comments
+		s/^\s+//;               # no leading white
+		s/\s+$//;               # no trailing white
+		next unless length;     # anything left?
+		if ( /(^file|^data)\s*=\s*(\S+)\s+(\S+)/ )
+			{
+			my	$inputFile=$2;
+
+			$inputFile =~ m/(\S*)(\\|\/)(\S+)$/;
+
+			my	$dir=$curdir.$1;
+			unless ( -d $dir )
+				{
+				system("mkdir $dir");
+				}
+			printf "Copying: $inputFile\n";
+			copy($inputFile, $dir) or die "File cannot be copied.";
+			}
+		}
+	close FH;
+
+	my	$zip = Archive::Zip->new();
+	if ( $input =~ m/(\S*)(\\|\/)(\S+)$/ )
+		{
+		$zip->addFile("$input", $3);
+		}
+	else
+		{
+		$zip->addFile("$input");
+		}
+	$zip->addTree("epoc32", "epoc32");
+	die 'write error' if $zip->writeToFileNamed( "$output" ) != AZ_OK;
+	printf "Completed\n";
+	}
+
+main();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package_definition.xml	Tue Feb 02 01:39:10 2010 +0200
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<SystemDefinition schema="3.0.0">
+  <package id="boardsupport" name="Board Support" levels="bsp test 2 3 config">
+    <collection id="emulator" name="Emulator" level="bsp">
+      <component id="emulatorbsp" name="Emulator BSP" purpose="optional">
+        <unit bldFile="emulator/emulatorbsp" mrp="emulator/emulatorbsp/base_wins.mrp"/>
+      </component>
+    </collection>
+    <collection id="haitest" name="HAI Test Suites" level="test">
+      <component id="bspsvs" name="BSP Verification Suite" introduced="^2" purpose="development">
+        <unit mrp="haitest/bspsvs/group/bspsvs.mrp"/>
+      </component>
+    </collection>
+    <collection id="boardsupport_info" name="Board Support Info" level="config">
+      <component id="boardsupport_metadata" name="Board Support Metadata" class="config" introduced="^2" purpose="development" target="desktop">
+        <unit mrp="boardsupport_info/boardsupport_metadata/boardsupport_metadata.mrp"/>
+      </component>
+    </collection>
+  </package>
+</SystemDefinition>