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 File Reference

The isf_util.h file contains the utility method declarations and macros. More...

#include "isf_types.h"
Include dependency graph for isf_util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ISPF_UTIL_H_
 
#define ISF_MEM_CPY(src, dest, number_of_bytes)   isf_mem_copy((src), (dest), (number_of_bytes))
 Macro for the memory copy. More...
 

Functions

uint32 bitrev (uint32 x)
 This function reverse the bits of a double word. More...
 
uint32 ff1 (uint32 doubleword)
 find first-in. More...
 
uint32 ff1_lsb (uint32 doubleword)
 find first-in form LSB. More...
 
void isf_mem_copy (void *src, void *dest, uint32 size)
 memory copy More...
 
uint32 isf_time_util_get_usec (void)
 elapsed time in microseconds More...
 

Detailed Description

The isf_util.h file contains the utility method declarations and macros.

Definition in file isf_util.h.

Macro Definition Documentation

#define ISF_MEM_CPY (   src,
  dest,
  number_of_bytes 
)    isf_mem_copy((src), (dest), (number_of_bytes))

Macro for the memory copy.

Definition at line 68 of file isf_util.h.

Referenced by fsl_veryon_spi_slave_read_postprocess(), and fsl_veryon_spi_slave_write_preprocess().

#define ISPF_UTIL_H_

Definition at line 9 of file isf_util.h.

Function Documentation

uint32 bitrev ( uint32  x)

This function reverse the bits of a double word.

It provides minimum traverse. The complexity is less than O(n).

Parameters
[in]xThe input value to be reversed.
Returns
bitrev() returns the reversed bits data.
Constraints:
None
Reentrant: Yes
Link Libraries:
None

Definition at line 13 of file isf_util.c.

uint32 ff1 ( uint32  doubleword)

find first-in.

Its finds the position of the first bit set in a double word from MSB.

Parameters
[in]doublewordThe input value to be processed.
Returns
ff1() returns the position of the first bit set from MSB.
Constraints:
None
Reentrant: Yes
Link Libraries:
None

Definition at line 23 of file isf_util.c.

Referenced by get_config_bits().

Here is the caller graph for this function:

uint32 ff1_lsb ( uint32  doubleword)

find first-in form LSB.

Its finds the position of the first bit set in a double word from LSB.

Parameters
[in]doublewordThe input value to be processed.
Returns
ff1_lsb() returns the position of the first bit set from LSB.
Constraints:
None
Reentrant: Yes
Link Libraries:
None

Definition at line 37 of file isf_util.c.

void isf_mem_copy ( void *  src,
void *  dest,
uint32  size 
)

memory copy

Its copies the memory contents from source to destination.

Parameters
[in]srcPointer to the source.
[in]destPointer to the destination.
[in]sizeNumber of bytes to copied.
Returns
isf_mem_copy() returns the position of the first bit set from LSB
Constraints:
None
Reentrant: Yes
Link Libraries:
None

Definition at line 99 of file isf_util.c.

Referenced by isf_fifo_data_copy().

Here is the caller graph for this function:

uint32 isf_time_util_get_usec ( void  )

elapsed time in microseconds

Its returns the elapsed time as recorded by MQX rtos.

Returns
isf_time_util_get_usec() returns elapsed time in microseconds.
Constraints:
None
Reentrant: Yes
Link Libraries:
None

elapsed time in microseconds

This API call uses the RTOS services to calculate and return the elapsed time since the system started running. Note that if the elapsed time has exceeded a 32bit value, that is 2^32-1 or 4294.96 seconds, then the time elapsed will rollover and start at zero.

Returns
isf_time_util_get_usec() returns a value of type uint32 providing the number of microseconds since the system started running.
Constraints:
None
Reentrant: No
Link Libraries:
libisf_core.a

Definition at line 52 of file isf_util.c.