aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/samsung-ipc.h2
-rw-r--r--samsung-ipc/ipc_utils.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/include/samsung-ipc.h b/include/samsung-ipc.h
index 7240472..a706f97 100644
--- a/include/samsung-ipc.h
+++ b/include/samsung-ipc.h
@@ -108,6 +108,8 @@ char *ipc_client_nv_data_secret(struct ipc_client *client);
size_t ipc_client_nv_data_size(struct ipc_client *client);
size_t ipc_client_nv_data_chunk_size(struct ipc_client *client);
+int ipc_seq_valid(unsigned char seq);
+
const char *ipc_request_type_string(unsigned char type);
const char *ipc_response_type_string(unsigned char type);
const char *ipc_command_string(unsigned short command);
diff --git a/samsung-ipc/ipc_utils.c b/samsung-ipc/ipc_utils.c
index 3ca3879..0538387 100644
--- a/samsung-ipc/ipc_utils.c
+++ b/samsung-ipc/ipc_utils.c
@@ -32,6 +32,14 @@
#include <samsung-ipc.h>
#include <ipc.h>
+int ipc_seq_valid(unsigned char seq)
+{
+ if (seq == 0x00 || seq == 0xff)
+ return 0;
+ else
+ return 1;
+}
+
const char *ipc_request_type_string(unsigned char type)
{
static char type_string[5] = { 0 };