コード例 #1
0
 public void PulseDebugLED()
 {
     if (this.LEDOffTimer == null)
     {
         this.LEDOffTimer       = new Timer(new TimeSpan(0, 0, 0, 0, 10));
         this.LEDOffTimer.Tick += new Timer.TickEventHandler(this.LEDOffTimer_Tick);
     }
     Mainboard.SetDebugLED(true);
     Debug.WriteLine("PulseDebugLED called");
     this.LEDOffTimer.Start();
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: martinca-msft/Gadgeteer
 /// <summary>
 /// Pulses the mainboard's debug LED, if present.  Note that there may be more than one LED on the mainboard. One labelled "PWR" will always be on when the mainboard is powered.  The debug LED is labelled "LED" (if present).
 /// This method also writes "PulseDebugLED called" on the debug print output.
 /// </summary>
 /// <remarks>
 /// The Debug LED can also be turned on/off using the <see cref="Program.Mainboard"/> interface directly.
 /// </remarks>
 public void PulseDebugLED()
 {
     if (LEDOffTimer == null)
     {
         LEDOffTimer       = new Timer(new TimeSpan(0, 0, 0, 0, 10));
         LEDOffTimer.Tick += new Timer.TickEventHandler(LEDOffTimer_Tick);
     }
     Mainboard.SetDebugLED(true);
     Debug.Print("PulseDebugLED called");
     LEDOffTimer.Start();
 }
コード例 #3
0
ファイル: Program.cs プロジェクト: martinca-msft/Gadgeteer
 void LEDOffTimer_Tick(Timer timer)
 {
     LEDOffTimer.Stop();
     Mainboard.SetDebugLED(false);
 }
コード例 #4
0
 private void LEDOffTimer_Tick(Timer timer)
 {
     this.LEDOffTimer.Stop();
     Mainboard.SetDebugLED(false);
 }