d44836ef64411632d3e0e6ddcb8ef05c6e224d0d
[platform/core/telephony/tel-plugin-vmodem.git] / src / vdpram_dump.c
1 /*\r
2  * tel-plugin-vmodem\r
3  *\r
4  * Copyright (c) 2013 Samsung Electronics Co. Ltd. All rights reserved.\r
5  *\r
6  * Licensed under the Apache License, Version 2.0 (the "License");\r
7  * you may not use this file except in compliance with the License.\r
8  * You may obtain a copy of the License at\r
9  *\r
10  * http://www.apache.org/licenses/LICENSE-2.0\r
11  *\r
12  * Unless required by applicable law or agreed to in writing, software\r
13  * distributed under the License is distributed on an "AS IS" BASIS,\r
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
15  * See the License for the specific language governing permissions and\r
16  * limitations under the License.\r
17  */\r
18 \r
19 #include <string.h>\r
20 #include <stdlib.h>\r
21 #include <stdio.h>\r
22 \r
23 #include <glib.h>\r
24 \r
25 #include <tcore.h>\r
26 #include <util.h>\r
27 #include <log.h>\r
28 \r
29 #include "vdpram_dump.h"\r
30 \r
31 void vdpram_hex_dump(gboolean tx, gushort data_len, void *data)\r
32 {\r
33         char *d;\r
34 \r
35         if(!data)\r
36                 return;\r
37 \r
38         if (tx == TRUE)
39                 d = "[TX]";\r
40         else\r
41                 d = "[RX]";\r
42 \r
43         msg("\n====== Data DUMP ======\n");\r
44 \r
45         msg("  %s\tData length: [%d] -", d, data_len);\r
46         tcore_util_hex_dump("        ", (gint)data_len, data);\r
47 \r
48         msg("\n====== Data DUMP ======\n");\r
49 }\r