Skip to content

Commit

Permalink
Merge pull request #25 from WildernessLabs/develop
Browse files Browse the repository at this point in the history
Merge to main for RC2-2
  • Loading branch information
jorgedevs authored Mar 5, 2023
2 parents 811c08f + 90b6096 commit bf5f33d
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.F7" Version="0.*" />
<ProjectReference Include="..\..\Driver\DotstarWing.csproj" />
<PackageReference Include="Meadow.Foundation.Graphics.MicroGraphics" Version="0.*" />
<ProjectReference Include="..\..\Driver\DotstarWing.csproj" />
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions Source/FeatherWings.sln
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Leds.Apa102", "..\..\Meadow
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Displays.Ssd130x", "..\..\Meadow.Foundation\Source\Meadow.Foundation.Peripherals\Displays.Ssd130x\Driver\Displays.Ssd130x.csproj", "{EF231FE5-3C87-469F-B5D9-065C32AA993D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Meadow.Foundation.Core", "..\..\Meadow.Foundation\Source\Meadow.Foundation.Core\Meadow.Foundation.Core.csproj", "{694940BF-DBE9-4650-AD84-6B69C5D6088A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -267,6 +269,12 @@ Global
{EF231FE5-3C87-469F-B5D9-065C32AA993D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF231FE5-3C87-469F-B5D9-065C32AA993D}.Release|Any CPU.Build.0 = Release|Any CPU
{EF231FE5-3C87-469F-B5D9-065C32AA993D}.Release|Any CPU.Deploy.0 = Release|Any CPU
{694940BF-DBE9-4650-AD84-6B69C5D6088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{694940BF-DBE9-4650-AD84-6B69C5D6088A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{694940BF-DBE9-4650-AD84-6B69C5D6088A}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{694940BF-DBE9-4650-AD84-6B69C5D6088A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{694940BF-DBE9-4650-AD84-6B69C5D6088A}.Release|Any CPU.Build.0 = Release|Any CPU
{694940BF-DBE9-4650-AD84-6B69C5D6088A}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -308,6 +316,7 @@ Global
{9E95F289-F4FB-4530-B92B-D2D78C772E89} = {BB1A7E97-4559-459B-BDF8-4ED41758AB29}
{B7159B77-A8B2-42B3-80B8-A62DEA13AB31} = {BB1A7E97-4559-459B-BDF8-4ED41758AB29}
{EF231FE5-3C87-469F-B5D9-065C32AA993D} = {BB1A7E97-4559-459B-BDF8-4ED41758AB29}
{694940BF-DBE9-4650-AD84-6B69C5D6088A} = {BB1A7E97-4559-459B-BDF8-4ED41758AB29}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {673CD5FD-E4C7-48D7-85EA-3CB6FAD87939}
Expand Down
8 changes: 3 additions & 5 deletions Source/KeyboardWing/Driver/KeyboardWing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,21 @@ public class KeyboardWing
/// <summary>
/// Creates a KeyboardWing driver
/// </summary>
/// <param name="device">The Meadow device</param>
/// <param name="spiBus">The SPI bus used for the display</param>
/// <param name="i2cBus">The I2C bus connected to the device</param>
/// <param name="keyboardPin">The pin used to interrupt the keyboard</param>
/// <param name="displayChipSelectPin">The chip select pin</param>
/// <param name="displayDcPin">The DC pin</param>
/// <param name="lightSensorPin">The light sensor pin</param>
public KeyboardWing(IMeadowDevice device,
public KeyboardWing(
ISpiBus spiBus,
II2cBus i2cBus,
IPin keyboardPin,
IPin displayChipSelectPin,
IPin displayDcPin,
IPin lightSensorPin)
{
Keyboard = new BBQ10Keyboard(device, i2cBus, keyboardPin);
Keyboard = new BBQ10Keyboard(i2cBus, keyboardPin);

TouchScreen = new Tsc2004(i2cBus)
{
Expand All @@ -62,15 +61,14 @@ public KeyboardWing(IMeadowDevice device,

Display = new Ili9341
(
device: device,
spiBus: spiBus,
chipSelectPin: displayChipSelectPin, // Device.Pins.D11,
dcPin: displayDcPin, // Device.Pins.D12,
resetPin: null, //not used
width: 240, height: 320
);

LightSensor = new AnalogLightSensor(device, lightSensorPin);
LightSensor = new AnalogLightSensor(lightSensorPin);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public override Task Initialize()
var spiBus = Device.CreateSpiBus(new Meadow.Units.Frequency(48000, Meadow.Units.Frequency.UnitType.Kilohertz));

keyboardWing = new KeyboardWing(
device: Device,
spiBus: spiBus,
i2cBus: i2cBus,
keyboardPin: Device.Pins.D10,
Expand Down
11 changes: 5 additions & 6 deletions Source/OLED128x32Wing/Driver/OLED128x32Wing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,14 @@ public OLED128x32Wing(II2cBus i2cBus, IDigitalInputPort portA, IDigitalInputPort
/// Creates a OLED128x32Wing driver
/// </summary>
/// <param name="i2cBus">The I2C bus connected to the wing</param>
/// <param name="device">The device connected to the wing</param>
/// <param name="pinA">The pin used for button A</param>
/// <param name="pinB">The pin used for button B</param>
/// <param name="pinC">The pin used for button C</param>
public OLED128x32Wing(II2cBus i2cBus, IDigitalInputController device, IPin pinA, IPin pinB, IPin pinC) :
this(i2cBus,
device.CreateDigitalInputPort(pinA, InterruptMode.EdgeBoth, ResistorMode.InternalPullUp),
device.CreateDigitalInputPort(pinB, InterruptMode.EdgeBoth, ResistorMode.InternalPullUp),
device.CreateDigitalInputPort(pinC, InterruptMode.EdgeBoth, ResistorMode.InternalPullUp))
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))
{ }
}
}
1 change: 1 addition & 0 deletions Source/OLED128x32Wing/Driver/OLED128x32Wing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<None Include="..\..\icon.png" Pack="true" PackagePath="" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Meadow.Foundation" Version="0.*" />
<PackageReference Include="Meadow.Foundation.Displays.Ssd130x" Version="0.*" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public override Task Initialize()
Console.WriteLine("Initializing ...");
var i2cBus = Device.CreateI2cBus(I2cBusSpeed.FastPlus);

oledWing = new OLED128x32Wing(i2cBus, Device, Device.Pins.D11, Device.Pins.D10, Device.Pins.D09);
oledWing = new OLED128x32Wing(i2cBus, Device.Pins.D11, Device.Pins.D10, Device.Pins.D09);

graphics = new MicroGraphics(oledWing.Display);
graphics.CurrentFont = new Font12x16();
Expand Down

0 comments on commit bf5f33d

Please sign in to comment.