I am trying to decipher someone else's code (story of my life). I am from the microprocessor world(PowerPC/StrongARM/ARM) and also doing fixed point math convolutions for the first time so bear with me.
This is for an ATXMega128 compiled on IAR compiler
I do not understand the multiple casts in the macros below:
integerToFixedPoint(x)
((unsigned long int)((unsigned long int)(x) << 6U))
fixedpointToInteger(x)
(unsigned short int)(unsigned long int)(x) >> 6U))
This is for an ATXMega128 compiled on IAR compiler
I do not understand the multiple casts in the macros below:
integerToFixedPoint(x)
((unsigned long int)((unsigned long int)(x) << 6U))
fixedpointToInteger(x)
(unsigned short int)(unsigned long int)(x) >> 6U))