forked from nanoframework/nanoFramework.IoT.Device
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Mcp23x0x.cs
32 lines (29 loc) · 1.19 KB
/
Mcp23x0x.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Device.Gpio;
namespace Iot.Device.Mcp23xxx
{
/// <summary>
/// Wraps 8-bit MCP I/O expanders.
/// </summary>
public abstract class Mcp23x0x : Mcp23xxx
{
/// <summary>
/// Constructs Mcp23x0x instance
/// </summary>
/// <param name="device">I2C device used to communicate with the device</param>
/// <param name="reset">Reset pin</param>
/// <param name="interrupt">Interrupt pin</param>
/// <param name="controller">
/// <see cref="GpioController"/> related with
/// <paramref name="reset"/> and <paramref name="interrupt"/> pins
/// </param>
/// <param name="shouldDispose">True to dispose the Gpio Controller</param>
protected Mcp23x0x(BusAdapter device, int reset, int interrupt, GpioController? controller = null, bool shouldDispose = true)
: base(device, reset, interrupt, gpioController: controller, shouldDispose: shouldDispose)
{
}
/// <inheritdoc/>
protected override int PinCount => 8;
}
}