| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- #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"
- // 毫秒计时器
- //extern uint32_t Timer_Ms;
- uint8_t mode = 0;
- 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("1234\r\n");
- // Log_Printf_Debug("regist_device_flag%d\r\n",regist_device_flag);
- // GPIO_SetBits(WAKE_GPIO, WAKE_GPIO_Pin);
- // bc260y.exit_sleep();
- // delay_ms(100);
- // bc260y.reset();
- // Log_Printf_Debug("123456\r\n");
- // bc260y.query_sleep_sync(&mode);
- // bc260y.query_sleep_sync(&mode);
- // bc260y.set_cfun_sync(1);//设置全功能模式
- // bc260y.set_cgreg_sync(2);//设置网络状态
- // bc260y.enter_sleep();
- // delay_ms(100);
- // bc260y.reset();
- // test_encaes128();
- while(1)
- {
- // 循环执行udp客户端OLED_ShowNum
- OLED_ShowNum(1, 4, time_get_delay(&timer), 6);
-
- // pump_business_loop_execution();
-
-
-
- }
-
- }
|