| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #include <string.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include "stm32f10x.h"
- #include "Timer.h"
- #include "OLED.h"
- #include "GPIOA.h"
- #include "Usart1.h"
- #include "Usart2.h"
- #include "Regist.h"
- #include "PumpBusiness.h"
- #include "CONFIG.h"
- #include "mbedtls_util.h"
- #include "Timer_Module.h"
- #include "Log_Module.h"
- #include "Tuoreniot.h"
- // 计时器
- static struct TIMER_Struct timer;
- int main(void)
- {
- // uint8_t memmem_flag = 0;
- Timer_Init();//定时器
- Usart1_Init();//打印串口
- Usart2_Init();//4G模块通信
- GPIOA_Init();//4G模块DTR IO口
-
- OLED_Init();
- OLED_Clear();
- OLED_ShowString(1, 1, "MS:");
-
- Log_Printf_Debug("1234\r\n");
-
- //注册设备,最多失败三次
-
- regist_device_sync();
-
- Log_Printf_Debug("注册结束\r\n");
-
- while(1)
- {
- // 循环执行udp客户端OLED_ShowNum
- OLED_ShowNum(1, 4, time_get_delay(&timer), 6);
-
- if(time_get_delay(&timer) > 60 * 1000)
- {
- time_clear(&timer);
- }
-
- pump_business_loop_execution();
-
-
-
- }
-
- }
|