RDK Documentation (Open Sourced RDK Components)
dsUtl.h
Go to the documentation of this file.
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 
20 /**
21  * @file
22  *
23  * @brief Device Settings HAL utilities.
24  *
25  * This API defines some common utilities for the Device Settings HAL.
26  *
27  * @par Document
28  * Document reference.
29  *
30  * @par Open Issues (in no particular order)
31  * -# None
32  *
33  * @par Assumptions
34  * -# None
35  *
36  * @par Abbreviations
37  * - BE: Big-Endian.
38  * - cb: Callback function (suffix).
39  * - DS: Device Settings.
40  * - FPD: Front-Panel Display.
41  * - HAL: Hardware Abstraction Layer.
42  * - LE: Little-Endian.
43  * - LS: Least Significant.
44  * - MBZ: Must be zero.
45  * - MS: Most Significant.
46  * - RDK: Reference Design Kit.
47  * - _t: Type (suffix).
48  *
49  * @par Implementation Notes
50  * -# None
51  *
52  */
53 
54 
55 
56 /**
57 * @defgroup devicesettings
58 * @{
59 * @defgroup hal
60 * @{
61 **/
62 
63 
64 #ifndef _DS_UTILS_H_
65 #define _DS_UTILS_H_
66 
67 #include <stdio.h>
68 
69 /** @addtogroup DSHAL_UTILS Device Settings HAL Utilities
70  * @ingroup DSHAL_API
71  * @{
72  */
73 
74 /**
75  * @brief Device Settings general Assert Failure inline definition.
76  */
77 #define dsUTL_ASSERT(x) do {\
78  if (!(x)) printf("ASSERTFAILURE at %s-%d\r\n", __FUNCTION__, __LINE__);\
79 }\
80 while(0)
81 
82 /**
83  * @brief Device Settings general Array dimension calculation inline definition.
84  */
85 #define dsUTL_DIM(arr) (sizeof((arr))/sizeof((arr)[0]))
86 
87 /* End of DSHAL_UTILS doxygen group */
88 /**
89  * @}
90  */
91 
92 #endif /* _DS_UTILS_H_ */
93 
94 
95 /** @} */
96 /** @} */