Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/bus/iwm/iwm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,14 @@ std::vector<uint8_t> iwmDevice::create_dib_reply_packet(const std::string& devic
//*****************************************************************************
void IRAM_ATTR iwmBus::service()
{
#ifndef DEV_RELAY_SLIP
// process smartport before diskII
if (!serviceSmartPort())
serviceDiskII();

#ifndef DEV_RELAY_SLIP
serviceDiskIIWrite();
#else
serviceSmartPort();
#endif
}

Expand Down Expand Up @@ -548,10 +550,10 @@ bool IRAM_ATTR iwmBus::serviceSmartPort()
return true;
}

#ifndef DEV_RELAY_SLIP
// Returns true if Disk II was handled
bool IRAM_ATTR iwmBus::serviceDiskII()
{
#ifndef DEV_RELAY_SLIP
// check on the diskii status
switch (iwm_drive_enabled())
{
Expand Down Expand Up @@ -596,12 +598,10 @@ bool IRAM_ATTR iwmBus::serviceDiskII()
iwm_ack_deassert();
break;
}
#endif /* !SLIP */

return true;
}

#ifndef DEV_RELAY_SLIP
// Returns true if a Disk II write was received
bool IRAM_ATTR iwmBus::serviceDiskIIWrite()
{
Expand Down Expand Up @@ -723,7 +723,7 @@ iwm_enable_state_t IRAM_ATTR iwmBus::iwm_drive_enabled()
return iwm_enable_state_t::off;
}
}
#endif /* !SLIP */
#endif /* !DEV_RELAY_SLIP */

void iwmBus::handle_init()
{
Expand Down
4 changes: 4 additions & 0 deletions lib/device/iwm/fuji.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ iwmFuji::iwmFuji()

{ FUJICMD_RESET, [this]() { this->send_reply_packet(err_result); this->iwm_ctrl_reset_fujinet(); }}, // 0xFF
{ IWM_CTRL_RESET, [this]() { this->send_reply_packet(err_result); this->iwm_ctrl_reset_fujinet(); }}, // 0x00
#ifndef DEV_RELAY_SLIP
{ IWM_CTRL_CLEAR_ENSEEN, [this]() { diskii_xface.d2_enable_seen = 0; err_result = SP_ERR_NOERROR; }},
#endif

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

{ IWM_STATUS_DIB, [this]() { this->send_status_dib_reply_packet(); status_completed = true; }}, // 0x03
{ IWM_STATUS_STATUS, [this]() { this->send_status_reply_packet(); status_completed = true; }}, // 0x00
#ifndef DEV_RELAY_SLIP
{ IWM_STATUS_ENSEEN, [this]() { data_len = 1; data_buffer[0] = diskii_xface.d2_enable_seen; }},
#endif

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