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
2 changes: 1 addition & 1 deletion AtomCommon/AtomBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static GpioButton Button
{
if (_button == null)
{
_button = new(39, _gpio, false);
_button = new(39, GpioController, false);
}

return _button;
Expand Down
10 changes: 4 additions & 6 deletions nanoFramework.Fire/Fire.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static GpioButton ButtonLeft
{
if (_left == null)
{
_left = new(39, _gpio, false);
_left = new(39, GpioController, false);
}

return _left;
Expand All @@ -69,7 +69,7 @@ public static GpioButton ButtonCenter
{
if (_center == null)
{
_center = new(38, _gpio, false);
_center = new(38, GpioController, false);
}

return _center;
Expand All @@ -85,7 +85,7 @@ public static GpioButton ButtonRight
{
if (_right == null)
{
_right = new(37, _gpio, false);
_right = new(37, GpioController, false);
}

return _right;
Expand Down Expand Up @@ -166,9 +166,7 @@ static Fire()
_power.ChargingCutOffCurrent = ChargingCutOffCurrent.C500mA;
_power.ChargingCuttOffVoltage = ChargingCutOffVoltage.V4_2;

// Setup buttons
_gpio = new();


// Config GPIOs for SPI (screen and SD Card)
Configuration.SetPinFunction(23, DeviceFunction.SPI1_MOSI);
Configuration.SetPinFunction(19, DeviceFunction.SPI1_MISO);
Expand Down
10 changes: 4 additions & 6 deletions nanoFramework.M5Core/M5Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static GpioButton ButtonLeft
{
if (_left == null)
{
_left = new(39, _gpio, false);
_left = new(39, GpioController, false);
}

return _left;
Expand All @@ -50,7 +50,7 @@ public static GpioButton ButtonCenter
{
if (_center == null)
{
_center = new(38, _gpio, false);
_center = new(38, GpioController, false);
}

return _center;
Expand All @@ -66,7 +66,7 @@ public static GpioButton ButtonRight
{
if (_right == null)
{
_right = new(37, _gpio, false);
_right = new(37, GpioController, false);
}

return _right;
Expand Down Expand Up @@ -151,9 +151,7 @@ static M5Core()
_power.ChargingCutOffCurrent = ChargingCutOffCurrent.C500mA;
_power.ChargingCuttOffVoltage = ChargingCutOffVoltage.V4_2;

// Setup buttons
_gpio = new();


// Config GPIOs for SPI (screen and SD Card)
Configuration.SetPinFunction(23, DeviceFunction.SPI1_MOSI);
Configuration.SetPinFunction(19, DeviceFunction.SPI1_MISO);
Expand Down
6 changes: 3 additions & 3 deletions nanoFramework.M5StickCommon/M5StickCBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static GpioButton ButtonM5
{
if (_buttonM5 == null)
{
_buttonM5 = new(37, _gpio, false);
_buttonM5 = new(37, GpioController, false);
}

return _buttonM5;
Expand All @@ -68,7 +68,7 @@ public static GpioButton ButtonRight
{
if (_buttonRight == null)
{
_buttonRight = new(39, _gpio, false);
_buttonRight = new(39, GpioController, false);
}

return _buttonRight;
Expand All @@ -84,7 +84,7 @@ public static GpioPin Led
{
if (_led == null)
{
_led = _gpio.OpenPin(10, PinMode.Output);
_led = GpioController.OpenPin(10, PinMode.Output);
}

return _led;
Expand Down