From 8a81cb4f9c47463048902c9f58c174d29ce3aeae Mon Sep 17 00:00:00 2001 From: joevt Date: Sun, 10 Mar 2024 17:41:26 -0700 Subject: [PATCH] sc53c94: Use enums. --- devices/common/scsi/sc53c94.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/devices/common/scsi/sc53c94.cpp b/devices/common/scsi/sc53c94.cpp index 9c395de..613a954 100644 --- a/devices/common/scsi/sc53c94.cpp +++ b/devices/common/scsi/sc53c94.cpp @@ -215,14 +215,14 @@ void Sc53C94::pseudo_dma_write(uint16_t data) { void Sc53C94::update_command_reg(uint8_t cmd) { - if (this->on_reset && (cmd & 0x7F) != CMD_NOP) { + if (this->on_reset && (cmd & CMD_OPCODE) != CMD_NOP) { LOG_F(WARNING, "%s: command register blocked after RESET!", this->name.c_str()); return; } // NOTE: Reset Device (chip), Reset Bus and DMA Stop commands execute // immediately while all others are placed into the command FIFO - switch (cmd & 0x7F) { + switch (cmd & CMD_OPCODE) { case CMD_RESET_DEVICE: case CMD_RESET_BUS: case CMD_DMA_STOP: @@ -564,7 +564,7 @@ void Sc53C94::update_irq() uint8_t new_irq = !!(this->int_status != 0); if (new_irq != this->irq) { this->irq = new_irq; - this->status = (this->status & 0x7F) | (new_irq << 7); + this->status = (this->status & ~STAT_INT) | (new_irq << 7); this->int_ctrl->ack_int(this->irq_id, new_irq); } }