請問CH32V208在使用log時候報(bào)錯如何處理,已經(jīng)調(diào)用math.h
const? float K=273.15;
const? float? T2=K+25;
const? float B=3950.0;
const? float R25=100.0; //100k熱敏電阻
////https://blog.csdn.net/freemote/article/details/120350187
float Get_Temp(float Rntc)
{
? ? float T1,Temp;
? ? T1=1/((log(Rntc/R25))/B+1/T2);? ? ? ??
//? ? printf("T1=%f\r\n",T1);
? ? Temp=T1-K;
//? ? printf("Temp=%f\r\n",Temp);
? ? return Temp;
}
熱門產(chǎn)品 :
CH641: PD及無線充電專用MCU