15 doubleword = (((doubleword & 0xaaaaaaaa) >> 1) | ((doubleword & 0x55555555) << 1));
16 doubleword = (((doubleword & 0xcccccccc) >> 2) | ((doubleword & 0x33333333) << 2));
17 doubleword = (((doubleword & 0xf0f0f0f0) >> 4) | ((doubleword & 0x0f0f0f0f) << 4));
18 doubleword = (((doubleword & 0xff00ff00) >> 8) | ((doubleword & 0x00ff00ff) << 8));
19 return (( doubleword >> 16) | (doubleword << 16));
27 if (0 == doubleword)
return 32;
29 if (0 == (doubleword & 0xFFFF0000) ){ index += 16; doubleword <<= 16;}
30 if (0 == (doubleword & 0xFF000000) ){ index += 8; doubleword <<= 8;}
31 if (0 == (doubleword & 0xF0000000) ){ index += 4; doubleword <<= 4;}
32 if (0 == (doubleword & 0xC0000000) ){ index += 2, doubleword <<= 2;}
33 if (0 == (doubleword & 0x80000000) ){ index += 1, doubleword <<= 1;}
39 if( 0 == doubleword)
return 0;
40 if (0 == (doubleword & 0x0000FFFF) ){ index += 16; doubleword >>= 16;}
41 if (0 == (doubleword & 0x000000FF) ){ index += 8; doubleword >>= 8;}
42 if (0 == (doubleword & 0x0000000F) ){ index += 4; doubleword >>= 4;}
43 if (0 == (doubleword & 0x00000003) ){ index += 2, doubleword >>= 2;}
44 if (0 == (doubleword & 0x00000001) ){ index += 1, doubleword >>= 1;}
55 uint64 time_in_increments_of_rtos_ticks_usec64;
56 uint32 time_since_last_rtos_tick_usec;
62 static float nsec_per_hw_tick = 0;
64 if (nsec_per_hw_tick == 0)
65 nsec_per_hw_tick = (float)((
float)1 / (float)( (
float)_time_get_ticks_per_sec() * (float)_time_get_hwticks_per_tick() ) );
69 _time_get_elapsed_ticks(&tick);
72 usec_per_rtos_tick = (
uint32)1000000 / (
uint32)_time_get_ticks_per_sec();
80 time_in_increments_of_rtos_ticks_usec64 = (
uint64)tick.TICKS[0] * (
uint64)usec_per_rtos_tick;
84 time_since_last_rtos_tick_usec = (
uint32)( ( (SYST_RVR - tick.HW_TICKS) * nsec_per_hw_tick) * 1000000);
87 time_usec = (
uint32)((
uint64)time_in_increments_of_rtos_ticks_usec64 + (
uint64)time_since_last_rtos_tick_usec);
104 *pDestination++ = *pSource++;
unsigned char uint8
This defines uint8 as unsigned char.
uint32 isf_time_util_get_usec(void)
This API returns the time in microseconds.
unsigned long long uint64
This defines uint64 as unsigned long long.
unsigned long uint32
This defines uint32 as unsigned long.
uint32 ff1(uint32 doubleword)
find first-in.
uint32 bitrev(uint32 doubleword)
This function reverse the bits of a double word.
The isf_types.h file contains the ISF data type definitions and some of the globally used macros...
uint32 ff1_lsb(uint32 doubleword)
find first-in form LSB.
The isf_util.h file contains the utility method declarations and macros.
void isf_mem_copy(void *src, void *dest, uint32 size)
memory copy