2019-12-06 22:24:34 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace Unosquare.RaspberryIO.Abstractions {
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interface for Raspberry Pi GPIO controller.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <seealso cref="System.Collections.Generic.IReadOnlyCollection{IGpioPin}" />
|
2019-12-09 17:26:54 +01:00
|
|
|
|
public interface IGpioController : IReadOnlyCollection<IGpioPin> {
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the <see cref="IGpioPin"/> with the specified BCM pin.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>
|
|
|
|
|
/// The <see cref="IGpioPin"/>.
|
|
|
|
|
/// </value>
|
|
|
|
|
/// <param name="bcmPinNumber">The BCM pin number.</param>
|
|
|
|
|
/// <returns>A reference to the GPIO pin.</returns>
|
|
|
|
|
IGpioPin this[Int32 bcmPinNumber] { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the <see cref="IGpioPin"/> with the specified BCM pin.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>
|
|
|
|
|
/// The <see cref="IGpioPin"/>.
|
|
|
|
|
/// </value>
|
|
|
|
|
/// <param name="bcmPin">The BCM pin.</param>
|
|
|
|
|
/// <returns>A reference to the GPIO pin.</returns>
|
|
|
|
|
IGpioPin this[BcmPin bcmPin] { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the <see cref="IGpioPin"/> with the specified pin number.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>
|
|
|
|
|
/// The <see cref="IGpioPin"/>.
|
|
|
|
|
/// </value>
|
|
|
|
|
/// <param name="pinNumber">The pin number in header P1.</param>
|
|
|
|
|
/// <returns>A reference to the GPIO pin.</returns>
|
|
|
|
|
IGpioPin this[P1 pinNumber] { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the <see cref="IGpioPin"/> with the specified pin number.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>
|
|
|
|
|
/// The <see cref="IGpioPin"/>.
|
|
|
|
|
/// </value>
|
|
|
|
|
/// <param name="pinNumber">The pin number in header P5.</param>
|
|
|
|
|
/// <returns>A reference to the GPIO pin.</returns>
|
|
|
|
|
IGpioPin this[P5 pinNumber] { get; }
|
|
|
|
|
}
|
2019-12-04 18:57:18 +01:00
|
|
|
|
}
|