File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
nanoFramework.M5StickCommon Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,18 @@ public static GpioButton Button
5353 /// <summary>
5454 /// Gets the main <see cref="GpioController"/>.
5555 /// </summary>
56- public static GpioController GpioController => _gpio ;
56+ public static GpioController GpioController
57+ {
58+ get
59+ {
60+ if ( _gpio is null )
61+ {
62+ _gpio = new ( ) ;
63+ }
64+
65+ return _gpio ;
66+ }
67+ }
5768
5869 /// <summary>
5970 /// Gets <see cref="DacChannel"/> connected to GPIO 25.
Original file line number Diff line number Diff line change @@ -134,7 +134,18 @@ public static Pcf8563 RealTimeClock
134134 /// <summary>
135135 /// Gets the main GPIO Controller.
136136 /// </summary>
137- public static GpioController GpioController => _gpio ;
137+ public static GpioController GpioController
138+ {
139+ get
140+ {
141+ if ( _gpio is null )
142+ {
143+ _gpio = new ( ) ;
144+ }
145+
146+ return _gpio ;
147+ }
148+ }
138149
139150#if M5STICKC
140151 static M5StickC ( )
You can’t perform that action at this time.
0 commit comments