ISF  2.2 rev 5
Intelligent Sensing Framework for Kinetis with Processor Expert
isf_util.c File Reference
#include "isf_util.h"
#include "isf.h"
Include dependency graph for isf_util.c:

Go to the source code of this file.

Functions

uint32 bitrev (uint32 doubleword)
 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...
 
uint32 isf_time_util_get_usec (void)
 This API returns the time in microseconds. More...
 
void isf_mem_copy (void *src, void *dest, uint32 size)
 memory copy More...
 
uint32 isf_swap4byte (uint32 n)
 4 byte swapping method More...
 
uint16 isf_swap2byte (uint16 n)
 2 byte swapping method More...
 

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 18 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 28 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 42 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 128 of file isf_util.c.

Referenced by isf_fifo_data_copy().

Here is the caller graph for this function:

uint16 isf_swap2byte ( uint16  n)

2 byte swapping method

Returns
:: swapped variable.
Constraints:
None
Reentrant: Yes
Link Libraries:
None

Definition at line 156 of file isf_util.c.

Referenced by fsl_fxas21002_i2cspi_3D_gyro_PeriodicCallback(), fsl_fxls8952_i2c_3D_accel_PeriodicCallback(), fsl_fxos8700_i2cspi_6D_AccMag_PeriodicCallback(), and fsl_mag3110_i2c_3D_mag_PeriodicCallback().

Here is the caller graph for this function:

uint32 isf_swap4byte ( uint32  n)

4 byte swapping method

Returns
:: swapped variable.
Constraints:
None
Reentrant: Yes
Link Libraries:
None

Definition at line 143 of file isf_util.c.

Referenced by App1_ci_app_callback(), and fsl_fxlc95000_Configure().

Here is the caller graph for this function:

uint32 isf_time_util_get_usec ( void  )

This API returns the time in microseconds.

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 55 of file isf_util.c.

References SysTick.

Referenced by Analog_1_fsl_Sensor_Generic_AnalogCallback(), Custom_1_fsl_Sensor_Custom_PeriodicCallback(), fsl_fxas21002_i2cspi_3D_gyro_PeriodicCallback(), fsl_fxls8471_i2cspi_3D_accel_PeriodicCallback(), fsl_fxls8952_i2c_3D_accel_PeriodicCallback(), fsl_fxos8700_i2cspi_6D_AccMag_PeriodicCallback(), fsl_mag3110_i2c_3D_mag_PeriodicCallback(), fsl_mma8491q_read_data_OneShotCallback(), fsl_mma865x_i2c_3D_accel_PeriodicCallback(), fsl_mma955x_PeriodicCallback(), fsl_mpl3115_i2c_1D_press_PeriodicCallback(), and isr_bm_callback_tmr().

Here is the caller graph for this function: