Skip to content

Commit

Permalink
Merge pull request #74 from WildernessLabs/develop
Browse files Browse the repository at this point in the history
Update for RC2-1
  • Loading branch information
jorgedevs authored Feb 2, 2023
2 parents 32320ec + 9375e9a commit dd68a1c
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Source/Meadow.Contracts/Communications/I2cChannelInfo.cs
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;
}
}
}
23 changes: 23 additions & 0 deletions Source/Meadow.Contracts/Communications/SpiChannelInfo.cs
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;
}
}
}
23 changes: 23 additions & 0 deletions Source/Meadow.Contracts/Communications/UartChannelInfo.cs
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;
}
}
}

0 comments on commit dd68a1c

Please sign in to comment.