aboutsummaryrefslogtreecommitdiffstats
path: root/samsung-ipc
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2014-07-04 19:53:11 +0200
committerPaul Kocialkowski <contact@paulk.fr>2014-07-04 19:53:11 +0200
commit8cc083b403632c2b929271e17f1e77ff83e0f7cd (patch)
treee5c11ab09f9e84cbf95fde8fa20b60ff34a6f3d3 /samsung-ipc
parentd2ba03448d092158da082e31326fe70a85ec1933 (diff)
downloadexternal_libsamsung-ipc-8cc083b403632c2b929271e17f1e77ff83e0f7cd.zip
external_libsamsung-ipc-8cc083b403632c2b929271e17f1e77ff83e0f7cd.tar.gz
external_libsamsung-ipc-8cc083b403632c2b929271e17f1e77ff83e0f7cd.tar.bz2
ipc_utils: Utility to check whether a seq is valid
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'samsung-ipc')
-rw-r--r--samsung-ipc/ipc_utils.c8
1 files changed, 8 insertions, 0 deletions
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 };