• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) Texas Instruments - http://www.ti.com/
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef CAMERAHAL_COMMON_H
18 #define CAMERAHAL_COMMON_H
19 
20 #include "UtilsCommon.h"
21 #include "DebugUtils.h"
22 #include "Status.h"
23 
24 
25 
26 
27 // logging functions
28 #ifdef CAMERAHAL_DEBUG
29 #   define CAMHAL_LOGD  DBGUTILS_LOGD
30 #   define CAMHAL_LOGDA DBGUTILS_LOGDA
31 #   define CAMHAL_LOGDB DBGUTILS_LOGDB
32 #   ifdef CAMERAHAL_DEBUG_VERBOSE
33 #       define CAMHAL_LOGV  DBGUTILS_LOGV
34 #       define CAMHAL_LOGVA DBGUTILS_LOGVA
35 #       define CAMHAL_LOGVB DBGUTILS_LOGVB
36 #   else
37 #       define CAMHAL_LOGV(...)
38 #       define CAMHAL_LOGVA(str)
39 #       define CAMHAL_LOGVB(str, ...)
40 #   endif
41 #else
42 #   define CAMHAL_LOGD(...)
43 #   define CAMHAL_LOGDA(str)
44 #   define CAMHAL_LOGDB(str, ...)
45 #   define CAMHAL_LOGV(...)
46 #   define CAMHAL_LOGVA(str)
47 #   define CAMHAL_LOGVB(str, ...)
48 #endif
49 
50 #define CAMHAL_LOGI  DBGUTILS_LOGI
51 #define CAMHAL_LOGW  DBGUTILS_LOGW
52 #define CAMHAL_LOGE  DBGUTILS_LOGE
53 #define CAMHAL_LOGEA DBGUTILS_LOGEA
54 #define CAMHAL_LOGEB DBGUTILS_LOGEB
55 #define CAMHAL_LOGF  DBGUTILS_LOGF
56 
57 #define CAMHAL_ASSERT DBGUTILS_ASSERT
58 #define CAMHAL_ASSERT_X DBGUTILS_ASSERT_X
59 
60 #define CAMHAL_UNUSED(x) (void)x
61 
62 
63 
64 
65 #endif // CAMERAHAL_COMMON_H
66