编译通过
This commit is contained in:
parent
3d65092d35
commit
0ce31a2c4f
|
@ -104,64 +104,6 @@ ITransport* CreateShunCom(COM_Def index, int baudRate, Pin rst, Pin power, Pin s
|
||||||
return zb;
|
return zb;
|
||||||
}
|
}
|
||||||
|
|
||||||
ITransport* CreateShunCom(COM_Def index, int baudRate, Pin rst, Pin power, Pin slp, Pin cfg,byte Kind, IDataPort* led)
|
|
||||||
{
|
|
||||||
auto sp = new SerialPort(index, baudRate);
|
|
||||||
auto zb = new ShunCom();
|
|
||||||
|
|
||||||
sp->Rx.SetCapacity(512);
|
|
||||||
|
|
||||||
zb->Power.Set(power);
|
|
||||||
zb->Sleep.Init(slp, true);
|
|
||||||
zb->Config.Init(cfg, true);
|
|
||||||
zb->Init(sp, rst);
|
|
||||||
if(zb->EnterConfig())
|
|
||||||
{
|
|
||||||
auto tc = TinyConfig::Current;
|
|
||||||
zb->ShowConfig();
|
|
||||||
zb->SetDevice(Kind);
|
|
||||||
zb->SetChannel(tc->Channel);
|
|
||||||
zb->SetSend(0x01);
|
|
||||||
ITransport* CreateShunCom(COM_Def index, int baudRate, Pin rst, Pin power, Pin slp, Pin cfg,byte Kind, IDataPort* led)
|
|
||||||
{
|
|
||||||
auto sp = new SerialPort(index, baudRate);
|
|
||||||
auto zb = new ShunCom();
|
|
||||||
|
|
||||||
sp->Rx.SetCapacity(512);
|
|
||||||
|
|
||||||
zb->Power.Set(power);
|
|
||||||
zb->Sleep.Init(slp, true);
|
|
||||||
zb->Config.Init(cfg, true);
|
|
||||||
zb->Init(sp, rst);
|
|
||||||
if(zb.EnterConfig())
|
|
||||||
{
|
|
||||||
auto tc = TinyConfig::Current;
|
|
||||||
zb.ShowConfig();
|
|
||||||
zb.SetDevice(Kind);
|
|
||||||
zb.SetChannel(tc->Channel);
|
|
||||||
zb.SetSend(0x01);
|
|
||||||
zb.PrintSrc(false);
|
|
||||||
zb.EraConfig();
|
|
||||||
zb.ExitConfig();
|
|
||||||
}
|
|
||||||
//zb->ShowConfig();
|
|
||||||
|
|
||||||
zb->Led = led;
|
|
||||||
|
|
||||||
return zb;
|
|
||||||
}
|
|
||||||
|
|
||||||
zb->EraConfig();
|
|
||||||
zb->ExitConfig();
|
|
||||||
}
|
|
||||||
//zb->ShowConfig();
|
|
||||||
|
|
||||||
zb->Led = led;
|
|
||||||
|
|
||||||
return zb;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
TinyClient* CreateTinyClient(ITransport* port)
|
TinyClient* CreateTinyClient(ITransport* port)
|
||||||
{
|
{
|
||||||
static TinyController ctrl;
|
static TinyController ctrl;
|
||||||
|
|
Loading…
Reference in New Issue