Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion AtomCommon/AtomBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,18 @@ public static GpioButton Button
/// <summary>
/// Gets the main <see cref="GpioController"/>.
/// </summary>
public static GpioController GpioController => _gpio;
public static GpioController GpioController
{
get
{
if (_gpio is null)
{
_gpio = new();
}

return _gpio;
}
}

/// <summary>
/// Gets <see cref="DacChannel"/> connected to GPIO 25.
Expand Down
13 changes: 12 additions & 1 deletion nanoFramework.M5StickCommon/M5StickCBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,18 @@ public static Pcf8563 RealTimeClock
/// <summary>
/// Gets the main GPIO Controller.
/// </summary>
public static GpioController GpioController => _gpio;
public static GpioController GpioController
{
get
{
if (_gpio is null)
{
_gpio = new();
}

return _gpio;
}
}

#if M5STICKC
static M5StickC()
Expand Down