This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F28335中浮点数如何为转换成iq格式?这个转换函数_IQN(float F)的使用问题。

我在一子程序中定义如下:

float currenta;

currenta=(AdcRegs.ADCRESULT0>>4-2255)*0.025;

ImeasA=_IQ15(float(currenta/50)); //范围-1到1之间

要求该子程序输出 ImeasA 应为IQ15 格式(头文件中有定义),采用_IQN(float F)将浮点型转换为IQ15格式,报出以下错误:

Description Resource Path Location Type expected an expression 

请问各位老师,浮点数如何为转换成需要的iq格式呢?