| ISF 2.2 rev 5 Intelligent Sensing Framework for Kinetis with Processor Expert

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

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) 2015, 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 */
23 uint32 bitrev(uint32 x);
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 */
79 uint32 isf_time_util_get_usec(void);
80 /*! @brief 4 byte swapping method
81 *
82 * @details
83 *
84 * @return :: swapped variable.
85 * @Constraints None
86 *
87 * @Reentrant Yes
88 * @Libs None
89 */
90 uint32 isf_swap4byte(uint32 n);
91
92 /*! @brief 2 byte swapping method
93 *
94 * @details
95 *
96 * @return :: swapped variable.
97 * @Constraints None
98 *
99 * @Reentrant Yes
100 * @Libs None
101 */
102 uint16 isf_swap2byte(uint16 n);
103
104 #endif /* ISF_UTIL_H_ */
105
bitrev
uint32 bitrev(uint32 x)
This function reverse the bits of a double word.
Definition: isf_util.c:18
ff1_lsb
uint32 ff1_lsb(uint32 doubleword)
find first-in form LSB.
Definition: isf_util.c:42
isf_types.h
The isf_types.h file contains the ISF data type definitions and some of the globally used macros...
isf_swap2byte
uint16 isf_swap2byte(uint16 n)
2 byte swapping method
Definition: isf_util.c:156
isf_mem_copy
void isf_mem_copy(void *src, void *dest, uint32 size)
memory copy
Definition: isf_util.c:128
ff1
uint32 ff1(uint32 doubleword)
find first-in.
Definition: isf_util.c:28
isf_time_util_get_usec
uint32 isf_time_util_get_usec(void)
elapsed time in microseconds
Definition: isf_util.c:55
uint16
unsigned short int uint16
Definition: isf_types.h:77
isf_swap4byte
uint32 isf_swap4byte(uint32 n)
4 byte swapping method
Definition: isf_util.c:143
uint32
unsigned long int uint32
Definition: isf_types.h:78
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.