本文整理汇总了C#中Microsoft.SPOT.Debugger.Engine.Stop方法的典型用法代码示例。如果您正苦于以下问题:C# Engine.Stop方法的具体用法?C# Engine.Stop怎么用?C# Engine.Stop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.SPOT.Debugger.Engine
的用法示例。
在下文中一共展示了Engine.Stop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Process
//.........这里部分代码省略.........
{
Console.WriteLine( "{0}", e.ToString() );
return false;
}
continue;
}
if(arg == "-writeandexecute")
{
try
{
string file = args[++i];
Console.WriteLine( "Loading {0}...", file );
m_entrypoint = Microsoft.SPOT.Debugger.SRecordFile.Parse( file, m_blocks, null );
Console.WriteLine( "Loaded." );
}
catch(Exception e)
{
Console.WriteLine( "{0}", e.ToString() );
return false;
}
continue;
}
if(arg == "-entrypoint")
{
m_entrypoint = ParseHex( args[++i] );
continue;
}
Usage();
return false;
}
if(port == null || baudrate == 0)
{
Console.WriteLine( "No serial port specified!" );
return false;
}
m_eng = new _DBG.Engine( new Microsoft.SPOT.Debugger.PortDefinition_Serial( port, port, baudrate ) );
m_eng.Silent = true;
m_eng.OnMessage += new _DBG.MessageEventHandler( OnMessage );
m_eng.Start();
if(fWait)
{
if(m_eng.TryToConnect( 5, 100 ))
{
m_eng.RebootDevice();
}
}
m_fl = new _DBG.PortBooter( m_eng );
m_fl.OnProgress += new _DBG.PortBooter.ProgressEventHandler( this.OnProgress );
m_fl.Start();
if(fWait)
{
m_fl.WaitBanner( Int32.MaxValue, 2000 );
}
DateTime start = DateTime.Now;
m_fl.Program( m_blocks );
Console.WriteLine( "Execute: {0}", DateTime.Now - start );
if(m_entrypoint != 0)
{
while(true)
{
m_fl.Execute( m_entrypoint );
_DBG.PortBooter.Report r = m_fl.GetReport( 2000 );
if(r != null && r.type == _DBG.PortBooter.Report.State.EntryPoint)
{
break;
}
}
}
m_fl.Stop();
m_eng.Stop();
return true;
}