public NRF52840_GPIOTasksEvents(Machine machine, NRF52840_GPIO port0 = null, NRF52840_GPIO port1 = null) : base(machine) { IRQ = new GPIO(); DefineRegisters(); ports = new [] { port0, port1 }; if (port0 != null) { port0.PinChanged += OnPinChanged; } if (port1 != null) { port1.PinChanged += OnPinChanged; } pinToChannelMapping = new Dictionary <NRF52840_GPIO.Pin, Channel>(); channels = new Channel[NumberOfChannels]; for (var i = 0; i < channels.Length; i++) { channels[i] = new Channel(i, this); } }
public Pin(NRF52840_GPIO parent, int id) { this.Parent = parent; this.Id = id; }