diff --git a/.metadata/.lock b/.metadata/.lock
new file mode 100644
index 0000000..e69de29
diff --git a/.metadata/.log b/.metadata/.log
new file mode 100644
index 0000000..cd6695d
--- /dev/null
+++ b/.metadata/.log
@@ -0,0 +1,86 @@
+!SESSION 2020-12-10 23:11:06.339 -----------------------------------------------
+eclipse.buildId=unknown
+java.version=1.6.0_18
+java.vendor=Sun Microsystems Inc.
+BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
+Command-line arguments: -os win32 -ws win32 -arch x86
+
+!ENTRY org.eclipse.equinox.p2.metadata.repository 4 1000 2020-12-10 23:12:05.044
+!MESSAGE No repository found at http://tools.ext.nokia.com/carbide/updates/3.0.
+
+!ENTRY com.nokia.carbide.remoteconnections.discovery.pccs.pccsnative.PCCSConnection 4 0 2020-12-10 23:12:06.205
+!MESSAGE Carbide could not find a PC Suite installation. To install PC Suite, go to: https://tools.ext.nokia.com/PCsuite
+!STACK 1
+org.eclipse.core.runtime.CoreException: Carbide could not find a PC Suite installation. To install PC Suite, go to: https://tools.ext.nokia.com/PCsuite
+ at com.nokia.carbide.remoteconnections.discovery.pccs.pccsnative.PCCSConnection.open(PCCSConnection.java:143)
+ at com.nokia.carbide.remoteconnections.discovery.pccs.agent.PCCSDiscoveryAgent.start(PCCSDiscoveryAgent.java:186)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator$3.select(RemoteConnectionsActivator.java:276)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator.loadExtensions(RemoteConnectionsActivator.java:320)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator.loadAndStartDeviceDiscoveryAgents(RemoteConnectionsActivator.java:270)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator.access$3(RemoteConnectionsActivator.java:267)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator$1.run(RemoteConnectionsActivator.java:136)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator$WhenWorkbenchIsVisibleThread.run(RemoteConnectionsActivator.java:90)
+Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.nokia.carbide.remoteconnections.discovery.pccs.pccsnative.IConnAPILibrary
+ at com.nokia.carbide.remoteconnections.discovery.pccs.pccsnative.PCCSConnection.open(PCCSConnection.java:127)
+ ... 7 more
+!SUBENTRY 1 com.nokia.carbide.remoteConnections.discovery.pccs 4 1 2020-12-10 23:12:06.206
+!MESSAGE Carbide could not find a PC Suite installation. To install PC Suite, go to: https://tools.ext.nokia.com/PCsuite
+!STACK 0
+java.lang.NoClassDefFoundError: Could not initialize class com.nokia.carbide.remoteconnections.discovery.pccs.pccsnative.IConnAPILibrary
+ at com.nokia.carbide.remoteconnections.discovery.pccs.pccsnative.PCCSConnection.open(PCCSConnection.java:127)
+ at com.nokia.carbide.remoteconnections.discovery.pccs.agent.PCCSDiscoveryAgent.start(PCCSDiscoveryAgent.java:186)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator$3.select(RemoteConnectionsActivator.java:276)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator.loadExtensions(RemoteConnectionsActivator.java:320)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator.loadAndStartDeviceDiscoveryAgents(RemoteConnectionsActivator.java:270)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator.access$3(RemoteConnectionsActivator.java:267)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator$1.run(RemoteConnectionsActivator.java:136)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator$WhenWorkbenchIsVisibleThread.run(RemoteConnectionsActivator.java:90)
+
+!ENTRY com.nokia.carbide.cpp.project.core 1 0 2020-12-10 23:15:02.921
+!MESSAGE Created 'mmcdump' (13 resources, 1 mmp files) in 1.29 sec.
+
+!ENTRY org.eclipse.cdt.core 1 0 2020-12-10 23:15:04.943
+!MESSAGE Indexed 'mmcdump' (1 sources, 17 headers) in 1.83 sec: 10,226 declarations; 10,541 references; 0 unresolved inclusions; 2,546 syntax errors; 328 unresolved names (1.55%)
+!SESSION 2020-12-11 00:28:57.921 -----------------------------------------------
+eclipse.buildId=unknown
+java.version=1.6.0_18
+java.vendor=Sun Microsystems Inc.
+BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
+Command-line arguments: -os win32 -ws win32 -arch x86
+
+!ENTRY com.nokia.carbide.remoteconnections.discovery.pccs.pccsnative.PCCSConnection 4 0 2020-12-11 00:29:05.938
+!MESSAGE Carbide could not find a PC Suite installation. To install PC Suite, go to: https://tools.ext.nokia.com/PCsuite
+!STACK 1
+org.eclipse.core.runtime.CoreException: Carbide could not find a PC Suite installation. To install PC Suite, go to: https://tools.ext.nokia.com/PCsuite
+ at com.nokia.carbide.remoteconnections.discovery.pccs.pccsnative.PCCSConnection.open(PCCSConnection.java:143)
+ at com.nokia.carbide.remoteconnections.discovery.pccs.agent.PCCSDiscoveryAgent.start(PCCSDiscoveryAgent.java:186)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator$3.select(RemoteConnectionsActivator.java:276)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator.loadExtensions(RemoteConnectionsActivator.java:320)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator.loadAndStartDeviceDiscoveryAgents(RemoteConnectionsActivator.java:270)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator.access$3(RemoteConnectionsActivator.java:267)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator$1.run(RemoteConnectionsActivator.java:136)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator$WhenWorkbenchIsVisibleThread.run(RemoteConnectionsActivator.java:90)
+Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.nokia.carbide.remoteconnections.discovery.pccs.pccsnative.IConnAPILibrary
+ at com.nokia.carbide.remoteconnections.discovery.pccs.pccsnative.PCCSConnection.open(PCCSConnection.java:127)
+ ... 7 more
+!SUBENTRY 1 com.nokia.carbide.remoteConnections.discovery.pccs 4 1 2020-12-11 00:29:05.938
+!MESSAGE Carbide could not find a PC Suite installation. To install PC Suite, go to: https://tools.ext.nokia.com/PCsuite
+!STACK 0
+java.lang.NoClassDefFoundError: Could not initialize class com.nokia.carbide.remoteconnections.discovery.pccs.pccsnative.IConnAPILibrary
+ at com.nokia.carbide.remoteconnections.discovery.pccs.pccsnative.PCCSConnection.open(PCCSConnection.java:127)
+ at com.nokia.carbide.remoteconnections.discovery.pccs.agent.PCCSDiscoveryAgent.start(PCCSDiscoveryAgent.java:186)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator$3.select(RemoteConnectionsActivator.java:276)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator.loadExtensions(RemoteConnectionsActivator.java:320)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator.loadAndStartDeviceDiscoveryAgents(RemoteConnectionsActivator.java:270)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator.access$3(RemoteConnectionsActivator.java:267)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator$1.run(RemoteConnectionsActivator.java:136)
+ at com.nokia.carbide.remoteconnections.RemoteConnectionsActivator$WhenWorkbenchIsVisibleThread.run(RemoteConnectionsActivator.java:90)
+
+!ENTRY org.eclipse.equinox.p2.metadata.repository 4 1000 2020-12-11 00:29:09.849
+!MESSAGE No repository found at http://tools.ext.nokia.com/carbide/updates/3.0.
+
+!ENTRY com.nokia.carbide.cpp.project.core 1 0 2020-12-11 00:32:53.453
+!MESSAGE Created 'accuracy' (13 resources, 1 mmp files) in 0.42 sec.
+
+!ENTRY org.eclipse.cdt.core 1 0 2020-12-11 00:32:54.726
+!MESSAGE Indexed 'accuracy' (1 sources, 17 headers) in 1.23 sec: 10,226 declarations; 10,541 references; 0 unresolved inclusions; 2,546 syntax errors; 328 unresolved names (1.55%)
diff --git a/.metadata/.plugins/com.nokia.carbide.cpp.sdk.core/GCCE_UDEB_E__Dev_Symbian_8_0a_.dat b/.metadata/.plugins/com.nokia.carbide.cpp.sdk.core/GCCE_UDEB_E__Dev_Symbian_8_0a_.dat
new file mode 100644
index 0000000..cd7963f
Binary files /dev/null and b/.metadata/.plugins/com.nokia.carbide.cpp.sdk.core/GCCE_UDEB_E__Dev_Symbian_8_0a_.dat differ
diff --git a/.metadata/.plugins/com.nokia.carbide.cpp.sdk.core/GCCE_UREL_E__Dev_Symbian_8_0a_.dat b/.metadata/.plugins/com.nokia.carbide.cpp.sdk.core/GCCE_UREL_E__Dev_Symbian_8_0a_.dat
new file mode 100644
index 0000000..1e75e43
Binary files /dev/null and b/.metadata/.plugins/com.nokia.carbide.cpp.sdk.core/GCCE_UREL_E__Dev_Symbian_8_0a_.dat differ
diff --git a/.metadata/.plugins/com.nokia.carbide.remoteConnections/connectionData.xml b/.metadata/.plugins/com.nokia.carbide.remoteConnections/connectionData.xml
new file mode 100644
index 0000000..4971805
--- /dev/null
+++ b/.metadata/.plugins/com.nokia.carbide.remoteConnections/connectionData.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/.metadata/.plugins/com.nokia.carbide.templatewizard/dialog_settings.xml b/.metadata/.plugins/com.nokia.carbide.templatewizard/dialog_settings.xml
new file mode 100644
index 0000000..7ae1deb
--- /dev/null
+++ b/.metadata/.plugins/com.nokia.carbide.templatewizard/dialog_settings.xml
@@ -0,0 +1,11 @@
+
+
diff --git a/.metadata/.plugins/org.eclipse.cdt.core/.log b/.metadata/.plugins/org.eclipse.cdt.core/.log
new file mode 100644
index 0000000..4d236a7
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.cdt.core/.log
@@ -0,0 +1,2 @@
+*** SESSION Dec 10, 2020 23:11:51.89 -------------------------------------------
+*** SESSION Dec 11, 2020 00:29:03.42 -------------------------------------------
diff --git a/.metadata/.plugins/org.eclipse.cdt.core/accuracy.1607621573479.pdom b/.metadata/.plugins/org.eclipse.cdt.core/accuracy.1607621573479.pdom
new file mode 100644
index 0000000..d624ef5
Binary files /dev/null and b/.metadata/.plugins/org.eclipse.cdt.core/accuracy.1607621573479.pdom differ
diff --git a/.metadata/.plugins/org.eclipse.cdt.core/mmcdump.1607616903017.pdom b/.metadata/.plugins/org.eclipse.cdt.core/mmcdump.1607616903017.pdom
new file mode 100644
index 0000000..7ddac0d
Binary files /dev/null and b/.metadata/.plugins/org.eclipse.cdt.core/mmcdump.1607616903017.pdom differ
diff --git a/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c b/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c
@@ -0,0 +1 @@
+
diff --git a/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp b/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp
@@ -0,0 +1 @@
+
diff --git a/.metadata/.plugins/org.eclipse.cdt.ui/dialog_settings.xml b/.metadata/.plugins/org.eclipse.cdt.ui/dialog_settings.xml
new file mode 100644
index 0000000..8e47957
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.cdt.ui/dialog_settings.xml
@@ -0,0 +1,7 @@
+
+
diff --git a/.metadata/.plugins/org.eclipse.cdt.ui/mmcdump.build.log b/.metadata/.plugins/org.eclipse.cdt.ui/mmcdump.build.log
new file mode 100644
index 0000000..4d5e79b
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.cdt.ui/mmcdump.build.log
@@ -0,0 +1,39 @@
+
+***Building project "mmcdump" for configuration "Phone Debug (GCCE) [S60_2nd_FP2]"
+
+***Printing environment variables modified from default:
+PATH=E:\Dev\Symbian\8.0a\epoc32\tools;E:\Dev\Symbian\8.0a\epoc32\gcc\bin;E:/Dev/Symbian/Carbide/jre/bin/client;E:/Dev/Symbian/Carbide/jre/bin;E:/Dev/Symbian/Carbide/jre/lib/i386;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Perl\bin\;E:\Dev\Symbian\Common\Tools;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;C:\Program Files (x86)\CSL Arm Toolchain\bin;C:\Program Files\Graphviz 2.44.1\bin;E:\Dev\Python\Scripts\;E:\Dev\Python\;C:\Users\zhong\AppData\Local\Programs\Python\Launcher\;C:\Users\zhong\AppData\Local\Microsoft\WindowsApps;C:\Users\zhong\.dotnet\tools;E:\Dev\heroku\bin;C:\Users\zhong\AppData\Local\Programs\Microsoft VS Code\bin
+=::=::\
+EPOCROOT=\Dev\Symbian\8.0a\
+NO_DEPENDENCIES=-nd
+MAKE=make -j 4
+
+Working Directory: E:/Dev/projects/akudama/mmcdump/group
+
+
+***Invoking bldmake command
+perl.exe -S bldmake.pl bldfiles
+
+Total Time: 1 sec
+
+***Invoking abld command
+perl.exe -S ABLD.PL \Dev\projects\akudama\mmcdump\group\ export
+ make -r -f "\Dev\Symbian\8.0a\EPOC32\BUILD\Dev\projects\akudama\mmcdump\group\EXPORT.make" EXPORT VERBOSE=-s
+Nothing to do
+
+Total Time: 2 sec
+
+***Generating abld makefile.
+
+***Invoking abld command
+perl.exe -S ABLD.PL \Dev\projects\akudama\mmcdump\group\ makefile gcce mmcdump
+This project does not support platform or program "GCCE"
+
+Total Time: 2 sec
+
+***Abld returned with exit value = 255
+***Stopping.
+
+***Errors were detected in build. See the Problems or Console view for details.
+
+Total Time: 2 sec
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/12/30ecf8de063b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/12/30ecf8de063b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..c35e6e5
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/12/30ecf8de063b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,71 @@
+/*
+ ============================================================================
+ Name : mmcdump.cpp
+ Author :
+ Copyright : Your copyright notice
+ Description : Exe source file
+ ============================================================================
+ */
+
+// Include Files
+
+#include "mmcdump.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+enum TMmcMediaType {
+ EMmcROM,
+ EMmcFlash,
+ EMmcIO,
+ EMmcOther,
+ EMmcNotSupported
+};
+
+struct TMmcIfInfo {
+ TUint32 iMmcID[4];
+ TUint32 iMmcType;
+};
+
+class CMmcBusChannel: public RBusLogicalChannel {
+
+};
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/14/702f2eea063b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/14/702f2eea063b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..404fb56
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/14/702f2eea063b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,76 @@
+/*
+ ============================================================================
+ Name : mmcdump.cpp
+ Author :
+ Copyright : Your copyright notice
+ Description : Exe source file
+ ============================================================================
+ */
+
+// Include Files
+
+#include "mmcdump.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+enum TMmcMediaType {
+ EMmcROM,
+ EMmcFlash,
+ EMmcIO,
+ EMmcOther,
+ EMmcNotSupported
+};
+
+struct TMmcIfInfo {
+ TUint32 iMmcID[4];
+ TUint32 iMmcType;
+};
+
+enum TMmcControlOp {
+ EMmcControlOpSelectCard = 4,
+ EMmcControlOpCardInfo = 6
+};
+
+class CMmcBusChannel: public RBusLogicalChannel {
+ CMmcBusChannel();
+};
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/15/6035e9c2093b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/15/6035e9c2093b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..829cd29
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/15/6035e9c2093b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+_LIT(KMmcMediaTypeROMStr, "ROM");
+_LIT(KMmcMediaTypeFlashStr, "Flash");
+_LIT(KMmcMediaTypeIOStr, "IO");
+_LIT(KMmcMediaTypeOtherStr, "Other");
+_LIT(KMmcMediaTypeNotSupportedStr, "Not supported");
+
+TDesC16 *GetMmcMediaTypeStr(const TInt aType) {
+ switch (aType) {
+ case EMmcROM:
+ return &KMmcMediaTypeROMStr;
+
+ case EMmcFlash:
+ return &KMmcMediaTypeFlashStr;
+
+ case EMmcIO:
+ return &KMmcMediaTypeIOStr;
+
+ case EMmcOther:
+ return &KMmcMediaTypeOther;
+ }
+}
+
+TInt DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+
+ // Get card info
+ TMmcIfInfo mmcInfo;
+ User::LeaveIfError(mmcDev.GetCardInfo(&mmcInfo));
+
+ TBuf<256> lineToWrite;
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/17/d056e6e4083b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/17/d056e6e4083b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..f91fcd2
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/17/d056e6e4083b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcbus.h"
+
+_LIT(KMmcIfDvcName, "MmcIf");
+
+CMmcBusChannel::CMmcBusChannel()
+ : RBusLogicalChannel() {
+}
+
+TVersion CMmcBusChannel::GetVersion() {
+ TVersion dver;
+ dver.iMajor = 1;
+ dver.iMinor = 0;
+ dver.iBuild = 1;
+
+ return dver;
+}
+
+void CMmcBusChannel::ConstructL() {
+ User::LeaveIfError(DoCreate(KMmcIfDvcName, GetVersion(), NULL, 0, NULL, NULL, EOwnerProcess));
+}
+
+TInt CMmcBusChannel::SelectCard(TInt aIndex) {
+ return DoControl(EMmcControlOpSelectCard, (TAny*)aIndex);
+}
+
+TInt CMmcBusChannel::GetCardInfo(TMmcIfInfo *aInfo) {
+ return DoControl(EMmcControlOpCardInfo, aInfo);
+}
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1b/f0c98604103b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/1b/f0c98604103b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..a37b497
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/1b/f0c98604103b001b1ea0d1ee13b4299c
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\AccuracyCheck.txt");
+
+typedef void (*TestFuncType)(RFile &);
+
+void DoLocalCodeCheckL(RFile &aFile) {
+ const TUint32 KTestCodeChunkSize = 0x1000;
+
+ RChunk testChunk;
+ User::LeaveIfError(testChunk.CreateLocalCode(KTestCodeChunkSize, KTestCodeChunkSize, EOwnerProcess));
+
+ _LIT8(KLocalCodeChunkOutLineStr, "Base address of local code chunk is 0x%08x");
+
+ TBuf8<128> outLine;
+ outLine.Format(KLocalCodeChunkOutLineStr, (TUint32)testChunk.Base());
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ TInt err = KErrNone;
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KAccuracyOutputPath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ } else {
+ TRAP(err, DumpCardInfoL(infoFile));
+
+ if (err != KErrNone) {
+ notifier.InfoPrint(KMmcFailDumpInfoFileStr);
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1d/5000aed00d3b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/1d/5000aed00d3b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..00eb1df
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/1d/5000aed00d3b001b1ea0d1ee13b4299c
@@ -0,0 +1,20 @@
+/*
+============================================================================
+ Name : accuracy.mmp
+ Author :
+ Copyright : Your copyright notice
+ Description : This is the project specification file for accuracy.
+============================================================================
+*/
+
+TARGET accuracy.exe
+TARGETTYPE exe
+UID 0 0xe2405073
+
+USERINCLUDE ..\inc
+SYSTEMINCLUDE \epoc32\include
+
+SOURCEPATH ..\src
+SOURCE accuracy.cpp
+
+LIBRARY euser.lib
\ No newline at end of file
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1d/50ad8a99103b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/1d/50ad8a99103b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..984930e
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/1d/50ad8a99103b001b1ea0d1ee13b4299c
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\AccuracyCheck.txt");
+_LIT(KMmcFailOpenAccuracyFileStr, "Fail opening file to write tests!");
+
+_LIT8(KTestFailFmtStr, "Test %d failed with code %d");
+
+typedef void (*TestFuncType)(RFile &);
+
+void DoLocalCodeCheckL(RFile &aFile) {
+ const TUint32 KTestCodeChunkSize = 0x1000;
+
+ RChunk testChunk;
+ User::LeaveIfError(testChunk.CreateLocalCode(KTestCodeChunkSize, KTestCodeChunkSize, EOwnerProcess));
+
+ _LIT8(KLocalCodeChunkOutLineStr, "Base address of local code chunk is 0x%08x\n");
+
+ TBuf8<128> outLine;
+ outLine.Format(KLocalCodeChunkOutLineStr, (TUint32)testChunk.Base());
+
+ aFile.Write(outLine);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KAccuracyOutputPath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenAccuracyFileStr);
+ } else {
+ TestFuncType listTests[] = { DoLocalCodeCheckL };
+
+ for (int i = 0; i < sizeof(listTests) / sizeof(TestFuncType); i++) {
+ TRAPD(nerr, listTests[i]());
+
+ if (nerr != KErrNone) {
+ TBuf8<128> errLine;
+ errLine.Format(KTestFailFmtStr, i, nerr);
+
+ infoFile.Write(errLine);
+ }
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1e/10f47d81063b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/1e/10f47d81063b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..50152a1
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/1e/10f47d81063b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,68 @@
+/*
+ ============================================================================
+ Name : mmcdump.cpp
+ Author :
+ Copyright : Your copyright notice
+ Description : Exe source file
+ ============================================================================
+ */
+
+// Include Files
+
+#include "mmcdump.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+enum TMmcMediaType {
+ EMmcROM,
+ EMmcFlash,
+ EMmcIO,
+ EMmcOther,
+ EMmcNotSupported
+};
+
+struct TMmcIfInfo {
+ TUint32 iMmcID[4];
+ TUint32 iMmcType;
+};
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+ RLogicalBusChannel mmcdev;
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/1e/704ca75e103b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/1e/704ca75e103b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..bd61ffb
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/1e/704ca75e103b001b1ea0d1ee13b4299c
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\AccuracyCheck.txt");
+_LIT(KMmcFailOpenAccuracyFileStr, "Fail opening file to write tests!");
+
+_LIT8(KTestFailFmtStr, "Test %d failed with code %d");
+
+typedef void (*TestFuncType)(RFile &);
+
+void DoLocalCodeCheckL(RFile &aFile) {
+ const TUint32 KTestCodeChunkSize = 0x1000;
+
+ RChunk testChunk;
+ User::LeaveIfError(testChunk.CreateLocalCode(KTestCodeChunkSize, KTestCodeChunkSize, EOwnerProcess));
+
+ _LIT8(KLocalCodeChunkOutLineStr, "Base address of local code chunk is 0x%08x");
+
+ TBuf8<128> outLine;
+ outLine.Format(KLocalCodeChunkOutLineStr, (TUint32)testChunk.Base());
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ TInt err = KErrNone;
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KAccuracyOutputPath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenAccuracyFileStr);
+ } else {
+ TestFuncType listTests[] = { DoLocalCodeCheckL };
+
+ for (int i = 0; i < sizeof(listTests) / sizeof(TestFuncType); i++) {
+ TRAPD(nerr, listTests[i]());
+
+ if (nerr != KErrNone) {
+ TBuf
+ }
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/20/707b8ae80f3b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/20/707b8ae80f3b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..39e0978
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/20/707b8ae80f3b001b1ea0d1ee13b4299c
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\AccuracyCheck.txt");
+
+void DoLocalCodeCheck(RFile &aFile) {
+ const TUint32 KTestCodeChunkSize = 0x1000;
+
+ RChunk testChunk;
+ User::LeaveIfError(testChunk.CreateLocalCode(KTestCodeChunkSize, KTestCodeChunkSize, EOwnerProcess));
+
+ _LIT8(KLocalCodeChunkOutLineStr, "Base address of local code chunk is 0x%08x");
+
+ TBuf8<128> outLine;
+ outLine.Format(_L8())
+ testChunk.Base();
+
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ TInt err = KErrNone;
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KAccuracyOutputPath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ } else {
+ TRAP(err, DumpCardInfoL(infoFile));
+
+ if (err != KErrNone) {
+ notifier.InfoPrint(KMmcFailDumpInfoFileStr);
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/24/2057704c083b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/24/2057704c083b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..9e8189d
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/24/2057704c083b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,23 @@
+#include "mmcbus.h"
+
+_LIT(KMmcIfDvcName, "MmcIf");
+
+CMmcBusChannel::CMmcBusChannel()
+ : RBusLogicalChannel() {
+}
+
+TVersion CMmcBusChannel::GetVersion() {
+ TVersion dver;
+ dver.iMajor = 1;
+ dver.iMinor = 0;
+ dver.iBuild = 1;
+
+ return dver;
+}
+
+void CMmcBusChannel::ConstructL() {
+ User::LeaveIfError(DoCreate(KMmcIfDvcName, GetVersion(), 0, 0, 0, 0, EFalse));
+}
+
+ TInt SelectCard(TInt aIndex);
+ TInt GetCardInfo(TMmcIfInfo *aInfo);
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/24/a08bfe04083b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/24/a08bfe04083b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..00a544e
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/24/a08bfe04083b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,11 @@
+#include "mmcbus.h"
+
+CMmcBusChannel::CMmcBusChannel()
+ : RBusLogicalChannel() {
+}
+
+ void ConstructL();
+
+ TInt SelectCard(TInt aIndex);
+ TInt GetCardInfo(TMmcIfInfo *aInfo);
+};
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/28/a0af11f2063b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/28/a0af11f2063b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..7faab88
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/28/a0af11f2063b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,78 @@
+/*
+ ============================================================================
+ Name : mmcdump.cpp
+ Author :
+ Copyright : Your copyright notice
+ Description : Exe source file
+ ============================================================================
+ */
+
+// Include Files
+
+#include "mmcdump.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+enum TMmcMediaType {
+ EMmcROM,
+ EMmcFlash,
+ EMmcIO,
+ EMmcOther,
+ EMmcNotSupported
+};
+
+struct TMmcIfInfo {
+ TUint32 iMmcID[4];
+ TUint32 iMmcType;
+};
+
+enum TMmcControlOp {
+ EMmcControlOpSelectCard = 4,
+ EMmcControlOpCardInfo = 6
+};
+
+class CMmcBusChannel: public RBusLogicalChannel {
+ CMmcBusChannel();
+
+ void ConstructL();
+};
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/29/e0d992aa083b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/29/e0d992aa083b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..8b9c563
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/29/e0d992aa083b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,22 @@
+/*
+ ============================================================================
+ Name : mmcdump.h
+ Author :
+ Copyright : Your copyright notice
+ Description : Exe header file
+ ============================================================================
+ */
+
+#ifndef __MMCDUMP_H__
+#define __MMCDUMP_H__
+
+// Include Files
+
+#include
+
+// Function Prototypes
+
+GLDEF_C TInt E32Main();
+
+#endif // __MMCDUMP_H__
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2a/005d8a7b063b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/2a/005d8a7b063b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..a537c03
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/2a/005d8a7b063b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,68 @@
+/*
+ ============================================================================
+ Name : mmcdump.cpp
+ Author :
+ Copyright : Your copyright notice
+ Description : Exe source file
+ ============================================================================
+ */
+
+// Include Files
+
+#include "mmcdump.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+enum TMmcMediaType {
+ EMmcROM,
+ EMmcFlash,
+ EMmcIO,
+ EMmcOther,
+ EMmcNotSupported
+};
+
+struct TMmcIfInfo {
+ TUint32 iMmcID[4];
+ TUint32 iMmcType;
+};
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+ RBusLogicalDevice mmcdev;
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2f/d0e39bc7103b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/2f/d0e39bc7103b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..eea14ff
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/2f/d0e39bc7103b001b1ea0d1ee13b4299c
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\AccuracyCheck.txt");
+_LIT(KMmcFailOpenAccuracyFileStr, "Fail opening file to write tests!");
+
+_LIT8(KTestFailFmtStr, "Test %d failed with code %d");
+
+typedef void (*TestFuncType)(RFile &);
+
+void DoLocalCodeCheckL(RFile &aFile) {
+ const TUint32 KTestCodeChunkSize = 0x1000;
+
+ RChunk testChunk;
+ User::LeaveIfError(testChunk.CreateLocalCode(KTestCodeChunkSize, KTestCodeChunkSize, EOwnerProcess));
+
+ _LIT8(KLocalCodeChunkOutLineStr, "Base address of local code chunk is 0x%08x\n");
+
+ TBuf8<128> outLine;
+ outLine.Format(KLocalCodeChunkOutLineStr, (TUint32)testChunk.Base());
+
+ aFile.Write(outLine);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KAccuracyOutputPath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenAccuracyFileStr);
+ } else {
+ TestFuncType listTests[] = { DoLocalCodeCheckL };
+
+ for (TUint32 i = 0; i < sizeof(listTests) / sizeof(TestFuncType); i++) {
+ TRAPD(nerr, listTests[i](infoFile));
+
+ if (nerr != KErrNone) {
+ TBuf8<128> errLine;
+ errLine.Format(KTestFailFmtStr, i, nerr);
+
+ infoFile.Write(errLine);
+ }
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/30/001f7e440a3b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/30/001f7e440a3b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..d7603cf
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/30/001f7e440a3b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT8(KMmcTypeFormatStr, "MMC type: %S (%d)");
+_LIT8(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+_LIT(KMmcFailDumpInfoFileStr, "Fail dumping MMC info!");
+
+_LIT8(KMmcMediaTypeROMStr, "ROM");
+_LIT8(KMmcMediaTypeFlashStr, "Flash");
+_LIT8(KMmcMediaTypeIOStr, "IO");
+_LIT8(KMmcMediaTypeOtherStr, "Other");
+_LIT8(KMmcMediaTypeNotSupportedStr, "Not supported");
+
+TDesC8 *GetMmcMediaTypeStr(const TInt aType) {
+ switch (aType) {
+ case EMmcROM:
+ return &KMmcMediaTypeROMStr;
+
+ case EMmcFlash:
+ return &KMmcMediaTypeFlashStr;
+
+ case EMmcIO:
+ return &KMmcMediaTypeIOStr;
+
+ case EMmcOther:
+ return &KMmcMediaTypeOtherStr;
+
+ case EMmcNotSupported:
+ return &KMmcMediaTypeNotSupportedStr;
+
+ default:
+ break;
+ }
+
+ return &KMmcMediaTypeNotSupportedStr;
+}
+
+void DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+
+ // Get card info
+ TMmcIfInfo mmcInfo;
+ User::LeaveIfError(mmcDev.GetCardInfo(&mmcInfo));
+
+ TBuf8<256> lineToWrite;
+ lineToWrite.Format(KMmcTypeFormatStr, GetMmcMediaTypeStr(mmcInfo.iMmcType), mmcInfo.iMmcType);
+
+ aOutputFile.Write(lineToWrite);
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+
+ aOutputFile.Flush();
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ TRAPD(err, DumpCardInfoL(infoFile));
+
+ if (err != KErrNone) {
+ notifier.InfoPrint()
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/30/600ebae10e3b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/30/600ebae10e3b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..c944a06
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/30/600ebae10e3b001b1ea0d1ee13b4299c
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\MmcInfo.txt");
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ TInt err = KErrNone;
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ } else {
+ TRAP(err, DumpCardInfoL(infoFile));
+
+ if (err != KErrNone) {
+ notifier.InfoPrint(KMmcFailDumpInfoFileStr);
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/30/80c5ec1f083b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/30/80c5ec1f083b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..9f0b97c
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/30/80c5ec1f083b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,22 @@
+#include "mmcbus.h"
+
+_LIT(KMmcIfDvcName, "MmcIf");
+
+CMmcBusChannel::CMmcBusChannel()
+ : RBusLogicalChannel() {
+}
+
+TVersion CMmcBusChannel::GetVersion() {
+ return TVersion(1, 0, 1);
+}
+
+void CMmcBusChannel::ConstructL() {
+ TVersion dver;
+ dver.iMajor = 1;
+ dver.iMinor = 0;
+ dver.iBuild = 1;
+ User::LeaveIfError(this->DoCreate(KMmcIfDvcName, ))
+}
+
+ TInt SelectCard(TInt aIndex);
+ TInt GetCardInfo(TMmcIfInfo *aInfo);
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/30/9091abeb0f3b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/30/9091abeb0f3b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..b29ba4e
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/30/9091abeb0f3b001b1ea0d1ee13b4299c
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\AccuracyCheck.txt");
+
+void DoLocalCodeCheck(RFile &aFile) {
+ const TUint32 KTestCodeChunkSize = 0x1000;
+
+ RChunk testChunk;
+ User::LeaveIfError(testChunk.CreateLocalCode(KTestCodeChunkSize, KTestCodeChunkSize, EOwnerProcess));
+
+ _LIT8(KLocalCodeChunkOutLineStr, "Base address of local code chunk is 0x%08x");
+
+ TBuf8<128> outLine;
+ outLine.Format(KLocalCodeChunkOutLineStr, (TUint32)testChunk.Base());
+
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ TInt err = KErrNone;
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KAccuracyOutputPath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ } else {
+ TRAP(err, DumpCardInfoL(infoFile));
+
+ if (err != KErrNone) {
+ notifier.InfoPrint(KMmcFailDumpInfoFileStr);
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/33/601634230a3b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/33/601634230a3b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..736fe3c
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/33/601634230a3b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT8(KMmcTypeFormatStr, "MMC type: %S (%d)");
+_LIT8(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+_LIT8(KMmcMediaTypeROMStr, "ROM");
+_LIT8(KMmcMediaTypeFlashStr, "Flash");
+_LIT8(KMmcMediaTypeIOStr, "IO");
+_LIT8(KMmcMediaTypeOtherStr, "Other");
+_LIT8(KMmcMediaTypeNotSupportedStr, "Not supported");
+
+TDesC8 *GetMmcMediaTypeStr(const TInt aType) {
+ switch (aType) {
+ case EMmcROM:
+ return &KMmcMediaTypeROMStr;
+
+ case EMmcFlash:
+ return &KMmcMediaTypeFlashStr;
+
+ case EMmcIO:
+ return &KMmcMediaTypeIOStr;
+
+ case EMmcOther:
+ return &KMmcMediaTypeOtherStr;
+
+ case EMmcNotSupported:
+ return &KMmcMediaTypeNotSupportedStr;
+
+ default:
+ break;
+ }
+
+ return &KMmcMediaTypeNotSupportedStr;
+}
+
+TInt DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+
+ // Get card info
+ TMmcIfInfo mmcInfo;
+ User::LeaveIfError(mmcDev.GetCardInfo(&mmcInfo));
+
+ TBuf8<256> lineToWrite;
+ lineToWrite.Format(KMmcTypeFormatStr, GetMmcMediaTypeStr(mmcInfo.iMmcType), mmcInfo.iMmcType);
+
+ aOutputFile.Write(lineToWrite);
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+
+ aOutputFile.Flush();
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/34/b0961a0f083b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/34/b0961a0f083b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..2060ef3
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/34/b0961a0f083b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#ifndef __MMCBUS_H__
+#define __MMCBUS_H__
+
+#include
+
+enum TMmcMediaType {
+ EMmcROM,
+ EMmcFlash,
+ EMmcIO,
+ EMmcOther,
+ EMmcNotSupported
+};
+
+struct TMmcIfInfo {
+ TUint32 iMmcID[4];
+ TUint32 iMmcType;
+};
+
+enum TMmcControlOp {
+ EMmcControlOpSelectCard = 4,
+ EMmcControlOpCardInfo = 6
+};
+
+class CMmcBusChannel: public RBusLogicalChannel {
+ CMmcBusChannel();
+
+ void ConstructL();
+
+ TInt SelectCard(TInt aIndex);
+ TInt GetCardInfo(TMmcIfInfo *aInfo);
+};
+
+#endif // __MMCBUS_H__
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/35/a0556434083b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/35/a0556434083b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..5dc0910
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/35/a0556434083b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,23 @@
+#include "mmcbus.h"
+
+_LIT(KMmcIfDvcName, "MmcIf");
+
+CMmcBusChannel::CMmcBusChannel()
+ : RBusLogicalChannel() {
+}
+
+TVersion CMmcBusChannel::GetVersion() {
+ TVersion dver;
+ dver.iMajor = 1;
+ dver.iMinor = 0;
+ dver.iBuild = 1;
+
+ return dver;
+}
+
+void CMmcBusChannel::ConstructL() {
+ User::LeaveIfError(DoCreate(KMmcIfDvcName, GetVersion(), 0, 0, 0));
+}
+
+ TInt SelectCard(TInt aIndex);
+ TInt GetCardInfo(TMmcIfInfo *aInfo);
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/36/e0a736f70d3b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/36/e0a736f70d3b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..2344c05
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/36/e0a736f70d3b001b1ea0d1ee13b4299c
@@ -0,0 +1,82 @@
+/*
+ ============================================================================
+ Name : accuracy.cpp
+ Author :
+ Copyright : Your copyright notice
+ Description : Exe source file
+ ============================================================================
+ */
+
+// Include Files
+
+#include "accuracy.h"
+#include
+#include
+#include // Console
+
+// Constants
+
+_LIT(KTextConsoleTitle, "Console");
+_LIT(KTextFailed, " failed, leave code = %d");
+_LIT(KTextPressAnyKey, " [press any key]\n");
+
+// Global Variables
+
+LOCAL_D CConsoleBase* console; // write all messages to this
+
+
+// Local Functions
+
+LOCAL_C void MainL()
+ {
+ //
+ // add your program code here, example code below
+ //
+ console->Write(_L("Hello, world!\n"));
+ }
+
+LOCAL_C void DoStartL()
+ {
+ // Create active scheduler (to run active objects)
+ CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+ CleanupStack::PushL(scheduler);
+ CActiveScheduler::Install(scheduler);
+
+ MainL();
+
+ // Delete active scheduler
+ CleanupStack::PopAndDestroy(scheduler);
+ }
+
+// Global Functions
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Create output console
+ TRAPD(
+ createError,
+ console = Console::NewL(KTextConsoleTitle,
+ TSize(KConsFullScreen, KConsFullScreen)));
+ if (createError)
+ {
+ delete cleanup;
+ return createError;
+ }
+
+ // Run application code inside TRAP harness, wait keypress when terminated
+ TRAPD(mainError, DoStartL());
+ if (mainError)
+ console->Printf(KTextFailed, mainError);
+ console->Printf(KTextPressAnyKey);
+ console->Getch();
+
+ delete console;
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3c/f042d01b093b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/3c/f042d01b093b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..368ce8d
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/3c/f042d01b093b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+TInt DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+ TMmcIfInfo info;
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3d/105bb883033b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/3d/105bb883033b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..36dc8a2
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/3d/105bb883033b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,28 @@
+/*
+ ============================================================================
+ Name : mmcdump.cpp
+ Author :
+ Copyright : Your copyright notice
+ Description : Exe source file
+ ============================================================================
+ */
+
+// Include Files
+
+#include "mmcdump.h"
+
+#include
+#include
+#include
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4/0053ce330f3b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/4/0053ce330f3b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..87a0b41
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/4/0053ce330f3b001b1ea0d1ee13b4299c
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\MmcInfo.txt");
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ TInt err = KErrNone;
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KAccuracyOutputPath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ } else {
+ TRAP(err, DumpCardInfoL(infoFile));
+
+ if (err != KErrNone) {
+ notifier.InfoPrint(KMmcFailDumpInfoFileStr);
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/41/507fdbb9043b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/41/507fdbb9043b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..3a4c1c1
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/41/507fdbb9043b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,43 @@
+/*
+ ============================================================================
+ Name : mmcdump.cpp
+ Author :
+ Copyright : Your copyright notice
+ Description : Exe source file
+ ============================================================================
+ */
+
+// Include Files
+
+#include "mmcdump.h"
+
+#include
+#include
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RFile infoFile;
+
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/44/b063c097073b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/44/b063c097073b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..6a7b765
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/44/b063c097073b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,11 @@
+TARGET mmcdump.exe
+TARGETTYPE exe
+UID 0 0xe96fe421
+
+USERINCLUDE ..\inc
+SYSTEMINCLUDE \epoc32\include
+
+SOURCEPATH ..\src
+SOURCE mmcdump.cpp
+
+LIBRARY euser.lib
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/49/5008733e0a3b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/49/5008733e0a3b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..c389140
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/49/5008733e0a3b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT8(KMmcTypeFormatStr, "MMC type: %S (%d)");
+_LIT8(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+_LIT8(KMmcMediaTypeROMStr, "ROM");
+_LIT8(KMmcMediaTypeFlashStr, "Flash");
+_LIT8(KMmcMediaTypeIOStr, "IO");
+_LIT8(KMmcMediaTypeOtherStr, "Other");
+_LIT8(KMmcMediaTypeNotSupportedStr, "Not supported");
+
+TDesC8 *GetMmcMediaTypeStr(const TInt aType) {
+ switch (aType) {
+ case EMmcROM:
+ return &KMmcMediaTypeROMStr;
+
+ case EMmcFlash:
+ return &KMmcMediaTypeFlashStr;
+
+ case EMmcIO:
+ return &KMmcMediaTypeIOStr;
+
+ case EMmcOther:
+ return &KMmcMediaTypeOtherStr;
+
+ case EMmcNotSupported:
+ return &KMmcMediaTypeNotSupportedStr;
+
+ default:
+ break;
+ }
+
+ return &KMmcMediaTypeNotSupportedStr;
+}
+
+void DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+
+ // Get card info
+ TMmcIfInfo mmcInfo;
+ User::LeaveIfError(mmcDev.GetCardInfo(&mmcInfo));
+
+ TBuf8<256> lineToWrite;
+ lineToWrite.Format(KMmcTypeFormatStr, GetMmcMediaTypeStr(mmcInfo.iMmcType), mmcInfo.iMmcType);
+
+ aOutputFile.Write(lineToWrite);
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+
+ aOutputFile.Flush();
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ TRAPD(err, DumpCardInfoL(infoFile));
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4a/70239b70063b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/4a/70239b70063b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..12e5dd2
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/4a/70239b70063b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,54 @@
+/*
+ ============================================================================
+ Name : mmcdump.cpp
+ Author :
+ Copyright : Your copyright notice
+ Description : Exe source file
+ ============================================================================
+ */
+
+// Include Files
+
+#include "mmcdump.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4a/b02e7903093b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/4a/b02e7903093b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..0a13315
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/4a/b02e7903093b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#ifndef __MMCBUS_H__
+#define __MMCBUS_H__
+
+#include
+
+_LIT(KMmcIfDvcName, "MmcIf");
+
+enum TMmcMediaType {
+ EMmcROM,
+ EMmcFlash,
+ EMmcIO,
+ EMmcOther,
+ EMmcNotSupported
+};
+
+struct TMmcIfInfo {
+ TUint32 iMmcID[4];
+ TUint32 iMmcType;
+};
+
+enum TMmcControlOp {
+ EMmcControlOpSelectCard = 4,
+ EMmcControlOpCardInfo = 6
+};
+
+class CMmcBusChannel: public RBusLogicalChannel {
+ CMmcBusChannel();
+
+ void ConstructL();
+
+ TInt SelectCard(TInt aIndex);
+ TInt GetCardInfo(TMmcIfInfo *aInfo);
+
+ TVersion GetVersion();
+};
+
+#endif // __MMCBUS_H__
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/51/10f8d3820f3b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/51/10f8d3820f3b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..d118486
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/51/10f8d3820f3b001b1ea0d1ee13b4299c
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\AccuracyCheck.txt");
+
+void DoLocalCodeCheck(RFile &aFile) {
+ const TUint32 KTestCodeChunkSize = 0x1000;
+
+ RChunk testChunk;
+ testChunk.CreateLocalCode(KTestCodeChunkSize, KTestCodeChunkSize, EOwnerProcess);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ TInt err = KErrNone;
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KAccuracyOutputPath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ } else {
+ TRAP(err, DumpCardInfoL(infoFile));
+
+ if (err != KErrNone) {
+ notifier.InfoPrint(KMmcFailDumpInfoFileStr);
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/51/b09b5033083b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/51/b09b5033083b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..7a6e81b
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/51/b09b5033083b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,23 @@
+#include "mmcbus.h"
+
+_LIT(KMmcIfDvcName, "MmcIf");
+
+CMmcBusChannel::CMmcBusChannel()
+ : RBusLogicalChannel() {
+}
+
+TVersion CMmcBusChannel::GetVersion() {
+ TVersion dver;
+ dver.iMajor = 1;
+ dver.iMinor = 0;
+ dver.iBuild = 1;
+
+ return dver;
+}
+
+void CMmcBusChannel::ConstructL() {
+ User::LeaveIfError(this->DoCreate(KMmcIfDvcName, ))
+}
+
+ TInt SelectCard(TInt aIndex);
+ TInt GetCardInfo(TMmcIfInfo *aInfo);
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/54/806833b3083b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/54/806833b3083b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..913ba4a
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/54/806833b3083b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,28 @@
+#include "mmcbus.h"
+
+_LIT(KMmcIfDvcName, "MmcIf");
+
+CMmcBusChannel::CMmcBusChannel()
+ : RBusLogicalChannel() {
+}
+
+TVersion CMmcBusChannel::GetVersion() {
+ TVersion dver;
+ dver.iMajor = 1;
+ dver.iMinor = 0;
+ dver.iBuild = 1;
+
+ return dver;
+}
+
+void CMmcBusChannel::ConstructL() {
+ User::LeaveIfError(DoCreate(KMmcIfDvcName, GetVersion(), NULL, 0, NULL, NULL, EOwnerProcess));
+}
+
+TInt CMmcBusChannel::SelectCard(TInt aIndex) {
+ return DoControl(EMmcControlOpSelectCard, (TAny*)aIndex);
+}
+
+TInt CMmcBusChannel::GetCardInfo(TMmcIfInfo *aInfo) {
+ return DoControl(EMmcControlOpCardInfo, aInfo);
+}
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/56/d0487cdf0d3b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/56/d0487cdf0d3b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..69aac6c
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/56/d0487cdf0d3b001b1ea0d1ee13b4299c
@@ -0,0 +1,11 @@
+TARGET accuracy.exe
+TARGETTYPE exe
+UID 0 0xe2405073
+
+USERINCLUDE ..\inc
+SYSTEMINCLUDE \epoc32\include
+
+SOURCEPATH ..\src
+SOURCE accuracy.cpp
+
+LIBRARY euser.lib
\ No newline at end of file
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/58/5023073c083b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/58/5023073c083b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..188d44a
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/58/5023073c083b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,23 @@
+#include "mmcbus.h"
+
+_LIT(KMmcIfDvcName, "MmcIf");
+
+CMmcBusChannel::CMmcBusChannel()
+ : RBusLogicalChannel() {
+}
+
+TVersion CMmcBusChannel::GetVersion() {
+ TVersion dver;
+ dver.iMajor = 1;
+ dver.iMinor = 0;
+ dver.iBuild = 1;
+
+ return dver;
+}
+
+void CMmcBusChannel::ConstructL() {
+ User::LeaveIfError(DoCreate(KMmcIfDvcName, GetVersion(), 0, 0, 0, 0));
+}
+
+ TInt SelectCard(TInt aIndex);
+ TInt GetCardInfo(TMmcIfInfo *aInfo);
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/59/10cd46540a3b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/59/10cd46540a3b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..a022d76
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/59/10cd46540a3b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT8(KMmcTypeFormatStr, "MMC type: %S (%d)");
+_LIT8(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+_LIT(KMmcFailDumpInfoFileStr, "Fail dumping MMC info!");
+
+_LIT8(KMmcMediaTypeROMStr, "ROM");
+_LIT8(KMmcMediaTypeFlashStr, "Flash");
+_LIT8(KMmcMediaTypeIOStr, "IO");
+_LIT8(KMmcMediaTypeOtherStr, "Other");
+_LIT8(KMmcMediaTypeNotSupportedStr, "Not supported");
+
+TDesC8 *GetMmcMediaTypeStr(const TInt aType) {
+ switch (aType) {
+ case EMmcROM:
+ return &KMmcMediaTypeROMStr;
+
+ case EMmcFlash:
+ return &KMmcMediaTypeFlashStr;
+
+ case EMmcIO:
+ return &KMmcMediaTypeIOStr;
+
+ case EMmcOther:
+ return &KMmcMediaTypeOtherStr;
+
+ case EMmcNotSupported:
+ return &KMmcMediaTypeNotSupportedStr;
+
+ default:
+ break;
+ }
+
+ return &KMmcMediaTypeNotSupportedStr;
+}
+
+void DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+
+ // Get card info
+ TMmcIfInfo mmcInfo;
+ User::LeaveIfError(mmcDev.GetCardInfo(&mmcInfo));
+
+ TBuf8<256> lineToWrite;
+ lineToWrite.Format(KMmcTypeFormatStr, GetMmcMediaTypeStr(mmcInfo.iMmcType), mmcInfo.iMmcType);
+
+ aOutputFile.Write(lineToWrite);
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+
+ aOutputFile.Flush();
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ TRAPD(err, DumpCardInfoL(infoFile));
+
+ if (err != KErrNone) {
+ notifier.InfoPrint(KMmcFailDumpInfoFileStr);
+ return KErrNone;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/59/600eedb8093b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/59/600eedb8093b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..1ff0c89
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/59/600eedb8093b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+_LIT(KMmcMediaTypeROMStr, "ROM");
+_LIT(KMmcMediaTypeFlashStr, "Flash");
+_LIT(KMmcMediaTypeIOStr, "IO");
+_LIT(KMmcMediaTypeOtherStr, "Other");
+_LIT(KMmcMediaTypeNotSupportedStr, "Not supported");
+
+TDesC16 *GetMmcMediaTypeStr(const TInt aType) {
+ switch (aType) {
+ case EMmcROM:
+ return &KMmcMediaTypeROMStr;
+
+ case EMmcFlash:
+ return &KMmcMediaTypeFlashStr;
+
+ case EMmcIO:
+ }
+}
+
+TInt DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+
+ // Get card info
+ TMmcIfInfo mmcInfo;
+ User::LeaveIfError(mmcDev.GetCardInfo(&mmcInfo));
+
+ TBuf<256> lineToWrite;
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5b/b0f20fae083b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/5b/b0f20fae083b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..3f61c53
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/5b/b0f20fae083b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#ifndef __MMCDUMP_H__
+#define __MMCDUMP_H__
+
+// Include Files
+
+#include
+
+// Function Prototypes
+
+GLDEF_C TInt E32Main();
+
+#endif // __MMCDUMP_H__
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5c/10db0a2d0a3b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/5c/10db0a2d0a3b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..0796b35
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/5c/10db0a2d0a3b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT8(KMmcTypeFormatStr, "MMC type: %S (%d)");
+_LIT8(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+_LIT8(KMmcMediaTypeROMStr, "ROM");
+_LIT8(KMmcMediaTypeFlashStr, "Flash");
+_LIT8(KMmcMediaTypeIOStr, "IO");
+_LIT8(KMmcMediaTypeOtherStr, "Other");
+_LIT8(KMmcMediaTypeNotSupportedStr, "Not supported");
+
+TDesC8 *GetMmcMediaTypeStr(const TInt aType) {
+ switch (aType) {
+ case EMmcROM:
+ return &KMmcMediaTypeROMStr;
+
+ case EMmcFlash:
+ return &KMmcMediaTypeFlashStr;
+
+ case EMmcIO:
+ return &KMmcMediaTypeIOStr;
+
+ case EMmcOther:
+ return &KMmcMediaTypeOtherStr;
+
+ case EMmcNotSupported:
+ return &KMmcMediaTypeNotSupportedStr;
+
+ default:
+ break;
+ }
+
+ return &KMmcMediaTypeNotSupportedStr;
+}
+
+void DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+
+ // Get card info
+ TMmcIfInfo mmcInfo;
+ User::LeaveIfError(mmcDev.GetCardInfo(&mmcInfo));
+
+ TBuf8<256> lineToWrite;
+ lineToWrite.Format(KMmcTypeFormatStr, GetMmcMediaTypeStr(mmcInfo.iMmcType), mmcInfo.iMmcType);
+
+ aOutputFile.Write(lineToWrite);
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+
+ aOutputFile.Flush();
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5c/7093917e0f3b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/5c/7093917e0f3b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..e9ea2ec
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/5c/7093917e0f3b001b1ea0d1ee13b4299c
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\AccuracyCheck.txt");
+
+void DoLocalCodeCheck(RFile &aFile) {
+
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ TInt err = KErrNone;
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KAccuracyOutputPath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ } else {
+ TRAP(err, DumpCardInfoL(infoFile));
+
+ if (err != KErrNone) {
+ notifier.InfoPrint(KMmcFailDumpInfoFileStr);
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5c/b0dc76cf093b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/5c/b0dc76cf093b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..1bb84a9
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/5c/b0dc76cf093b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+_LIT(KMmcMediaTypeROMStr, "ROM");
+_LIT(KMmcMediaTypeFlashStr, "Flash");
+_LIT(KMmcMediaTypeIOStr, "IO");
+_LIT(KMmcMediaTypeOtherStr, "Other");
+_LIT(KMmcMediaTypeNotSupportedStr, "Not supported");
+
+TDesC16 *GetMmcMediaTypeStr(const TInt aType) {
+ switch (aType) {
+ case EMmcROM:
+ return &KMmcMediaTypeROMStr;
+
+ case EMmcFlash:
+ return &KMmcMediaTypeFlashStr;
+
+ case EMmcIO:
+ return &KMmcMediaTypeIOStr;
+
+ case EMmcOther:
+ return &KMmcMediaTypeOtherStr;
+
+ case EMmcNotSupported:
+ }
+}
+
+TInt DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+
+ // Get card info
+ TMmcIfInfo mmcInfo;
+ User::LeaveIfError(mmcDev.GetCardInfo(&mmcInfo));
+
+ TBuf<256> lineToWrite;
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5e/a0c07a69103b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/5e/a0c07a69103b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..0719537
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/5e/a0c07a69103b001b1ea0d1ee13b4299c
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\AccuracyCheck.txt");
+_LIT(KMmcFailOpenAccuracyFileStr, "Fail opening file to write tests!");
+
+_LIT8(KTestFailFmtStr, "Test %d failed with code %d");
+
+typedef void (*TestFuncType)(RFile &);
+
+void DoLocalCodeCheckL(RFile &aFile) {
+ const TUint32 KTestCodeChunkSize = 0x1000;
+
+ RChunk testChunk;
+ User::LeaveIfError(testChunk.CreateLocalCode(KTestCodeChunkSize, KTestCodeChunkSize, EOwnerProcess));
+
+ _LIT8(KLocalCodeChunkOutLineStr, "Base address of local code chunk is 0x%08x\n");
+
+ TBuf8<128> outLine;
+ outLine.Format(KLocalCodeChunkOutLineStr, (TUint32)testChunk.Base());
+
+ aFile.Write(outLine);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ TInt err = KErrNone;
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KAccuracyOutputPath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenAccuracyFileStr);
+ } else {
+ TestFuncType listTests[] = { DoLocalCodeCheckL };
+
+ for (int i = 0; i < sizeof(listTests) / sizeof(TestFuncType); i++) {
+ TRAPD(nerr, listTests[i]());
+
+ if (nerr != KErrNone) {
+ TBuf8<128> errLine;
+ errLine.Format(KTestFailFmtStr, i, nerr);
+ }
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/60/2042c95d083b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/60/2042c95d083b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..bda9619
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/60/2042c95d083b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,23 @@
+#include "mmcbus.h"
+
+_LIT(KMmcIfDvcName, "MmcIf");
+
+CMmcBusChannel::CMmcBusChannel()
+ : RBusLogicalChannel() {
+}
+
+TVersion CMmcBusChannel::GetVersion() {
+ TVersion dver;
+ dver.iMajor = 1;
+ dver.iMinor = 0;
+ dver.iBuild = 1;
+
+ return dver;
+}
+
+void CMmcBusChannel::ConstructL() {
+ User::LeaveIfError(DoCreate(KMmcIfDvcName, GetVersion(), 0, NULL, NULL, EOwnerProcess, EFalse));
+}
+
+ TInt SelectCard(TInt aIndex);
+ TInt GetCardInfo(TMmcIfInfo *aInfo);
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/61/50785e4b103b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/61/50785e4b103b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..8773043
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/61/50785e4b103b001b1ea0d1ee13b4299c
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\AccuracyCheck.txt");
+_LIT(KMmcFailOpenAccuracyFileStr, "Fail opening file to write tests!");
+
+typedef void (*TestFuncType)(RFile &);
+
+void DoLocalCodeCheckL(RFile &aFile) {
+ const TUint32 KTestCodeChunkSize = 0x1000;
+
+ RChunk testChunk;
+ User::LeaveIfError(testChunk.CreateLocalCode(KTestCodeChunkSize, KTestCodeChunkSize, EOwnerProcess));
+
+ _LIT8(KLocalCodeChunkOutLineStr, "Base address of local code chunk is 0x%08x");
+
+ TBuf8<128> outLine;
+ outLine.Format(KLocalCodeChunkOutLineStr, (TUint32)testChunk.Base());
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ TInt err = KErrNone;
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KAccuracyOutputPath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenAccuracyFileStr);
+ } else {
+ TestFuncType listTests[] = { DoLocalCodeCheckL };
+
+ for (int i = 0; i < sizeof(listTests) / sizeof(TestFuncType); i++) {
+ TRAPD(nerr, listTest[i]());
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/62/f03aeadf0f3b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/62/f03aeadf0f3b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..08caef6
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/62/f03aeadf0f3b001b1ea0d1ee13b4299c
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\AccuracyCheck.txt");
+
+void DoLocalCodeCheck(RFile &aFile) {
+ const TUint32 KTestCodeChunkSize = 0x1000;
+
+ RChunk testChunk;
+ User::LeaveIfError(testChunk.CreateLocalCode(KTestCodeChunkSize, KTestCodeChunkSize, EOwnerProcess));
+
+ TBuf8<128> outLine;
+ testChunk.Base();
+
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ TInt err = KErrNone;
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KAccuracyOutputPath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ } else {
+ TRAP(err, DumpCardInfoL(infoFile));
+
+ if (err != KErrNone) {
+ notifier.InfoPrint(KMmcFailDumpInfoFileStr);
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/66/a0522d18093b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/66/a0522d18093b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..5ad3ac2
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/66/a0522d18093b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+TInt DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+ TMmcIfInfo
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/69/205264150a3b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/69/205264150a3b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..c3a8ddd
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/69/205264150a3b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT8(KMmcTypeFormatStr, "MMC type: %S (%d)");
+_LIT8(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+_LIT8(KMmcMediaTypeROMStr, "ROM");
+_LIT8(KMmcMediaTypeFlashStr, "Flash");
+_LIT8(KMmcMediaTypeIOStr, "IO");
+_LIT8(KMmcMediaTypeOtherStr, "Other");
+_LIT8(KMmcMediaTypeNotSupportedStr, "Not supported");
+
+TDesC8 *GetMmcMediaTypeStr(const TInt aType) {
+ switch (aType) {
+ case EMmcROM:
+ return &KMmcMediaTypeROMStr;
+
+ case EMmcFlash:
+ return &KMmcMediaTypeFlashStr;
+
+ case EMmcIO:
+ return &KMmcMediaTypeIOStr;
+
+ case EMmcOther:
+ return &KMmcMediaTypeOtherStr;
+
+ case EMmcNotSupported:
+ return &KMmcMediaTypeNotSupportedStr;
+
+ default:
+ break;
+ }
+
+ return &KMmcMediaTypeNotSupportedStr;
+}
+
+TInt DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+
+ // Get card info
+ TMmcIfInfo mmcInfo;
+ User::LeaveIfError(mmcDev.GetCardInfo(&mmcInfo));
+
+ TBuf8<256> lineToWrite;
+ lineToWrite.Format(KMmcTypeFormatStr, GetMmcMediaTypeStr(mmcInfo.iMmcType), mmcInfo.iMmcType);
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/69/c0c5c75c0a3b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/69/c0c5c75c0a3b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..2268736
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/69/c0c5c75c0a3b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT8(KMmcTypeFormatStr, "MMC type: %S (%d)");
+_LIT8(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+_LIT(KMmcFailDumpInfoFileStr, "Fail dumping MMC info!");
+
+_LIT8(KMmcMediaTypeROMStr, "ROM");
+_LIT8(KMmcMediaTypeFlashStr, "Flash");
+_LIT8(KMmcMediaTypeIOStr, "IO");
+_LIT8(KMmcMediaTypeOtherStr, "Other");
+_LIT8(KMmcMediaTypeNotSupportedStr, "Not supported");
+
+TDesC8 *GetMmcMediaTypeStr(const TInt aType) {
+ switch (aType) {
+ case EMmcROM:
+ return &KMmcMediaTypeROMStr;
+
+ case EMmcFlash:
+ return &KMmcMediaTypeFlashStr;
+
+ case EMmcIO:
+ return &KMmcMediaTypeIOStr;
+
+ case EMmcOther:
+ return &KMmcMediaTypeOtherStr;
+
+ case EMmcNotSupported:
+ return &KMmcMediaTypeNotSupportedStr;
+
+ default:
+ break;
+ }
+
+ return &KMmcMediaTypeNotSupportedStr;
+}
+
+void DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+
+ // Get card info
+ TMmcIfInfo mmcInfo;
+ User::LeaveIfError(mmcDev.GetCardInfo(&mmcInfo));
+
+ TBuf8<256> lineToWrite;
+ lineToWrite.Format(KMmcTypeFormatStr, GetMmcMediaTypeStr(mmcInfo.iMmcType), mmcInfo.iMmcType);
+
+ aOutputFile.Write(lineToWrite);
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+
+ aOutputFile.Flush();
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ TInt err = KErrNone;
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ } else {
+ TRAPD(err, DumpCardInfoL(infoFile));
+
+ if (err != KErrNone) {
+ notifier.InfoPrint(KMmcFailDumpInfoFileStr);
+ }
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/6a/b08f1ff7083b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/6a/b08f1ff7083b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..8e3886c
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/6a/b08f1ff7083b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+TInt DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/6c/c0684531103b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/6c/c0684531103b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..86af1c3
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/6c/c0684531103b001b1ea0d1ee13b4299c
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\AccuracyCheck.txt");
+_LIT(KMmcFailOpenAccuracyFileStr, "Fail opening file to write tests!");
+
+typedef void (*TestFuncType)(RFile &);
+
+void DoLocalCodeCheckL(RFile &aFile) {
+ const TUint32 KTestCodeChunkSize = 0x1000;
+
+ RChunk testChunk;
+ User::LeaveIfError(testChunk.CreateLocalCode(KTestCodeChunkSize, KTestCodeChunkSize, EOwnerProcess));
+
+ _LIT8(KLocalCodeChunkOutLineStr, "Base address of local code chunk is 0x%08x");
+
+ TBuf8<128> outLine;
+ outLine.Format(KLocalCodeChunkOutLineStr, (TUint32)testChunk.Base());
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ TInt err = KErrNone;
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KAccuracyOutputPath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenAccuracyFileStr);
+ } else {
+ TestFuncType listTests[] = { DoLocalCodeCheckL };
+
+ for (int i = 0; i < sizeof(listTests) / sizeof(TestFuncType); i++) {
+
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/6c/e0230b050a3b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/6c/e0230b050a3b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..f2d86fc
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/6c/e0230b050a3b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT8(KMmcTypeFormatStr, "MMC type: %S (%d)");
+_LIT8(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+_LIT8(KMmcMediaTypeROMStr, "ROM");
+_LIT8(KMmcMediaTypeFlashStr, "Flash");
+_LIT8(KMmcMediaTypeIOStr, "IO");
+_LIT8(KMmcMediaTypeOtherStr, "Other");
+_LIT8(KMmcMediaTypeNotSupportedStr, "Not supported");
+
+TDesC8 *GetMmcMediaTypeStr(const TInt aType) {
+ switch (aType) {
+ case EMmcROM:
+ return &KMmcMediaTypeROMStr;
+
+ case EMmcFlash:
+ return &KMmcMediaTypeFlashStr;
+
+ case EMmcIO:
+ return &KMmcMediaTypeIOStr;
+
+ case EMmcOther:
+ return &KMmcMediaTypeOtherStr;
+
+ case EMmcNotSupported:
+ return &KMmcMediaTypeNotSupportedStr;
+
+ default:
+ break;
+ }
+
+ return NULL;
+}
+
+TInt DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+
+ // Get card info
+ TMmcIfInfo mmcInfo;
+ User::LeaveIfError(mmcDev.GetCardInfo(&mmcInfo));
+
+ TBuf8<256> lineToWrite;
+ lineToWrite.Format()
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/6e/4009708c053b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/6e/4009708c053b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..c8b0f88
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/6e/4009708c053b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,44 @@
+/*
+ ============================================================================
+ Name : mmcdump.cpp
+ Author :
+ Copyright : Your copyright notice
+ Description : Exe source file
+ ============================================================================
+ */
+
+// Include Files
+
+#include "mmcdump.h"
+
+#include
+#include
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RFile infoFile;
+ infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite);
+
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/72/c0c193a2103b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/72/c0c193a2103b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..4f3db3e
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/72/c0c193a2103b001b1ea0d1ee13b4299c
@@ -0,0 +1,11 @@
+TARGET accuracy.exe
+TARGETTYPE exe
+UID 0 0xe2405073
+
+USERINCLUDE ..\inc
+SYSTEMINCLUDE \epoc32\include
+
+SOURCEPATH ..\src
+SOURCE accuracy.cpp
+
+LIBRARY euser.lib
\ No newline at end of file
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/73/50efd76d073b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/73/50efd76d073b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..4acdb3d
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/73/50efd76d073b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#ifndef __MMCBUS_H__
+#define __MMCBUS_H__
+
+// Include Files
+
+#include
+
+// Function Prototypes
+
+GLDEF_C TInt E32Main();
+
+#endif // __MMCDUMP_H__
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/75/80ba369c103b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/75/80ba369c103b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..36a18ec
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/75/80ba369c103b001b1ea0d1ee13b4299c
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\AccuracyCheck.txt");
+_LIT(KMmcFailOpenAccuracyFileStr, "Fail opening file to write tests!");
+
+_LIT8(KTestFailFmtStr, "Test %d failed with code %d");
+
+typedef void (*TestFuncType)(RFile &);
+
+void DoLocalCodeCheckL(RFile &aFile) {
+ const TUint32 KTestCodeChunkSize = 0x1000;
+
+ RChunk testChunk;
+ User::LeaveIfError(testChunk.CreateLocalCode(KTestCodeChunkSize, KTestCodeChunkSize, EOwnerProcess));
+
+ _LIT8(KLocalCodeChunkOutLineStr, "Base address of local code chunk is 0x%08x\n");
+
+ TBuf8<128> outLine;
+ outLine.Format(KLocalCodeChunkOutLineStr, (TUint32)testChunk.Base());
+
+ aFile.Write(outLine);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KAccuracyOutputPath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenAccuracyFileStr);
+ } else {
+ TestFuncType listTests[] = { DoLocalCodeCheckL };
+
+ for (int i = 0; i < sizeof(listTests) / sizeof(TestFuncType); i++) {
+ TRAPD(nerr, listTests[i](infoFile));
+
+ if (nerr != KErrNone) {
+ TBuf8<128> errLine;
+ errLine.Format(KTestFailFmtStr, i, nerr);
+
+ infoFile.Write(errLine);
+ }
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7c/3075100d103b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/7c/3075100d103b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..6f36c12
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/7c/3075100d103b001b1ea0d1ee13b4299c
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\AccuracyCheck.txt");
+
+typedef void (*TestFuncType)(RFile &);
+
+void DoLocalCodeCheckL(RFile &aFile) {
+ const TUint32 KTestCodeChunkSize = 0x1000;
+
+ RChunk testChunk;
+ User::LeaveIfError(testChunk.CreateLocalCode(KTestCodeChunkSize, KTestCodeChunkSize, EOwnerProcess));
+
+ _LIT8(KLocalCodeChunkOutLineStr, "Base address of local code chunk is 0x%08x");
+
+ TBuf8<128> outLine;
+ outLine.Format(KLocalCodeChunkOutLineStr, (TUint32)testChunk.Base());
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ TInt err = KErrNone;
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KAccuracyOutputPath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ } else {
+ TestFuncType listTests[] = { DoLocalCodeCheckL };
+ TRAP(err, DumpCardInfoL(infoFile));
+
+ if (err != KErrNone) {
+ notifier.InfoPrint(KMmcFailDumpInfoFileStr);
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7d/a047c6a2093b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/7d/a047c6a2093b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..28562c6
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/7d/a047c6a2093b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+_LIT(KMmcMediaTypeROMStr, "ROM");
+_LIT(KMmcMediaTypeFlashStr, "Flash");
+_LIT(KMmcMediaTypeIOStr, "IO");
+_LIT(KMmcMediaTypeOtherStr, "Other");
+_LIT(KMmcMediaTypeNotSupportedStr, "Not supported");
+
+TDesC16 *GetMmcMediaTypeStr(const TInt aType) {
+
+}
+
+TInt DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+
+ // Get card info
+ TMmcIfInfo mmcInfo;
+ User::LeaveIfError(mmcDev.GetCardInfo(&mmcInfo));
+
+ TBuf<256> lineToWrite;
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7e/8091076f0e3b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/7e/8091076f0e3b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..57e2832
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/7e/8091076f0e3b001b1ea0d1ee13b4299c
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7f/70cf63a8093b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/7f/70cf63a8093b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..0347117
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/7f/70cf63a8093b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+_LIT(KMmcMediaTypeROMStr, "ROM");
+_LIT(KMmcMediaTypeFlashStr, "Flash");
+_LIT(KMmcMediaTypeIOStr, "IO");
+_LIT(KMmcMediaTypeOtherStr, "Other");
+_LIT(KMmcMediaTypeNotSupportedStr, "Not supported");
+
+TDesC16 *GetMmcMediaTypeStr(const TInt aType) {
+ switch (aType) {
+ case EMmcROM:
+ }
+}
+
+TInt DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+
+ // Get card info
+ TMmcIfInfo mmcInfo;
+ User::LeaveIfError(mmcDev.GetCardInfo(&mmcInfo));
+
+ TBuf<256> lineToWrite;
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8/1018787b073b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/8/1018787b073b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..c522cb6
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/8/1018787b073b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#ifndef __MMCBUS_H__
+#define __MMCBUS_H__
+
+#include
+
+enum TMmcMediaType {
+ EMmcROM,
+ EMmcFlash,
+ EMmcIO,
+ EMmcOther,
+ EMmcNotSupported
+};
+
+struct TMmcIfInfo {
+ TUint32 iMmcID[4];
+ TUint32 iMmcType;
+};
+
+enum TMmcControlOp {
+ EMmcControlOpSelectCard = 4,
+ EMmcControlOpCardInfo = 6
+};
+
+#endif // __MMCBUS_H__
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/87/400329fd093b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/87/400329fd093b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..71fd9b2
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/87/400329fd093b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %S (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+_LIT(KMmcMediaTypeROMStr, "ROM");
+_LIT(KMmcMediaTypeFlashStr, "Flash");
+_LIT(KMmcMediaTypeIOStr, "IO");
+_LIT(KMmcMediaTypeOtherStr, "Other");
+_LIT(KMmcMediaTypeNotSupportedStr, "Not supported");
+
+TDesC16 *GetMmcMediaTypeStr(const TInt aType) {
+ switch (aType) {
+ case EMmcROM:
+ return &KMmcMediaTypeROMStr;
+
+ case EMmcFlash:
+ return &KMmcMediaTypeFlashStr;
+
+ case EMmcIO:
+ return &KMmcMediaTypeIOStr;
+
+ case EMmcOther:
+ return &KMmcMediaTypeOtherStr;
+
+ case EMmcNotSupported:
+ return &KMmcMediaTypeNotSupportedStr;
+
+ default:
+ break;
+ }
+
+ return NULL;
+}
+
+TInt DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+
+ // Get card info
+ TMmcIfInfo mmcInfo;
+ User::LeaveIfError(mmcDev.GetCardInfo(&mmcInfo));
+
+ TBuf<256> lineToWrite;
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/88/00a992bd063b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/88/00a992bd063b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..4ef37de
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/88/00a992bd063b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,68 @@
+/*
+ ============================================================================
+ Name : mmcdump.cpp
+ Author :
+ Copyright : Your copyright notice
+ Description : Exe source file
+ ============================================================================
+ */
+
+// Include Files
+
+#include "mmcdump.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+enum TMmcMediaType {
+ EMmcROM,
+ EMmcFlash,
+ EMmcIO,
+ EMmcOther,
+ EMmcNotSupported
+};
+
+struct TMmcIfInfo {
+ TUint32 iMmcID[4];
+ TUint32 iMmcType;
+};
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+ RBusLogicalChannel mmcdev;
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8a/f0da568c103b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/8a/f0da568c103b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..984930e
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/8a/f0da568c103b001b1ea0d1ee13b4299c
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\AccuracyCheck.txt");
+_LIT(KMmcFailOpenAccuracyFileStr, "Fail opening file to write tests!");
+
+_LIT8(KTestFailFmtStr, "Test %d failed with code %d");
+
+typedef void (*TestFuncType)(RFile &);
+
+void DoLocalCodeCheckL(RFile &aFile) {
+ const TUint32 KTestCodeChunkSize = 0x1000;
+
+ RChunk testChunk;
+ User::LeaveIfError(testChunk.CreateLocalCode(KTestCodeChunkSize, KTestCodeChunkSize, EOwnerProcess));
+
+ _LIT8(KLocalCodeChunkOutLineStr, "Base address of local code chunk is 0x%08x\n");
+
+ TBuf8<128> outLine;
+ outLine.Format(KLocalCodeChunkOutLineStr, (TUint32)testChunk.Base());
+
+ aFile.Write(outLine);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KAccuracyOutputPath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenAccuracyFileStr);
+ } else {
+ TestFuncType listTests[] = { DoLocalCodeCheckL };
+
+ for (int i = 0; i < sizeof(listTests) / sizeof(TestFuncType); i++) {
+ TRAPD(nerr, listTests[i]());
+
+ if (nerr != KErrNone) {
+ TBuf8<128> errLine;
+ errLine.Format(KTestFailFmtStr, i, nerr);
+
+ infoFile.Write(errLine);
+ }
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8f/f0d3bcde0e3b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/8f/f0d3bcde0e3b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..90d86f7
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/8f/f0d3bcde0e3b001b1ea0d1ee13b4299c
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ TInt err = KErrNone;
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ } else {
+ TRAP(err, DumpCardInfoL(infoFile));
+
+ if (err != KErrNone) {
+ notifier.InfoPrint(KMmcFailDumpInfoFileStr);
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/92/f0872fcd0d3b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/92/f0872fcd0d3b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..110c8ae
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/92/f0872fcd0d3b001b1ea0d1ee13b4299c
@@ -0,0 +1,22 @@
+/*
+============================================================================
+ Name : accuracy.mmp
+ Author :
+ Copyright : Your copyright notice
+ Description : This is the project specification file for accuracy.
+============================================================================
+*/
+
+TARGET accuracy.exe
+TARGETTYPE exe
+UID 0 0xe2405073
+
+USERINCLUDE ..\inc
+SYSTEMINCLUDE \epoc32\include
+
+SOURCEPATH ..\src
+SOURCE accuracy.cpp
+
+LIBRARY euser.lib
+
+DEBUGGABLE_UDEBONLY
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/94/40a22401073b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/94/40a22401073b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..4226235
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/94/40a22401073b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,80 @@
+/*
+ ============================================================================
+ Name : mmcdump.cpp
+ Author :
+ Copyright : Your copyright notice
+ Description : Exe source file
+ ============================================================================
+ */
+
+// Include Files
+
+#include "mmcdump.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+enum TMmcMediaType {
+ EMmcROM,
+ EMmcFlash,
+ EMmcIO,
+ EMmcOther,
+ EMmcNotSupported
+};
+
+struct TMmcIfInfo {
+ TUint32 iMmcID[4];
+ TUint32 iMmcType;
+};
+
+enum TMmcControlOp {
+ EMmcControlOpSelectCard = 4,
+ EMmcControlOpCardInfo = 6
+};
+
+class CMmcBusChannel: public RBusLogicalChannel {
+ CMmcBusChannel();
+
+ void ConstructL();
+ void SelectCard(TInt aIndex);
+
+};
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/94/b0a62223093b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/94/b0a62223093b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..e145082
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/94/b0a62223093b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+TInt DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+ TMmcIfInfo mmcInfo;
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/99/600fe14e103b001b1ea0d1ee13b4299c b/.metadata/.plugins/org.eclipse.core.resources/.history/99/600fe14e103b001b1ea0d1ee13b4299c
new file mode 100644
index 0000000..38f0604
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/99/600fe14e103b001b1ea0d1ee13b4299c
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include
+#include
+#include
+
+_LIT(KAccuracyOutputPath, "C:\\AccuracyCheck.txt");
+_LIT(KMmcFailOpenAccuracyFileStr, "Fail opening file to write tests!");
+
+_LIT8(KTestFailStr, "Test %d failed with code %d");
+
+typedef void (*TestFuncType)(RFile &);
+
+void DoLocalCodeCheckL(RFile &aFile) {
+ const TUint32 KTestCodeChunkSize = 0x1000;
+
+ RChunk testChunk;
+ User::LeaveIfError(testChunk.CreateLocalCode(KTestCodeChunkSize, KTestCodeChunkSize, EOwnerProcess));
+
+ _LIT8(KLocalCodeChunkOutLineStr, "Base address of local code chunk is 0x%08x");
+
+ TBuf8<128> outLine;
+ outLine.Format(KLocalCodeChunkOutLineStr, (TUint32)testChunk.Base());
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ TInt err = KErrNone;
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KAccuracyOutputPath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenAccuracyFileStr);
+ } else {
+ TestFuncType listTests[] = { DoLocalCodeCheckL };
+
+ for (int i = 0; i < sizeof(listTests) / sizeof(TestFuncType); i++) {
+ TRAPD(nerr, listTests[i]());
+
+ if (nerr != KErrNone) {
+ TBuf
+ }
+ }
+ }
+
+ infoFile.Close();
+ notifier.Close();
+ fs.Close();
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/9f/c04b2bb6083b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/9f/c04b2bb6083b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..472ecc4
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/9f/c04b2bb6083b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,81 @@
+/*
+ ============================================================================
+ Name : mmcdump.cpp
+ Author :
+ Copyright : Your copyright notice
+ Description : Exe source file
+ ============================================================================
+ */
+
+// Include Files
+
+#include "mmcdump.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+enum TMmcMediaType {
+ EMmcROM,
+ EMmcFlash,
+ EMmcIO,
+ EMmcOther,
+ EMmcNotSupported
+};
+
+struct TMmcIfInfo {
+ TUint32 iMmcID[4];
+ TUint32 iMmcType;
+};
+
+enum TMmcControlOp {
+ EMmcControlOpSelectCard = 4,
+ EMmcControlOpCardInfo = 6
+};
+
+class CMmcBusChannel: public RBusLogicalChannel {
+ CMmcBusChannel();
+
+ void ConstructL();
+
+ TInt SelectCard(TInt aIndex);
+ TInt GetCardInfo(TMmcIfInfo *aInfo);
+};
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a0/703e158a073b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/a0/703e158a073b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..9b999f8
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/a0/703e158a073b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,22 @@
+/*
+============================================================================
+ Name : mmcdump.mmp
+ Author :
+ Copyright : Your copyright notice
+ Description : This is the project specification file for mmcdump.
+============================================================================
+*/
+
+TARGET mmcdump.exe
+TARGETTYPE exe
+UID 0 0xe96fe421
+
+USERINCLUDE ..\inc
+SYSTEMINCLUDE \epoc32\include
+
+SOURCEPATH ..\src
+SOURCE mmcdump.cpp
+
+LIBRARY euser.lib
+
+DEBUGGABLE_UDEBONLY
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a2/006e8ae9093b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/a2/006e8ae9093b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..632df99
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/a2/006e8ae9093b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+_LIT(KMmcMediaTypeROMStr, "ROM");
+_LIT(KMmcMediaTypeFlashStr, "Flash");
+_LIT(KMmcMediaTypeIOStr, "IO");
+_LIT(KMmcMediaTypeOtherStr, "Other");
+_LIT(KMmcMediaTypeNotSupportedStr, "Not supported");
+
+TDesC16 *GetMmcMediaTypeStr(const TInt aType) {
+ switch (aType) {
+ case EMmcROM:
+ return &KMmcMediaTypeROMStr;
+
+ case EMmcFlash:
+ return &KMmcMediaTypeFlashStr;
+
+ case EMmcIO:
+ return &KMmcMediaTypeIOStr;
+
+ case EMmcOther:
+ return &KMmcMediaTypeOtherStr;
+
+ case EMmcNotSupported:
+ return &KMmcMediaTypeNotSupportedStr;
+
+ default:
+ break;
+ }
+
+ return NULL;
+}
+
+TInt DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+
+ // Get card info
+ TMmcIfInfo mmcInfo;
+ User::LeaveIfError(mmcDev.GetCardInfo(&mmcInfo));
+
+ TBuf<256> lineToWrite;
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a3/10721674073b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/a3/10721674073b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..bde9f97
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/a3/10721674073b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,14 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#ifndef __MMCBUS_H__
+#define __MMCBUS_H__
+
+#include
+
+#endif // __MMCBUS_H__
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a4/00624915083b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/a4/00624915083b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..9aa5579
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/a4/00624915083b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,18 @@
+#include "mmcbus.h"
+
+_LIT(KMmcIfDvcName, "MmcIf");
+
+CMmcBusChannel::CMmcBusChannel()
+ : RBusLogicalChannel() {
+}
+
+void CMmcBusChannel::ConstructL() {
+ TVersion dver;
+ dver.iMajor = 1;
+ dver.iMinor = 0;
+ dver.iBuild = 1;
+ User::LeaveIfError(this->DoCreate(KMmcIfDvcName, ))
+}
+
+ TInt SelectCard(TInt aIndex);
+ TInt GetCardInfo(TMmcIfInfo *aInfo);
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/ae/a08e9092033b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/ae/a08e9092033b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..bc8be9e
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/ae/a08e9092033b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,32 @@
+/*
+ ============================================================================
+ Name : mmcdump.cpp
+ Author :
+ Copyright : Your copyright notice
+ Description : Exe source file
+ ============================================================================
+ */
+
+// Include Files
+
+#include "mmcdump.h"
+
+#include
+#include
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/af/a0a27f16093b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/af/a0a27f16093b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..e016481
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/af/a0a27f16093b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+TInt DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b0/008ccfb3093b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/b0/008ccfb3093b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..d5cc6b0
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/b0/008ccfb3093b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+_LIT(KMmcMediaTypeROMStr, "ROM");
+_LIT(KMmcMediaTypeFlashStr, "Flash");
+_LIT(KMmcMediaTypeIOStr, "IO");
+_LIT(KMmcMediaTypeOtherStr, "Other");
+_LIT(KMmcMediaTypeNotSupportedStr, "Not supported");
+
+TDesC16 *GetMmcMediaTypeStr(const TInt aType) {
+ switch (aType) {
+ case EMmcROM:
+ return &KMmcMediaTypeROMStr;
+
+ case EMmcFlash:
+ return &KMmcMediaTypeFlashStr;
+ }
+}
+
+TInt DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+
+ // Get card info
+ TMmcIfInfo mmcInfo;
+ User::LeaveIfError(mmcDev.GetCardInfo(&mmcInfo));
+
+ TBuf<256> lineToWrite;
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b0/f07d51af093b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/b0/f07d51af093b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..747e8ab
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/b0/f07d51af093b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see .
+ */
+
+#include "mmcdump.h"
+#include "mmcbus.h"
+
+#include
+#include
+#include
+
+#include
+
+_LIT(KMmcIfLddName, "GD1DRV");
+_LIT(KMmcInfoFilePath, "C:\\MmcInfo.txt");
+
+_LIT(KMmcTypeFormatStr, "MMC type: %s (%d)");
+_LIT(KMmcIdFormatStr, "MMC ID: ");
+
+_LIT(KMmcFailOpenDumpInfoFileStr, "Fail opening MMC info dump file!");
+
+_LIT(KMmcMediaTypeROMStr, "ROM");
+_LIT(KMmcMediaTypeFlashStr, "Flash");
+_LIT(KMmcMediaTypeIOStr, "IO");
+_LIT(KMmcMediaTypeOtherStr, "Other");
+_LIT(KMmcMediaTypeNotSupportedStr, "Not supported");
+
+TDesC16 *GetMmcMediaTypeStr(const TInt aType) {
+ switch (aType) {
+ case EMmcROM:
+ return &KMmcMediaTypeROMStr;
+ }
+}
+
+TInt DumpCardInfoL(RFile &aOutputFile) {
+ // Load logical device
+ User::LoadLogicalDevice(KMmcIfLddName);
+
+ CMmcBusChannel mmcDev;
+ mmcDev.ConstructL();
+
+ User::LeaveIfError(mmcDev.SelectCard(0));
+
+ // Get card info
+ TMmcIfInfo mmcInfo;
+ User::LeaveIfError(mmcDev.GetCardInfo(&mmcInfo));
+
+ TBuf<256> lineToWrite;
+
+ User::FreeLogicalDevice(KMmcIfDvcName);
+}
+
+GLDEF_C TInt E32Main()
+ {
+ // Create cleanup stack
+ __UHEAP_MARK;
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+
+ // Connect to FS service first
+ RFs fs;
+ fs.Connect(-1);
+
+ RNotifier notifier;
+ notifier.Connect();
+
+ RFile infoFile;
+ if (infoFile.Replace(fs, KMmcInfoFilePath, EFileShareAny|EFileWrite) != KErrNone) {
+ notifier.InfoPrint(KMmcFailOpenDumpInfoFileStr);
+ return 0;
+ }
+
+ delete cleanup;
+ __UHEAP_MARKEND;
+ return KErrNone;
+ }
+
diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b1/404411df083b001b1ddeae2b9fcc6e7c b/.metadata/.plugins/org.eclipse.core.resources/.history/b1/404411df083b001b1ddeae2b9fcc6e7c
new file mode 100644
index 0000000..82b3e72
--- /dev/null
+++ b/.metadata/.plugins/org.eclipse.core.resources/.history/b1/404411df083b001b1ddeae2b9fcc6e7c
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2020 EKA2L1 Team.
+ *
+ * This work is licensed under the terms of the MIT license.
+ * For a copy, see