private void UpdateInterrupts() { if (bufferSent) { TxIRQ.Blink(); bufferSent = false; } if (bufferReceived) { RxIRQ.Blink(); bufferReceived = false; } }
private void TryStartTransmission() { if (!txEnable.Value || command != Commands.TransferData) { this.Log(LogLevel.Debug, "Tried to issue a transaction without full configuration."); return; } if (RegisteredPeripheral == null) { this.Log(LogLevel.Warning, "Trying to issue a transaction to a slave peripheral, but nothing is connected"); return; } foreach (var b in Machine.SystemBus.ReadBytes(txTransferAddress.Value, (int)txTransferBufferSize.Value)) { RegisteredPeripheral.Transmit(b); } RegisteredPeripheral.FinishTransmission(); command = Commands.None; TxIRQ.Blink(); }