Commit ad0e6a3c by zhanggf

[Cyton] 500hz wifi debug ok.

Signed-off-by: zhanggf <zhanggf@example.com>
parent d272b692
Output/*
*.o
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
"esp8266.h": "c", "esp8266.h": "c",
"usart.h": "c", "usart.h": "c",
"cyton_process.h": "c", "cyton_process.h": "c",
"cyton_datapkg.h": "c" "cyton_datapkg.h": "c",
"ADS129x.C": "cpp",
"ADS129x.H": "cpp"
} }
} }
\ No newline at end of file
...@@ -30,7 +30,7 @@ _ADS129x_info ADS129x_info;//芯片结构 ...@@ -30,7 +30,7 @@ _ADS129x_info ADS129x_info;//芯片结构
#if ADS129X_DEVICE == ADS1299 #if ADS129X_DEVICE == ADS1299
u8 ADS129x_REG_BUF[ADS129X_REGNUM]={ //ads129x寄存器数组 u8 ADS129x_REG_BUF[ADS129X_REGNUM]={ //ads129x寄存器数组
0x3e,//ID ads1299 xx11 1110 0x3e,//ID ads1299 xx11 1110
0xD5,//CONFIG1 1101 0110 关CLK时钟输出 0Xn1 8KSPS 0Xn2 4K 0Xn3 2K 0Xn4 1K 0Xn5 500SPS 0Xn6 250SPS 0xD5,//CONFIG1 1101 0110 关CLK时钟输出 0Xn1 8KSPS 0XD2 4K 0XD3 2K 0XD4 1K 0XD5 500SPS 0XD6 250SPS
0xD0,//CONFIG2 1101 0000 方波幅值(VREFP–VREFN)/2400=±3.75mV 增益24 实际测到的电压±90mV 权值 4500000uV/8838606 = 0.537uV 0xD0,//CONFIG2 1101 0000 方波幅值(VREFP–VREFN)/2400=±3.75mV 增益24 实际测到的电压±90mV 权值 4500000uV/8838606 = 0.537uV
0xEC,//CONFIG3 1110 110x 开内部基准电压4.5V 开右腿驱动放大器, ,内部1/2vref基准,关闭右腿测量和右腿导联脱落检测 0xEC,//CONFIG3 1110 110x 开内部基准电压4.5V 开右腿驱动放大器, ,内部1/2vref基准,关闭右腿测量和右腿导联脱落检测
0x00,//LOFF //关闭导联脱落检测相关 0x00,//LOFF //关闭导联脱落检测相关
...@@ -215,9 +215,11 @@ void ADS129x_GPIO_Init(void) ...@@ -215,9 +215,11 @@ void ADS129x_GPIO_Init(void)
ADS129X_RST=1; //取消复位 ADS129X_RST=1; //取消复位
} }
int iIndex = 0;
void EXTI0_IRQHandler(void) void EXTI0_IRQHandler(void)
{ {
int iRet = -3;
if( EXTI->IMR&ADS129X_DRDY_LINE && ADS129X_DRDY==0)//数据接收中断 if( EXTI->IMR&ADS129X_DRDY_LINE && ADS129X_DRDY==0)//数据接收中断
{ {
//__disable_irq(); //__disable_irq();
...@@ -234,9 +236,10 @@ void EXTI0_IRQHandler(void) ...@@ -234,9 +236,10 @@ void EXTI0_IRQHandler(void)
} }
else if(work_state == SEND_WIFI ) else if(work_state == SEND_WIFI )
{ {
if(queue_data_push(WIFI_Info->WIFI_Queue ,ADS129x_info.ads129x_Cache+3 ,ADS129x_info.Ads129x_Data_Move,ADS129x_info.Ads129x_Write_Num))
{ iRet = queue_data_push(WIFI_Info->WIFI_Queue ,ADS129x_info.ads129x_Cache+3 ,ADS129x_info.Ads129x_Data_Move,ADS129x_info.Ads129x_Write_Num);
if(iRet) {
} }
} }
// else if(work_state == WRITE_TF ) // else if(work_state == WRITE_TF )
...@@ -247,6 +250,7 @@ void EXTI0_IRQHandler(void) ...@@ -247,6 +250,7 @@ void EXTI0_IRQHandler(void)
{ {
} }
///////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////
EXTI_ClearITPendingBit(ADS129X_DRDY_LINE); //清除LINE上的中断标志位 EXTI_ClearITPendingBit(ADS129X_DRDY_LINE); //清除LINE上的中断标志位
//__enable_irq(); //__enable_irq();
...@@ -404,11 +408,24 @@ u8 ADS129x_REG_Init(void) ...@@ -404,11 +408,24 @@ u8 ADS129x_REG_Init(void)
} }
static g_szADS129x_Hz[ADS129X_CMD_UNKNOWN] = {
//0XD1 8KSPS 0XD2 4K 0XD3 2K 0XD4 1K 0XD5 500SPS 0XD6 250SPS
0xD6, 0xD5, 0xD4, 0xD3, 0xD2, 0XD1
};
static uint8_t aDS129x_getHz(int iHz)
{
if (iHz >= ADS129X_CMD_UNKNOWN) {
iHz = ADS129X_CMD_8000HZ;
}
return g_szADS129x_Hz[iHz];
}
//初始化 //初始化
//输入cmd: 0蓝牙或串口发送 / 1 wifi发送/ 2 TF卡存储 //输入cmd: 0蓝牙或串口发送 / 1 wifi发送/ 2 TF卡存储
void ADS129x_ReInit(u8 cmd) void ADS129x_ReInit(u8 cmd, int iHz)
{ {
u8 res; u8 res;
u8 RL_temp=0; u8 RL_temp=0;
...@@ -422,6 +439,13 @@ void ADS129x_ReInit(u8 cmd) ...@@ -422,6 +439,13 @@ void ADS129x_ReInit(u8 cmd)
ADS129x_REG_BUF[13] = RL_temp; //设置右腿驱动 ADS129x_REG_BUF[13] = RL_temp; //设置右腿驱动
ADS129x_REG_BUF[14] = RL_temp; ADS129x_REG_BUF[14] = RL_temp;
//初始化129X
#if ADS129X_DEVICE == ADS1299
ADS129x_REG_BUF[1]= aDS129x_getHz(iHz); //1000采样率
#elif ADS129X_DEVICE == ADS1298
ADS129x_REG_BUF[1]=0x85; //1000采样率
#endif
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
while(ADS129x_REG_Init())//初始化寄存器 while(ADS129x_REG_Init())//初始化寄存器
{ {
...@@ -455,10 +479,14 @@ void ADS129x_ReInit(u8 cmd) ...@@ -455,10 +479,14 @@ void ADS129x_ReInit(u8 cmd)
//ADS129x_info.Ads129x_Write_Num = SD_QUEUE_LENGTH/ADS129x_info.Ads129x_Data_Move ; //搬运N次做一个包 //ADS129x_info.Ads129x_Write_Num = SD_QUEUE_LENGTH/ADS129x_info.Ads129x_Data_Move ; //搬运N次做一个包
//Main_printf("搬运 %d 次做一个包\r\n",ADS129x_info.Ads129x_Write_Num); //Main_printf("搬运 %d 次做一个包\r\n",ADS129x_info.Ads129x_Write_Num);
} }
}
EXTI->IMR |= ADS129X_DRDY_LINE;//开DRDY中断
}
void ADS129x_Stop()
{
ADS129x_Send_CMD(ADS129X_STOP);
}
/*功能:把采到的3个字节转成有符号32位数 */ /*功能:把采到的3个字节转成有符号32位数 */
s32 get_volt(u32 num) s32 get_volt(u32 num)
......
...@@ -103,9 +103,20 @@ extern u8 ADS129x_REG_BUF[ADS129X_REGNUM];//ads1299寄存器数组 ...@@ -103,9 +103,20 @@ extern u8 ADS129x_REG_BUF[ADS129X_REGNUM];//ads1299寄存器数组
///////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////
s32 get_volt(u32 num);//把采到的3个字节转成有符号32位数 s32 get_volt(u32 num);//把采到的3个字节转成有符号32位数
typedef enum tagAds129x_Cmd_Hz {
ADS129X_CMD_250HZ = 0,
ADS129X_CMD_500HZ,
ADS129X_CMD_1000HZ,
ADS129X_CMD_2000HZ,
ADS129X_CMD_4000HZ,
ADS129X_CMD_8000HZ,
ADS129X_CMD_UNKNOWN,
} ADS129X_CMD_HZ_E;
void ADS129x_GPIO_Init(void); //初始化ADS1292引脚 void ADS129x_GPIO_Init(void); //初始化ADS1292引脚
void ADS129x_ReInit(u8 cmd);//重复初始化 void ADS129x_ReInit(u8 cmd, int iHz);//重复初始化
u8 ADS129x_SPI_ReadWriteByte(u8 com); //SPI通信 u8 ADS129x_SPI_ReadWriteByte(u8 com); //SPI通信
void ADS129x_Stop();
__INLINE void ADS129x_Read_Data(void);//72M时钟下函数耗时大约10us 8M时钟下 函数耗时大约 100us __INLINE void ADS129x_Read_Data(void);//72M时钟下函数耗时大约10us 8M时钟下 函数耗时大约 100us
......
...@@ -264,6 +264,11 @@ int CytonEsp12_StreamStat() ...@@ -264,6 +264,11 @@ int CytonEsp12_StreamStat()
return g_stCytron_DevSeting.aucStreamStat; return g_stCytron_DevSeting.aucStreamStat;
} }
void CytonEsp12_SetStreamStat(int iStat)
{
g_stCytron_DevSeting.aucStreamStat = iStat;
}
int CytonEsp12_GetCurrentRate() int CytonEsp12_GetCurrentRate()
{ {
int iRate = g_stCytron_DevSeting.aucRate; int iRate = g_stCytron_DevSeting.aucRate;
......
...@@ -30,5 +30,6 @@ void Ctron_Esp12Data_Send(int iFd, uint8_t *szData, int iLen, int iClose); ...@@ -30,5 +30,6 @@ void Ctron_Esp12Data_Send(int iFd, uint8_t *szData, int iLen, int iClose);
int CytonEsp12_DataGetReportFd(); int CytonEsp12_DataGetReportFd();
int CytonEsp12_StreamStat(); int CytonEsp12_StreamStat();
int CytonEsp12_GetCurrentRate(); int CytonEsp12_GetCurrentRate();
void CytonEsp12_SetStreamStat(int iStat);
#endif #endif
...@@ -12,7 +12,10 @@ ...@@ -12,7 +12,10 @@
#include "myQueue.h" #include "myQueue.h"
#define CYTON_COLLECTOR_DATA_CACHE_LEN (4096) #define CYTON_COLLECTOR_DATA_CACHE_LEN (123)
static int g_iTimerindex = 0;
static int g_iTotalLen = 0;
typedef struct stCyton_DataCacheInfo { typedef struct stCyton_DataCacheInfo {
uint8_t DataCache[CYTON_COLLECTOR_DATA_CACHE_LEN + 1]; uint8_t DataCache[CYTON_COLLECTOR_DATA_CACHE_LEN + 1];
...@@ -69,6 +72,7 @@ void CytonProcess_TimerCollCB(int iTIndex) ...@@ -69,6 +72,7 @@ void CytonProcess_TimerCollCB(int iTIndex)
{ {
int iRet = 0; int iRet = 0;
uint32_t puiChannel[8]; uint32_t puiChannel[8];
g_iTimerindex = iTIndex;
//ESP8266_DEBUG("CytonProcess_TimerCollCB %d\n", iTIndex); //ESP8266_DEBUG("CytonProcess_TimerCollCB %d\n", iTIndex);
iRet = Cyton_DataFormat2Package(&g_stCyton_DataCache.DataCache[g_stCyton_DataCache.iWriteIndex], puiChannel, CYTON_DATA_PKG_CHANNEL8); iRet = Cyton_DataFormat2Package(&g_stCyton_DataCache.DataCache[g_stCyton_DataCache.iWriteIndex], puiChannel, CYTON_DATA_PKG_CHANNEL8);
...@@ -107,13 +111,18 @@ void CytonProcess_Loop() ...@@ -107,13 +111,18 @@ void CytonProcess_Loop()
iFd = CytonEsp12_DataGetReportFd(); iFd = CytonEsp12_DataGetReportFd();
iStreamStat = CytonEsp12_StreamStat(); iStreamStat = CytonEsp12_StreamStat();
if (iFd >= 0 && iStreamStat) { if (iStreamStat) {
pszSendBuf = cyton_getUnsendData(&iSendBufLen); pszSendBuf = cyton_getUnsendData(&iSendBufLen);
if (NULL != pszSendBuf) { if (NULL != pszSendBuf) {
ESP8266_DEBUG("Start Report Data %d\n", iSendBufLen); g_iTotalLen += iSendBufLen;
Ctron_Esp12Data_Send(iFd, pszSendBuf, iSendBufLen, 0); ESP8266_SendData(pszSendBuf, iSendBufLen);
ESP8266_DEBUG("Start Report Data End\n"); // ESP8266_SendData(iFd, pszSendBuf, iSendBufLen, 0);
ESP8266_DEBUG("Start Report Data iSendBufLen %d\n", iSendBufLen);
cyton_setSendDataDone(iSendBufLen); cyton_setSendDataDone(iSendBufLen);
} }
if (g_iTimerindex % 1000 == 0) {
ESP8266_DEBUG("Start Report total %d\n", g_iTotalLen);
}
} }
} }
\ No newline at end of file
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cyton_cmd_pub.h"
#include "cJSON.h"
#ifdef ESP_8266
typedef struct stCytron_DevSeting {
unsigned char aucRate;
unsigned char aucStreamStat;
} CYTON_DEVSETING_T;
static CYTON_DEVSETING_T g_stCytron_DevSeting;
static int g_iOpenguiPort = -1;
static char g_szOpenguiIP[16] = {0};
static char g_szCmdBuf[64] = {0};
#define toNet32(A) ((( (unsigned int)(A) & 0xff000000) >> 24) | \
(( (unsigned int)(A) & 0x00ff0000) >> 8) | \
(( (unsigned int)(A) & 0x0000ff00) << 8) | \
(( (unsigned int)(A) & 0x000000ff) << 24))
static int Ctron_atoi(char *szData, int iLen)
{
//0,11:123456711
unsigned char szTmp[4] = {0};
if (iLen > 4) {
return -1;
}
strncpy((char *)szTmp, (char *)szData, iLen);
return atoi((char *)szTmp);
}
int Cyton_GetCurrentRate(int iRate)
{
int iRet = 1000;
switch(iRate) {
case 0:
iRet = 16000;
break;
case 1:
iRet = 8000;
break;
case 2:
iRet = 4000;
break;
case 3:
iRet = 2000;
break;
case 4:
iRet = 1000;
break;
case 5:
iRet = 500;
case 6:
iRet = 250;
break;
default:
break;
}
return iRet;
}
/*
A = 5MIN
S = 15MIN
F = 30MIN
G = 1HR
H = 2HR
J = 4HR
K = 12HR
L = 24HR
*/
static int ctron_GetRate(char *szData, int iLen)
{
char *pszIndex = NULL;
int iRate = 0;
int iRateHz = 0;
int iSDSec = -1;
pszIndex = strstr((char *)szData, "~");
if (NULL != pszIndex) {
iRate = Ctron_atoi(pszIndex + 1, 1);
iRateHz = Cyton_GetCurrentRate(iRate);
return CytonCmd_Pkg(CYTON_CMD_HZ, iRateHz, 0);
} else {
switch (*szData) {
case 'A':
iSDSec = 60 * 5;
break;
case 'S':
iSDSec = 60 * 15;
break;
case 'F':
iSDSec = 60 * 30;
break;
case 'G':
iSDSec = 60 * 60;
break;
case 'H':
iSDSec = 60 * 60 *2;
break;
case 'J':
iSDSec = 60 * 60 * 4;
break;
case 'K':
iSDSec = 60 * 60 * 12;
break;
case 'L':
iSDSec = 60 * 60 * 24;
break;
}
if (iSDSec > 0) {
return CytonCmd_Pkg(CYTON_CMD_SD, iSDSec, 0);
}
}
return -1;
}
int CytonCmd_PraseTcpJson(char *szData, int iLen)
{
//{"connected":true,"delimiter":true,"ip":"192.168.4.2","output":"raw","port":6677,"latency":10000}
cJSON *cjson_data;
cJSON *cjson_str;
int iRet = -1;
char *pszIndex = 0;
pszIndex = strstr((const char *)szData, "{");
if (NULL == pszIndex) {
printf("\r\ntcp json prase failed1111111111: %s\n", szData);
return -1;
}
cjson_data = cJSON_Parse(pszIndex);
if (cjson_data) {
cjson_str = cJSON_GetObjectItem(cjson_data,"ip");
if (cjson_str) {
sprintf(g_szOpenguiIP, "%s", cjson_str->valuestring);
printf("TCP Json g_szOpenguiIP %s\n", g_szOpenguiIP);
}
cjson_str = cJSON_GetObjectItem(cjson_data,"port");
if (cjson_str) {
g_iOpenguiPort = cjson_str->valueint;
printf("TCP Json g_iOpenguiPort %d\n", g_iOpenguiPort);
}
cjson_str = cJSON_GetObjectItem(cjson_data,"command");
if (cjson_str) {
iRet = ctron_GetRate(cjson_str->valuestring, strlen(cjson_str->valuestring));
if (iRet >= 0) {
g_stCytron_DevSeting.aucRate = iRet;
printf("TCP Json g_stCytron_DevSeting.aucRate %d\n", g_stCytron_DevSeting.aucRate);
}
}
printf("Test111");
cJSON_Delete(cjson_data);
printf("Test222");
return 0;
}
return -1;
}
int CytonCmd_Pkg(unsigned int uiCmd, unsigned int uiParam1, unsigned int uiParam2)
{
CYTON_CMD_INFO_T *pstInfo= (CYTON_CMD_INFO_T *)g_szCmdBuf;
pstInfo->uiHead = toNet32(CYTON_CMD_HEAD);
pstInfo->iType = toNet32(uiCmd);
pstInfo->uiParam1 = toNet32(uiParam1);
pstInfo->uiParam2 = toNet32(uiParam2);
return sizeof(CYTON_CMD_INFO_T);
}
char *CytonCmd_GetServerIp()
{
return g_szOpenguiIP;
}
int CytonCmd_GetServerPort()
{
return g_iOpenguiPort;
}
char *CytonCmd_PkgData(int *iLen)
{
*iLen = sizeof(CYTON_CMD_INFO_T);
return g_szCmdBuf;
}
#endif
\ No newline at end of file
#ifndef __CYTON_CMD_PUB_H
#define __CYTON_CMD_PUB_H
#define CYTON_CMD_HEAD (0xfffffffe)
typedef enum tagCytonCmd_Type {
CYTON_CMD_START = 0,
CYTON_CMD_STOP,
CYTON_CMD_HZ,
CYTON_CMD_SD,
CYTON_CMD_UNKNOW, /* -5 Read data error */
} CYTON_CMD_TYPE_E;
#pragma pack(push)
#pragma pack(1)
typedef struct stCytonCmd_Head{
unsigned int uiHead;
unsigned int iType;
unsigned int uiParam1;
unsigned int uiParam2;
} CYTON_CMD_INFO_T;
#pragma pack(pop)
int CytonCmd_Pkg(unsigned int uiCmd, unsigned int uiParam1, unsigned int uiParam2);
int CytonCmd_PraseTcpJson(char *szData, int iLen);
char *CytonCmd_GetServerIp();
int CytonCmd_GetServerPort();
char *CytonCmd_PkgData(int *iLen);
#endif
\ No newline at end of file
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "Cyton_Esp12Data.h" #include "Cyton_Esp12Data.h"
#include "myQueue.h" #include "myQueue.h"
#include "cyton_cmd_pub.h"
...@@ -28,17 +29,17 @@ u8 Wifi_Sendbuf_Init(void) ...@@ -28,17 +29,17 @@ u8 Wifi_Sendbuf_Init(void)
{ {
u16 i; u16 i;
WIFI_Info->datalength = (ADS129X_USE_CANNLE+1)*4 +3;//一次采样要发送的数据长度 39 WIFI_Info->datalength = ADS129X_USE_CANNLE * 3 + 9;//一次采样要发送的数据长度 39
memset(WIFI_Info->sendbuf,0,WIFI_SEND_LENGTH);//清零 memset(WIFI_Info->sendbuf, 0, WIFI_SEND_LENGTH);//清零
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//匿名上位机协议 //匿名上位机协议
for(i=0;i<ADS129x_info.Ads129x_Write_Num;i++) //一包N次采样 for(i=0;i<ADS129x_info.Ads129x_Write_Num;i++) //一包N次采样
{ {
//帧头 //帧头
WIFI_Info->sendbuf[0 + WIFI_Info->datalength*i] = 0xAA; WIFI_Info->sendbuf[0 + WIFI_Info->datalength*i] = 0xA0;
WIFI_Info->sendbuf[1 + WIFI_Info->datalength*i] = 0xFF; //WIFI_Info->sendbuf[1 + WIFI_Info->datalength*i] = 0xFF;
WIFI_Info->sendbuf[2 + WIFI_Info->datalength*i] = 0xF1; //WIFI_Info->sendbuf[2 + WIFI_Info->datalength*i] = 0xF1;
WIFI_Info->sendbuf[3 + WIFI_Info->datalength*i] = ADS129X_USE_CANNLE*4 +1; //有效数据长度 32 +1 = 33 //WIFI_Info->sendbuf[3 + WIFI_Info->datalength*i] = ADS129X_USE_CANNLE*4 +1; //有效数据长度 32 +1 = 33
} }
...@@ -272,37 +273,66 @@ void ESP8266_out_Cmd(void) ...@@ -272,37 +273,66 @@ void ESP8266_out_Cmd(void)
void ESP8266_Config_Http_connectTcp(void); void ESP8266_Config_Http_connectTcp(void);
#define toNet32(A) ((( (unsigned int)(A) & 0xff000000) >> 24)|(( (unsigned int)(A) & 0x00ff0000) >> 8)|(( (unsigned int)(A) & 0x0000ff00) << 8)|(( (unsigned int)(A) & 0x000000ff) << 24))
int g_iHz = 0;
void Cyton_UartPraseLoop()
{
//ESP8266_RX_BUF, ESP8266_RX_LEN,//
CYTON_CMD_INFO_T *pstCmdInfo = NULL;
char *pszIndex = ESP8266_RX_BUF;
int iLen = ESP8266_RX_LEN;
while (iLen > 0) {
if (iLen >= sizeof(CYTON_CMD_INFO_T)) {
pstCmdInfo = (CYTON_CMD_INFO_T *) pszIndex;
if (CYTON_CMD_HEAD == toNet32(pstCmdInfo->uiHead)) {
ESP8266_DEBUG("Fine cmd %08x\r\n", toNet32(pstCmdInfo->iType));
ESP8266_DEBUG("Fine p1 %08x\r\n", toNet32(pstCmdInfo->uiParam1));
ESP8266_DEBUG("Fine p2 %08x\r\n", toNet32(pstCmdInfo->uiParam2));
if (toNet32(pstCmdInfo->iType) == CYTON_CMD_HZ) {
g_iHz = toNet32(pstCmdInfo->uiParam1);
ESP8266_DEBUG("g_iHz %d\r\n", g_iHz);
} else if (toNet32(pstCmdInfo->iType) == CYTON_CMD_START) {
ESP8266_DEBUG("Start collector %d Hz\r\n", g_iHz);
//CytonProcess_TimerCollStart(g_iHz);
ADS129x_ReInit(1, 1);
CytonEsp12_SetStreamStat(1);
} else if (toNet32(pstCmdInfo->iType) == CYTON_CMD_STOP) {
ESP8266_DEBUG("Stop collector\r\n");
CytonEsp12_SetStreamStat(0);
ADS129x_Stop();
//CytonProcess_TimerCollStop();
}
ESP8266_CLEAR();
}
} else {
break;
}
pszIndex ++;
iLen --;
}
//ESP8266_CLEAR();
}
void ESP8266_Init(void) void ESP8266_Init(void)
{ {
//ESP8266_PWOEROFF;
//delay_ms(200);
ESP8266_PWOERON; ESP8266_PWOERON;
delay_s(2); delay_s(2);
// ESP8266_RST=0;
// delay_ms(500);
// ESP8266_RST=1;
// delay_ms(500);
ESP8266_DEBUG("进入AT指令模式1111\r\n"); ESP8266_DEBUG("进入AT指令模式1111\r\n");
ESP8266_DEBUG("默认波特率 %d\r\n",ESP_BAUD); ESP8266_DEBUG("默认波特率 %d\r\n",ESP_BAUD);
ESP8266_uart_init(ESP_BAUD); ESP8266_uart_init(ESP_BAUD);
ESP8266_SendCmd("+++", "OK", 1200);//退出透传 delay_s(2);
if(ESP8266_SendCmd(AT, "OK", 500) >= 0) //模块有效性检查
{
ESP8266_DEBUG("WIFI初始化成功\r\n");
ESP8266_SendCmd(RST, "OK", 500) ;//复位
USART_ITConfig(ESP8266_UART, USART_IT_RXNE, DISABLE);//串口接收中断
//return;
}
else
{
ESP8266_DEBUG("无响应,按照默认参数设置\r\n");
ESP8266_Config();//设置WIFI
}
ESP8266_Config_Http_connectTcp(); //while (0) {
//Cyton_UartPraseLoop();
//CytonProcess_Loop();
//delay_ms(2);
//}
} }
//串口配网 //串口配网
......
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
#define ADS129x_WIFI_REC_EN 0 //WiFi接收使能 #define ADS129x_WIFI_REC_EN 0 //WiFi接收使能
#define WIFI_REC_LENGTH 1460 //接收缓冲区 #define WIFI_REC_LENGTH 1460 //接收缓冲区
//匿名上位机 //匿名上位机
#define WIFI_SEND_LENGTH 1443 //发送缓冲区 一帧数据长度39一帧`次采样 39*37=1444 #define WIFI_SEND_LENGTH 330 //发送缓冲区 一帧数据长度39一帧`次采样 33*10 99 39*37=1444
#define WIFI_QUEUE_LENGTH 888 //(队列容量)缓冲区有效数据长度24*37=888 #define WIFI_QUEUE_LENGTH (240) //(队列容量)缓冲区有效数据长度24*3=72 24*37 888
#define WIFI_QUEUE_SIZE 10 //队列大小 #define WIFI_QUEUE_SIZE 20 //队列大小
///////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////
//发送数据格式 //发送数据格式
typedef struct { typedef struct {
...@@ -60,7 +60,7 @@ extern _WIFI_Info *WIFI_Info ; //上传数据结构 ...@@ -60,7 +60,7 @@ extern _WIFI_Info *WIFI_Info ; //上传数据结构
////#define ESP_USARTDEF "AT+UART_DEF=460800,8,1,0,0\r\n" //修改波特率 无流控 保存到flash ////#define ESP_USARTDEF "AT+UART_DEF=460800,8,1,0,0\r\n" //修改波特率 无流控 保存到flash
//#define ESP_USARTDEF "AT+UART_DEF=460800,8,1,0,1\r\n" //修改波特率 使能RTS流控 保存到flash //#define ESP_USARTDEF "AT+UART_DEF=460800,8,1,0,1\r\n" //修改波特率 使能RTS流控 保存到flash
#define ESP_BAUD 921600 //波特率 #define ESP_BAUD (460800) //(460800) //921600 //波特率
//#define ESP_USARTDEF "AT+UART_DEF=921600,8,1,0,0\r\n" //修改波特率 无流控 保存到flash //#define ESP_USARTDEF "AT+UART_DEF=921600,8,1,0,0\r\n" //修改波特率 无流控 保存到flash
#define ESP_USARTDEF "AT+UART_DEF=921600,8,1,0,1\r\n" //修改波特率 使能RTS流控 保存到flash #define ESP_USARTDEF "AT+UART_DEF=921600,8,1,0,1\r\n" //修改波特率 使能RTS流控 保存到flash
......
...@@ -127,8 +127,8 @@ void UART2_DMA_TX_NVIC_Config(u8 cmd) ...@@ -127,8 +127,8 @@ void UART2_DMA_TX_NVIC_Config(u8 cmd)
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
NVIC_InitStructure.NVIC_IRQChannel=DMA1_Channel7_IRQn; NVIC_InitStructure.NVIC_IRQChannel=DMA1_Channel7_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority=1; //抢占优先级 NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority=0; //抢占优先级
NVIC_InitStructure.NVIC_IRQChannelSubPriority=1; //子优先级 NVIC_InitStructure.NVIC_IRQChannelSubPriority=0; //子优先级
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure); NVIC_Init(&NVIC_InitStructure);
......
...@@ -48,8 +48,8 @@ void mymemset(void *s,u8 c,u32 count) ...@@ -48,8 +48,8 @@ void mymemset(void *s,u8 c,u32 count)
void mem_init(void) void mem_init(void)
{ {
mymemset(mallco_dev.memmap, 0,memtblsize*2);//内存状态表数据清零 mymemset(mallco_dev.memmap, 0,memtblsize*2);//内存状态表数据清零
mymemset(mallco_dev.membase, 0,memsize); //内存池所有数据清零 mymemset(mallco_dev.membase, 0,memsize); //内存池所有数据清零
mallco_dev.memrdy=1; //内存管理初始化OK mallco_dev.memrdy=1; //内存管理初始化OK
} }
//获取内存使用率 //获取内存使用率
//返回值:使用率(0~100) //返回值:使用率(0~100)
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
//内存参数设定. //内存参数设定.
#define MEM_BLOCK_SIZE 32 //内存块大小为32字节 #define MEM_BLOCK_SIZE 32 //内存块大小为32字节
#define MEM_MAX_SIZE 4*1024 //最大管理内存 #define MEM_MAX_SIZE 12*1024 //最大管理内存
#define MEM_ALLOC_TABLE_SIZE MEM_MAX_SIZE/MEM_BLOCK_SIZE //内存表大小 #define MEM_ALLOC_TABLE_SIZE MEM_MAX_SIZE/MEM_BLOCK_SIZE //内存表大小
......
...@@ -175,14 +175,18 @@ void USART2_IRQHandler(void) ...@@ -175,14 +175,18 @@ void USART2_IRQHandler(void)
u8 Res; u8 Res;
if(USART_GetITStatus(USART2, USART_IT_RXNE) != RESET) //接收中断(接收到的数据必须是0x0d 0x0a结尾) if(USART_GetITStatus(USART2, USART_IT_RXNE) != RESET) //接收中断(接收到的数据必须是0x0d 0x0a结尾)
{ {
USART2_TIME=0; // USART2_TIME=0;
Res = USART_ReceiveData(USART2); //读取接收到的数据 Res = USART_ReceiveData(USART2); //读取接收到的数据
USART2_RX_BUF[USART2_RX_LEN] = Res; USART2_RX_BUF[USART2_RX_LEN] = Res;
USART2_RX_LEN++; USART2_RX_LEN++;
if(USART2_RX_LEN == USART_REC_LEN) if(USART2_RX_LEN >= USART_REC_LEN) {
USART2_RX_LEN=0; USART2_RX_LEN=0;
} }
} else {
Res = USART_ReceiveData(USART2);
printf("USART2_RX_ERR\n\n");
}
} }
......
<html>
<body>
<pre>
<h1>礦ision Build Log</h1>
<h2>Tool Versions:</h2>
IDE-Version: μVision V5.13.0.0
Copyright (C) 2014 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: 1 8613051444358, 1, LIC=03C6R-KUX5V-QDMKD-8SPWS-70GQ1-3GNPG
Tool Versions:
Toolchain: MDK-ARM Standard Version: 5.13.0.0
Toolchain Path: C:\Keil_v5\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.05 update 1 (build 106)
Assembler: Armasm.exe V5.05 update 1 (build 106)
Linker/Locator: ArmLink.exe V5.05 update 1 (build 106)
Library Manager: ArmAr.exe V5.05 update 1 (build 106)
Hex Converter: FromElf.exe V5.05 update 1 (build 106)
CPU DLL: SARMCM3.DLL V5.13.0.0
Dialog DLL: DARMSTM.DLL V1.65.0.0
Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V2.0.14.0_KEIL
Dialog DLL: TARMSTM.DLL V1.64.0.0
<h2>Project:</h2>
D:\Work\Openbci\openbci_stm32\USER\PEIKI.uvprojx
Project File Date: 05/16/2022
<h2>Output:</h2>
Rebuild target 'PEIKI'
compiling core_cm3.c...
compiling system_stm32f10x.c...
compiling stm32f10x_it.c...
assembling startup_stm32f10x_md.s...
compiling misc.c...
compiling stm32f10x_gpio.c...
compiling stm32f10x_rcc.c...
compiling stm32f10x_usart.c...
compiling stm32f10x_exti.c...
compiling stm32f10x_adc.c...
compiling stm32f10x_bkp.c...
compiling stm32f10x_can.c...
compiling stm32f10x_crc.c...
compiling stm32f10x_dac.c...
compiling stm32f10x_dbgmcu.c...
compiling stm32f10x_dma.c...
compiling stm32f10x_flash.c...
compiling stm32f10x_fsmc.c...
compiling stm32f10x_i2c.c...
compiling stm32f10x_iwdg.c...
compiling stm32f10x_pwr.c...
compiling stm32f10x_rtc.c...
compiling stm32f10x_sdio.c...
compiling stm32f10x_spi.c...
compiling stm32f10x_tim.c...
compiling stm32f10x_wwdg.c...
compiling stm32f10x_cec.c...
compiling sys.c...
compiling main.c...
..\Hardware\myQueue.h(55): warning: #1-D: last line of file ends without a newline
..\Hardware\key.h(49): warning: #1295-D: Deprecated declaration KE_IO_Init - give arg types
void KE_IO_Init(); //拨码开关
..\ADS129x\ADS129x.h(171): warning: #1-D: last line of file ends without a newline
*/
..\Hardware\adc.h(37): warning: #1-D: last line of file ends without a newline
#endif
main.c(119): warning: #223-D: function "printf" declared implicitly
Main_printf("上电\r\n");
main.c(131): warning: #167-D: argument of type "volatile u16 *" is incompatible with parameter of type "u16 *"
ADC_DMA_Config(ADCConvertedValue,1);
main.c(164): warning: #223-D: function "printf" declared implicitly
Main_printf("蓝牙发送\r\n");
main.c(161): warning: #177-D: variable "j" was declared but never referenced
u16 i,j,z,k=1,res;
main.c(161): warning: #177-D: variable "z" was declared but never referenced
u16 i,j,z,k=1,res;
main.c(161): warning: #177-D: variable "k" was declared but never referenced
u16 i,j,z,k=1,res;
main.c(298): warning: #223-D: function "printf" declared implicitly
Main_printf("主串口发送\r\n");
main.c(295): warning: #177-D: variable "j" was declared but never referenced
u16 i,j,z,k=1,res;
main.c(295): warning: #177-D: variable "z" was declared but never referenced
u16 i,j,z,k=1,res;
main.c(295): warning: #177-D: variable "k" was declared but never referenced
u16 i,j,z,k=1,res;
main.c(405): warning: #223-D: function "printf" declared implicitly
Main_printf("WIFI发送\r\n");
main.c(401): warning: #177-D: variable "z" was declared but never referenced
u16 i,j,z,k=1,res;
main.c(401): warning: #177-D: variable "k" was declared but never referenced
u16 i,j,z,k=1,res;
main.c(403): warning: #177-D: variable "datanum" was declared but never referenced
u8 datanum=0;
main.c(570): warning: #1-D: last line of file ends without a newline
// USART_DMACmd(USART3,USART_DMAReq_Tx,ENABLE); //DMA
main.c: 19 warnings, 0 errors
compiling delay.c...
compiling usart.c...
..\Hardware\myQueue.h(55): warning: #1-D: last line of file ends without a newline
..\Hardware\usart.c(294): warning: #167-D: argument of type "u8 *" is incompatible with parameter of type "const char *"
USARTx_Send(USART1,(uint8_t*) cmd, strlen(cmd));
..\Hardware\usart.c(298): warning: #167-D: argument of type "u8 *" is incompatible with parameter of type "const char *"
USARTx_Send(USART2,(uint8_t*) cmd, strlen(cmd));
..\Hardware\usart.c(302): warning: #167-D: argument of type "u8 *" is incompatible with parameter of type "const char *"
USARTx_Send(USART3,(uint8_t*) cmd, strlen(cmd));
..\Hardware\usart.c(314): warning: #167-D: argument of type "const u8 *" is incompatible with parameter of type "const char *"
res = strstr((const u8 *)buf, (const u8 *)result);
..\Hardware\usart.c(314): warning: #167-D: argument of type "const u8 *" is incompatible with parameter of type "const char *"
res = strstr((const u8 *)buf, (const u8 *)result);
..\Hardware\usart.c(314): warning: #513-D: a value of type "char *" cannot be assigned to an entity of type "u8 *"
res = strstr((const u8 *)buf, (const u8 *)result);
..\Hardware\usart.c(336): warning: #167-D: argument of type "const u8 *" is incompatible with parameter of type "const char *"
res = strchr((const u8 *)buf, result);
..\Hardware\usart.c(336): warning: #513-D: a value of type "char *" cannot be assigned to an entity of type "u8 *"
res = strchr((const u8 *)buf, result);
..\Hardware\usart.c(442): warning: #1-D: last line of file ends without a newline
*/
..\Hardware\usart.c: 10 warnings, 0 errors
compiling key.c...
..\Hardware\key.h(49): warning: #1295-D: Deprecated declaration KE_IO_Init - give arg types
void KE_IO_Init(); //拨码开关
..\Hardware\myQueue.h(55): warning: #1-D: last line of file ends without a newline
..\ADS129x\ADS129x.h(171): warning: #1-D: last line of file ends without a newline
*/
..\Hardware\key.c: 3 warnings, 0 errors
compiling spi.c...
compiling Timer.c...
..\Hardware\key.h(49): warning: #1295-D: Deprecated declaration KE_IO_Init - give arg types
void KE_IO_Init(); //拨码开关
..\Hardware\adc.h(37): warning: #1-D: last line of file ends without a newline
#endif
..\Hardware\Timer.c(224): warning: #1-D: last line of file ends without a newline
..\Hardware\Timer.c: 3 warnings, 0 errors
compiling dma.c...
..\Hardware\dma.c(639): warning: #1-D: last line of file ends without a newline
//}
..\Hardware\dma.c: 1 warning, 0 errors
compiling led.c...
..\Hardware\led.c(42): warning: #1-D: last line of file ends without a newline
//同理可配置只用PB4可为普通IO口的情况。
..\Hardware\led.c: 1 warning, 0 errors
compiling malloc.c...
compiling hc05.c...
..\Hardware\myQueue.h(55): warning: #1-D: last line of file ends without a newline
..\Hardware\key.h(49): warning: #1295-D: Deprecated declaration KE_IO_Init - give arg types
void KE_IO_Init(); //拨码开关
..\Hardware\hc05.c(58): warning: #223-D: function "strlen" declared implicitly
USARTx_Send(HC05_UART,(uint8_t*) cmd, strlen(cmd));
..\Hardware\hc05.c(60): warning: #223-D: function "printf" declared implicitly
HC05_DEBUG("HC05 rsp:%s \r\n",HC05_RX_BUF);
..\Hardware\hc05.c(82): warning: #223-D: function "printf" declared implicitly
HC05_DEBUG("AT测试 ");
..\Hardware\hc05.c: 5 warnings, 0 errors
compiling ESP8266.c...
..\Hardware\myQueue.h(55): warning: #1-D: last line of file ends without a newline
..\Hardware\key.h(49): warning: #1295-D: Deprecated declaration KE_IO_Init - give arg types
void KE_IO_Init(); //拨码开关
..\ADS129x\ADS129x.h(171): warning: #1-D: last line of file ends without a newline
*/
..\Hardware\ESP8266.c(61): warning: #167-D: argument of type "u8 *" is incompatible with parameter of type "const char *"
USARTx_Send(ESP8266_UART,(uint8_t*) cmd, strlen(cmd));
..\Hardware\ESP8266.c(123): warning: #223-D: function "printf" declared implicitly
ESP8266_DEBUG("设置工作模式:STA \r\n");
..\Hardware\ESP8266.c(206): warning: #223-D: function "printf" declared implicitly
ESP8266_DEBUG("进入AT指令模式\r\n");
..\Hardware\ESP8266.c(253): warning: #223-D: function "printf" declared implicitly
ESP8266_DEBUG("退出AT指令模式\r\n");
..\Hardware\ESP8266.c(273): warning: #223-D: function "printf" declared implicitly
ESP8266_DEBUG("进入AT指令模式\r\n");
..\Hardware\ESP8266.c(297): warning: #223-D: function "printf" declared implicitly
Main_printf("开启AT配网\r\n");
..\Hardware\ESP8266.c: 9 warnings, 0 errors
compiling myQueue.c...
..\Hardware\myQueue.h(55): warning: #1-D: last line of file ends without a newline
..\Hardware\myQueue.c(128): warning: #177-D: variable "i" was declared but never referenced
u16 i;
..\Hardware\myQueue.c(186): warning: #177-D: variable "i" was declared but never referenced
u16 i;
..\Hardware\myQueue.c: 3 warnings, 0 errors
compiling adc.c...
..\Hardware\adc.h(37): warning: #1-D: last line of file ends without a newline
#endif
..\Hardware\adc.c(85): warning: #223-D: function "delay_ms" declared implicitly
delay_ms(5);
..\Hardware\adc.c: 2 warnings, 0 errors
compiling ADS129x.C...
..\Hardware\myQueue.h(55): warning: #1-D: last line of file ends without a newline
..\ADS129x\ADS129x.h(171): warning: #1-D: last line of file ends without a newline
*/
..\Hardware\key.h(49): warning: #1295-D: Deprecated declaration KE_IO_Init - give arg types
void KE_IO_Init(); //拨码开关
..\ADS129x\ADS129x.C(350): warning: #223-D: function "printf" declared implicitly
ADS129X_DEBUG("回读的寄存器数据:\r\n");
..\ADS129x\ADS129x.C(386): warning: #177-D: variable "i" was declared but never referenced
u8 i;
..\ADS129x\ADS129x.C(387): warning: #177-D: variable "ADS129x_REG_Cache" was declared but never referenced
u8 ADS129x_REG_Cache[ADS129X_REGNUM];
..\ADS129x\ADS129x.C(417): warning: #223-D: function "printf" declared implicitly
Main_printf("Init ads129x ");
..\ADS129x\ADS129x.C(429): warning: #69-D: integer conversion resulted in truncation
delay_s(2000);
..\ADS129x\ADS129x.C(413): warning: #177-D: variable "res" was declared but never referenced
u8 res;
..\ADS129x\ADS129x.C(471): warning: #1-D: last line of file ends without a newline
}
..\ADS129x\ADS129x.C: 10 warnings, 0 errors
linking...
Program Size: Code=24552 RO-data=340 RW-data=272 ZI-data=18568
FromELF: creating hex file...
"..\Output\STM32F103C8T6.axf" - 0 Error(s), 66 Warning(s).
<h2>Collection of Component include folders:</h2>
D:\Work\Openbci\openbci_stm32\USER\RTE
C:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.3.0
<h2>Collection of Component Files used:</h2>
</pre>
</body>
</html>
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x08000000 0x00010000 { ; load region size_region
ER_IROM1 0x08000000 0x00010000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM1 0x20000000 0x00005000 { ; RW data
.ANY (+RW +ZI)
}
}
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x08000000 0x00010000 { ; load region size_region
ER_IROM1 0x08000000 0x00010000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x00005000 { ; RW data
.ANY (+RW +ZI)
}
}
...@@ -72,8 +72,8 @@ ...@@ -72,8 +72,8 @@
<sActiveDebugView></sActiveDebugView> <sActiveDebugView></sActiveDebugView>
<WindowPosition> <WindowPosition>
<length>44</length> <length>44</length>
<flags>2</flags> <flags>0</flags>
<showCmd>3</showCmd> <showCmd>1</showCmd>
<MinPosition> <MinPosition>
<xPos>-32000</xPos> <xPos>-32000</xPos>
<yPos>-32000</yPos> <yPos>-32000</yPos>
...@@ -83,17 +83,17 @@ ...@@ -83,17 +83,17 @@
<yPos>-1</yPos> <yPos>-1</yPos>
</MaxPosition> </MaxPosition>
<NormalPosition> <NormalPosition>
<Top>156</Top> <Top>377</Top>
<Left>159</Left> <Left>694</Left>
<Right>1239</Right> <Right>2064</Right>
<Bottom>758</Bottom> <Bottom>1083</Bottom>
</NormalPosition> </NormalPosition>
</WindowPosition> </WindowPosition>
<MDIClientArea> <MDIClientArea>
<RegID>0</RegID> <RegID>0</RegID>
<MDITabState> <MDITabState>
<Len>809</Len> <Len>893</Len>
<Data>01000000040000000100000001000000010000000100000000000000020000000000000001000000010000000000000028000000280000000100000008000000070000000100000033443A5C576F726B5C4F70656E6263695C6F70656E6263695F73746D33325C4379746F6E5C4379746F6E5F50726F636573732E63000000000F4379746F6E5F50726F636573732E6300000000D9ADC200FFFFFFFF2B443A5C576F726B5C4F70656E6263695C6F70656E6263695F73746D33325C4379746F6E5C634A534F4E2E630000000007634A534F4E2E63000000009CC1B600FFFFFFFF35443A5C576F726B5C4F70656E6263695C6F70656E6263695F73746D33325C4379746F6E5C4379746F6E5F4573703132446174612E6800000000114379746F6E5F4573703132446174612E6800000000BCA8E100FFFFFFFF29443A5C576F726B5C4F70656E6263695C6F70656E6263695F73746D33325C555345525C6D61696E2E6300000000066D61696E2E6300000000FFDC7800FFFFFFFF30443A5C576F726B5C4F70656E6263695C6F70656E6263695F73746D33325C48617264776172655C455350383236362E630000000009455350383236362E6300000000BECEA100FFFFFFFF35443A5C576F726B5C4F70656E6263695C6F70656E6263695F73746D33325C4379746F6E5C4379746F6E5F4573703132446174612E6300000000114379746F6E5F4573703132446174612E6300000000F0A0A100FFFFFFFF33443A5C576F726B5C4F70656E6263695C6F70656E6263695F73746D33325C4379746F6E5C4379746F6E5F44617461506B672E68000000000F4379746F6E5F44617461506B672E6800000000F7B88600FFFFFFFF35443A5C576F726B5C4F70656E6263695C6F70656E6263695F73746D33325C4379746F6E48616C5C4379746F6E5F5379734170692E63000000000E4379746F6E5F5379734170692E6300000000A5C2D700FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD5000100000000000000020000009401000066000000A00500002E020000</Data> <Data>01000000040000000100000001000000010000000100000000000000020000000000000001000000010000000000000028000000280000000100000009000000000000000100000029443A5C576F726B5C4F70656E6263695C6F70656E6263695F73746D33325C555345525C6D61696E2E6300000000066D61696E2E6300000000BCA8E100FFFFFFFF35443A5C576F726B5C4F70656E6263695C6F70656E6263695F73746D33325C4379746F6E5C4379746F6E5F4573703132446174612E6300000000114379746F6E5F4573703132446174612E6300000000D9ADC200FFFFFFFF33443A5C576F726B5C4F70656E6263695C6F70656E6263695F73746D33325C4379746F6E5C6379746F6E5F636D645F7075622E63000000000F6379746F6E5F636D645F7075622E6300000000C5D4F200FFFFFFFF33443A5C576F726B5C4F70656E6263695C6F70656E6263695F73746D33325C4379746F6E5C4379746F6E5F50726F636573732E63000000000F4379746F6E5F50726F636573732E6300000000F7B88600FFFFFFFF2B443A5C576F726B5C4F70656E6263695C6F70656E6263695F73746D33325C4379746F6E5C634A534F4E2E630000000007634A534F4E2E6300000000C5D4F200FFFFFFFF35443A5C576F726B5C4F70656E6263695C6F70656E6263695F73746D33325C4379746F6E5C4379746F6E5F4573703132446174612E6800000000114379746F6E5F4573703132446174612E68000000009CC1B600FFFFFFFF30443A5C576F726B5C4F70656E6263695C6F70656E6263695F73746D33325C48617264776172655C455350383236362E630000000009455350383236362E6300000000F0A0A100FFFFFFFF33443A5C576F726B5C4F70656E6263695C6F70656E6263695F73746D33325C4379746F6E5C4379746F6E5F44617461506B672E68000000000F4379746F6E5F44617461506B672E6800000000BECEA100FFFFFFFF35443A5C576F726B5C4F70656E6263695C6F70656E6263695F73746D33325C4379746F6E48616C5C4379746F6E5F5379734170692E63000000000E4379746F6E5F5379734170692E6300000000FFDC7800FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD50001000000000000000200000052040000E701000008080000EA020000</Data>
</MDITabState> </MDITabState>
</MDIClientArea> </MDIClientArea>
<ViewEx> <ViewEx>
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
</RectRecentDocked> </RectRecentDocked>
<RectRecentFloat> <RectRecentFloat>
<Len>16</Len> <Len>16</Len>
<Data>940100006600000028040000D6000000</Data> <Data>1303000007010000A705000077010000</Data>
</RectRecentFloat> </RectRecentFloat>
</Window> </Window>
<Window> <Window>
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
<RecentRowIndex>0</RecentRowIndex> <RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked> <RectRecentDocked>
<Len>16</Len> <Len>16</Len>
<Data>03000000660000008D010000FE010000</Data> <Data>03000000660000008D01000039010000</Data>
</RectRecentDocked> </RectRecentDocked>
<RectRecentFloat> <RectRecentFloat>
<Len>16</Len> <Len>16</Len>
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
<RecentRowIndex>0</RecentRowIndex> <RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked> <RectRecentDocked>
<Len>16</Len> <Len>16</Len>
<Data>03000000660000008D010000FE010000</Data> <Data>03000000660000008D01000039010000</Data>
</RectRecentDocked> </RectRecentDocked>
<RectRecentFloat> <RectRecentFloat>
<Len>16</Len> <Len>16</Len>
...@@ -432,7 +432,7 @@ ...@@ -432,7 +432,7 @@
<RecentRowIndex>0</RecentRowIndex> <RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked> <RectRecentDocked>
<Len>16</Len> <Len>16</Len>
<Data>03000000660000008D010000FE010000</Data> <Data>03000000660000008D01000039010000</Data>
</RectRecentDocked> </RectRecentDocked>
<RectRecentFloat> <RectRecentFloat>
<Len>16</Len> <Len>16</Len>
...@@ -452,7 +452,7 @@ ...@@ -452,7 +452,7 @@
<RecentRowIndex>0</RecentRowIndex> <RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked> <RectRecentDocked>
<Len>16</Len> <Len>16</Len>
<Data>03000000660000008D010000FE010000</Data> <Data>03000000660000008D01000039010000</Data>
</RectRecentDocked> </RectRecentDocked>
<RectRecentFloat> <RectRecentFloat>
<Len>16</Len> <Len>16</Len>
...@@ -472,7 +472,7 @@ ...@@ -472,7 +472,7 @@
<RecentRowIndex>0</RecentRowIndex> <RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked> <RectRecentDocked>
<Len>16</Len> <Len>16</Len>
<Data>000000002F020000A00500002A030000</Data> <Data>000000006A0100004A05000088020000</Data>
</RectRecentDocked> </RectRecentDocked>
<RectRecentFloat> <RectRecentFloat>
<Len>16</Len> <Len>16</Len>
...@@ -508,11 +508,11 @@ ...@@ -508,11 +508,11 @@
<IsActivated>0</IsActivated> <IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth> <MRUWidth>32767</MRUWidth>
<PinState>0</PinState> <PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment> <RecentFrameAlignment>32768</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex> <RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked> <RectRecentDocked>
<Len>16</Len> <Len>16</Len>
<Data>03000000320200002504000072020000</Data> <Data>030000006D010000250400006F020000</Data>
</RectRecentDocked> </RectRecentDocked>
<RectRecentFloat> <RectRecentFloat>
<Len>16</Len> <Len>16</Len>
...@@ -1112,7 +1112,7 @@ ...@@ -1112,7 +1112,7 @@
<RecentRowIndex>0</RecentRowIndex> <RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked> <RectRecentDocked>
<Len>16</Len> <Len>16</Len>
<Data>03000000660000008D01000011030000</Data> <Data>03000000660000008D010000D1000000</Data>
</RectRecentDocked> </RectRecentDocked>
<RectRecentFloat> <RectRecentFloat>
<Len>16</Len> <Len>16</Len>
...@@ -1128,11 +1128,11 @@ ...@@ -1128,11 +1128,11 @@
<IsActivated>0</IsActivated> <IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth> <MRUWidth>32767</MRUWidth>
<PinState>0</PinState> <PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment> <RecentFrameAlignment>32768</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex> <RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked> <RectRecentDocked>
<Len>16</Len> <Len>16</Len>
<Data>03000000320200002504000072020000</Data> <Data>030000006D010000250400006F020000</Data>
</RectRecentDocked> </RectRecentDocked>
<RectRecentFloat> <RectRecentFloat>
<Len>16</Len> <Len>16</Len>
...@@ -1148,11 +1148,11 @@ ...@@ -1148,11 +1148,11 @@
<IsActivated>0</IsActivated> <IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth> <MRUWidth>32767</MRUWidth>
<PinState>0</PinState> <PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment> <RecentFrameAlignment>32768</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex> <RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked> <RectRecentDocked>
<Len>16</Len> <Len>16</Len>
<Data>03000000320200002504000072020000</Data> <Data>030000006D010000250400006F020000</Data>
</RectRecentDocked> </RectRecentDocked>
<RectRecentFloat> <RectRecentFloat>
<Len>16</Len> <Len>16</Len>
...@@ -1232,7 +1232,7 @@ ...@@ -1232,7 +1232,7 @@
<RecentRowIndex>0</RecentRowIndex> <RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked> <RectRecentDocked>
<Len>16</Len> <Len>16</Len>
<Data>000000002A030000A00500003D030000</Data> <Data>00000000880200004A0500009B020000</Data>
</RectRecentDocked> </RectRecentDocked>
<RectRecentFloat> <RectRecentFloat>
<Len>16</Len> <Len>16</Len>
...@@ -1281,14 +1281,14 @@ ...@@ -1281,14 +1281,14 @@
</Window> </Window>
<DockMan> <DockMan>
<Len>2619</Len> <Len>2619</Len>
<Data>000000000B000000000000000020000000000000FFFFFFFFFFFFFFFF94010000BF00000028040000C3000000000000000100000004000000010000000000000000000000FFFFFFFF06000000CB00000057010000CC000000F08B00005A01000079070000FFFF02000B004354616262656450616E650020000000000000940100006600000028040000D6000000940100004F00000028040000BF0000000000000040280046060000000B446973617373656D626C7900000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF940200004F00000098020000AC010000000000000200000004000000010000000000000000000000FFFFFFFF17000000E2050000CA0900002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C000001800040000000000000980200006600000028040000C3010000980200004F00000028040000AC0100000000000040410046170000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF0A5472616365204461746100000000CA09000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFE205000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFF900100004F0000009401000017020000010000000200001004000000010000000000000000000000FFFFFFFF05000000ED0300006D000000C3000000C4000000739400000180001000000100000000000000660000009001000041030000000000004F00000090010000170200000000000040410056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73010000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7301000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657301000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273000000007394000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000000000000FFFFFFFFFFFFFFFF0000000098010000280400009C01000000000000010000000400000001000000000000000000000000000000000000000000000001000000C6000000FFFFFFFF0E0000008F070000930700009407000095070000960700009007000091070000B5010000B8010000B9050000BA050000BB050000BC050000CB0900000180008000000000000000000000B30100002804000037020000000000009C010000280400002002000000000000404100460E0000001343616C6C20537461636B202B204C6F63616C73000000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031000000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF10547261636520457863657074696F6E7300000000B501000001000000FFFFFFFFFFFFFFFF0E4576656E7420436F756E7465727300000000B801000001000000FFFFFFFFFFFFFFFF084D656D6F7279203100000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203200000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFF105472616365204E617669676174696F6E00000000CB09000001000000FFFFFFFFFFFFFFFFFFFFFFFF0000000001000000000000000000000001000000FFFFFFFF140200009C010000180200002002000000000000020000000400000000000000000000000000000000000000000000000000000002000000C6000000FFFFFFFF8F07000001000000FFFFFFFF8F07000001000000C6000000000000000080000001000000FFFFFFFFFFFFFFFF0000000017020000A00500001B02000001000000010000000400000001000000C1FDFFFF91000000FFFFFFFF04000000C5000000C7000000B4010000779400000180008000000100000000000000C70100002804000037020000000000001B020000A00500002A0300000000000040820056040000000C4275696C64204F757470757401000000C500000001000000FFFFFFFFFFFFFFFF0D46696E6420496E2046696C657300000000C700000001000000FFFFFFFFFFFFFFFF0A4572726F72204C69737400000000B401000001000000FFFFFFFFFFFFFFFF0742726F77736572000000007794000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFC500000001000000FFFFFFFFC5000000000000000000000000000000</Data> <Data>000000000B000000000000000020000000000000FFFFFFFFFFFFFFFF94010000BF00000028040000C3000000000000000100000004000000010000000000000000000000FFFFFFFF06000000CB00000057010000CC000000F08B00005A01000079070000FFFF02000B004354616262656450616E6500200000000000001303000007010000A705000077010000940100004F00000028040000BF0000000000000040280046060000000B446973617373656D626C7900000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF940200004F00000098020000AC010000000000000200000004000000010000000000000000000000FFFFFFFF17000000E2050000CA0900002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C0000018000400000000000001704000007010000A705000064020000980200004F00000028040000AC0100000000000040410046170000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF0A5472616365204461746100000000CA09000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFE205000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFF900100004F0000009401000052010000010000000200001004000000010000000000000000000000FFFFFFFF05000000ED0300006D000000C3000000C400000073940000018000100000010000007F010000070100000F030000A2010000000000004F00000090010000520100000000000040410056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73010000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7301000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657301000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273000000007394000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000000000000FFFFFFFFFFFFFFFF0000000098010000280400009C01000000000000010000000400000001000000000000000000000000000000000000000000000001000000C6000000FFFFFFFF0E0000008F070000930700009407000095070000960700009007000091070000B5010000B8010000B9050000BA050000BB050000BC050000CB090000018000800000000000007F01000054020000A7050000D8020000000000009C010000280400002002000000000000404100460E0000001343616C6C20537461636B202B204C6F63616C73000000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031000000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF10547261636520457863657074696F6E7300000000B501000001000000FFFFFFFFFFFFFFFF0E4576656E7420436F756E7465727300000000B801000001000000FFFFFFFFFFFFFFFF084D656D6F7279203100000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203200000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFF105472616365204E617669676174696F6E00000000CB09000001000000FFFFFFFFFFFFFFFFFFFFFFFF0000000001000000000000000000000001000000FFFFFFFF140200009C010000180200002002000000000000020000000400000000000000000000000000000000000000000000000000000002000000C6000000FFFFFFFF8F07000001000000FFFFFFFF8F07000001000000C6000000000000000080000001000000FFFFFFFFFFFFFFFF00000000520100004A05000056010000010000000100001004000000010000009CFEFFFF6C010000FFFFFFFF04000000C5000000C7000000B401000077940000018000800000010000007F010000A6010000A7050000D802000000000000560100004A050000880200000000000040820056040000000C4275696C64204F757470757401000000C500000001000000FFFFFFFFFFFFFFFF0D46696E6420496E2046696C657300000000C700000001000000FFFFFFFFFFFFFFFF0A4572726F72204C69737400000000B401000001000000FFFFFFFFFFFFFFFF0742726F77736572000000007794000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFC500000001000000FFFFFFFFC5000000000000000000000000000000</Data>
</DockMan> </DockMan>
<ToolBar> <ToolBar>
<RegID>59392</RegID> <RegID>59392</RegID>
<Name>File</Name> <Name>File</Name>
<Buttons> <Buttons>
<Len>2002</Len> <Len>2002</Len>
<Data>00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000004000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050FFFFFFFF0096000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020000001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F50726F6A6563742057696E646F7773000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65AC030000</Data> <Data>00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000004000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000004000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE803000000000000000000000000000000000000000000000001000000010000009600000002002050FFFFFFFF0096000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020000001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F50726F6A6563742057696E646F7773000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65AC030000</Data>
</Buttons> </Buttons>
<OriginalItems> <OriginalItems>
<Len>1423</Len> <Len>1423</Len>
...@@ -1320,7 +1320,7 @@ ...@@ -1320,7 +1320,7 @@
<Name>Debug</Name> <Name>Debug</Name>
<Buttons> <Buttons>
<Len>2220</Len> <Len>2220</Len>
<Data>00200000000000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000000002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000000002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000000000002D0000000000000000000000000000000001000000010000000180F07F0000000000002E0000000000000000000000000000000001000000010000000180E8880000000000003700000000000000000000000000000000010000000100000001803B010000000000002F0000000000000000000000000000000001000000010000000180BB8A00000000000030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000000000000310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000002001380D88B000000000000310000000757617463682031000000000000000000000000010000000100000000000000000000000100000000001380D98B0000000000003100000007576174636820320000000000000000000000000100000001000000000000000000000001000000000013800F01000000000000320000000E4D656D6F72792057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000084D656D6F72792031000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000084D656D6F72792032000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000084D656D6F72792033000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000084D656D6F727920340000000000000000000000000100000001000000000000000000000001000000000013801001000000000000330000000E53657269616C2057696E646F77730000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000755415254202331000000000000000000000000010000000100000000000000000000000100000000001380940700000000000033000000075541525420233200000000000000000000000001000000010000000000000000000000010000000000138095070000000000003300000007554152542023330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000000E49544D2F525441205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000000000003400000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380658A000000000000340000000E4C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E00000014506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000D436F646520436F76657261676500000000000000000000000001000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720100000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720100000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000138001890000000000003600000007546F6F6C626F7800000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730100000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F72010000000000000001000000000000000100000000000000000000000100000000000000000005446562756764020000</Data> <Data>00200000000000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000000002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000000002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000000000002D0000000000000000000000000000000001000000010000000180F07F0000000000002E0000000000000000000000000000000001000000010000000180E8880000000000003700000000000000000000000000000000010000000100000001803B010000000000002F0000000000000000000000000000000001000000010000000180BB8A00000000000030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000000000000310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000002001380D88B000000000000310000000757617463682031000000000000000000000000010000000100000000000000000000000100000000001380D98B0000000000003100000007576174636820320000000000000000000000000100000001000000000000000000000001000000000013800F01000000000000320000000E4D656D6F72792057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000084D656D6F72792031000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000084D656D6F72792032000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000084D656D6F72792033000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000084D656D6F727920340000000000000000000000000100000001000000000000000000000001000000000013801001000000000000330000000E53657269616C2057696E646F77730000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000755415254202331000000000000000000000000010000000100000000000000000000000100000000001380940700000000000033000000075541525420233200000000000000000000000001000000010000000000000000000000010000000000138095070000000000003300000007554152542023330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000000E49544D2F525441205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000000000003400000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380658A000000000000340000000E4C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E00000014506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000D436F646520436F76657261676500000000000000000000000001000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720000000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720000000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000138001890000000000003600000007546F6F6C626F7800000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730000000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F72000000000000000001000000000000000100000000000000000000000100000000000000000005446562756764020000</Data>
</Buttons> </Buttons>
<OriginalItems> <OriginalItems>
<Len>898</Len> <Len>898</Len>
...@@ -1333,8 +1333,8 @@ ...@@ -1333,8 +1333,8 @@
</ToolBar> </ToolBar>
<ControlBarsSummary> <ControlBarsSummary>
<Bars>0</Bars> <Bars>0</Bars>
<ScreenCX>1440</ScreenCX> <ScreenCX>2560</ScreenCX>
<ScreenCY>900</ScreenCY> <ScreenCY>1440</ScreenCY>
</ControlBarsSummary> </ControlBarsSummary>
</ViewEx> </ViewEx>
</WinLayoutEx> </WinLayoutEx>
...@@ -1344,36 +1344,45 @@ ...@@ -1344,36 +1344,45 @@
<ActiveMDIGroup>0</ActiveMDIGroup> <ActiveMDIGroup>0</ActiveMDIGroup>
<MDIGroup> <MDIGroup>
<Size>100</Size> <Size>100</Size>
<ActiveTab>7</ActiveTab> <ActiveTab>0</ActiveTab>
<Doc> <Doc>
<Name>..\Cyton\Cyton_Process.c</Name> <Name>.\main.c</Name>
<ColumnNumber>46</ColumnNumber> <ColumnNumber>40</ColumnNumber>
<TopLine>13</TopLine> <TopLine>535</TopLine>
<CurrentLine>28</CurrentLine> <CurrentLine>536</CurrentLine>
<Folding>1</Folding> <Folding>1</Folding>
<ContractedFolders></ContractedFolders> <ContractedFolders></ContractedFolders>
<PaneID>0</PaneID> <PaneID>0</PaneID>
</Doc> </Doc>
<Doc> <Doc>
<Name>..\Cyton\cJSON.c</Name> <Name>..\Cyton\Cyton_Esp12Data.c</Name>
<ColumnNumber>1</ColumnNumber>
<TopLine>151</TopLine>
<CurrentLine>152</CurrentLine>
<Folding>1</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>..\Cyton\cyton_cmd_pub.c</Name>
<ColumnNumber>0</ColumnNumber> <ColumnNumber>0</ColumnNumber>
<TopLine>106</TopLine> <TopLine>5</TopLine>
<CurrentLine>1</CurrentLine> <CurrentLine>6</CurrentLine>
<Folding>1</Folding> <Folding>1</Folding>
<ContractedFolders></ContractedFolders> <ContractedFolders></ContractedFolders>
<PaneID>0</PaneID> <PaneID>0</PaneID>
</Doc> </Doc>
<Doc> <Doc>
<Name>..\Cyton\Cyton_Esp12Data.h</Name> <Name>..\Cyton\Cyton_Process.c</Name>
<ColumnNumber>9</ColumnNumber> <ColumnNumber>5</ColumnNumber>
<TopLine>4</TopLine> <TopLine>27</TopLine>
<CurrentLine>11</CurrentLine> <CurrentLine>31</CurrentLine>
<Folding>1</Folding> <Folding>1</Folding>
<ContractedFolders></ContractedFolders> <ContractedFolders></ContractedFolders>
<PaneID>0</PaneID> <PaneID>0</PaneID>
</Doc> </Doc>
<Doc> <Doc>
<Name>.\main.c</Name> <Name>..\Cyton\cJSON.c</Name>
<ColumnNumber>0</ColumnNumber> <ColumnNumber>0</ColumnNumber>
<TopLine>1</TopLine> <TopLine>1</TopLine>
<CurrentLine>1</CurrentLine> <CurrentLine>1</CurrentLine>
...@@ -1382,19 +1391,19 @@ ...@@ -1382,19 +1391,19 @@
<PaneID>0</PaneID> <PaneID>0</PaneID>
</Doc> </Doc>
<Doc> <Doc>
<Name>..\Hardware\ESP8266.c</Name> <Name>..\Cyton\Cyton_Esp12Data.h</Name>
<ColumnNumber>0</ColumnNumber> <ColumnNumber>9</ColumnNumber>
<TopLine>1</TopLine> <TopLine>7</TopLine>
<CurrentLine>1</CurrentLine> <CurrentLine>11</CurrentLine>
<Folding>1</Folding> <Folding>1</Folding>
<ContractedFolders></ContractedFolders> <ContractedFolders></ContractedFolders>
<PaneID>0</PaneID> <PaneID>0</PaneID>
</Doc> </Doc>
<Doc> <Doc>
<Name>..\Cyton\Cyton_Esp12Data.c</Name> <Name>..\Hardware\ESP8266.c</Name>
<ColumnNumber>1</ColumnNumber> <ColumnNumber>16</ColumnNumber>
<TopLine>151</TopLine> <TopLine>330</TopLine>
<CurrentLine>152</CurrentLine> <CurrentLine>333</CurrentLine>
<Folding>1</Folding> <Folding>1</Folding>
<ContractedFolders></ContractedFolders> <ContractedFolders></ContractedFolders>
<PaneID>0</PaneID> <PaneID>0</PaneID>
...@@ -1402,7 +1411,7 @@ ...@@ -1402,7 +1411,7 @@
<Doc> <Doc>
<Name>..\Cyton\Cyton_DataPkg.h</Name> <Name>..\Cyton\Cyton_DataPkg.h</Name>
<ColumnNumber>55</ColumnNumber> <ColumnNumber>55</ColumnNumber>
<TopLine>1</TopLine> <TopLine>5</TopLine>
<CurrentLine>13</CurrentLine> <CurrentLine>13</CurrentLine>
<Folding>1</Folding> <Folding>1</Folding>
<ContractedFolders></ContractedFolders> <ContractedFolders></ContractedFolders>
...@@ -1411,7 +1420,7 @@ ...@@ -1411,7 +1420,7 @@
<Doc> <Doc>
<Name>..\CytonHal\Cyton_SysApi.c</Name> <Name>..\CytonHal\Cyton_SysApi.c</Name>
<ColumnNumber>0</ColumnNumber> <ColumnNumber>0</ColumnNumber>
<TopLine>2</TopLine> <TopLine>9</TopLine>
<CurrentLine>13</CurrentLine> <CurrentLine>13</CurrentLine>
<Folding>1</Folding> <Folding>1</Folding>
<ContractedFolders></ContractedFolders> <ContractedFolders></ContractedFolders>
......
...@@ -933,7 +933,7 @@ ...@@ -933,7 +933,7 @@
<Group> <Group>
<GroupName>CYTON</GroupName> <GroupName>CYTON</GroupName>
<tvExp>0</tvExp> <tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel> <cbSel>0</cbSel>
<RteFlg>0</RteFlg> <RteFlg>0</RteFlg>
...@@ -1002,6 +1002,19 @@ ...@@ -1002,6 +1002,19 @@
<RteFlg>0</RteFlg> <RteFlg>0</RteFlg>
<bShared>0</bShared> <bShared>0</bShared>
</File> </File>
<File>
<GroupNumber>7</GroupNumber>
<FileNumber>55</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\Cyton\cyton_cmd_pub.c</PathWithFileName>
<FilenameWithoutPath>cyton_cmd_pub.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group> </Group>
<Group> <Group>
...@@ -1012,7 +1025,7 @@ ...@@ -1012,7 +1025,7 @@
<RteFlg>0</RteFlg> <RteFlg>0</RteFlg>
<File> <File>
<GroupNumber>8</GroupNumber> <GroupNumber>8</GroupNumber>
<FileNumber>55</FileNumber> <FileNumber>56</FileNumber>
<FileType>1</FileType> <FileType>1</FileType>
<tvExp>0</tvExp> <tvExp>0</tvExp>
<Focus>0</Focus> <Focus>0</Focus>
......
...@@ -848,6 +848,11 @@ ...@@ -848,6 +848,11 @@
<FileType>1</FileType> <FileType>1</FileType>
<FilePath>..\Cyton\Cyton_Process.c</FilePath> <FilePath>..\Cyton\Cyton_Process.c</FilePath>
</File> </File>
<File>
<FileName>cyton_cmd_pub.c</FileName>
<FileType>1</FileType>
<FilePath>..\Cyton\cyton_cmd_pub.c</FilePath>
</File>
</Files> </Files>
</Group> </Group>
<Group> <Group>
......
...@@ -101,50 +101,54 @@ ...@@ -101,50 +101,54 @@
//main //main
int main(void) int main(void)
{ {
work_state=SEND_BULE; work_state = SEND_WIFI;
//work_state=SEND_WIFI; //work_state=SEND_WIFI;
//work_state=SEND_UART; //work_state=SEND_UART;
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
mem_init(); //内存管理 mem_init(); //内存管理
//初始化系统时钟 72M //初始化系统时钟 72M
SystemInit(); SystemInit();
delay_init(); delay_init();
// uart3_init(115200);
// while(1) {
// Main_printf("Test\r\n");
// delay_ms(1000);
// }
LED_Init(); LED_Init();
KEY_Init(); //初始化按键 KEY_Init(); //初始化按键
KE_IO_Init(); //拨码开关 KE_IO_Init(); //拨码开关
ADS129x_GPIO_Init();//初始化ADS129X外设 ADS129x_GPIO_Init();//初始化ADS129X外设
HCO5_IO_Init(); //关蓝牙电源 HCO5_IO_Init(); //关蓝牙电源
ESP8266_IO_Init();//关WIFI电源 ESP8266_IO_Init();//关WIFI电源
//ESP8266_PWOERON; ESP8266_PWOERON;
uart1_init(921600);//串口初始化
//while (1);
uart1_init(460800);//串口初始化
Main_printf("上电\r\n");
//while(Power_ON());//按键开机检测 //while(Power_ON());//按键开机检测
Main_printf("开机\r\n"); Main_printf("Turn on\r\n");
Main_printf("版本 STM32F103C8 V2.5.2 适配匿名V7上位机 适配ADS1299 V2.2 2022-04-20\r\n"); Main_printf("Version STM32F103C8 V2.5.2 ADS1299 V2.2 2022-05-20\r\n");
Main_printf("当前芯片选择 %d\r\n",ADS129X_DEVICE); Main_printf("Current ads129x device id %d\r\n",ADS129X_DEVICE);
delay_ms(200); delay_ms(200);
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
TIM2_Init(500,7200); //按键检测+按键消抖 TIM2_Init(500,7200); //按键检测+按键消抖
TIM4_Init(10000,7200); //系统指示灯 TIM4_Init(10000,7200); //系统指示灯
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
Main_printf("ADC 初始化\r\n"); Main_printf("ADC Init\r\n");
adc1_init(); adc1_init();
ADC_DMA_Config(ADCConvertedValue,1); ADC_DMA_Config(ADCConvertedValue,1);
ADC_DMA_Enable(); ADC_DMA_Enable();
Main_printf("开启 DMA ADC\r\n"); Main_printf("Enable DMA ADC\r\n");
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
//初始化串口结构 //初始化串口结构
UART_Info =(_UART_Info*)mymalloc(sizeof(_UART_Info)); //数据结构 UART_Info =(_UART_Info*)mymalloc(sizeof(_UART_Info)); //数据结构
UART_Info->sendbuf = (u8*)mymalloc(UART_SEND_LENGTH); //发送缓冲区 UART_Info->sendbuf = (u8*)mymalloc(UART_SEND_LENGTH); //发送缓冲区
if(UART_Info == NULL || UART_Info->sendbuf == NULL ) if(UART_Info == NULL || UART_Info->sendbuf == NULL )
{ {
Main_printf("内存申请失败\r\n"); Main_printf("Memery malloc failed\r\n");
} }
else else
{ {
Main_printf("内存申请成功,当前占用 %d\r\n",mem_perused()); Main_printf("Memery malloc success,used %d\r\n",mem_perused());
} }
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
while(1) while(1)
...@@ -175,7 +179,7 @@ void Send_BlueTooth(void) ...@@ -175,7 +179,7 @@ void Send_BlueTooth(void)
#elif ADS129X_DEVICE == ADS1298 #elif ADS129X_DEVICE == ADS1298
ADS129x_REG_BUF[1]=0x86; //500采样率 ADS129x_REG_BUF[1]=0x86; //500采样率
#endif #endif
ADS129x_ReInit(0);//初始化1299 ADS129x_ReInit(0, 0);//初始化1299
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
Main_printf("申请串口缓存,内存当前占用 %d\r\n",mem_perused()); Main_printf("申请串口缓存,内存当前占用 %d\r\n",mem_perused());
UART_Info->sendbuf = (u8*)mymalloc(UART_SEND_LENGTH); //发送缓冲区 UART_Info->sendbuf = (u8*)mymalloc(UART_SEND_LENGTH); //发送缓冲区
...@@ -309,7 +313,7 @@ void Send_UART1(void) ...@@ -309,7 +313,7 @@ void Send_UART1(void)
#elif ADS129X_DEVICE == ADS1298 #elif ADS129X_DEVICE == ADS1298
ADS129x_REG_BUF[1]=0x86; //500采样率 ADS129x_REG_BUF[1]=0x86; //500采样率
#endif #endif
ADS129x_ReInit(0);//初始化1299 ADS129x_ReInit(0, 0);//初始化1299
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
Main_printf("申请串口缓存,内存当前占用 %d\r\n",mem_perused()); Main_printf("申请串口缓存,内存当前占用 %d\r\n",mem_perused());
UART_Info->sendbuf = (u8*)mymalloc(UART_SEND_LENGTH); //发送缓冲区 UART_Info->sendbuf = (u8*)mymalloc(UART_SEND_LENGTH); //发送缓冲区
...@@ -413,7 +417,7 @@ void TEST_ESP8266(void) ...@@ -413,7 +417,7 @@ void TEST_ESP8266(void)
#elif ADS129X_DEVICE == ADS1298 #elif ADS129X_DEVICE == ADS1298
ADS129x_REG_BUF[1]=0x85; //1000采样率 ADS129x_REG_BUF[1]=0x85; //1000采样率
#endif #endif
ADS129x_ReInit(1);//初始化1299 ADS129x_ReInit(1, 0);//初始化1299
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
Main_printf("内存当前占用 %d\r\n",mem_perused()); Main_printf("内存当前占用 %d\r\n",mem_perused());
WIFI_Info =(_WIFI_Info*)mymalloc(sizeof(_WIFI_Info)); //数据结构 WIFI_Info =(_WIFI_Info*)mymalloc(sizeof(_WIFI_Info)); //数据结构
...@@ -509,6 +513,48 @@ void TEST_ESP8266(void) ...@@ -509,6 +513,48 @@ void TEST_ESP8266(void)
} }
uint8_t g_aucSendIndexData = 0;
int iDebug = 0;
void testLoop() {
static int Total = 0;
char szBuff[330] = {0};
int i=0;
int iCnt = 1000;
for (; i< 330; i++) {
*((uint8_t *)(WIFI_Info->sendbuf + i)) = i;
}
delay_s(5);
Main_printf("Start Send test Data\r\n");
while (iCnt > 0) {
if(UART2_DMA_Finish==1)
{
delay_ms(4);
DMA_Enable(DMA1_Channel7,330);//开启DMA
Total ++;
UART2_DMA_Finish=0;
iCnt --;
}
//ESP8266_SendData(WIFI_Info->sendbuf, 330);
delay_us(10);
if (Total % 100 == 0) {
delay_ms(10);
Main_printf("Start Send %d \r\n", Total);
}
}
Main_printf("Start Send %d\r\n", Total * 330);
while(1) {
}
}
//WIFI发送 采样率最大2K //WIFI发送 采样率最大2K
void Send_ESP8266(void) void Send_ESP8266(void)
{ {
...@@ -519,44 +565,21 @@ void Send_ESP8266(void) ...@@ -519,44 +565,21 @@ void Send_ESP8266(void)
Main_printf("WIFI发送\r\n"); Main_printf("WIFI发送\r\n");
TIM_Cmd(TIM4, DISABLE); TIM_Cmd(TIM4, DISABLE);
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
//初始化129X //ADS129x_ReInit(1, 2);//初始化1299
#if ADS129X_DEVICE == ADS1299
ADS129x_REG_BUF[1]=0xD4; //1000采样率
#elif ADS129X_DEVICE == ADS1298
ADS129x_REG_BUF[1]=0x85; //1000采样率
#endif
ADS129x_ReInit(1);//初始化1299
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
Main_printf("内存当前占用 %d\r\n",mem_perused()); Main_printf("Memery Current %d\r\n",mem_perused());
WIFI_Info =(_WIFI_Info*)mymalloc(sizeof(_WIFI_Info)); //数据结构 WIFI_Info =(_WIFI_Info*)mymalloc(sizeof(_WIFI_Info)); //数据结构
WIFI_Info->sendbuf = (u8*)mymalloc(WIFI_SEND_LENGTH); //WIFI发送缓冲区 WIFI_Info->sendbuf = (u8*)mymalloc(1024); //WIFI发送缓冲区
WIFI_Info->WIFI_Queue = queue_init(WIFI_QUEUE_SIZE,WIFI_QUEUE_LENGTH) ;//循环队列初始化 WIFI_Info->WIFI_Queue = queue_init(WIFI_QUEUE_SIZE,WIFI_QUEUE_LENGTH) ;//循环队列初始化
if(WIFI_Info == NULL || WIFI_Info->sendbuf == NULL || WIFI_Info->WIFI_Queue == NULL) if(WIFI_Info == NULL || WIFI_Info->sendbuf == NULL || WIFI_Info->WIFI_Queue == NULL)
{ {
Main_printf("发送结构体 内存申请失败\r\n"); Main_printf("Wifi send struct malloc failed\r\n");
}
Main_printf("内存申请成功 当前内存使用率 %d\r\n",mem_perused());
/////////////////////////////////////////////////////////////////
Main_printf("初始化WIFI\r\n");
delay_ms(500);
if(!KE_3)//开启WIFI设置检测
{
Main_printf("WIFI配网检测,长按按键3S开始配网\r\n");
TIM4_Init(3000,7200); //WIFI设置检测
TIM4_Timing=0;
ESP8266_SET_FLAG=0;
while(ESP8266_SET_FLAG==0 && TIM4_Timing<10) //等待3s
ESP8266_SET();//检测按键
if(ESP8266_SET_FLAG)//配网
{
Set_WIFI(); //WIFIAT配网
}
TIM4_Init(10000,7200); //系统指示灯
TIM_Cmd(TIM4, DISABLE);
} }
/////////////////////////////////////////////////////////////////////////////////// Main_printf("Wifi send struct malloc success %d\r\n",mem_perused());
Main_printf("WIFI初始化\r\n"); Main_printf("WIFI Init\r\n");
Main_printf("开启DMA及中断\r\n"); Main_printf("开启DMA及中断\r\n");
ADS129x_Stop();
//ADS129x_ReInit(1, 0);
ESP8266_Init();//初始化 ESP8266_Init();//初始化
DMA_Config(DMA1_Channel7,(u32)&USART2->DR,(u32)WIFI_Info->sendbuf); DMA_Config(DMA1_Channel7,(u32)&USART2->DR,(u32)WIFI_Info->sendbuf);
UART2_DMA_TX_NVIC_Config(1);//开启串口 DMA中断 UART2_DMA_TX_NVIC_Config(1);//开启串口 DMA中断
...@@ -575,7 +598,7 @@ void Send_ESP8266(void) ...@@ -575,7 +598,7 @@ void Send_ESP8266(void)
LED_1=LED_OFF; LED_1=LED_OFF;
LED_2=LED_OFF; LED_2=LED_OFF;
TIM4_Init(10000,7200); //系统指示灯 TIM4_Init(10000,7200); //系统指示灯
EXTI->IMR |= ADS129X_DRDY_LINE;//开DRDY中断
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
while(work_state==SEND_WIFI)//WIFI发送, while(work_state==SEND_WIFI)//WIFI发送,
{ {
...@@ -585,13 +608,21 @@ void Send_ESP8266(void) ...@@ -585,13 +608,21 @@ void Send_ESP8266(void)
{ {
WIFI_Info->WIFI_Queue->Queue_Full_flag=0; WIFI_Info->WIFI_Queue->Queue_Full_flag=0;
Main_printf("WIFI queue full "); Main_printf("WIFI queue full ");
} }
//testLoop();
/* Loop Message. */
Cyton_UartPraseLoop();
if(UART2_DMA_Finish==1) if(UART2_DMA_Finish==1)
{ {
if(serch_queue_data(WIFI_Info->WIFI_Queue))//队列有数据 if(serch_queue_data(WIFI_Info->WIFI_Queue))//队列有数据
{ {
//delay_ms(1);
for(j=0;j<ADS129x_info.Ads129x_Write_Num;j++)//一帧N次采样的数据 for(j=0;j<ADS129x_info.Ads129x_Write_Num;j++)//一帧N次采样的数据
{ {
#if 0
for(i=0;i<8;i++)//处理8个通道的数据 for(i=0;i<8;i++)//处理8个通道的数据
{ {
ADS129x_info.cannle[i] = *(*(WIFI_Info->WIFI_Queue->databuf + WIFI_Info->WIFI_Queue->front)+0+i*3+j*ADS129x_info.Ads129x_Data_Move)<<16 ADS129x_info.cannle[i] = *(*(WIFI_Info->WIFI_Queue->databuf + WIFI_Info->WIFI_Queue->front)+0+i*3+j*ADS129x_info.Ads129x_Data_Move)<<16
...@@ -616,15 +647,40 @@ void Send_ESP8266(void) ...@@ -616,15 +647,40 @@ void Send_ESP8266(void)
addcheck += sumcheck; addcheck += sumcheck;
} }
WIFI_Info->sendbuf[(ADS129X_USE_CANNLE+1)*4 +1 +j*WIFI_Info->datalength] = sumcheck; //校验 WIFI_Info->sendbuf[(ADS129X_USE_CANNLE+1)*4 +1 +j*WIFI_Info->datalength] = sumcheck; //校验
WIFI_Info->sendbuf[(ADS129X_USE_CANNLE+1)*4 +2 +j*WIFI_Info->datalength] = addcheck; //校验 WIFI_Info->sendbuf[(ADS129X_USE_CANNLE+1)*4 +2 +j*WIFI_Info->datalength] = addcheck; //校验
#else
/* 1: 0xa0 2: autoCnt 3: 24 byte 27-32:0x00 33: 0xC0*/
WIFI_Info->sendbuf[j * WIFI_Info->datalength] = 0xA0;
WIFI_Info->sendbuf[j * WIFI_Info->datalength + 1] = g_aucSendIndexData ++;
memcpy(&WIFI_Info->sendbuf[j * WIFI_Info->datalength + 2],
(*(WIFI_Info->WIFI_Queue->databuf + WIFI_Info->WIFI_Queue->front) +j * ADS129x_info.Ads129x_Data_Move),
ADS129x_info.Ads129x_Data_Move); /* 24 byte data.*/
WIFI_Info->sendbuf[j * WIFI_Info->datalength + 27] = 0x0;
WIFI_Info->sendbuf[j * WIFI_Info->datalength + 27] = 0x0;
WIFI_Info->sendbuf[j * WIFI_Info->datalength + 28] = 0x0;
WIFI_Info->sendbuf[j * WIFI_Info->datalength + 29] = 0x0;
WIFI_Info->sendbuf[j * WIFI_Info->datalength + 30] = 0x0;
WIFI_Info->sendbuf[j * WIFI_Info->datalength + 31] = 0x0;
WIFI_Info->sendbuf[j * WIFI_Info->datalength + 32] = 0xC0;
#endif
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//ESP8266_SendData(WIFI_Info->sendbuf, WIFI_SEND_LENGTH);
delay_ms(1);
DMA_Enable(DMA1_Channel7,WIFI_SEND_LENGTH);//开启DMA DMA_Enable(DMA1_Channel7,WIFI_SEND_LENGTH);//开启DMA
UART2_DMA_Finish=0; UART2_DMA_Finish=0;
WIFI_Info->WIFI_Queue->front = (WIFI_Info->WIFI_Queue->front+1) % WIFI_Info->WIFI_Queue->capacity;//取数据,队头自增,存数据,队尾自增 WIFI_Info->WIFI_Queue->front = (WIFI_Info->WIFI_Queue->front+1) % WIFI_Info->WIFI_Queue->capacity;//取数据,队头自增,存数据,队尾自增
if (iDebug ++ % 1000 == 0) {
Main_printf("WIFI Send WIFI_Info->WIFI_Queue->front %d ADS129x_info.Ads129x_Data_Move %d Ads129x_Write_Num %d WIFI_Info->datalength %d\n",
WIFI_Info->WIFI_Queue->front, ADS129x_info.Ads129x_Data_Move, ADS129x_info.Ads129x_Write_Num, WIFI_Info->datalength);
}
} else {
//printf("n");
//delay_ms(500);
} }
} }
} }
EXTI->IMR &= ~(ADS129X_DRDY_LINE);//屏蔽外部中断 EXTI->IMR &= ~(ADS129X_DRDY_LINE);//屏蔽外部中断
TIM_Cmd(TIM4, DISABLE); TIM_Cmd(TIM4, DISABLE);
ESP8266_PWOEROFF;//关WIFI ESP8266_PWOEROFF;//关WIFI
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment