This commit is contained in:
WangQiang 2016-04-13 14:35:15 +00:00
parent 6ae8be517e
commit 4b48ae5c02
1 changed files with 14 additions and 0 deletions

View File

@ -21,6 +21,10 @@
#include "App\FlushPort.h" #include "App\FlushPort.h"
#if defined(APP)
#include "BootConfig.h"
#endif
#define ShunCom_Master 0 #define ShunCom_Master 0
static void StartGateway(void* param); static void StartGateway(void* param);
@ -183,6 +187,16 @@ void Token::Setup(ushort code, const char* name, COM message, int baudRate)
WatchDog::Start(); WatchDog::Start();
#endif #endif
#if defined(APP)
// 把引脚放进 Boot区 的 PinConfig 内
Flash flash;
uint bootCfgAddr = 0x8010000 - 1 << 10; // 63K位置
Config Cfg(flash,bootCfgAddr,sizeof(PinConfig));
Config::Current = &Cfg;
static PinConfig pinCfg;
pinCfg.Load();
PinConfig::Current = &pinCfg;
#endif
// Flash最后一块作为配置区 // Flash最后一块作为配置区
Config::Current = &Config::CreateFlash(); Config::Current = &Config::CreateFlash();
} }