Skip to content

Commit c0cbfa0

Browse files
committed
Only update enable seen when drive is spinning.
1 parent c13f865 commit c0cbfa0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/bus/iwm/iwm.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@ bool IRAM_ATTR iwmBus::serviceDiskII()
579579
break;
580580

581581
case iwm_enable_state_t::on:
582+
diskii_xface.d2_enable_seen |= diskii_xface.iwm_enable_states();
582583
#ifdef DEBUG
583584
new_track = IWM_ACTIVE_DISK2->get_track_pos();
584585
if (old_track != new_track)

lib/bus/iwm/iwm_ll.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,6 @@ uint8_t IRAM_ATTR iwm_diskii_ll::iwm_enable_states()
12091209
return 0;
12101210
}
12111211

1212-
d2_enable_seen |= states;
12131212
return states;
12141213
}
12151214

lib/device/iwm/fuji.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ iwmFuji::iwmFuji()
8080

8181
{ FUJICMD_RESET, [this]() { this->send_reply_packet(err_result); this->iwm_ctrl_reset_fujinet(); }}, // 0xFF
8282
{ IWM_CTRL_RESET, [this]() { this->send_reply_packet(err_result); this->iwm_ctrl_reset_fujinet(); }}, // 0x00
83-
{ IWM_CTRL_CLEAR_ENSEEN, [this]() { diskii_xface.d2_enable_seen = 0; err_result = SP_ERR_NOERROR; }},
83+
{ IWM_CTRL_CLEAR_ENSEEN, [this]() { diskii_xface.d2_enable_seen = 0; err_result = SP_ERR_NOERROR; Debug_printf("\nCLEAR ENSEEN: %02x", diskii_xface.d2_enable_seen); }},
8484

8585
{ FUJICMD_MOUNT_ALL, [&]() { err_result = (mount_all() ? SP_ERR_IOERROR : SP_ERR_NOERROR); }}, // 0xD7
8686
{ FUJICMD_MOUNT_IMAGE, [&]() { err_result = iwm_ctrl_disk_image_mount(); }}, // 0xF8
@@ -92,7 +92,7 @@ iwmFuji::iwmFuji()
9292

9393
{ IWM_STATUS_DIB, [this]() { this->send_status_dib_reply_packet(); status_completed = true; }}, // 0x03
9494
{ IWM_STATUS_STATUS, [this]() { this->send_status_reply_packet(); status_completed = true; }}, // 0x00
95-
{ IWM_STATUS_ENSEEN, [this]() { data_len = 1; data_buffer[0] = diskii_xface.d2_enable_seen; }},
95+
{ IWM_STATUS_ENSEEN, [this]() { Debug_printf("\nENSEEN: %02x", diskii_xface.d2_enable_seen); data_len = 1; data_buffer[0] = diskii_xface.d2_enable_seen; }},
9696

9797
{ FUJICMD_DEVICE_ENABLE_STATUS, [this]() { this->send_stat_get_enable(); }}, // 0xD1
9898
{ FUJICMD_GET_ADAPTERCONFIG_EXTENDED, [this]() { this->iwm_stat_get_adapter_config_extended(); }}, // 0xC4

0 commit comments

Comments
 (0)