3.11.12 Q14_RIGHT_SHIFT Macro

C

#define   Q14_RIGHT_SHIFT( x, y)   (int16_t)( x  >> y )

Summary

Performs right bit shift operation on a Q14 fixed-point format value.

Description

This macro performs right bit shift operation on a Q14 fixed-point format value.

Example

int16_t a = 0x4000;  // Example Q14 value 
int16_t result = Q14_RIGHT_SHIFT(a, 2); // Shift right by 2 bits  
    

Remarks

None