| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- #include <string.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include "stm32f10x.h"
- #include "Timer.h"
- #include "GPIOA.h"
- #include "sys.h"
- #include "Usart1.h"
- #include "Usart2.h"
- #include "Regist.h"
- #include "PumpBusiness.h"
- #include "AT.h"
- #include "bc260.h"
- #include "sys.h"
- #include "CONFIG.h"
- #include "mbedtls_util.h"
- // 毫秒计时器
- //extern uint32_t Timer_Ms;
- uint8_t mode = 0;
- int main(void)
- {
- // uint8_t memmem_flag = 0;
- Timer_Init();//定时器
- Usart1_Init();//打印串口
- Usart2_Init();//4G模块通信
- GPIOA_Init();//4G模块DTR IO口
-
- // uint8_t restult1[13] = "\0\0\0\0\0\0RDY\0\0\0\0";
- // uint8_t rdytest[5]="RDY";
- // memmem_flag=memmem(restult1,13,rdytest,4);
- Log_Printf_Debug("1234\r\n");
- //注册设备,最多失败三次
-
- regist_device();
- 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)
- {
- //AT_Handle();
- // 循环执行udp客户端
-
- pump_business_loop_execution();
-
-
-
- }
-
- }
|