Skip to content

Commit

Permalink
Merge pull request #250 from WildernessLabs/feature/spi-bus-number
Browse files Browse the repository at this point in the history
Add bus number to SPI
  • Loading branch information
adrianstevens authored Jul 23, 2024
2 parents 0e6f755 + cc26402 commit a579ff5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/Meadow.Contracts/Communications/SpiChannelInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@ public class SpiChannelInfo : DigitalChannelInfoBase, ISpiChannelInfo
/// </summary>
public SpiLineType LineTypes { get; protected set; }

/// <inheritdoc/>
public int BusNumber { get; }

/// <summary>
/// Initializes a new instance of the <see cref="SpiChannelInfo"/> class with the specified parameters.
/// </summary>
/// <param name="name">The name of the SPI channel.</param>
/// <param name="lineTypes">The supported line types of the SPI channel.</param>
/// <param name="busNumber">The system bus number of SPI channel</param>
/// <param name="pullDownCapable">Indicates whether the channel is capable of pull-down.</param>
/// <param name="pullUpCapable">Indicates whether the channel is capable of pull-up.</param>
public SpiChannelInfo(string name,
SpiLineType lineTypes,
int busNumber = 0,
bool pullDownCapable = false,
bool pullUpCapable = false)
: base(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@ public interface ISpiChannelInfo : IDigitalChannelInfo
/// Gets the line types supported by the SPI channel.
/// </summary>
SpiLineType LineTypes { get; }
/// <summary>
/// Gets the system bus number for the channel
/// </summary>
int BusNumber { get; }
}
}

0 comments on commit a579ff5

Please sign in to comment.