MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / GetUnit

Method GetUnit

source/Harddisk.cpp:1043–1060  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1041}
1042
1043HardDiskDrive* HarddiskInterfaceCard::GetUnit(void)
1044{
1045 const bool isSmartPortCmd = m_command & SP_Cmd_base;
1046
1047 if (!isSmartPortCmd)
1048 return &m_hardDiskDrive[GetProDOSBlockDeviceUnit()];
1049
1050 if (m_unitNum > kMaxSmartPortUnits)
1051 return NULL;
1052
1053 if (m_unitNum > GetNumConnectedDevices())
1054 return NULL;
1055
1056 if (m_unitNum == 0)
1057 return &m_smartPortController;
1058
1059 return &m_hardDiskDrive[m_unitNum - 1];
1060}
1061
1062void HarddiskInterfaceCard::SetIdString(std::vector<BYTE>& status, const std::string& idStr)
1063{

Callers 2

IOReadMethod · 0.80
IOWriteMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected