using Cosmos.Core;
namespace Cosmos.Core.IOGroup
{
///
/// PIC class. Represent PIC.
///
public class PIC : IOGroup
{
///
/// Command port.
///
public readonly IOPort Cmd = new IOPort(0x20);
///
/// Data port.
///
public readonly IOPort Data = new IOPort(0x21);
///
/// Create new instance of the class.
///
/// True if slave.
internal PIC(bool aSlave)
{
byte aBase = (byte) (aSlave ? 0xA0 : 0x20);
Cmd = new IOPort(aBase);
Data = new IOPort((byte) (aBase + 1));
}
}
}