Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianstevens committed Aug 11, 2023
1 parent 305ef33 commit 4da1e04
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\Meadow.Core\source\implementations\f7\Meadow.F7\Meadow.F7.csproj" />
<ProjectReference Include="..\..\..\..\..\Meadow.Foundation\Source\Meadow.Foundation.Core\Meadow.Foundation.Core.csproj" />
<ProjectReference Include="..\..\..\..\..\Meadow.Foundation\Source\Meadow.Foundation.Libraries_and_Frameworks\Graphics.MicroGraphics\Driver\Graphics.MicroGraphics.csproj" />
<ProjectReference Include="..\..\Driver\LedMatrix8x16Wing.csproj" />
</ItemGroup>
</Project>
5 changes: 2 additions & 3 deletions Source/NeoPixelWing/Driver/NeoPixelWing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ public class NeoPixelWing : IGraphicsDisplay
/// Creates a NeoPixelWing driver instance
/// </summary>
/// <param name="spiBus">The SPI bus connected to the wing</param>
/// <param name="chipSelectPin">The chip select pin</param>
public NeoPixelWing(ISpiBus spiBus, IPin chipSelectPin)
public NeoPixelWing(ISpiBus spiBus)
{
Leds = new Ws2812(spiBus, chipSelectPin, 32);
Leds = new Ws2812(spiBus, 32);
PixelBuffer = new BufferRgb888(8, 4);
}

Expand Down
3 changes: 1 addition & 2 deletions Source/NeoPixelWing/Driver/NeoPixelWing.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Meadow.Sdk/1.1.0">
<Project Sdk="Meadow.Sdk/1.1.0">
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageIcon>icon.png</PackageIcon>
Expand All @@ -19,7 +19,6 @@
<None Include="..\..\icon.png" Pack="true" PackagePath="" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\Meadow.Foundation\Source\Meadow.Foundation.Core\Meadow.Foundation.Core.csproj" />
<ProjectReference Include="..\..\..\..\Meadow.Foundation\Source\Meadow.Foundation.Libraries_and_Frameworks\Graphics.MicroGraphics\Driver\Graphics.MicroGraphics.csproj" />
<ProjectReference Include="..\..\..\..\Meadow.Foundation\Source\Meadow.Foundation.Peripherals\Leds.Ws2812\Driver\Leds.Ws2812.csproj" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions Source/NeoPixelWing/Sample/NeoPixelWing_Sample/MeadowApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public override Task Initialize()
{
Console.WriteLine("Initializing ...");

neoWing = new NeoPixelWing(Device.CreateSpiBus(), Device.Pins.D10);
neoWing = new NeoPixelWing(Device.CreateSpiBus());

graphics = new MicroGraphics(neoWing);

Expand All @@ -28,9 +28,9 @@ public override Task Initialize()

public override Task Run()
{
// graphics.Clear();
graphics.Clear();

graphics.DrawRectangle(0, 0, 8, 4, Color.Red.WithBrightness(0.1), false);
graphics.DrawRectangle(0, 0, 8, 4, false);

graphics.Show();

Expand Down
8 changes: 4 additions & 4 deletions Source/OLED128x32Wing/Driver/OLED128x32Wing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class OLED128x32Wing
/// <param name="portA">The digital port for button A</param>
/// <param name="portB">The digital port for button B</param>
/// <param name="portC">The digital port for button C</param>
public OLED128x32Wing(II2cBus i2cBus, IDigitalInputPort portA, IDigitalInputPort portB, IDigitalInputPort portC)
public OLED128x32Wing(II2cBus i2cBus, IDigitalInterruptPort portA, IDigitalInterruptPort portB, IDigitalInterruptPort portC)
{
Display = new Ssd1306(i2cBus, (byte)Ssd1306.Addresses.Default, Ssd1306.DisplayType.OLED128x32);

Expand All @@ -54,9 +54,9 @@ public OLED128x32Wing(II2cBus i2cBus, IDigitalInputPort portA, IDigitalInputPort
/// <param name="pinC">The pin used for button C</param>
public OLED128x32Wing(II2cBus i2cBus, IPin pinA, IPin pinB, IPin pinC) :
this(i2cBus,
pinA.CreateDigitalInputPort(InterruptMode.EdgeBoth, ResistorMode.InternalPullUp),
pinB.CreateDigitalInputPort(InterruptMode.EdgeBoth, ResistorMode.InternalPullUp),
pinC.CreateDigitalInputPort(InterruptMode.EdgeBoth, ResistorMode.InternalPullUp))
pinA.CreateDigitalInterruptPort(InterruptMode.EdgeBoth, ResistorMode.InternalPullUp),
pinB.CreateDigitalInterruptPort(InterruptMode.EdgeBoth, ResistorMode.InternalPullUp),
pinC.CreateDigitalInterruptPort(InterruptMode.EdgeBoth, ResistorMode.InternalPullUp))
{ }
}
}

0 comments on commit 4da1e04

Please sign in to comment.