#pragma DATA_SECTION(current,"CpuToCla1MsgRAM");
volatile float current;
#pragma DATA_SECTION(power,"ClaDataRam0");
volatile float power;
__interrupt void Cla1Task1 ( void )
{
float fi;//此处是否可以定义局部变量?
fi = current*current;
power = 1.015 * 58 * fi;
}
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.
#pragma DATA_SECTION(current,"CpuToCla1MsgRAM");
volatile float current;
#pragma DATA_SECTION(power,"ClaDataRam0");
volatile float power;
__interrupt void Cla1Task1 ( void )
{
float fi;//此处是否可以定义局部变量?
fi = current*current;
power = 1.015 * 58 * fi;
}