This repository has been archived on 2025-04-28. You can view files and clone it, but cannot push or open issues or pull requests.
CMS3in1/2.Blade/4.MISC/温度检测/max31865/main.c

35 lines
812 B
C

/***********************************************
调用方式:无
返回值:
函数说明:主函数
************************************************/
int main(void)
{
Bsp_init();//初始化板载程序
while(1)
{
Get_RTCSencod();
//float temp = MAX31865_GetTemp();//软件模拟spi读取max31865合成温度
float temp = Get_Hardware_SPI_Temp();//硬件spi读取max31865合成温度
if(isReadTemp == 1 && isShowShell == 1){
#if 0
if(SysRTC_Secondflag == 1){
SysRTC_Secondflag = 0;
printf("%02d:%02d:%02d",THH, TMM, TSS);
printf("temp=%.2f\r\n",temp);
LED_Light();
#endif
#if 1
if(SysRTC_Secondflag == 1){
SysRTC_Secondflag = 0;
printf("%02d:%02d:%02d",THH, TMM, TSS);
printf("temp=%.2f\r\n",temp);
LED_Light();
//delay_ms(100);
}
#endif
}
}
}