ISF  2.1
Intelligent Sensing Framework for Kinetis with Processor Expert
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
isf_util.h
Go to the documentation of this file.
1 /**
2  * @file isf_util.h
3  * @brief The \b isf_util.h file contains the utility method declarations and macros.
4  *
5  * @copyright Copyright (c) 2014, Freescale Semiconductor, Inc.
6  */
7 
8 #ifndef ISF_UTIL_H_
9 #define ISPF_UTIL_H_
10 #include "isf_types.h"
11 /*! @brief This function reverse the bits of a double word.
12  *
13  * @details It provides minimum traverse. The complexity is less than O(n).
14  *
15  * @param[in] x The input value to be reversed.
16  *
17  * @return ::bitrev() returns the reversed bits data.
18  * @Constraints None
19  *
20  * @Reentrant Yes
21  * @Libs None
22  */
24 /*! @brief find first-in.
25  *
26  * @details Its finds the position of the first bit set in a double word from MSB.
27  *
28  * @param[in] doubleword The input value to be processed.
29  *
30  * @return ::ff1() returns the position of the first bit set from MSB.
31  * @Constraints None
32  *
33  * @Reentrant Yes
34  * @Libs None
35  */
36 uint32 ff1 (uint32 doubleword);
37 /*! @brief find first-in form LSB.
38  *
39  * @details Its finds the position of the first bit set in a double word from LSB.
40  *
41  * @param[in] doubleword The input value to be processed.
42  *
43  * @return ::ff1_lsb() returns the position of the first bit set from LSB.
44  * @Constraints None
45  *
46  * @Reentrant Yes
47  * @Libs None
48  */
49 uint32 ff1_lsb(uint32 doubleword);
50 /*! @brief memory copy
51  *
52  * @details Its copies the memory contents from source to destination.
53  *
54  * @param[in] src Pointer to the source.
55  * @param[in] dest Pointer to the destination.
56  * @param[in] size Number of bytes to copied.
57  *
58  * @return ::isf_mem_copy() returns the position of the first bit set from LSB
59  * @Constraints None
60  *
61  * @Reentrant Yes
62  * @Libs None
63  */
64 void isf_mem_copy(void *src, void* dest, uint32 size);
65 /*! @brief Macro for the memory copy
66  *
67 */
68 #define ISF_MEM_CPY(src, dest, number_of_bytes ) isf_mem_copy((src), (dest), (number_of_bytes))
69 /*! @brief elapsed time in microseconds
70  *
71  * @details Its returns the elapsed time as recorded by MQX rtos.
72  *
73  * @return ::isf_time_util_get_usec() returns elapsed time in microseconds.
74  * @Constraints None
75  *
76  * @Reentrant Yes
77  * @Libs None
78  */
80 
81 
82 #endif /* ISF_UTIL_H_ */
83 
uint32 bitrev(uint32 x)
This function reverse the bits of a double word.
Definition: isf_util.c:13
uint32 ff1_lsb(uint32 doubleword)
find first-in form LSB.
Definition: isf_util.c:37
unsigned long uint32
This defines uint32 as unsigned long.
Definition: isf_types.h:36
The isf_types.h file contains the ISF data type definitions and some of the globally used macros...
void isf_mem_copy(void *src, void *dest, uint32 size)
memory copy
Definition: isf_util.c:99
uint32 ff1(uint32 doubleword)
find first-in.
Definition: isf_util.c:23
uint32 isf_time_util_get_usec(void)
elapsed time in microseconds
Definition: isf_util.c:52