4 * Copyright 2012 Samsung Electronics Co., Ltd
6 * Licensed under the Flora License, Version 1.1 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://floralicense.org/license
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 * This file declares wifi direct application util functions.
23 * @file wfd-app-util.h
24 * @author Sungsik Jang (sungsik.jang@samsung.com)
28 #ifndef __WFD_APP_UTIL_H__
29 #define __WFD_APP_UTIL_H__
31 #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
32 #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
38 #define LOG_TAG "WIFI_DIRECT_UGAPP"
40 #define WDUA_LOGV(format, args...) LOGV(format, ##args)
41 #define WDUA_LOGD(format, args...) LOGD(format, ##args)
42 #define WDUA_LOGI(format, args...) LOGI(format, ##args)
43 #define WDUA_LOGW(format, args...) LOGW(format, ##args)
44 #define WDUA_LOGE(format, args...) LOGE(format, ##args)
45 #define WDUA_LOGF(format, args...) LOGF(format, ##args)
47 #define __WDUA_LOG_FUNC_ENTER__ LOGV("Enter")
48 #define __WDUA_LOG_FUNC_EXIT__ LOGV("Quit")
50 #define assertm_if(expr, fmt, args...) do { \
52 WDUA_LOGF(" ##(%s) -> assert!!## "fmt, #expr, ##args); \
57 #else /** _DLOG_UTIL */
58 #define WDUA_LOGV(format, args...)
59 #define WDUA_LOGD(format, args...)
60 #define WDUA_LOGI(format, args...)
61 #define WDUA_LOGW(format, args...)
62 #define WDUA_LOGE(format, args...)
63 #define WDUA_LOGF(format, args...)
65 #define __WDUA_LOG_FUNC_ENTER__
66 #define __WDUA_LOG_FUNC_EXIT__
68 #endif /** _DLOG_UTIL */
70 #endif /* __WFD_APP_UTIL_H__ */