Exemplo n.º 1
0
 /// <summary>Constructs a new button definition</summary>
 /// <remarks>This version of the constructor defaults the ResistorMode to PullUp</remarks>
 /// <param name="Button">The button value to assign to the GPIO pin.</param>
 /// <param name="AutoRepeat">Boolean flag to indicate if this button should auto-repeat</param>
 public ButtonDefinition(Microsoft.SPOT.Hardware.Button Button
                         , bool AutoRepeat
                         )
 {
     this._Button     = Button;
     this._Pin        = HardwareProvider.HwProvider.GetButtonPins(Button);
     this._AutoRepeat = AutoRepeat;
 }
Exemplo n.º 2
0
 /// <summary>Constructs a new button definition</summary>
 /// <remarks>
 /// The resistor mode can influence the detection of an up/down press.
 /// Setting it incorrectly can cause unexpected results. Check with the
 /// hardware design schematics or documentation for best results.
 /// </remarks>
 /// <param name="Button">The button value to assign to the GPIO pin.</param>
 /// <param name="AutoRepeat">Boolean flag to indicate if this button should auto-repeat</param>
 /// <param name="ResistorMode">
 /// Resistor mode to configure for the GPIO pin [may be ignored on hardware that
 /// does not support dynamic configuration ]
 /// </param>
 /// <param name="InterruptMode">
 /// Interrupt mode to configure for the GPIO pin [may be ignored on hardware that
 /// does not support dynamic configuration ]
 /// </param>
 public ButtonDefinition(Microsoft.SPOT.Hardware.Button Button
                         , bool AutoRepeat
                         , Port.ResistorMode ResistorMode
                         , Port.InterruptMode InterruptMode
                         )
 {
     this._Button        = Button;
     this._Pin           = Pin;
     this._AutoRepeat    = AutoRepeat;
     this._ResistorMode  = ResistorMode;
     this._InterruptMode = InterruptMode;
 }
Exemplo n.º 3
0
 /// <summary>Constructs a new button definition</summary>
 /// <remarks>
 /// The resistor mode can influence the detection of an up/down press.
 /// Setting it incorrectly can cause unexpected results. Check with the
 /// hardware design schematics or documentation for best results. 
 /// </remarks>
 /// <param name="Button">The button value to assign to the GPIO pin.</param>
 /// <param name="AutoRepeat">Boolean flag to indicate if this button should auto-repeat</param>
 /// <param name="ResistorMode">
 /// Resistor mode to configure for the GPIO pin [may be ignored on hardware that
 /// does not support dynamic configuration ]
 /// </param>
 /// <param name="InterruptMode">
 /// Interrupt mode to configure for the GPIO pin [may be ignored on hardware that
 /// does not support dynamic configuration ]
 /// </param>
 public ButtonDefinition( Microsoft.SPOT.Hardware.Button Button
     , bool AutoRepeat
     , Port.ResistorMode ResistorMode
     , Port.InterruptMode InterruptMode
     )
 {
     this._Button = Button;
     this._Pin = Pin;
     this._AutoRepeat = AutoRepeat;
     this._ResistorMode = ResistorMode;
     this._InterruptMode = InterruptMode;
 }
Exemplo n.º 4
0
 /// <summary>Constructs a new button definition</summary>
 /// <remarks>This version of the constructor defaults the ResistorMode to PullUp</remarks>
 /// <param name="Button">The button value to assign to the GPIO pin.</param>
 /// <param name="AutoRepeat">Boolean flag to indicate if this button should auto-repeat</param>
 public ButtonDefinition(Microsoft.SPOT.Hardware.Button Button
     , bool AutoRepeat
     )
 {
     this._Button = Button;
     this._Pin = HardwareProvider.HwProvider.GetButtonPins(Button);
     this._AutoRepeat = AutoRepeat;
 }