-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from WildernessLabs/develop
Update for RC2-1
- Loading branch information
Showing
3 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
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 @@ | ||
namespace Meadow.Hardware | ||
{ | ||
//TODO: what else should this have? allowed speeds? | ||
public class I2cChannelInfo : DigitalChannelInfoBase, II2cChannelInfo | ||
{ | ||
public I2cChannelFunctionType ChannelFunction { get; protected set; } | ||
|
||
public I2cChannelInfo(string name, | ||
I2cChannelFunctionType channelFunction, | ||
bool pullDownCapable = false, | ||
bool pullUpCapable = false) | ||
: base( | ||
name, | ||
inputCapable: true, | ||
outputCapable: true, | ||
interruptCapable: false, // ?? i mean, technically, yes, but will we have events? | ||
pullDownCapable: pullDownCapable, | ||
pullUpCapable: pullUpCapable, | ||
inverseLogic: false) //TODO: switch to C# 7.2+ to get rid of trailing names | ||
{ | ||
this.ChannelFunction = channelFunction; | ||
} | ||
} | ||
} |
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,23 @@ | ||
namespace Meadow.Hardware | ||
{ | ||
public class SpiChannelInfo : DigitalChannelInfoBase, ISpiChannelInfo | ||
{ | ||
public SpiLineType LineTypes { get; protected set; } | ||
|
||
public SpiChannelInfo(string name, | ||
SpiLineType lineTypes, | ||
bool pullDownCapable = false, | ||
bool pullUpCapable = false) | ||
: base( | ||
name, | ||
inputCapable: true, | ||
outputCapable: true, | ||
interruptCapable: false, // ?? i mean, technically, yes, but will we have events? | ||
pullDownCapable: pullDownCapable, | ||
pullUpCapable: pullUpCapable, | ||
inverseLogic: false) //TODO: switch to C# 7.2+ to get rid of trailing names | ||
{ | ||
LineTypes = lineTypes; | ||
} | ||
} | ||
} |
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,23 @@ | ||
namespace Meadow.Hardware | ||
{ | ||
public class UartChannelInfo : DigitalChannelInfoBase, IUartChannelInfo | ||
{ | ||
public SerialDirectionType SerialDirection { get; protected set; } | ||
|
||
public UartChannelInfo(string name, | ||
SerialDirectionType serialDirection, | ||
bool pullDownCapable = false, | ||
bool pullUpCapable = false) | ||
: base( | ||
name, | ||
inputCapable: true, | ||
outputCapable: true, | ||
interruptCapable: false, // ?? i mean, technically, yes, but will we have events? | ||
pullDownCapable: pullDownCapable, | ||
pullUpCapable: pullUpCapable, | ||
inverseLogic: false) //TODO: switch to C# 7.2+ to get rid of trailing names | ||
{ | ||
this.SerialDirection = serialDirection; | ||
} | ||
} | ||
} |