aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-09-07 05:54:42 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-09-12 17:48:11 +0200
commit61560a66a1d3424fef4a11c4136c47d1212bc5e6 (patch)
treef811f8bfe66b4d6899e42484919a51cda3ded91f /tools
parent2fa0310ba8f93fb019308246ce87f5d170c2ba7b (diff)
downloadhardware_replicant_libsamsung-ipc-61560a66a1d3424fef4a11c4136c47d1212bc5e6.tar.gz
hardware_replicant_libsamsung-ipc-61560a66a1d3424fef4a11c4136c47d1212bc5e6.tar.bz2
hardware_replicant_libsamsung-ipc-61560a66a1d3424fef4a11c4136c47d1212bc5e6.zip
Many debugging later
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/ipc-test.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/tools/ipc-test.c b/tools/ipc-test.c
index cc8548f..95c0b55 100644
--- a/tools/ipc-test.c
+++ b/tools/ipc-test.c
@@ -22,6 +22,7 @@
#include <string.h>
#include <samsung-ipc.h>
+#include "../samsung-ipc/ipc.h"
void log_callback(__attribute__((unused)) void *data,
const char *message)
@@ -61,18 +62,30 @@ int main(__attribute__((unused)) int args,
printf("Creating client failed\n");
goto error;
}
+ printf("%s: ipc_client_create(IPC_CLIENT_TYPE_FMT) => %d\n", __FUNCTION__, rc);
+
+// printf("%s: ipc_client_create done => client->type: %d %s\n",
+// __FUNCTION__, (int)(client->type),
+// (client->type == IPC_CLIENT_TYPE_FMT) ? "IPC_CLIENT_TYPE_FMT" : "OTHER");
rc = ipc_client_log_callback_register(client, log_callback, NULL);
if (rc < 0) {
printf("Registering log callback failed\n");
goto error;
}
+ printf("%s: ipc_client_log_callback_register(client, log_callback, NULL) => %d\n", __FUNCTION__, rc);
+
+// printf("%s: client->type: %d @ vim %s +%d\n", __FUNCTION__, client->type, __FILE__, __LINE__);
rc = ipc_client_data_create(client);
if (rc < 0) {
printf("Creating data failed\n");
goto error;
}
+// printf("%s: client->type: %d @ vim %s +%d\n", __FUNCTION__, client->type, __FILE__, __LINE__);
+ printf("%s: ipc_client_data_create(client) => %d\n", __FUNCTION__, rc);
+
+ system("/usr/bin/lsusb");
rc = ipc_client_boot(client);
if (rc < 0) {
@@ -80,17 +93,31 @@ int main(__attribute__((unused)) int args,
goto error;
}
+ system("/usr/bin/lsusb");
+
+ return 0;
+
+ printf("%s: ipc_client_boot(client) => %d\n", __FUNCTION__, rc);
+// printf("%s: client->type: %d @ vim %s +%d\n", __FUNCTION__, client->type, __FILE__, __LINE__);
+
+ /* Does nothing */
rc = ipc_client_power_on(client);
if (rc < 0) {
printf("Powering on failed\n");
goto error;
}
+ printf("%s: ipc_client_power_on(client) => %d\n", __FUNCTION__, rc);
+
+ // printf("%s: client->type: %d @ vim %s +%d\n", __FUNCTION__, client->type, __FILE__, __LINE__);
rc = ipc_client_open(client);
if (rc < 0) {
- printf("Opening failed\n");
+ printf("ipc_client_open failed with error %d\n", rc);
goto error;
}
+ printf("%s: ipc_client_open(client) => %d\n", __FUNCTION__, rc);
+
+// printf("%s: client->type: %d @ vim %s +%d\n", __FUNCTION__, client->type, __FILE__, __LINE__);
for (i = 0; i < 5; i++) {
rc = ipc_client_poll(client, NULL, NULL);