-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/mcp 41xxx pot #814
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<Project Sdk="Meadow.Sdk/1.1.0"> | ||
<Project Sdk="Meadow.Sdk/1.1.0"> | ||
<PropertyGroup> | ||
<PackageReadmeFile>Readme.md</PackageReadmeFile> | ||
<Nullable>enable</Nullable> | ||
<LangVersion>10.0</LangVersion> | ||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> | ||
|
@@ -12,15 +11,14 @@ | |
<AssemblyName>Ds3502</AssemblyName> | ||
<Company>Wilderness Labs, Inc</Company> | ||
<PackageProjectUrl>http://developer.wildernesslabs.co/Meadow/Meadow.Foundation/</PackageProjectUrl> | ||
<PackageId>Meadow.Foundation.ICs.IOExpanders.Ds3502</PackageId> | ||
<PackageId>Meadow.Foundation.ICs.DigiPots.Ds3502</PackageId> | ||
<RepositoryUrl>https://github.com/WildernessLabs/Meadow.Foundation</RepositoryUrl> | ||
<PackageTags>Meadow.Foundation, IOExpanders, Ds3502</PackageTags> | ||
<PackageTags>Meadow.Foundation, DigiPots, Ds3502</PackageTags> | ||
<Version>0.1.5</Version> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
<Description>Ds3502 I2C digital potentiometer</Description> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Include=".\Readme.md" Pack="true" PackagePath=""/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re-add readme.md ref |
||
<None Include="..\..\..\icon.png" Pack="true" PackagePath="" /> | ||
<ProjectReference Include="..\..\..\Meadow.Foundation.Core\Meadow.Foundation.Core.csproj" /> | ||
</ItemGroup> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...Ds3502/Samples/Ds3502_Sample/MeadowApp.cs → ...Ds3502/Samples/Ds3502_Sample/MeadowApp.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Binary file added
BIN
+2.1 MB
Source/Meadow.Foundation.Peripherals/ICs.DigiPots.Mcp4xxx/Datasheet/MCHPS02708_1-2520528.pdf
Binary file not shown.
24 changes: 24 additions & 0 deletions
24
Source/Meadow.Foundation.Peripherals/ICs.DigiPots.Mcp4xxx/Driver/Drivers/Mcp4131.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Meadow.Hardware; | ||
using Meadow.Units; | ||
|
||
namespace Meadow.Foundation.ICs.DigiPots; | ||
|
||
/// <summary> | ||
/// Represents an MCP4131 digital potentiometer. | ||
/// </summary> | ||
public class Mcp4131 : Mcp4xx1 | ||
{ | ||
/// <inheritdoc/> | ||
public override int MaxSteps => 129; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Mcp4131"/> class. | ||
/// </summary> | ||
/// <param name="spiBus">The SPI bus to which the MCP4131 is connected.</param> | ||
/// <param name="chipSelect">The digital output port for the chip select (CS) pin.</param> | ||
/// <param name="maxResistance">The maximum resistance of the potentiometer.</param> | ||
public Mcp4131(ISpiBus spiBus, IDigitalOutputPort chipSelect, Resistance maxResistance) : | ||
base(spiBus, chipSelect, 1, maxResistance) | ||
{ | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
Source/Meadow.Foundation.Peripherals/ICs.DigiPots.Mcp4xxx/Driver/Drivers/Mcp4132.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Meadow.Hardware; | ||
using Meadow.Units; | ||
|
||
namespace Meadow.Foundation.ICs.DigiPots; | ||
|
||
/// <summary> | ||
/// Represents an MCP4132 digital rheostat. | ||
/// </summary> | ||
public class Mcp4132 : Mcp4xx2 | ||
{ | ||
/// <inheritdoc/> | ||
public override int MaxSteps => 129; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Mcp4132"/> class. | ||
/// </summary> | ||
/// <param name="spiBus">The SPI bus to which the MCP4132 is connected.</param> | ||
/// <param name="chipSelect">The digital output port for the chip select (CS) pin.</param> | ||
/// <param name="maxResistance">The maximum resistance of the rheostat.</param> | ||
public Mcp4132(ISpiBus spiBus, IDigitalOutputPort chipSelect, Resistance maxResistance) : | ||
base(spiBus, chipSelect, 1, maxResistance) | ||
{ | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
Source/Meadow.Foundation.Peripherals/ICs.DigiPots.Mcp4xxx/Driver/Drivers/Mcp4141.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Meadow.Hardware; | ||
using Meadow.Units; | ||
|
||
namespace Meadow.Foundation.ICs.DigiPots; | ||
|
||
/// <summary> | ||
/// Represents an MCP4141 digital potentiometer. | ||
/// </summary> | ||
public class Mcp4141 : Mcp4xx1 | ||
{ | ||
/// <inheritdoc/> | ||
public override int MaxSteps => 129; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Mcp4141"/> class. | ||
/// </summary> | ||
/// <param name="spiBus">The SPI bus to which the MCP4141 is connected.</param> | ||
/// <param name="chipSelect">The digital output port for the chip select (CS) pin.</param> | ||
/// <param name="maxResistance">The maximum resistance of the potentiometer.</param> | ||
public Mcp4141(ISpiBus spiBus, IDigitalOutputPort chipSelect, Resistance maxResistance) : | ||
base(spiBus, chipSelect, 1, maxResistance) | ||
{ | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
Source/Meadow.Foundation.Peripherals/ICs.DigiPots.Mcp4xxx/Driver/Drivers/Mcp4142.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Meadow.Hardware; | ||
using Meadow.Units; | ||
|
||
namespace Meadow.Foundation.ICs.DigiPots; | ||
|
||
/// <summary> | ||
/// Represents an MCP4142 digital rheostat. | ||
/// </summary> | ||
public class Mcp4142 : Mcp4xx2 | ||
{ | ||
/// <inheritdoc/> | ||
public override int MaxSteps => 129; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Mcp4142"/> class. | ||
/// </summary> | ||
/// <param name="spiBus">The SPI bus to which the MCP4142 is connected.</param> | ||
/// <param name="chipSelect">The digital output port for the chip select (CS) pin.</param> | ||
/// <param name="maxResistance">The maximum resistance of the rheostat.</param> | ||
public Mcp4142(ISpiBus spiBus, IDigitalOutputPort chipSelect, Resistance maxResistance) : | ||
base(spiBus, chipSelect, 1, maxResistance) | ||
{ | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
Source/Meadow.Foundation.Peripherals/ICs.DigiPots.Mcp4xxx/Driver/Drivers/Mcp4151.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Meadow.Hardware; | ||
using Meadow.Units; | ||
|
||
namespace Meadow.Foundation.ICs.DigiPots; | ||
|
||
/// <summary> | ||
/// Represents an MCP4151 digital potentiometer. | ||
/// </summary> | ||
public class Mcp4151 : Mcp4xx1 | ||
{ | ||
/// <inheritdoc/> | ||
public override int MaxSteps => 257; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Mcp4151"/> class. | ||
/// </summary> | ||
/// <param name="spiBus">The SPI bus to which the MCP4151 is connected.</param> | ||
/// <param name="chipSelect">The digital output port for the chip select (CS) pin.</param> | ||
/// <param name="maxResistance">The maximum resistance of the potentiometer.</param> | ||
public Mcp4151(ISpiBus spiBus, IDigitalOutputPort chipSelect, Resistance maxResistance) : | ||
base(spiBus, chipSelect, 1, maxResistance) | ||
{ | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
Source/Meadow.Foundation.Peripherals/ICs.DigiPots.Mcp4xxx/Driver/Drivers/Mcp4152.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Meadow.Hardware; | ||
using Meadow.Units; | ||
|
||
namespace Meadow.Foundation.ICs.DigiPots; | ||
|
||
/// <summary> | ||
/// Represents an MCP4152 digital rheostat. | ||
/// </summary> | ||
public class Mcp4152 : Mcp4xx2 | ||
{ | ||
/// <inheritdoc/> | ||
public override int MaxSteps => 257; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Mcp4152"/> class. | ||
/// </summary> | ||
/// <param name="spiBus">The SPI bus to which the MCP4152 is connected.</param> | ||
/// <param name="chipSelect">The digital output port for the chip select (CS) pin.</param> | ||
/// <param name="maxResistance">The maximum resistance of the rheostat.</param> | ||
public Mcp4152(ISpiBus spiBus, IDigitalOutputPort chipSelect, Resistance maxResistance) : | ||
base(spiBus, chipSelect, 1, maxResistance) | ||
{ | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
Source/Meadow.Foundation.Peripherals/ICs.DigiPots.Mcp4xxx/Driver/Drivers/Mcp4161.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Meadow.Hardware; | ||
using Meadow.Units; | ||
|
||
namespace Meadow.Foundation.ICs.DigiPots; | ||
|
||
/// <summary> | ||
/// Represents an MCP4161 digital potentiometer. | ||
/// </summary> | ||
public class Mcp4161 : Mcp4xx1 | ||
{ | ||
/// <inheritdoc/> | ||
public override int MaxSteps => 257; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Mcp4161"/> class. | ||
/// </summary> | ||
/// <param name="spiBus">The SPI bus to which the MCP4161 is connected.</param> | ||
/// <param name="chipSelect">The digital output port for the chip select (CS) pin.</param> | ||
/// <param name="maxResistance">The maximum resistance of the potentiometer.</param> | ||
public Mcp4161(ISpiBus spiBus, IDigitalOutputPort chipSelect, Resistance maxResistance) : | ||
base(spiBus, chipSelect, 1, maxResistance) | ||
{ | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
Source/Meadow.Foundation.Peripherals/ICs.DigiPots.Mcp4xxx/Driver/Drivers/Mcp4162.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Meadow.Hardware; | ||
using Meadow.Units; | ||
|
||
namespace Meadow.Foundation.ICs.DigiPots; | ||
|
||
/// <summary> | ||
/// Represents an MCP4162 digital rheostat. | ||
/// </summary> | ||
public class Mcp4162 : Mcp4xx2 | ||
{ | ||
/// <inheritdoc/> | ||
public override int MaxSteps => 257; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Mcp4162"/> class. | ||
/// </summary> | ||
/// <param name="spiBus">The SPI bus to which the MCP4162 is connected.</param> | ||
/// <param name="chipSelect">The digital output port for the chip select (CS) pin.</param> | ||
/// <param name="maxResistance">The maximum resistance of the rheostat.</param> | ||
public Mcp4162(ISpiBus spiBus, IDigitalOutputPort chipSelect, Resistance maxResistance) : | ||
base(spiBus, chipSelect, 1, maxResistance) | ||
{ | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
Source/Meadow.Foundation.Peripherals/ICs.DigiPots.Mcp4xxx/Driver/Drivers/Mcp4231.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Meadow.Hardware; | ||
using Meadow.Units; | ||
|
||
namespace Meadow.Foundation.ICs.DigiPots; | ||
|
||
/// <summary> | ||
/// Represents an MCP4231 digital potentiometer. | ||
/// </summary> | ||
public class Mcp4231 : Mcp4xx1 | ||
{ | ||
/// <inheritdoc/> | ||
public override int MaxSteps => 129; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Mcp4231"/> class. | ||
/// </summary> | ||
/// <param name="spiBus">The SPI bus to which the MCP4231 is connected.</param> | ||
/// <param name="chipSelect">The digital output port for the chip select (CS) pin.</param> | ||
/// <param name="maxResistance">The maximum resistance of the potentiometer.</param> | ||
public Mcp4231(ISpiBus spiBus, IDigitalOutputPort chipSelect, Resistance maxResistance) : | ||
base(spiBus, chipSelect, 2, maxResistance) | ||
{ | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
Source/Meadow.Foundation.Peripherals/ICs.DigiPots.Mcp4xxx/Driver/Drivers/Mcp4232.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Meadow.Hardware; | ||
using Meadow.Units; | ||
|
||
namespace Meadow.Foundation.ICs.DigiPots; | ||
|
||
/// <summary> | ||
/// Represents an MCP4232 digital rheostat. | ||
/// </summary> | ||
public class Mcp4232 : Mcp4xx2 | ||
{ | ||
/// <inheritdoc/> | ||
public override int MaxSteps => 129; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Mcp4232"/> class. | ||
/// </summary> | ||
/// <param name="spiBus">The SPI bus to which the MCP4232 is connected.</param> | ||
/// <param name="chipSelect">The digital output port for the chip select (CS) pin.</param> | ||
/// <param name="maxResistance">The maximum resistance of the rheostat.</param> | ||
public Mcp4232(ISpiBus spiBus, IDigitalOutputPort chipSelect, Resistance maxResistance) : | ||
base(spiBus, chipSelect, 2, maxResistance) | ||
{ | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
Source/Meadow.Foundation.Peripherals/ICs.DigiPots.Mcp4xxx/Driver/Drivers/Mcp4241.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Meadow.Hardware; | ||
using Meadow.Units; | ||
|
||
namespace Meadow.Foundation.ICs.DigiPots; | ||
|
||
/// <summary> | ||
/// Represents an MCP4241 digital potentiometer. | ||
/// </summary> | ||
public class Mcp4241 : Mcp4xx1 | ||
{ | ||
/// <inheritdoc/> | ||
public override int MaxSteps => 129; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Mcp4241"/> class. | ||
/// </summary> | ||
/// <param name="spiBus">The SPI bus to which the MCP4241 is connected.</param> | ||
/// <param name="chipSelect">The digital output port for the chip select (CS) pin.</param> | ||
/// <param name="maxResistance">The maximum resistance of the potentiometer.</param> | ||
public Mcp4241(ISpiBus spiBus, IDigitalOutputPort chipSelect, Resistance maxResistance) : | ||
base(spiBus, chipSelect, 2, maxResistance) | ||
{ | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
Source/Meadow.Foundation.Peripherals/ICs.DigiPots.Mcp4xxx/Driver/Drivers/Mcp4242.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Meadow.Hardware; | ||
using Meadow.Units; | ||
|
||
namespace Meadow.Foundation.ICs.DigiPots; | ||
|
||
/// <summary> | ||
/// Represents an MCP4242 digital rheostat. | ||
/// </summary> | ||
public class Mcp4242 : Mcp4xx2 | ||
{ | ||
/// <inheritdoc/> | ||
public override int MaxSteps => 129; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Mcp4242"/> class. | ||
/// </summary> | ||
/// <param name="spiBus">The SPI bus to which the MCP4242 is connected.</param> | ||
/// <param name="chipSelect">The digital output port for the chip select (CS) pin.</param> | ||
/// <param name="maxResistance">The maximum resistance of the rheostat.</param> | ||
public Mcp4242(ISpiBus spiBus, IDigitalOutputPort chipSelect, Resistance maxResistance) : | ||
base(spiBus, chipSelect, 2, maxResistance) | ||
{ | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
Source/Meadow.Foundation.Peripherals/ICs.DigiPots.Mcp4xxx/Driver/Drivers/Mcp4251.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Meadow.Hardware; | ||
using Meadow.Units; | ||
|
||
namespace Meadow.Foundation.ICs.DigiPots; | ||
|
||
/// <summary> | ||
/// Represents an MCP4251 digital potentiometer. | ||
/// </summary> | ||
public class Mcp4251 : Mcp4xx1 | ||
{ | ||
/// <inheritdoc/> | ||
public override int MaxSteps => 257; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Mcp4251"/> class. | ||
/// </summary> | ||
/// <param name="spiBus">The SPI bus to which the MCP4251 is connected.</param> | ||
/// <param name="chipSelect">The digital output port for the chip select (CS) pin.</param> | ||
/// <param name="maxResistance">The maximum resistance of the potentiometer.</param> | ||
public Mcp4251(ISpiBus spiBus, IDigitalOutputPort chipSelect, Resistance maxResistance) : | ||
base(spiBus, chipSelect, 2, maxResistance) | ||
{ | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add digital and potentionmeter key words