File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Raspberry.IO.GeneralPurpose Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -27,14 +27,23 @@ public class GpioConnectionSettings
2727 /// <summary>
2828 /// Initializes a new instance of the <see cref="GpioConnectionSettings"/> class.
2929 /// </summary>
30- public GpioConnectionSettings ( )
30+ /// <param name="driver">The driver to use.</param>
31+ public GpioConnectionSettings ( IGpioConnectionDriver driver )
3132 {
32- Driver = DefaultDriver ;
33+ Driver = driver ;
3334 BlinkDuration = DefaultBlinkDuration ;
3435 PollInterval = DefaultPollInterval ;
3536 Opened = true ;
3637 }
3738
39+ /// <summary>
40+ /// Initializes a new instance of the <see cref="GpioConnectionSettings"/> class
41+ /// using the configured or default driver.
42+ /// </summary>
43+ public GpioConnectionSettings ( )
44+ : this ( DefaultDriver )
45+ { }
46+
3847 #endregion
3948
4049 #region Constants
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ static void Main(string[] args)
8383 } ) ;
8484
8585 // Create connection
86- var settings = new GpioConnectionSettings { Driver = driver } ;
86+ var settings = new GpioConnectionSettings ( driver ) ;
8787
8888 using ( var connection = new GpioConnection ( settings , leds ) )
8989 {
You can’t perform that action at this time.
0 commit comments