浏览代码

去除main.c和CONFIG.h的版本控制

龙三郎 1 年之前
父节点
当前提交
947c61c598
共有 5 个文件被更改,包括 5 次插入146 次删除
  1. 1 0
      Drivers/.gitignore
  2. 0 44
      Drivers/CONFIG.h
  3. 3 3
      Drivers/Modules/Tuoreniot.c
  4. 1 0
      User/.gitignore
  5. 0 99
      User/main.c

+ 1 - 0
Drivers/.gitignore

@@ -0,0 +1 @@
+/CONFIG.h

+ 0 - 44
Drivers/CONFIG.h

@@ -1,44 +0,0 @@
-#ifndef __CONFIG_H
-#define __CONFIG_H
-#include <stdint.h>
-
-
-#define DEBUG 1 // Debug开关 1是开,0是关
-
-// 测试环境
-#define TEST_ENV 1
-// 生产环境
-//#define PROD_ENV 1
-
-
-
-//#define EC800M 1 //4G开关,不能数字开头
-#define BC260Y 1  // NB
-
-
-
-
-// 何龙祥的配置
-//睡眠相关IO配置 
-#define WAKE_GPIO_RCC RCC_APB2Periph_GPIOA
-#define WAKE_GPIO GPIOA
-#define WAKE_GPIO_Pin GPIO_Pin_6 // 睡眠的引脚
-//flash相关配置
-#define FLASH_SIZE 64
-#define FLASH_SAVE_ADDR 0X0800F800
-
-
-
-
-
-// 刘艳斌的配置
-//睡眠相关IO配置
-//#define WAKE_GPIO_RCC RCC_APB2Periph_GPIOE
-//#define WAKE_GPIO GPIOE
-//#define WAKE_GPIO_Pin GPIO_Pin_5 // 睡眠的引脚
-////flash相关配置
-//#define FLASH_SIZE 512
-//#define SAVE_ADDR 0X0807E000
-
-
-#endif

+ 3 - 3
Drivers/Modules/Tuoreniot.c

@@ -90,9 +90,9 @@ uint8_t TUORENIOT_AnalysisRegistData(uint8_t * regist_data, uint16_t regist_data
 	{
 		regist_response.code = cJSON_GetObjectItem(json, "code")->valueint;
 		regist_response.version = cJSON_GetObjectItem(json, "version")->valueint;
-		regist_response.userId = cJSON_GetObjectItem(json, "userId")->valueint;
-		strcpy(regist_response.networkProtocol, cJSON_GetObjectItem(json, "networkProtocol")->valuestring);
-		strcpy(regist_response.platform, cJSON_GetObjectItem(json, "platform")->valuestring);
+//		regist_response.userId = cJSON_GetObjectItem(json, "userId")->valueint;
+//		strcpy(regist_response.networkProtocol, cJSON_GetObjectItem(json, "networkProtocol")->valuestring);
+//		strcpy(regist_response.platform, cJSON_GetObjectItem(json, "platform")->valuestring);
 		strcpy(regist_response.deviceSecret, cJSON_GetObjectItem(json, "deviceSecret")->valuestring);
 		strcpy(regist_response.productId, cJSON_GetObjectItem(json, "productId")->valuestring);
 		strcpy(regist_response.deviceId, cJSON_GetObjectItem(json, "deviceId")->valuestring);

+ 1 - 0
User/.gitignore

@@ -0,0 +1 @@
+/main.c

+ 0 - 99
User/main.c

@@ -1,99 +0,0 @@
-#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 "Common_Util.h"
-
-#include "Timer_Module.h"
-#include "Log_Module.h"
-
-#include "Tuoreniot.h"
-
-#include "bc260y.h"
-#include "At_Module.h"
-
-// 6365736869303036
-uint8_t mcu_id[8] = "ceshi006";
-
-// 计时器
-static struct TIMER_Struct timer;
-
-static uint8_t regist_flag = 0;
-
-char ch[30] = "11111111111111111111111111111";
-
-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");
-	
-	bytesToHex(ch, mcu_id, sizeof(mcu_id));
-	
-	
-	// 通讯流程初始化
-	PUMPBUSINESS_Init();
-	
-	while(1)
-	{
-		// 循环执行udp客户端OLED_ShowNum
-		OLED_ShowNum(1, 4, time_get_delay(&timer), 6);
-		if(time_get_delay(&timer) > 60 * 1000)
-		{
-			time_clear(&timer);
-		}
-		
-		
-		// 注册接口使用方法
-		if(regist_flag == 0)
-		{
-			if(TUORENIOT_GetCodeOfRegistResponse() != 200)
-			{
-				Log_Printf_Debug("开始注册\r\n");
-				// 开始注册
-				REGIST_Start();
-			}
-			else
-			{
-				Log_Printf_Debug("已注册\r\n");
-			}
-			regist_flag = 1;
-		}
-		
-		
-			
-		
-		
-		
-		// 通讯流程处理
-		PUMPBUSINESS_ProcessHandle();
-		
-		
-		
-	}
-	
-}
-
-