MCPcopy Create free account
hub / github.com/PiSCSI/piscsi / GetPhase

Method GetPhase

cpp/hal/data_sample.cpp:23–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23phase_t DataSample::GetPhase() const
24{
25 // Selection Phase
26 if (GetSEL()) {
27 return phase_t::selection;
28 }
29
30 // Bus busy phase
31 if (!GetBSY()) {
32 return phase_t::busfree;
33 }
34
35 // Get target phase from bus signal line
36 uint32_t mci = GetMSG() ? 0x04 : 0x00;
37 mci |= GetCD() ? 0x02 : 0x00;
38 mci |= GetIO() ? 0x01 : 0x00;
39 return BUS::GetPhase(mci);
40}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected